From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:53566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hX5e0-0002xh-Pa for guix-patches@gnu.org; Sat, 01 Jun 2019 11:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hX5dy-0007fe-Th for guix-patches@gnu.org; Sat, 01 Jun 2019 11:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53137) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hX5dy-0007fX-Q1 for guix-patches@gnu.org; Sat, 01 Jun 2019 11:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hX5dy-0002Xx-JT for guix-patches@gnu.org; Sat, 01 Jun 2019 11:10:02 -0400 Subject: [bug#36033] Add Smalltalk Pharo VM Resent-Message-ID: Content-Type: multipart/alternative; boundary=Apple-Mail-9359EA69-7131-49E9-8557-C6482BD7ACAD Mime-Version: 1.0 (1.0) From: Brian Woodcox In-Reply-To: <877ea5fnih.fsf@gnu.org> Date: Sat, 1 Jun 2019 09:08:27 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <877ea5fnih.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36033@debbugs.gnu.org --Apple-Mail-9359EA69-7131-49E9-8557-C6482BD7ACAD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks Ludo, My comments are below. > On Jun 1, 2019, at 7:23 AM, Ludovic Court=C3=A8s wrote: >=20 > Hello, >=20 > Thanks for working on this, and congrats on your first package, which is > not an easy one! :-) >=20 > Some preliminary comments: >=20 > Brian Woodcox skribis: >=20 >> =46rom 49683e04e51cd904571008fa7979a3f58ae0134c Mon Sep 17 00:00:00 2001 >> From: "Brian C. Woodcox" >> Date: Fri, 31 May 2019 13:14:54 -0600 >> Subject: [PATCH] Add pharo-vm package >=20 > [...] >=20 >> +(define %url "https://github.com/OpenSmalltalk/opensmalltalk-vm.git") >=20 > My understanding (but I=E2=80=99m no expert) is that this is a VM that can= run > Pharo bytecode, but it=E2=80=99s not =E2=80=9Cthe=E2=80=9D Pharo VM. Is i= t correct? More info =E2=80=94> https://ci.inria.fr/pharo-contribution/job/UpdatedPharo= ByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.html =E2=80=9C1. The virtual machine (VM) is the only component that is different= for each operating system. The VM is the execution engine (similar to a JVM= ). It takes Pharo bytcode that is generated each time user compiles a piece o= f code, converts it to machine code and executes it. Pharo comes with the Co= g VM a very fast JITing VM. The VM executable is named:=E2=80=9D >=20 >> +(define-public pharo-vm >> + (package >> + (name "pharo-vm") >=20 > Consequently, it looks like this should be called =E2=80=98opensmalltalk-v= m=E2=80=99, > no? >=20 Not exactly =E2=80=94> https://github.com/pharo-project/pharo-vm =E2=80=9CDear user, we have move PharoVM development to OpenSmalltalk-VM, pl= ease go there if you are looking for building a VM.=E2=80=9D In the OpenSmalltalk-VM repository they have build scripts for different vm=E2= =80=99s such as squeak, pharo, etc.. So this is to distinguish the one we are packaging. >> + (arguments >> + `(#:tests? #f ;; no tests available >=20 > Or maybe there=E2=80=99s a special command to run them? >=20 >> + ;; add symlinks >> + (symlink (string-append (assoc-ref %build-inputs "libgit2= ") "/lib/libgit2.so") >> + (string-append out "/lib/pharo/" pharo-version "= /libgit2.so")) >> + (symlink (string-append (assoc-ref %build-inputs "libssh2= ") "/lib/libssh2.so") >> + (string-append out "/lib/pharo/" pharo-version "= /libssh2.so")) >> + (symlink (string-append (assoc-ref %build-inputs "openssl= ") "/lib/libssl.so") >> + (string-append out "/lib/pharo/" pharo-version "= /libssl.so")) >> + (symlink (string-append (assoc-ref %build-inputs "freetyp= e")"/lib/libfreetype.so.6") >> + (string-append out "/lib/pharo/" pharo-version "= /libfreetype.so.6"))) >=20 > Those symlinks look somewhat inelegant to me. :-) Me too, unfortunately, Pharo won=E2=80=99t run without (most of) these. I d= idn=E2=80=99t dig deep enough in the code, but if they made some changes, I a= m pretty sure the symlinks could be done away with. I found in some cases t= hat pharo found a couple of libraries in the store during the build process.= My hope is that other Pharo users might use Pharo in Guix and maybe this iss= ue can be resolved over time. >=20 > Could we instead arrange so that the VM searches for those files in > their right place? Often that involves substituting things like > =E2=80=9Clibfoo.so=E2=80=9D in the code with the corresponding absolute fi= le name (see > for example how this is done for Racket.) Possibly, I would have to look into it when I have some time. >=20 > Last question: does this Git checkout contain binaries, such as > Smalltalk images? IOW, is this being built entirely from source, or is > it bootstrap from opaque binaries? (I know that Pharo itself is or used > to be bootstrap from very old Smalltalk images and that work was ongoing > to get rid of them and have a nicer bootstrapping story.) Everything in this vm is being built from source. I skip this file =E2=80=94> https://github.com/OpenSmalltalk/opensmalltalk-v= m/blob/Cog/build.linux64x64/pharo.cog.spur/build/mvm And use the packages in Guix instead. The images (which are separate from this) are definitely are built by bootst= rapping which will be left to the user at this point. I think if the developers and users were using Guix, they would enjoy it, as= I have a script that will automatically populate the version and date value= s from any commit. And it could be installed as a separate package. P.S. I am very new to Smalltalk as well. Just started using it a couple of m= onths ago and thought it would be great if it was on Guix. >=20 > Thank you, > Ludo=E2=80=99. --Apple-Mail-9359EA69-7131-49E9-8557-C6482BD7ACAD Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks Ludo,

My comments= are below.

On Jun 1, 2019, at 7:23 AM, Ludovic Court=C3=A8= s <ludo@gnu.org> wrote:

Hello,

Thanks for working on this, and congrats on your first package, which is=
not an easy one!  :-)

Some preliminary comments:

Brian Woodcox &= lt;bw@inskydata.com> skribis:

=46rom 49683e04e51cd= 904571008fa7979a3f58ae0134c Mon Sep 17 00:00:00 2001
=
From: "Brian C. Woodcox" <bw@InSkyData.com>
Date: Fri, 31 May 2019 13:14:54 -0600
Subject: [PATCH] Add pharo-vm pack= age

[...]

+(define %url "https://github.com/OpenSmalltalk= /opensmalltalk-vm.git")

My= understanding (but I=E2=80=99m no expert) is that this is a VM that can run=
Pharo bytecode, but it=E2=80=99s not =E2=80=9Cthe=E2=80=9D P= haro VM.  Is it correct?

More info =E2=80=94> https://ci.inria.fr/pharo-contribution/job/UpdatedPha= roByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.htm= l

=E2=80=9C1. The virtual machine=  (VM) is the only component that is different for each operating system= . The VM is the execution engine (similar to a JVM). It takes Pharo bytcode t= hat is generated each time user compiles a piece of code, converts it to mac= hine code and executes it. Pharo comes with the Cog VM a very fast JITing VM= . The VM executable is named:=E2=80=9D


+(define-public p= haro-vm
+  (pack= age
+   &nb= sp;(name "pharo-vm")

Consequen= tly, it looks like this should be called =E2=80=98opensmalltalk-vm=E2=80=99,=
no?

Not exact= ly =E2=80=94> = https://github.com/pharo-project/pharo-vm

=E2=80=9CDear user, we h= ave move PharoVM development to OpenSmalltalk-VM, please go there if you are looking for building a V= M.=E2=80=9D

In the OpenSmalltalk-VM reposito= ry they have build scripts for different vm=E2=80=99s such as squeak, pharo,= etc..

So this is to distinguish the one we are pac= kaging.

+    (arguments
+     `(#:tests? #f ;; no tests available

Or maybe there=E2=80=99s a speci= al command to run them?

+            &= nbsp;  ;; add symlinks
+           &n= bsp;   (symlink (string-append (assoc-ref %build-inputs "libg= it2") "/lib/libgit2.so")
+            &nbs= p;           (string-= append out "/lib/pharo/" pharo-version "/libgit2.so"))
+       &nbs= p;       (symlink (string-append (assoc-r= ef %build-inputs "libssh2") "/lib/libssh2.so")
+         =             &nbs= p;  (string-append out "/lib/pharo/" pharo-version "/libssh2.so"))=
+    =            (symlink (= string-append (assoc-ref %build-inputs "openssl") "/lib/libssl.so")
+     &nb= sp;            &= nbsp;     (string-append out "/lib/pharo/" pharo-ve= rsion "/libssl.so"))
= +             &n= bsp; (symlink (string-append (assoc-ref %build-inputs "freetype")"/lib/= libfreetype.so.6")
+ &= nbsp;            = ;          (string-append o= ut "/lib/pharo/" pharo-version "/libfreetype.so.6")))

Those symlinks look somewhat inelegant to me.  = :-)

Me too, unfortunately, Pharo= won=E2=80=99t run without (most of) these.  I didn=E2=80=99t dig deep e= nough in the code, but if they made some changes, I am pretty sure the symli= nks could be done away with.  I found in some cases that pharo found a c= ouple of libraries in the store during the build process.

My hope is that other Pharo users might use Pharo in Guix and maybe t= his issue can be resolved over time.

Could we instead arrange so that the VM searches for those= files in
their right place?  Often that involves subst= ituting things like
=E2=80=9Clibfoo.so=E2=80=9D in the code w= ith the corresponding absolute file name (see
for example ho= w this is done for Racket.)

Poss= ibly, I would have to look into it when I have some time.

Last question: does this Git checkout= contain binaries, such as
Smalltalk images?  IOW, is t= his being built entirely from source, or is
it bootstrap fro= m opaque binaries?  (I know that Pharo itself is or used
to be bootstrap from very old Smalltalk images and that work was ongoing
to get rid of them and have a nicer bootstrapping story.)

Everything in this vm is being buil= t from source.

=
And use the packages in Guix instead.

The images (which are separate from this) are definitely are built by boot= strapping which will be left to the user at this point.

=
I think if the developers and users were using Guix, they would enjoy i= t, as I have a script that will automatically populate the version and date v= alues from any commit.  And it could be installed as a separate package= .

P.S. I am very new to Smalltalk as well.  Ju= st started using it a couple of months ago and thought it would be great if i= t was on Guix.

Than= k you,
Ludo=E2=80=99.
= --Apple-Mail-9359EA69-7131-49E9-8557-C6482BD7ACAD--