2,570 karma · joined May 8, 2019 (7y ago) · 1,261 submissions
comment 1y ago · link · parent
1. Keep a collection of errors in the stream. It represents errors at the current position.
2. Clear all errors when input is consumed.
3. When a token-like parser fails without consuming input, push an "expected '<literal>'" error.
4. When a labeled parser fails without consuming input, restore the error set as it was before running it, and push an "expected <label>" error instead.
This will naturally accumulate errors from choice and repetition combinators, as long as you don't have needless backtracking before the choice points.
So this already gives you reasonable errors like "foo:17:4: expected one of expression, assignment or 'end'". And it's easy to extend to nested errors, backtracking information or recoverable nodes.
comment 1y ago · link · parent
Loading times over 6 minutes for 1/3 of the playerbase (according to a poll linked in the original post about that bug) are not hard to quantify, that's disastrous. Many people would simply quit and play something else at that point.
comment 1y ago · link · parent
I just think it's a shame that the manifest file for Lua projects would be in a language other than Lua itself. I'm more sympathetic to other trade-offs, though, such as being able to edit the file mechanically.
comment 1y ago · link · parent
Careful, if we were to shorten copyright, not doing so retroactively would give an economic advantage to franchises already published over those that would get published later. As if the current big studios needed any further advantages over newcomers.
comment 1y ago · link · parent
I'll give you the chicken-and-egg hiring problem and it being second-class to the .NET team, though; I'd add poor IDE support by modern standards, only Rider feels right. I love F# but I've moved on for these reasons.
comment 1y ago · link · parent
It really isn't, not anymore. F# now evolves conservatively, just trying to remove warts and keep up with C# interop.
And even then some C# features were considered too complex/powerful to implement (e.g. variance, scoped refs) or implemented in weaker, incompatible ways when C#'s design is considered messy (e.g. F#'s non-nullable constraints disallow value-types, which breaks for some generic methods written in C#, sadly even part of the System libs).
comment 1y ago · link · parent
When mixing, you often write business logic as self-contained F# libraries with a C#-friendly API; and use C# to integrate them with whatever imperative, reflection-heavy and DI-heavy frameworks .NET is promoting the current year, since those are filled with interop edge cases for F# anyway.
You really want to avoid a language sandwich though (e.g. C#/F#/C#), because you'll keep wishing to remove the middle layer. Sadly, the addition of source generators make this mistake even more appealing.
comment 1y ago · link · parent
The only segments left targeting Windows as a platform are games, replacements/extensions to the OS tools, and a bunch of legacy .NET LOB apps. And since the Steam Deck and clones, Wine/Proton are (very) slowly becoming the actual target for games rather than Windows.
comment 1y ago · link · parent
I don't think this would be viable if the OCaml community grew larger though.
comment 1y ago · link · parent
I can't blame people for thinking otherwise, pretty much every self-called "CRDT library" I've come across implements exactly one such data structure, maybe parameterized.
It's like writing a "semiring library" and it's simply (min, +).
comment 1y ago · link · parent
https://web.archive.org/web/20050514035446/http://www.afmiss...
comment 1y ago · link · parent
Undercover might have been good, I haven't played, but I'm sure originally releasing on Wii U did it a disservice. Do you think there's some design formula or lesson in it for future original Lego games?
comment 1y ago · link · parent
Does Lego still have any strong original franchises, though? It seems most of their set themes are third-party licenses now, and their original themes can't hold a candle to e.g. Bionicle back when I was a kid.
Then again their most popular games were all Lego Star Wars.
comment 1y ago · link · parent
You say that as an hypothetical, but that's exactly how code is written in Standard ML; and the rest of the ML language family supports it to some degree, although they lean more on currying, like Haskell.
comment 1y ago · link · parent
Huh? They're already implemented! It took years and they've still got some rough edges, yes, but they've been implemented for a few years now.
Agreed with the rest, though. As much as I love working with F#, I've jumped ship.