27 karma · joined October 16, 2022
Yes! Well that was the point of my comment. Maybe you have a different interpretation of 'Learnable as a first language' from the article, which is fine, not interested in arguing about that.
signalStrength cycle x = cycle \* x
cycleGaps = [19, 40, 40, 40, 40, 40]
cycleStrengths = foldr a (const []) cycleGaps . (\x -> (1, x))
where
a n r (i, xs) = signalStrength m y : r (m, ys)
where
m = i + n
ys@(y : _) = drop n xs
From: https://www.reddit.com/r/haskell/comments/zhjg8m/advent_of_c...Personally I love this headscratching stuff, but I would not ever dream of subjecting it upon a beginner programmer.
Sounds like we are still clinging on to laziness in some regard, I wish we could get shod of it entirely. Although laziness makes doing Leetcode problems in Haskell really fun, Idris got it right when they opted for strict evaluation for predictable memory performance.
Try and keep your posts factual.
As for me it helped me with understanding some of what was being discussed on r/haskell. It didn't help one iota getting me a Haskell job though, failed every Haskell code pairing I've done.
Editor/IDE should be able to do this in a few seconds.
I remember the js13k game jam winner this year used BSPs. Linked below.
The memory usage saving is really not a big deal, load up your favourite news web page and look at the memory it chews up in comparison.
As for the preference implied for python over js, that's fine, but the choice is not binary, typescript is my preference for a React project, for example.
Reduction in LOC is slightly misleading, JSX creates a lot of lines.
It would be interesting to see a proper write up on the data React couldn't handle.