Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zgs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
121.
▲
by
zgs
6y ago
Irrational numbers cannot be finite almost by definition.
122.
▲
by
zgs
6y ago
Out of a desire to adhere to the Peter Principle.
123.
▲
by
zgs
6y ago
The crazy part is that Lua accepts "array[0]" just fine and it works exactly as expected. This is a non-issue in Lua but many people cite it as a problem.
124.
▲
by
zgs
6y ago
A walk like Dijkstra's algorithm. If an edge ever leads back to a visited node, there is a cycle. I'm pretty sure this could be done in linear time -- no recursion required.
125.
▲
by
zgs
6y ago
Why not the concise version? for(p=NULL,q=head; q!=entry;p=q,q=q->next); *(p?&p->next:&head) = q->next;
126.
▲
by
zgs
6y ago
I've seen the "better" version a few times before. I wrote something equivalent from first principles. It is NOT better. It is much more difficult to understand. Software engineering is about making the code intelligible f