I almost didn’t notice the title.
- 1 Post
- 26 Comments
Tsoding has created a few rules for writing Rust to make Rust “fun” to program in, and gave them the name of Crust.
Here is the rule set (it may change over time):
- Every function is unsafe.
- No references, only pointers.
- No cargo, build with rustc directly.
- No std, but libc is allowed.
- Only Edition 2021.
- All user structs and enums #[derive(Clone, Copy)].
- Everything is pub by default.
If you ever want to try this out for some ungodly reason, there’s a GitHub repository with an example Main that shows how to use libc and other libraries (in the example, it’s raylib), and with a Makefile showing how to compile your projects (remember we aren’t using
cargo
).
OP, I don’t think you’ve correctly linked to the post (when I visit the linked webpage, the browser tries to download an ActivityPub activity instead of showing the post in the Mastodon web UI). Please replace the link with this one.
Wait, now I need to know why.
* some time later *
I went to check why the hell this happened. It looks like the pair (“
(,)
”) is defined as an instance ofFoldable
, for some reason, which is the class used by functions likefoldl()
andfoldr()
. Meanwhile, triples and other tuples of higher order (such as triples, quadruples, …) are not instances ofFoldable
.The weirdest part is that, if you try to use a pair as a
Foldable
, you only get the second value, for some reason… Here is an example.ghci> foldl (\acc x -> x:acc) [] (1,2) [2]
This makes it so that the returned length is 1.
yetAnotherUser@lemmy.cato Programmer Humor@programming.dev•They're trying to normalize calling vibe coding a "programming paradigm," don't let them.3·1 month agoAre those Turing complete? (Legit question, I’d love to know)
The boss fires both, “replaces” them for AI, and tries to sell the corposhill’s dataset to companies that make AIs that write generic fantasy novels
yetAnotherUser@lemmy.cato Programming@programming.dev•What's your favorite IDE right now?5·1 month agoI don’t know what the best IDE is, but I know what the best text editor is.
We’re just talking about this, but I might as well do it! Do you per chance have an archive of ASCII cats?
And “AI agent” as in an algorithm that returns the cats every second, obviously.
That doesn’t work in my LaTeX renderer. :( Does it require any packages? (/lh)
yetAnotherUser@lemmy.cato Programming@programming.dev•How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H24·2 months agoI researched at bit about the debug symbols, and it seems like, for the most part, people have both found official builds where the debug symbols were simply left in, and info useful to debug the games in leaks.
Congrats!
Do you know which GTK version you had installed before updating?
And, as we all know, those two buttons are…
yetAnotherUser@lemmy.cato linuxmemes@lemmy.world•Man I miss those classy RedHat ads from the sixties7·3 months agoWhat do you think they should be saying?
Are you Odysseus or smth?
This picture looks too good