Live data from Hacker News

Pharo, the Modern Smalltalk

medium.com

21–30 of 178 posts

Re: Pharo, the Modern Smalltalk

#21

Is there a snippet of example code to look at? I browsed the pharo.org website, but couldn't find an example to give me a taste. I even tried googling "pharo example" and with a brief look at the results didn't find an example. Today, there are hundreds of programming languages competing for attention. It is in your interest to put an example front and center of why one should spend time looking into yet another prog…

You can download whole books with Pharo examples http://files.pharo.org/books/

[deleted]

Re: Pharo, the Modern Smalltalk

#23
post #20
post #9

My beef with Smalltalk is that it's far too much a world onto itself for my taste. Java is already a bad enough citizen of Unix but Smalltalk takes it to a new level. If Lisp and Scheme can integrate well into Unix, why can't Smalltalk?

Lisp and Scheme don't actually integrate with UNIX. Their UNIX versions are handicapped versions of themselves. Languages with rich runtimes and developer tooling are always shoehorned into POSIX model to "feel UNIX".

Could you explain?

Re: Pharo, the Modern Smalltalk

#24

Earlier quoted context omitted.

Coming from a place of ignorance, how does Smalltalk not integrate?

A Smalltalk environment is practically its own operating system, complete with its own isolated UI/window manager, shells and desktop environment.

I'm not really sure what you are claiming here. My experiences with Smalltalk ended 20 years ago with IBM Smalltalk and Digitalk Smalltalk/V. At that time, they both used the host operating system (Windows or OS/2) for UI widgets, windows, and such, and any applications you built in it could be packaged up to be launched as any other application. One could use such an application and have no particular sense of isolation beyond an application written in a more mainstream language (like C or C++). Have modern Smalltalks regressed in this regard?

Re: Pharo, the Modern Smalltalk

#25
post #20

Earlier quoted context omitted.

Lisp and Scheme don't actually integrate with UNIX. Their UNIX versions are handicapped versions of themselves. Languages with rich runtimes and developer tooling are always shoehorned into POSIX model to "feel UNIX".

Could you explain?

For example, the Interlisp-D of Xerox PARC, ZetaLisp of Genera or even Alegro Common Lisp.

They provide a rich graphical developer experience, with many features that are the genesis of modern IDEs, and nothing on their standard library and runtime depends on anything POSIX related.

The Lisps that "integrate well" with UNIX, like SBCL, do so by providing a UNIX text based repl without that graphical power, while using Emacs, an editor based on Lisp Machines, that even with SLIME is not quite like the commercial Lisps.

Same applies to any other language with a rich runtime, that makes the underlying OS irrelevant.

Re: Pharo, the Modern Smalltalk

#26

Is there a snippet of example code to look at? I browsed the pharo.org website, but couldn't find an example to give me a taste. I even tried googling "pharo example" and with a brief look at the results didn't find an example. Today, there are hundreds of programming languages competing for attention. It is in your interest to put an example front and center of why one should spend time looking into yet another prog…

I've always found the 'image' environment to be far more interesting than the language of Smalltalk itself. If you do find just code snippets, you're missing out on what I, at least, see as the most significant feature of the whole thing. The way it goes about defining the code is clunky, but the overall structure of 'images' and the workflow involved with them is fascinating. I could easily see something similar being the future of containerization when implemented in some other language.

Re: Pharo, the Modern Smalltalk

#27
post #9

My beef with Smalltalk is that it's far too much a world onto itself for my taste. Java is already a bad enough citizen of Unix but Smalltalk takes it to a new level. If Lisp and Scheme can integrate well into Unix, why can't Smalltalk?

Coming from a place of ignorance, how does Smalltalk not integrate?

Smalltalk does not use text-based source files, with object source code saved as part of a binary vm image. Smalltalk is completely incomparable with unix editors, version control, and developer tools, relying instead on integrated dev tools inside the vm. Because all development and tools are inside a monolithic image, it's not very practical for writing shell scripts

Re: Pharo, the Modern Smalltalk

#28

Is there a snippet of example code to look at? I browsed the pharo.org website, but couldn't find an example to give me a taste. I even tried googling "pharo example" and with a brief look at the results didn't find an example. Today, there are hundreds of programming languages competing for attention. It is in your interest to put an example front and center of why one should spend time looking into yet another prog…

The language is a dialect of Smalltalk, so looking for Smalltalk examples might be more productive. There are some useful examples at http://wiki.c2.com/?SmalltalkExamples, such as (double quotes are comments):

    " this sends a message to the transcript "

    Transcript show: 'hello world '.


    " compute 10 factorial and send the result to the Transcript "

    Transcript show: 10 factorial.


    " now, try this: "

    Transcript show: 100 factorial.


    " a loop (the timesRepeat-method evaluates its argument n-times)"

    10 timesRepeat: [
        Transcript show:'hello'.
        Transcript cr.
    ].


    " another loop "

    1 to: 10 do:[ :i |
        Transcript show:i.
        Transcript show:' '.
        Transcript show:i sqt.
        Transcript cr.
    ].


    " looping over a collection "

    #('a' 'b' 'c' ) do:[:each |
        Transcript show: each.
        Transcript cr.
    ].

Re: Pharo, the Modern Smalltalk

#29

Earlier quoted context omitted.

A Smalltalk environment is practically its own operating system, complete with its own isolated UI/window manager, shells and desktop environment.

I'm not really sure what you are claiming here. My experiences with Smalltalk ended 20 years ago with IBM Smalltalk and Digitalk Smalltalk/V. At that time, they both used the host operating system (Windows or OS/2) for UI widgets, windows, and such, and any applications you built in it could be packaged up to be launched as any other application. One could use such an application and have no particular sense of isola…

Take a look at the Pharo intro on youtube, you'll see what I mean:

https://www.youtube.com/watch?v=WLoXXFxU8lw

The images on the current website look very similar, so I don't it's changed much in this regard. This has been my typical experience with Smalltalk languages, with the exception of GNU Smalltalk whose specific goal is to integrate with POSIX instead of creating a walled garden.

Re: Pharo, the Modern Smalltalk

#30
post #9

My beef with Smalltalk is that it's far too much a world onto itself for my taste. Java is already a bad enough citizen of Unix but Smalltalk takes it to a new level. If Lisp and Scheme can integrate well into Unix, why can't Smalltalk?

Pharo, like GNU Smalltalk, has a command line mode so that you can use your favourite editor. However, without the live coding IDE, you lose the biggest benefit of the language: highly accelerated development and enormous programmer productivity.

Yes, Pharo (and Smalltalk) is a world unto itself but that's the price you pay for a highly productive, easy-to-program software development environment. How are you going to achieve this by retrofitting to an archaic methodology based on text files and over-engineered IDEs like Visual Studio and Eclipse? Java and C++ impose severe constraints and compromises in this respect.

At the end of the day, it's all about a programmer's ability to adapt to new methodologies. If they remain rigid and stick to old, familiar ways, there can be no great improvement in the way we create software.

Post reply on HN