Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benhoyt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
181.
▲
by
benhoyt
4y ago
I'm a maintainer of some smaller open source projects -- you have to consider it from the project owner's point of view. To say they "shoot down ideas" is a negative way of saying it, but from their point of view they&#x
182.
▲
by
benhoyt
4y ago
Yeah, I agree with that. I had a significant feature included in the Python stdlib (os.scandir and related changes) and after it was included in 3.5, the core developers have made significant improvements to it (added "with statement&q
183.
▲
by
benhoyt
4y ago
This is of course generated code (output from the C to Go converter), so to "easily maintain" it, you'd edit the Tcl C source files and re-generate these. The generated Go code is committed to the repo so the person using the
184.
▲
by
benhoyt
4y ago
Is "ported" the right term here? It know the repo's README says "CGo-free port", but this is the C version of TCL transpiled from C to Go (see the ~13MB .go files per platform in the "lib" directory). Whic
185.
▲
by
benhoyt
4y ago
> Telling someone that you downvoted their comment is extremely toxic. Why so? "Extremely toxic" seems at the least an exaggeration, but I don't see why it's "toxic" at all. Rather than just merely downvotin
186.
▲
by
benhoyt
4y ago
Seeing people are sharing stories ... I'm a pretty healthy 41-year old, I live in New Zealand, got two Pfizer shots in late 2021, then got Covid in April 2022. It was like a bad flu, but I recovered from the main symptoms after a week
187.
▲
by
benhoyt
4y ago
Yes, taking the address of a local variable is exactly what it's doing. But Go's compiler (and garbage collector) ensures it's safe to do that. The compiler will allocate on the stack where possible, and the heap where necess
188.
▲
by
benhoyt
4y ago
I'm an experienced Go programmer and still accidentally do this every so often. It certainly bit me and my team several times when we were newish to Go. And particularly for newbies, it's hard to debug and understand when you do r
189.
▲
by
benhoyt
4y ago
What version of Go were you working with? As the post shows, things have improved a lot over the years.
190.
▲
by
benhoyt
4y ago
I find that difficult to believe, as the "What's New in Python 3.11" release notes ( https://docs.python.org/3.11/whatsnew/3.11.html ) don't mention "GIL" or "Global Interpreter Lo
191.
▲
by
benhoyt
4y ago
> Quoting a book as evidence that the book is true is tautological. I wasn't arguing that the books were true. I do believe that, but you'll note my reply above simply tries to show that your bold claim that "the earliest
192.
▲
by
benhoyt
4y ago
> The earliest known manuscripts of any biblical text post-dates Jesus by 300 years. It's easy to make bold statements, but that definitely doesn't match what most historians, Christian and secular, claim. (And I believe severa
193.
▲
by
benhoyt
4y ago
> plain English Agreed. LWN is really good at this, partly because their editors have really good "tech BS" detectors (learned this when I was writing for them). It means you really have to understand what you're saying an
194.
▲
by
benhoyt
4y ago
Strange. A couple of weeks ago I ordered one on the .uk site and shipped to a UK address. It was before this announcement, but it had Ubuntu 20.04 LTS pre-installed. I haven't picked it up yet so I can't confirm that it actually h
195.
▲
by
benhoyt
4y ago
Brian sent me a lovely (and surprisingly lengthy) reply. He noted that length() was already O(N), as onetrueawk just represents strings as NUL-terminated C strings and uses strlen() (though strlen is a lot faster than decoding UTF-8). Howev
196.
▲
by
benhoyt
4y ago
Yes, that's right. With my simplistic UTF-8-based implementation it turned length() -- for example -- from O(1) to O(N), turning O(N) algorithms which use length() into O(N^2). See this issue: https://github.com/benhoyt
197.
▲
by
benhoyt
4y ago
Anyone in the know care to summarize what this is more specifically, for those of us not eager to read 97 pages of legalese?
198.
▲
by
benhoyt
4y ago
I presume you're familiar with https://github.com/canonical/dqlite (made by my employer) and https://github.com/rqlite/rqlite (unrelated)? How will mvsqlite compare to those?
199.
▲
by
benhoyt
4y ago
I agree it's way too hard as a one-hour interview question! When I interviewed at Google a few years' ago I was asked to write a simple glob matcher that handled ? and * (like the one I've shown here: https://benho
200.
▲
by
benhoyt
4y ago
That's really nice clear code -- thanks for sharing. This would be great for small embedded systems.
201.
▲
by
benhoyt
4y ago
The "Garbage Collection" chapter in the OP's recent book Crafting Interpreters goes into this in a bunch more detail (in the context of a language VM): https://craftinginterpreters.com/garbage-collection.htm
202.
▲
by
benhoyt
4y ago
It does sound hectic, but it's not hell, because he loves what he does, and clearly loves his wife and kids. That sacrifice (on the part of him and his wife) is for those they love. I do think it's kinda weird to write his wife
203.
▲
Go discussion: standard iterator interface
(github.com)
2 points
by
benhoyt
4y ago
|
0 comments
204.
▲
The tools I use to build my website
(benhoyt.com)
2 points
by
benhoyt
4y ago
|
0 comments
205.
▲
by
benhoyt
4y ago
> TFA only talks about gawk, though, making this comparison meaningless Not exactly! To quote from TFA (I'm the author): > Another “optimization” is to run it using mawk, a faster AWK interpreter than gawk. In this case it’s abou
206.
▲
by
benhoyt
4y ago
Are you looking at the "simple" or the "optimized" versions? For the optimized, yes, the Go one is very similar to the C. For the simple, idiomatic version, the Go version [1] is much simpler than the C one [2]: 40 very
207.
▲
by
benhoyt
4y ago
The BK-Tree, which allows fast querying of "close" matches, such as Hamming distance (number of bits different). http://blog.notdot.net/2007/4/Damn-Cool-Algorithms-Part-1-BK... I wrote a Python library i
208.
▲
Before Fortnite, There Was ZZT: Meet Epic’s First Game
(howtogeek.com)
7 points
by
benhoyt
4y ago
|
0 comments
209.
▲
by
benhoyt
4y ago
I'm not sure if it was via my personal website or just my GitHub profile, but I got my current job at Canonical due to the CTO there reaching out about my GoAWK project ( https://github.com/benhoyt/goawk ). I get re
210.
▲
by
benhoyt
4y ago
This roughly matches my experience, though he doesn't really discuss the language differences in this article. Here's a similar kind of article I wrote a few years ago, "Learning Go by porting a medium-sized web backend from
More ›