HNHacker News
TopNewBestAskShowJobs

stkdump

1,125 karma · joined April 15, 2018

submissionscomments
stkdump··on FreeTube – The Private YouTube Client
All these 3rd party clients and sites to watch videos should coordinate and define a protocol for creators with a youtube channel to cross-reference a google-free (maybe self-hosted) platform to get to their content as a safeguard to not fully loose their viewership if either the creator or the subscribers get booted off the platform for whatever reason google deems a violation of their policies. Then creators can promote these 3rd party apps. Of course any other platforms will not easily be able to replace youtube's monetization, but at least keeping the contact could buy them some time.
stkdump··on JSONB – Request for evaluation and comment
>8.1. Character Encoding

> JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [1].

I don't know what you mean by controls (you mean unicode control characters, for which the spec explicitly states that they are to be escaped?), but since JSON should really only be exchanged as UTF-8, surrogate pairs play no role.

[1] https://www.rfc-editor.org/rfc/rfc8259

stkdump··on JSONB – Request for evaluation and comment
> That sure doesn't sound like numbers are 64 bit floats, according to the spec.

It can't be 64 bit floats, because they are represented as decimal numbers, not binary. You will be surprised to also hear that most base conversion algorithms used are not exact, and so different implementations might give different results in the LSB(s) for some numbers for performance reasons. Here practicality prevails, because making the standard stricter would make its implementation much harder in many environments. And for many applications it isn't a problem. I am sure btw that most file formats that use decimal representations for floating point numbers have this property, otherwise exact base conversion would be more prominently accessible in more programming languages.

I have some hope that this will change in the future, as exact base conversion (lossless round trip) will gain momentum now that it landed in standard C++. Once most common programming languages have this feature, there isn't a big reason to not modify the standard anymore to enforce lossless round-trip.

stkdump··on JSONB – Request for evaluation and comment
Simple, the RFC even calls that out: assume 64 bit float as specified by IEEE and as basically supported everywhere. Why should JSON do anything else than the rest of the world does?
stkdump··on JSONB – Request for evaluation and comment
I don't know, it is trivially simple to choose either Unix timestamp (which is relatively close to what MessagePack is doing) or JSs format [1] if you like a bit more readability and time zone deltas. Or any of the zillion more complex formats such as ISO 8601, etc. In my opinion that would be part of the schema and not the file format.

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

stkdump··on JSONB – Request for evaluation and comment
Most binary JSON variants including MessagePack deviate from the spirit of JSON in one fundamental way: they are not simple. The JSON file format can accurately be described with a few simple syntax diagram that fit comfortably on a printed page and the spec can be implmented with very little code. A binary file format comes with the theoretical further simplicity advantage that you can leave out conversion of numbers, detection of string length, (un)escaping and dealing with white space/pretty printing. Instead of taking that as gains and be done with it, such formats start introducing (space) microoptimizations, such as many different number formats, variable length numbers for sizes, a wealth of additional data formats such as dates, etc.

I think there a two good variants of binary JSON equivalents: one where you have a minimal implementation that makes both reading and writing with the lowest amount of code possible, potentially feeding a SAX-like interface or constructing an in memory representation (DOM-style).

The other one would be to facilitate lookups in large documents such as json_extract without parsing the whole document. That would require some clever layout of the data, potentially even as in-file hash tables or similar. I assume that is what SQLite has done.

stkdump··on JSONB – Request for evaluation and comment
> JSON fails to define "what is a string?" and "what is a number?"

Can you elaborate on this? It seems pretty clear from the spec to me: stuff starting with " is a string, stuff starting with - or a digit is a number.

stkdump··on Lenovo exec promises 80% of its devices will be consumer-repairable by 2025
It's not like you will be able to upgrade the CPU. Even RAM isn't mentioned.
stkdump··on Could we make C arrays memory safe? Probably not, but let's try
See now what I mean by calling this a trade-off? Not everyone is in the same boat. I don't understand how this can even be a controversial stance.
stkdump··on Could we make C arrays memory safe? Probably not, but let's try
I have been working on a monorepo C++ codebase with on the order of 1000 person years of development on it.

And no, we didn't have major issues with memory leaks either. About on par with what I have seen in garbage collected languages. RAII works quite good most of the time.

stkdump··on Could we make C arrays memory safe? Probably not, but let's try
I have been full time in C++ development for >15 years. I can count the number of times I had memory correctness issues that weren't discovered and fixed trivially on one hand, all of them very early in my career. As your adage, of course mine doesn't prove anything.
stkdump··on Could we make C arrays memory safe? Probably not, but let's try
Oh, there are lots of PrEP equivalents. For example NX. Or virtual memory more in general. Or static analysis. Etc etc. If you think the modern ecosystem is as memory bug prone as it was in the 80s, you are being incredibly naive.
stkdump··on Could we make C arrays memory safe? Probably not, but let's try
The modern insistence on (absolute) memory safety feels like another symptom of regression. It is like going back to insisting you can and should be absolutely safe from HIV by making certain lifestyle choices. In the '80s we knew that the answer was being safer, not being safe.

I am all for making C and C++ safer by adding mitigations for the most common security relevant bugs. Either on language level, or on tooling level or on OS level or on CPU level. Or a combination of them. But since making a language absolutely memory safe doesn't make it automatically impossible to have bugs at all (even security relevant bugs), we should consider everything a trade-off.

stkdump··on Raspberry Pi 5
No need for the wifi and bt dongles anymore, are they are integrated in the Zero 2 W. You can connect keyboard and mouse either via bt or via a single usb otg dongle to connect a wireless keyboard/mouse set or a keyboard with integrated usb hub. In my opinion this is superior to the original B. And far superior to the original A anyway, while still being cheaper. Remember even the original B had just two USB ports, so in practice you needed an extra hub almost always, because of missing functionality that is now integrated.
stkdump··on Raspberry Pi 5
No word on price. When Raspberry Pi first launched, this was the prime feature of the thing. Can we expect same price as the Raspberry Pi 4? (at the respective RAM level)

Edit: found it here: https://www.raspberrypi.com/news/introducing-raspberry-pi-5/

So the 4 GB model is 60$, which is 5$ more than the 4 GB model of the Raspberry 4 when that was launched: https://www.raspberrypi.com/news/raspberry-pi-4-on-sale-now-... . I guess that is fair, especially with inflation nowadays. So they stay true to the idea of making this available for cheap.

stkdump··on Why America Has a Long-Term Labor Crisis, in Six Charts
I see it the other way around. Few people say: I don't work (or work less), because work doesn't pay enough. Everyone has to cover their own cost of living. On the other hand, plenty of people would actually work less, if they make enough per hour to cover their costs (or if they had enough saved up/passive income). There is a whole subculture around that, from four hour work week to lean fire, etc.
stkdump··on Croc: Easily and securely send things from one computer to another
Can you send files from one mobile network connected computer to another?
stkdump··on Tesla buys German railway line, now hosting passenger trains
It is a standard feature for many factories, but usually for transporting cargo, not passengers/commuters.
stkdump··on XML is better than YAML – Hear me out
I don't think this is true. The original specification (ECMA 404) only covers the formal language, i.e. what are valid documents and not what their memory representation after deserialisation is. A parser that rejects a number because it has too many digits would not be conforming.

rfc8259 is more detailed and it mentions that most parsers will have limited precision and references ieee754 to explain what the expected precision after deserialisation should be for most parsers.

stkdump··on What Is Dimensional Analysis?
The great thing about that conversion is that due to the reciprocal relationship the same conversion formula works both ways, so you don't have the risk of converting the wrong way.
stkdump··on How large is that number in the Law of Large Numbers?
I agree that the point about the 'confused scientist' is important, even if that itself is not stated clearly enough. Here is my own reading:

Imagine that a scientist is making experiments of the form: Does observable variable A correlate with observable variable B? Now imagine that there are billions of observable variables and almost all of them are not correlated. And imagine that there is no better way to come up with plausible correlations to test than randomly picking variables. Then it will take a very long time and a very large number of experiments to find a pair that is truly correlated. It will be inevitable that most positive results are bogus.

stkdump··on Searx is no longer maintained
I always thought that a capital X in the middle or end of word would be the greek letter Chi, which is pronounced like ch. So just "search". Problem with that of course is that nobody knows what you are talking about, because it looses all uniqueness from its name, which is why I never actually do it.
stkdump··on Why Socialism? (1949)
Interestingly though, the extent to which big corporations outcompete small business is different in different economies. For example in Europe a much larger part of the economy is driven by small/medium business than in America.
stkdump··on RFC 3339 vs. ISO 8601
JS date format pretty much lives at the intersection of them, afaict, so it should be the perfect choice for interoperability. Also, I gather it makes working with dates simpler if you can rely on a less variable format.
stkdump··on DOS/4GW made Windows 95 game compatibility easier, but with higher stakes
The article is written with the assumption that various intricate historical technical facts are known to the reader and others aren't (hence they are explained). But still it fit my knowledge profile perfectly as these assumptions were exactly true for me.
stkdump··on Paper and bamboo straws contain PFAS chemicals more often than plastic straws do
Also a colder drink burns more calories heating it up to body temp...
stkdump··on Understanding Automatic Differentiation in 30 lines of Python
The variant of auto differentiation I know doesn't build up a graph of operations. Instead it calculates the corresponding value on the fly.
stkdump··on Transcoding Latin 1 strings to UTF-8 strings at 12 GB/s using AVX-512
It's unlikely that this makes anyone's life better. It is more a curiosity and maybe a teachable thing on how to do SIMD. I would venture the guess that there are very few workloads that require this conversion for more than a few KB, and over time as the world migrates to Unicode it will be less and less.
stkdump··on I found an IT job thanks to this blog
I am running 2 Raspberry Pis 24/7 for many years. Never had a micro SD fail.
stkdump··on A mathematically correct way to tie your shoes
I thought it is the explanation of how to tie shoes without wasting time: https://www.youtube.com/watch?v=XPIgR89jv3Q
← PreviousPage 7 of 22Next →