HackerTrans
TopNewTrendsCommentsPastAskShowJobs

gabesullice

no profile record

comments

gabesullice
·2 месяца назад·discuss
One of my favorite projects that I ever worked on was an project that is really reminiscent of this. The project was to create a browser-based educational tangram[1] puzzle game for kids. It was filled with neat mathematical challenges like how to implement "snapping" between puzzle pieces. The most interesting was how to detect when a puzzle was "complete" or "incorrect" since there can be multiple valid solutions (and I didn't want to find them all) and the library had to accommodate the addition of new puzzles, meaning the approach had to be generic.

We ended up with some rules like "all puzzle pieces must be adjacent to another puzzle piece", "no puzzle piece may overlap another puzzle piece", and "all puzzle pieces must overlap the silhouette" (the puzzle goal), and "no piece may partially overlap the silhouette".

I didn't really know how to detect "overlap" reliably so I ended up implementing some heuristic methods. I remember tearing my hair out over the way JavaScript numbers worked and figuring out how to reliably compare floating point numbers. Good times.

The github repo for the library is still around. Last commit... 9 years ago, woof, time flies! And of course one of the last commits is "Fix overlap bug". Figures.

[1] https://en.wikipedia.org/wiki/Tangram [2] https://github.com/gabesullice/libshapes
gabesullice
·2 месяца назад·discuss
It's been confusing to me that so many people have treated markdown as the lingua franca for agent instructions when their training corpus must be dramatically biased to HTML instead of Mardown.

Markdown only makes sense for us meatbags becuse it's easy for us to edit and version control, but if you're sharing anything where the audience is an agent publicly, HTML must be just as interpretable.
gabesullice
·10 месяцев назад·discuss
To be clear, I'm not wishing for evidence of whether RTO is good or bad.

I want evidence that proves "it's about cheap layoffs" or "it's about real estate" or "it's because they want to monitor people" or "<insert any speculative reason on this thread>"

Once we have evidence"it's about layoffs" then we can debate whether it's ultimately helpful or harmful to cull headcount that way.
gabesullice
·10 месяцев назад·discuss
I'm genuinely interested in why RTO is trending. I searched Harvard Business Review, Gartner, and other sources just last week trying to find the rationale, but I wasn't successful. In fact, I found those sources to be a little cautionary. E.g., they say "if you do switch to in-office or hybrid, make sure you actually have metrics to evaluate the effects" and "ensure it makes sense for the actual work to be done by each role".

I also found results suggesting flexible working policies had positive properties like higher employee satisfaction, retention , and a wider applicant pool.

I'm not interested in hearing why the choir here at HN thinks companies are making these decisions, I want to see evidence of their rationale so I can put myself in management's shoes.
gabesullice
·10 месяцев назад·discuss
For an actual view of the syntax not behind a sign-in wall: https://thephp.foundation/blog/2025/08/05/compile-generics/
gabesullice
·10 месяцев назад·discuss
I might be too late for you to see this, but I'm curious why your final example requires the function "f" to receive the canWrite channel. I must be missing something. Couldn't the Ordered map signature be:

  func OrderedLoop[A, B any](in <-chan A, done chan<- B, n int, f func(a A))
Instead of:

  func OrderedLoop[A, B any](in <-chan A, done chan<- B, n int, f func(a A, canWrite <-chan struct{}))
Or is there a reason that "f" can't be wrapped in an anonymous function to handle the blocking logic?
gabesullice
·10 месяцев назад·discuss
Jeff is a treasure! https://youtube.com/@jeffgeerling
gabesullice
·2 года назад·discuss
I wish society would stop viewing punishment as a tool for the greater good, whether as revenge or as something that will "correct" the criminal.

Treating it as a correction feels like a lie that polite society tells itself in order to absolve itself of the distaste of knowingly harming someone. We shouldn't pretend we can "re-educate" anyone. We can merely provide opportunities for self improvement, but we can't actively "correct" them.

On the other hand, treating punishment as revenge is unhealthy too. It's too easy to get carried away and it's even easier to get carried away by perverse incentives (gestures broadly at US incarceration rates). Two wrongs don't make a right, as they say.

So then how should society decide what punishment is fair? I believe the punishment should be as harsh as an elected judge feels is necessary for the perpetrator to think, "it wasn't worth this"—and not a bit more.

Isn't that using punishment as a deterrent? It's easy to see it that way, but no. That would make punishment impersonal again— unbinding it from the specific person, place, and circumstance that we should elect judges to consider carefully and compassionately. In other words, when one says, "the perpetrator should be punished {this much} to deter the others", then the perpetrator becomes a pawn, not a person.

All that leads me to believe that: the purpose of a punishment should be to inflict a harm equal to the perceived personal benefit of the perpetrator's crime, as an enforcement action of the social contract between the perpetrator and society.
gabesullice
·3 года назад·discuss
History is a helix :)