Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
44 ms
·
481.
▲
by
cb321
4y ago
It is quite measurable. Some details. At the top of .zshenv zmodload zsh/datetime [[ -v ZSH_TIME_STARTUP ]] && t0=$EPOCHREALTIME and at the bottom of .zshrc [[ -v ZSH_TIME_STARTUP ]] && echo $[EPOCH
482.
▲
by
cb321
4y ago
>Not sure why it would be discouraged pinToCPU (at least in Nim) just sets scheduling affinity, but does not hard-allocate like the Linux isolcpus boot parameter.."pin" makes it sound more powerful than it is. It is more like
483.
▲
by
cb321
4y ago
It's a mixture of allocation, copying, and reclamation. You can actually side-step a lot of such issues in a mostly mm-agnostic way with a `var` like interface in Nim -- sticking to one initial allocation like the common pattern of cal
484.
▲
by
cb321
4y ago
I have not found this slower-than-C to be the case. You may need to use something like `iterator getDelims` in https://github.com/c-blake/cligen/blob/master/cligen/osUt.ni... to manage memory with
485.
▲
by
cb321
4y ago
While I agree with all you said, one can expand a bit on it. There are concrete max search depth expectations for well randomizing hash functions such as: https://www.sciencedirect.com/science/article/abs
486.
▲
by
cb321
4y ago
Nim gives a bit more choice in many dimensions than many languages -- how to manage memory, whether to use the stdlib at all for things like hash tables, and yes, also syntactic choices like several ways to call a function. This can actual
487.
▲
by
cb321
4y ago
Personally, FWIW, I find shifting gears from Nim to Python to bring back a lot of Py-verbosity..but I used to think Python was pretty terse. { Also, Python is often gratuitously (some might say grotesquely) run-time resource inefficient.
488.
▲
by
cb321
4y ago
While popular with game developers (as clear in this talk), the "automatic abstraction transpose" to struct of arrays (SOA) from array of structs (AOS) of ECS or "data-oriented" programming has more broadly interesting q
489.
▲
by
cb321
4y ago
Superb comment. It's rare that I agree with so many words as-is. I might add only a minor note that his construct for h/help breaks globbing in a directory that happens to contain a file named "h" or "help" (e
490.
▲
by
cb321
4y ago
Tables like this routinely lead to over-conclusion. Merely adding -d:lto (which changes no semantics) to the nimble build line boosts fps by 1.27x for me on nim-devel gcc-12 Skylake, making it 1.4x faster than the Rust on the same machine.
491.
▲
by
cb321
4y ago
If I do nimble build -d:lto -d:danger --passC:-march=native I get 1920 fps while if I do nimble build -d:lto -d:release --passC:-march=native I still get 1775 fps. So, at least for Nim, the checks are only a 1.08x slowdown..Not so bad comp
492.
▲
by
cb321
4y ago
Re CLIs in Nim..Most find https://github.com/c-blake/cligen easy to use.
493.
▲
by
cb321
4y ago
And with the author's hot off the presses nim flags I get only 1464 fps. So, 1920/1464 = 1.31 for my nim compile flags vs. his new ones, only a little less than the 2521/1626 that was interesting people. For something super
494.
▲
by
cb321
4y ago
I tried. That actually made the rust slower for me (i7-6700k, gcc-12.2, rustc-1.64). 1180 frames/s. And without the -march=native the Nim was at 1620. And it also did not help the C++ branch (but helped Nim about 1.2x). But really
495.
▲
by
cb321
4y ago
With Nim `nimble build -d:danger -d:lto --passC:-march=native` I just got 1920 frames/s while with your rust build only 1237 fps on the same machine (EDIT: and 1307 frames/s with C++.)
496.
▲
by
cb321
4y ago
--gc:arc/--mm:arc has been around for a couple years (as per that blog post link) and fairly stable for >1 year. It is slated to become the default automatic memory management strategy in Nim-2.0. The hope is to release 2.0 this y
497.
▲
by
cb321
4y ago
Also of interest might be the treatment by Lev Landau in his Course on Theoretical Physics Volume 3: Quantum Mechanics - non-relativistic theory. Deriving the Born "postulate" is in Section7: "The wave function and measureme
498.
▲
by
cb321
4y ago
Yeah. Perhaps most charmingly treated here: https://arxiv.org/abs/2011.12671 { EDIT: though surely many other places! There are also YouTube videos of this one, though, and Sidney Coleman was really a Feynman-class e
499.
▲
by
cb321
4y ago
As with any unsettled questions there are pros & cons to the various takes on quantum reality. Part of the appeal of MWI (intrication of observer into observed system as part of the measurement process) to me was always that the instan
500.
▲
by
cb321
4y ago
Also, if you are too impatient to wait until tomorrow, you can just click through on the program you see links for the 2020 and 2021 Nim Conferences. (One 2021 link I saw is broken, but https://conf.nim-lang.org/ works for
501.
▲
by
cb321
4y ago
HN people may be especially interested in the very first talk which is Andreas' vision for Nim 2.0.
502.
▲
by
cb321
4y ago
Sorting out your edit/IDE/lib situation & re-learning is part of any PL switch in my experience (& just varies). Trade offs abound in most things. D is undeniably syntactically closer to C if that is the priority. I knew
503.
▲
by
cb321
4y ago
A language, its stdlib, and its package ecosystem all relate, but are also distinct. It's not hard to do your own TLS/SLS wrapper with whatever defaults you like. When I run `nimble search ssl`, it seems at least 4 people have d
504.
▲
by
cb321
4y ago
If you find it easier, you can do the simpler "build a compile-time string and inject it" D-like metaprogramming in Nim with `macros.parseStmt` or `parseExpr`. And just `template` in Nim can go a long ways without all the mucking
505.
▲
by
cb321
4y ago
Elaborated: https://en.wikipedia.org/wiki/Demarcation_problem
506.
▲
by
cb321
4y ago
Oops. Yeppers.
507.
▲
by
cb321
4y ago
Along these lines, there is also (from 1988!) the Boehm Garbage Collector just an -lboehm away on your link line which in your suggested mode can reclaim (most) of the memory you might think you would lose. [1] (C does have many gotchas,
508.
▲
by
cb321
4y ago
Nim is choice, including choice among a variety of memory management options including manual, markAndSweep style collection, reference counting variants, etc.
509.
▲
by
cb321
4y ago
I think that is a very good question. I know that is a plaintiff/Novak claim, but I don't know its supporting evidence. The detective's legal vulnerability may rely on the transcript of his exact testimony both to the grand
510.
▲
by
cb321
4y ago
A few background links that I dug up after reading the NYT article and the actual (hilarious!) Onion amicus brief linked to by @zerovox [1] that may be of broader interest given the ongoing discussion here: https://en.wikipe
More ›