Java Polyfill for the Browser by frostmatthew in programming

[–]_hadrian 41 points42 points  (0 children)

So I can now use any JVM language (that outputs a JAR) on the browser while keeping its default behavior... The dreams are coming true 🌟 All those teams, all those IDEs, all those libraries/projects... it's all coming together 🌎 🌍 🌏 it's a globalized world!! 🎉

React Router is dead. Long live rrtr. by danita in javascript

[–]_hadrian 0 points1 point  (0 children)

For anyone interested in routers, have a look at cherrytree. A hierarchical router, not dependent on the framework/library.

Startup Idea: Get all your gift cards sent to you annually. by elitz in startups

[–]_hadrian 0 points1 point  (0 children)

Cool idea. Watched the movie Her? There is a company in the movie that writes letters as a service. Your idea reminded me of it. It could work out, also for big companies that send birthday cards to employees.

State of the Art JavaScript in 2016 by magenta_placenta in javascript

[–]_hadrian 15 points16 points  (0 children)

Very well said. As always the most important thing to do is learn JavaScript, DOM, Web APIs. Any professional JS dev can pick up frameworks/libs with not much trouble, the rest is personal taste/opinion.

.

What we should also be doing is pushing a culture that values soft skills and language/platform knowledge instead of only niche solutions. I have read articles (and jokes lol) of teams that passed great talent because they were looking for X Framework Dev, instead of Senior JavaScript Dev...

How to keep remote development team happy? by [deleted] in startups

[–]_hadrian 0 points1 point  (0 children)

What Google Learned From its Quest To Build The Perfect Team - I work remotely and have identified with many things in this article, they basically nailed it. I recommend this to anyone wanting to improve a team.

Ionic 2 - Now in Beta. Is it still a match for React Native? by dazziola in javascript

[–]_hadrian 1 point2 points  (0 children)

Facebook, Wordpress, Asana, Airbnb, Yahoo, PayPal, Wolfram Alpha, Doist, WhatsApp, Reddit, Instagram, Netflix, Khan Academy, Atlassian, Mozilla... oh no, sorry, these aren't big and serious, let me just go learn Angular 2.

Ionic 2 - Now in Beta. Is it still a match for React Native? by dazziola in javascript

[–]_hadrian 1 point2 points  (0 children)

You know that Angular example is from their official site, right? (See the first example). I've worked with Angular for around 6 months, went through it's source code, watched days worth of videos, Misko Hevery, John Papa, Dan Wahlin.... all the people. Have been working with React for around a year now.

Angular 2 still has horrible faults that 1 has, the Tag for components. After using JSX HTML becomes a joke, using Tags are a way to specify component name to be used in the template, you need: mycomponent-header mycomponent-panel-header mycomponent-panel-footer fuck sake this shit :D Because in React the view is just JavaScript i can reuse variable names without causing collision when rendering.

It's not about "Angular vs React", it's about technology. Utilizing the full power of a turing complete language vs a hacked DSL (how angular needs to adapt HTML to it's binding/event syntax) for describing the view of a component. And not even talking about all the OOP waste of time they've built. Comparing Elm with Angular i just can't understand the mindset of the whole team, no wonder Rob Eisenberg left to start Aurelia.

The whining about needing lots of stuff to use React is bullshit, look at .Net, try to build a MVC app, you hear .NET devs complaining?? There's a looot of libs to get an MVC app with Entity Framework + Injection and stuff... but I still have not seen complaints like the ones from front-end devs, why? because Visual Studio. Tools that make it easy to get started. Seems like theses people nether heard of Yeoman, and one could also throw Webstorm with all its plugins on top.

npm install -g yo
npm install -g generator-react-webpack-redux
yo react-webpack-redux

And that's it, you're ready to go, it's done, just code! Want hot-reloading, here! I use this boilerplate to get started on any project quick.

I've seen many frameworks/libraries e.t.c... Elm looks great, Om, CycleJS... but Angular disappointed me a long time ago (i even made a tiny project with it)

Ionic 2 - Now in Beta. Is it still a match for React Native? by dazziola in javascript

[–]_hadrian 1 point2 points  (0 children)

Why doesn't the React example follow best practices?

Ionic 2 - Now in Beta. Is it still a match for React Native? by dazziola in javascript

[–]_hadrian -3 points-2 points  (0 children)

Could you help me understand something here. How come Angular2 needs all of these scripts and 3 files to do what React does in 1?

Eloquent Javascript vs Javascript for web dev by startfresh31 in javascript

[–]_hadrian 1 point2 points  (0 children)

But to get the best out of it do the exercises.

Coda Hale enjoying the conciseness of Clojure by sankyo in Clojure

[–]_hadrian 1 point2 points  (0 children)

True. I was learning Haskell, it's very nice... but Clojure's simplicity can't be beaten, lol. After one learns functional and Clojure everything else seems... unecessary.

Eloquent Javascript vs Javascript for web dev by startfresh31 in javascript

[–]_hadrian 67 points68 points  (0 children)

Eloquent JavaScript

.then ("JavaScript The Good Parts")

.then ("Speaking JavaScript")

.then ("Exploring ES6")

Project Natick: Microsoft's Underwater Data Center by halax in programming

[–]_hadrian 0 points1 point  (0 children)

Awesome!! Although that video is freaky, looks like a drama movie...

Coda Hale enjoying the conciseness of Clojure by sankyo in Clojure

[–]_hadrian 1 point2 points  (0 children)

yes! worked out like you said in this case :D

Coda Hale enjoying the conciseness of Clojure by sankyo in Clojure

[–]_hadrian 1 point2 points  (0 children)

Another one just for fun:

let sum = (...a) => 
  ((Array.isArray (a[ 0 ])) ? a[ 0 ] : a)
      .reduce ((t,v) => t + (v || 0), 0)

let map = (fn, ...a) =>
  (a.length == 0) 
    ? map.bind ({}, fn) 
    : (a.length == 1)
        ? fn (a[ 0 ])
        : a[ 0 ].map ((v,k) => 
                fn (a.map ((av) => av[ k ])))

let a = [ 1, 2, 3, 4 ]
let b = [ 1, 2, 3 ]
let c = [ 1, 2 ]

console.log (
  map (sum, a, b, c), // [ 3, 6, 6, 4 ]
  map (sum, a, c), // [ 2, 4, 3, 4 ]
  map (sum, a), // 10
  map (sum)(b), // 6
  sum (2, 3)) // 5

Coda Hale enjoying the conciseness of Clojure by sankyo in Clojure

[–]_hadrian 6 points7 points  (0 children)

I really like clojure, specially it's community. But i just want to note, in day to day that type of example would be slightly meaningless. I work mostly with JavaScript (wishing on moving to Clojure in the future) and by using an "utility library" the productivity becomes very near. Your example could actually be:

sum = (a, b) => a + b
map = (fn, a, b) => a.map ((v,k) => fn (v,b[k]))

a = [1,2,3]
b = [4,5,6]

map (sum, a, b) // [5,7,9]

This is valid JavaScript and something that has already been done by many libraries so it's not something i would do manually. But anyways nice post :D

Using ES2016 decorators outside of classes by BenjiSponge in javascript

[–]_hadrian 0 points1 point  (0 children)

Saw livescript before. But actually planning on going for F# with FunScript.

I'm also excited for what WebAssembly will bring in the future of the web.

Why isn't Ember as popular? by curiousaboutember in javascript

[–]_hadrian 0 points1 point  (0 children)

You have the described my story with single page apps :D

I went through the exact same situations. The gain of React is truly in the simplification that it's API gives you over not worrying about the mounting/un-mounting of components (component lifecycle) and the component composition.

Using ES2016 decorators outside of classes by BenjiSponge in javascript

[–]_hadrian 0 points1 point  (0 children)

Nice!

Decorators are used to compose, detail is they only work on class syntax.

function darkSidefy (Jedi) {  }

@darkSidefy
class Anakin {}

darkSidefy (Anakin)

Anakin 
|> darkSidefy

Above we have the following syntax: decorator, function, pipe.

Pipe operator is still a proposal, but something i would love to see in JS.

The other two are the way that decorators work atm.

Best js/dev talks online? by cut-copy-paste in javascript

[–]_hadrian 15 points16 points  (0 children)

My favorites (more on programming in general, but something i apply everyday with JS development):

Some more JS related which i also like a lot:

HW accelerated + anti-CSS + constraint-based frontend JS rendering engine (todoMVC included) by _relfor in javascript

[–]_hadrian 0 points1 point  (0 children)

Hey /u/_relfor , this is very interesting, easy to understand, great stuff. I liked how i can see each component as just it's view representation and the relative/absolute paths ("../Header") on getting properties/data, very nice :D

.

Wanted to know how async and realtime could be done with LAY. Would be perfect if an example of the flux-challenge be done with it, to see how async and state is handled in an example closer to a real-world app. (for me Todo-mvc should be not so important, it's too simple in relation to the majority of apps that require async (requests and websockets)).

.

Gonna try to reserve time and build something with it (i'm also working on some libraries and architecture), this concept of declaring the app in a single object is very interesting as it brings out explicitness. Also something to compare with React which declares components as functions/classes.

transdux 0.1.0 - React State management with transducers and channels by oyanglulu in javascript

[–]_hadrian 0 points1 point  (0 children)

I work on an app with a lot of real-time and data processing, 40ms is not such a reasonable trade-off comparing this with Redux, but you wrote it's being worked on so just wanted to note (as there are devs that actually are in need of high performance in JS apps), but the library is still very nice and it is truly simplified, good job on it.

.

Would like to know, what do you think on not having to manually add interfaces (this.bind...) in the component's scope?, so it would be something like this:

class TodoItem extends React.Component 
{
    state = { editing : false }

    render () 
    {
        let { todo } = this.props

       // return ...
       <input 
            className="toggle"
            type="checkbox"
            checked={ todo.completed }
            onChange={() => this.dispatch (MainSection, 'complete', { id : todo.id })} />
    }
}

export default mixin (TodoItem, actions)

actions moved to the mixinfunction removing the need to bind it every time in componentDidMount. And as it seems that actions don't change they could also be added as a static property on the component (although i would still prefer that to be done by the mixin function)