Programming Throwdown - JVM Languages (Jython, Clojure, Scala)

Episode Date: January 29, 2013

This show covers some JVM languages, languages that are built on top of Java. Tools of the show: Ripple Emulator and Battle of the Bulge. Books of the show: Reinforcement Learning: An Introdu...ction http://amzn.to/X6DpwS and Ready Player One http://amzn.to/Yg3zzP ★ Support this podcast on Patreon ★

Transcript
Discussion (0)
Starting point is 00:00:00 Hosting provided by Host Tornado. They offer website hosting packages, dedicated servers, and VPS solutions. HostT.net. Programming Throwdown, episode 24. Some JVM languages, Jython, Clojure, and Scala. Take it away, Jason. Hey, how's it going, everybody? We're back. Longest episode title so far. Yeah, yeah, that's what we're going for. We're breaking records left and right. So yeah, we actually, you know, I think it's been a little while since we did a programming
Starting point is 00:00:39 language show because, you know, we had the mailbag and then we had uh you know the hadoop framework and so it's pretty cool we're actually gonna cover three languages make up for it it hits you with yeah sure one two three punch combos say what you want but uh save judgment until the end we have a question from uh roger actually out in the audience that we wanted to kick off the show with we have an audience we have an audience actually We have an audience. Actually, well, we know we have Roger. I don't know if we have an audience. No, we do. We get email from a couple of loyal listeners. No, yeah, we definitely,
Starting point is 00:01:10 and we definitely appreciate the email questions. And comments, comments on our G Plus posts and stuff. Yeah, totally. It's good to see the community's living, thriving. Thanks for checking out the books, too, and all that good stuff, and the tools of the show, and hope that we can keep, you know, giving you guys some, some expert advice.
Starting point is 00:01:27 It must be the new year. You sound very, uh, insightful. Like you've been thinking about this or something. Yeah. I mean, I had that whole, like, you know, Christmas break to just kind of reflect and. Okay. Anyways, Roger. All right.
Starting point is 00:01:38 So Roger had a question. His question is, do you guys ever feel behind in work? For example, I have a job where I code in C and Java, but lately I feel like I'm falling behind the whole web movement. I try to work on side projects to help keep up. So I'll take first stab at this. Is it easy? Yes. Yes, you feel a lot.
Starting point is 00:01:58 Well, he said he's never felt behind. Yes. Okay. Well, there you go, Roger. Yes. So there's a couple ways to kind of, I mean, guess at what Roger is saying here. But, I mean, first is we all are very, very busy. And, you know, often that's kind of the joke, right? It's a good thing.
Starting point is 00:02:15 If you weren't busy, you should be scared, right? Yeah, totally. You might not be working at that place for much longer. So being busy is, like, very, like, normal. It's good. And then also, I mean, we work in a world where people don't necessarily
Starting point is 00:02:28 understand programming. So many of us work for people who aren't engineers or technical or programmers because they have a very hard time understanding that kind of workflow that we have. And then even if you do work
Starting point is 00:02:40 for those people, engineering, software engineering is still relatively new. So this whole idea of estimating how much stuff should take and how many people to put on something we're just still not really that good at yeah and so and everything is so new and different and you don't know what obstacles you can run into so often you find yourself overloaded at work i mean this is very common yeah and i mean a lot of people you know feel like oh i'm coding in like assembly for
Starting point is 00:03:04 this motorola chip for the to power a traffic light or something like that it's like i should be working on like doing stuff in the web using some crazy high level language and all these things and big data i'm hearing that's the latest thing and all that and so you know i think that there is something to be said for sort of just really diving deep into technology even if that technology isn't the latest greatest thing you could still get have a lot of experience just on you know something that you're working on now and uh there's still a lot of value there right so you shouldn't worry so much about oh i'm not doing the latest thing right that i'm reading about in
Starting point is 00:03:42 the news because the latest thing will will get old either the latest thing, right, that I'm reading about in the news because the latest thing will get old. Either the latest thing will get old or it will die, right? Either of those two are very good. So, you know, in general, there's this. That was deep. That was deep, Jason. But, yeah, I mean, I think that his point, which is very salient too, is just to continue to do side projects and keep yourself up to date. But it's hard to find time with that.
Starting point is 00:04:02 You have life. You have work. So you can be overwhelmed at work like I was discussing and just feel bad and not have time for the other stuff. Or even the other way, Jason's interpretation of this like feeling behind and that you're not working on the latest and greatest. But I mean for the most part that's always going to be the case.
Starting point is 00:04:18 Some companies kind of pick a thing and stick with it. And so even if you worked on that cutting edge company, working on that cutting edge thing, likely in two, three, four, five years, that thing is now the mature, safe project that everybody's using, right? And you would have to like, this would be a dangerous thing if you always had to work on the cutting edge thing. So I do think it is important to have some level of side projects or reading or watching YouTube videos or trying to just learn new language, whatever it is,
Starting point is 00:04:49 you know, to try to stimulate that, you know, keep your brain working and learning. Yeah. I mean, like right now, at least from what I've been reading, Ruby on Rails is kind of like the big buzzword, you know, it's like the hot thing. Dude, I think that was like years ago. What's the hot thing now? I think like, I mean, it's even passes like to Node.js and then now even that's a year or two old. So it's even past that. Oh man, I'm falling behind. I i think i think actually my song it's not exactly the same right but i mean like the buzzwords keep like i mean it's always going to be something new yeah yeah and that
Starting point is 00:05:14 horizon i think i'm about three to five years behind okay like i'm probably farther than that i just know what they are i have no idea how to do them but yeah i mean you know you know knowing about the latest and greatest thing is good and having that breadth is good, but it's not something to really worry about. And like Patrick said, there's... So what if he's still programming in COBOL? If he's still programming
Starting point is 00:05:36 in COBOL? Well, he's good he's watching the show or listening to the show. And there's a limit to it, right? So if the language... With anything, you you know we don't know the situation you just got to do the best you can we we feel you we understand the pain you're in but i mean you gotta kind of if you're using a language that nothing wrong with coldball there's you know lots of good money i'm sure to be made working jobs where you program in coldball
Starting point is 00:05:58 yeah but there's a balance of like you know understanding what risks and things you're taking on and if you're working in a language or environment that is still being used by newer stuff, then you're probably pretty much okay. So things like Java, C++, even C, right? These things are still being used actively today. So that's still a fertile field and you shouldn't be too scared.
Starting point is 00:06:20 But if you are on something that basically it's all maintenance all the time that's dangerous because if you know and that's like your thing and you're going to embrace it great but otherwise those number of projects still on that are going to get smaller and smaller to some level yeah so that's risky and then also you don't learn that how to kind of code brand new things because you're just stuck in maintenance all the time. Yeah, yeah. And to Patrick's point, just to say it a different way, it really depends on what you're working on much more than the language, right? I mean, you could be doing, so I do a lot of C++, and C++ isn't like the newest, sexiest
Starting point is 00:06:56 language, but I feel like I'm working on something that is pretty new and interesting, right? And so that's really the thing you should look for. Wait, but there just became like C++ OX, right? It just like, it's new, right? Yeah so that's really the thing you should look for. DAN GALPINIUK, JR.: Wait, but there just became C++ OX, right? It just like gets new, right? DAN GALPINIUK, JR.: Yeah, we haven't moved to that yet. Actually, I take it back. I think C++ OX is supported, but I don't know it yet. So I know a few things, but nothing too big.
Starting point is 00:07:19 But yeah, to Patrick's point, if you're happy with your job and you're doing some fun, interesting things, that's really what matters. And it's good that you're doing the side projects so that if the job does get stale for you, you can go and you'll have the latest tech under your belt. Moving on to our news, last week was the Consumer Electronics Show. So we have a little bit of delay from when we record this to when we release it. But we feel like this discussion will still be interesting. Yeah. There was a bunch of new products, things for you to spend all of that hard-earned money that you're making
Starting point is 00:07:54 while writing in your programming languages. Like, what are you going to spend them on in another year, right? So that's what CES will show you. There's all sorts of new announcements. But I wanted to pick up on a couple because it kind of carries forward a thread that I guess has been in many of our shows and we've been interested in talking about
Starting point is 00:08:11 with things like the new consoles and the Ouya and these kind of things, which there was some stuff about Ouya came out, but there was a couple of big name companies which aren't traditionally known for doing console or portable gaming stuff had announcements about that and the first one has been rumored for a long time but Steam finally confirmed that they've been working closely
Starting point is 00:08:34 with a hardware manufacturer to release what people have been calling the Steam Box. This is a hardware that will run Steam games. I guess one of them is called Piston and I watched an interview with the guy from Steam and he was saying that there's actually a whole family of products they have planned.
Starting point is 00:08:50 Kind of like a whole change of things that they have envisioned. Some of it is pretty cool. Some of it's kind of crazy and out there. But definitely sounds interesting because this is going to be a direct competitor to whatever the next Xbox and next PlayStation. I don't know. It'll already probably be surpassing the Wii U. I don't know how much of a PlayStation. Yeah. I don't know.
Starting point is 00:09:07 It'll already probably be surpassing the Wii U. I don't know how much of a competitor the Wii – no, I'm just kidding. I don't know anything about the Wii U. It already has twice the specs or whatever. So, but, yeah, but, I mean, it's going to be able to run – it's so Steam's official version or their partnered version or their – I don't know if this will be maybe like Google does with the Android phones. They have, like, a Nexus. Maybe Steam will have kind of like this is our current endorsed platform.
Starting point is 00:09:29 I mean, not a ton of details are out. But he said the Steam one is going to run Linux, and it's going to run all the current Steam games. So, like, if you have Steam, they have to introduce this big screen mode. Oh, yeah. I've seen that. So you'll be able to hook it up to your TV and run it. And then they're really focusing, he said,
Starting point is 00:09:48 on doing some really awesome peripherals. So controllers and stuff that have really low latency. Oh, like the guitar for Guitar Hero. No, I don't think like that. So he's actually kind of saying the new thing is to move into, for the Wii U and Kinect and the PlayStation Move, all these things. He said those are, if you think about it,
Starting point is 00:10:04 really low bandwidth input to the system. So you have to wiggle your arms around or do a dance. But it's really hard, especially if you're trying to do precise movements. He's like, so why worry about that? Like, don't. He kind of called that stuff a fad. Ah, I see. And so he's saying he wants to make a wireless control
Starting point is 00:10:23 that's really, really low latency and really precise and just works really well. It makes me think the console era is going to die. I mean, why would PlayStation make a PS4 when they have to compete with Steam, which gets all the PC users? But maybe I'm thinking we're going to more a hybrid approach. Oh, because this is a console.
Starting point is 00:10:45 COLTON OGDEN:" Yeah, it is a console. It's a box. You buy. You don't build. You don't go to Dell and run Windows. I mean, for the most part, there's going to be someone controlling pretty much the end-to-end kind of stuff on it, which is the nature of the console, right?
Starting point is 00:10:58 DAN GALPIN:" Yeah, I guess it's true. Really, the only difference between a console and a PC is that a PC has different expectations for the user. Like you're expected to upgrade the OS and things like that. But I mean, this thing which really blurs the lines, I mean, if they have their own OS that they keep up to date and things like that, and you just play the games on it,
Starting point is 00:11:17 and you don't have root access or whatever, then I guess it's technically a console, even though it runs effectively like Linux. DAN GALPIN- Yeah, so it'll be interesting to see. There's going to be interesting times. But I thought it was kind of cool. And you also had some comments about biometrics as inputs. And so I started kind of speculating with some friends
Starting point is 00:11:34 like what kind of stuff. And one thing I thought of, so you have to let me know what you think about this. So they have this idea of the galvanic skin response. This is the conductivity of your skin. So it changes in response to stress. So if you do a lie detector test, I've never done a lie detector test,
Starting point is 00:11:49 but one of the things they measure is this thing. So it's known like if you get stressed out, I guess your skin starts to kind of sweat. And so salt is conductive. So your skin becomes more conductive. Something like that. I have no idea. This is kind of like,
Starting point is 00:12:02 I probably got this completely wrong. That makes sense. But so if you could measure how stressed somebody was, think about just cool things. So we started with this. What kind of cool game ideas? So we thought of one was if you had a horror game, and if you got too stressed, then essentially you would lose.
Starting point is 00:12:21 So you had to do really like, like cutting wires on a bomb. But if you got too stressed and nervous about it, the bomb would just blow up. Right? So okay. It's like a staring contest. You do the staring contest. And this is from Conan O'Brien.
Starting point is 00:12:40 It was a skit he did with Andy, the co-host, where they would stare at each other. And then like crazy things would happen behind Conan's head where he couldn't see it, but the other guy could. And people would run out half naked and all that stuff, and then eventually the guy would lose because something so crazy would happen. You could totally do this. You stare at the screen, it just shows you more and more craziness.
Starting point is 00:12:58 Then it shows you Gundam style, and you're like, hands get really sweaty. But also interesting would be even as like, you know, of course with user disclosure or whatever, but it'd be interesting if you're even just testing a game to see what parts are making people most stressed so you could optimize it. Or even the game could learn what stresses you the most,
Starting point is 00:13:18 like a guy popping around a corner or like a really huge, you know, lumbering guy down the hall. Slow zombies or fast zombies? You know, which ones really get to you? And then the game could kind of almost like, you know, tailor itself to what you're most scared or least scared. Like you're really stressed, so it stops doing those things because it's trying to be a pleasant experience. Yeah, yeah. That's pretty cool.
Starting point is 00:13:38 I don't know. My head was spinning, but that was one crazy conversation we had. That's totally awesome. So there's other articles on the NVIDIA it's a portable handheld pc and uh it looks pretty cool um it looks it's nvidia shield project shield yeah project shield it's like a controller and then it it looks it looks like you're holding a controller and that's it but the top of the controller actually flips open kind of like a flip phone and there's a screen and that's it. But the top of the controller actually flips open, kind of like a flip phone.
Starting point is 00:14:06 And there's a screen. And so just by having something that effectively fits in your pocket, you can play all of these games. SETH LADDESCHERRERA- So this is an Android handheld. But instead of being a phone or tablet, I mean, it's meant for gaming. It is a game controller. That's the form factor there.
Starting point is 00:14:24 But they're doing some really clever stuff with it. So first of all, the platform is pretty powerful, so you can play really good Android games on it. But then they introduced, related to this, this concept of streaming the games from your PC. So you could have a PC in my house, like, upstairs, running, and they also talked about Steam games. And you can actually, you know,
Starting point is 00:14:46 your input would go to that thing and then your, go to that computer and then that computer would also stream the video back to your device if you had the right video card for it. It's kind of like that cloud thing. So yeah, it's exactly on live. So it's just like online, but the difference is you don't go to the cloud.
Starting point is 00:15:00 It's in your house. Right, right. So like the processing is local and the demo they were showing, it was actually hooked up over Ethernet. And they were saying because it was a noisy Wi-Fi environment. But they envisioned this working really well. And how cool is that? How often you're trying to be downstairs, just doing something else. You don't want to go sit at your computer where, at least for me, it's kind of like nobody else is allowed to interact with
Starting point is 00:15:20 you during that time. You're kind of doing your thing. You're on the computer. But if you could sit there with a little handheld on the couch, right, and just kind of playing around, that would be really cool. Yeah, this is super fun. And does it work as a phone, too, or no? Oh, I don't know. Oh, okay.
Starting point is 00:15:33 I didn't read, but I wouldn't think so. Yeah, it doesn't look like it has a receiver or anything like that. So I thought this was really interesting, and then they talked about this in combination with the Steam Box, right? So if you think about this, like if you pair this one two punch thing right then it's basically like a wii u but like but i actually want one both of them as opposed to the way you have no desire
Starting point is 00:15:53 to own yeah exactly this is pretty awesome so i mean that but and then even from this wireless device if if you had if nvidia did this well? And it's what others are already starting to do. And I feel like this is going to be a huge, like new thing this year or next year. It's like you have like AirPlay on the, you know, Apple devices. So you have the Apple TV hooked up to your TV, the Apple TV hooked up to your TV, which effectively becomes a monitor.
Starting point is 00:16:19 And then you can mirror what's on your iPad or iPhone. Android, you know, I'm sure, has got something similar. They're going to have that. This gets to almost the same thing. If you have this controller and some stick that I can plug into my TV, and then all my devices can talk to it, this, I don't know. It'd be totally awesome.
Starting point is 00:16:38 This actually makes me excited. I would love to have. The other thing, too, is I would love to have party games where just people could come over and bring their controller, and you could just do, like, because this controller actually has a screen. So you could do things like you could play, like, five-card stud poker, and your cards would be on your hand. Or trivia.
Starting point is 00:16:55 Think about, like, a trivia game. Yeah. Like, just people pull out their iPhones or Androids, right, and you just, like, you know, buzzing in, or you have this one. Yeah. That'd be super awesome. Pretty awesome. I don't know.
Starting point is 00:17:04 So maybe I get a little too excited about this. No, no, I think this one. Yeah. That'd be super awesome. Pretty awesome. I don't know. So maybe I get a little too excited about this. No, no, I think this is great. I think this is super cool. Can you buy one now or no? No. Oh, not yet. This thing's coming out in the near future.
Starting point is 00:17:14 The near future. The near future. The near future. The near future. Theoretically. So last article is NASA pays $17.8 million for an inflatable international space station expansion. This is like something straight out of a science fiction book. So I was telling a co-worker about this Bigelow Space, Bigelow Airspace.
Starting point is 00:17:36 This is a guy who owned a hotel chain. And he has like a whole company, kind of like you hear about Elon Musk and SpaceX, about getting stuff to space like building space rockets this guy is essentially the same thing but he wants to build space hotels so he has this concept of the like kevlar and carbon fiber whatever these flexible fabrics you pack them down you send them up into space and then you you know inflate them with air tanks or whatever and it becomes a habitable environment. So it's small and then you don't have to pay all this. Because in space you don't have
Starting point is 00:18:08 the same requirements as a building on Earth. The way gravity works and stuff. So you can design the assumptions very differently. Now NASA apparently wants to like, so the full details aren't out yet. They don't come out until tomorrow. But people are speculating
Starting point is 00:18:24 like a storage unit for the space station. So I'll send this up and then attach it. That's crazy, right? That's totally awesome. I mean, it's a great idea, right? The only thing is how do you get that much oxygen up there? I guess you have to make many trips. Well, so I mean, so I would – I'm not a space engineer.
Starting point is 00:18:39 I'm not a rocket scientist. I'm not a rocket scientist. I only play one on this podcast. But I would think like you could compress it fairly well so the oxygen itself probably doesn't weigh that much gotcha or the air mixture doesn't weigh that much so you can compress it to a very high psi store it in you know essentially a tank like a liquid form or something well i mean even just to like you know think like a scuba tank right like if you were to expand i don't know how pressurized the scuba tank is but if you took a
Starting point is 00:19:04 scuba tank that was just i'm soon pretty pressurized and you expanded it to normal you know earth air pressure it probably is much much larger volume yeah that makes sense so here we are speculating about stuff we should probably know this before we talk about these things well nobody knows it's not out yet we'll have to find out tomorrow so so stay tuned but how cool is that like i mean so for you was like space a big thing growing up? Were you into rockets and thinking about being an astronaut? No, I never. I actually, so maybe my parents are wacky,
Starting point is 00:19:34 but we used to go to medieval fairs and things like that. So you wanted to be a knight, not an astronaut. Yeah, if you had to choose. Really? I didn't actually want to be either. I felt like both were pretty dangerous, but, but, but yeah, I never got into the space thing, but, but I can appreciate it. I mean, I think something like this seems really cool. The fact that you bring up a suitcase.
Starting point is 00:19:56 So I have a question for you. Would you go to space station? I would totally go to space. I would. Like how much, how much personal sacrifice would you do to go to space? Oh, wow. So like, let's say, you know, people were having this conversation. I was like how much how much personal sacrifice would you do to go to space? Oh, wow So like let's say, you know people have this conversation I was like, oh I would go to like I think be really cool to go to space I wouldn't you know spent the amount of money they're talking about I don't have that much money to spend to kind of go up to space But if it became cheap enough like, you know a vacation like I would take now kind of cost to go sure
Starting point is 00:20:22 I'd go yeah other people are saying no I would like now kind of cost to go. Sure. I'd go. Yeah. Other people were saying, no, I wouldn't like, there's no way the risk will never be low enough. Like it's too dangerous. Like they just are scared of like the nauseousness. They are sure they would endure. If you don't like it, you're going somewhere very, very different environment, right?
Starting point is 00:20:36 Like if you go there and you're just like, I don't mean to be graphic, but you're just sick the whole time. It's gonna be really miserable. It's not like you could just go back. It's like kind of like the midwest i'm just kidding no but but i don't think i didn't realize there was such high risks well i mean you're going for most current designs you're on top of something with a giant explosive right so i mean a rocket engine is basically just a controlled explosion so you're attaching yourself to a giant explosion I wonder though trying to get
Starting point is 00:21:08 the percent I wonder what the percentage of planes that crash versus rockets oh I think it's far higher for always because the volume is so low there's not that many but I can only think of two rockets oh no more rockets I can only think of two space shuttles that have exploded. Out of how many? Let's say there's one. There was like five, right? There was like five total, and two of them had catastrophic
Starting point is 00:21:33 failures? No, but that's how many units, not how many flights. Okay, I mean, we can look it up. This is kind of actually really grim. Actually, it's probably still much more risky than an airplane. Because you think about how many airplanes there are, and there's not even a crash every day, right?
Starting point is 00:21:50 Yeah, I mean, it's very rare for there to be a complete fatality kind of crash. I guess it is quite risky. It's very, very risky. But for now, I mean, the problem is the measurement is so low, you don't have – well, first of all, it's a very new technology, so it doesn't matter anyways. But then also the current method may be very different than the future method. And then the measurement rate is so low,
Starting point is 00:22:10 the measurement would be very noisy. Yeah, that makes sense. So, yeah. But, I mean, I think it's always going to be somewhat, it's going to be more risky than taking a plane flight. I can't, I mean, at least for probably our lifetimes, right? I mean, yeah, just the physical forces you have to overcome are much greater. And you could assume that that always is going to incur higher risk, right?
Starting point is 00:22:31 Yeah, I mean, eventually, I would think it would be naive to say it won't become easier routine. Right. I think if history teaches us something, it's that whatever we expect to not happen. Yeah, so whatever I say will be wrong. I think it will become routine, but I think it will also, like air flight will probably become much safer. So maybe future shuttle flights to the inflatable space hotel will be as risky as current airplane flights are. Oh, I see.
Starting point is 00:23:01 That makes sense. I don't know. Yeah, we'll see. I'm making this stuff up now. See, if we did really good at this, we could, like, go back to this podcast and then, like, become futurists. Oh, see our predictions. Because we could, like, look, we predicted this was going to happen. We should be making bolder claims, Jason.
Starting point is 00:23:15 Yeah, totally. I think it'll happen tomorrow. Wow. Now, actually, good question. Okay, do you think there will be humans in space, like, commercially in five years? I say five years. I say two. You say two years?
Starting point is 00:23:31 Let's just say less than five. If it's less than five, you win. So you've got to say how many, I don't know, okay. But it's very vague. It's got to be very specific, right? How many man days will humans be in space in five years? Okay. Will it be greater or less than 10,000? How many man days? So number of men or women times the number of total days. I'll put it to you this way. I think 1% of the population will have gone into space for a
Starting point is 00:24:01 vacation in a year. And I think that that is going to be five years. Oh, really? That's really aggressive. Oh, okay. I was just thinking you meant like you could commercially, like right now if you wanted to buy your way into space, it kind of exists, but I mean it's not
Starting point is 00:24:19 really commercial. It's custom. You know, you've got to go on the Soyuz rocket. You don't think it would take five years to I was saying two years two years basically for very rich people to be able to buy a ticket to space oh well you're thinking it's gonna take much longer I think yeah I would say it's probably gonna yeah it's like the greater than 50% of the population has access to or your to your case 1% of humans will have recreationally traveled to space. You think that number is more than five years?
Starting point is 00:24:47 Yeah, I think that's more than five years. All right. Well, because also, I mean, there's a lot of people on the world who don't have a car, don't have access to clean running water, right? So, like, you've got to already, those people in five years, I mean, they're going to go from that to recreational space flight? Yeah. This episode is really, like, I mean,
Starting point is 00:25:08 I feel really bad now. I guess I didn't think about all of the people in the world. I was only thinking about like, the subset of people who were candidates, like, who would want to go into space, you know? You don't think those people want to go to space? I'm sure they do want to go to space. You don't think they look up at the stars and wish, like, oh, I wish I could
Starting point is 00:25:24 go there? Well, this wish I could go there. Well, this is really off topic now. Anyways, we'll talk. We'll have to come back to that. Okay. Let us know if you find this interesting or tell us to shut up and keep to our claimed expertise.
Starting point is 00:25:37 Yeah. So anyway, speaking of our claimed expertise, it is the tool of the show. So my tool of the show is something that I think is pretty freaking cool. It's a Ripple emulator. It's actually not a Ripple emulator, but it's called Ripple emulator. And what it is, it's pretty cool. It's an extension for Chrome.
Starting point is 00:25:59 And you attach it, and it puts a button in the top right of your Chrome browser. And then you click the button, and you can actually simulate what the site looks like under different phones. Oh. Yeah, so you can click it and say BlackBerry, and it'll show you what your site looks like. I thought I was going to be able to drop a stone in a pond and watch the ripples. The whole website would just ripple outwards. Yes, okay. But it's pretty cool.
Starting point is 00:26:22 This seems more useful. Yeah, yeah. It actually uses the emulators of the devices and things like that. How fast is it? Is it pretty fast? It's pretty fast. It's, you know, I haven't tried it on dynamic content. I've only tried it on, you know, static webpages.
Starting point is 00:26:36 But it feels very responsive. Have you tested for accuracy? Like, take a device you own and, like, compare? No, I haven't done that either. Sorry, I didn't mean to deflate your balloon dude no but so i haven't done like rigorous testing of this but i have used it to sort of verify like a site i was working on that how it looked in android oh okay and uh you know i haven't checked pixel by pixel but no no no i didn't mean that i just mean like yeah did it generally give you a better feel? Oh, yeah. Okay. Yeah. Better than just resizing your window down to the right pixels.
Starting point is 00:27:07 Yeah, yeah. Resolution. No, it definitely did better than that. Okay. Well, good tool then, sir. And so it covers, like, different browsers on different, you know, platforms and things like that. And it'll actually warn you if you have something that's, let's say,
Starting point is 00:27:20 like, Mac-specific or desktop-specific that, like, a phone won't know how to handle or things like that. So yeah, it's actually made by, or it's made by a company that was bought by BlackBerry, so by RIM. So they should, it should be pretty well maintained and things like that.
Starting point is 00:27:39 So if you do any mobile development or you want to see how your website works on an Android or a BlackBerry or some other, check out this Ripple emulator extension. I feel like I should make a joke about, like, RIM stock price or something at this point. I don't want to offend anybody. It's not a simulator. It can't do it all. I feel like, oh, no, never mind.
Starting point is 00:28:01 Poor RIM. I'll just. Remember when RIM went down and there were riots in London? Yeah, so RIM, like... Aren't they in Canada? They're in Canada, but something happened to their London thing, and there were actually riots. Or, no, actually, the riots...
Starting point is 00:28:15 We are totally, like, making... We don't have, like, a story about this or anything. Hang on. We're going to totally mess this up, dude. So, okay. Something about RIM riots. Okay. The UK riots, R riots rim and the race
Starting point is 00:28:27 price of price anyways so yeah ripple emulator check it out bought by room so what is your totally they didn't pay in in rim stock yeah this show is sponsored by rim sponsored by rims competitors oh sorry mine is the very, very, very useful tool. I could not get by without this. Really? If you don't have this, I don't even know how you get any work done. Really?
Starting point is 00:28:53 That is the game Battle of the Bulge for the iPad. This looks awesome. So this is a war game for your iPad. It does not work on iPhone. It does not work on Android. It does not work on Android. Nothing. I'm a horrible, horrible person. Supposedly I guess one is in the works.
Starting point is 00:29:12 But yeah, so this is a really, really, really awesome game. It strikes an awesome balance between a true war game, if you ever play a real war game with all the little cards and allies. No cards no no no like oh i don't like the what is the name of that company that does all them oh i can't think of the
Starting point is 00:29:29 avalon hill with all the little cardboard squares and the hex maps and like a book that's like 50 pages thick like okay if you ever play one i never actually managed to play one of those but i've seen them people playing them yeah and then like risk or access analysis kind of simple this kind of like strikes a balance in between. So the nice thing is the computer handles a lot of the accounting bookkeeping for you. They threw a lot of like really thematic elements into it. But yeah, it's like you can sit down
Starting point is 00:29:54 and lose really easily. Like, you know, it's really fun to just drag the guys around and then completely you lose because the game is really hard and I've never won, not even once. Oh man. I got a tie once.
Starting point is 00:30:06 But it's actually really fun. And I've kind of always wanted to, like, imagine myself as being, like, an awesome strategy war game person. But I kind of find I'm pretty terrible at, like, strategy. Even, like, you ever play, like, the turn-based games, like Final Fantasy Tactics or, like, any of these styles? Yeah, yeah, or Advance Wars. Yeah, or Advance Wars. I'm terrible
Starting point is 00:30:26 at all of those games. I really envision myself as this awesome game guy and really good strategy. I'm just terrible. In my old age, I've kind of That sounds really bad. But I'm just kind of embracing the fact that I played this game
Starting point is 00:30:41 on the easy setting. I don't even i don't even fathom like how i would ever beat it one thing i've noticed is that some of these games demand a lot of micromanagement and so like what if if you're like not specifically moving like each person then like you can get burned just no no so this one i mean this one uh so it's not like the individual it's what they call like a. So you're managing kind of like a squad. And it's similar to kind of Advance Wars. It's about the same level.
Starting point is 00:31:10 We probably, people don't even know what we're talking about. That's okay. So, you know, you're kind of moving the people around. And then there's like very complicated like conditions. And I think that's what I'm not accounting for. Like, oh, this is like an elite squad. But he's attacking somebody like in a forest. So, like, he's got a defensive bonus for being in a forest and I haven't
Starting point is 00:31:26 I've only played like five or six times but I haven't yet gotten to that like oh I need to be I need to move my guy to the right to be on top of the hill so I can attack down onto the people as opposed to just attacking them straight and just like watching my people die so it's kind of interesting if you have an iPad. I want me never to go to war
Starting point is 00:31:42 with you as the commander. Yes you should not let me direct your war. I would not do well, according to my previous experiences. We'll just train everybody to be hackers, and we'll just do it from the safety of our desks. Yeah, exactly. So people should check this out if they have an iPad, which greatly I know narrows down.
Starting point is 00:32:03 It doesn't work on iPhone or iPod Touches. Well, we'll have to say as soon as it does. But it is a little expensive at $10, but I found it like one of the games that's like really, really well made. Not just like, oh, we reported this over or whatever, but like this one's really well made and I really enjoyed it over the Christmas break. Yeah, that sounds awesome, man. So is it easier to hack somebody if they're on a mountain,
Starting point is 00:32:25 or do you pay a penalty for that? It depends on what mountain. Oh, that's true. Maybe it's Iron Mountain. Because if it's like NORAD, that's probably pretty hard to hack. Also, if the mountain is very tall, connectivity might be bad, so it might be hard to hack them because you probably don't have a reliable connection to them. You just reminded me of something.
Starting point is 00:32:46 Speaking of connections. That was a joke for everybody playing along at home. DAVID EASTMANN PENNAHILLIER- Somebody at work who's a hardware engineer happens to sit next to me. My phone kept going off. And I would leave my phone when I would go to a restroom or a meeting or something.
Starting point is 00:32:58 And my phone would go off. And he was getting annoyed with it. He finally took those static, the things that, like if you buy a GPU or you buy a hard drive, it comes in a static bag. Conductive bag. He took, like, four of those, and he put one inside the other, and then he put my phone in that. And it's basically a Faraday cage. I didn't realize that.
Starting point is 00:33:15 He had grounded it, yeah, but pretty close. Yeah, I mean, and then he, like, just closed the lid. He didn't tape it shut or anything. And my phone totally had no connectivity. Did he tell you he did no he just waited for you to come back he just waited for me to come back and i was like look at your phone i found it wrapped in static bags but i didn't think that that would work but it does wow yeah i think it i think it does i mean it really attenuates the signal very strongly
Starting point is 00:33:37 yeah yeah i didn't i don't guess i don't know so i used to think faraday cage too but then somebody told me i said that one time basically like you said and then i got a you got an ear verbal lashing yeah someone actually knows yeah because the faraday cage needs to be grounded so if you think about it essentially the radio waves are coming in so if you had strong enough uh signal it would uh charge the bag i'm butchering this because i know nothing about more than me but like the essentially the bag would start becoming an antenna because you're able to manipulate the charge on the bag. Versus if it's grounded, every time the charge builds up, it just would go straight into the ground.
Starting point is 00:34:10 That's my, like, I probably butchered it. We're going to have people email us and tell us. No, no, no. I think that makes a lot of sense. I mean, you probably know more electrical engineering than, like, 99.99% of the population. No. So, anyway.
Starting point is 00:34:23 Thank you for that compliment. It's true. Maybe. Think about population. No. So anyway. Thank you for that compliment. It's true. Maybe. Think about it. Okay, so again. Time for book of the show. Book of the show. Our newest,
Starting point is 00:34:33 oh no, I guess newest segment was question of the show. Well. Book of the show. Book of the show is pretty awesome. So my book of the show is, I have it right here. This sound is...
Starting point is 00:34:45 Here, maybe drop it on the table. No, no, don't do that. It's pretty heavy. It's a hard cover. This is Reinforcement Learning and Introduction. So trees were killed to make that book for you. That's true. That's kind of sad.
Starting point is 00:34:55 I'm sorry. I don't know. I'm sorry, guys. I haven't even finished it yet. So some of the trees died in vain. Yeah, so she's at one in the beginning. Why are we... Anyways.
Starting point is 00:35:04 We need to be more upbeat reinforcement learning an introduction by uh richard sutton and andrew bartow um so a little bit about reinforcement learning you know we were thinking maybe doing like a whole machine learning podcast but um just a quick synopsis of reinforcement learning what makes it different um you know so traditional machine learning you do the the, oh, for example, like if, you know, so one thing they do is they measure, like, babies, right? They measure the distance from, like, I think the baby's hip to their knee. Okay, so we switch from artificial, so real life, real doctors.
Starting point is 00:35:37 Oh, yeah, so real doctors. Okay, okay. And they measure, like, from the baby's hip to their knee. I shouldn't say real doctors. That's not a bad, medical doctors. And that distance they use to figure out how tall the person is going to be when they're an adult. Okay.
Starting point is 00:35:49 And obviously it's not like one-to-one. There's some function that maps that. And so you could actually take a bunch of babies, measure them at their babyhood, measure them again when they're adults. We should say doctors should take a bunch of babies. Don't try this at home. And then you can come up with some function using regression or something like that, like simple
Starting point is 00:36:07 machine learning techniques to figure out so that when you get baby number x plus one, then you know how tall they're going to be. So that's regular machine learning. Reinforcement learning is when you have to make a lot of decisions. So by contrast, let's say you want to have a machine
Starting point is 00:36:24 like play checkers so you make the very first move but the problem is you haven't learned anything right the very first move doesn't tell you like was this a good move is a bad move right so you only get a reinforcement you only get like you only get a value at the end like when you've lost the game or won the game okay and somehow you have to take that like oh i oh, I lost the checkers game. I'm really disappointed. And you have to think about all the things you did and which ones of those caused you to lose, or which things the
Starting point is 00:36:53 opponent did which were great for him which caused you to lose, and vice versa if you win. Reinforcement learning lets you do that piece of it. I think I need to sit here quietly. Okay. So it's not like, oh, I have all this data, all these like X, Y points, and I just like need to fit like a function to these points. It's more like I have all this data and only some of it I know was good or bad.
Starting point is 00:37:19 So in other words, like all the last moves you played in all the games, which caused like the move, which lost you the game, like, you know that that move was bad or that move was part of a bad game. But you don't necessarily know all the moves that led up to it were bad. Some of them might have been great,
Starting point is 00:37:34 but then you lost because of other reasons, right? Like, two of the moves might have been great, but then the next 28 were bad, right? So reinforcement learning lets you do that part of the problem. And if you want an introduction to that, you can read this book. I feel like I need an introduction to that. Yes, I should read this book.
Starting point is 00:37:55 Another simpler example would be if someone's on your website. And people are on your website. They're spending a lot of time. They're visiting a lot of links. And they're having a good time. And then you make some changes. Let's say you make like 200 changes or a bunch of links and they're having good time and then you make some changes let's say you make like like 200 changes or a bunch of changes and then people they start just dropping off your website or they start not spending enough time on your website or maybe you know everyone who goes to this like you're everyone who visits sites a c and d on your website like in that order they
Starting point is 00:38:21 never visit your site again so reinforcement learning will actually give you uh those answers so you could just put in everybody's sort of like their visit history through your website into a reinforcement learning algorithm and it'll actually tease apart like what you know sites and what actions are good and bad that sounds pretty cool yeah it's like i should read this book does this let you do some really awesome stuff? I feel like I probably won't understand it, though. No, this is an introduction. How's the introduction?
Starting point is 00:38:49 Okay, so, but I've been told that before. Patrick's kept going. No, so I actually, this is one of the first books I read. So if somebody, so take me for an example. Very, very little, you know, artificial intelligence. Could I read the, like, does it contain, do I need to know, like artificial intelligence no you can totally so this is my first artificial intelligence book yeah this would be good i mean you might need to know
Starting point is 00:39:12 the very basics of machine learning like it might help to read machine learning an introduction or something like that okay but even if you didn't this book it has a bunch of really simple examples like it starts with kind of like you know driving and like your commute time trying to estimate your commute time to work so it's a very concrete example and they kind of carry this example through the whole book and uh i think it starts off with with you don't need a lot of knowledge so is it written in domain language or normal language like in other words can i read it even if i don't fully get all the concepts while i still learn stuff out of it? Oh, yeah.
Starting point is 00:39:45 Totally. I mean, it has a few equations in it, but it's not too math heavy. Okay. It doesn't try to teach me through the equations. Right. Okay. Books like that, I have trouble reading books like that. I just don't.
Starting point is 00:39:57 I need to, like, have the concept told to me in plain words. It does words as pictures. And they have the first couple of chapters are available online for free. So you can start with that. An introduction to the introduction. Yeah, exactly. Does this book have an introduction?
Starting point is 00:40:14 I don't know. Well, the first few chapters... Oh, first chapter is an introduction. It does have an introduction to the introduction. And with that, what is your book of the show? Since I'm a slow learner, I'm going to go with another fiction book. This one is Ready Player One
Starting point is 00:40:28 by Ernest Cline. This book was actually really, really popular. I think it even made the New York Times bestseller list for a while. It's about a year and a half old at this point. But this book is really, really a fun read.
Starting point is 00:40:43 I had a good time reading this. This looks cool. It's very enjoyable. And the author of this basically took everything that he loved about the 80s and, like, put it into a book that was set in the future. Ah. And so I kind of missed that boat a little. Like, you know, there's no secret.
Starting point is 00:41:05 Like, I'm not that old. So, like, I knew most of the references, but they were more like I kind of didn't know exactly what they were. And there were a lot of references I'm sure I missed. But, you know, I still did get a bunch of it. Like, you know, there's references to Pac-Man. And not just, like, references, but even just talking about Pac-Man. And a lot of people trying to understand the culture about, about like Dungeons and Dragons and about these kinds of things. It's really a good story.
Starting point is 00:41:29 I really enjoyed it. It wasn't like some science fiction you read where it's like, oh, man, this is like really deep. It made me think about like the future and like, you know, about this stuff. It was just like a fun read. You know, you read a book and it's like really easy to read and really fun. This was this book. And once you start reading, it's like, oh, just one more chapter. I just want to find it.
Starting point is 00:41:46 Just one more chapter. Just one more chapter. Yeah, I've been looking for a book like this. Like I kind of want something more light. I feel like this is it. So I feel like, and plus with all the cultural references, it's kind of like just like a running joke almost, you know, like just like all this pop culture to various movies and games and,
Starting point is 00:42:03 you know, one hit wonders from the 80s, all those kinds of things. So I would definitely recommend this if you haven't read it yet. So I don't, I'm kind of out of touch also with the 80s. Like, would I still get enough of it? Yeah, so, I mean,
Starting point is 00:42:15 I think it's a good book without that. Okay. So, because you'll, I mean, you'll know stuff, right? Because a lot of this stuff from the 80s still exists today. Like, I mean, you know what Pac-Man is, right? Yeah, yeah.
Starting point is 00:42:22 You know, and you know what a lot of these things will be. Back to the Future kind of has some stuff in there, I guess. Is that true? I don't remember. DeLorean is in it, apparently. Anyway, so
Starting point is 00:42:36 you'll know stuff in there, and even if not, it's still a fun read. I went to a presentation the author actually did where he was signing books and stuff. And I was like, oh, okay, this will be good. I really like this book or whatever. So I went to hear him talk. And he was saying how the approach he took to doing this was kind of interesting.
Starting point is 00:42:56 But he told that there were, like, teenagers who obviously weren't even alive in the 80s. And they read it and they read the book the ebook version and have wikipedia open and every time there's a reference they don't get they look it up in wikipedia nice and so by the end they kind of and this is actually really fascinating because it's similar to what happens without giving away a lot it happens to people in the book so the people in the book is about kind of kids in the future trying to learn about 80s culture oh i see and so one interesting side effect is that really happened in the present yes so like people right now are actually like learning about 80s culture to understand this book yeah so anyways check it out it's pretty meta i like it
Starting point is 00:43:36 it was a fun read cool yeah i'll definitely read that so on to the programming languages of today's show that's right. We have three languages today, Jython, Clojure, and Scala. And all of these things have in common that they are languages written to use the Java virtual machine. So the Java virtual machine is the virtual machine that Java runs on. Yes!
Starting point is 00:44:02 I love saying statements like that. So when you write Java code and you run the Java compiler, it compiles it to the bytecode, which gets interpreted and run on the Java virtual machine, which was kind of Java's whole thing when it came out in the 90s was write once, run everywhere, run forever. I mean, there was some play on that. It was like you wrote your code, as opposed to C++, where you might have to change based on your platform
Starting point is 00:44:27 and know about NDN-ness and know about all this stuff. Java's like, I'm just going to write my code once, and it's going to run everywhere. Just take it and just run it, run it, run it, once it's compiled, it's good to go. DAN GALPIN- Even on a higher level, C++ didn't really touch things like GUI. It was expected that if you wanted to make a GUI, some user
Starting point is 00:44:43 interface, that you would have to hook into Windows. DAN GALPIN- The OS, whatever your OS was. DAN GALPIN- Yeah, you'd have to ask Windows or Mac or Linux for a window or a button. And you'd have to write three versions, right? But with Java, they did all that hard work for you. So they wrote three versions of their GUI, and they had one common API for all three.
Starting point is 00:45:01 And so you can take some GUI program that you've written in Windows and just know that it will run on Mac. I mean, the buttons might be a little bigger. You might have to do a little bit of tweaking there. But for the most part, they've handled just about everything. So the JVM buys you a lot. We've talked about virtual machines in the past. Maybe we'll revisit it in the future.
Starting point is 00:45:21 But this idea of the JVM is a defined machine, but it doesn't actually exist, or it doesn't have to actually exist. It's a theoretical machine which is described, and the bytecode that it's compiled down to and then interpreted and run is just like in a real machine to be executed with instructions and moving stuff to registers, but then the virtual machine
Starting point is 00:45:40 translates those from itself to whatever current processor it's running on, which is why it doesn't matter if you're running on ARM because you're issuing the Java virtual machine the same instructions, and then the Java virtual machine knows how to, in turn, issue the proper instructions to the ARM processor that it's running on. And so that's how you get that write once, run everywhere. And so all these languages that were built on top of that JVM
Starting point is 00:46:03 kind of get that stuff for free. And like Jason said, also get the built-in GUI stuff for free, networking stuff. Whatever is built for Java, they kind of get that for free. Yeah, even there's some things which kind of go unnoticed many times. But, for example, Java has an awesome date and time library. So you can actually say, the time is like this many seconds since the epoch, or that's what people usually use, UTC.
Starting point is 00:46:30 DAN GALPINIERI- Wait, do you pronounce that epoch? I always pronounce it epoch. DAN GALPINIERI- Oh, which one is it? We'll have to look it up. I think it's epoch. DAN GALPINIERI- I'll finish this thought, and you can look it up. But you might have users who are in Greece or in the Netherlands.
Starting point is 00:46:42 Oh, you're right. It is epoch. I thought it was stupid. DAN GALPINIERI- It's epoch, yes. Or in the Netherlands or the US or UK, whatever. You might want them to see the time, you know, that they're seeing on their clock, right?
Starting point is 00:46:51 And you want everyone to see the right localized time for them. That's actually really, really freaking hard. You know, I mean, it seems super easy, but you think about, like, even in the US, like, we have daily savings time, we have all these other issues, you have you know you have like you have different you know time zones you have rollover and there's even like really wacky things that can come up like i'm having trouble
Starting point is 00:47:13 thinking of off top of my head oh like one for example is let's say you you say um if you buy this product it expires you know on theth. Well, what does that mean? Does that mean 12.01 on your time, localized time? Or is it this time UTC? All this stuff can get really hairy. So you have to kind of get it right. But it's really nice when Java can do it for you. JOHN MCCUTCHAN- Or at least the stuff that also
Starting point is 00:47:40 is built in Java, or at least to run on the Java virtual machine, does it for you. DAN GALPIN? Yeah, exactly. Yep. And so kind of what we're getting to is all of these languages, not only do they run on the JVM, but they also can natively use all of the Java libraries. So the Java GUI, the Java DateTime, all of this stuff you get for free, which is pretty amazing. So the first up is Jython.
Starting point is 00:48:03 Yes. Crazy name. Yeah, I mean, it took pretty wild. No one would figure out that it was Java and Python put together. It's just such a stretch. Wait, what? Yeah, this is actually Java on the list.
Starting point is 00:48:18 So yeah, Jython is, so one thing about Jython that's kind of different, and you'll kind of sense a gradient when we talk about this, is Jython is very much Python. I mean, you can actually do import Python import statements and import Java classes to get those benefits that we talked about earlier. But for the most part, you're writing Python, and many people use Jython, or sorry, many people compile regular Python scripts with Jython. So they just write regular Python scripts. And for whatever reasons, platforms, whatever, they'd rather run them on the JVM than using the Python equivalent. Right. Like imagine if, you know, you're on ARM.
Starting point is 00:48:59 Well, maybe, I'm not sure if the Python, you know, virtual machine compiles on ARM. But let's say you're on some crazy new architecture. You're a hardware engineer. You made this new processor. It's totally wild. And your first step was to port the JVM? Of course. Okay.
Starting point is 00:49:12 That's what you do right after you get MAME running on it. Step one, MAME. Step two, JVM. I thought step one was Doom. Everybody always makes Doom run on everything. Well, yeah. Actually, yeah, if you get SDL running, which is the thing that MAME is built on, you get Doom for free because Doom is also built on SDL.
Starting point is 00:49:32 I need to reprioritize my life. Actually, I have a friend who's working on getting SDL on the boxy, a rooted boxy. Okay. Anyways, we digress. So, you know, and the other thing is optimization. Like Guido is a super smart guy. He did a lot of cool stuff, but he probably, and his team, and people who work on the Python VM probably don't have the resources as the people who work on the Java VM.
Starting point is 00:50:00 So the Java VM has just had crazy, and there's also a ton of research and literature on things that people have done with the Java VM to make it a little bit better. There's many different implementations of it. There's like the ICT and the OpenJDK version. There's Suns. There's et cetera. Well, that's a good point. Yes, there are multiple JVMs as well. Yep.
Starting point is 00:50:22 Yep, so that's a good point. I think we talked about that before. Yeah. multiple JVMs as well. Yep. Yep, so that's a good point. I think we talked about that before. But anybody who writes this layer to basically expose on the one hand an interface for the Java virtual machine spec and then on the other side runs on whatever architecture essentially can do their own JVM.
Starting point is 00:50:37 Pending all the proper licensing agreements, whatever you're doing. Whatever that, you know, because Java is partially sort of kind of open sourced, I guess, right? So there's all sorts of policy issues. Because Java is partially sort of kind of open sourced, I guess, right? So there's all sorts of controversy in court cases, and we're not lawyers, so we won't say that. No, we're not lawyer cats.
Starting point is 00:50:51 But the other thing is, you know, a lot of mobile, like Android runs on Java. So in theory, Android can run Jython, Clojure, and Scala. I mean, I haven't tried it. I know for a fact it runs Scala. We'll talk about that in a little bit. Okay. But, yeah, so you just get it. I know for a fact it runs Scala. Oh, really? We'll talk about that in a little bit. Oh, okay.
Starting point is 00:51:05 But yeah, so you just get a ton of stuff for free. So writing Python with Jython just gives you a ton of benefits, right? And almost no problems. I mean, that's good that if you don't have to change anything, you can always try it. Like if you're suffering a certain problem or want to run it, I mean, it's worth a try, right? Yeah. Especially if you're on a mal-supporter or not great-supported platform. Then you don't have a lot of risk to trying it is what it sounds like.
Starting point is 00:51:31 Yeah, totally. So the second one is Clojure with a J. So I think similar to the story with Python, Jython. Wow. with Python, Jython, wow, similar to the story with Jython is having Python run on the Java virtual machine. Clojure is very similar. This is running Lisp on the virtual machine. And you get all those nice advantages that we've already discussed, rehashing.
Starting point is 00:52:00 And you're able to intermix the niceness of a functional language like Lisp that that gets you and still have some of the use of the underlying Java libraries and JVM. This is kind of like one of those episodes of a show where they go back in time and visit all the old episodes. It's kind of like because of the way that we're talking about all these other languages. Oh, I see, because we're all talking about languages we talked about before. But, yeah, definitely, you know, if you haven't heard the Lisp show, give it a listen. But, you know, Lisp is awesome.
Starting point is 00:52:31 It does some amazing things. It has incredibly fast hash tables and it lets you use lambda expressions, all sorts of super fun stuff. But it's also very niche, right? I mean, there are things that you don't want to write in Lisp. You don't want to write, you know, like a file IO library in Lisp is like painful, right? So, you know, you can actually integrate, you can go seamlessly between Java and any of these languages. So you can take the part of your problem that you're trying to solve that's very easily solved by Lisp, and you can do that part in Lisp and then do the rest of your program in Java,
Starting point is 00:53:06 and they'll just communicate with each other, and it'll work very fluidly. The other thing is I think Clojure also adds some pretty advanced stuff. I think they add, like, a software transactional memory, which maybe we'll talk about in one episode. So they do add some things, and Lisp has all these dialects, I guess, or kind of what they're called. But Lisp has all these dialects, I guess, are kind of what they're called. But Lisp has all these dialects, and Clojure, I
Starting point is 00:53:26 don't know if you can consider one of them or not, but it does add its own set of flavor to what it kind of does better or different than the existing Lisp, in addition to all of the JVM advantages you get. And having a macros set up where you're able to call Java APIs from your Clojure code. DANis you know from your closure code yeah yeah totally i mean i did a lot of list programming in college and i never did anything with a gui like i there are times i wanted a gui but i just you know with lisp it's like if there was some way it'd probably
Starting point is 00:53:58 be some lisp gtk like crazy hackery that probably wouldn't work half the time right and it's just it's kind of that stuff's super ugly, right? But, you know, the JVM has sort of taken a lot of that complexity away. So you could write, you know, a Clojure program that has like a GUI built into it and lets you like, you know, visualize results in a way that's more appealing. You know, and you'd have much higher productivity than if you're writing in straight lists. And I guess, I mean, I remembered a point during this discussion about that running on the JVM also brings this security. So when you run a C++ application, you don't know what that, you're basically letting that, aside from what the OS provides, you're letting that thing do whatever it wants to.
Starting point is 00:54:42 But the JVM, barring recent exploits that were discovered, the JVM has this notion of security. So you're supposed to be able to run untrusted code. And if you don't want to let that code access the file system, it's not supposed to be able to break out of that virtual machine. So it's not supposed to be able to do stuff you don't want it to do. And so when you
Starting point is 00:54:59 run Clojure, for instance, in the JVM, you're getting that added ability to kind of have that feeling of security. I mean, there are whole teams from many different, like, you know, multi-corporate, you know, consortia that are looking into JVM security. There's probably next to nobody looking into Lisp, you know, the C Lisp security, right? So yeah, you get the benefit of all these resources. So our final language is Scala. Scala takes a little bit of a different bent than these
Starting point is 00:55:32 in that it doesn't port an existing language to the JVM or an existing language concept to the JVM. It instead tries to be kind of everything Java is, but even better. So it tries to be its own thing. And so some of the interesting things about Scala is that it's both functional and object-oriented. So you can kind of pick whatever you need
Starting point is 00:55:51 from the strengths of both of those in your code. It gets all these benefits we've already talked about, about really good compatibility with the existing JVM. And the nice thing about Scala being a new language and kind of trying to extend upon the Java syntax is sometimes writing Scala code, you know, I'm doing air quotes here, is as simple as just making a very few modifications
Starting point is 00:56:14 to existing Java code. Right. And then once you do that, you may be able to do some concept that would have taken you many, many, many lines of Java code and it's just a few lines of Scala code. Yeah, I mean, anyone who's done, you know, raw Java on Android has been through the pain of runnables.
Starting point is 00:56:29 So Java has this thing called runnable, and the idea is, you know, this is something that you want to run in another thread. So a runnable, you know, on the surface, a runnable just has, is just a class with a run function, so there's not much to that. But the idea is many of these thread, like a thread pool in Java or a single thread, if you want to kick off a thread, will take a runnable as a parameter and then
Starting point is 00:56:54 execute the run function in another thread. The thing about Android is Android doesn't want you to lock the OS. I mean they don't want you to do something that paralyzes the person's phone. And so they really encourage you to do everything in other threads. What this means is you have just tons of these runnable container classes that don't have any data in them.
Starting point is 00:57:15 They're just classes so that you can call a run function. And your code gets kind of ugly. It's very hard to write clean code this way. Well, Scala, because it has the option of being functional, sort of gets around this. Functions become objects, and you can just pass them around to different methods. You could pass a function around to the Android OS, and
Starting point is 00:57:37 it'll run it. It just makes the code look cleaner. SETH LADDELL- So Scala is being used. The other thing about what functional programming gets you is it lends itself to distributed processing more readily, in many people's opinion, than object-oriented programming, for instance. And so you'll see there are a number of, well, for several of these, but for Scala in particular, a number of very highly distributed web apps that use it. So Twitter has come out and said that they use Scala, and they've actually been big contributors.
Starting point is 00:58:07 They released a set of learning guides for Scala, if you're interested. So that's actually what they use for their new engineers. People who are experienced software engineers, but new to Scala, that's what they use to teach them. So that's a recommended source of learning. Foursquare is known to use specifically one of the web frameworks of Scala, the lift framework.
Starting point is 00:58:29 And so I'm pretty sure they'll probably help out contributing to that as well. But that's something they've come out and said that they use. And those are something that there are web frameworks for other languages and stuff. But many of these JVM-based languages do seem to have a strong web framework presence or really good web frameworks that seem really well supported.
Starting point is 00:58:47 Yeah, I mean, one thing Java got extremely well was the whole web movement. Like, Java was essential to that. I mean, they started JSP. They had Tomcat, which is a fantastic web server container. And so anytime you can hook into Java, you can take advantage of all of this history. The other thing, in the last episode, we talked about Hadoop and HBase
Starting point is 00:59:13 and all of these libraries associated with big data. All of that is written in Java. But if you're using one of these languages, you naturally can hook into those. So you could write a Hadoop job that runs on 10,000 machines in Python or in Lisp or in Scala. I think that wraps it up for this show. I mean, three languages which are interesting.
Starting point is 00:59:39 Maybe that's a little bit of cheating because we kind of handled them together. Well, it encourages people to go and watch those shows. So if you haven't listened to the episode on Python, Lisp, or Scala is actually based on Scheme, which is probably something we'll cover in a future episode.
Starting point is 00:59:55 But yeah, check out those languages and check out those shows. Yeah, it's good times. Awesome. Well, I think that's a wrap. Cool. Have fun, everyone. The intro music is axo by biner pilot programming throwdown is distributed under a creative commons attribution share alike 2.0 license you're free to share copy distribute transmit the work to remix adapt the work but you must provide attribution uh to uh patrick and i and uh share alike in kind

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.