Re: pil21, some progress
> On Feb 17, 2020, at 0:17, Alexander Burger wrote: > > Hi Jean-Christophe, > >> Are there relatively trivial tasks that low-skilled people can help with ? > > Not sure if trivial, Pretty sure it's not :) But thank you for the hints. I'll take a look. Jean-Christophe > but LLVM code can (and has to?) be optimized on several > levels. I have not found the energy yet to research that in detail. > > The main and only reference I used for the development of PilVM is > > https://llvm.org/docs/LangRef.html > > I implemented only the most basic functionality, leaving out the many > possibilities to tune the code with metadata (calling conventions, tail call > optimizations, function attributes and a lot more). > > They are all mentioned in the above reference. > > After the LLVM-IR is generated, it can be further optimized with the LLVM > 'opt' > tool, the "llvm .bc -> .bc modular optimizer and analysis printer". Just > typing > 'opt -help' gives 687 lines ;) > > Then, to get into the speed range of pil64, we might need to put globals > into CPU registers (most important is the the $Link pointer, but also > the signal flag and the stack limit). > > Just as some ideas to start with ... ;) > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Jean-Christophe, > Are there relatively trivial tasks that low-skilled people can help with ? Not sure if trivial, but LLVM code can (and has to?) be optimized on several levels. I have not found the energy yet to research that in detail. The main and only reference I used for the development of PilVM is https://llvm.org/docs/LangRef.html I implemented only the most basic functionality, leaving out the many possibilities to tune the code with metadata (calling conventions, tail call optimizations, function attributes and a lot more). They are all mentioned in the above reference. After the LLVM-IR is generated, it can be further optimized with the LLVM 'opt' tool, the "llvm .bc -> .bc modular optimizer and analysis printer". Just typing 'opt -help' gives 687 lines ;) Then, to get into the speed range of pil64, we might need to put globals into CPU registers (most important is the the $Link pointer, but also the signal flag and the stack limit). Just as some ideas to start with ... ;) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
On Sun, Feb 16, 2020 at 12:12 AM C K Kashyap wrote: > > Thanks Alexa friend of mine recently made a RISC V processor using fpga > and it got me intrigued by the whole FPGA thing ...perhaps a picolisp machine > may be possible :) Hi, Did you know about this? https://www.mail-archive.com/picolisp@software-lab.de/msg04823.html Regards. chri -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Are there relatively trivial tasks that low-skilled people can help with ? Jean-Christophe > On Feb 12, 2020, at 23:25, Alexander Burger wrote: > > Hi Jon, > >> Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) > > Glad to hear that :) > > >> What’s the most important things missing? Functions or stability? > > Stability is all right at the moment, though I did not do any significant > testing. > > But concerning functionality, the largest part is still missing. I hope to get > the bignums done during this month (at the moment only addition, subtraction > and > multiplication are done (and not tested!)). > > Better say what is there instead of what is missing: You see the implemented > functions in src/glob.l in the 'symTab' structure, in the area > > # Garbage collection > (NIL "gc" _gc) > # Arithmetics > (NIL "+" _add) > ... > # System functions > (NIL "native" _native) > (NIL "args" _args) > (NIL "next" _next) > (NIL "rest" _rest) > ($LastSym "version" _version) ) > > But even those work mostly only partially. For example, except for the REPL > *all* I/O is missing. Some things like 'native' or coroutines I did only as a > skeleton, to make sure they are possible in PilVM. > > What *is* done is the core of all, the PilVM compiler in src/lib/llvm.l - that > is where most work went into. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe Jean-Christophe Helary --- http://mac4translators.blogspot.com @brandelune -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Thanks Alexa friend of mine recently made a RISC V processor using fpga and it got me intrigued by the whole FPGA thing ...perhaps a picolisp machine may be possible :) ... .this would require some digesting for me... Looks like there may be other folks who may be interested in the llvm approachmostly to get it running on other platformsI am hoping to run it on windowsperhaps by linking against some cross platform posix.I was wondering if I could offer to help in anyway to expedite :) Regards Kashyap On Fri, Feb 14, 2020, 12:00 PM Alexander Burger wrote: > Hi Kashyap, > > > Hey Alex, I did a quick comparison of a couple of .l files (gc.l and > > flow.l) between pil21 and the current src64 files. I was expecting the > > assembly files to not have much changes - I mean, in theory, only an > > arch/llvm.l and perhaps minor tweaks in some more file should have been > > enough right? > > Yes, in theory absolutely correct :) > > However, the LLVM virtual machine is completely different from the Pil64 > machine. > > The latter is a virtual traditional CPU, with a well-defined set of > registers > (see https://software-lab.de/doc64/asm). Most importantly, the code > depends > almost everywhere on the hardware flags [z]ero, [s]ign and [x,b,c]arry. > > Now, when I thought about porting Pil64 to RISC-V, it came as a shock to > me that > RISC-V has no CPU flags at all!! It is the first time that I encountered a > CPU > without flags. It means, Pil64 cannot be efficiently ported to RISC-V :( > > So I had to think completely new. LLVM is everywhere now, and other people > take > care of all this architecture mess. > > PilVM (the PicoLisp-like language Pil21 is written in) directly maps to > LLVM-IR, > which is *not* a machine with a fixed well-defined set of registers. It is > an > SSA (static single assignment) architecture, meaning you have an infinite > number > of registers, where each is assigned a value exactly once, and never > modified. > > LLVM-IR is a little more low-level than C (it allows, for example, to > manipulate > the stack to a certain level, and supports overflow in arithmetic > operations). > But there is no easy way to map Pil64 to it. > > Pil64 is a *lot* more low level (and thus extremly fast), so the > interesting > part will be whether the many optimizing features of LLVM will give a > machine of > similar performance. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: pil21, some progress
Hi Kashyap, > Hey Alex, I did a quick comparison of a couple of .l files (gc.l and > flow.l) between pil21 and the current src64 files. I was expecting the > assembly files to not have much changes - I mean, in theory, only an > arch/llvm.l and perhaps minor tweaks in some more file should have been > enough right? Yes, in theory absolutely correct :) However, the LLVM virtual machine is completely different from the Pil64 machine. The latter is a virtual traditional CPU, with a well-defined set of registers (see https://software-lab.de/doc64/asm). Most importantly, the code depends almost everywhere on the hardware flags [z]ero, [s]ign and [x,b,c]arry. Now, when I thought about porting Pil64 to RISC-V, it came as a shock to me that RISC-V has no CPU flags at all!! It is the first time that I encountered a CPU without flags. It means, Pil64 cannot be efficiently ported to RISC-V :( So I had to think completely new. LLVM is everywhere now, and other people take care of all this architecture mess. PilVM (the PicoLisp-like language Pil21 is written in) directly maps to LLVM-IR, which is *not* a machine with a fixed well-defined set of registers. It is an SSA (static single assignment) architecture, meaning you have an infinite number of registers, where each is assigned a value exactly once, and never modified. LLVM-IR is a little more low-level than C (it allows, for example, to manipulate the stack to a certain level, and supports overflow in arithmetic operations). But there is no easy way to map Pil64 to it. Pil64 is a *lot* more low level (and thus extremly fast), so the interesting part will be whether the many optimizing features of LLVM will give a machine of similar performance. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Building pil21 on Docker seems trivial - 1. Run the docker container --> docker run --rm -it alpine:latest sh 2. Install the dependencies --> apk add llvm pkgconfig libffi-dev make clang libc-dev gcc 3. Download the source --> wget https://software-lab.de/pil21.tgz 4. Extract the sources --> tar xzf pil.tgz 5. Build --> cd pil21/src && make Hey Alex, I did a quick comparison of a couple of .l files (gc.l and flow.l) between pil21 and the current src64 files. I was expecting the assembly files to not have much changes - I mean, in theory, only an arch/llvm.l and perhaps minor tweaks in some more file should have been enough right? Regards, Kashyap On Wed, Feb 12, 2020 at 11:18 PM Jean-Christophe Helary < jean.christophe.hel...@traduction-libre.org> wrote: > Jon, > > Well, it seems I thought I had llvm installed but it was not the case... :) > I added the relevant data to ~/.profile and now > > cd pil21 > (cd src; make) && bin/picolisp > > works like a charm :) > > Thank you, and thank you Alex :) > > Jean-Christophe > > > On Feb 13, 2020, at 15:29, Jon Kleiser wrote: > > > > Hi Jean-Christophe, > > > > If you find llvm-link by doing "which llvm-link”, and get something like > this: > > /usr/local/opt/llvm/bin/llvm-link > > and you have added the two exports to your ~/.bash_profile, then I think > you only need to make a new terminal window or tab for these exports to > take effect. > > (In brew there is no separate formula with the name "llvm-link”) > > > > /Jon > > > >> On 13 Feb 2020, at 05:02, Jean-Christophe Helary < > jean.christophe.hel...@traduction-libre.org> wrote: > >> > >> > >> > >>> On Feb 13, 2020, at 1:50, Alexander Burger > wrote: > >>> > >>> Hi Jean-Christophe and Kashyap, > >>> > Quick related question - I can build pl21 using LLVM target on Linux > right? > I am planning to give it a shot on docker this weekend. > >>> > >>> It should require just these steps: > >>> > >>> apt install make clang llvm libffi pkg-config > >>> tar xfz pil21.tgz > >>> cd pil21 > >>> (cd src; make) && bin/picolisp > >> > >> I seem to have all the required packages intalled with brew on macos > but I get this error: > >> > >> make: llvm-link: No such file or directory > >> make: *** [picolisp.bc] Error 1 > >> > >> > >> Jean-Christophe > >> > >>> > >>> (or analog for other package managers). > >>> > >>> Note that a running PicoLisp is no longer required for bootstrapping > (as it is > >>> for pil64), because a pre-built src/base.bc is included in the release. > >>> > >>> ☺/ A!ex > >>> > >>> -- > >>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe >
Re: pil21, some progress
Jon, Well, it seems I thought I had llvm installed but it was not the case... :) I added the relevant data to ~/.profile and now cd pil21 (cd src; make) && bin/picolisp works like a charm :) Thank you, and thank you Alex :) Jean-Christophe > On Feb 13, 2020, at 15:29, Jon Kleiser wrote: > > Hi Jean-Christophe, > > If you find llvm-link by doing "which llvm-link”, and get something like this: > /usr/local/opt/llvm/bin/llvm-link > and you have added the two exports to your ~/.bash_profile, then I think you > only need to make a new terminal window or tab for these exports to take > effect. > (In brew there is no separate formula with the name "llvm-link”.) > > /Jon > >> On 13 Feb 2020, at 05:02, Jean-Christophe Helary >> wrote: >> >> >> >>> On Feb 13, 2020, at 1:50, Alexander Burger wrote: >>> >>> Hi Jean-Christophe and Kashyap, >>> Quick related question - I can build pl21 using LLVM target on Linux right? I am planning to give it a shot on docker this weekend. >>> >>> It should require just these steps: >>> >>> apt install make clang llvm libffi pkg-config >>> tar xfz pil21.tgz >>> cd pil21 >>> (cd src; make) && bin/picolisp >> >> I seem to have all the required packages intalled with brew on macos but I >> get this error: >> >> make: llvm-link: No such file or directory >> make: *** [picolisp.bc] Error 1 >> >> >> Jean-Christophe >> >>> >>> (or analog for other package managers). >>> >>> Note that a running PicoLisp is no longer required for bootstrapping (as it >>> is >>> for pil64), because a pre-built src/base.bc is included in the release. >>> >>> ☺/ A!ex >>> >>> -- >>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Jean-Christophe, If you find llvm-link by doing "which llvm-link”, and get something like this: /usr/local/opt/llvm/bin/llvm-link and you have added the two exports to your ~/.bash_profile, then I think you only need to make a new terminal window or tab for these exports to take effect. (In brew there is no separate formula with the name "llvm-link”.) /Jon > On 13 Feb 2020, at 05:02, Jean-Christophe Helary > wrote: > > > >> On Feb 13, 2020, at 1:50, Alexander Burger wrote: >> >> Hi Jean-Christophe and Kashyap, >> >>> Quick related question - I can build pl21 using LLVM target on Linux right? >>> I am planning to give it a shot on docker this weekend. >> >> It should require just these steps: >> >> apt install make clang llvm libffi pkg-config >> tar xfz pil21.tgz >> cd pil21 >> (cd src; make) && bin/picolisp > > I seem to have all the required packages intalled with brew on macos but I > get this error: > > make: llvm-link: No such file or directory > make: *** [picolisp.bc] Error 1 > > > Jean-Christophe > >> >> (or analog for other package managers). >> >> Note that a running PicoLisp is no longer required for bootstrapping (as it >> is >> for pil64), because a pre-built src/base.bc is included in the release. >> >> ☺/ A!ex >> >> -- >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > > Jean-Christophe Helary > --- > http://mac4translators.blogspot.com @brandelune > > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
> On Feb 13, 2020, at 1:50, Alexander Burger wrote: > > Hi Jean-Christophe and Kashyap, > >> Quick related question - I can build pl21 using LLVM target on Linux right? >> I am planning to give it a shot on docker this weekend. > > It should require just these steps: > > apt install make clang llvm libffi pkg-config > tar xfz pil21.tgz > cd pil21 > (cd src; make) && bin/picolisp I seem to have all the required packages intalled with brew on macos but I get this error: make: llvm-link: No such file or directory make: *** [picolisp.bc] Error 1 Jean-Christophe > > (or analog for other package managers). > > Note that a running PicoLisp is no longer required for bootstrapping (as it is > for pil64), because a pre-built src/base.bc is included in the release. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe Jean-Christophe Helary --- http://mac4translators.blogspot.com @brandelune -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
> > ckk@DESKTOP-LROQHRF:~/picoLisp21/pil21/src$ make > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: 'LLVM9.0.1' > Reader: 'LLVM 6.0.0') > llvm-link: error loading file 'base.bc' > Makefile:22: recipe for target 'picolisp.bc' failed > make: *** [picolisp.bc] Error 1 > Attention: you *must* provide LLVM toolchain (llvm-xxx, clang) of one version! Void linux has the same issue, so i use archlinux-based for pil21. (mike) -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Thanks Joe I was trying various "apt update /upgrade/dist-upgrade" :) nothing worked. Your instructions did the trick! Very exciting indeed!!! Regards, Kashyap On Wed, Feb 12, 2020 at 12:02 PM Joe Bogner wrote: > Hi! I was also able to build and run on windows 10 under wsl > > I also had the LLVM error and resolved it with this: > https://solarianprogrammer.com/2017/12/13/linux-wsl-install-clang-libcpp-compile-cpp-17-programs/ > > > sudo apt-get install make clang llvm lldb pkg-config > > > joebo@JB0gner-T460:~/pil21/src$ make > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: > 'LLVM9.0.1' Reader: 'LLVM 6.0.0') > llvm-link: error loading file 'base.bc' > Makefile:22: recipe for target 'picolisp.bc' failed > > joebo@JB0gner-T460:~/pil21/src$ clang --version > clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) > Target: x86_64-pc-linux-gnu > Thread model: posix > InstalledDir: /usr/bin > > > joebo@JB0gner-T460:~/pil21/src$ sudo apt-get upgrade > joebo@JB0gner-T460:~/pil21/src$ sudo apt-get update > > oebo@JB0gner-T460:~$ curl -SL > http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz > | tar -xJC . > % Total% Received % Xferd Average Speed TimeTime Time > Current > Dload Upload Total SpentLeft > Speed > 100 414M 100 414M0 0 4710k 0 0:01:30 0:01:30 --:--:-- > 5233k > joebo@JB0gner-T460:~$ mv clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04 > clang_9.0.0 > joebo@JB0gner-T460:~$ sudo mv clang_9.0.0 /usr/local > joebo@JB0gner-T460:~$ export PATH=/usr/local/clang_9.0.0/bin:$PATH > joebo@JB0gner-T460:~$ export > LD_LIBRARY_PATH=/usr/local/clang_9.0.0/lib:$LD_LIBRARY_PATH > > > joebo@JB0gner-T460:~/pil21$ cd src > joebo@JB0gner-T460:~/pil21/src$ make > ... > joebo@JB0gner-T460:~/pil21/bin$ ls > picolisp > joebo@JB0gner-T460:~/pil21/bin$ ./picolisp > : (+ 1 2) > -> 3 > > Exciting!! > > > > On Wed, Feb 12, 2020 at 12:33 PM Alexander Burger > wrote: > >> Hi Kashyap, >> >> > "libffi-dev" instead of libffi since apt complained that it could not >> find >> > libffi. >> >> Good to know! >> >> >> > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: >> > 'LLVM9.0.1' Reader: 'LLVM 6.0.0') >> >> Oh! LLVM 6 is extremely old, isn't it? I have no idea how much LLVM >> changed over >> time. >> >> ☺/ A!ex >> >> -- >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >> >
Re: pil21, some progress
Hi! I was also able to build and run on windows 10 under wsl I also had the LLVM error and resolved it with this: https://solarianprogrammer.com/2017/12/13/linux-wsl-install-clang-libcpp-compile-cpp-17-programs/ sudo apt-get install make clang llvm lldb pkg-config joebo@JB0gner-T460:~/pil21/src$ make llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: 'LLVM9.0.1' Reader: 'LLVM 6.0.0') llvm-link: error loading file 'base.bc' Makefile:22: recipe for target 'picolisp.bc' failed joebo@JB0gner-T460:~/pil21/src$ clang --version clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin joebo@JB0gner-T460:~/pil21/src$ sudo apt-get upgrade joebo@JB0gner-T460:~/pil21/src$ sudo apt-get update oebo@JB0gner-T460:~$ curl -SL http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | tar -xJC . % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 414M 100 414M0 0 4710k 0 0:01:30 0:01:30 --:--:-- 5233k joebo@JB0gner-T460:~$ mv clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04 clang_9.0.0 joebo@JB0gner-T460:~$ sudo mv clang_9.0.0 /usr/local joebo@JB0gner-T460:~$ export PATH=/usr/local/clang_9.0.0/bin:$PATH joebo@JB0gner-T460:~$ export LD_LIBRARY_PATH=/usr/local/clang_9.0.0/lib:$LD_LIBRARY_PATH joebo@JB0gner-T460:~/pil21$ cd src joebo@JB0gner-T460:~/pil21/src$ make .. joebo@JB0gner-T460:~/pil21/bin$ ls picolisp joebo@JB0gner-T460:~/pil21/bin$ ./picolisp : (+ 1 2) -> 3 Exciting!! On Wed, Feb 12, 2020 at 12:33 PM Alexander Burger wrote: > Hi Kashyap, > > > "libffi-dev" instead of libffi since apt complained that it could not > find > > libffi. > > Good to know! > > > > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: > > 'LLVM9.0.1' Reader: 'LLVM 6.0.0') > > Oh! LLVM 6 is extremely old, isn't it? I have no idea how much LLVM > changed over > time. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: pil21, some progress
Hi Jean-Christophe, It seems I have my llvm installed by “brew install llvm”, and that probably also gave me llvm-config. If I do llvm-config --version , then I get 9.0.0. If I do which llvm-config , then I get /usr/local/opt/llvm/bin/llvm-config You can check if you have libffi by doing “brew info libffi” If you have to install it, or try to upgrade it, you will probably (if I remember correctly) get a suggestion of putting these two lines into your ~/.bash_profile: export LDFLAGS="-L/usr/local/opt/libffi/lib" export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig” I’m using macOS Mojave, 10.14.6. /Jon > On 12 Feb 2020, at 17:15, Jean-Christophe Helary > wrote: > > Jon, > > Would you mind describing how you build pil21 ? I don't seem to be able to > "make" it (no pun intended). > > JC > >> On Feb 12, 2020, at 23:00, Jon Kleiser wrote: >> >> Hi Alex, >> >> Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) >> What’s the most important things missing? Functions or stability? >> >> /Jon >> >>> On 12. Feb, 2020, at 13:16, Alexander Burger wrote: >>> >>> Hi Jon, >>> I have now made some progress in building pil21 on my Mac. >>> >>> Good! :) >>> >>> lib.c:7:35: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat] fprintf(stderr, "%s %lX\n", s, n); >>> >>> I see, that's an easy one. Just a warning - I fixed it here now by changing >>> the >>> line 7 in src/lib.c to >>> >>> fprintf(stderr, "%s %lX\n", s, (unsigned long)n); >>> >>> Will be in the next release. >>> >>> The rest of 'make' went through without cemplaints? >>> >>> I noticed that there’s a mail link to me on the https://software-lab.de/down.html page. You may change my mail address there to jon.klei...@icloud.com. >>> >>> Ah, thanks! Changed. >>> And the two file links there (gl.tgz and china.tgz) will probably go 404 in a few months. >>> >>> OK, I see. I removed them from down.html >>> >>> >>> -- >>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Kashyap, > "libffi-dev" instead of libffi since apt complained that it could not find > libffi. Good to know! > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: > 'LLVM9.0.1' Reader: 'LLVM 6.0.0') Oh! LLVM 6 is extremely old, isn't it? I have no idea how much LLVM changed over time. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
I could not resist ... I just gave it a quick spin on my WSL - I had to use "libffi-dev" instead of libffi since apt complained that it could not find libffi. After that I ran make and got this - I think the error message is obvious - I'll try adjusting the llvm version later. ckk@DESKTOP-LROQHRF:~/picoLisp21/pil21/src$ make llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: 'LLVM9.0.1' Reader: 'LLVM 6.0.0') llvm-link: error loading file 'base.bc' Makefile:22: recipe for target 'picolisp.bc' failed make: *** [picolisp.bc] Error 1 Regards, Kashyap On Wed, Feb 12, 2020 at 8:57 AM Alexander Burger wrote: > Hi Jean-Christophe and Kashyap, > > > Quick related question - I can build pl21 using LLVM target on Linux > right? > > I am planning to give it a shot on docker this weekend. > > It should require just these steps: > >apt install make clang llvm libffi pkg-config >tar xfz pil21.tgz >cd pil21 >(cd src; make) && bin/picolisp > > (or analog for other package managers). > > Note that a running PicoLisp is no longer required for bootstrapping (as > it is > for pil64), because a pre-built src/base.bc is included in the release. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: pil21, some progress
Oh ... and I forgot - super cheers for not requiring PicoLisp and having base.bc in place :) On Wed, Feb 12, 2020 at 9:14 AM C K Kashyap wrote: > I could not resist ... I just gave it a quick spin on my WSL - I had to > use "libffi-dev" instead of libffi since apt complained that it could not > find libffi. > > After that I ran make and got this - I think the error message is obvious > - I'll try adjusting the llvm version later. > > ckk@DESKTOP-LROQHRF:~/picoLisp21/pil21/src$ make > llvm-link: base.bc: error: Unknown attribute kind (60) (Producer: > 'LLVM9.0.1' Reader: 'LLVM 6.0.0') > llvm-link: error loading file 'base.bc' > Makefile:22: recipe for target 'picolisp.bc' failed > make: *** [picolisp.bc] Error 1 > > > Regards, > Kashyap > > > On Wed, Feb 12, 2020 at 8:57 AM Alexander Burger > wrote: > >> Hi Jean-Christophe and Kashyap, >> >> > Quick related question - I can build pl21 using LLVM target on Linux >> right? >> > I am planning to give it a shot on docker this weekend. >> >> It should require just these steps: >> >>apt install make clang llvm libffi pkg-config >>tar xfz pil21.tgz >>cd pil21 >>(cd src; make) && bin/picolisp >> >> (or analog for other package managers). >> >> Note that a running PicoLisp is no longer required for bootstrapping (as >> it is >> for pil64), because a pre-built src/base.bc is included in the release. >> >> ☺/ A!ex >> >> -- >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >> >
Re: pil21, some progress
Hi Jean-Christophe and Kashyap, > Quick related question - I can build pl21 using LLVM target on Linux right? > I am planning to give it a shot on docker this weekend. It should require just these steps: apt install make clang llvm libffi pkg-config tar xfz pil21.tgz cd pil21 (cd src; make) && bin/picolisp (or analog for other package managers). Note that a running PicoLisp is no longer required for bootstrapping (as it is for pil64), because a pre-built src/base.bc is included in the release. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Quick related question - I can build pl21 using LLVM target on Linux right? I am planning to give it a shot on docker this weekend. Regards, Kashyap On Wed, Feb 12, 2020 at 8:21 AM Jean-Christophe Helary < jean.christophe.hel...@traduction-libre.org> wrote: > Jon, > > Would you mind describing how you build pil21 ? I don't seem to be able to > "make" it (no pun intended). > > JC > > > On Feb 12, 2020, at 23:00, Jon Kleiser wrote: > > > > Hi Alex, > > > > Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) > > What’s the most important things missing? Functions or stability? > > > > /Jon > > > >> On 12. Feb, 2020, at 13:16, Alexander Burger > wrote: > >> > >> Hi Jon, > >> > >>> I have now made some progress in building pil21 on my Mac. > >> > >> Good! :) > >> > >> > >>> lib.c:7:35: warning: format specifies type 'unsigned long' but the > argument has type 'int64_t' > >>> (aka 'long long') [-Wformat] > >>> fprintf(stderr, "%s %lX\n", s, n); > >> > >> I see, that's an easy one. Just a warning - I fixed it here now by > changing the > >> line 7 in src/lib.c to > >> > >> fprintf(stderr, "%s %lX\n", s, (unsigned long)n); > >> > >> Will be in the next release. > >> > >> The rest of 'make' went through without cemplaints? > >> > >> > >>> I noticed that there’s a mail link to me on the > >>> https://software-lab.de/down.html page. You may change my mail > address there > >>> to jon.klei...@icloud.com. > >> > >> Ah, thanks! Changed. > >> > >>> And the two file links there (gl.tgz and china.tgz) > >>> will probably go 404 in a few months. > >> > >> OK, I see. I removed them from down.html > >> > >> > >> -- > >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe >
Re: pil21, some progress
Jon, Would you mind describing how you build pil21 ? I don't seem to be able to "make" it (no pun intended). JC > On Feb 12, 2020, at 23:00, Jon Kleiser wrote: > > Hi Alex, > > Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) > What’s the most important things missing? Functions or stability? > > /Jon > >> On 12. Feb, 2020, at 13:16, Alexander Burger wrote: >> >> Hi Jon, >> >>> I have now made some progress in building pil21 on my Mac. >> >> Good! :) >> >> >>> lib.c:7:35: warning: format specifies type 'unsigned long' but the argument >>> has type 'int64_t' >>> (aka 'long long') [-Wformat] >>> fprintf(stderr, "%s %lX\n", s, n); >> >> I see, that's an easy one. Just a warning - I fixed it here now by changing >> the >> line 7 in src/lib.c to >> >> fprintf(stderr, "%s %lX\n", s, (unsigned long)n); >> >> Will be in the next release. >> >> The rest of 'make' went through without cemplaints? >> >> >>> I noticed that there’s a mail link to me on the >>> https://software-lab.de/down.html page. You may change my mail address there >>> to jon.klei...@icloud.com. >> >> Ah, thanks! Changed. >> >>> And the two file links there (gl.tgz and china.tgz) >>> will probably go 404 in a few months. >> >> OK, I see. I removed them from down.html >> >> >> -- >> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Jon, > Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) Glad to hear that :) > What’s the most important things missing? Functions or stability? Stability is all right at the moment, though I did not do any significant testing. But concerning functionality, the largest part is still missing. I hope to get the bignums done during this month (at the moment only addition, subtraction and multiplication are done (and not tested!)). Better say what is there instead of what is missing: You see the implemented functions in src/glob.l in the 'symTab' structure, in the area # Garbage collection (NIL "gc" _gc) # Arithmetics (NIL "+" _add) ... # System functions (NIL "native" _native) (NIL "args" _args) (NIL "next" _next) (NIL "rest" _rest) ($LastSym "version" _version) ) But even those work mostly only partially. For example, except for the REPL *all* I/O is missing. Some things like 'native' or coroutines I did only as a skeleton, to make sure they are possible in PilVM. What *is* done is the core of all, the PilVM compiler in src/lib/llvm.l - that is where most work went into. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Alex, Great! Now it works. I just did a “(+ 2 3 4 5)” and got 14. ;-) What’s the most important things missing? Functions or stability? /Jon > On 12. Feb, 2020, at 13:16, Alexander Burger wrote: > > Hi Jon, > >> I have now made some progress in building pil21 on my Mac. > > Good! :) > > >> lib.c:7:35: warning: format specifies type 'unsigned long' but the argument >> has type 'int64_t' >> (aka 'long long') [-Wformat] >> fprintf(stderr, "%s %lX\n", s, n); > > I see, that's an easy one. Just a warning - I fixed it here now by changing > the > line 7 in src/lib.c to > > fprintf(stderr, "%s %lX\n", s, (unsigned long)n); > > Will be in the next release. > > The rest of 'make' went through without cemplaints? > > >> I noticed that there’s a mail link to me on the >> https://software-lab.de/down.html page. You may change my mail address there >> to jon.klei...@icloud.com. > > Ah, thanks! Changed. > >> And the two file links there (gl.tgz and china.tgz) >> will probably go 404 in a few months. > > OK, I see. I removed them from down.html > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: pil21, some progress
Hi Jon, > I have now made some progress in building pil21 on my Mac. Good! :) > lib.c:7:35: warning: format specifies type 'unsigned long' but the argument > has type 'int64_t' > (aka 'long long') [-Wformat] >fprintf(stderr, "%s %lX\n", s, n); I see, that's an easy one. Just a warning - I fixed it here now by changing the line 7 in src/lib.c to fprintf(stderr, "%s %lX\n", s, (unsigned long)n); Will be in the next release. The rest of 'make' went through without cemplaints? > I noticed that there’s a mail link to me on the > https://software-lab.de/down.html page. You may change my mail address there > to jon.klei...@icloud.com. Ah, thanks! Changed. > And the two file links there (gl.tgz and china.tgz) > will probably go 404 in a few months. OK, I see. I removed them from down.html -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe