trying to get my quite old Clojure-based personal browser-search backend project working via:
nix
…flakes
…and under a contemporary leiningen & clojure version
is, perhaps unsurprisingly, Kinda Hard.
This codebase is almost vanishingly tiny; wondering if I should just acknowledge I'm unlikely to ever use Clojure for anything else, and try porting it to (aka learning) Rust.
Back on my #Rust bullshit. A theme the whole time I've been reading bits n snatches of the Rust Book (i.e. mostly when asked to by #Rustlings, but with a medium amount of going off into the weeds) is nice, straightforward explanation of the tradeoffs involved in many of the lang features or specific API members.
Too much tech documentation only goes over the how, and not the why. Love to see it. Makes me wonder what reading this would be like as a totally new coder.
Still working through #Rustlings but getting nearish the end (tests! which force the #Rust/#Rustlang book to say more about attribute macros, aka "basically decorators?")
Re-reading earlier notes, I really enjoy the idea of the Result/Option pair of enums making the "something, or an error" / "something, or nothing" dualities explicit, and their boilerplate-reducing ? operator (in my head, "the short-circuit operator" 😂).
...huh. I guess #Rust's cargo does things "OS package manager style" and downloads a bunch of repository metadata locally? (instead of what I'm used to in lang package managers, hitting an API.)
Near the end of #Rustlings so I need clippy, and this is taking a few minutes:
@khalidabuhakmeh I'm trying to have some fun with RustRover but it's hitting an error. Then I wanted to play with #rustlings and it's hitting the same error:
ld: library 'System' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Have you ever seen this? Writing you up since you've been approaching #rust also as a beginner, so maybe you came across...it seems like something very basic is missing, but I followed the steps, honest 😭
I wish I had a similar environment to learn #python or #julialang in.
For those who are unfamiliar, Rustlings is an interactive learn-by-fixing program you run in your terminal. It correlates directly with Rust's official guide (The Book). They even link together and to the docs. So cool!
Spent all afternoon trying to get #linux installed on my old 2015 #chromebook so I'd have something to practice #rust and #rustlings on while I travel next week.
Unfortunately, my chromebook went end-of-life before the linux mode was added. When I finally got it running via crouton on a dated version of Ubuntu (that I can't upgrade without breaking) I realized that....
Nachdem das erste Drittel der #Rustlings-Aufgaben sehr schnell abgeschlossen war, haben sich gerade die letzten Aufgaben doch sehr gezogen.
Zu den Themen Threads, SmartPointers, Lifetimes und Conversions muss ich noch einiges Lernen, damit ich es gut anwenden kann.
Wie würdet ihr die Themen vertiefen? Doku lesen? Eigenes Beispielprojekt beginnen? Ein bestehendes Projekt verstehen und anpassen? Habt ihr einen Tipp für mich?
🔁 (:boostok: Wie in Mastodon scheint es hier nicht zu geben. Was wählt man stattdessen?) #Rust#LearningRust#Sabbatical
#programming question: how do y'all find and determine what libraries and functions to use? As I'm going through #rustlings I keep coming across challenges that require me to use functions/methods that I didn't even know existed for a particular class or primitive, yet someone else figured it out. So what am I missing that everyone else knows?