Hacker Newsnew | comments | show | ask | jobs | submit | login

> SpaceX may end up with quite a large number of rockets, which they'll have to fly to establish costs/risks/etc.

I assumed this was the motivator for their satellite internet backbone scheme.


It's primarily a bundle maker a la browserify. The main difference is that it stretches the definition of module beyond just javascript. It can seem like a build system because you can set up rules to run a particular filter on a matching set of files. An example: run files ending with .sass through sassc. The difference is that webpack always starts at an entry point and only walks the dependency graph. If you want to include a sass file, you need to `require('foo.sass')` (without assigning it to anything) from your foo.js. It will then inline the resulting CSS into the single output bundle.js file and you'll have to split out the CSS with another plugin if you want it in a different file.

If you're just using grunt/gulp to build assets then using webpack will save you effort/maintenance but if you also need to copy files around, ping servers, kick of CI, or some other side effect then you'll need some shell script or build runner in addition.


You need to know Javascript's quirks. I generally recommend [1] for experienced developers. Everything on that page is important to know (edit: except the perf stuff, which changes as the js engines get better). I'll second the Eloquent Javascript recommendation in another comment if you're looking for a more involved book.

[1] http://bonsaiden.github.com/JavaScript-Garden/

With the JS quirks out of the way, I would recommend building something in React and muddle through things with SO/google.

The hardest part of frontend dev for an experienced backend dev is the CSS. CSS is conceptually simple but there's a LOT of random domain knowledge you need to get layouts you want. You can bypass a lot of it by using a sass framework (e.g. foundation or bourbon) at the cost of adding a build step and another abstraction layer on top of CSS.


The vast majority of things in webdev land work similarly to something else. The trick is to learn the underlying pattern and then just remember the parts that make a specific implementation of the idea different. The exception tends to be platform extension (the wordpress/joomla stuff you mention) where every platform has it's own patterns and thought process and I just write off as project overhead.


In the intervening years we've accumulated more js2js compilers. IMO the best one is 6to5 [1].

[1] http://6to5.org/


Spectrum rights came up in the announcement video for the opening of the Space X satellite branch. The response was that spectrum to satellite is not scarce as long as roof penetration isn't required. Handset to satellite would work against that unless it did some sort of voip satellite/wifi handoff.


Yea, looking at the announcement they are talking about something partially optically based. I guess we will see what they can pull off. Optical seems like a difficult choice for anything that moves though.


> The conclusion doesn't offer any advise what should be done instead of eval.

In case anybody is actually wondering, you almost always want a Function constructor:

    var add = new Function('arg1', 'arg2', 'return arg1 + arg2;');
The only exception I've ever run into was in miniature string templating where eval or with was used as a hacky way to generate the context. The best way to do that is replace with a function argument:

    tmpl_str.replace(/{{(\w+)}}/g, function(_, key) { return ctx[key]; })


> In case anybody is actually wondering, you almost always want a Function constructor

I don't see how that's any different from eval.

What you almost always want is a better abstraction of your data and operations, that allows you to stop treating data as code.


new Function() parses the JavaScript code stored in a string into a function object, which can then be called. It cannot access local variables because the code runs in a separate scope.


Function constructor as well as setInterval() and setTimeout() with stringyfied functions are almost as insecure as eval().

Until now I don't think that I have ever encountered a case where any of these were the absolute only solution.


The closest thing to what you're asking about is Pixie [1], which is a Clojure-like language implemented in Pypy's RPython.

[1] https://github.com/pixie-lang/pixie

It'd be possible to implement a Clojure in Nim, you'd just have to port the datastructures and enough primitives to bootstrap the language core (see core.clj, Clojurescript's core.clj, Pixie's stdlib.pxi).


Not sure about Elm, but there are businesses using Microsoft's Reactive Extensions. I know Netflix had a series of blog posts on their use of RxJava and I believe they use RxJS as well.

[1] http://techblog.netflix.com/2013/02/rxjava-netflix-api.html


Rx isn't FRP.


It is according to the creator of Elm. https://www.youtube.com/watch?v=Agu6jipKfYw


If he did say that, I'm not sure Evan still takes that position. At least the last time I saw him talk about it (at SPLASH), he didn't put Rx in the FRP bucket. I know Erik (the creator of Rx) definitely wouldn't put Rx in the FRP bucket. And Conal (the creator of FRP along with Hudak) would only begrudgingly except Elm as FRP.

(sorry, I can't see the video in China).


Flux, as prescribed by Facebook, involves a couple singletons and implementing an action requires coordinated changes across 3-4 files. Many people find this undesirable.

The important part about the pattern is the unidirectional data flow, which limits the amount of code you have to search through in order to track down a bug. How to go about making this happen varies and there are quite a few 'Flux' libraries bouncing around the React ecosystem.



Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact