 Hello. Hi. I am feeling weird giving a virtual talk. I guess everybody's doing that these days though. My name is Ryan. I'm going to talk to you about this project at Dino that I've been working on for the last two years now or so. We have just released version 1.0 about a month ago. And yeah, I just thought I'd give you guys a bit of an overview about it and some demos. And if I understand the program correctly, hopefully you can ask me some questions at the end of it. So first off, just a bit of an overview. So C++ and Rust and Go are really interesting developments in computer infrastructure. They're allowing us to more easily make machine code programs. And it's getting better all of the time. But the fact remains that most software is not CPU bound. And it seems that most software is done in dynamic languages like Python and Ruby and JavaScript. These dynamic languages, aka scripts, are easy and succinct. And they often are the most minimal way to describe certain algorithms. And amongst these dynamic languages, JavaScript is arguably the fastest and has the largest community of programmers because it's the language of the web browser. So with that in mind, back in 2009, I started the Node project to bring JavaScript to the server or out of the web browser, that is. And this turned out to be a really successful project. It's essentially turned into the PHPs of the 2010s and has ubiquitous cloud support and is used by essentially all front and frameworks. And yeah, I mean, in some way or another, essentially every website is using Node. But since 2009, the JavaScript ecosystem has improved very rapidly and has new features and systems that were not around back then. So for example, the array buffer is a system to allow accessing raw binary data in JavaScript. That was not there when we originally designed the TCP system in Node. A single way, of course, is amazingly useful when you're dealing with asynchronous systems. And most importantly, the ES modules has provided a way to provided a module system, a standard module system in JavaScript. And so Dino is built trying to take advantage of these new developments. So in many ways, it's very similar to Node. It's a program for executing JavaScript outside of the web browser. And it's built on top of the V8 JavaScript to VM inside of Chrome. And it's open source and MIT licensed. But instead of C++, it's written in Rust. And yeah, kind of the a lot, a lot of the utilities that provides are quite different. So it has built in DevTools for testing and linting and formatting and doc generation. And it's been designed so that it can be embedded in other software. And it tries to use web APIs where it can with the idea that we want this thing to be as broadly usable as possible. So we really want to appeal to developers. I think the web browser is kind of the largest developer base. And by using those APIs, we can appeal to the largest segment of the developer population. So Dino is a bit different in that it's making use of these ES modules. And it has this weird property where you can actually put a raw HGP URL into as give a raw HGP URL as the module specifier in import statements. This is actually something that's possible in web browsers these days. So it's a web compatible system. And what this allows you to do is basically import code directly from the internet. And yeah, this has some interesting properties. So when you talk about importing code directly from the internet, you quickly run into some security questions. How do you know that if you're just pulling from a random URL, what sort of trust can you have from that? Well, if you're pulling from a random NPM package, what sort of trust can you have from it either, right? Not much. But this kind of makes the fact that you're pulling random code from the internet a bit more explicit. Not that you're not doing that already with Ruby gems or NPM packages. You're certainly still pulling random code from the internet. But because this makes it more explicit, we think that it's important to make use of the fact that V8 is a secure sandbox. And so Dino by default also retains this security sandbox of V8. And so, well, let me jump into some demos and you'll see what I mean. So first of all, oops, I need to copy and paste this. So what I'm going to do first is show a GIST program. GIST is this GitHub pasting server. And essentially it's a way to paste code on the internet. And there's an API where you can basically post a file and then get a URL and send it to people. And so we've got this program. And this program is a URL to a TypeScript file. And if I enter it in my browser, we've got this website where it displays the code. And the interesting thing here is that when you display it on, get it through the web browser, you get this website. But if you curl it, you actually get the raw text. And the way that we're doing this is through the accept header. So web browsers can send an accept header with each request that says, oh, I want HTML. And based on that, we're able to either serve up the raw content, the raw text file or not. Anyway, what we're going to do is Dino has the ability to download this program directly and run it. And so the way that this program works, if I just run it, I'm going to get some permission error. It says uncaught permission denied, access to environmental variables, run again with the allow m flag. So GIST, in order to paste a GIST, and if you look through the code, you'll see that it's trying to get this environmental variable GIST token so that it knows which user to post as on GIST. So we don't just allow anybody to have access to environmental variables. We have to give it the allow m flag. And it's going to also need to have allow net because it's going to be accessing some server. But yeah, let's just see that happen. So right, when we run it, it's fetched my secret GIST token environmental variable. And now what we need to, it's giving me this usage message because I haven't actually given it a file to upload. And so what I'm going to do is try to upload this read me file that's in my current directory to the GIST server. And when I run this, I should get one more error, which is that, oh, it doesn't have read access to the file system, actually two more errors. So we're going to have to give it dash dash allow read. And just skipping ahead, we have to give it allow net as well, because it's going to access gist.github.com. And when I run this, it says, oh, success, it's taken this file and given me some URL, which if I go to it, hopefully we'll contain this, this dino read me file. Right. So this is kind of, I think the interesting thing about this is, is that I didn't need to install anything, right? This is a command line utility that, you know, previously, you might have npm installed dash g to kind of get this, this program. But here I'm running it without, without installing anything. Now, we do have kind of an install version. And the way this works is that if I, I think, if I, so I'm taking out the read me because, okay, so what I'm going to do is instead of say deno run, I'm going to say deno install. And what this is going to do is it's basically going to create a little shell script. Oh, it's erring out because I've already got it installed. I'm going to have to do dash dash force to overwrite my previous installation of dino gist. So it's created this little shell script. And if I cat this shell script, I mean, essentially, it's just copy and pasted this, this command line into this shell script, right? And so, so now, now I can do things like just read me and it will work like that. So we have this very simple way to essentially create bookmarks to, to command line scripts. Right. So, so this is kind of what I mean by, by a web browser for, for command line utilities or even programs in general. This next example is, is a whole website actually. So when I run this, I think this is running a whole react website. So, you know, obviously this is just program is pretty small. But the claim here is that we can do kind of arbitrary complexity here. And so what I'm going to do is dino run, allow net, allow read. And let's, let's just take a look at what this, what this program is. You know, it has some, some relative includes it's, it's including a, importing a TSX file starting some sort of server, etc. And it's, I guess it's going to be listening on, on port 3000. When I run this, hopefully it will work. Let's see. Listening on port 3000 seems to have done it. And let's go there. It says hello, Deno land, dino land, and has kind of this example react server. You might have noticed that this started up really fast. And there wasn't any downloading or anything happening. That's because this, this file here is, is cached to my local, my local machine. And you can find out more about the cache information if you type dino info, whoops, that was a lot of output. So when I type dino info with, with kind of the, the entry point script, I can find out that it has kind of a locally cached version in, in this directory. And this is a TypeScript program. And so it's, it's been automatically compiled to JavaScript and it exists in, in this location here. And here's a source map file. And then it even gives us a dependency tree, all with, all with valid URLs. And so, so this entry point depends on mod TSX, which in turn depends on dep.ts, which in turn depends on react from JSPM and so on, right? There's, there's a lot of dependencies in here. So yeah, just, just kind of as an example of, of a more complicated program. So where's my slides, right? So even something more complicated here is this program, which is also given as, as a URL. And, and I might as well show you the source code first. So this is also displaying a little website, but it's using this, this web view. And as you'll see, it's, it's kind of a little mini GUI application. And it's going to create two windows, a really, really simple thing with, but two, two native windows, right? And the way that it does this is with, with Dino's plugin interface, which is still unstable, but essentially allows you to plug into, essentially allows you to load a DLL of, of that kind of can contain arbitrary native code. And yeah, so that's why we need this unstable and just FYI, this dash capital A just means opt out of all of this security sandbox nonsense. Let's just, let's just run it. Let's, let's, let's be crazy. By the way, if you're loading a DLL, a plugin, as we call them, you know, kind of all your security bets are off because we, we don't have, you know, if, if you're going into some, some random Rust code, we can't control what, what you're doing at that point. So, you know, the, oh, okay. So anyway, I'm going to run this. And as you see, it's, it's created these, these two windows here. Yeah. So anyway, I'll, you know, I'll, I'll, I'll leave this for you to play around with, but just, just kind of a sampling of what Dino can do. And yeah, I mentioned earlier that we have a bunch of tooling. So let me do Dino help. And you'll see that we've got all these sub commands. So we have like bundling and doc and format and install and lint. So, you know, let me, let me just give you an example here of, let's say that just file or let's, let's take this, this entry point.ts. Hopefully this works. I haven't tried this yet. But let's, let's just try to bundle, bundle this guy. Right. So what it's going to do is it's going to create a single JavaScript file with, with all of the dependencies bundled up in here. Really crossing my fingers now that this actually works. Maybe seem it outputs it to, to standard out. So yeah, seems, seems to have worked. I'd rather show you these other tools since bundling exists. Let me, let me show you format. So, so Dino format is, is essentially our version of prettier, but implemented in Rust and so much faster. And what I'm going to do is just format some files. I've got this directory here. I'm actually in the Dino directory. And this is some code that's kind of built into Dino. We in, in Dino itself in our internal stuff, we actually don't use this Dino format yet. We use prettier still, although hopefully we'll be changing this, this soon. But I'm just going to use this as an example of formatting a bunch of code, right? And giving you a sense of how long it runs. This is, this is, runs like that, I guess, not, not dissimilar to not dissimilar to prettier. And if I do a get diff, it's not exactly the same as prettier, but it's pretty close. Seems seems like Dino format likes trailing commas, right? Whereas whereas prettier are prettier current prettier situation does not. So let me reset that. Dino doc is too fast, too fast. Dino doc. Okay. So first of all, here's, here's some, some server, some, some code. This is our HTTP server. So you can, you can throw this in the web browser and see the code here. What we have is a, we're able to parse the AST and kind of display documentation. And so if you type Dino doc and give a URL or a relative path to some local source code, we will print out a bunch of documentation for this. So we can parse out the JSDoc comments and the TypeScript types and kind of display them. And, you know, you can kind of narrow in on some of this stuff. So maybe if you want to learn more about server requests, you give that as another argument and you can, you can kind of see, see some more of it. And of course, we have JSON output. So if you want to have kind of do a structured display of this, and I think this doesn't work with the second argument. So I think I need to do that, right? So if I, if I give this JSON argument here, then we get the same output that was displayed previously, but, but in kind of a computer readable form. And what's cool about this is that we've actually taken this and built a website around it. And so in the Dino website here, if you go to one of these, these source code links and click view documentation, we'll actually render out that JSON into a file into a documentation that you can view online. So yeah, I mean, essentially any, any URL, yeah, and by the way, if you go to Dino doc, and you can put in any, any random URL here, right, including things that are not on Dino land. And it should be able to generate documentation for, for that, for that URL. So one more thing, Dino lint. This has just now come out. And this is essentially our version of our version of ES lint. It's unstable still. So you have to provide that unstable flag. But if I give it a directory of source code, which I'm going to give this CLI test unit, this is a bunch of source code that has not been linted yet. You will see that it runs very fast. Our Dino lint program, you know, is not, does not yet have feature parity with, with, with ES lint, but we're making fast progress with this. And we've clocked it in about two orders of magnitude faster than ES lint. So do check this out. And I should mention that Dino lint is distributed as a standalone Rust create that is potentially usable inside, outside of Dino itself. And so, so potentially this could be used for other, for node projects. So not, not necessarily Dinos is specific. All right, so I'm not going quite slow here, got to speed it up. Right. So I should mention that, you know, we've, we've designed this, this thing a bit differently than node node is kind of this monolithic command line application. Dino is not Dino is a set of crates. And we've built it this way, because we've seen that there's, there's certain use cases where you might want to execute some JavaScript, but not necessarily spin up a whole node process, right. And, and, you know, all of the things that come with that install npm packages and whatnot. So for example, databases often use JavaScript for map reduce functions or serverless products like Cloudflare workers might want to execute some JavaScript on every incoming request, or say electron style GUI applications, where, where, like VS code where, where you just need to, you need some programmability, but you don't necessarily want the whole Dino executable. So with that, we've, we've provided this Dino core crate, which is a very much trimmed down API of, of the Dino executable. And so I encourage you to look at that Dino core actually depends on an even lower level crate, which is called Rusty v8. This is our wrapper around v8 that is relatively safe. I'm not going to, it's, it's not 1.0 yet. So I'm not going to say that it's, it's a completely safe API, but it's a, it's very close to being a completely safe way to interact with an extremely complex VM. So please have a look if you're interested in that internal design of Dino. I'm just going to speed through this really quick. We have, we designed this quite similarly to, to an operating system. And so inside of Dino, we, we have this idea of ops, which are equivalent to syscalls. That's how you reach out of the, of the VM. And we have something called like file descriptors. These are called resource IDs to not confuse things. And processes are essentially equivalent to, to web workers in Dino. By the way, we use the standard web worker API that you get in the web browser. And the way that we organize all of this is that basically the only way to call in and out of the VM is, is using UN8 arrays, array buffers. And you might think that the, that this sort of serialization is, is quite slow, but we've put a lot of effort into this. And, you know, essentially there's, these are zero copy operations. There's, we're essentially point passing pointers back and forth from, from JavaScript to, to Rust. And yeah, I won't go into any, any more details on that. So as I mentioned earlier, Dino is at 1.0. And the Dino API is stable for the foreseeable future. We are fixing bugs, fixing bugs, and going to be fixing more bugs. We will be releasing minor releases, 1.x releases on a monthly cadence, 13th of every month. And yeah, there's a lot of interesting future work like op crates, which allows basically splits up the, the CLI into, into more useful bits. We are thinking heavily about adding GPU support through, through WebGPU or WebGL APIs to enable machine learning applications. And there's also this feature that people are pretty interested in, which is Dino compile, which would take some JavaScript and compile it to a binary. Not really, it would package up the JavaScript, and it would take a V8, and it would kind of bundle this all up. But at the end of the day, you would get an executable. So that, I think those things would be quite interesting. Please reach out if you want to get involved. So thank you very much.