Is there a chip I can install in my brain to have full memorization and quick access of all clojure.core functions? Sincerely, A beginner
no, but if you read through all of clojure.core, you'll remember a fair amount
if you haven't seen the https://clojure.org/api/cheatsheet, having the categorized view helps a lot
I love Nate Jones and Kristof Neuman’s podcast for this
They dive into many of the functions from Clojure core
I always use the global search on http://clojuredocs.org and hope I can guess a good enough search query.
Evidently I couldn't, cause I just did an embarrassingly convoluted assoc-in + get-in when the proper solution probably was update-in.
That's a nice cheatsheet. I had seen it, but forgot about it. I should probably take advantage of browser bookmarks more!
I'd say that the mechanism for the chip installation is to 1. try solve the thing you need to solve with functions you know 2. stare at your solution and ask yourself whether there should be a simpler solution 3. … then regularly ask someone with Clojure experience if this is how they'd do it, or if there's a simpler solution. #beginners and #code-reviews are excellent channels for this if you want to ask Clojurians!
For simple things, https://borkdude.github.io/re-find.web/ could also be helpful. And try asking your favorite LLM. For simple widely known things they're great.
For me, this searchable cheatsheet with tooltips is the “best friend”: https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html
also good
I printed up multiple copies of the cheatsheet and placed them around my house in convenient and inconvenient locations. I also put a bunch in Anki.
over a decade old, but luckily nothing in core ever gets deprecated 🙂 https://ankiweb.net/shared/info/3248915342
‘Clojure, The essential reference’ was a great way for me to learn what’s in clojure.core. It covers every function in good detail and groups them so you can discover other functions while reading about ones you already use. https://www.manning.com/books/clojure-the-essential-reference
^ a book so thorough it was too expensive to print!
Not as quick at a matrix upload, but I found working on https://4clojure.oxal.org/ exercises was a great way to embed knowledge of the Clojure core. https://exercism.org/tracks/clojure is also a great way to apply core functions and has mentors that can guide your solutions to challenges.
I'll second 4clojure, though one should be aware it has switched from evaluating submitted code in Clojure on their server to evaluating it in ClojureScript directly in the browser, which means some old solutions it still shows no longer work on the site itself. There used to be a Leiningen plugin called kibit that would scan your code and suggest using core functions instead of custom code in some cases. I don't think it's maintained anymore.
Yup, implementing the core functions is a great way to drill it in. 4clojure does a great job of that.
https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/
I am far from an expert in the area, but intuitively, that has been one of the things that has always bothered me about LLMs, especially when applied to domains like code generation. For example, some people compare LLMs to compilers or the way CPUs work, but until the non-determinism is solved, that's definitely not the case. I.e., a CPU might not take the same path every time, but it guarantees that the end computation result is the same (in the absence of bugs, and empirically, there are very few of those). Same with the JVM: the JVM optimizing JIT compiler, depending on circumstances (say, availability of sample data), might apply different internal optimizations, but again, the end result of computation is the same.
That's a very good writeup.
Thanks for sharing
Add your "Expression Problem" stories here, friends: Clojure's Solutions to the Expression Problem (http://infoq.com) https://news.ycombinator.com/item?id=45161410 87 points by adityaathalye 10 hours ago | 5 comments