Тёмный

Elm crash course - Building unbreakable webapps fast 

freeCodeCamp.org
Подписаться 10 млн
Просмотров 98 тыс.
50% 1

Elm is a delightful functional language for reliable webapps. It compiles to JavaScript, has great performance, no runtime exceptions, and can be embeded easily into existing JS projects without the need for huge rewrites or time investment.
We'll be taking a practically focused crash course tour of Elm, ideally you'll walk away being able to put Elm into production either from scratch or in an existing project.
Mario is an Australian living in London, where he organises the Elm London Meetup group. He believes technology should make life simple and joyful, and enjoys being able to prove so.
Talk by Mario Rogic (@realmario) at the Reactivate London meetup.
Recorded by Pusher.com. Check them out if you want awesome real-time tools, and subscribe to the their RU-vid channel for more talks!
Pusher's channel: / @pusher_realtime
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: medium.freecodecamp.org

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

 

2 июл 2018

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 88   
@pushqrdx
@pushqrdx 5 лет назад
3:07 that hand fart 😂
@jebwatson
@jebwatson Год назад
For me, 33:00 was the defining moment of the talk. "There's nothing this app does, that isn't here" That's crazy powerful and appealing to me.
5 лет назад
Brilliant talk! This is great and clear explanation even for someone like me as I've never written anything in Elm.
@AnonymousAnonymous-gh5fs
@AnonymousAnonymous-gh5fs 2 года назад
As somebody who needs to learn elm at a base level within the next month and a half, and as somebody who will be basically screwed if I dont learn elm within that timeframe, I very much appreciate this talk.
@martiruda
@martiruda 2 года назад
like anything, takes time to unlock your brain capacity but then it's just pleasure
@gabbah79
@gabbah79 5 лет назад
Amazingly clear explanation of the Elm runtime!
@oliveryt7168
@oliveryt7168 2 года назад
Wow, this talk is quite helpful. Some things got much more clear and I got more understanding about Elm. Elm looks even better now. Thanks!
@VirakNgauv
@VirakNgauv 2 года назад
Awesome talk! I don't have a need to learn or develop in Elm yet but even so, the talk was good enough that I watched it from start to finish!
@lennyedwards62
@lennyedwards62 3 года назад
Really good talk and light intro. Much appreciated
@CorpsewieldeR
@CorpsewieldeR 6 лет назад
Yay for more Elm exposure!
@lennoxroger4151
@lennoxroger4151 3 года назад
A trick: watch movies on flixzone. Been using them for watching loads of movies lately.
@AmitKB00
@AmitKB00 Год назад
Very clear explanation. JavaScript stack comparison with Elma (@ 9:21) is a great help for me. Thanks a lot for such a great talk.
@flexairz
@flexairz 5 лет назад
5:47 to get to business
@ibealgoody8524
@ibealgoody8524 Год назад
"Here's a crash course." "I'm not going to teach you anything."
@flylord4361
@flylord4361 2 года назад
This was an awesome talk. Really appreciate this knowledge.
@allabouthim82
@allabouthim82 11 месяцев назад
This was a great breakdown and fantastic explanation.
@BryanChance
@BryanChance 2 года назад
First time I've heard of Elm. I'm shocked that able to grasp the whole concept. This never ever happened to me. :) I don't know the Elm syntax other than what you presented here but I'm confident Elm is my new favorite language. I think credit has to Mario. Thank you. I looked at Elixir and other FP languages, they all gave me such a bad headache. LOL :_)
@SigSeg-V
@SigSeg-V 2 года назад
The concepts are great but unfortunately elixir buffs can't properly teach what is happening in toddler speak so a lot of people can't fully understand it. I might make some vids about it just to reinforce my knowledge about elixir
@bilalrasool9521
@bilalrasool9521 2 года назад
Beautiful explanation. simple and understandable
@dmitrii_zolotuhin
@dmitrii_zolotuhin 5 лет назад
is some one eating on the background? is it kitchen actually or what
@LeSaboteur3981
@LeSaboteur3981 3 года назад
Really good, interesting and entertaining Speak! This was my first touchpoint with Elm and a great overview
5 лет назад
Yes. It's ridiculous how bloated are the depencies of an NPM project.
@3nt3_
@3nt3_ 3 года назад
@@SimonWoodburyForget no?
@NicolaLarosa
@NicolaLarosa 3 года назад
Awesome job, thanks a lot.
@codeonice7595
@codeonice7595 5 лет назад
I wish you guys can create a elixir and phoenix fullstack tutorial, it would so beneficial to us. Thank you
@bocckoka
@bocckoka 5 лет назад
I think Noredink had a runtime exception, they left a Debug.crash in the prod code if I recall correctly.
@johncip
@johncip 5 лет назад
Lol, you weren't kidding! To be fair, they did counter with "In that period, our legacy JS code has crashed a mere 60,000 times."
@striker865
@striker865 6 лет назад
Love it!!
@HectorLopez-rr9px
@HectorLopez-rr9px 4 года назад
31:54 is literally why I'm here 😂 But I must say this video is getting me more excited to work with it
@Degenerate76
@Degenerate76 3 года назад
I go around from company to company planting masses of Elm in their codebase, and then quitting just to spread the joy.
@beeshepard
@beeshepard 3 года назад
Very helpful!
@DiggOlive
@DiggOlive 4 года назад
really nice videography
@rsrini7
@rsrini7 5 лет назад
I Wonder, why 5 dislikes.. Very good diagram flow & explanations.
@hahabanero
@hahabanero 5 лет назад
guide.elm-lang.org/ this is the answer
@angadsingh5636
@angadsingh5636 5 лет назад
Any idea where I can find the source code for the interactive presentation?
@flexairz
@flexairz 5 лет назад
Google?
@angadsingh5636
@angadsingh5636 5 лет назад
@@flexairz tried finding it, even went to the guy's GitHub.
@noxiouspro
@noxiouspro 3 года назад
Where can I get the source code of the live slide.
@axea4554
@axea4554 5 лет назад
Elm is nice for two reasons: 1 Its syntax is simpler then for example clojure 2 It is about web apps, so if you are modern front-end dev right now, so elm's concepts are very close
@ilovetech8341
@ilovetech8341 4 года назад
Clojure syntax fits onto one page. We need general purpose languages. I'm hesitant to learn a language that can only produce web apps. I need backend, frontend, concurrency, web apps and phones.
@shimadabr
@shimadabr 2 года назад
@@ilovetech8341 But you only need one job though. As a professional web developer, i think learning Elm can bring a lot of value.
@lucass8119
@lucass8119 5 месяцев назад
@@ilovetech8341 We already have a language that can only do webapps - javascript. It's extremely complex, more error-prone than any other language, with more footguns than C++. Sure, you CAN technically use JS outside of webapps. If you hate yourself, hate robust software, and hate performance.
@NuncNuncNuncNunc
@NuncNuncNuncNunc 2 года назад
There's always talk about how language X will ease developer pain, but rarely do I hear my pains addressed. Immutable types, funtional syntax, type checking, cool, but what about declarative UI, model checking between client and server, opinionated error handling. Virtually every app is a reinvention, so why do we always need to work our way up from the stone age each time we start a new app?
@seegybogy3353
@seegybogy3353 4 года назад
12:04 Ya man...me. Right here....You got one guy here 😩
@chudchadanstud
@chudchadanstud Год назад
What does this have to do with learning Elm?
@neilclay5835
@neilclay5835 3 месяца назад
31:16 - yep, I'm sold.
@SriNiVi
@SriNiVi 5 лет назад
I dont get it. How can it not have any runtime exceptions. Runtime Exceptions are mostly logical errors made by the programmer that are syntactically otherwise correct. Nothing stops the programmer in making logical errors. For example nothing stops me from giving an input 5/0 to the compiler. Nothing stops me from making Encoding errors, Regex parsing errors. I dont know how this claim is even valid. Probably elm can be marketed something like, Compiler catches most of the runtime exceptions internally and gives out a readable output without stopping the execution. Would like to suggest a few pointers for beginners trying out elm 0.19 : -> toString no longer exists, it comes from String module now, Use String.fromInt -> beginnerProgram is changed to Browser.sandbox in elm 0.19
@slothsarecool
@slothsarecool 5 лет назад
Vishal Srinivas because you have to handle those cases, if a regexp fails to parse you don’t get an exception bubbling, you just have a result or error that you have to handle
@quangtung2912
@quangtung2912 4 года назад
Because every error will have an explicit type. For example, parseInt return a Maybe Int (like option types in many language) not an Int. It has 2 kind of values, one is Int, one is like null but you cant forgot to handle it because you cant get the value of Int inside of it without some kind of unwrap operators. Every functions that can cause error will have types like this. Or you can use function like "map" to not deal directly with it, or function like "andThen" for multiple Maybe that you dont know right away how to unwrap them properly. It feels like you have a try catch mechanism without built in to the language, It works for simple cases like null handling and more sophisticated error types. The technical term for it is what people often called Monad but monad is more general than just error handling.
@Ricardoromero4444
@Ricardoromero4444 Год назад
There are some extremely rare cases where you can get runtime errors (infinite recursion causing stack overflow, for example). But other than those niche cases, everything that would give a runtime exception in another language just returns a "Maybe" in elm. That means the language forces you to handle the case where the operation fails. There's a talk from the company "noRedInk" about using elm in production. If I'm not mistaken they had a single runtime error reported by sentry in something like 4 years. A single exception in 4 years is pretty impressive.
@guled669
@guled669 2 месяца назад
property null or undefined rarely happens in modern javascript codebase or it should not happened with stuff like optional chaining and nullish coalescing operator. Unless the developer here is junior and does not check for null value
@KrishnaDasPC
@KrishnaDasPC 4 года назад
is elm can be used in backend?
@NicolaLarosa
@NicolaLarosa 3 года назад
Watch the video and find out that the answer is no.
@AdamSchelenbergCom
@AdamSchelenbergCom 3 года назад
No, however, there are a couple of close alternatives. Gleam lang (statically typed language on the BEAM machine), Haskell (though Haskell is stretch because it is more advanced), Hamler (which is Haskell on the BEAM machine), and maybe something else.
@robertsandiford6223
@robertsandiford6223 11 месяцев назад
That formatting at 21:45 is a sin!
@xe4me
@xe4me 5 лет назад
Nice presentation. and great work explaining complicated concepts in simple terms. However, your example of the "Worst possible scenario" was very overpromised and kinda fake . I would be surprised if there's any application written in any language in which, if you go and introduce a new function ( or feature) and add a new switch case, would break anything, Your example proved nothing. Why would that code break anyway ? You know what I mean ? If I go into my application, written in Angular, find a switch case and add a new case, how's that gonna break anything in runtime? UNLESS that case is actually being met in the runtime, which could happen in your ELM example too. You didn't add a new feature, you just created an empty function somewhere floating in the code base and praising ELM because nothing broke. How about adding some new business logic . ? How about playing a little bit with the markup and adding some new markup to see if something will break ? Basically, codes break because of change in the business logic, not because of introducing new unused functions. Cool talk any way.
@johncip
@johncip 5 лет назад
He tells an anecdote along those lines at 43:33, but I agree, it'd be cool to see a live example. I haven't used Elm yet, but I can tell you that static typing is in general as he describes. There's a large-ish set of problems that you can catch quickly without having to reload your app. Often they appear during refactoring, since you need to update each reference to whatever you changed. Finding them manually takes longer, and there's no way to be sure you haven't missed any. Unit testing helps there, but it's a classic "Turing tarpit" -- lacking some language feature, the poor dev is doomed to endlessly reimplement it. (The catch, IMO, is that static types add friction in the early stages of getting an idea down, with the amount depending on how "meta" the idea is.)
@OndrejPinka
@OndrejPinka 5 лет назад
I am not sure I am understanding you correctly, I will try anyway. He added a new feature, thus business logic, which actually broke the app. Fortunately, it was compiler - before any runtime could happen - which told him so. Compiler told him to fix the broken code. He *explicitly* chose just to return the model without any change. If he chose to update the model, the compiler would again not let him any further if he broke something else (for example, trying to add an Int and a String). Elm guarantees that all the paths your runtime takes are handled in some way or fashion. It's then up to you how.
@ylee150
@ylee150 5 месяцев назад
Ironic Javascript Poetry is a very good option for a band name.
@Dent42
@Dent42 Год назад
12:16 “space burritos”???
@harshmittal63
@harshmittal63 7 месяцев назад
@GregoryBoswell
@GregoryBoswell 4 года назад
Welcome to the world of compilers and almost writing real code...
@jorgericaldi6438
@jorgericaldi6438 5 лет назад
omg, I just saw a video about Elixir and its syntax was a little rare for me, but this one is really a pain in the brain.
@gabriela.ts_
@gabriela.ts_ 5 лет назад
It's one of the most clean and simple syntaxes I have ever seen. Elm is very pleasant to code, not only the syntax but the architacture.
@xpopcornx1747
@xpopcornx1747 5 лет назад
@@gabriela.ts_ Elm has a horrible syntax. It is difficult to see what is going on and there is no debugger. You have to do a lot of manual searching. They have even made it a talking point that the console guides you when making mistakes, but what this really means is that there will be a lot of errors when coding. If the language was good you wouldn't have to rely on the console telling you what to do.
@gabriela.ts_
@gabriela.ts_ 5 лет назад
@@xpopcornx1747 you are saying that because you are not used to any functional language such as Haskell or ML. And friendly error message is way better than to cryptic messages when compiler detect something wrong, you can't even argue about this. You are right about not having debugger, but I have never needed that, when I need to debug I use time machine to see the application states after each received message, it's way better.
@xpopcornx1747
@xpopcornx1747 5 лет назад
@@gabriela.ts_ I don't think the elm messages are any better than those of the java compiler. These compiler messages give the reason for the error, you don't need to print the code in the console because it is marked red in the code. You will fix these as you write, you don't even have to look at the console, and alt enter will often fix it for you. With elm you have to wait for compilation and then start scrolling through messages.
@OndrejPinka
@OndrejPinka 5 лет назад
@@xpopcornx1747 Talking about compiled Java vs compiled Elm - you need to compile both to get the runtime. It seems to me what you are comparing is the tooling - your code editor for Java has a feature which is able to detect certain types of issues even before compiling. I believe there is a similar tooling (editor plugins) for Elm too - editor would highlight problematic code "as you type" without need to actually go to the console and manually compile.
@lucasa8710
@lucasa8710 2 года назад
I'm learning now, but the documentation is not clear, I can not find anywhere how to create a hover effect for a fucking button
@Ricardoromero4444
@Ricardoromero4444 Год назад
Elm replaces javascript, not html and css. You should do your hover effects with css.
@moofymoo
@moofymoo 5 лет назад
This looks like Elm version 0.18. Current version is 0.19, but it have breaking changes and shitty documentation - elm architecture section is just a draft and examples from v0.18 doesn't work. that's kinda big red flag to not use it for anything at work (unless you plan to leave company and your enemies will have to support it :D)
@johncip
@johncip 5 лет назад
I don't totally disagree, but I think it's a hard standard to apply since so much of the web-app-front-end world has that quality. (e.g. the need for jscodeshift on long-lived react projects)
@jasonhunter6125
@jasonhunter6125 4 года назад
Jesus, get to the frigging point;)
@devdive7293
@devdive7293 2 года назад
Why do people often pronounce HTML like 'heytch TML' ?
@ghostbluster8900
@ghostbluster8900 2 года назад
Thats how you pronounce h in english. In french we say 'ashe' instead of 'heytch'. German is 'ah'
@devdive7293
@devdive7293 2 года назад
@@ghostbluster8900 Not true. The official pronounciation is ˈeɪtʃ (aytch), however since writing my question I learned that haitch /ˈheɪtʃ/ is acceptable pronounciation regionally in England. No idea which regions, but good enough for me 😉
@nokomoko8832
@nokomoko8832 4 года назад
my god what a weird language i feel like my brain is overheating
@Mozescodes
@Mozescodes Год назад
Great explanation, pity the syntax is ugly AF
@ilovetech8341
@ilovetech8341 4 года назад
Sorry. I'm not sold. This is another project to transpile something to JS. Better time would be invested into Wasm or helping Clojure Script. There's just too many programming languages now days. We need general purpose languages... Not DSL languages.
@alxjones
@alxjones 3 года назад
Why not both? The way I see it, more options are better. For me, a general purpose language can never be as good as a domain specific language can be. If there are 10 general purpose languages, then some might be better for my front-end use case but worse for my back-end, or better for mobile but worse for web, or any other such combinations. If instead there are 10 languages per domain, I can create a stack of languages and technologies that are uniquely suited to my particular problem/product. Of course, there is a compromise in the form of needing to use multiple different languages for the same product, and e.g. keeping parity between web and mobile may be harder, but whether or not that's worth it to you is part of the design process. I could go off on why I think general purpose languages are a fool's errand, but I respect some people's desire to have them around, and fully support the devs making them and the ones "selling" them.
@teckyify
@teckyify 5 лет назад
Too much bla bla.
@ccgarciab
@ccgarciab 5 лет назад
it’s called a talk.
@mydemon
@mydemon 4 года назад
First 5:00 minutes are a complete waste of time. Not a word was useful.
Далее
From Rails to Elm and Haskell - Richard Feldman
52:18
Developer Happiness on the Front End with Elm
45:49
Просмотров 43 тыс.
NOOOOO 😂😂😂
00:15
Просмотров 5 млн
IQ Level: 10000
00:10
Просмотров 2,3 млн
Я КУПИЛ САМЫЙ МОЩНЫЙ МОТОЦИКЛ!
59:15
Falling In Love With Gleam
33:26
Просмотров 196 тыс.
React State Management - Intermediate JavaScript Course
2:46:38
Elm at Scale: More Surprises, More Pain Points
29:09
Просмотров 22 тыс.
"Immutable Relational Data" by Richard Feldman
29:37
Просмотров 16 тыс.
you need to build a RUST desktop app!!
27:21
Просмотров 295 тыс.
NOOOOO 😂😂😂
00:15
Просмотров 5 млн