top | item 39947045

Clojure's machine learning ecosystem

135 points| kmclean | 1 year ago |codewithkira.com

86 comments

order

esrh|1 year ago

> Smile 3.x Avoided due to licensing

> Smile 3.x is GPL-licensed, which poses some potential conflicts for some end users...The community consensus is converging around moving away from Smile due to the GPL-relicensing issue, focusing instead on Tribuo...

(tribuo is developed by oracle)

It's a really great thing that the java community has a high performance and well accepted (~5x stars than tribuo) ML package that's GPL. CF python where the top two libraries are developed by google and facebook. The GPL protects individual, independent developers.

I don't think it's right to recommend that new users move away from the package because of licensing issues; the fact that it's GPL now is a good thing for everyone except corporate users (probably a great part of readers). The people who might have GPL problems already know themselves when they'll have a problem.

zmmmmm|1 year ago

> I don't think it's right to recommend that new users move away from the package because of licensing issues

I was going to chime in to agree but then I saw how this was done - a completely innocuous looking commit:

https://github.com/haifengl/smile/commit/6f22097b233a3436519...

And literally no mention in the release notes:

https://github.com/haifengl/smile/releases/tag/v3.0.0

I think if you are going to change license, especially in a way that makes it less permissive, you need to be super open and clear about both the fact you are doing it and your reasons for that. This is done so silently as to look like it is intentionally trying to mislead and trick people.

So maybe I wouldn't say to move away because of the specific license, but it's legitimate to avoid something when it's so clearly driven by a single entity and that entity acts in a way that isn't trustworthy.

kmclean|1 year ago

I don't disagree at all, but unfortunately it's mostly out of the hands of any community to recommend or enforce usage of a given library. There are many valid concerns around GPL licensing (not that I necessarily agree with them), but ultimately ignoring the requirement of many orgs to not use GPL-licensed code would just harm the ecosystem.

Lyngbakr|1 year ago

Something I really like in the Clojure data science stack that isn't mentioned is Clerk* — an interesting take on notebooks. I think it's a good gateway into Clojure for those coming from a Python or R background.

*https://clerk.vision/

kmclean|1 year ago

The literate programming story is great in Clojure. Clay (https://github.com/scicloj/clay) is also a great option and supports rendering to quarto notebooks, which are IMO one of the best publishing options out there for technical books etc.

BaculumMeumEst|1 year ago

For web server stuff, I still think Clojure is extremely solid. But I’ve come to really prefer Racket for general purpose programming.

I really like the package manager, I like that there’s an IDE with a visual step debugger (seriously, why do almost no lisp people value this?), that it’s multi paradigm, and that the language continues to improve and evolve.

Clojure just has so many finicky or annoying things about it. The design of deps.edn/clojure CLI and the lack of user friendly tooling is forever frustrating. Laziness and its implications being invisibly core to the language is annoying as well.

roenxi|1 year ago

I spot 6 points in that comment and most of them strike me as fair. But two I think are not:

1) The language evolving all the time is an anti-feature. Clojure is an oasis for the people who are tired of having their knowledge obsoleted by constant change that doesn't really improve anything. People can build whatever weird and wonderful features they want using macros in their own library.

2) deps/edn - the design seems to support toolmakers more than end users. I hated it myself (tinged by poor documentation at the time which has since been remedied). But for anyone else having similar issues; the answer is to jump to leiningen [0] which is by far an easier way to set up a Clojure project.

Deps is ok, but lein is what I'd recommend to anyone as a starting point.

[0] https://leiningen.org/

lgrapenthin|1 year ago

Most Clojure devs I know already have lots of experience and can debug faster in their head, with the occasional help of printing a value. But check out this cool Clojure debugger, it even has time travel https://www.flow-storm.org/

We also have a debugger in Emacs/CIDER.

Your other complaints read like you haven't dug really far, or they are outdated.

thih9|1 year ago

Very true. Also, while I agree that Clojure is solid for web server stuff, it wouldn’t be my first choice in the context of general purpose web apps or APIs.

The “do-it-yourself” mentality that is at the core of Clojure dev culture results in a less rich library ecosystem. Not only you often end up writing custom code for a generic feature, the rest of your team cannot reuse their past experience but has to learn your custom code and maintain it.

Lyngbakr|1 year ago

While I love Clojure, I have to agree about tooling. I recently started using Gleam* and was impressed at how easy it was to get up and running with the CLI tool. I think this is an important part of getting people to adopt a language and Clojure dropped the ball a bit on this.

* https://gleam.run/

cmiles74|1 year ago

The big push for people to use the Clojure CLI tool seems like shooting themselves in the foot.

indigosun|1 year ago

> The design of deps.edn/clojure CLI and the lack of user friendly tooling is forever frustrating.

"user friendly tooling" and ANY Scheme in the same sentence?!

I kid, but I always have held that Schemes feel like "tools for building a programming language" (the insanity that is (car ), (cdr ), (caadadr ) suddenly reveals its usefulness when you write an s-expression parser) and Clojure feels like "an actual programming language" with its benevolent use of brackets, build tools, and library ecosystem.

    (defn my-func [arg0 arg1] ..)    -- Clojure
    (define (my-func arg0 arg1) ..)  -- Scheme (of which Racket is one)
Racket seems to want to inhabit the space between those two with its package system and ability to compile to an executable.

One thing I've always liked about Racket is its refusal to accept (if )s without else statements, insisting instead on using (when )s.

pjmlp|1 year ago

> why do almost no lisp people value this?

We do, that is why Cursive exists.

The problem are the folks educated in SBCL + Emacs that never used anything else Lisp related, including the survivors of the Lisp hype wave like Lisp Works and Allegro Common Lisp.

beepbooptheory|1 year ago

Wait... What is the Janet IDE you are talking about here? I had no idea that happened, but can't seem to find reference to it on the website or anywhere.

j13n|1 year ago

It’s great to see reports of the excellent work Daniel Slutsky and others are doing to make data science more straightforward for everyone.

I'm grateful that I get to benefit from these community efforts.

bmitc|1 year ago

Good luck getting academics to adopt anything they don't know about, and all they know about is Python.

xedrac|1 year ago

If Clojure compiled to native code by default, instead of relying on the JVM, it'd be much more attractive to me. I know many people don't care about this...

giancarlostoro|1 year ago

You could probably achieve that via GraalVM I would think.

kleiba|1 year ago

I remember there used to be so much excitement about Clojure - it certainly was the "tech du jour" for a long while, also on the HN front page. It was the "...in Rust" of its day.

But is it just me or has it gotten awfully quiet around Clojure? I mean, it is of course expected that no novelty can stay in the lime light forever. But what has become of all of the excitement?

My impression is that Clojure failed to live up to the hype, but has found its niche - but it is a rather small niche. In the end, despite its attempts to differentiate itself from Lisp pitfalls, it has gone the way of all Lisps: it's this cool, intellectually stimulating language that in practice almost nobody uses.

Is that view wrong? Please feel free to correct me, and sorry if this post is about Clojure in general and not specifically about its machine learning ecosystem.

deadghost|1 year ago

I've been using clojure as my main language for a decade. Few things can stay hyped that long.

My last few jobs were in clojure so jobs do exist, moreso than in Common Lisp and Haskell at least (probably). There aren't very many companies that use it relative to the programming world at large, so I'd say you're right on that front.

I'm happy using it and will continue using it. Sometimes I encounter interesting ideas and libraries that I end up using.

At the end of the day, it's a programming language. You can write interesting things on uninteresting or even subjectively awful languages and boring things on interesting languages.

Here's something I've been working on for the last two weeks: https://keyboards.justbuythisthing.com/. If I didn't tell you I wrote it in clojure, no one would know. It could very well be PHP.

nextos|1 year ago

I would not say it is such a small niche. There are job openings here and there. It is much easier to find a Clojure job than a F# or a Haskell job in my experience. This may be of course different depending on your location.

The problem is that an entire ecosystem is more than just a new language. Clojure has some really interesting libraries, but the rest relies on Java. It is a good ecosystem nonetheless. Julia is having the same issue. It has grown a very respectable ecosystem, but it is hard to grow further to catch up with Python in some fronts without massive corporate funding.

It is interesting to note that, at some point circa 2010, it looked like Clojure could revive Lisp-Stat with Incanter. But, eventually, the project declined in popularity and died. Reaching mainstream relies on getting a critical mass of developers at the right time and for the right domain.

gorjusborg|1 year ago

I feel like Clojure did live up to the hype, but is different enough that there was little chance that it would dominate in the mainstream.

The language ecosystem reflects the smaller numbers of contributors.

zelphirkalt|1 year ago

I think there is a lack of companies willing to hire for it, and also a lack of qualified people to hire.

I would like to learn it and probably would like to work with it. Only downsides I see is reliance on JVM (which is also a strength) and not as good ways of recursion as other Lisps or Schemes (simply call the function, duh, because it just works and doesn't need extra keywords or syntax).

But I liked the talks and that is seems to have the functional datastructured one needs, if one wants to avoid mutation.

synthc|1 year ago

I think the language has indeed reached a stable point and found its niche, which is small, but there are certainly domains where Clojure is the best fit.

The ideas behind Clojure (functional, immutable datastructures, homoiconic syntax, focus on simplicity, JVM interop) still stand strong IMO.

There are still some exciting projects done in Clojure: Electric Clojure and Rama come to mind.

lgrapenthin|1 year ago

Clojure focuses on quality over hype, at great success. Its hypesters never really understood Clojure, and have long moved on. So will the hypesters of Rust and other hyped languages, unless they get a chance to ruin them.

lispisok|1 year ago

I think Clojure absolutely does live up to the hype but during Clojure's peak HN hype days all the people upvoting the posts and commenting in the threads never actually gave Clojure a proper try or a try at all. Rust on HN might be in a similar boat.

cess11|1 year ago

Aren't they having problems with new Java versions? Heard someone say something along those lines a while ago, or I misunderstood.

It also seems Rich Hickey kind of stopped doing interesting talks, and some big bank bought into it and no one really likes banks.