I'm doing Advent of Code this year to learn Q. For bewildering one-liners, you can follow along here:https://github.com/willcrichton/aoc2021 …
-
Show this thread
-
Mild take: if you ever feel like learning an esoteric language with a dizzying array of symbols and vocabulary, Q is probably a better choice than Haskell.
3 replies 0 retweets 5 likesShow this thread -
Q's combinators are interesting. Especially overloading on arity: f' = map f x f' y = map f (zip x y) x f/: y = map (f x) y x f\: y = map (λ x. f x y) x f/ (unary) = fix λ g. λ y. if f y = y then y else g (f y) f/ (binary) = reduce f x f/ y = fold f x y x f\ y = scan f x y
2 replies 0 retweets 2 likesShow this thread -
Replying to @wcrichton
f/ (unary) is bottom-up fixed point iteration, which is cool! But how is it analogous to f/ (binary)? That, I don't see...
1 reply 0 retweets 0 likes
My guess: both are about iteratively computing on an element to a final point. For binary functions on lists, then it's reduce to one element. For unary functions on any type, then it's iterate-to-fixpoint. But I agree it's a bit of a stretch.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
cognitive psychology. PhD