> I'm starting to wonder whether readtables would also allow all of TypeScript to be compiled with sweetjs. I haven't tried yet but I think all the syntax forms in TypeScript can be handled with just plain sweet.js…
We're working on integrating macros and modules to address this. Once it's implemented you'll be able to do something like `import { m } from "macros.js"`.
Actually sweet.js just landed infix macros [1] so you can match on syntax that comes before the macro name. This just happened last week so we haven't updated the docs or made an official release just yet. [1]…
Yes indeed. Sweet.js already uses syntax objects internally so the groundwork is there for syntax-case. We "just" need to implement and surface the API :)
> The macro syntax is definitely not simple, and it could possibly get really complex for more elaborate syntactic definitions, thus rendering the source much less readable. True, but the same can be said of any…
Thanks for taking the time to write these up! I'm tracking them here [1]. The first two should be fixed and I should have the third ready soon. [1] https://github.com/mozilla/sweet.js/issues/18
> OK, either your description page doesn't get your point across at all, or you're missing a definition somewhere. The description page (like the rest of the project at them moment) is definitely a work in process.…
Yeah there are certainly a few bugs remaining in the reader :) It actually does the right thing if the function is named: a = function foo() {} /5/ 7 correctly translates to: a = function foo() { } / 42 / 7; But clearly…
I've found the path of least resistance is to not change the default keybindings of the various emacs packages. Use the vi bindings for text manipulation and when you need to invoke a package function it's back to the…
Yep, but I managed with viper and vimpulse [1] which give vim bindings in emacs. You can have your cake and eat it too :) [1] http://www.emacswiki.org/emacs-es/Vimpulse
Not sure if const/private are a good fit for contracts but things like "account balance is always positive" can be done right now with contracts.coffee using object invariants. For example, verifying the invariants of a…
MozRepl can give you a JS repl in emacs tied into the browser...no refresh required: https://github.com/bard/mozrepl/wiki
I haven't done any benchmarks yet so not sure. In addition to the guards I think the use of Proxies will cause some slowdown. But you're right the JIT should be able to optimize most of those guards away (maybe even…
> Indeed it would be. That said, CoffeeScript is a compiler of sorts. The fact that we have a compiler doesn't give us all that much. Adding types to a dynamic language (where things can be monkey patched, evaled,…
Well, CoffeeScript/JavaScript doesn't have a static type system. And to add one would be...hard. But we would still like to express and enforce some invariants about our code. And we'd like to do it in a more elegant…
I'm not sure that the relationship between types and contracts is all that tenuous. They both work to enforce program invariants and there's a large overlap in the invariants they can express. Usually contracts are…
It's a fork of CoffeeScript so it replaces your "coffee" executable. If you don't want to overwrite your normal CoffeeScript compiler just run the contracts.coffee "coffee" executable from its own directory. I mention…
Well, the wave people have already said they're stopping development for IE and will just be forcing the chrome frame: http://googlewavedev.blogspot.com/2009/09/google-wave-in-int... As long as wave takes off it'll…
> I'm starting to wonder whether readtables would also allow all of TypeScript to be compiled with sweetjs. I haven't tried yet but I think all the syntax forms in TypeScript can be handled with just plain sweet.js…
We're working on integrating macros and modules to address this. Once it's implemented you'll be able to do something like `import { m } from "macros.js"`.
Actually sweet.js just landed infix macros [1] so you can match on syntax that comes before the macro name. This just happened last week so we haven't updated the docs or made an official release just yet. [1]…
Yes indeed. Sweet.js already uses syntax objects internally so the groundwork is there for syntax-case. We "just" need to implement and surface the API :)
> The macro syntax is definitely not simple, and it could possibly get really complex for more elaborate syntactic definitions, thus rendering the source much less readable. True, but the same can be said of any…
Thanks for taking the time to write these up! I'm tracking them here [1]. The first two should be fixed and I should have the third ready soon. [1] https://github.com/mozilla/sweet.js/issues/18
> OK, either your description page doesn't get your point across at all, or you're missing a definition somewhere. The description page (like the rest of the project at them moment) is definitely a work in process.…
Yeah there are certainly a few bugs remaining in the reader :) It actually does the right thing if the function is named: a = function foo() {} /5/ 7 correctly translates to: a = function foo() { } / 42 / 7; But clearly…
I've found the path of least resistance is to not change the default keybindings of the various emacs packages. Use the vi bindings for text manipulation and when you need to invoke a package function it's back to the…
Yep, but I managed with viper and vimpulse [1] which give vim bindings in emacs. You can have your cake and eat it too :) [1] http://www.emacswiki.org/emacs-es/Vimpulse
Not sure if const/private are a good fit for contracts but things like "account balance is always positive" can be done right now with contracts.coffee using object invariants. For example, verifying the invariants of a…
MozRepl can give you a JS repl in emacs tied into the browser...no refresh required: https://github.com/bard/mozrepl/wiki
I haven't done any benchmarks yet so not sure. In addition to the guards I think the use of Proxies will cause some slowdown. But you're right the JIT should be able to optimize most of those guards away (maybe even…
> Indeed it would be. That said, CoffeeScript is a compiler of sorts. The fact that we have a compiler doesn't give us all that much. Adding types to a dynamic language (where things can be monkey patched, evaled,…
Well, CoffeeScript/JavaScript doesn't have a static type system. And to add one would be...hard. But we would still like to express and enforce some invariants about our code. And we'd like to do it in a more elegant…
I'm not sure that the relationship between types and contracts is all that tenuous. They both work to enforce program invariants and there's a large overlap in the invariants they can express. Usually contracts are…
It's a fork of CoffeeScript so it replaces your "coffee" executable. If you don't want to overwrite your normal CoffeeScript compiler just run the contracts.coffee "coffee" executable from its own directory. I mention…
Well, the wave people have already said they're stopping development for IE and will just be forcing the chrome frame: http://googlewavedev.blogspot.com/2009/09/google-wave-in-int... As long as wave takes off it'll…