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 10y ago · link · parent

The thing is, people want their new project to get popular, because it validates them and is great portfolio and is motivating to work on, but you can't just stop once you have users. a lot of maintainers just quit when they got the users and used them for what they wanted. That's not very cool. So I don't think the project maturity is so important but rather that the project maturity not go backwards. If you're promoting your stuff on social media, positioning your work to be used by beginners, it needs to be maintained at that level until the users move on. I'm not aiming at anyone in particular right now, im just saying as a thought experiment, what if you make some great thing library and everybody loves it then a year later some idea gets back ported from Elm or ClojureScript and now someone else's stuff is exploding. Are you gonna move to the shiny thing and burn the people who believed in you? It's an impossible choice. I think a lot of people are gonna get burned on this in the next two years and JavaScript world will move back towards frameworks rather than libraries.

comment 10y ago · link · parent

> I’m going to be clear that code I put on github is experimental and I’m not going to respond to issues or pull requests

Stating the project maturity is nice but not that important - it's pretty easy to glance through a repo's code, commits, issues and PRs and judge the project's maturity and how many people are using it and how likely ongoing investment is to occur over the next couple years. You can also look at the maintainer's online presence, blog, talks, social media (be it a person, a team, a corporation, startup or nonprofit). Pretty easy to predict what their priorities are and will be.

People get bit by project maturity only once, and i figure by this time next year it will be common knowledge that for your random semi-popular github project on social media, maintenance is never implied unless promised, and even then not really unless everyone's incentives align.

comment 10y ago · link · parent

React, React Native, ClojureScript

HaskellBook.com

comment 10y ago · link · parent

All IT departments now want people with programming skills, and a lot of people who are already in IT don't like programming. I think you will get offers from most IT departments that you interview at.

comment 10y ago · link · parent

The essential idea of a cursor can be implemented in about 10 lines, and because I actually looked through the source code of mobservable, I understand what they are essentially doing and how it requires a couple hundred lines. Since we're talking ideas here and not implementations, measuring artifacts is not helpful.

comment 10y ago · link · parent

Isn't Martin doing exactly what the rest of the pharma industrial complex is doing - extracting money from insurance companies by working the healthcare system? You can't personify the pharma industrial complex, Pfizer doesn't have a human face or name, but Martin does, so we direct our hatred of the complex at him. Am I wrong? Misplaced hatred does nobody any good, and none of the social media commentary I've seen has expressed a nuanced understanding of why singling out Martin is justified.

comment 10y ago · link · parent

That looks to me, a lot more complicated than it needs to be. I think that has combined two separate things - atoms and cursors. Here they are in javascript:

https://github.com/cjohansen/js-atom/blob/master/atom.js

https://github.com/dustingetz/react-cursor/blob/master/src/C...

Vastly less code than https://github.com/mweststrate/mobservable/tree/master/src. Cursor+Atom has nothing to do with Rx or core.async, of course, and is probably not the future. (I say this as the maintainer of react-cursor)

comment 10y ago · link · parent

Lets see what happens to react. I hear React is building in support for Relay, React Native, other facebook stuff. I <3 <3 <3 react, they have done an amazing job so far, as a React.js consultant and early adopter I owe my financial well-being to React, but big projects from big companies have weird incentives, Conway law, everything made by big companies inevitably goes to shit, yada yada. Maybe Relay ends up being not the best solution to the client/server query composition problem (IMO its not). Maybe people will get burned by 50-shades-of-flux (IMO the Great Flux Wars have barely started) and for the type of company that writes a ton of javascript, the framework pattern will come in vogue again (IMO). Maybe there will be an explosive patent lawsuit where Facebook decides to weaponize its "defensive" patents for whatever reason. I personally believe all of the things in this paragraph will happen in the near term.

Edit; Sorry i meant Conway's Law https://en.wikipedia.org/wiki/Conway%27s_law

comment 10y ago · link · parent

Semver versioning is expensive, it doesn't really make sense for unfunded work. "1.0" is fake security, if you want long term support you will need to acknowledge that out of band anyway. It's unfortunate that many package managers push projects into semver, because then when some dependency inevitably breaks semver semantics, far away things break - spooky action at a distance. But dependency hell is real too. Versioning is hard.

I will be using "0.0.1-alpha.XXX" for projects with immature api, and "0.X.Y-alpha.ZZZ" for projects with mature interface but active development which may break the api, because i think this is compatible with semver package managers, right? I'm okay with people having to run -alpha in production for my small projects, i'm giving you the work for free, read the source code or don't use it.

comment 10y ago · link · parent

Uber operates at global scale, will they just exit seattle market?

comment 10y ago · link · parent

do people actually use LT instarepl for anything but teaching? Side effects in our code are killer, and real world clojure code is, you know, pretty close to referentially transparent but not quite...

comment 11y ago · link · parent

How does compensation play into these results? The 9 categories will have very different comp profiles

comment 11y ago · link · parent

https://en.wikipedia.org/wiki/Conway%27s_law

(You would end up with the same thing)

comment 11y ago · link · parent

(you're replying to the guy who wrote Ember.js)

comment 11y ago · link · parent

That's unfortunately not what es6 const does - const is about re-assignment, not about immutability. (Though you can implement immutability in terms of non-re-assinment if it is const-all-the-way-down, which javascript objects aren't.) And you still need to re-write all the ecosystem to work with immutable objects.

comment 11y ago · link · parent

js objects are mutable; utliliy libraries like underscore, lodash, jquery, do not provide purity guarantees, they export impure functions that mutate objects (e.g. https://lodash.com/docs#merge). When we start leaning heavily on function composition to build our abstractions, we simply must have purity guarantees for everyday utilities or everything falls apart. So to go "full-on functional" in javascript means we need to fork and rewrite the entire ecosystem. And if you're going to do that, there isn't much value in keeping javascript.

comment 11y ago · link · parent

Can we just put more focus on sweet.js so we can do this kind of in a library with standard build tooling? http://sweetjs.org/

There's a lot more operators than |> that you would want. Clojure commonly uses ->, ->>, as->, etc. It should be done in a library if it is done at all.

Also, going full-on functional in javascript is going to end badly, javascript simply wasn't designed for it. If you go down this path in real projects, sooner or later you inevitably end up at clojurescript or whatever other real FP language suits.

comment 11y ago · link · parent

Functions are evil in some languages (C++, Java) because they can't be overridden or customized with virtual methods. In functional languages that don't need polymorphism as much, it's because you can accomplish similar effect with heavy use of higher order functions, which is something that is impractical to do in many OO languages. Functional languages also have their own set of rough edges, FP langauges force an OO programmer to look at a lot of concepts (objects, polymorphism, mutability, encapsulation) in a new light, as they are applied quite differently when you start leaning on functions so heavily. I think if one is in an OO language like Java and starts using static methods everywhere, you end up in a half-way danger zone which can be extremely painful down the road.

Anyway, beware challenging conventional wisdom, it evolved due to past pain and gets passed down generations to avoid that pain, even if the reason is not well understood anymore.

comment 11y ago · link · parent

I think this article is very fair and, today, you know you are ready for cljs when you no longer value all these things over the pure elegance and simplicity and power of great clojure code, which JavaScript doesn't even approach even with React and es6. The type of person who chooses to write cljs is someone who values code elegance and abstraction power above all else at any cost, and, indeed, pays that cost every day when they try to debug core.async, or try to get a newbie's machine up and running (you end up apologizing 10 times about the fragile tooling and then a hundred more time for the horrible stack traces... I hosted clojure katas for beginners at a meetup last night so this issue is particularly fresh) I could go on. But in the end it is so worth it to me because the raw power of clojure just hits all the high notes in my brain in ways no other language has.

comment 11y ago · link · parent

I may have accidentally downvoted you on mobile sorry

comment 11y ago · link · parent

"So, in summary, we chose Clojure for JVM threads + Database drivers, the ability to ship an uberjar and the ease of expressing tree manipulations which were the core piece of complexity in our backend."

for people who may not know clojure here is an example of tree manipulations, it's really powerful especially in UI programming which is all about manipulating recursive structures: https://gist.github.com/dustingetz/c11ae4edb9e0d14787d2

Scala has answers to this too (I would love for someone to reply with the best scala way) but for whatever subjective reasons the clojure way makes me happier for ui work.

As to scala pushing towards typed object mappers, here is one example of generating untyped queries with Anorm [1], I'd be surprised if this couldn't be made to work for their query language, but that said the scala ecosystem has a lot of, shall we say "diversity of opinion" about the Proper Way To Do Things, so I am not surprised that newcomers to the language had a bad time.

[1] (2013) http://www.dustingetz.com/2013/03/26/orm.html

comment 11y ago · link · parent

even so, if you're willing to play the long game, waiting as long as possible before optimizing income is optimal. For example 100k startup jobs into your 30s and one day bam, you're a technical fellow at a bank.

comment 11y ago · link · parent

My understanding is that bitcoin has been broken for quite some time as there have been multiple 51% events from mining pools, it's just more profitable (for now) for these parties to keep the status quo

comment 11y ago · link · parent

I did it in a big project it took a couple days, really wasn't that big a deal, and legacy JavaScript still goes through webpack and works unmodified, then a couple weeks to iron out any kinks in the CI scripts (but was still developing during this time)

comment 11y ago · link · parent

In Javascript: Promise is read-only (public interface), Deferred is writable (private)

on JVM: Future is read-only (public), Promise is writable (private)

The writable interface has "resolve" and "reject" to return a value. The readable interface has "then", "error", "finally" etc which let you compose and combine functions that deal in asynchronous values.

The best Javascript implementation of promises is Bluebird, which doesn't expose a Deferred instance to avoid confusion, it is very nice. bluebirdjs.com/docs/api-reference.html

comment 11y ago · link · parent

i think the best specialists have more general knowledge than most generalists
1
798081
121