On Saturday, June 25, 2011 at 12:51 PM, Roman Land wrote:
> Hi Guys,
>
> Was looking at Coffeescript as a base language to develop upon, my concern is that it doesnt really play nicely with the rest of the NodeJS eco system, thus is a niche..
>
> Has anyone here considered and used Coffeescript as part of a big project? is it a good direction?
It works fine if you're into that sort of thing. It plays nice with other node modules, and extends require() to work for .coffee files, so you're good to go. Node can call coffeescript, coffeescript can call normal node stuff.
----
Aria Stewart
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
2011/6/25 Roman Land <roman...@gmail.com>:
On Saturday, June 25, 2011 at 3:26 PM, Roman Land wrote:
> Josh, I see where your coming from (I think), and I understand the reasoning of keeping a clean code stack, this is why I am trying to find the value in adding CS to the mix, but it also sounds like you have not tried it or you didnt find the value in it enough to add it to your tool belt.
> Personally I find some parts in CS that are much to my likings, classes, cleaner code, less typing..
> Its just a matter of cons and pros now :)
>
> So I am still not clear about integrating CS code with non CS libraries, is it a natural thing??
It should be: Coffeescript maps neatly to Javascript. It's really an alternate syntax, not a wholly new language. The semantics are VERY close to Javascript.
----
Aria Stewart
- Ted
Here's something I just experienced. I ran across socketstream - it looks cool, uses socket.io, and might be cool. However, I like seeing examples to see what something can do (I use api docs once I am using something but I like to wrap my head around how something works with a use case example).
Well, they have three examples and some other doc:
https://github.com/socketstream/socketstream
All written in CS. I don't know cs and don't really like the syntax (just preference). However, if you develop something that someone might use, I don't think writing documentation and examples in an abstracted language is useful.
I suggest giving it a try to see what you think. When I first learned of it sometime in the middle of 2010, I was very skeptical and stayed far clear of it. I never would have guessed I'd be defending it now. But a few weeks ago I was starting a new project and thought I would give it a chance.
To my surprise, I'm really enjoying using it and am finding myself more productive. It took very little effort to get up to speed. And debugging with inaccurate line numbers hasn't been a problem at all, as it is very easy to locate the problem coffeescript by looking at the compiled javascript. I haven't had any trouble using it with any node modules and am writing both server and client code with it.
By the way, I'm not a ruby/python developer and have been working with client-side javascript since the 90's. My server-side background is in java, hibernate, spring, etc. I'm completely used to working with curly braces, but am finding the lack of curly braces refreshing. Coffeescript has a place for more than just the rubyists/pythonistas.
Thanks guys, you really helped me to make my mind.
One thing worth pointing out after reading all the comments, is anyone who tried to write a project with CS used it again, and its usually tailored towards the bigger projects (seems to be adding stability == scalability)
Like many others here I am also a huge fan of JS, CS just seems a nice performance wrapper on top of it.
Much appreciated!
Roman
--
---
"Make everything as simple as possible, but not simpler."
- Albert Einstein
As far as documentation goes, check out Docco. It doesn't really
generate traditional API docs, it is more for generating annotated
source documentation. Also, I believe you can create JSDoc compatible
comments using the ### block comment style.
http://jashkenas.github.com/coffee-script/#strings
http://jashkenas.github.com/docco/
I think my biggest concern with standardizing on CF was that new
developers to my team are less likely to be fluent in it. But after
finding it took me very little time to get efficient, that is less of
a concern anymore.
My sentiments exactly. I visualize the Javascript that Coffeescript generates as I code; much in the same way I can visualize the HTML that HAML/Jade/<your template engine> generates. Coffeescript is Javascript in the end. What I find strange is that many people will use pythonic template engines like Jade and Stylus and turn their nose at Coffeescript. All of them are just syntax sugar. Coffeescript sweetens my Javascript code.
--
+1. I am alternating between javascript and coffee. Coffeescript is
nicer to read and maintain for some things but I will go to javascript
when I want more control over the code produced.
also, html is loose markup. meaning that it doesn't enforce xml
standards. ie, i can write <a whatever></A> and it'll work just fine
and i don't have to close things out and they'll generally render
fine. also, there are slight variations on how vendors implement the
dom (or render html into a dom) so 'no behaviors that can go wrong
based on odd conditions' just doesn't cut it from where i sit.
> +1, to Kris and Tauren, Aseem.
>
> Was very sceptical about CS at first, not anymore.
>
> Especially after reading the blogs of Brendan Eich (JavaScript creator), Douglas Crockford (JSON creator).
-1(e9) to CS. It's just the opposite of the "JS of my dreams".
Where/when/what has Crockford said anything (positive) about CS ?
Have you got any links, please ?
--
Jorge.
CF? As in coldfusion? If so, we really have hit the bottom of the barrel...
And tomorrow you'll tell me you use homesite as an IDE :P

You realize replying is the opposite of what you should do to make
that happen, right? ;P
--
Its all just javascript! (in the end)
-Karl Tiedt
(now lets get back to that instead of bikeshedding and bickering)
ps. very well said Mikeal :)
On Mon, Jun 27, 2011 at 15:34, Mikeal Rogers <mikeal...@gmail.com> wrote:
> a few notes.
https://twitter.com/#!/TimSporcic/status/79563314849513473
Especially after reading the blogs of Brendan Eich (JavaScript creator), Douglas Crockford (JSON creator).
-Karl Tiedt
> "One of my favorites along those lines is a new little language called CoffeeScript, which takes the good parts -- not even all of the good parts, but a nice little language -- and comes up with groovy new syntax for it, which is minimal. It's almost like dandelions: little fluffs of programs that do everything that conventional JavaScript programs do. You can't do anything in that language that you can't do in JavaScript, so it's all cosmetic. I don't know if all or much of that will find its way into JavaScript, because I'm not sure there's enough of a payoff there. But just as an experiment, as a design exercise, I think it's a brilliant piece of work. I'm excited to see stuff like that happening. "
I'd put the emphasis in "I'm not sure there's enough of a payoff there".
--
Jorge.
> I would prefer everyone stick with straight js to prevent fracturing the knowledge baseThat line of thinking would have all of us using C for the rest of time.
Sure, I'll correct you. Python is interpreted. There are many forks of python that handle it differently and at at least one does compile it to C.
I didn't mean to say it wasn't fracturing things. I just meant that
fracturing is necessary for evolution. With no evolution we'd all
still be using C.
I don't understand your distinction between compiling to a language
that can be edited by humans and those that can't. I don't see where
that has any link to our discussion. Many languages compile to other
human-readable languages and that is not a factor in whether they
caused disruption or not.
--
Mark Hahn
Website Manager
ma...@boutiquing.com
949-342-4246
Funny to jump into this thread in this fashion, but C++ *did* originally compile into C source code ... and that approach served as the reference compiler for C++ until about 1990.
--
--
Oh, you can't forward-reference functions unless they are named. But
everything in coffeescript disallows forward-referencing. It is a
design principle of the language.
--
I am not aware of any advantages to named functions. It used to be
that named functions were needed for debugging, but nowadays debuggers
use context so coffeescript works fine with debugging.
Oh, you can't forward-reference functions unless they are named. But
everything in coffeescript disallows forward-referencing. It is a
design principle of the language.
--
Me too. I have yet to find tools that match my opinions exactly.
Well, one time I took a sabbatical and forked Python to use prototypes
instead of classes (Prothon) and I made it pretty much exactly match
what i liked. Of course no one else used it.
.> I'm looking for more info about the coffeescript mantra.
Unlike Python, no one writes about "the coffeescript way". I think it
is too new to be so philosophical.
Coffeescript needs a lot of things written about. I had to learn
coffeescript by reading source code and all the issues (boy was that
painful). I'm proud that I posted the issue that caused this google
group to be formed. It was extremely painful reading hundreds of
issues.
Named functions get hoisted to the top of the context to be executed, which can catch you off-guard in coffeescript, if you are used to that.
> I have my opinions on where these things should fall in terms of language features, libraries, frameworks, etc.Me too. I have yet to find tools that match my opinions exactly.
Well, one time I took a sabbatical and forked Python to use prototypes
instead of classes (Prothon) and I made it pretty much exactly match
what i liked. Of course no one else used it.
.> I'm looking for more info about the coffeescript mantra.
Unlike Python, no one writes about "the coffeescript way". I think it
is too new to be so philosophical.
Coffeescript needs a lot of things written about. I had to learn
coffeescript by reading source code and all the issues (boy was that
painful). I'm proud that I posted the issue that caused this google
group to be formed. It was extremely painful reading hundreds of
issues.
You may be brighter than me. And I really think that having a
discussion forum like this would have made it a lot easier. I feel
pressured to only post important stuff in the issues section of
github. Here I ask stupid questions all the time and get great
answers, often from the CS-god himself. :-)
My biggest problem was indentation rules. I kept having my own ideas
of how indentation should work and I'd get surprised. I found myself
pasting code into the online converter all the time. Once I caught on
to the "correct" way of doing the different line-wrapping cases, etc.
it wnt smoothly. Of course back then the rules were changing out from
under me. CS in the beginning even had a:3 instead of a=3. It would
still be a:3 if he hadn't discovered that using the colon ruled out a
lot of cool haml-like object construction.
However hard it was it would have been worth it at many times harder.
I am so hooked now that I would have a really hard time going back. I
just started working at a new place of employment and I'm starting a
project from scratch. The had always used PHP and Bake (which I think
is kind of a PHP rails).
I railed on about how great JS/Node/CouchDB was and to my surprise
they wanted me to go for it in the new project. However, they are
still looking sideways at my use of CS. It's a good thing I have the
old argument about how I could just delete the CS files, run the JS
through a prettifier, and switch back to JS. I'm pretty confident
that once anyone actually reads my code seriously and writes some they
will get hooked also.
> > -1(e9) to CS. It's just the opposite of the "JS of my dreams".
> I am not sure I understand how it is opposite, please be specific!
Syntax. This sudden urge to make JS look like CS is pointless, because CS's syntax is not better than the current syntax. It's even foolish, as if *that* was what we were dreaming for ES.next. I don't want it to look cool on the surface, I want it to be better deep inside. I like function hoisting, call()s with (obligatory) parens, blocks enclosed in curly braces, useful punctuation marks such as semicolons, and I don't like meaningful indentation à la python. Yes, I just like its C-like syntax. What's wrong with that ? C is a honorable language. It's the language of the linux kernel, it's the language of git, it's the language of most embedded processors, it's the language of openCL, it's the language that every programmer that wants to deserve to be called a programmer will have to learn, sooner or later. CS is... CS who ? The time/effort would be better spent in adding interesting features that are missing, such as e.g., in the multi-core era, language level support for parallelism, to name one. Seriously, these are the things that would make ES.next a better language. But instead, looks like we're fixing what ain't broken.
--
Jorge.
I do. I live with that damn surface all day long every day.
On Wed, Jun 29, 2011 at 2:15 AM, Jorge <jo...@jorgechamorro.com> wrote:
> I don't want it to look cool on the surface,
--
You don't have to use it,
and still you seem annoyed by CoffeeScript.
That's interesting because it suggests anxiety. Why are you mentioning the linux kernel when we're discussing syntax? Makes no sense as C's power is in anything BUT its syntax.
"it's the language that every programmer that wants to deserve to be called a programmer will have to learn, sooner or later. CS is... CS who ?"Now that's quite a clownesque thing to say and pretty much proves that you're just on you're own little crusade regarding this syntax business.
I agree with you on the need for more meaningful improvements.
>> I don't want it to look cool on the surface,
>
> I do. I live with that damn surface all day long every day.
I do too, and I enjoy it.
--
Jorge.
--
Ruby/Rails blows monkeyballs as far as I'm concerned,
A web programmer should care as much about knowing the difference
between a handle and a pointer as a hair stylist cares about
understanding the difference between a swamp cooler and an air
conditioner.
If they happen to it's great... but it does not and will not affect
their chosen job.
-Karl Tiedt
Node allows major programming paradigm shifts away from higher back and
forth server calls in MVC by using web sockets and/or listening on the
backend of db changes with most interface work done on the front end w/
jquery / backbone / whatever client stuff. That's where the real
breakthroughs are (ie the Rails successor), not another level of syntax
abstraction.
I think it would be more beneficial to put more attention to best practices and recipes with Node instead of all this brain attention to syntax flavor of the month.
Node allows major programming paradigm shifts away from higher back and forth server calls in MVC by using web sockets and/or listening on the backend of db changes with most interface work done on the front end w/ jquery / backbone / whatever client stuff. That's where the real breakthroughs are (ie the Rails successor), not another level of syntax abstraction.
For example, I'd love to see what Jed Schmidt could accomplish if he decided to write code for a living, but we can't very well force him to do that, now can we?