HNHacker News
TopNewBestAskShowJobs

xh-dude

107 karma · joined December 18, 2019

submissionscomments
xh-dude··on Fide Women’s Grand Prix Collapses into “Chaos” as Players Withdraw
Women’s chess will be fine in any case. FIDE will take a hit.
xh-dude··on Analyzing multi-gigabyte JSON files locally
Use of Go’s runtime reflection to produce a struct definition would result in one instance of the key string, many instances of the numeric value

This approach is available/implemented in the standard library, the whole story with JSON in Go is includes a few different approaches but this is definitely anticipated.

xh-dude··on Transparent telemetry for open-source projects
I don’t like this example in particular because observing too much “restore” activity is an excellent piece of information.
xh-dude··on Transparent telemetry for open-source projects
Totally agree. Telemetry has been around and matured and benefits users. I’m not sure the benefits for Go would be as significant as other software but, really, why not?
xh-dude··on World Cup Daily, Day 25
The next stat line says “4,764 workers were killed on the job in the United States.” in 2020.

I’m not sure we’re given clarity here - rhetorically, ok, fine, but the math doesn’t line up quite this way.

xh-dude··on The case for dynamic, functional programming
I think it excludes exceptions: exceptions are a side effect
xh-dude··on Checkmate: Cheating Detection
An undercurrent here is how FIDE, steeped and mired in tradition, shepherds the sport alongside technological disruption, both in how the game is played and how it is enjoyed.

Magnus Carlsen would not be the first world champion to go to war with FIDE, and it’s surprising how recent stories don’t mention the surprising withdrawal-but-not-retirement of Carlsen from championship play here. Put together with the other puzzle pieces, ot feels like Magnus is trying to play a game that’s not on the board.

The last candidates tournaments and championship matches have IMHO been boring, over-prepared, extremely risk-averse, uninspiring stuff, and it’s not fun to watch Carlsen/Caruana/Nepo loaded like Atlas or Sysiphus. More enjoyable things happen in looser formats. So some disruption sounds good to me.

xh-dude··on My Dad and Kurt Cobain
+1 about Butch Vig, an incredible producer. Steve Albini, also incredible, did In Utero in a much different way. I get why Cobain would’ve liked the latter, I think Vig’s albums were all amazing though.

Nerding about the audio production, IIRC - Vig was using Dave Grohl’s drum tracks to trigger digital samples into reverb, mixing just the wet reverb in. Albini had a bunch of mics in weird places capturing room acoustics and mixed between them. Really different approaches and even if listeners don’t know, they hear it.

Cobain was such a tragic roman candle of talent, but I really think collaboration with producers was necessary to get albums as good as these. Somehow I suspect industry economics have changed in a way that I don’t think rewards elite producers assembling great albums, although digital tech lowers the cost and great sounding stuff still happens.

xh-dude··on Why UML “Really” Died
Oh, mermaid looks nice! I hadn’t seen it before. Thanks for mentioning it.

If UML tooling had just focused on diagrams, I would not revile UML.

xh-dude··on Irwin – the protector of Lichess from all chess players villainous
Definitely, random time is adding no correlation where it would count. Move time is an easily captured psychometric observation, the clever bit is that it’s intermingled with automated chess analysis.

Feels like there could be a lot of surprising inferences to think about here … just a few quick thoughts - how long does someone pause after a blunder, how does one react to unpredictable moves. Can definitely imagine AI being of significant utility here.

xh-dude··on How to build a chess engine
This is pretty tremendous: https://codegolf.stackexchange.com/questions/19397/smallest-...

Chess computing is one area where there’s a lot of attention to hard details as well as the algorithms, lots of gems like this in the genre

xh-dude··on Notes on structured concurrency, or: Go statement considered harmful (2018)
Hmm, the std lib uses channels for a variety of scheduling hook sorts of things - contexts, timers, os signals for example. That’s maybe just a little narrower than how Go users can use them - they aren’t really for transport, but for synchronization (just as useful for no or small payloads as large ones).

It doesn’t similarly expose mutexes that package clients have to fiddle with.

xh-dude··on Why America can’t build
My impression of Burja is that he’s better at the writing - there are always interesting details - than average but not generally a superior analyst.

For example: https://brief.bismarckanalysis.com/p/modern-russia-can-fight... has interesting and useful details but I think has been demonstrably and obviously short of similar analysis from experts in the field who are less certain but more reliable vis-a-vis outcomes.

xh-dude··on Supreme Court Overturns Roe vs. Wade
> I think that women who have sex and conceive children should be held responsible for raising those children.

The misery in situations where consensual decision-making isn’t the fact of the matter is IMHO tragically under-explored in this framing and in Alito’s opinion. Without respect to the legal and political status of Roe, I still think it was morally right where it limited government intrusion and authority.

Will you feel responsible for this kind of outcome when it occurs in America, as it has in the past and does in the world?

xh-dude··on Calling for Antitrust Reform
Maybe there’s a counterfactual timeline where Apple didn’t nuke Flash on phones, hmm… interesting to think about. I think I’m happier with apps rather than apps-in-the-browser in the end, and this might be a similar contrast - it’s technically interesting to have browsers do more or do everything but I’m not convinced it’s the best for users living in software ecosystems.
xh-dude··on A new programming language for high-performance computers
In the sense of - where Rust can do some amazing program transformations because it’s quite demanding about memory safety, ATL purports that if the math is all tensors, then there’s potential in program transformations based on automated reasoning about tensor formulae. Which no one needs for FizzBuzz but sounds like something worth exploring for HPC.
xh-dude··on Saving a Third of Our Memory by Re-Ordering Go Struct Fields (2020)
Is the situation for Rust different than as described here: https://github.com/rust-lang/rfcs/pull/208

“Currently, attributes and macros/syntax extensions are both conceptually macros: they are user-definable syntactic extensions that transform token trees to token trees.”

FWIW I definitely admit the point about Go compiler directives sort of cheating into this space a bit - I see them used responsibly for the most part but it’s a valid point. (Go’s struct tags OTOH, are an escape hatch I revile…).

xh-dude··on Saving a Third of Our Memory by Re-Ordering Go Struct Fields (2020)
Yeah - the tradeoff isn’t about the benefits in places where macros would solve problems, but the problem of having macros. It’s an opinion.
xh-dude··on Generics facilitators in Go
It seems significant (major? I dunno) that Go doesn’t have inheritance or subclassing or co-/contra-variance.
xh-dude··on Trying Out Generics in Go
My hunch is that Go packages will still work fairly well for isolating gory details. The guts of a package can get more complicated with generics but there is friction for consuming anything more clever than, like, ‘lists.NewLinkedList[myType]’ outside; further, the path towards cleverer and gorier cross-package APIs mostly goes through interfaces. In this way, underneath some new syntax, the concepts employed when using polymorphic type parameters largely resemble the status quo for dynamic dispatch.
xh-dude··on Go Replaces Interface{} with 'Any'
OTOH there’s no ‘while true’ or do-while or while-do, none of which are particularly fluent.
xh-dude··on Go Replaces Interface{} with 'Any'
I don’t think the concern is unreasonable at all but ‘any’ feels pretty solid as far as I’ve had the chance to poke around. There’s some tensions where I think ‘any’ is arguably much simpler:

The baseline is that constraints aren’t best expressed as interface literals in situ. Unlike exceptional use of ‘interface{}’, ‘any’ will be a more naturally invoked constraint.

Also, some of the uses of constraints rely on a unification involving an ‘any’ term that cancels out. Here, the use of ‘interface{}’ is not incorrect but maybe indirect.

xh-dude··on Tcl library for Go-style concurrency based on Communicating Sequential Processes
A subtlety I’m ok with here … channels are a a language primitive but, in terms of runtime, an opinionated composition of data and concurrency semantics; the opinions give the runtime some privilege to do some nice things without a lot of effort when using channels. The misuse of channels in a general sense tends to equate to factoring out of some of the elements composed into the channel primitive.

It feels like a lesser sin to use channels in clever ways to recreate mutexes or other patterns than the other way around. But it’s definitely true that they are juiced up to make tradeoffs that are morally wrong for some things.

xh-dude··on A rough proposal for sum types in Go (2018)
A reduced version of this is maybe where Go and Rust have a pretty similar contract for things that “Read” and lean hard into permitting partial success. Both allow for some relatively sharp edge cases with zero-sized reads.

The contract is always right … how well it is expressed through language mechanics is maybe another way to contrast things here. (FWIW I think Go could tighten up a few things - dropping or shadowing errors is a bit worrying - but I’m fairly convinced sum vs product is a little too harsh of a reduction; a useful distinction but not a complete one.)

xh-dude··on A rough proposal for sum types in Go (2018)
I feel like an object lesson here would be context.Context in Go, which sort of rhymes with Result types in a way … I figure this sort of programming in Go post-generics won’t emerge as uniform baseline but thematic variations will arise in some particular domains. But I really don’t know.
xh-dude··on Twelve Years of Go
I really think Go’s opinion here arises from a sense that some abstractions of control flow just should be verboten for concurrency. For example exceptions dumping a stack trace in a concurrent program is often OK and occasionally extremely cursed.
xh-dude··on Upcoming Features in Go 1.18
What frustrates me a bit about this argument is that interfaces really do offer a tool to solve problems around dispatch and polymorphism. Like a lot of things in Go there are lots of opinions and tradeoffs that can’t or can’t easily be revisited by someone using the language, but it’s a very different argument to say “I don’t like the tools the language provides” than “the language doesn’t provide x, y, z”.

IMHO there are convincing arguments that Go needs x, y, z (or: prefer another language if you need x, y, z). A good example of one of these that is being addressed would be priority queues. Doing them via interfaces was always possible - there’s a whole std lib package for them. Generics will be better. But looking at the pre-/post-generic ways of doing priority queues confirms and emphasizes, rather than negates, the utility of interfaces as a way of structuring code. It’s still opinionated and I think it’s fair to argue about alternatives but it’s absolutely not the case that some large class of reasonable problems was entirely ignored or forgotten.

xh-dude··on Printf(“%s %s”, dependency, injection)
Because passing messages still means dispatch on concrete types - something concrete sends a message, something concrete receives a message. That’s the whole ballgame - get one concrete type to talk to another. Even if ‘concrete’ is in a seemingly typeless language, we can Hindley-Milner our way down to this.

I think it’s telling that Go, Rust, as well as more inspired stuff in later editions of C++/Java/C# all seem to be demonstrating that nominal inheritance-first polymorphism is not the only or always the best maze of abstraction for getting to a concrete dispatch from type A to type B in imperative-feeling languages.

xh-dude··on Go’ing Insane: Endless Error Handling
There is no categorical presumption in Go that an error invalidates what would be boxed in a Result or Option.

I do think that what seems obviously true and categorical in the absence of concurrency is quite a bit more subtle when concurrent. It’s obvious when rewriting the kind of chains where ‘?’ makes perfect sense from sequential to concurrent invocation.

By no means do I think Go is perfect or can’t learn from Rust but I do think it’s important to consider the tradeoffs against Go’s colorless concurrency - it’s a very compelling affordance. Like garbage collection it’s easy to show the pros and cons in a codebase the size of a demonstration but at scale it’s a decision with pros and cons.

xh-dude··on Brooks, Wirth and Go
net/http is a great example.

The std lib is disciplined about using safe Go ideas except in the exceptional cases. I feel like it’s nothing that is enforced by the formal spec of the language, just that the std lib has an exceptional emphasis on making it really hard to walk away with misconceptions.

← PreviousPage 2 of 3Next →