News for hackers. Stuff that matters.
Re:Pharo 11 by klibertp on Thursday May 11, 2023 @02:40PM (#35906419)
Well, they're consistent at least. It was exactly the same when I first tried Pharo, at version 2.something IIRC. Same in Pharo 5, 7, 9 (increments of 2 purely coincidental) and now with 11.

I love Smalltalk. The language is great, incredibly powerful even though it rests on just a few simple concepts. The design and architecture of some of Smalltalk libraries is marvelous and should be made into UNESCO world heritage site for OOP design. PetitParser is unmatched in the ease of creating and extending parsers, not even PyParsing comes close (Raku grammars are close but use another metaphor for actions, ScalaParsing is... somewhat related but limited). The idea of finally working with a live codebase instead of its dead carcass[1] is frankly groundbreaking - and older than me, apparently. The Smalltalk debugger is a work of art, and the idea of working with images that contain the "whole world" in them is actually very appealing if you ever had to write a Dockerfile.

However, while Pharo may well be the most "advanced" Smalltalk(-like) environment, it's also one of the worst. On my Linux machine releases after 5 refused to as much as display anything - I got an empty window and the VM seemed to hang and never started properly. Glamorous Toolkit version did work, even though they share most of Pharo code. The churn in UI toolkits, the constant rewrites of everything, the utter lack of any kind of documentation (including on classes!) of installable packages, deprecation of tools that work (ofc after breaking them) in favor of tools that don't, yet leaving the former in place just to confuse users (b/c what other goal could it have?) - that's Pharo in a nutshell.

A few years ago I went to complain about the lack of backward compatibility and the fact that a tool, Package Manager, that used to work perfectly well, stopped working altogether. I learned that nobody under the Heavens cares more about backward compatibility than Pharo community (praphrasing: "look, we're even developing all-new annotation/pragma based system for marking and automatically fixing incompatibilities!") and that nobody uses the package manager anyway because they use... something else, I forgot, but anyway - the new thing was nowhere in the menus, while package manager stayed in the same place it was before. I gave up when I got no response after asking "how the heck should I, the user, know about deprecation of a tool if it's not indicated anin any way in the UI". What I got instead of an answer was a bunch of name calling and the usual suggestion for me to go and fix it myself.

I still love Smalltalk. If you love it too, but feel that - at least with Pharo - that feeling is not mutual, go grab Visual Works (no affiliation). Personal license is restrictive, and the version you get is 6 years old at this point. But. It comes with thousands of pages of PDFs with up to date documentation, manuals and guides. It comes with a stable, battle-tested UI framework, not based on Morphic but integrating seamlessly with your env windows (btw: "Pharo can do it too", say Pharo users, "it's just that nobody cares about such things") while still allowing all the dynamic introspection Smalltalk is known for. The infra for versioning and sharing code is idiosyncratic - you need to spin a local Postgres instance - but solid and surprisingly (if you come from git) powerful. There's a working package manager and you can install and run code from the nineties, something that's just absurd to attempt in Pharo, despite all the "caring" about backward compatibility. Yes, the VM is closed source, but it at least starts up properly.

It's a bit underwhelming in the performance dept, which made me reconsider starting one project with it, but by that point I already built my own little Smalltalk environment after fixing a lot of glitches (because, other than the VM, the source of everything else is available and you can modify it as easily as any other code) and I honestly felt really comfortable in it. It's incredibly similar to Emacs in terms of power and workflow, but with proper widgets and no need to worry about terminal users.

I also tried using GNU Smalltalk for a project, but that's basically dead at this point, with a lot of things unfinished. I still managed to build quite nice shell PoC in it. I also tried Smalltalk/X-jv, and it was kind of ok, but VW looked more polished and I didn't need the other langs integrations that Smalltalk/X does, so I stayed with VW. Cuis is also a nice attempt, but I wanted to break out of Morphic, so I didn't investigate it too deeply.

TLDR: Smalltalk is not just Pharo, there are Smalltalks that are not like Pharo, that don't treat users like unneeded baggage, that take integration with modern GUIs seriously, that have a lot of advanced tooling that's actually useful and needed. Oh, and also, there are Smalltalks that are not actively hostile to keyboard shortcuts! Give one of them a chance, you'll be surprised!

[1] https://gbracha.blogspot.com/2021/08/how-is-programmer-like-...

Re:Pharo 11 by igouy on Thursday May 11, 2023 @04:43PM (#35908096)
> On my Linux machine releases after 5 refused to as much as display anything

That seems close to misrepresentation, Pharo works OK.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Pharo 9.0.21 on quad-core 3.0GHz Intel® i5-3330® with 15.8 GiB of RAM and 2TB SATA disk drive; using Ubuntu™ 22.10 x86_64 GNU/Linux 5.19.0-29-generic

Re:Pharo 11 by jacquesm on Thursday May 11, 2023 @04:51PM (#35908204)
GP says it didn't work for them as did the GGP, why would you suggest that this is 'close to misrepresentation' when it is simply two datapoints that may be different from the experiences of others (for instance yourself).
Re:Pharo 11 by igouy on Thursday May 11, 2023 @06:46PM (#35909365)
jventura did not say Pharo didn't work. jventura said they didn't know what to do.
Re:Pharo 11 by klibertp on Thursday May 11, 2023 @07:31PM (#35909782)
Quoting from your link:

    COMMAND LINE:
    /opt/src/pharo-vm-Linux-x86_64-stable/pharo --headless [...]
Yeah. It indeed works. With --headless. It's "just" incapable of displaying GUI.

I use Fedora. I ran every other available Smalltalk implementation on it, including Visual Age. GToolkit distribution, too, worked without problems. Pharo didn't, and still doesn't. I know that wanting this to be fixed is lazy of me and shows incredible entitlement, so I stopped - but please don't tell me I misrepresent something.

Re:Pharo 11 by igouy on Friday May 12, 2023 @12:02PM (#35918084)
Do those script files work with your Fedora Pharo install?
Re:Pharo 11 by klibertp on Friday May 12, 2023 @12:27PM (#35918417)
I'm not sure, I'd need to try. I'm also curious how this:

    (SystemWindow windowsIn: World
          satisfying: [:w | w model canDiscardEdits])
       do: [:w | w delete].
works in headless mode. I guess #windowsIn:satisfying: simply returns an empty array?

But, why do you ask?

Re:Pharo 11 by igouy on Friday May 12, 2023 @01:41PM (#35919432)
Curious as to whether Pharo does work with --headless on your Fedora install. (I don't currently have an Ubuntu install to poke.)
Re:Pharo 11 by klibertp on Friday May 12, 2023 @03:15PM (#35920881)
It seems to work. I found Pharo 10 on disk, running it like this:

    -▶ ~/portless/pharolauncher/pharo-vm/pharo --headless Pharo10-SNAPSHOT-64bit-0618067.image a.st
with a.st:

    Object subclass: #BenchmarksGame
       instanceVariableNames: ''
       classVariableNames: ''
       poolDictionaries: ''
       category: ''!

    Transcript show: BenchmarksGame!

First signals an error:

    primitive #primLoadSymbol:module: in TFFIBackend failed
this seems to be related to libgit, as the stacktrace ends with:

    LGitLibrary(FFILibrary)>>ffiCall:
    LGitLibrary>>libgit2_init
but it continues running and displays:

    BenchmarksGame
and then hangs. I suspect I should tell it to quit, but since I don't have the GUI, I can't easily check what method I should call to do that. Ctrl+C works though.

So, yes, without loading the GUI the VM and image seem to work.

BTW, Smalltalk/X has a fully functional REPL, including console based Inspector and debugger. Imagine what would happen if you suggested providing such functionality in Pharo... ("only masochists can bear working with terminal", the "incredible" community says)

Re:Pharo 11 by igouy on Friday May 12, 2023 @03:52PM (#35921432)
I wouldn't describe that as "seem to work".

What if a.st is

    Stdio stdout
        nextPutAll: 'Hello, world';
        nextPut: Character lf
Re:Pharo 11 by klibertp on Friday May 12, 2023 @04:00PM (#35921525)
Here: https://gist.github.com/piotrklibert/e953b7bf85821f88f02a3c2...

If you have an image with Seaside project (they should work in headless mode) or something similar laying around I can try running it, I suspect it'd work.

Re:Pharo 11 by igouy on Friday May 12, 2023 @04:17PM (#35921754)
From the gist that install doesn't work headless.

Seems like this:

https://github.com/pharo-project/pharo/issues/9729#issuecomm...

Re:Pharo 11 by klibertp on Friday May 12, 2023 @04:41PM (#35922086)
I mean... it executed code that was supposed to print "Hello world\n" and it did print that, so how is it not working? :) I have no idea why is libgit needed to boot a VM (is it even?), but evidently some functionality is still available despite the error. Not that it changes much...
Re:Pharo 11 by igouy on Friday May 12, 2023 @05:08PM (#35922430)
https://github.com/pharo-project/pharo/issues/9729#issuecomm...

When all the required dependencies are being found on your Fedora install we should wonder why "the VM seemed to hang and never started properly" but not before.

Re:Pharo 11 by klibertp on Friday May 12, 2023 @05:31PM (#35922686)
Yeah, sure. But why would I put effort into providing the dependencies to Pharo on silver platter? I engaged here just to show that it, indeed, doesn't work for me. Now, it even looks like a well known (yet still not fixed) problem, so I have no further need to do anything.

And no, LD_PRELOAD is not something I should be using, or at least, I didn't need to use it with any other Smalltalk, nor any other program I tried to run in a the past decade. I did have to use it once, with Baldurs Gate 2 (Linux/steam version) and that's about it.

Re:Pharo 11 by igouy on Friday May 12, 2023 @06:16PM (#35923188)
Is it the missing `libpcre.so.3` `libpcreposix.so.3` ?

    ldd libgit2.1.0.0.so
Re:Pharo 11 by klibertp on Friday May 12, 2023 @06:28PM (#35923311)
No.
Re:Pharo 11 by igouy on Friday May 12, 2023 @08:18PM (#35924135)
There seem to be 4 different install methods shown on the Pharo download page. Seems like you used "Pharo Launcher"?

There are also "GNU/Linux Packages" and in particular rpm for Fedora 37, Fedora 36, Fedora 35, Fedora 34. I wonder if you tried them?

On the few occasions that I've needed Pharo, I simply downloaded the "Pharo stable VM for Linux" and "Pharo image" separately and unpacked them into the same directory. Maybe it helped to already have a working git install.

Re:Pharo 11 by xkriva11 on Friday May 12, 2023 @04:38PM (#35922050)
In Pharo Launcher, go to "VMs" and try to delete the VM. Pharo should work on Windows just fine. If not, please, report it on the issue tracker with more details.

> BTW, Smalltalk/X has a fully functional REPL, including console based Inspector and debugger. Imagine what would happen if you suggested providing such functionality in Pharo... ("only masochists can bear working with terminal", the "incredible" community says)

You should not generalize in this way. Some people are working on the TUI Spec backend to allow all the tools to run from the console, and I don't know anyone who doesn't realize the importance of keyboard control.

Re:Pharo 11 by klibertp on Friday May 12, 2023 @04:48PM (#35922188)
> Pharo should work on Windows

Wait, what? We're talking about Linux. Pharo Launcher also, obviously, doesn't display anything, so how could I do anything there?

> report it on the issue tracker with more details.

No.

> You should not generalize in this way.

Sorry, that was too much, you're right. While it is an exact quote from a member of the community, of course it doesn't mean everyone there is that bad.

Good to know that some people have a bit of a common sense. Congrats.