Fork me on GitHub
Adam Kalisz08:04:10

No really surprising, but getting ~ one page of 4 KiB (* 2048 16bit) is a lot faster than getting the same amount of data but in smaller chunks.

(* 32 860)
=> 27520
(* 16 1598)
=> 25568
(* 8 2426)
=> 19408
(* 4 5116)
=> 20464
(* 2 8002)
=> 16004
Allocating more memory/ creating that many larger objects seems to kill the runtime at some point though. I am investigating this since it could be used as a "random well" just like /dev/urandom but with some usable data such as 16bit unsigned ints or 32 bit unsigned ints (when wrapped with unsigned-bit-shift-right 0 or so).

đź‘€ 1
Adam Kalisz08:04:34

This has interesting use-cases such as this horrible and probably unsafe hack:


So I read through and I must say that I tend to agree on the conclusion with Clojurescript. When Figwheel came out in 2015, it IMO put cljs way ahead of JS, but these days the dev experience with TS is basically on par with cljs. Personally I find the greatest pluss is that we tend to prefer hiccup over jsx/tsx. The code I wrote in TS today is highly functional without any OO, which looks a lot like the code I’d write in cljs.


Agreed… Glueing stuff together in TypeScript is super easy. Compiler really helps prevent bugs. Even TypeScript based AWS Lambdas can now be developed in a live-reloading manner. We’re using Clojure for what it was always best at: data processing.


Interesting. What tools/libraries are you using to get a similar/better experience? Is it based on mutable data structures still, like normal javascript?


Is it for simple applications, or advanced?


We call Clojure in a typed way from TypeScript, by


Wow, I so disagree with this. Cljs with shadow-cljs have hot reload that doesn't depend on any library and can basically hot reload anything; Typescript compiler preventing bugs was studied already, and most results where not conclusive; and in ClojureScript, I can REPL into my env without needing to rely on external tools like debuggers and such

âž• 2

What I feel is that the JS ecosystem became so insane that almost any language that do not use its tooling (babel, webpack, etc) feels out of place... there's also a whole issue with backwards compatibility, fragmentation of tools, etc. As an example, I have to interface with a TS library. That library does not compile with tsc - instead, it uses an external tool to precompile things to JS. Then, webpack over the js. The webpacked version is imported on our app. This is all necessary because of the libraries used, and the bundle size gets smaller. Any other combination almost doubled the bundle size... For some reason nobody was able to find out.

âž• 1

Wrt pds. I might be very mistaken here, but from a immutability perspective, todays js/ts practice of spreading data structures into other data structures, eg {…foo,bar}, you basically achieve immutability, even if it's not as fast/efficient as a pds. As for the build, sure, it's magical, but create-react-app does the magic for you. I'm not claiming it's maintainable, though.


I avoid webpack. esbuild.

Joshua Suskalo18:04:07

General licensing question: I am currently making a threading utilities library to contain a few functions and macros that I myself need very often and that seem to resolve many patterns I've seen in the wild, but I know lots of people are dubious about adding new dependencies, and I want to reduce friction as much as possible for anyone who wants to use these functions. I would like for people to be able to simply copy the implementations of the functions and macros out of the library source and paste it into their own code without the need for attribution or to keep the license. I know that the CC0 license is a good one for this purpose, but is there a more common software license which also fits that need, and is there likely to be any issues to be had with using CC0 on code, seeing as it's usually not used for software directly?


My suggestions would be either MIT, BSD, or ASL2. Those are "you can do anything" licenses to varying degrees and are likely to be compatible with most (nearly all) Clojure projects.


There's a new MIT-0 license from Amazon that is exactly mit but drops the attribution requirement


I don't know intricacies of licensing but you could also dual license stuff

seancorfield19:04:05 is a good place to start for an overview of compatibility with being a deeper dive across more licenses.

Joshua Suskalo19:04:11

Thanks to both of you!

Joshua Suskalo19:04:45

I ended up going with MIT-0


I just stumbled on this cool clojure library (with accompanying fun video intro) while browsing HN ( , the author is in there doing an AMA):