• 1 Post
  • 94 Comments
Joined 1 year ago
cake
Cake day: December 11th, 2024

help-circle
  • I want my language to pass by reference. I give a variable to a function and the variable in the function scope should be a reference to the same place in memory as the original variable.

    I’m not even a C++ wizard or anything (though it’s my most advanced language) so I’m not gonna argue that is good or bad, that sounds fine to me for a wide range of applications already.

    But the way is see it, pointers kinda allow you to use “raw memory” which is an actual thing that’s gonna be handled by the program one way or another, and it’s a way to relatively refer to memory for example. As some guy on stackoverflow put it “That guy at the end for the bar” vs “Bob” can be very useful. Especially when using data structures you don’t know the size of at compile time.





  • Not sure what they’re implying about being forced to sell non refillable vapes. I bought a Centaurus kit (refillable) two years ago and they’re still selling. Though the same brand also has lines of disposables…

    In reality the people buying disposables don’t want to deal with the hassle that is e-juice (and changing coils). But the modern refillables are pretty good at not leaking every time you look at them wrong, though in my experience the big ones still don’t like being upside down.
















  • It’s been a while since I learned this but yeah we were taught it significantly reduces images in size, though in quality too (mostly because of the 256 colors limit, otherwise it is technically lossless IIRC). PNG results in slightly smaller files with much better colors and alpha channels so yeah by comparison gif isn’t that good, but to be fair, PNG was created as a direct improvement over gifs for single images compression/encoding, and quite some time later too.

    Adding to that, video encoding and compression algorithms have gone so far now that encoding basically any video longer than a few frames as a gif is a waste, but that’s because these hardly store any actual still frame IIRC, it’s mostly codecs-based wizardry which, for a simple explanation, can cheaply encode several frames by basically saying “this whole area stays the same color for X frames” and even moving blobs of pixels across multiple frames, whereas gifs, by design, store each individual frame making up the video.