Hi all! Do you know if I can use the Clojure logo in an about screen of an app to say that the app is built on Clojure?
I'm a big fan of the language, and showing the logo and saying the app was made using it, IMO, would make some people notice the language exists
I think this previous https://clojurians.slack.com/archives/C03RZGPG3/p1779384323975839 might interest you
Guidelines I've recommended. 1. Using the Clojure logo in the context of something like "written in Clojure" is fine 2. Putting "Clojure" in your project name is discouraged 3. Using the Clojure name or logo in a way to make your project sound like an official part of the Clojure project should be strictly avoided 4. Selling merchandise with the Clojure logo should be strictly avoided
Nice, all that makes sense.
Is xf supposed to read as "transform" ?
it's either that or "transformation function", but in clojure those are synonyms
somewhat obscure, but it seems xf can also be an alternate notation for f(x)in mathematics
https://math.stackexchange.com/questions/4591404/what-does-the-notation-xf-mean-in-the-context-of-a-map-f-x-rightarrow-y
I could see xf be transformation function, and xform being transform
https://clojure.org/reference/transducers#_terminology > A transducer (sometimes referred to as xform or xf) is a transformation from one reducing function to another:
I sometimes use it as a suffix when I break it out for reuse:
(def odds-as-evens-xf
(comp
(filter odd?)
(map inc)))
The name then implies that it slots into xf/xform args.If I were to read it aloud, I would pronounce it “Odds as evens transform”
I use hetzner for anything that needs to run all of the time. I abuse github actions for cron jobs and the likes - I guess that could be considered serverless taken to the extreme :D with https://github.com/marketplace/actions/setup-clojuresetup-clojure, there is a lot you can do
Note that with hetzner I am still missing auto scaling a lot. That's one of the big drawbacks. I pay twice as much as I use basically
Something that I feel goes undervalued in a programming language is the ability for a broad spectrum of folks to write code in a way that makes sense to them. I have a few Java programs bookmarked that were written like C89. It is both a strength and a weakness of clojure that it limits the set of expressible programs in the way it does. We don't allow mutable lets/express iteration via recursion/etc. - and for principled reasons - but the wiggle room there is allows for monadic error handling. And for all its cons there are non-zero pros which some people will value more than the cons. That's beauty to me
Are there any clojure benchmarks out there? I'm mostly curious to slap value on some internal classes like Keyword and Symbol and see the results
Keywords cannot be value classes
object identity is essential to their operation
well a keyword references a symbol which references a string
something in that chain needs to have a unique identity, but it could be the string
identical? for value classes does just compare the fields for identical-ness. It would be a regression, people rely on locking on keywords, but I would be curious
(also serialization compatibility would be broken)
the thing to look for is "in which situations do you possibly benefit from value flattening?"
1. arrays of value classes 2. calling a method that returns a value class and shredding its result (scalarization) 3. using value types in locals/parameters (also scalarization)
that requires thinking. I was thinking more "rub value classes on things, see what JIT do"
String wasn't made into a value class as well I believe.
it was not
> "rub value classes on things, see what JIT do" My guess – nothing. But you will get more signal from a dedicated benchmark rather any generic one.
Three years ago, randomly adding value to things didn't help a whole lot. Maybe, things have changed since then, but I bet you still need to understand the usecase before doing it. https://clojure-goes-fast.com/blog/valhalla-vs-ray-tracer/
interesting - I did a rayracer demo before too on the last prototype
I saw a 14% improvement
You saw 14% improvement but on a larger scene you say the improvement vanished and it performed worse? Is my reading correct?
nope - on a point before the raytracer was finished there was a perf penalty, which they figured out was because of an inlining heuristic working against me
Newest preview does much better
Java With Value Classes
Done.
real 0m16.616s
user 0m15.984s
sys 0m0.932s
Java Without Value Classes
Done.
real 0m23.040s
user 0m22.496s
sys 0m1.640s
(dif. laptop, but still a bigger improvement)
Cool. And what did you have to make value classes? Like point2D, point3D and so on? So mostly numeric structs?
Vec3, Ray, Sphere, etc.
Symbols support meta-data already: (meta (with-meta 'x {:val 23})) => {:val 23}