Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
miguel_martin
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
miguel_martin
10mo ago
You can compile to wasm, I have done so via the XNNPACK backend - you might have to tweak the compilation settings and upgrade the XNNPACK submodule/patch some code. But this only supports CPU, not a WebGPU or WebGL backend.
32.
▲
by
miguel_martin
11mo ago
Why are Nim, Odin, Zig, Mojo not included (and probably many others)?
33.
▲
by
miguel_martin
11mo ago
With the uptime guarantees AWS, GCS, DO, etc. provide - it will probably 1h per 365 days accumulative (@ 99.99% uptime). 2 nodes for a simple static site is just overkill. But, honestly, for this: just use github pages. It's OSS and Gi
34.
▲
by
miguel_martin
11mo ago
When I used to use emacs to write code I did this, but it would be great if I could use tramp instead, unfortunately the latency is unbearable. Also, when compared to neovim, the latency for auto-completion (with LSP as a source) is also un
35.
▲
by
miguel_martin
11mo ago
Also checkout blaze: https://gasiulis.name/parallel-rasterization-on-cpu/
36.
▲
by
miguel_martin
1y ago
Not one mention of SSH or remote development. Life must be nice to do development on a single machine. Tramp on Emacs is not ideal.
37.
▲
by
miguel_martin
1y ago
Not rust, but check out nimwave: https://github.com/ansiwave/nimwave
38.
▲
by
miguel_martin
1y ago
If your really want to use the keyword def instead of proc: you can do that with sed. In all serious-ness, don't do that. I've used Python a lot, but Nim is a different language. Writing the proc keyword helps condition your brain
39.
▲
by
miguel_martin
1y ago
> language like his personal compiler development playground re personal compiler development playground: I don't see this for Nim 2. Nimony/Nim3 is more of a "playground", but rightfully so: he is creating a new majo
40.
▲
by
miguel_martin
1y ago
This is incredible.
41.
▲
by
miguel_martin
1y ago
The way to enable C++ code calling Nim is via exportc or exportcpp and by writing a head file with the declarations you are exporting This will require manual work, but you can use macros or a code generation script to help if your api is l
42.
▲
by
miguel_martin
1y ago
To be clear, you can compile to WASM with emscripten. However, if you want to call JavaScript code, e.g. to interact with the DOM from WASM in browser, then the bindings that are declared in the standard library will not work. Instead, you
43.
▲
by
miguel_martin
1y ago
I actually prefer atlas (see: https://github.com/nim-lang/atlas ) to nimble now, it clones dependencies to to a local `deps/` folder relative to the project. It also supports adding local folders to the nimble path
44.
▲
by
miguel_martin
1y ago
This is a bit controversial, but in my opinion, just manually write bindings for the API surface you care about. There are tools to help automate the process ([c2nim]( https://github.com/nim-lang/c2nim ), [futhark]( http
45.
▲
by
miguel_martin
1y ago
And there is support for unicode operators: https://nim-lang.org/docs/manual.html#lexical-analysis-unico... :)
46.
▲
by
miguel_martin
1y ago
Yeah, perhaps I should have made that more clear, but I did mention these are "*some* of Nim 2's features". I didn't want my post to be a copy-pasta of the Nim manual. The post is already pretty long, so I chose to prior
47.
▲
A review of Nim 2: The good and bad with example code
(miguel-martin.com)
233 points
by
miguel_martin
1y ago
|
58 comments
48.
▲
by
miguel_martin
1y ago
Nim 2 does not have a mandatory gc. It is recommended to use ARC, which has similar semantics to C++, ie moves, copies, etc. Unlike D, the GC is not mandatory for the standard library.
49.
▲
by
miguel_martin
1y ago
I don’t think this is the only reason. You could do this with Nim, Nim 2’s ARC model is compatible with c++’s RAII. Nim supports moves, destructors, copies, etc. see https://nim-lang.org/docs/destructors.html You can i
50.
▲
by
miguel_martin
1y ago
Nim would be the best choice for this at the moment, imho importcpp what you need. exportcpp for the other way around
51.
▲
by
miguel_martin
1y ago
Nim 2 doesn’t require gc, with arc/atomicArc. The only thing you really need to be careful about is when you use ref types or custom owning types. Otherwise, manual memory management can be done in Nim pretty easily. Hypothetically you
52.
▲
by
miguel_martin
1y ago
>“… Note that I'm not an expert, in anything, so take everything I write about with a grain of salt I guess :).” >”I’m by far an expert and I could be wrong in some specifications” You’re missing a “not” on that 2nd sentence ;) I
53.
▲
by
miguel_martin
1y ago
Found a comparison: https://github.com/jj-vcs/jj/blob/main/docs/sapling-comparis...
54.
▲
by
miguel_martin
1y ago
How does this compare to sapling? https://github.com/facebook/sapling
55.
▲
by
miguel_martin
1y ago
Python debugging is great when you're strictly debugging Python code. Placing a `breakpoint` or spinning up an IPython instance to investigate the issue via `import IPython; IPython.embed()` makes life breezy. For neovim, you can send
56.
▲
by
miguel_martin
1y ago
Nim is a likely a pretty good option, see https://github.com/EmbeddedNim/picostdlib/tree/master
57.
▲
by
miguel_martin
1y ago
See pybind11 or nanobind
58.
▲
by
miguel_martin
1y ago
I’m optimistic on the future. llms.txt will be adopted for all major sites (from AI hype), and ironically it will benefit humans to browse and interact with sites in a simpler manner. I personally believe that a new era of “lite-browsers” w
59.
▲
by
miguel_martin
1y ago
The first-generation Intel Ultra lineup is comparable to the M1 and M1 Max. See: https://nanoreview.net/en/cpu-compare/intel-core-ultra-7-165... Intel's integrated graphics aren't as good, but they are s
60.
▲
by
miguel_martin
1y ago
There are enough features fed into a VLM to solve the task. The way to fix this is simpler: ensure counter-factuals are present in the training data, then the VLM will learn not to be dependent on its language priors/knowledge.
More ›