Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 11y ago · link · parent

It's copied from the linux kernel - http://www.linfo.org/kernel_version_numbering.html

comment 11y ago · link · parent

I think not:

> if your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you're worrying a lot about backwards compatibility, you should probably already be 1.0.0.

comment 11y ago · link · parent

yeah, node doesn't do this. node 0.12.0 should actually be (at least) node 5.0, if they followed semver.

comment 11y ago · link · parent

http://semver.org/

comment 11y ago · link · parent

HN auto-capitalizes story titles, because it presumes to know better than the submitter.

comment 11y ago · link · parent

> Callbacks allow await/defer in Iced CoffeeScript

Not the same thing as in ES6, also that project is totally dead.

> generally devs just end up creating long chains of anonymous functions rather than long nests of anonymous functions

Not true in my experience, also not required at all when using async / await.

> Promises actually discourage flat code (and functional programming) for that reason.

This is really not true, Promises are functional and composable, callbacks are imperative.

> I understand they seem attractive but become a hack in complex situations.

Just no. Callbacks lead to terrible "solutions" like caolan/async, callbacks make refactoring extremely awkward.

Callbacks don't even get to claim better performance, because they require a load of internal hacks in node/io.js to maintain state.

With async/await in the picture, callbacks so totally inferior I can't believe someone would attempt to argue otherwise.

comment 11y ago · link · parent

please stick with promises. Promises are the only sane way to deal with async in JS. With people starting to use async/await they become even more compelling.

The people who defend callbacks either don't understand the benefits that promises provide, don't know about async/await or are suffering from stockholm syndrome.

Callbacks do not pass the reversibility test. If everyone had started out with promises and / or async/await, and someone proposed callbacks as a way to deal with this instead, they'd be dismissed as a fool. They're an accident of history and we should forget about them as quickly as possible.

comment 11y ago · link · parent

catching up? io.js is waaaaay ahead of node both in terms of features and community engagement

comment 11y ago · link · parent

Redis.io already does this fwiw

comment 11y ago · link · parent

Sadly dead - https://github.com/zpao/spidernode

comment 11y ago · link · parent

at least get the guy's name right if you're going to take such a principled stand, it's Brendan Eich

comment 11y ago · link · parent

Seems like a lot of people have flagged this article, I wonder which company they work for.

comment 11y ago · link · parent

“IO.js, what’s that?”

This is a hilariously out of touch move by Joyent.

The major concern most people have with node.js is the governance model - the fact that a single corporation controls it makes a lot of people uneasy.

This thin ploy really highlights exactly the kind of company that Joyent is and really validates those concerns. They're not interested in working together with io.js, they're interested in using their corporate muscle to squash what they see as a competitor.

The worst thing is the incentives they're using are barbed - really they're just offering you a discount on their products in return for locking you in to them.

comment 11y ago · link · parent

That's... this story

comment 11y ago · link · parent

Because it's reflective of the experiences of many people?

comment 11y ago · link · parent

obligatory mention that 6to5[0] lets you use all this stuff, and more, today. I've been using it for 3 months now and it has totally transformed the way I write JS applications, it's awesome.

[0] https://6to5.org/

comment 11y ago · link · parent

Its getting a new name: https://github.com/6to5/6to5/issues/596

comment 11y ago · link · parent

6to5 actually supports compiling async/await to bluebird coroutines

comment 11y ago · link · parent

You have chosen to break your own web experience, I'm not sure why you're complaining.

comment 11y ago · link · parent

actually both in many cases, Neo4j does have quite a hostile license, but its biggest downside is that it is graph only, whereas OrientDB (and ArangoDB which is also worth looking at) are "multi-model" - you can use them as pure document (or even key / value) stores, and the graph is just another way of viewing / representing that data. This is really powerful and means that you don't have the problem of duplicating data between different database systems or needing to do cross-data-store joins in your application.

comment 11y ago · link · parent

> Do you have any advise for someone thinking of deploying on GCE?

No, sorry, I've never used that. However, generally - like all dbs, Orient is happiest when it has access to a lot of RAM. Also the Write Ahead Log can take up a significant amount of disk space, those are two things to be immediately aware of.

> I'm also interested in understanding if there is any built-in compression mechanism because I will be storing a large volume of very similar text files. Any hints?

Sadly it doesn't yet do leveldb style document compression, and I've seen no hints that it's on the horizon, but the OrientDB guys are pretty responsive and would probably be open to the suggestion.

> Have you used the lucene indexes much? If so, can you do any of the crazy faceting delivered by ElasticSearch?

I'm just starting to use the lucene indexes now so I can't give much feedback on those yet. It should be possible to do faceting using SQL to a limited degree, but I don't think there's native support for it yet. I think that will get improved in the next few versions because people are crying out for it.

comment 11y ago · link · parent

OrientDB is very cool software, I find it pretty hard to go back to traditional databases now that I've seen how powerful graphs are, but the cool thing about it is that it's still a document store at heart, so you get all the same advantages of mongo, but with the graph awesomeness on top. It's a fantastic tool, but there are a few quirks that can catch beginners out and the documentation is not stellar. It also requires some configuration tweaking to get the best performance for your workload.

I've been using node.js (I develop the official driver - https://github.com/codemix/oriento), but there's pretty good libraries emerging for other languages too. Most people I've worked with are deploying to AWS, one company was running on the bare metal.

comment 11y ago · link · parent

> I have yet to see a real use case for Mongo unless you are building a Facebook clone

People seem to keep making the mistake of building a social network in mongo. It's entirely unsuitable for that.

Source: I've helped 3 companies move their social networks from MongoDB to OrientDB when they figured out that MongoDB prevents them from shipping features that users expect, e.g. friend-of-a-friend style queries

comment 11y ago · link · parent

To whoever downvoted me, am I wrong? Please explain.

comment 11y ago · link · parent

> If I look at most of the libraries commonly used in production JS, pretty much none of them apply classic OOP principles.

Sorry but that's total nonsense. For instance, node.js makes heavy use of classes, as does Backbone, Ember, React, etc

comment 11y ago · link · parent

> those who don't use it are often forced to take it into account in their code; especially library authors.

No, `class` is syntactic sugar for the most common way of doing classes in ES3 and ES5. There is no semantic difference between:

    function Thing () {}

    Thing.prototype.greet = function () { alert("hello"); };
and

    class Thing {
      greet () {
        alert("hello");
      }
    }

They are the same, so it introduces no new traps for library authors.

comment 11y ago · link · parent

ugh, really sick of this meme. OO is a tool in the box, it's useful a lot of the time, sometimes it isn't. The reason ES6 introduces the `class` keyword is that people are doing that already.

comment 11y ago · link · parent

ES6 is fantastic and usable today using the excellent 6to5 [0]. I disagree with all of the author's points, I think these are great features.

[0] https://github.com/6to5/6to5

1
313233
53