generic-cl VS reagent

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

generic-cl

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

reagent

A minimalistic ClojureScript interface to React.js (by reagent-project)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
generic-cl reagent
13 41
123 4,716
- 0.3%
0.0 1.1
over 2 years ago 5 months ago
Common Lisp Clojure
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.
  • 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
    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.
  • State of the Common Lisp ecosystem, 2020
    5 projects | news.ycombinator.com | 8 Feb 2021
    If you want to regain performance, add-in type declarations, cl-generic will inline its functions: https://github.com/alex-gutev/generic-cl/#optimization
  • Re-export renamed symbols from other packages.
    1 project | /r/Common_Lisp | 26 Dec 2020
    This example makes me think of generic-cl: https://github.com/alex-gutev/generic-cl/#add-nary

reagent

Posts with mentions or reviews of reagent. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-21.
  • Ludic: New framework for Python with seamless Htmx support
    27 projects | news.ycombinator.com | 21 Mar 2024
    Generating `HTML` from lisps has poisoned any other approach for me, see for example https://www.neilvandyke.org/racket/html-writing/, https://reagent-project.github.io/, and https://edicl.github.io/cl-who/
  • Produce HTML from S-Expressions
    5 projects | news.ycombinator.com | 30 Aug 2023
    Hiccup syntax for Clojure uses hash maps (curly braces) for attrs, e.g. `{:style {:background "red" :margin "1em"}`

    See Reagent which uses Hiccup synta: https://reagent-project.github.io/

        (defn simple-component []
  • A History of Clojure (2020) [pdf]
    22 projects | news.ycombinator.com | 10 Aug 2023
    * Single-Page App: shadow-cljs for the build concerns (https://github.com/thheller/shadow-cljs), Reagent with Re-frame for complex/large app (https://reagent-project.github.io and https://github.com/day8/re-frame). Even if we now prefer using HTMX (https://htmx.org) and server-side rendering (Hiccup way of manipulating HTML is just amazing, https://github.com/weavejester/hiccup).
  • Leaving Clojure - Feedback for those that care
    8 projects | /r/Clojure | 23 Jun 2023
  • Clojure is a product design tool
    8 projects | news.ycombinator.com | 22 Jun 2023
    The API documentation lists the most commonly and rarely used parts before going into detail and there are many usage examples.

    Reagent has a nice intro tutorial (classic todo-app): http://reagent-project.github.io and many other helpful tutorials and resources for beginners: https://cljdoc.org/d/reagent/reagent/1.2.0/doc/documentation...

    However, since Reagent is still stuck with class-components for more complex behavior and relies on Hiccup, which is nice but has a performance cost compared to pure React, I am unsure about its future. Like some others in the Clojure community, I have moved to thin React wrappers like Helix and use Refx to integrate those with re-frame. It may be a bit confusing right now for beginners since there is no “golden path”.

    Also, unfortunately, many smaller libraries are poorly documented and it seems like it is expected from the developer to dig into the source code to find out what’s going on.

    What I found the most difficult as a beginner was how to setup a project in ClojureScript in the first place, like all the configuration in shadow-cljs, how it interacts with deps.edn, how it integrates with npm, the REPL, etc. But dev/build config has always been a weak spot for me, so it might be just that.

    Overall, I still very much enjoy working with Clojure(Script), more than in any other language. Anyone who likes Lisps and functional programming should give it a try (and be sure to watch Rich Hickeys amazing talks!).

  • Ask HN: How can a BE/infra developer handle the FE side of personal projects?
    7 projects | news.ycombinator.com | 13 Jun 2023
    have you tried cljs and reagent? it’s a different vibe.

    my bootstrap: https://github.com/nathants/aws-gocljs

    the project: https://reagent-project.github.io/

  • What are the enduring innovations of Lisp? (2022)
    2 projects | news.ycombinator.com | 1 Jun 2023
  • Building a website like it's 1999... in 2022
    6 projects | /r/programming | 19 Mar 2023
    Clojure people have been doing this for a decade or so. It’s really so much better to work with. All started with Hiccup and when React came along you got Reagent and many more developments building on the idea.
  • React.dev
    21 projects | news.ycombinator.com | 16 Mar 2023
    > But Reagent supports functional components as well, with hooks and all.

    I addressed this already: while reagent is able to emit function components, there is a performance penalty to this.[1]

    > I also very much like Hiccup, and so do many of us, because code is data and data is code, and Helix has decided not to support that.

    Hiccup is convenient to write, but it is a constant run-time cost and a significant storage cost given that you have to store long series of constructors to cljs.core.PersistentVector in your bundle, have the JS runtime actually construct the vector, then pass it through a Hiccup interpreter to finally produce DOM nodes and throw away the persistent vector, only to repeat this entire process again on re-render.[2]

    > Helix has decided not to support that.

    That is simply not true. From the Helix documentation[2],

    > If you want to use libraries like sablono, hicada or even hx hiccup parser, you can easily add that by creating a custom macro.

    These are all Hiccup interpreters you can readily use.

    IME there is very little difference between using the $ macro in Helix and writing Hiccup. I do not really miss Hiccup when I use Helix, and you still have data as code ;)

    While this is from an unrelated project, there are benchmarks[3] done against Reagent that demonstrate the sheer overhead it has. In practice it is not a big problem if you rarely trigger a re-render, but otherwise it is a non-trivial cost, and if you want to use modern React features (like Suspense), there is a lot of r/as-element mingling going on, converting cases, etc. that simply make Reagent feel more tedious to use than Helix.

    Also, the newer UIx2, which largely borrows from Helix, is "3.2x faster than Reagent" according to one of the contributors.[4]

    I think it'd be worthwhile to benchmark all of these libraries against each other and record the data in one place. Maybe I'll get around to doing it this weekend :)

    ---

    [1] https://github.com/reagent-project/reagent/blob/master/doc/R...

    [2] https://github.com/lilactown/helix/blob/master/docs/faq.md#w...

    [3] https://github.com/roman01la/uix#benchmarks

    [4] https://github.com/pitch-io/uix/pull/12

  • React is a fractal of bad design
    12 projects | news.ycombinator.com | 7 Mar 2023
    Reagent is peak React. All the good stuff without any of the hook and readability problems the article describes.

    No affiliation, happy user for years.

    https://github.com/reagent-project/reagent

What are some alternatives?

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

coalton - Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.

helix - A simple, easy to use library for React development in ClojureScript.

static-dispatch - Static generic function dispatch for Common Lisp

re-frame - A ClojureScript framework for building user interfaces, leveraging React

inlined-generic-function - Bringing the speed of Static Dispatch to CLOS. Succeeded by https://github.com/marcoheisig/fast-generic-functions

shadow-cljs - ClojureScript compilation made easy

drracket - DrRacket, IDE for Racket

fulcro-rad-demo - A demo for Fulcro RAD using either SQL or Datomic databases.

lisp-interface-library - LIL: abstract interfaces and supporting concrete data-structures in Common Lisp

storybook.js-with-shadow-cljs

magicl - Matrix Algebra proGrams In Common Lisp.

hyperscript - Create HyperText with JavaScript.