Episode 39

039 JSJ Sweet.js with Tim Disney


December 21st, 2012

39 mins 36 secs

Your Hosts
Special Guest

About this Episode


Tim Disney (twitter github blog)
AJ O’Neal (twitter github blog)
Jamison Dance (twitter github blog)
Joe Eames (twitter github blog)
Tim Caswell (twitter github howtonode.org)
Charles Max Wood (twitter github Teach Me To Code)

01:23 - Book Club Episode: Effective JavaScript by David Herman

Episode will record on January 10th and air January 18th

01:48 - Sweet.js

Macros: syntactic transformations
Build-your-own CoffeeScript
Cleans up code

07:03 - Benefits and Disadvantages

10:37 - Using Macros

Where are they needed? Where are they not needed?
Why sweet.js Matters

13:10 - Pattern Matching

15:36 - Domain Specific Languages

16:48 - Hygiene

18:50 - Class Macro

20:28 - Limits

21:38 - Language Support

25:18 - Nesting

28:40 - Cool Macros

Example macros

30:13 - Sweet.js: What is coming?

Defining Macros
Syntax Rules

33:06 - Sweet.js mailing list

IRC channel #sweet.js on irc.mozilla.org


Google+ Hangouts (AJ)
The Man from Earth (Jamison)
TypeScript (Joe)
Red Dawn (Joe)
Creationix Innovations (Tim C.)
Effective JavaScript by David Herman (Tim D.)
Growing a Language by Guy Steele (Tim D.)
Downton Abbey (Chuck)
Rails Ramp Up (Chuck)

JAMISON:  Oh, my goodness! You can like, put a beard on them and it follows their face!

JOE:  Isn’t that awesome?


JAMISON:  How do I get rid of it? Actually, it was really distracting. I didn’t know you guys would see that.

[This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]

[Hosting and bandwidth provided by the Blue Box Group. Check them out at Bluebox.net.]

CHUCK:  Hey everybody and welcome to Episode 39 of the JavaScript Jabber show. This week on our panel, we have AJ O’Neal. We have AJ O’Neal on mute. We have Jamison Dance.

JAMISON:  I am not on mute, I hope.

CHUCK:  We have Joe Eames.

JOE:  Hi everybody.

CHUCK:  We have Tim Caswell.

TIM C:  Hello.

CHUCK:  We also have a special guest, that’s Tim Disney.

TIM D:  Hi.

CHUCK:  AJ, did you figure out your mute issues? That would be a no. I’m Charles Max Wood from Devchat.tv. And this week, we’re going to be talking about Sweet.js.

Before we get started, there is one thing I want to announce really quickly and that is that we have scheduled a Book Club episode for January 10th and that’s going to be with David Herman who wrote ‘Effective JavaScript’. So it’s a pretty slim book, should be easy to get through. But yeah, if you want to follow along with that discussion, then by all means, join in.

Alright. Let’s talk about Sweet.js. Has anyone…

AJ:  Can you hear me now?

CHUCK:  Yeah.

AJ:  Okay, cool.

CHUCK:  So, I went and looked at it. I fiddled with it a little bit. I didn’t have enough time to really get into it the way that I wanted to. It looks really cool though. What kind of gave you the idea of doing something like macros for JavaScript, Tim?

TIM D:  Well, I guess it’s just something I’ve sort of wanted for JavaScript for awhile. But the main sort of impetus I guess was, I was interning at Mozilla Research this past summer. And Dave Herman who has worked on macros in the past basically said he thought that it was sort of finally possible to do for JavaScript. And so, that was a possible sort of intern project for the summer. And so, that’s what got it started.

JAMISON:  So can you back up and talk about what macros are, because I’m sure there are lots of people that don’t know and lots of people that hear macros and think like CP process are macros.

TIM D:  Right yeah, exactly. So, C style macros are the sort of painful and sort of limited. The macros that Sweet.js implements are much more in line with sort of scheme style macros. So,