The Haskell Unfolder Episode 1: unfoldr

  Рет қаралды 7,811

Well-Typed

Well-Typed

Күн бұрын

Пікірлер: 22
@sebastianselander161
@sebastianselander161 Жыл бұрын
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
@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
@MikolajKonarski Жыл бұрын
You stopped when it was the coolest and the most fun. Reminds me of childhood. ;)
@ribosomerocker
@ribosomerocker Жыл бұрын
Oh! Could you provide a time-stamp? I'm quite curious
@MikolajKonarski
@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
@ribosomerocker Жыл бұрын
​@@MikolajKonarski I completely agree about it being the coolest part! Thank you for the link
@vadimvinnik
@vadimvinnik 11 ай бұрын
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.
@fixpoint
@fixpoint 10 ай бұрын
Very excited about your video series as I’ve decided to learn Haskell (again, I tried 10 years ago, but got stuck).
@vadimvinnik
@vadimvinnik 11 ай бұрын
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
@worgenzwithm14z Жыл бұрын
Whoa what's your vim setup like?
@andresloeh
@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
@logauit Жыл бұрын
This is awesome! Thank you so much for making this playlist.
@logauit
@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
@well-typed Жыл бұрын
@@logauit You're absolutely right, of course. Fortunately, all the rest of the argument still holds.
@virus3103
@virus3103 Жыл бұрын
There is a typo. The first argument of foldr has type a->r->r
@well-typed
@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
@maxreuv Жыл бұрын
Very nice!
@jameender
@jameender Жыл бұрын
What is the font used? It's so pretty!
@andresloeh
@andresloeh Жыл бұрын
Iosevka (which is extremely configurable; I'm using a custom build)
@marcthatcher
@marcthatcher Жыл бұрын
good stuff, thanks. What editor are you using?
@andresloeh
@andresloeh Жыл бұрын
Thanks! I am using neovim.
The Haskell Unfolder Episode 2: quantified constraints
31:46
Well-Typed
Рет қаралды 2,5 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 12 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 259 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 23 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 376 М.
The Haskell Unfolder Episode 30: runST
40:54
Well-Typed
Рет қаралды 791
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
40 Years Of Software Engineering Experience In 19 Minutes
19:10
Continuous Delivery
Рет қаралды 82 М.
The Haskell Unfolder Episode 21: testing without a reference
41:14
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 637 М.
The purest coding style, where bugs are near impossible
10:25
Coderized
Рет қаралды 980 М.
The Haskell Unfolder Episode 12: parametricity
42:22
Well-Typed
Рет қаралды 944
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 12 МЛН