top | item 36406868

(no title)

musicnarcoman | 2 years ago

Nice work, I will have to read the research paper later ("Tacit Programming Code Synthesis and Optimization with Genetic Algorithms").

One question, why did you decide to make the size of cells visible to programs (pointer arithetic)? Will that not lead to the same portability challenges that we have already had with C and C++?

discuss

order

adamthekiwi|2 years ago

Fair warning, it's terrible! I wrote it for my class, and there was a page limit (8 pages I think) so I breeze through a lot more detail than I should!

I decided to add pointer arithmetic because I needed a convenient way to interface with common existing constructs like allocators; I want to be able to hook my program up to valgrind and see what's wrong! But these pointer arithmetic operations are also generic across implementations: the web implementation uses tape indices as pointers (i.e. pointers with element sizes of 1), but the desktop implementation uses malloc/free and uses regular eight byte pointers. The compiler doesn't know the difference! This allows the architecture a large amount of flexibility across lots of different types of backend implementation!

Thanks for the feedback!

musicnarcoman|2 years ago

Ah yes, the dreaded page limit! I look for examples of working synthesis so I will still read it.

The question of fixed vs. infinite integers and observable sizes of datastructures is a dilemma that I do not know of any good solution to. Selecting fixed and observable sizes leads to efficient execution but risks making programs unportable (after they have been compiled and are distributed as object code).

Selecting arbitrary precision integers and no observable sizes instead requires a smart runtime/jit/compiler to get efficient execution.