Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ncruces
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
35 ms
·
541.
▲
by
ncruces
1y ago
Instead of focusing on bytes.Reader, the author could maybe propose that bytes.Buffer (which already has a Bytes method) implements Peek as well. bytes.Buffer already has many methods exposing the internal buffer, so one more is not insurmo
542.
▲
by
ncruces
1y ago
It's as good an opportunity as any to improve things. They're acting as selfish demanding you do something for them, as you are for refusing.
543.
▲
by
ncruces
1y ago
“I want this feature, someone should do it.” “These guys do it…” “Oh no, not those guys!” We could instead discuss the feature, but no.
544.
▲
by
ncruces
1y ago
Previous discussion: https://news.ycombinator.com/item?id=42013762
545.
▲
by
ncruces
1y ago
Then you want the Dacia Media Control. It has a phone holder where other trim levels would place the screen, and USB power around there. Other than that, the car is mostly Bluetooth a speaker. They actually have an app that allows you to tu
546.
▲
by
ncruces
1y ago
As an “insignificant” outside contributor to Go (I think I worked on half a dozen proposals and PRs), I can say just the same, even for things that in the end got dropped or rejected: polite, firm, informative; I'd add curious. Had a g
547.
▲
by
ncruces
1y ago
I love the idea behind that sorting visualization, and found it extremely useful to validate the properties of my Quicksort implementation. https://github.com/ncruces/sort
548.
▲
by
ncruces
1y ago
They were sufficient for me to implement most of `string.h` and get speedups between 4 and 16x vs “portable musl C code,” including sophisticated algorithms such as this one: http://0x80.pl/notesen/2016-11-28-simd-strfi
549.
▲
Show HN: SIMD Optimized Wasm Libc
(github.com)
3 points
by
ncruces
1y ago
|
0 comments
550.
▲
by
ncruces
1y ago
The first 3 are provided by Go, basically.
551.
▲
by
ncruces
1y ago
We (at least I) compensate for that by having 10k photos on it, which again makes it impossible to find anything. And if you decide to cull them because it's just too much, it's a chore.
552.
▲
by
ncruces
1y ago
The hashing algorithm is specified in the docs: s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] Per Hyrum's law, there's no changing it now. https://docs.oracle.com/javase/8/docs/api/java&#
553.
▲
by
ncruces
1y ago
Sure. Portugal is in deed completely “isolated” if it loses Spain, so it needs black start capability if it wants some degree of autonomy. As far as containing the issue, this was a disaster. On the flip side, this was as good an opport
554.
▲
by
ncruces
1y ago
I'm open to adding it to my driver, if people consider it essential. Every extra bit makes AOT compiling the Wasm slower (impacting startup time). I also wanna keep the number of variants reasonable, or my repo blows up. Add your votes
555.
▲
by
ncruces
1y ago
People reply to the “Good morning Vietnam” post with “OK, so the plan is working” and “you'll do in 60 days what you tried to do for a year.” Who are these people?
556.
▲
by
ncruces
1y ago
Even then, the interconnect capacity with France is currently 2800 MW (was 1400 MW in 2015) with just 3 links, all on the NE. If Portugal (on the West) had to wait for that, it would probably have taken even longer.
557.
▲
by
ncruces
1y ago
I expect those two (one CCNG, one hydro) are the protocol for a black start, but other hydros should have the capability should those fail.
558.
▲
by
ncruces
1y ago
Improving the libc that gets used when compiling C to Wasm (usually based on musl). https://github.com/ncruces/go-sqlite3/tree/main/sqlite3/libc
559.
▲
by
ncruces
2y ago
But each SQLite connection (even to the same DB) will also consume 2 FDs for the DB and the WAL. You'll more easily pool connections to the same DB, of course, but the difference might not be so stark.
560.
▲
by
ncruces
2y ago
I obviously meant "can't" not RFC 2119 "MUST NOT". I could list more sources, but I'll just leave you with these: https://go.dev/blog/package-names https://google.github.io/
561.
▲
by
ncruces
2y ago
Looking at the diagram for the SQLite VFS page I didn't think I was going overboard with designing my driver around 3 packages: https://sqlite.org/vfs.html One layer wraps SQLite C API, below it lives a pure Go VFS, an
562.
▲
by
ncruces
2y ago
But, don't you know you can't have a utils package either? A package must implement one functionality, and it must be clear from the short import name what that functionality is. A package is also the only way to enforce visibilit
563.
▲
by
ncruces
2y ago
Of course Go has warnings. It has go vet, which is not a linter, and according to the authors doesn't need comments to ignore checks, because the checks are always correct about you having written shitty code. Except where it might war
564.
▲
by
ncruces
2y ago
I'm not that great at long form writing to be honest, it's always a bit of a chore, and I'm never happy with the result. To answer your question, it needs a libc because you're including stdlib.h, and exporting and allo
565.
▲
by
ncruces
2y ago
SIMD within a register: https://en.wikipedia.org/wiki/SWAR It's generally used for techniques that apply SIMD principles within general-purpose registers and instructions. Assume you've loaded a 64-bit regist
566.
▲
by
ncruces
2y ago
A PR is a significant investment from me. I'd have to figure out where something like this is supposed to fit, how the build infra works, etc. One of the nice things about Go is how much that's a solved issue out of the box, compa
567.
▲
by
ncruces
2y ago
As far as Go is concerned, the Wasm sandbox makes the (addressable, C) stack explicit, which solves at least some of the issues CGO has to deal with. It's not a panacea, though; it introduces other issues.
568.
▲
by
ncruces
2y ago
Yeah, so far I did exactly the ones (my build of) SQLite needed and not others. If there's interest, the set of implemented functions can definitely be extended.
569.
▲
by
ncruces
2y ago
I'd like to be a little more sure that I'm not totally messing things up before doing that, but yes, eventually, that would be a nice outcome. I've also only really tested wazero. I can't know for sure that this is a
570.
▲
Show HN: (bits) of a Libc, Optimized for Wasm
(github.com)
78 points
by
ncruces
2y ago
|
16 comments
More ›