seninha has quit [Remote host closed the connection]
BitPuffin has joined #picolisp
BitPuffi` has joined #picolisp
BitPuffin has quit [Ping timeout: 260 seconds]
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
BitPuffi` has quit [Ping timeout: 260 seconds]
<aw->
abu[m]: hi, i wrote a wrapper for sqlite in picoLisp, have been using it for +5 years
<abu[m]>
Hi aw-! Cool, good to know.
<abu[m]>
Let's see if pablo_escoberg turns up again
<aw->
but it forks a new sqlite3 process for each call, nothing special haha
<abu[m]>
That's fine I think. Usually I expect this fast enough.
<aw->
it is, the use-case for keeping a pipe open for the file is probably for extremely high concurrency, which is like.. a handful of companies
<aw->
and i think keeping the filehandle open for sqlite DB will be prone to errors and DB corruption
<aw->
because you need to implement locking and other mechanisms
<aw->
as opposed to just open the file, read/write, close file
<abu[m]>
yeah, and it is also an issue of flushing
<aw->
yes that too
<aw->
a database like mysql or postgres would be better suited for keeping a *FD open and making multiple/concurrent calls
<abu[m]>
Or perhaps use direct calls, e.g. a C library
<aw->
for sqlite to get that kind of performance/scalability, you would need to serialize the writes through a queue, to ensure only one write is ever made at once. That's an sqlite design, there's no other way around it
<abu[m]>
I see
<aw->
i'll be happy to answer any sqlite+picolisp questions when pable_escoberg returns
<aw->
err pablo_escoberg ;)
<abu[m]>
Seems he turns up more in the evening here, so very early in the morning for you
<aw->
OK thanks
razzy has joined #picolisp
<razzy>
Good day i wish to all! :)
<abu[m]>
Good day razzy!
<razzy>
I want to wait for string comming from serial link and than measure time between strings. miliseconds would be enough. I am thinking (coroutine ) that every 1ms, check serial link for strings.
<razzy>
am i correct?
<abu[m]>
A coroutine is probably not useful. A 'task' would be somethig to run periodically.
<abu[m]>
But for such a measurement direct (usec) calls are best I think
seninha has quit [Remote host closed the connection]
<razzy>
abu[m]: weird, i am testing (task (open "my.file") (msg (- (usec) (swap (0) (usec)] with assumption that it will show usec between acess of file. correct?
<razzy>
it shows average 15usec. which does make sense only if something accessig files al the time.
avocadoist has joined #picolisp
<abu[m]>
No, task is for asynchronous input, a socket or some device. Won't work on a file
<abu[m]>
It wakes up if data are available
<abu[m]>
A file descriptor *always* has data available
<razzy>
good to know, I was thinking that /dev/serial is file like everybody else. :]
<razzy>
everything else :]
<abu[m]>
yes, this *is* the case
<abu[m]>
$ man 2 poll
<abu[m]>
or
<abu[m]>
$ man 2 select
<abu[m]>
And look up examples of 'task' in the sources
<razzy>
if I do not have man, am I missing some software?
<abu[m]>
Really, I thought man is installed by default
<razzy>
i mean no man poll, man select
<abu[m]>
I think just "apt install man" should do
<razzy>
I wanted to tell you that I am missing manuals for select and poll. I am reading them online.
<abu[m]>
ok, still strange
<abu[m]>
so online is all right
<razzy>
abu[m]: will you have some free-ish window tomorrow?
<abu[m]>
I think so, but I cannot tell now *when* exactly