Haskell Amuse-Bouche

  Рет қаралды 77,562

Google TechTalks

Google TechTalks

Күн бұрын

Google Tech Talk (more info below)
October 14, 2011
Presented by Mark Lentczner.
ABSTRACT
Want to know a little more about programming Haskell than just the buzz-words? This talk will show you some of the joys coding in Haskell through lots and lots of code examples.
No prior experience with Haskell or functional programming required. Just be ready for some strange and wondrous code!
Slides: www.ozonehouse....
Code: github.com/mze... (tag v2 matches the video)

Пікірлер: 48
@valdsonfrancisco8836
@valdsonfrancisco8836 8 жыл бұрын
the runLengthEncoding can be written like this: import Data.List (group) import Control.Arrow ((&&&)) encode :: (Eq a) => [a] -> [(Int, a)] encode = fmap (length &&& head) . group decode :: [(Int, a)] -> [a] decode = concatMap (uncurry replicate) Just one (two if you count the signature) line of code that does all that... when I saw this piece of code I became in love with this language.
@petros_adamopoulos
@petros_adamopoulos 13 жыл бұрын
@Nolansan It knows what to keep and what to forget, it's magic. For example tail recursion is internally treated as a loop and just overwrites all the values on each iteration. It looks like a function that's calling itself forever but actually it uses a fixed amount of memory since it "knows" that all the intermediate values are not accessible from anywhere else.
@CliffStamp
@CliffStamp 6 жыл бұрын
The idea of "of that is horrible we don't look at it" is the fundamental mistake almost anyone does when trying to teach Haskell. If you can't sort out those error messages, then learning Haskell is way harder as you essentially then have a language which only says "wrong" when you make a mistake with no additional info.
@masterxilo
@masterxilo 9 жыл бұрын
9:40 instead of spawning another generation of programmers that is told to find these error messages cryptic (which they are in some probably measurable, UI (user interface)-technical sense (we should start to realize that programming languages and compilers are software with hopefully *human usable* UIs just like anything else)), can't we just go to that compiler and output nice error messages? How much harder would it be to make it write the following: 'byLines' was given 'indent' which is a 'String -> String' when it expected a '[String] -> [String]' indent : *String -> String* byLines: (*[String] -> [String]*) -> String -> String in expression byLines *indent* at line ... (for the conservativists/backwards compatibility, we can still add the message in the current format after that) (by the way, what's with the Char [Char] business in the error message generated?)
@CliffStamp
@CliffStamp 6 жыл бұрын
Languages are generally wrote by very high end programmers who read those error messages trivially and forget at one point they were not high end programmers.
@JobvanderZwan
@JobvanderZwan 13 жыл бұрын
Impressive, this actually made me interested in Haskell! Could the questions be added as subtitles? Makes it easier to figure out what is actually being answered :)
@joshuarose20
@joshuarose20 Жыл бұрын
press 'c'
@someman7
@someman7 12 жыл бұрын
@noobyfromhell where did you learn it? i wish you'd say "an essay".
@TankdozerCavalry
@TankdozerCavalry 11 жыл бұрын
Programming in Haskell isn't normal, but on math it is.
@Enaku
@Enaku 12 жыл бұрын
Turns video on. Bleeds from eyes.
@6006133
@6006133 13 жыл бұрын
This guy is win :D
@MartyGlaubitz
@MartyGlaubitz 11 жыл бұрын
your profile pic matches your comment :D
@thesaifmustafa
@thesaifmustafa 11 жыл бұрын
I dont understand a thing! I want to learn a functional programming language but it seems so hard!
@AshtonK1816
@AshtonK1816 13 жыл бұрын
@cmatt85 I dunno. I work with Lisp professionally, and Lisp really lacks any of the guarantees that Haskell provides. Although Haskell is definitely derived from a lot of concepts created in Lisp, the resulting language is a different beast all together.
@adrianmaulanamuhammad7225
@adrianmaulanamuhammad7225 5 жыл бұрын
Why we do not use python instead? What makes haskell/clojure special?
@cmatt85
@cmatt85 13 жыл бұрын
So much of this sounds like lisp to me.
@TanmayPatil37
@TanmayPatil37 7 жыл бұрын
Without explicit guarantees and speed that come from static strong typing
@Ottow102
@Ottow102 11 жыл бұрын
6 people think java is the best programming language....
@e10byagrue
@e10byagrue 11 жыл бұрын
I am catching about half of what he is saying... I feel like he steamrolls over stuff far too quickly. This would work fine as an introduction, but none of the details or real explanations are there. Also, why is he laughing at the questions people ask?
@jinilover
@jinilover 10 жыл бұрын
understand fp is cool, just curious that haskell has been invented for 24 years, has it always been popular? If just popular these few years, why?
@katawatenshu
@katawatenshu 10 жыл бұрын
As multicored processors are now standard and core counts will only be increasing with time, and also as software grows more complex, functional languages are becoming more popular because they're easier to maintain and much easier to program concurrently with. Concurrency is doing multiple things at once to make use of more computer cores.
@RossCourtright
@RossCourtright 12 жыл бұрын
I Wanna learn me a haskell for great good
@EnderMuabDib
@EnderMuabDib 13 жыл бұрын
I learned some Haskell last year and is one of the most amazings languages I've ever seen (like APL, but I've never been able to code a single line). It includes other wonderful things such as list comprehensions, where you define a list just writing the conditions that every element must satisfy to be include in it. y = [ x | con1, cond2, ... condN] For example, x is an element of list y if it's included in the list of intergers 1 to 50, and also x is odd: y = [ x | x
@edvansousa1270
@edvansousa1270 4 жыл бұрын
amazing language.
@sufficientlyoldskool
@sufficientlyoldskool 12 жыл бұрын
Ugh, my head hurts. I think I'm gonna go take a nap.
@narucy56
@narucy56 10 жыл бұрын
We hope all the replace Android APIs and Web browser control APIs to Haskell optimized.
@marksaving756
@marksaving756 6 жыл бұрын
It's funny watching a non-mathematician be awed by the concept of disjoint union.
@karllopes
@karllopes 4 жыл бұрын
I had the same feeling when I first started programming in Haskell - The language is beautiful.
@voideric
@voideric 11 жыл бұрын
Get a book, it's easier than you think (If you already can write programs). haskell.org/haskellwiki/Books
@voideric
@voideric 11 жыл бұрын
In my first impression Haskell looked criptic and weird. But I told myself "me shall learn dat". After reading some I went "wow that's amazing I luv it!" Now I'm trying to understand Monads - I think I'm going nuts.
@stvienna
@stvienna 13 жыл бұрын
if you are fine with haskell, master the next step and use the coq programming language oder the agda programming language.
@heavensrevenge
@heavensrevenge 13 жыл бұрын
Code samples=great, Functional=great, Haskell should be used a lot more inside ChromeOS and Chrome as a better way for the internals to be architected and strictly controlled. Great presentation since Haskell content is ALWAYS desired, enjoyed, and overly welcome to me and for use at Google itself.
@georgH
@georgH 5 жыл бұрын
56:20 Now we can use Elm for web frontend in functional style :)
@Philbertsroom
@Philbertsroom 11 жыл бұрын
in french it's actually amuse-gueule!
@kboite
@kboite 4 жыл бұрын
Amuse-gueule is a bit colloquial. Les deux se disent ;)
@can.slaughter
@can.slaughter 7 жыл бұрын
best talk ever
@shishkabobby
@shishkabobby 12 жыл бұрын
This talk is useful in helping to understand Scala - similar ideas, different syntax
@cmatt85
@cmatt85 13 жыл бұрын
@AshtonK1816 Thanks for the reply. I look forward to learning more about Haskell.
@bireswardas4920
@bireswardas4920 12 жыл бұрын
23.20, ghc does not catch it at compile time.
@RogerKeulen
@RogerKeulen 11 жыл бұрын
Hmmm, i can do that in Visual Basic.... i think.....
@lekremyelsew
@lekremyelsew 12 жыл бұрын
The phrase "sounds like Lisp" makes me giggle.
@Nolansan
@Nolansan 13 жыл бұрын
if there is no state change, after a program is running for a long time don't you just accumulate a ton of data and then run out of memory?
@TanmayPatil37
@TanmayPatil37 7 жыл бұрын
Since there is no state change, you can share memory across multiple references without fear. Only changes require new memory, deep copy is unnecessary.
@jamesc313
@jamesc313 10 жыл бұрын
haskell is popular? there is only one haskell job available throughout the whole country.
@JUICEPPL1
@JUICEPPL1 11 жыл бұрын
I've been programming in Haskell for months now and I'm honestly disappointing in this talk. It's confusing even for me to follow.
@rpwarp
@rpwarp 12 жыл бұрын
hahaha :D
Simon Peyton Jones - Haskell is useless
6:23
bunidanoable
Рет қаралды 369 М.
In Haskell, less is more
57:51
London Haskell
Рет қаралды 22 М.
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 67 МЛН
Шок. Никокадо Авокадо похудел на 110 кг
00:44
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Haskell is Not For Production and Other Tales
38:19
Linux.conf.au 2016 -- Geelong, Australia
Рет қаралды 100 М.
Monads and Gonads
49:47
Google TechTalks
Рет қаралды 146 М.
Lenses, Folds, and Traversals
1:54:46
Edward Kmett
Рет қаралды 52 М.
Functional Programming & Haskell - Computerphile
9:19
Computerphile
Рет қаралды 667 М.
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Running a startup on Haskell
50:23
jasonofthel33t
Рет қаралды 111 М.
Why Functional Programming Matters • John Hughes • YOW! 2017
58:18
GOTO Conferences
Рет қаралды 8 М.
What is a Monad? - Computerphile
21:50
Computerphile
Рет қаралды 603 М.
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 67 МЛН