14 ms·
Getting Back to Smalltalk
- amjith 15y agoThere are some excellent screencasts for pharo here: http://www.pharocasts.com http://www.pharocasts.com Smalltalk is a small language (think C), so you can learn the whole language set in a few days. The live objects concept might warp your brain a little bit. I've heard lisp does the same, so if you're from a lisp background, you might not find it shocking. The Pharo environment (IDE) can make all the modern IDEs (Eclipse, Visual Studio) look like babies in diapers. There is built in versionsing, DVCS, refactoring tool, unit testing framework, The most powerful debugger etc.... You will not regret trying out Smalltalk (maybe you will when you have to go back to C++) :).
- praptak 15y ago> Smalltalk is a small language (think C), so you can learn the whole language set in a few days. Hm, not sure about that. The language itself (as in: syntax) is indeed minimal. It is much smaller than C, not even having ifs and whiles but this only means you have to learn the relevant part of the runtime to start using Smalltalk. Fun fact: if in Smalltalk is a pair of virtual methods on the Boolean objects. True implements ifTrue as "always execute the argument" and False as "ignore the argument" and it's the other way for ifFalse. I agree with the rest of your comment - it is definitely worth trying.
- jcromartie 15y agoI think it means that there's a small set of concepts (and accompanying syntax) that open up the whole environment to you. Compare it to what you need to know about Java or C++ to understand all of a codebase in that language.
- markokocic 15y agoIn general I agree, except for the IDE part. Every single IDE I haven ever used have better editor that Smalltalk IDE. Not being able to use your own editor, whichever it is, and being forced to use something that is basically equivalent to plain old browser textarea is a showstopper for calling Smalltalk environments pleasant. Maybe Gnu Smalltalk is a cure to that, since it doesn't have live image and you can use whichever editor you like, but that kinda defeats most of the benefits of Smalltalk.
- amjith 15y agoTrue. I've had trouble with that as well when starting up. But later on I found I'm not writing methods that are larger than 10 lines (longest being 20 lines) in Smalltalk, which makes it tolerable. Still no ideal. I hear that SqueakVM has a package called nvi that can emulate Vi keybindings as well as emacs keybindings.
- gecko 15y agoSqueak and Pharo used to have a really great (for some value of "great", anyway) Vim emulator you could use in place of the default editor, but the hacks to enable it ran so deep that it doesn't run well anymore. The good news is that Pharo's GUI is increasingly clean and less crufty, which ought to make reintroducing a similar package feasible for the first time in years, if anyone were up to it.
- rue 15y agoIt should be possible to simply embed or shell out the editing to an external program… I think this'd be the ideal solution.
- gnaritas 15y ago> that is basically equivalent to plain old browser textarea is a showstopper for calling Smalltalk environments pleasant. That's hardly an apt description. My Smalltalk environment has intellisense, auto-complete, syntax highlighting, and automated refactoring. I use Pharo.
- eternalban 15y agoBack in the day QKS Smalltalk Agents had a really nice IDE. (90s). Wonder what happened to QKS ...
- simsimsalabim 15y agoDo i really need to use the ide to 'get' smalltalk? I'm pretty happy with my tools, and would only use ST for the paradigm shift anyway. I don't want to leave my text editor. It has become a part of me, and i can't imagine life without it.
- gnaritas 15y agoYes, you do. Smalltalk is a running object model and the IDE lets you modify that model while it's running. There are no files. Changes apply instantly. You can pull up some test data, and code it while it's running changing things as fast as you can think until it works the way you want. To the best of my knowledge, there exists no faster environment to think and code in. SLIME come close, but it's too textual and doesn't seem as fast.
- fractallyte 15y agoDidn't Lisp machines provide an analogous environment? The Smalltalk VM provides access to the entire 'OS'; only the hardware is abstracted away. Surely a similar Lisp VM is possible now?
- gnaritas 15y agoI'm not talking about what's possible, simply what is. Emacs is what's equivalent to a Smalltalk environment for Lisp today.
- mronge 15y agoThe short answer is yes, you need to use the environment to fully grok Smalltalk. Much of the power of Smalltalk comes from the environment. It is pretty amazing how even now parts of Smalltalk are more sophisticated than todays programming tools.
- da02 15y agoIt might have to do with how Smalltalk/Squeak comes from people who believed the OS is stuff that you wanted in the language. Dan Ingalls: "An operating system is a collection of things that don't fit into a language. There shouldn't be one." http://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html http://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.h... Alan Kay mentions this idea in relation to Lisp and Smalltalk: http://www.youtube.com/watch?v=tQg4LquY0uU http://www.youtube.com/watch?v=tQg4LquY0uU (It's buried somewhere after 24 minutes.)
- mark_l_watson 15y agoI also enjoy hacking in the Pharo environment. That said, I have been doing most of my work lately using Clojure with combinations of: repl, Emacs, slime, and IntelliJ. I find working with Lisp or Smalltalk yields similar benefits of supporting very quick code experiments and development. The important thing is having an environment that supports your eventual deployment requirements and also supports short term fast development requirements.
- ootachi 15y ago"The first element of an array is index 1, not index 0. Which, honestly, makes more sense." No, it really doesn't. This is a constant headache in Lua too. See Dijkstra's comments on the subject here: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EW...
- fractallyte 15y agoI'm struggling to find Dijkstra's argument sufficiently compelling to conclude that zero is the 'most natural number'. It's a conclusion based on his aesthetics (plus an anecdotal story). The natural numbers are generally considered to start at 1. Therefore, to people in general, such a system makes more sense.
- r00fus 15y agoAgreed. The fact that arrays were simple memory-offsets making zero-index easier for low-level programming doesn't make it easier for humans who historically prefer 1-indexing. Zero is not a "natural" number, in fact many societies / civilizations never even understood or used zero in arithmetic [1]. [1] http://en.wikipedia.org/wiki/Roman_numerals http://en.wikipedia.org/wiki/Roman_numerals
- technomancy 15y ago> in fact many societies / civilizations never even understood or used zero in arithmetic Yeah, but those societies were uniformly terrible at math.
- gaius 15y agoThere are Roman bridges still standing, and Roman roads still in use.
- fractallyte 15y agoTherefore, with the concept of 'zero' in mind, I'm going to revisit the parent statement: If I hold up my fingers to indicate elements in an array, zero fingers means the array is empty. One finger is then, naturally, the first item: of index 1. Counting elements starting at zero (for the first element) is still unnatural...
- hboon 15y agoIf you want to get introduced to Smalltalk and happens to have a Windows machine, check out Dolphin Smalltalk http://www.object-arts.com/ http://www.object-arts.com/. Many years back, I tried Squeak a couple of times and it didn't click. Dolphin Smalltalk did that for me (and I then went back to Squeak due to other reasons). It has a well-designed, compact class library and a decent UI. I'm not sure if it has been updated to keep up with Windows, but it's a great start.