News for hackers. Stuff that matters.
Re:A pure Go embedded SQL database by benhoyt on Saturday January 29, 2022 @06:18PM (#30131631)
The same author ("cznic") has also built a C-to-Go compiler/transpiler and used it to convert SQLite to pure Go source, so that it doesn't require CGo: https://gitlab.com/cznic/sqlite ... the converted Go code is pretty much unreadable and it's somewhat slower than SQLite via CGo. But a pretty neat idea! I use it in one of my projects and it works well.
Re:A pure Go embedded SQL database by eatonphil on Saturday January 29, 2022 @06:31PM (#30131730)
I saw that recently. I would be interested in using it but it wasn't clear what level of compatibility it has or how many tests it's passing/not passing.
Re:A pure Go embedded SQL database by benhoyt on Saturday January 29, 2022 @06:38PM (#30131785)
Yeah, fair concern. I saw a while back (looks like Aug 2020) that he got all 928,000 SQLite tests passing -- search for "0 errors out of" on this page: https://pkg.go.dev/modernc.org/sqlite#section-readme
Re:A pure Go embedded SQL database by eatonphil on Saturday January 29, 2022 @06:40PM (#30131804)
Wow! I'd almost trust it more if only 99% of tests were passing rather than 100% of tests passing. :)
Re:A pure Go embedded SQL database by benhoyt on Saturday January 29, 2022 @06:45PM (#30131846)
Hehe. Well, if you look at the previous release it shows 99.7% percent of (a smaller number of) the tests passing. So you've got the best of both worlds. :-)
Re:A pure Go embedded SQL database by eatonphil on Saturday January 29, 2022 @06:45PM (#30131849)
Nice. I'll have to give it a try.
Re:A pure Go embedded SQL database by mongol on Sunday January 30, 2022 @03:39AM (#30135106)
I think there are many tests used for testing sqlite that are not public. Hipp said so in a podcast I recall.
Re:A pure Go embedded SQL database by Beltalowda on Sunday January 30, 2022 @06:06AM (#30135877)
There's TH3[1], and you indeed need to purchase a license for that. The price is listed as "call"[2], so I guess it's not cheap.

[1]: https://sqlite.org/th3.html

[2]: http://www.hwaci.com/sw/sqlite/prosupport.html

Re:A pure Go embedded SQL database by oefrha on Saturday January 29, 2022 @09:17PM (#30133170)
Nice. I tried to cross-compile a Go app using SQLite for darwin/arm64 a couple months back and couldn’t figure it out for the life of me. Ended up just shipping a darwin/amd64 binary and letting Rosetta handle it. Will give this a spin when I have time.
Re:A pure Go embedded SQL database by preetamjinka on Sunday January 30, 2022 @12:02AM (#30134196)
I should write a blog post this but here’s what I do in GitHub Actions for a Go binary that uses SQLite: https://github.com/crossjoin-io/crossjoin/blob/main/.github/...