my final thingy https://github.com/angristan/openfoodfact-api-c
@angristan The "get_off" part sounds lewd.
@angristan Yeah it's definitely cause C is so bad.
After years of changing requirements, eventually you realize that your app is leaking every possible kind of resource, this is the magic of deep C
@angristan At least for this case, Rust is shorter.
And people use Rust for writing OS kernel too. 🤔
@ivesen School projects™
@angristan yeah, there are many good uses of C, but making a request to a web API and parsing the resulting JSON is not one of them.
It's sad that many teachers can't come up with tasks that show strengths of C, and then the students suffer and get to think C is a bad language.
@angristan because C is fastest. And it helps to show who is the _daddy_ in the room.
@angristan Dude, C is awesome. It's great for being able to know what your code is actually doing on your machine.
@angristan /r/ wc -l .rb
I'd be tempted to implement the same in Lisp. One line?
Here i assume you write the code from scratch on both side... only using primitive of the langage. You although compare exection time and memory footprint. Limit your study to the number of line is a strange choice.
I study c and i don't use it irl. Because when i write something i need the result quickly... in professionnal environnement the performance's needs could be a reason why they chose c.
$myProgram = require "myProgram.php";
There, did I win?
@angristan every once in a while the world needs something like Node.js to appear. And it wouldn't be possible if the folks didn't know their memory management
@angristan wait, why JS when curl | jq does just fine here
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!