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 haven't used my account and don't care about it, am I at risk if I dont do this?

comment 12y ago · link · parent

I dont think you need FRP to do that. In ReactJS, view code is pure, dom event callbacks just return new states[0], and all IO (ajax data access), async pipelines etc stay at the very top of your application at the root of the view hierarchy. Business logic is just functions of data values and/or appstate values. Which is exactly how I imagine the idiomatic haskell solution would look.

[0] dom callbacks actually swap! the nextState value so there are effects down there at the bottom of the view hierarchy, but that's react's fault for not letting you return the next state. e.g.

    <input 
      value={this.state.a.b.c} 
      onChange={_.partial(mori.assoc_in, this.state, ['a', 'b', 'c'])} />

comment 12y ago · link · parent

For the record (for anyone who is following the discussion), I have used the KendoUI/Knockout bindings and am comparing Knockout and React on equal ground. Nothing about the programming model would change if you just used straight HTML <input>s.

The main issue with Knockout here, is that the state of these apps (the JSON blob that changes as you click around) is not nice and rectangular and doesn't fit nicely into ko.observable and ko.observableArray. particularly the faceted search demo has tension where the lefthand facet checkboxes are grouped and have counts, but the top facet list is not grouped and don't have counts. In react, those are backed by the same state data, and the data is just regular nested javascript objects and arrays, you don't need to access the data through observables. You just use underscore to transform the data as you see fit.

comment 12y ago · link · parent

It's just an alternate syntax, so i consider them equivalently simple

comment 12y ago · link · parent

Maybe it's easier to see by example. Knockout doesn't do so well when the state isn't trivial. Build these in Knockout, I dare you to try. (Once upon a time, I tried, and failed, and now I use React)

http://wingspan.github.io/wingspan-forms/examples/form-twins... http://wingspan.github.io/wingspan-forms/examples/faceted-se...

comment 12y ago · link · parent

You can of course continue to have designers handoff markup/CSS for integration by engineering. But if your designer can handle basic javascript, you needn't involve engineering at all. In practice it doesn't really matter if the individual views are sloppy javascript since React separates concerns so well.

comment 12y ago · link · parent

I am the lead guy of a React library: https://github.com/wingspan/wingspan-forms

All the design work was done by an actual designer who maintained the JSX directly. He knows enough javascript to get around but basically he just pretended it was HTML. JSX is awesome because it means designers can commit directly without involving engineering.

comment 12y ago · link · parent

Your boss is your de-facto mentor, choose your boss wisely. It would be very difficult to grow quickly in software if you aren't already doing it full time.

comment 12y ago · link · parent

"we are asked to provide a Github username and a Twitter handle. I suggested that a homepage URL is a more powerful and flexible way for authors to invite the curious to learn more about them"

Your website demonstrates who you say you are. Github work demonstrates who you actually are.

comment 12y ago · link · parent

Datomic doesn't have an O/R impedance mismatch, which is a Really Big Deal.

I attempted to explain this here: http://www.dustingetz.com/2013/03/26/orm.html

comment 12y ago · link · parent

> I find the no benchmarking clause to be absolutely ridiculous in this environment

That's called a DeWitt Clause and most database ELUAs have it.

http://en.wikipedia.org/wiki/David_DeWitt

comment 12y ago · link · parent

I believe Haskell has deeper industry adoption than Clojure does right now. You just don't see it a lot because haskell people aren't as focused on evangelism.

comment 12y ago · link · parent

C++ and Java did not fail. Their goal was adoption, and they made compromises to achieve it. Scala is no different.

comment 12y ago · link · parent

It would be faster to be mentored by (/work with) someone who knows how to architect systems. The better your mentor, the better you will be. If one thinks he is already good enough at architecting systems, obviously he will not improve very quickly. There is always someone better.

comment 12y ago · link · parent

i think you want the application-facing interface to remain REST (links between entities, HATEOAS), but the REST/CRUD client's transport layer wouldn't be traditional http/ajax, rather implement similar capabilities to a Datomic Peer. So a CRUD READ would query a cached Datomic index rather than touch network. Create, Update, Delete could be http/ajax or could be something else like a websocket; I believe transport to be orthogonal to the fundamental principles of REST application design.

comment 12y ago · link · parent

[dead] Facts Conveniently Withheld (medium.com) 34 points by mikeklaas 1 hour ago

https://news.ycombinator.com/item?id=7623815

comment 12y ago · link · parent

Some feedback: I clicked through to Mithril, saw "Virtual DOM diffing" and thought, oh cool, immutable DOM is awesome (I use React). My next question was, why would anyone choose this over React? I clicked around a little bit but couldn't figure that out from the site.

comment 12y ago · link · parent

I think REST is orthogonal to relational data. (Actual REST, that adheres to HATEOAS and a real REST standard. If one rolls his own JSON services, it's not REST.) HATEOAS puts no constraint on how your data is shaped. A specific implementation of REST may or may not have a nice way to navigate graphs.

[0] http://restcookbook.com/Basics/hateoas/

RESTful Web APIs (2013)[1] is a very, very good book about this stuff. The book has a mailing list with some good discussion about this stuff [2].

[1] http://www.amazon.com/RESTful-Web-APIs-Leonard-Richardson/dp... [2] https://groups.google.com/forum/?fromgroups=#!searchin/colle...

I'm still exploring this stuff myself so maybe I am wrong or misunderstanding you.

comment 12y ago · link · parent

> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone.

Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to write hundreds of callbacks to keep everything in sync" said no UI developer ever.

comment 12y ago · link · parent

Big defense contractors, horrifying beaurocracy and all, don't even recruit like this anymore. Source: I worked for one a few years ago and have friends who still work there.

comment 12y ago · link · parent

+1, didn't buy due to back

comment 12y ago · link · parent

Another theory is that big players were buying in 2013 and the same big players are selling in 2014.

comment 12y ago · link · parent

Hi. At your company and other Haskell teams that say they hire elite engineers, is an engineer's compensation higher than comparable non-FP shops?

Please forgive the bluntness; as a guy who is about halfway down "the road to Haskell", it seems like none of the shops that say they value FP are willing to pay more for it. For me, it's been easier to extract money from a javashop that's starved for talent and just figure out a way to install FP there. DK effect might also be clouding my self valuation.

comment 12y ago · link · parent

Functional programming is where you end up if you ask the question, "how can I write better software more quickly with fewer bugs". I know of no shortcut to grokking why FP makes this possible other than just learning how to do it.

comment 12y ago · link · parent

Can you explain like I'm 5 why wall st's actions on the stock impacts overstock's day to day operations and margins?

comment 12y ago · link · parent

Owning a popular open source project is obviously valuable. If you're capable of it, do that. The rest is excuses.

comment 12y ago · link · parent

The difference is that a traditional approach requires you write code that updates your templates (the function `update` in his javascript example). The React version has no analogous logic. So you end up writing less code, and the code you do need to write is simpler.

comment 12y ago · link · parent

Datomic purports to solve the O/R impedance mismatch. I attempted to explain this in a blog post: http://www.dustingetz.com/2013/03/26/orm.html

2699.

Facebook React Community Round-up #17(facebook.github.io ↗)

1 points · by dustingetz · 12y ago · discuss

comment 12y ago · link · parent

Scala and Clojure were designed to succeed Java for all the types of problems that people typically use Java for.
1
899091
121