generic-cl VS coalton

Compare generic-cl vs coalton and see what are their differences.

generic-cl

Generic function interface to standard Common Lisp functions (by alex-gutev)

coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp. (by coalton-lang)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
generic-cl coalton
13 84
119 966
- 4.6%
0.0 8.4
about 2 years ago 6 days ago
Common Lisp Common Lisp
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

generic-cl

Posts with mentions or reviews of generic-cl. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-01.
  • Compiling a Lisp
    2 projects | news.ycombinator.com | 1 Feb 2024
    for those wanting generic +, equality and comparison in CL, there's a nice library: https://alex-gutev.github.io/generic-cl/
  • Adding new types and operators to Lisp
    6 projects | /r/lisp | 24 Feb 2023
    If performance is not a concern, then you can create CLOS classes corresponding to vec3 or mat44, and dispatch the appropriate functions from the generic-cl project by specializing on them.
    6 projects | /r/lisp | 24 Feb 2023
  • Emacs-like editors written in Common Lisp
    11 projects | news.ycombinator.com | 2 Oct 2022
    > And Lisp is almost uniquely able to handle transitions to later standards as I described above. You don't actually have to forfeit backwards compatibility entirely or at all if the changes are handled by moving to a new default base package. :cl-user/:cl become :cl##-user/:cl##

    Go use cl21[0] if you care for this sort of thing.

    > more generic functions would open up more interesting developments later

    generic-cl[1]. But in a prefix-oriented language, I just don't see this as particularly important.

    > you don't necessarily want to bless a particular concurrency model

    You do[2]; this is one of the notable deficiencies in the cl standard that really bites, today. It is being worked on.

    0. http://cl21.org/

    1. https://github.com/alex-gutev/generic-cl

    2. https://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf

  • From Common Lisp to Julia
    11 projects | news.ycombinator.com | 6 Sep 2022
    So, the article is harsh on CL: YMMV. Also, your goal may vary: I want to build and ship (web) applications, and so far Julia doesn't look attractive to me (at all). Super fast incremental development, build a standalone binary and deploy on my VPS or ship an Electron window? done. Problem(s) solved, let's focus on my app please.

    The author doesn't mention a few helpful things:

    - editor support: https://lispcookbook.github.io/cl-cookbook/editor-support.ht... Emacs is first class, Portacle is an Emacs easy to install (3 clicks), Vim, Atom support is (was?) very good, Sublime Text seems good (it has an interactive debugger with stack frame inspection), VSCode sees good work underway, the Alive extension is new, usable but hard to install yet, LispWorks is proprietary and is more like Smalltalk, with many graphical windows to inspect your running application, Geany has simple and experimental support, Eclipse has basic support, Lem is a general purpose editor written in CL, it is Emacs-like and poorely documented :( we have Jupyter notebooks and simpler terminal-based interactive REPLs: cl-repl is like ipython.

    So, one could complain five years ago easily about the lack of editor support, know your complaint should be more evolved than a Emacs/Vim dichotomy.

    - package managers: Quicklisp is great, very slick and the ecosystem is very stable. When/if you encounter its limitations, you can use: Ultralisp, a Quicklisp distribution that ships every 5 minutes (but it doesn't check that all packages load correctly together), Qlot is used for project-local dependencies, where you pin each one precisely, CLPM is a new package manager that fixes some (all?) Quicklisp limitations

    > [unicode, threading, GC…] All of these features are left to be implemented by third-party libraries

    this leads to think that no implementation implements unicode or threading support O_o

    > most of the language proper is not generic

    mention generic-cl? https://github.com/alex-gutev/generic-cl/ (tried quickly, not intensively)

    Documentation: fair points, but improving etc. Example of a new doc generator: https://40ants.com/doc/

    Also I'd welcome a discussion about Coalton (Haskell-like type system on top of CL).

  • Modern sequence abstractions
    4 projects | /r/Common_Lisp | 15 Jan 2022
    Does generic-cl work for you? In recent months, u/alex-gutev worked on it to separate it out into smaller subsystems.
  • Common Lisp polymorphic stories.
    13 projects | /r/lisp | 4 Nov 2021
    Anyway, this library is inspired by https://github.com/alex-gutev/generic-cl and provides polymorphic versions of many common standard functions based on types. For example, now `>` and `<` work on characters and strings as well, and `at` is a universal by-key accessor for all data structures (`aref` + `nth` + `gethash` + some more). It also tries to be as strictly typed as possible, resulting in compile-time errors/warnings in case types are mismatched. Types do not always need to be declared, they can be inferred thanks to excellent https://github.com/alex-gutev/cl-form-types by Alex Gutev. Besides that it includes a collection of useful macros for more "typey" style of coding as well as several data structures I consider missing from the standard. The structures are templated -- which means there's a structure type generated for each contained element-type.
    13 projects | /r/lisp | 4 Nov 2021
    Compared to generic-cls equality generic here: https://github.com/alex-gutev/generic-cl/blob/master/src/comparison/equality.lisp
  • alex-gutev/cl-form-types - Library for determining the types of Common Lisp forms based on information stored in the environment.
    2 projects | /r/Common_Lisp | 2 Jun 2021
    Thanks for sharing. I'm planning to use it in static-dispatch to further optimize generic function calls in generic-cl. It's also used in the lisp-polymorph project, work in progress not yet completed, which aims to provide an extensible generic interface, though not based on generic functions, to functions in the Common Lisp standard, like generic-cl however built from the ground up with performance and optimization and performance in mind.
  • Static-Dispatch 0.5: Improved inlining on SBCL and performance improvements for generic-cl
    3 projects | /r/Common_Lisp | 16 Apr 2021
    Release 0.5 adds a specialized implementation for SBCL which leverages the compiler's type inference engine, using DEFTRANSFORM, to allow for generic function inlining in a much broader range of scenarios. Any generic function call for which the types of the arguments can be determined by SBCL, can now be inlined by static-dispatch. This means even generic function calls with arguments consisting of complex expressions can be inlined. This also provides a performance boost for generic-cl where theoretically on SBCL, generic-cl:= should be equivalent in performance to cl:= in most cases where the type of the argument can be vaguely inferred by SBCL.

coalton

Posts with mentions or reviews of coalton. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-11.
  • How to Write a (Lisp) Interpreter (In Python)
    18 projects | news.ycombinator.com | 11 Mar 2024
    It's still… not the same. In CL (and specially with SBCL), we get compile time (type) errors and warnings at the blink of an eye, when we compile a single function with a keystroke (typically C-c C-c in Slime).

    And there's also been improvement, see Coalton for a ML on top of CL. (https://github.com/coalton-lang/coalton/)

  • Embracing Common Lisp in the Modern World
    6 projects | news.ycombinator.com | 24 Jan 2024
    Common Lisp has bad marketing (even OCaml has Twitch streamers and "influencers" now), and bad support for general editors, both of which make it a non-starter for most curious people who have an afternoon to try something. But behind all that is magnificent activity for those who got over the initial potential energy barrier. Just to give some examples:

    1. SBCL, the most popular open source implementation of Lisp, is seeing potentially two new garbage collectors. One of them is a parallel collector written by a university student (!!) which blows my mind.

    2. SBCL has better and better support for deploying Liwp as a C-compatible shared library, using SBCL-LIBRARIAN. It makes it play nicer with other applications in C and Python.

    3. Coalton is another exciting development that allows a Haskell type system and "Lisp-1" functional programming in Common Lisp. That means type classes (or traits), something Lisp hasn't really had a proper notion of, and full type inference. Persistent sequences based off of RRB-trees were recently merged, and interestingly, they're implemented purely in Coalton [1]. That means Clojure-like seqs.

    It's interesting to see users of Lisp generating the above ideas and libraries, not a special in-group of committees, "official" developers, etc.

    [1] https://github.com/coalton-lang/coalton/blob/main/library/se...

  • Steel – An embedded scheme interpreter in Rust
    13 projects | news.ycombinator.com | 3 Dec 2023
    Use an editor that auto-inserts parens and that indents the code correctly. Now nothing bad can happen. And the parens are used to edit code structurally.

    re typing: Coalton brings Haskell-like typing on top of CL. https://github.com/coalton-lang/coalton/ Other lisps are typed: typed racket, Carp… and btw, SBCL's compiler brings some welcome type warnings and errors (unlike Python, for instance).

  • Show HN: Collaborative Lisp Coding on Discord
    2 projects | news.ycombinator.com | 18 Sep 2023
    If you like type safety, this project would be perfect for using https://coalton-lang.github.io/ so your REPL supported Common Lisp out of the gate.
  • A fully-regulated, API-driven bank, with Clojure
    3 projects | news.ycombinator.com | 29 Aug 2023
    Agree that you can use types to express and prove logical properties via compiler; it can be a fun way to solve a problem though too much of it tends to frustrate coworkers. It's also not exactly "low cost"; here's an old quip I have in my quotes file:

    "With Scala you feel smart having just got something to work in a beautiful way but when you look around the room to tell your clojure colleague how clever you are, you notice he left 3 hours ago and there is a post-it saying use a Map." --Daniel Worthington-Bodart

    > On the contrary, they're still the most effective technique we've found for improving program correctness at low cost.

    This is not borne out by research, such as there is any of any quality: https://danluu.com/empirical-pl/ The best intervention to improve correctness, if not already being done, is code review: https://twitter.com/hillelogram/status/1120495752969641986 This doesn't necessarily mean dynamic types are better, just that if static types are better, they aren't tremendously so to obviously show in studies, unlike code review benefit studies.

    My own bias is in favor of dynamic types, though I think the way Common Lisp does it is a lot better than Python (plus Lisp is flexible enough in other ways to let static type enthusiasts have their cake and eat it too https://github.com/coalton-lang/coalton), and Python better than PHP, and PHP better than JS. Just like not all static type systems are C, not all dynamic type systems are JS. Untyped langs like assembly or Forth are interesting but I don't have enough experience.

    I don't find the argument that valuable though, since I think just focusing on dynamic vs static is one of the least interesting division points when comparing languages or practices, and if we're trading experience takes I think Clojure's immutable-by-default prevents more bugs than any statically typed language that is mutable by default. It's not exactly a low cost intervention though, and when you really need to optimize you'll be encouraged by the profiler to replace some things with Java native arrays and so on. I don't think changing to static types would make a quality difference (especially when things like spec exist to get many of the same or more benefits) and would also not be a low cost intervention.

    Last quip to reflect on. "What's true of every bug found in the field? ... It passed the type checker. ... It passed all the tests. Okay. So now what do you do? Right? I think we're in this world I'd like to call guardrail programming. Right? It's really sad. We're like: I can make change because I have tests. Who does that? Who drives their car around banging against the guardrail saying, "Whoa! I'm glad I've got these guardrails because I'd never make it to the show on time."" --Rich Hickey (https://www.infoq.com/presentations/Simple-Made-Easy/)

  • Compiler Development: Rust or OCaml?
    5 projects | news.ycombinator.com | 7 Aug 2023
    > Lisps can be very flexible, but they usually lack static type safety, opening a wide and horrible door to run-time errors.

    People should do basic research before writing something silly like this. Qualifying your statement with 'usually' is just a chicken sh*t approach. Common Lisp and Racket have optional strong typing, leaving the responsibility and choice to the developer. Common Lisp is great for implementing compilers. You also have thing like Typed Racket and Coalton. The latter is comletely statically typed ala MLTON

    https://github.com/coalton-lang/coalton

  • Why Lisp?
    17 projects | news.ycombinator.com | 7 May 2023
    Coalton doesn't actually work: https://github.com/coalton-lang/coalton/issues/84?s=09

    This is why it's important to always look at the issues on a repo instead of just believing what's in the README. It fails to detect type errors in some of the most basic situations

    17 projects | news.ycombinator.com | 7 May 2023
    > static strong typing

    Alright, here is it: https://github.com/coalton-lang/coalton/

    > small efficient native binaries

    The numbers are: with SBCL's core-compression, a web app with dozens on dependencies will weight ±30 to 40MB. This includes the compiler, the debugger, etc. Without core compression, we reach ±150MB.

    > The actor runtime?

    the actor library: https://github.com/mdbergmann/cl-gserver

    > couldn't find a way to make money with it. I suspect many other programmers are in my boat.

    Alright. Some do, that's life. Yes, some companies go with CL even in 2023 (https://lisp-journey.gitlab.io/blog/lisp-interview-kina/, they released https://github.com/KinaKnowledge/juno-lang lately; Feetr (finance): https://twitter.com/feetr_io/status/1587182923911991303)

    https://github.com/azzamsa/awesome-lisp-companies/

    > Give us an HTTP (1.x & 2.0) and WebSockets libraries

    How so? We have those libraries. HTTP/2: https://github.com/zellerin/http2/

    https://github.com/CodyReichert/awesome-cl

  • My Thoughts on OCaml
    11 projects | news.ycombinator.com | 25 Apr 2023
    1. There are functional dependencies and multi-parameter type classes. No GADTs (yet?) or existential types (yet?).

    2. Records are being implemented but it's far from being a dealbreaker, in the sense that thousands of production lines of Coalton have been built without needing them. It's just not ergonomic to shuffle around and pattern match against record-like data. With pattern matching in function arguments, things are at least easier.

    3. All Coalton functions compile to Lisp functions. There's a guide that describes what is promised about interop (https://github.com/coalton-lang/coalton/blob/main/docs/coalt...).

    4. Since Coalton functions are Lisp functions, you can call (unconstrained) functions directly. However there's a lot of room for improvement. There's an open issue to make a dedicated Coalton REPL that can show types and not require COALTON to be typed.

    5. Coalton is developed as an open source project to build tools at HRL Laboratories, so it does receive sponsorship. Yes, HRL is hiring. Feel free to send me an email to the address in my profile.

    11 projects | news.ycombinator.com | 25 Apr 2023
    Coalton [1] is a dialect of ML with S-expression syntax and integrates into Common Lisp. It works, and is used "in production" by its developers, but it's still being developed into a 1.0 product.

    Coalton made a lot of design decisions that resonate with this post.

    - Coalton dispensed with structures, signatures, and functors. No doubt a beautiful concept, and sometimes satisfying to write, but almost always unsatisfying to use. Like the author suggests, the "interface-style" of type classes, traits, and interfaces have always felt more intuitive, and that different interfaces should require different types. Coalton uses type classes.

    - Coalton has S-expression syntax. No indent rules. No precedence rules. No expression delimiters. All of the "tradition" of ML syntax is dispensed with into something that is a lot easier to write.

    - It should be no surprise that with S-expressions, you get Lisp-style macros. Macros in Coalton are just Common Lisp macros. No separate pre-processors. No additional language semantics to deal with.

    - Because it's built on Common Lisp, Coalton gets something few (if any?) other ML-derivatives get: Truly incremental and interactive development. You can re-compile types, functions, etc. and try them out immediately. There's no separate "interpreter mode"; just a Lisp REPL.

    Coalton's language features are still settling (e.g., records are being implemented) and the standard library [2] is still evolving. However, it's been used for "serious" applications, like implementing a compiler module for quantum programs [3].

    [1] https://github.com/coalton-lang/coalton

    [2] https://coalton-lang.github.io/reference/

    [3] https://coalton-lang.github.io/20220906-quantum-compiler/

What are some alternatives?

When comparing generic-cl and coalton you can also consider the following projects:

awesome-lisp-companies - Awesome Lisp Companies

hackett - WIP implementation of a Haskell-like Lisp in Racket

paip-lisp - Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"

racket - The Racket repository

phel-lang - Phel is a functional programming language that compiles to PHP. A Lisp dialect inspired by Clojure and Janet.

cl-cookbook - The Common Lisp Cookbook

rakudo - 🦋 Rakudo – Raku on MoarVM, JVM, and JS

babashka - Native, fast starting Clojure interpreter for scripting

hissp - It's Python with a Lissp.

awesome-cl - A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.

unseemly - Macros have types!

Mezzano - An operating system written in Common Lisp