Тёмный

Writing Poker Game Logic Live With F# And Active Patterns | FULL STREAM (With Timestamps) 

Ben Gobeil
Подписаться 2,2 тыс.
Просмотров 2,2 тыс.
50% 1

For Freelance F# Software Development and Consulting, visit www.bengobeil.com/
It was very fun doing this live, I might do it again.
Source code: github.com/bengobeil/Feliz.Po...
Timestamps:
0:00 Intro (skip this)
3:13 Creating repo
7:00 Scaffolding (didn't need to do this retrospectively)
13:00 Start scripting
39:00 Active Patterns tutorial
49:50 Using active patterns
1:21:15 Override comparison/equality (skip this part ideally)
1:37:05 Override comparison (the right way)
1:39:00 Continue defining all the types of hands
3:24:27 Implement the solver
3:51:05 Writing tests
4:19:40 Comparing hands

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@astir8275
@astir8275 3 года назад
This is a great example of how a domain first approach is half the problem solved. Great job, Ben.
@bengobeil933
@bengobeil933 3 года назад
Thanks Asti!
@marcobuess
@marcobuess 3 года назад
Most valuable F# channel right now 👍
@bengobeil933
@bengobeil933 3 года назад
Thanks Marco!
@marcobuess
@marcobuess 3 года назад
@@bengobeil933 I'm still not at the end yet but I believe that for the partial active patterns, you don't need to wrap the option. It's enough to just return the option and the compiler will figure out the rest. This is also reflected by the ms docs.
@Eji1700
@Eji1700 3 года назад
I would've killed for this 2-3 years ago...I'd probably only horribly maim someone for it now. Thank you so much for doing this. I chose a basic poker program as a starting point and while i bit off way more than I could chew at the time it's a great project for showing off so many facets of F#. Both the "oh that's cool" and the "oh that's how i do that".
@michielnass4836
@michielnass4836 3 года назад
Inspired by you I wrote my own. Not able to magically do things like you. So I ended up listing all possibilities of a straight draw. Found out there are only 10 :-) Really beginning to like F#. Feel free to share your thought process as you weigh options, that really helps a lot, the long vids are fine and let the streams flow please!
@EsteTigele
@EsteTigele 3 года назад
Fun to see your thought process in real time. Sad I missed the livestream, would’ve been fun to interact. Ill try to attend the next one, keep up the good work.
@sgnsajgon
@sgnsajgon 3 года назад
Great, I will watch for sure, because I’m writing BlackJack Game in F# but no enough time to finish.
@adelarsq
@adelarsq 3 года назад
Good job Ben!
@bengobeil933
@bengobeil933 3 года назад
Thanks!
@gajarubanjeyakumar7226
@gajarubanjeyakumar7226 3 года назад
Started streaming :) NICE.
@BashkaMen
@BashkaMen 3 года назад
Thanks
@glauberbrennon
@glauberbrennon 3 года назад
u should post videos in English! /o/
@BashkaMen
@BashkaMen 3 года назад
@@glauberbrennon my English is bad :(
@remidle
@remidle 3 года назад
Great job Ben! Do you plan on doing anymore live streams in the future? I would've loved to have seen this live and had a chance to interact etc.
@bengobeil933
@bengobeil933 3 года назад
I might do another one next week. Follow on twitter to know ahead of time! @GobeilBen
@remidle
@remidle 3 года назад
Before you changed the Suited partial active pattern to use FiveCards, I had an idea of another way to easily test if the cards were suited using distinctBy. Here's a simplified version (where Cards only contain suits to remove some noise for the example): type Suit = Hearts | Spades | Clubs | Diamonds type Card = Card of Suit let (|Suited|_|) (cards : Card list) = let isSuited = cards |> List.distinctBy (function Card c -> c) |> List.length = 1 if isSuited then Suited (Some cards) else None
@remidle
@remidle 3 года назад
@@bengobeil933 Just wanted to say thanks for doing these videos. You're right that there's not enough F# content out there and you've inspired me to start blogging about F# again. I've been doing so at work for about two months now (trying that difficult battle of trying to convince my coworkers to try out F# instead of only using C#). I'd like to get back to blogging on my personal blog again too. This episode reminded me of how much I enjoyed exploring things like active patterns in the past (also picked up some nice tips from you). If you're interested in checking out my blog post on active patterns, I'd love to hear any feedback. jason-down.com/2017/01/24/f-pattern-matching-part-2-active-patterns/ Thanks again and I hope you keep the videos rolling. Looking forward to part 2 of this stream. PS - I was already subscribed to you on twitter, but noticed the RU-vid notification before the tweet.
@bengobeil933
@bengobeil933 3 года назад
I’m glad to hear that Jason, thanks!
@danielwalmsley
@danielwalmsley 3 года назад
Are you paying for rider? I just looked into it but wow that is expensive.
@bengobeil933
@bengobeil933 3 года назад
Yes I pay for it.
@danielwalmsley
@danielwalmsley 3 года назад
@@bengobeil933 Cool, it seems pretty steep. I thought you might be getting one of the free licenses for open source. If you are looking for video ideas I'd love to see one talking about getting going as an F# contractor. Thanks for the great F# content!
Далее
Чистка пляжа с золотом
00:49
Просмотров 345 тыс.
Best exercises to lose weight ! 😱
00:19
Просмотров 9 млн
Become A Software Engineer For Free (Class 01) - 100Devs
3:23:06
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 814 тыс.
The Tragedy of systemd
47:18
Просмотров 1,1 млн
DHH discusses SQLite (and Stoicism)
54:00
Просмотров 57 тыс.
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 6 млн
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,4 млн
iPhone socket cleaning #Fixit
0:30
Просмотров 17 млн