-
Notifications
You must be signed in to change notification settings - Fork 6
Instruction for Linux and Examples #34
Comments
Okey i got this image smalltalk concept, it looks like every project is a vm + IDE.
PS watching this presentation now https://youtu.be/g6QVrbb-ZUc |
Yes, this is still a beta project using a beta version of the virtual machine.
NOTE: I don't know how this will go with ArchLinux. But I will be happy to help you start it, since I am very interested on the feedback of someone with Vala experience. Edit: if you don't know Smalltalk, I recommend you to take some time digging in the documentation. Also, I made a tech talk about this project last month you can check out (sorry for the accent :) ). |
It's nice to hear that someone else knows about Vala. |
About learning Smalltalk, I read this. |
hah, in Russian :)
This will download correct vm and a new image. |
I think chrome auto translator should handle this) This is an article that explains all the Smalltalk syntax from that postcard. There also great aricle "How learning Smalltalk can improve your programming skills". Okay, I finally realized that this command downloads not only the image but also the entire Pharo (it's not very common in the Linux world to run binaries from usual home directories), now I have the latest Pharo 9.0. By the way, its performance is noticeably worse. This is interesting because it has not yet been released, or because it is installed locally and not in the system. Next, to install GTK, I should run the command that is described for windows in the README of this repository? PS I was really surprised when you turned this app into a GTK without changing the syntax. It is not surprising that people in the audience clapped ^^ PSS In this presentation, I heard that you can broadcast Smalltalk in C. does this Mean that you can call Smallalk code from Vala, as happens with LuaVM or JSCore. |
On 21 Jan 2020, at 11:13, gavr123456789 ***@***.***> wrote:
@estebanlm <https://github.com/estebanlm>
in Russian :)
I think chrome auto translator should handle this) This is an article that explains all the Smalltalk syntax from that postcard. There <https://habr.com/ru/post/328156/> also great aricle "How learning Smalltalk can improve your programming skills".
Okay, I finally realized that this command downloads not only the image but also the entire Pharo (it's not very common in the Linux world to run binaries from normal home directories), now I have the latest Pharo 9.0. By the way, its performance is noticeably worse.
Yes, it is still an experimental VM without much optimisation :)
<https://user-images.githubusercontent.com/30507409/72794979-ea57ea80-3c4d-11ea-9295-81de6b2ffc3a.gif>
This is interesting because it has not yet been released, or because it is installed locally and not in the system.
Next, to install GTK, I should run the command that is described for windows in the README of this repository?
You can open a playground and execute this :
```Smalltalk
Metacello new
repository: 'github://pharo-spec/mars-gtk';
baseline: 'Mars';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load
```
PS I was really surprised when you turned this app into a GTK <https://youtu.be/g6QVrbb-ZUc?t=423> without changing the syntax. It is not surprising that people in the audience clapped ^^
:)
But remember is still beta (or less).
PSS In this <https://youtu.be/2d2otdj66dw?t=245> presentation, I heard that you can broadcast Smalltalk in C. does this Mean that you can call Smallalk code from Vala, as happens with LuaVM <https://valadoc.org/lua/Lua.LuaVM.html> or JSCore <https://valadoc.org/javascriptcoregtk-4.0/JSC.html>.
You can do FFI calls, yes. And since Vala compiles to C, its functions will be callable.
… Here small example of pushing variables to luavm from vala instantly:
<https://user-images.githubusercontent.com/30507409/72795996-9ea64080-3c4f-11ea-9b09-225ba9ffd946.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#34?email_source=notifications&email_token=AAD5MXTIKJ2X5ZQPAXWMWZDQ63DC5A5CNFSM4KJIR4WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJPGH3Q#issuecomment-576611310>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD5MXVCJ6XOYZYU3DMDHXLQ63DC5ANCNFSM4KJIR4WA>.
|
it is a known fresh issue: pharo-project/threadedFFI-Plugin#20 |
Oh okey, so i will just wait now. |
Thanks for the report. In particular the fact that Pharo 90 is slower. |
Guille fixed the ThreadedFFI bug so you can continue in your experiments |
@Ducasse is not P9 who is slower, is the experimental headless vm (which we are not yet optimised) |
@Ducasse Thanks for the link, I think it needs to be posted on YouTube so people can find it. Before that, I had already started watching this series of lessons. ~/b/Pharo ❯❯❯ ./pharo-ui Pharo.image
pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events. For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority. The
effect is that heavily loaded systems may experience some latency
issues. If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:
cat <<END | sudo tee /etc/security/limits.d/pharo.conf
* hard rtprio 2
* soft rtprio 2
END
and report to the pharo mailing list whether this improves behaviour.
You will need to log out and log back in for the limits to take effect.
For more information please see
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux
primitive #loadSymbol:module: in ExternalAddress class failed
ExternalAddress class(ProtoObject)>>primitiveFailed:
ExternalAddress class(ProtoObject)>>primitiveFailed
ExternalAddress class>>loadSymbol:module:
TFExternalFunction>>validate
TFPooledExternalAsyncCall(TFExternalAsyncCall)>>validateFunction
TFPooledExternalAsyncCall(TFExternalAsyncCall)>>prepareExecution
[ semaphore := aRunner semaphorePool takeOne.
self prepareExecution.
self doExecuteOn: aRunner ] in TFPooledExternalAsyncCall>>executeOn: in Block: [ semaphore := aRunner semaphorePool takeOne....
BlockClosure>>ensure:
TFPooledExternalAsyncCall>>executeOn:
TFSameThreadRunner(TFRunner)>>invokeFunction:withArguments:
GtkApplication>>initArgC:argV:
TFCalloutAPI(FFICalloutAPI)>>function:library:
GtkApplication(Object)>>ffiCall:library:options:
GtkApplication(Object)>>ffiCall:library:
GtkApplication(Object)>>ffiCall:
GtkApplication>>initArgC:argV:
GtkApplication>>initGtk3
GtkApplication>>start
GtkApplication>>run
GtkApplication class>>ensureRunning
OSGtkDriver>>ensureGtkRunning
OSGtkDriver>>createWindowWithAttributes:osWindow:
OSWindowAttributes>>createWindowHandleFor:
OSWindow>>createWindow
OSWindow>>initWithAttributes:eventHandler:
OSWindow class>>createWithAttributes:eventHandler:
OSWorldRenderer>>doActivate
OSWorldRenderer(AbstractWorldRenderer)>>activate
WorldState>>worldRenderer:
MorphicUIManager>>activate
PrimitiveFailed: primitive #loadSymbol:module: in ExternalAddress class failed
ExternalAddress class(ProtoObject)>>primitiveFailed:
ExternalAddress class(ProtoObject)>>primitiveFailed
ExternalAddress class>>loadSymbol:module:
TFExternalFunction>>validate
TFPooledExternalAsyncCall(TFExternalAsyncCall)>>validateFunction
TFPooledExternalAsyncCall(TFExternalAsyncCall)>>prepareExecution
[ semaphore := aRunner semaphorePool takeOne.
self prepareExecution.
self doExecuteOn: aRunner ] in TFPooledExternalAsyncCall>>executeOn: in Block: [ semaphore := aRunner semaphorePool takeOne....
BlockClosure>>ensure:
TFPooledExternalAsyncCall>>executeOn:
TFSameThreadRunner(TFRunner)>>invokeFunction:withArguments:
GtkApplication>>initArgC:argV:
TFCalloutAPI(FFICalloutAPI)>>function:library:
GtkApplication(Object)>>ffiCall:library:options:
GtkApplication(Object)>>ffiCall:library:
GtkApplication(Object)>>ffiCall:
GtkApplication>>initArgC:argV:
GtkApplication>>initGtk3
GtkApplication>>start
GtkApplication>>run
GtkApplication class>>ensureRunning
OSGtkDriver>>ensureGtkRunning
OSGtkDriver>>createWindowWithAttributes:osWindow:
OSWindowAttributes>>createWindowHandleFor:
OSWindow>>createWindow
OSWindow>>initWithAttributes:eventHandler:
OSWindow class>>createWithAttributes:eventHandler:
OSWorldRenderer>>doActivate
OSWorldRenderer(AbstractWorldRenderer)>>activate
WorldState>>worldRenderer:
MorphicUIManager>>activate
#The app didn't crash or close, but nothing happens after this line. Once again, this happened after I re-downloaded Pharo, launched this code in Playground Metacello new
repository: 'github://pharo-spec/mars-gtk';
baseline: 'Mars';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load And tried to run Pharo again. |
Any ideas? |
It is not finding GTK3. Two ideas:
|
I don't really understand what you mean by |
Here step by step what Im doing demo: https://youtu.be/rE9QxzIbeRg |
Wait, this is most likely due to the fact that Pharo is not installed in the system, but simply in a folder in the form of a binary. |
heh. Which linux distro are you using? (are you sure is 64bit?) But real problem is that I am not looking at the LD_LIBRARY_PATH for it. Anyway, I hacked a way to let you move on for the moment. If you try now, it should work :) |
@estebanlm heh that was easy xd, thanks for ur time!
Arch, Yes. |
Check the class SpDemo or something like that. |
Hi - I've tried to get Pharo working with GTK on Xubuntu 19.10 and failed. I followed the instructions on the Github page. I downloaded the image and headless vm like this: curl https://get.pharo.org/64/80+vmHeadlessLatest | bash This doesn't work at all as opening the downloaded image just blanks out the entire screen (not just the pharo window) So I tried with a Pharo 9 image: curl https://get.pharo.org/64/90+vmHeadlessLatest | bash This works in that I get a working pharo-ui. I can then download the Mars code as specified: Metacello new I save the image but when I run pharo-ui again I get a blank pharo window. In the termianl, there is this error message: PrimitiveFailed: primitive #primCallbackReturn in TFCallbackInvocation failed
Any ideas what I'm doing wrong? Thanks Ken |
Thanks a lot for the report!!!! |
i had a different problem on parabola/arch - this probably should be a separate ticket; but it seems not clear that this software is known to work on any *nix yet, so i will just add to this one, to keep the momentum going with both pharo 80 and 90, when the GUI starts, the debugger pops up immediately, complaining about the libgit.so
the file looks fine
i "fixed" that by deleting the libraries from the lib/ dir and adding symlinks to the system libgit2 libs - by "fixed", i mean that it allowed pharo to start without the FFI error
however, upon loading 'mars-gtk' with metacello, pharo crashed with a segfault; so its not clear that my "fix" was an improvement |
i got a bit further with this - i copied the system libgit2.so.1.0.0 into the lib/ dir and renamed it to the same as in the package (libgit2.so.0.25.1); and i_think that avoided the segfault (something i did worked) - the back-trace showed libssh after libgit; so i also replaced the libssh lib - it was the same version (1.0.1) though so what i found was that it was trying to use SSH to download 'mars-gtk' and could not find any credentials - i changed the setting of "iceberg" in its GUI to prefer HTTPS and that allowed the git clone to start - it chugged away for about a minute looking quite normal, presenting several progress-bar widgets to completion - then it eventually crashed with another segfault - the problem seems to be with libssl now maybe it would help if i compiled the experimental VM from source - where are the sources for that? |
Just in case it helps I've attached the PharoDebug.log for my PrimitiveFailed: primitive #primCallbackReturn in TFCallbackInvocation failed problem. Ken |
Thanks. We hope to get some time to come back to this issue. |
FWIW, i tried the stable VM release today (pharo64-linux-stable 5.0-202002121043) - it also has the same problem loading the libgit2 library; so the problems identified in this ticket are more likely to be not peculiar to the experimental VM, but general problems with pharo on *nixes - upon launching pharo 90/stable, i get the same error as with the experimental VM (referring to libgit2):
replacing libgit2 as i described previously, eliminates that initial error, as with the "latest" VM; but loading a package with metacello, fails immediately with this error:
the call stack for "Array(ExternalFunction)>>invokeWithArguments:" show that 'nil' was passed in i assume that the pharo-dev mailing list is the more appropriate venue to address these particular problems of this ticket, or the pharo-project/opensmalltalk-vm bug tracker |
related: pharo-project/pharo-vm#88 |
Hi, sorry for getting late to you. |
Hi Esteban, a Fedora user here. I was able to fix the libgit2 issue by replacing the version shipped with Pharo with a symbolic link to system installed libgit2, i.e.:
Hope this helps. Pharo is impressive. A huge thank you to all of you working on it! |
I thought I'd try again and see if my PrimitiveFailed: primitive #primCallbackReturn in TFCallbackInvocation failed was still occurring. After all, things move on and I hoped I might have better luck now using the latest image and vm. I followed the instructions on the Read Me. Everything goes OK until I try to launch pharo-ui after having installed Mars. Now I get a different error - the VM crashes on an illegal instruction. I'm on Xubutunu 20.4 64 bit. I've attached the crash dump. Ken |
I've just tried again to get pharo-mars working on xubuntu. Now it doesn't crash the VM. This time it tells me it cannot find the GTK3 library. But the library is present here: /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 I thought this was supposed to be the correct place. Log attached. |
it seems there is a path missing in the list. |
As you suggested, there was no libgtk-3.so in /usr/lib/x86_64-linux-gnu/ so so I created a symbolic link. Now I just get the VM crash again. Dump file attached. |
mmm... that's two problems then. First, I need to add libgtk-3.so.0 to the search path (since ubuntu does not seems to add that link by default). |
Thanks - that's really good to hear |
I come from gnome (Vala lang). So i dont know Smalltalk and i know gtk. I thought that I would get used to Smalltalk faster if I tried to write a couple of basic gtk applications. I found this repository, but I don't understand how to use it. Linux Arch.
The text was updated successfully, but these errors were encountered: