Pharo4: Plans and Dreams
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 199 | |
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 | 10.5446/32605 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 201479 / 199
2
3
10
11
12
13
14
17
18
19
23
24
25
27
29
45
46
47
48
49
50
51
52
55
56
57
58
65
67
68
70
72
74
75
76
77
78
79
81
82
84
86
87
89
90
93
94
100
101
102
103
104
106
107
109
110
111
112
113
114
115
119
122
123
124
126
127
128
129
137
139
141
143
145
147
150
154
155
158
161
163
164
165
166
168
171
174
175
176
179
182
183
185
188
190
191
192
194
195
196
00:00
Presentation of a groupRevision controlLikelihood functionLecture/Conference
01:30
View (database)MathematicsProcess (computing)Goodness of fitRule of inferenceGroup actionMultiplication signObject (grammar)Source codeGodPoint (geometry)ImplementationLecture/Conference
05:27
Numerical analysisGoodness of fitMeasurementPhysical systemFormal languageRight angleProgrammer (hardware)Object-oriented programmingAdditionPoisson-KlammerLevel (video gaming)Square numberGastropod shellMoment (mathematics)Scripting languageArithmetic meanComputer virusReliefMultiplication signINTEGRALComputer programmingObject (grammar)TheoryState of matterDemosceneMachine visionScaling (geometry)Classical physicsMereologyQuicksortPlotterCategory of beingData structureProcess (computing)Matching (graph theory)PreprocessorMathematicsTheory of relativityDemo (music)Software development kitFunction (mathematics)Primitive (album)Term (mathematics)Interior (topology)Block (periodic table)Equivalence relationElectric generatorType theoryVideo game consoleCompilation albumComputer animation
13:18
Scripting languageAdaptive behaviorMetadataSoftware frameworkBridging (networking)Type theoryQuicksortMessage passingMultiplication signNumerical analysisTheoryObject (grammar)Functional (mathematics)Subject indexingInformationComputer fileFunction (mathematics)Descriptive statisticsRevision controlCodeParticle systemBlock (periodic table)INTEGRALComputer programmingComputer fontRight angleComputer architectureReal numberStandard errorParameter (computer programming)AdditionString (computer science)Data storage deviceState of matterMobile appMereologyNormal (geometry)Computer virusWritingStandard deviationError messageSoftware architectureXMLComputer animation
18:29
CASE <Informatik>Message passingFormal languageBitCartesian coordinate systemInstance (computer science)Computer programmingRemote procedure callQuicksortSpecial functionsObject (grammar)Level (video gaming)DampingData dictionaryVariable (mathematics)Cellular automatonSimilarity (geometry)Presentation of a groupComputer animation
20:20
Physical systemInstance (computer science)MereologyVariable (mathematics)Constraint (mathematics)IdentifiabilityFunction (mathematics)Polymorphism (materials science)Operator (mathematics)Connectivity (graph theory)AsymmetryScripting languageBitFormal languageLecture/Conference
21:27
Different (Kate Ryan album)Programming paradigmComputer programmingSoftware architectureModel theoryEndliche ModelltheorieObject (grammar)DatabaseUML
22:00
Endliche ModelltheorieOrientation (vector space)Multiplication signSystem callMereologyVariable (mathematics)Procedural programmingComputer architectureType theoryVarianceTheoryComputer fileTerm (mathematics)Cellular automatonFigurate numberIntegrated development environmentFormal languageRule of inferenceFunctional (mathematics)Right angleMessage passingPhysical lawWeightQuicksortWell-formed formulaFilter <Stochastik>Arithmetic meanDataflowProper mapInstance (computer science)Sign (mathematics)Local ringErlang distributionSoftware architectureLecture/ConferenceUMLProgram flowchart
24:55
CodeUniverse (mathematics)Category of beingInstance (computer science)InternetworkingNumbering schemeProcess (computing)Right angleData dictionarySemantic WebPoint (geometry)Functional (mathematics)Computer programmingBitObject (grammar)QuicksortEndliche ModelltheorieKey (cryptography)Formal languageDifferent (Kate Ryan album)Dynamical systemMereologyAbsolute valueCASE <Informatik>Pattern languageIdentifiabilityType theoryWeb 2.0Lecture/Conference
27:21
Process (computing)Physical systemType theoryGoodness of fitComputer fileData managementMultiplication signHierarchyDemo (music)Lecture/Conference
27:57
ConsistencyDirectory serviceVariable (mathematics)Stack (abstract data type)1 (number)Integrated development environmentRevision controlDemo (music)SoftwareComputer fileWebsiteSource codeDuality (mathematics)Electronic mailing listVirtual machineStapeldateiSign (mathematics)Set theory
30:37
Compilation albumObservational studyWebsiteMultiplication signComputer architectureArithmetic progressionObject (grammar)Water vaporSoftware architectureRepository (publishing)CompilerComputer animation
31:12
Multiplication signRevision controlView (database)Uniform resource locatorDialectCountingObject (grammar)Figurate numberElectric generatorRight angleSystem callMathematicsBitSpeicherbereinigungData storage deviceRun time (program lifecycle phase)AlgorithmInstance (computer science)Block (periodic table)Mobile appLecture/Conference
Transcript: English(auto-generated)
00:01
Six more minutes before the next presentation.
01:43
Yeah, good job. Oh my god. But is it though? Is it really?
02:00
I don't know. Zero point one? We still have four minutes before we start. Yeah. I just wanted to see whether...
02:21
I'm just going to do that.
03:32
So tell me, basically, based in London or in Berlin? Berlin. Okay.
03:45
Sure. Sound check one, two.
05:05
Sound check? Okay. Okay, next speaker. Marcel Weyer, objective small talk. Old squeaker from a long time ago. A long, long time ago. I've seen source code with his stainless.
05:20
Yes, you have. Okay, so I'm talking about objective small talk, one of the two non-classic small talk implementations we're going to talk about today. That's my own company, MetaObject. It's been around for a while. I just recently started with Wexwunderkinde in Berlin, a startup.
05:43
And I'm also attached to the Hasselbladler Institute in Potsdam, doing my PhD, which is related to this stuff. So a lot on my plate. And I really like small talk. But I also really like C, because it really lets me get stuff done at the low level.
06:02
So I really love Objective-C, so much that actually way back when, anybody remember the Amiga? So I got my first Amiga, and the first thing I did is I implemented an Objective-C preprocessor for it. And that was a little over a quarter century ago.
06:24
Scary. And then Next came out, and they did the job for me, and it's now lost to history. The Squeak stuff, yeah, I did some VM work a long time ago, the first CocoaVM, which is also lost, because it wasn't very good.
06:41
And the stuff that's currently still in the image, I think, is the PostScript generation. So that's sort of where I come from. And being an Objective-C programmer, it's a great language, but it does have limitations, because originally it was really meant as a stopgap measure
07:04
for those situations where you couldn't use Smalltalk, and that's really kind of changed a lot. So it would be really nice if you could simplify it back down again. On the other hand, the Smalltalk never really caught on with me. I mean, I was in the community for quite some time,
07:22
but I could never really use it for my day-to-day work, which is kind of sad. So it'd be nice if it'd be more practical, if I could actually use it for my work. And finally, I've always really been on the lookout for something to make this whole programming thing a little better,
07:42
because quite frankly, programming sucks, in my opinion. I mean, we really deal with all these low-level things, and we're not really getting anywhere. And I don't think this is not going to be a huge leap, but maybe we can make it a little bit better. And so the first thing is, you know,
08:04
let's simplify Objective-C, and this is why, right? Objective-C has really grown over time. It used to be just a system for wrapping C programs in little Smalltalk-like wrappers,
08:21
but we've kind of stopped doing that. We're actually using the object system. And as that, it's not really very good. I mean, you know, if we want to have an object number, that's NSNumber number with int 4. Well, that's not really good. We need square brackets. Now, recently, there's been some additions. So we can say at 3 and at 4.
08:43
But again, if we're going to do that a lot, that's just going to be really bad. Whereas, you know, if you use just plain integers, that looks right. You know, that's actually okay, because the problem is we have two syntaxes, two languages jammed together.
09:00
And, you know, that's just not a really good idea in the long run. And here, this is one of my favorite examples. They added blocks recently, and that's what a block looks like that logs these two to the console. What happened here, right? So, maybe, you know, if it could look like this, right,
09:25
like small talk. And that's pretty much the same examples, except they kind of look okay enough. And we still want to have both these systems, the object system and the primitive system, because, again, I like C,
09:41
and sometimes we need to talk to the C world. But we can do it much simpler, because we can just do a little type annotation and say that's an integer, and that's a C integer, and the rest, it's just objects. And so that's kind of the motivation there.
10:00
And in terms of just being a more practical small talk, I mean, the small talk, the image, it's a great concept, but again, the world has changed since 1980, right, or even the 70s when it was created, when Xerox PARC had their altos,
10:20
there was really no outside world to talk to. So, you know, having an image and having your own world with you, that's fine. Are there other reasons you could have for doing that, other than there's no interaction? Oh, it is a great system, right? And isn't the argument, it's not the 70s anymore, a little weak, because eventually it will be 30 years from now,
10:42
people will say it's not 2014 anymore? Oh, absolutely, and it'll change, right? I mean, I think, again, it's a pragmatic thing, right? If you have a world where you're comfortable in the image, that's great, but many people don't, right?
11:04
Why do we have Ruby? I mean, and Python, right? I mean, small talk should be better than the systems. But I think one of the big problems that people had is, you know, they couldn't integrate with their command line tool.
11:21
You can't do an SSH and run your small talk. So. But you don't have to choose one or the other. It'd be nice if you didn't. It would be really nice. I mean, certainly, it seems to me you can build a nice image, you know, on top of that.
11:42
It seems to, I mean, just given history, it seems to be difficult to get a good scripting Unix shell integration on top of the image. We've been trying for a long time, and we have systems, but even the fact that we have so many of them seems to indicate that maybe we don't really have a good answer.
12:04
So we want to run on the native ABI. We have a nice little object system that's very small talk oriented with Objective-C. It's very small. So we have no VM, we have no image, and we don't even have a GC, which is, of course, crazy talk.
12:21
There's a REPL. You get to do Unix scripting. Right now, the static compilation is a future thing. I'm working on it. It's not there yet. Same with Objective-C. It should be the equivalent. And the other part of being within these other systems is that there is just so much more other code around.
12:41
There's vendors, you know, Apple does courts, they do all these kits. Having to recreate all that just doesn't scale. David Chismol did a nice, he was here last year, I think, right? And he had a nice little paper where he did some numbers, and he said, even if small talkers are 100 times more productive,
13:03
they still couldn't match the output of just what is there in C world. So, what do we have? Let's do a little demo.
13:23
I'll pick up my cursor. Okay, so we have a small talk scripting shell. And so, you know, we can do three plus four. So, yay, it's a small talk. We can do, we can just write stuff down, right?
13:42
So, hello. We can send messages to standard out. We can do standard string concatenation and that all sort of works.
14:01
We can do slightly more fancy stuff. So, if we, let's say, we have an interval that works, except we don't see it as, oops, and I need to remember my syntax, right?
14:21
And so, all that sort of stuff works. And, of course, the example we had, the Objective-C block example, let's do that a little better. So, we had a couple of strings, maybe A and B. And we do, do.
14:54
So, your basic small talk works in the command line. So, I mean, new small talk is a little like that.
15:01
But I think it's, this is a really useful capability to have, especially since you can start doing real scripts. For example, just to get sort of some of the syntax out of the way, what FromTo does is really simple.
15:21
It just counts. So, I think that's pretty trivial. And if we look at the, look at the script itself,
15:46
you can see there's a normal hashbang, there's another hashbang here, and that does an integration between what is a script and what is a method. So, it's really saying, this script is a method
16:03
FromTo with two parameters, FromTo, and then it just prints them. And having this type of meta information then allows me to, for example, do some error checking, right? Completely automatically.
16:21
Because I declared what I need, and it's saying, well, you didn't give me what I need. And so, what you have is starting to get a software architectural idea of adapters, where you have this, the scripting world, and the method, you know, the objects and messages world,
16:40
and you're starting to try and bridge the gap a little bit. The other thing you can, of course, do is, let's see, where do I have it? You can start bringing in code from your,
17:04
again, from your object world. There's a, this is the app kit, it's the basic GUI framework in part of Cocoa. And so, this, what this will do is it will load a file and it will try to initialize an image
17:21
and it will just log that. So, it will tell you what the image is. So, if I have image info, there's a JPEG somewhere here, there it is, New York City. And, well, it's telling me, yeah, I have an image rep, it's got a size, 645, 1136,
17:41
and some information about the data. Again, you're bridging those gaps and bringing things closer together to make it easy and just become more productive. Usually, what happens is, when you have these two worlds, you need to, the bridging code tends to be so much more
18:05
than the actual functionality because you're, especially if you're doing small things, that you don't do it. And then you need to write a seek, either a full program or you need to get these other packages involved.
18:21
It just becomes more cumbersome. Okay, back to slides. So, this was trying to being object to C and Smalltalk together. And now, we're going to talk about a little bit
18:42
trying to go beyond Smalltalk. And, again, the idea is something about that Marcus talked about a little bit, trying to specialize the language, right, because we tend to, at higher levels
19:02
when we're doing application programming, it's often the case that we're doing something very similar but just sufficiently different that we have to reinvent it from scratch. For example, a typical example that he also gave, if we have something that is conceptually really an instance variable,
19:21
but we need more of them and they need to be dictionaries or we need some special functionality when they get called. We can't use the language anymore directly. We have to build the scaffolding on top. Similar with messaging. If we want to have the built-in messaging, we're fine.
19:40
If we want asynchronous messaging or messaging applied to collections or some other form or remote messaging, we kind of have to build it ourselves, possibly go through the D&U handler. In the end, if 90% of your program is going through the D&U handler, maybe the language needs a little bit fixing.
20:04
So, again, the idea is, well, what's sort of the next thing? Well, actually, we just need to apply Smalltalk to itself. We need to be able to subclass and compose the pieces that make up the basic system,
20:22
and then we can build whatever language we need, which, for example, with the scripting we just showed. And the components there are polymorphic identifiers and first-class references, which generalize the idea of an identifier and an instance variable. I'll talk about that.
20:41
Messaging, so we can play around with that. And finally, and that's the part that's least well-developed, that's data flow, which is... Also, one of the strangest asymmetries in Smalltalk is the assignment operator, right? It's kind of the one thing you can't override. There's deep reasons for that, but it would be nice if we could,
21:03
for example, have custom assignment, have constraints where it's not a one-time assignment, but we just say this should remain, or have pipes saying, well, it's not that we just want to shove this one thing over here, but we actually just want to connect these two things
21:20
and keep them connected. And the inspiration for solving this is really a software architectural approach. And actually, the original book by Brad Cox on Objective-C talked very much about software architecture and packaging.
21:41
And another fantastic one is this one, which puts up techniques and models of computer programming. Although they sort of base everything on the functional model, they manage to get the relationships between different programming models in there and classify how far can you go with a particular model
22:03
and when should you maybe move on to something else. Am I doing on time? Okay. And so I went and thought about things for a while and came up with this. What's that?
22:21
This is a classification of small talk in terms of software architecture. You have basically, the basic fundamental construct is the connector, which is just, you know, when you have architecture, you need to put things together somehow. And the classification I have done here
22:41
is just that there is data flow. So, you know, assignment, types and filters, the type part of the type and filters return values. That's a data flow connector. You have access where you have instance variables, local variables. Somewhere else, you know, in UNIX, we have environment variables. Small talk doesn't have environment variables,
23:02
but they could. And then we have messaging, which I've used as a sort of generalization of what a procedure call could be. And a procedure call is a type of app, but we don't have that in small talk. We have small talk messages. But we could have Erlang messages instead, right?
23:21
Which are asynchronous. We can have notifications which don't really have a receiver. And all these are types of messages, but again, we are, in small talk, we have these things. And that characterizes a specific language. And when we have a different language,
23:40
we have the same overall picture. It's just the two different parts. This is shell script, right? So we still have assignment. Now we have types. We have local variables with a function dollar sign usually. We have environment variables. We have files, which,
24:01
I mean, in small talk, you can't directly connect to a file. In a shell, we just write down the file. Right? And we have procedure calls, but we don't have messages. So why is this, right? It seems completely random to me, having looked at it for a while. And of course, your particular problems will therefore call for different languages,
24:24
but for no really good reason. It's just somebody decided, well, we're going to split it up this way. And what if you could just decide to mix it yourself?
24:41
So one of the cornerstones of that, and it actually took me a while to figure that one out, is you have to be able to name things properly. And before you can start messing with the other parts, you need to actually make naming flexible. And that's what polymorphic identifiers are all about.
25:02
And there was just a DLS paper in October, the Dynamic Languages Symposium. It's sort of part of OOPSLA. And the basic idea is really just take the concept of a URI from the web and put it in your program.
25:20
A, you can actually also write URIs, so HTTP something, something, something, and have that simply identified in your program. Hasn't RDF already done that? RDF? It's got URIs for different types, so there's no reason why you couldn't use those types
25:42
that exist in RDF. You mean Research Description Framework? No, it's a semantic web. Right, yes. Well, yes, absolutely. I mean, I could have used something else and come up with my own, but we have URIs,
26:01
and they're called Universal Resource Identifiers. Universal, come on, come on. So I just decided to take them. Syntactically, that makes some things a little bit more difficult, but I think the pragmatics outweigh that in this case. So yes, this is really just importing that concept
26:22
into the programming language, the existing concept. You can then make a user accessible. Every scheme has a handler, and you can define your own handlers.
26:44
This solves a lot of issues. For example, the property pattern where you have dictionaries, accessing the dictionary, you use string keys. If you look, for example, some of the Apple code, Xcode is 90% dictionaries.
27:02
Which seems odd. You would think that one might want to model actual objects with functionality, but no, it's dictionaries. And there's reasons for that, but again, the reasons really aren't very good in the end. You can also do something which I call in-process REST,
27:22
that essentially you build these file system-like entities, but you do that inside the process. And we had very good experience re-engineering our DPC system using that type of technique, because it allows you to do the hierarchical management of data
27:43
flexibly without having to have an external file system, for example. So, quick demo. Ooh, out of time almost. Let's just see.
28:01
Do I have a network? I do not have a network. Fosdom dual stack. Yikes. I'll try to do some of the other stuff first. There are two other networks. Yeah, but the other ones don't seem to work
28:21
with my machine for some reason. Yeah, I don't know why IP version 6 is. Yeah, they're IPv6, maybe that's... Yeah, and it should work. I mean, other Macs seem to connect, it's just mine doesn't like it. I noticed some of my Mac apps don't like IPv6. Okay, so. Go back here.
28:43
My standard example. Goes and says meow. Anybody ever looked at the source code? They have the meow at the end. I can now put that in a variable. I say... So, how long is that?
29:02
Well, it's 155k. Let's put that in a file. And that just works. And I can also, of course, I mean, I could have done that directly, right?
29:30
Variables actually also have a scheme, so let's use a different one. B doesn't exist, so let's assign it. But that's actually the same as if I say bar B.
29:44
I can access environment variables. So, what's my home? Okay. I can nest them. So, if I have home, I have a listing of my home directory.
30:03
And, again, it's integrated, so I can just... Yeah, there's a little consistency there. So, I have 89 files in my home directory. Or I can just retrieve something from there.
30:24
A long bash resource. Okay, I think sadly I'm done. And, of course, I wasn't... Let's see. But, actually, that was my last site. I have more demo stuff if people are interested.
30:42
Objective.st, that's a site. There's a reference to GitHub repositories. Basic idea, we want scripting compilation. Why do these need to be distinct? Objects in Unix also should look much more nicely together, and software architecture is the answer. Polymorphic Identify Home are some of the techniques used to implement that,
31:04
and the static compiler is in progress, but I currently don't have time. So, thank you for your questions. Short question? How hard is the algorithm for all of that?
31:22
Because, basically, objectivity isn't that much limited to Apple. Oh, absolutely, yeah. I've had this running on Linux. I made some changes, so I think currently it's not. But that's... it generally shouldn't. I mean, it shouldn't be limited. Okay, yeah. So, basically, you have some instance where you just replace the one-time lookup function,
31:43
or do you depend on, for example, libobjectivec2 by David Chisner, who implemented the same lookup API as Apple? Yeah, I had both versions, and it keeps changing around a little bit, but it's not really a big deal.
32:02
The thing that's currently maybe a bit of a problem is that I'm starting to use the block stuff, and I just haven't looked at how that works. It's in the new step, as far as I know, and in Chisner, there's a runtime. That's the same API. Right, and it should work, it's just I haven't gotten run to it. So, if you want to look at that...
32:23
Yeah, well, I actually have my own runtime, so I'd rather fall into that. Okay, well, over that, yeah. So, question. There is no garbage collection yet? There is no... objective-c has reference counting.
32:40
Okay. And various techniques for dealing with circular dependencies that are not a full garbage collector. I used to have it. It sucked, and it didn't work, and so they ripped it out again. Can we use it on the iPhone? Yes. This is iPhone-compatible.
33:00
I don't think I currently have any apps in the store that use it, but it's... They also accept the apps that you submit? So, I haven't tried this particular thing, but it's designed to be compatible, and it doesn't use a chip. Thank you very much.
33:20
Thank you.