#emberjs

/

      • khoapham1 joined the channel
      • matthewbe has left the channel
      • jyunderwood has quit
      • khoapham has quit
      • aroberts has quit
      • wldcordeiro__ has quit
      • kroofy joined the channel
      • wldcordeiro__ joined the channel
      • ivanskie
        here's a question... so I was that kid in computer class in highschool who avoided JavaScript for some reason.. i've learned VB6, in the 90s. and recently ruby/rails.. and trying to get with the times here.. i'm having some strange relationship with JS. I understand it. but I'm just not excited about it at all. I've been looking at tutorials, and introduction to JS classes.. and its just like in one ear out the other. i understand it.. but im just not
      • where most of you guys are at being able to write something from scratch...
      • what would you guys recommend as a learning resource?
      • vampolo joined the channel
      • i've completed TeamTreehouse intro to JS, and JS basics... and watched the codeschool JS intro.. and its like yah. my brain's treating it like "cool story bro"
      • and I'm pretty sure I need to learn JS.
      • alexspeller
      • NoiseEee
      • alexspeller
        ivanskie: it's free to read online or you can buy ebpub / pdf etc
      • ivanskie
        hmmm. kewl
      • thanks
      • I'll have to try to read those. thanks
      • I have the same relationship with PHP. but I think i'd really prefer to keep it there.
      • iFire joined the channel
      • jonnn has quit
      • ohcibi has quit
      • i can reed and tell you what the code is doing line by line. but sitting down and writing something.. eeeehhh i'd prefer ruby.. i've actually forgotten a lot of VB. except Im thankful for one thing from VB that is part of my DNA now, its like hard wired into my brain about almost any situation be it real life or computer related.. "IF blah blah, THEN blah blah, ELSE blah blah, END" or something like that
      • alankila
        I've been eyeing typescript, thinking that it might be closer to the subset of general statically checked programming that I'm comfortable doing. There are a number of language that compile to JavaScript, and while it's good idea to know it through and through, you might end up writing in some other language in the end
      • ivanskie
        i was looking at ES6.. looks like its a lot cleaner than JS currently...
      • why isn't everyone jumping on the ES6 bandwagon?
      • lol
      • alexspeller
        ivanskie: everyone in ember-land is
      • alankila
        it's a bit new, and legacy's always an issue, the usual suspects
      • jrm2k6 has quit
      • jrm2k6 joined the channel
      • ivanskie
        these all the questions google will probably answer. but.. is ES6 not supported natively as JS in browsers right now, or is that really more to do with legacy code.. like if I were to learn ES6 (by shredding these books and eating all of it, for instant learning -- i wish) and write an app from scratch.. would it work or no?
      • alexspeller
        ivanskie: ember code *is* es6 code
      • alankila
        ES6 is not yet going to run in any browser I think.
      • alexspeller
        ivanskie: (assuming you are using ember-cli)
      • ivanskie
        but there are so many ; and extra {}...
      • ah
      • no native support i understand.
      • alexspeller
        ivanskie: no, it's all transpiled
      • alankila
        I wish people would just call it "compiling". Is there even a technical difference?
      • wldcordeiro__ has quit
      • ivanskie
        i ignored JS because back in the day it was just for building expanding menus with sub menus, and popping up interesting messages, and that sort of junk... now everyone's on it (i haven't been a developer for last 18 years.. if I finished VB6 two-part course, i probably would have but i didnt get to take part2 where all important stuff was happening.. so i ended up going hardware instead of software..
      • alexspeller
        alankila: yes, generally transpiling means source -> source
      • ivanskie
        w/e semantics..
      • alankila
        so there's no AST translation, and that's the reason?
      • ivanskie
        the transpiling/compiling was fairly obvious conclusion there..
      • lol
      • if ember is in ES6 and in browser u get js.. there's no other way to get there.
      • alexspeller
        alankila: babel has an AST
      • ivanskie
        ^ see what i did there... IF THAT THEN THIS. lol stupid vb..
      • wldcordeiro__ joined the channel
      • alankila
        hmh. Okay so I'm going to just think there's no reason to call it transpiler. It's just normal compiling, the fact that the output is generally nicely formatted code in language other people view as source is probably the reason
      • ivanskie
        oh lol here's a thought. might be end of the world...
      • when ES6 is accepted as widely as JS.. what are you going to do about EmberJS.. JS part..? lol EmberES?
      • ahhh people's brains are going to explooodee..
      • alright i should go back to work
      • lolz
      • alexspeller
        ivanskie: not sure what you mean
      • ivanskie: ember already uses ES6
      • ivanskie
        name: EmberJS
      • alexspeller
        ivanskie: (ember cli anyway)
      • ivanskie: oh, you mean the name?
      • ivanskie
        ya
      • the name
      • lol
      • alexspeller
        ivanskie: I think esnext will always be also referred to as javascript too
      • ivanskie: ecmascript and javascript have long been synonyms
      • ivanskie
        if only i knew emberjs right now as well as all of you... all this free time i have at work i'd be spending building useless apps only i'd use here at work. and maaaybe someone else
      • alankila
        by the way which browser is furthest along in ES6 support, or are people still waiting some official rubber stamp so that the standard is final before implementing it?
      • alexspeller
      • alankila
        I mostly want the lambda expressions, and maybe the for-of
      • ivanskie
        is ECMAScript open source? or proprietary like delphi (aside from having to use proprietary gui like delphi)
      • alankila
        alexspeller: oh wow, thanks
      • plumbacon has quit
      • ivanskie
        oh netscape.. brings so many memories
      • plumbacon joined the channel
      • alankila
        still quite a bit of red in the firefox/chrome columns. But eyeballing it, looks like firefox is closer
      • also surprisingly, Edge is not half bad apparently.
      • ohcibi joined the channel
      • ivanskie
        holy cow... v8 jscript rhino.. blah blah.. seriously? (redundant, rhetorical question)
      • alankila
        Still, it's going to take until that FF42 -- which seems like it's very interesting browser release -- until it gets good.
      • on the other hand, I have Chrome 45 and (x) => 1 compiled in console
      • so it's right about now that the goodies are landing!
      • ivanskie
        oh yah io.js how's that going..
      • plumbacon1 joined the channel
      • is anyone using it aside from the original developers of node, ahem.. i mean io?
      • plumbacon has quit
      • holler joined the channel
      • ooh ic.. so iojs to node is what fedora to redhat?
      • holler
        is it possible to pass an object to an {{#if block helper? e.g. {{#each comment in comments}}{{#if canDeleteComment comment}}<do something> ...?
      • on ember 1.8
      • alankila
        holler: #if (canDeleteComment comment) possibly if you have such a helper
      • alexspeller
        ivanskie: they are merging apparently http://thenextweb.com/dd/2015/06/16/node-js-and...
      • ivanskie
        oh boy
      • alankila
        not 100% sure what you were asking though
      • holler
        alankila: I get error when doing in the form that I pasted
      • alexspeller
        holler: I don't think so on 1.8
      • alankila
        holler: yes, I assume that #if is one-argument thing
      • holler
        alexspeller: darn ok, I wonder how I can achieve this?
      • I want to conditionally show a delete button
      • alankila
        though given how little I know of htmlbars, I might be wrong.
      • holler
        and dont have the luxury of upgrading ember
      • alexspeller
        holler: use a computed property
      • holler
        alexspeller: but how can I pass in the current comment? Im doing this inside an {{#each loop
      • plumbacon1 has quit
      • alankila
        holler: or write a helper called canDeleteComment which can answer the question about any comment.
      • plumbacon joined the channel
      • holler
        ok
      • jonnn joined the channel
      • alankila
        use ( ) to invoke a helper, it's s-expr style, sort of like lisp
      • locks
        or, Componentâ„¢
      • holler
        hah
      • alexspeller
        holler: you don't pass in the current comment
      • locks
        alankila: 1.8 doesn't have nested expressions
      • alexspeller
        holler: you make a computed property that returns true or false
      • alankila
        e.g. you can generate arbitrarily complex computation in style of #if (combine-or (some-condition arg1 arg2) (other-condition arg3 arg4))
      • alexspeller
        holler: with no arguments. Just dependent keys
      • alankila: not in 1.8
      • alankila
        oh, damn
      • well that's too bad, then it's severely crippled
      • holler
        :o
      • alankila
        going-out-of-my-mind-if-I-would-have-to-deal-with-that-crippled
      • locks
        thanks for the useful info :P
      • amazingly, people managed
      • alankila
        yeah apparently you need to return an instance of comment that has a property your #if can check
      • locks
        can you even imagine
      • alankila
        just barely. I'm not very fond of primitive templating languages, though I understand that the realities of observing changes and doing partial refreshing tends to impose limitations.
      • which is why I'm pleased that someone apparently managed to create that super-dynamic get helper
      • khoapham1
        Regarding to the authentication add-ons for Ember 2.0 that I mentioned earlier. Does anyone else use any different add-on rather than the ember-simple-auth.
      • plumbacon1 joined the channel
      • plumbacon1 has quit
      • holler
        alankila: I have had this discussion here before regarding templating language :p
      • ur5us joined the channel
      • khoapham1
        I can't seem to find any other good one. : (
      • holler
        khoapham1: I use ember-simple-auth with ember-cli-simple-auth-token
      • I recommend
      • alankila
        khoapham1: I rolled my own as a session service.
      • plumbacon has quit
      • holler
        that is if you want to use jwt for authentication
      • which is nice and stateless
      • A_ron joined the channel
      • ivanskie has quit
      • khoapham1
        ember-simple-auth is deprecated for Ember 2.0 throwing container.lookup is not a function error.
      • basz has quit
      • holler: Are you using Ember 2.0 or still 1.x?
      • holler
        khoapham1: Im pretty sure that deprecation will be resolved in next release