Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 4y ago · link · parent

It hasn't. OP's title is taken from the <title> tag of the page (i.e. the thing displayed in the browser title bar). For some reason, newspapers have a habit of displaying one title on the page, and another in the browser chrome.

comment 4y ago · link · parent

I use NetNewsWire to subscribe to blogs, YT channels, subreddits, newspapers, podcasts... basically anything I follow that has an RSS channel (if it doesn't, I'm almost surely not going to follow it).

I really like the Ars Technica model, where they have short snippets available in the public RSS feeds, but also provide feeds with full articles for paying subscribers. I don't like to leave the comfort of my reader for the discomfort of a web browser (they're all terrible).

comment 4y ago · link · parent

How economically accessible is interstate travel in US for average citizens?

comment 4y ago · link · parent

There also exist guidelines that you should eat something every 3 hours at least. Conclusion: you mustn't swim. :)

comment 4y ago · link · parent

My personal worst experience with captchas is Vultr: every time I go to their page from my Linux desktop, I need to solve a recaptcha. And if I don't do it within ~3 seconds, the page reloads and I need to start over again. I bet there are more robots than humans who can solve it in such a short time. You need to read the instructions, pattern match 9 photos... twice... in 3 seconds. It doesn't happen when I visit the Vultr's page from my iPhone though. When I get a spare moment, I will move my VPS to another, less obnoxious provider (maybe even Amazon).

comment 4y ago · link · parent

> machine-code binaries aren’t a programming language

Machine-code binaries aren't (they are programs), but ISA of a CPU is.

I'd plug in a requirement of Turing-completeness for the source and destination language, and at that point the "semantics-preserving" variant makes perfect sense to me. Although canonically textbooks and Wikipedia don't seem to require that, so I'm fine accepting a definition not requiring Turing-completeness, just preservation of semantics.

comment 4y ago · link · parent

> "Don't swim for 30 minutes after eating or you will cramp"

That's a new one for me, but I'm from Europe. I spent my childhood on rivers and lakes, rapidly alternating between food and swimming (and other things). No cramps due to food (scarcely any at all to be honest). I've had a lot more cramps in swimming pools than in natural water, now that I think about it.

> "You should be drinking 8 glasses of water a day"

I could believe that. I used to drink ~4 glasses a day, but it made me feel like a lizard (without really realizing the cause at the time). Now I drink more than 8 and feel much better.

comment 4y ago · link · parent

> The medium of YouTube is not conducive to lengthy expositions

I've actually found a couple channels on YT specialising in lengthy reviews/essays, which I find very good. Off the top of my head:

1. Whitelight[1] - game reviews/critiques/analyses. Particularly worthy of note are the Assassin's Creed Unity[2] (1.5h), Batman Arkham City[3] (3h 10min) and Watch Dogs[4] (1h 15min) reviews.

2. MauLer[5] - critiques of mostly Star Wars, but sometimes also other mainstream films. The ongoing series of TFA critiques has 4 parts so far (there is going to be at least 6 total), each part taking anywhere between 2 and 4 hours.

I also feel that I'm forgetting some, which I don't watch regularly, but periodically am reminded about their existence and then after a long break spend several days watching, to then forget about them again.

But the channels I listed aren't fringe. Quite the contrary, they're quite popular. I think it's also interesting that one of, if not the most popular Vsauce video is the one about the Banach-Tarski paradox[6], which is almost 30 minutes long. His other videos also show this trend, where the long-form ones seem to get more views in general.

And those are just essays/reviews/etc. There is a whole genre of podcasts on youtube dedicated to 3-4h in-depth interviews. Everybody knows a whole bunch of them, therefore I don't even need to list any examples here to support that.

So it seems that YouTube is a pretty good place for long-form in-depth exploration of whatever topic (as long as you don't say "fuck", "murder" or show a human body).

[1]: <https://www.youtube.com/c/Whitelight>

[2]: <https://www.youtube.com/watch?v=Z5dOporS8IY>

[3]: <https://www.youtube.com/watch?v=l3U1TL5yBm4>

[4]: <https://www.youtube.com/watch?v=Kk2G6zc5pKo>

[5]: <https://www.youtube.com/c/MauLerYoutube>

[6]: <https://www.youtube.com/watch?v=s86-Z-CbaHA>

comment 4y ago · link · parent

Explanation based on my familiarity with Koka:

This expression matches on the effect flip() and handles it with the code on the right hand side of -> which becomes the value of the function invoking the effect. In this case the handler runs the continuation for both possible values (resume true and resume false, i.e. the function was called once, but it will return twice, with true and false substituted in the place of flip() in the place which used this effect) and returns their mean as the average.

I.e. each time calculation calls flip(), the effect handler will continue the function for both true and false and then take the mean of those two results. Comments explain that flip() should simulate a coin flip, which generally gives equal probability (1/2) to true and false. Each flip() in calculation was simulated with equal number of true and false values, so it fits the expected distribution. Each time taking the mean of those values is just an expansion of the integral calculating the expected value, as per definition of expected value.

Note that there is some recursion here. While the flip() handler is executing for the first invokation of flip(), another instance of the handler will execute for second and third invokations (inside resume true). I.e. it calculates the expected value by taking the mean of the expected values of each branch created by a flip. When a branch doesn't have any more flips inside, its expected value is taken to be the constant value that this branch returns.

comment 4y ago · link · parent

> There's a great number of people watching the antilope being eaten, and rooting for the lion.

Ignoring the metaphor and taking it literally: watching nature documentaries, I don't think I've ever rooted for the antelope. I've always been on the side of the big cats (particularly leopards, snow leopards and such)[1]. And reading comments under such videos, seeing most people rooting for the antelope was always disheartening to me, knowing that, if this cat doesn't kill this or another antelope soon, it's going to die. And out of the two I always prefer the cat to survive.

[1]: Will also root for the lynx feeding on a deer, no questions asked. Lynxes are awesome. :)

comment 4y ago · link · parent

I've read this app gives the ability to filter based on religion, but I don't know any details. What are the possible values of this filter? Can I filter out all religions?

comment 4y ago · link · parent

I've just started reading about APL, so maybe I'm wrong, but I think there is one caveat: you need to know which operators are monadic, and which are dyadic, because if op is monadic, then it may be:

  A (op (B (op (C (op D)))))

comment 4y ago · link · parent

In cases when I have a working visual debugger, I agree, it's fun. Without one, it's not fun.

comment 4y ago · link · parent

Agreed.

comment 4y ago · link · parent

If it doesn't happen in prod, you are even more **. Cue password leaks, privilege escalation etc.

comment 4y ago · link · parent

The myth of segmentation faults being hard needs to die. A fault is like an exception in Java (or a panic in Rust for that matter), only generated by hardware. It's the best case scenario for your buggy code. It's when you don't get a segfault, but your buggy code keeps chugging along, that's a problem. If after using an out-of-bounds index into an array I get a segfault instead of a memory corruption, I thank god for his mercy. The alternative of the program just continuing execution is horrible.

comment 4y ago · link · parent

Particularly since the article spends such a big chunk of its text talking about bounds-checks and criticising Blow for being against them, when in fact in his language Jai, as far as I know, bounds-checks are enabled by default, although you can disable them selectively when they are e.g. in hot loops. So it's not any different than say Rust in this regard. It's the strawman of strawmen.

comment 4y ago · link · parent

Stack Exchange works pretty well. There is some moderation on SE, but not much IMO.

comment 4y ago · link · parent

What issues do you have with Preview? Answering this question might make it easier to help you find an alternative.

comment 4y ago · link · parent

> I assume the most form of verification is checking the github account/reputation.

Did you mean to write "the most [used] form"? If so, it's unreliable. If you change your Git settings to use Torvals' email address, on GitHub it will show up as if your commits were made by his account[1].

[1]: <https://dev.to/martiliones/how-i-got-linus-torvalds-in-my-co...>

comment 4y ago · link · parent

PSA: in order to see any numbers on the diagram, you need to hover a bar with the mouse pointer.

Genius design.

comment 4y ago · link · parent

They also slow down compilation.

comment 4y ago · link · parent

To me it seems he doesn't like spending time with toddlers. It's a big jump from here to conclude that he doesn't want to be a parent. Toddlerhood is just a temporary state.

comment 4y ago · link · parent

That buying however much of whatever from a single company can be read as "anti-competitive" reflects more on the market, which relies on a single company for its fundamentals, than the buyer.

To me it seems that the problem is not that Apple bought however much of whatever from TSMC, but rather that TSMC doesn't have competition at the moment. Hopefully that changes.

(I do think HN is a bit trigger-happy with downvotes lately. I don't often get downvoted, but sometimes people who reply to me with a different view do, and so they get grayed out and drop in the comments. I used to try to counter that, but my one vote doesn't work for very long, so I mostly gave up. But it's really annoying.)

comment 4y ago · link · parent

In order to represent your walk vertically in a film, the camera would need to be overhead, directed at the ground (or beneath you, directed upwards). You walk forward from your own perspective, but it's rare from other people's perspectives (and still doesn't matter for horizontal vs vertical, since it's the Z dimension, not X or Y). Using depth to represent motion is a pretty bad idea most of the time, given that it's the dimension where movement is the hardest to notice (again, there are exceptions (precisely when you want the movement in the periphery to be hard to notice, only to make it more noticeable when the thing the moves gets closer (or the opposite))).

If you recorded Lord of the Rings, or Interstellar in portrait orientation, they would be pretty crappy films.

> the stuff I pay attention to when walking is more generally arranged vertically than horizontally.

I don't know what you mean.

Another point: your eyes are organized horizontally, not vertically. You have move horizontal vision than vertical. By filming in vertical orientation you quite simply make things more cramped, quite possible losing the space you could use to put more objects in, or just space out the objects you have in order to make things less messy.

Again, there are artistic reasons to sometimes prefer portrait over landscape, but that doesn't mean it's a good default. Making good films requires being conscious of those things, understanding that they are not arbitrary (therefore left just to which way it's more comfortable for people to hold their phones).

comment 4y ago · link · parent

The reason why landscape is used in film is not analogy, but the fact that humans move a lot horizontally, almost never vertically. Portrait orientation may be good for portrait photos (although landscape is often also very good, or better, depending on the specific case) but not for films. Filming human movement in portrait makes for a claustrophobic feeling, requires the camera to move all the time, and cuts out context (including other people). It has its place, but it's a poor default. I've seen some videos which were recorded from such a long distance that they looked bizarre. The only reason for that distance was the use of portrait orientation, the film wouldn't work without the horizontal context. But it was meant for TikTok, so of course it had to be vertical.

comment 4y ago · link · parent

Is it normal to call a price drop a "crash", even when not talking about stocks? The title and phrases like "DDR4 memory has also suffered price drops" make it sound as if something terrible happened. Or is it just me?

comment 4y ago · link · parent

No problem. I like that you chose to go with POSIX Extended Regexes and FAs instead of going the Perl route.

comment 4y ago · link · parent

> It looks like we can't outdo C nor GNU in this case. Buffering is the secret, and all the overhead incurred by the kernel throttles our memory access, pipes, pv, and redirection is enough to negate 1.5 GiB/s.

On my computer reading from /dev/zero (16.5GiB/s) is still significantly faster than piping yes (7.11GiB/s), so I'd be interested in an exploration of why that is. BPF would probably be useful here. Maybe when I find a moment, I'll write a follow-up, doing just that... unless someone else does it faster. ;)

comment 4y ago · link · parent

Russ made a different claim though. He wrote that the backtracking approach is O(2^n), where n is the size of the string matched against, while simulating NFA is O(mn)[1] (not O(n) as the article claims), where m is the length of the regex. The article on the other hand claims that backtracking gives you O(2^m):

> This backtracking-based approach works, but it comes with a problem. The number of branches we need to test can exponentially increase with the size of the regex in certain situations, which means that testing all the branches would potentially take forever.

I think that's where it went wrong. And my comment is also subtly wrong in that it implicitly assumed this is right and proceeded from there.

The important part though is that simulating an NFA grows with the regex, while with DFA it doesn't, and you can also find it in Russ's article ("Caching the NFA to build a DFA").

The article's claim that this is what grep and AWK use is also contradicted by Russ. Claim:

> Incidentally, this is the approach used in grep and awk.

Russ:

> Awk, Tcl, GNU grep, and GNU awk build DFAs, either precomputing them or using the on-the-fly construction described in the next section.

[1]: Most sources claim that it's actually O(nm^2), where m is the number of states of NFA (which is linear to length of regex, so you can treat m as length of regex as well).

1
333435
55