Skip to main content
bsless u/bsless avatar

bsless

u/bsless

Feed options
Hot
New
Top
View
Card
Compact

r/Clojure icon

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

Rich "thanks" to AI

bsless
replied to slashkehrin

Never read the comment section


r/Clojure icon

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

Developing a Space Flight Simulator in Clojure

bsless
replied to wedesoft

Just opened a PR, atmospheric LUTs seemed like a a quick win and a way to get a feel of the code base


r/Clojure icon

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

Developing a Space Flight Simulator in Clojure

bsless
commented

a. Very cool

b. Willing to lend a hand with any perf work if you're interested


r/Clojure icon

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
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 this a weird way to solve 4clojure #21

bsless
replied to Krackor

It won't traverse the entire sequence, but it will traverse n elements twice, because, while lazy, take still consumes the entire sequence, and last eagerly consumes the entire sequence, so in total, each item in the taken n elements will be visited twice.

Also, take does not respect chunking, check the source.


r/Clojure icon

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
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 this a weird way to solve 4clojure #21

bsless
commented

I'd say the weirdest part here is using last, because you're traversing the sequence twice.

This one is a good exercise in writing an iterative loop/recur


r/Clojure icon

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

Rewrite of a Flask Web App in Clojure

bsless
replied to xela314159

Very sure https://github.com/bsless/clj-fast/issues/19

You should read this entire thread but TLDR:

lein injects TieredStopAtLevel=1 to cap tiered compilation.

The JIT compiler that you want to warm up has FOUR tiers. You won't even get to the interesting bits of warmup because lein sacrifices those, and you can't "delay" them until after the JVM started.


r/Clojure icon

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

Rewrite of a Flask Web App in Clojure

bsless
replied to xela314159

Lein disables advanced JIT compilation for faster start ups in development That's bad for Java performance and terrible for Clojure performance


r/Clojure icon

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

Rewrite of a Flask Web App in Clojure

bsless
replied to whatacold

Regarding start up time - there are a few things you can do:
- Uberjar (done)
- Compiler options during uberjar creation: AOT everything, use direct linking and elide meta: https://clojure.org/reference/compilation#_compiler_options

- If you really want it to start quickly use class data sharing archive: https://docs.oracle.com/en/java/javase/17/vm/class-data-sharing.html

Also see some measurements: https://gist.github.com/bsless/fb79601eb2bfdee85ebf4663dbc7bb1b