Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
151.
▲
by
cb321
1y ago
You may well already be aware, but just in case you aren't, your bin-true benchmark mostly measures dynamic loader overhead, not fork-exec (e.g., I got 5.2X faster using a musl-gcc statically linked true vs. glibc dynamic coreutils).
152.
▲
by
cb321
1y ago
My idea is not to submit the generated C any more than you submit C-compiler generated assembly, but to write directly in Nim. The niceness would mostly just be if you wanted to write some complex thing like a filesystem or driver in Nim w
153.
▲
by
cb321
1y ago
While there are several "OS in Nim" projects ( https://github.com/khaledh/fusion is probably the most interesting), this same ability to run bare-metal and generate to C should, in theory, make it possible to
154.
▲
by
cb321
1y ago
Glad you like it! Not sure what separator you would pick between the name(args)=expansion stuff. I could imagine some generic files/modules might have enough or long enough params that people might want to backslash line continue. S
155.
▲
by
cb321
1y ago
Sure! Just compile with nim c --lineDir=on or drop `lineDir=on` in your $HOME/.config/nim/nim.cfg (or per project NimScript .nims or per file foo.nim.cfg or ...) and source-level debugging with gdb on Linux works.. mostly at
156.
▲
by
cb321
1y ago
Our exact context here is not just column numbers, but also about backslash line continuations joined by the C preprocessor. That makes the #line directives emitted refer to columns within a (large) "virtual line assembled by the tool
157.
▲
by
cb321
1y ago
FWIW, https://www.cs.cornell.edu/andru/ Andrew Myers had some patch to gcc to do this back in the late 90s. Anyway, as is so often the case, it's about the whole ecosystem not just of tooling but the ecosystem of
158.
▲
by
cb321
1y ago
I think the #include extension could make vec_vec / vec_list / lst_str type nesting more natural/maybe more general, but maybe just my opinion. :-) I guess ctags-type tools would need updating for the new possible definition
159.
▲
by
cb321
1y ago
While long-def's might be nice, you can even back in ANSI C 89 get rid of the backslash pattern (or need to cc -E and run through GNU indent/whatever) by "flipping the script" and defining whole files "parameterized
160.
▲
by
cb321
1y ago
All true. No real disagreement and I'm often saying "it all depends.." myself. :-) In this case, there is also some vagueness around "random" (predictable to what subsystem when ). I still suspect @kortilla is
161.
▲
by
cb321
1y ago
You seem to misunderstand @andersa's point which I think is well expressed - it doesn't matter if the indices are randomized if the CPU can pre-fetch what they will be. The power of CPU speculative execution to hide latency can b
162.
▲
by
cb321
1y ago
LOL. There was a time when people were excoriated for committing generated object code into version control..
163.
▲
by
cb321
1y ago
Important enough to re-state whenever it arises - once you have 2 or more axes/dimensions, you no longer have a linear ordering. You need to map back to a number line to "compare". This is the motivation or driving force tow
164.
▲
by
cb321
1y ago
Yeppers: https://en.wikipedia.org/wiki/Square_Kilometre_Array In-page search for "data challenges". Pfew, that's a lot of data.
165.
▲
by
cb321
1y ago
You are completely right. It totally "works" now { scare quotes as per your termination comment.. ;-) . I guess xterm terminates in the answer back with whatever the client sends in the request. It's funny how now things b
166.
▲
by
cb321
1y ago
AFAICT, this "number of pixels" (as well as the outside-the-cell pixels) effect is one of those "obvious as heck if you experiment on yourself with barely any science or even just contemplate it" things that somehow wind
167.
▲
by
cb321
1y ago
Interesting project. You might check out Arcan ( https://arcan-fe.com/ ) if you've never heard of it. (EDIT: I see author recently added a link: https://github.com/tattoy-org/tattoy/blob/
168.
▲
by
cb321
1y ago
Since identifier bike shedding is more broad than only top-level domain names, readers interested in a tool like this might also be interested in https://github.com/c-blake/thes - a command-line thesaurus utility writt
169.
▲
by
cb321
1y ago
I think you may misunderstand - the idea is "in addition to", not "instead of" the usual syntax, `a=123 b=456 mycmd arg1 arg2 arg3 ..`, but it happens to provide a way to give "long names". Also, it did catch o
170.
▲
by
cb321
1y ago
I would just call it a "pattern", but if you want to be more specific Re your 1/2, perhaps a "pattern of over-simplification". Over-simplification is, of course, basically human nature, not specific to HN, and some
171.
▲
by
cb321
1y ago
Another issue is that, around the same time getopt was appearing, the Bourne family of shells added `key1=val1 key2=val2 mycmd` syntax, accessed more simply with either `getenv("key1")`, etc. in a C program or simply `${key1-defau
172.
▲
by
cb321
1y ago
Fair enough. Finding documentation on the language is often step 1. :-) There are also giant POSIX PDFs around these days. Also, I should have been more clear that while the CL parser toolkits are basically CfLangs/PLangs (maybe wit
173.
▲
by
cb321
1y ago
I'm not sure I understand your question. Are you asking for a list of the hundreds of commands which did nothing useful when run as cmd -h or cmd --help? I didn't save that, and as mentioned, it'd probably be different on y
174.
▲
by
cb321
1y ago
It is underappreciated that every single command-line option parser/toolkit is its own full configuration language with individual tools being "programs/configs" in that language. The lexical similarity of the zillion d
175.
▲
by
cb321
1y ago
Those interested in this talk which is sort of a Hennesy & Patterson-based course on CPUs compressed down to 43 minutes might also find this "CPU measurement OS" SushiRoll interesting: https://gamozolabs.github.io&#
176.
▲
by
cb321
1y ago
It's not POSIX, but both bash & zsh have real time queries built-in (of course, $(date) is an even older school substitute): t1=$((EPOCHSECONDS + 60)) while [ $EPOCHSECONDS -lt $t1 ] do # curl ... && break # o
177.
▲
by
cb321
1y ago
Abbreviation confusability is relative to { in fact one might say measured by ;-) - number? entropy? etc. } the listener/reader's knowledge/exposure, much as sound levels need a reference distance. I have heard "bare K
178.
▲
by
cb321
1y ago
BTW, there's some analysis of some of the hash functions you mentioned (pjw, FNV1A, or djb) over here https://github.com/nim-lang/Nim/issues/23678 - just in-page search for "pjw" to find a tabl
179.
▲
by
cb321
1y ago
Fair enough. Sorry! You were pretty clear. I continue to think that the world would be less confusing if people didn't go around citing GB/s for hash-table hashes, but rather (perHash+-err, perCost+-err) on CPU xyz. Cuts right
180.
▲
by
cb321
1y ago
I'm not sure I can answer your other questions like copyrights & secrets, but the "how is it faster?" is actually pretty easy and worth knowing/saying to anyone unaware - the hash you present is "1 byte at a tim
More ›