Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benhoyt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
211.
▲
How efficient can cat(1) be?
(ariadne.space)
74 points
by
benhoyt
4y ago
|
49 comments
212.
▲
by
benhoyt
4y ago
Yep, you're right, thanks for the clarification. I was simplifying (never a good idea for a highly technical audience :-) because most people haven't heard of threaded code but have heard of bytecode. My Third compiler used direct
213.
▲
by
benhoyt
4y ago
My dad, who was a minister by day and Forth hacker by night, got me into programming when I was a teenager, and Forth and x86 assembly were my first languages. I wrote a small self-hosting Forth compiler for 8086 DOS ( https://git
214.
▲
by
benhoyt
4y ago
While I love the tech behind this (as well as the good article and fun demo video), I'm very skeptical that this will be a good approach for most web apps. I hope it doesn't turn into Python programmers suddenly pulling in 7MB of
215.
▲
Introducing PyScript (summary of PyCon keynote)
(lwn.net)
402 points
by
benhoyt
4y ago
|
234 comments
216.
▲
by
benhoyt
4y ago
I think your pushback is good - I didn't think the explanation about multiple cores made sense either. The Go runtime doesn't magically spread things across cores. However, I don't think your sarcasm helps the conversation.
217.
▲
by
benhoyt
4y ago
Berry's response to that (and similar) letters is quite sharp, but fair, I thought: > I am also surprised by the meanness with which two of these writers refer to my wife. In order to imply that I am a tyrant, they suggest by both d
218.
▲
by
benhoyt
4y ago
> And it's not even compiling and optimizing and linking, it's just transpiling typescript to javascript. It's ridiculous. It's ridiculous to think we can't do better. I don't do (much) frontend development,
219.
▲
by
benhoyt
4y ago
Compatibility: so it can run all the existing AWK scripts without modification, and people can refer to existing AWK documentation when writing scripts, and they'll just work under GoAWK. For a 45-year old language, it's actually
220.
▲
by
benhoyt
4y ago
> Somebody is forgetting that comparison and arithmetic operators are an interface on a type, and that almost every popular language (even many that are ostensibly “statically typed”) have ubiquitous nightmare scenarios surrounding impli
221.
▲
Duck typing is safe (2020)
(jerf.org)
58 points
by
benhoyt
4y ago
|
79 comments
222.
▲
by
benhoyt
4y ago
A beautiful, big full moon was visible over Christchurch, New Zealand tonight, and I was just talking about this with the kids. It fascinates me that scientists have sent us up to the moon, but can't figure out exactly why it appears b
223.
▲
by
benhoyt
4y ago
Odd, I find the standard library very full-fledged and useful, including the strings package. I've almost never needed to reverse a string, except in interviews. :-) The stdlib has a full (and good) HTTP server with HTTP/2 and TLS
224.
▲
by
benhoyt
4y ago
I think you forgot the "hasA" type on the var line. Fixed: https://go.dev/play/p/0Amm7nd1Av4
225.
▲
by
benhoyt
4y ago
My thoughts on his points, from someone who really likes Go and has used it heavily on small and large projects (1M LoC): 1. Probably a matter of taste, but I love this feature, just because of the lack of noisy public/private keywords
226.
▲
by
benhoyt
4y ago
I highly recommend you learn the basics of AWK, which is a little language that lets you match on and run commands on every line of input (so AWK "scripts" are usually one-liners). The very basics can be learn in 5-10 minutes, t
227.
▲
by
benhoyt
4y ago
You're not wrong, I should have just said .gz (though that really wasn't my point :-).
228.
▲
by
benhoyt
4y ago
> I thought if you use compression, you'll always lose at least a small amount of data. Or is that a fundamental misunderstanding? Yeah, that is a misunderstanding. There's lossless compression and lossy compression. For images
229.
▲
by
benhoyt
4y ago
> you actually get to choose whether you put things on the heap or stack I think I know what you mean, but this isn't strictly true. In Go, the compiler decides for you, and you don't have to worry about it. The compiler alloca
230.
▲
by
benhoyt
4y ago
Definitely agree. I really like that ripgrep is fast, but I mainly use it for its better UX for what I do every day: search code. If ripgrep wasn't any faster than grep, but was still recursive by default and ignored .gitignore et al,
231.
▲
by
benhoyt
4y ago
Just my two cents as someone who isn't associated with Sourcegraph: I also thought this comment was overly snarky and not exactly true. Their main product is a really good code search/navigation tool, and even Code Insights is har
232.
▲
by
benhoyt
4y ago
This is definitely true, and I wouldn't fault anyone for using Ruby or Python to write the initial version of their startup. However, there's a difference between initial productivity and ongoing productivity (maintenance). Static
233.
▲
The Tools I Use to Write Books (2018)
(thorstenball.com)
170 points
by
benhoyt
4y ago
|
39 comments
234.
▲
What I didn't do to write a book (2017)
(thorstenball.com)
1 points
by
benhoyt
4y ago
|
0 comments
235.
▲
by
benhoyt
4y ago
Yeah, this seemed fishy to me too (I made a similar comment here: https://www.reddit.com/r/golang/comments/uo5mix/comment/i8dn... ). It seems the mattn/cgo version is doing a constant amount of
236.
▲
by
benhoyt
4y ago
I've now updated the benchmarks to avoid huge.csv: the write benchmarks now write a big 1GB, 20-column CSV and the read benchmarks use that same CSV: https://github.com/benhoyt/goawk/commit/07eb4505a7f64c
237.
▲
by
benhoyt
4y ago
I'm not considering adding general structured formats like XML or JSON, as they don't fit AWK's "fields and records" model or its simplistic data structure (the associative array) very well. However, I have consider
238.
▲
by
benhoyt
4y ago
Ah, true -- that would be a good comparison to do, or section to add the the docs (csv.md in the repo). I'll add it to my to-do list!
239.
▲
by
benhoyt
4y ago
Yep, this works fine (in GoAWK, gawk, and mawk, though not in original awk): $ cat t.usv && echo id␟name␟age␞1␟Bob "Billy" Smith␟42␞2␟Jane Brown␟37 $ goawk -F␟ -vRS=␞ -vOFS=, '{ print $1, $2, $3 }' t.us
240.
▲
by
benhoyt
4y ago
Thanks. I haven't tried this, but it should actually work already in standard AWK input mode with FS and RS set to those Unicode separators. I'll test it tomorrow when back at my laptop.
More ›