HNHacker News
TopNewBestAskShowJobs

3PS

597 karma · joined August 8, 2018

P-zombies must be exactly like us in all physical respects. Which means they must have one very important thing in common with us: they are utterly obsessed with qualia.
submissionscomments
3PS··on A slightly longer Lean 4 proof tour
The original tweeter made a follow up tweet clarifying that a_n should indeed be non-increasing.

https://twitter.com/damekdavis/status/1730984627030905209?t=...

3PS··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
Tbh I've always just typed -t followed by something that feels intuitive and it's always worked. Never really bothered looking in help until I made the above comment.
3PS··on Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
If you're a fan of the -g flag to ripgrep then I also recommend checking out the -t flag, short for --type, which lets you search specific file types. You can see the full list with `rg --type-list`. For example, you could just search .cs files with `rg -tcs`.

This flag is especially convenient if you want to search e.g. .yml and .yaml in one go, or .c and .h in one go, etc.

3PS··on Fish – Update on the Rust port
As someone who daily drives fish on ~4 different operating systems and loves it, I've been really excited about this rewrite and blown away by how fast it's been progressing given the size and complexity of the codebase. It will also somewhat lower the barrier to contributing for a lot of people, including myself.

Another thing I'm very excited about, which has received less attention, is the planned future fish rewrite to use UTF-8 instead of wchar_t (typically UTF-16). UCS2 and UTF-16 have been a plague on software and fortunately Rust makes working with UTF-8 a breeze.

3PS··on The Flix Programming Language
I absolutely love the idea of embedding Prolog-esque rules inside a full traditional programming language for solving specific problems. The region-based local mutation is also an incredible idea that would really solve one of my core pain points with immutable languages like Haskell and Elixir.

Also this part made me let out an audible "wow":

> We can exploit purity reflection to selectively use lazy or parallel evaluation inside a library without changing the semantics from the point-of-view of the clients.

Will definitely keep an eye on this language! The syntax seems a little odd (inferring type parameters for functions?) but I'm sure I could get used to it.

3PS··on Show HN: Open-source tool for creating courses like Duolingo
Disclaimer: I work for Duolingo, all opinions are my own and not those of my employer, etc.

Part of the reason that content is slower to produce now is just that the standards are much higher. Internally we draw a distinction between the old volunteer-contributed content and the new content which is aligned to CEFR guidelines for how languages should actually be taught. Aligning content like this is not only more expensive but also requires more coordination and oversight from domain experts compared to previous methods.

3PS··on Pope tempted by Python. Signs off on coding scheme for kids
I know I'm taking a joke comment WAY too seriously, but... that "else" branch is unreachable, right?
3PS··on On not noticing rather too many things
This really rings true to my early experiences with driving. As a novice, every moment driving was a sensory overload. Check the rearview mirror! Am I going at the right speed? Is anyone overtaking me? Am I staying centered in the lane? How long has that light been green? Plus all the little mechanics of actually operating a motor vehicle, actually moving your hands and feet the right amounts.

Now, a lot of getting better at driving was just building up muscle memory and good habits, yes, but I think a lot of it was really improving my selective perception and being able to quickly filter out the irrelevant to focus on exactly what was needed to drive safely and effectively.

I also play a lot of fighting games in my spare time, like Guilty Gear, and I feel this there as well. Pick up a new fighting game - especially if it's your first one - and quickly get overwhelmed by all of the things happening on the screen and all of the precise button presses you're expected to make. But then over time, you filter out all the noise and just track the minimum information - the positions of characters, the strategies, the higher-level gestalts at play - and end up spending much less cognitive effort for more effect.

3PS··on WordPress blogs can now be followed on Mastodon and other federated platforms
> The plugin works with the following tested federated platforms, but there may be more that it works with as well:

> Mastodon

> Pleroma/Akkoma

> friendica

> Hubzilla

> Pixelfed

> Socialhome

> Misskey

> Firefish (rebrand of Calckey)

Surprising that they mention so many different federated platforms - most of which I haven't heard of - but not Lemmy/kbin. I wonder if it's just a less straightforward integration or if it didn't occur to them to try those.

3PS··on What it takes to pass a file path to a Windows API in C++
Unicode Standard section 3.4:

> Unless specified otherwise for clarity, in the text of the Unicode Standard the term character alone designates an encoded character.

Reading is free. I even gave you the section number.

> A single abstract character may also be represented by a sequence of code points

An "abstract character" is not the same thing as a character. The whole point of my comment was that the general word "character" is a general class of definitions but means nothing by itself. Much like the word "number" - you will notice that mathematicians define many kinds of numbers, but never the word itself.

> Human language and writing are the defining inventions of the known universe. Unicode just happens to be one way of representing them. Referring to them as "silly and made up" in comparison to Unicode is nothing short of extreme mental illness.

All words are made up. I'm sorry you had to find out this way.

3PS··on What it takes to pass a file path to a Windows API in C++
> Characters can consist of multiple code points.

I enjoy being "that guy", and so, to be unfathomably pedantic, I will point out that the Unicode standard actually uses the word "character" to refer to _encoded characters_, i.e. the mapping from a code point to an abstract character [0]. So 1 code point = 1 character for Unicode. Of course, in real life, character is a silly made-up word that means whatever you think it means and using it to refer to an extended grapheme cluster or glyph is probably closer to how people really think of them anyway.

[0]: See section 3.4 of https://www.unicode.org/versions/Unicode15.0.0/UnicodeStanda...

3PS··on Never trust a programmer who says they know C++
> Write a program which accepts a letter and display it in uppercase

That task is a lot harder than it sounds, given that casing is locale-specific. In a Turkish locale for example, I would expect a lowercase "i" to be converted to U+0130 "İ" instead of "I" like in en-US.

And then there's the whole ambiguity around the word "letter". Is a letter a single code point, or a grapheme cluster? What if someone passes in an emoji? With multiple zero-width joiners? Better make sure your dependencies are up to date so you know what's a single letter and what's too many...

3PS··on Revealing example of self-attention, the building block of transformer AI models
> Finally, we have a third projection matrix, V, which maps x_j -> v_j. The v_j are d_v-dimensional vectors (doesn't have to equal d_k, and again something you arbitrarily choose). These represent the values that the NN would like to pass on from item j to any other item which decides it "likes" the answer of item j.

> So, to compute the new information to add to item i, we take the weighted sum of the values v_j that item i liked

I don't get this part. If the v_k are d_v dimensional vectors, and if the input items i are all d_f dimensional vectors, then how are you "adding" these values back to the inputs when d_f != d_v?

The linked script doesn't seem to do any adding like this - instead, they take the output values and pass them through a linear layer, presumably throwing away the inputs. But your comment hints at the existence of a more residual sort of approach.

3PS··on Bing: “I will not harm you unless you harm me first”
There is an excellent refutation of the Chinese room argument that goes like this:

The only reason the setup described in the Chinese room argument doesn't feel like consciousness is because it is inherently something with exponential time and/or space complexity. If you could find a way to consistently understand and respond to sentences in Chinese using only polynomial time and space, then that implies real intelligence. In other words, the P/NP distinction is precisely the distinction underlying consciousness.

For more, see:

https://www.scottaaronson.com/papers/philos.pdf

3PS··on The Restaurant Industry’s Worst Idea: QR Code Menus
> First of, on Android, the camera doesn't magically scan the QR code.

Out of curiosity, what phones do you and your family use? Because my Android phone (a Pixel 4a) has never had any issues scanning QR codes by just pointing the camera at them.

3PS··on RCE via GitHub import
> "hash" in this context means what other languages would call a hash map

Interesting. The only other time I've seen this term used for a hash map is in the context of Redis hashes [0], which confused me to no end when I first encountered them for the same reason. Given that Redis itself is written in C, I wonder where the term originated.

[0] https://redis.io/docs/data-types/hashes/

3PS··on Penguin of the Year
Garuda Linux [0] uses fish by default iirc.

[0] https://garudalinux.org/

3PS··on An intriguing discovery of Computer Science: The Y combinator [video]
> if there is a function p : A -> (A -> B) that has a left-inverse, i.e., e : (A -> B) -> A with p o e = id_(A -> B) then B has a fixed point combinator

I think you meant to write "right inverse" here.

Agreed that Lawvere's theorem is very cool. It helps that Cartesian closed categories are basically just categories where you can do typed lambda calculus, so the underlying link is already very close.

3PS··on Hacker News Guidelines
Here's the oldest snapshot, from 2014. Diffing is left as an exercise for the reader.

https://web.archive.org/web/20140702092610/https://news.ycom...

3PS··on A surprisingly hard CS problem: sums of square roots (2018)
This doesn't work. Even if you assume sqrt(a) + sqrt(b) > sqrt(c) + sqrt(d), that doesn't necessarily mean that log(sqrt(a)) + log(sqrt(b)) > log(sqrt(c)) + log(sqrt(d)). For example, let a = 1, b = 100, c = 25, d = 25. Then

> sqrt(1) + sqrt(100)

11.0

> sqrt(25) + sqrt(25)

10.0

> log(sqrt(1)) + log(sqrt(100))

2.302585092994046

> log(sqrt(25)) + log(sqrt(25))

3.2188758248682006

3PS··on Why NFTs are bad: the long version
To finish the quote that you truncated...

> The idea of a single entity holding 51% of all of a circulating currency is completely at odds with the notion of a currency being "embedded enough in the economy" that people won't just dump the currency immediately and crash its exchange rate.

Certainly, 51% attacks are very viable against nascent or unpopular cryptocurrencies. This includes Bitcoin in 2014. But the author was specifically suggesting that a 51% attack could be carried out against a cryptocurrency that is firmly entrenched in the global economy. I find this very implausible.

3PS··on Why NFTs are bad: the long version
Disclaimer: I don't really have a horse in this race, and I think most NTFs as currently bought and sold are scams. But I do strongly disagree with much of this article, and I think the underlying technology is pretty sound.

> An attacker with 51% power could invalidate all new transactions for other users, and could for example slowly start limiting the transactions of other users or companies using the currency (targeted or otherwise) unless they paid a certain amount to the 51% owner. Once a currency is embedded enough in the economy, it will not be a feasible option for people to simply abandon their money and start over (and you won’t be able to sell it in such a situation). Like all such situations, an attacker would use a form of salami tactics, slowly taking a bigger and bigger cut from other people’s money via transactions whilst doing it slowly enough to stop them from moving away from the platform. Even in the event that the cryptocurrency later dies, the attacker will easily end up with more real-world currency than they started with.

The idea of a single entity holding 51% of all of a circulating currency is completely at odds with the notion of a currency being "embedded enough in the economy" that people won't just dump the currency immediately and crash its exchange rate. Even the richest individuals alive have nowhere near 5%, never mind 51% of all circulating dollars.

The section on Byzantine fault tolerance is particularly baffling.

> Consider the aeroplane again. What motive does the sensor have to malfunction? None. As a result, we can be relatively sure that its failure would be down to one of three main causes:

> Software failure

> Hardware failure

> Human inteference (e.g. a soldier tampering with sensors on an enemy warplane)

> Byzantine fault tolerance is excellent at protecting against the first two possibilities in many systems. It is much weaker against the last possibility, because the human who sabotages the plane has a motive for the sensors to fail in a specific way which will breach the maximum fault tolerance of the system. Provided the human or humans can tamper with enough of the system, the fault tolerance breaks.

This is the exact opposite of how Byzantine fault tolerance is defined. The entire point of Byzantine fault tolerance is that some of your nodes may not just be faulty, but actively adversarial. In the original Byzantine generals problem, some of the generals are active traitors.

These issues made it hard for me to take the rest of the article seriously, but the author does raise good points with regard to how users are generally the weakest link in a given security model. If someone tricks you into sharing your Bitcoin credentials with them and steals everything from your wallet, good luck getting any kind of regulatory authority to recover your money. This is one of the main issues of cryptocurrencies when compared to centralized currencies - but that assumes you want to trust the central regulatory authority to begin with.

Personally, while I think NFTs as a concept are fairly useless as currently applied (buying and selling URIs of random images that you may or may not actually own), they're not an inherently bad idea. For example, shares of stock in a virtual company could be minted as tradeable tokens, and then dividends could be paid out periodically to whichever accounts currently own tokens. In this case the entire concept of ownership is embedded into the token itself, so you don't need to rely on any external resources.

3PS··on New math book rescues landmark topology proof
It's not out of the question for research-level math to be formalized in proof assistants. Most notably, a landmark paper by Peter Scholze (a Fields medalist) was, at his request, formalized in Lean. Or at least, the important part was formalized in about 6 months. See [1] for the post where Scholze asks for help in formalizing the proof and explains why he thinks it's important - in this case it was a very gnarly proof of a theorem that could hopefully be used as a black box by other mathematicians. See [2] for Scholze's thoughts after the project succeeded, 6 months later.

[1] https://xenaproject.wordpress.com/2020/12/05/liquid-tensor-e...

[2] https://xenaproject.wordpress.com/2021/06/05/half-a-year-of-...

3PS··on B-tree Path Hints
If anything, the incredibly convoluted amortized analysis that goes into proving bounds on the cost of splay tree operations is perhaps more iconic than the actual splay tree data structure.
3PS··on Microsoft's Introduction to Rust Video Course
There aren't any mature solutions yet, but you can find a list of GUI frameworks here:

http://www.areweguiyet.com/

3PS··on Microsoft Retires Azure Blockchain

    cat dict.txt | rg "ium$" | uniq | sed -z "s/\n/, /g"
Who knows? Perhaps they thought it would be spelled more similarly to aluminium, ammonium, auditorium, calcium, compendium, cranium, delirium, emporium, encomium, equilibrium, eulogium, exordium, geranium, gymnasium, medium, millennium, odium, omnium, opium, opprobrium, pandemonium, potassium, premium, radium, sodium, tedium, uranium...
3PS··on Solved by 1440p HiDPI: MacBook Pro 16“ is hot and noisy with an external monitor
WSL2 is quite a bit better than WSL1 imo, speaking as someone who has used both a fair bit. Especially now that GPU, GUI, and audio support are available on Insiders. Some tasks still don't work very well, like connecting to external devices or anything that needs systemd (like installing snaps), but by and large I've found it harder and harder to justify dual booting Linux with WSL2 available.
3PS··on Discord ends deal talks with Microsoft
Personally, I wish the desktop client was a bit more lightweight. I understand why they went with Electron, and I don't think they could have afforded their speed of iterated development as a small company otherwise, but I still wish their app was a bit lighter on my laptop. I'm especially disappointed that cordless [1], a very usable third-party terminal-based client for Discord, was banned due to a ToS violation.

Secondly, I wish there was better support for E2E encryption, even just in direct messages. I wouldn't even mind it as a paid feature.

3PS··on Computational Algebraic Topology, lecture notes [pdf]
Just briefly skimming over your post, a quick correction to the Continuity section:

> Definition (Homomorphism) There is a homomorphism (i.e. an equivalence relation) between two topological spaces if there exists a function f:X→Y, where X and Y are topological spaces (X,τX) and (Y,τY) with the following properties

This should be "homeomorphism", not "homomorphism". A homomorphism is a structure-preserving map, like a continuous function (in the context of topological spaces) or a linear map (in the context of vector spaces). Homomorphisms are very much one-directional. Homeomorphisms, on the other hand, are specifically equivalences between topological spaces, and are defined as continuous functions with continuous inverses.

Edit: finished reading it. I'm impressed by how much you cover in such a short space. Overall it looks good, so thanks for taking the time to write it. Some of these ideas are at a pretty high level of abstractness, so I sympathize with anyone who struggles to get any kind of intuition for them at a first go.

3PS··on How does your programming language handle “minus zero” (-0.0)?
> The only way to have zero is if it's some specially handled value like NaN. Which IEEE doesn't do and that's entirely understandable.

Wait what? Am I missing something? 0 is absolutely part of the IEEE 754 spec thanks to the existence of denormalized floating point numbers. So I would certainly call it a "specially handled value", in a sense. The existence of +/- 0 has more to do with the implementation of the leading sign bit.

← PreviousPage 2 of 5Next →