Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benhoyt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
121.
▲
by
benhoyt
3y ago
Yes, definitely. The first three chapters would be more than enough for that: 1) An Awk Tutorial, 2) Awk in Action, and 3) Exploratory Data Analysis. For most people who just want to use AWK for one-liners on the command line, you can stop
122.
▲
by
benhoyt
3y ago
I was privileged to be one of the technical reviewers for this book. There's a fair bit of the original content (which is still great), but Kernighan's done a great job with some good restructuring and some significant updates, to
123.
▲
by
benhoyt
3y ago
No, unfortunately the Gawk/awk --csv option doesn't support writing back to CSV. FWIW, GoAWK supports CSV input mode with "-i csv" and CSV output mode with "-o csv" for this purpose, as well as special syntax f
124.
▲
by
benhoyt
3y ago
> avoid quotes when generating them Yeah, I guess that kinda works if you're the one generating them. But you must not have too many generalised strings -- like a name field containing "Smith, John" or a book title like
125.
▲
by
benhoyt
3y ago
Unfortunately "awk -F," (field separator of comma) doesn't work with most real CSV files, because of quoted fields, commas in fields, and (less frequently) multiline fields. My GoAWK implementation has a CSV mode activated wi
126.
▲
by
benhoyt
3y ago
> This is at least the biggest release since 1.18 with generics, possibly bigger. I sort of see what you're saying, but then again, the addition of a couple of small generic packages (slices, map, cmp) and one larger package (log&#x
127.
▲
by
benhoyt
3y ago
It is a big release, and the number of new stdlib packages (4) is relatively high for a Go release. That said, apart from the addition of some minor builtins (min, max, clear), the language isn't changing. That happened back in 1.18
128.
▲
by
benhoyt
3y ago
It looks like sync/errgroup is a proposal, but not in the standard library (not yet, at any rate): https://github.com/golang/go/issues/57534
129.
▲
by
benhoyt
3y ago
I like (most of) this list! Note, however, that most of these are more for writing Python code, whereas my article was specifically about designing Python APIs -- that is, the public-facing stuff. A few specific comments on your points: >
130.
▲
Designing Pythonic Library APIs
(benhoyt.com)
9 points
by
benhoyt
3y ago
|
3 comments
131.
▲
Re-engineering a qsort function (part 1)
(raygard.net)
4 points
by
benhoyt
3y ago
|
0 comments
132.
▲
by
benhoyt
3y ago
Thanks for sharing! I do like the OP's article, but the more the merrier! My "How to implement a hash table in C" article [1] is for whatever reason one of my most popular articles. If only C had a slightly better standard li
133.
▲
The small web is beautiful
(benhoyt.com)
49 points
by
benhoyt
3y ago
|
0 comments
134.
▲
Program design in the Unix environment, by Pike and Kernighan (1984) [pdf]
(harmful.cat-v.org)
1 points
by
benhoyt
3y ago
|
0 comments
135.
▲
Periodically probe the network to detect when security assumptions are violated
(docs.netchecks.io)
2 points
by
benhoyt
3y ago
|
0 comments
136.
▲
by
benhoyt
3y ago
Indeed! I just saw this in a submission I was reviewing now. AI writing is well-structured but extremely boring and generic.
137.
▲
by
benhoyt
3y ago
I've been reviewing answers to questionnaires we send out to potential software engineering candidates. Sometimes candidates seem to write 90% of the submission themselves, and then use ChatGPT for the last couple of questions (which a
138.
▲
by
benhoyt
3y ago
Definitely a good change, as this fixes an issue I (and I think most Go developers) have been bitten by more than once. It was really interesting to read the response of someone from the C# team in the original discussion, of how C# had gon
139.
▲
by
benhoyt
3y ago
Good to know, thanks. Out of interest, why do you dislike Go's design philosophy? I can guess, but I'm interested to hear your take.
140.
▲
by
benhoyt
3y ago
I upvoted because this is interesting and I like simple compilers, but unless I'm missing something, this is only a lexer and parser. They mention "rgo was to use LLVM" in the README, and there's no type checker or compi
141.
▲
by
benhoyt
4y ago
It is definitely neat, but I think it's more than an exercise. I believe he runs it through the extensive SQLite test suite (I've seen that before, though I can't see where that's stated now).
142.
▲
by
benhoyt
4y ago
No: definitely not imminent, and probably never. Originally "Go 2" was the name for a real version 2.0 where the Go team would make breaking changes and fix any warts. However, over time they decided a big breaking release wouldn&
143.
▲
by
benhoyt
4y ago
Are you allowed to say what project/product it is? I'm curious. Do you use type annotations? I've found refactoring sooo much easier in statically typed languages like Go than in Python, even for medium sized projects.
144.
▲
Fascination with AWK
(maximullaris.com)
31 points
by
benhoyt
4y ago
|
3 comments
145.
▲
by
benhoyt
4y ago
You can use the "-h" (human-readable) options to du and sort to do this: $ du -sh * | sort -rh 20M dist 6.9M pebble 1.5M internal 308K cmd ...
146.
▲
by
benhoyt
4y ago
Yeah, I did the exact same thing and got very similar results. Just to save people clicking through, the Go/goroutine version is 25x as fast as Python. :-)
147.
▲
by
benhoyt
4y ago
I just checked one of the best "online-first" technical books I can think of, "Crafting Interpreters" by Bob Nystrom, because it uses side notes heavily. What it does when the screen width is narrow (like on a phone) is
148.
▲
by
benhoyt
4y ago
Yeah, this is a good point. I've previously just used the "hash in the URL" approach as it seemed more obvious than ETag. I asked Ben Johnson why his hashfs library uses both, and he said "Yeah, that's a good point.
149.
▲
by
benhoyt
4y ago
Heh, that's funny. I distinctly remember typing it in from scratch just the other day (no Copilot), and I guess it's short enough it sorta writes itself: the function name is kind of obvious, the name of "defaultValue" i
150.
▲
by
benhoyt
4y ago
Sorry if that wasn't clear. This was meant to answer it: > Fly.io looked more geeky and command line-oriented, which suited me, and their prices are also ridiculously low: free for up to three small virtual machines (I only need two
More ›