Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

libpng

Name: Anonymous 2018-03-21 15:18

setjmp to implement exceptions in C? What the fuck? Actually the entire API is a gigantic clusterfuck. Jesus Christ why does anybody use this shit?

Name: Anonymous 2018-03-21 15:32

>>1
"It was a good idea at the time".
20 years ago, setjmp was cutting edge, portable and reliable cross-platform.

Name: Anonymous 2018-03-21 18:55

Cudder thread

Name: Anonymous 2018-03-21 19:36

"Ahaha good minimal library to use on my 512kb ram machine because its 1986" - gnu people

Name: Anonymous 2018-03-22 0:26

EIGHT MEGABYTES AND CONSTANTLY SEGFAULTING!

Name: Anonymous 2018-03-22 1:02

Simplicity of implementation > simplicity of interface.
- some unix guy

Name: Anonymous 2018-03-22 1:44

>>6
what about this interface? https://github.com/lc-soft/LCUI

Name: Anonymous 2018-03-22 3:40

you rewrite it then.

...

well?

see, that's why it still sucks. no one wants to redo all the work.

Name: Anonymous 2018-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: Anonymous 2018-03-22 7:41

Exceptions are a retarded invention.

Name: Anonymous 2018-03-22 7:51

implement exceptions with dubs

Name: Anonymous 2018-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: Anonymous 2018-03-22 13:51

>>12
the twist here is that you use CSS to style them

Name: Anonymous 2018-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: Anonymous 2018-03-24 20:12

>>14
dude the os already releases the memory if you panic

Name: Cudder !cXCudderUE 2018-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.

Name: Anonymous 2018-03-24 21:24

>>16
sorry, I don't speak memes

Name: Anonymous 2018-03-25 1:26

>>16
I don't understand.
Do you like libpng or not?

Name: Anonymous 2018-03-26 2:59

If you don't like it, make your own PNG library.

Name: Anonymous 2018-03-26 6:49

>>16
go fuck your're are self, fakeCudder

Name: Anonymous 2018-03-27 13:40

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: Anonymous 2018-03-28 6:18

>>21
now that's a WTF. also chceck my repeating digits

Name: Anonymous 2018-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
Terrible!

Name: Anonymous 2018-03-31 19:14

>>21
Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

Name: Anonymous 2018-04-14 19:08

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!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List