| ▲ | Smalltalk's Browser: Unbeatable, yet Not Enough(blog.lorenzano.eu) |
| 83 points by mpweiher 7 hours ago | 30 comments |
| |
|
| ▲ | jdougan 6 hours ago | parent | next [-] |
| There was a browser that worked on Squeak 3, Whisker, that had some of these attributes. I used it up until it became unsupported. It took a little getting used to as its primary orientation was horizontal, but in the age of widescreen monitors that is an advantage. Wiki description: https://wiki.squeak.org/squeak/1993 Archive of its homepage. Has an image of the browser in use. https://web.archive.org/web/20070228113449/http://www.mindsp... |
| |
| ▲ | radiowave 6 hours ago | parent [-] | | Yes, Whisker is exactly what came to mind for me as well. I don't currently use Smalltalk, most of my code is now written (and read) in vscode. The means available for showing the context around the code under consideration (splitting and resizing panes, hunting through lists of tabs, scrolling around) feel pretty crude by comparison. |
|
|
| ▲ | zarzavat 4 hours ago | parent | prev | next [-] |
| I fondly remember the browser in F-script Anywhere was fantastic for debugging your own apps and reverse engineering other people's. Smalltalk is how computing should have been: an open book. I hope that one day we can rediscover that magic, we surely have the computing power available to do so. https://www.chromium.org/developers/f-script-anywhere/ |
|
| ▲ | xkriva11 6 hours ago | parent | prev | next [-] |
| From a conceptual point of view, browsing code is like browsing a fractal. Tools must take this into account. |
| |
| ▲ | rwmj 5 hours ago | parent [-] | | Also it'd be nice to have something that is more spatial. A famous memory technique is remembering where things are in space[1], but I've never seen a code browser that works spatially. (I have no idea how to actually do this.) [1] https://en.wikipedia.org/wiki/Method_of_loci | | |
| ▲ | projektfu 28 minutes ago | parent | next [-] | | Self's environment was a panning desktop where you would inspect an object's slots and as you kept opening things, they would exist in some space nearby. You could, in theory, keep these things open and have a much more spatial feeling about the system. I don't remember there being any way to collapse and re-expand this context so that it could persist yet be out of the way when you didn't want to look at it. | | | |
| ▲ | pegasus 4 hours ago | parent | prev | next [-] | | Check out Code Bubbles: https://www.andrewbragdon.com/codebubbles_site.asp | |
| ▲ | xkriva11 5 hours ago | parent | prev [-] | | The paper printouts on the table are a kind of simple spatial browser. Thanks to this, we have UNIX (at least it explains how they were able to create anything at all with just a teletype back then). | | |
| ▲ | xkriva11 5 hours ago | parent | next [-] | | To add to this, a quote from an article about the editor ed: It’s important to realize that in ed you were usually editing a file you had already printed beforehand. If you only wanted to fix a few small things in a multi-page listing, you simply entered the corrections in ed on the relevant lines, added something here and there, and at the same time you would just write the simple minor fixes directly into the printout by hand-without having to tediously retype everything. You had the files on paper, which is a very pleasant and ergonomic medium for reading. You can literally surround yourself with it, cover your desk, and easily move your eyes between dozens of functions. If you learn to keep order and stay oriented in that mountain of paper, you can be very effective. Moreover, from an ergonomic point of view you wouldn’t be doing badly at all. Printed paper in natural light is definitely easier on the eyes than low-refresh-rate screens in the years that followed. Paper lets you quickly add notes, sketch a little graph, basically work in a very natural way - one people were used to back then from the moment they first held a crayon. Most of the time a programmer isn’t writing code but reading it. In that respect, people back then may actually have had it better than we do today. When it did come to writing, the only truly more complicated part was essentially making corrections. The history of everything you’d done was right there on paper. I don’t want to idealize the way they worked back then, but all of this explains how they were able to work effectively even with such primitive tools. | | |
| ▲ | Someone 2 hours ago | parent | next [-] | | > You had the files on paper, which is a very pleasant and ergonomic medium for reading. You can literally surround yourself with it, cover your desk, and easily move your eyes between dozens of functions. If you learn to keep order and stay oriented in that mountain of paper, you can be very effective. That only works if your printouts aren’t too long, and contain the majority of the logic in your programs. Today, the latter rarely is the case. Maybe, we need a way to print code with t selected documentation of called functions added? That ‘selected’ would be a tricky problem, though. What I need to understand the code may not be what you need, or what I need a month from now. | |
| ▲ | skydhash 4 hours ago | parent | prev [-] | | This is why a lot of people like Vim.When you can target precisely where you want to edit, it becomes effortless instead of being a chore. With windows (panes), you can easily arrange buffer (contents of files mostly) spatially like you would on a desk. Even with vi (which lacks windows), you can make do with marks (bookmarks on lines) Same with Emacs. You bring a whole toolset for each buffer (major and minor modes). And then you got to editing. Like imenu for automatically finding interesting places like functions, structure,… declarations, outline mode that use regex to provide an outline tree that you can then edit, view-mode that adapt the keybinds for scrolling,… |
| |
| ▲ | kitd 3 hours ago | parent | prev | next [-] | | Ah, yes ... "volcanic" organisation. shuffles papers "Hang on ... it's here somewhere ..." | |
| ▲ | rwmj 5 hours ago | parent | prev [-] | | Absolutely! So let's have a code browser like that (somehow). |
|
|
|
|
| ▲ | Smalltalker-80 3 hours ago | parent | prev | next [-] |
| Imo, the problem with the 4-pane browsers are:
1 - The left-most 'package' pane is a flat list. And there are 10K + classes in e.g. Pharo. There are 900+ (!) packages in Pharo, in the pane, so its not easy to scroll through. This is solved 'manually' by have a hierarchical naming of packages. I think this pane should just have tree view.
2 - When developing an app, you may be working on classes in multiple packages. You want to have 'project' view with a simple way of switching between them, without having 10+ system browser windows open, like shown in the article. Dolphin Smalltalk has implemented this concept.
Shameless plug: SmallJS (https://small-js.org) has these too.. |
| |
| ▲ | projektfu 22 minutes ago | parent | next [-] | | Extending that, an outliner can be a great way to deal with this stuff. The problem becomes the self-referential nature of OO systems. Outliners are good when you get to the method of interest, but then you have the problem of browsing senders and implementers. Still, there's nothing worse than a Smalltalk without a class category list. Smalltalk/MT, for example, just had a class hierarchy browser, and the category class member variable was left blank. I found it very hard to know where to start looking for behavior. | |
| ▲ | cess11 2 hours ago | parent | prev | next [-] | | While I agree that the package column has room for improvement, some of the 'largesse' can be handled by the search field at the bottom of it, and once you get to doing something serious you could set up your own image and ditch a lot or most of the standard distribution. | |
| ▲ | LoganDark 2 hours ago | parent | prev [-] | | I think I'd prefer a pane view over a tree view because the higher levels retain their scroll position even as I browse beneath. Is there a similar UX possible for tree views? |
|
|
| ▲ | Perenti 4 hours ago | parent | prev | next [-] |
| You can run any smalltalk code from workspace-style frames in the Inspector, Workspace, Explorer, Finder and Debugger. You can edit classes and methods in these windows, as well as spawn Browsers as desired. I'm not sure what the integration points are that are lacking. That's not to say there can't be a better way, but I cannot see the point he is making. |
| |
| ▲ | smackeyacky 4 hours ago | parent [-] | | I couldn’t discern a point either. Having been a smalltalk programmer the only thing I really miss is the exceptions and the way they could be intercepted and a value injected back into the execution flow. I’m sure we could code up a class browser for any language that offers introspection like C# but I don’t see the point any more when programming has reverted to functional styles or chunks of lambda expressions. |
|
|
| ▲ | brazzy 3 hours ago | parent | prev | next [-] |
| Do Smalltalk IDEs really not have the concept of different "views" of the code? The 4-pane hiearchical view is clearly valuable, but why would it need to be "surpassed" rather than complemented by other views that are available when needed and can be switched to or even shown alongside the traditional view? If that kind of thing doesn't exist (and the article sure sounds like that), then yes, it appears the smalltalk ecosystem really has fallen decades behind the state of the art in the IDE area. |
| |
|
| ▲ | ivanvoid 5 hours ago | parent | prev [-] |
| when i was in uni in 2014 i learned that smalltalk became obsolete, later i went to industry to see that no one use smalltalk(or prolog) and yet on this site ppl bringing up smalltalk every single month, why is that i wonder |
| |
| ▲ | projektfu 14 minutes ago | parent | next [-] | | A lot of systems are obsolete, in the sense that you cannot find work in them. Nonetheless, people use them to prototype ideas that will eventually find their way into industry. Is Haskell obsolete? Not exactly, but it's hard to find real-world projects that use it. Concepts developed in Haskell get imported into other systems. Systems are only truly obsolete when there is no real reason to use them. PL/1 is obsolete. It's hard to find even legacy code using it, and nobody would use it for experimentation. | |
| ▲ | conartist6 4 hours ago | parent | prev | next [-] | | Yeah there's a difference between being popular and influential. Smalltalk is influential without being all that popular. I suspect that's largely because most smalltalk implementations don't store code in git. "A smalltalk" is more like a Linux distro than a phone app. It's almost like the main purpose of a smalltalk is to build more smalltalks. It's a good way for developers to build a deep, powerful tool for other developers, but it's a less good way to build user experiences targeted at non-programmers, who are going to want to have a bunch of different apps to use not a bunch of different operating systems to use. Good economics for the classroom; bad economics for the real world. Then and now, though, a great way to play with novel ideas in programming languages. | |
| ▲ | zabzonk 3 hours ago | parent | prev | next [-] | | People like the language - I like it though I have only written a few bits and bobs in it. They also like Fortran, Prolog, and (dare I say it) Haskell, and many others that don't appear here so often. Just because a language is not this week's hotness (looking at you Rust) does not make it "obsolete". | |
| ▲ | morphle 5 hours ago | parent | prev | next [-] | | The Potsdam university (near Berlin, Germany) and Hasno Platner Instute [1] has been actively teaching and researching Squeak Smalltalk for decades. Same in Buenos Aires and several other places. Science papers every month for 5 decades, under many names besides Smalltalk. Weekly online conferences, presentations. https://www.hpi.uni-potsdam.de/hirschfeld/projects/index.htm... | |
| ▲ | bear8642 5 hours ago | parent | prev | next [-] | | Likely because whilst it didn't work out commercially, the ideas smalltalk, prolog and other more esoteric languages (forth, apl) focus on are themselves very interesting. | | |
| ▲ | ux266478 7 minutes ago | parent [-] | | In what world did Prolog not work out commercially? It's still used where it makes sense to do so. |
| |
| ▲ | cess11 2 hours ago | parent | prev [-] | | In what way, obsolete? There is quite a bit of worthwhile research done in Smalltalk-related languages and some corporations are quite successful in building on such languages. It's not dominant in the way of Wordpress but also not insignificant. |
|