We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Network freedom, live at the REPL!

00:00

Formal Metadata

Title
Network freedom, live at the REPL!
Title of Series
Number of Parts
611
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Production Year2017

Content Metadata

Subject Area
Genre
Abstract
Explore Guile's role in advancing network freedom! This talk covers recentadvancements in asynchronous tooling in Guile, as well as live demonstrationsof Guile used to power federation via the ActivityPub and ActivityStreamsstandards through Pubstrate. Much has happened over the last year in terms of advancing network freedomboth within and external to Guile. We'll see a live demonstration ofPubstrate, a federated social networking toolkit as well as referenceimplementation for [ActivityPub] and [ActivityStreams], written in andfor GNU Guile. Asynchronous programming has also gotten much more interesting in the lastyear for Guile hackers, with improvements in Guile core and new libraries suchas 8sync, A-Sync, and Fibers. An overview of these systems will be given, aswell as suggestions on how you can get hacking towards liberating networkusers today!
17
Thumbnail
24:59
109
Thumbnail
48:51
117
Thumbnail
18:37
128
146
Thumbnail
22:32
162
Thumbnail
23:18
163
Thumbnail
25:09
164
Thumbnail
25:09
166
Thumbnail
24:48
171
177
181
Thumbnail
26:28
184
Thumbnail
30:09
191
Thumbnail
25:08
232
Thumbnail
39:45
287
292
Thumbnail
25:14
302
Thumbnail
26:55
304
Thumbnail
46:54
305
314
317
321
Thumbnail
18:50
330
Thumbnail
21:06
333
Thumbnail
22:18
336
Thumbnail
24:31
339
Thumbnail
49:21
340
Thumbnail
28:02
348
Thumbnail
41:47
354
Thumbnail
26:01
362
Thumbnail
18:56
371
Thumbnail
13:12
384
385
Thumbnail
25:08
386
Thumbnail
30:08
394
Thumbnail
15:09
395
411
Thumbnail
15:10
420
459
473
Thumbnail
13:48
483
501
Thumbnail
32:59
502
Thumbnail
14:48
511
518
575
Thumbnail
25:39
590
Thumbnail
25:00
592
Thumbnail
23:32
Computer networkVapor barrierBroadcast programmingLecture/ConferenceSource code
SynchronizationParallel computingProjective planeEndliche ModelltheorieAsynchronous communicationTerm (mathematics)CodeSynchronizationGoodness of fitRobotHome pageMultiplication signLaptopGame theorySource code
QuicksortObject (grammar)Ordinary differential equationRing (mathematics)Form (programming)Game theoryWeb browserSinc functionForm (programming)NumberWeb 2.0Ring (mathematics)Data conversionGoodness of fitServer (computing)Sign (mathematics)InformationAdventure gameNetwork socketCuboidBell and HowellElectronic mailing listMUDDirected graphLecture/Conference
Sign (mathematics)QuicksortObject (grammar)Form (programming)Keyboard shortcutOnline chatLaceNichtlineares GleichungssystemFinitary relationLogicPlane (geometry)RootComputerHacker (term)SpacetimeChord (peer-to-peer)MiniDiscComputer fontSoftwareFreewareCarry (arithmetic)Virtual machineFuzzy logicChi-squared distributionGamma functionEmailDemonQuiltOrdinary differential equationConvex hullMaß <Mathematik>Menu (computing)Error messageMetreStructural loadPressure volume diagramInterior (topology)SpiralDirection (geometry)Data structureWorkstation <Musikinstrument>NeuroinformatikRight angleInsertion lossMiniDiscError messageMultiplication signCASE <Informatik>Computer programmingGame theoryLevel (video gaming)Object (grammar)Functional (mathematics)Revision controlVirtual machineDemonElectronic mailing listMetreParallel computingExpressionFigurate numberNetwork socketFreewareAreaLatent heatLine (geometry)Structural loadConnected spacePrice indexDirected graphMUDCodeHacker (term)Message passingNumberString (computer science)Function (mathematics)Matching (graph theory)Exception handlingWater vaporType theorySession Initiation ProtocolMobile appPerturbation theoryProcess (computing)QuicksortHidden Markov modelShared memoryAirfoilSynchronizationHard disk driveMainframe computerSystem callObject-oriented programmingVideo gameClassical physicsDescriptive statisticsSymbol tableKeyboard shortcutSoftwareGroup actionDisk read-and-write headAnalytic continuation2 (number)Reading (process)Fuzzy logicMassDirection (geometry)Inheritance (object-oriented programming)Integrated development environmentSource codeXML
Object (grammar)Sign (mathematics)QuicksortString (computer science)Ring (mathematics)ChainNormed vector spaceOnline helpAdventure gameData typeOnline chatLeakReal numberContent management systemVirtual machineComputerSpiralDirection (geometry)RootData structureWorkstation <Musikinstrument>AreaMonster groupFlash memoryCommunications protocolMessage passingProcess (computing)Active contour modelScheduling (computing)Wechselseitige InformationWitt algebraConvex hullFreewarePulse (signal processing)Core dumpPhysical systemFiberState of matterSpacetimeLetterpress printingError messageMeta elementGroup actionSystem callLaptopType theorySuspension (chemistry)Right angleDirected graphObject-oriented programmingMessage passingProcess (computing)Electronic mailing listMultiplicationImperative programmingServer (computing)Patch (Unix)Game theory8 (number)SpacetimeRevision controlEmailMereologyPhysical systemBEEP2 (number)Level (video gaming)Form (programming)Sign (mathematics)Uniform resource locatorComputer programmingOnline chatParameter (computer programming)SynchronizationConnectivity (graph theory)Data centerVirtual machineSpeicherbereinigungGroup actionThread (computing)Field (computer science)SphereFiber (mathematics)Object (grammar)ExistenceNumbering schemeMultiplication signNeuroinformatikCASE <Informatik>Adventure gameMUDArrow of timeReal numberIndependence (probability theory)Control flowError messageMathematicsFunctional (mathematics)WeightCycle (graph theory)Monster groupAddress spaceAmsterdam Ordnance DatumMathematical singularityHacker (term)InterprozesskommunikationMeta elementEntire functionReading (process)Workstation <Musikinstrument>Flow separationAreaEndliche ModelltheorieData structureDirection (geometry)Point cloudSocial classVideo gameoutputGodScheduling (computing)Computer animationLecture/ConferenceXML
Message passingError messageGroup actionFluidMonster groupFlash memoryCommunications protocolSpiralDirection (geometry)Data structureResultantWritingFunctional (mathematics)QuicksortComputer programmingReading (process)Arrow of timeMultiplication signProxy serverDemosceneMessage passingSynchronizationShared memoryProcedural programmingObject (grammar)Revision controlType theoryNumbering schemeSystem callSource codeXML
Nichtlineares GleichungssystemPhysicsSign (mathematics)Ring (mathematics)Data structureEscape characterControl flowError messageCodeMessage passingPhysical systemShape (magazine)ComputerVirtual machineSpiralDirection (geometry)Information securityRandom numberSynchronizationFiberModel theoryMereologyThermoelectric effectCone penetration testThread (computing)Interface (computing)Library (computing)Keyboard shortcutLoop (music)Event horizonOrdinary differential equationDisintegrationFreezingData conversionSoftware developerRight angleRevision controlFerry CorstenComputer programmingBitEndliche ModelltheorieLine (geometry)Game theoryPhysical systemContent (media)MereologyState of matterCodeQuicksortGodMIDIObject (grammar)Arithmetic progressionAxiom of choiceParallel computingWorkstation <Musikinstrument>Water vaporElectronic mailing listConcurrency (computer science)Information securitySynchronizationIdeal (ethics)Multiplication signIntegrated development environmentReading (process)NumberClassical physicsCollisionData storage deviceSystem callSession Initiation ProtocolImplementationShared memoryThread (computing)Control flowCore dumpVirtual machineMessage passingEmailObject-oriented programmingMetropolitan area networkLevel (video gaming)Sign (mathematics)Connectivity (graph theory)Analytic continuationProjective planeParsingSampling (statistics)
DisintegrationThread (computing)FiberLibrary (computing)Interface (computing)SynchronizationKeyboard shortcutModel theorySimilarity (geometry)Series (mathematics)Computer programmingCompilerHacker (term)SimulationMessage passingProcess (computing)Basis <Mathematik>CalculusSequenceDuality (mathematics)Asynchronous Transfer ModeSpacetimeAddress spaceLambda calculusNumbering schemeConsistencyImplementationSystem programmingGeneric programmingDirection (geometry)SpiralData structureTerm (mathematics)Workstation <Musikinstrument>Covering spaceLine (geometry)Vertex (graph theory)Computer networkInformationServer (computing)Client (computing)Standard deviationCore dumpIterationComputer networkEmailSanitary sewerSet (mathematics)Different (Kate Ryan album)Disk read-and-write headInformationEndliche ModelltheorieScheduling (computing)System callResultantGroup actionComputer programmingElectronic mailing listProcess (computing)MUDRevision controlBasis <Mathematik>Parameter (computer programming)Numbering schemeRootLambda calculusMessage passingDependent and independent variablesEmailLink (knot theory)Moment (mathematics)BuildingStandard deviationImplementationUniform boundedness principleFiber (mathematics)Loop (music)Web 2.0Term (mathematics)Physical systemVirtual machineSimilarity (geometry)Computer networkWorld Wide Web ConsortiumAddress spaceError messageExpected valueProcess calculusInternetworkingTheoryReading (process)Case moddingServer (computing)Workstation <Musikinstrument>Doubling the cubeSynchronizationDirected graphCalculusRight angleSource code
Server (computing)Maxima and minimaQuicksortObject (grammar)Normed vector spaceFile formatIterationComputer networkContent (media)Core dumpMessage passingEmailClient (computing)Standard deviationCovering spaceUniform resource locatorMaizePlane (geometry)Computer networkMetropolitan area networkWireless LANGame theoryPlastikkartePoint (geometry)XML
Standard deviationCore dumpServer (computing)Covering spaceComputer networkField (computer science)Uniform resource locatorEmailMessage passingClient (computing)IterationPoint (geometry)File formatVideoconferencingCuboidInstance (computer science)EmailServer (computing)Game theoryCartesian coordinate systemMetadataHypermediaRight angleObject (grammar)Serial portSource codeXML
Client (computing)Core dumpStandard deviationServer (computing)IterationComputer networkCovering spaceField (computer science)EmailUniform resource locatorMessage passingSanitary sewerCopyright infringementCircleLine (geometry)Surjective functionModel theoryNumbering schemeCalculusSystem programmingFile formatCommunications protocolData structureSimilarity (geometry)Parallel computingVertex (graph theory)Interactive televisionFormal languageBasis <Mathematik>Adventure gameBuildingComputer networkFinitary relationDynamic random-access memoryForestMaizeObject (grammar)Predicate (grammar)Endliche ModelltheorieData structureCuboidMessage passingAdventure gameMUDArithmetic progressionNumbering schemeConcurrency (computer science)Formal languageInheritance (object-oriented programming)Web 2.0Communications protocolFrame problemTheoryPoint (geometry)Machine visionStreaming mediaTraffic reportingUniform boundedness principleCircleLine (geometry)Web pageObject-oriented programmingLambda calculusRevision controlFile formatGame theoryRight angleConnected spaceLink (knot theory)InternetworkingSource code
File formatInformation managementSimilarity (geometry)Data structureSystem programmingMessage passingParallel computingVertex (graph theory)Formal languageInteractive televisionBasis <Mathematik>Numbering schemeBuildingCommunications protocolModel theoryAdventure gameExecution unitFluidConvex hullIRIS-TTwin primeMathematicsHill differential equationUltimatum gameCellular automatonMIDIVirtual machineSpiralMaß <Mathematik>ComputerRootCarry (arithmetic)MiniDiscMUDGame theoryAbstractionMultiplication signGoodness of fitPerturbation theoryMessage passingInheritance (object-oriented programming)Latent heatDirected graphCausalityPresentation of a groupVirtual machineSession Initiation ProtocolLogic gateMetropolitan area networkAirfoilSource codeXML
Computer animation
Transcript: English(auto-generated)
All right, who's ready for a highly chaotic talk?
And if anybody knows me, it's gonna be my most chaotic talk yet, and that's a high barrier. So hi, I'm Chris Weber. So I'm here to talk about network programming and etc., live at the REPL. And there's been a lot of stuff happening in Guile, as in terms of asynchronous programming
over the last year. One project is 8Sync, which I work on myself, which is a GNU project about asynchronous programming. You can see here, if you go to the 8Sync homepage, it's got a very short example that if you just put in this code, you've written your own IRC bot, that you can customize
what it does right here. So it's pretty easy to get up and running. Well, you know, so 8Sync uses the actor model as its idea of how to do asynchronous communication. This example that I have here just starts up one IRC bot. But what's a more fun example where we can have, since actors are supposed to involve
lots of things running around, where we can have many, many crazy things going on. By the way, very soon, people will be able to connect to the game I'm going to be running. So if you want to pull out your laptops now, it'll be a good time, because in about 10 minutes, we're going to be able to all go crazy. So yeah, so I wrote a multiplayer game for the LISP Game Jam called MudSync.
Who here has ever played a mud or at least a text adventure? Okay, well, actually, a good number of people in the room, not everybody, but enough people. So here is MudSync. I'm actually connected to this. This is in the browser. So this is using, 8Sync comes with HTTP and WebSocket support.
So this is using WebSockets. So out of the box, you already get a web server and WebSocket support. And I'm inside of this room. Let's see here. It's a hotel lobby. So this is going to be the most wall of text conversation ever, since I'm literally playing a game with a wall of text in it. So I'm just going to explain what's going on, because I don't expect people to be able
to read that fast. So I'm in this hotel. I'm in this lobby. There's a bunch of miscellaneous things around. What do I see here? I see, okay, a shiny brass bell. So why don't I try ring bell? Okay, it summons this clerk, who she's like, welcome to hotel bric-a-brac, you know. And let's see, what information does she give me? Ask clerk about changing name.
Okay, why don't we try that? Ask clerk about changing name. Okay, so I can sign form as my name. So sign form as C Weber. And now if I opened up a new tab, and also connected, whoops, and as I put in a colon
at the end of it, I would see that C Weber is here. And hi, C Weber. And if I switch back, I will see that guest two said hi, C Weber to me, right? And I saw guest two materialize out of thin air. Oh yeah, and the clerk kind of does some things in the background. She's clicking around and stuff like that.
So what else is in this room? So I look, there is this, there is a Carrillo cabinet, so look at cabinet, ooh, there's a pickled head of Elvis in there, ooh, great. So it's a, and you know, I can, if I look in here, there's some sort of frumpy fellow, so look at the fellow.
It's apparently the hotel proprietor, they're completely disorganized, it's actually me after the game jam. I can chat with them, frumpy fellow. I told them to paint them more walls purple, why didn't they listen, chat fellow, you know, just a bunch of BS. But anyway, so I'm going to go north. And what's here?
Okay, so I'm in this hallway now. It's got statues around everywhere. I've got in the middle is one particularly large statue of this woman, and there's also a hotel map, and then the statue of Hackathina, which is the woman. So I'm going to look at, I'm going to read the map, and there's an ASCII art printout of the environment.
Okay, so we can see that we went from the lobby to here, okay, excellent. So you know, there's no mud, unless if there's lots of fun puzzles in it, right? So let's look at the statue, at statue. So the statue is of Hackathina, guardian of the hacker spirit, the protector of all good hacks. She's got horns and a, and instead of a sword and a shield, she's got a keyboard
and some sort of, I don't know what that is. So let's look at the shield, at the keyboard. Oh, it's a knight keyboard. Oh man, those are for old this machines, that's pretty nice. So she's got to be an Emacs user. So look at shield. Oh, the shield's unusual. It looks like a hard disk platter, actually, and it looks loose.
So can we take shield from Hackathina, and I pull at it, and a completely separate copy of it comes off, and I hear a voice whisper, share the software, and you'll be free. Okay. So if I look at my inventory, I see I'm carrying a glowing disk. That's great.
Look at disk, you know, oh, it's just like the one that I had before. That's interesting. Okay. I've seen enough stuff here. Let's go west. What's in this room? Now I'm in a playroom. There's a Rube Goldberg machine, a toy chest and stuff. What's inside the, so there's like a cuddles plushie. Look at plushie. Oh, it's a cuttlefish, and it's warm and fuzzy.
I can take it. Oh, take plushie, right? So I pick up a cuddles plushie. But what else is in here? There's a Rube Goldberg machine. Okay, this is interesting. Look at machine. It's one of those hilarious Rube Goldberg machines.
What would happen if I started it? Okay, so start machine. You start the Rube Goldberg machine. Dominoes topple down the line. Last domino lands on a switch. Switch lights a match. Match lights a candle. The candle burns, and it just stops. What happened? What happened? So one of the difficult things about doing asynchronous programming stuff is that when things go wrong,
like it's difficult to figure out what happened. It's difficult to kind of evolve the system, and you have to close the whole damn thing down when you've got all these useful things running around. I don't wanna do that. I wanna find out what's happening, and I wanna fix it live. So we're gonna do it live. All right, so if I look at the output, it will print out an exception of what happened,
and it caught the exception. Unknown step type. Don't know how to process Rube Goldberg machine step type, and it's got the step divided by two and three. Huh, what's going on here? So let's look at the code. Okay, well, this is my code for the Rube Goldberg item trigger, and you can see that it's got this match here.
It knows how to handle strings. It knows how to handle numbers. It knows how to handle symbols. So the strings, it'll spit stuff out. Numbers, it'll sleep for that many seconds, and this happens all asynchronously. So via delimited continuations, it'll suspend the function and wake it up back again when it needs to, and that is doing that with the sleep function,
the eight sleep, and if it sees a symbol, it actually sends a message to the next object in the Rube Goldberg machine saying, you perform your action. So now let's take a look at the candle, which is what broke. So I've got my description of the Rube Goldberg machine here, and I've got the candle right here. So here's the code for the candle.
Now you can see it says the candle burns as the steps, and then, ooh, I've made a mistake. So you can see it's a quasi-quote mistake, classic mistake. People who use quasi-quote are always forgetting to unquote things, and that's me right now, right? So what happened here is if I go to,
oops, what I should have done is I wanna connect to the REPL live of this. So geyser, connect, local, TMP eight sync socket. So there's a REPL running, so I can edit the program while it's running. So I'm gonna take a look, and so here's a code that it was evaluating for the steps.
It sees, this is what's happened, is instead of actually doing the divided by two and three, it actually just spit out that as a list expression. So I wanna fix that. What I wanna do is I wanna unquote it here. Okay, I fixed that. And now I want to, I'm going to inject,
now normally you can just redefine things in eight sync, and if it's just like a function or something like that, it'll call the new version of the function after you defined it. But in this case, we actually wanna replace the object in the game world. This is a mud sync specific thing, but it's easy to build something like this in your eight sync game, or your eight sync whatever, it might not be a game, right? So I'm gonna inject the game object,
which is from this specification I have, which is a new version of the candle. All right, that's done. So now let's reset the machine. Okay, a hand comes out of the wall and puts everything back in its place. Shoop, shoop, shoop, shoop. Okay, retreats back into the wall. Let's run the machine again. Okay, start the Rube Goldberg machine. Domino's topped down the line.
Last domino lands on the switch. Light massive candle. Candle burns. Candle is burning away a rope. We fixed that. The rope snaps, unleashes a catapult. The rock flies through water. Demon's startling it. The water starts leaking water into the kettle below. The rock hits the quick heater's on button. The quick heater heats up the kettle below it. The kettle is filled. The kettle heats up, and it's boiled some water,
and it spits out a cup of hot tea. And there's a cup of hot tea. I'm gonna take that. Sip tea. Ah. I can also drink the tea. Oh, that drinks it all at once. Now I don't have any more tea. Anyway, okay. So all right, so that's fun. That's fun.
So, you know, okay. Well, let's go east again and look at the map. So read map. Okay, so the play room's to the left. Ooh, a computer room. Well, we got that hard disk, I wonder. Go west, go west. Ah, of course, there's a large computer cabinet here and a hard drive. Go figure.
Let's take a look at the computer. At computer. It's a PDP 11.5. And it looks like it's ready to run a program on it. If I also look at the room, it says that there's a direction down. But there's a metal panel in the floor and I can't get through the metal panel. But that's a problem,
because that's where my main talk is. All the actually good stuff about my talk, we're just playing a video game now, we haven't even gotten to the talk, is downstairs. So I have to solve a puzzle before I can do this. Okay, so let's look at computer. It says I can run a program on it. So run program on computer. It errors out because of a disk error.
So what's wrong with the disk? Look at disk. Okay, or it's, oh, wait, wait, no. Look at drive. Disk and drive, so confusing. So it's a hard drive labeled RL0.2.5. Oh, that's the same thing that our disk that we're holding is. And it's under a meter tall. There's a slot where a disk powder could be inserted.
So what should we do? What do we do, right? Okay, insert disk into drive. A load button begins to glow. Okay, look at drive. Okay, load button is glowing and there's a ready indicator that's unlit. So let's press the load button on drive.
Hard disk begins to spin up and the ready light turns on. All right, now we can run that computer program. Run program on computer. And some gears grind and a metal panel opens up and we can go down, hooray! So we can go down. And I'm in an underground laboratory
which has a map, read map. Ooh, we have a whole Asciiart map of the underground area that we can explore. It's roguelike style. But, you know, this is probably the time where I should get you guys to get involved, right? So I'm gonna go back, go back.
I'm gonna go back to where it all started at the lobby and I'm gonna let you all connect. Now, if you're going to connect, don't be an asshole. Like sometimes you put things up here and people are like, I'm gonna say sexist or like super douchebaggy things. You can say silly things, but don't be a douchebag, okay? I'll just kill the connection for everybody and you'll ruin it for everybody, so don't do that.
So I'm opening up an SSH tunnel to my laptop. Uh, oops, SSH add, which I'm gonna type wrong. Okay, now I'm gonna open up an SSH tunnel.
Suspense, it's connected, okay. All right, so now everyone can go to dustycloud.org colon 8888 for 8 sync, four times. Dustycloud.org colon 8888 and you should appear in a lobby. Let's see who starts appearing.
You see guest, okay, everybody's appearing. So, okay, I'm gonna summon the desk clerk again so she can help. So I ring the bell and she's complaining about the proprietor, which is me, which is super rude. Yeah, you can keep ringing the bell, she'll get annoyed with you.
Yeah, if I do it, shit's like, yeah, I'm already here, you don't need to ring the bell. So okay, so you can change the name so you can do, you know, so ask clerk about, oh my God, changing name. So she says, you know, sign form as your name.
So now you can do sign form as input, you know, whatever there, you know. Cool, great, great. Now we've got names. Nice, okay, this is great. So how do you play this game? Well, for one thing, you're not gonna be able to see what I'm saying
because everybody's shooting stuff so far. So you can do say message, or even better, quote, foo, to just start chatting. So you can use it like IRC, so start chatting in the room. So say, what's up peeps? Yes, for reals.
Okay, okay, but I'm gonna leave this room so you can talk amongst yourselves. I'm going north, I'm gonna read the map. Okay, Leo's here. So I'm gonna go back to the computer room, so I'm gonna go west. By the way, you can dismiss a clerk and she'll run to this secret location here, and she will do something hilarious if you summon her while she's in the room.
But I'm not gonna do that. This is a choose your own adventure talk. I've put in more content than I can possibly cover. So if you wanna see something else in the talk that I'm not gonna be able to get to, just walk to that area and read all the notes I've left. So go west. Okay, so I'm gonna go downstairs. So I went north, west, west, and then down,
and that's where you get to the underground lab. If you have any doubts, read the map up above. So read map. We'll see who gets to be the first person who joins me here. Oh, Momo joins me first. First person in the lab. Okay, so what's here? So what do people wanna hear about most? Do you wanna, should we go to the 8th sink hive area, the Guile Async Museum, the Federation Station,
or the Mud Sink Swamp? Mud Sink Swamp. I didn't have time to program that one, so it just. All the other stuff exists. So how about north, since it's opposite of south? Okay, so let's go north. And here is, we're at the entrance to the 8th sink hive.
So it's got this large spherical half dome, and there's a bunch of actors like fused to the side of it and like with things attached to their belly buttons, and they've got like messages pulsating onto them. And those are actors, right? So this is 8th sink, so I'm gonna chat with an actor. And they'll say stuff like, yeah, we go through a lot of sleep and weight cycles around here
if you're not busy processing a message. So if you chat with them, they kind of give details about how 8th sink works in kind of jokey ways. What a lousy schedule, I hope somebody upgrades that thing. Yeah, you jerks. So what is this thing about the 8th sink hive? I mean, we know what actors are. And by the way, every game object in this game is its own individual actor acting independently.
So they all operate separately if they're doing their own things, they won't interrupt each other, it's all non-blocking. So we're at the entrance to the 8th sink hive, but it looks like we can go inside the hive itself. So I'm gonna go north into the hive. And so we're inside the 8th sink hive. Wow, everything's so goopy around here. Oh, is that sanitary?
Yes, so 8th sink uses goops. And for those who don't know what goops is, goops is a, so let's look at the RGB item. Oops. So RGB item, yes. So goops is a, it's basically a object-oriented,
like, class-based structure for scheme. You can use it in a fairly kind of imperative fashion. I did have a patch to the list that allows you to use it in a more functional fashion, kind of like Surfy 9 Canoe. But what's nice about it is that when you redefine things, they will, like, if you add new fields or change things about an object, it won't break the existing objects.
And that's really good for live hacking, so that's why we use, why all actors are based on goops. So, you know, so that's why there's, you know, sup beeps. So the, so that's why, if we look here, there's this character called the hive actor. So we can look at the hive actor.
So every actor in 8th sink is connected to the hive. What is the hive? Well, let's look at hive actor. It's a, so what the hive actor does in my personified version of it is it's a tentacled monster here that's also itself an actor, but it's consuming messages that are dropped on its desk
and then shooting those messages off to other actors. So that's what the hive does. It's basically the mail agent of the entire thing. It's actually the one that's sending messages. So this is an important thing about 8th sink is that since it's following the actor model, it's all message passing. And if we look, we can chat with the hive actor too.
He yells though. I hear fibers is a nice work stealing system, but the proprietor is not convinced that our design will corrupt actor's fate and that the actor threatened to strike when it came up last. Okay, so what a jerk. So there's a stray message on the floor. Yeah, stray message.
Oh, something strange has happened to the fabric of space and time around the message. It's floating right above the floor and it hasn't been garbage collected. But if we try to read it, it might print itself out. So read message. So this is doing something hilarious. Through this error in space time, this is actually the message that was sent to the actor asking for us to read it.
And so it's actually printing out the message that it got as a hilarious joke in the game. So now we can read exactly what it was. So you can see the message has its own ID. Every message has an individual ID. It gets addressed to something. So every actor has two parts of its components
for its address. It has the player ID and it has the hive ID. And you can see that this message is coming from, it's being delivered to this metamessage object, but it's also coming from the player who is me. But they both share the same hive ID.
Now in the program that I'm running here, there's only one hive. What you could do is you could set up multiple hives. So say you wanted to run things in multiple threads or even multiple processes on completely different servers. You could have a separate hive over there and the actors could send messages to each other and they wouldn't even know unless if they bothered to look at the hive component of the ID
that they were communicating on separate places. Because the actors don't have a direct access to the object, they only have an address. So when they shoot a message at the other actor, you could just take an eight sync program and you could have it running on one machine or you could just splat it out across a whole data center. So I think that's kind of cool. So it has this action which it says that it wants to read it and the body of the message.
So in this case, it was the read thing. So let's take a look at the metamessage which has the metamessage read thing. So this is how this one actually works. This is the actual handler. You see I set up this command handler for the command read. And the first argument is the actor itself.
Second argument is the message. And what it does is it sends a message to whoever it got it from, which in this case would be the player, telling them this message. And I have this kind of terrible scribe-ish, S-X-M-L-ish type system that I've called Scrubble. And that name is as terrible as the system is.
But you can see it's doing message passing right here. So that's pretty cool. But what other kind of message passing is there? So when you see this kind of message passing with this arrow pointing in this direction, that's actually borrowed from old message passing systems in LISP, which is what happened before generic methods became popular,
is that message passing was really popular. And then a lot of people were like, oh, generic methods don't matter anymore because we have, I'm surprised nobody's causing any shenanigans, but anyway. You can also do me to do stuff like me dances. Anyway, so you can,
what was I saying? So you can send messages like this. And what happens is every time you do one of these, it actually suspends the function and kind of shares work with every other actor. So it kind of has some built-in cooperation. But what's really interesting is when you have these things that have this with the arrow
and then wait. So what that does is it shoots up, so this is an example of what I'm taking from something. And actually, this is something that proxies taking from another object. But I wanna be able to get what the actors, like what type of things that it went by, right? So normally, so this actually has a built-in,
like automatic, but also hidden behind the scenes version of promises. So what happens is I'm sending a message and I'm going to wait for its result to ask what sort of names do you go by? But instead of having to split this into a whole bunch of functions,
I actually just have this one procedure that suspends when it gets a message back, it wakes back up again, and then it's able to extract the value from it. No need for callback hell, there's no need to split things up into a bunch of things. Your programs look as if you're writing just completely straightforward scheme programs. No need to split it up into, like if you've done Node.js,
you know what callback hell is. It's not fun. So that's one nice thing about it. So yeah, so I think I've seen enough here. You are welcome to hang around or whatever, but I'm going south. Oh, we never read the eight sync design goals. I should probably read that.
Read eight sync design goals. Okay, yeah, it's still connected, just making sure. Oops, read. Sign. Sign, yeah, okay, that'll work. So it's an actor-based, shared nothing environment, and what that means is actor model is one way of being able to handle concurrency
so that things don't basically, if you've done any asynchronous programming, you know how much of a pain in the ass threads are, and locking is a nightmare. What the actor model takes as an approach is that each actor manages its own state, and they don't share state between them.
So when I sip the tea, that decrements how many sips I have left of the tea. So if I go up, go east, run machine, this is, I don't know why I went all the way up here just to show this. Sample example would suffice, but right, when I'm sipping the tea, you know,
nothing's actually accessing that tea number or interfering with it. I'm sending a message to request that it decremented or something like that, but the actor itself is handling that itself. So you won't have those kind of collisions. So, oh yeah, I forgot to reset the machine anyway. Whatever, I'm out of here.
Down. Okay, so read sign. So that's one thing. Another thing is that it's live hackable. So I believe that concurrent systems are really hard to write. And the ideal concurrent system development is where you're able to evolve the system as it runs. This entire game, I almost wrote the entire thing
while the program was running. So the whole parsing system and everything like that, it just kind of flowed out as the program developed. And it's really hard to plan concurrent systems, so I think that this is really important. And also debugging concurrent systems is really hard. When I fixed that issue, I didn't have to disconnect from the game.
I could fix the game while it was running, even though, you know, there's a bunch of things acting in it. And for the most part, the actors don't, like if one actor breaks, it might not be helping the other actors that it's supposed to be doing, but it won't probably take down the whole system at once. There are other components that still can't operate without that actor can still operate,
which I think is pretty nice. No callback hell. I already talked about that. That's, you know, delimited continuations, blah, blah, blah. So those are the goals of 8Sync. And I think that they've been carried off pretty well. So read map. What should we do now? Should we go to the Async Museum or the Federation Station?
Pinions? Async Museum, okay, go west. So I go into the Async Museum. A security guard allows me to pass through into the room then stands in front of the door. Well wait, why is the security guard in front of the door? I'm gonna go east again. Oh, security guard tells me the only exit is through the Git shop. Okay, so I noticed there's a bunch of people in here.
Did you guys get stuck? There is a way out. If you see to the bottom, there's a classic NetHack-style store down here. But anyway, so there's a list of exhibits. This is kind of overwhelming, all the list of exhibits that are right there.
So read list. 2016 Progress, that's probably a good place to start, right, so let's look at 2016 Progress. I told you guys this was a wall of text. And this is like the worst wall of text of all, right? So you can read this on your own time if you want. But oh man, I can't believe, I was like, the game content is like almost 3,000 lines long
and that's not even including the Git engine, that's just like the thing that I'm running here. So a little bit too much content. Anyway, so what's happened over 2016? So towards the end of 2016, at the beginning of 2016, there was some conversation about we should have some sort of concurrent programming environment for Guile, right?
Mark Weaver, David Thompson, and Andrew, I'm gonna totally mispronounce his last name, Pseudoman on IRC, all went to Veggie Galaxy after the FSF 30th party and we were talking about what we could do. And then kind of shortly after that,
I sent an email to the list with kind of a brain dump. And then I think right around that time, a number of implementations started. So I started working on 8Sync. It originally didn't include the actor model itself, but eventually moved to mostly being around the actor model. Chris Vine started Guile Async, which is also still an active project.
Then Andy Wingo came around and kind of blew everything out of the water by having, as he tends to do, with suspendable ports. So suspendable ports are really cool. So normally when you write, so I'm gonna show you some code. Let's see here. We're all gonna go to the 8Sync code itself
and go to the systems and let's see the IRC code, right? So let's, where would it be? So this was probably not the smartest idea. We just pull up code mid thing. But okay, so right here.
Yeah, I should have definitely bookmarked this before I started pulling it up. Okay, so I'm looping here, but this was probably not the smartest choice I've made in this entire talk. But the basic thing behind suspendable ports is that normally when you write code that requires getting code out from some sort of object.
So if you're writing a blocking version of it, you would just say, you know, read from that port until the stuff gets there. And then the whole program would freeze until some code comes through that port, right? So with the way that you usually do it and the way that 8Sync did it before I switched to suspendable ports
is that you would actually take a port and then you'd shove it over to the scheduler and you'd say, call this callback when you get some information, right? But the way that we do it in suspendable ports is that you actually start reading from the port and then at the moment that it's going to read from the port and it would block, it suspends to the scheduler
and the rest of your program keeps running and as soon as there's information there, it just continues. So you can just write a loop that looks exactly as if it would block, but it just magically doesn't. Well, that's pretty cool. So Andy put out Fibers, which I thought, which is a implementation of,
well, I've got a whole exhibit here on Fibers, so maybe we should talk about that. But that's basically kind of blew everything out of the wallet there. So look at List. Like I said, wall of text talk, but at least we had the fun things with the machine and the tea beforehand. So read 8Sync and Fibers.
So this is, oh, look at 8Sync and Fibers exhibit. Okay, so there are some similarities and differences between 8Sync and Fibers. I know a lot of people are like, oh, you know, what should I, like, what should I be following the most closely between all of this? So both of them are using Guile's suspendable ports, which is not surprising, and both of them use message passing.
So they actually look super similar. Like they both have some sort of inbox-y looking thing that you're pulling stuff out of. And in Fibers, that's called a channel, which is kind of similar to like Go calls and et cetera, and in 8Sync, that's called an inbox, because each actor has its own inbox. Now, one major difference is that in Fibers,
each process might actually have two different channels, which actually means you might end up in an accidental situation where you have this information coming on the second channel and you start reading from the first one and it never gets there or something like that. So I actually think I have a slight preference for the actor model because you're only actually reading from one, each actor's only reading from one thing
and it won't run into that problem. But they have both different theoretical basis. One of them's based off of, Fibers is based off of the process calculate, specifically CSP, which you can read up on if you want. And 8Sync is based on the actor model. And if you're a mathy person, I might tell you, hey, they're dual.
And you'll be like, that's cool. And if you're not a mathy person, it doesn't matter. So let's look at the list. What else have we got here? Well, we already talked about Suspended before, so why talk about that? I actually think that we've talked about most of it. Oh yeah, I was conceived by Carl Kewit, shared nothing.
Oh yeah, this is kind of interesting. It was originally the research goal of Scheme. So this actually brings us back to Scheme's roots. Scheme was originally created when Gerald Sussman and Guile Steele were trying to explore the actor model. And then they discovered, they also tried to build in this version of the lambda calculus alongside it. And then they suddenly realized that the whole,
the way they passed in the arguments and the way that they got things back were actually exactly the same. And they're like, these are the same thing. Now, it turns out they're not exactly the same thing, but it's pretty close. But one of the major differences with the actor model is that you don't actually have direct access to whatever you're calling. It might not be in the same address space,
which I think usually in most, even though I'm not sure the lambda calculus expects that, this whole idea that you're sending a possibly serialized message somewhere else and that you might even get back an error result or it might never end up finishing or stuff like that, it has a different set of expectations than just vanilla scheme just calling things
and stuff like that. So, and pretty much all distributed systems can be viewed as in terms of the actor model. Think about web servers, right? You've got a web server, you send a request to it that's sending a message and it passes a response back, right? Pretty much all systems can be viewed in the actor model that are concurrent.
So, I'm gonna go south into the gift shop, which I never finished and I forgot to even commit the thing that said that it wasn't finished. I'm gonna go northeast, because that's embarrassing. Okay, so I exited the gift shop. So, let's see here. Well, we're getting through this a lot faster than I expected.
So, we still have the federation station. Should we go there? Yeah, okay, let's go there. So, this is actually the whole basis of me working on all this stuff in the first place is because I wanted to build in, some of you know, maybe not everybody, my main thing is I'm working on trying
to do decentralized internet things, right? And I get so frustrated with coding and every other thing that's trying to do concurrent programming that I decided to shave all the yaks and head over to Guile. Luckily, Wiggo and I are shaving some in parallel, so we're kind of building off of each other, maybe.
But, you know, so one of the things I work on is something called Activity Pub, which this guy's familiar with at least. He works on Pump.io. But Activity Pub is a implementation of, it's a standard from the W3C. In fact, we have a poster here, so read poster.
It even has links that you can click. What mud has links, right? But anyway, so I'm working with a social working group that has that, and so it uses a pretty simple JSON-LD. In fact, I might as well pull up the spec. Activity Pub, why not? So this is, oh, the network went down. Oh, probably none of you are doing anything because the network disconnected, huh?
That's why nothing's happening. I was like, man, you guys just all went quiet. No, it was just, see, this is what happens when you have a wireless card that's ancient, that's connecting to a conference Wi-Fi, and then you're doing everything over an SSH tunnel on your VPN.
Probably not everything is gonna hold up, right? So anyway, okay, we're back up and running. You all have to refresh if you actually wanna rejoin the game, but I don't blame you if you're like, screw that. I lost all my experience points, right? I got it. So there are no experience points. There was originally gonna be a frogman you could punch, but I never got it in.
So anyway, so activity fraud's pretty simple. The whole idea is that every user has an inbox and an outbox, and when you are doing federation, federation happens, so say I post a video
to my Media Goblet instance, and Ludovik wants to see this video, right? So Ludovik is subscribed to me, so my server posts that serialization of the metadata about the video to Ludovik's server, and it's just a simple JSON format, a fairly extensible one, but still a JSON format. So it goes over to Ludovik's server,
and it might look like this. So this is an example of an object. This person's liking a note called I'm a goat. But Ludovik gets the thing, and then whatever social networking application he has, he can see my video, right? And he can comment on it,
and he comments on my video, and it has kind of email-like addressing with two CC and BCC, and that's how the whole thing works. It's actually, and now wait a minute. This sounds kind of familiar, doesn't it? Wait a minute. So we've got, we're playing a game
where we're using the actor model to send messages between things, and we've got this kind of subject predicate object structure, right? Like take duck from box, right? Well, that's not too different from like, post, blah, blah, blah. They're both subject predicate object systems,
and so wait a minute. I've got this chart here. So there's this chart that's in this room that's like conspiracy theorist. It's all related! Shouts over exuberant conspiracy. Sorry. Activity pub, federation, the actor model, scheme, text adventures, muds. What do these have in common?
Everything, right? And they've got, like this poster has like circles and lines drawn along it, and like red pen and stuff like that. So scheme was originally started to explore the actor model, as I said, and there's a really interesting paper by Sussman and Steele that's exploring the first report on scheme
that I really recommend that you check out. The activity pub protocol is using federation via the activity streams format, and text adventures and muds follow similar, you know, structure to break down commands of players. Federation and the actor model, they're both based on a highly concurrent systems that use message passing. Zork, the first text adventure, used muddle,
which is actually a ancestor of scheme. So it actually uses a very scheme-like language to program the first major text adventure, because Zork came out of MIT during that same era. And so in the 1990s, before the web became big, this is a hilarious link,
let's look at all these frames. Here is a document, because muds actually were a big research subject, like there was a famous mud called Londomu that ran out of, it was either Xerox PARC or Palo Alto Research Center, or the same thing, I never remember. But anyway, they were a big idea in language design,
and people thought muds are the future, that's how everybody's gonna communicate on the internet, is this cyberpunk vision of things where you're walking around worlds and interacting with things and stuff like that. Well, instead, we just read web pages, but you know. So, but here's a document that's like,
hey, muds are so cool, we're making a lot of progress, why don't we federate them? Well, gee golly, these people wrote this thing up and then only way later do we end up trying to do this stuff in the web, right? Of course, they didn't make any more progress then, well, we're making more progress than them, so whatever.
But anyway, what I find really interesting is that a lot of these ideas are circular and interconnected, right? Like text adventures relating to the work I do on Federation, who would have thought, right? Super fun. Okay, so we're getting to the point where I should probably either ask questions or I could just do Arnie's talk and then do questions.
I don't know, what do you think's the best version? Yeah, yeah, well, Arnie starts at two o'clock. Yeah, okay, so why don't we do questions first. Who has any questions? Oh, Strugi re-entered the room. You can, I give, Strugi, if you want, you can ask a question via the game, it's totally fine. Sup, Strugi?
Nope, did it not go through? Oh, stupid connection, I bet I disconnected. I was gonna ask where the tinfoil hat was in the room. Oh, there's no tinfoil hat.
But we could program one live. Do you wanna see it? Should we add a thing to the game live? Why not? Tinfoil hat, okay. Let's add it to the playroom. And I gotta switch back to Brickerback, so playroom. So let's see here.
So here's where I've got all the RGB stuff with the whole machine. And inside, oh yeah, there's a rubber duck inside of here. Well, why don't we, instead of have the dumber duck, we'll add, you know, tinfoil hat, right? So we're gonna say it's a tinfoil hat,
goes by tinfoil hat, and also just hat. You can take it. You'd have to be a crazy person to wear this thing. And I'm gonna, and I'm gonna inject it
right into the game, tinfoil hat. Can you give it a wear command? What? Oh yeah, so I can give it a wear command. So actually, why don't we do that first? So that's gonna require that I subclass it. But we'll do it. So I'm gonna take something else that already has been kinda defined and just munch it.
Let's see here, define actor, something with commands. Okay, good enough. This is a hot tea one, so I'm gonna abuse the hot tea thing and I'm gonna make a tinfoil hat. Tinfoil hat, game obj, command wear, tinfoil hat wear.
And we're not gonna sip the hat. Build the commands wear, which is a direct command to command wear. Now, this is a mud sink specific thing with this command sear. You guys are looking at abstraction piled on abstraction piled on abstraction here. So I don't need those,
cause those are already defined in the other thing. So now I need to define command tinfoil hat wear, tinfoil hat message. We don't really care about anything else. We're just gonna say, and we're just gonna do this super fast.
So message from message. We're gonna tell them, text, you put on the tinfoil hat and to be perfectly honest with you, honest with you, I'm gonna do that.
It's a lot harder to take you seriously. Okay, so we've got a tinfoil hat, unspecified. Yeah, well I evaluated it now, so it should be fine. So now I'm gonna go down to the tinfoil hat,
switch it over to be a tinfoil hat. Let's see, I'm gonna inject it straight into the game. Let's see here, look, okay, west. So I'm gonna go up, gonna go east. Here's a toy chest, so look in toy chest. A rubber duck in a tinfoil hat.
So take tinfoil hat from chest. You take a tinfoil hat from a toy chest. Inventory, okay, wear tinfoil hat. You put on the tinfoil hat and to be perfectly honest with you, it's a lot harder to take you seriously.
Right, I don't think we have time for any more. We should switch, but I'm about to do Arnie's presentation for him. It'll be super fast.