7 ms·
SICL: A New Common Lisp Implementation
- dang 5y agoA couple past threads: SICL – A fresh implementation of Common Lisp - https://news.ycombinator.com/item?id=8284835 https://news.ycombinator.com/item?id=8284835 - Sept 2014 (49 comments) SICL – A new Common Lisp implementation - https://news.ycombinator.com/item?id=26795066 https://news.ycombinator.com/item?id=26795066 - April 2021 (3 comments)
- phoe-krk 5y agoSICL is interesting because it aims to be written 100% in Common Lisp. This means no kernels or stubs written in C, and also means that (in theory) any conforming Common Lisp compiler should be enough to build it. (In practice, various compilers end up showing various limitations when building SICL at the moment - building it is a pretty intensive and interesting process.)
- tgbugs 5y agoIn case anyone is wondering what step 3 in the readme means, this is what I used when I was exploring SICL back in March. (asdf:initialize-source-registry '(:source-registry (:tree #p"/path/to/SICL/") :inherit-configuration))
- nerdponx 5y agoI never understood how to use ASDF properly. It seems like it expects me to put all my projects under a central location, like what Go requires (used to require?), which is extremely annoying.
- NoGravitas 5y agoYou do have to put all your projects under directories that ASDF knows about, but you can freely add directories to that list.
- tgbugs 5y agoLooking at my clrc file I have a variant of the above which might allow you to have folders in different places, but by accident I have them all sharing a common parent folder. (asdf:initialize-source-registry '(:source-registry (:tree #p"/path/to/Second-Climacs/") (:tree #p"/path/to/SICL/") (:tree #p"/path/to/OntoLisp/") :inherit-configuration)) The ASDF best practices seem to be documented, but it is hard to find them through all the noise, and I'm still not sure I'm following them.
- e12e 5y agoIs there anything new, since.... say 2014? Anyone familiar with the project care to comment on how viable a sicl is today, as a common lisp?
- rgrmrts 5y agoI’ve been watching the project for a while, and have dropped into the irc channel a few times. From what I’ve gathered, there’s slow but steady progress. Last I checked SICL was in a usable state, but I’m not sure how production ready it is or if there are benchmarks available to compare it to, say, sbcl. The folks working on it are always super friendly and helpful, so if you’re curious to learn more I’d recommend dropping by their irc channel and asking.
- eslaught 5y agoI don't know anything about this specific implementation, but I find it incredible that the main author seems to be committing to the repo on a daily basis. Considering how old the project is, that's quite a commitment for any open source project, much less a CL implementation! But I agree it would be nice to get some information on how complete it is.
- Twisol 5y agoIt's at least maintained enough for their README to be up to date as of the recent Freenode brouhaha: > All these channels are on the libera.chat network.
- spiaggia 5y agoSICL is definitely not "viable" today, in that we are still not at the stage where we can generate a native executable. But we are making good progress. Register allocation is close to being done. Code generation is next. We recently programmed ASDF so that it can participate in the bootstrapping procedure, so now, it will be easier to load additional libraries into the target environment, like Eclector, Clostrum, Trucler, Cleavir, and the systems they depend on. I am not going to be a regular participant here, so if you have any questions, it would be better to show up on the #sicl IRC channel on libera.chat.
- chalst 5y ago
- jakeogh 5y agoAh, related to #clasp: https://www.youtube.com/watch?v=8X69_42Mj-g https://www.youtube.com/watch?v=8X69_42Mj-g Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming https://www.youtube.com/watch?v=mbdXeRBbgDM https://www.youtube.com/watch?v=mbdXeRBbgDM 2018 LLVM Developers Meeting: C. Schafmeister lessons Learned Implementing Common Lisp with LLVM https://www.youtube.com/watch?v=0rSMt1pAlbE https://www.youtube.com/watch?v=0rSMt1pAlbE Clasp: Common Lisp using LLVM and C++ for Designing Molecules https://www.youtube.com/watch?v=9HXfvT85EFE https://www.youtube.com/watch?v=9HXfvT85EFE Modular Polymer Catalysts - Chris Schafmeister https://www.youtube.com/watch?v=PQDwvatwjD8 https://www.youtube.com/watch?v=PQDwvatwjD8 10S6P4 Christian Schafmeister 2010 UNTT 3rd Annual Conference Session 6 Presentation 4
- kristjansson 5y agoIn that they're both implementations of Common Lisp, but is there a deep connection between the two than that? Not that directing more attention to clasp is a bad thing!
- fiddlerwoaroof 5y agoSICL is being developed in a modular fashion: I believe clasp uses SICL’s compiler framework Cleavir for its own compiler. (I’ve also heard that ABCL and ECL have considered reimplementing their compilers with Cleavir)
- drmeister 5y agoClasp author here - Clasp uses SICL's Cleavir compiler.
- deleted 5y ago[deleted]
- pfdietz 5y agoThere was a very nice paper at this year's ELS on a call site optimization technique that they plan to put into SICL. The idea solves the problem of optimizing function calls while allowing various things (functions, classes, methods) to be dynamically redefined, even while calls involving those are on the stack. https://european-lisp-symposium.org/static/proceedings/2021.pdf https://european-lisp-symposium.org/static/proceedings/2021.... (pages 72-78)
- adenozine 5y agoDoes the Common Lisp standard need to be revamped? I remember seeing stuff about CL21 a while back... I keep my eyes peeled for anything Scheme on GitHub, I love reading Scheme code, and seeing R7RS march eternally forward has brought me a lot of joy over the past few years. But try as I might, and I HAVE tried, I just don't see Common Lisp as dealing with modern computing that well. It looks crufty and tired where Scheme continues to refine and sharpen. And then there's Clojure, which has become what I always kinda thought Common Lisp should've tried to become. This isn't a very good comment, I guess it just always amazes me how much innovation is still happening from simple, unfancy s-expressions. Thank God.
- lisper 5y ago> Does the Common Lisp standard need to be revamped? Yes. Will it happen? Almost certainly not, though I would like nothing better than to be proven wrong about this. > it just always amazes me how much innovation is still happening from simple, unfancy s-expressions Turns out S-expressions are just a Really Good Idea (tm). That's why people keep reinventing them over and over.
- tgbugs 5y ago> Yes. Will it happen? Almost certainly not, though I would like nothing better than to be proven wrong about this. I have a sense that any new standards process would have to work hard to defend against a number of distractions, such as forcing character encoding into the standard, the lure of JVM style compile once run anywhere (which has destroyed the ability for Clojure to bootstrap without maven), or attempts to reduce or remove certain warts that some users find annoying. Many who don't know the history don't realize that the standard as it exists encoded the separate practices of many disparate groups into a single standard. This can be confusing for newcomers because they may encounter ways of doing things that are archaic but still in the language. Part of the challenge thus is not getting rid of things, but somehow figuring out how to communicate what have come to be understood as the better ways of doing things --- all without changing those parts of the standard. I'm sure that the old lispers have fairly extensive lists of fundamental issues and improvements. The short list that I have been able to compile from chance encounters with mentions of shortcomings includes implementation details, such as lexical O(1) jump tables, delimited continuations, proper tail call elimination, threads, extending dispatch macro syntax, and default precision for reading floats, and issues that almost certainly need more research and exploration, such as finding a solution to the CLOS action at a distance issue, CLOS dispatch on parametric types, something about static types, ways to alloc without gc, and many more things I am completely unaware of. The Racket ecosystem has done quite a bit of research and implementation in many of these areas, but Racket lies at the far end of the lisp family from common lisp. Finding a way to take the more static and text based ideas from the ML/Racket end of the spectrum and make them accessible at the the dynamic image based Smalltalk/Interlisp end seems like something that could happen within the common lisp space more readily than elsewhere. There seem to be some fundamental questions about how late binding interacts with many other language features that do not have satisfactory answers. All of this being said, I don't see the motivation for anyone in the space to spend the time on another standards process while so many ideas haven't been explored.
- dan-robertson 5y agoI’m not aware of any “full” uses of SICL. It’s compiler framework, cleavir is used by clasp (a somewhat new c++/llvm/boehm/ecl based implementation). Long ago, I tried to build a CL->JavaScript compiler based on cleavir. It started ok and I had the definitions of some annoying things (eg lambda list parsing code gen) but I was caught by the lack of any interpreter [1] with any kind of acceptable performance, and I eventually gave up. I think there weren’t any JS based implementations at the time but that might not be the case anymore (I haven’t followed CL closely in a while). My ultimate goal was to have the ability to write web applications where the server and client could share code in the best way possible, including things like throwing closures from server code to be executed on the clients[2]. However that would in fact require also having a compiler to native code [3] and the design of cleavir was well suited to handling the sort of “dual compilation” that was required. [1] you need an interpreter to evaluate macros. You cannot portably use the host lisp’s macro expansion system because you cannot use e.g. symbol types from the host lisp (due to issues with packages, interning and namespaces) and you cannot sufficiently control the global or compiler environment. The interpreter must be used for evaluating the bootstrapping code to execute macros in the target environment to create that environment. SICL did have a simple interpreter at the time (removed around then too) but it used much more memory than I could give it. [2] I also wanted to support compiling some weird code which is not required by the standard like: '#.(let ((a 0)) `(,(lambda () (incf a)) ,(lambda () (decf a)))) (Here the source code itself contains a list of two objects which are functions closing over a common environment.) [3] the above is one example of why a second native compiler was needed. Making bootstrapping/compilation adequately fast was another. In general marshalling objects is hard to do portably hence why I wanted a native target. Another complication is that for consistent semantics you need to only use (IEEE) double-precision floats in code that might be compiled to JavaScript but there isn’t even a portable way to get such a float!
- moonchild 5y agoYou do not need an interpreter to evaluate macros. You can compile the code of the macro, same as you would any regular function, and call into it that way.
- 5y ago
- quotemstr 5y agoOne of the most annoying things about CL is that I can't get access to compiler type inference information inside compiler macros. This lack of type information cuts off lots of optimization opportunities. Maybe a new CL implementation can expose the type inference engine to macros and enable much better compile time code generation.
- bencollier49 5y agoThe acronym immediately put me in mind of the book "Structure and Interpretation of Computer Programs". I wonder if it's deliberate; doubt it. But it's a fortunate association.
- mijoharas 5y agoCan anyone explain what SICL stands for? It doesn't seem to explain the name on this repo. (I'm guessing the similarity in names to SBCL - Steel Bank Common Lisp is intentional?)
- lonjil 5y agoIt doesn't mean anything. However, someone has suggested the recursive backronym "SICL Implements Common Lisp".