my final thingy https://github.com/angristan/openfoodfact-api-c
@angristan The "get_off" part sounds lewd.
@shmibs indeed
@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
@CharredStencil @angristan That might also be an indicator of "your" programming skills.
@steelman @angristan My manager skill says that I don't have to use a language that makes the programmer do a compiler's job.
@CharredStencil @steelman @angristan This is a valid point of view.
@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.
@ethicsperoxide @angristan Nowadays even X86 and ARM machine codes are translated again in CPU. 🥺
@veer66 @angristan That's a good point. There is a limit to how close to the bare metal you can get with C (or, sadly, even assembler). But at least C will teach you about (virtual) memory and pointers and system calls.
@ethicsperoxide @angristan I suppose that coding in C on 8051 to interface PM2.5 sensor and E-Ink display is more practical than this cURL thing.
@angristan @shadowfacts Can you use any library in C?
@angristan /r/ wc -l .rb
@angristan
I'd be tempted to implement the same in Lisp. One line?
@angristan
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.
@angristan
<?php
$myProgram = require "myProgram.php";
$myProgram->run();
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
@tdemin yes
I know we learn C at school for our own good, but it's incredibly frustrating.