|
|
|
|
|
by e12e
4629 days ago
|
|
Very nice - even managed to duplicate the demo with a bit of effort (once I got 32bit gl librarires installed in my 64bit ubuntu and got the standard 3.0 image/vm to start...). Now, it appears one can do/print with ctrl-d/ctrl-p -- and that it will work for the current line, eg: 1 + 1 <ctrl-p> "prints 2"
But how about blocks? Is there a reasonable alternative to either selecting with the mouse, or with shift-arrow? As far as I can tell even simple "two-liners" force my fingers off of home row...Also anyone happen to know if there's a usable vim-like interface/editor/thing for pharo (other than just starting vim and copy/pasting)? For the curious, I got this to work (just copy-paste into a Workspace. Note that I had to change getGif with getJpeg -- but I'm not yet sure how to "live patch" that properly, for now I just abandoned the stack trace, fixed the code and evaluated again (the last line): Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfXMLSupport';
load.
(Smalltalk at:#ConfigurationOfXMLSupport) project latestVersion load.
Gofer new
squeaksource: 'XMLSupport';
package: 'XML-Parser'; load.
"Get the data, you can try and print this, if you want"
data := 'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl retrieveContents.
"parse it"
doc := XMLDOMParser parse: data.
"split up"
entries := doc
allNodesSelect: [ :n | n name = 'entry' ].
"pick one"
entry := entries anyOne.
content := entry
nodesDetect: [ :n | n name = 'content' ].
url := content attributeAt: 'src'.
(ZnEasy getJpeg: url) asMorph openInHand . "Opens image"
|
|
so you can do
a := [ message . message . message . ].a value.
if you just ctrl+d it will execute all messages. "a value" executes the body of the block.
also in pharo like emacs and vim , shortcuts are tied to methods so you can add a shortcut for any method you want. And since pharo has over 70 thousands methods , you will need a pile of keyboards :D
We could implement also a more convenient way of executing multiple lines in a workspace. Generally in Pharo we spent most of our time with system browser and debugger and much less with workspace. Workspace is more for one liners. There is also already a tons of shortcuts, I am new with pharo so maybe there is something already I am not aware of.
Also I don't mind using the mouse now and then. I find it harder to remember tons of keyboard shortcuts. But I am moving slowly to a more keyboard orientated workflow.