Earlier quoted context omitted.
Yelp does this with its photo gallery, and it's really annoying. When the user is in a linear sequence such as a slide deck, photo gallery or similar, the "previous"/"next" buttons don't map to the browser's back/forward buttons, they navigate the sequence . Littering the history with the navigation history of this sequence does not make sense. However, it'd be nice if browsers could perhaps record the history (perha…
There's no real distinction. If the slides were implemented as separate pages you would get a new entry in your history as you navigate through each of them. Back doesn't mean to go back to the previous domain; it means the previous page. You don't think the slides should be separate pages, but that would mean you couldn't link to them.
Functional Programming using JavaScript
51–60 of 88 posts
Re: Functional Programming using JavaScript
#52Earlier quoted context omitted.
No video was recorded on the occasions I gave the talk. I'd apologize, but actually, you should probably thank me. :-)
you missed a golden opportunity to rickroll hacker news readers
Re: Functional Programming using JavaScript
#53Trying to ride the wave: I have written about functional programming in javascript, see blog posts http://bahmutov.calepin.co/tag/functional.html - Ramda is great!
Re: Functional Programming using JavaScript
#54For those you want to learn the functional programming I'd suggest to immedeately commence looking at Ocaml/Haskell instead to see the real big picture. Because it's of course adorable that you can write map and compose in JS (it's 2014, it can do it everywhere), but FP = many more serious things.
I've been wondering lately, if we skip performance as a consideration (for example lazy evaluation), what is the difference between functional programming and imperative programming without globals, pointers, mutable variables or shared memory? In other words, would an imperative language without side effects (that could do static code analysis) be any different in practice than FP? I'm very serious about this, becau…
Functional javascript, or python, is not awesome because the default datastructures are mutable, and the ecosystem of libraries are written in an OOP style using mutable data structures. There is some small value in writing the code you control in as FP a way as possible, but you aren't going to have a ton of success in that unless you are willing to rewrite your dependencies to also be more functional.
ReactJS may be a killer app that can influence javascript's "opinions" at the ecosystem scale, but that is going to take more time. I've been using ReactJS since it came out as tech lead on small teams, and it was not without challenges to get an OOP trained team to use React well, and to avoid the OO parts of React.
Edit: In theory, yes, if you could somehow statically enforce that your C code (and dependencies, including the OS) have no side effects, then some hypothetical compiler could combine your imperative C statements into functional expressions, though I don't know what advantage that would give you. Maybe I have misunderstood your post.
Re: Functional Programming using JavaScript
#55There is also @fogus' book: http://shop.oreilly.com/product/0636920028857.do I haven't read it yet.
Re: Functional Programming using JavaScript
#56finally, a slide deck that uses `history.replaceState` instead of `history.pushState`. no more having to hit "back" 90 times to exit the deck. how the latter ever became a pattern is beyond me. [EDIT] it probably became a pattern because of browsers that didnt implement the history API, so all hashchange events were pushed onto the history stack.
Re: Functional Programming using JavaScript
#57finally, a slide deck that uses `history.replaceState` instead of `history.pushState`. no more having to hit "back" 90 times to exit the deck. how the latter ever became a pattern is beyond me. [EDIT] it probably became a pattern because of browsers that didnt implement the history API, so all hashchange events were pushed onto the history stack.
Making each slide its own navigation event isn't bad, the problem is that browsers somehow still don't let you jump back to the previous website, not sub-page.
Re: Functional Programming using JavaScript
#58For those you want to learn the functional programming I'd suggest to immedeately commence looking at Ocaml/Haskell instead to see the real big picture. Because it's of course adorable that you can write map and compose in JS (it's 2014, it can do it everywhere), but FP = many more serious things.
Re: Functional Programming using JavaScript
#59For those you want to learn the functional programming I'd suggest to immedeately commence looking at Ocaml/Haskell instead to see the real big picture. Because it's of course adorable that you can write map and compose in JS (it's 2014, it can do it everywhere), but FP = many more serious things.
I hate to be this guy, but learning FP techniques that aren't available in my day to day language isn't terribly exciting. I want to see a short term benefit, so JS or Java focused articles and books are golden for me.