Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores

Clojure

Alright so the answer is probably Rust + Clojure
r/rust icon
r/rust

A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.


Members Online
Alright so the answer is probably Rust + Clojure

The main issue with Rust is that it's not fast to iterate - when it compiles it runs, but your logic may be wrong, and then you may need to change your stuff and make it correct again. However, the performance is over the roof and it's memory safe - performance and memory-safety are two hard to combine features

Clojure is in a completely different place: it's BLAZINGLY fast to iterate, but - and now, this is probably because I'm a total newb in Clojure - it's pretty weird to try to squeeze super performance out of it. It's performant alright, but it's no Rust/C++, and can probably never be, since it's garbage-collected and has some decently costed abstractions

So I think where I want to be is to have good mastery of both languages: using Rust for anything that needs to have high-performance or for low level stuff, and Clojure as the day-to-day tool to jack-in and hack away

Now, I don't have enough knowledge of language design to understand how viable it would be, but it'd be pretty neat to have Clojure doing interop with Rust - you jack-in into a Rust program, invoke and break Rust functions in the REPL, iterate adding stuff; when you're done you compile the experiments into Rust code and make it Rust-compilable. That's a dream




2023-era Clojure
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
2023-era Clojure
r/Clojure - 2023-era Clojure

how is Clojure in 2024?
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
how is Clojure in 2024?

still worth learning it?
clojure is lisp, my first language, so I am deep emotionaly envolved with it.
Is also a better java then java, as is easy to interoparate with it.
but is used enough in 2024?
what are the cases where clojure superseeds others?


What if clojure was created now?
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
What if clojure was created now?

My question is more of to Sir Rich Hickey but it is also for many other stalwarts who work on and support clojure.

What are the ideas/approaches they would reject and consider if clojure was to be invented now in 2024?

Will it still be the same?








Leaving Clojure - Feedback for those that care
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Leaving Clojure - Feedback for those that care

After having written several small projects over the past 9 months I'm leaving this language and want to outline some reasons for that decision such that anyone inclined can work towards bettering this ecosystem.Long post incoming.

The Appeal

In August '22 I spent a month doing haskell after I got a recommendation by a professor.I was also already using emacs since January of that year.I enjoyed functional programming and was just familiar enough with the paradigm as well as the best supported editor to give it a shot.Highlights of the coming months would be the strong support for higher order pipelines through the ->> operator, as well as the well thought out core data structures, especially maps.Another big appeal was the premise of "write clojure everywhere".

On boarding

Initial on boarding with "Clojure for the brave and the true" was fine-ish.Definitely not as great as official resources from other languages such as the official python tutorial, the go tour or the rust book.But at the same time no worse than introductions to comparable languages, such as "Learn you a Haskell"

Going from the first few lines to the first few projects was okay-ish as well.Leiningen was well documented and introduced and libraries for most tasks exist.Some domains have several available libraries with no one bold enough to clearly mark one as the standard.This meant it took me a bit longer than it should to land on hickory for my html parser and cheshire for json, but it's fine in the grand scheme of things.

At some point I wanted to migrate to the official clojure cli.That experience was very rough and I'll go more into some details in the following section, but for now I must cite lack of well written tutorial / walk-through style documentation and lack of coherency.

Project Management

Leiningen is a perfectly reasonable tool. The official clojure cli is not.Every relevant language today just does name build,name run or name install where you replace name with the tool name.Now fasten your seat belts for the official way to run a clojure program: clj -M -m my-code.coreBut let's assume that I want to actually build a jar file, I now have to:

  1. add tools.build to my dependencies

  2. write a whole build.clj file

  3. add an alias to my deps.edn for actually building

Graalvm & babashka

So every once in a while I might want to write a program that doesn't take >1s to start.Both tools are probably about as good as they can reasonably be, given their ecosystem.Both are far from a drop-in replacement.

With babashka it's not too bad. Sure, many libraries aren't supported, but that's to no fault of borkdude. Not much needs to be rewritten and the things that do are not too painful.In an ideal case I wouldn't have to rewrite and could just choose it as my clojure implementation of choice, but it's tolerable.

Graalvm is way more of a mess. It took me weeks of occasional tinkering to get my application (a small cli youtube client) working with graalvm native image. If I hadn't accidentally used an older hickory version it probably would have never worked. I went on to go into the hickory codebase and bisect for the error, and at some point got contribution rights to hickory to upstream those changes. I also documented the issues for the next guy.Terrible experience.

Web Stuff

Clojure is supposed to be the best lisp for the web, the best functional language for the web even.Being able to compile to both the jvm and javascript is a unique trait that no other language I'm aware of has.Yet, after getting motivated to pursue a small web application, I was totally put off.

Descision fatigue everywhere, in fact decision fatigue that is only matched by the incredible churn in the javascript ecosystem. Python has Flask and Django, Elixir has Phoenix, Ruby has Rails, Go has their standard library.Here I'm supposed to pick all the little components myself and end up with 5-6 different libraries that hopefully synergise? No thanks.

And that isn't even the bad part, that's merely a non-strengh. The bad part is the assumed domain knowledge. In clojurescript there are about a dozen react wrappers. None of them prominently link to a good getting started tutorial. It's like the clojurescript guy is supposed to already have extensive experience in js before starting. The backend is only marginally better tbh.

In some hypothetical ideal clojure ecosystem there would be reagent, compojure and a nice, open source book written about each of them.

What to do about it?

Thankfully, there already exists a great talk on the matter that I do agree with: "How to Increase Clojure Awareness" by Artem Bramin at clojureU 2022 (link)
Especially that time to hello world needs to get seriously addressed if this language wants to have any hope of becoming relevant outside the FP niche.

tldr: Clojure is a beautiful language in a horrendous ecosystem. I'm out.



Java developer migrating to clojure
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Java developer migrating to clojure

Hi guys, I’m a Java developer who just started my first job as Clojure dev in small startup.

I’m slightly concerned about my career, though, the amount of companies using the language is limited. Am betting my career and taking a risk of ended up cornered by becoming a Clojure developer?

How did your careers evolved by becoming a Clojure dev?



simongray/clojure-graph-resources: A curated list of Clojure resources for dealing with graph-like data.
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online

On installing Clojure
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
On installing Clojure

Around 5 years ago I installed clojure by first installing leiningen, but I know build tools and dependency management preference have changed over the years, so I wonder: what are the options I have these days to install clojure in a development environment. I'm running Debian 12 Bookworm, and I know the official page recommends this: https://clojure.org/guides/install_clojure

EDIT: spelling


What differentiates Clojure from Common Lisp?
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
What differentiates Clojure from Common Lisp?

I've been building an application with Clojure and really enjoying it. It feels different and powerful in someway that's hard for me to articulate. I was reading this article from Paul Graham (an oldie, but a goodie) and he has some high praise for common lisp that feels applicable to Clojure.

I've never written common lisp but, it made me wonder, what makes Clojure better (if it is better) than Lisp? Or at least, what makes it different?


Clojure is now the most valuable fintech in the world
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Clojure is now the most valuable fintech in the world

If Clojure can make Nubank operate (backend and even the DB is Clojure), I think it can do anything in the same application domain. Such a pity it is so hard to convince people in IT about this fact.

https://preview.redd.it/clojure-is-now-the-most-valuable-fintech-in-the-world-v0-nqbh5llvu9cd1.png

Making a presentation to showcase and compare Clojure vs PHP
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Making a presentation to showcase and compare Clojure vs PHP

After several, useful scripts and tools written by me in Clojure at work, I've been challenged by my team lead to make a presentation explaining why Clojure could be better than PHP. Context is web development, json processing, event sourcing, CQRS, Symfony with a lot of custom parts.

Of course one part would be explaining the wonders of REPL driven development, another is about destructuring. Speed? Though it should mostly be language features I think.

What would be good examples, side to side, to show how Clojure brings better developer experience, more succint code and fewer traps in the code?

I'm looking for ideas, some I'll search for examples in our codebase, but I also want demo code.

Thank you!


What books should I read to become a better clojure developer?
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
What books should I read to become a better clojure developer?

Hi guys, recently i start my journey in clojure with Classic book “Clojure the Brave and true” and I love it. So what’s next? I accept recommendations


Is it easier to write one-liners in Clojure than in Java?
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Is it easier to write one-liners in Clojure than in Java?

I’ve seen much more one-liners in languages like Clojure and R and less in Java.

And I wonder if it is easier to write one-liners in these languages. And if so, why? Like, is there something in the structure of a language that makes it easier to write one-liners?

Is it because they are higher level programming languages?



Clojure and Clojure Tools confusion
r/Clojure icon
r/Clojure

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.


Members Online
Clojure and Clojure Tools confusion

On Mac OS Ventura I have Clojure installed in $HOME/bin/clojure. According to the Clojure website (https://clojure.org/releases/tools) Clojure and Clojure Tools are in separate sections but the URL I use to download and install Clojure (https://download.clojure.org/install/clojure-tools-1.11.1.1267.tar.gz) references Clojure Tools. To complicate matters one of bb, nbb or neil (I forget which) compalins if Tools is not in $HOME/.deps.clj/ but the resulting directory structure doesn't resemble the tools directory under $HOME/bin/clojure. So, are Tools separate from Clojure itself?