Hacker Newsnew | past | comments | ask | show | jobs | submit | danhau's commentslogin

I just wanted to say how impressive your documentation is. I expected an average readme.md, but not only is your readme great (the performance table is wonderful), but the full documentation is awesome. It pretty much answers all questions I had. Nice job! I wish all projects were like this.

I also dig the documentation / book styling.


thanks @danhau, much appreciated, indeed documenting the process felt like another project of its own, so I am very happy to hear that :D

I think this just makes a bad situation worse. This can go two ways:

- the emergency services will wait at the station the train is going to anyway

- your health insurance realizes what you've done and make you pay the bills.


Yup. I had the same revelation when I learned that many of the colors we perceive don't really "exist". The closest thing to hue in nature is wavelength, but there is no wavelength for purple, for example. The color purple is our visual system's interpretation of data (ratio of trichromatic cone cell activation). It doesn't exist by itself.

It's the same reason that allows RGB screens to work. No screen has ever produced "real" yellow (for which there is a wavelength), but they still stimulate our trichromatic vision very similar to how actual yellow light would.


All colors exist. Color is not the same as wavelength, color is the human perception of a collection of one or more wavelengths of light. They are all real.

I think this very quickly gets into semantics and then philosophy to the point that it’s not really a useful thing to disagree on.

We can objectively measure the properties of the radiation reaching eyeballs and we can detect sensor differences in some eyeballs in various ways. But we can’t ever know that “red” is the same sensation for both of us.

The concept of “red” is real, made concrete by there being a word for it.

But most colours can be associated with a primary wavelength… except purple. So by that definition, they don’t really exist.


> But most colours can be associated with a primary wavelength… except purple. So by that definition, they don’t really exist.

And white, and black. Physically, you'll always have a measurable spectrum of intensities, and some such spectra are typically perceived as "purple". There's no need to pretend that light can only exist in "primary wavelengths".

Even if there's no empirical way to extract some 'absolute' mental notion of perceived color, we can get a pretty solid notion of perceived differences in color, from which we can map out models of consensus color perception.


That‘s exactly what I thought I had said. Something might have gotten lost in translation, sorry bout that.

> Perhaps the did something similar to what dentists do when building on teeth so that the added material is not the only contract point when jaws are closed. That is, a contact sheet that leaves contact marks.

The article linked in this post mentions the possibility of „red clay“ being used for this purpose, as well as being a mortar.


They are efficient FIFOs (queues). You‘ll find them in many places. I know them from multimedia / audio, where you often have unsynchronized readers and writers.

In the audio domain, the reader and weiter are usually allowed to trample over each other. If you‘ve ever gamed on a PC, you might have heard this. When a game freezes, sometimes you hear a short loop of audio playing until the game unfreezes. That‘s a ringbuffer whose writer has stopped, but the async reader is still reading the entire buffer.

Zig‘s “There are too many ring buffer implementations in the standard library“ might also be interesting:

https://github.com/ziglang/zig/issues/19231


Came here to link this, but you beat me to it :)


You both beat me. :D


How‘s that possible? JPEG-XL stores image files, right? But RAW files are not images in the same sense. They haven‘t even been demosaiced. Or are Apple RAWs different?

Edit: I should have googled. apple‘s ProRAW does this, which isn‘t a RAW file in the classic sense.


How is this related to the article?


Solve the puzzle and you'll know :-)


> However, when decoding, we must handle errors and skip spaces.

This had me scratching my head. Why would a base64 decoder need to skip spaces? But indeed, MDN documents this behavior:

> Note that: The whitespace in the space is ignored.

JS never ceases to surprise. Also, check out that typo :D

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...


Probably so you can put in line breaks? Seems common in base64 data, such as armored PGP keys or emails attachments. HTML attributes allow line breaks, although I haven’t seen it done for base64 images.


This might be for compatibility with XML Schema base64Binary, which collapses all whitespace (such as line breaks) to single spaces.


So technically it’s now possible to hide a payload in somewhat human-readable text, as long as it base64-decodes.


Now? There's no change. Also human readable text substantially consists of letters. But that's most of the base64 alphabet too. So this isn't like steganography. All the letters in the human-readable words are valid base64 characters too. The only thing about this is that you get to choose where to put the spaces and newlines. You can't exactly construct arbitrary payloads starting from arbitrary messages.


Maybe he means invisible whitespace characters that don't render? I haven't verified this but depending on the definition of whitespace it's possible you can pass a base64 string and insert an arbitrary number of them. When decoded per spec they do nothing so nobody notices them. But if you can pass the base64 string through you can receive or verify the hidden message. Lots of reasons you might want to hide data in plain sight.


What do you mean hide a payload?

Base64 isn’t obfuscation or encryption.


I had a hard time understanding what the author is trying to accomplish. The necessary context apparently is spread across the intro and outro:

> Because of that, later PalmOS versions offered two different encodings for storing color bitmaps: 8 bits palette bitmaps, capable of using up to 256 simultaneous colors

> to perform complex bitmap rendering using multiple, incompatible color palettes

It seems the palette is not per-bitmap but rather per-device, hence the need to convert.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: