<aw->
Regenaxer: did you fix the Samsung pilbox issue?
<Regenaxer>
Hi aw-!
<Regenaxer>
Not yet, I don't have access to such a device
<aw->
ok
<Regenaxer>
I'll ask today that they send one to me
<aw->
try this: ln -s /lib /lib64
<aw->
oh you don't have the device..
<Regenaxer>
yes, and we cannot root it
<Regenaxer>
They bought several of them for production use
<aw->
i noticed sometimes some libs appear in /lib and some binaries search in /lib64 and give that "not found" error because the paths are missing
<aw->
the error is misleading
<aw->
would be nice if you can get a terminal and type commands
<aw->
like ldd
<Regenaxer>
I think on Android there is even no /lib/
<aw->
haha you're right
<Regenaxer>
Some people here suspected Samsun Knox
<aw->
ohhhh that
<aw->
that's possible
<Regenaxer>
As soon as I get one device, I build a special version of PilBox for debugging
<Regenaxer>
basically logging things to see what goes wrong
<aw->
right
<Regenaxer>
In general the Xcover 4 looks nice. There was a test in c't magazine
<Regenaxer>
robust and inexpensive
<Regenaxer>
ideal for the intended purpose (logistics)
<aw->
nice if it can run Pilbox ;)
<beneroth>
(and (hi all) (have a nice day) (bbl))
<Regenaxer>
aw-, yeah, very useful device
<Regenaxer>
(hi beneroth)
rob_w has joined #picolisp
<aw->
(out 'beneroth (prinl "hey"))
<beneroth>
xD
aw- has quit [Quit: Leaving.]
<Nistur>
mornin'
<cess11_>
Good morning.
<cess11_>
Looks like you're making good progress on the ImageMagick bindings.
<Nistur>
yep :)
<Nistur>
I meana, it's still just doing `convert Raw/* output.pdf`
<Nistur>
but it gives me more flexibility now
<Nistur>
aaaaand
<Nistur>
I'm considering also wrapping up what I've got into (im:convert "Raw/*" "output.pdf") just for fun, not that I'd actually use that :P
<Nistur>
I'm also trying to think of ways to make it more lispy, rather than being just a thin wrapper around the C lib
<Nistur>
because currently there's a lot of things like doing (im:next-image wand) and the like, to go through the images loaded into the 'wand'
<cess11_>
The lispy part will probably be where you automate gathering of input data and the presentation of output.
<Nistur>
but surely there should be a way to expose the wand as a list so you can act on it more natively
<cess11_>
Most likely.
<Nistur>
I don't (yet) know how well picolisp will support this... because obviously it makes sense to keep the underlying C data, and not move the data into lisp, because then you'd have to have a tonne of conversion back and forth... but I think it's a bit of a weird thing to expect pil to be able to override it's idea of a list... especially saying "this C ptr is actually a list and to do listy things with it,
<cess11_>
A few times I've put a little effort into figuring out how to use libcairo from pil but haven't got very far yet.
<Nistur>
you call X(), Y() or Z()"
arievw2 has joined #picolisp
orivej has joined #picolisp
mtsd has joined #picolisp
<arievw2>
Is there an archive of this chat somewhere?
<Nistur>
arievw2: I don't think there are public logs, but a few of us may keep logs. I think mine is set up to something like 2 months
<Nistur>
I've only just got to work, so it's still very much morning for me :P
<freeemint>
I see
mtsd has quit [Read error: Connection reset by peer]
mtsd has joined #picolisp
<freeemint>
Regenaxer, do you have any recommendation how a family could listen on multiple ports. (I am thinking about having a webserver and a telnet server access the same database)
<freeemint>
(access as in read/write)
<freeemint>
My first ideas was to spawn two child processes which would create all the webserver or telnet processes. But that will not work, since webserver processes would not be able to 'tell to there telnet cousins.
<Regenaxer>
Hi freeemint! The pil GUI does exactly this, allocating a private port per child process
<cess11_>
IPC isn't needed for sharing a database between processes.
<freeemint>
Regenaxer, I want multiple connections on the same port so no private ports
<Regenaxer>
Not sure I understand what you want to do
<freeemint>
I want to have 1 child process per connection.
<freeemint>
A connection can happen only over 2 fixed ports
<freeemint>
the two different ports serve different protocols
<Regenaxer>
I don't know how this should work, as each child does not know which incoming data are for her
<Regenaxer>
I would make one dispatcher process
<freeemint>
each child gets the socket of the connection he is respovible for
<Regenaxer>
one connection is one socket
<freeemint>
yes
<Regenaxer>
all data pop up there
<freeemint>
yes
<Regenaxer>
So a dispatcher can examine the data and send them to other processes
<Regenaxer>
Not sure I understand what you want to do
<Regenaxer>
httpGate does this
<Regenaxer>
it listens only on 80 or 443
<freeemint>
I use an non http protocol though
<Regenaxer>
and dispatches on the port in the URL
<Regenaxer>
yes, so something analog
<Regenaxer>
But you can't have several processes listen on a single port
<freeemint>
yes
<freeemint>
I want to do that with an disptacher
<Regenaxer>
good
<Regenaxer>
and then (tell <pid> ...)?
<freeemint>
but i want an dispatcher listening on two ports which creates a different kind of child process depending on which port the connection(=socket) is comming from.
<Regenaxer>
I have not tried, but you could listen on two ports with two 'task's
<Regenaxer>
'accept' function instead of 'listen'
<Regenaxer>
(task Sock1 (and (accept @) ...))
<Regenaxer>
(task Sock2 (and (accept @) ...))
<Regenaxer>
cause 'listen' would block
<freeemint>
I accept does not?
<Regenaxer>
yes, not
<freeemint>
ok.
<Regenaxer>
see the 'server' function
<Regenaxer>
at the end
<freeemint>
Ok why not a loop with two accepts? rather than a task?
<Regenaxer>
the loop would waste CPU time polling
<freeemint>
what would tasks do?
<Regenaxer>
(doc 'task)
<freeemint>
(why not have an expecit wait?
<freeemint>
or use 'listen with timeout
<freeemint>
*explicit
<Regenaxer>
A wait would wait :)
<Regenaxer>
Try it
<Nistur>
Regenaxer: I have another Samsung device I can test on now :P I just went out and bought an S7 :P It's even limited to 7.0 :P
<freeemint>
(accept (port 8888)) blocks too.
<freeemint>
.... no it doe not
<freeemint>
accept wait 20 seconds for a connection
<freeemint>
*waits
<Regenaxer>
Nistur, great!
<freeemint>
what is the difference between (listen p 20) and (accept p)
<Nistur>
I'll try it in a bit, I need to expense it first so my bank doesn't call me and tell me I'm in trouble :P
<Regenaxer>
freeemint, you need to understand tasks in pil. They are very important
<freeemint>
Regenaxer ... i will ... some day
<Regenaxer>
See my examples above
<Regenaxer>
(task Sock1 (and (accept @) ...))
<Regenaxer>
Call accept only when select() reports that data are available on the connection
<Regenaxer>
man 2 select
<Regenaxer>
'task' is a front-end to select() system calls
<Regenaxer>
or '*Run' to be more correct
<freeemint>
That means while accept is running running tasks can be executed while tasks can not be executed if listen is running?
<Regenaxer>
nope
<freeemint>
How are (accept p) and (listen p 20) different?
<Regenaxer>
Almost the same, just that 'listen' sets up its own event loop around
<Regenaxer>
around select() and accept() I mean
<Regenaxer>
But 'listen' is not useful for your purpose, as it listens on a single socket
<Regenaxer>
So you need two tasks to wait for data on two or more sockets
<Regenaxer>
... two tasks to wait for data on two sockets
<Nistur>
Regenaxer: works on the S7 fine too
<Regenaxer>
Good news! So it works on all tested devices so far, except Xcover
<Regenaxer>
Thanks!
<Regenaxer>
They said they send one Xcover to me today
<Regenaxer>
Should be here tomorrow then
<Regenaxer>
I'm looking forward to try it out
<freeemint>
Regenaxer, why is accepts timeout hard coded to be 20s ?
<Nistur>
I would really like to know what it is that causes this issue, because I have no idea what it could be, we've used a similar Samsung OS version, we've tried a bunch of different devices... similar chipsets...
<Regenaxer>
Unix select() may return that data are available, but then in fact they are not, due to rejected packets or so
<Regenaxer>
So accept would block infinitely
<Regenaxer>
Nistur, yeah
<Regenaxer>
freeemint, these cases are extremely rare
<Regenaxer>
so normally it never blocks if used in a task
<freeemint>
ah
<freeemint>
Regenaxer, that is ugly of UNIX
<Regenaxer>
Yeah, or probably of the TCP protocol
<freeemint>
do i need to check if accept returned nil?
<Regenaxer>
yes
<Regenaxer>
(task Sock1 (and (accept @) ...))
<Nistur>
Regenaxer: I have found some security settings in the S7 (not sure if I've seen them in my S8) I can see if any of them could break it during my lunch break
<Regenaxer>
Cool! If so I know what to try first ;)
<freeemint>
afl
<Nistur>
away... from... life?
<Nistur>
llamas?
<Regenaxer>
away from laptop?
<Regenaxer>
haha
<Nistur>
ahh
<Nistur>
makes more sense
<Regenaxer>
or Linux? Would be bad
<Regenaxer>
away from life hopefully not
<Nistur>
not nearly as bad as being away from llamas though
<Regenaxer>
:)
<Nistur>
Regenaxer: a quick search through the settings while waiting for a download doesn't leave me hopeful that there's much there which could affect it
<Nistur>
I think installing ubuntu within macOS is a bit overkill
<Nistur>
but if you can install another distro, it might be actually usable
<Regenaxer>
yep, some minimal system
<Regenaxer>
eves self-made with live-build
<Nistur>
the environment appears to be 100MB download, so it's not a full Ubuntu 16.04... it might be usable as a dev environment then
orivej has quit [Ping timeout: 264 seconds]
cilz has quit [Ping timeout: 256 seconds]
cilz has joined #picolisp
freeemint has quit [Quit: Leaving]
<Nistur>
Regenaxer: how difficult would it be to make something like ix.io in picolisp do you think?
<tankf33der>
highlighting is hardest part
<tankf33der>
Nistur: start with URL shortener :)
<Nistur>
ix.io does neither of those things
<Nistur>
you just curl up a file, or some data, and then get given back a URL, which I assume is just a key to a db entry, using that URL you just get a plaintext response with that data
orivej has joined #picolisp
<Regenaxer>
Sorry, phone all the time
<Regenaxer>
What exactly is ix.io for?
<Nistur>
Regenaxer: it's just like a pastebin which I can curl my files to
<sriram_>
so that the command is typed exactly as on command line
<sriram_>
ok I will try that ...but also just for reference..is there a way for the program to "see" the +?
<sriram_>
(shell vi ../lib/simul.l +139) sh: XC_edquote@lib/led.l@lib/edit.lcallvimpack+set: No such file or directory
<cess11_>
You can use 'pack to assemble the arguments, perhaps that could be a way to add the +.
<Regenaxer>
"see" the + is not possible as this is eaten by the reader
<Regenaxer>
cess11_, yes 'pack', but 'glue' as above is better to separate the args with spaces
<sriram_>
yes that would work fine in general...but in this case I am trying to "paste" something...perhaps from another script. so it would be tedious to replace each + by the pack/glue..
<Regenaxer>
I think (shell head -10 ../../test.l) is not the right way
<Regenaxer>
especially ../../test.l gives an internal symbol
<Regenaxer>
you clobber the namespace if you have many of them
<Regenaxer>
So (shell "head" "-10" "../../test.l") is better
<Regenaxer>
But then we don't need 'shell' ;)
<sriram_>
even if i was converting it to a transient symbol by adding the quote "" around it?
<Regenaxer>
(call (shell head -10 ../../test.l) would do
<Regenaxer>
It is not converted
<Regenaxer>
but *created* as a transient symbol immediately
<Regenaxer>
oops, wrong copy paste
<sriram_>
yes.. that would be the best... but may be i can replace (call (shell ...)) by shell2 :) so that I can get (shell2 head -10 ../../test.l)
<Regenaxer>
I wanted to say:
<Regenaxer>
(call "head" "-10" "../../test.l")
<Regenaxer>
Well, you *could* do (shell2 head -10 ../../test.l)
<Regenaxer>
but this is not useful
<sriram_>
yes that was my original starting point. Then I realized if I was making many such calls..maybe even pasting from a script file
<Regenaxer>
as this function must be a fexpr then
<Regenaxer>
and you cannot pass variable arguments
<sriram_>
then adding "" around each argument was tedious. Also I was using it as a learning exercise :)
<Regenaxer>
(besides creating internal symbols)
<sriram_>
so to clarify
<Regenaxer>
I think such S
<Regenaxer>
oops
<Regenaxer>
ok?
<sriram_>
even if shell is defined as not evaluating its args (de shell Args....)
<Regenaxer>
yes, this is not useful
<Regenaxer>
as you must hard-code the calls
<sriram_>
the reader creates the internal symbols on reading the (shell head -10 filename)
<Regenaxer>
right
<Regenaxer>
I would simply call (call "sh" "-c" "head -10 filename")