Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
0xjnml
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
0xjnml
4y ago
> ... especially in Golang where cleanup deferrment is encouraged and touted in lots of example code Go's os.File is not a plain file descriptor. It can be safely closed more than once and will close the underlying FD only the first
62.
▲
modernc.org/sqlite: support registering scalar SQL functions written in Go
(gitlab.com)
1 points
by
0xjnml
5y ago
|
0 comments
63.
▲
by
0xjnml
5y ago
No, a simple conversion can create an interface containing a typed nil. No need for the reflect package, neither messing with internal representation: https://go.dev/play/p/HGVNzf8gL-m
64.
▲
by
0xjnml
5y ago
FTR: I'm not affiliated with nic.cz, even though I worked there 10+ years ago.
65.
▲
CGo-free SQLite Go database/SQL driver v1.13.0 released
(gitlab.com)
4 points
by
0xjnml
5y ago
|
2 comments
66.
▲
by
0xjnml
5y ago
The release adds a newly supported target - freebsd/amd64.
67.
▲
by
0xjnml
5y ago
> ... Java-derived languages (C#, Swift, Golang, Kotlin) ... Swift and Go do not belong to that list.
68.
▲
by
0xjnml
5y ago
Goroutines are asynchronously preemptible since Go 1.14, released February 25th, 2020. https://blog.golang.org/go1.14
69.
▲
by
0xjnml
6y ago
1) Go string type is specified as a sequence of bytes. Full stop. Any encoding, binary blob, string does not care. Particular stdlib string functions _do_ care, expect UTF-8 encoding and document the fact. Other stdlib string function work
70.
▲
by
0xjnml
6y ago
> Not a deal-breaker; but a native implementation of sqlite in golang would be a lot nicer. CGo-free SQLite for Linux: https://godoc.org/modernc.org/sqlite
71.
▲
by
0xjnml
6y ago
Yes it is. The driver uses the original sqlite3.c code mechanically translated to Go.
72.
▲
CGo-free SQLite Go database/SQL driver for Linux/amd64 v1.4.0-beta1 is released
(gitlab.com)
2 points
by
0xjnml
6y ago
|
2 comments
73.
▲
by
0xjnml
7y ago
FTR: The go/parser package was _never_ used by the Go compiler. It used to be a yacc generated one when the compiler itself was in C. Then it was all mechanically translated to Go. And finally, a hand written lexer and parser were adop
74.
▲
by
0xjnml
7y ago
Go strings are just a sequence of bytes in no particular encoding, i.e they can contain arbitrary data. Converting strings to byte slices and vice versa works always without ever changing a single bit.