Live data from Hacker News

Technical Breakdown of a new NES game written in Lisp

dustmop.io

21–30 of 71 posts

Re: Technical Breakdown of a new NES game written in Lisp

#21
post #11

Earlier quoted context omitted.

The other side of that coin is that on mobile the article is painful to read and the layout is horrible. For what it's worth I hate medium as well. But I would recommend ghost.org if you want to go with self hosting.

Also choosing a good wordpress theme helps a lot. :)

The post is using [0] this theme, which hasn't been updated in over 6 years.

[0] https://wordpress.org/themes/duster/

Re: Technical Breakdown of a new NES game written in Lisp

#22
post #4

I know it's off-topic but I appreciate so much when somebody hosts their own blog rather than using Medium or some nag-ware hosting service. I didn't get any pop-up "pardon[ing] the interruption" or asking me to join a mailing list, or anything! To think this used to be the normal way of doing things on the web.

The other side of that coin is that on mobile the article is painful to read and the layout is horrible. For what it's worth I hate medium as well. But I would recommend ghost.org if you want to go with self hosting.

Seems ok reading in my mobile safari, not even using reader mode.

Re: Technical Breakdown of a new NES game written in Lisp

#23
post #4

I know it's off-topic but I appreciate so much when somebody hosts their own blog rather than using Medium or some nag-ware hosting service. I didn't get any pop-up "pardon[ing] the interruption" or asking me to join a mailing list, or anything! To think this used to be the normal way of doing things on the web.

The other side of that coin is that on mobile the article is painful to read and the layout is horrible. For what it's worth I hate medium as well. But I would recommend ghost.org if you want to go with self hosting.

You can make a lightweight blog with no ads which looks good on mobile by making a linked list of github gists. https://gist.github.com/cellularmitosis/1106b185f8b34ae0e36a...

Re: Technical Breakdown of a new NES game written in Lisp

#26

I’d like to hear more about the compiled stack. In extremely latency sensitive applications, the mix of stack and instruction cacheline faults can cause significant overhead.

No cache lines on a 6502, though!

I'm talking about modern architectures

Re: Technical Breakdown of a new NES game written in Lisp

#27
post #6

This is a complete and absolute hack and I love it. When reading the README file of their github it is possible to see how "impure" pragmatic decisions were made like for loops and not supporting proper recursion. I wish there would be more projects like this one porting lisp runtimes to more and more hardware. In the other hand the racket lisp behind the scenes _generates_ the assembly code based on some of the sche…

Most Lispers and some Schemers are quite pragmatic in that regard. With the former favouring OOP and looping over recursion and the latter using imperative code when it matters. With developer mindshare flocking to the Haskell view of FP, for the Lisp family, only the Clojure users seem to still hold purity in high regard.

  With the former favouring OOP and looping over recursion
Not my experience at all, fwiw.

Re: Technical Breakdown of a new NES game written in Lisp

#28
I loved Lisp upon my first exposure in the late 80s in university. Then I "had" to professionally abandon Lisp leanings because I entered the game industry which required, at the time, a commitment to 8-bit assembly code. No problem. Lisp remained a hobby. Fast forward! Unexpected intersect! I love this so much and thank you for the great writeup!

There's a podcast for present day NES developers called The Assembly Line.[1] I'm sure they'd enjoy this story and talking to you.

[1] https://soundcloud.com/nesassemblyline

Re: Technical Breakdown of a new NES game written in Lisp

#29
If you like this, you should also check out the work around Retro City Rampage. RCR is a GTA1 clone for multiple platforms from a few years back, but the developer also made a real NES ROM of it. Here's a great talk about that process: https://www.youtube.com/watch?v=Hvx4xXhZMrU

(I'm not related to the project, but it's one of the few games I've 100% completed because it was just so good)

Re: Technical Breakdown of a new NES game written in Lisp

#30

This was an incredibly enjoyable read. A lesson to take away is that many of the ideas of Lisp can be taken advantage of without reeling in the entirety of an existing stack. Writing a Lisp parser is easy. Walking Lisp code is easy. Serializing Lisp code is easy. Adding a new primitive is easy. Adding very basic syntax transforming macros is easy. All of these are virtually trivial if your host language is a Lisp, as…

If you aren't going to have a GC, "rich" runtime or lambda support, what does LISP really bring you over FORTH? And implementations of the latter on 6502 have been commonplace since the 1980s...

I understand that Forth is powerful and elegant, and one of the last languages I'd want to take on in a fight when wielded by a master, so let me pretend you were asking about a stripped-down Lisp compared to, say, Pascal, instead:

* The simple syntax of stripped-down Lisp is very amenable to application-specific or domain-specific macros. This turns out to be a convenient way to do things that often the language or compiler alone can't do as well, if you used only functions, data, and conventions.

* That the syntax is so simple, and can also be first-class data that is displayed from the programming environment like it looks in syntax, makes it especially nice for things like intermediate representations that are refined incrementally. For example, you can show a translation series of steps that go from syntax parse, to resolutions, to phases of optimizations, to high-level assembler, to a very low-level target code (still represented with parentheses and "opcodes"), from which you write bytes. This can also be convenient.

In this particular case, they're using Racket (an implementation of a dialect of Scheme) to implement a compiler for a Lisp dialect they invented. Using Racket gives them both a nice general-purpose language for implementing their compiler, and happens to already have a lot of tools for parsing their own stripped-down Lisp and manipulating it.

IIUC, Naughty Dog used Racket for a similar purpose: to implement their own Lisp. For a narrative DSL for some AAA titles.

Post reply on HN