Live data from Hacker News

Pharo: A malleable and powerful platform

slideshare.net

41–50 of 51 posts

Re: Pharo: A malleable and powerful platform

#42
post #9

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 "prints 2" But how about blocks? Is there a reasonable alternative to either selecting with the mouse, or with shift-arrow? As far as…

The second Gofer is not needed. The XML Support is all installed with the #load message. I don't think you can live-patch a DoIt from Workspace. What you can try is create a test class and method. However you can demo this with the following exercise... 1. In a newly opened image, right-click the background and choose 'System Browser' 2. Fill in the template with #MyTest and 'MyTest' as follows... Object subclass: #M…

Further down some asked "is anything from the Smalltalk OO model that hadn't made its way into Ruby?" Well I don't know about OO model, but to extend my example above, at step 5 when the debugger appears, the image. Then copy the folder to another PC, open up the Pharo image, and continue with steps 6. and 7.

In days past with the predominance of the desktop, 'perhaps' the 'live image' concept central to Smalltalk had some logistic issues (for some) but I think in this day of applications running on remote web based systems, being able to store/download/restart the execution context that caused an exception is a great advantage.

Now if you don't want to download the size of whole image, you can download the debugging context only, and continue. See http://marianopeck.wordpress.com/2012/01/19/moving-contexts-....

The other interesting this is that VNC can connect directly into the image, so you can be directly using the GUI IDE Smalltalk tools on a remote server.

Re: Pharo: A malleable and powerful platform

#43
post #33
post #6

Earlier quoted context omitted.

Well the coding universe is divided into 3 galaxies. The C galaxy that dominates desktop , the Java galaxy and the Javascript galaxy. Of course there are other galaxies too, but I think those 3 dominate currently. For C libraries you can use Pharo. Pharo has inherited 2 FFIs from Squeak and has implemented 1 additional FFI called Nativeboost which also allows you to inline assembly code for best performance. There is…

You forgot to mention it is also an OS. :)

IMO, it's not an OS, but the living proof that OSes are the wrong approach to computing! :)

Re: Pharo: A malleable and powerful platform

#44
post #30

Earlier quoted context omitted.

doable with smalltalk too Door open: 1 times: 3 and_close_after_ms: 30 also please note here, that python does not usually use keyword arguments. Unless for cases of optional arguments. So the python you wrote is completely doable of course, BUT not that used as often. So it will be Door.open(1,3,30) a lot more than Door.open(1, times=3, close_after_ms=30). This is where smalltalk shines, its culture. Those code habi…

aBlock := [:times :delay | times timesRepeat: [ door open. (Delay milliseconds:delay) wait. door close ]]. aBlock value: 3 value: 30.

This is valid Smalltalk code, but not the way you'd program a door in Smalltalk.

You'd probably prototype this in a Workspace, then create the method suggested above, which would force you to specify keys for the arguments, thus forcing you to make your code cleaner and more readable.

Re: Pharo: A malleable and powerful platform

#45
post #8
post #4

Earlier quoted context omitted.

Neat! What sort of web stuff? Using Seaside or something else? Do you think you could send me an email (in my profile here), I'd love to pick your brains about using Pharo in production!

Seaside is one approach, there is also Aida-Web. Those are implemented in pharo. with Amber you can use also node.js if you want. And any server side node.js library you can get your hands on. Amber can use any js library. You could even mix amber, pharo , node.js and seaside / aida-web .Sky is the limit. Its up to you which specific approach you will choose. You definitely have loads of options.

You forgot Iliad: automagic AJAX, plus clean and short codebase you can read and understand in under a day (vs. thousands of packages in Seaside).

There is of course a downside: a really tiny community... took me a while to get used to the Iliad way, but I'm not going back unless Seaside shrinks to 1% of its current size and makes AJAX integration as easy as Iliad does :)

Anyway, I guess the future is not about server-side frameworks, but something like Amber + some sort of Pharo REST service (kinda like Seaside-REST) + some sort of magic persistence (kinda like Voyage).

Re: Pharo: A malleable and powerful platform

#46

I started using Pharo a year ago and its been a pleasure to work with. Great community. I really like the Syntax comparison (slides 46-49). And being able to serialize the debugging context of a running program to a file that can be stored for later

Unless you're used to the Smalltalk way, you'd never think serializing the debugging context of a running program would have any use at all.

I'd never had dreamed it'd be possible to do what I do regularly in my deployed web apps. When the error handler catches an error, it serializes the error and emails it to me in a fuel file. I can then fire up my _local_ Pharo environment, materialize the error, debug it with all its context, fix whatever code I need to and push the changes to my monticello repo.

Re: Pharo: A malleable and powerful platform

#47
post #37
post #6

Earlier quoted context omitted.

Well the coding universe is divided into 3 galaxies. The C galaxy that dominates desktop , the Java galaxy and the Javascript galaxy. Of course there are other galaxies too, but I think those 3 dominate currently. For C libraries you can use Pharo. Pharo has inherited 2 FFIs from Squeak and has implemented 1 additional FFI called Nativeboost which also allows you to inline assembly code for best performance. There is…

If any language dominates the desktop it would be c++

I am using TIOBE INDEX as reference. According to TIOBE not only C++ is not even half as popular as C, but its also on a steady decline.

http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

Though I agree "dominates" maybe a bit too heavy of a word to describe the desktop landscape.

Re: Pharo: A malleable and powerful platform

#48
post #33

Earlier quoted context omitted.

You forgot to mention it is also an OS. :)

IMO, it's not an OS, but the living proof that OSes are the wrong approach to computing! :)

I agree with both of you, its more like an "OS inside and OS". However do note here that there is a project to make smalltalk into a true standalone OS called SqueakNOS. Of course I dont think of this as a special feature of Smalltalk, any language could be used to do the same. This is because modern languages come with loads of re factoring tools, GUI APIs and user environments. Smalltalk may have been the first to implement this approach (GUI wise) but no longer the only one.

Its not so much that smalltalk is an OS , but rather that is a Live Coding OS. The ability to hack application while they run, is something that could have a profound effect on user experience. Such features are hard coded to apps themselves and are not considered languages features for all non smalltalk apps.

But with smalltalk is not that you run an OS as much that you can hack any application on the spot , while it runs and see your changes immediately. This happens because smalltalk does not compile source files but rather methods and of course because of the flexibility of the whole system.

Smalltalk is an extremely user friendly environment for users that love to hack the easy way and not get insane in the process.

Re: Pharo: A malleable and powerful platform

#49

Earlier quoted context omitted.

aBlock := [:times :delay | times timesRepeat: [ door open. (Delay milliseconds:delay) wait. door close ]]. aBlock value: 3 value: 30.

This is valid Smalltalk code, but not the way you'd program a door in Smalltalk. You'd probably prototype this in a Workspace, then create the method suggested above, which would force you to specify keys for the arguments, thus forcing you to make your code cleaner and more readable.

completely agree with you. I am no big fan of blocks myself and I try to use them as sparse as possible. Keeping things simple is the way to go unless you have a good reason to do otherwise.

Re: Pharo: A malleable and powerful platform

#50
post #48

Earlier quoted context omitted.

IMO, it's not an OS, but the living proof that OSes are the wrong approach to computing! :)

I agree with both of you, its more like an "OS inside and OS". However do note here that there is a project to make smalltalk into a true standalone OS called SqueakNOS. Of course I dont think of this as a special feature of Smalltalk, any language could be used to do the same. This is because modern languages come with loads of re factoring tools, GUI APIs and user environments. Smalltalk may have been the first to…

Niklaus Wirth used his experience with Smalltalk to build the Native Oberon OS.

Where you could get almost a similar experience while using a strong type language, with help of reflection and by having dynamic libraries as the only form of executables.

The System 3 version with its Gadgets toolkit was quite nice.

Sadly another GUI desktop OS that didn't managed to become mainstream.

Post reply on HN