Suggestion/request for the future: An episode on debugging Haskell code. The lack of a debugger, the purity of the type system, as well as Haskell being lazy has made debugging hard for me in the past. I think it'd be interesting
@Axman6 Жыл бұрын
GHCi does actually have a debugger, it’s just not very well known about. GHCi actually has a lot of tools for stepping through the execution/evaluation of your program.
@MikolajKonarski Жыл бұрын
You stopped when it was the coolest and the most fun. Reminds me of childhood. ;)
@ribosomerocker Жыл бұрын
Oh! Could you provide a time-stamp? I'm quite curious
@MikolajKonarski Жыл бұрын
@@ribosomerocker: Haha, the point was totally subjective, it was the programming strategies remark; I'd love to learn about more about these: kzbin.infoS_HSt6jEtWM?feature=share&t=2062
@ribosomerocker Жыл бұрын
@@MikolajKonarski I completely agree about it being the coolest part! Thank you for the link
@vadimvinnik11 ай бұрын
I found this variation to be useful for explaining the unfold concept to beginners: xUnfold2 :: (a -> Bool) -> (a -> b) -> (a -> a) -> a -> [b] xUnfold2 p g h x | not (p x) = [] | otherwise = (g x) : (xUnfold2 p g h (h x)) Here * p detects whether the generation should continue or finish, * g selects a new element from the current state, * h makes a step to the next state.
@fixpoint10 ай бұрын
Very excited about your video series as I’ve decided to learn Haskell (again, I tried 10 years ago, but got stuck).
@vadimvinnik11 ай бұрын
just one of many possible solutions: filter' xs = join $ unfoldr f xs -- or concat that, for lists, is the same as join where f u = case u of [] -> Nothing y : ys -> Just (if p y then [y] else [], ys)
@worgenzwithm14z Жыл бұрын
Whoa what's your vim setup like?
@andresloeh Жыл бұрын
If you mean the LSP support, I'm using neovim and CoC in this episode, although I've mostly switched to neovim-native lsp in the meantime.
@logauit Жыл бұрын
This is awesome! Thank you so much for making this playlist.
@logauit Жыл бұрын
i guess, just minor mistake in 26:50, the type signature of `foldr` should be `foldr :: (a -> r -> r) -> r -> [a] -> r`
@well-typed Жыл бұрын
@@logauit You're absolutely right, of course. Fortunately, all the rest of the argument still holds.
@virus3103 Жыл бұрын
There is a typo. The first argument of foldr has type a->r->r
@well-typed Жыл бұрын
Yes, sorry, that's indeed a typo. It was already mentioned in one of the other comment threads. I've now added it to the video description as well.
@maxreuv Жыл бұрын
Very nice!
@jameender Жыл бұрын
What is the font used? It's so pretty!
@andresloeh Жыл бұрын
Iosevka (which is extremely configurable; I'm using a custom build)