see, that's why it still sucks. no one wants to redo all the work.
Name:
Anonymous2018-03-22 7:38
setjmp to implement exceptions in C? What the fuck?
what's so weird about it? setjmp is how you usually implement exceptions in C (the same way call/cc is how you usually implement exceptions in Scheme). there's nothing unusual about it, tons of project do it this way. of course the question is whether you should try to implement exceptions in C instead of using idiomatic methods like return codes, output pointers or errno. personally, I don't mind people doing that but I prefer the idiomatic way myself.
Name:
Anonymous2018-03-22 7:41
Exceptions are a retarded invention.
Name:
Anonymous2018-03-22 7:51
implement exceptions with dubs
Name:
Anonymous2018-03-22 8:26
>>7 why do people insist on using XML to describe GUI? declarative GUI languages are a good idea but this is arguably the worst way of doing them
Name:
Anonymous2018-03-22 13:51
>>12 the twist here is that you use CSS to style them
Name:
Anonymous2018-03-22 14:40
>>9 The problem is that you don't get stack unwinding with setjmp/longjmp. Other non-GCed languages like C++ and Rust have stack unwinding and RAII so you don't leak something if your function throws an exception/panic!s.
Name:
Anonymous2018-03-24 20:12
>>14 dude the os already releases the memory if you panic
Name:
Cudder !cXCudderUE2018-03-24 21:23
To be fair, you have to have a very high IQ to understand C. The undefined behaviour is extremely subtle, and without a solid grasp of the C standard most of the undefined behaviour related bugs will go over a typical programmer's head. There’s also C's simplistic outlook, which is deftly woven into the specification - the design philosophy draws heavily from Unix and BCPL, for instance. The C programmers understand this stuff; they have the intellectual capacity to truly appreciate the depths of the C programming language, to realise that they’re not just writing programs - that they directly communicate with the hardware. As a consequence people who dislike C truly ARE idiots - of course they wouldn’t appreciate, for instance, the humour in C’s existential catchphrase “SIGSEGV”, which itself is a cryptic reference to ridiculing programmers that do not know C. I’m smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as Anus Ritchie’s genius unfolds itself on their computer screens. What fools.. how I pity them.
And yes, by the way, I do have a Anus Ritchie tattoo. And no, you cannot see it. It's for the ladies' eyes only - and even then they have to demonstrate that their algorithms are implemented within 5 CPU cycles of my own (preferably higher) beforehand. Nothing personnel kid.
There certainly is a pattern with image manipulation libraries implementing their own idiosyncratic language features by exploiting C, because C is too braindead to . libvips implements optional named arguments in C by making every function variadic and using strings as labels!
Name:
Anonymous2018-03-28 6:18
>>21 now that's a WTF. also chceck my repeating digits
Name:
Anonymous2018-03-29 15:53
>>15 You can catch unwinding panics with catch_unwind. panic doesn't always kill the entire thread/process. It's like an exception but only used for really exceptional circumstances unlike in C++.
>>19 I'm thinking about it. Seems like you can parallelize/vectorize PNG decoding so at least I'd have some fun writing it.
>>21 Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
Fun fact: you can make animated PNGs that support more colors than GIFs. Before webm, people came up with hack-y PNG animations. However, the compression ratios are abysmal and the file sizes are huge. Prior to VP8 and webm containers, and just HTML5 in general, video on the web sucked ass. Flash, 256 color GIFs... terrible!