Skip to content


Subversion checkout URL

You can clone with
Download ZIP


silly less / coffeescript deps #766

tj opened this Issue · 32 comments
tj commented

pretty brutal that you can't build the thing without these executables... please consider removing these dependencies, it's nothing but annoying

tj commented

handlebars too apparently

tj commented

ew nevermind the entire driver is coffeescript

@tj tj closed this

@visionmedia, we rely on LESS and CoffeeScript for both the web UI and the JS driver-- it's proven to be useful in our development process.

However, we provide a source distribution with all these assets precompiled specifically because on some platforms these tools behave unpredictably. It's detailed in our build instructions:

You can always find the latest source builds here:

tj commented

I don't use things I can't read / contribute to, I'd seriously consider removing at least the coffeescript because that's something people will want to contribute to more so than the CSS.


I appreciate your comments on our use of CoffeeScript. We've found it hasn't been a deterrent to contributions, but your point is well-taken-- you're welcome to look at the compiled JS output from the latest build package-- the output is located at drivers/javascript/build/rethinkdb.js.

The compiled version is well-documented and readable-- check it out!

tj commented

the rest looks sweet though, just a little disappointing to run across that. I think build steps are pretty important personally, if it's not reasonably smooth you're just opting-in to a big black box that you have no hope of contributing to. Something to think about though! cheers


The issue isn't that you use coffeescript. It is more that you are claiming to have a "javascript" driver/module but it isn't cause you use coffescript (which is a separate language). To me, this is confusing for anyone but the initiated. I can crosspile python to js, but that doesn't mean I am publishing js modules like that :/

By all means, continue to use whatever you love and keep making cool stuff tho!!


Hmm, this actually makes some sense to me. How hard would it be to make the driver be pure javascript? Could we just take the compiled coffee script and start editing that by hand?


Or we can just say that we have a node driver.


I take issue with this comment:

We've found it hasn't been a deterrent to contributions

How do you know?

Edit: I ask because I had this same dilemma presented to me a number of times; and every time, the impact to potential collaborators outweighed the benefits to the development process.


@kenperkins because they mantain the project and are happy with the level of contributions?

IMO there are more important things to worry about right now than back-porting the node driver to js, like the ~250 open issues, optimizing performance or supporting secondary indexes :)


Hi all, I'm the one who nudged @wmrowan to use CoffeeScript to write the driver. I'm his boss, so the responsibility is mine.

Firstly, I was a little hurt to find that folks made disparaging comments and then edited them when this issue got twitter attention. Nothing makes the team here happier than knowing that people are taking the time out of their day to play with Rethink. We always welcome criticism, and we try and take full responsibility for all technical decisions. However, we really don't appreciate finding curses in our inbox. Everyone is in this together to make technology a little bit better -- could we please keep things civil?

As to using coffee for the driver, it makes our development process much easier but I can see how it can be confusing to the community. I'm going to reopen this issue and do the following:

  1. Make build instructions without extended dependencies (less, handlebars, etc.) described by @mglukhovsky above (#766 (comment)) much more prominent on the build page.
  2. Revise the wording on the site for the JS driver to make it clear that it's written in CoffeeScript.

In addition, we'll see if we can change the build process to build Rethink without the web UI if any of the dependencies (handlebars, etc.) are missing and Rethink wasn't downloaded via a source distribution. This should be pretty easy, but we have to discuss this a bit first.

Thanks to everyone for your feedback -- please keep it coming!

@coffeemug coffeemug reopened this
@jonathanong jonathanong referenced this issue in strongloop/express

silly javascript #1613


i'd be excited to try this if it was just written with javascript :)


@mglukhovsky @coffeemug Language discussions are nothing new, don't be discouraged by this. I've written my thoughts about those over here:

In short, as a maintainer, pick the tool that's most productive for your task, the core team will do the bulk of development anyway (and has to support it).


Coffeescript is considered hard to pick up now? I can understand the argument if Rethinkdb was written in something like Arc Lisp or Brainfuck, but come on.


I also appreciate the irony of the author of a CSS preprocessor complaining about the use of what's essentially a JavaScript preprocessor.


@mtrimpe he doesn't ship Express with Stylus, there's a difference. Also, I fail to see the negative tone in TJ's comments, he just wanted those dependencies removed, and when he realized everything is written in CS he closed this issue. There's some serious overreacting going on here.

@on-topic: I had many situations where I needed to read / alter the code of some module because the documentation didn't cover 100% of the use cases and fortunately it wasn't that hard. That's why I always prefer modules written in plain JavaScript instead of CoffeeScript / Dart / etc etc. Sure, this is a personal preference and I have nothing against this driver being written in CoffeeScript, only thing is I just won't use it.

This situation reminds me of the Riak driver:


That's why I always prefer modules written in plain JavaScript instead of CoffeeScript / Dart / etc etc. Sure, this is a personal preference and I have nothing against this driver being written in CoffeeScript, only thing is I just won't use it.

Your opinions are 100% valid for you, and I'd love to read them on your blog, discuss them on HN or Reddit, and so forth. It's a vital topic. I don't even disagree with you much: My library is written in vanilla JavaScript but the tests are in CoffeeScript ;-)

But is this really a bug or feature request? Somehow, I think not, and I suspect that the issues tool is not the best place to make this kind of contribution.


I don't use things I can't read / contribute to

Come on. It’s coffeescript! It does not differ much from javascript. It compiles to JS almost 1:1, unlike clojurescript and stuff.

This is really weird excuse to not using great piece of software. Personally, i’d use and contribute to dart, coffeescript, typescript, livescript or coco projects if they’re cool.

tj commented

I honestly cannot read coffeescript, we use one coffeescript project, an exif parser and it's already becoming a pain in the ass because we need to make mods. I closed the issue because yeah, it is what it is but there's no disputing that it absolutely makes contributions more difficult. I would be equally disappointed if it were dart or similar. This applies to anything though, I look at the source of every single thing I include as a dependency, if it's extremely messy (even if it's js) I won't use it.


@paulmillr CS:JS does not compile 1:1, that's just not true at all.

Coffeescript is a fun toy for people who think clever syntax is the most important aspect of programming.


@hij1nx of course it does. Of course it is. Y U NO like toys?

almost 1:1

chaplin ❯ cat src/**/*.coffee | grep --invert-match --extended-regexp '^\s+#' | wc -l
chaplin ❯ cat lib/**/*.js | wc -l                      
chaplin ❯ coffee -e 'console.log (2467 / 1944).toFixed 3'
tj commented

@raganwald hence why I closed the issue :p


Quite right!


any status on this? i'd love to help because the driver is way ahead of mongodb, but i'm not touching the source code in its current form.


rewriting into ES6 w/ a transpiler would be pretty cool. that's what the author of autoprefixer did (coffeescript -> es6) and i don't think he has any regrets.


:+1: for rewriting into ES6, :-1: for CoffeeScript

Also please please please put this in a separate repository so people don't have to clone the whole rethinkdb when fixing something in the driver. If you want the driver in this repo for the tests then just require('rethinkdb') where necessary.


There have been some thoughts on adopting as the official RethinkDB node.js driver. Rethinkdbdash is written in JavaScript directly. It doesn't have capabilities for connecting to the server through HTTP yet (we need that for the web UI), so we have to implement that first.

Note that we will still be using less and coffeescript for the web UI code, so the dependencies won't change.


@joaojeronimo regarding putting drivers in a separate repository, please see #1740


:+1: for move to ES6 or to rethinkdbdash. TypeScript could be even more awesome, since that would offer autocompletion just like the one in the Web UI, but in our IDEs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.