Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ufo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
691.
▲
by
ufo
5y ago
It can be simpler to not make a finite state machine. Instead, try the different alternatives one by one, the longest one first. Instead of if (next == '>') { advance() if (next == '=') {
692.
▲
by
ufo
5y ago
I also use it to stream videos, not just for downloading. I can watch using a native video player (such as mpv) instead of the web interface. More control over the playback speed and less buffering when I pause or fast forward. Very useful
693.
▲
by
ufo
5y ago
I have to confess that this EWD on 0-1 indexing is one of my pet peeves. Whenever the topic comes up, someone will invariably link to it uncritically, even though Djikstra's argument is biased in favor of 0-based indexing. For example,
694.
▲
by
ufo
5y ago
Thanks for investigating that! An accumulator is when we add an extra parameter to hold the "loop variable", like this: bool doit(int n, bool acc) { if (n == 0) return acc; else return doit(n-1, !acc);
695.
▲
by
ufo
5y ago
I'm very curious how it optimizes that recursive version at the end, because it is not tail recursive. Does anyone know? Perhaps it becomes tail recursive after one round of inlining?
696.
▲
by
ufo
5y ago
It's not the only place where this terminology confuses people. Another one is "register-based virtual machine", in the context of interpreters. In that case the registers belong to the VM and are actually stored in stack me
697.
▲
by
ufo
5y ago
I'm convinced that I'll eventually need a name for this inevitability. Rachel's Law of Root Exploits?
698.
▲
by
ufo
5y ago
The C standard doesn't mandate tail-call optimization, but at least GCC and Clang are pretty good at doing it (-foptimize-sibling-calls, which is turned on with -O2)
699.
▲
by
ufo
5y ago
The arithmetic if might be one of the best examples of how structured programming has become the new standard. In 1960, it was the only way to do "if" in the most popular programming language that existed at the time. Today, I bet
700.
▲
by
ufo
5y ago
The problem is that it is cheaper to produce hydrogen using fossil fuels, instead of using clean energy + eletrolysis. https://en.wikipedia.org/wiki/Hydrogen_production > As of 2020, the majority of hydrogen (∼95%)
701.
▲
by
ufo
5y ago
It might have been worthwhile to include a discussion on how to safely escape the shell strings, in case there is no API that receives a list of arguments. On Unix, it is not very intuitive because you cannot use backslash inside a single q
702.
▲
by
ufo
5y ago
Like the parent poster, when I read the article I assumed that there was no conceivable reason to ever use this feature in a real C program. Let me just say that I'm pleasantly surprised to be proven wrong!
703.
▲
by
ufo
5y ago
Sometimes I with that intro to compilers books placed a bigger emphasis on recursive descent. Recursive descent works anywhere, without dependencies to external tools such as Bison or ANTLR. I hope that this book marks the start of a trend.
704.
▲
by
ufo
5y ago
It certainly is confusing. I remember that someone once made a video with the flipped map and most of the comments were about how weird it appeared: https://www.reddit.com/r/DotA2/comments/5rmbd3/ Howeve
705.
▲
by
ufo
5y ago
Nevertheless, I think we can all agree that the olympics should have picked a less confusing acronym for the Russian athletes.
706.
▲
by
ufo
5y ago
One funny example of this is that thyroids are described as being butterfly shaped. Maybe endrocrinologists need to talk more with the entomologists. :)
707.
▲
by
ufo
5y ago
The method also works with other accidic drinks, such as lemonade.
708.
▲
by
ufo
5y ago
I think the parent posted was referring to also uploading a preprint of the paper to your website, in addition to submitting it to a prestigeous journal.
709.
▲
by
ufo
5y ago
I'll take this chance to ask a fork bomb question I always had: on Linux, is there a way to stop a fork bomb once it gets going, other than turning off the power?
710.
▲
by
ufo
5y ago
On Github the workflow we use for this is rebase in the command line and then press the "Create a merge commit" button in the web UI.
711.
▲
by
ufo
5y ago
In my organization we kind of do this. We use one merge commit per pull request, without squashing. However, we also rebase before merging, which results in a commit graph that looks like a cactus: o-o-o o-o o-o-o /
712.
▲
by
ufo
5y ago
One small thing I prefer about neovim is that the default settings are better. For example, syntax highlighting is enabled. https://neovim.io/doc/user/vim_diff.html#vim-differences
713.
▲
by
ufo
5y ago
I don't see a problem with the information being available. But in my opinion it shouldn't be in the headline. IMO, it would be better if the headline just said that the vaccine is safe and effective.
714.
▲
by
ufo
5y ago
I'd say the opposite: maybe the news reports should have less detail. The efficacy percentages of different vaccines mean different things but the way they have been publicized has lead many people to think one vaccine is better than t
715.
▲
by
ufo
5y ago
Not at all! Bitcoin is not just inefficient, it is purposefully inefficient on a colossal scale. By design, all the energy is turned into waste heat.
716.
▲
by
ufo
5y ago
By the way, I recommend using `push --force-with-lease `instead of `push --force`. This way it doesn't destroy the remote changes if someone else pushed while you weren't looking.
717.
▲
Pfizer’s race to produce the world’s biggest supply of Covid vaccine
(washingtonpost.com)
1 points
by
ufo
5y ago
|
0 comments
718.
▲
by
ufo
5y ago
One time, I almost accidentally deleted my files because I typoed rm instead of rg. Was saved by the -i flag... Since then, I've been using "alias gr=rg"
719.
▲
by
ufo
5y ago
Does anyone know how EasyList normally deals with old rules? Is there a process to identify and remove stale rules?
720.
▲
by
ufo
5y ago
Here in Brazil there have been numerous reports of people getting sick from ivermectin overdose, including people needing liver transplants. When ivermectin is used for it's original purpose, the treatment is usually a one-time dose. H
More ›