Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
oshiar53-0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
oshiar53-0
5y ago
In Linux, the system call number is used as an index into an array of function pointers. Making it a GUID won't really help with table lookup performance -- O(1) random access lookup versus O(log n) binary search.
62.
▲
by
oshiar53-0
5y ago
You might find the Exokernel approach interesting. https://en.wikipedia.org/wiki/Exokernel
63.
▲
by
oshiar53-0
5y ago
You can use the "grafting" feature to emulate rewriting commit parents (but not true rewrite--as in the object itself is not actually modified and some tools do not respect it), so maybe give it a shot
64.
▲
by
oshiar53-0
5y ago
I know it's oversimplified, but as a poor man's explanation I couldn't really think of a better way to articulate it at the moment
65.
▲
by
oshiar53-0
5y ago
You can basically think of call/cc as subroutine + return/throw (break out of control structures), and delimited continuations as yield + next/send in Python. Of course this explanation is heavily simplified.
66.
▲
by
oshiar53-0
5y ago
The real issue here is DRM and nonstandard/undocumented* platform interface (e.g. fixed attestation keys and tamper-protected chips preventing efficient RE work). Even if they manage to comply, competitors (even free software options)
67.
▲
by
oshiar53-0
5y ago
I believe the standard practice is: // file.h #ifndef FILE_DECLSPEC #define FILE_DECLSPEC inline #endif FILE_DECLSPEC int add_one(int x) { return x + 1; } // file.c #define FIL
68.
▲
by
oshiar53-0
5y ago
The simplest setup route: initdb -D db pg_ctl -D db start
69.
▲
by
oshiar53-0
5y ago
PYTHON3 = 8259816920615.111
70.
▲
by
oshiar53-0
5y ago
IMO you can still be explicit about field offsets by writing the struct in a usual way, and using static assertions to ensure offsets match the intended layout.
71.
▲
by
oshiar53-0
5y ago
Yes, and also glob expansion: msg="Configured search pattern: /usr/*" echo $msg # Configured search pattern: /usr/bin /usr/games /usr/lib /usr/lib64 ...
72.
▲
by
oshiar53-0
5y ago
> read() with size 1 FYI shells do this when reading line-by-line from non-seekable streams (e.g. pipes). It's not really feasible to do buffer I/O when you have subprocesses around, and you can't just ungetc(3) into arbit
73.
▲
by
oshiar53-0
5y ago
I personally find it weird to treat any output in stderr as an error condition. It is very common in Unix world to use stderr not only for error messages but also general mundane runtime logs and progress indicator messages. Moreover, progr
74.
▲
by
oshiar53-0
5y ago
On the contrary, printing the easter egg to stdout would have made it be recognized as part of the legitimate output. Here, "gimme gimme gimme" is not a valid manpath at all. This might have led to a even more subtle issue that
75.
▲
by
oshiar53-0
5y ago
> I thought my customers needed one thing (a fancy database), when they actually needed something entirely different (importing and exporting from Excel sheets). I made a rough prototype of the software as a first pass, with no backend