11 ms·
Pharo: An immersive programming experience
- another-cuppa 8y agoWhat is the purpose of this? Education? It sounds like yet another reinvention of Lisp.
- justbaker 8y agoActually, its an IDE for modern “Smalltalk” development. Pharo has a few extensions vs Smalltalk-80.
- tyingq 8y agoIt is a little odd that the homepage doesn't say Smalltalk on it anywhere.
- xrd 8y agoIt says seaside at the bottom, which is a well known framework for it. But, yeah, they could do better.
- tonyg 8y agoI wonder if there's something akin to the thinking behind the renaming of PLT Scheme to Racket going on.
- dragonwriter 8y agoPharo doesn't call itself Smalltalk but a language inspired by Smalltalk, but that's a matter of fairly arbitrary line drawing.
- chess_buster 8y agoI guess you're trolling
- another-cuppa 8y agoTrolling by asking a question to which I wasn't able to find answer after a good few minutes on the website?
- chipotle_coyote 8y agoI'm not sure "trolling" is fair, but perhaps phrasing your confusion more as "the home page doesn't give me a very clear idea what this is," which is true; the actual front page doesn't mention Smalltalk at all. I suspect that they wrote it with the expectation that nobody just "ends up" on the Pharo web site without having some idea what it is already. Under normal circumstances (e.g., not being linked from the front page of HN) this is probably a reasonable assumption, but it couldn't hurt them to have something like what Squeak.org has: the first full sentence on its home page is "Squeak is an open-source Smalltalk programming system with fast execution environments for all major platforms." Having said that, how few minutes qualify as "good"? Because if you click "About," that page has a heading that says "Pharo features" whose first bullet point reads "A dynamic, pure object-oriented programming language in the tradition of Smalltalk."
- another-cuppa 8y agoIt still doesn't say what the purpose of it is. I don't really expect it to either. I expected that asking the question here would be OK, though.
- jplayer01 8y agoYou're being downvoted because saying it's some imitation or reinvention of Lisp is a gross misrepresentation. Pharo's lineage takes it back to Smalltalk-80 beginning in 1976, at the very least.
- another-cuppa 8y agoWell it doesn't say that. I just said it sounds like a reinvention of Lisp because that's what it sounded like to me from what it says on the homepage.
- codr4 8y agoIf I remember correctly at least Alan Kay openly admits being very inspired by Lisp. Unfortunately the limitations/walled gardens they chose to impose in the name of simplification, everything is an object etc, had us running in circles for a long long time. My guess is it was picked up by managements for the same reasons as Cobol, Java, Go etc.
- AlexeyBrin 8y agoThere is a Pharo MOOC currently running: http://mooc.pharo.org/ http://mooc.pharo.org/ https://www.fun-mooc.fr/courses/course-v1:inria+41010+session03/about?platform=hootsuite https://www.fun-mooc.fr/courses/course-v1:inria+41010+sessio... The original course is in French (dubbed in English) with English, Spanish and Japanese subtitles.
- agumonkey 8y agoThere's also a website with a public archive iirc
- nerdponx 8y agoFor anybody who's used an "immersive" programming environment, like Smalltalk to a Lisp machine -- what's the advantage? It seems like the ability to mutate the whole world would just be asking for mistakes. I can barely keep a clean Python REPL. Do you restart your whole machine to run your test suite?
- tonyg 8y agoIt's like using Unix more than using an IDE. The globals dictionary and class variables etc are roughly analogous to the filesystem. Ordinary avoidance of unnecessary global state / global variables does the trick. Just as in Unix you wouldn't go around messing with e.g. stuff in /lib, you don't tend to find yourself messing with "mutating the whole world" unless you're experimenting with the limits of the system for fun or doing something weird, metaprogramish, or systems-level.
- mikelevins 8y agoYou have two questions: 1. What's the advantage? 2. How do you manage the state of the environment? The advantage is programming-as-teaching, as opposed to programming-as-carpentry. What I mean by "programming-as-teaching" is that old-fashioned Smalltalk (and Lisp) enviroments like Pharo are designed to support a style of development where you build a program by starting up the runtime and teaching it interactively, incrementally, how to be the program you want. (What I mean by "programming-as-carpentry" is the more widespread and better-known model in which you are essentially working to build a planned artifact from a blueprint, and your development environment is analogous to a workbench or toolchest, rather than a student.) If you don't like programming-as-teaching, then it's not an advantage. Most people don't work that way, but I think that's mostly because they don't even know it's an option. I'm not saying that everyone would prefer programming-as-teaching, but it gets so little exposure that I think it's a safe bet that more people would like it if they knew what it was. I prefer programming-as-teaching over the alternative. I am dramatically more productive when I can work that way. I've been one of those fabled 10X programmers, as confirmed by VCS statistics, when working with such tools. It wasn't because I'm so brilliant or because I have amazing magical powers; it's because we were working with that kind of environment, and I knew how to use it and the other programmers didn't. So, in brief, the advantage is that if you have such an environment and can use it effectively, you can be dramatically more productive. It changes the feel of programming from "let's build this variant and see how it turns out" to "reach over and correct that student's posture." The cycle of iterations becomes very fast, so fast that sometimes the duration of a cycle is imperceptible. How do you manage the environment? First, let me acknowledge that modifying your working environment willy nilly is indeed a problem. The solution is that you don't do that. Instead, you start from a known good system image. Environments like Pharo and other old-fashioned Smalltalk and Lisp environments offer a feature that can save the entire state of system memory to an "image" file. If you start the environment from an image, you get an in-memory state that is an exact duplicate of the state the environment was in when saved--right down to the positions and contents and activation states of all the windows. You start the image, and you're in the environment, exactly as it was when you saved it. The way you manage incremental state changes is that you make a reference image that contains a known good state. A common choice for a reference image is a clean, unmodified release image. Then you make any site-specific modifications and customizations and save the result as a reference image as well. Then you save a working image based on that reference image and make your changes to the working image. This practice enables you to easily recover if you get into a bad state. It's very fast to kill a bad session and restore a reference image. For example, a Pharo 6.1 image launches in under half a second on my older iMac. Clozure Common Lisp starts from an image in a similar amount of time. When I've done ongoing serious work using this kind of system, we kept orderly collections of reference and working images--reference images that served as checkpoints in case of trouble; working images in which we had all the stuff we were working on loaded up and ready to go. Besides making it quick and easy to resume yesterday's work, and to recover in cases where we messed up, images also served the useful purpose of enabling us to capture precise dynamic states of work in progress. For example, if a rare bug arises, I can save a working image with the problem on the screen, and give that image to my colleagues. They can start up the image and immediately see the problem state on their screens, and use the introspective capabilities of the development system to diagnose the problem. But I guess that's more an advantage than a how-do-you-manage-it observation.
- tonyg 8y agoI've found a good way to approach Smalltalk systems like Pharo and Squeak is to remember they're whole systems, not just languages with a bolted-on IDE. I like to think of each running instance as more akin to a Unix virtual machine than anything else. You end up using "in-image" version control systems like Monticello just the same way on a Unix server you use "in-operating-system" version control systems like git.
- agumonkey 8y agoOs as a library
- qznc 8y agoAlan Kay originally thought about each object as a virtual machine not just each Smalltalk instance. In his own words [0]: > I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages So a Smalltalk instance is actually a system of systems. [0] https://softwareengineering.stackexchange.com/a/58732/179286 https://softwareengineering.stackexchange.com/a/58732/179286
- philippeback 8y agoYes, very true. And a system has a ton of interesting mechanisms. Pharo now has pretty neat git support with Iceberg and Tonel file format.
- em-bee 8y agothe only thing i miss is a terminal. some time ago i actually found one, but it needs porting to pharo. greetings, eMBee.
- mark_l_watson 8y agoGood to see this make the front page of HN. I only spend a few hours a month using Pharo (some working on my open source NLP project, but mostly just trying out new packages and demos released for Pharo). Other comments here are right: think of Smalltalk as being the complete computer. When I use Pharo I usually put it in full screen mode and don't think about the macOS or Linux host.
- okket 8y agoIt’s not that Pharo discussions are rare on HN... https://news.ycombinator.com/from?site=pharo.org https://news.ycombinator.com/from?site=pharo.org
- 3rdAccount 8y agoI'd say def not rare, but it never feels very common to me either relative to the posts on similar technologies like Lisp, Prolog...etc. So I can understand the parent comments view.
- wsc981 8y agoI've been visiting HN for quite a few years now, but somehow this is my first encounter of a topic on Pharo. The language seems interesting to me, so I am glad it was posted today.
- deleted 8y ago[deleted]
- sn41 8y agoSqueak is the most delightful IDE I've worked in. I liked the idea that the IDE, including the interactive debugger, was available to the user to program. I hope Pharo gains more traction and becomes popular at least in teaching environments.
- pjmlp 8y agoMinor detail, on the old days when shipping a Smalltalk image to production that debugger usually wasn't available. Smalltalk, like Lisp, allows for image customization.
- gameswithgo 8y ago>. I liked the idea that the IDE, including the interactive debugger, was available to the user to program. a similar concept exists in F# type providers. it doesn't always work out well in practice but there is a ton of promise there.
- mpweiher 8y agoIn what instances/how does it not work out well in practice? I've only read the hype, and it sure reads well... :-)
- Risord 8y agoI have a dream that some day we have statically typed language which would have first-class types with some compile time meta programming. For given example data, type providers output just something and typically it's 95% what you want. But how to fix that 5%? You cannot just say that "Type.Property, could you please be an integer". Instead of you have to tweak example which in some case is just fine but on some cases it's not possible at all. Example: you use these SQL libraries which are based on type providers. You have some clear schema and it's just works. Then some day you would like to use runtime defined columns but at that point you have to opt out from that type provider library (at least for queries related to that table). I still love working with F# but I don't use much of type providers. I think they are like proof of concept that compile time meta-programming can be provide real value but it need still more freedom. Edit: I use SQL library called Rezoom and while it has it's limits it has given great benefit during development. When you change DB schema every effected query and model transformation gives compile time error. Value there is real.
- ausbah 8y agoCan someone explain how a language can’t have primitive types?
- tralarpa 8y agoIf you are familar with Java: Just imagine all integers are objects from class Integer and that int doesn't exist. (Internally, they are actually represented as 31-bit numbers for performance reasons)
- jhbadger 8y agoOr non-hypothetically, integers in Ruby -- 5.methods shows that 5 is an object just like anything else. But then Ruby has been called a modern Smalltalk for this reason.
- pjmlp 8y agoWith the difference that cruffy Smalltalk still has better JITs available.
- tigershark 8y agoWhy do they lose one bit?
- philippeback 8y agoBecause that bit indicates if it is a normal object or an integer (for 32 bit VM)
- philippeback 8y agoOn the 64 bit VM, we can do better now on the integer front. Floats are also boxed automagically in a 64-bit entry.
- tonyg 8y agoBecause objects in Smalltalk encapsulate their representation, it's not possible (without using reflection) to figure out exactly how an object represents itself. So things that would be primitives in other languages, like small integers, are in Smalltalk ordinary objects like anything else. The language works hard to present a 'uniform object model'. However! When the rubber meets the road, there has to be some kind of bit-level representation somewhere. In Smalltalk, the VM hides these details from the programmer, who gets to reason uniformly about objects without caring about their representation. Specifically, Smalltalk VMs often use pointer tagging [0] just like lots of other dynamic languages do. [0] Lots of interesting stuff on pointer tagging here: https://www.snellman.net/blog/archive/2017-09-04-lisp-numbers/ https://www.snellman.net/blog/archive/2017-09-04-lisp-number...
- 3rdAccount 8y agoYayy! More mentioning of ST (and Pharo) on HN. I'm just a beginner, but am slowly learning. So far the IDE is the only one I really like as it is one with the language rather than an entirely separate entity.
- geokon 8y agoA bit unclear from the landing page if it's an IDE with a REPL or if you can edit the IDE you're running in.. Kinda sounds like an object oriented Emacs? Or what the creator of Nightlight is trying to do with Clojure.
- jplayer01 8y agoIt's basically an open-source, interpreted, pure OO operating system. You can make changes to the system's code while it's running, any part of the system, and changes will take effect immediately.
- tonyg 8y agoThe "interpreted" bit isn't really true anymore. Smalltalk has been bytecode-compiled since, uh, I think 1976, and the bytecodes themselves are JITted by the Pharo/Squeak virtual machine these days. They're usually only interpreted when you're using the debugger.
- pjmlp 8y agoSmalltalk used bytecode since the early days, which was interpreted by microcoded CPUs. Deutsch and Schiffman designed the first Smalltalk JIT compiler in 1984.
- 3rdAccount 8y agoPharo has something called the playground or something along those lines which is basically a fully editable REPL and editor.
- tonyg 8y agoIt's all of these things! The IDE and the repl-equivalent, along with the entire windowing system and the rest, are all just Smalltalk programs within your installation. So you use the tools to edit the tools.
- philippeback 8y agoThis would be a kind of REPL https://github.com/guillep/Scale https://github.com/guillep/Scale "Scale aims to take Pharo into the shell. That is, to write shell scripts in Pharo, use its power, and have a better syntax instead of the ugly bash one" There are a set of command line handlers that can be invoked and do eval or load code etc. Current work ongoing on ClapSt, yet another command line handler. https://github.com/cdlm/clap-st https://github.com/cdlm/clap-st
- mwnorman2 8y agoI left the Smalltalk world years ago (for Java ... hmm was it a win?) but the thing I miss the most is ... reading great code. Within the Smalltalk image/IDE, everyday you read code that other folks - many with brains much much bigger than mine - have written, and its great. A lot of the code I read now (Java,Objective-C) is ... err ... brain hurt :-(
- protomyth 8y agoThe funny thing that back in the NeXTSTEP days there were so few Objective-C books that I noticed myself and other programmers were buying Smalltalk books also (not that there were a lot of Smalltalk books).
- maltalex 8y ago> everyday you read code that other folks - many with brains much much bigger than mine - have written, and its great. I don't think that it's a language thing. It's probably popularity thing most of all. In popular languages the quality of the average line of code is pretty low. Plus, you know, real-world constraints of real developers working under real-world constraints....
- miki123211 8y agoAll is nice and well... until you need to code with a screen-reader. That kind of sucks, as those IDEs obviously use some non-native controls and the only thing the screen-reader can see is a blank window with no usable content. I was once very excited about such projects, but I'm not anymore because I can't really use them in any way. With normal languages like Java etc. You can just use a different, accessible IDE (i.e. Eclipse instead of Net Beans). That creates some problems, especially when working with a team, but in the end, it can be done if you try hard enough. Smalltalk and smalltalky things that try to be GUI only, no command line at all, are completely hopeless, though.
- qwerty456127 8y agoThat's an important point but lack of screen-readers (or whatever) support is forgivable at the early stages of a project that gives something conceptually interesting in exchange. I just hope they won't forget about it later when it gets clear that the project stabilizes and its future becomes clear.
- thisrod 8y agoSmalltalk has been around since the 1970s, though. Given the things the community is interested in, schools, video, sound, and so on, it's odd that accessibility never came up.
- User23 8y agoMost sighted persons really don't like thinking about blindness. It's not because they are bad people, it's just deeply scary and relatively uncommon. This is an area where Apple really doesn't get enough credit. VoiceOver has absolutely revolutionized blind persons' ability to interact with consumer tech. For more technically demanding applications, the Unix philosophy is inherently open to being made accessible. https://pjb.com.au/blin/ https://pjb.com.au/blin/. As an aside, I personally really enjoy accessible websites, because they focus on clear communication in the presence of a serious obstacle, rather than assaulting the visual cortex with attention grabbing nonsense. Edit: Also one could argue that ed(1)¹ is the pinnacle of accessibility. ¹https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html
- Stratoscope 8y agoI wonder if anyone familiar with both Squeak and Pharo could give a brief comparison between them, or link to one? I don't have a specific goal in mind but have always been interested in Smalltalk, and am not sure which one to try out. Thanks!
- e12e 8y agoAs I understand it, pharo was squeak. But squeak with etoys was very much aimed at children - pharo was a fork to make a more "serious" open/free smalltalk. Since then the projects have moved forward together - and apart. Sharing advances (like new VM) where it makes sense. But I'm sure there are people that know more on here. Like Alan Kay, for example :)
- Stratoscope 8y agoIt sounds like Pharo is the one for me to start with, thanks!
- pjmlp 8y agoSqueak is the original descendent from Smalltalk-80, where they used the last good image as a starting point for a bootstraped implementation of Smalltalk-80. Pharo started as a kind of Squeak fork, where they wanted to pursue other ideas related to JIT, GC, compiler technology, traits and so on. So basically both are Smalltalk-80 implementations, with Pharo trying to be a more modern version of it.
- Stratoscope 8y agoThanks for the info! Very interesting about bootstrapping from the last good image. An old friend of mine (now retired) was involved in Squeak from before the beginning, and this reminds me that I've been meaning to catch up with him. I bet he has some interesting stories. I tried out Squeak about ten years ago, but never could get past the awful bitmap font. Naturally, the first thing I noticed on the Pharo page was that the fonts look nice! So I installed it on my WQHD ThinkPad to try it out. The first thing I noticed is the way it responds to the TrackPoint. It is not like any other application I have ever used. Instead of letting Windows control the pointer position, it's doing something very different, I just don't know what. It's not so bad with the touchpad, but I don't use the touchpad except for scrolling. It doesn't support high DPI either, so the text is all blurry. Way better than the old Squeak bitmap fonts, though. I don't want to sound like a complainer, it just wouldn't be pleasant to program in this environment when every other app and dev tool I use supports high DPI and correct TrackPoint response, both on Windows and Linux.
- atemerev 8y agoIt is still unusable with HiDPI displays. The bug is raised for 5 years, and as Pharo renders everything from scratch, it makes the UI pixelated. OK, I will wait a few more years. I love Smalltalk, but I don't think I am qualified to fix this myself, unfortunately.
- philippeback 8y agoNot true, I work on a 4K screen and it is clean. Win10 latest. Windows VM, some settings to tweak in Pharo but it works. Upcoming is Bloc, which uses Mozilla2D as rendering engine and is vector based. Next Pharo UI will use it. See https://github.com/pharo-graphics/Bloc https://github.com/pharo-graphics/Bloc
- Stratoscope 8y agoI just installed it on my WQHD ThinkPad running at 225% scaling and everything is blurry. It's definitely not running as a high-DPI-aware app. Are you saying there are some settings I can tweak to fix it? That would be great. The TrackPoint response is all wrong too, but one step at a time... :-)
- philippeback 8y agoLooks like this in Win10: https://imgur.com/a/X9PcgZe https://imgur.com/a/X9PcgZe Should be better anyway, but it is usable. I already got it better but the VM has changed since and the rendering is not as good (but is faster for some reason). Vs IntelliJ, it sucks a tad.
- mncharity 8y agoPharo and VR? Pharo's code browser is visually compact. The code too. Current VR HMDs have only a small VGA-ish region of non-blurry pixels. Hmm... Might be a good match. Emacs and IDEs with non-compact languages can be head-sloshing. And the HMD OEM market is being dysfunctional, so higher resolution is on the "I don't see a unicorn here - who cares about easily improving the world?" slowmo snail plan.
- philippeback 8y agoI have been coding in Pharo while in BigScreen on a Rift. Cool experience. Better with the font size set to medium in Pharo settings.
- mncharity 8y agoNeat. I (occasionally) use emacs in a trivial node.js-as-compositor stack on a Lenovo Explorer on linux. With a 7px font, a pixel-aligned window, no temporal supersampling (because low fps on an old laptop's integrated graphics), and WMR's handwave 500px-ish diameter pixels-not-blurred-together region, it's bearable, but far from competitive with a 1080p laptop screen. With subpixel rendering (Explorer has normal non-PenTile subpixels), a 5px font is ok (but not in emacs), but only across say 300px. With better lenses and a better panel, an HMD might be competitive. But it's not perceived to be market, and there's pervasive confusion about the (minimal) GPU and (slow) fps needed. And there's only limited diy infrastructure. But I enjoyed live-coding a vr environment (hot loading three.js and react.) At least with desktop mirroring, to flip-up to screen when the world broke. Perhaps https://pharojs.github.io/ https://pharojs.github.io/ ? Croquet Project, Open Cobalt, and OpenQwaq are all dead, and 3dicc seems to have gone closed-source commercial. Ah, ST - feels like the 1980's all over again. :/ But https://github.com/ronsaldo/woden https://github.com/ronsaldo/woden looks alive. And someone apparently hacked a bridge to Unreal. I wonder what else is out there?
- scroot 8y agoPharo is what I want my personal computer to be like.
- derReineke 8y agoI swear to God if Aragon takes over Castille while I'm programming my immersion will be ruined! Needs to be 100% historically accurate!
- derReineke 8y agoSerious question though, what is immersion in the programming context? Is it being only in the programming environment and not leaving? Wouldn't using a web browser for documentation or stack overflow be a break in it? Why not just have the windows one needs and configure your ide to be how you like?
- seandenigris 8y ago> Is [immersion] being only in the programming environment and not leaving? The dream is never leaving, as expressed by the Dynabook concept. However, in the full expression of that dream, the browser et al that you mention would also be inside the context. In practice, things like using a browser for documentation is acceptable but not super common because viewing in the IDE is so much more powerful in certain ways (e.g. executable examples, finding "senders" of a message). The idea is about having one's computer be "turtles all the way down" where you have the same power to change and explore every layer of the system without learning a whole new technology - from what we usually leave to the OS (which Dan Ingalls said "shouldn't exist") to what currently exists in apps (which Alan Kay and the creators of Smalltalk envisioned as services, which didn't stovepipe possibilities/power down to a small fraction of what's available).
- derReineke 8y agoOh I see! That would be pretty neat, actually. Is looking up documentation a common feature in IDEs? I've never seen it before.
- jiriro 8y agoSay I’ve developed (taught) an image - full of useful stuff. Now a new version of Pharo comes out. How do I move that stuff to the new version?
- finder83 8y agoI'm pretty new, but I've found a few ways. Most useful to modern development is a package called Iceberg, which is a git interface...you can export your classes/code/etc, commit them, and pull them into different images. You get to choose what you export, so you can only export your code. There's also Monticello which is similar, but uses different repository types than git. You can also just "File out" a class or package, which exports it to the file system.