« All Episodes

Hampton Catlin, Part Two: Speedy Sass with libsass, Wordset.org and Open-Sourcing Our Words

Published 4/29/2015

In today's episode, I talk with Hampton Catlin about fast Sass compilation with libsass, and then we discuss his latest project, Wordset, and why we need a truly open source dictionary.

Links for the whole interview:

This episode is sponsored by Intuit. Check out the developer sandbox and API explorer at http://intuit.me/DevTea

Transcript (Generated by OpenAI Whisper)

Hey everyone and welcome to Developer Tea. My name is Jonathan Cottrell and today I am interviewing Hampton Catlin. Hampton is the creator of Sass and Hamel and he's also the creator of WordSet.org. Go check it out. We're going to be talking about it in this episode. I actually interviewed Hampton a few weeks ago at Ancient City Ruby, which is why you're going to hear a little bit of background noise. We're sitting right by a cafe and there was just no way to get away from the noise. So I tried to edit it as much as I could to get the background noise out, but unfortunately editing just isn't quite perfect yet. So hopefully you'll be able to hear things as well as I was able to hear them while I was there. I hope you enjoy the interview with Hampton. If you do, make sure you reach out and let him know on Twitter. His Twitter handle is at H Catlin. That's H-C-A-T-L-I-N. We're going to be talking about LibSass. We're going to talk about WordSet and a bunch of other things. Really interesting discussion. Really awesome guy. Thank you so much for being on the show, Hampton. And let's get to the interview with Hampton Catlin. So I was working on a project and I used Suzy to build a grid. It was relatively large in terms of how many lines of code it was because I wanted to do some vertical stuff and et cetera, et cetera. And it had the responsive necessary. Suzy's cool. I did responsive grids and all that. And I was using the Ruby version of Sass and it was taking a significant amount of time to compile. Understandably so. And at the time, LibSass didn't have support for Maps yet. And so I waited. And I remember thinking, man, how long is it going to be before this specific build is fast enough to use in production? And I had no idea. I didn't know how fast LibSass was going to be. So then I switched to LibSass. And whenever the Maps came in, oh my gosh, man, it was like less than a tenth of a second or something. It was like maybe even faster than that, actually. And I had to go and check the CSS file to make sure that I didn't write my Gulp file wrong or something because it was so fast. Yeah. And so LibSass, if anybody doesn't know what LibSass is, is basically the same thing. It's basically the C implementation rather than Ruby implementation of Sass compiling, right? Yeah. So, you know, as I've said, you know, the beginning of Sass was me spec it out and then Natalie running off and writing a lot of Ruby code. And we never thought people would write this much code. Like that it would be a job. Somebody has like, I mean, there's thousands of people now. It's so weird. It's their job. And, you know, part of I knew why we were, this was a couple of years ago, why we were still in a head-to-head heat with, with Less is that Less worked in JavaScript. It was faster than Sass. And, you know, people who, let's say you're writing in Java or something, or Go, you could drop in your JavaScript onto the page and write Less. Go programmers did not want to have to include Ruby or run a whole Ruby stack just to get Sass working. So for us, it was a disadvantage. It's like, oh, it's slow. I mean, sure, it's more mature, but slower. So, you know, I'd gone off and worked at Wikipedia. Yeah. Yeah. And done a bunch of other stuff. And, you know, wasn't doing as much day-to-day work on Sass. So I decided to come back with a flair. And so I was like, you know what? Like, let's write this thing in C+. Well, it's actually, it's C interface with C++ in the back end. Okay. Yeah. And the cool part about writing it as a library is that you can drop it into any other language. So, for instance, Node, there's Ruby-Sass. I'm sorry, Node-Sass. That's what it's called. It's the package that is, it compiles. It compiles inside of it LibSass. There's a Java package that's native. There's a Python package that's native. There's a Go packet. There's a bunch of Go packages, actually. There's Rust. So you can write a Rust framework, and you can just use... Actually, Rust isn't as good at it, because of my stupid memory management. But whatever, that's it. So you can actually transcompile from LibSass into JavaScript and run it in the browser itself. It's not recommended. It's not really slow. But, yeah, you know, I figured, like, you know, what the community really needed if we want to make this project go further is we needed another implementation that might be a little behind on features. But we would start this time knowing we were building something for thousands of people who needed it. Where some of the builds, sorry, these builds would take hours. So big companies with large, large teams, like, there's teams with hundreds of people at, like, big companies. And when they do a deploy, it can be... I mean, they're running millions of lines of Sass. Yeah. So... You know, for the first year or so, I... It was me convincing a couple other people to move out of the company I was at at the time. Help sponsor it. Started getting that project rolling. I'm really happy to report that, once again, that community, the developers on it are... Like, there's some point where I start projects. I'm a creator. Like, I'm not a good maintainer. Right, right. Like, I try to bootstrap projects kind of over two or three years, depending on how long it takes. You have to find the right contributors. You have to build a community. You have to make sure everything's working. And finally, Libsass has two or three people who are awesome C++ C developers. And they are just, like, nailing through right now. Oh, that's awesome. And they've been doing it for the past year or two. So it's amazing. I get to be kind of hands-off. Yeah, and just kind of watch. Yeah, I mean, I'm a good programmer, but I'm not a... Like, I could build a makefile. Right. I'm not going to work on makefile flags for, like... Like, six hours. Right. I just... I'm not that guy. That's not your creative piece, right? I'll get it building the first time. But, you know, autoconf tools. There's all this crazy stuff you have to do. But, you know, I knew that we had to do it, though. It's the hard project. And it took, yeah, two years at least to get really off the ground. I think today is now very much in usable state. And actually, sorry, the big deal we announced at SassConf this year is that we're not going to release a new version of SassConf. We're not going to release a new version of SassConf. We're not going to release a new version of SassConf until LibSass is a full parody. Oh, nice. So we're synchronizing the two projects, which... Yeah. Natalie and Chris are not really involved in LibSass at all. Okay. So the fact that they agreed to let... To wait. To wait was a really big deal, especially for me, because this was my little crazy side project. Yeah. Where I'm like, just listen, listen, I promise. People want this. Yeah. And Chris thought it was crazy, and Natalie thought it wasn't needed. Yeah. But now I think it's by far the most popular interpreter, which is pretty good for two years. Yeah. Two years of what it's been. Yeah. Yeah, so I mean, if you're using Sass and you're using some other language and you're just installing Sass, it's probably using LibSass in the background. I think a lot of people aren't aware if they're using it. Sure. And it was meant to be the shy kind of guts that can be wrapped by any other language. Right. If you're using it in Python, you're probably using LibSass. Yeah. With the one exception right now, I think, being Rails, right? So Rails is still using the Ruby version. Rails is still using the Ruby version. Which is a difficult problem to solve, admittedly. So there's a repo called Ruby-Sass, I think, which I started working on, and I was just going to write a wrapper for Ruby and have it pretend to be, so it was like a drop-in replacement, have it pretend to be the regular Sass library. Mm-hmm. And it's one of those dumb. Oh, it's so funny that I know people think open source people who are working on successful projects are, I don't know, brilliant. Like, I don't know, there's some magic going on in professionalism. Right. It's basically I got that project half-working, and I kept getting a random segfault from the C wrapper, and every two months I'll go back in and mess with it and see if I can get it, and it just keeps happening, and I'm like... I don't feel like dealing with a segfault today. Yeah, sorry, it's just like, it's random. Right. So it will pass, and then you run it again, and it'll segfault. Really? And I'm just like... Really? Really? I... Done. I'm out. Yeah. I'll spend, like, a couple hours on it, and then I'm like, yep, you know what? I'm going to go work on something else right now. Interesting. I wonder if you could give, like, a call to people who want to do that. Yeah, I think it's Sass slash Ruby Sass. It's like a Ruby Sass. No, surprisingly, though, I mean, well, I say surprisingly. It's, the asset pipeline has been relatively, you know, it's fast enough for me to work, like, make changes. It doesn't immediately refresh, almost. And so I'm not seeing, like, the same kind of compiled issues that I saw previously. And I'm not sure exactly why that is, to be honest. Well, I mean, it's how much crazy shit you're doing. Right. That's true. So, you know, I mean, when I'm writing a standard Rails app, I just use the stock Sass. Yeah. Like, because I'm not writing... A ton of... Yeah, typically, Michael and I will work on a project. He's writing all the Sass. Mm-hmm. And, I mean, we're iterating pretty quick. It's not, like, I think you really start getting problems when you're using either really clever extension libraries that are doing lots and lots of internal work. Mm-hmm. Or it's a big team. Sure. So if you have a team of more than two and it's your product, kind of long term, you're going to end up with a lot of CSS. Yeah. Yeah. That's how it works. Yeah. It's the natural theory of things. Right, right. No, so, you know, you're just working on your own Rails app. Or, like, even a small or medium team has worked together a bunch. You know. Yeah. Like, your Sass won't be that huge. Sure. So, you know, I think any human-sided Sass project is just fine on Ruby Sass. Right. Or, it's not Ruby. Sass. Sass. Yeah, like, normal Sass. Making these things is really difficult. Not Ruby-Sass. Not Ruby-Sass. Yeah. Like, the regular Sass engine. Yeah. We're going to take a quick sponsor break, and then we're going to come back and talk about Hampton's brand new project, WordSet.org. You've probably heard of QuickBooks. And you might even use QuickBooks. Every day in your small business. But did you know that QuickBooks has an API? Intuit has built the API with developers in mind using standards like OpenID, OAuth, and REST API calls. And with millions of businesses already using QuickBooks, you've got a customer base that's ready to use your app. And you can even publish your app on Apps.com, Intuit's application marketplace built specifically for QuickBooks users. And here's the best part of the QuickBooks API and Apps.com. It's all free. It's all free. Intuit doesn't take a royalty share from the applications that you publish. You can get up and running in just a few minutes using the developer sandbox and the API Explorer. Just go to developer.intuit.com today to get started. There will also be a link in the show notes to let Intuit know that you're a Developer T listener, which is a huge help to the show. Check it out in the show notes on developerT.com. Interesting. So, all right. So, it's time for shameless plugs. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Wordset. Wordset.org. Yeah. So it's my open source project slash company that I'm working on that is open and live. And it's a collaborative dictionary, which is kind of a weird thing to build. Uh-huh. Why? And, you know, the simple answer is that there are really not any good open source dictionaries right now or structured ones. So Wiktionary is the Wikipedia project that's their number two project, kind of by usage. But it's unstructured. It works like Wikipedia. The pages are just text. So you can't do any analytics on it. You can't search the language in any sort of way. Interesting. You can't use it in a word game if you want to write a word game or whatever. Sure. So that's just stupid. Yeah, yeah. You can't go download Wiktionary in any sort of nice format. Right. Or API. So, yeah, I mean, this is my passion project because for years, I have a kind of popular iPhone dictionary that I wrote years ago. Just right now. I have a weird resume. Yeah. So we have like 15 million downloads of that. Oh, wow. And I was using this crappy free dictionary that's from years ago. It's not very good. It's much worse than Wiktionary. But it was the only one that you can use structured and it's free that you can actually put into an app. And it bothered me that nobody has fixed this. Sure. And the intervening six years. So Michael and I, my husband, who I'm... Sure. And the intervening six years. So Michael and I, my husband, who I'm... We're co-founding this with. We're fixing it. So that... That's awesome. I mean, nobody else is going to fix it. You just got to do it. Like, it's up to us. Yeah, because... Well, you know, it's... If anything should be open source, it should be... Our words. Yeah, exactly. All the other dictionaries out there are owned by major corporations. Like, the kind of corporations with lobbyists and big market, like, that are, like, trying to get Congress to pass laws about copyright and all... Oh, wow. Yeah. And it's... It is a subdivision of those companies that actually says what the meaning of the words that we use are. And we use those things very officially. Like... Sure. If you're in school and you try to use a word a certain way, and your teacher will say, no, that's wrong, and point to the dictionary of what the meaning is. Yeah. And, you know, I'm not that crazy that I think, like, there's kind of active manipulation or something. It just seems... Like, this is something we can do. Yeah. It isn't that hard to have an open source dictionary. Like... Two people can... Two people can build it. And we need collaborators, people to help out. But, like, it's... This isn't, like, some business that only... Like, building oil pipelines is done by large businesses. Right. Right. Like... And they can do that. We can't do that from our living room working at desks. Like, that's not a thing. But a dictionary is very much an achievable... Sure. ...task. And, you know, it's definitely... I think we have this feeling, like, well, it's up to us, so we're going to make this happen. That's cool. Yeah. You know, we want to... Right now, it's open source. It's both the dictionary and the code. So, if you go to github.com slash word set, it's building Ember and Rails. Oh, cool. And we're looking for people to help building new features. We want to extend it to multiple languages. It's pretty cool. It's been going really well, actually. But, you know, it's still, like, getting the project started, kind of thing. Sure. Getting attention out there. Well, the net effect... So, I think there's something interesting here. The net effect of even the ordering of the definitions... Yes. That's a tough one. The number one definition of something is kind of the canonical, that is the definition of that word. Yeah. And so, you can imagine, like, even though it may not have a direct effect for one person, when you have an entire population who sees a word a particular way, you're basically creating, like... I don't want to get too off-subject here, but the meta-narrative that everybody kind of, like... All of us kind of agree on a particular definition. Yep. So, somebody decided this one is number one. So, the way we're doing that is we're building in... Because not everything's... There's click-edit to edit a meeting. That's definitely a thing that exists in the site. You have to have that. Sure. You know, and people vote on it. There's a... Everybody has to vote up and down. So, it's very democratic. Mm-hmm. And, sorry, the way we're sorting them... Right now, it's by ID, so... No, but we're going to build... Because it's fast. We're going to build word games. Mm-hmm. Where you're given an anagram and a definition. And the speed at which people can solve those definitions... I'm sorry, the pairing of the two. We're giving you, like, the difficulty, basically, we can figure out. And so, the ones that people can answer by... We definitely want to do this by region, also. Because in different regions, words have different meanings. Sure. But where it'll... The ones that are kind of easiest, quote-unquote, move to the top. Mm-hmm. So, the ones that everyone kind of agrees on or can quickly understand what it is. Mm-hmm. Are the ones that should be first. And so, we're just letting native speakers, in the way that they actually sit there and their brain works... Mm-hmm. Is how that should be ordered. Yeah. So, if a new meaning comes in for a word... You know, let's say, B-A-E, bay. Right, yeah. Which is a relatively recent addition to the language. Sure. That actually exists in the dictionary, but it stands for various companies and acronyms and stuff. So, given those words, what happened in the last year is that that would have gone from a very obscure meaning... To just flipping completely. Right. It's far more common than the culture. And we really want to be able to express that kind of live. Mm-hmm. So that as the language changes, it's expressed on this site. That's cool. Yeah, and really... And especially with regionality, dialects, slang, different spellings. These are all things we're trying to slowly expand out, but it's a complicated problem space. I actually had one of my listeners quite nicely pointed out that I... Often say, might, could be. Mm-hmm. Which I realize is wrong. It's a Southern thing. But it is a Southern thing, right? Yeah, I think so. So, and about half the audience of the show listens outside of the United States. Mm-hmm. And so, they pointed it out, and I was like, I don't even know that I say that, first of all. But secondly, nobody else around me has ever pointed out that that's improper. And so, it was just a moment of like... Our language is... It's not improper in the right context, right? So, we're trying to do like... Yeah, so we would probably put that as informal and regional. Sure. At least the way we've been talking about it. We're really... You know, obviously, this is really complicated to pull off, right? Uh-huh. But, you know, we want to include things like slang, which is different than informal. Uh-huh. Which is, you know, different than alternate spellings of words. Mm-hmm. Alternate meanings by region. All these things kind of shift. Sure. So, you know, I would definitely, like, we would definitely want to have might, could in there. It is definitely part of the English language. It is regional, and it is typically informal. It's not something that you would want to write in a newspaper article. Oh, sure. Yeah. No, that's just where it's informal. It doesn't mean it's wrong. Right. Right. Right. And, you know, there's... And then there's certain phrases that we would say are formal. Yeah. Yeah. There's words that aren't used anymore. Like, perhaps. Like... Yeah, perhaps would be formal. Right. Absolutely. The formal version of might, could is perhaps. Perhaps we should. Yeah. Because... And actually, that's... For people learning English, I think that kind of thing... That's really important. Because when you say... If somebody says, perhaps we should, typically they're making a joke. Sure. So you're trying to say, look how formal this word is that I'm using, and I'm pointing out that I'm being fancy. Mm-hmm. And that's something that, you know, when you look at a dictionary entry right now, you know, not having those kind of tags and kind of, you know, metadata... It's cold. Yeah. It's... You know, I think for a dictionary to add a real note about something, for them, they don't do very often, and it's a big deal. Mm-hmm. And I think we want to give those... Those usage guidelines in a much more natural... Yeah. Natural way, so... Yeah, it's like a historical event when a word is added to the dictionary, you know? It's like, in 2005, the word blah was added to the dictionary. Yeah. And I think that's... I think it's a shame, because words are created every day, and their meaning is shifting. Yeah. It's not a... You know, there shouldn't be a static definition of words... Yeah. ...that doesn't... That can't change. It's kind of silly. Well, and, you know, we're definitely... So we're focusing on, you know, urban dictionaries, what everyone kind of says when they see our site. Not that... It doesn't have content like urban dictionary at all. Right. But the idea of any sort of collaborative linguistic thing. But what we're doing is you have to prove that a word is in some level of common usage or, like, actual usage... Sure. ...by sourcing. Yeah. Okay. So you can't say, my friend John... Right. ...is slang for something. You have to actually show... You know, we're still figuring out the details exactly how to do that, but it'll probably be there'll be a set of sources that you can use. Right. So all sorts of different cultural magazines and maybe some blogs, and ones where we think if it's used here, it's very clearly... You know, maybe it's not formal. It doesn't have to be, you know, what an English professor wrote. Sure. You know, it can be a Wired magazine. It can be one... Right. Right. But, like, somebody looked at it and said, I'm going to use that word. Uh-huh. This is used. Yeah. Like... Yeah. Yeah. Boing, boing. I would... Any word used on boing, boing, even in kind of slangy, whatever usage, you know, and we definitely want to make sure it's... I just came up with two nerdy examples because I'm nerdy. Oh, no. We also want to try to avoid, you know, cultural... Like, we'll do Ebony magazine. We'll do Gun and... What's the weird Southern... Gun and Game or something. There's, like, a weird... Yeah. I haven't read a magazine in probably too long. Well... We'll do the Yankee. I think there's a magazine, Yankee. Yankee. Or something. We'll add that in. Right. We'll do British. We want the BBC. Like, you know, just... You know, just try to be as non-culturally biased as possible, but try. Of course. Yeah. But also, there's... It's funny. It's funny. You have to get some level of... Opinion. Opinion and some level of making sure the words are used. Yeah. Yeah. Like, legitimacy. Right. Right. And trying to do that in such a way as it's not culturally imperialistic is very difficult. Exactly. And that's kind of what I mean by opinion is what is legitimate, right? Like, what... Where is that on? I think it's used in any sort of semi-serious... Context. Yeah. Semi... When your intent is to communicate to a broad audience... Sure. When that's the intent and it looks like that was the intent. Even if it's slang or a regional term, it's fine. If your intent was to communicate and you assume somebody might know this word... Then it's language. Then it's like... It's not gibberish. No. And that's... I guess that's the defining factor. Is it gibberish or not? Like... Right. Anything that's not gibberish... Is it a made-up joke? Right. Right. Right. You know? Or a neologism that was attempted but not actually used. Uh-huh. Yeah. That's... So, right. It was a little attempt. The neologism. And if nobody else is using it... Sure. It feels... Right. Right. Good attempt. Yeah. Good attempt. Well, that sounds like a really cool... Having gone to Georgia Tech and getting my master's in digital media... That sounds like a project that people are going to latch on to in the... Especially academic contexts. And just, like, use it... Use the API like crazy for that kind of stuff. Yeah. It's funny. You know, we're promoting it but not super promoting it. Mostly the stuff. On Twitter. But we're not, like, going to Wikipedia people or... Yeah. Mostly because we're just... Projects have to grow kind of naturally. Uh-huh. Like, you know, I don't know if we're ready for a Wired magazine article. Right. Like, I'm hoping it happens. Yeah. But, like, you just let it grow. Right. Like, there's a... I think people don't talk about this enough with products and stuff. You have to just let things... Build? Yeah. You have to farm them. You have to let them react to things, update it, think about it. Uh-huh. Walk through it. Let people notice it. Right. Do some promotion. But it takes time. Yeah. There's a fine line between, you know, marketing, pushing something really hard. You know, because some of that is necessary. Like, for instance, this podcast. iTunes has an algorithm that lasts for about eight weeks when you first launch. So, for me to get this podcast to a number of years that matter, right? Like, of course, if there was just five people listening, it'd be awesome. But if I want more than five, if I want 5,000, that eight week... Algorithm is super important for me, right? So, I have to do some kind of push there. But then I also know that this organic growth is the most sustainable way of doing things. Yeah, definitely. So... Well, awesome. So, wordset.org? .org, yeah. GitHub.com slash wordset's the other. Go look at the... That's the important one, right? All these will be in the show notes as well. So, you can just click on that at developertea.com. So, I like to ask guests one question. One question at the end of every interview. And that is, if you're speaking to a developer, either if they're a beginner or if they're more experienced and you only had about 30 seconds to give them advice to move forward with. And everybody I interview has the same response of, Oh, what do I do with 30 seconds? Almost everybody, at least. What would you say to them? I would say people are the most important part of the development process. And I think that's a thing that a lot of developers... Never get. It's the people you're building it for, whether or not those are the developers or humans. You're building it for somebody. Or yourself, I guess. And there's people you work with. And there's people who come after you. And this is not a job where you're solving math problems all day. Yeah. You know, your algorithms course, if you went to computer science school, is pretty useless. For the most part. What is important is focusing on being empathetic to other people and understanding them. And even though I think it's hard being the kind of people who like to talk to machines, that can be a struggle for us. Sure. But I would say really, like, always ask yourself, Am I people-focused right now? I know it's a wishy-washy answer, but I really think it can transform the work you're doing from something that is a job into something that can change things. Sure. Yeah, that's great advice. Awesome. Thank you so much, Hampton. Thank you. Thank you. Thank you so much for listening to this episode. At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At At If you'd like to help out Developer Tea, the easiest way you can do that is to leave a review and a rating in iTunes. Now, that's because other developers will read those reviews and they'll take your word for it and they'll start listening to the show as well. Thank you so much for listening to Developer Tea. And until next time, enjoy your tea.