C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 12 of 13
Dec 17, 2009 at 11:06 AMI'll be out too for the last lecture. Hope I'll be able to watch it in China. Happy holidays and wishing great 2010 New Year!
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
I'll be out too for the last lecture. Hope I'll be able to watch it in China. Happy holidays and wishing great 2010 New Year!
I really enjoy this lecture. The only topic on this one is about Countdown Problem, a French TV show on resolving a mathematical problem. It'll hurt your brain if you try to resolve the problem.
Here are some links about CP:
I pasted the source codes into Notepad and saved as Coundown.hs. Then I used WinHugs to open or load it. To run the problem, just type in main:
Main>main
Enter the source numbers : [23, 12, 3, 5, 67, 78]
Enter the target number : 101
...
You will get one and all the solutions. Enjoy it!
By the way, I am not good at Haskell. Can anyone provide some hints on adding timestamps to get one and all solutions? In this way, I'll be able to see the start, end and execution time.
Today there is big snow in Calgary. I am enjoying the lecture on my Mac. Here is my type: snow a = Nothing | Big snow. Thank you Eric!
Very nice show on recursive, even the topic is a basic programming skill.
Hugs is new for me. Sometimes I could not get examples in the show to work. Anyway, here are some interfactive examples I played during the time I watch the show.
take 2 [1..] -- take first two items as a list from a unlimited list -- simlar as above with a condiction x > 3 in list -1 to 20 take 2 x where x = filter (>3) [-1..20]
I would like to see more codes related to the topics. Enjoy it!
@exoteric. I understand Erik's explaination in his script. What is the codes to create similar function in Hugs if possible? Such as abs1 or f x like:
f x = 4711
This is the fourth new T-shirt Erik wears, however, I think I saw him with this one on a talk about the reverse of IEnumerable in VS 2010. Will Erik have 13 different T-shirts in this series?
There is not much actual hands-on programming in this show. For example, for a simple function of abs, I could not figure out how to define it in Hugs. I notice that my Hugs has abs predefined already for using. Then I tried to type in:
abs1 n = n, n >=0
I got error and could not coninue the next branch. I guess I have to edit my script and load it. How?
Nice. Thanks for your replies, @ShinNoNoir and @sylvan. By the way, here is an alternative I got:
Hugs> :find zip
This will open the source file by Vim (in my computer) and point to the definition of zip.
The complete HUGS is 14MB while GHC is 50MB. The size may make the difference or better features?
One question about this:
f::Int->Int->Int
or
f::(Int->(Int->Int))
I typed those in hugs and they are not recognized syntax. Are those just description about a function?
By the way, is there any way to get descriptions like above ones out for a predefined function such as zip?