Better HN
topnewbestaskshowjobs
Log inSign up

ghusbands

3,089 karma · joined Aug 8, 2011 (15y ago) · 958 submissions

JS, C#, HTML, language implementation.
Submissions

comment 1w ago · link · parent

I find it striking that the article provides this enthusiastic example of a new feature:

  HashSet<string> names =
      [with(StringComparer.OrdinalIgnoreCase), "Alice", "ALICE", "Bob"];
  Console.WriteLine(names.Count); // Writes "2"
It's "good" that we have a hashset with syntactically four entries and no error/warning about duplicate keys and it ends up with just two and that there's an entry "with(...)" that's not actually an entry. And that's even before we get into how something called a StringComparer is providing a hash function and how OrdinalIgnoreCase is an underdefined upper-casing system rather than a true case-folding one, even if those are historical.

comment 2w ago · link · parent

You seem to be talking about something different. The conversation is about vehicles with four wheels and the differences between 4WD and AWD in that context. Perhaps you're saying that there is no difference?

But 6x4 notation is handy when you have six wheels, sure.

comment 3w ago · link · parent

I've written a few Pratt parsers in my time. You don't need a lexer and you can have more parser states than are implied by 'nud' and 'led'. They can be incredibly extensible. For example, if you can parse the expression "{a:1, b:2}" then you might naturally have an Expr state (nud), a Between state (led) and a DictKey state; that might initially accept just an identifier and a colon before recursing into Expr state, but you could later add dynamic expressions, perhaps via a macro, to support [expr] as a key.

comment 3w ago · link · parent

The announcement says "and the glasses decode them to text at the speed of speech."

From your other comments, the glasses do not decode them (that's done in the cloud) and there's noticeable delay that would prevent conversational use. Could you clarify what you meant?

comment 1mo ago · link · parent

Starfox had similar dialogue and predated it and MGS was contemporaneous, so the claim it makes it "modern" is weird. It's just "Zelda OoT if a different team made it".

comment 1mo ago · link · parent

You comment on this subject regularly in this way, but opinions do vary. Rob Pike says Go is not purely memory safe under concurrency. I as someone who has written multiple languages would describe it as "memory safe except for a pointer-skew hole undermining concurrency" or maybe say "race-free Go is memory-safe".

Seeing a correctness issue that makes Go not memory safe in some circumstances warrants questioning whether it is memory safe. On balance, you might say it is, but to constantly tell people they are wrong for saying otherwise is policing a shared term.

comment 2mo ago · link · parent

> The new simd package hides these differences by removing fixed-size vectors from the type system, and by only supporting those operations that are in the intersection of all the different platforms, and fills gaps in the intersection with efficient emulation in terms of other SIMD instructions.

The intersection would be the operations supported by all platforms and so would not have gaps.

comment 2mo ago · link · parent

Isn't one of the bugs around ten years old, now? Isn't ten years enough to call something a feature of the language rather than a bug?

I like Rust, but with this bug existing for so long, I personally no longer think of it as memory-safe.

comment 2mo ago · link · parent

This argument comes up a lot. It would turn everyone whose device became part of a botnet into a criminal. There's a reason that intent is important in law.

comment 2mo ago · link · parent

You're referring specifically to tracing garbage collection. When a reference count reaches zero, that garbage is collected, often recursively. Among programming language designers, ARC is considered a GC strategy.

https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...

https://users.rust-lang.org/t/reference-counting-garbage-col...

comment 2mo ago · link · parent

It's even more fatiguing to see so many comments about whether something is LLM-written or human-written. I hope we get past this stage, soon.

comment 3mo ago · link · parent

So someone used lower() from an unspecified version of Unicode when the standard was very specific about which to use. And they say "There's also a database of Unicode 3.2.0 data available on every version of Python (unicodedata.ucd_3_2_0) specifically for the StringPrep and IDNA algorithms", so the right version is available.

And then the fix is to hardcode a bunch of special cases which again depend on exactly which version of Unicode is in use, and so will break again in the same way in future, rather than just using the right version?

comment 3mo ago · link · parent

Refcounting is indeed a form of GC (and the languages that want to handle cycles then need an extra form of GC on top of it).

comment 3mo ago · link · parent

Regular expressions aren't an algorithm. DFA/NFA-based matching and backtracking are both valid implementation strategies, with different performance characteristics. Backtracking is arguably the most intuitive direct implementation. You and the other poster are confusing the mathematical definition with algorithms used to perform matching.

comment 3mo ago · link · parent

So, on a news discussion site, active discussion gets penalised. There really should be a human in the loop on that one.

comment 3mo ago · link · parent

The article now says "[UPDATE, SATURDAY 8 AUGUST: Consider this entire story retracted for now. Details forthcoming.]"

comment 3mo ago · link · parent

In common usage, "regex" means patterns accepted by regex engines like PCRE. Police the formal term "regular expression" if you like, but ordinary usage does not honour that distinction.

Also, it's not guaranteed that an engine implementing regular expressions will have O(n) time complexity - a backtracking engine can still have much worse performance on formal regular expressions.

comment 4mo ago · link · parent

Every optimisation like this increases the chance of other optimisations/vectorisations being able to usefully fire, and sometimes these very specific cases are themselves from optimisations or type/range restrictions.

comment 7mo ago · link · parent

Do you posit that there are enough examples of 30x8 ellipses encoded in braille online for ChatGPT to learn from but not 31x7 or 31x9 ellipses? That seems unlikely.

comment 7mo ago · link · parent

They lost me a little before then - Claude Code's regressions were so very obvious and there's no sign they've learned their lesson in this article or in the comments of those who work on Claude Code on HN. They'll continue to tweak and generally mess around with a product people are using, altering the behaviour without notice in ways that can severely impact use, for months! GPT5.4 has been remarkably consistent and capable, as a replacement. I've cancelled my max plan.

comment 7mo ago · link · parent

In the video in question, he doesn't seem able to choose a good scoring function for the stochastic solver (even over multiple weeks), seemingly choosing a linear sum of distances (see 8:50) between simulation and reality. That's a mistake that not even an undergraduate should make. He needs some domain experts.

comment 7mo ago · link · parent

Partly, it's simply that words matter. An interpreter is not a compiler, even if partial evaluators and Futamura transforms are very cool. Posting about them in a context that isn't a confusion about what interpreters are may have been more fruitful.

comment 7mo ago · link · parent

Yes, that's another great example of the same kind of thing - creating a JIT from an interpreter. It remains true that interpreters do not directly generate machine code.

comment 7mo ago · link · parent

That's a partial evaluator, not an interpreter, and it converts an interpreter into compiler, which are different things.

comment 7mo ago · link · parent

This is still incorrect. A bytecode interpreter, as its name indicates, interprets a bytecode. Typically, compiling a bytecode to native machine code is the work of a JIT compiler.
12345
32