beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
Iacob has quit [Ping timeout: 240 seconds]
Iacob has joined #picolisp
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
<abu[m]> Welcome xigoi! And thanks benerothfor the perfect explanations! ☺
<abu[m]> xigoi: You could also take a look at https://picolisp-blog.hashnode.dev and https://twitter.com/PicoLispREPL
tankf33der has quit [Quit: the lounge - https://webirc.envs.net]
tankf33der has joined #picolisp
tankf33der has quit [Client Quit]
tankf33der has joined #picolisp
<xigoi> I'm a first-year university student (Mathematical Informatics)
<abu[m]> Great!
<beneroth> cool :D
clacke has joined #picolisp
calle has joined #picolisp
calle has quit [Ping timeout: 255 seconds]
calle has joined #picolisp
calle has quit [Ping timeout: 276 seconds]
<anddam> possibly Stupid Question of The Month: is there an editor written in picolisp, like Emacs is in elisp?
<abu[m]> anddam: Good question. I do not know of any
<abu[m]> Pil21 had some glue functions to interface to real Emacs, perhaps these should be put into a separate lib?
<abu[m]> I think I misunderstood your question
<abu[m]> I read: Is there *another* editor ...
<abu[m]> *One* editor is there. It is Vip (VI in pil)
<abu[m]> Vip is in the standard PicoLisp distribution. Just call (vi 'car) or (vi "file.l".
<abu[m]> Or (vi 'vi) if course ;)
<anddam> is pil best installed from source rather than a system package?
<anddam> I ask since I am on Void and I see no picolisp package
<abu[m]> yes. You could use Debian testing too, which is quite up-to-date
<abu[m]> But installing from the TGZ is the best
<anddam> is it updated often?
<abu[m]> Yes, it is a rolling release. Sometimes several times per week
<anddam> man, that's a lot of effort
<anddam> does it have an ultimate "goal" in terms of features to be implemented in the language?
<abu[m]> Not so much, all tiny steps
<anddam> i.e. do you see a point where you say "that's it"
<anddam> "it's complete"
<abu[m]> I thought that so often :) But as I'm using it for all my work, new requirements kept popping up
<abu[m]> or bugs :(
<abu[m]> Other things were necessary to make it work well on PilBox/Android
<anddam> I see
<anddam> I have a tarball named "foo", that extracts as bar/ and then has a makefile (no configure required) in bar/src
<anddam> so I set build_style=gnu-makefile and wrksrc=bar/ but how do I exec into src?
<anddam> do I cd in pre-configure or pass a flag to make?
<anddam> x/-configure/c/_build/
<abu[m]> Is this about the Pil build?
<abu[m]> I mean, doesn't this simply work? https://software-lab.de/INSTALL
<anddam> ohoh yes
<anddam> I thought I was in #void, I dropped a simple port for 22.6
<abu[m]> Sorry, what is #void ? An IRC channel
<abu[m]> ?
<anddam> yes it is
<anddam> is openssl fine for building 22.6? I followed Debian desc that has libssl-dev but in turn relies on openssl-dev
<abu[m]> All right :)
<anddam> namely it is #voidlinux, the official channel for Void Linux distribution
<abu[m]> OK
<abu[m]> On Termux I do also just have "openssl"
<anddam> ohh sorry the termbin didn't go through, I bet there's a 013 in that output
<abu[m]> Uh, this looks a bit like an outdated LLVM. Is it 7 or above?
<anddam> llvm is at 12 but it seems it's not installed in the chroot
<abu[m]> llvm-link is there though
<anddam> not it is installed, and is 12
<anddam> x/not /c/no /
<abu[m]> ok, hmm
<abu[m]> The error is quite cryptic
<abu[m]> The error is in lib.bc, not base.bc (which is built first iirc)
<abu[m]> lib.bc has system-dependent stuff, it is built from lib.c
<anddam> makefile has no verbose option
<anddam> should I try an older llvm?
<abu[m]> No, 12 is fine. tankf33der even tested with 14 I think
<abu[m]> What does "file src/lib.bc" say?
<abu[m]> should be "LLVM IR bitcode"
<anddam> not yet
<anddam> I am checking before the make now
<abu[m]> yeah, it compiled to ELF
<anddam> as the error log said
<abu[m]> indeed
<anddam> $(CC) -O3 -w -c -o lib.bc -D_OS='"$(OS)"' -D_CPU='"$(CPU)"' `pkg-config --cflags libffi` -emit-llvm lib.c
<abu[m]> Perhaps "make clean" and then fetch "base.ll" from the tarball
<abu[m]> So CC should be clang
<abu[m]> and emit LLVM
<abu[m]> Is there any pre-build package for PicoLisp (no matter which version) in Void Linux?
<anddam> no, that's why I tossed out a template
<abu[m]> ok
<abu[m]> Cause otherwise you could bootstrap. But as base.ll built successfully, it would probably not make a difference
<beneroth> void linux - void of picolisp
<beneroth> let's hope you can change that, anddam :)
<abu[m]> Indeed! ☺
<anddam> yea, it's building now
<abu[m]> Cool!
<abu[m]> Why is it all in a chroot?
<abu[m]> (I always build as normal user -> local install)
<anddam> abu[m]: due to the way the packaging tool works on Void
<anddam> xbps-src
<anddam> I need to sort the install phase
<anddam> INSTALL > "Global Installation"
<abu[m]> ok
<anddam> why no installation target in Makefile?
<abu[m]> Because the local installation is the recommended way
<abu[m]> PicoLisp is so tiny and changes so often, so that several local installations are useful
<abu[m]> Then just the global links are enough
<abu[m]> I personally never use the global calls
<abu[m]> Always ../somePath/pil21 app.l ...
<abu[m]> But you are right, a global install is kind of expected
calle has joined #picolisp
<anddam> "In a global installation, the 'pil' command should be used." I see there are two "pil commands" (and two vip ones)
<anddam> a shell script that calls picolisp with lib.l and ext.l and the script arguments
<abu[m]> yes, they are provided, so that they can be copied into /usr/...
<anddam> and a picolisp program loading slightly different libs and then pilog
<anddam> I see installation instructions refers to the picolisp one
<abu[m]> They both load the same libs
<abu[m]> I use ~/pil21/pil
<anddam> shell script has exec ${0%/*}/bin/picolisp ${0%/*}/lib.l @ext.l "$@"
<anddam> pil program has (load "@lib/net.l" "@lib/misc.l" "@lib/btree.l" "@lib/db.l" "@lib/pilog.l")
<anddam> doesn't the latter lack the argument and load different libs?
<abu[m]> They are in ext.l
<anddam> ok
<abu[m]> The one in bin/pil uses absolute paths, and is thus less general
<abu[m]> The /bin/sh one examines the path of "lib.l"
<abu[m]> (in fact bin/picolisp always inspects the path of lib.l)
<abu[m]> In summary, the difference is that bin/pil can be called just as 'pil' while the other one expects an absolute or relative path
<abu[m]> I never even thought about an install target. My bad, it simply never was an issue
<abu[m]> The Debian packaging took care of that (thanks Kanru!)
<anddam> I figure I need all the stuff in bin/, right?
<anddam> ah bin/watchdog is going to be an issue
<anddam> I'll do what Debian does
<abu[m]> Good. I think bin/watchdog is not really needed
<abu[m]> It is just a nice to have tool
<abu[m]> And also comes with a relative path ;) I think nobody except our company ever used it, at least I never heard any questions
<anddam> why are img/* in /usr/lib rather than /usr/share?
<abu[m]> They are loaded relative to the "installation" path, determined by lib.l
<abu[m]> in pil syntax it is "@img/xxx.png"
<abu[m]> Same goes for @doc/
<abu[m]> which is linked I think to /usr/share/doc/
<abu[m]> Yes, on Debian the "installation" dir is /usr/lib/picolisp/
<anddam> Debian seems to not install /usr/share/doc at all
<anddam> no wait, doc-base
<abu[m]> lrwxrwxrwx 1 root root 28 Jan 3 2021 doc -> ../../share/doc/picolisp/doc/
<anddam> yea, I am unfamiliar with deb packaging
<beneroth> abu[m], I've used @bin/ssl, but not yet @bin/watchdog. I believe watchdog is very specific to the form.l web application setup. but when running a bigger form.l environment then I would think watchdog is strongly recommended to be used.
<abu[m]> It has nothing to do with GUI and form.l. It just sends a mail if registered applications don't ping, and kills them after a while
<anddam> abu[m]: do you need both /usr/lib/picolisp and /usr/share/picolisp?
<anddam> I mean debian seems to symlink those, I wonder if that's required due to some hardcoded path when searching this or that other object inside pil
<abu[m]> Just /usr/lib/picolisp is enough
<abu[m]> I thought it is just for standardization, i.e. where people look for docs etc.
<abu[m]> At runtime whole pil can be encapsulated into the single installation directory
<abu[m]> This makes it so easy to run it in e.g. PilBox
<beneroth> abu[m], ah, so really just a watchdog. thanks.
<beneroth> thanks for the clarification.
<beneroth> anddam, I think there are no hardcoded paths, the paths are all relative to the picolisp directory. If you install bin/pil globally it takes the execution path to run in its own directory (otherwise, when starting it as ./pil you're obviously in the current dir as run dir, and picolisp files will be assumed relative from there unless specified as absolute path)
<abu[m]> T
calle has quit [Ping timeout: 240 seconds]
calle has joined #picolisp
calle has quit [Ping timeout: 240 seconds]
calle has joined #picolisp
calle has quit [Ping timeout: 264 seconds]
calle has joined #picolisp
clacke has quit [Remote host closed the connection]
calle has quit [Ping timeout: 240 seconds]