News for hackers. Stuff that matters.
Re:Fun with Lisp: Programming the NES (2012) by segmondy on Friday November 28, 2014 @09:16AM (#8670966)
This is not only possible in Lisp, this is also possible in Prolog. In Prolog, Data is code. LISP can be viewed as a specialization of Prolog, where the data structure just lists. Prolog has more complex data structure compounds, where a list is nothing more but one type of said compound structure. One can write Prolog code to emit 6502 code or any code as well, and I suspect with as much ease as he did.

Here is a sample of code generation in Prolog for register machines, https://github.com/segmond/PrologThingz/blob/master/clause_a...

An example for accumulator based machines which the 6502 https://github.com/segmond/PrologThingz/blob/master/clause_a...

The examples I posted is from an awesome Prolog book I read called "Clause and Effect"

There are no comments on this comment yet.