Clojure is a product design tool

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • penpot

    Penpot: The open-source design tool for design and code collaboration

  • Related: Penpot - The Open-Source design & prototyping platform [1] is implemented in Clojure.

    [1] https://github.com/penpot/penpot

  • imba

    🐤 The friendly full-stack language

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • reagent

    A minimalistic ClojureScript interface to React.js

  • 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!).

  • uix

    Idiomatic ClojureScript interface to modern React.js (by pitch-io)

  • Check out uix too: https://github.com/pitch-io/uix

    …it’s a reagent alternative for modern react.

  • rain

    🌧️ A Clojure/Script library for fast and flexible web apps. (by rads)

  • > - Java stack traces make the above very hard to do.

    If I don't know where the problem is, I'll look at the Java stack trace and start adding `tap>` calls to see the flow of data. Since Clojure programs are data-oriented, inspecting the state that's flowing through the function arguments is usually all that's needed. It's a bit different process, though. Can you elaborate on your issues with the Java stack traces?

    Here's a relevant comment from Alex Miller: https://www.reddit.com/r/Clojure/comments/80al23/how_do_i_do...

    > - You're a second class citizen if you don't use emacs. [...]

    This doesn't really ring true for me even if a lot of docs are written for emacs. At work people use vim, emacs, VSCode, and IntelliJ. As I alluded to earlier, I think IntelliJ is the one that "just works". If you haven't tried it, I recommend giving it a shot. Personally, I've never been a fan of the "Clojure for the Brave and True" book because learning Clojure and emacs at the same time is a BAD IDEA, and it gives a false impression that emacs is somehow necessary when it isn't.

    > - Complaining about Javascript and React and then having your whole ecosystem wrap around Javascript and React is really obnoxious. Reagent is falling behind in React versions and it's missing out on performance enhancements. If you need to do niche React things, it's a pain in the ass.

    Reagent works with React 18, function components, Suspense, React.lazy, hydrateRoot, etc... Honest question: what do you feel like you're missing out on right now by using Reagent? IMO, concerns about Reagent's performance are overblown. I don't think most apps suffer from this issue, they suffer form complexity. The Reagent/Re-frame API is the same as it was when I built my first app with it six years ago and the core model is still solid. One critical thing I do think is missing is SSR integration. I recently started a library to work on this: https://github.com/rads/rain

    Here are some thoughts from the creator of Helix (successor to Reagent): https://www.reddit.com/r/Clojure/comments/11uluj4/comment/jc...

    > - This might just be me, but I used Citrus with Rum and I found it to be the most over abstracted thing I've ever seen in my life. I know it was inspired by re-frame, so maybe re-frame is the same. But it's like Redux X10 in terms of verbosity.

    I haven't used Citrus with Rum, but I think Reagent/Re-frame is worth checking out. You're probably going to have a better experience because it's a more mature stack. If you find Re-frame too much, the Reagent ratoms still work and are as simple as it gets for state management.

    > - Call me crazy, but the Java/Script interop is worse than other guest languages because there's huge impedance mismatch between functional and OOP.

    > - There are very popular broken libraries. People say "It's okay if a library hasn't been updated in 6 years, because Clojure is so stable!." This is a total myth, there have been several flat out broken libraries being recommended in tutorials.

    Can you share what libraries you're talking about and/or what issues you ran into?

    > - While people are working on frameworks (Biff, Fulcro), there are no "best choices" for a lot of problems yet and it leads to frustration just trying to make a simple crud app.

    In my opinion, Biff is the future for server-side apps. It works really well out-of-the-box and the pieces are there to improve it over time. After using om.next and getting burned by it, I haven't had much interest in Fulcro.

    > The community hasn't been unfriendly or unhelpful, but sometimes it feels like I'm speaking to aliens.

    I'd recommend the Clojurians Slack for support. Hit me up there (@rads) if you decide to give Clojure another shot and want some help working through some of the issues you mentioned.

  • test-runner

    A test runner for clojure.test

  • > I had to Grok Integrant again because I wouldn't understand my project otherwise.

    You can use plain functions and `reduce` for system composition if you want. Take a look at how Biff does it: https://biffweb.com/p/thinking-about-system-composition/

    DI should be used sparingly for the top-level, stateful pieces of your system. If you can't understand your program without it, is this a problem with Clojure itself or the design of the program?

    > And when it comes to best practices around unit testing, it's another one of those things where no one in the community seems to be sharing much about it.

    The `clojure.test` API has stayed the same for the last decade and that's what you'll see in most projects. Is the concern about how to run tests? Both of the following libraries work well:

    Minimal test runner: https://github.com/cognitect-labs/test-runner

  • kaocha

    Full featured next gen Clojure test runner

  • Full-featured test runner: https://github.com/lambdaisland/kaocha

    If you install neil (https://github.com/babashka/neil), you can do `neil add test` which will automatically set up cognitect-labs/test-runner in your project. Then you can run tests with `neil test` (just an alias, you don't have to use it).

    > I used Kit to bootstrap this project and the way it set up tests doesn't even work, but this was what most people recommended to me for starting a Clojure project

    I don't really like the approach that Kit takes and prefer something more opinionated like Biff. I'd love to hear your feedback if you do end up trying out Biff.

  • 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.

    InfluxDB logo
  • neil

    A CLI to add common aliases and features to deps.edn-based projects

  • Full-featured test runner: https://github.com/lambdaisland/kaocha

    If you install neil (https://github.com/babashka/neil), you can do `neil add test` which will automatically set up cognitect-labs/test-runner in your project. Then you can run tests with `neil test` (just an alias, you don't have to use it).

    > I used Kit to bootstrap this project and the way it set up tests doesn't even work, but this was what most people recommended to me for starting a Clojure project

    I don't really like the approach that Kit takes and prefer something more opinionated like Biff. I'd love to hear your feedback if you do end up trying out Biff.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts