Javascript to Elm

  • Author: Vários
  • Narrator: Vários
  • Publisher: Podcast
  • Duration: 40:28:57
  • More information

Informações:

Synopsis

A podcast about using Elm coming from Javascript and other languages

Episodes

  • 11: Fetch & Decoding JSON Part-1

    02/11/2017 Duration: 28min

      Fetching and Decoding JSON More that just fetch and use! fetch('dataURI') .then(res => res.json()) .then(payload => { alreadyJSObject(payload.coolstuff); }) .catch(err => neverFails(err)) So with that let’s talk about why it’s more effort than that? (Evan’s post) If I change a type, I want the compiler to complain I can pretty much agree with that statement. From someone who had to check if(obj == (NSString *)[NSNull null] || obj.length==0) in objc a grip ton on incoming JSON data, I can appricate the compilers help on this one. I also had to deal with SOAP endpoints without the cover of .NET to help me, so I don’t feel that JSON is bad, it’s better than what we had. But that doesn’t me it’s good, just that it’s better than what we had before. So we’re less worse off?? I would like some sort of contract between clients and servers. If that’s in a .format type file, great! If there’s something else, I’m willing to try it. I can’t think of a good reason a language should inclue in the stlib a p

  • 10: Taking Functional Back to JS

    19/10/2017 Duration: 31min

      Functional Principles What we’re not talking about. Using flow or Typescript will give us types,(I even linked CoffeeScript 2 in last weeks show) and that can be a lot of help in the loose wild west that JS can be. But this is less about tooling, and more about methods, thoughts, problems solving ideas that we use in languages like Elm and Haskell, languages that encourage us to think about the model design first and the declaritively write our view. These are the things we’re gonna try and focus on, and yeah, it will likely touch on tooling to help us. What better way to help us reinforce this new ideas then to using them in our daily work. What does functional solve for us? State and mutable values are hard to follow, or reason about. Composition lodash The lodash library, by John-David Dalton, offers many things JavaScript doesn’t: consistency, performance and a suite of functions for doing common or otherwise error-prone tasks. There are almost 300 functions in lodash, with the package receiving

  • 9: Union Types, save me from myself

    12/10/2017 Duration: 32min

      Union Types Known as tagged unions or ADTs Tagged Unions: a data structure used to hold a value that could take on several different, BUT fixed types. Only ONE of the types can be used at any single given time. The ‘tag’ field indicates explicitly which one is currently in use. Referred to as datatypes or algebraic data type (ADT). Leveraged in functional languages like what we’re doing now. Probably why I haven’t heard of them in nearly a decade yet. aside man, being a n00b is hard. I think it’s to quickly forgotten that feeling of being overwhelmed at every turn. Thinking, man I’ll never get this. I brush those feelings off everytime I work in Elm, Haskell, Rust, or any else that I am not intimately familiar with, the kind of familiarity that only comes after years of working with something. Having been down this road before, I know, that if i keep at it, it will come. It will snap into place for me, slowly, piece by piece. Now think about those who are possibly working on understanding their first lan

  • 8: Types with Help

    05/10/2017 Duration: 24min

      News and updates Elm conf was last week, and it was fun to follow via slack and twitter. It sounds like it was as amazing as I expected it to be. Really wish I could have made it. Brian Hicks, the organizer, has started releasing the videos of the talks. I was hoping to binge watch them all, but they are being released 2 per day. I like this idea. Gives me a chance to focus on just 2 for that day, and enjoy them. Rather than skipping around from some to others. The motivation was really to give all the speakers due credit for their hard work, and not get buried in an avalanche style release. Once they are all releases, I’ve been making notes on each video as they’re coming out, and hopfully I’ll be able to incorporate it into an upcoming episode soon. Looking forward, Elm Europe 2018 is next Engineering School in Villejuif (near Paris, France) on July, 5-6th. Calling for papers…. Types with that for can haz help You can’t save yourself from …. yourself (SELECTED_PHOTO not SELECT_PHOTO)!!!! Spent probabl

  • 7: Deeper Understanding with Haskell

    28/09/2017 Duration: 33min

      News and updates Keeping these short, and make sure that these episodes remain focused on the goal…learning Elm by doing. Elm Conf is anyday now. I’m hoping to binge watch them all, and will likely to a bonous episode on all the talks, in addition to my weekly learning. Learning Haskell Why I think it might be important? (Elm compiler)[https://github.com/elm-lang/elm-compiler] is written in Haskell Nothing ‘Truthy’ Haskell cannot compare two values that have different types. No coercion. I am seeing some ‘Swifty’ things in Elm, like the maybe or as I learned it, the optional. Also the let .. in expression is something I learned from Swift. Infact, the more I learn, the more I think, oh man, that was borrowed from Haskell! Where did Haskell get if from? So why not go to the source? Learning Haskell University Of Glasgow, Future Learn dot com Setting up Haskell for Mac LINK Wk 1 Defining a function: a function defines an expression with variables Lambda functions: functions don’t need a name The l

  • 6: Elm Architecture with Effects

    21/09/2017 Duration: 27min

    News and updates Elm Architecture with Effects We’re gonna need a few more things in our app setup Update so far has taken a Msg and Model and returned a new Model. We’ll now need it to return a Model AND Command (Cmd). Commands will come right back to our update as a Msg. Which makes sense when you think about it. Update always takes 2 parameters. The first of type Msg, and the next of type Model. Subscriptions will also come right back to our update as a Msg. So now we have Html, Cmd, and Sub Msg that our update can take. Given a model, these are event sources you’d like to subscribe to. Now we’ve got an init that does a bit more than return our initial model. It returns a model and Cmd Msg, just like the output of an update! that makes sense, right? This allows for starting value, and some https requests or whatever else we need to do, i don’t know. Just Data Commands and Subsccriptions are just data. Create the data cmd or sub, and then let the Elm runtime have at it. You don’t actually run the comma

  • 5: Elm Architecture

    14/09/2017 Duration: 33min

      News and updates Up til now it’s been a sort of soft launch, last week I did an announcement on Elm slack, and twitter. And the support and feedback are nothing short of amazing. This community is fantastic, so thank you. Elm Conf Elm Architecture The architecture seems to be a consequence of the design of Elm itself, so it will happen to you whether you know about it or not. This has proven to be really nice for onboarding new developers. Evan has often talked bout seeing this pattern from talks. Picture of yogi bear centered!(felt like a very cool thing) ElmTown Wasting time with the sort of bugs are coming up Pattern looks has these 3 parts Added the beginning scaffold in the show notes Where’s my MVC? So model, view, controller is often what goes in the controller? All the things that can’t be put in the model or view! Model — the state of your application What do we need right out of the gate. Start with the model. Does it need to be a record, list, just an int ? Update — a way to u

  • 4: Rendering HTML

    07/09/2017 Duration: 29min

    News and updates Attended a workshop by Micheal Jackson of React Training, creator of react-router v4 Keep learning and doing Rendering HTML HTML elements that we are used to like div, img, h1 take exactly 2 arguments the first is a list of attributes the second is list of child nodes if there is no attributes or child nodes we provide an empty list [] div [ class "content" ] [ h1 [] [ text "Photo Groove" ] , div [ id "thumbnails" ] [ img [ src "http://elm-in-action.com/1.jpeg" ] [] , img [ src "http://elm-in-action.com/2.jpeg" ] [] , img [ src "http://elm-in-action.com/3.jpeg" ] [] ] ] Import, it’s kinda like JS We use the html library, may be surprised it’s not part of the core library. If you look at things in our JS ecosystem, react & angular. They had moved towards a lean core lib, and extend that will specific libs. Like pulling out propTypes or when angular pulled out the router, bc everyone used ui-router. Like JS import { Component }, rather t

  • 3: Collections

    31/08/2017 Duration: 28min

    News and updates Elm Conf Sept 28th Link Elm discuss Google and Elm Slack Community Packages Reddit Slack Twitter Real Life Mailing list Contributing Elm Town Eposide 18, Mario Rogic I went to React Rally 2017 Amazing Sean Larkin, Shirley Wu, Lin Clark, Max Stoiber, Preethi Kasireddy, Henry Zhu, Michael Jackson Live streamed, but the presentations are up. Learned that Elm is compiled in Haskell Would like to see Elm compile to webassembly .wasm Collections Lists First and formost IMMUTABLE So we don’t push, we .append and that returns a new List value Super rad compiler, helping out the noob Gist Don’t add a string to a string collection, you append a List String, to a List type of String Can concat with the ‘++’ like a string It has no methods or build in functionality Use the List module like List.map or List.filter This can be a bit strange. We are often used to running/appling/calling something kind of method on a type. Well types don’t have methods, JS objects do, and we’re not in JS Land

  • 2: Expressions and Function

    22/08/2017 Duration: 27min

    News and updates reach out, send a message to me on twitter @jstoelm Elm Conf thank Greg and Jason, the amazing guys over at Dawn of the Dev for all their work in educating, helping, and promoting new developers from all walks of life into our fantastic community. Expressions Using the elm-repl (read, evaluate, print, loop) Building with ‘+’ for numbers and ‘++’ for strings No ability to add numbers and strings, ‘+’ only for numbers. sweet. “hello “ ++ “world” “hello world” : String –output “Double quotes in Elm represent string literals, just like in JavaScript, but single quotes in Elm represent character literals.” Comments using – instead of // and for blocks {- -} instead of using /* */ like in JS. And you’ll hear me do this sort of comparison a lot through this process of learning Elm. I want to relate it to something that I know, but I hope that I can tie it into something that you might be familiar with. Math, yep it works the same. Assigning constants The equal sign, or assignment operator =

  • 1: HelloWorld

    16/08/2017 Duration: 20min

    Why this show now? I have gotten a taste of functional programming, and really like it, but Haskell is rough. Map, reduce, filter, slice. I Need that extra little push to keep at it, so by producing this show, I’ve added a little bit of outside pressure to keep me on track. The New Rustacean inspiration Webassembly is coming FrontEnd Masters Lin Clark webpack mozilla So what is the podcast about? Learning ELM as I learn ELM, each episode will focus on a particular part or topic of the language. We’ll start at the beginning together and slowly work up to more advanced topics as we go. Show notes and exercises Possible community interviews and resources I like ELM Town, and would really like more podcast about ELM, rust, web assembly, and other cutting edge shows. If you know of any please drop me a message. What is ELM Elm compiles to JavaScript, so trying out Elm is easy. Current version is 0.18.0 Quick History: created by Evan Czaplicki as his 2012 Thesis. ELM Town podcast Unlike hand-written Java

page 5 from 5