Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benhoyt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
241.
▲
by
benhoyt
4y ago
That may have been more true years ago, but now quoting is pretty well defined with RFC 4180, and most tools seem to produce and consume RFC 4180-compatible CSV (which properly handles commas, quotes, and even newlines in fields). That said
242.
▲
by
benhoyt
4y ago
That's written in Python and uses the "agate" library which uses Python's built-in "csv" module. I did a couple of simple benchmarks against Python's csv module in the article: https://benhoyt.c
243.
▲
by
benhoyt
4y ago
If you're just using AWK features, mawk is still the fastest. GoAWK is faster than awk in most cases, on a par with gawk, but still not as fast as mawk (see https://benhoyt.com/writings/goawk-compiler-vm/#virt
244.
▲
by
benhoyt
4y ago
Fair comeback. I think of CSV as modern, but Wikipedia tells me it's almost as old as AWK (depending on how you count). It seems to me it's used more heavily now as an exchange format, compared to say 15-20 years ago, but I could
245.
▲
Modernizing AWK, a 45-year old language, by adding CSV support
(benhoyt.com)
258 points
by
benhoyt
4y ago
|
143 comments
246.
▲
by
benhoyt
4y ago
In Kiwi (New Zealand) slang we often add "as" to adjectives, like "sweet as" or "good as" to mean "no problem!" or similar ... without something after the "as" to compare it to (kind of like
247.
▲
by
benhoyt
4y ago
Thanks for that! zsv looks amazing. Yeah, it's definitely going to whip GoAWK, what with SIMD parsing and careful memory handling. I've done a couple of basic things for GoAWK's CSV performance, but haven't profiled or l
248.
▲
Show HN: Adding proper CSV support to AWK
(benhoyt.com)
7 points
by
benhoyt
4y ago
|
1 comments
249.
▲
A Faster Lexer in Go
(eli.thegreenplace.net)
1 points
by
benhoyt
4y ago
|
0 comments
250.
▲
by
benhoyt
4y ago
Huh, today I learned that there's a difference between a B-tree and a binary (search) tree, or at least, that the B-tree is a generalization of a binary tree where the nodes have multiple elements for efficiency. I'd always though
251.
▲
by
benhoyt
5y ago
https://benhoyt.com/ - mainly a place to share my Go and Python technical writing and open source projects (also has my CV/resume). Basic GitHub Pages static website with custom template. Uses GoatCounter for analytics
252.
▲
by
benhoyt
5y ago
Fair. Strictly speaking it doesn't even "contain" a URL. But I think in the context of this conversation it acts like a URL -- it allows the Go tooling to fetch code from an arbitrary domain and path on the internet.
253.
▲
by
benhoyt
5y ago
It may not be quite a URL, but it contains the URL. It definitely more than just "sort-of resembles a URL". See how the module path to URL lookup is done here: https://go.dev/ref/mod#vcs-find
254.
▲
by
benhoyt
5y ago
Why would there be hours of audio/video, and why would the employees be recording this? Presumably they're working, not holding up their phones recording. Or are you referring to security camera footage? But that wouldn't hav
255.
▲
An Introduction to Generics in Go 1.18
(go.dev)
12 points
by
benhoyt
5y ago
|
0 comments
256.
▲
by
benhoyt
5y ago
> there is absolutely zero chance anyone on the other end is going to take the time to actually read and evaluate each of them This is understandable to think, but is simply wrong -- I know because I'm a software engineer at Canonic
257.
▲
by
benhoyt
5y ago
But the fact remains that it's a productive language with excellent tooling and fast build times, and a lot of people really like working with it (myself included). I believe the reason it has gotten as far as it has without generics i
258.
▲
by
benhoyt
5y ago
TIL about pz (kind of like this but using Python) -- that's very cool! https://github.com/CZ-NIC/pz
259.
▲
by
benhoyt
5y ago
Yeah, I don't disagree: > Should you use Prig? I’m not going to stop you! But to be honest, you’re probably better off learning the ubiquitous (and significantly terser) AWK language.
260.
▲
Show HN: Prig – like AWK, but uses Go for “scripting”
(benhoyt.com)
77 points
by
benhoyt
5y ago
|
17 comments
261.
▲
Prig: Like AWK, but uses Go for “scripting”
(benhoyt.com)
2 points
by
benhoyt
5y ago
|
0 comments
262.
▲
Moving Python's Bugs to GitHub
(lwn.net)
15 points
by
benhoyt
5y ago
|
0 comments
263.
▲
by
benhoyt
5y ago
I had an ideal along these lines a while back that I called "nibbleforth": https://github.com/benhoyt/nibbleforth
264.
▲
by
benhoyt
5y ago
I was a reader of Paul Graham's essays and website, which I believe is where I heard about it. Or it might have been reddit (which I'm sure I heard about via PG). I joined Reddit on January 25, 2006 and HN on February 21, 2007.
265.
▲
by
benhoyt
5y ago
I very much appreciate this site, the stuff I've learned and been able to share, and the excellent just-the-right-amount moderation. I just checked, and it looks like I joined on 2007-02-21, cool!
266.
▲
Frawk: A fast, JITted, statically-typed AWK written in Rust
(github.com)
145 points
by
benhoyt
5y ago
|
38 comments
267.
▲
What's Coming in Go 1.18
(lwn.net)
3 points
by
benhoyt
5y ago
|
0 comments
268.
▲
What's Coming in Go 1.18
(lwn.net)
4 points
by
benhoyt
5y ago
|
1 comments
269.
▲
by
benhoyt
5y ago
That's excellent! Those all look like pretty nice small code changes that all add up. I especially like the very small "avoid copy" change ( https://go-review.googlesource.com/c/go/+/355789 ) tha
270.
▲
by
benhoyt
5y ago
Yeah, that's a good idea, I did consider it, but haven't tried it yet. Do you hook and look at the regex string before it's compiled, or do you hook in at the parsed regex AST level? (eg: regexp/syntax in Go).
More ›