defstar VS coalton

Compare defstar vs coalton and see what are their differences.

defstar

Type declarations for defun et all. Just a mirror. Ask for push acess! (by lisp-maintainers)

coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp. (by coalton-lang)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
defstar coalton
5 84
38 1,002
- 2.9%
10.0 8.4
over 4 years ago 3 days ago
Common Lisp Common Lisp
GNU General Public License v3.0 only 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.

defstar

Posts with mentions or reviews of defstar. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-10.
  • Common Lisp: An Interactive Approach (1992) [pdf]
    7 projects | news.ycombinator.com | 10 Oct 2023
    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
    9 projects | news.ycombinator.com | 30 Jun 2023
    > 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?
    2 projects | /r/Common_Lisp | 17 Jan 2023
    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
    1 project | /r/lisp | 13 Sep 2022
    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
    1 project | news.ycombinator.com | 7 Nov 2021
    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))

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/)

  • Typing Haskell in Haskell
    1 project | news.ycombinator.com | 20 Feb 2024
    For the parenthetically inclined among us, there's also an implementation in Coalton: <https://github.com/coalton-lang/coalton/tree/main/examples/t...>
  • 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/)

  • Coalton to Lispers without a background in ML-like languages
    1 project | news.ycombinator.com | 26 Aug 2023
    Coalton seems great, I love the idea. This issue seems problematic, though: https://github.com/coalton-lang/coalton/issues/84
  • 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 I Still Lisp (and You Should Too)
    1 project | /r/lisp | 30 Jun 2023
    Have you checked out Coalton? It allows static typing a la Haskell within Common Lisp. Fully interoperable with CL, including through SLIME etc.
  • Common Lisp for large software
    1 project | /r/lisp | 12 Jun 2023
    I've not regretted using Common Lisp for large, professional projects. However, I started Coalton so that some parts of a Common Lisp project can have strong, static, strict types—reaping benefits of compile-time errors and increased efficiency when I need it, without having to rewrite everything.

What are some alternatives?

When comparing defstar and coalton you can also consider the following projects:

cerberus - Common Lisp Kerberos v5 implementation

awesome-lisp-companies - Awesome Lisp Companies

lparallel - Parallelism for Common Lisp

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

quicklisp-client - Quicklisp client.

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

serapeum - Utilities beyond Alexandria

racket - The Racket repository

githut - Github Language Statistics

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

vernacular - Module system for languages that compile to Common Lisp

cl-cookbook - The Common Lisp Cookbook