dll: Okay, all right, so I just saw have we have some context and some pictures, while talked out, I thought it'd be kind of interesting alright so for the past six years, my partner and I we've been living on a sailboat and sailing around the Pacific.
dll: And our boat is not very long, it's 10 meters long,
dll: 33 feet and.
dll: When we started off, we were living in near Vancouver and we decided to
dll: both make ios games and applications, while sailing around the world, and you know, we were very naive that take thinking that maybe technology would would be able to
dll: allow us to do that, so when we started off, we were relying on
dll: our ios devices for everything we we both had macbooks and we were thinking that we keep doing this
dll: no matter where we went you know, like the sort of like digital nomad sort of idea that "oh i'll just you know, like go to foreign country and and keep doing same things the way to the back home" and so
dll: We started off, but the further we went from the shore, the harder it got to keep doing that so, for instance, you know
dll: Following the west coast of the US and Canada and and even Mexico it's it's you're basically hopping between cities, but when you cast off from Mexico and go to the Marquises or French Polynesia, then
dll: Everything, your experience of technology degrades really fast so because, for example,
dll: we're used to infinite bandwidth basically in and fast Internet well if your entire software stack relies on 10 gig updates
dll: Then this doesn't really scale or translates really well in places where you don't have infinite bandwidth and one thing that we found out is that in most places I went to it feels like.
dll: Technology is designed for cities. Like there's very few people thinking about things that could work away from them.
dll: So.
dll: Over time, we we sort of shifted the the we stopped using the apple ecosystem and and adobe and all these these these these things that failed that were that were designed to fail if you didn't have Internet constantly didn't have access to.
dll: authenticating your account or we're just checking your.
dll: Like maybe your your phone wants to call home and you can't now so then it it just locks itself up and then you're like well.
dll: There was a piece of there's a line of code in that that piece of hardware that made it so it would break itself, and so we were thinking okay so let's say.
dll: Maybe let's fast forward five years where we've.
dll: we've experienced enough about how technology works that we could maybe try to address that somehow like we when we came back.
dll: When we sort of closed the loop around the Pacific and back to Vancouver we were thinking.
dll: Alright, so we've seen it fail and there seems to be so few people creating tech that is designed to work off the grid and offline that maybe we can try to to explore that space so that's what we've been doing.
dll: And I can show you some more pictures of you know how we work in the workspace and stuff so, so I hope you can see it, but this is a picture of the boat the boat is called Pino.
dll: And this is us when we were in Japan.
dll: inside it works like this, we have shared a lot like a main room in in which we eat sleep do everything, basically, but sort of like a.
dll: We undo and redo like we have different modes right, but this the same space has multiple purposes and we just sort of like move things around, we have a sliding bed and and.
dll: In that space we can become sort of like a modular studio where we do in our cooking experiments and fixing sales and and so on.
dll: This is my workstation and that's when I was using.
dll: os x.
dll: that keybaord also died since so not only is software really fragile.
dll: at sea, but also hardware hardware is often.
dll: Well corrodes very easily.
dll: Alright, so let's say Oh well, okay so so maybe before I jump on on like not background stories do you have any questions do you have like do you want to enter interject with some things you'd like me to point.
wim: well what i'll do is i'll keep an eye on the chat and if anyone asks something and then i'll just address you.
dll: perfect
dll: Okay.
wim: yeah.
wim: meanwhile you can carry on.
dll: Okay, so.
dll: So for few years we were selling things were failing and.
dll: We were not in a position where we could actually spend time to learn how to address that problem we.
dll: We sort of.
dll: We were in a position where we saw the shortcomings, maybe of the technology that was the modern tech stack.
dll: But we didn't have the bandwidth and we were also sailing around and didn't have the time to just like settle down and figure it out, but when we came back from Japan, by way of.
dll: sort of like.
dll: Northern.
dll: East side of Russia to Alaska and down and.
dll: Well, after that, we had a lot of time to just sit and figure out how we would like to do this, like figure out what sort of technology could help us and other people in our position to do things and.
dll: So I sort of like looked back at the experiments that were made like things that sort of like were relevant and I found a few things that I liked so.
dll: let's say let's say you
dll: electron android and all these things is are not good candidates for doing the type of work, that we want to do, and the type of work, that we want to do is simple little Apps that may be tools games just solving our our little creativity.
dll: drives you know, like you know, maybe like building a piece of software to try to attempt to solve a little artistic problem. Well, this is the scope of what we use software for for most of things, so we were like Okay, so what is out there that we could use that we could
dll: believe they have some sort of longevity in mind like and the best way to look at this is like things that is very old that survived all the way to today sort of survive survived the deprecation of you know, the technology basically so so it's really easy to to play a ES game today.
dll: And then, a super Nintendo game is also easy, but then Nintendo 64 game's a bit harder and then to play emulating Wii games is is quite a bit harder, and so the further.
dll: we approach today the harder it gets as emulators or not created as fast as the technology releases and also.
dll: They are much more much more complex systems, and so we were thinking like okay so let's build some games for the NES today, so to see what it looks like.
dll: So we started, you know from writing swift and Ruby and Python and all these languages and we jumped onto assembly, so we created a whole bunch of projects that would target the Famicom so 65028 assembly and that was pretty neat it was a
dll: pretty easy system to to to map to understand and
dll: it's quite capable, I mean like the NES has 60 fps pretty pretty good resolution if you wanted to display text, a whole bit like a bit of memory for sprites and
dll: You have enough time in your program to do all sorts of things, but we found that the hardware for the NES was pretty limited so like if you have if.
dll: you're the only interaction that you get to have to use your software is an 8-button controller, then you know where you're still missing out on having a way to input text, maybe like drawing.
dll: So we started to look at other other things that could work that way, we were always keeping in mind like.
dll: If it's easy to emulate if it's easy to write it like Okay, so what I mean by easy to emulate I mean like.
dll: How much time would take to for for one person to write an emulator for that platform so okay so let's say we want NES but with a mouse, what does that involve so we would we looked at device emulator for the Commodore 64 and Atari and.
dll: and also the Amiga the early Amiga and then suddenly it ramped up the complexity of the emulator so much that.
dll: Obviously, like one person in a weekend might might not be able to to write an emulator for it, it would take it's made basically like a couple of months project or even like multiple years for a good C64 emulator.
dll: So we start to look at what was made in the past that was designed explicitly for the simplicity of emulation, and that is fascinating field that really like it's a rabbit hole and it brought us in all sorts of interesting places, so the first one that we saw was.
dll: That okay yeah so in the UK, there was this I think what i'm not sure about it might have been the BBC, but it was called the PADI project and it was software conservancy well digital digital data conservancy project and what they did is.
dll: They were like okay so there's multiple ways to survive to keep
dll: Software surviving across long term, I think I have a chart somewhere where I
dll: So the PADI project said that there are basically like four different ways that you can address software conservancy: you can keep migrating things you can emulate a software system, you can create a container like a docker that that sort of like.
dll: replicates the step to running something, sort of wrapper.
dll: and also a universal virtual computer.
dll: So.
dll: We were, we decided to focus on a universal virtual computer.
dll: So that means that.
dll: You imagined that instead of writing an emulator for a C64
dll: We would port the software to a much simpler virtual machine.
dll: That the simplest virtual machine that i've seen any serious done work on was called is called a subleq.
dll: it's a one-instruction virtual machine and the only thing I had does is I think it's it jumps if.
dll: this the second like the second parameter is smaller than the first one, but otherwise it keep going something like that and it's been a while, since i've played with that one but it's an extremely simple system, it takes about 10 minutes to implement
dll: But the issue with that is that you start so far behind that you have to basically have to build many layers of abstraction and also like.
dll: Okay, so if we consider time as sort of a scale of complexity.
dll: If.
dll: If writing an emulator for the NES takes about a week or maybe two weeks subleq emulator takes about 15 minutes.
dll: But then what you you gain in time to implement emulator for the sublec you lose trying to reimplement how to do.
dll: bitwise operations and arithmetic in logic and so you leave your basically, the trado-off is that you're going to spend a lot more time re implementing things that are.
dll: Pretty that everyone's gonna have to reimplement in your system basically so you'd like your Assembly layer is very, very low.
dll: So if we were considering all right, so there has to be something between the subleq which is one instruction and the 6502 which has you know 2050-something operations well.
dll: We figured maybe something would like thirty operations would be a good one, and there were some research that were made in the past where that was like one of the numbers they went with.
dll: For their virtual machine, I think I have one called there's one called the Chifir.
dll: So the Chifir is that computer I think he wasn't built by someone and to BBC or some it was part of some sort of.
dll: governmental project in the UK where they were like okay we're going to port some famous piece of software on a 16-operation virtual machine as an experiment, to see if.
dll: This can be used for long term thinking in software because, even in the 70s and 80s you're starting to they were starting to see that you know, the rate at which new hardware was coming out couldn't keep up.
dll: With like like the people, maintaining the software could hardly keep up with the release of new hardware.
dll: (cough) Sorry.
dll: So that the Chifir is sort of an attempt at it, but I mean it was an attempt. It was drafted as a paper by Alan Kay and someone else and their idea was that okay we're like here the spec for a very simple virtual machine that on paper and also.
dll: sort of.
dll: it should be like they never actually attempted this but they thought that it could, it should be possible, I mean like one point, you might fall prey to this sort of like oh it's Turing complete so done, it's a done deal, like but so this one.
dll: They put their plan was to implement a Smalltalk 72.
dll: i'm not sure if you're familiar with the language but it's a pretty high level language it's extremely complicated to implement.
dll: And, but there's often they're running on virtual machines and they were like Well, this is as simple a virtual machine, as we can make it.
dll: And it, it will get it done and they never got there, but the paper was very interesting to me, and they sort of laid out the foundation of.
dll: What a register machine with 16 opcodes might look like so from that you know.
dll: We had just gonna keep going around the Pacific, we were thinking, like all right, there has to be a way to build stuff to build our own software, because we we love to release like these we write these these music programs we maintain all these different kind of.
dll: web tools and we're thinking like Okay, so what it would look like if we had one language that all our software was ported to that we had so few dependencies that someone in Okay, maybe a week could implement a whole emulator, maybe in a day could implement
dll: the core vm and from from that we had like a sort of like a scale of what it would look like so something a bit more complex than this one that, the Chifir, which has 16 operators, but possibly.
dll: The same amount of scale and also same amount of knowhow would we would be required to implement this one.
dll: So we created a virtual machine basically we were think we decided that, instead of.
dll: Trying to constantly migrate our programs from one failed framework to another failed framework and even in C so like a lot of people will be well why don't you just write it in C well if we if we only wrote.
dll: terminal software find C will be possibly maybe a good target, but a C compiler is a very high bar to target and.
dll: You would never you wouldn't see this if you if you only work on on Windows and Linux and but then, if you have it Okay, so my secondary computer is running Plan9 and the Plan9 C compiler works very differently than GCC, for instance, and.
dll: And that C code is not.
dll: Cross platform, I guess, so if.
dll: If the solution to my problem is to write a C compiler for every new platform, I want to support, then.
dll: This is terrible, this is not a good way for me to to get anything done at any reasonable pace, so we start to consider.
dll: Okay, so let's say in a day someone can implemented a 32-opcode virtual machine that could run our software
dll: What would that look like that specification of implementation has to be so simple that it fits on a T-shirt basically so let's say.
dll: Like the amount of space, the maximum amount of space needed to reimplement that machine would be like you know, two pages of paper like eight like.
dll: Standard paper size so normally we decide to limit the amount of time it would take me to reimplement this new system, we also decided like Okay, the spec has to be fairly simple and reducible to like axioms that would fit on two pages of paper.
dll: With this philosophy, it means that well if we if we die at sea and someone wants to keep our software running well it's a maximum amount amount of investment of maybe like.
dll: An afternoon to do the core vm implementation and a week at most to the whole graphical audio system and, and I think that was that would be like the best way to encourage.
dll: Software to exist over a long period of time, and this sort of trickle down into hardware, so what we found is that well, if I can write in an afternoon a emulator for my.
dll: 2009 Thinkpad Well, I can spend an afternoon to write an implementation for the DS or for the Commodore 64 maybe or the Atari and maybe like so we start to look back.
dll: At which hardware, that is supposedly.
dll: Electronic Waste and that we could repurpose by creating creating software today that could run on that on these older hardware so.
dll: Not only we, I mean we played with the idea ourselves, but what happened is that really like the fact that the virtual machine so simple can inspire the Community to go play.
dll: and write their own implementations of it, so we start to see all sorts of esoteric systems being suddenly able to run uxn roms.
dll: like to give you an idea of of them.
dll: So uxn roms are really small but small enough that they, like basically like all software can run them can I can exist inside of qr codes like 8 bit systems and 16 bit systems also I guess.
dll: Their word length is really small.
dll: So that allowed us to you know encode a lot of data, even sprites in very little data amount of like very small roms.
dll: And after experimenting for a bit we found out that 64 kilobytes of memory for that virtual machine is plenty.
dll: Like it's been a year now, that people have been writing all sorts of complicated software, for it and i've never seen someone bust, you know 32 kilobytes of needed.
dll: ram space also like one thing that really allowed us to cut on program space is using the forth way of doing programs so.
dll: The way forth works is that it is postfix language so instead of having to juggle items on a stack and figure out which variable are linked to which symbol well.
dll: Forth has just a simple stack where the opcode operate on the latest items on the stack all the time, so let's say you do push 3 push 4, and then the add opcode will just pop the last two items on the stack This makes for.
dll: Such a simple.
dll: assembler but also a virtual machine. This alone, I think, really like if I.
dll: I implemented a 6502 emulator last year and.
dll: it's a lot of work and often I was like, as I was implementing it, I was like well.
dll: it's surprising how a virtual machine can make can make things so much more complicated.
dll: Just using a simple stack machine from the get go, we were allowed we only needed.
dll: Six primitives so pop nip swap rotate duplicate and over. This is all the stack manipulation primitives that we need to do almost anything that we want so that gave us plenty of code space to do all sorts of fun things
dll: Yes, so this is sort of like the.
dll: This is a definition of the of the virtual machine, it has 32 opcodes, it has three modes, but I mean.
dll: i'm just showing this you that i'm showing you this project as an example of how we decide to apply.
dll: Well, how we decide to solve the problems that we found with software so it's been a year now and that we sort of like specced out this little thing and.
dll: To give you an idea we've had time to migrate every single program that we made so we have you know, like a lot of coding environments all sorts of really complicated things but.
dll: it felt really good to pour them into something like the Chifir, sort of like virtual machine designed to live a long time, due to its simplicity to implement.
dll: The software, I mean this this wiki because this is my This is just my personal website, but the generation of that system is written in, it runs on uxn.
dll: That this is the text editor I use to.
dll: It did the website is also running on uxn. I can actually show you, I think.
dll: So that's the text editor I use.
dll: And it's similar to acme.
wim: We don't see a text editor.
dll: Ah, OK, I let me see.
wim: I was still seeing the website.
dll: Do you see this.
Yes.
dll: Is it still visible.
wim: yeah it's fine now.
dll: Okay, so, for example, this is the text editor I use and it's written entirely in that for that virtual machine in that Assembly language, the actually the Assembly language looks like.
dll: looks like this, this is the.
dll: lowest level.
dll: language that you can use to write in that system that's the Hello world it's if you if you are not familiar with forth it's not going to mean anything to you, but.
dll: The idea is that this the Hello, world this thing which doesn't have any you know primitives to print text or anything like that still assembles to just 31 bites.
dll: But over time we we ported all the tools were made on also all the Games, so we have.
dll: So this is.
dll: This, this is a Sprite editor that we needed to make some projects.
dll: We have a drawing software that's a bit like a very complicated version of paint.
dll: font creation tools.
dll: text editor recently recently we gave a talk for the FSF and the whole talk was running in a slideshow program that we wrote on for the virtual machine.
dll: And recently i've been working on.
dll: Okay, so one of my.
dll: interest is.
dll: Like a side of stuff software conservancy and that sort of like.
dll: collapse scenario of computing is I was wondering.
dll: how, okay so let's say I don't have a C compiler and I still want to have my games running well, I have a sort of a bootstrap problem where well, right now the lowest level, the simplest implementation of the virtual machine is in C.
dll: And the first assembler we wrote is also in C so we had to self-host the system, that means that if I write the system itself and keep a version of that binary, then I don't need a C toolchain behind.
dll: So that was, that's that's very interesting problem, so you implement an assembler in that same assembly language and then that gives you a binary that
dll: allows you to sort of bootstrap the system.
dll: and
dll: well I implemented that and then my thinking was that well fine okay say, let's say you have a piece of paper 8 by 11.
dll: That has, you know, the 80 lines of hex, of raw hex code that is your.
dll: your assembler but then my thinking is that okay so let's say.
dll: This let's say that this piece of paper is all you need to bootstrap the system back to you something that's usable.
dll: How, like what's the simplest
dll: way that you can sort of like preserve this piece of paper, so I went to dig into like
dll: What it would look like as a punch card, what it would look like as a qr code, what what what sort of self hosted system inside uxn could read
dll: These characters or that piece of paper as an image and then parse it back into its version of it, into a version of of its own assembler and so on.
dll: So I was, I was sort of thinking of like what is like a sort of like it a ditch bag version of that software would look like or I like a survival kit of that software would look like, so if my computers and all my repositories and all the documentation online dies, but then
dll: Maybe a piece of like the binary somehow survives.
dll: or like a piece of paper that has the binary on it survives.
dll: Could someone use it and then use it to unlock the sort of the software that's hidden inside these raw hex codes.
dll: i've been fascinated with the idea that you know.
dll: Okay, so in most things in life computers actually make people's life harder and.
dll: What.
dll: What can we take it in computing that we could apply.
dll: in everyday life and still find a use for, or at least like.
dll: If you don't have to have a computer could some computing ideas still work on paper and what would computing on paper look like and there were a lot of experiments that were done in the past about paper computing and diving into that makes me.
dll: really interested in.
dll: Maybe a paper version of that system i've been working on is possible, I mean Obviously it would evaluate very slowly.
dll: But then what simple aids could someone have that would allow them to accelerate that that that parsing. Just the fact that the system uses a stack machine makes interpreting on paper really fast.
dll: So if we stop thinking about this in terms of software and hardware, but more in terms of like Oh, this is a cipher that can be used to.
dll: run things on paper and it's a sort of another domain that we found was really interesting for preserving things for a long time, I mean we we have pieces of paper that are 3000 years old, but then.
dll: Okay, I have a PS2 disk that I have no way on earth to reveal its secrets and i'm thinking like this is a very.
dll: This is a good demonstration of how technology, sometimes obfuscates itself so hard that it just creates garbage, electronic garbage.
dll: But we're surrounded by electronic, like yesterday we went through the boat and we unearthed all sorts of electronics that we have no idea how to repair.
dll: that were designed to be to fail 10 years ago, so I mean.
dll: Not only they're hard to get rid of, because now like in the city where we are now they're hard to dispose of because all the recyclers are
dll: Not taking the batteries are not taking this and that but also like Okay, you have an iPhone 4S, which is a beautiful beautiful device it's really polished metal beautiful high resolution screen.
dll: it's so locked that even if I want to give it a second life by.
dll: making like, spending time to figure out how it works to write an os maybe to give it a second life I couldn't because there's a piece of code and there's a there's a chip inside that stops me from doing so. The more like we hinder ourselves with these
dll: These these blockers from being able to repair and then we're just constantly creating new waste and all of this, we have no way to decide, like to make it work again the source code will never be released the specs will never be available.
dll: The experiments that we were trying to do with uxn was like to.
dll: Go directly the other way, the documentation would be so simple it could fit on T-shirt. The spec could be printed on a single piece of paper and implemented in the afternoon by someone who, just as basic understanding of computers.
wim: Devine, there was a question in the chat about the basically the audio and video libraries, that you need to run the vm, doing I/O with it and showing graphics and so on.
wim: So, because they are not part of the vm itself right.
dll: yeah well
wim: So who is maintaining those.
dll: Okay, well, so let me show you the implementation of the audio device.
dll: So this is this is our audio device.
dll: I hope you can see it.
yeah.
dll: it's 129 lines.
dll: yeah it works, a little bit like the pokemon.
dll: The audio device on the GBA, so it works, I think it's called soundsprites, when you sort of like take your length in memory in an address, and you sort of use that as a as a pitch - not pitch, but frequency for.
dll: Like UVs so sorry my English for this is pretty terrible but that so let's say yeah like soundsprites basically.
dll: or like you know when you draw on a frame buffer well the frame buffer doesn't have, like the our screen implementation, for instance.
dll: Well, I mean if you look at the header for audio has no knowledge of what the operating system has and and the screen implementation is the same, we have standard lib, I think we use standard for memset somewhere, but the screen the audio device we're basically serving.
dll: A buffer that the host will interpret I mean, so that the raw X11 implementation uses the pulse API if if that's what I have available for the SDL, for the plan nine I use
dll: audiofs and.
dll: We just hook that device into whatever the system has. Usually it's pretty standard and there's not much like we the emulators themselves don't have really much in the way of handling system audio it just serves a bunch of data that the system can
dll: choose to use or not. Some implementation, like the playdate implementation of the uxn have like it hooks on to this weird sound chip, so it has its own handling of it, the GBA implementation of the audio device is it uses arm, it's like has a bit of arm9 code in it.
dll: And it's very like system specific so we don't have all that stuff.
So.
wim: You have this C layer that is system independent and then that interfaces with system specific.
wim: code.
dll: or yeah yeah the javascript implementation uses html5 layer.
dll: Like for the controls like for them the user input that kind of stuff I can show you that the X11 implementation.
dll: So this is the device which doesn't have any knowledge of what to expect and how to serve it is just sort of the translation layer
dll: And the X11 implementation of the whole emulator that uses like so each emulator has you know, maybe prefabs let's say your mediator is on the on the DS well obviously you won't have a keyboard so you don't have to have that control like that that's a specific device.
dll: But.
dll: The implementation alone, of the X11 system for uxn is 262 lines, and it does handle everything, so the the text editor i've shown you runs on this.
dll: and
dll: What do I have here alright so so, for instance, that that's not less than a different different program that I can use it as.
wim: yeah it's nice it's the drawing thing.
yeah.
wim: yeah.
dll: yeah it's a sort of like a logo.
dll: yeah environment so a friend of mine was thinking all right so let's say we let's say, we would like it a design or maybe like a logo to represent.
dll: Sustainable computing or.
dll: Like you, promote computing and well my thinking was that the logo definition has to be extremely simple imagine that, instead of having.
dll: A simple shape maybe like maybe I guess a smiley face, for instance, a smiley face can be reduced to a specific set of rules and what does the these rules, look like and.
dll: If we started from these principles and then design a logo from that what it would look like sort of thing and and I created this little.
dll: flower.
dll: So logo is a really good way to reduce complex shapes and drawings into simple things that can loop, repeat, mirror, flip x, flip ything, and so I designed the program as sort of like a little repl or environment that would let me use this as a playground.
and
dll: I think I well I think that's sort of like beyond beside the point but yes.
wim: well but it's a nice illustration of the kind of things
wim: you do with the machine.
dll: yeah well, I mean if you want, I can sort of show other fun things.
dll: So.
dll: This is, this is the first virtual machine i've ever written but at that point, I didn't know what virtual machines were.
dll: But um I was doing live coding music, so I would like coding is you go in front of an audience and you start writing codes that would hopefully generate something that people can listen to and.
dll: This is the environment that I built back then and it's a super simple sort of little system that lets you.
dll: Create rhythms and patterns and things in real time in front of an audience.
dll: So this virtual machine is actually, this is the extended version which i've rewritten for the virtual machine so.
dll: That felt really good, because a lot of our system, a lot of the software we wrote sort of died, with their flip framework so everything we wrote for ios or like.
dll: gradually deteriorated, to the point, it was it became unusable, and we had to take everything off the App store because we didn't want to maintain it anymore well.
dll: Every time that I ported that piece of software to a 32-opcode virtual machine, I felt like I saved it, I rescued it from the wave of destruction of software and hardware. Every time that I
dll: I ported one of the jobs, like a javascript piece of thing I wrote that was written before the Web audio.
dll: API changed and broke everything well taking that and putting it to the uxn system like I know know I have a version that's frozen.
dll: That will live, you know, like for very long time, because as long as there's this two-page definition one afternoon sort of time to implement the virtual machine somebody will be able to maintain somebody will be able to port it.
dll: Flash, for example, was a pretty complex virtual machine, but still a virtual machine and an accident accident target for creating.
dll: audio visual experiences in games.
dll: But the spec came out only too late, was changing all the time and was actually pretty complex to implement. Like it's, not a single person project to do an afternoon it's more like a multi year endeavor but the idea is that.
dll: games like Another World and other world was this like DOS era type game which written for a vm that's pretty simple the vm is design explicitly for drawing vectors.
dll: And anyone today can just port the vm, instantly their reward is that they can play Another World on any new system that they choose. This is such a beautiful way of.
dll: preserving software and making sure that we don't constantly have to sort of like step on the treadmill of generating new hardware, because we have this translation layer now.
dll: That allows you to run anything on on almost anything as long as the implementation is so small that it's you know, like a few hours project.
dll: And that was that was our our bet basically. So we've been doing that for a year now, at this time we ported everything.
dll: For a while we were like well I hope this isn't a waste of time, but every day now i'm reminded that this was actually a really clever choice that we just stumbled onto by somewhat accident.
dll: And we're going to keep building software for that specific layer because it's crazy, the amount of things you can do with just 64 kilobytes I mean nowadays 64 kilobytes it's like
dll: nothing you buy a ps4 thing and it's 64 gigs updates and so on, but but 64 kilobytes is plenty to do most things.
dll: And it's enough for us to do, up to create a play on a playground indoor things and.
wim: yeah and there is quite a community around it already know.
dll: Well yeah I mean if the if the bar is so low that anyone with.
dll: I mean.
dll: The specs is basically like.
dll: add, sub, mul, div, you have some logic things, some bitwise things and I think most people who understand basic arithmetics and have some familiarity with.
dll: stacking plates, on top of each other, then it's like that's all you need to get in get into so what happens is that we get a whole bunch of students new programmers people interested in computing we.
dll: feel welcomed in this ecosystem, where you don't have to sift through like pages and pages of documentation basically you don't like there are some people are like well where's the document like where's the where's the PDF and what we're like we don't have a PDF like.
dll: These nine lines are it. It's like there's nothing else like and they're like no but where's the rest what what rest like that the the device specification is extremely small.
dll: So.
dll: So, like let's say you need, you're building a system for the html5 version or for your the lua Love2D thing well.
dll: This is all you need for implementing the screen and in the end, you get this is a result, and if you need like audio, then you have a Midi like at most it's like 500 lines.
dll: So it and there's nothing, there's nothing more, there's not like a way to dive into it much deeper, that's that's the end of it.
wim: Right, so is that you?
wim: Just, are you finished?
dll: Well yeah i'm not sure how much time I have, but I see it's mine now and.
wim: I was.
wim: Like five minutes late it's five yeah no I mean people have to leave they will leave that's all. As far as i'm concerned you can continue a little while.
wim: it is quite fascinating.
wim: So I don't know what else you had in mind to show, so, go ahead.
dll: Oh well, I could keep going, but do you have do you have anything you'd like me to touch something that like you need to ask me about and you haven't.
wim: No, but I can ask whether anyone else has questions right now.
wim: I mean the question that I had, and you partially answered it, is
wim: In way you, you say that it's all very simple, but I think if we gave this as a project to our
wim: Honours students, they might struggle, because they lack the knowledge about forth and stack machines and so on, so it means you would still need to explain to people how these things work, isn't it.
dll: yeah well.
dll: I think that school not teaching.
dll: postfix is a big mistake.
dll: But that's a discussion for another time, maybe.
dll: But Okay, so how much time, do you think you would take to teach someone like the first in last out concept.
wim: Not long.
dll: yeah actually let's do it right now.
dll: Let's see.
dll: Okay So what is a stack machine?
dll: So a stack machine is
dll: a series of items on top of each other, imagine a bunch of plates, basically, and then you can put a plate on top on or you can
dll: take out a plate, but each time that you
dll: take or put a plate it always goes at the end so
dll: I add a 10 and then I had 20 and if I take out an item then I take out the 20.
dll: oops.
dll: Alright, so let's start over.
dll: So I have 2 items, I add 10 and 20, my stack is now 10 and 20. if I remove one item, then my stack is 10.
dll: The primitives that I showed earlier.
dll: Where was that.
dll: So all there is to a stack machine is these items, but the problem is that what most people struggle with is that when you're familiar with normal arithmetic where you say, well, two plus five equals seven, well
dll: I have an idea for this to demonstrate this.
dll: So let's say you do .
dll: Two five in a stack machine, the function, or the operation or the symbol, always goes at the end. So when you're used to
dll: Two plus five.
dll: In a stack machine you'll be two five plus.
dll: There are no parentheses and stuck in post fix arithmetic so maybe if you're used to two plus five times three
dll: The equivalent in a stack machine will be.
dll: To five plus three times.
dll: They are no parentheses in post fix it simplifies things a lot it's super predictable, because every arithmetic operator only takes the last two items and then does the operation it's.
dll: it's what people should learn at school. I'm surprised that this is not the norm, the sort of like inflicts rules is crazy.
wim: it's like the HP calculator, right.
dll: Exactly.
dll: Well, this is my implementation of the HP calculator.
dll: So two five plus seven times three.
dll: Ah well, 21 in total
dll: So, so, for example, like like this is the repl that shows me the state of the uxn virtual machine. it's implemented in uxn itself but it's the sort of a playground to mess around with.
dll: This is a calculator that I use all the time for doing all sorts of binary things, so the way binary works is that.
dll: let's say in an 8-bit system is a series of bits right.
dll: binary arithmetic is extremely simple because it uses
dll: These very rigid rules to do math so let's say
dll: I do
dll: 30
dll: Plus 3, 33. But 33 is actually these
dll: bytes that are now combined.
dll: binary lets you use bitwise operations which is like a way of masking and showing and toggling bits in a very simple way which creates a pretty
dll: simple to implement system. it's kind of tricky at first when you start diving into this assembly stuff.
dll: But I just wanted to point out that, you know, stack machines are actually pretty simple. I can I can demonstrate all the primitives and you can say that you will have seen all there is to know about stack machines.
wim: I think you should be able to teach that pretty quick.
dll: yeah so Okay, so the first the first primitive in the stack machine is pop. so pop basically removes one thing.
dll: nip is.
dll: If we have two items 12 and 34 and we do nip, it POPs the second most item, so we end up with 34.
dll: let's say we have 1234 on the stack, two bytes, the first byte is 12 that will want to the second byte is is 34, if we do swap it just swaps them.
dll: Basically, nip where it removes that the second most item, then nip is actually the same thing, if I wanted to do that, to remove the 12 I could do nip or I could do swap.
dll: So, most of the primitives are reducible to other programs.
dll: So rot is another one, it takes the.
dll: third item which puts it on top so 345612.
dll: and
dll: duplicate.
dll: Just duplicates the last item on top.
dll: And over
dll: takes the second item and puts it on top as a copy and that's it. That's all there is to the stack machine
dll: primitives so i'm thinking that.
dll: Right okay teaching the infix rules, you know, like how like multiply is supposed to operate first yeah I think multiplying division operates first before.
dll: Division little bit before addition and subtraction but bitwise operate before multiplication and division, I mean this I find is more complicated, and if you just went like well.
dll: It was whatever is.
wim: The rules of precedence.
dll: Exactly the rules of precedence, are more complicated than, you know, like.
dll: Well, if you have this and that on top, no matter which order you do this, the result will always be the same.
dll: I find this a much more elegant and simpler system in terms of complexity basically.
huh.
wim: yeah I think we're purely stuck with the infix notation for historical reasons.
dll: yeah but fixing that is going to be a pretty uphill battle.
wim: Right. So yeah, I,
wim: I was thinking about this this encoding that you, basically, you have the virtual machine and the assembler as a one page paper thing right.
wim: So essentially what you've made this a mechanism so that.
wim: People can implement algorithms, because that's really what it, is it's a machine to let you encode algorithms, right?
dll: Exactly yes that's what I was trying to say with the cipher thing is that it's a it doesn't have to exist on a computer like people can take computers away from you.
dll: But if you just know math like.
dll: Nobody can take math away from you don't need that thing is not an object it's not a physical thing, so my thinking is that, yes, it's a way of specific very specific way, very few primitives that allows you to encode math and.
dll: I think it's just a nice way to preserve logic, basically, but I mean even an even better way.
dll: but not necessarily a better way, but another way would be binary lambda calculus, that's something I would love to dive into at some point and.
wim: What do you call binary lambda calculus?
dll: um.
dll: Let me see.
dll: So.
dll: iota and jot is pretty interesting system, you know before I showed you a subleq, subleq is a one-instruction computer, you subtract,if it's less, then you jump, well binary lambda calculus is a replacement.
dll: rule based thing. it's like Lambda calculus. I can show you oh yeah I know exactly what.
wim: The reason why i'm asking is.
wim: In Lambda calculus.
wim: The very fundamental Lambda calculus, you have to start by defining your numbers yourself.
wim: as Church numerals.
dll: Exactly. Yeah so if the rule also defined the system that it's representing, then you have much more chance of things surviving. like
dll: let's say the Arecibo message, the message they sent to space to look for aliens or something, that message itself was self-decoding.
dll: In a way, that's very similar to the Lambda calculus. so in Lambda calculus you became begin by saying, like all right, this is false, the false is the only axiom that we have.
dll: Then you said well Okay, so not like the false of false is true, so now we have two axioms but then Okay, so if we define true as one, then we can build on that and build that whole computing stack.
dll: So the self definition is really, really important like a truly long lasting system would have this.
dll: baked in basically.
dll: I haven't found a way myself to actually use that in any meaningful way because the problem is that the moment you start
dll: diving into that sort of sphere
dll: I think it takes away some of the accessibility for new programmers. I haven't found a way or i've never seen a simple system that uses binary Lambda calculus to do
dll: practical things that students, new programmers could actually use. It's a lot of experimental, theoretical projects that don't really translate to well in reality and also equates for extremely slow compute systems.
dll: So.
wim: calculating Lambda calculus requires lots and lots of operations to do very simple things.
dll: exactly like the the subleq system that takes 15 minutes to implement basically is running extremely poorly as an emulator because
dll: it makes use of no optimization of your cpu, so to cpu has already some maybe some arithmetic parts and number manipulation parts and but you're making use of none of it, everything is completely emulated from the ground up.
wim: You could, of course, build a hardware machine that does this.
wim: There is a question from the audience.
wim: You can see the chat probably, you can yeah?
dll: yeah i can.
wim: it's basically about how
wim: you could spread your ideas.
dll: it's a really good question I, and I see it, quite often.
dll: So the question -- no it's all good, I just want to make sure that I had a good understanding of what you were asking -- and it's a really good question it's like basically like does that scale like or what does that look like at scale like and nothing looks good as scale.
Like it's not like.
dll: it's like Oh, but how do you make, you know, Facebook personal? like no it's it's at odds with each other. uxn couldnever scale. it's designed to address our specific.
dll: needs with computers, but I don't think it's a good general purpose computer and I think that's the point right general purpose computers might be a pretty bad idea operating systems might also be a bad idea, like.
dll: Somebody at some point in the future, might realize that, you know what, actually multitasking is really bad for the brain or something you know, like a fundamental thing we took for granted, might be.
dll: at odds with
dll: With our wellbeing and
dll: I think so, so the way we approach this is that I don't really i'm not trying to sell anyone into using this project because.
dll: I think it would work against us, if I did, that my reasoning is that I rather.
dll: inspire people to build their own virtual machine.
dll: That address their needs.
dll: Then, to create a sort of an effect, create a monoculture of people using one virtual machine, then it fails, it's sort of like self defeating and Oh, like, I think it was maybe marlowe's or was it, you said, like.
dll: The there's no best permacomputing language, because permacomputing fundamentally relies on a multiplicity of solutions. If you put all your eggs in the same basket, then you just inject a lot of fragility in the system.
dll: But what I imagine, is that we can inspire you know, like a lot of people to make a lot of little virtual machines that are domain specific.
dll: and maintaining that is a lot less work than crying trying to create these really complex general purpose things and I think.
dll: Like when I saw Another World, which is a game, and for it to the creator created one virtual machine that does that was explicitly to serve that one game; Quake, the first Quake is some is.
dll: Working in a similar way: it it relies on that medium-complexity virtual machine but porting that virtual machine is within the range of possible for one person.
dll: Keeping it human scale like like a something that can be done accomplished by one person is a really good way to create sustenance like it's a good way towards sustainable computing it's not like the end of all but.
dll: I think just.
dll: not stopping to scale thing like stop trying to scale things is probably the best way to implement premise computing at scale like.
dll: If there is not one way to do things, I think, then we can start thinking about multiple.
dll: Multiple ways of tackling that problem, and one of those might be the solution, but if we only tried, you know one or two solution and then figure out Oh, this is it, this is the end of the of that problem, then I think we just
dll: We won't accomplish sustainable computing.
dll: At scale yeah.
dll: I think it's like so a lot of people like Smalltalk, they tink about LISP machines, that's like oh it's they're really cool because their inspectability is very powerful so
dll: They think that you need a very complex object system to be able to have self-inspection and i'm sort of the mind that, no, like if you have a really simple
dll: Eight bit system, that means that, like you can tell what everything does like like this is the most powerful level of introspection when you can go here and be like all right so.
dll: All right, so this is a literal like the lit opcode and i'm pushing on stack like a 2F value like this is more self introspectable, because this is meaningful code it's not like.
dll: it's not compacted in a way that's that's unintelligible it's all you it's human written.
dll: binary code right, the hex codes and i'm thinking like this is really, this is a really open source system where you can
dll: Go and poke peek at everything you. imagine that Linux would let you peek at
dll: everything. like in Plan9, you can fake mouse events by poking at the mouse file, which I think is really beautiful, if you want to take a screenshot in Plan line you're basically reading the pixels in the frame buffer.
dll: and
wim: can't I do that in Linux by writing to the the the /proc pseudo file system for the mouse?
wim: I think I can
dll: hey I tried it, but it doesn't work on my machine so i'm thinking, like Manjaro has a layer of translation, that is abstract
wim: the reason why it works in your system is because the scope is limited right. If this would be 64-bit words, then you couldn't recall them so easily and
dll: Oh yeah like the moment that you get into.
wim: 32 bits and 64 right yeah that.
wim: It works, because of its limited scope it's in that sense it's it's human size, because we can keep that kind of complexity
wim: on our mental stock.
dll: yeah like let's say that the interpreter.
dll: Oh, where was it.
dll: So.
dll: So the program for this is here.
dll: And you can tell literal 12 literal 34 add.
dll: yeah this I find this very powerful. if it was like two lines long, so like in most forth systems,
dll: it's 16 bit words and I was trying to do the same thing and it quickly gets out of hand, like you're like all right so i'm gonna have you know, a somewhat complex operation, and you can't tell what's what like it's already too complicated, but.
dll: When it's almost a one for one.
dll: I mean this could be reduced to this, which is even shorter, so this is adding a short on stack and so it's these four Bytes, I can understand them. the Hello world program is understandable.
wim: yeah.
dll: So the word Hello starts here it starts.
wim: So do you use ASCII encoding for this or is it your own encoding.
dll: Well, since this is outputting to STD out it's ASCII.
wim: it has to be.
dll: yeah, but I could write a Hello world for a non traditional machine and use different bites thanks, but I mean, as long as.
dll: My host system.
wim: yeah because you could encode characters in fewer bits, you only need five bits really.
dll: yeah well colorForth has this really strange mapping for characters and, recently, I made a translation routine, so I could write colorForth words and it's like.
dll: yeah it's like five bits, I think.
dll: But you don't really save space, because if your your primitive is a.
dll: Is a byte unless you have some sort of like ternary computer or.
No.
wim: i'm used to FPGAs wh ere basically it's bit level so.
yeah well.
wim: I don't need bytes, I need the bits that I need.
and not more .
wim: So.
wim: Because that's I mean we did this once, encoding text in as few bits as possible just
wim: because if you do text processing then on the FPGA you have higher throughput.
wim: Otherwise, if you're only needing five bits and you use eight then you waste a lot of bandwidth actually.
dll: uxn doesn't matter really well to logic gates it's sort of by design because.
dll: I don't want to make a system that's so hard to implement that people have to know, you know so much hardware, that's one of the reason why, like we had a long debate whether we should have multiply.
dll: So, so in most.
dll: 8-bit systems, you want you don't have multiply. you have to do your own implementation of multiplication tables and that's where stuff and.
dll: But you send is designed to be emulated and it also is also designed to be accessible, so if everyone comes into a system was not familiar with bitwise.
dll: has to learn how to implement their own multiply the multiplication table, then it automatically warrants people to build
dll: an abstraction layer on top of the Assembly language and less I didn't want I didn't want.
dll: Like if you're like oh yeah come on come on to extend and make some some it's like a playground for things and they're like well how do I multiply two by four well two by five and I'll be like all right stay with me here.
dll: we're going to be on a ride to like implement lookup tables and it's like well screw this i'm gonna go do something else that's more fun.
sh: Did you very much want to avoid requiring any abstraction on top of the Assembly, then you wouldn't want it to be necessary to make a higher level language that compiles down to this it.
dll: yeah exactly like.
dll: Even I want people to.
dll: I want people to fall in love with assembly not.
dll: yeah for them to rely on oh somebody's gonna implement a C-like language, some people going to be implementing a LISP or something you know, like just forget about all these distractions.
Just.
dll: draw some pictures in assembly, it's more fun.
wim: I think if there's one thing, you show that this way you can write
wim: very interesting software very quickly, essentially in a very low level language so.
dll: Oh yeah like.
wim: makes it interesting because.
wim: The reason why people have invented higher level one business was that they thought that was no longer practical.
dll: I think like.
dll: If you can demonstrate that it that you can make playful things that don't necessarily.
dll: You know, turn into profit or turning to currency or commodification of of anything, then people will come in and play like.
dll: And there's so little play right now happening in computing. Like there's a lot of.
dll: things that are developed, not to be played with but, just like like you're you're a user like you're you're not supposed to see how it breaks you're not supposed to explore how.
dll: You know you're supposed to like edit things like you the latest version of os x is like impossible to customize because if you make something yours, then you start to.
dll: Like you start to care if you can modify it, but then you will always remain a tenant like, you're renting or macbook because it's not designed to be fiddled with.
dll: it's like, very patronising electronics.
dll: This is my definition of the vm, start from the spec.
dll: and try to get Hello world to print something.
wim: So how'd you.
wim: how'd you read it.
wim: a, b, c means what?
dll: Try to figure it out.
wim: All right.
wim: I should be able to figure it out.
dll: I think you will.
wim: yeah because it has, yeah, I think all right yeah it's up to the.
wim: Program Counter.
dll: Well yeah program counter if you can't figure it out, then I failed right so.
dll: So hit me up with your questions and maybe we can make this better.
wim: Okay cool yeah, will do.
dll: But this isn't, this is a napkin definition of uxn.
wim: yeah it's probably you're right, that's the way, that's where to start from rather than from the C code.
dll: All right.
dll: Well, thank you very good.
wim: That was brilliant.