04:22
jibanes has quit [Ping timeout: 256 seconds]
04:24
jibanes has joined #picolisp
06:46
<
DKordic >
Good morning.
06:46
<
DKordic >
seteeri: No, "task" is Cooperative Multitasking based on Linux Syscall "poll".
06:46
<
DKordic >
Android is the new xterm.
06:46
<
DKordic >
Regenaxer: Sorry for the delay. I could not terminate the app. When I tapped square button it was minimized unlike any other app. Tapping it's own ""x"" button it only got fullscreen.
06:59
_whitelogger has joined #picolisp
07:06
<
Regenaxer >
Moin DKordic!
07:06
<
Regenaxer >
also, we talked about task in PilCon
07:07
<
Regenaxer >
Android apps are never really terminated
07:07
<
Regenaxer >
you can wipe them out of the task list, and it is up to them what they do
07:07
<
Regenaxer >
PilBox really terminates. It stops the picolisp binary
07:08
<
Regenaxer >
but other apps seem to survive until Mr. Google kills them
07:08
<
Regenaxer >
So to "stop" Jitsi, just press the red phone and the session is over
07:09
<
Regenaxer >
If no longer needed, swipe it off the screen
07:23
_whitelogger has joined #picolisp
07:24
<
aw- >
Regenaxer: hi, i'm wondering if there's an issue with (alarm) or (abort) in pil21
07:24
<
aw- >
i have a program which I set a timer for 600 seconds, and it works fine.. but i have another i set for 3600 seconds and it
**never** gets called
07:25
<
aw- >
i do (abort 3600 (my-prog)) and it never aborts
07:25
<
aw- >
but (abort 600 (my-prog)) works fine
07:25
<
aw- >
no problem with pil64
07:25
<
Regenaxer >
Do you have the latest version?
07:25
<
aw- >
hmmm.. latest.. not sure
07:25
<
Regenaxer >
I think this environment changed last week
07:26
<
aw- >
latest Nov 27, oops
07:26
<
Regenaxer >
I did a major rewrite of the I/O system
07:26
<
Regenaxer >
not sure if this is the reason, but the newest version is better :)
07:26
<
aw- >
yes i'm updating now and will report back
07:26
<
Regenaxer >
Thanks!
07:27
<
aw- >
ok updated, running it now with (abort 3600)
07:27
<
aw- >
i'll let you know later if it's fixed
07:27
<
Regenaxer >
BTW, the Debian maintainer is now packaging. He has no problem with the license
07:28
<
Regenaxer >
(puts pil to GPL on Debian)
07:29
<
aw- >
i guess i'll do that for the TinyCore release as well
07:30
<
Regenaxer >
No problem for us either, right?
07:31
<
aw- >
what do you mean?
07:31
<
Regenaxer >
No restrictions as we keep pil itself on MIT/X11
07:32
<
Regenaxer >
Little test here:
07:32
<
Regenaxer >
: (abort 2 (loop (inc (0]
07:32
<
Regenaxer >
Looks all right
07:32
<
aw- >
i usually put a NOTICE file in my repo when it links to GPL source code
07:33
<
Regenaxer >
good idea
07:33
<
Regenaxer >
For PilBox I simply put the GPL file into the TGZ
07:34
<
Regenaxer >
(cause PilBox ships libreadline.so)
07:34
<
aw- >
(i also do it for non-GPL stuff to), ex:
07:34
<
Regenaxer >
Perfect
07:35
<
aw- >
i think NOTICE file is de-facto standard for OSS projects
07:35
<
aw- >
in case of PilBox, since you're distributing the .so then you should probably host the exact source code package on your server
07:36
<
aw- >
and provide a link to it in your NOTICE file
07:36
<
Regenaxer >
hmm, sounds a bit tedious
07:36
<
aw- >
true, but that's the condition of GPL
07:37
<
aw- >
if you distribute GPL, you have to provide the sources
07:37
<
Regenaxer >
I don't even have the sources
07:37
<
Regenaxer >
I took the existing .so
07:38
<
aw- >
you should probably find the sources ;)
07:39
<
aw- >
technically you don't
**have** to host the sources though, but you do have to show how to obtain them
07:39
<
Regenaxer >
In fact I have two distros, the APK at Google Play and a separate TGZ
07:39
<
aw- >
or promise to make them available on demand
07:39
<
Regenaxer >
Nobody does for APK, no?
07:40
<
Regenaxer >
I should remove readline from PilBox, it is never called in fact
07:40
<
Regenaxer >
just to keep the runtime happy
07:42
<
Regenaxer >
but placing a link to some GNU repo is easier perhaps
07:44
<
Regenaxer >
So I'll make a NOTICE file patterned along your version
07:45
<
Regenaxer >
thanks!
07:45
<
aw- >
it's probably fine to link to the original sources of libreadline, if they're unmodified
07:45
<
Regenaxer >
So I don't need to put the GPL file?
07:46
<
Regenaxer >
just the pil COPYING plus a NOTICE explaining readline?
07:46
<
Regenaxer >
Let's see how Kanru (Debian Pil maintainer) does it ;)
07:48
<
aw- >
yes that's usually where I do
07:49
<
aw- >
because the location of the sources includes the license file
07:49
<
aw- >
it would be such a stupid thing to duplicate the license file all over the place
07:49
<
Regenaxer >
great, GPL is also very big
07:49
<
Regenaxer >
wasting too many bytes ;)
07:50
<
Regenaxer >
I did not know about the NOTICE convention
07:52
<
Regenaxer >
On this Debian server I find only two:
07:52
<
Regenaxer >
$ locate NOTICE
07:53
<
Regenaxer >
cant past '/'
07:53
<
Regenaxer >
anyway :)
07:54
<
aw- >
Apache has a good example:
07:55
<
aw- >
it's a bit meta.. it's a file to tell you the license of all the files
07:55
<
aw- >
instead of 1) including every license file, 2) adding a copyright notice to every file.
07:55
<
aw- >
much easier to just maintain one NOTICE file
07:55
<
aw- >
and you can put as much or as little information as you want
07:56
<
Regenaxer >
I'll stay with your pattern
07:57
<
Regenaxer >
I'm happy if I don't have to abandon readline. It is the standard everyone is used to, and here is no full replacement
07:59
<
aw- >
yes that would be troublesome,although I understand why nobody wants GPL as well
07:59
<
aw- >
it's quite a burden when you want to do non-OSS work
07:59
<
Regenaxer >
looks like
08:00
<
aw- >
of course the only winners in all this are the lawyers ;)
08:00
<
Regenaxer >
as always
08:01
<
Regenaxer >
lawyers and tax advisors
08:38
<
aw- >
Regenaxer: confirmed timer works now!
08:38
<
Regenaxer >
Good news :)
10:53
_whitelogger has joined #picolisp
11:41
jibanes has quit [Ping timeout: 260 seconds]
11:42
jibanes has joined #picolisp
11:57
jibanes has quit [Ping timeout: 265 seconds]
11:59
jibanes has joined #picolisp
12:05
jibanes has quit [Ping timeout: 240 seconds]
12:06
jibanes has joined #picolisp
12:24
wineroots has quit [Remote host closed the connection]
12:35
mario-goulart has quit [Remote host closed the connection]
12:39
mario-goulart has joined #picolisp
13:20
Blukunfando has quit [Ping timeout: 268 seconds]
13:50
GrayArea has quit [Ping timeout: 240 seconds]
14:18
GrayArea has joined #picolisp
15:15
m_mans has joined #picolisp
15:17
<
Regenaxer >
Cheers m_mans!
15:18
GrayArea has quit [Ping timeout: 240 seconds]
15:19
<
m_mans >
Regenaxer: hi! A little question :) I've tried to use (err NIL (in '(curl ..., it seems doesn't redirect STDERR to STDOUT
15:21
<
Regenaxer >
Hmm, haven't used it a while. Let me check
15:21
<
m_mans >
And thanks again for PilCon, it was great pleasure!
15:22
<
Regenaxer >
The code of 'err' looks correct
15:22
<
Regenaxer >
(if (nil? (needSymb Exe X))
15:22
<
Regenaxer >
(dup ((outFile (val $OutFile)) fd))
15:22
<
m_mans >
the idea was to improve my curl wrapper to catch curl error messages in case when exit code is nonzero
15:22
<
Regenaxer >
Ah, but this is another process
15:23
<
Regenaxer >
So you need to redirect
*that* stream
15:23
<
Regenaxer >
I use "curl" "-s" for that reason
15:24
<
Regenaxer >
otherwise (in (list "sh" "-c" "curl ... 2>/dev/null" ...
15:24
<
m_mans >
in fact I use (curl "-isS" "-m" 3 "-X" "GET" "bad url")
15:24
<
Regenaxer >
Looks good
15:24
<
m_mans >
let me look again in man curl
15:25
<
Regenaxer >
yes, but probably it has direct option to redirect stderr
15:25
<
m_mans >
btw if I use (err "file" (in '(curl ... - that works fine
15:26
<
Regenaxer >
Not sure
15:26
<
Regenaxer >
Did it work in pil64?
15:27
<
m_mans >
curl has --stderr option, let me try. Btw, that was in pil64
15:29
<
Regenaxer >
I tried this:
15:29
<
Regenaxer >
: (err "a" (in '(ls "foo")))
15:29
<
Regenaxer >
$: (err "" (in '(ls "foo")))
15:29
<
Regenaxer >
ls: cannot access 'foo': No such file or directory
15:29
<
Regenaxer >
Seems correct. "a" had an error message
15:30
<
m_mans >
err with file worked fine for me too. Btw --stderr option saves me
15:31
<
Regenaxer >
My test did also ""
15:31
<
Regenaxer >
and it showed up on the terminal
15:32
<
Regenaxer >
or this works too:
15:32
<
Regenaxer >
(out "a" (err NIL (in '(ls "foo"))))
15:32
<
Regenaxer >
I think it is correct
15:33
<
m_mans >
: (err NIL (in '(ls "foo") (setq A (till NIL T))))
15:33
<
m_mans >
ls: cannot access 'foo': No such file or directory
15:33
<
Regenaxer >
yes, correct
15:33
<
m_mans >
what's wrong with my example? I expected to have message in A
15:34
<
Regenaxer >
"If the argument is NIL, the current output stream will be used."
15:35
<
m_mans >
How could I modify my last example to redirect
*all* output of ls command to stdout?
15:35
<
Regenaxer >
(err NIL ) makes sense if stdout of the whole process (script) is redirected somewhere
15:36
<
Regenaxer >
yes, I think this is the way
15:36
<
Regenaxer >
(out NIL (err NIL ... ?
15:36
<
m_mans >
not really to stdout, but to
*one* single stream
15:36
<
m_mans >
to be able to read it with (till.. )
15:37
<
Regenaxer >
(out "a" (err NILL goes all to "a"
15:37
<
Regenaxer >
ok, I see
15:38
<
m_mans >
I've solved curl case with --stderr, but now I'm just curious if it possible to do without files and sh
15:38
<
Regenaxer >
should be possible
15:40
<
Regenaxer >
Sorry, later
15:41
<
Regenaxer >
family ... ;)
15:41
<
Regenaxer >
a little later please
15:44
<
Regenaxer >
(err NIL (in '(ls "foo") (setq A (till NIL T)))) cannot work
15:45
<
Regenaxer >
it redirects tho err of the whole 'in'
15:46
<
Regenaxer >
perhaps 'pipe' ?
15:48
<
Regenaxer >
: (pipe (err NIL (in '(ls "foo"))) (line T))
15:49
<
Regenaxer >
-> "ls: cannot a....
15:51
<
m_mans >
ok, thanks! Need to learn pipe more :)
17:48
<
m_mans >
exitcode 0
17:48
<
m_mans >
$177470231615661 (("args") ("headers" ("Accept" . "application/json") ("Host" . "httpbin.org") ("User-Agent" . "curl/7.68.0") ("X-Amzn-Trace-Id" . "Root=1-5fdf8dfa-7d396a8d1590fc1a651a5964")) ("origin" . "92.255.174.189") ("url" . "
https://httpbin.org/get "))
17:48
<
m_mans >
headers (("access-control-allow-credentials" . "true") ("access-control-allow-origin" . "*") ("server" . "gunicorn/19.9.0") ("content-length" . "269") ("content-type" . "application/json") ("date" . "Sun, 20 Dec 2020 17:46:34 GMT"))
17:48
<
m_mans >
httpcode 200
17:48
<
m_mans >
httpver "HTTP/2"
17:48
<
m_mans >
-> $177470231615661
17:50
<
Regenaxer >
really impressive
17:50
<
m_mans >
I hope such wrapper could be more useful if one need e.g. response headers
17:51
<
m_mans >
it also can survive curl errors
17:52
<
Regenaxer >
and is well commented
17:52
<
m_mans >
: (show (req-get-json "https://"))
17:52
<
m_mans >
exitcode 768
17:52
<
m_mans >
cmd (curl -isS --stderr - -m 3 -X GET -H "Accept: application/json" "https://")
17:52
<
m_mans >
err "curl: (3) URL using bad/illegal format or missing URL^J"
17:52
<
m_mans >
$177470231620403 NIL
17:52
<
m_mans >
-> $177470231620403
17:53
<
Regenaxer >
That`s why you needed to catch errors
17:53
<
m_mans >
I'm currently too lazy to publish it on hithub, maybe just post to mailing list as example
17:54
<
Regenaxer >
Mailing list is good
17:54
<
Regenaxer >
or a short wiki article?
17:54
<
m_mans >
Ah, also good idea
17:54
<
Regenaxer >
plus announced in mailing list
17:55
<
Regenaxer >
great :)
17:56
<
m_mans >
I could improve this wrapper infinitely, end up with a monster, so I need to stop somewhere, heh
17:57
<
Regenaxer >
haha, yes
17:57
<
m_mans >
ok, see you!
17:58
<
Regenaxer >
Have a nice (late) evening!
17:58
<
Regenaxer >
good night in your case :)
18:02
m_mans has quit [Ping timeout: 256 seconds]