Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
361.
▲
by
cb321
3y ago
There is also "The Fine Article". FWIW, all these things date back to the ancient Usenet "RTFM" (where M = manual) which would undermine an expansion of "featured" in my view (since manuals are not "featur
362.
▲
by
cb321
3y ago
Indeed. It is pretty easy to just write some Cython routine against the data pointer & range lifted out of some NumPy array and then still let Python do all the memory management for you. I think Cython is great for just speeding up pr
363.
▲
by
cb321
3y ago
This is indeed an ancient problem. I loved the 1992 Lisp FAQ comment by jjwiseman. :-) Nim handles this with `closureScope` and `capture` ( https://nim-lang.org/docs/system.html#closureScope.t,untyped ). It's deb
364.
▲
by
cb321
3y ago
Yes. The kind of type modeling this is doing is not very physics-unit-minded at all (where any multiplicative operation potentially creates a new type). Rather, it is trying to prevent non-additive (add/subtract/compare) operati
365.
▲
by
cb321
3y ago
> even go through the relevant laws of physics Possibly of interest, as mentioned in Appendix C of https://www.nist.gov/publications/architecture-software-assi... there is a start to this in https://en.
366.
▲
by
cb321
3y ago
I think there is a reconciliation. If you read the other article popular today ( https://news.ycombinator.com/item?id=37493955 ), it focuses on scale invariance as the driving principle and gives an example of units for Four
367.
▲
by
cb321
3y ago
This has maybe been said before and given how abstract both this and the recently discussed ( https://news.ycombinator.com/item?id=37493955 ) article are, it feels weird to say they are insufficiently abstract, BUT.. if you c
368.
▲
by
cb321
3y ago
I agree this particular C# being >180x slower may not matter much for one-off commands keyed-in by and watched by humans, but that may not be all that matters. E.g., some people might `find . -print | xargs -n1 cmd`. Almost everythin
369.
▲
by
cb321
3y ago
20 milliseconds? On my 7 year old Linux box, this little Nim program https://github.com/c-blake/bu/blob/main/wsz.nim runs to completion in 109.62 +- 0.17 micro seconds when fully statically linked with
370.
▲
by
cb321
3y ago
This comment is misleading &| misinformed. Sum types are built-in [1] for formal parameters. `nil` is only for `ref|ptr` types. In much code you can just use stack allocated value types and there is neither GC concern nor nil concern,
371.
▲
by
cb321
3y ago
No problem. It might also bear mentioning that if one is willing to learn more specialized tools, even less key-downing is possible, such as (using https://github.com/c-blake/bu/blob/main/doc/cols.m
372.
▲
by
cb321
3y ago
https://github.com/mit-pdos/xv6-public has under 10,000 lines of C and assembly including some user space programs.
373.
▲
by
cb321
3y ago
Often whole program generation in a prog.lang (& ecosystem!) that you already know can substitute for a new prog.lang. Python even has eval . You may be interested in: https://github.com/c-blake/bu/blob&#x
374.
▲
by
cb321
3y ago
There is also (at least): https://en.wikipedia.org/wiki/Stand-alone_shell
375.
▲
by
cb321
3y ago
> I absolutely love the trend of rewriting classic Unix utilities This was actually a big draw of GNU implementations in the mid-to-late 1980s vs. the "then classics" of the mid-to-late-1970s. Before the dominance of Linux 
376.
▲
by
cb321
3y ago
This kind of thing should probably be generalized so that any new parameter can be seamlessly woven into your `ls-like` reports. https://github.com/c-blake/lc/blob/master/extensions/fe1 does `du` (l
377.
▲
by
cb321
3y ago
It's also a whole other tool and in Nim to boot, but https://github.com/c-blake/lc allows you to group "dot-directories" before "dot-files" before "non-dot directories" before non-dot
378.
▲
by
cb321
3y ago
https://github.com/c-blake/lc in Nim might interest someone interested in a latterday 'ls'. The screenshots should probably show underlined hard-links or italicized symlinks or other examples of "multi-f
379.
▲
by
cb321
3y ago
If you find this article interesting and are curious about Nim then you would probably also be curious about https://github.com/c-blake/cligen That allows adding just 1-line to a module to add a pretty complete CLI and
380.
▲
by
cb321
3y ago
Oh, it's interesting, and I wish you the best of luck with your reading group! I mentioned the others more out of thoroughness than any intended criticism. A wide diversity of students implies that different materials aimed at various
381.
▲
by
cb321
3y ago
If you are interested in books covering Nim, besides this linked one there is also another by the main dev of the language: https://www.amazon.com/Mastering-Nim-complete-programming-language-ebook/dp/B0CGGHZ4H
382.
▲
by
cb321
3y ago
I never said Nim was unique | older than awk. While I cannot make you read my cousin comment to understand I meant "new" as clarified-"different" [1] or click through any links, I can perhaps non-redundantly emphasize t
383.
▲
by
cb321
3y ago
I'd bet you could do a harness like https://news.ycombinator.com/item?id=37292882 mentions but with Python in like an hour and then you could stay in both one syntax and more significantly in one library ecosystem. Wh
384.
▲
by
cb321
3y ago
It's just a different & in my experience often neglected point in a similar design space (as that initial, linked text argues). Your tastes & use cases are your own. Almost everything "all depends" upon so very much
385.
▲
by
cb321
3y ago
Only with FreeBSD `cut`.. coreutils `cut` (Linux) is missing -w as is at least OpenBSD? EDIT: I see you discovered this. lol computers indeed. ;-)
386.
▲
by
cb321
3y ago
You might consider: https://github.com/c-blake/bu/blob/main/doc/cols.md That's in Nim, though that may not be much a barrier. (There may also be other tools in bu/ of interest.)
387.
▲
by
cb321
3y ago
I agree that "writing/learning a different" (what I meant) is more clear wording than "making a whole new". EDIT: and it is a fair counterpoint that any command with options is, in some sense, also a different lan
388.
▲
by
cb321
3y ago
Of possible interest - instead of making a whole new programming language like awk, you can also just systematize generating code for an existing one with a command-line harness. This can even stay terse & keep a fairly fast edit-test t
389.
▲
by
cb321
3y ago
Obligatory Worse Is Better Link for those who haven't seen it: https://dreamsongs.com/WorseIsBetter.html Sounds like Richard P. Gabriel never really figured out an "ideal strategy" after decades of trying.. S
390.
▲
by
cb321
3y ago
Sure. No problem. While it may not be in any ANSI/ISO spec for C, even Windows has popen these days. There are also some tiny Nim popenr/popenw wrappers in https://github.com/c-blake/cligen/blob/ma
More ›