Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Manga Guide to Lisp (bugyo.tk)
137 points by _zhqs on Dec 26, 2020 | hide | past | favorite | 14 comments


If you thought a manga guide is fun, a visual novel is even better. Don't miss the game Magical Language Lyrical Lisp (魔法言語 リリカルLisp, 2007) [0] from the same (?) author, it's a magical girl visual novel tutorial on basic Lisp syntax.

I was stunned when I first saw it back then. Initially I thought it was just a simple parody, like asking you some questions and comparing it with the answers. But it was the result of serious hacking, it was evaluating the Lisp code in your answers for real. The author apparently implemented an actual Lisp interpreter using the scripting language of the NScripter visual novel engine. Although it's a really minimalist Proof-of-Concept, but it even has a mark-and-sweep garbage collector and an incomplete tail call optimization (supported feature list [1]). Source code is under BSD [2]. Don't know Japanese and can't comment on the game itself though...

For those who don't know, NScripter was a standard visual novel engine used by many games in the 2000s-2010s. It also has a FOSS reimplementation, ONScripter, by anime and manga aficionados who wanted to play games on non-Windows. Its scripting language was mainly designed for the "if-then-else" storylines and never intended to be a general-purpose programming environment. Implementing a Lisp interpreter is something that its designers had never imagined.

[0] https://web.archive.org/web/20120109071225/http://lyrical.bu...

[1] https://web.archive.org/web/20160514130040/http://lyrical.bu...

[2] https://github.com/zick/Magical-Language-Lyrical-Lisp


Along sort of those lines, here's a text adventure teaching Lisp with a built-in interpreter: https://eblong.com/zarf/zweb/lists/


I'll definitely have to check this out – thanks.

Interesting to hear a Lisp interpreter was implemented in NScripter. As anyone who has programmed in NScripter will attest – it's not the easiest language to work with. Although it has a lot of useful built-in commands for creating visual novels, it's essentially a low-level language (especially inspired by assembly language). You have to handle program flow manually – no for loops, while loops, and no proper if statements. There are very primitive forms of variables, but no complex data structures. You can extend functionality using Lua, however.

I'm always amazed by what people have managed to do with NScripter, given its limitations and relative obscurity.


Pretty neat that there's a OSS implementation. As far as I tried, it doesn't support all NScripter features.[1]

I wonder if there's a port for web browsers...

[1] Log from onscripter

  command [resetmenu] is not supported yet!!
  command [insertmenu] is not supported yet!!
  command [csvopen] is not supported yet!!
  command [csvread] is not supported yet!!
  command [csvclose] is not supported yet!!
  command [readfile] is not supported yet!!
  command [filecreate] is not supported yet!!
  command [csvopen] is not supported yet!!
  command [csvread] is not supported yet!!
  command [csvclose] is not supported yet!!
  command [getnextline] is not supported yet!!
  command [getnextline] is not supported yet!!


> I wonder if there's a port for web browsers...

I never looked it up, but based on my understanding of the fandom scene (which often produces technological innovations), I'm almost 100% certain that on the Internet, somewhere, some manga aficionados should have already compiled ONScripter to JavaScript using something like Emscripten, perhaps even with some prepackaged visual novels to play.



This is in Japanese. I'm amazed it got attention on English-speaking HN.

P.S. pg also has a guide to lisp: http://www.paulgraham.com/rootsoflisp.html


PG is The guide to Lisp as far as I'm concerned, the first one at least.

I'm a fairly competent Lisper these days, but man I struggled so hard in the beginning and would probably have given up if it wasn't for PG's essays.

He also wrote a pretty good book on more advanced topics that's free to download:

http://www.paulgraham.com/onlisp.html


Some HN readers can grok Japanese :)


For those who don’t know the original series (Lisp is not part of it as far as I can tell): https://en.m.wikipedia.org/wiki/The_Manga_Guides Nice to read and collect.


Here's a cool interactive version of SICP I used just in case you didn't feel like learning Japanese to do it the manga way.

https://xuanji.appspot.com/isicp/index.html


Is this to promote more diversity in CS?


It's just a fandom subculture thing, basically it's the equivalent of U.S. hackers writing Star Trek or Star Wars fan-fics about Unix programming.


Amongst young CS students (active online at least) I assume a large proportion consume at least a little bit of stuff like manga and anime.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: