Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
teo_zero
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
631.
▲
by
teo_zero
3y ago
You must be kidding. This thread is full of comments about remapping ESC to Caps Lock and other amenities like that.
632.
▲
by
teo_zero
3y ago
What's wrong with mswin.vim that's shipped with every vim and neovim that you need to reinvent the wheel?
633.
▲
by
teo_zero
3y ago
Saying that VSCode is a modal editor because of the search dialog is like listing cars among USB peripherals because they have a USB port.
634.
▲
by
teo_zero
3y ago
Why "the"? What is so special about this herbal beverage in French, or the adjective meaning hot in Irish? I suspect you are applying just a variation of the same every-name-must-follow-my-arbitrary-rules game. You're trying
635.
▲
by
teo_zero
3y ago
Sure, but you lose the simplicity of accessing items with a[index], literals {1, 2, 3}, and initialization.
636.
▲
by
teo_zero
3y ago
... and arrays that don't decay to pointers. (Which, in my opinion, is C's real million-dollar mistake, not null pointers.) Oh, and less undefined behaviors.
637.
▲
by
teo_zero
3y ago
While I'm a big fan of keeping declarations and implementations as close as possible, I find that the need to explicitly #define STB_SOMETHING_IMPLEMENTATION before including the header somehow spoils the simplicity of the solution. At
638.
▲
by
teo_zero
3y ago
No, this doesn't help at all. It will only stop the header from being parsed twice if it's #included twice in the same .c file, not from being parsed twice if it's #included from two different .c files.
639.
▲
by
teo_zero
3y ago
Because if your program is split into many files (as is the norm for non- trivial projects) and several of these files #include the same header, then the functions defined in such header are instantiated/compiled several times. You end
640.
▲
by
teo_zero
3y ago
But remember that * and + don't short-circuit. This won't work: found = (p != NULL) * (*p ! = 0);
641.
▲
by
teo_zero
3y ago
Sorry, I can't follow your reasoning. Probably I'm missing some basic vocabulary, because I don't appreciate the difference between equivalence and equality. Are we still talking about comparison operators?
642.
▲
by
teo_zero
3y ago
Please note that, despite the misleading title, TFA is about the precedence of bitwise operators & and | with respect to the comparison operators (== and all the others). In particular it was asked to Ritchie why the former are weaker t
643.
▲
by
teo_zero
3y ago
Really? Do you think equivalence should be weaker than && and || so that you would write if ((a==0) && (b==0)) instead of if (a==0 && b==0)
644.
▲
by
teo_zero
3y ago
Just nitpicking: "a+b+c+d" in C is equivalent to "((a+b)+c)+d" not to "a+(b+(c+d))". I otherwise agree with your comment: in most cases, unnecessary parentheses make the code slower to read, just like unnecess
645.
▲
by
teo_zero
3y ago
Thank you for the answer. > if you observe an entry with displacement 5 after already having visited 5 entries you can already conclude you wont find what you are looking for. Exactly. If I have already visited 5 slots without finding wh
646.
▲
by
teo_zero
3y ago
Interesting. I think this is wrong: > As soon as we reach an entry with higher displacement than the thing we're looking for, we can abort the lookup. Isn't it the other way out? Besides, I hope the index size is a power of 2,
647.
▲
by
teo_zero
3y ago
I'm not a native English speaker. Is the wording in the title correct? Doesn't the hyphen suggest that Cohen is the fixer of someone who was previously a / known as Trump?
648.
▲
by
teo_zero
3y ago
The rationale of subject-first is clear. But what about the other rules: correct instead of fix, rather than instead of rename... They seem pretty arbitrary to me.
649.
▲
by
teo_zero
3y ago
I recommend Firefox with zero additional plugins, but configure it to automatically clear the cookies when quitting. You can now click 'accept' to every insisting site, knowing that they will be soon forgotten.
650.
▲
by
teo_zero
3y ago
IF reads dominate writes, and multiple threads read the data concurrently, this approach may win by eliminating the need for locks.
651.
▲
by
teo_zero
3y ago
Much of your setup is purely personal taste, so I wouldn't feel comfortable to comment on it. I'd just suggest you get rid of some old vim cruft: :set complete-=i :set nrformats-=octal For consistency: :noremap Y y$
652.
▲
by
teo_zero
3y ago
Thank you, today I've learned something new. So the easiest answer to the original question (whether a number is even or odd) likely involves &1, not %2. Note taken.
653.
▲
by
teo_zero
3y ago
Can someone explain what's the &-2 method, and why it should be better than &1 ?
654.
▲
by
teo_zero
3y ago
I would argue that code generation is a form of metaprogramming, no opposition here.
655.
▲
by
teo_zero
3y ago
Why perpetrating the mistakes of our venerable predecessors, in the form of automatic fallthrough for switch statements?
656.
▲
by
teo_zero
3y ago
Sorry, but I strongly disagree with your explanation. It seems to categorize languages on the basis of what tools are available or widely used. That's not a property of languages. A language can be designed once and then interpreters
657.
▲
by
teo_zero
3y ago
What makes a language a "scripting" one?
658.
▲
by
teo_zero
3y ago
Not at all, it means independent from each other. Like the x and y coordinates of a point in a plane: you can set one of them to the value you want and it won't affect the other. This only happens when the x and y axes intersect at 90
659.
▲
by
teo_zero
3y ago
I think you're talking about two orthogonal topics. If the fatigue comes from the difference between foreground and background, it's independent of how "pure" the black is. You can have #000 black AND keep a low contrast
660.
▲
by
teo_zero
3y ago
To solve the issue with Ctrl-k Ctrl-u leaving out one char in normal mode, have you considered setting virtualedit=onemore? It's often a sensible option when you want to "unify" the behavior of normal and insert modes (I'
More ›