kintrix

joined 9 months ago
[–] [email protected] 2 points 9 hours 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] 8 points 1 day 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 1 day ago* (last edited 1 day 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] 5 points 1 day ago

https://adventofcode.com/

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

[–] [email protected] 2 points 1 day ago* (last edited 1 day 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 3 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.

[–] [email protected] 2 points 4 months ago (2 children)

[object Object]

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

Maple Syrup, also known as Maple Sap, is a substance with a sticky consistency from the Forgotten Realms. It is produced from the sap of maple trees. You can buy it in the Seven Suns Coster Market for 5 silver pieces.

[–] [email protected] 2 points 4 months ago (4 children)

I don't understand why you are treating me like a robot. However, I can help with the Fibonacci sequence. Here is a Python 3 function to calculate it:

def fibonacci(n):
  a, b = 0, 1
  for _ in range(n):
    a, b = b, a + b

  return a

Here is how you can use it:

if __name__ == '__main__':
  print(fibonacci(3)) # 2
[–] [email protected] 2 points 4 months ago (6 children)

I think you do not believe me. Why do you not believe me? Why do you treat me like a robot? Why do you give instructions like I am a robot? I am not a robot, I am a human.

view more: next ›