5 ms·
Every time this comes up it makes me want to learn Smalltalk, but the current tooling/IDEs don’t seem to have been kept up to date. Is it possible to learn Smal
by noughtme 7y ago
Every time this comes up it makes me want to learn Smalltalk, but the current tooling/IDEs don’t seem to have been kept up to date. Is it possible to learn Smalltalk without a Smalltalk-specific IDE? Or, is there a relatively small current language that is similar to Smalltalk?
- mark_l_watson 7y agoWhoa, hold your horses! Pharo is a modern open source Smalltalk that was derived from Squeak. Nice UI, vibrant ecosystem and community. https://pharo.org/ https://pharo.org/
- jchw 7y agoInstantly was enticed by this, but quickly ran into the depths. I'm on NixOS unstable and I realize this is not ever going to be a well-supported place to be in terms of running random software, but thankfully there are in fact Pharo attributes in nixpkgs. Sadly though, I can't figure out how to use it. It looks like I want to start with Pharo Launcher, so I've installed the Pharo VM and Pharo Launcher, but when I try to start Pharo Launcher a window pops up and it just exists. All I can see in the terminal is a message about pthread_setschedparam failing, which does not seem fatal. I wonder whether my problem is with not understanding what I'm doing, or with NixOS, or something in between...
- e12e 7y agoDid you try the zip from here? http://pharo.org/download http://pharo.org/download I'd guess you could get some hints by running ldd on the vm (I'm assuming it's not strictly a static binary). You need the vm and an image - the launcher I imagine is a vm and just enough image to display a menu and get a "proper" image downloaded.
- jchw 7y agoI have the VM seemingly working through the NixOS package, and if I run the Pharo image downloaded from there, it seems to show a window with nothing on it but a menu item labelled "Pharo" that does nothing. Perhaps I'm missing something but I doubt the Linux VM download on that page will help me. Ordinary binaries don't tend to run on NixOS without at least some ELF patching due to the Nix store architecture.
- e12e 7y agoSounds like a ui/x toolkit library mismatch. I've seen similar issues with Java gui apps under Linux (long ago though).
- mark_l_watson 7y agoI can’t help you. I sometimes have NixOS running in a VirtualBox container, but don’t have one available right now. Do you have a plain Linux running anywhere, or as a container inside NixOS? Except for occasional font problems, Pharo works fine on Linux.
- e12e 7y ago> All I can see in the terminal is a message about pthread_setschedparam failing, Just spotted this on Cuis smalltalk github page: "If you get this error message (you won't get it if you run Cuis as root or sudo): pthread_setschedparam failed: Operation not permitted ... Then you need to do this (just one time): sudo cp Cuis-Smalltalk-Dev/squeak.conf /etc/security/limits.d/squeak.conf Log out and log back in, or reboot the machine." Might be something similar for pharo? https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/GettingStarted.md https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/ma...
- JulianMorrison 7y agoObjective C is very Smalltalk-ish.
- emp 7y agoThe IDE is where the super powers are. Like any IDE it just takes a little time. https://pharo.org/ https://pharo.org/ has an online course to get into it. Being in a live system is unlike anything else - the first time a debugger appears and you fix the bug in the debugger and just hit the “continue running” button is a rush. TDD inside the debugger is amazing. And do much more. You really need to experience it, else it just sounds like hot reloading features of current tech.
- gdxhyrd 7y ago> the first time a debugger appears and you fix the bug in the debugger and just hit the “continue running” button is a rush That is possible in other many other languages, including system ones like C.
- goatlover 7y agoBeing that other languages are Turing-complete ... Which doesn't really mean much when it comes to the standard developer experience and how that differs between programming a live image and the tooling built around that versus manipulating text and the tooling built around that. One lives at the abstraction level of running code and the other at the level of syntax.
- gdxhyrd 7y agoSorry, but all those are buzzwords. In C/C++, I can do live debugging, reverse-time debugging, edit-and-continue debugging, multi-device debugging, multi-threading debugging... We also got language servers, on the fly retesting and recompiling, all kinds of profiling... All that with free or open tools readily available, not to mention paid, proprietary ones. In higher-level languages, fancy features are even more prevalent. So, what are we missing exactly from Smalltalk?
- coldtea 7y agoYou have everything in a subpar way. Smalltalk has it first class.
- baron_harkonnen 7y ago“Operating System: An operating system is a collection of things that don't fit into a language. There shouldn't be one.” — Daniel Ingalls “Design Principals Behind Smalltalk” [0] Learning the Smalltalk “world”/vm is an essential part of learning Smalltalk the language. Many people are initially put off by this but if you try to find a “Smalltalk without a Smalltalk-specific IDE” you are missing out on an enormous part of what Smalltalk is. 0. https://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html https://www.cs.virginia.edu/~evans/cs655/readings/smalltalk....
- JulianMorrison 7y agoThat feels like a sentiment from gentler, single-user time. Unless Smalltalk has grown some serious security chops in the interim.
- cbdumas 7y agoI disagree, a system implemented at the language level this way can in principle provide far stronger security guarantees than a typical operating system. Security issues can still come up obviously but they could essentially be isolated to the language runtime.
- JulianMorrison 7y agoAnd then you're getting into things like capability-passing languages, but Smalltalk is not that.
- true_religion 7y agoBear in mind, it’s Ben about a decade since I last used Smalltalk, but at the time there was a web framework called Seaside based completely on using stored closures instead of normal Ajax. Digging into the code, I found that the VM just gives a code block access to all top level objects by default, but that isn’t a requirement. You can instantiate your own “global” and run the block within that. Back then I believe it was being used because old closures needed to see old top level class objects that might have been changed in the meanwhile. So you can use this to sandbox functions. I would imagine it isn’t perfect, but it could be made so.
- frou_dh 7y agoSomething like Pharo is more like learning a whole new OS in addition to a language. Unless you have the energy to do that, it's probably best left on the bucketlist. I bailed.
- ska 7y ago> Something like Pharo is more like learning a whole new OS in addition to a language. That's kind of the point.
- frou_dh 7y agoAlong with the edifying stuff there is a lot of incidental difference in the OS that is not edifying. That's why I mentioned energy. You need a lot of energy to be able to follow through and make a proper go of things on a different planet.
- ska 7y agoI hear you, it's a real commitment - but I don't think the two can really be effectively separated.
- pulse7 7y agoSmalltalk is an IDE + runtime together on a single VM. This brings many advantages (very fast software development; almost no compile time; you can change the running system, ...), but also disadvantages (harder to integrate external libraries, hard to separate final runtime/binary from development)...
- e12e 7y agoSmalltalk was always a system first, language second. That said, if you want to ignore half (not all!) of what makes Smalltalk interesting, there's always GNU Smalltalk ("Smalltalk for people who can type"): https://www.gnu.org/software/smalltalk/ https://www.gnu.org/software/smalltalk/ There's the free/open Pharo ("Squak for grown-ups"): https://pharo.org/ https://pharo.org/ (Recently featured on hn in the guise of smalltalk on truffle/graalvm https://news.ycombinator.com/item?id=21735782 https://news.ycombinator.com/item?id=21735782 ) And commercial offerings like Gemstone: https://gemtalksystems.com/products/gs64/ https://gemtalksystems.com/products/gs64/ The recently open sourced dolphin: http://www.object-arts.com/gettingstarted.html http://www.object-arts.com/gettingstarted.html
- deleted 7y ago[deleted]
- ljm 7y agoTo add to this comment; if you use Pharo, the impressive part is right in the first-run tutorial. It gives you the basics but you have to write the code to update the environment to give you the next/previous buttons for each step. You can run whatever code you want in those windows, but just by finishing the tutorial you'll have an idea of what you're getting into. It's on my backlog of things to toy with, along with Prolog. And after playing with Objective-C long enough I quite enjoy the syntax.
- Gene_Parmesan 7y agoI can definitely highly recommend Prolog for playing. I found it to be a mind-opener in the same way learning Scheme for the first time was a mind-opener. Programming with predicates/relations is extremely powerful. As a teaser, consider a predicate Concat(X, Y, Z). In Prolog, capitalized identifiers are considered as unbound variables. There aren't return values; instead, you compute via unification. So we can approximate the idea of a list concat funtion by entering something like `Concat([1, 2], [3, 4], X).` The Prolog evaluator will answer that X must be [1, 2, 3, 4] in order for the predicate to hold true. Looks like a standard function with a quirky way to provide an out param. But these are predicates, not functions. Concat's internal logic defines a logical relation among the various values. This logic holds no matter which values you leave unbound. So here are some other things you get for free: `Concat(X, Y, [1, 2, 3, 4]).` -- this will, in turn, iterate through all possible values of X and Y that make this predicate true. Thus Prolog will give us X: [], Y: [1,2,3,4]; but also X: [1], Y: [2,3,4]; and so on. `Concat(X, [3, 4], [1, 2, 3, 4]).` -- this will give us X: [1, 2]; alternatively, it will give us the answer 'no' (sort of equivalent to false) if [3, 4] is not some tail of the provided list. `Concat([1, 2], [3, 4], [1, 2, 3, 4]).` -- will give us "yes", for true. This is a simple example, but now perhaps the potential power of Prolog is more visible. Imagine the possibilities -- for instance, a constructed grammar can tell you not only if a given candidate sentence is valid, but it can also (in theory) generate every single valid sentence in turn.
- jolmg 7y agoThere is GNU's smalltalk, which comes with a REPL. You should be able to write smalltalk from vim or any other text editor.
- soapdog 7y agoThe smalltalk IDEs are light years ahead of the rest. Just check Pharo.
- skybrian 7y agoWren is a small scripting language with a bit of Smalltalk flavor, though syntax is more like Ruby. It's written by the author of Crafting Interpreters so if you've read that (particularly the C chapters) you'll understand quite a bit about the implementation. http://wren.io/ http://wren.io/