04:34
peterhil has joined #picolisp
04:52
aw- has quit [Quit: Leaving.]
06:04
orivej has joined #picolisp
06:11
rob_w has joined #picolisp
06:18
theruran has joined #picolisp
06:27
mtsd has joined #picolisp
06:56
<
beneroth >
Good morning
06:59
<
Regenaxer >
Hi all!
06:59
<
Nistur >
how goes things?
07:00
<
Regenaxer >
As ever :)
08:13
libertas has quit [Ping timeout: 256 seconds]
08:13
libertas has joined #picolisp
09:27
theruran has quit [Quit: Connection closed for inactivity]
09:44
libertas has left #picolisp [#picolisp]
09:46
libertas has joined #picolisp
09:49
peterhil has quit [Read error: Connection reset by peer]
09:50
peterhil has joined #picolisp
10:09
<
beneroth >
his Game of Life will live forever
10:10
<
Regenaxer >
yeah, a few days ago. Saw in twitter
10:18
peterhil has quit [Quit: Must not waste too much time here...]
10:25
mtsd has quit [Ping timeout: 256 seconds]
11:13
<
tankf33der >
hi all
11:13
<
Regenaxer >
Hi tankf33der
11:14
<
tankf33der >
Regenaxer: i would like read sources of webframework. what should i read first of three file: html, http or form?
11:14
<
Regenaxer >
First http
11:14
<
tankf33der >
i feel the energy.
11:15
<
Regenaxer >
They depend on each other http -> xhtml -> form
11:16
<
tankf33der >
i tried load benchmarking
11:17
<
tankf33der >
skudra code was ok, but when i testing simple ht:Prin “mike” benchmarker cant get numbers :)
11:17
<
tankf33der >
looks like it expect something and fails to count
11:18
<
Regenaxer >
hmm, what numbers?
11:18
<
Regenaxer >
Content-Size perhaps? Do you use ht:Out *Chunked?
11:20
<
tankf33der >
i get always zeroes
11:21
<
tankf33der >
just ht.Prin
11:21
<
tankf33der >
i will play again then
11:23
<
Regenaxer >
'respond' sends "Content-Length: "
11:23
<
Regenaxer >
Otherwise it depends
11:23
<
Regenaxer >
(html ...) is OK
11:49
mtsd has joined #picolisp
11:50
f8l has quit [Remote host closed the connection]
11:51
<
tankf33der >
playing with benchmarking
11:51
<
tankf33der >
(httpHead "text/plain; charset=utf-8")
11:51
f8l has joined #picolisp
11:51
<
tankf33der >
how to print Hello world this httpHeader ?
11:51
<
tankf33der >
how to print Hello world after this httpHeader ?
11:52
<
Regenaxer >
Better use 'html' from @lib/xhtml.l
11:53
<
Regenaxer >
It does all
11:54
<
tankf33der >
no documentation for html
11:54
<
Regenaxer >
(html 0 "Test" NIL NIL (prinl "OK"))
11:54
<
Regenaxer >
Perhaps doc/app.html
11:55
<
Regenaxer >
A bit outdated, but the html stuff still fits
11:56
<
tankf33der >
see, still zeroes
11:56
<
tankf33der >
i tried another tool, the same.
11:56
<
Regenaxer >
Sending zeros?
11:57
<
tankf33der >
no cant count requests
11:57
<
tankf33der >
no, cant count requests
11:57
<
tankf33der >
of course.
11:57
<
Regenaxer >
I don't know wrk
11:57
<
tankf33der >
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
11:57
<
tankf33der >
curl fails, firefox ok
11:58
<
tankf33der >
$ cat myapp.l
11:58
<
tankf33der >
(html 0 "Hello" "@lib.css" NIL
11:58
<
tankf33der >
"Hello World!" )
11:58
<
tankf33der >
(httpHead "text/plain; charset=utf-8")
11:58
<
Regenaxer >
(html 0 "Test" NIL NIL "OK") ?
11:58
<
Regenaxer >
No (httpHead ...
11:58
<
Regenaxer >
html does all
11:58
<
Regenaxer >
see lib/xhtml.l
11:59
<
tankf33der >
curl works now
11:59
<
Regenaxer >
(vi 'html)
11:59
<
Regenaxer >
You can pass NIL instead of "@lib.css"
12:01
<
tankf33der >
i got numbers
12:14
<
Regenaxer >
"read 115234" means errors?
12:15
<
tankf33der >
i think is total read counters in 30 seconds
12:16
<
Regenaxer >
true, "115236 requests"
12:46
xkapastel has joined #picolisp
13:07
<
tankf33der >
i will learn http and will be smarter
13:07
alexshendi has joined #picolisp
13:07
<
Regenaxer >
good thing
13:08
<
tankf33der >
i want this, but i dont known how to enable db level
13:08
<
Regenaxer >
You started it already iirc
13:09
<
alexshendi >
Hi, just a quick question regarding pil21. Are user visible functions defined only in src/glob.l or also in other places?
13:09
<
Regenaxer >
Just 'store' and 'fetch', no E/R is needed
13:09
<
Regenaxer >
Hi alexshendi
13:09
<
Regenaxer >
They are all in the symbol table in src/glob.l
13:10
<
alexshendi >
Regenaxer: Hi and thanp you <3
13:10
<
alexshendi >
s/thanp/thank/
13:19
<
DKordic >
tankf33der: W:Common_Gateway_Interface seems to be an implementatin of Remote Procedure Call of execve.
13:23
<
DKordic >
httpGate seem to be like the inetd.
13:27
mtsd has quit [Quit: Leaving]
13:37
<
Regenaxer >
My next goal for pil21 is to implement all functions needed for misc/bigtest, so that bignum tests can run
13:38
<
Regenaxer >
And after that the goal is to self-bootstrap, so that pil64 is not needed
13:45
<
Regenaxer >
But first more I/O stuff
13:46
<
Regenaxer >
as ever hard to get system-independent
14:05
<
tankf33der >
Regenaxer: i am waiting for test function.
14:05
<
Regenaxer >
Too early
14:05
<
Regenaxer >
Only perhaps bignums
14:05
<
Regenaxer >
They are finished I think
14:06
<
tankf33der >
then i can use diff to compare two outputs from pil21 vs. pil64
14:07
<
Regenaxer >
Flow functions (loops) are missing
14:07
<
Regenaxer >
So no good way to do useful tests I'm afraid
14:07
<
Regenaxer >
I'm still struggling with I/O
14:17
rob_w has quit [Quit: Leaving]
15:37
<
tankf33der >
Regenaxer: after playing i found i should call (commit) after (store)
15:37
<
tankf33der >
right ?
15:38
<
Regenaxer >
Yes, that's needed
15:38
<
Regenaxer >
Is it single-user?
15:38
<
Regenaxer >
If not, (dbSync) (store ..) (commit 'upd)
15:39
<
tankf33der >
its URL shortener task.
15:39
<
tankf33der >
so multi fork mode
16:24
<
tankf33der >
Regenaxer: psh question
16:24
<
tankf33der >
should i here somehow protect something ?
16:24
<
tankf33der >
i dont know what
16:26
<
tankf33der >
via allow
16:32
<
Regenaxer >
Yes, that's necessary if the server is public
16:32
<
tankf33der >
and what should be in list then ?
16:32
<
Regenaxer >
What is allowed?
16:32
<
Regenaxer >
Which URL may be called?
16:32
<
tankf33der >
nothing, iiuc.
16:33
<
Regenaxer >
But the directory where files may be sent from
16:33
<
Regenaxer >
only that
16:33
<
Regenaxer >
(allow ("pub/"))
16:34
<
Regenaxer >
Otherwise all files are accessible
16:38
<
tankf33der >
in my example from README.md pastes to store and fetch in /home/user/skudra-root dir
16:38
<
Regenaxer >
Absolute pathes are forbidden iirc
16:39
<
tankf33der >
it works.
16:39
<
tankf33der >
*DirRoot "/home/mpech/skudra-root/"
16:39
<
tankf33der >
*KBLimit (* 256 1024) )
16:40
<
Regenaxer >
yes, because *Allow is NIL
16:40
<
Regenaxer >
then everything is allowed
16:40
<
tankf33der >
so i must add something to allow and test again.
16:40
<
Regenaxer >
ok, absolute is OK, but must be in *Allow
16:40
<
Regenaxer >
".." is never allowed
16:40
<
Regenaxer >
see 'disallow'
16:41
<
tankf33der >
see disallow where ?
16:41
<
Regenaxer >
'disallowed'
16:41
<
Regenaxer >
lib/http.l
16:41
<
tankf33der >
so (allow ("skudra-root/")) ?
16:42
<
Regenaxer >
Only if "skudra-root/" is relativ (local)
16:42
freemint has joined #picolisp
16:43
<
Regenaxer >
(allow '("/full/path/" might work
16:43
<
Regenaxer >
Never tried
16:43
<
Regenaxer >
I never use absolute pathes
16:44
<
tankf33der >
and I never used web frameworks.
16:44
<
Regenaxer >
Me neither
16:44
<
Regenaxer >
No "real" frameworks ;)
16:44
<
tankf33der >
and I never used web programming in picolisp.
16:44
<
Regenaxer >
No problem
16:45
<
Regenaxer >
You can easily test
16:45
<
Regenaxer >
*if* you set *Allow to anything
16:45
<
Regenaxer >
you get an error for every access that is
*not* allowed
16:45
<
Regenaxer >
So you can easily fix
16:46
<
tankf33der >
$ curl -F 'f=@/etc/issue' 127.0.0.1:8080
16:46
<
tankf33der >
as you can see i dont use anything related to lisp code here.
16:46
<
tankf33der >
even pastebin.l hidden.
16:47
<
Regenaxer >
yes, good
16:47
<
Regenaxer >
But you must set *Allow to something
16:48
<
tankf33der >
trying.
16:49
<
tankf33der >
^^^ not found
16:50
<
freemint >
So i want to try to setup a PicoLisp websever again. I want to install it from a fresh OS. Any reason why CentOs vs Debian vs Fedora vs Ubuntu would matter?
16:50
<
tankf33der >
(apply (val (intern (ht:Pack (cdr U) T))) L)
16:50
<
tankf33der >
msg&Hello -- Undefined
16:50
<
Regenaxer >
hi freemint
16:50
<
freemint >
Hi Regenaxer
16:51
<
Regenaxer >
tankf33der, did you escape the & ?
16:51
<
tankf33der >
freemint: no
16:51
<
tankf33der >
Regenaxer: no
16:52
<
tankf33der >
I see 10 times "Hello" in debug log
16:52
<
tankf33der >
firefox failed
16:53
<
tankf33der >
like this:
16:53
<
tankf33der >
The connection was reset
16:53
<
tankf33der >
The connection to the server was reset while the page was loading.
16:53
<
Regenaxer >
msg does not send to client
16:53
<
Regenaxer >
it sends to stdout
16:53
<
Regenaxer >
yes, of course
16:53
<
Regenaxer >
no respond to the client
16:54
<
Regenaxer >
But you see how dangerous it is
16:55
<
Regenaxer >
any system command
16:55
<
tankf33der >
thats why i am asking about this after 24 hours.
16:55
<
Regenaxer >
if nothing is allowed
16:55
<
tankf33der >
but at the same time i dont know what to add to allow
16:56
<
Regenaxer >
OK, then just (allow NIL "mike")
16:56
<
Regenaxer >
if there is no file "mike" of course ;)
16:56
<
tankf33der >
where exactly ?
16:56
<
tankf33der >
where pastebin.l file ?
16:56
<
Regenaxer >
no, working directory
17:06
<
tankf33der >
I inserted (allow NIL "mike") as first line of pastebin.l and still can call date to console
17:06
<
Regenaxer >
Thats too late
17:07
<
Regenaxer >
pastebin.l is loaded as the
*default*
17:07
<
Regenaxer >
Better make a function
17:07
<
Regenaxer >
(allow NIL "!pastebin")
17:07
<
Regenaxer >
(de pastebin () ...
17:08
<
Regenaxer >
(server (port ...) "!pastebin")
17:08
<
Regenaxer >
pil pastebin.l -wait
17:08
<
Regenaxer >
pil pastebin.l +
17:08
<
Regenaxer >
Something like that
17:08
<
Regenaxer >
In this way it is also a lot faster
17:09
<
Regenaxer >
because pastebin.l is not loaded each time
17:13
<
tankf33der >
playing.
17:14
<
freemint >
Is there anything wrong with 18-12 as pil version?
17:15
<
tankf33der >
download latest and recompile.
17:15
<
Regenaxer >
Not sure, a lot changed meanwhile
17:23
<
tankf33der >
modified, now pastebin is function
17:23
<
tankf33der >
starting pil pastebin.l +
17:23
<
Regenaxer >
Looks good
17:23
<
tankf33der >
and still can call !call?date
17:23
<
tankf33der >
to console
17:24
<
Regenaxer >
hmm, needs a path then
17:26
<
tankf33der >
path to what ?
17:26
<
Regenaxer >
*Allow needs a value
17:26
<
Regenaxer >
I always have the source directory there
17:26
<
Regenaxer >
(allow '("app/" "img/") ...
17:27
<
Regenaxer >
(allowed ...
17:27
<
Regenaxer >
Sorry, I did not check
17:27
<
Regenaxer >
(allowed ("app/" "img" ...) ...
17:28
<
Regenaxer >
'allow' is to
*later* allow additional things
17:30
<
Regenaxer >
So 'allow' is the wrong function
17:30
<
tankf33der >
works, now call denied and i see rejected warning in log
17:30
<
tankf33der >
"!call" [::ffff:127.0.0.1] not allowed
17:30
<
tankf33der >
perfect.
17:31
<
tankf33der >
but now i cant post
17:31
<
tankf33der >
f [::ffff:127.0.0.1] not allowed
17:31
<
tankf33der >
curl: (52) Empty reply from server
17:31
<
Regenaxer >
yes, the 'f'
17:32
<
Regenaxer >
Why do you pass it?
17:32
<
Regenaxer >
(allowed () f ...)
17:32
<
Regenaxer >
then (get 'f 'http)
17:32
<
Regenaxer >
ie 'f' is a variable
17:32
<
tankf33der >
`(== 64 64)
17:32
<
tankf33der >
(allowed NIL "!pastebin" "f")
17:32
<
tankf33der >
(load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")
17:33
<
tankf33der >
this three first lines of files works.
17:33
<
Regenaxer >
Not sure if "f" works. I thought f
17:33
<
Regenaxer >
(internal symbol)
17:33
<
Regenaxer >
might be ok
17:33
<
Regenaxer >
checks via 'idx' right?
17:35
<
tankf33der >
right.
17:35
<
Regenaxer >
But internal symbol is ok, I use *Var usually
17:36
<
tankf33der >
now GET is broken
17:36
<
tankf33der >
on this always returns index welcome text
17:36
<
Regenaxer >
now you have a function
17:37
<
Regenaxer >
So it is passed as an argument
17:37
<
Regenaxer >
(de pastebin (Var) ...
17:37
<
Regenaxer >
(de pastebin @ ... (next) ...
17:38
<
tankf33der >
(de pastebin @ helped.
17:38
<
Regenaxer >
(Var) is more clean
17:38
<
Regenaxer >
the normal way
17:39
<
tankf33der >
not for first time.
17:39
<
Regenaxer >
unless you really want to support variable args
17:50
<
Regenaxer >
Did it get faster with a pre-loaded pastebin.l file?
17:51
<
tankf33der >
commited.
17:52
<
tankf33der >
with URL shortener i could experiment again and more.
17:52
<
tankf33der >
thanks a lot.
18:09
orivej has quit [Ping timeout: 264 seconds]
18:24
orivej has joined #picolisp
19:03
alexshendi has quit [Quit: leaving]
19:11
<
tankf33der >
damn, cant sleep
19:11
<
tankf33der >
playing with server function
19:13
freemint has quit [Remote host closed the connection]
19:13
freemint has joined #picolisp
19:49
theruran has joined #picolisp
20:50
xkapastel has quit [Quit: Connection closed for inactivity]
21:57
orivej has quit [Ping timeout: 256 seconds]
22:16
freemint has quit [Ping timeout: 240 seconds]
22:17
freemint has joined #picolisp
22:19
freemint has quit [Remote host closed the connection]
22:19
freemint has joined #picolisp
22:25
xkapastel has joined #picolisp
22:49
freemint has quit [Ping timeout: 240 seconds]
23:58
f8l has quit [Remote host closed the connection]
23:59
f8l has joined #picolisp