 All right, my name is Oscar Spencer. I'm the core team lead for the Grain programming language. And this presentation is Grain Web Assembly Development Made Easy. So what is Grain? It's a brand new programming language designed exclusively for WebAssembly. We don't target x86. No other platforms. It's just for WebAssembly. That's our only focus. And we want to make WebAssembly great for developers. So some overview of the language. It's strongly typed. That means when you write your Grain code, you know that when that program is compiled, you're not going to get any type error at runtime. You can have confidence that your code is going to work. It's functional programming oriented. So these days, we've seen everyone loving all their different functional programming concepts. We have all of that in Grain. But it's flexible for all sorts of programming styles. Sometimes you don't want to write that recursive function. Sometimes you just want to write that for loop. You just want to mutate that variable. We make sure that you can do that. And we've got modern day language features, just to keep everyone productive. Something that people love in all the popular languages right now is pattern matching. Yes, pattern matching. So if you take a look at this code example down at the bottom, we've got an order at a restaurant. Here we've got a one topping pepperoni pizza. If that order comes in, we can match this case and do something with that. If we've got other toppings, we can do something with that. Order a salad, we can be happy with our salad emojis. It's a good time. What are the goals of the project? We aim to be a high level language for WebAssembly. So right now, a lot of the languages that we have for WebAssembly that work great for WebAssembly are C, Rust. These languages are fantastic and awesome. But these languages can have high learning curves that can be scary for a lot of developers. So we want to make it as easy as possible for people to get involved. Just like a language like Ruby or Python. We want to give developers tools to move fast. That means a robust standard library. We want to make sure that you have all the tools you need to get your job done. We also want to make sure you have awesome tooling. Like we heard in the talk earlier, languages often, like these brand new languages, they don't have the tooling in place. So we worked on tools like a formatter, a language server, making sure that these tools are available. We want to put WebAssembly in the hands of all types of developers, not just those who are willing to get down and dirty with some pointers. So, getting up and running with Grain. You can just go to our website, download a binary, you can write your first gradient program. You can write a Hello World, whatever you want. This example is just printing out the command line arguments. That's it, pretty simple. But now I want to talk a little bit about Waggy, the WebAssembly gateway interface. If you want to get up and running, writing a web server, this is probably the easiest way to do it. In fact, there's just two lines of code, two print statements. We print out a content type, text plane, and we print out Hello World. You've got a little configuration, you run Waggy, boom, you've got a server. You curl that, Hello World, you just wrote Hello World in two lines of code. That's not Grain being awesome. That's just Waggy, Waggy's just that easy. But extrapolating that and actually using Grain, the Deus Labs team, the team that has created Waggy, they have an awesome example of a file server written in Grain. So if you take a look at this code here, what I love, this is just an excerpt for their repo. Down at the bottom, where we actually handle the result of loading a file, if that file, if we couldn't open the file, then obviously the file doesn't exist. We just say, hey, it's not found. Otherwise, we can guess a content type, very straightforward, we just print it out, we pipe that to standard out, and that's it, close the file. It's simple. This code isn't scary for folks. That's the whole idea behind Grain. It's trying not to scare folks with the code. That's it. So I wanna talk a little bit about Atmo. You heard of talk from Connor earlier. In my day job, I work at Civil War, the awesome company. We have this project called Atmo. It's similar to Waggy in terms of handling requests and things like that, but it's a tad bit more involved, but it gives you a lot more features. Makes things a lot easier for you to do things like HTTP requests and things like that. It's also got built-in support for auto scaling, infrastructure management, things like that. So we've got this directive here. This is a simple example of like, if you wanted to have a cache set function or a cache kit function, this is how you would declare it. But here, this is where I think a language like Grain starts to shine. Let's say you had a GraphQL API and you wanted to add a little caching layer to it. This is all the code you need to do that with Atmo. All you have to do is import a couple libraries. Say you've got your API. In this example, I'm using a GraphQL API over some SpaceX data. What we do is we check the cache. We say, hey, do we have a response that's in the cache for this request that came in? If we do, then okay, great. We have this cache response, just return it. If there isn't a cache response, well, then we actually need to go ahead and do the query. So we just say, okay, do this query. And then right before we return the result of that, we peek in to our little result and we say, hey, if we actually got a response, go ahead and cache it. It's really simple. Now this code is all a preview. It's all based on some projects I've been working on. If you've heard of the Witex Binding project, I'm adding support for Grain and a bunch of other languages. And so this is made possible with that. You'll see this pretty soon. But the thing that gets me excited about all of this is that this isn't scary, right? Your average developer can pick this up and start working with it right away. There's no learning curve. There's nothing scary about this. That's what Grain's all about. So how can you get involved in what we're doing? Join the conversation. We've got a Discord, a really happy, friendly community. Any questions you have, we're here for you. We can give you, you can give us feedback on what we're working on. Advocate for all of the features that you really want us to have. But please don't come in and say it. Oscar and Macros, when? Please don't. We also have our community meetings in our Discord. So it's a great time to meet the team, talk to us, ask us about everything that we're doing. And of course, there's a Discord link there. You can also contribute. Of course, compiler development can be very scary. I like to think that I'm a nice, friendly guy. So if you're interested in compiler development, you can work with me and we'll work together and build something awesome. But otherwise, we've got plenty of things in the standard library that's just writing Grain code, which is awesome, and other projects in our ecosystem. Of course, open issues. That's going to be one of the easiest ways to get involved. If you find a bug, if you want a feature, just open an issue. We'll see it, we'll respond to it, it'll be awesome. And of course, you can sponsor us. We don't have anyone who works on Grain full-time, but we've got a full team. We do it as a passion project. We really want to bring WebAssembly to everyone. So anyway, that you can support our development is awesome. And that's about it. If you have any questions about the language, feel free to hit us up on the Discord, our Indie Slack channel, and more than happy to answer any questions you have. Thank you very much. Thanks, Oscar. Also, thank you for doing the first part twice. Yep. And the second time was better as we expected. Or maybe that's not true. Go ahead and disassemble, disconnect the whole thing. Radu's getting mic'd up. Are there questions here for Oscar while he's doing that? Yeah. Yeah, absolutely. So for folks who are familiar with the WebAssembly exception handling story, there's a proposal for exception handling. So WebAssembly languages have had a hard time dealing with exceptions. So in Grain, this was a problem for us. We wanted to be able to just try, catch stuff, right? But what we've opted to do instead is using result types for more things. We really want to be able to say, hey, actually, let's just handle this result. It's not a huge deal to just give back the user result and let them choose what they want to do with it in a nice programmatic way instead of using try catch. All right. Thanks, Oscar. Thank you very much. Great stuff.