Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
121.
▲
by
cb321
1y ago
FWIW, I almost always have to look at the generated assembly (never mind C) to even verify things are vectorized. I hope you realize the promise of a PLang where that doesn't need checking or some kind of "autovec-miss" comp
122.
▲
by
cb321
1y ago
I wouldn't reply except you mentioned this unboxing twice and I think people might get the wrong idea. I almost never use ref T/ref object in Nim. I find if you annotate functions at the C level gcc can even autovectorize a lot,
123.
▲
by
cb321
1y ago
I can't speak to what libraries you used, but both techniques have been broadly used in common practice since the 1950s. According to the "History" subsection in Knuth TAOCP v3 at the very end of 6.4 (whose very first editio
124.
▲
by
cb321
1y ago
I see. So, it's just a slide-ware bullet point right now? It would be helpful to really emphasize a word like "planned" in that bullet. It might have been lifted from some future-sounding/plan-oriented list and now th
125.
▲
by
cb321
1y ago
We have zero disagreement here (actually true of all responses to my comment - an odd circumstance on HN). What you call "`ref` types" is what I meant by "GC'd types". I actually like that the Nim compiler changed
126.
▲
by
cb321
1y ago
Not to disagree, but to amplify - FWIW, most of what you say was also the sales pitch for C++ over ANSI C in the early 90s vs. the "pure Java" mentality that shortly followed in the late 90s (with a megaton of Sun Microsystems mar
127.
▲
by
cb321
1y ago
This answer's @pansa2's question in a way that more leans on one aspect of Nim's greater syntactic & code transformation flexibility (which is great!), but I suspect pansa2 was more interested in differences in "idio
128.
▲
by
cb321
1y ago
Well, then you might like Nim for writing small CLI utilities. It just defaults to a console-friendly traceback on uncaught exceptions. cligen makes pretty nice CLIs pretty easy. (If you set up a $HOME/.cligen then you can get a sha
129.
▲
by
cb321
1y ago
Their `use` shell function should really be `use1` and `use` should process its whole argument list. Then their opening example could be `use safe sys/base` and "dialect tweaking" can be just one line with the option but n
130.
▲
by
cb321
1y ago
Well, like I said and you said - it depends on the calculations. :-) FWIW, I never meant to suggest he was wrong in any absolute sense, but I did do a double take reading that. Besides the fine distinction you made about byte-at-a-time, on
131.
▲
by
cb321
1y ago
This is a good set of slides. Dan is a good guy. There are a few nits I would pick. Sqrt(N) convergence comes from independence not normality -- based on independence => linearity of variance. { So, N IID samples of any distribution
132.
▲
by
cb321
1y ago
Some data in support of @soraminazuki (who makes good points throughout this thread) on an i7-1370P linux laptop running Linux 6.15.7: $ tim 'bash -lic logout' 'zsh -lic logout' 55.3 +- 3.7 μs (AlreadySubtract
133.
▲
by
cb321
1y ago
At those time scales, you would be better off using `tim` ( https://github.com/c-blake/bu/blob/main/doc/tim.md ) than hyperfine { and not just because that is your name! Lol. That is just a happy c
134.
▲
by
cb321
1y ago
I should have also said, I suppose, that cgitb is less needed by Nim because the static typing catches more errors at compile-time. Indeed, for CGI programs, it might be wise to use the `{.raises: [].}` pragma to forbid successfully compil
135.
▲
by
cb321
1y ago
Yeppers. For a few more details, one might start here: https://en.wikipedia.org/wiki/Universal_quantification
136.
▲
by
cb321
1y ago
Thanks!
137.
▲
by
cb321
1y ago
Do you have any URIs or back up links? Encouragement to actively break compatibility sounds like "inciting murder" vs. a more tame "don't expend effort (go to medical school)" to save folks. { Oh, and before anyo
138.
▲
by
cb321
1y ago
Yeah. I mentioned this the other day: https://news.ycombinator.com/item?id=44466245 Combined with the dot-com boom "general hype", I'm sure a lot of managers pushed heavyweight solutions where lightweight wo
139.
▲
by
cb321
1y ago
I'm not sure what @LtWorf means, exactly, but one reason I can think of is that on Linux (Gentoo & Debian at least), the system package managers are not putting pip in place by default with python itself, the way they used to. The
140.
▲
by
cb321
1y ago
That article is a pretty good overview at the time. Only one benchmark on one system, but over in day before yesterday's HN thread on this ( https://news.ycombinator.com/item?id=44464272 ), I report a rather significant
141.
▲
by
cb321
1y ago
Well, I spent a little more time on it, and for that one Perl version (on one cpu, i7-6700k, one OS - Linux 6.15, with one compiler gcc-15) I got a 1.5x slowdown of perl startup from 2008 to 2025. Not great! zsh# rei=(chrt 99 taskset
142.
▲
by
cb321
1y ago
The major modern use case I know of is command-line utilities which also benefit from low start-up. Of course, that doesn't mean there hasn't been "perf rot" over the decades as you say. Such rot should never surprise
143.
▲
by
cb321
1y ago
Besides already agreeing to disagree on the Java slogan & syntax, I agree with all you say. Familiarity/being taught in schools is for sure a huge deal. { Not really "news" - Steve Jobs used to give high schools Apple I
144.
▲
by
cb321
1y ago
While all you say is true, it bears note that it didn't need to be decisive. The current mob branch of tcc is such that a `#!/bin/tcc -run` "script" is about 1.3x faster than perl</dev/null on two CP
145.
▲
by
cb321
1y ago
Ah. You refer to the "write once, run anywhere" marketing slogan at a time when there was a lot of JVM-to-JVM variability and JVM JITs were not very advanced. I didn't buy that slogan at the time (look at aaaaall that open
146.
▲
by
cb321
1y ago
This is not to disagree, but to agree adding some detail... :-) Part of the Java rise was C/C++ being error prone and syntax similarity with such, but this was surely intermingled with a full scale marketing assault by Sun Microsyste
147.
▲
by
cb321
1y ago
Even back in the 1990s, CGI programs written in C were lightning fast. It just was (is) an error prone environment. Any safer modern alternative like the article's Go program or Nim or whatever not making database connections will be
148.
▲
by
cb321
1y ago
> look at the major standard libraries for hash tables I don't know what would count as "major", but at least to me "major" does not imply "good". As I mentioned, this idea is ancient (the point of c
149.
▲
by
cb321
1y ago
This is true of the common tombstone approach to deletions in hash tables { which also require rehashing (like in resizing) if there are too many tombstones }. Somehow dissemination of Knuth v3,chapter6.4 Algorithm D has been weak, though i
150.
▲
by
cb321
1y ago
The calling process being dynamically linked might impact fork() a lot to copy the various page table setups and then a tiny bit more in exec*() to tear them down. Not sure something like a shell has vfork() available as an option, but I s
More ›