Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ncruces
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
511.
▲
by
ncruces
1y ago
Partly the neighboring country. Between Spain and Portugal there's 10 GW (~20% or peak load) and 100 GWh of storage (enough for a day's worth of consumption). But that takes time and requires some rebalancing, because much of that
512.
▲
by
ncruces
1y ago
How's tool support these days to create compress a file with seekable zstd? Given existing libraries, it should be really simple to create an SQLite VFS for my Go driver that reads (not writes) compressed databases transparently, but t
513.
▲
by
ncruces
1y ago
Try one of these: strftime('%Y-%m-%dT%H:%M:%SZ') strftime('%Y-%m-%dT%H:%M:%fZ') You can use this to convert whatever internal format you're using for presentation, in a SELECT statement. Like so (be sure to
514.
▲
by
ncruces
1y ago
Why not link to the most recent version? https://sqlite.org/lang_datefunc.html
515.
▲
by
ncruces
1y ago
I have a growing feeling that the only way to be fair in these situations is to be completely random.
516.
▲
by
ncruces
1y ago
I can't either. Having implemented this, I'll claim that this is already competitive for needles as small as 2 bytes, and if the needle doesn't show up in the first couple “vector sizes” of the haystack. Also, look at burnt
517.
▲
by
ncruces
1y ago
Did you look at the algorithm 1? The setup code is a pair of splats. There's no consideration for alignment, it works with unaligned data just fine. So what do you mean? What threshold would you expect for it to be worth it (assuming i
518.
▲
by
ncruces
1y ago
Here, it's often the opposite. These algorithms are basically brute force with very little setup, and can become quadratic for large, periodic needles. String search algorithms that avoid quadratic behaviour (and may even be sublinear)
519.
▲
by
ncruces
1y ago
If you're interested in a rough benchmark, I compared musl's “two way” with a variation on this algorithm for my SIMD optimized libc linked in a sister comment. The benchmark involves finding this line in that file: https:/&
520.
▲
by
ncruces
1y ago
Could you summarize your algorithm? Like a high-level description? Like algorithm 1 (from the article) checks N possible positions at a time by matching the first and last character; algorithm 2 instead tests the 4 leading characters.
521.
▲
by
ncruces
1y ago
I implemented these in my attempt to SIMD optimize Wasm/WASI libc. https://github.com/ncruces/go-sqlite3/tree/main/sqlite3/libc For known haystack lengths, and large needles, I found it useful
522.
▲
by
ncruces
1y ago
I'm sure people who, idk, have to clean up office toilets, do it because it's meaningful and fulfilling.
523.
▲
by
ncruces
1y ago
And then you must know (if this is a system: store ) the person's preferred gender, and in some cultures marital status.
524.
▲
by
ncruces
1y ago
Well, I personally find title + surname the worst; it's obnoxious and elitist; my (first) name isn't "engineer". I can live with it, though. I just kinda hate people who demand it of others. So, clearly, you can't p
525.
▲
by
ncruces
1y ago
You have the same, automatic deferral, with cars. But if you're in a crash, and it's a total loss, you can depreciate faster, which is helpful because you might need to buy a new one. So, since they're assets, can we write of
526.
▲
by
ncruces
1y ago
If a software project fails can we claim depreciation, like after a car crash?
527.
▲
by
ncruces
1y ago
This is a good point. A string search algorithm that uses SIMD to do quickly discard a majority of 16, 32 or 64 attempts in parallel, and then verify the surviving ones quadratically (again 16, 32 or 64 bytes at a time) can go a very long
528.
▲
by
ncruces
1y ago
Would you have gotten to be where you are now, if AI would've always been there writing this code for you? Would you have been able to review it for its faults, had you not experienced the pain of committing some of them yourself, or b
529.
▲
by
ncruces
1y ago
It this really bothers you, convince your team to use courtney and focus on the more relevant error branches: the ones where (1) a novel error value is produced or (2) handled rather than those that simply bubble it up. https://g
530.
▲
by
ncruces
1y ago
I didn't. If you wanna save money, you figure it out. If you don't wanna figure it out, you leave money on the table. They're selling (negative) convenience, but that's pretty much by design.
531.
▲
by
ncruces
1y ago
> Why am I forced to understand your made up currency and status system to get the full value of my money. You're not forced. This allows them to make extra money from people who don't bother, and offer discounts to price consc
532.
▲
by
ncruces
1y ago
The short term spanning multiple decades undermines the argument.
533.
▲
by
ncruces
1y ago
https://sqlite.org/wasm/doc/trunk/index.md
534.
▲
by
ncruces
1y ago
People apparently can't decide if AI is killing juniors, or if it's lowering the bar of what laymen can achieve.
535.
▲
by
ncruces
1y ago
Google Glass development never really stopped. The enterprise editions where on sale for years. They were shelved around the time work on these translation glasses was announced.
536.
▲
by
ncruces
1y ago
Go can decode numbers losslessly as strings: https://pkg.go.dev/encoding/json#Number json.Number is (almost) my “favorite” arbitrary decimal: https://github.com/ncruces/decimal?tab=readme-ov-file
537.
▲
by
ncruces
1y ago
This stores the UDFs in the database. Which means each database can have its own UDFs. This makes more sense if you're someone who hosts the databases of others, but I it's still interesting otherwise. Like, if something like th
538.
▲
by
ncruces
1y ago
It's just SQLite Cloud trying to get in on the AI fever: https://sqlitecloud.io/ai
539.
▲
by
ncruces
1y ago
> Databases with journal_mode=wal cannot be modified via LiteVFS (but can be read) Without modifying SQLite (what the Turso guys did), the WAL index is hard (but not impossible) to share across a network boundary. I'm guessing that&
540.
▲
by
ncruces
1y ago
> No. Ask yourself, if I install distro <pick one>, can I run a complex binary from 2015 on it? Does a Go binary count? Half joking, but this is why “builds statically, only depends on syscalls” is making inroads. Also applied to s
More ›