00:18
m_mans2 has quit [Ping timeout: 260 seconds]
00:20
m_mans has joined #picolisp
01:06
Regenaxer has quit [Ping timeout: 255 seconds]
02:03
linus`__ has joined #picolisp
02:03
linus` has quit [Read error: Connection reset by peer]
02:05
aw- has joined #picolisp
04:13
aw- has quit [Quit: Leaving.]
04:13
libertas has quit [Ping timeout: 248 seconds]
04:13
aw- has joined #picolisp
04:15
aw- has quit [Read error: Connection reset by peer]
04:19
aw- has joined #picolisp
04:21
libertas has joined #picolisp
04:43
orivej_ has quit [Ping timeout: 250 seconds]
05:22
Regenaxer has joined #picolisp
05:24
<
Regenaxer >
Hi aw-!
05:24
aw- has left #picolisp [#picolisp]
05:25
aw- has joined #picolisp
05:25
<
aw- >
i have an issue with http.l
05:26
<
aw- >
i think i brought this up a while back but I don't remember how we resolved it
05:26
<
Regenaxer >
hmm, or not solved? ;)
05:27
<
aw- >
it's a multipart/form-data request
05:27
<
aw- >
it takes
_forever_ to upload the file
05:27
<
aw- >
~20 seconds to upload a 300Mb file
05:28
<
Regenaxer >
Is it emu?
05:28
<
aw- >
I narrowed it down to (_htMultipart)
05:29
<
aw- >
this is 64-bit arm64
05:29
<
aw- >
but same problem on 64-bit x86_64
05:29
<
aw- >
it seems the (out F (echo ... is really slow
05:29
<
aw- >
(unless (out F (echo (pack "^M^J" *MPartLim)))
05:29
<
aw- >
(call "rm" "-f" F) ) )
05:30
<
aw- >
i can see the file upload in ~/.pil/tmp/NNNNN/file.tgz
05:30
<
aw- >
it's always so slow to process
05:30
<
Regenaxer >
It is inside 'echo'?
05:30
<
Regenaxer >
(trace 'echo) ?
05:31
<
Regenaxer >
or (unless (out (tmp S) (bench (echo @))) ?
05:31
<
aw- >
i don't think so, no
05:32
<
aw- >
it's (echo) that's slow
05:32
<
aw- >
just did the bench, 19.9s
05:32
<
Regenaxer >
Strange, I never observed this
05:34
<
Regenaxer >
Is this also when called in the repl?
05:34
<
aw- >
no, i'm not running the server in a repl
05:34
<
Regenaxer >
(bench (in "file300MiB" (out "/dev/null" (echo))))
05:35
<
Regenaxer >
yes, but a test
05:35
<
aw- >
why /dev/null ?
05:35
<
aw- >
that's not what i'm testing
05:35
<
Regenaxer >
To see if 'echo' is the bottleneck
05:36
<
aw- >
also much too long
05:37
<
aw- >
300MiB file should take under 1sec
05:37
<
Regenaxer >
no idea
05:38
<
aw- >
even if the file is in a tmpfs (memory), it takes the same amount of time to run that test
05:40
<
Regenaxer >
I have never measured 'echo'
05:43
<
Regenaxer >
: (out "f" (do (* 30 1024 1024) (prinl "123456789")))
05:43
<
Regenaxer >
-> "123456789"
05:43
<
Regenaxer >
: (bench (in "f" (out "/dev/null" (echo))))
05:43
<
Regenaxer >
1.604 sec
05:43
<
Regenaxer >
So 'echo' is not the bottleneck
05:45
<
aw- >
it's my computer?
05:46
<
aw- >
i just ran the same test
05:46
<
aw- >
(bench (in "f" (out "/dev/null" (echo))))
05:46
<
aw- >
is there a setting i need to change?
05:46
<
aw- >
maybe ulimit or buffer setting ?
05:47
<
Regenaxer >
I did the above test on this server
05:47
<
Regenaxer >
on my Arm64 tablet it takes 5 sec
05:48
<
aw- >
interesting..
05:48
<
aw- >
is your tablet faster than my computer? haha
05:48
<
Regenaxer >
I think it is when writing to compact flash
05:48
<
Regenaxer >
CF write is slow
05:48
<
aw- >
i'm doing this all in memory
05:49
<
Regenaxer >
Cause otherwise the tablet has roughly the same speed as this server
05:49
<
aw- >
can you show your ulimit settings?
05:50
<
Regenaxer >
core file size (blocks, -c) 0
05:50
<
Regenaxer >
data seg size (kbytes, -d) unlimited
05:50
<
Regenaxer >
scheduling priority (-e) 0
05:50
<
Regenaxer >
file size (blocks, -f) unlimited
05:50
<
Regenaxer >
pending signals (-i) 31044
05:50
<
Regenaxer >
max locked memory (kbytes, -l) 16384
05:50
<
Regenaxer >
max memory size (kbytes, -m) unlimited
05:50
<
Regenaxer >
open files (-n) 1024
05:50
<
Regenaxer >
pipe size (512 bytes, -p) 8
05:50
<
Regenaxer >
POSIX message queues (bytes, -q) 819200
05:50
<
Regenaxer >
real-time priority (-r) 0
05:50
<
Regenaxer >
stack size (kbytes, -s) 65536
05:50
<
Regenaxer >
cpu time (seconds, -t) unlimited
05:50
<
Regenaxer >
max user processes (-u) 31044
05:50
<
Regenaxer >
did this go through?
05:51
<
aw- >
ok one sec i'm comparing
05:52
<
aw- >
yeah... no difference
05:53
<
Regenaxer >
I'm wrong. Writing to /dev/null does not go to CF anyway
05:53
<
aw- >
when I strace, i see it's reading 8192 bytes at a time
05:54
<
aw- >
or maybe Kbytes
05:54
<
Regenaxer >
no, bytes
05:54
<
Regenaxer >
it is BUFSIZ
05:56
<
aw- >
src64/sys/arm64.linux.defs.l:(equ BUFSIZ 8192) ?
05:57
<
aw- >
is there an alternative to using (echo) here ?
05:57
<
aw- >
maybe i can do (while (line) (prin) ?
05:57
<
Regenaxer >
What do you get for 'fibo'?
05:57
<
Regenaxer >
$ pil misc/fibo.l +
05:57
<
Regenaxer >
: (bench (fibo 36))
05:57
<
Regenaxer >
1.137 sec
05:57
<
Regenaxer >
-> 14930352
05:57
<
Regenaxer >
: (bench (fibo 36))
05:57
<
Regenaxer >
1.083 sec
05:57
<
Regenaxer >
-> 14930352
05:58
<
Regenaxer >
No, line/prin is not a good idea
05:58
<
Regenaxer >
Much more expensive, allocates lots of memory, and wont work on binary data
05:59
<
aw- >
(bench (fibo 36))
05:59
<
Regenaxer >
on my tablet it is 2.2 sec
06:00
<
aw- >
on my Mac with 32-bit pil it's 9sec
06:00
<
Regenaxer >
yeah, pil32 is slower as it has no short numbers
06:01
<
aw- >
2sec on my colocation server
06:01
<
Regenaxer >
and generates garbage during arithmetics
06:01
<
aw- >
i have difficulty believing my arm64 CPU is
_that_ slow
06:02
<
Regenaxer >
Well, 'echo' is not really optimized too
06:02
<
Regenaxer >
But usually I found it OK
06:04
<
Regenaxer >
What kind of machine is it? RasPI?
06:07
<
aw- >
Quad-Core ARM Cortex A53, 4GB RAM
06:08
<
Regenaxer >
For embedded usage? Or a notebook or desktop?
06:09
<
aw- >
i'm using as desktop
06:09
<
aw- >
ok well, if (echo) performs well on x86-64 then that's fine.. that's my target anyways
06:09
<
aw- >
i only use the arm64 for dev
06:10
<
Regenaxer >
good thing!
06:11
<
Regenaxer >
Does your server have do get such 300 MiB files such often?
06:11
<
aw- >
sometimes up to 800Mb
06:14
<
Regenaxer >
Using (call "dd" ...) instead of 'echo' might help, but then more needs to be changed
06:15
<
Regenaxer >
eg. how to detect errors
06:15
<
Regenaxer >
to call (call "rm" "-f" (tmp S))
06:16
<
Regenaxer >
The (unless ..) check is to make sure the file arrived completely
06:17
<
Regenaxer >
Also, I don't want to depend on an external program like 'dd' here
06:17
<
Regenaxer >
May not be available in Android apps for example
06:20
<
Regenaxer >
And normally the network is the bottleneck here
06:24
<
aw- >
yeah like i said it's fine for now since my target is x86-64
06:25
<
Regenaxer >
In principle arm64 is same speed or faster than x84
06:27
<
aw- >
i'm onto something else now, this is not that big of a deal since it's fine on x86
06:27
<
aw- >
again in http.l
06:27
<
aw- >
i don't understand in (_htSet)
06:27
<
aw- >
(if (= " multipart/form-data; boundary" (lowc (till "=" T)))
06:27
<
aw- >
how does that work?
06:27
<
aw- >
there's no input
06:28
<
aw- >
doesn't (till) require an input?
06:31
<
Regenaxer >
(till) is an input
06:31
<
Regenaxer >
returns the data till "=" as a symbol
06:50
<
aw- >
i still don't understand how this works
06:51
<
aw- >
this http server is so complex
06:51
<
aw- >
("content-type:"
06:51
<
aw- >
*MPartLim (append '(- -) (cdr (line)))
06:51
<
aw- >
(if (= " multipart/form-data; boundary" (lowc (till "=" T)))
06:51
<
aw- >
*MPartEnd (append *MPartLim '(- -)) )
06:51
<
Regenaxer >
The boundary is terminated by a "="
06:51
<
aw- >
i don't understand this
06:51
<
Regenaxer >
I would recommend to single-step through the execution to see what it does
06:52
<
aw- >
it loops through every line in the request
06:52
<
Regenaxer >
only the header
06:52
<
aw- >
the case statement checks each header
06:54
<
aw- >
(lowc (till " ^M^J" T))
06:54
<
Regenaxer >
"X-Pil:" is special, sent by httpGate
06:55
<
aw- >
can you explain this:
06:55
<
aw- >
(case (lowc (till " ^M^J" T))
06:55
<
aw- >
("setq:" (host *Host (cdr (line))))
06:55
<
aw- >
(case (lowc (till " ^M^J" T))
06:55
<
aw- >
("host:" (setq *Host (cdr (line))))
06:55
<
aw- >
i don't understand that part
06:56
<
aw- >
how can "host:" be separated from what comes after the : ?
06:56
<
Regenaxer >
The call (till " ^M^J" T) returns the first part of the line
06:57
<
Regenaxer >
normally until a space
06:57
<
aw- >
so then why do we have (cdr (line)) ?
06:57
<
Regenaxer >
The cdr is to throw away the space
06:57
<
aw- >
ohhhhhh i see
06:58
<
aw- >
wow that's really not obvious
06:58
<
Regenaxer >
We could call 'clip', but thats more expensive
06:58
<
aw- >
ok so going back to the ("content-type:"
06:58
<
Regenaxer >
So this assumes there is only a single space
06:58
<
aw- >
why is there a (line) at the end there?
06:59
<
aw- >
it's not used for anything
06:59
rob_w has joined #picolisp
06:59
<
Regenaxer >
To skip return and/or linefeed
07:00
<
aw- >
an empty content-type ?
07:00
<
Regenaxer >
all the clauses in this 'case' call (line) in some way
07:01
<
Regenaxer >
Whatever the content-type line contains, we must skip it to continue
07:03
<
aw- >
but it doesn't skip it
07:04
<
aw- >
if I make an request with an arbitrary content-type, ex: multipart/mixed, then the server just freezes
07:05
<
Regenaxer >
really? But other content types should appear often (?)
07:06
<
Regenaxer >
Hmm, perhaps (till "=" T) is not optimal
07:07
<
Regenaxer >
Should be (till "=^M^J" T) perhaps?
07:07
<
aw- >
no that's only for the multipart/form-data which has a boundary
07:08
<
aw- >
i'm trying to add a condition for supporting other content-types
07:08
<
aw- >
and it's incredibly painful
07:10
<
Regenaxer >
Still, (till "=" T) is perhaps incorrect?
07:11
<
aw- >
i think it's ok.. i don't think that's the issue
07:11
<
Regenaxer >
Where exactly does it freeze?
07:12
<
Regenaxer >
If the line does not contain a "=", it will continue to parse the input stream till an unpredictable location
07:12
<
Regenaxer >
I think I should change this
07:13
<
aw- >
i'll show you what i did
07:18
<
aw- >
ah nvrmind it doesn't work
07:20
<
Regenaxer >
I changed the two 'till' calls
07:21
<
Regenaxer >
I think it should be safe
07:21
<
Regenaxer >
or is there a situation where it might harm?
07:24
<
aw- >
what do you mean 'safe' ?
07:25
<
Regenaxer >
Nothing else breaks
07:25
<
Regenaxer >
I changed to (till "=^M^J" T)
07:26
dtornabene has joined #picolisp
07:29
<
aw- >
there's also the problem of sending data as content
07:29
<
aw- >
right now http.l only accepts key=value as data
07:29
<
aw- >
you can't send just a string as data.. that limits the types of requests it can handle
07:30
<
Regenaxer >
For example?
07:31
<
Regenaxer >
In pil applications all kinds of data are POSTed
07:31
<
aw- >
yes but those are POST'd via web form, right?
07:31
<
aw- >
those are all key=value
07:32
<
aw- >
but you should be able to just send a value
07:32
<
Regenaxer >
Why? What should happen with that value on the server?
07:32
<
aw- >
and then parse the data based on the content-type
07:33
<
Regenaxer >
I don't see any need for that
07:33
<
aw- >
ex, if someone specifies Content-Type: image/svg+xml ... my server should be able to parse the content directly
07:33
<
aw- >
yes there's lots of nede
07:33
<
Regenaxer >
Sorry telephone
07:34
<
aw- >
ok, i'll try to hack on this a bit more and figure out how to add my own content-types
07:41
<
Regenaxer >
Will take some hours here
08:30
mtsd has joined #picolisp
08:32
<
Regenaxer >
Hi Nistur!
08:32
<
Regenaxer >
Hi mtsd!
08:33
<
mtsd >
Hi Regenaxer!
08:34
<
mtsd >
My picolisp t-shirt arrived yesterday :)
08:34
<
Nistur >
I'm wearing mine today again :P
08:34
<
mtsd >
Good work, Nistur :)
08:35
<
mtsd >
It is going to be standard work uniform for me, I think
08:35
<
aw- >
picolisp t-shirt?
08:35
<
Regenaxer >
mtsd: Great! :)
08:47
<
Nistur >
14 total tshirts sold so far :P
08:49
<
mtsd >
Uniforming the community ;)
09:05
orivej has joined #picolisp
09:11
<
aw- >
wow nice! what's the difference with Premium Tee?
09:13
<
tankf33der >
does anyone want post to reddit.com/r/lisp Tshirt link ?
09:13
<
aw- >
why the hell does this website have 45 javascript assets?
09:15
<
aw- >
i guess most ecommerce websites are like this nowadays
09:18
<
Nistur >
aw-: yeah, all tshirt sites I tried had a million and one hooks into everything :( it sucked.
09:18
<
aw- >
good business, how many have you sold so far?
09:18
<
Nistur >
I didn't order both myself, I just got a premium one which seems pretty nice
09:20
<
Nistur >
teespring has unfortunately high shipping costs :( but the actual tshirt costs are considerably lower than other sites I tried (most were $20-25 per shirt)
09:20
<
Nistur >
I put the prices of the shirts pretty much at cost, so I'm not earning anything from this :P It was just because I wanted a picolisp tshirt, and it looked like other people might be interested in one too
09:21
mtsd has quit [Remote host closed the connection]
09:22
mtsd has joined #picolisp
09:41
alexshendi has joined #picolisp
10:07
mtsd has quit [Remote host closed the connection]
10:08
mtsd has joined #picolisp
10:13
mtsd has quit [Remote host closed the connection]
10:47
dtornabene has quit [Read error: Connection reset by peer]
10:47
dtornabene has joined #picolisp
10:54
dtornabene_ has joined #picolisp
10:56
dtornabene has quit [Ping timeout: 240 seconds]
10:59
m_mans has quit [Ping timeout: 240 seconds]
11:00
m_mans has joined #picolisp
11:26
<
sriram_ >
Nistur> thats wonderful....I am looking into getting one too..many thanks for letting us know about this..
11:27
<
sriram_ >
just wondering how the sizes are set up
11:31
<
Nistur >
sriram_: I am tempted to say something facetious, like "well, they start small, and get bigger until they're huge"... :P
11:32
<
Nistur >
sriram_: I got an XL... it's probably one of the smaller XLs I've got, they usually go from 'baggy' to 'practically a dress' on me, which my wife always complains about :P But it's safer to buy a bit larger, because a L would have been tight and I don't like tight
11:32
<
sriram_ >
i guess i will start ordering at the smallest size that will fit me and stop when it actually fits :)
11:33
<
Nistur >
anyway, I would say they probably run a little on the small side, but are relatively average... they're not noticably small
11:33
<
sriram_ >
ah thats the info I am looking for...I dont like tight as well and was wondering
11:33
<
sriram_ >
if XL would do
11:35
<
sriram_ >
like you, I dont like it when a snug fit..so was debating L/XL/2XL
11:38
<
aw- >
i ordered two, because i hate having a "favourite t-shirt" that's hard to replace
11:39
<
aw- >
Nistur: thanks for setting it up
11:40
<
aw- >
unrelated, I finally switched my email client, from Thunderbird to Alpine (Pine from the good ol')
11:41
<
Nistur >
aw-: no problem
11:42
* Nistur
is using gnus pretty much entirely for his own emails these days
11:43
<
aw- >
never heard of it, emacs reader?
12:08
aw- has quit [Quit: Leaving.]
12:11
dtornabene_ has quit [Quit: Leaving]
12:12
<
tankf33der >
nasty one again.
12:29
<
Nistur >
tankf33der: it's not showing up in r/lisp
12:32
<
tankf33der >
i can see it, try F5
12:34
<
Nistur >
I have it on 'new' obviously
12:34
<
Nistur >
and there's nothing newer than 15 hours ago
12:36
<
tankf33der >
front page
12:36
* Nistur
blows raspberries
12:36
<
Nistur >
still not showing up for me
12:37
<
Nistur >
on two machines, let me check my phone
12:37
<
Nistur >
nope not there either
12:39
<
Nistur >
tankf33der: maybe it needs approval and is just showing up on yours because you're signed in?
12:40
<
tankf33der >
yea, dont show if loggedout
12:42
<
Nistur >
I am logged in on one box and my phone, and not logged in on another, so yeah, it must just be you that can see it :P
13:01
_whitelogger has joined #picolisp
13:58
rob_w has quit [Quit: Leaving]
14:14
grp has joined #picolisp
14:33
himmAllRight has joined #picolisp
16:34
alexshendi has quit [Ping timeout: 264 seconds]
17:37
_whitelogger has joined #picolisp
17:53
alexshendi has joined #picolisp
18:32
alexshendi has quit [Ping timeout: 255 seconds]
18:55
_whitelogger has joined #picolisp
18:56
reed_ has joined #picolisp
20:19
rick42 has joined #picolisp
20:26
alexshendi has joined #picolisp
21:17
grp has quit [Quit: box shutting down...]
22:50
reed_ has quit [Ping timeout: 260 seconds]