Top
Best
New

Posted by pabs3 8 hours ago

SBCL: A Sanely-Bootstrappable Common Lisp (2008) [pdf](research.gold.ac.uk)
90 points | 48 comments
vindarel 4 hours ago|
Previously:

SBCL (16 days ago) https://news.ycombinator.com/item?id=47140657 (107 comments)

Porting SBCL to the Nintendo Switch https://news.ycombinator.com/item?id=41530783 (81 comments)

An exploration of SBCL internals https://news.ycombinator.com/item?id=40115083 (106 comments)

Arena Allocation in SBCL https://news.ycombinator.com/item?id=38052564 (32 comments)

SBCL (2023) https://news.ycombinator.com/item?id=36544573 (167 comments)

Parallel garbage collection for SBCL [pdf] https://news.ycombinator.com/item?id=37296153 (45 comments)

SBCL 2.3.5 released https://news.ycombinator.com/item?id=36107154 (31 comments)

Using SBCL Common Lisp as a Dynamic Library (2022) https://news.ycombinator.com/item?id=31054796 (67 comments)

etc

meken 18 minutes ago||
> Current Common Lisp implementations can usually support both image-oriented and source-oriented development. Image-oriented environments (for example, Squeak Smalltalk]) have as their interchange format an image file or memory dump containing all the objects present in the system, which can be later restarted on the same or distinct hardware. By contrast, a source-oriented environment uses individual, human-readable files for recording information for reconstructing the project under development; these files are processed by the environment to convert their contents into material which can be executed.

Am I reading this right that people can (and do??) use images as a complete replacement for source code files?

dfox 3 minutes ago|
All the magic of Smalltalk is in the development tools that work by means of introspection into the running image, writing source code in text files causes you to lose all that. Add to that the fact that Smalltalk when written as source files is quite verbose.

Smalltalk does have standard text source file format, but that format is best described as human-readable, not human-writable. The format is essentially a sequence of text blocks that represent operations done to the image in order to modify it to a particular state interspersed with "data" (mostly method source code, but the format can store arbitrary stuff as the data blocks).

One exception to this is GNU Smalltalk which is meant to be used with source files and to that end uses its own more sane source file syntax.

anonzzzies 2 hours ago||
SBCL is lovely and very well optimised. Been using it for many personal projects as it just works and it is so easy to work with and debug. I cry a lot when I have to use 'modern' things. But those make money, they are just far worse.
praptak 6 hours ago||
SBCL seems pretty actively developed. A proposal for coroutines implementation appeared recently and AFAIK it is being actively discussed and improved upon.
TurboHaskal 5 hours ago||
And arena support, and a parallel GC... there's always something exciting and promising coming up.

The proprietary implementations are also quite good.

cardanome 1 hour ago|||
Arena support would make it amazing for game dev. Yes please!
pjmlp 4 hours ago|||
To note that you will find arena like stuff on old Lisps, like those from Xerox, TI and Genera.
geospeck 6 hours ago||
Do you have a link to the proposal and the discussion? I am quite interested to see the implementation details. Thanks!
praptak 6 hours ago|||
It's on the devel mailing list: https://sourceforge.net/p/sbcl/mailman/sbcl-devel/thread/CAF...
atgreen 5 hours ago||||
I'm the author. https://atgreen.github.io/repl-yell/posts/sbcl-fibers/
gibsonf1 34 minutes ago|||
Incredible! Is this ready for at scale production use?
ivanb 4 hours ago|||
This is fantastic! Godspeed.
Antibabelic 6 hours ago|||
Here's an SBCL coroutines talk at the European Lisp Symposium from 2024: https://www.youtube.com/watch?v=S2nVKfYJykw
praptak 6 hours ago||
Yeah, so I believe that this proposal kind of petered out at proof of concept phase but the author of the one being discussed references it.
krishSingaria 6 hours ago||
I am learning scheme(dr racket), which is i think derived from lisp, what is this actually used for and do people build anything with lisp???
pjmlp 4 hours ago||
Yes, people do build anything with Lisp, that is why there are at least two commercial Common Lisp systems around, LispWorks and Allegro Common Lisp.

Google Flights is an acquisition of a company using Lisp, ITA Software, they even have a Lisp guide.

https://google.github.io/styleguide/lispguide.xml

In Portugal, Siscog used to be a Lisp shop, no idea nowadays.

Then you have the Clojure based companies, where Datomic and Nubank are two well known ones, even if not a proper Lisp, still belongs to the same linage.

vindarel 4 hours ago||
Yes, SISCOG is still kicking. From last year's European Lisp Symposium: https://www.youtube.com/watch?v=hMVZLo1Ub7M
pjmlp 3 hours ago||
Obrigado. Thanks.

I was aware of the company when I was still living in Lisbon, a few decades ago.

tmtvl 2 hours ago|||
Well, besides pgloader, which achieved a 20~30x speedup via a rewrite from Python to Common Lisp (<https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...>), there is also this little organisation called NASA which has a collection of theorem proving libraries called variously PVSLib or NASALib (<https://github.com/nasa/pvslib>).

There is a lot more as well, of course, but these two are clear examples of Common Lisp being used in 'the real world'.

atgreen 5 hours ago|||
This very website that you are using right now, Hacker News, runs on sbcl.
chuckadams 35 minutes ago||
It runs on Arc, which itself is implemented with SBCL.
meken 20 minutes ago|||
> what is this actually used for

If you're interested in LeetCode, Racket is one of their accepted languages.

Keyframe 5 hours ago|||
*I am learning scheme(dr racket), which is i think derived from lisp*

it _is_ Lisp. Namely lisp-1, vs what one would consider lisp like common lisp would be lisp-2. Difference mostly being that in lisp-1 everything's in single namespace, whereas lisp-2 has more. So, in scheme you cannot have a function and a variable have the same name. In common lisp you can. Other diffs being (syntactically) passing functions and executing them. There are other things, of course, but not that big of a deal. Scheme is simpler and suitable for teaching / getting into lispen. I'd argue it might also be a rather well-equipped DSL.

bitwize 5 hours ago||
"Emacsen" I can understand by analogy with plural forms like "oxen". "Lispen" is new to me.
KineticLensman 1 hour ago||
At Uni we had a stable of Vaxen.
mkreis 5 hours ago|||
Scheme is mostly used for teaching, but there are many production applications out there written in Lisp (Emacs for example). Also I'd like to mention Clojure, which is "lispy" and used by big cooperations.
e12e 2 hours ago||
Current racket is running on top of chez scheme - which is maintained by Cisco - and reportedly extensively used in commercial products (router firmware/os etc).

https://cisco.github.io/ChezScheme

mark_l_watson 3 hours ago|||
Lisp languages are niche, but frequently used as seen in the great projects mentioned in this thread. Since 1982, I have been employed about 20% of my time using mostly Common Lisp and for a few years Clojure. Racket is a great language and system for learning and having fun, so, have fun!
vindarel 4 hours ago|||
Examples with screenshots: http://lisp-screenshots.org/

Some companies: https://github.com/azzamsa/awesome-lisp-companies/ (Routific, Google's ITA Software, SISCOG running resource planning in transportation, trading, big data analysis, cloud-to-cloud services, open-source tools (pgloader, re-written from Python), games (Kandria, on Steam and GOG, runs on the Switch), music composition software and apps…

More success stories: https://www.lispworks.com/success-stories/

I myself run web-apps and scripts for clients. Didn't ditch Django yet but working on that.

krishSingaria 3 hours ago|||
Thanks everyone for opening my mind, actually it is being taught in a core course at my college, and it is very different course form others that i have taken. course teaches feature of lisp how they are unique and useful. Also we are solving simple questions like Fibonacci, or number patterns, list pattern, recursion vs iterative etc.
pjmlp 2 hours ago||
Go through one of the more famous books to learn Scheme, in case you haven't yet been introduced into it.

"Structure and Interpretation of Computer Programs"

https://web.mit.edu/6.001/6.037/sicp.pdf

See https://planet.racket-lang.org/package-source/neil/sicp.plt/... as well.

tmountain 5 hours ago|||
Often as a DSL (domain specific language) for extending applications at runtime and/or configuration. I wouldn't start a "serious" project in Lisp today; meaning, a project with investment behind it, but Lisp can be a real joy to work with, and I've used Clojure for countless hobby projects. Clojure, in particular, has lots of deployments around the tech industry, and it's the foundation of the Jepsen DB test suite, Datomic (an immutable DB), and Metabase, as a few examples. Walmart has a non-trivial amount of Clojure running in prod as well.
mapcars 5 hours ago||
I used a few different lisps for pet projects and honestly today for me the biggest problem of lisps is the typing. ADTs (and similar systems) are just super helpful when it comes to long term development, multiple people working on code, big projects or projects with multiple pieces (like frontend+backend) and it helps AI tools as well.

And this in not something lisps explored much (is there anything at all apart from Racket/typed dialect?), probably due to their dynamic nature. And this is why I dropped lisps in favour of Rust and Typescript.

vindarel 4 hours ago|||
+1 to explore Coalton. It's also talked about on this website and often by its authors.

Links to Coalton and related libraries and apps (included Lem editor's mode and a web playground): https://github.com/CodyReichert/awesome-cl/#typing

pfdietz 4 hours ago||||
SBCL has fine type checking. Some is done at compile time -- you get warnings if something clearly can't be type correct -- but otherwise when compiled with safety 3 (which people tend to make the default) types are checked dynamically at run time. You don't get the program crashing from mistyping as one would in C.
mapcars 1 hour ago|||
> You don't get the program crashing from mistyping as one would in C.

Sorry but I don't compare to C anymore, I want the same safety as in Rust or Typescript: exhaustive checks, control-flow type narrowing, mapped types and so on. Some detection at compile time is not enough, since there is a way to eliminate all type errors I want to eliminate them all, not some.

streetfighter64 1 hour ago|||
> You don't get the program crashing from mistyping as one would in C.

Uh, isn't that exactly what happens with runtime type checking? Otherwise what can you do if you detect a type error at runtime other than crash?

In C the compiler tries to detect all type errors at compile time, and if you do manage to fool the compiler into compiling badly typed code, it won't necessarily crash, it'll be undefined behavior (which includes crashing but can also do worse).

brabel 5 hours ago|||
You can run Coalton on Common Lisp. It has a type system similar to Haskell’s. And interops very well with pure Common Lisp. It also modernizes function and type names in the process so it makes Lisp more familiar to modern developers. I tried it in a small project and was impressed.
larsbrinkhoff 5 hours ago|
Jonathan Blow: "It’s about a compiler written in Python FFS."
phtrivier 5 hours ago|
Missing the joke here. The pdf if about a Common Lisp compiler, written in Common Lisp, C, and assembly for good measure.
massysett 4 hours ago|||
I don’t get it either. The CMUCL compiler is named Python, no relation to the prominent language. Not sure that’s what this was about though.
pfdietz 4 hours ago||
That was his confusion.
bmacho 3 hours ago||||
Seems some rando posted something factually false on twitter, got corrected and apologized.
Antibabelic 5 hours ago|||
https://x.com/Jonathan_Blow/status/2028906867368550563
blenderob 2 hours ago|||
Here you go: https://nitter.net/Jonathan_Blow/status/2028906867368550563
larsbrinkhoff 5 hours ago||||
https://twitter.com/Jonathan_Blow/status/2028903268265672728
nilamo 2 hours ago|||
Is there any way to see the whole conversion, and not one specific reply in the middle of it?