
SBCL: The Ultimate Assembly Code Breadboard - kryptiskt
http://www.pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/
======
616c
I am still trying to get a handle on Lisp and Scheme, but blog posts and
projects like this, and the Common Lisp OS posted here previously [0] make me
really impressed and confused about why people, if you dislike the Lisp style
and philosophy, cannot admire its bizarre powers. I mean, I see most languages
from that paradigm (why hate when you can be entertained, either by the good
or bad), but this is very cool and way over my head.

[0]
[https://news.ycombinator.com/item?id=146670](https://news.ycombinator.com/item?id=146670)

~~~
orthecreedence
> cannot admire its bizarre powers

Pure jealousy =]. People like to rag on lisp, but their language dujour just
got what lisp's been packing for at least 20 years. Between the interactive
programming model, compiling to machine code, real threading, macros, and many
other features, it's the perfect secret weapon.

~~~
powersurge360
It is my understanding that threading is a sore topic in most common lisps
having either poor or experimental support. I'd love to be proved wrong,
however.

~~~
ScottBurson
Most Common Lisp implementations have had good threading support for years
now, at least on the implementation's primary platforms.

The threading APIs, however, are all different -- not necessarily in any deep
way, but in incidental ways like function names and signatures. There's a
package Bordeaux-Threads that provides a portable API layer on top of the
various implementation-specific APIs.

------
mark_l_watson
SBCL is an amazing project. I use it for some personal projects, but where the
SBCL community really shined, in my experience, was on an AI for medical
records project I worked on several years ago. We had some issues with SBCL
that were fixed very quickly. A nice experience.

------
bsder
The only thing I would point out is that "free" FXCH isn't free. It has quite
a lot of baggage inside the microprocessor and was something that designers
made a conscious decision to support (see Pentium vs. AMD K5).

There are good reasons why hardware supports registers instead of a stack.
However, given where x86 was at the time, the hardware designers of the time
took the penalties because the gains to the software folks justified it.

Those choices no longer hold.

------
jgalt212
People love to go on and on about the power of macros, but for me, what
separates Lisp from the crowd is that it's a compiled language with a REPL.

Are they any other usable compiled languages with a REPL?

~~~
jules
Haskell, OCaml, Erlang, Scala, C#, C, C++ (!) and many others. This really
doesn't set Lisp apart any more.

~~~
cscurmudgeon
I have used the REPL in all those languages except for Erlang. Trust me.
Nothing compares to Common Lisp's Slime. Not all REPLs are equal.

~~~
lambda
Erlang has Distel, which is a pretty powerful SLIME like mode:
[https://github.com/massemanet/distel](https://github.com/massemanet/distel)
(and written by Luke Gorrie, the same guy who wrote SLIME).

I haven't used either Distel or SLIME extensively enough to say if it's
comparable, but it looks fairly similar.

------
rumbler
Thank you! I did not know about SBCL, or Paul Khuong, before. This is the most
interesting thing I've read this week. This kind of article is why I come to
Hacker News.

------
waterhouse
Site is currently down for me, presumably deluged by traffic. A Google cache
exists, but at least on Chrome it still needs to load something from pvk.ca
before it displays any portion of the webpage. Therefore, here is the page
source with most of the markup removed; you can get from it some idea of what
the page is about.

[http://pastebin.com/JL7aRcpn](http://pastebin.com/JL7aRcpn)

~~~
mjn
It looks like he (accidentally?) included a gigantic scanned image in the
post. However most of the comments on the last pvk.ca post submitted here were
also about how it's down
([https://news.ycombinator.com/item?id=7286655](https://news.ycombinator.com/item?id=7286655)),
so the blog config/hosting might just be borked.

Google Cache seems to always try to load the images and hang for a while if
the site is unreachable (not sure why, since if the site were reachable I
wouldn't be on Google Cache in the first place). You can click "text-only
version" in the top-right to stop that.

~~~
pkhuong
Thanks for the heads up on the scan! That's what I get for publishing just
before rushing to dinner.

The blog is just a bunch of static files, so there shouldn't be any issue.
This situation is really annoying; I'll figure something out soon.

------
gwu78
djb once wrote a FORTH-like interpreter.

Anyone get that old code to run today?

I have always thought think LISP/Scheme's "best" use is to write code
generators (e.g., that output C or asm). I know there's at least one
LISP/Scheme project that outputs C, so I know I'm not alone in thinking this
can be useful.

FORTH has always seemed better suited to driving hardware than any
LISP/Scheme.

This is some sort of bias perhaps. These are both very flexible languages.

What if historically programmers tried to use FORTH for "AI" and LISP as a
"portable assembler"?

~~~
protomyth
> What if historically programmers tried to use FORTH for "AI" and LISP as a
> "portable assembler"?

Then I guess the Burroughs B5000 and its ilk might have become a popular
machine for AI research. We would have had Stack Machines instead of LISP
Machines.

~~~
agumonkey
I'll just throw that in here, as I always do, in case people want a nice
historical overview (yet detailed) of stack machines :
[http://www.eecg.toronto.edu/~laforest/Second-
Generation_Stac...](http://www.eecg.toronto.edu/~laforest/Second-
Generation_Stack_Computer_Architecture.pdf)

