Better HN
topnewbestaskshowjobs
Log inSign up

dustingetz

7,912 karma · joined Sep 11, 2009 (17y ago) · 3,625 submissions

Founder Electric Clojure https://github.com/hyperfiddle/electric

https://twitter.com/dustingetz

Submissions

comment 12y ago · link · parent

I don't think you have to convert anything, it should just work by replacing the react build step with sweetjs's build step, though he does say that it isn't heavily tested yet

comment 12y ago · link · parent

I think it's an accurate description. The OS code that reads a file involves changing variables outside function scope, eg pointer writes to memory mapped hardware. Simply forcing all variables to be final, all the way down, really does eliminate all side effects.

comment 12y ago · link · parent

Polymer and React are orthogonal, here is a great comment explaining the difference: https://news.ycombinator.com/item?id=7739755

comment 12y ago · link · parent

SEEKING WORK - Philadelphia or remote

ReactJS expert, using ReactJS since the week it came out, on two enterprise-grade applications, primary author of the wingspan-forms widget library for React [1], screenshots of the first enterprise app here [2], giving a React workshop at Strange Loop 2014 and spoke at QCon on React in May [3]. Available in late august. Strong full-stack application architect (Scala, functional programming). Only accepting work in functional languages, and javascript with React. dustin.getz@gmail.com

[1] https://github.com/wingspan/wingspan-forms [2] https://github.com/wingspan/wingspan-forms#screenshots-from-... [3] https://qconnewyork.com/presentation/functional-programming-... [4] https://www.linkedin.com/in/dustingetz

comment 12y ago · link · parent

+1, I've seen this talk, very approachable.

comment 12y ago · link · parent

> The Bandwagon Effect

I don't know if this is a negative bias. Popular tech is well understood with known risks. Successful outcomes in software are hard enough without adding unknowns to the equation.

comment 12y ago · link · parent

> My biggest question is if and whether all the parochial component systems will somehow be able to cooperate.

If I understand this right, this is a big concern of mine too, I feel strongly that React needs to provide a standard Cursor-like interface to state, otherwise each parochial component system is going to be incompatible with the others.

Here is some discussion on cursors: https://news.ycombinator.com/item?id=7906657

Here is a component library we built at Wingspan: https://github.com/wingspan/wingspan-forms

comment 12y ago · link · parent

Facebook React is the answer IMO.

I used ExtJS heavily for years and identify with this post, I use React now and couldn't be happier. We had to build our own component library[1] (wrapping KendoUI widgets) but React makes it a breeze to take these primitives and build composites.

https://github.com/wingspan/wingspan-forms

comment 12y ago · link · parent

Parent should not have been downvoted and it irritates me that it was

1. hasenhj is correct, Backbone has been superseded for "advanced" webapps for at least two years and should not be used for new webapp development

2. I had the same confusion and question about what exactly ampersand is and what "advanced app" problems it sovles

emotional edit: I've used Backbone, Knockout and React in "advanced" (enterprise-scale) production apps, and studied TodoMVC and skimmed the book for Angular and Ember. My original decision to use backbone & knockout in enterprise scale app almost wrecked my first greenfield project, we spent multiple months ripping out Backbone based code. In 2014, Backbone.Model and Backbone.View are very naive ways to approach frontend problems and it is not obvious why until you've been using them a few months. There is an entire ecosystem of blog posts on HN of people attempting to explain why. Any and all of the above dependencies are better than Backbone/Knockout for new webapp development. They of course have the advantage of learning from Backbone, Knockout, YUI, Sencha etc, so it is no surprise that they tackle the hard problems that backbone makes no attempt to solve.

comment 12y ago · link · parent

I can see at a glance that the one liner is correct, where the explicit version I have to brainparse the whole thing to know if it is correct. (Once you are fluent in the expanded vocabulary)

comment 12y ago · link · parent

Pair programming fixes the turnover problem

2652.

Datomic solves the O/R impedance mismatch(dustingetz.com ↗)

3 points · by dustingetz · 12y ago · discuss

comment 12y ago · link · parent

Basic point free style as described in the article is alright in javascript.

Extreme point free style does not work in javascript, AT ALL!!!! Two reasons:

1) Find the bug: the table sort is glitchy. Is the bug in this suspicious line, or somewhere else? (Real line of code in a codebase I inherited, and yes there is a bug in it)

    var sorted = rows.sort(_.unsplat(_.pipeline(
        _.partial(_.map, _,  accessor), 
        _.splat(comparator))));
2) I use React, so I can get away with a lot of really functional stuff since React is well suited for functional javascript. React is a great functional abstraction, but under the abstraction is imperative code. Imperative code means you need a debugger. When you write in a point free style, there's nowhere to place a breakpoint!

comment 12y ago · link · parent

Have you considered that perhaps the investors have more information than you, or the founders have an insight that you don't have, or that this is not their final product?

comment 12y ago · link · parent

I put viewmodel state with the app state - my app state basically is viewmodel state, domain state source of truth is the database really, so you need to do ajax to traverse the domain object graph, its not stored on the client.

Just like you want to control a react.dom.input, you also may want to control a tabstrip. Maybe you have some biz logic that says "When you click save, select the next record, and if record.type===2, select the third tab". You never know in advance what state needs to be controlled from the top, I found myself refactoring my viewmodel state higher and higher.

The mouse state is never going to be controlled from the top, so that is component local state.

comment 12y ago · link · parent

You can find mine from my github but it is not yet ready for public consumption. As far as I am aware mine is the only one that allows === checks on value & onChange. (I will find time to release and document it in the next week)

comment 12y ago · link · parent

We also use component local state for things like that, and David Nolen (Om) likes component local state too. But the state goes up top by default. The biggest reason for this is because you might want to attach a diagnostic component to your state (e.g. a json editor [1]), and you don't want to have to change the shape of your state to do that.

[1] https://github.com/dustingetz/react-json-editor

comment 12y ago · link · parent

There are like six implementations of cursor-y things for React on the internet in varying degrees of quality. I feel pretty strongly that a quality cursor implementation should make its way into react addons before 1.0.

comment 12y ago · link · parent

fwiw it's possible to achieve all of these benefits in vanilla react using javacsript with regular javascript data structures

    * single mutable ref to normalized app state
    * cursors for encapsulation and modularity
    * O(1) deep equality checks
    * fastest possible react performance
source: I have done it in two large react apps, but i have not documented it yet. Blog post coming soon.

Interestingly, as your app state gets bigger, you are actually forced to use something like cursors for all state updates, for performance reasons. Naive immutability in javascript means clone-before-modify, which is far too slow when your state values are large. It quickly bubbled up in our profiler. Funneling all immutable updates through a cursor means the cursor can use structure sharing on the state value, skipping the defensive clone and preserving reference equality for equal subtrees. Also afaik, implementing a general shouldComponentUpdate (edit: in js) without something like cursors is not possible, because you need === equality for onChange props.

2660.

James Shore (The Art of Agile Development) currently doing AMA on reddit(reddit.com ↗)

1 points · by dustingetz · 12y ago · discuss

comment 12y ago · link · parent

Hi there, a better idea is to not animate and to just show a link at the bottom corner. So I get the goodies when everything works, and if it doesn't work, it stays out of my way.

comment 12y ago · link · parent

Great extension, except in private repos, every time I click on a file (from github proper) the extension animates outward while telling me that it doesn't work with private repos. Extremely annoying and resulted in uninstall :(

edit: i'm not willing to give extension access to private repos, that would defeat the point of being private

comment 12y ago · link · parent

Tech innovation is accelerating.

The old guys vastly underestimate the productivity difference between old tech and hip new tech.

The young guys vastly overestimate how much of their productivity is due to their own smarts rather than using hip tech, and don't sufficiently appreciate that when they get older, the experience they've accumulated won't be worth much, either. Re-learning everything every 5 years is only fun the first and second times.

But certainly, years of experience with some tech is becoming less and less valuable, as the tech is changing faster and faster.

comment 12y ago · link · parent

Yes, like Om. Cursor is a read/write view of a subtree of an immutable tree.

https://github.com/wingspan/wingspan-cursor/blob/master/js/C...

comment 12y ago · link · parent

do you just not use react state at all then? I have a similar sized app as you, we started off naively using state at various levels, over time we refactored the state higher and higher, and now we are at the point where all the state is kept only at the root of the view hierarchy (we use cursors). We're about one step away from lifting even that state out of react and into a store layer that has no react dependencies.

comment 12y ago · link · parent

I use cursors in JavaScript with a flux architecture, and yes, prop passing is a problem for us. I've rationalized it as "there are more wires, but the wires are straight and bundled, not a ratsnest of spaghetti references"

https://github.com/wingspan/wingspan-cursor/blob/master/js/C...

comment 12y ago · link · parent

Haskell is lazy and pure, why can't it auto memoize for us so we can code it like we would in math?
1
888990
121