Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
Cuis Smalltalk and the History of Computing’s Future (with Juan Vuletich) image

Cuis Smalltalk and the History of Computing’s Future (with Juan Vuletich)

Developer Voices
Avatar
2.5k Plays6 months ago

Smalltalk is one of those programming languages that’s lived out of the mainstream, but often referenced as an influence and an important part of programming history. It’s the cornerstone of object-oriented programming, it was into message passing before actors were cool, and it blurs the line between operating system, programming language and personal notebook. But what is it?

Joining us to discuss it is Juan Vuletich, the creator of one of Smalltalk’s latest incarnations, Cuis. In this episode we cover Smalltalk’s history, its design ideas, Cuis’s unique implementation and what makes this modern implementation something special.

Smalltalk is over 50 years old, but its vision of how computing could work has only begun. Let’s see if we can mine some ideas from it to take us into the next generation of computing...

--

The Cuis Smalltalk Book: https://cuis-Smalltalk.github.io/TheCuisBook/Preface.html

Cuis on Github: https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev

The Cuis Community: https://cuis.st/community

A Short History of Cuis: https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/CuisHistory.md

Monticello VCS: https://wiki.squeak.org/squeak/1287

Juan’s Music Research: https://www.jvuletich.org/research.html

Back to the Future - The Story of Squeak (pdf): https://dl.acm.org/doi/pdf/10.1145/263700.263754

Kris on Mastodon: http://mastodon.social/@krisajenkins

Kris on LinkedIn: https://www.linkedin.com/in/krisjenkins/

Kris on Twitter: https://twitter.com/krisajenkins

Recommended
Transcript

Influential Programming Languages

00:00:00
Speaker
There are a few programming languages that really influence the way we think about programming. C is the obvious one. You probably write in a language that looks a lot like C, behaves a lot like C, was maybe written in C. C set the template so definitively you could be forgiven for thinking that that's what programming actually is. But there are others, there are a few other big players that have changed the way we think about programming. Lisp, for instance. You probably don't write Lisp, but if you think garbage collection is a normal feature for a language to have, if you think functional programming is a useful technique, then you can find your roots in Lisp. Another one is Prolog. You almost certainly don't write Prolog, but you can see its influence as an idea in SQL, which is a very everyday language. You can see its influence in any language with type inference.
00:00:57
Speaker
While we're on this list, we have to mention Grace Hopper. She was the first one to suggest that we could talk to computers at all. Instead of just typing in machine codes, she changed the game for what we think programming is. There are some languages and some people who have absolutely set the mold for the future of computers.

Revolutionary Ideas in Computing

00:01:18
Speaker
And there's one language like that that intended, actively intended to change the way we think about computing. And it has been influential, but not yet to the degree it hoped. Small talk. Small talk is the language that popularized objects, so it's hard to imagine Java without it. It popularized message passing, so it's hard to imagine actors or Erlang without it. But in a way, objects and messages were just the means to an end. Its real vision for computing was something far bigger.
00:01:54
Speaker
So what was it? What was Smalltalk's grand plan? What is it? What can we learn from it? What untapped design ideas does Smalltalk have for us? Joining me to discuss all this is Juan Vula Teach. He's the creator of Quiesce Smalltalk, and he is both an encyclopedia for Smalltalk's origin story and a torch bearer for its future. So when I wanted to know what this language is all about, Juan was the perfect person to bring in for a big chat about Smalltalk. I'm your host, Chris Jenkins. This is Developer Voices, and today's voice is Juan Vula Teach.
00:02:43
Speaker
Joining me today is Juan Vula Teach. Juan, how are you doing? Hey, I'm great. Thank you. And you? thank I'm good. I'm good. and Thank you for joining me because so we've got to open with a really big question and then work our way into some details. because you're the author you're the author of Quis Smalltalk and we're going to get into the full depth of what that is. yeah But we have to start with, what is

Smalltalk's Vision and Design

00:03:09
Speaker
Smalltalk? Because it's a language, it's an operating system, it's a philosophical set of, bri what is it? What is it? Well, yeah, Smalltalk is a lot of things. It is all of those and maybe others. and The important thing is that Smalltalk is
00:03:29
Speaker
kind of an attitude. Okay. and This starts with with an old quest from the time when and the idea of a personal computer was not yet a reality. And the question was how to give people effective access to the whole power of a fuel full computer for themselves, okay? Not a shared computer, but a personal computer. If a user could have the full power of a computer, and that was meant to be a lot of computing power for one single user, what's the best the computer can do for for them, right? This was in the early 70s.
00:04:16
Speaker
So everybody has way more computers than that for for each of ourselves now. And the idea, the the question was how to empower users. And the obvious answer is that computers are good for yeah handling, managing, editing, modifying, knowledge. Okay, so the the idea is to give people tools to model knowledge, to to learn, to help them learn better, to help them communicate, communicate knowledge more effectively. And from that ah abstract and big question, well, what's to do after that? Okay, so i am
00:05:13
Speaker
That's how the the small talk philosophy and the small talk project started. So but building ah and designing a programming language and building a development environment was the chosen path to give people access, effective access to to computing power. okay So the idea of of small talk is to build a system that helps people learn, describe knowledge, communicate knowledge, and essentially that.
00:05:52
Speaker
yeah Yeah, because it's in those days, right, when... Yeah, I can see this. I can see that being the necessary problem of the time. Computers exist just as room-sized things in governments and labs and some companies. And historically, you're just on like cur on the on the cusp of um people getting, like, ah spectrum and Tandy computers in their home. Yes, that that that was a later. The Smalltalk project started a bit before the first microprocessors, just that before. So they are they are looking into the near future thinking, what's the world going to be like when this happens? No, they were actually looking into a mid-term, long-term future. they They were thinking about a decade or two in the future.
00:06:45
Speaker
right So what they built was way more ambitious than what the first microprocessors could do. But they already knew about Moore Law. So they already knew that it was quite likely that computing power would become and more widespread and cheaper. So even if the process microprocessors that were just around the corners would not be good enough, It didn't really matter. A better ones would come afterwards or or whatever was needed. they They were not focused on a specific technology. Right, yeah.
00:07:18
Speaker
And the the they the first computers on which Smalltalk was the XeroX Alto was a kind of mini computer of the day, sort of a box on a desktop, something like that. Yeah. I've seen the photos and they they're small by the day standards, but huge by our standards. Yeah. And they were done with discrete logic, right? and The way computers were done at that day. Only later, when AMD did a bit slice processor, they did a later version called the Dorado that was way faster and that used to do a 16-bit processor, 16-bit chips, each one a one-bit processor. so
00:08:07
Speaker
that That chip by AMD, I don't remember the name, was meant to be used that way. If you want an 8-bit processor, use eight of them. If you want a 16-bit processor, use 16 of them. And that was way faster than the earlier technology. And that was around the time of the 8-bit microprocessors. But this let you build something more expensive and way faster. Yeah, yeah i can I can't quite imagine how that architecture would play out, but that's another rabbit hole for another day. Yeah, and I'm not really an expert in hardware. I just read a little bit about the kind of things they did before microprocessors were good enough to to run a full small dock system. that That was around the late 80s.
00:08:56
Speaker
Okay. But in that historical context then, it makes sense that they are looking far enough ahead that they're not tied to specific technological choices of the day. Exactly. That explains why that explains why it starts to look like a philosophy of how computing should be done. It it was a research project and a research project into what computing could mean. and you We already had theoretical computer science, we already had theory of computation and of course logic and the theory of information and that part of the theoretical foundation of computer science, but it wasn't clear and what were the they
00:09:43
Speaker
psychological and sociological consequences of widespread use of computers. So what computers would mean for people. And they wanted to to explore that and to take an active part on that.

Future of Computing and User Empowerment

00:09:58
Speaker
One idea that Alan Kay, who led ah all this project, said several times is that he still believes that the computer will bring change in in human civilization, like that of the printing press, okay, the yeah the possibility of of of printing cheap books, ah know everybody' we and and having ideas stored in a place where they will not be lost in the wind. And and you couldn't
00:10:38
Speaker
we visit them years afterwards and keep refining them. And that being cheap enough for anybody to be able to do that, that brought the Reynolds, okay, that that brought modern civilization in yeah Europe, in the Western culture, and later in the whole world. So Alan says that i computers should understand to bring a change of that magnitude in our cognitive abilities and the way did they and and advancement of civilization. And he said that hasn't happened yet. okay so and And the aim of the approach in the 70s was to help develop that.
00:11:26
Speaker
Okay, so small was their first milestone in that way, in that path. It makes you think it's wrongly named because with an ambition that grand, starting with the word small, seems almost too humble, right? Yes, yes. they the The thing is that they also wanted this for everybody. And they they watch they didn't want this for an elite. They wanted this for everybody. And when LNK knew about him
00:12:07
Speaker
Seymour Papert's work on logo and on on education and the idea of math land. Let's not go too deep into that because we will learn, and but the the idea that that the computer could be a medium, an environment for learning for children was originally from Seymour Papert. When Alan Kay knew about his work, m he thought that the ideal user for his dynamic project would be children.
00:12:44
Speaker
that yeah for several reasons. One is that children don't have many prejudices that adults have that make things harder. And another one is he wanted a cultural change for humanity. He wasn't focused on on making money next year. a So he wanted to, he thought it was more important to help children be but better thinkers to make a substantial change in in the quality of discussions and discourse in general between people. A significant leap in civilization. So he he decided to focus on on children. So because of that, small talk tried to be as simple as possible and as approachable as possible. And I guess that has a bit to do with the with the name small talk.
00:13:42
Speaker
OK, yeah, that makes sense. I mean, we're certainly some of the way there, right? I mean, anyone who's seen children with an iPad knows that children are absorbing technological ideas before they can even speak these days. yeah Yes, yes. The last time I remember Alan saying and The computer revolution hasn't happened yet. It was in a talk here that was named exactly like that. The computer revolution and hasn't happened yet. And I believe it was in the early 90s. I'm not really sure. I'm pretty sure it was in the 90s. So it was before the explosion of the web and before the iPad and and smartphones. okay I wonder where he thinks we are on that revolution now, because it definitely feels like it's begun. Well, things have changed a lot.
00:14:33
Speaker
But he has always been critical of where the industry is moving. And in particular with the iPad, he said that the designers and developers of the iPad knew enough about what they were trying to do and to try to keep doing the same. okay But that they deliberately decided to build a device that is much better for consumption of media than for creation or sharing. OK, yes, that that what they did is to. To be inspired by previous work, including his and using new technologies to a kind of new TV, OK, where users consume media.
00:15:31
Speaker
yeah and i try to issue a very create It gives you a curated experience. Most of the time. And only in the last perhaps 10 years, and newer generations of the iPad with better pen and better software ah started to be really useful tools for graphic design, of tras for example, for for drawing Today, an iPad for many people is as good or better than pencil and paper for um for creating art. And in these last years, they also got much better for musicians and many musicians use iPads even on the stage. Yeah. Yeah. Originally, that was not the case. It was only for consuming media. yeah But still we are far from
00:16:22
Speaker
a a practical, real dynamic that was what was happening. Alan's vision. Because the one thing that seems to separate it is whilst you can project your vision into certain frames on an iPad, the small talk seems to me to be a fundamentally malleable thing in which you change what it is to suit you. We still haven't reached that part. Yeah, the the the original dream of the DynaBook is really ambitious and includes the same level of freedom that you have with written media. okay You can grab any piece of paper and start writing with a very cheap piece of paper and a very cheap pencil.
00:17:13
Speaker
or a bullpen and you're creating and that's it. So it's immediate. And you can grab any book, no matter how old, important or revered it may be. And you can write on the margins of that book and you can yeah scribe over it and you can reversion it. OK, that's immediate. And and you're there are no artificial limitations on what you can do. Doing that, not only with all the media a computer can handle, Alan also says that a computer is a meta medium. That means that it it's a platform for creating new kinds of media. okay And the computer isn't doing that. But giving you all full control over every aspect of that
00:18:06
Speaker
is very difficult. It's very complex. A computer can do a lot of things. And giving everybody the full power of controlling and tweaking every detail on everything a computer can do is a lot. And making it into easy, immediate, and not requiring any special knowledge. We are very far from that. Okay? And devices like the iPad go from one direction, from the direction of being easy to use and slowly giving you more power. A small talk goes from the completely opposite direction, give you full power over very little and later expanding the the universe of things you can do by making it
00:19:00
Speaker
more um comprehensive and sophisticated. In the ideal world, those two paths someday would meet in a place where you have ah all the nice things you can do on an iPad, but with the full control that a small talk system gives you. We are pretty far from there. i can I can see that gap being bridged, but tell me more about the small talk side of that world then. If someone lands on small talk for the first time, what's this malleable full power experience they're going to have? Well, and for for the people who who go from the bottom up, let's say, yeah working ah wanting to have a system that is fully malleable,
00:19:47
Speaker
Even if limited, Smalltalk is perhaps the best that has been built. then I think it's the best that has been built. So what is Smalltalk?
00:20:01
Speaker
this This is for old timers, for people who really started with microcomputers in the 70s and 80s.

Technical Aspects of Smalltalk

00:20:10
Speaker
It's a computer where you can tweak anything like a Synchro Spectrum or a Commodore 64 or a regular Shaco computer. It's completely open. Everything is there for you to tweak. But instead of learning needing to learn assembly language, you have a a language that is designed for humans and not for machines. And that's a big difference. So what is Smalltalk? Smalltalk is a kind of virtual computer that is completely open where you can go from high-level descriptions of ah for knowledge about something that you are interested in and down to
00:20:57
Speaker
bit in memory and pixels on a display or kstrokes on a keyboard or bytes on disk. And everything in between is described in the same high-level language. And everything is alive for you to modify. So the the big difference between small doc and regular programming languages is that the whole system is live and ready to be inspected and studied all the time. And that encourages you to tweak it in in ways that regular systems make it very hard. So it removes a lot of barriers.
00:21:37
Speaker
Do you know what it's reminding me of ever so slightly is if I'm browsing a web page in Chrome, I can open up the inspector and it will show me some of the HTML tags. yes What I can't do is open up an inspector and drill down into the painting primitives or see which bytes are going across the network or being stored to disk. Yeah, that's true. You cannot do that. you can know do but In addition, HTML was created as a a human readable format, but later evolved into something that is usually too complex for for people to read. you
00:22:17
Speaker
Only very simple web pages can be written by hand and most HTML is never read by humans. It's generated automatically by frameworks and and it's rendered by browsers. And why is that? Well, one of the reasons is that HTML is not good enough at handling complexity. So the way to handle complexity is with tons and tons of more HTML instead of good abstractions. and
00:22:49
Speaker
so that um programa Besides, of course, HTML is not a real programming language. That's why you have JavaScript. and So you need to to count HTML, CSS, and JavaScript as the absolute minimum to to to build web pages, right? yeah do so Anything interactive. Yes. And Smalltalk was sign trying to make something that that was powerful using a little little code, a little text to describe things. it wasnt How specifically does that work? What's the design thing that HTML has missed that Smalltalk can teach us?
00:23:35
Speaker
i am Well, HTML is not a real programming language, so I guess it it makes more sense to to compare it with a we have programming language such as, I don't know, Java, C sharp, C++, or Python. Yeah. one One of those. and Compared to those, one of the things, compared with Java, for instance, Java came out after the object-oriented boom that was started by SmallDog itself.
00:24:08
Speaker
um And wastra they tried to do something that was high performance, safer, more professional, or I don't know what. But they ended doing something that has a very complex type system and that requires type declarations all over than the world, all over the yeah all over the place. So yeah a writing anything in Java takes a lot of text, okay even more than in C, for instance. And Smalltalk is strongly typed, but it's dynamically typed. So each runtime object knows perfectly about this type and and and the protocols it can't handle. But when you are writing code, you don't need to say that. You just have an object, you give it a name stored in a variable, for instance, and just sending messages to it. You just start talking to it.
00:25:07
Speaker
And it will react. and Very little boilerplate, very little extra syntax, very little additional stuff. So everything is much smaller. And additionally, not having types means that you can do real polymorphism. it It means that you can have a set of messages that many objects understand. And you don't need to type conversions of stuff. it's there messages are meaningful, any object will handle them. When you send a message to an object, you are not really constrained by what the receiver is, you are only thinking on whether it can do what you want. Right, understands the message it is one of those things. Yeah. yeah And that's ah some of the reasons that that that make small talk out to be more consistent and in
00:26:04
Speaker
in most imperative languages, whether object oriented or not. yeah this is so This is one of the fundamentals of small talk that's kind of hard to see how it works in the large, because I don't think, as a Java programmer, I've seen some parts of this, I don't think I've had the full a small talk object oriented experience. But it's To interact with another object is to just know how where it is, to know its reference, yeah and to send an arbitrarily structured message. Yes.
00:26:39
Speaker
So I just, that's it. That's the whole thing, right? OK. That's the whole thing. If you want, you can ask, if you have a reference to an object, we say story in a variable, but it's not story in a variable. A variable is actually a reference. There are not by-value and passing in a small talk. is everything is by reference and by also references. So you have a variable that references some object. If you have no clue what to do with it, you can ask each class. Okay, right. And then which again, it's just sending a message. Yeah, it's a message class. And to the message class, you you can ask and the messages it can handle, for instance. Okay, and now you are meta programming, you are programming and the programming
00:27:31
Speaker
system itself. okay because and And that's how the Smalltalk tools work, actually. Usually, you don't do that. It is not considered good practice to to all the time ask an object what it is or or what it can do. Usually, you structure your you're designs in a way that generally you know you know when you have an argument that this argument will conform to your expectations. right But if you're writing programming tools, they do that all the time, of course, because they are modifying classes and and they are modifying methods and messages and stuff. So the debugger will just use the same mechanism as any other program talking to an object? Yes, the only thing that the debugger uses that most programs don't use is access to the to the call stack. When you have a message send that is essentially the same,
00:28:26
Speaker
As a function called, the only difference is that the binding to the code that runs is dynamic. it's It's not known at compile time who will who you're calling. right That's the only difference between calling a misss but sending a message in small dog and calling a function. m when When you send a message and the method that runs sends another message and they still haven't returned yet, you have a call stack. liking in C, essentially, or or even mean in a assembly language. And the call stack is ah is accessible from small doc itself. okay you Usually you don't need to query the call stack. It would not be considered nice practice.
00:29:14
Speaker
But if you're writing a debugger, it's exactly what you need. So the debugger asks for the call stack and it can navigat navigate the stack frames and go up and down and access all the all all the and variable scopes that are in there, right? And manipulate them. That's how the debugger works. Is the call stack a different thing or is that just yet another object you send messages to? It's just another object. In Smalltalk, you have very few, almost all the words you use are defined in the code you can modify. There are very few reserved words, okay almost known, but there are just a few. One is the word self, self means to an object
00:30:05
Speaker
itself, okay? If a method says self something is talking to itself, okay? So that that's a reserved keyword. And there are a few others, not many. just I believe there are five. And one of them is this context. And this context gives you a context object that is a stack frame. that is an instance of a class you can browse as part of the system, and that has its parent context forming a kind of chain that you can navigate. And for instance, in Smalltalk, the exception system is implemented without support from the virtual machine. The same way that the value is implemented in Smalltalk manipulating stack frames, the exception system does exactly the same.
00:30:53
Speaker
So when when as an exception is raised, the handling code navigates the the stack in the same way as the debugger does it to search for which calling a frame has specified the handler for that exceptions to be able to do champagne. So it's all done there in Smarter. You can modify the exception system. Okay, let me check I've understood that. So if I'm about to throw an exception, I send a message to my context.
00:31:24
Speaker
and ask if it can handle the exception? No, we what you there is a hierarchy of exceptions. There is a class named error, for instance. And you can simply say error race. And that race is an exception. And error, there are other exceptions, too. I'm simplifying. But error is a class. And a class is an object. So it has its own protocol and its own messages. And one of the messages it can handle is signal. So if you say, error signal, then the class error will know how to work with the exception system. It's part of the exception system to do the stack navigation for you. You don't need to do it yourself. You can say, I want to set up an exception handler for one of these exceptions, for instance, error, while I do this block of code.
00:32:21
Speaker
and then you call your code that can do whatever. and yeah and If inside that code, someone does exception grace, Exceptional signal, and the Exceptional system will look for the place where you say, I want to set up this handler for this exception, and find the handler and run it. that how does it How does it look through that? Because it's not looking through the source code? No, this doesn't use source code at all. it It uses the stack chain and, well, the frames of the stack are instances of of classes in the context hierarchy and they have enough time to do this and without using source code.
00:33:13
Speaker
And they they they are rather sophisticated data structures. And they are sophisticated because during normal execution, we're running sheeted code that runs very fast. And these stack traces don't exist at object because they would be too slow. So only when you need them, the virtual machine, the the running environment creates them for you. So it gives you the the experience of a very slow, fully-interpreted system where everything in the running machinery is object, but in truth, most of the time, all that is optimized. right But when it needs to show it to you, for it instance, because you open a divider, then it creates all the stuff for you.
00:33:57
Speaker
So the the experience is great, but the performance is very good, too. OK, OK. So the world, from a programming point of view, is always presented as objects that you send messages to, but under the hood. That's being optimized away a lot of the time. Yes. Most of the time it becomes optimized. The running speed of modern small talk virtual machines is in the same ballpark of JavaScript or or Java. not too far from them. They don't use the same a advanced optimizations. They don't usually do and adaptive recompilation of large blocks of code like JavaScript does. But simply because more way more money has been invested in JavaScript than in smaller.
00:34:54
Speaker
but ah But for instance, a modern small-talk virtual machine is way faster than Python and most other interpretive languages. The only ones that can run faster than small-talk are JavaScript, Java, and of course the C family. that is fully right yeah yeah That makes sense. Okay, so as you've introduced this, what is how far down the does the message system go before we cross that threshold into the virtual machine and what's the virtual machine actually responsible for? Yes, that's a great question. and they they wheel all machine set The
00:35:38
Speaker
the the boundary of of the Smalltalk objects world.

Smalltalk's Applications and Evolution

00:35:43
Speaker
And one of the ideas of Smalltalk IoT was to handle a platform-specific code inside the virtual machine. That means that your Smalltalk world of objects is independent of the platform. and you can take a running system from one architecture and suspend it and resume it in a completely different architecture because nothing there is platform specific.
00:36:10
Speaker
Okay, so if it looks like I'm running my operating system on a Mac, I can save it at the exact point I was developing, move that over to Windows, and I would expect it to pick up exactly where the cursor was. You can move it to a Raspy, you can move it to a phone, you can move it to any kind of processor. It doesn't even need to use a similar processor. It's all after and out. How does that work then? what's What's the virtual machines job to get that to work? Well, the small compiler compiles code into a format that is called byte codes. And these byte codes are kind of a virtual machine language. Okay. It's not too different from a machine language, but it's a machine language that knows things like object references.
00:37:02
Speaker
and other low-level details, and it's not tied to a specific processor. And then it's part of the work of the virtual machine to sheet that into actual machine code for the machine that is running. So that sheeted code, you don't move from one machine to another, you just discard it. but But you asked about the the boundary of the Smalltalk system, and I just described one part of it that is to isolate the things that are platform dependent. The other parts are some services offered by the virtual machine that is part of this Smalltalk machine language, if you want, that is called byte codes. And it's what we call primitives. For instance, if you want to add two
00:37:49
Speaker
and intellers that feed in a machine world, that's what we call small integer in small dog. There is a primitive operation that does that. You don't need to to do the addition of small integers yourself. That would be too slow. Okay. So small talk has a very rich numeric hierarchy that includes large integrals and fractions. So you can easily do arithmetic with huge numbers without any limit on precision. um But the ones that fit into a machine where register, into a machine world are instances of Pacific class that is called small integral.
00:38:35
Speaker
And the virtual machine has services for doing small integral arithmetic, floating pointer arithmetic, and many other things. And there are a few other operations that are part of the virtual machines that are, for instance, and that are part of the assembly language. The assembly language is is not fully object oriented. It has the idea of a program counter and SHAMP operations. Okay. So in the, this you will never do while coding small talk. I'm describing the machine language to which it compiles in the wide code level in the machine language. There are SHAMP operations and compare operations and your high level
00:39:27
Speaker
ah control flow operations eventually end up generating bytecode that compare things and sham, for instance. Like any C compiler with you, in in C you write for, you write your initialization clause, your increment clause, and your limit check clause, and open your curly braces and write your code in there and the compiler knows that it needs to set a label in machine code to where it will sham up for each loop. okay And that there is part yeah one of those expressions that generates code that executes only once at the start, one that executes every time and for the increment and one that sells it
00:40:12
Speaker
it increments before jumping back to see if it needs to jump back or continue. So it the AC compiler turns a loop instruction into machine code with champs and comparisons and arithmetic. yeah The Smalltalk compiler does the same, but for the Smalltalk machine language. That is the right question. Right. Let me ask it this way. so I know one of the things you did for Quiese was to replace the rendering engine. yeah I've got the right terminology. How much of that work to to replace the way Smalltalk is rendered in Quiese? How much of that involved changing the virtual machine and how much of it involved changing the Smalltalk image that's running on it?
00:41:00
Speaker
Well, a the Smalltalk system, any Smalltalk system lets you access the pixels on the screen. okay So if you wanted to, what I did, the same you would do if you wanted to experiment with a new renderer for graphics, for instance, is to write a Smalltalk model for it that just paint each bit each pixel on the screen. And that is for Smalltalk and doesn't modify anything at all. And you can work quite a bit in that way until you understand what you are trying to to solve.
00:41:38
Speaker
Let's not forget that small talk is about learning and knowledge. So there's a lot of focus on understanding the problem you're trying to solve. It's not just about writing code. It's about understanding. And yeah yeah, that is important. And then you come up with something that's starts to look like the solution you need. okay You cannot use that for real because it will be ridiculously slow. It will it will take minutes to draw a full screen. okay So yeah what do you do with them? Well, in this regard, not all small talk systems are exactly the same, but the open source small talk systems are.
00:42:22
Speaker
And and they they they all derive, or most of them derive from from this quick system that was built in the 90s by Alan Kay, Dan Ingalls, and their team. And they designed the VM in a way that you could add modules to it. Okay, you you can expand the virtual machine. You don't need to modify the virtual machine is complex You don't need to modify the execution environment. You don't need to modify the Memory handling or the process scheduling or any of those Complex part of the virtual machine, but you can add new modules. Okay, so this is more talk code for your software render Can be
00:43:11
Speaker
semi-automatically translated into C, then you can turn it into a virtual machine model. So if you run quiz right now, and and for instance, you open a text window, type some text, and then for instance, rotate the windows like this, you will be using the software renderer abroad to draw true type fonts. And that is part of the virtual. It's a model that was added to the virtual machine. And that's why it's very fast. But if I need, and I will do that this year, I want to add dash sheet lines to the to the engine. And I had them in a previous experiment, but the current
00:43:58
Speaker
version in use doesn't let you use dashed lines. and Okay. So to do dashed lines, I already implemented this in the Smalltalk model. So if you want to use dashed lines right now, it will not use the virtual machine for those lines. Those lines will return in Smalltalk. And that is used today by a project called Dr. Gio that is for teaching geometry to high school students and it's used in certain countries. They are using what I'm describing to you today.
00:44:30
Speaker
and What I will do, what they are doing today, they are using only for dash lines, the small integration of the code. And what I plan to do this year is to add that to the to the vector graphics plugin that is part of the virtual machine. And then that would also work at full speed. OK, so the master code is still Smalltalk. The debugging, the developing, the experimentation is all done in Smalltalk. But when it is mature enough, it can be turned into a C and added to the virtual machine. But that C code, you never read it by hand. You only generate from Smalltalk.
00:45:19
Speaker
Okay, so it sort of gives you the best of both worlds. This was one of the very good ideas that Daniel and John Maloney implemented for this quick system, and we're still using it, and it gives you this loop. So you can do real-time stuff, high-performance stuff, in small terms. And just take it and go through some compilation process to turn it into what feels like a kernel level module. Exactly. Exactly. Okay. Yes. That's cool. Yes, it's wonderful. Yeah. That bridges us into something we have to talk about, which is what, what are you and what are schools and what are people actually using Smalltalk for today?
00:46:09
Speaker
Well, there are ah many companies that are using Smalltalk. I don't have much of this in my head, so I will most likely forget. But one of the the big or perhaps the biggest and semiconductor chip design software use is based on Smalltalk. So Smalltalk is used. Yes. for And for driving the the silicon wafer machinery, they they use a small talk system that has been evolving for a long time. You can Google a bit about this. I never worked with those people and I don't really know much, but I know that small talk is a very big thing for them. And I believe also most of the
00:47:00
Speaker
see container traffic in the world is and the logistics and the design of the of the allocation of resources and routing of containers is done by another big small talk system that has been online for decades. and I also believe that most of the financial models used by GP Morgan are also in small talk. I heard they tried to migrate to other languages a few times and always failed and they kept using Smalltalk. So those are some of the big business that use Smalltalk. Smalltalk is also used for education. There are and several universities that use it for teaching about programming. And another important user of Smalltalk is a company where I work
00:47:59
Speaker
it's called labware and we do laboratory software for the ah pharmaceutical industry and ah also for and food industry and oil and gas and mining and other industries where they need to track processes and track samples and lots of units being produced and being able to to track each product that was manufactured and and to comply with a
00:48:36
Speaker
with very demanding standards like in the pharmaceutical industry or the food industry or safety standards like in mining and oil and gas. Many industries use our software, it's one of the big players in this world and it's done in small talk too. Okay, but is is most of your is most of your time in a Smalltalk instance spent working on Smalltalk itself or working on software for other people? Is it your day-to-day OS? What's going on?
00:49:12
Speaker
Today, today but because i I have worked at many places and done a lot of different things at different times, one of the things I did that it that was super fun and and demanding and interesting was a framework for and satellite image processing that I did a few years ago. and But today, working for Labworm, I'm focused on small talk technology. So I worked for several years on a proprietary VM ah for running a proprietary small talk system for for them. And lately, or the last year and a half, I moved to ah working full-time on Quiz. Oh, really? Yes. librariesries is
00:50:00
Speaker
peace sponsoring the development of of quiz. And I'm no longer working on their proprietary software. Other people took over that job. And I'm focusing on... on on developing quiz and making it mature enough for big companies to use. that that's That's the the longer-timer objective. Most of the work I've been doing in the last year is about um solving specific problems that big business need, requirements from a small talk system that hasn't been addressed before because it wasn't my my focus before it was.
00:50:43
Speaker
Well, it was used for other businesses, and I use it at work for different projects over the years. and But they only in the last year, the focus is on or making it as as solid, reliable, and ah scalable for big teams and big systems as a commercial solution.
00:51:03
Speaker
that's that's fair and That is interesting. and The first thing that jumps out to me at that is, how do you collaborate? Because it seems like small talk is almost by design, like your personal book, your personal computer. How how does it work between images? Yes. Well, there has always been, at least since the first commercial so small talk appeared, someone assumes they the the position,
00:51:38
Speaker
the the role of a provider of of a standard small talk image. And most people work on top of okay that. that's that's in in If you used a commercial small talk in the old days, everybody used commercial small talk. Now most people use open source small talks. In the old days, it was a small talk vendor who you pay the license to use their small talk system, so they provided a small talk system. Right now,
00:52:13
Speaker
There are several small talk systems that are open source, completely free MIT license. ah But they are still maintained and developed by a small team of people and other people in the user community. m Of course, they are free to do whatever they want to them and to modify them in any way. But if they build a improvements, if they build new tools or they fix bugs or they enhance the system in in a significant way, what community members usually do is to submit their changes for integration upstream. It works a bit like the Linux kernel. okay The Linux can kernel is handled by a rather small number of people, but anybody in the world is free
00:53:06
Speaker
to fix a bug in the Linux kernel and say, hey, I fixed this. and And if it's true and and the work was good, it will be be part of the next multi-kernel, even if that developer is not part of the kernel team. It works exactly the same. What do I do? Do I send you a GitHub pull request with a bunch of small talk in or do I send you my and my copy of the image or what's going on

Development and Community Engagement

00:53:31
Speaker
there? No, please don't send me a copy of the image because extracting stuff from the image is... and
00:53:39
Speaker
Not very comfortable, okay? So yeah, so for for moving a code around, we use and text files with small top code. If you go to the to the, if you clone the GitHub quiz repository, it includes quite a bit of documentation on on how we do that. And you can use pull requests, or you can just use email. We have a community email list, and The good part of the dynamic of of each community it could be different, but in our community, and the the way we do that is with the BI email. We use email threads for discussion of contributions and stuff and attachments. That's one of the possible ways. If someone, and it happened as a
00:54:31
Speaker
bigger work. For instance, many people have built very significant pieces of software, and they host their own GitHub repos, and they store their code packages there, the small code pipe packages in their own GitHub repos. And when some of them are
00:54:55
Speaker
convenient for many people to use. and Sometimes what we do is to bring those repositories into the quiz small target organization. And the good part of that is that it makes easy for me and the other core maintainers and to to fix bugs or or to keep evolving that code. If someone chooses to keep it in their own repos to which I don't have access, I have but All the code is public, okay? I can clone any repo, and I can send pull requests to any repo, but I cannot commit to someone else's repo. If someone chooses to to to host their own packages in their own repo, only them have a commit rights, then they are also assuming responsibility for maintaining them. and yeah that fair But when they give that
00:55:51
Speaker
code to be the we become part of the Quizmodo organization. With Catalyt, you have an organization that can have many repos, okay, handled by the same people. If we add these new and repositories to the GitHub organization, it means that the community is taking responsibility for them now on. It is not third party, it's part of the of of what the community will collaborate to to to maintain and keep going. Okay, so you can actually choose where you want to be there. Actually, there is several people who have their own projects in their own repositories. They don't need to be GitHub. Most of us use GitHub, but there are people hosting repositories in other technologies, and it's okay as they can also file.
00:56:45
Speaker
and Yeah, it's it's your choice. OK, is this something that's likely to move inside Smalltalk, or has it already? I mean, is can i is there a Git client for Quiz Smalltalk? Will there ever be? Well, there are a several possible approaches to to this. Quiz is part of five million combinations of Smalltalk systems. Quiz was forked many, many, like 20 years ago from Squeak.
00:57:18
Speaker
And Squeak is still alive. It has a different set of worlds from Quiz. anyhow But we run for instance on the same virtual machines. And we consider our friends, many people are part of various small talk communities and use several small talk dialects. okay And another derivative of Squeak is called FARO. So the three main systems that run on this technology and that started with Squeak and Squeak, Quiz and Faro. And they have a different approach to what you say. Squeak uses a proprietary version control systems called Monticello.
00:58:01
Speaker
and That means that it uses It doesn't use Git usually. It uses its own server software and its own and file format and its own tools, and all the tools to work with that are part of this quick system, okay? Farrow moved to Git with a format for source code, and they integrated it they built tools into Farrow
00:58:35
Speaker
work with Git, okay using this Git services right from the small talk image. And in quiz, I choose to do it differently. In quiz, we use Git for versioning code and for storing code. and But the quiz-based image, the official image we distribute, has nothing about no It doesn't have and even networking loaded by default. If you want to use networking, you are networking. So all all it knows yeah by itself is about files. they So we use an external git client, usually the git command line, and well-known and file structure and file format for storing small.co.
00:59:30
Speaker
am The big reason to do that is to keep the image as simple as possible. I mean, the Git client, the Git command line works well enough for our basic needs. And and one of the idea of quiz in particular is that the base image should only include the tools and and and the things that a small talk developer needs to be effective. Anything else should be in packages you can load. It's still larger than base Python. okay In Python, you you import everything to work. and And base Python includes very little things. Quiz already includes a lot more because it has this morphic user interface framework with scalable graphics, and it has the divider, the inspectors, and the browsers, and the compiler, and all those things are part of the hard drive system because they are needed
01:00:26
Speaker
by a small talk programmer. But something like network access, web servers, client, a git, is something to be done in external packages to be loaded only if you need them. And and if you don't need them, don't load them because you don't need that extra complexity. So yeah so Quiz tries to be minimalistic in that way. So that's why it doesn't include a Git client by itself. Could it be done? It could be done. It could be ported. Perhaps the work done in FARU could be ported by someone if they want. yeah I don't think it will be part of the official distribution, but there is people interested in doing that. Totally welcome, of course. It might be a fun way to learn how to use Quiz and Smalltalk from the ground up, right?
01:01:23
Speaker
only if you are really interested in two quiz. okay My idea, yeah yeah you you know that there there are people who who say the good part of Smalltalk is that you forget about the external world and implement everything in Smalltalk. And there are other people who say the bad part of Smalltalk is that you forget about everything else and you implement everything in Smalltalk. Should you forget about the external world and implement everything in Smalltalk or not? Is it better to call the external libraries like Python does? Or is this better to forget about everything and do everything as part of the truth is that you can do as you wish. Okay, small developers enough freedom to do follow any of of these attitudes or any path in between. And this is my personal idea.
01:02:20
Speaker
Smalltalk is great for experimenting, learning, and documenting what you learn, your knowledge. okay So when you write Smalltalk code, you are you are a writing knowledge. It's a lot like writing a technical paper. okay So if something is core to my business, it's something I'm really interested in, it's something I really want to learn about and I really want to work on, I will do it in small, but no matter if some external library or already does that, I don't care. okay But if something is not my my my core activity, it's not my core interest, and I need that, but I'm not really that interested in that, then I will call whatever is out there. For instance,
01:03:12
Speaker
I think that Linus has done a great work with Git. And I don't want to learn every detail about it in order to to implement it myself. So but and shut called key okay but I But I'm really into graphics. So I wrote my own vector graphics machine. I could have used OpenGL. I could have used Cairo, for instance. But I'm be interested in in learning and I'm interested in the flexibility of being able to get to work exactly the way i I want. So that I write in small talk. It's not everything. Right. So it's not so much that you're trying to make small talk, your your like the operating system you live your life on top of, as much as it's like your research book.
01:04:07
Speaker
Yeah, that exactly.

Computing's Role in Thought and Understanding

01:04:09
Speaker
There are people who who who who go a bit in that direction and and would like Smalltalk to be the only software that runs on the computer and that is okay too. and And it was in the original Smalltalk system, it was the way because there was nothing else out there. yeah but But today, for instance, we are using this and this web meeting ah software that can handle recording, cameras, sound, everything. It's not written in Smalltalk, and I'm okay with that.
01:04:44
Speaker
OK, I did wonder. Yeah, and and I use ah a word processor and I use a lot of things that are not written in SmartDock. But for the things I am really interested in, I try to to create them, to build them.
01:05:03
Speaker
Because it's is' a way to to learn. Building is a way to learn. Oh, yeah, absolutely. Who is it? um Oh God, it was Gerald Sussman, I think, who said that computers are the best system we have for mate for clarifying our thoughts. Well, I don't know so who said that, but this is absolutely ah true. Yeah, yeah. I have a good friend who is a mathematician. He has several published papers and and work on on mathematical journals. So he's a real mathematician, the kind of people who do real math. and
01:05:49
Speaker
Polish. and And he used to say that when you're working in paper, everything works. And only when you try to make that work on the computer, you find all the details you didn't realize of the computer is very demanding in that regard, even for a medical physician. Yes, so this is what you're really trying to get to, the the flexibility of a notebook, but with the the rigor of execution. Yes, yes. yeah And and when with the lin dynamism that the paper cannot keep you, okay with simulations, with the live graphs, interactive stuff, yeah that kind of thing. Yeah, yeah it won't it won't project your ideas out onto an interact interactive chart.
01:06:37
Speaker
For instance, yes. Yes. Yeah. yes Yeah. OK. So the if someone I mean, this is a double sided question, but it's really the same question. If someone wanted to learn small talk, what would they need to know? And in what ways would approaching small talk change the way you think about solving problems?
01:07:02
Speaker
What would they need to know? Well, and when quiz evolved, and our community formed around it, we tried to, to give but our own suggestion to that our our own solution to that question. ah Okay. So a A good friend named Hilar Fernandez, the author of this Dr. Gio system that I told you before for teaching algebra to to middle middle school and high school students, wrote a book on quiz small talk.
01:07:44
Speaker
and Another good guy can decay and me help him, but he's the main author. So you have this, it's called the quiz book. It's aimed at people who don't know about programming at all. So it starts from, really from the start, a by and and guides you to what we could call the quiz philosophy or or the small talk philosophy of learning on a computer. So that's our big answer to that. Please read the quiz book. And read the quiz book with a computer at hand, where you can write play experiments, do the exercises.
01:08:34
Speaker
yeah And I get the sense that as a programmer, I'm going to look at this and say, the things I need to bear in mind is everything's an object, I can talk to everything, and I can interact and inspect and change everything. Yes. Yeah, that's absolutely true. okay Yeah. Okay. Another thing that that that that is a good example of that. A Small to 80 in the 70s only the had 7-bit ASCII character sets. And later in the 90s, the character set used was the latent character set of 8-bit 1-byte, one of one of of those character sets.
01:09:18
Speaker
And the it has been like this for quite long. And it was only not too far out i were not too far away that I added Unicode support to quiz. And to add Unicode support to quiz, I didn't modify the virtual machine. I defined a new string class that has several instance variables and that it holds its internal state in a byte array in UTF-8. But it does, but you as a programmer don't need to work with UTF-8 or UTF-16, like in in JavaScript or other programming languages where dealing with Unicode is super complicated. The Unicode string class is polymorphic with the old byte string class.
01:10:10
Speaker
And it does all the hard work for you. OK, so I was able to turn an ASCII system into a Unicode system without breaking client code and without modifying the virtual machine just by adding new class definitions and to the small talk system. So that's a good example of oh how you can modify anything. And that is not just because it's cool or interesting. It has very practical value. You can only evolve the system in any direction. that That's cool. I can't imagine any other system where you could actually overhaul a fundamental class-like stream. Yeah, that'd be tricky. okay um what What do we want to leave people with? Where's the future of Smalltalk going in your hands?
01:11:07
Speaker
Well, and the the the objective ah of Quiz is actually modest. The Quiz small talk system wants to to be a small talk

Smalltalk's Future and Community Involvement

01:11:22
Speaker
HD system. That means a classical small talk based on class definitions and polymorphism message passing and not much else. It's still as simple as possible. But it keeps evolving as technology evolves in the sense of using the latest machines, 64-bit addressing space, high resolution displays with high-quality graphics, so unique of course. So it the future for Quiz is still offer a system like that in the future, more polished perhaps as we keep enhancing it.
01:12:04
Speaker
But the interesting part to me is what can be done with such a system and what I expect people to do with such just it and a big news in that is, is Dr. Gio, big news in that is is the teachers, and like Hernan Wilkinson, Maximo Prieto and others using Quismalto to teach at universities. And in the perhaps not the distant future, I would like to focus again on things like music synthesis and sound, and digital sound processing. That's some of my long term interest. And also to give ah better tools to knowledge designers. The ultimate option should be to build a real Dyno.
01:13:00
Speaker
So yeah, we still don't have that, but we still don't know how to do that. So actually, the real reason why I did vector graphics for quiz is because I want to build writing media that for the reader is as good as PDF. okay So doing, for instance, I don't know, Jupyter Notebooks. Well, you will never write a scientific or technical paper in Jupyter Notebooks. You need to write it in PostScript and render it to PDF to have something that is nice to read. And less quality than that is not acceptable. So and how can I compete with that?
01:13:43
Speaker
from Smalltalk. Well, I need a high-quality and graphic system and I need a high-quality text rendering system and I need a full Unicode. And one of the things that I need that I will be working in the not too distant future is a way to create um and mathematical expressions and rendering mathematical expressions like PostScript does, but from the Smalltalk system. And that can be that it's not too difficult and it's it Absolutely required for writing technical material, right? Yeah, absolutely. It's totally believable that the um scientific papers of the future will be on something like an iPad, in many circles they already are. But if that was alive, that would be exciting. Exactly, exactly. The the best media for for reading is still paper. And PDF is paper, it's electronic paper, but it's still paper-like.
01:14:43
Speaker
and yeah And we finally need to to move beyond that with something that is not worse than paper in many regards. Okay. Yeah. Must be as good of that and better when possible. Yeah. Yeah. Yeah. I can finally see the future you're heading for and I hope you get there. It will be a better one. I think we'll get there. I'm not sure who will do it. I'm not sure if it will be done in small talk. But if, if we succeed, it could be done in quiz small talk. Yeah, that I hope so. I hope so. I wish you the best of luck for that future. And um maybe someone listening to this will be will be inspired by the ideas and become part of that future. I hope so.
01:15:36
Speaker
Yes, of course. we Quizz is is open source MIT license. It's on GitHub. All the development and the discussions and the activity is open to anybody. We have monthly meetings anybody can attend. and We have a mail list anybody can read it right there. So anybody who thinks this is interesting, yeah, please join us. yeah we waiting more for you all this We'll put links to those in the show notes. And when you've when you finally got round to the music synthesis stuff, I'll invite you round for a jam session.
01:16:17
Speaker
Oh, well, I'm too shy to consider myself. Even though I'm a musician, I studied music when I was a kid, but I don't play much lately. It's the other great field of human experimentation, right? Yes, yes. it it would be It would be great. It would be great. I have written some and music since myself and anders and I plan to get and to actually my master thesis was on how to better represent sound in the time frequency plane. If you are into it's extremely interesting area.
01:17:08
Speaker
yeah We can do so much better than the that the short-time Fourier transform. There are things to to be done there. My thesis was a small this step in that direction. Oh, we might have to dive into that in another episode. If I can dig up the paper, I'll link to it in the show notes, too. OK, OK. But for now, Juan, thank you very much for joining me. Thank you, Chris. This has been great, a lot of fun. Thank you, Juan. And quick story, in case you're wondering, Juan told me something that didn't quite make it into the recording. Why is Qweese called Qweese? One of the key implementations of small talk was called Squeak, after the sound a mouse makes. And in one spot of the world, there's this little roadside hamster-y thing, and the noise that makes is Qweese.
01:17:59
Speaker
So that's the origin. If you're searching for it, it's spelt C-U-I-S, or you could just head down to the show notes for links to the Qweese website and all the other references that came up in that discussion. While you're scrolling down to the show notes, if you liked this episode, please leave a like, rate it, review it, share it with a friend, and make sure you're subscribed because we'll be back next week with another interesting voice from the world of technology. Until then, I've been your host, Chris Jenkins. This has been Developer Voices with Juan Vula Teach. Thanks for listening.