Skip to content

Ready to replace CoffeeScript yet? #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Zearin opened this issue Dec 25, 2012 · 47 comments
Closed

Ready to replace CoffeeScript yet? #125

Zearin opened this issue Dec 25, 2012 · 47 comments
Labels

Comments

@Zearin
Copy link

Zearin commented Dec 25, 2012

Just found this project.

Love its philosophy. Love the kickstarter success story. Love the significant progress of development. Love that development is ongoing.

But for people like me—who use CS and appreciate the design principles of CoffeeScriptRedux—there is one very important question, which is probably the first thing that comes to mind after reading what this project is about:


Is it ready to be a replacement for regular CoffeeScript?

Despite otherwise-great documentation, I couldn’t find an answer to this.

Could you:

  • Answer the above question, and
  • Also put the answer into README.md for others?
@jpleclerc
Copy link

@michaelficarra
Copy link
Owner

@Zearin: Glad you're excited about the project. Right now, I'd say this project is in an early beta. In fact, I'll be tagging it as such and releasing it on npm shortly.

The advice I have been giving people is to try it out with already-stable projects that have good test coverage. If your tests are still passing, the compiler is obviously working for you. It's currently a little too strict with its whitespace requirements (so you might need to tidy up a bit), a few minor features haven't been implemented, and I have a few open bugs I'd like to fix before tagging a 2.0 and looking to merge with jashkenas/coffee-script. For brand new projects, stick with the much more time-tested compiler for now unless you absolutely need one of the features only available in my compiler.

See the related issue #106 and another related discussion on the Google Group.

I'll leave this issue open to remind me to add a little note to the README. I need to update documentation anyhow. Thanks for asking!

@Zearin
Copy link
Author

Zearin commented Dec 30, 2012

Thanks for the update, @michaelficarra!

Quick thoughts:

  • Happy to hear it is on its way to beta-release level on NPM! :)
  • I’ll try and stick to your guidelines for safe use.
  • Have you spoken with jashkenas about this project yet?
    • Reason: When CoffeeScriptRedux becomes mature enough—do you think jashkenas might adopt it as the official CoffeeScript compiler? (Newcomers and veterans alike are probably going to get their compiler from the official source. And it would be oh-so-awesome if the improved compiler’s benefits would have the official channel to reach as many people as possible. ☺)

@Ciantic
Copy link

Ciantic commented Jan 3, 2013

Please write to the README that this is in alpha, and that it is not working yet. I, for one, wasted time looking around is this working or not.

E.g. I tried to copy paste Classes & Inheritance example code from original CoffeeScript page to your tester page only to find out this implementation does not implement all features yet.

@vendethiel
Copy link
Contributor

Isn't that written in the wiki that super doesn't work ?

@Ciantic
Copy link

Ciantic commented Jan 3, 2013

My only point is that the README itself doesn't tell anything of the progress, I did try to go Wiki first but it gave mostly empty page... I see now that they are tucked away.

@vendethiel
Copy link
Contributor

I suppose you can open a PR to add this link to the readme then !

@michaelficarra
Copy link
Owner

@Ciantic: As I said above, I need to update the README and the wiki. If you need it in short order, please open a pull request.

edit: @Nami-Doc beat me to it.

@mark-hahn
Copy link

super will be supported by 2.0, right?

On Thu, Jan 3, 2013 at 12:39 PM, Michael Ficarra
[email protected]:

@Ciantic https://github.com/Ciantic: As I said above, I need to update
the README and the wiki. If you need it in short order, please open a pull
request.


Reply to this email directly or view it on GitHubhttps://github.com//issues/125#issuecomment-11859819.

@michaelficarra
Copy link
Owner

Of course.

@mark-hahn
Copy link

Sorry, I'm just paranoid.

I must be one of the fud promoters that are such a thorn in your side.
Sorry about that. I just have a lot invested in coffeescript, as a user.
I know that doesn't count for much compared to people that have invested
effort into CS itself, but I'm a selfish person.

On Thu, Jan 3, 2013 at 1:38 PM, Michael Ficarra [email protected]:

Of course.


Reply to this email directly or view it on GitHubhttps://github.com//issues/125#issuecomment-11862016.

@michaelficarra
Copy link
Owner

Regarding the difficulties surrounding super, see my comments here: #106 (comment)

That's why it's been delayed for so long. super semantics are effing complicated.

@paulmillr
Copy link
Contributor

Development of Redux slowed down much as compared to jun-sep 😿

@michaelficarra do you think the project will be ready in the next few months?

@michaelficarra
Copy link
Owner

@paulmillr:

Development of Redux slowed down much as compared to jun-sep

An unfortunate side effect from switching from full-time to free-time. I'm still working on it when I can! It's now just split among my contributions to all the other OSS projects I love.

do you think the project will be ready in the next few months?

Depends on what you mean by ready. For some people and some use cases, it's ready today.

@martinheidegger
Copy link

I think "ready" means "ready to be used instead of https://github.com/jashkenas/coffee-script in daily problems without new problems"

@archaeron
Copy link

would it be ready to put on npm?

@vendethiel
Copy link
Contributor

It is already on npm, as coffee-script-redux

@archaeron
Copy link

you're right, I'm sorry :)

CoffeeScript and CoffeeScriptRedux don't seem to like each other though

@tonqa
Copy link

tonqa commented Jan 24, 2013

Please support the super keyword, which is really essential for this language. I know so many projects, which are waiting for this issue to be fixed, it really hinders the adoption of this project. 'To be ready' means at least supporting the main syntax of Coffeescript, so you should at least add this to the project before finishing.

@mehcode
Copy link

mehcode commented Jan 24, 2013

Depends on what you mean by ready. For some people and some use cases, it's ready today.

Ready means that when I do npm install [email protected] it installs this project.

@brian428
Copy link

@mehcode
Copy link

mehcode commented Jan 24, 2013

If you're responding to me @brian428, that doesn't count. This project is supposed to supersede coffee-script properly, right?

@michaelficarra
Copy link
Owner

@mehcode: Correct. And that will still be a while. It needs a lot of users and time to shake out the bugs. It is still fairly new code, and only time will make us confident that it is "stable".

@mehcode
Copy link

mehcode commented Jan 24, 2013

Personally, I'd be satisfied with this being merged into coffee-script and versioned at 2.0.0-alpha or something. That would hopefully stop people from working on new features (such as that new, fancy REPL) in coffee-script itself.

@michaelficarra
Copy link
Owner

@mehcode: That new, fancy REPL is being merged in sometime this week and immediately ported over to here. That's why I've been working on it. I wanted a REPL, but not the somewhat hacky one that's currently there when newer, better hooks exist.

@archaeron
Copy link

@michaelficarra so after that the only thing missing that could stop us from using it is the super? :)

@mehcode
Copy link

mehcode commented Jan 24, 2013

@michaelficarra So... not to sound like a broken record. When can we expect to have this merged in and versioned at 2.0.0-alpha ?

@michaelficarra
Copy link
Owner

@archaeron: A few more things. I want to clear up cross-platform support. No matter how much we want to deny it, some people do actually use windows line endings. There's also a few bugs (all listed here in the issues) I'd like to clean up, and some whitespace issue discussions I'd like to try to get worked out. Also, ideally, I want to get the binary operator parsing rewritten. There's a much more efficient way it can be done. And we'll actually have a precedence table, so it will be much easier for forks to modify it. So still a couple months off from being merge-able. It's a slow process. But nothing's stopping you guys from using the compiler as it is right now. Unless you depend on super or splicing or comment preservation.

@brian428
Copy link

I'm one of those Windows line ending folks, because work mandates that we use a specific gold-load of Win 7 for everything we do. In the corporate world this is not uncommon. So as much as it is a pain, there's probably more people affected by the line ending issues than one might expect. :-)

@mehcode
Copy link

mehcode commented Jan 24, 2013

So still a couple months off from being merge-able.

I'd still recommend merging now. Just publish it as an alpha build. Having this be actually in the coffee-script repository would (in my opinion) spur more interest in the project as well as development support. Personally, I've been holding off on getting involved in actually contributing (as I'm still unsure if this project is legitimately decided to be the next coffee-script).

@archaeron
Copy link

@michaelficarra is there something we can do without knowledge about how a compiler works? (that class has still to come ;) ) event if it's donating so that you can work more on this project?

I'd really love having the sourcemap function :)

@humanchimp
Copy link

@michaelficarra this technique uses super as a closure variable. I'm not sure if an approach like that would help to simplify the semantics at all. In any case it's worth looking at—I find this guy to be a rather extraordinary hacker:

http://bbenvie.com/articles/2012-07-25/JavaScript-Classes-with-private-protected-and-super

@ttilley
Copy link

ttilley commented Jan 27, 2013

Holy crap people! This is the kind of feedback loop that makes a developer less motivated rather than more so to continue working on a project that they'd otherwise be passionate about (or at least inspire them to completely ignore the issue tracker). CoffeeScriptRedux is more than just a little bit badass, and it'll get there when it can be implemented to the standard of quality the primary development resources feel comfortable with and proud of. Seriously, it's that simple.

Do you have any idea how long it took Rubinius to be able to run 95% of the standard MRI code you might throw at it, and that JRuby has even given up entirely on providing a native C extension interface despite having an implementation at one point that was essentially 60% of the way there and just ended up being more effort than it was worth to get at that last 40%? The resulting efforts, RubySpec and FFI, are essentially game changing developments and would not have been created in the first place if both projects didn't come together and decide "this shit is hard and we should probably do something about that".

Responding to @michaelficarra essentially saying that "this shit is hard", including linking to further constructive conversation in issue #106, by claiming the project is unfinished/unusable without offering any further assistance or creative input is... Well, to be as gentle and polite as I possibly can be, I can only say that it's uninspiring.

Please note that I'm not talking about the simple "me toos" that go about it without edging towards insulting, as those do tend to be genuinely helpful for prioritizing one's task list and future development efforts. I might also be semi-projecting some recent bitterness and the complaints haven't bothered @michaelficarra at all. 😐

@mehcode
Copy link

mehcode commented Jan 27, 2013

Responding to @michaelficarra essentially saying that "this shit is hard", including linking to further constructive conversation in issue #106, by claiming the project is unfinished/unusable without offering any further assistance or creative input is... Well, to be as gentle and polite as I possibly can be, I can only say that it's uninspiring.

I don't know about anyone else. I would be glad to help and can actually help (with an understanding of this kind of programming having written several compilers, transpilers, dynamic recompilers, etc.); however, I also don't have a lot of free time and I don't want to designate time on this project without knowing that it is going to be accepted / go somewhere. I'm concerned about @jashkenas et all even allowing this to be the next coffee-script. This may sound weird but It also sounds weird to write the next version of something in a separate repository.

@ttilley
Copy link

ttilley commented Jan 27, 2013

@mehcode - That's a good point, a perfectly valid concern, and stated with exactly the right kind of perspective. If only half of the issue comments on my own projects were so clear. ;)

@michaelficarra @jashkenas - What are your thoughts, generally speaking, regarding the above ?

@mehcode - If I can offer encouragement in the form of beer or what have you, please let me know. ;)
Personally, at least in terms of ruby, i've made small contributions to multiple implementations over the years. It's something I can see myself dedicating time to purely out of moment-of-zen-amidst-the-chaos purposes (don't ask... I haven't had a lot of free time lately either...).

Perhaps it's time to learn PEG.js...

@mark-hahn
Copy link

I started a thread about the relative position of CS and CS-Redux here ...

https://groups.google.com/d/msg/coffeescript/N9HS6yN2iDc/5BYmXCiyQ8EJ

@michaelficarra https://github.com/michaelficarra and
@jashkenashttps://github.com/jashkenas
participated.

On Sat, Jan 26, 2013 at 7:40 PM, Travis Tilley [email protected]:

@mehcode https://github.com/mehcode - That's a good point, a perfectly
valid concern, and stated with exactly the right kind of perspective. If
only half of the issue comments on my own projects were so clear. ;)

@michaelficarra https://github.com/michaelficarra @jashkenashttps://github.com/jashkenas- What
are your thoughts, generally speaking, regarding the abovehttps://github.com//issues/125#12745032?

@mehcode https://github.com/mehcode - If I can offer encouragement in
the form of beer or what have you, please let me know. ;)
Personally, at least in terms of ruby, i've made small contributions to
multiple implementations over the years. It's something I can see myself
dedicating time to purely out of moment-of-zen-amidst-the-chaos purposes
(don't ask... I haven't had a lot of free time lately either...).

Perhaps it's time to learn PEG.js...


Reply to this email directly or view it on GitHubhttps://github.com//issues/125#issuecomment-12747117.

@jashkenas
Copy link

Pinged, so here's my thinking:

First of all, don't stress too much about "official" statuses. Because of the nature of CoffeeScript, CS and CS-Redux will always be interoperable and compatible, between each other and different versions, because we're all targeting lowest-common-denominator JavaScript here. There's much less of a chance of incompatible code than say, between Ruby 1.8 and 1.9.

Secondly, I'd love to merge Redux in as the official compiler, once it gets to the point where it's ready to be ... and if it still has the readable-hackable nature of a nice CoffeeScript program. If it ended up as a 100,000-line Java monstrosity, for example, I'd be less keen on merging.

So really, no worries. At this point, both compilers work fine for the vast majority of CoffeeScript code you'd want to write, and there are other working alternatives if you want to go further afield. If there's something that's actually blocking you apart from general uncertainty -- I'd love to hear more about it.

@vendethiel
Copy link
Contributor

Redux's sloc : 3797.
Original compiler : 4042.
And I think @michaelficarra wants to shrink the grammar.

@mehcode
Copy link

mehcode commented Jan 28, 2013

Because of the nature of CoffeeScript, CS and CS-Redux will always be interoperable and compatible [...]

Interoperable, yes; compatible, no. Once they've compiled their respective code to javascript the resultant code will be interoperable. However, they cannot be compatible at a source level simply due to the significant number of bugs that have been fixed in redux (not that this is a bad thing).

Secondly, I'd love to merge Redux in as the official compiler, once it gets to the point where it's ready to be ... and if it still has the readable-hackable nature of a nice CoffeeScript program. If it ended up as a 100,000-line Java monstrosity, for example, I'd be less keen on merging.

Is there any chance this project could be merged now to a redux branch? Thanks to the excellent work from @michaelficarra et all this project only really needs a couple of weekend hacking sessions and it will be feature-complete. This would also assuage any concerns people may have over any decisions on the compiler direction, etc.


Thank you for your post. There is nothing really blocking me, just general concerns, as you said. I was a bit concerned over your post on the google group discussion (you mentioned that you'd rather not merge redux in to coffee-script because of BDFL, etc.) because if that were the case this project would never be more than a fork (and that would be a shame as there is a lot of great work here).

@vendethiel
Copy link
Contributor

Is there any chance this project could be merged now to a redux branch?

I'm not sure I second this. Confusing more users and having to migrate issues etc is probably not the best choice right now.

@jashkenas
Copy link

Is there any chance this project could be merged now to a redux branch?

I don't think quite yet. There isn't a common codebase, so comparing it in a branch wouldn't be helpful .. and the Git history would get more confusing for all of us. Let's wait until it's deemed ready to go.

Talk about having a jashkenas/coffee-script/redux branch, and BDFL concerns make me worried that you haven't gotten the gist of my post. Namely, if you'd like, you should be using Redux today. Do the weekend hacking sessions, use it for your day-to-day work. As far as I'm aware, it's in great shape.

@nkohari
Copy link

nkohari commented Feb 2, 2013

There are still some substantial features missing in redux that would block many from switching. In particular, support for super is a must-have before I can even consider using redux for anything real-world. The work that @michaelficarra et al. has done here is fantastic, but to say it's "a couple weekend hacking sessions" away from complete is just not accurate.

@michaelficarra
Copy link
Owner

@nkohari: Yes, it will take many months, if not years, to finish the last 3 features, even though the first 97 and the infrastructure around them took just 4 months. Thank you for putting that into perspective for the rest of us. We'll be lucky if our children ever see a world with CoffeeScript 2.0.

@nkohari
Copy link

nkohari commented Feb 2, 2013

@michaelficarra Yikes, I guess a hit a nerve. You don't need to jump up my ass. I'm not here to talk shit or troll you... see the part where I said your work was fantastic?

After the comments from @mehcode and @jashkenas, I'm just tempering expectations for others that come to this thread. After reading what they wrote, I tried swapping out the CS 1.4 compiler for redux to see how well it worked in my current project, and everything melted. After spending a bit trying to fix some of the minor issues, I realized that there were several large pieces still yet to be implemented, super being one of them.

I'm not saying redux sucks. On the contrary, I can't wait until it's done, and I've spent the day looking at the code to see if there's any pull requests I can submit. I just want to make sure people don't assume the project is ready to go, and then get a sour taste from it not being ready.

@Zearin
Copy link
Author

Zearin commented Feb 3, 2013

Everyone: Let’s all take a deep breath! ☺️ We’re all on the same side here. Remember, we all want the best, most badass CS compiler possible.

I'm not saying redux sucks. On the contrary, I can't wait until it's done

  • @nkohari : I share your need for super. I also want to appreciate your respectful self-defense when your first comment was interpreted the wrong way.
  • @ttilley : Thank you for reminding everyone that in threads like this, we have to consider our impact on the developer’s motivation, not just the technical issues. @michaelficarra is human like the rest of us. It’s beyond my skill to directly help with writing a compiler, but I hope I can still be of some small help by showing enthusiasm for the project, and offering (what I hope is) constructive input where I can.
  • @jashkenas : Thanks for participating in this dialogue! It means a lot to me that you’re aware of this project. It means even more to me to hear that—one day, when CS-redux is mature enough—you’ll be open to making CS-redux the official compiler. It may be a while, but I look forward to that day.
  • @michaelficarra : Writing a compiler is so far beyond me that I am not even worthy to post in this thread! 👅 But seriously…I bow to your skill, ambition, vision, and discipline—in creating what is already a fantastic piece of software. I really wish I knew how to be more helpful.

    Please don’t get discouraged by the less-healthy aspects of support threads. I think it’s safe to say that pretty much everyone in this thread is here because we love your work!

@nkohari
Copy link

nkohari commented Feb 3, 2013

I think it’s safe to say that pretty much everyone in this thread is here because we love your work!

This. :)

@michaelficarra
Copy link
Owner

Hey, everyone. I've updated the roadmap to include all the things I want to get done before I consider my compiler ready to replace the original. Check it out. Currently, there's 9 things on the list, some larger than others, and it has me reaching 2.0 sometime mid-late March. If any of you would like to work on any of those issues before I get to them, feel free to contribute in whatever way you like. It would be much appreciated.

PS Thanks for the kind words and inspiration, @Zearin.

PPS @nkohari: Sorry I was a little hard on you earlier. You did, indeed, touch a nerve. It's been difficult receiving criticisms where people were expressing a lack of confidence in the project being completed, while at the same time the first major release feels so close to me. I hope the roadmap alleviates some of your concerns. super is probably the only thing people would consider a "major" feature on that list.

Closing this issue, as I think it has served its purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests