13 ms·
An Exploration of SBCL Internals (2020)
- 2genders14511 2y ago[flagged]
- 2genders30540 2y ago[flagged]
- 2genders21574 2y ago[flagged]
- SEXMCNIGGA23446 2y ago[dead]
- SEXMCNIGGA10290 2y ago[dead]
- 2genders44672 2y ago[dead]
- SEXMCNIGGA8415 2y ago[flagged]
- SEXMCNIGGA45121 2y ago[flagged]
- fooker 2y agoIt's a bit sad that this ecosystem has fallen out of favor for mainstream software development. One could have designed OOP like frontends to this fairly easily, and I'm sure there are existing ones. How did Java and C++ take over?
- FredPret 2y agoI’ve tried multiple times to get into SBCL, but every time I run into the problem that I have to learn Emacs first. I know there are lots of other ways to work with SBCL, but they are either second-class citizens or paid.
- ngcc_hk 2y agoVim plus sbcl has been ok. Follow this I am happy since https://susam.net/lisp-in-vim.html https://susam.net/lisp-in-vim.html Not 2nd class and I can use it mostly on mac; linux and windows (linux side)are ok. All good.
- taeric 2y agoWhy would you have to learn emacs? You can largely batch compile and run lisp code same as any other language, if that is what you want to do. In many ways, the workflow can be very similar to python, if you don't want to get too advanced in the repl. And, to stress, you don't have to get too advanced to get going.
- aidenn0 2y agoYou can use emacs just for the REPL/debugger, and another editor for editing files. I did this for a couple of years, after previously using CLISP for its REPL. You can use the menus for things; the only keyboard shortcut you MUST know is CTRL-G (which if you hit enough times will cancel whatever operation you accidentally started). Alternatively try geany-lisp[1], it was created specifically for those with emacs phobia. There are probably some sharp corners using it, so feel free to file issues if you run into any. It should work with Geany 1.26-1.38; when posting this, I just noticed that there is now a Geany 2.0; I'm assuming the major version bump broke plugins so it may not work anymore. 1: https://github.com/jasom/geany-lisp https://github.com/jasom/geany-lisp
- anothername12 2y agoA lot of people write Lisp interpreters, post it to HN and call it a day, but I think compilation is the far more interesting task for a Lisp implementation. SBCL is great to poke around in and the decompiler’s great. Also check out ABCL, ECL for what compilation to JVM bytecode and C looks like.
- mtreis86 2y agoThe scheme compiler in Paradigms of Artificial Intelligence Programming by Peter Norvig is a great introduction to compiling Lisp. I was particularly impressed by it only taking a change in one line to go from regular recursion to handling tail call optimization.
- fooker 2y agoThis is a bit Haskell oriented, but the "Implementation of Functional Programming Languages" by SPJ is one of my all time favorite books. https://simon.peytonjones.org/slpj-book-1987/ https://simon.peytonjones.org/slpj-book-1987/ These compilers were pulling heroic data structure optimization stunts in 1985, that no modern production compiler for major compiled languages can replicate in 2024.
- thewakalix 2y agoWhy? Is it mostly because of Haskell's purity (side-effect-freeness), so optimizations can change expressions more freely and safely?
- SEXMCNIGGA46072 2y ago[flagged]
- amock 2y agoremember that we're on x86 here, which is a big-endian architecture While I wish this were true, x86 is little-endian.
- greenyoda 2y agoThe author correctly states that x86 has "lower bits at the beginning, bigger bits on the end", but, as you said, that's the definition of little-endian.
- deleted 2y ago[deleted]
- ssafar 2y agoApparently, I even made up an explanation for why "big-endian == start with the least significant bit" totally makes sense... couldn't convince the Universe this way either though. Thanks for catching it, fixed!
- SEXMCNIGGA3699 2y ago[dead]
- SEXMCNIGGA33882 2y ago[flagged]
- SEXMCNIGGA17675 2y ago[flagged]
- lukego 2y agoSBCL 25th anniversary workshop is in Vienna thu-fri next week. See you there!
- SEXMCNIGGA28326 2y ago[flagged]
- koito17 2y agoI wish other Common Lisp implementations, particularly Clozure CL, documented their internals as well as SBCL does. Apple Silicon support has been a long-standing feature request, but nobody can really work on it besides rme himeself due to the sheer amount of "institutional knowledge" (and time!) it takes to understand CCL's compiler backend then add support for a brand new architecture. SBCL, on the other hand, was able to provide support fairly quick, possibly due to more maintainers, but I also think a big role that played in it was the fact lots of corners of the implementation are documented and it's fairly easily to get a hold of people actively working on the compiler (doug, stassats, et al)
- vindarel 2y agoFresh news from 2 weeks ago for CCL: > I recently decided to leave my current full-time job, and I’ll be working on CCL again. […] I’ll be able to work about half-time on an ARM64 port. Please write me privately if you want to talk about supporting that ARM64 work. > I've worked on CCL for quite a few years, and I did the 32-bit x86 port, so I have experience in this area. I’m not as good a hacker as Gary Byers, but then again, few people are. rme https://lists.clozure.com/pipermail/openmcl-devel/2024-April/012818.html https://lists.clozure.com/pipermail/openmcl-devel/2024-April...
- SEXMCNIGGA34943 2y ago[flagged]
- SEXMCNIGGA9643 2y ago[flagged]
- SEXMCNIGGA24801 2y ago[flagged]
- SEXMCNIGGA49122 2y ago[flagged]
- SEXMCNIGGA34495 2y ago[flagged]
- SEXMCNIGGA22158 2y ago[dead]
- SEXMCNIGGA39313 2y ago[flagged]
- SEXMCNIGGA16026 2y ago[flagged]
- SEXMCNIGGA20230 2y ago[dead]
- SEXMCNIGGA16216 2y ago[dead]
- SEXMCNIGGA37103 2y ago[dead]
- SEXMCNIGGA42427 2y ago[dead]
- SEXMCNIGGA25276 2y ago[dead]
- SEXMCNIGGA47274 2y ago[dead]
- SEXMCNIGGA47989 2y ago[dead]
- SEXMCNIGGA16263 2y ago[dead]
- SEXMCNIGGA843 2y ago[flagged]
- SEXMCNIGGA45476 2y ago[dead]
- SEXMCNIGGA31015 2y ago[dead]
- SEXXMCNIGGGA257 2y ago[flagged]
- SEXMCNIGGA4930 2y ago[flagged]
- SEXMCNIGGA27980 2y ago[dead]
- waynesonfire 2y agoMy issue prevent me from investing in Lisp is that Erlang gives me a similar REPL which I believe, though I am not a Lisp developer, is a huge value proposition of Lisp. I utilize REPL-based development using Erlang. The macro narrative is worse in Erlang; but Lisp isn't perfect either in other ways. The point is, I net out staying on the BEAM. What I like about Lisp is that I think it's a tool that will serve you for the rest of your career, even if you don't use it for production. That's a pretty cool proposition and maybe one day I'll get there. Emacs is a similar tool.
- vindarel 2y agoLast time I played with Elixir (I'll assume it's similar enough to Erlang), I found the REPL / interactive experience not as rich as CL's (which I must say, reassured my beliefs), even though the command-line tools are great: - can't install libraries from the REPL while working on your program - can't "compile this function" with a keystroke (I did find "send region/line/buffer to REPL" which is different, or "reload module")… - … and get type errors and warnings - can't get an interactive debugger on an error, go to the bogus line (while keeping the debugger), fix the function, compile it, switch back to the debugger, resume execution from any point in the stack. I only found out IEx.pry which is useful and all, but looks like Python's ipdb break point. - lack of little useful editor commands, at least in the Emacs modes I tried like "write this function in the REPL", "eval and print the last expression". I struggled to have the "go to definition" feature but that depends on the IDE I suppose. The Emacs modes are not in good shape :S - no cross-references? doubting. And maybe other small things only about the REPL, didn't find my notes. differences of runtimes are also at play here, but I still find it interesting to compare the REPL experience, I'll welcome more comparisons.
- cess11 2y agoBEAM/OTP is rather different from CL:s image-based REPL experience. You can get relatively close by putting your application into processes and keep them in a collection or registry, then when you've found an issue and changed the code in your editor you can run recompile and relaunch affected processes. You'd lose a subtree in the application, and hence in-memory storage tightly coupled to those processes, but I find it rather easy to do it this way. Often you'll put in-memory data in separate caching processes and that reduces friction in restarting processes with application logic even more. The 'let it crash'-foundation of the BEAM system isn't exactly tailored towards trapping and recovering from errors but if you really want to you could probably implement something like that with try/rescue but I suspect it would turn out quite obtuse compared to the CL mechanics.
- 2genders39135 2y ago[dead]
- 2genders30467 2y ago[dead]
- 2genders41830 2y ago[dead]
- 2genders13821 2y ago[dead]
- 2genders23002 2y ago[dead]
- 2genders43359 2y ago[dead]
- 2genders37293 2y ago[dead]
- 2genders3881 2y ago[flagged]
- 2genders9902 2y ago[flagged]
- 2genders23222 2y ago[flagged]
- 2genders47511 2y ago[flagged]
- 2genders33730 2y ago[flagged]
- 2genders43296 2y ago[flagged]
- 2genders13015 2y ago[flagged]
- 2genders14206 2y ago[flagged]
- 2genders5140 2y ago[flagged]
- SEXMCNIGGA28175 2y ago[flagged]
- 2genders14350 2y ago[flagged]
- 2genders37480 2y ago[flagged]
- SEXMCNIGGA36943 2y ago[dead]
- 2genders3548 2y ago[flagged]
- 2genders3467 2y ago[flagged]
- 2genders43296 2y ago[flagged]
- 2genders14350 2y ago[flagged]
- SEXMCNIGGA41391 2y ago[flagged]
- SEXMCNIGGA11537 2y ago[dead]
- SEXMCNIGGA42604 2y ago[flagged]
- SEXMCNIGGA12537 2y ago[flagged]
- SEXMCNIGGA40368 2y ago[flagged]
- SEXMCNIGGA30775 2y ago[flagged]
- SEXMCNIGGA23281 2y ago[flagged]
- SEXMCNIGGA21671 2y ago[dead]
- SEXMCNIGGA27422 2y ago[dead]
- SEXMCNIGGA40935 2y ago[dead]
- SEXMCNIGGA8507 2y ago[dead]
- SEXMCNIGGA1511 2y ago[dead]
- SEXMCNIGGA35270 2y ago[dead]
- SEXMCNIGGA43640 2y ago[dead]
- 2genders33843 2y ago[dead]
- SEXMCNIGGA6510 2y ago[dead]
- indianmilf40435 2y ago[flagged]
- indianmilf28586 2y ago[flagged]
- indianmilf47345 2y ago[flagged]
- sexmc32071 2y ago[flagged]
- sexmc21013 2y ago[flagged]
- sexmc13032 2y ago[flagged]
- sexmc29060 2y ago[flagged]
- 7373737373 2y agoAny explanation for the name?
- xenophonf 2y agoSteel Bank Common Lisp (SBCL) is a fork of Carnegie Mellon University Common Lisp (CMUCL). University founders Andrew Carnegie, Andrew Mellon, and Richard Mellon are best known for their work in the steel industry and banking.
- Akronymus 2y ago> This describes fairly well what we've seen so far. The "lowtag" is those 4 bytes at the end of Lisp objects; also, we're clearly on a 64-bit architecture here, with N_WORD_BITS being 64, 8 of them reserved for the lowtag. It also details various values for the lowtag, the important one being... Shouldn't that say bits? As 8 bytes would be the whole thing ayways.