kintrix

joined 9 months ago
[–] [email protected] 1 points 1 week ago

Don't know if it's succesful, but definitely just straight up stupid.

The are many places where it's not even allowed because it does not meet the local safety and protection standards. It's a fundamentally unsafe design, especially for the people outside of it. It should not be allowed on the roads, and the EU agrees with this.

Even if it was allowed within the EU, you would need a special driver's licence for it.

[–] [email protected] 3 points 3 weeks ago (1 children)

My guess is because a linter and/or HLS was suggesting it. I know HLS used to suggest making your fields strict in almost all cases. In this case I have a hunch that it slightly cuts down on memory usage because we use almost all Muls either way. So it does not need to keep the string it is parsed from in memory as part of the thunk.

But it probably makes a small/negligible difference here.

[–] [email protected] 3 points 3 weeks ago

Of course it's point-free

[–] [email protected] 2 points 3 weeks ago

True. I love how AoC is a hotbed for creative and/or insane ways of solving coding problems.

If you wanna check out how it goes in Nix: https://git.sr.ht/~kintrix/aoc2024

[–] [email protected] 12 points 3 weeks ago (2 children)

Nix, because I hate myself. No, it is very much not made for this purpose. But it's possible to use if for this.

[–] [email protected] 2 points 3 weeks ago* (last edited 3 weeks ago)

<$> is just fmap as an infix operator.

>>> fmap (+1) [1,2,3]
[2,3,4]
>>> (+1) <\$> [1,2,3]
[2,3,4]
[–] [email protected] 3 points 3 weeks ago* (last edited 3 weeks ago)

You can also use the pipe operators; but they are still experimental features.

foo (bar (baz x)) = x |> baz |> bar |> foo = foo <| bar <| baz <| x

[–] [email protected] 6 points 3 weeks ago

https://adventofcode.com/

An advent calendar of coding puzzles. Dec 1-25 you get a new puzzle every day

[–] [email protected] 3 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I definitely am: https://git.sr.ht/~kintrix/aoc2024

(The README is wrong, just copied it over from last year)

[–] [email protected] 2 points 4 months ago

That is basically the problem. Also that fractional scaling on Linhx generally still gives blurry results. Fractional scaling without explicit support from the apps side is very difficult to implement.

And yes, there are a ton of of apps that don't correctly respect OS hints for size. Even more common among apps that aren't Linux first, or are proprietary.

view more: next ›