HNHacker News
TopNewBestAskShowJobs

djfm

414 karma · joined December 1, 2014

submissionscomments
djfm··on Designing simpler React components
flux + deepFreeze your state just to be safe

you also have Haskell for immutability by default and with no other option :)

djfm··on React Makes You Sad?
I think React, in particular in combination with a flux pattern such as redux, has only shifted complexity.

Complexity shifted from a mess of jQuery event handlers shuffling the DOM around to an intimidating mathematical abstraction in the form of functional programming.

The benefit is that you can reason about pure functions, whereas you cannot reason about a mess of intertwined event handlers.

Between to equally complex problems, react forces you to converge on a problem that you can actually solve.

Programming is hard. I think what's happening now is that we're starting to discover issues that were previously hidden by problems that are now solved.

djfm··on Why I No Longer Use MVC Frameworks
Can't really see how the proposed solution is different from React + Redux.
djfm··on Lesbians tend to earn more than heterosexual women
Aha! So it is liking women that, in fact, explains the salary difference between genders, not being a man.
djfm··on LSD: My Life-Saving Drug
Nature is usually far from hospitals too, be sure you have a sober person who can drive in case of emergency.
djfm··on HotDrink: Constraint-Based UI Programming in JavaScript
Sure but there's not much to see yet [1], that's why I didn't share.

I guess the more "interesting" part would be the models [2]: My first goal is to try and generate a Trello like app with boards and lists without writing any code specific to the app outside of the models, and keep the models purely declarative.

I would outline the algorithm I have in mind as:

1) Ask the root model ("Goal") for available "slots", i.e. places where user input is required to build new objects. The tests illustrate this [3].

2) Pass this all to a function (to be written) that prioritizes the inputs to be filled (top level inputs shown first, deeper ones maybe hidden in a disabled next step, etc.) and generates a React UI.

3) Then once there is data in the system, introduce a notion of "user focus", e.g. if a user clicks an existing entity, then the entity fields are passed to the function in 2) in addition to the available "slots" needed to continue building objects and the app will know to prioritize the inputs that have "user focus". Then you could have various "recipes" to generate the UI, published as plugins. E.g. "show all in one form", vs. "step by step onboarding". Same data, same goal, different UI.

I have a feeling many apps can be analyzed as a dependency graph between models and a lot of boilerplate can be deduced from the graph.

I'm doing lots of web development and I'm tired of writing code for simple stuff. If anyone is interested, ping me on GitHub!

[1]: https://github.com/djfm/descriptive-todo-app

[2]: https://github.com/djfm/descriptive-todo-app/tree/master/mod...

[3]: https://github.com/djfm/descriptive-todo-app/blob/master/tes...

Edit: formatting

djfm··on HotDrink: Constraint-Based UI Programming in JavaScript
Sounds very cool! Looks like a spreadsheet with a rich, intuitive UI.

I'm working on a toy project with a similar aim where I'd like to also auto-generate the whole UI (no markup needed), definitely going to look at your approach closely.

djfm··on Italian neurosurgeon appeals to billionaires to fund first human head transplant
Near the end of the video it is suggested that the head transplanted onto a younger body would rejuvenate and hence it would make sense to cultivate clones of yourself and periodically transplant your head onto them to live eternally. This is both horrifying and hard to believe.
djfm··on Colorizing black and white photos with deep learning
This is what must be going on in our brains when we watch black & white movies, fascinating.
djfm··on Time’s Almost Reversible Arrow
I'm very surprised no one posted this yet:

http://xkcd.com/1621/

djfm··on Pogoscript – a compile-to-JS language that emphasises concurrency, readability
> But async IO was seriously complicated. I mean, complicated in a way that made you think, which is not usually a bad thing, but eventually you just want to get stuff done. [1]

Couldn't agree more, very interesting solution you've come up with!

[1] http://pogoscript.org/2012/12/05/async.html

djfm··on Deep Convolutional Generative Adversarial Networks
Looks very intersting (and beautiful), wish I could understand some more of it :)

Could someone explain in simple terms how the arithmetic work? E.g. when they do "smiling woman" - "neutral woman" + "neutral man" = "smiling man", is it like you perform the operations on the networks' weights or something?

djfm··on The Implementation of Functional Programming Languages (1987)
I've read (part of) this book and used it to implement a toy compiler. It helped me a lot in getting a better understanding of Haskell and other functional languages. This is really an amazing book, well worth investing some time into. It starts from simple definitions and concepts and builds up on them - very easy to follow even with little to no previous knowledge of the field.
djfm··on How old are you based on your reactions?
So apparently being stoned consistently increases reaction time by about 10 years.
djfm··on Paris Shootings and Explosions Kill Over 100, Police Say
I live in Paris and was spending the night in the middle of the hot zone. I was a few hundred meters from the Bataclan but fortunately the area I was in was spared. I tried to get a Uber but they were unavailable, "State of emergency, please stay home", the app said. I took a city bike home, rode about 10kms and barely saw anyone in the streets all the way home. It was really, really weird. I'm awfully sad that people can be proud of having killed a hundred innocents. I'm not afraid, I'm just terribly sad. Please stop this pointless killing.
djfm··on Dentists reveal new tooth decay treatment
Where I live in Europe dentists are pretty effective, I got 2 wisdom teeth pulled out under local anesthesia and truly did not feel a thing. Was even able to eat a light meal a few hours after.
djfm··on Juce C++ framework reaches v4 with live-coding environment
This is what they should write on the homepage, thanks!
djfm··on Juce C++ framework reaches v4 with live-coding environment
This looks interesting but I'm having a hard time figuring out which problem it solves, specifically. It seems to do lots of things: GUI, Audio, Project Management - but I already know of tons of ways to do these things. Can somebody explain who would need this and for what? Maybe I'm just not the target audience, I don't mean to be disrespectful.
djfm··on Urbit language tutorial, chapter 0
>Same here. I really don't see the point of renaming well known and defined concepts

I kind of like this whole renaming things thing that a few projects have been playing with lately. I think of elixir/phoenix with all their "hex" "mix" ".ex" files and other disturbing things, Rust with "crates", "cargo"... Words carry too much weight, sometimes changing a few words can force you to make the effort to learn again and you may learn something new

djfm··on Show HN: Metabase, an open-source business intelligence tool
> Null app [...] 33.1MB

Wow!

djfm··on The Drug-Violence Myth
Also applies very well to an old software project.
djfm··on JSONlite – A self-contained, serverless, zero-configuration, JSON document store
Git is also a very nice zero-conf tool to store arbitrary objects and retrieve them by hash :)
djfm··on OMN: Scripting the whole language of traditional staff notation
Very cool! Looking forward to experiment with it. In the same spirit but less advanced (my "language" has bugs, I know) I wrote this toy project: http://sound-of-ascii.herokuapp.com/. There's a demo and you can play around with it.
djfm··on The xkcd survey
Intuitively I'd say a human pairing socks is far better than O(n2) because finding something that matches a given sock is close to O(1) on small sets.
djfm··on Grooveshark co-founder, 28, found dead in home
"toxicology results would be done in two or three months"

This seems like a long time, is it normal?

djfm··on After simple dental surgery, William lost his ability to form new memories
If no link can be found between the dental surgery and the memory-forming loss, could it be that there is actually no link? Have any other hypotheses been researched besides the surgery?
djfm··on With 61 Seconds in a Minute, Markets Brace for Trouble
Could "High Frequency Trading As A Service" be a thing? Someone provides the infrastructure and a nice API to talk with the market and runs your algorithms on their hyperfast computers at the heart of the stock exchange for a fee.
djfm··on Inceptionism: Going Deeper into Neural Networks
Now I'm thinking about all those google cars, quietly resting in dark garages, dreaming about streets.
djfm··on Winners of the 7th Underhanded C Contest
And in French "piou piou" can be used colloquially to mean "bird"... Many languages seem to agree on this.
djfm··on Silk
http://r.weavesilk.com/?v=4&id=hoq105j3r97
← PreviousPage 3 of 4Next →