serapeum
defstar
serapeum | defstar | |
---|---|---|
7 | 5 | |
410 | 38 | |
- | - | |
7.9 | 10.0 | |
3 days ago | over 4 years ago | |
Common Lisp | Common Lisp | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
serapeum
-
Steel Bank Common Lisp
> both are dynamic languages with types added later in?
Common Lisp has always had types and type declarations (e.g. `the` in the hyperspec[1]) as it's part of the specification. It was not added later as far as I know.
However, `declaim` and `declare` were left very underspecified so they tend to be very implementation-specific, though there are libraries that make types more portable[2][3].
[1] http://www.lispworks.com/documentation/HyperSpec/Body/s_the....
[2] https://github.com/lisp-maintainers/defstar
[3] https://github.com/ruricolist/serapeum/blob/master/REFERENCE...
-
LISP as a learning tool
From python in lisp I want the convenience for quick scripting, which lisp doesn't have by default but of course it can be added. For example for let's you easily iterate over lines of a file or files in a directory, or anything else you add. serapeum add's convenient syntax for hashmaps (dict and @), and threading macro and plenty of utility functions, defclass-std does the boilerplate of :initarg and :accessor for you for the common cases of class declarations.
-
I'm considering moving from Clojure to Common Lisp
+1 for Serapeum: https://github.com/ruricolist/serapeum/blob/master/REFERENCE.md
-
Compile-time exhaustiveness checking in Common Lisp with Serapeum
Serapeum is an excellent CL library, with lots of utilities. You should check it out. It provides a case-like macro, to use on enums, that warns you at compile-time if you handle all the states of that enum.
-
looking for Advent of Code Tips
Since Alexandria was mentioned may I mention Serapeum as well. Don't know if it's needed for AoC but it may be worth a look. Serapeum seems to get not enough mentions/ attention IMO.
-
Common Lisp intermediate book recommendation
Re: libraries; I'd like to mention serapeum which contains a ton of general purpose utilities.
-
SICL: A New Common Lisp Implementation
I consider Serapeum to be a revamp of the Common Lisp standard: https://github.com/ruricolist/serapeum/blob/master/REFERENCE.... This provides a bunch of new features and idioms including ideas borrowed from newer languages like Clojure.
Great example of "growing a language" as a long-term evolutionary process that doesn't require changing earlier specifications in incompatible ways.
defstar
-
Common Lisp: An Interactive Approach (1992) [pdf]
there is also https://github.com/lisp-maintainers/defstar for providing more ergonomic type declarations inline in definitions
And this is another thing I'm not sure how to explain, I thought CL is surely more verbose and ugly than python for small scripts, but maybe it's macros will make it cleaner for building large systems. But then when I started writing actual programs, even small programs without any of my own macros, I generally use about 30% less LoC than in python... I've thought about making sly/slime like support for python (built on ipython with autoreload extension) or ruby (with it's fairly new low-overhead debug gem). But at the end of the day support for these things will always be incomplete and a hack compared to CL where it was designed from the start to support it, they run 20-100x slower than CL, and imo their runtime metaprogramming is harder to reason about than CL which is mostly compile time metaprogramming. When I've had to dig into some CL library, which is a lot more often than in those languages because it has 10000x fewer users so of course I will be first to run into some issue, it has generally been easy to understand what is going on and fix it, compared to large codebases in other languages.
Regarding "modern type-safe language", languages with expressive type systems, rust, ocaml, haskell, typescript, etc, can give really confusing type errors, when you get into generics and traits and more expressive stuff. I'm not convinced it's a better development experience than a dynamically typed languages where values have simple types, and when you get a type error you see the actual contents of the variable that is the wrong type and state of the program, at least in the case of CL where the stack isn't unwound on error and runtime is kind of compile-time as you're running all code as you write it. But mostly this sort of interactive development is very hard to implement in static languages, I'm not aware of any that does it. For example even in static langs like ocaml that have a repl through a bytecode interpreter, simple things don't work like say you pass some function as an event handler, and then update the function. As you passed efectively a function pointer to the old definition, rather than a symbol name like lisp, it will be calling the original function not the new version. But the main issue is that efficient staticly typed languages the type system is all at compile time, type information doesn't exist at runtime, which is great for performance, but means you don't get the ability to introspect on your running program like you do in CL and elixir, which personally I value more than full compile-time type checking.
Would I like some new language or heavy modification of existing language runtime that provides the best of everything? of course, but I also realize that it's a huge amount of work and won't happen with 10 years, while I can have a nice experience hacking away in CL and emacs right now. And ultimately CL is an extremely flexible language and I think it'll be less work to build on CL than to provide a CL like runtime for some other language. For example projects really pushing the edge there is Coalton described above. While personally I prefer dynamicly typed for general application programming I think Coalton could be great for compilers, parsing some protocol, or writing some subparts of your program in. And vernacular (https://github.com/ruricolist/vernacular) which explores bringing racket's lang and macro system to CL. For more standard CL code, using extremely common and widely used libraries like alexandria, serapeum, trivia, etc, already makes CL into a fairly modern and ergonomic language to write.
-
Steel Bank Common Lisp
> both are dynamic languages with types added later in?
Common Lisp has always had types and type declarations (e.g. `the` in the hyperspec[1]) as it's part of the specification. It was not added later as far as I know.
However, `declaim` and `declare` were left very underspecified so they tend to be very implementation-specific, though there are libraries that make types more portable[2][3].
[1] http://www.lispworks.com/documentation/HyperSpec/Body/s_the....
[2] https://github.com/lisp-maintainers/defstar
[3] https://github.com/ruricolist/serapeum/blob/master/REFERENCE...
-
Visual type system?
Like defstar? https://github.com/lisp-maintainers/defstar Type declarations that you can place inside the defun. Also serapeum:-> (atop the defun). Or Coalton: https://github.com/coalton-lang/coalton/ But it's possible you'll feel much less a need for that in CL.
-
Defstar symbol comparison: contributing to old libraries
Hi, if you plan to work on enhancing the library (glad to here!): you can fork the repository to your github username, decide that you will be able to maintain for the foreseeable future and ask Quicklisp to point defstrar to your repository. You can create a defstar org on github, so you could easily give push access to future maintainers. Or, you could ask for write access here: https://github.com/lisp-maintainers/defstar it's an un-official org that I created in the hope to maintain orphan projects collectively. You can send PRs or ask for push access. There is no current maintainer for this project, it is not pointed to by QL, it is only a Github mirror. Best,
-
Common Lisp Code Optimisation
agreed^^ there are macros and libraries to bring a nicer syntax (of course). Exple: https://github.com/lisp-maintainers/defstar
(defun\* (sum -> real) ((a real) (b real))
What are some alternatives?
trivial-cltl2 - Portable CLtL2
cerberus - Common Lisp Kerberos v5 implementation
lparallel - Parallelism for Common Lisp
playwright-java - Java version of the Playwright testing and automation library
quicklisp-client - Quicklisp client.
CIEL - CIEL Is an Extended Lisp
githut - Github Language Statistics
vernacular - Module system for languages that compile to Common Lisp