Functional Parsing - Computerphile

preview_player
Показать описание
Functional or Combinator Parsing explained by Professor Graham Hutton.


This video was filmed and edited by Sean Riley.


Рекомендации по теме
Комментарии
Автор

Types 20+ lines of Haskell program in a single breath, then gets 0 warnings or errors from GHC, then goes on as if it is totally normal...

Автор

So glad my university teaches Haskell. Even if you dont ever use it in your work, learning to program in that language makes you a better programmer and writing a compiler is usually a thing that Haskell will be used for.

PaxiKaksi
Автор

The videos of this guy are a treasure, thanks a lot!

ruskiikoshka
Автор

"It doesn't matter if you know any Haskell, because I'll be explaining everything as I go along. So you won't understand a thing either way."

olamarvin
Автор

say it takes a string as an input and returns a tree as an output one...more...time

gist
Автор

Regarding the "list of results" remark, maybe a fun example would be a parser that can handle all possible interpretations of "time flies like an arrow, fruit flies like a banana"

JobvanderZwan
Автор

The key (which IMHO was not so well explained in the video) is that you have a function (parser combinator) that takes other functions (parsers) as input, and produces a function (more complex parser) as a result.


This is rather similar to "normal" recursive-descent parsing, except you don't do the combining yourself, and instead let the parser combinator do it for you.

BrankoDimitrijevic
Автор

Had to pause the video say, after studying parsers a lot recently I think the beginning explanation is on of the best of what a parser actually is

maxclifford
Автор

Thanks, that was very illuminating. And it’s nice to see Haskell being used in a practical setting.

StephenFarthing
Автор

Graham Hutton. Your Haskell book was incredibly useful!! Never clicked so fast on a computerphile video. Parsing in Haskell was a bit hard in the beginning though.

elgalas
Автор

WOW! Anyone saw the beautiful recursion in the definition of these expression parsers? I don't have the kind of brain to quickly think recursively like this

photojournalists
Автор

This should be a whole series on its own channel... I think a channel dedicated to programming the simple things. Things like this video, but things like... Graphics, calculate a line, circle, plasma, transparncy, sprites, theres heaps and heaps of things like that, 3D rotation vertex and bitmap.. processing raw data by a microphone is another 100 videos. I could go on...
Maybe

st_ProCactus
Автор

Having trouble parsing Grahams accent. Sounds like its from everywhere in the UK at once! Fascinating

MrMuchoscojones
Автор

I did this with Java, I wrote a postfix expression parser that could do symbolic differentiation and simplification. I used polymorphism to implement the tree structure

harleyspeedthrust
Автор

One thing here is that parser he implemented does binary opetator evaluation right-to left. Left-to-right binary operators are more involving.

dmitryplatonov
Автор

It is a bit annoying that the camera switches from head to laptop to screen constantly

MarkusBurrer
Автор

What an excellent complement to the material found in his book! Hope to see more

AndreasEDM
Автор

"4 and half screen fulls and is full fledged and can basically implement any parser you like" - mic drop

manantank
Автор

Where was this video for my Language Engineering unit at university?! This would've been so useful to refer to!

SleepyFracture
Автор

Why don't you use Maybe monad instead of List monad?
I think it would be better and more intuitive.
I mean:
type Parser a=String->Maybe (a, String)

luisalejandrohernandezmaya