7 minutes of Pharo Smalltalk for Rubyists
Avdi Grimm5 HN recommenders · 2017–2026
37K views · demo · evergreen · Uploaded 2015-05-11
Ruby developer Avdi Grimm gives a seven-minute tour of Pharo Smalltalk's development environment, focusing on tools like search-by-example and the integrated, live coding experience.
HN recommends it as a quick, compelling look at what Smalltalk tooling feels like, especially for Ruby programmers.
53:22Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich
Confreaks
2:25:52The spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
49:55How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
38:47RailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
26:53What the heck is the event loop anyway? | Philip Roberts | JSConf EU
JSConf
40:20"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson
Strange Loop Conference
1:03:55🚀 TDD, Where Did It All Go Wrong (Ian Cooper)
DevTernity Conference
54:20Bret Victor - Inventing on Principle
Rui Oliveira
15 comments from Hacker News
> * Tests are now common and considered a good thing. A new contributor can write code without worrying about breaking rarely-used functionality. btw, xUnit testing originated with Smalltalk. [LINK] > * Many languages have package managers. Using latest third-party library is now simple Metacello is Pharo's tool for defining dependencies between libraries [1][2]. [1] [LINK] [2] [LINK] > * We have great deployment mechanisms -- one-command deployments are common, containers and version pinning help reproducibility. Pharo Catalog provides a GUI one click installer of Metacello configurations [LINK] You can also load Metacello configurations from the command line per last snippet of [1] Metacello provides version pinning. You might consider every Smalltalk Image to be a container. Its like a uni sports tour. What happens in the Image, stays in the Image ;) > * Some languages come with support for interactive REPL -- you can evaluate arbitrary commands inside running processes. As you say, Smalltalk has a super REPL. How easy is it for other REPLs to modify and query the code of the system? For example in Pharo if I define a class and methods like this... Object subclass: #MyClass instanceVariableNames: 'count' classVariableNames: '' package: 'Demo'. MyClass compile: 'setCount: anInteger count := anInteger'. MyClass compile: 'getPlusFive ^count + 5'. I can do this... obj := MyClass new. obj setCount: 3. obj getPlusFive inspect. ==> 8 MyClass methods asString ==> '{MyClass>>#getPl
I don't agree with 'ageofwant’s prediction (though I really wish that I could), but command discovery is a solved problem: Pharo Smalltalk has a nifty feature whereby you can find methods by example[1]. E.g. typing 'hello, world', 'HELLO, WORLD' in the finder returns the method `asUppercase` on the String class. In a statically-typed language, you can just search by function signature (e.g. Clip -> RotatedClip (an effect) or Clip -> Time -> Clip * Clip (a cut)). [1] [VIDEO]
Rubyists might know of Ruby books written by Avdi Grimm, who recorded his early experience with Pharo... [VIDEO]
As a long time Ruby developer I frequently hear older developers talking fondly about their experiences working with Smalltalk long ago. When I saw this post, I was curious enough to watch a video just now by a respected Ruby dev (who's admittedly new to Smalltalk and using an older version of Pharo): [VIDEO] . The video is short, but it looks to me like the advantage of developing in this environment is mainly that you can write a test, run it in a kind of debug mode, and when the environment encounters something it doesn't understand it gives you some options for creating something new like an object or a method to solve the problem. This seems kind of cool, but I feel like there must be more to it. Can anyone better explain the selling point, or share a video that highlights how this environment is so cool?
There's this recent video showing a little of what the Pharo Smalltalk environment is like: [VIDEO] The video was made by a Ruby programmer, rather than an experience Smalltalker, so it's more a newbie showing you cool things he's discovered, rather than an expert showing the power of the system. On the other hand, there's this one: [LINK] That one is an expert, Kalman Reti, showing some of what it's like to work with a Symbolics Lisp Machine. (It's not a real Lisp machine; they're all at least thirty years old now; this is an emulator running the old Symbolics OS on Linux). Go to YouTube and search for Rainer Joswig and you'll find a few video demos of Lisp Machines and MCL and so forth. Finally, here are a few images from about eighteen years ago, also from Rainer. They show various views of the Macintosh Common Lisp and SK8 environments. It's not an experienced user showing you around, but at least you can get some idea what the environments looked like: [LINK]
Anders explains it better than me, "Anders Hejlsberg on Modern Compiler Construction" [LINK] Basically ability to see the language AST at all time, do time checking with broken code, incremental compilation, REPL and IDE editing experience is fused together. Here is another short examples, "7 minutes of Pharo Smalltalk for Rubyists" [VIDEO] "MountainWest RubyConf 2014 - But Really, You Should Learn Smalltalk" [LINK]
That's a good suggestion. Walking through a set of interactions is a solid idea. For what it's worth, there are some videos around of people actually doing it with Lisp and Smalltalk systems, and pjmlp already posted a pile of them elsewhere in this thread. I can add a few more: Kalman Reti walking through some interactions with a Symbolics LispM repl: [LINK] Brian Mastenbrook demonstrating Interlisp's SEDIT structure editor in the Xerox Lisp environment: [LINK] Rainer Joswig (lispm here on HN) showing us a little bit of repl and Zmacs interaction on a Symbolics Lisp Machine: [LINK] Rainer again, showing some simple interactions with Macintosh Common Lisp, which was my daily driver for years: [LINK] Ruby programmer Avdi Grimm shows some things that he found cool about Pharo Smalltalk: [VIDEO] Dan Ingalls (one of the original authors of Smalltalk) in a 2017 demo of Smalltalk 76: [LINK] There are some other things I'd like to find for lists like this, but haven't been able to. In particular, a good demo of Apple's SK8 would be great. If you can imagine a full-color Hypercard that could crack open and reprogram absolutely everything on the screen, including the machine code that drew the window system's widgets, all in a repl while the code was live; in which you could grab an arbitrary widget and drop it on the repl window to get a live variable reference to the widget, and then inspect it, operate on it, and reprogram it, again, while everything continued to run; in which you
IMO high-level, low-tech DSLs are under-explored. Lots of possibilities there. I don't think you're necessarily limited to just text-based DSLs though; there's interesting opportunities when you pair with a UI. For example, see Pharo: [VIDEO]
You're welcome. To illustrate what the Pharo environment looks like, I'd also recommend this short 7 min video by Avdi Grimm: [VIDEO]
I think the most distinguishing feature is the superb environment and tooling that is a integral part of the language, by default, in most Smalltalk dialects. The tooling is so seamless integrated, that you're nudged towards simply code inside the debugger. Things like search method by example feel like a superpower. See [VIDEO] If you're interested in experience what a modern Smalltalk looks like, I strongly recommend the Pharo programming MOOC. It was a eye opener for me: [LINK]
In terms of surface area, I think is hard to beat languages in the Smalltalk family. Smalltalk has only six reserved words: true , false , nil , self , super and thisContext. To emphasize the simplicity, there is even a smalltalk postcard to show the whole syntax fits on it. See [LINK] I think this postcard remark may be a bit misleading sometimes, as in practice the complexity is shifted from syntax to the large class library in the system image, that packs a lot of functionality. But yet the environment is sweet and has great discoverability, with functionality like search by example. See [VIDEO] The Smalltalk flavor I strongly recommend is Pharo. There's a MOOC[1] on it, and there are several free books that cover the basics of the language itself[2][3], data visualisation[4] and numeric stuff[5]. [1]. [LINK] [2]. [LINK] ... [3]. [LINK] [4]. [LINK] [5]. [LINK]
As a rails developer - my introduction to Pharo started with this video: [VIDEO] If you're not a ruby/rails developer you can still see how awesome it is, but for rubyists specifically it can really be quite mind blowing.
> The problem I've seen with this idea is that in order for it to work, you have to be willing to add more metadata to your program, because programs themselves don't have the necessary data in them. You can make it mandatory to your language, but than just raises the friction for people trying to use that language. I'm confused by what you mean. Can you be more specific as to what sort of metadata that has to be embedded in the code would be needed? I've never used it, but watching this Smalltalk-80 IDE demonstration seems like it could be a workable idea. [LINK] Edit: A more modern example using Pharo. You can see in the video that he's not accessing files, rather everything is sorted into packages and classes. [VIDEO]
MountainWest RubyConf 2014 - But Really, You Should Learn Smalltalk - [LINK] 7 minutes of Pharo Smalltalk for Rubyists - [VIDEO]
As a Ruby developer this video about Pharo smalltalk made me a smalltalk believer — not surprising because Ruby was heavily inspired by smalltalk. [VIDEO]