Better HN
topnewbestaskshowjobs
Log inSign up

debugnik

2,570 karma · joined May 8, 2019 (7y ago) · 1,261 submissions

Submissions

comment 1y ago · link · parent

I mean, it's quite clunky, but on Linux or WSL I've never had the broken experience you talk about. Could you share your setup? Was this maybe on bare macOS or Windows, in which case I totally believe it because they've been neglected?

comment 1y ago · link · parent

Funny, I moved to OCaml to sidestep F# tooling. At least last time I used F#: Slow compiler, increasingly C#-only ecosystem, weak and undocumented MSBuild (writing custom tasks would otherwise be nice!), Ionide crashes, Fantomas is unsound...

But OCaml sadly can't replace F# for all my use cases. F# does get access to many performance-oriented features that the CLR supports and OCaml simply can't, such as value-types. Maybe OxCaml can fix that long term, but I'm currently missing a performant ML-like with a simple toolchain.

comment 1y ago · link · parent

In short, OCaml modules are used for coarse-grained generics.

Modules are like structurally-typed records that can contain both abstract types and values/functions dependent on those types; every implementation file is itself a module. When passed to functors (module-level functions), they allow you to parameterize large pieces of code, depending on multiple types and functions, all at once quite cleanly. And simply including them or narrowing their signatures is how one exports library APIs.

(The closest equivalent I can imagine to module signatures is Scala traits with abstract type members, but structurally-typed and every package is an instance.)

However, they are a bit too verbose for finer-grained generics. For example, a map with string keys needs `module String_map = Map.Make(String)`. There is limited support for passing modules as first-class values with less ceremony, hopefully with more on the way.

comment 1y ago · link · parent

LSP isn't the protocol that interfaces with debuggers, that'd be DAP. You're right that OCaml debugging is kinda clunky at the moment.

OCaml does have an okay LSP implementation though, and it's getting better; certainly more stable than F#'s in my experience, since that comparison is coming up a lot in this comment section.

comment 1y ago · link · parent

I've used equality witnesses in F# before, they kinda work but can't match proper GADTs. First you'll need identity conversion methods on the witness, because patterns can't introduce type equalities, then you'll realise you can't refute unreachable branches for the same reason, so you still need to use exceptions.

comment 1y ago · link · parent

They tried, by forking Xamarin Forms into MAUI, and even then they ignored Linux. It's really rough though, to the point many projects use it as just a glorified webview for Blazor. I expect it to eventually go into a silent maintenance mode along with WinUI 3.

Avalonia is the go-to library for cross-platform UI in .NET right now. But Microsoft's own apps have been switching to web stacks, in a clear case of "Do as I say, not as I do."

comment 1y ago · link · parent

I'll give you that the laptops models fare better, I said as much already I think, but I feel you're overselling the support for the form factor most people associate with the Surface brand:

The 5G version of the Surface Pro 10 (second to last) is completely unusable, the SP8-10 need a kernel fork just for keyboard and touchpad (!), SP4-10 need it for the touchscreen (SP4 is 2015), and the cameras won't work at all since SP7 (2019).

Don't get me wrong, I still run Linux on my devices and would be willing to tinker with custom kernels if certain hardware were worth it. I just can't consider this "runs perfectly fine".

comment 1y ago · link · parent

> Linux runs perfectly fine on most of the Surfaces [...] There's the usual asterisk here or there,

Are we reading the same tables? The last several models are full of question marks and crosses in the support matrix, and many models old and new seemingly require the linux-surface kernel fork for key features like touchscreens and even some touchpads, you can't just install your distro of choice.

Even compared to my disappointing experience running Linux at home, I'd say that's more of an asterisk minefield, except for a few Surface Laptop models.

comment 1y ago · link · parent

But they do. Microsoft extensions are the only ones whitelisted in the VS Code marketplace to request experimental ("proposed") APIs in their manifest. Remoting, notebooks and now Copilot have all been using experimental APIs, verboten to anyone else in the marketplace until they become stable a long time later.

comment 1y ago · link · parent

Even that is too high of a requirement if your target user runs low end hardware. Most Intel chips launched between 2017 and 2021 under the Pentium Silver/Gold and Celeron brands lack AVX (the first one, let alone AVX2).

comment 1y ago · link · parent

You may be interested in Luau, which is the gradually-typed dialect of Lua maintained by Roblox. The game Alan Wake 2 also used it for level scripting.

comment 1y ago · link · parent

I agree with your point, but

> if we all had five different llvms or gccs

Oof, those are poor examples. Most compilers using LLVM other than clang do ship with their own LLVM patches, and cross-compiling with GCC does require installing a toolchain for each target.

comment 1y ago · link · parent

That's what Gleam's use expressions[1] are for (the last example is exactly this case). Most languages with the same heritage as Gleam have grown a similar syntactical feature, such as OCaml's binding operators or F#'s computation expressions. Although I appreciate how simple Gleam's is while having similar power.

[1]: https://gleam.run/news/v0.25-introducing-use-expressions/

comment 1y ago · link · parent

When I asked dang about why are very low quality submissions allowed despite them resulting in low quality discussion, he told me and I quote:

> You can flag submissions that you think don't belong on Hacker News.

Well, this is a very low quality submission in my eyes. A tiny read with an unsubstantiated, purely contrarian take that completely misses the point of the debate. Just to be clear, I think anyone is free to post anything on their blogs, that's what they're for, but I don't think posts like these contribute to HN having a good atmosphere for discussion; if I were to write something like this, I'd be ok with it being unsuitable for HN.

BTW I hadn't flagged this before reading your comment. I've done so after reading the submission though.

comment 1y ago · link · parent

Kicking kittens makes it sound simpler of a choice than it really is, because you're not a kitten and you could protect yours. Would you vote for "the party of beating people like Levitz and opposing chat control"?

comment 1y ago · link · parent

I've qualified with "useless" for a reason. It's cool if you've got a novel use case, but so far I think most uses of AI art are either uncanny filler for blogs and slides; or a driver for the deprofessionalization and commoditization of artworks, with AI art producers flooding art sites to fight regular artists for attention, and industry forcing artists to paint over AI generated works (already common in mobile games) until their cheaper substitutes can replace them, and their next job forces them to set art aside.

comment 1y ago · link · parent

So far, the times had allowed artworks to be proxies for the artistry behind them; the artwork itself conveyed enough information to appreciate it. But as forgery of the art process itself spreads, that signal disappears and artworks, out of context, simply are. The artwork is still necessary, but now insufficient, to understand and appreciate its artistry, because there might not be any, or at least not any intentional one.

comment 1y ago · link · parent

Useless AI art (which is almost all of it) is not like the camera or the synthesizer, it's closer to when 50-60yo moms were sharing Minion memes on facebook: cringe and tasteless. It getting better won't make it more accepted, it will simply make people suspect of actual art until no one really gives a chance to any of it.

comment 1y ago · link · parent

Weird, I thought Go was one of the go-to examples in HN for languages that LLMs work well with, precisely because it's opinionated and has many standard libs. Not that I've tried, my attempts at vibe coding felt disappointing, but I think this contradicts the zeitgeist?

comment 1y ago · link · parent

From another comment here, they did say:

> I expect that many of the things we’ve written over the past couple of decades will remain relevant for years to come – and remain accessible just as long.

comment 1y ago · link · parent

> NET 10! Jesus, 10!

Well, spiritually this is the 13th(?) major version of .NET (possibly more if we count Silverlight's runtime). You missed the part when there was .NET Core 1-3 alongside the old .NET Framework 4.8., and then they skipped Core 4 and stopped supporting Framework so they could finally fix their naming scheme.

comment 1y ago · link · parent

Definitely change for F# code, some of those Span overloads broke type inference. Also, certain APIs even removed their non-Span overloads between .NET versions, which was a straight up breaking change for every language other than C#.

comment 1y ago · link · parent

Misattributed to the wrong Frank Wilhoit, so it's still Wilhoit's law.

comment 1y ago · link · parent

That makes it so much harder to show art to people and market yourself though.

I considered experimenting with web DRM for art sites/portfolios, on the assumption that scrappers won't bother with the analog loophole (and dedicated art-style cloners would hopefully be disappointed by the quality), but gave up because of limited compatible devices for the strongest DRM levels, and HDCP being broken on those levels anyway. If the DRM technique caught on it would take attackers, at most, a few bucks and hours once to bypass it, and I don't think users would truly understand that upfront.

comment 1y ago · link · parent

But those are the cheap parts compared to the rendering itself. A small-ish amount of work is what we're already sending, the final image, because anything else takes much, much more GPU work.

comment 1y ago · link · parent

I gave up on Menhir after I understood how allocation-heavy it is during the hot path, at least in the incremental API which is needed for proper errors; and how much of a giant hack you need to force extra lookahead, which shouldn't be such a big deal for parser generators.

These days I just handroll recursive descent parsers with a mutable stream record, `raise_notrace` and maybe some combinators inspired by FParsec for choices, repetition and error messages. I know it's not as rigorous, but at least it's regular code without unexpected limitations.

comment 1y ago · link · parent

You did mean shadowing then. But your example is deceptive, that C-like assignment syntax doesn't exist in Reason, much less in OCaml. The real Reason syntax makes the shadowing much clearer:

  let a = 10;
  {
    let a = 20;
  }
  print(a);
And even more clear in OCaml:

  let a = 10 in
  begin
    let a = 20 in
    ()
  end;
  print a
BTW you should also close the page on Rust then, which also has OCaml-like variable shadowing (and many other languages use very similar forms of shadowing, such as local variables shadowing object fields in Java/C#).

comment 1y ago · link · parent

I believe the Reason syntax for OCaml is now maintained by the same people as Melange; which is the revived version of BuckleScript, the OCaml fork targeting JS, from which Reason and later ReScript spun off.
1
232425
43