Regex Library in Rust from Scratch (Finite-State Machines)

preview_player
Показать описание
References:

Support:

Feel free to use this video to make highlights and upload them to YouTube (also please put the link to this channel in the description)
Рекомендации по теме
Комментарии
Автор

This "recreational coding" is exactly what I want to spend my life doing

titaniumtomato
Автор

Just found this channel and it's an absolute gem mine.
your content is just precious and very educational too.

omarmagdy
Автор

You can use Enums for indexing, you just have to set the values for the enum like
enum A { B = 0, C = 1}
and then cast it
arr[A::B as usize]

noratrieb
Автор

this seemed really interesting, hope you finish working on the groups next time!

frfou
Автор

seeing this, even though i am great at understanding and writing code, i suck at algorithms and all the other mathematical shit so i don't have what it takes to be a full blown developer. i now understand why entrance exams require mathematical knowledge now

erenmetesar
Автор

you could also match the combinations of all the dimensions of the state machine inside a tuple, so that you get flat arms (rather than nested) and the code is "cleaner" and more manageable, like: `match (state, event, other_dim)`. For a few number of dimensions I think this approach is more idiomatic and less "hacky". Thanks for the video anyways, really enjoy it thoroughly.

andresalejandrogarciahurta
Автор

Seems like this kind of engine does not work properly with regex like ".*bc", doesn't it? It will stuck on FsmColumn of *, which will never propagate to latter columns. I guess we need some kind of lookahead for it.

JMCea
Автор

You could've done something like:

('a'..='z').map(|a| a as u8 ).collect::<Vec<u8>>()

range is mappable, you just need to call collect method on it

erenmetesar
Автор

16:20 thank you but you didn't inform user what to write?! also enum means already const.

yapayzeka
Автор

For array initialization, the lazy_static module is a good option.

martinfrances
Автор

Great content here! But does it work with the regex "a.*bc"? I guess that the .* will consume all remaining characters and fail on valid inputs as "adfgbc"... Am I wrong?
BTW, I would love to see a follow up video where you tackle this problem and the nested regexps you were mentioning at the end.

boboxxrbt
Автор

1:35:55 You should rename your channel to T-rex Daily

MACAYCZ
Автор

Isn't the match keyword optimized to turn in to table just like switch case ?

rudy-ishikawa
Автор

I saw a good video on command pattern for a more complex state machine

DMWatchesYoutube
Автор

Unexpectedly excited to see another emacs user writing Rust! 😀 It seems everybody is using (or at least demoing) VSCode, which I don't use for a lot of reasons.

GPandzik
Автор

This non-edge lord attitude in this video is infinitely more pleasant to watch. I know, super gay. But it is the truth.

simonfarre
Автор

37:40 Tuning machines are not finite, )😊

berndeckenfels
join shbcf.ru