Re: pilbox file sharing

2021-01-19 Thread Alexander Burger
Hi Shaughan, > Yes, I set the storage permission. This is odd, since it works for you. Termux > still works for me, but not pilbox. I'm using a Samsung Galaxy Tab S5e. > Samsung > always locks everything down—maybe that's it. Strange. So for a first fix, I will set the requestLegacyExternalStora

Re: pilbox file sharing

2021-01-18 Thread Alexander Burger
Hi Shaughan, Wilhelm, Hi On Tue, Jan 19, 2021 at 03:49:45AM +, Shaughan Lavine wrote: > Yes: Android 10 vs 9. So, how do I get files out of pilbox on Android 10? Hmm, I do have Android 10 here, and I can access files on external storage with PilBox Version 20201231 without problems. (Perhaps

Re: PilCon Schedule

2021-01-18 Thread Alexander Burger
Hi Davide, > What about making shorter seminars with a specific topic? It seems that > this is the favored way by many people and could be recorded for the > benefit of everyone. That would be fine for me. So we should propose, collect, filter and sort topics. Perhaps on a special Wiki page? >

PilCon Schedule

2021-01-17 Thread Alexander Burger
Hi all, before and after the PilCon last Saturday the discussion about its schedule came up again. Currently we meet at the first and third Saturday each month, at 8:00 UTC on the first, and 16:00 UTC on the third. Before, we used the first and third Friday. It seems that Saturdays are not opti

Re: Question for understanding usage of pipes

2021-01-15 Thread Alexander Burger
On Fri, Jan 15, 2021 at 08:13:58PM +0100, Davide BERTOLOTTO wrote: > In a more functional way: Oh, I see! The original question was about pipes. Directly in Lisp it is of course easier. I would use 'replace': (sort (in "5.input" (make (while (line) (li

Re: Question for understanding usage of pipes

2021-01-15 Thread Alexander Burger
Hi Christos, > $ tr FBLR 0101 < 5.input # or cat 5.input | tr FBLR 0101 This could be (pipe (in "5.input" (out '(tr "FBLR" "0101") (echo)) ) (make (until (eof) (and (line T) (link @)) ) ) ) > And finally I want to add one more preprocessing step, so

PilCon tomorrow

2021-01-15 Thread Alexander Burger
Hi all, short reminder of tomorrow's PilCon :) As ever on a third Saturday, let's meet at 16:00 UTC on https://meeting.itship.ch/PilCon ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Unexpected (read "...") behavior

2021-01-14 Thread Alexander Burger
Hi Erik, > It seems that symbols beginning with (or consisting only of) '+' are not > parsed as > a continuous (internal) symbol name. > > But everything works as expected with '*': This is intended. The same happens with '-' BTW. The reason is that these two characters may also denote the sign

Re: small curl wrapper

2020-12-31 Thread Alexander Burger
Hi Mansur, > I've written a little article about my fresh try with curl wrapper: > https://picolisp.com/wiki/?curlwrapper Cool! Thanks a lot! ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: PilCon Saturday

2020-12-31 Thread Alexander Burger
On Thu, Dec 31, 2020 at 08:36:48AM +0100, Alexander Burger wrote: > in two days, Saturday the second of January, we have the next PilCon. Sorry, forgot to refresh the details: As ever on a first Saturday, 8:00 UTC at https://meeting.itship.ch/PilCon -- UNSUBSCRIBE: mailto:picolisp@softw

PilCon Saturday

2020-12-30 Thread Alexander Burger
Hi all, in two days, Saturday the second of January, we have the next PilCon. Not sure if anybody can attend so early in the year ;) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Pil21 is now in Debian Unstable

2020-12-29 Thread Alexander Burger
Hi all, On Tue, Dec 29, 2020 at 11:29:22AM +, Mike wrote: > Happy coding and New Year, Thanks a lot to Mike Pechkin for all the testing, feedback, input and support, and to Kan-Ru Chen for maintaining the Debian releases! And to all other members in this list and the #picolisp IRC channel! ☺

Pil21 is now in Debian Unstable

2020-12-29 Thread Alexander Burger
Hi all, pil21 is now available in Debian unstable. This means we are now "officially" on pil21! ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: PicoLisp Server Setup (Ubuntu 20.04)

2020-12-27 Thread Alexander Burger
Hi Erik, > and rebooting, httpGate had not been started. > ... > Maybe the > "systemd hacking" was overkill and all that was needed was 'chown'? Perhaps Ubuntu differs here in its defaults from plain Debian. As far as I remember, I had (on several systems) only done a "chmod +x /etc/rc.local" aft

Re: PicoLisp Server Setup (Ubuntu 20.04)

2020-12-26 Thread Alexander Burger
Thanks a lot Erik! On Fri, Dec 25, 2020 at 10:49:31PM -0600, Erik Gustafson wrote: > https://picolisp.com/wiki/?ServerSetup > > Maybe someone will find it useful. I know I will when I update again a few > years from now :P A very useful write-up. I did not notice any problems /etc/rc.local. Seem

PicoLisp Chess

2020-12-24 Thread Alexander Burger
Hi all, I should announce the new version of PicoLisp Chess here too. Not that it is a strong chess program (not at all!), but it has some good examples of PicoLisp programming (e.g. interactive graphics on a server-based framework using canvas and coroutines). It comes in three flavors: A CLI p

Re: issue with circular lists

2020-12-23 Thread Alexander Burger
On Wed, Dec 23, 2020 at 01:57:10PM +0100, Alexander Burger wrote: > The result is a little different though: > >: (let L NIL (for I 7 (fifo 'L I)) L) >-> (7 1 2 3 4 5 6 .) .. but of course the fix is trivial :) : (cdr (let L NIL (for I 7 (fifo 'L I)) L)) -

Re: issue with circular lists

2020-12-23 Thread Alexander Burger
On Wed, Dec 23, 2020 at 01:35:58PM +0100, Alexander Burger wrote: > > (eval (cons 'circ (range 1 20))) > Yes, this is a known issue. It is a stack overflow. Building a long list with 'range' just to apply it (e.g. to 'circ') is rather inefficient. In this

Re: issue with circular lists

2020-12-23 Thread Alexander Burger
Hi Davide, > Just found out that it is an issue with apply. Probably the number of > arguments is too large. > > (eval (cons 'circ (range 1 20))) Yes, this is a known issue. It is a stack overflow. 'apply' builds structures on the stack. The recommended way is to set ulimit -s unlimite

PilCon tomorrow

2020-12-18 Thread Alexander Burger
Hi all, tomorrow is PilCon again! In the afternoon (16:00 UTC), as it is the third Saturday. Like ever, at https://meeting.itship.ch/PilCon ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Advent of Code 2020

2020-12-16 Thread Alexander Burger
Hi Davide, > I am using the one from the package manager of ubuntu 18, so it's probably > pil 64. Right. > I am waiting for the new package on thermux ;) Me too! However, I'm not sure about the state. I wrote to Fredrik (the developer of Termux) in November and again in December, asking him t

Re: Advent of Code 2020

2020-12-16 Thread Alexander Burger
Hi Davide, > For anyone who is interested, I am participating to the advent of code 2020 > (https://adventofcode.com/) using Picolisp. > Here is the repository https://github.com/dbertolotto/advent-of-code-2020 Great! Thanks a lot!! ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subje

Re:

2020-12-13 Thread Alexander Burger
Hi Erik, > https://picolisp.com/wiki/?metaprogrammingexperiments > > It details my continued exploration of writing "Common Lisp style" macros > in PicoLisp. Cool! Thanks a lot! :) A very impressive article. Minor question: Is there any reason why you call (mapc eval ...) instead of (

Re: pilbox

2020-12-09 Thread Alexander Burger
Hi Shaughan, > Doh! Ths was it. I've had pneumonia, hence the long interval. I'm fine now. Oh! Good that you are well again! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Build a picolisp core for android fails

2020-11-25 Thread Alexander Burger
On Wed, Nov 25, 2020 at 11:07:16AM -0300, Gaston Pepe wrote: > try to compile PilBox latest version > and success! Cool!! I'm glad that it is no inherent problem :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Build a picolisp core for android fails

2020-11-25 Thread Alexander Burger
t are you compiling, and *which* place (which call? javac?) triggers the error? It is ./mk.pilBox, right? The current version? It starts with: # 31oct20 Software Lab. Alexander Burger ## openjdk-8-jdk ## (cd projects; rm @; ln -s gen @) VERS=126 NAME=20.10.31 MINSDK=21 TARG

Re: pil21: no more matching parenthesis in debug mode

2020-11-25 Thread Alexander Burger
He Eric, > I finally managed to install pil21 on my manjaro distro ;-) And yes I got: > (version) -> (21 0 0) Perfect! > However I've noticed that there is no more > matching parenthesis in debug mode. Input is now handled by readline(3). You can control its behavior via "~/.inputrc". To show

Re: Call native wrapper function with double argument

2020-11-24 Thread Alexander Burger
Hi Thorsten, > Luckily, If I manage to wrap one such C function, I can reuse that > understanding for many others Yes, and don't worry to ask. 'native' is a complex issue (I also need to look into the reference each time), so others may benefit from the records too. ☺/ A!ex -- UNSUBSCRIBE

Re: Build a picolisp core for android fails

2020-11-24 Thread Alexander Burger
Hi Gaston, > #tar xvzf PilBox.tgz ---> ok > #cd PilBox > #mkdir obj > /mk.pilBox > ERROR: input directory 'bin' does not exist > 'classes.dex'... > > this error. I see. Strange, because PilBox.tgz *does* contain "bin/": $ tar tvfz PilBox.tgz -rw-r--r-- abu/abu1176 2019-04-20 09:2

Re: Build a picolisp core for android fails

2020-11-24 Thread Alexander Burger
On Tue, Nov 24, 2020 at 07:46:27AM +0100, Alexander Burger wrote: > I'm not sure what went wrong in your case. It may be that for some reason > PilBox > cannot delete the old "bin/picolisp" and create the new symbolic link. > > Perhaps it helps if you uninstall PilB

Re: pilbox

2020-11-23 Thread Alexander Burger
Hi Shaughan, > When I install the latest version of Pilbox from the Play Store and run Demo > —> Life, I get > > (grid 32 32} > Undefined I think this is due to a mismatch between PilBox and the Demo App. PilBox is now running pil21, and Demo uses the 'simul' library from "@lib/simul.l". That

Re: Build a picolisp core for android fails

2020-11-23 Thread Alexander Burger
Hi Gaston, > I try a build a picolisp core apk for android. > /mk.pilbox work OK > But in Android when app run get error " bin/picolisp not found" Since SDK 29, Android does no longer allow the execution of binaries in the App's data directories: https://github.com/termux/termux-packages/wi

Re: Call native wrapper function with double argument

2020-11-23 Thread Alexander Burger
On Mon, Nov 23, 2020 at 06:17:46PM +0100, Alexander Burger wrote: > Something like '("Dx" (24 . 1.0) '(1.0 1.0 2.0 3.0)) could make sense, if the > C > argument is "double dx[3];". oops (24 . 1.0) is of course not returning "double dx[3];", but

Re: Call native wrapper function with double argument

2020-11-23 Thread Alexander Burger
Hi Thorsten, > libblas.so is on my machine, the C function "idamax_" is found,which is > actually a C wrapper for Fortran Code. > In the Fortran docs, the parameters are described exactly, see below. Hmm, the signature of the C function would be more helpful, as we want to call it, and it should

How to compile pil21 on termux

2020-11-22 Thread Alexander Burger
Hi Bruno, > since it does not come as a termux package anymore, Really? I can see the picolisp package here in Termux. It is still on pil64 though. I asked Fredrik, the maintainer of Termux, last week to change to pil21. Didn't get an answer yet. > can I compile it on my phone? Yes, just like

Re: Flame wars

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 04:45:41PM +0100, Davide BERTOLOTTO wrote: > Great! :) In fact, there is one very important reason why to avoid GPL in PicoLisp: It is too complicated. Just look at the long discussions we had here, and probably thousands of other people around the world, trying to make s

Re: Flame wars

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 02:49:58PM +0100, Davide BERTOLOTTO wrote: > Well, outside of the "flame wars", I think that this it is a genuine > problem that has to be solved by Alex. Yes, OK, and it *is* solved. > * use readline and make pil21 GPL > * Make readline optional ... > * Ditch readline co

Re: Flame wars

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 07:36:57AM -0500, r cs wrote: > Have you been putting up with flame wars this often in the past, or is it > worse during COVID-19? No flame war please! :) The question came up at PilCon, so I asked here. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Un

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 11:49:11AM +0100, Tomas Hlavaty wrote: > it is only mess because you really want to find a loophole I don't want to find a loophole. I leave everything as it is (MIT/X11). I just want to point out how nonsensical it all is. > otherwise you could use rlwrap as already sugg

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
Hi Davide, > Anyway, Alex what about this editline (not to be confused with the BSD > one)? It may be enough for pil21 implementation: > https://github.com/troglobit/editline#introduction I believe it cannot do what I need. I decided to abandon the @lib/led.l used in pil32 / pil64 and instead us

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 11:03:31AM +0100, Alexander Burger wrote: > In my understanding it is irrelevant how the library is linked, or the fact > that > pil21 "depends" on it This is all such a mess! What is "linking" other than calling external code at runtime?

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
On Sun, Nov 22, 2020 at 11:03:31AM +0100, Alexander Burger wrote: > In my understanding it is irrelevant how the library is linked, or the fact > that > pil21 "depends" on it, as long as it is not distributing (modified (derived) > or > not) parts of libread

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
Hi Davide, Tomas, On Sun, Nov 22, 2020 at 10:07:44AM +0100, Tomas Hlavaty wrote: > Hi Alex, > > On Sun 22 Nov 2020 at 09:22, Alexander Burger wrote: > > Yes, I want pil21 as a piece be completely "free", in the spirit of MIT. > > then it cannot depend on GPL libr

Re: Licence Dilemma

2020-11-22 Thread Alexander Burger
Hi Tomas, > even though pil21 is MIT licensed, the GPL dependency makes the combined > work GPL licensed > > if i understand the raised issue correctly, alex wants the combined work > to be MIT licensed, which means pil21 cannot depend on GPL software On Sun, Nov 22, 2020 at 09:08:32AM +0100, To

Re: Licence Dilemma

2020-11-21 Thread Alexander Burger
Thanks Alexander, thanks for this plausible explanations! > Not a lawyer here, but PicoLisp 21 does **not** need to be GPL'd. > > Everyone seems to confuse "linking to a GPL'd > library that exists on the host computer" VS > "linking to a GPL'd library that's included > with the source code".

Re: Subscribe

2020-11-21 Thread Alexander Burger
Hi Gaston, > Hello I'm interested in learning picolisp Great! Welcome! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Licence Dilemma

2020-11-21 Thread Alexander Burger
Thanks Mike! this looks good indeed! ☺/ A!ex On Sat, Nov 21, 2020 at 09:45:42AM +, Mike wrote: > 1. > Lets take a real world example, get all packages of ArchLinux required by > readline, "Required By (133)" on the right: > https://www.archlinux.org/packages/core/x86_64/readline/ > > > ht

Re: Licence Dilemma

2020-11-21 Thread Alexander Burger
On Sat, Nov 21, 2020 at 10:41:23AM +0200, Yiorgos [George] Adamopoulos wrote: > Do you absolutely need this? Why not remove it all and work with rlwrap > when you need command line editing? No way. Check pil21/src/lib.c pil21 needs a lot of stuff to interoperate with the command line. And, as I

Licence Dilemma

2020-11-21 Thread Alexander Burger
Hi all, at yesterday's PilCon it turned out that pil21 has a serious licence problem. A major design decision of pil21 was to use readline(3) instead of the self- rolled @lib/led.l from pil64/pil32. The reason was compatibility with the rest of the world (readline supports both vi- and emacs-mod

PilCon tomorrow

2020-11-19 Thread Alexander Burger
Hi all, tomorrow (Friday) is PilCon at 16:00 UTC https://meeting.itship.ch/PilCon As discussed, this will ae the last one on a Friday. The following ones will be Sat 05dec20 8:00 UTC Sat 19dec20 16:00 UTC ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Call native wrapper function with double argument

2020-11-15 Thread Alexander Burger
Hi Thorsten, hmm, this is not correct: > (de pnorm_both ("X" "Y" "Z" "I" "J") > (! native `*LibRmath "pnorm_both" 1.0 (cons "X" 1.0) '("Y" (1.0 . 4)) > '("Z" (1.0 . 4)) "I" "J" ) ) "Z" is an argument to the function, so it is bound to some evaluated value. But this value is ignored, because

Re: Call native wrapper function with double argument

2020-11-15 Thread Alexander Burger
On Sun, Nov 15, 2020 at 06:44:20PM +0100, Alexander Burger wrote: > So somewhere 'J' is bound to "J". > ... > Right, so it is a binding issue. Think hard what values are exactly bound to > which variables at runtime. I forgot to add: You can perhaps see wh

Re: Call native wrapper function with double argument

2020-11-15 Thread Alexander Burger
Hi Thorsten, > But with my real wrapper functions, where ever I use J, as first or second > arg, its interpreted as a transient symbol So somewhere 'J' is bound to "J". > But when I rename J to H in my real wrapper function, the problem is gone: Right, so it is a binding issue. Think hard what

Re: Common Lisp macros in PicoLisp

2020-11-15 Thread Alexander Burger
On Sun, Nov 15, 2020 at 09:20:36AM +0100, Alexander Burger wrote: > Hi Erik, > > > More 'macro' madness and lisp jokes to brighten your weekend > > > > https://github.com/erdg/pl-defmacro > > Nice! Lots of fun indeed! :) .. and very impressi

Re: Common Lisp macros in PicoLisp

2020-11-15 Thread Alexander Burger
Hi Erik, > More 'macro' madness and lisp jokes to brighten your weekend > > https://github.com/erdg/pl-defmacro Nice! Lots of fun indeed! :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Call native wrapper function with double argument

2020-11-15 Thread Alexander Burger
Hi Thorsten, > (de pwilcox (X Y Z I J) > ... > : (rmath~pwilcox 2.7 6.20 5.4 1 3) > (native "libRmath.so" "pwilcox" 1 (cons X 1) (cons Y 1) (cons Z 1) I "J") > ... > ! J > -> NIL > Why is that second Integer argument interpreted as transient symbol, and > then NIL although the actual arg = 3? Thi

Re: Array avoidance example

2020-11-13 Thread Alexander Burger
Hi all, On Fri, Nov 13, 2020 at 06:05:11PM +0100, Alexander Shendi wrote: > I'm the wrong Alex (and I'm probably wrong), You are not wrong (in any case ;) > but I would think that memory allocated by malloc() isn't managed by the GC. > IDK if you can install finalizers or something similar. In

Re: LOL PicoLisp

2020-11-13 Thread Alexander Burger
Wow Erik, that's fantastic! (seems I need to study Doug Hoyte's Let Over Lambda first) I will dig into it :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Array avoidance example

2020-11-13 Thread Alexander Burger
Hi Kashyap, > Is the allocated memory purged by the GC in your example? If not, would it > be straightforward to plug it in a manner that the GC handles the free? No, this is not possible. The native call to malloc() is completely unknown to the Lisp interpreter, and outside the data structures (

Re: Array avoidance example

2020-11-12 Thread Alexander Burger
Hi Kashyap, > Could you please share the example where you shared how native code > interface could be used to malloc a section of the heap? I believe you > shared this in the last PiCon. I don't remember exactly, but it could have been something like (using pil21): # Allocate 99 bytes : (

Re: Call native wrapper function with double argument

2020-11-12 Thread Alexander Burger
Hi Thorsten, welcome back! :) > I'm playing around with the native function again (after a long long time > ;-) and somehow I don't manage to call a native wrapper with double arg. > > Using rmath from R, random value from poisson distribution:^ > ## double› rpois(double); > ... > This works

Re: PilCon Friday

2020-11-10 Thread Alexander Burger
On Sat, Nov 07, 2020 at 06:55:34AM -0600, Erik Gustafson wrote: > Another vote for Saturdays 8:00 / 16:00 UTC here > > On Sat, Nov 7, 2020, 6:14 AM Davide BERTOLOTTO > wrote: > > > Saturdays with the usual schedule sounds good for me OK, there seems some agreement on Saturdays. Let's try it!

Re: Pil21 feature questions

2020-11-10 Thread Alexander Burger
Hi Andras, > I would like to ask some questions on Pil21 features. > It is enough if you points to some examples where I could dig into the > details... These are indeed very good questions! Thanks that you ask, they need to be clarified. > - What is special in the ‘priv’ namespace handling? >

Re: pil21 on Mac, some errors

2020-11-09 Thread Alexander Burger
Hi Jon, > Yes, but after the Ctrl-D I have to click in the cube window to make it go > away. I see! Strange, here it is closed automatically. > The pil21 now seems to be usable on macOS, however, the "(cd src; make)” did > not work for me; I got some errors. I used the instructions at > https:

Re: pil21 on Mac, some errors

2020-11-09 Thread Alexander Burger
Hi Jon, > All three misc examples now worked quite fine. Great! So we can say pil21 is usable on MacOS. > The only problem I had, was exiting the cube.l in a nice way. I can maybe take > a look at that tomorrow. Just press Ctrl-D at the REPL prompt. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@s

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
Hi Andras, > On Ubuntu only -D_GNU_SOURCE helps, -D__USE_GNU is not enough. On plain Debian, only _GNU_SOURCE still gives an error. So I've defined both now (in @src/lib.c, to keep it local). ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
On Sun, Nov 08, 2020 at 01:48:16PM +0100, Alexander Burger wrote: > Should we really do that? How portable are we then? Anyway, I released it. Though I don't like it. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
On Sun, Nov 08, 2020 at 01:15:00PM +0100, Alexander Burger wrote: > Yes, I did > >#define _GNU_SOURCE >#include > > This works here on Termux, but on Debian I get > >lib.c:493:33: error: use of undeclared > identifier 'RTLD_DEFAULT&#x

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
Hi Andras, > I’ve checked pil21.tgz which you reverted yesterday on Ubuntu Linux with > llvm-10. > I need to define _GNU_SOURCE to get the definition of RTLD_DEFAULT to compile > lib.c. Yes, I did #define _GNU_SOURCE #include This works here on Termux, but on Debian I get lib.c:493

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
On Sun, Nov 08, 2020 at 08:46:23AM +0100, Andras Pahi wrote: > SHARED = -dynamiclib -undefined dynamic_lookup Also, SHARED does not address the problem. It is used for linking the *libraries* ext.so and ht.so The problem with native is that symbols in the *executable* bin/picolisp are not found

Re: pil21 on Mac, some errors

2020-11-08 Thread Alexander Burger
On Sun, Nov 08, 2020 at 08:46:23AM +0100, Andras Pahi wrote: > SHARED = -dynamiclib -undefined dynamic_lookup > ... Yes? And does now (native "@" ...) and (%@ ...) work with it? BTW, if '%@' does not work, we should notice immediately, as all network access depends on it now (@lib/net.l). ☺/ A!e

Re: PilCon Friday

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 10:30:57PM +0100, pd wrote: > saturday is not a work day so it's supposed to be better > to attend but that day have family time attached so it's as hard as working > day. That's true. Saturdays are often occupied by other family or routine duties. As a freelancer, any day

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 09:22:48PM +0100, Alexander Burger wrote: > On Sat, Nov 07, 2020 at 08:01:01PM +0100, Andras Pahi wrote: > I revert for now Perhaps it needs some command-line flag expoting the symbols in the executable? ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?s

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 08:01:01PM +0100, Andras Pahi wrote: > Yes, it works. > ... But now it does not build in Linux any more :( I revert for now -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 07:32:29PM +0100, Alexander Burger wrote: > Yes, indeed. Must be. > > I fixed and released it :) .. and that after some Beer and Whiskey. Celebrating the kick-out of the WhiteHouseClown. I hope I didn't code complete nonsense. ☺/ A!ex -- UNSUBSCRIBE: m

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
Hi Andras, > Nope, native does NOT work with “@“ on Darwin. Aahh! I misunderstood. > The definition of RTLD_DEFAULT is > dlfcn.h:#define RTLD_DEFAULT((void *) -2) > > So it seems that is the culprit. Yes, indeed. Must be. I fixed and released it :) ☺/ A!ex -- UNSUBSCRIBE: mailto

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 06:17:30PM +0100, Alexander Burger wrote: > > : (de %@ @ (pass 'native "libSystem.B.dylib")) > ... Hmm, an idea: Can it be that RTLD_DEFAULT is not zero (null) in Darwin? Looks like 'native' has such an assumption. But then, on the ot

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 05:59:34PM +0100, Andras Pahi wrote: > Yes, it is the same issue as Mike pointed out: accessing the main binary with > “@“ does not work. > > But with some cheating: > > ===> ./pil + > : (de %@ @ (pass 'native "libSystem.B.dylib")) Cool! As I suspected. So it must be a

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
Hi Jon & Andras, > I have now changed lib/openGl.l as you described, and when I do OK, so "Darwin" is generated in 'make', and not "Macos". I change it back. > $ ./pil misc/sphere.l + > then I get a nice sphere. Cool! > If I do > $ ./pil misc/cube.l + > then I get a window with a gray backgro

Re: pil21 on Mac, some errors

2020-11-07 Thread Alexander Burger
On Sat, Nov 07, 2020 at 11:14:13AM +0100, Andras Pahi wrote: > I’ve checked Alex’s code on my picoLisp fork only. > What is the value of *OS on pil21 ? > It seems, that it is NOT “Darwin”, because *GlutLib is “libglut.so.3” instead > of “GLUT.framework/GLUT" Yes, I have already changed < (if

Re: PilCon Friday

2020-11-07 Thread Alexander Burger
Hi Kashyap, Wilhelm, thanks a lot Wilhelm! I think you protocolled all topics. And no worries Kashyap, we were all aware that we will repeat some topics anyway, whatever comes up. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: PilCon Friday

2020-11-07 Thread Alexander Burger
Hi all, we discussed a little more about schedule at last PilCon. On Thu, Nov 05, 2020 at 10:53:08PM +, Kevin Ednalino wrote: > For example, if it's hosted on Saturday at noon > then it'd be roughly morning for the Americas and evening for Asia. Really? I would think it is a bit too early (a

Re: pil21 on Mac, some errors

2020-11-06 Thread Alexander Burger
Hi Andras, > So you’ve found it yourself, that the types and the number of args > should not change between invocations. In fact the type is not critical, at least on a 64-bit machine, as all arguments are passed to a function as opaque word-sized values (pointer, scalar, double or whatever). Th

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 11:00:39PM +0100, Alexander Burger wrote: > Also, I see no reason why 'native' should not work with normal variable-args > functions like printf() in pil21. As far as I see, it works fine. > >: (native "@" "printf&quo

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 08:30:18PM +0100, Alexander Burger wrote: > In fact, in pil21 I decided simply *not* to support ffi calls to functions > with > a variable number of arguments. The reason is to keep it simple (and because > such functions are not frequent). Also, I see n

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 08:10:49PM +0100, Andras Pahi wrote: > For reference see https://github.com/pahihu/picoLisp/blob/master/README > Cool: "fixed arguments must be marked with T". Good idea! In fact, in pil21 I decided simply *not* to s

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 07:35:58PM +0100, Andras Pahi wrote: > Hi all, > > You need to change glutMainLoopEvent to glutCheckLoop on MacOS. Interesting. It was Jon who wrote those demos (and large parts of @lib/openGl.l), so we should better let him decide what to do. > Everything works as expe

Re: PilCon Friday

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 01:23:13PM -0500, r cs wrote: > Raw video would be welcomed. The timing of the PilCon can be challenging > in some time zones. Independent of the recording issue, the current scheduling is not an absolute must. I did a proposal initially, and nobody complained, so we staye

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 07:50:01PM +0200, Mike wrote: > > > I hear from Mike that "Darwin" is not correct for pil21. > > > > "Macos"? > > This is not issue anymore, I have manually disabled this if to use correct > definitions. Right. But it is needed so that it also runs on other systems. Th

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
Hi Andras, > Yes, I have some experience. > I use libffi to implement native calls in my picoLisp fork (32bit/64bit) on > MacOS. Yes, I remember, you patched some files to use clang. On the other hand, the original @lib/openGl.l was widely extended and ported to Mac by Jon. I hear from Mike th

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 05:14:03PM +0100, Alexander Burger wrote: > So perhaps the output of strace tells us more. Hmm, not really. Mike posted one in IRC. It says "invalid kernel access" several times, but I have no idea what it means. Does anybody have experience with libffi on

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
Hi Andras, > Yes. It works with emu under MacOS. Thanks! Good to know. :) So perhaps the output of strace tells us more. @Jon or @Mike: I would recommend to use "sphere.l" instead of "cube.l", because the latter goes into a REPL after that and produces too much output. It can be started as

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
Hi Mike, > 2. (native "@" ...) will fail because macos has different libc system name: > $ pil21 + > : (native "@" "getenv" 'S "TERM") > Bad ffi This is strange, because "@" is *no* lib at all. It is a special token interpreted by PicoLisp as "in this executable binary". Did it work with "emu"

Re: PilCon Friday

2020-11-05 Thread Alexander Burger
On Thu, Nov 05, 2020 at 01:50:39PM +0100, O.Hamann wrote: > > we'll meet at 8:00 UTC. > Because of the time change, it's already at 9:00 central european time, > right? Yes, that's an important point! Thanks! ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: pil21 on Mac, some errors

2020-11-05 Thread Alexander Burger
Hi Jon, > [misc/cube.l:13] !? (native "libglut.so.3" "glutInit" NIL '(NIL (8) . 0)) > "libglut.so.3" -- [DLL] dlopen(libglut.so.3, 9): image not found Probably one or more of: 1. openGl.l says (if (= *OS "Darwin"). Perhaps this is not properly set by Makefile? 2. "libglut.so.3" does not exis

Re: PilCon Friday

2020-11-04 Thread Alexander Burger
Hi Kashyap, > While at it, it would be good to touch on the "interpreter only" approach > of PicoLisp. It is objectively simpler than an interpreter AND compiler > implementation. However, I would love for some expansion on the explanation > of "True equivalence of code and data". Also, is there a

Re: pil21 on Mac, some errors

2020-11-04 Thread Alexander Burger
Hi Jon, > I have put the files into lib and misc. This is all right. > However, I have not installed pil21 "globally" with required symlinks. When I This is also good. Here on my systems I haven't installed it globally either (I usually leave the Linux distro's (older) version global as it is)

Re: PilCon Friday

2020-11-04 Thread Alexander Burger
Hi Alex, > For me the greatest obstacle in using picolisp is the lack of arrays. Let's > talk about what I'm doing wrong and why I don't need them! Yes, good idea. This is a valid and common question. Maybe, as a warm-up, you could also check "Array Abstinence" at https://picolisp.com/wiki/?

Re: PilCon Friday

2020-11-04 Thread Alexander Burger
Hi Davide, > practices in error handling (how to catch and throw errors properly) Good, noted :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

PilCon Friday

2020-11-04 Thread Alexander Burger
Hi all, next Friday (Nov 6th) is PilCon again! https://meeting.itship.ch/PilCon As it is the first Friday of the month, we'll meet at 8:00 UTC. Perhaps we should talk about more basic issues this time? Any newcomer's questions should be welcome. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@so

<    1   2   3   4   5   6   7   8   9   10   >