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

Not really, VST3's COM-like API just uses virtual methods, they don't guarantee layout to the same degree actual COM does with compiler support. They simply rely on the platform ABI being standardized enough.

comment 1y ago · link · parent

My bad, I just double-checked and Go did the dumb thing again: They are indeed representing full code points rather than scalars like everyone else.

comment 1y ago · link · parent

> uses the correct expression "code point"

Actually no, these are Unicode scalars, not code points; they exclude the surrogate category.

I agree that rune is a very poor name for it. It both mistakes what runes actually are and clashes with the runic block. But C# has adopted the Rune name for some reason.

Rust simply calls these char, and OCaml uchar (unicode char), which are much better choices.

comment 1y ago · link · parent

Finally an article that doesn't pretend grapheme clusters are the be-all end-all of Unicode handling.

I'm saving this one. Not exactly how I'd explain it, but it's simplified enough to share with my current co-workers without being misleading.

comment 1y ago · link · parent

Relative FPS gain is a meaningless metric anyway. Going from 30 to 36 FPS is -5.5 ms/frame, going from 60 to 66 FPS is -1.5 ms/frame.

Taking the average of that is even more meaningless. If they insist in comparing FPS instead of frame times, they should have simply compared the two harmonic means.

comment 1y ago · link · parent

What for? The code hasn't changed, it's AGPL-3.0. They just don't release their own binaries or docker images anymore.

comment 1y ago · link · parent

Wow, I just checked and that's really underwhelming: Tiny page size, lots of padding around the images and yet there's often 4 images per page. The layout makes it seem like the size a was late decision, it would be appropriate for a large artbook.

comment 1y ago · link · parent

Unless you've already got an Nvidia GPU, in which case you might encounter repeating pains.

Thanks to Nvidia's Linux driver, my desktop environment breaks and hangs when it comes back from sleep, and every few days my screen starts flashing black until I reboot. I've been told the trigger may be the combination of DisplayPort and AdaptiveSync.

comment 1y ago · link · parent

Of all the things I'd change about OCaml, dune is very much down the list. It's flat out better than cargo in that it's an actual build system with build rules driven by file dependencies, not simply a glorified frontend for a compiler. Not great, but better.

Now, upstreaming OxCaml's unboxed types and stack allocations? That might actually take longer than adding a GC to Rust.

comment 1y ago · link · parent

I too wish that some OxCaml features bring new blood to OCaml. I've been using OCaml for a few years for personal projects and I find the language really simple and powerful at the same time, but I had to implement me some foundational libraries (e.g. proper JSON, parser combinators), and now I'm considering porting one of those projects to Rust just so I can have unboxed types and better Windows support.

> even older than Rust

That's an understatement, (O)Caml is between 17 and 25 years older than Rust 0.1 depending on which Caml implementation you start counting from.

comment 1y ago · link · parent

That's lowercase "source generators". They're referring to title-case "C# Source Generators", an actual feature slowly replacing some uses of reflection.

https://devblogs.microsoft.com/dotnet/introducing-c-source-g...

comment 1y ago · link · parent

> then suggest something else that actually addresses the problem

As opposed to the original suggestion that doesn't actually address the problem? How is proposing that in the first place more honest than calling it out?

comment 1y ago · link · parent

A quick search shows me that "annouce" is sometimes used as a noun in the context of bittorrent for some reason.

comment 1y ago · link · parent

> permission/ownership model added to GNATprove in recent years.

So recently that last time I tried Alire failed to install me a version of gnatprove that supported it. I hope next time I try it actually works though, because I do like the semantics they came up with from the examples I'd seen.

> that doesn’t prevent you from using controlled types - you just need to isolate them. [...] `pragma SPARK_Mode(Off)`

No need to elaborate, I know that SPARK_Mode => Off is the SPARK equivalent of unsafe in Rust; that is, regular Ada. So yes, it does exclude controlled types, and trying to twist SPARK's lack of semantics for them into a pro is not a good argument IMO.

comment 1y ago · link · parent

I'm assume (wrongly?) that installing this dependency is managed by Steam before the first run, not up to them.

comment 1y ago · link · parent

> Json serialization, sure but you can use your own converters

And going through converters is (was?) significantly slower for some reason than the built-in serialisation.

> my impression is that minimal APIs are now the go to solution and you have `app.MapGet(path)` so no attribute

Minimal APIs use attributes to explicitly configure how parameters are mapped to the path, query, header fields, body content or for DI dependencies. These can't always be implicit, which BTW means you're stuck in F# if you ever need them, because the codegen still doesn't match what the reflection code expects.

I haven't touched .NET during work hours in ages, these are mostly my pains from hobbyist use of modern .NET from F#. Although the changes I've seen in C#'s ecosystem the last decade don't make me eager to use .NET for web backends again, they somehow kept going with the worst aspects.

I'm fed up by the increasing use of reflection in C#, not the attributes themselves, as it requires testing to ensure even the simplest plumbing will attempt to work as written (same argument we make for static types against dynamic, isn't it?), and makes interop from F# much, much harder; and by the abuse of extension methods, which were the main driver for implicit usings in C#: no one knows which ASP.NET namespaces they need to open anymore.

comment 1y ago · link · parent

But memory-unsafe code doesn't just segfault, it can corrupt your invariants and continue running, or open a door for an attacker to RCE on the machine. Memory safety is necessary (but not sufficient) to uphold what should be the simplest invariant of any code base, that program execution matches the source code in the first place.

comment 1y ago · link · parent

> SPARK has no escape hatches

It does, you can declare a procedure in SPARK but implement it in regular Ada. Ada is SPARK's escape hatch.

This is just as visible in source code as unsafe is in Rust, a procedure body will have SPARK_Mode => Off.

comment 1y ago · link · parent

Not a library, but it kinda does: Frama-C will formally verify C code using special comments to write the contracts in, and I hear it can prove more pointer properties than SPARK, although it takes more more effort to maintain a Frama-C codebase due to all the other missing language features.

comment 1y ago · link · parent

In retrospect my replies have also been harsher than they should have, I didn't contribute to a good mood. Most IT nomenclature is poorly made up anyway, what does polyglot even mean indeed.

As I said, I don't even like Just's approach as it isn't even cross platform, but I guess solving this properly would require tying the recipe runner to a package repository per platform. I still appreciate that Just tried to make it a legible built-in feature though.

comment 1y ago · link · parent

Only if SPARK is powerful enough to verify the code you need to write in the first place, which from my experience with SPARK is not a given as soon as access types are involved. Also Rust doesn't need to exclude high level language features just to prove memory safety, whereas SPARK can't even verify any use of controlled types.

If SPARK really were enough, I'd just write all Ada in SPARK of course.

comment 1y ago · link · parent

I agree the shebangs are a blunt solution, but I'll give them polyglot for embedding arbitrary languages under the recipe syntax without having to shell out with a heredoc. It's a low bar, but I can't think of any alternative that clears it and I don't think there's any value in hosting the interpreter unless there's some particular API to expose to it.

Also, you wrote "Why not call out /usr/bin/env instead?" which is exactly what the example was doing, so I assumed your own proposal would have seemed sufficient to you, had you seen it.

comment 1y ago · link · parent

Attributes and reflection are still used in C# for source generators, JSON serialization, ASP.NET routing, dependency injection... The amount of code that can fail at runtime because of reflection has probably increased in modern C#. (Not from C# source generators of course, but those only made interop even worse for F#-ers).

comment 1y ago · link · parent

References and lifetimes are where Rust wins over Ada, although I agree that Ada has many other great type features.

Access types are unable to express ownership transfer without SPARK (and a sufficiently recent release of gnatprove), and without it the rules for accessibility checks are so complex they're being revamped entirely. And access types can only express lifetimes through lexical scope, which combined with the lack of first-class packages (a la OCaml) means library code just can't define access types with reasonable lifetimes.

Also, I appreciate that Rust is memory safe by default and without toying with a dozen pragmas. Ada needs a profile that guarantees that code can't be the source of erroneous execution and constrains bounded errors further.

comment 1y ago · link · parent

> What makes just polyglot?

The link they shared and you didn't open, which is precisely an example of multiple recipes with different #!/usr/bin/env shebang lines, such that a single just file can mix different languages.

I'm not sure I like how they handle the shebang on different platforms, though. It makes just files non-portable even when using a language other than a shell.

comment 1y ago · link · parent

It's an issue because there's nothing internal about the representation in Ada: They're regular arrays of Character/Wide_Character/Wide_Wide_Character, and string literals have different type depending on the width required to represent it as such.

Also, string representations very much matter if you're coding with even the slightest amount of mechanical sympathy.

1
202122
43