Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cb321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
71 ms
·
781.
▲
by
cb321
6y ago
I did use TinyC/tcc successfully on Windows a few times without any header problems, but it was very admittedly a far less rigorous test and may well have not touched any headers with MS-specific extensions. I never tried it on MacOS,
782.
▲
by
cb321
6y ago
While what you say is true, it's impact need not be so prohibitive as to box you in to clang/gcc. TinyCC/tcc [1] parses almost all C99 with a 3900 line tccpp.c and 8000 line tccgen.c. As long as extensions are careful to stay
783.
▲
by
cb321
6y ago
It bears noting that the native Nim FFI is very "thin" & easy. E.g., at least for code anticipated to be compiled by the C backend, you can just declare the C function as a Nim proc (EDITTED to look nicer on mobile): proc
784.
▲
by
cb321
6y ago
Well, cligen is pretty mature/featureful, less work to use and well maintained and is the most common recommendation in Nim. If you happen to like more verbosely specified CLI interfaces like Python's argparse there are at least
785.
▲
by
cb321
6y ago
If a little CLI app to do something useful (instead of say, some shell script/batch file or something) is your entry point then you might try cligen [1]. Everyone is different, but from many and varied reports (e.g. in this very threa
786.
▲
by
cb321
6y ago
Syntactic indentation has been very polarizing since at least Python 0.9 (and maybe others) in the late 80s. Like ()s in Nim, Haskell also has a "both brackets or whitespace" kind of vibe. But, yeah, choice lets different parts o
787.
▲
by
cb321
6y ago
In this, and a great many other ways Nim provides a lot of syntactic choice. A pro to some. A con to others.
788.
▲
by
cb321
6y ago
I just watched that Facebook F8 talk Araq gave up on quickly. It is a very high-level software engineering management sort of talk which actually becomes pretty clear pretty quickly. While at FB they may be engineers, at many other compan
789.
▲
by
cb321
6y ago
People do game engines in Nim. ReelValley was even a commercial effort. (This is only to supplement the parent comment, not contradict.) Your mileage may vary, but several times I've tried some single threaded thing in both Rust, C++
790.
▲
by
cb321
6y ago
In Nim, a warning is exactly what happens for unused imports. I also think that is the right level of pestering.
791.
▲
by
cb321
6y ago
This comes up all the time, but in Nim you can almost always use parenthesis instead of whitespace [1] if you really love that redundancy/style. [1] https://forum.nim-lang.org/t/6897#43184
792.
▲
by
cb321
6y ago
Well, it works with TinyCC/tcc where you can get order 200 millisecond compiles. While tcc does do most of c99, I do not think Nim requires anything past c89. libc-wise, it doesn't use even all of standard C. Minimal stdio/
793.
▲
by
cb321
6y ago
At least one (very bottom of [1]) of the 5+ variants makes you list which fields the code gets access to (in a tiny 6 line Nim macro). That is an alternate, perhaps more keystroke-heavy solution to the problem bothering @simias. [1] https
794.
▲
by
cb321
6y ago
I belive zimbatm refers to the bash-specific ${var@Q} to expand to a form suitable as re-input into the shell. There are a few other bash-specific syntaxes like that (under "parameter transformation" in the manual page).
795.
▲
by
cb321
6y ago
Compiling an echo "hello world" module in Nim from scratch to a fully linked executable can be under 200 milliseconds on modern hardware with the TinyC/tcc backend. tcc has its own assembler and ELF linker built in to get th
796.
▲
by
cb321
6y ago
One possibility is the almost dirt-simple solution wherein you just have a "make"/"Makefile" (or your favorite other build system) maintain a shadow tree of parallel pre-translated files. You get parallelism via `m
797.
▲
by
cb321
6y ago
Yup. Something perhaps more helpful but so far unmentioned (and somewhat OS-specific) is that statically linked executables usually fork & exec (especially exec) much faster than dynamically linked ones. This difference is usually only
798.
▲
by
cb321
6y ago
NOTE: ripgrep already has --pre. (No pre-built indexing, of course.)
799.
▲
by
cb321
6y ago
Those articles (and syslets) all seem to have this strong async focus. That could simply reflect pengaru's bias/interest. So, I do not know for sure, but I suspect the TL;DR is "async & scheduling in the mix makes it ha
800.
▲
by
cb321
6y ago
Ah. "Contributions are welcome" made me think of you as one of the welcomers. Compatibility-layer-wise, I did actually do that for my batch system. In the tiny user-space entry point I check if sys_batch is working and if not I f
801.
▲
by
cb321
6y ago
It can branch based on the syscall return and the ability to copy word-values like file descriptors from open to an fstat and so on. That copying could perhaps be extended to strings in some limited way, but I agree it is generally much mo
802.
▲
by
cb321
6y ago
You can look at my code in the link I gave. It's pretty short and should work on kernels 3.x series to 5.x series. { EDIT: I realize this may make you ask your question even more strongly. :-) }
803.
▲
by
cb321
6y ago
Well, it was not hard for me to add batching for every syscall. The whole module is under 200 lines of C. Granted, I only did x86_64. I think it has some bearing to those using eBPF to just batch calls, too. Unless I am missing something
804.
▲
by
cb321
6y ago
The batch system call part is not so hard on its own: https://github.com/c-blake/batch
805.
▲
by
cb321
6y ago
No big deal from my perspective. I was just explaining my cautious wording. I know you've been open about working with/from "ideas/people" in the darcs community, and good about the shoulders [1] the pijul work st
806.
▲
by
cb321
6y ago
The Haskell DVC system that pijul "sort of" evolved from (theory of patches-wise mostly, just being careful given the stringent IP/credit language afoot), darcs, had this sort of semantic concept. It could track, e.g., symbo
807.
▲
by
cb321
6y ago
She missed the step where you just say [ "$dst" -nt "$i" ] || svg2pdf "$i" "$dst" in her for-loop. That is about as much extra typing/text as her comment and makes that build script about as fas
808.
▲
by
cb321
6y ago
I am not an INim user. [0] covers INim as of a few months ago, though. You might need to write to a .jpg and point a web browser at it, but perhaps that could be made auto-magic (EDIT: or is already). [0] https://www.youtube.co
809.
▲
by
cb321
6y ago
A plotting library: https://github.com/Vindaar/ggplotnim
810.
▲
by
cb321
6y ago
It sounds like you might enjoy https://nim-lang.org if you do not already know about it.
More ›