Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ncruces
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
811.
▲
by
ncruces
2y ago
I don't know about DuckDB, but SQLite's Wasm build is well under 1 MiB minified/gzipped. There's a lot that could be trimmed, but at that point, why?
812.
▲
by
ncruces
2y ago
Another (immutable/persistent) AA tree implementation, in Go: https://github.com/ncruces/aa
813.
▲
by
ncruces
2y ago
Having written a portable SQLite VFS from scratch, I'm a bit scared of how they blindly translate fcntl locks into LockFileEx in a forking web server. The opportunity for data corruption just freaks me out.
814.
▲
by
ncruces
2y ago
This thread started with bdjsiqoocwk , who wrote: > You don't know where the rest are. This is wrong, period. And the fact it's wrong is pretty much the entire point of the article. Are bdjsiqoocwk and lkdfjlkdfjlg the sam
815.
▲
by
ncruces
2y ago
That's not his mistake. He knows this, but repeatedly failed to convey this to others. That's like the entire point of the post: they're hard to teach to others (they're unintuitive) and there are better (more intuitive)
816.
▲
by
ncruces
2y ago
> You don't know where the rest are. Of course you do: they're in the whiskers; half in each whisker. That's the entire point of the picture, BTW.
817.
▲
by
ncruces
2y ago
And any loop that iterates more than 100 times.
818.
▲
by
ncruces
2y ago
You're right. That does cover it. I was playing with my kid and I didn't get it at first. I might use smaller factors then.
819.
▲
by
ncruces
2y ago
The problem with doing this on a computer is getting us to believe you didn't just make up the colors as we tell you to reveal them (after being “dishonest” before).
820.
▲
by
ncruces
2y ago
Those drive on the same road, right next to you.
821.
▲
by
ncruces
2y ago
Yes, you are, if you can't “afford” the loss. And this does not mean that loosing the car bankrupts you. It just means that reimbursing you for your loss is worth more to you than the insurance company, because it's harder for y
822.
▲
by
ncruces
2y ago
That's not how property taxes work here. Also, you need to figure out how you define vacant, and how to track it. If I relocated for work, and use the house 3 months a year and every other month for a weekend, is it vacant? How do you
823.
▲
by
ncruces
2y ago
Right, and then the 80yo people living in a centenary house in a gentrified neighborhood suddenly get a 10x tax increase because the next door building got sold to be remodeled as a luxury condo, and drove property values through the roof.
824.
▲
by
ncruces
2y ago
It's… probably not worth it. I just wrote this years ago (go.mod said 1.12) for the fun of it, thought I had it in a Gist/GitHub, and uploaded it yesterday in response to this post. One thing I remember trying was coding this up i
825.
▲
by
ncruces
2y ago
I collected a few of these here: https://github.com/ncruces/fastmath/blob/main/fast.go Also see this StackOverflow: https://stackoverflow.com/questions/32042673/optimized-low-a.
826.
▲
by
ncruces
2y ago
An actual directory knows its direct children. An actual directory A with 2 child directories A/B and A/C, each of which with 1 million files, doesn't need to go through millions of entries in an index to figure out the names
827.
▲
by
ncruces
2y ago
It's a game of cat and mouse, and apparently all the “this is easy” people think they're just smarter than everyone out there.
828.
▲
by
ncruces
2y ago
I guess the meta programming that most often gets used with //go:generate ends up being text/template. The Go sort algorithm (pdqsort) is implemented in this way so the same algorithm can be used to implement the various exis
829.
▲
by
ncruces
2y ago
If it gives you some confidence, wazero (the Go Wasm runtime) is used by the Go team (in CI) to test their own Go-to-Wasm compiler. So if they break wazero, they'll know pretty soon from failing tests of their own Wasm/WASI toolch
830.
▲
by
ncruces
2y ago
Random stranger backed by company develops Wasm runtime in the open, that's used by Go authors themselves to test their own Go-to-Wasm compiler. I'm sure other Wasm runtimes are much better.
831.
▲
by
ncruces
2y ago
Most projects live in the gitlab below; modernc is the vanity import which alone doesn't resolve to anything. The most famous project is an SQLite driver. https://gitlab.com/cznic https://modern.org/sql
832.
▲
by
ncruces
2y ago
Oh, OK. You need to replace calls to syscall.Mmap with windows.VirtualAlloc [1], syscall.Mprotect with windows.VirtualProtect, etc. You don't even need to change the ASM preamble. [1]: https://pkg.go.dev/golang.org/
833.
▲
by
ncruces
2y ago
Right, and both modernc and wazero are two highly sophisticated projects being used to avoid it. But cgo being slow (and above all displeasent to work with) is what I'd consider valid criticism of Go. Go has other advantages, FFI is no
834.
▲
by
ncruces
2y ago
wazero works fine on Windows. In fact the exact same assembly works across Windows, macOS, Linux and FreeBSD: the calling convention used by the compiler is entirely custom, and all "host calls" are provided by wazero, so assembly
835.
▲
by
ncruces
2y ago
Comments extolling the virtues of LISP or the CLR in a Go thread are "not negative about Go"; they're simply off-topic. An on-topic, comment critical of Go would be: it's silly that cgo is considered so bad (why?) that p
836.
▲
by
ncruces
2y ago
I know. But you're not running //go:generate at runtime, and for Yaegi to gain a JIT... well, they'd have to implement much of what's in the blog. That's the point. Mind you, I wouldn't mind having a somet
837.
▲
by
ncruces
2y ago
So your point is that a Lisp that ships a JIT will help you implement a "copy-and-patch JIT" because "macros" and "code is data"? Let me point out that Go neither ships a JIT, nor has macros, so I really don&#x
838.
▲
by
ncruces
2y ago
That's patently false, or we wouldn't resort to all kinds of tricks to convince the (moderately smart) Go compiler to elide bounds checks (that we know to be unnecessary) from inner loops where they degrade performance significant
839.
▲
by
ncruces
2y ago
But do more countries actually build them?
840.
▲
by
ncruces
2y ago
> Not that Apple is providing, in essence, a report on the public radio spectrum. Of the entire world. Provided in a nice enough package that with a little patience researchers could collect the location 480 million devices. > Do h
More ›