Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
teo_zero
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
691.
▲
by
teo_zero
3y ago
You must be kidding. Striking through the text is ridiculously easy.
692.
▲
by
teo_zero
3y ago
I wonder how much the author has traveled abroad, because when TFA mentions "the world", I don't recognize what I see here where I live: I've never found a pocorn button, for example, or moisture sensors, not even in the
693.
▲
by
teo_zero
3y ago
Market saturation is clearly stated or hinted at.
694.
▲
by
teo_zero
3y ago
Are those banks the same that failed to recognize what a bad idea it was to bet on sub-prime loans before 2009?
695.
▲
by
teo_zero
3y ago
If I understood it correctly, the snippet in TFA injects a return as well, so by the time you give the second look, the commands had already been executed. In a following snippet, the terminal scrolls 100 lines and prints no prompt, so a us
696.
▲
by
teo_zero
3y ago
Correct
697.
▲
by
teo_zero
3y ago
No plugin for Vim?!
698.
▲
by
teo_zero
3y ago
It's not that simple! To begin with, sizeof has two syntaxes: the first, which is the one you seem to refer to, is simply sizeof expression where expression involves variables and constants, not types. The second is sizeof (
699.
▲
by
teo_zero
3y ago
But goto is a statement. What TFA advocates for is 1) an expression that can be used whenever expressions are expected, in particular inside a .case(), and then 2) a bit of syntactic sugar to abbreviate the verbose phrase .case(:else:breake
700.
▲
by
teo_zero
3y ago
I find this promising. There are some weak points to highlight (not to criticize, but to help development). What I don't like is that there are more ways to declare what a name means. Variables: var x = ... int x = ... And eve
701.
▲
by
teo_zero
3y ago
I'm one of those who would complain. I often write n+1 and n-1 without spaces. And I hate C for preventing space removal from expressions like: *z = *x / *y; addr = mask & &x; x + ++y;
702.
▲
by
teo_zero
3y ago
> sadly * conflicts with infix multiplication. I don't think it does. There's no ambiguity in parsing any expression that uses it in both se se. It does conflict with division, though, because /* starts a comment!
703.
▲
by
teo_zero
3y ago
Replying to myself: it's actually a bad idea because you have to update all indices at each inserted char! Forget about it...
704.
▲
by
teo_zero
3y ago
The trick is to decouple the concept of 'position' in the text, that is independent of the gap, from 'pointer' into the buffer. If you keep track of line beginnings as positions, you can immediately get the pointers:
705.
▲
by
teo_zero
3y ago
I have zero evidence that this is true. My personal experience is that after having fought with the limitations of BASIC, I enjoyed the power of C: pointers, that most students struggle with, were fresh air for me. On the contrary, I was ex
706.
▲
by
teo_zero
3y ago
You surely meant will be removed in C23?
707.
▲
by
teo_zero
3y ago
I understand what the annotation does, and your examples are crystal clear. It's TFA that leaves me unconvinced. It starts off with this function: int do_indexing(int *buf, const size_t bufsize, size_t index) { return buf[index
708.
▲
by
teo_zero
3y ago
I don't get this: why using both the annotation and the boundary checks? Once I annotate the function's parameters, the compiler can safely assume what the annotations state. Of course then it must check that the condition is guar
709.
▲
by
teo_zero
3y ago
Unfortunately laws and rules and even road signs are often written in ambiguous ways. My pet peeve is "a, except b, and c". Does the "and" goes with a or with b? Unambiguous language should use parentheses like maths do.
710.
▲
by
teo_zero
3y ago
Driving both a gasoline car and an EV, I can surely tell you that pedestrians get out of the way when I approach with the former much more often than with the latter. So they are no identical. Of course where I live there's no law-mand
711.
▲
by
teo_zero
3y ago
If alloc() changes .beg, how do you free (release to the OS, not mark as unused) the whole arena when it's not needed anymore? Wouldn't changing .end be better, so that you can implement a destroyarena(a) which calls free(a.beg)?
712.
▲
by
teo_zero
3y ago
Ironically, Nutella is not French at all.
713.
▲
by
teo_zero
3y ago
> the median food eaten in France is not fresh baguettes and pate It is. Fresh food every day is the norm, not an exception.
714.
▲
by
teo_zero
3y ago
Interesting! Just for fun I tried to list all binary operators to check which comply with this rule. These symmetric symbols represent symmetric operators in one or more widespread languages (C-like, Basic, etc.), so they're OK: +
715.
▲
by
teo_zero
3y ago
No, Lego does not say it won't use recycled plastic, it won't use this specific recycled plastic, i.e. recycled PET from water bottles, as it was investigating. It is still committed to research alternative recycled plastics optio
716.
▲
by
teo_zero
3y ago
I've never understood the love for tabs. They stop you from seeing two terminals simultaneously. I mean, we invented windows exactly for that, didn't we?
717.
▲
by
teo_zero
3y ago
Besides, not all dates must be corrected. This one for example is true in whichever hemisphere you live: > On June 21 or so every year, Earth’s North Pole reaches its greatest tilt toward the sun.
718.
▲
by
teo_zero
3y ago
My method doesn't require any additional bits for the e.p. and is compatible with all the other techniques listed in TFA. Using own king's position loses the info of the file. Iff you guarantee that the pawns are listed in order,
719.
▲
by
teo_zero
3y ago
The problem is that the encoding of a position by the previous moves is not unique. For example, 1.a2-a3,a7-a6; 2.h2-h3 represents the same position as 1.h2-h3,a7-a6; 2.a2-a3... Chess engines need to remember evaluated positions to avoid re
720.
▲
by
teo_zero
3y ago
> In the case of en passant we know exactly where the pawn would be, and while we can use the back row, I haven't quite figured out how to use this to encode reliably. If a white pawn in x4 (for x between a and h) can be captured en
More ›