Live data from Hacker News

Clojure Turns 15 panel discussion video

youtube.com

101–110 of 226 posts

Re: Clojure Turns 15 panel discussion video

#101

While I like Clojure as a language - I have never seen a language that engendered such hatred in PMs, EMs, sales, etc. I don't know that it survives long term (in industry, it'll survive for a long time as a hobby language.)

This is a reasonable comment, even as a Clojure fan, I think this fits with how the community thinks of itself to some extent. I can't provide a specific citation but I know there is at least one talk (maybe Simple Made Easy but don't quote me lol) where Rich Hickey talks about the fact that one reason "easy" tools -- which in his view provide fast uptake but more problems down the line due to being "complected" in h…

My impression is that Clojure (and Lisps in general) are about maximizing the productivity of an individual where other languages try to maximize the productivity of an entire team. There are trade-offs to be made in either direction and much of what affects the feel of languages on either side of that comes from the choices they make around those trade-offs.

Re: Clojure Turns 15 panel discussion video

#102
post #78

I love Clojure the language but I’ve never seen a more fragmented ecosystem. There seems to be a pattern in the language of “a problem emerges > a community solution gains traction > Cognitect develops their own solution but its weird and undocumented”, like deps.edn over leiningen, spec over malli, pedestal over ring, etc. Many prominent clojurists recommend deps.edn over leiningen and socket repl over nrepl, but I’…

I think most programming communities experience fragmentation as they grow. I would say the javascript ecosystem has had an order of magnitude more fragmentation at every layer: package management, server, client, module specification. IMO this is the cost of progress.

True, but the JS community is huge. Sure, not by its own merit, but because of browsers. Still, can afford to be fragmented.

For smaller languages like Clojure the consequences are way worse.

Re: Clojure Turns 15 panel discussion video

#103
post #13

Earlier quoted context omitted.

> deps.edn Deps is well documented. The issue I personally found is that I needed to look at a bunch of OS project's deps.edn to see how people commonly structure things. Other than that it is a simple tool. > socket repl over nrepl I personally use Calva (VSCode) which just starts an nrepl based on deps.edn. When writing babashka scripts I start the repl manually and connect to it. Very pleasant experience so far. >…

Deps may be well documented, but lots of introductory material seems to use lein. Having two systems is more confusing.

Because a decade ago there was only Leiningen -- so all the books and tutorials (and videos) created in the early days of Clojure had to use it. At work, we started with lein (back in 2011 for our production code), then we switched completely to Boot in 2015, and then we switched completely to deps.edn in 2018. build.clj (tools.build) is a "recent" addition (less than two years since the very first 0.0.1 commit).

More and more introductory material is appearing these days featuring deps.edn but given there was a decade of Leiningen usage out there before deps.edn even appeared, the current state of affairs shouldn't surprise anyone.

As for more than one system, lots of languages have that situation: consider make -> ant -> maven -> gradle etc.

Re: Clojure Turns 15 panel discussion video

#104
Clojure is the language that made me understand why Lisp matters: We can express ideas and instructions in a programming language with just a very basic set of tools. And we can use these tools to craft powerful and elegant abstractions. In addition, Clojure emphasizes immutable data structures, which, after some learning effort, made me write code that is much easier to reason about.

Re: Clojure Turns 15 panel discussion video

#105

Clojure fans seem quite taken to hyperbole. If the language is such a "joy", "ultra-productive" etc I would have expected after such a long period of existence some major open source project to be showing off what the language attributes allow you to do. Happy to stand corrected if there is such a slam-dunk showcase that I've missed, I am actually interested to dig into clojure, if nothing else as a way to deepen my…

To name a few: https://github.com/xtdb/xtdb, https://github.com/nextjournal/clerk, https://github.com/penpot/penpot, https://github.com/metabase/metabase

Re: Clojure Turns 15 panel discussion video

#106
post #70

Nice to see, but I'm still sad Clojure is a hosted JVM language. I find it unwieldy for a lot of things where Go, Python and Chicken Scheme shine, and wish someone got ClojureScript to run natively in things like Bun or Deno so I could have one fast, small runtime.

Check out Babashka!

Re: Clojure Turns 15 panel discussion video

#109
post #8

I tried Clojure, but when i look for a good ORM, what i see is a paid library.

In Clojure ORMs aren't really that popular considering most Clojurists just use the built in datatypes (e.g. maps) to represent data. There are no classes as such (unless you use Java interop). If you need a query builder the honeysql library is really nice.

Expanding on this a bit, Clojure, as a language, is fundamentally against the idea of ORMs in its design.

Objects / classes are not so much the problem, per se—it's specifically that ORMs fundamentally involve scattering uncoordinated mutable state throughout the application. A foundational thesis of Clojure is that mutation is a tremendous source of bugs, and should be avoided / thoughtfully limited.

Once you let the unmanaged mutation genie out of the bottle, it's almost impossible to put back in.

More concretely, I used to work extensively with Rails; I loved ActiveRecord (ORM) when I first started out—it makes basic things so easy.

Later I worked on a large Rails app supporting millions of users...we used ActiveRecord extensively, and had a very talented team. ActiveRecord worked fine most of the time, but I have bad memories of spending hours or even days tracking down user-reported bugs.

I'd try to figure out how to recreate the user's state locally, even cloning pieces of the production database to work with their exact DB data, but whatever state the program had gotten into was a large graph of (all!) mutable objects. How was that flag getting set? What code could have done it? When? And the answer is basically ANYTHING at ANY TIME that could possibly get a reference to the object. And web applications are far from the worst offenders in this space because the request / response cycle is (usually) fairly globally stateless.

Clojure is the exact opposite of that experience.

The state of a Clojure program will most likely comprised of data literals (think JSON data types, if you don't have experience with Clojure / Lisp data). Printable data literals. Connect to the errant server, serialize the state, read it from your machine, and you're there. It's coherent, stable, serializable, transmittable, simple.

Who can mutate your data? No one. You have an immutable reference (maybe others do too, but reading is a fundamentally safe operation). How does it change? Only along the explicit path of computations you're working through (it doesn't change, actually, you choose to hold onto a new reference to derived data when you want to).

Or, if you really need a mutable escape hatch (like, say, you're holding a handle to a database), every type of mutation in (core) Clojure has defined (and thoughtfully so) concurrency semantics. You won't see a bunch of notes in Clojure API docs that say things like "not thread safe" like you see in JavaDocs.

TLDR: Clojure will happily give you object-like read-only views into your database (like Datomic's `datomic.api/entity`), or help you write queries with a knowledge of your database schema, but most Clojure persistence solutions will explicitly coordinate mutation into a single 'site' because that's the only way maintain a coherent view of state-over-time. And that single-mutation-site story is the opposite of what ORMs (as commonly defined) do.

Re: Clojure Turns 15 panel discussion video

#110
post #82

Earlier quoted context omitted.

Clojure user here since 2010(my earliest Clojure project on Github), and while I agree with the fun point, the iceberg wart for me at this point is the inelegance of the interface hierarchy and its structure behind the scenes. Clojure's forward-facing interface (a hundred functions that operate on one data structure) ended up breaking down for me at some point and became 10 functions on 10 data structures and those d…

Do you have some os projects out there to share where you had to do that? Makes me curious, I think the only time I've ended up making a specific data structure in clojure was for a library for perf reasons. In application code basically never.

Specifically it was using GraalVM to interop Clojure on one side with React running on GraalJS on the other. It definitely pushed the limits of what is or even ought to be possible, but at the same time highlighted those very issues. I'll be the first to admit that this is an extreme edge case, but that doesn't take away from the fact that the case is still there.
Post reply on HN