View  Info
Compare   Restore  
   Revision #7 - 4/24/2009 5:29 PM     

Podcast 050


Intro, advertising


Yegge: You know John Cage is the composer who pissed everyone off with his 4 minutes and 37 seconds composition which was a dude sitting at a piano for 4 minutes and 37 seconds.

Spolsky: 33.

Yegge: And not playing it, was it 33 ?

Spolsky: 4'33".

Yegge: Oh man, I'm 4 seconds out.

Spolsky: You just, well I think you might have your own new composition.

Yegge & Spolsky: <laughs>

Spolsky: Our guest today on the StackOverflow Podcast is Mr Steve Yegge.

Yegge: Howdy howdy.

Spolsky: Formerly of Amazon, and the Navy even before that, currently of Google in Kirkland where Michael and I are visiting. Jeff is on the line from Emeryville.

Atwood: Well actually El Cerrito but close, very close.

Spolsky: El Cerrito?

Atwood: Yeah

Spolsky: That's a different Mexican resteraunt outside of Berkeley

Atwood: Yeah

Atwood: So how's the Google-plex treating you?

Spolsky: It's pretty nice, this isn't the flex I don't think...

Yegge: It's kind of plexuss, yeahII mean it's the plexiest we've got in Kirklandd

Spolsky: Yeah


Spolsky: It's a little ugly plex

Yegge: It's frigidly cold here, but it's beautiful outside

Spolsky: Apparently the weather in Seattle is usually bad, we're having beautiful weather and everybody's saying we're lucky or something?

Yegge: You were, you're using our years quote of sunlight basically, but yeah we're in Kirkland offices and we had a nice lunch, it's "Earth day" tomorrow I guess, and so the chef came up and started begging us to take asparagus home

Spolsky: Oh yeah, there's a big old table of organic produce up there in the Amazon cafeteria


<Spolsky stutters>

Yegge: GOOGLE cafeteria

Spolsky: Sorry!


Atwood: Amazon... <laughing>

<more laughter>




Spolsky: So we're in the Google Cafeteria, there's a big old table set out there with like, raw asparagus and 20 kinds of fruits and vegetables

Yegge: Yeah, like a farmers market

Spolsky: All kinds of different apples and stuff

Yegge: And I was trying to explain to Joel that in certain other companies that I've worked at, I'm not naming any names, there was a big discussion about whether you should feel guilty if you're going to take food home, you know, if they're going to feed you because there's some cataclysmic event - and I was about to say, at Google, they've kind of cleared up the ambiguity - and the chef walks up and says PLEASE take ANY of this home you want, and he just starts handing us bags - so yeah there's a little bit of contrast there

Spolsky: Yeah. That's pretty nice, I was going to take some home to my friends at Microsoft because they don't get enough food over there, I don't think

Atwood: But it's a table full of vegetables, that's not very "programmery", it should be like Ding-Dongs and Twinkies and...

Spolsky: They had that too! They have the slightly healthier versions of the Ding-Dongs

Yegge: Yeah we have the much healthier (hard to work out) Red bull cola?

Spolsky: Red bull cola and stuff

Atwood: The "organic" red bull <laughs>

Yegge: We did have a brownie, there was a brownie

Spolsky: I'm just noticing that lava lamps seems to have an antenna which seems to be attached by a wire ...

Yegge: Oh yeah! That's our wired internet lava lamp, so you can check its...I'm just making this stuff up

<all 3 laugh>

Spolsky: It's a lava lamp, this little conference room along with a ... floating ... soccer ball

Yegge: It's not very lava lamp-ey either, it's ON but it's not MOVING, so maybe it's actually a, you know a... listening device or...

Spolsky: Optical illusion? It's just CGI that they added after

Yegge: <laughs> Could be!

Spolsky: So Jeff how are you doing?

Atwood: Good! Well I was going to tell you, I think your show was one of the most popular ones we ever did

Yegge: Yeah! One of the most popular

Atwood: Yeah, repeated - REPEATED compliments on that one, people really seemed to enjoy that show

Yegge: I don't remember ANY of it! But I hear it was good

Spolsky: We might have talked about programming languages, everybody likes a good programming language fight

Yegge: Oh yeah, yeah

Atwood: Oh yeah! Speaking of programming languages, I have a little anecdote, you guys probably knew this but me being a dumb ass, I didn't know that APL was ACTUALLY symbols? I thought you were kidding! You brought that up, and you were like, you know, I said well what if there was a programming language or - I think Alex brought it up actually from the Daily WTF, what if there was a programming language which was ENTIRELY symbols? and I was like, "Ha ha ha, that's hilarious!"

Spolsky: And I said "Yeah, APL"

Atwood: No, I was like, that's ridiculous, and then <laughs> in the comments after I put that show up people were like, "yeah, just like APL" and I was: "WHAT?" , I was like, "Joel wasn't just pulling my chain like he usually is?"

Spolsky: When did I ever pull your chain?

Atwood: You're CONSTANTLY yanking my chain


Spolsky: Yeah I think they got the idea from terminals that couldn't display Unicode? So you'd see little smiley faces and stuff? and they're like, you know what? This is even MORE <something> than Perl!




Yegge: It's foolish to, to, to try to ... I saw this dude, you know, hes not with us anymore and he left voluntarily, he was a good programmer, I mean people can get by with just basic V.I. But I mean the dude had, he was using not Vim, he was using V.I. Like Vi or whatever you call it, the old one. it was like Ed.

Spolsky: Ed. One comma three I <laughs>

Yegge: Exactly, and he, he didn't have any colors, he was using the green on black terminal theme you know, reminiscent of the old days. Even though, he just got out of college and probably didn't even know what he was doing, right, hadn't used a terminal before and he didn't even have paren matching turned on, right, he had no braces, and he was doing this like really deeply nested javascript and every time he'd make a change, you know, he'd like go in and he kept spelling it fuction instead of function, right.

<Joel cackles>

Yegge: And I'd watch over his shoulder and i'd be like "Dude, you spelled it fuction again". Right ...




Spolsky: Doesn't—isn't there a problem that ... I know that in the case of IntelliSense, at least, it's very very hard to do good IntelliSense if you don't know the type that something is—that the variable is pointing at.

Yegge: Well, it is hard, but I notice that you didn't say it's impossible, and that's—that's the correct word, because it's not impossible.

Spolsky: Mm-hmm.

Yegge: It is just hard. Google has a JavaScript compiler.

Spolsky: Right.

Yegge: I don't know if we talk about it or anything. I know we're planning on open sourcing it—we're working on it.

Spolsky: Is it—is it the same as the one in Chrome?

Yegge: I don't know—no, it's not. The one in Chrome is a VM.

Spolsky: OK.

Yegge: The one in Chrome actually interprets JavaScript. What we have is a compiler, that will—you know, it's the thing that crunches it down, so if you actually look at the JavaScript from, like, Maps, or, ... whatever, right, you know—Gmail...

Spolsky: Oh, OK.

Yegge: It's a very—You know, it's kind of obfuscated—and it's not obfuscated...

Spolsky: It's still JavaScript.

Yegge: It's still JavaScript, but what they've done is they've given all the variables very short names...

Spolsky: Right.

Yegge: ...they've taken all these shortcut—but it actually does a very very sophisticated analysis of the JavaScript, and we have our own internal type system that we've kind of developed, right, that's more or less modeled on the way JavaScript's type system is evolving through the ECMA stuff—I don't know if you guys have been following that, but...

Spolsky: Mm-hmm.

Yegge: So like, you can write typed JavaScript.

Spolsky: OK.

Yegge: So there's classes, and there's methods, and inheritance, and there's even to some extent, you know, parameterized types and things like that.

Spolsky: Do you have to declare the types?

Yegge: You don't have to—there's type inference.

Spolsky: OK.

Yegge: So, the more types that you declare, especially at key points where there's a little bit of purchase for the type inference engine...

Spolsky: Yeah. Yeah.

Yegge: ...the better...

Spolsky: Yeah.

Yegge: …and it'll tell you, "Oh gosh, I have no idea what's going on here", right?

Spolsky: Yeah.

Yegge: But it does—it's very smart. It actually knows about, like, union types, and so, like, if you have a function, like in JavaScript, that takes a number or string, and it just casts, you know, or does…

Spolsky: Yeah.

Yegge: …maybe it dispatches and does something different, you know?

Spolsky: Mm-hmm.

Yegge: ...because they don't have overloading, right? So what you do is you just look at your arguments and see what you got and then do some dispatch, right?

Spolsky: Mm-hmm.

Yegge: The type inference engine in JSCompiler will actually, like, figure out what all the possible things are that you do pass in, and create a union type for those, right?

Spolsky: <unintelligible>

Yegge: And none of this is ever surfaced in any sort of an IDE, or anything—it's just warnings or errors at build time, right?

Spolsky: So it can catch things faster.

Yegge: Yeah—but I mean, so it would be very nice if it could catch it as you typed it.

Spolsky: Mm-hmm.

Yegge: Right?

Spolsky: And plus, like, know what the type of that object is, so that... <overtalked>

Yegge: Absolutely. <overtalked> So that you could do—exactly—autocompletion, and things like that, right?

Spolsky: Yeah.

Yegge: Code navigation. So, the JavaScript approach that we've taken is, I think, a model for how we're going to do static analysis, and when I say "we", I mean the industry—how we want to do static analysis for languages like Perl and Python and Ruby and so on. In fact, the Python crowd here, when they what I had done internally, they were like "oh, we want that for Python in a big way." And so...

Spolsky: Mm-hmm.

Yegge: ...I'm like, well, yeah. We have to write a Python compiler, you know..

Spolsky: Mm-hmm.

Yegge:'s going to be some work. Because, the thing is, it's a very—it's a really sophisticated compiler. It does like 50 passes over the IR, and it does—it builds a, you know, control flow graph, and all that Dragon Book stuff, right?

Spolsky: Mm-hmm.

Yegge: And it's doing it with JavaScript.

Spolsky: Mm-hmm.

Yegge: And it's starting—it's starting off with very few types. I mean, it's the types that you give it, right, but I mean, like, you could potentially, I mean, I think, eventually we're going to be able to run it on third-party code, where all—the only types are, like, you know, literals, and functions—you know, there isn't a type system, right? But it can still infer kind of a lot of stuff there, right?

Spolsky: Yeah.

Yegge: So, like, anyways, so, again, it's hard, it's a lot of work, and it could be better, and so on, but I mean it's pretty good. And then with C++, and with Java, and any statically typed language, you have types.

Spolsky: Mm-hmm.

Yegge: So you have a lot of stuff for the IntelliJ...

Spolsky: Sure.

Yegge: ...IntelliSense stuff to work.

Spolsky: There's actually, I mean, if you open up—in the latest version of Visual Studio, if you open up an HTML file that has a bunch of random JavaScript pasted in there—the JavaScript will get syntax colored.

Yegge: Mm-hmm.

Spolsky: And IntelliSense will almost work, and it'll use all kinds of exhaustive methods...

Yegge: Yes.

Spolsky: try to guess what type things are.

Yegge: Yes.

Spolsky: Sometimes in ways that are maybe 95% accurate...

Yegge: And you know what?

Spolsky: <simultaneous> but not 100%...

Yegge: That's been my, sort of, core philosophy, is that if it's 95% accurate, then, you know, 5% of the time, you're going to be fixing it, you know...

Spolsky: Yeah.

Yegge: That's no worse than, like, the indentation, for JavaScript, or...

Spolsky: Ha.

Yegge: ...probably for C++, right? Every once in a while, it doesn't indent exactly the way you want, but as long as it's helping you...

Spolsky: Yep.

Yegge: You know, um...

Spolsky: A lot of times, when it's failing, it's cuing you off as to something that you did nonstandard that's...

Yegge: That's true.

Spolsky: Or possibly even wrong.

Yegge: It could—you're right, it's actually kind of an incentive for you to sort of code in a more transparent way.

Spolsky: Mm-hmm.

Yegge: Now, people who love to write obfuscated JavaScript, you know, will kind of sniff at that—go "Whoa, I want to use, you know, anonymous function callbacks nested inside of other closures that are passed along with them." Then you're like, "Fine."

Spolsky: Mm-hmm.

Yegge: "Your tool won't know what the hell you're doing."

Spolsky: Mm-hmm. <laughs>

Yegge: And that's your choice, right?

Spolsky: Right.


[76:26 ends]

Outro, advertising


Last Modified: 5/11/2013 6:13 PM

You can subscribe to this wiki article using an RSS feed reader.