Lobsters Interview with matheusmoreira about Lone Lisp

37 points by veqq a day ago on lobsters | 9 comments

matheusmoreira | 23 hours ago

Thank you for the interview!!

I don’t have much to say, except for that I really enjoy the interview series, I believe I have read every single one so far. Thank you for doing them @veqq and thanks to all the interviewees so far for participating, it’s really nice to read about all of the personal relationships that people have to computing!

matheusmoreira | 5 hours ago

it's really nice to read about all of the personal relationships that people have to computing

I really enjoy that too. I'm especially interested in origin stories, seeing how people came to care about computers as something beyond just a tool to get things done. I like collecting and contrasting these experiences.

One I'm particularly fond of is that of Shonumi, author of the GBE+ GBA emulator, who like me was also influenced by the Mega Man Battle Network games. Would love to read a Lobsters Interview with him.

manuel | 12 hours ago

One of my pet peeves, so I'll just it mention it here again: restartable exceptions do not require first-class continuations. This is easily proven by Common Lisp, which does not have continuations but does have restartable exceptions.

The trick to enabling restartability is to simply not unwind the stack before a handler is called. (This is distinct from the usual Java-like exception handling where a handler is called after the stack has already been unwound.)

This means, the handler runs on the stack where the exception was signalled, with all state still intact, and can simply return normally if it desires. Or, in the case of CL, perform a jump to a restart handler somewhere on the stack.

matheusmoreira | 6 hours ago

That's true! I apologize if I implied it was required, might be an artifact of my own excitement at the insight.

Lone lisp specifically does require it though, because the returned continuation is multishot and can escape from the signal handler.

(import (lone print set quote lambda intercept signal))

(set continuation
  (intercept
    (('return (lambda (value continuation) continuation)))
    (signal 'return 'value)))

(print (continuation 1)); 1
(print (continuation 2)); 2
(print (continuation 3)); 3

Other languages no doubt do it differently, and that's absolutely fine!

I was also tempted to use delimited continuations to implement lone's generators, but since they form the foundation of iteration they are more performance critical so I used separate stacks to eliminate copying. Error handling is off the beaten path so I decided to offer full power.

rebeca | 9 hours ago

Sometimes I get myself thinking the most important work or projects of most people are often the ones they do in their spare time, most frequently for free and fun. Now I imagine that my doctor might have a double life writing his own lisp language :P Thanks very mych for this lovely interview.

matheusmoreira | 6 hours ago

And it turns out I'm not alone either. Looks like there is one Dr. Cameron Kaiser out there who has worked on some serious projects. He even shares my ownership of the machine ethos, and has taken it even further than I did by daily driving fully open POWER9 workstations.

mtset | 7 hours ago

Awesome interview, and TIL about lone lisp! What a cool project.

So when I started highschool, around 13-14, I took the informatics course and started learning C++ with a very old IDE called Dev-C++

Me too! I hadn't thought about Dev-C++ in ages, what a blast from the past.

matheusmoreira | 5 hours ago

I hadn't thought about Dev-C++ in ages, what a blast from the past.

Looks like it's somehow still chugging along. I just checked and it had a release in 2021! Wild.