ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
andyjpb has joined #picolisp
orivej has quit [Ping timeout: 248 seconds]
andyjpb has quit [Ping timeout: 276 seconds]
pierpa has quit [Quit: Page closed]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
yunfan[Cr2] has joined #picolisp
yunfan[Cr2] has quit [Ping timeout: 264 seconds]
yunfan[Cr2] has joined #picolisp
u0_a58 has joined #picolisp
yunfan[Cr2] has quit [Ping timeout: 240 seconds]
u0_a581 has joined #picolisp
u0_a58 has quit [Ping timeout: 240 seconds]
u0_a581 has quit [Ping timeout: 248 seconds]
_whitelogger has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
orivej has joined #picolisp
Nistur has quit [Ping timeout: 256 seconds]
Nistur has joined #picolisp
Nistur has quit [Ping timeout: 255 seconds]
<aw-> Regenaxer: here?
<Regenaxer> hi aw-!
<aw-> hi
<aw-> i'm having difficulty using (timeout) in a (fork)
<aw-> it doesn't seem to trigger
<Regenaxer> hmm, is it inherited?
<Regenaxer> It might be fatal if children inherit it
Nistur has joined #picolisp
<Regenaxer> No, it *is* inherited
<Regenaxer> (unless (fork) (msg (cons *Pid *Run)) (bye))
<Regenaxer> So it should work :)
<aw-> ok 1 sec
<aw-> (setq Sock (listen Port)) (unless (fork) (timeout 3000) (do-something))
<aw-> the fork should die after 3s, no?
<Regenaxer> not necessarily
<Regenaxer> only if you give it a chance
<Regenaxer> ie *Run is processed, a task
<aw-> ?
<Regenaxer> if you want a hard kill, look at 'alarm' or 'abort'
<Regenaxer> timeout is a task
<aw-> oh yes
<aw-> that's what I want!
<Regenaxer> : (pp 'timeout)
<Regenaxer> (de timeout (N)
<Regenaxer> (if2 N (assoc -1 *Run)
<Regenaxer> (set (cdr @) (+ N))
<Regenaxer> (push '*Run (list -1 (+ N) '(bye)))
<Regenaxer> (del @ '*Run) ) )
<aw-> timeout is a task..!!! ok that makes sense now
<Regenaxer> I think (abort 10 (doSomething)) is best
<aw-> yes that's perfect!
<aw-> thank you!
<aw-> Regenaxer: is (ht:Read) able to ready _any_ data it receives?
<aw-> i'm running into a problem with a certain file, it gets truncated
<Regenaxer> Should so, as the normal 'read'
<aw-> i try with (in "file" (till NIL T)) VS (in "file" (pack (ht:Read Bytes))) and the result is different
<Regenaxer> Should be like (till NIL), right?
<Regenaxer> list of chars, not a single symbol
<aw-> yes sorry
<Regenaxer> but truncated?
<Regenaxer> is 'Bytes' correct?
<aw-> : (info "test2.json")
<aw-> -> NIL
<aw-> : (in "test2.json" (ht:Read 1097))
<aw-> -> (1097 737174 . 26337)
<aw-> it works with 1095
<aw-> and curl thinks the file is 1046 Bytes
<Regenaxer> yes, ht:Read tries to read *all*, gives NIL if too short
<Regenaxer> (info "test2.json") ?
<aw-> when I use curl to upload test2.json, it thinks the file is 1046 Bytes
<aw-> but picolisp and my filesystem see it as 1097 Bytes
<Regenaxer> (info "test2.json") ?
<aw-> but (ht:Read 1097) returns NIL, (ht:Read 1095) returns the full thing
<aw-> what?
<aw-> i pasted it above
<aw-> (info "test2.json")
<aw-> -> (1097 737174 . 26337)
<Regenaxer> ah, sorry!
<Regenaxer> hmm, strange
<aw-> the file contains some "special" characters
<Regenaxer> non-UTF8 ?
<aw-> double-byte chars too.. maybe that's why?
<aw-> ah yes maybe
<Regenaxer> ah, yes
<aw-> wait i'll show you the file
<Regenaxer> PicoLisp handles *only* UTF-8
<Regenaxer> not needed
<Regenaxer> ht:Read expects UTF-8
<aw-> but I can parse the file just fine with my JSON decoder
<aw-> it's only ht:Read that fails
<aw-> it seems PicoLisp handles it correctly
<aw-> or.. does ht:Read actually 'parse' or tokenize the file?
<Regenaxer> PicoLisp gets confused if a byte looks like the first char of an UTF-8 sequence but ist
<Regenaxer> result may be unpredictable
<Regenaxer> if the byte looks like a 3~byte char, it counts 3 but only 1 byte folluws perhaps
<Regenaxer> you need a conversion
<aw-> hmmm
<aw-> i guess curl is confused as well
<Regenaxer> (in '(iconv "-f" "ISO-8859-15" "file.txt") (ht:Read ..
<aw-> oh, the file is UTF-8 actually
<aw-> file test2.json
<aw-> test2.json: UTF-8 Unicode text
<Regenaxer> hmm, perhaps it contains a mixture of charsets?
<Regenaxer> (in (list "/usr/bin/iconv" "-f" "ISO-8859-15" "-t" "UTF-8" "test2.json") (ht:...
<aw-> maybe
<aw-> oh i converted and the filesize changed
<Regenaxer> The question is what to use for -f
<Regenaxer> yeah
<aw-> wow that worked
<Regenaxer> With iconv?
<aw-> haha yeah
<Regenaxer> Perhaps just by chance
alexshendi has quit [Read error: Connection reset by peer]
<Regenaxer> if the source charset is not clear, the result may be wrong
<aw-> right
<aw-> ok next question, how can I make ht:Read not fail in that situation?
<Regenaxer> I think there is no general way
<aw-> yeah.. if you don't know the charset, it's hard to do anything haha
<Regenaxer> If you convert first, then 'info', ht:Read will not fail
<Regenaxer> just some chars may be wrong :)
<aw-> right, but if the doc is already utf-8 then i shouldn't convert
<Regenaxer> depends if that is really a problem
<aw-> and in this case, the doc said it was utf-8 even though it wasn't 100%
<Regenaxer> true
<aw-> so I can't trust that
<aw-> argh, i guess this is the eternal problem with computers
<aw-> shoganai
<Regenaxer> passing always through iconv first is too expensive?
<Regenaxer> :)
<Regenaxer> daijobu
<aw-> yes, not worth the effort
<aw-> thanks for the help!
<Regenaxer> np
_whitelogger has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
arievw has joined #picolisp
<arievw> Hi!
<Regenaxer> Hi arievw!
<arievw> Downloaded Wiki sources from here: https://picolisp.com/wiki/?documentation as wiki.tgz but using this unchanged gives different results from the official version. Is this the current version??
<Regenaxer> I thought the link points to software-lab.de (?)
<Regenaxer> checking ...
<Regenaxer> yes
<Regenaxer> this is correct
<arievw> So, that is current??
<Regenaxer> The same version as is running on picolisp.com
<arievw> Cause when I just run this unchanged locally, it is messed up ...
<Regenaxer> I just checked. All files are the same
<Regenaxer> Can only be the initial data then
<arievw> OK. Iĺl just redownload and unpack and run again. Maybe I did something wrong ...
<Regenaxer> How did you run it?
<arievw> Can I clean that up?
<Regenaxer> remove db?
<arievw> cd ~/wiki/ & pil wiki/main.l -main -go +
<Regenaxer> I run it locally as:
<Regenaxer> $ PORT=8080 ./pil wiki/main.l lib/too.l -main -go +
<arievw> OK. I miss the lib then.
<Regenaxer> nono
<Regenaxer> it is only for maintenance
<arievw> So, my setup seems ok?
<Regenaxer> and 8080 is not needed. Default port is 5000
<arievw> I use 5000 indeed.
<Regenaxer> yes, the command line is good then
<arievw> OK. Iĺl just redo neatly and retry first ...
<Regenaxer> I use a local ./pil as the global one from Debian is always very old
<Regenaxer> Perhaps just remove DB
<Regenaxer> $ rm -r db/wiki/
<Regenaxer> Should initialize automatically then
<arievw> pil -version shows 18.2.17
<Regenaxer> ah, good
<Regenaxer> should be fine
<arievw> I´ll remove the db. Pls wait ...
<Regenaxer> sure
<arievw> Should the db folder be in the wiki folder itself?
<Regenaxer> it is created in the current directory
<Regenaxer> I just tried here on my tablet
<Regenaxer> did not have the wiki installed
<Regenaxer> Works fine
<Regenaxer> Login is admin/admin (see wiki/init.l)
<arievw> Here problem stays the same. So, first a retry install then.
<Regenaxer> What problem?
<Regenaxer> There cannot be a bad install I think
<Regenaxer> just tar xvfz wiki.tgz
<Regenaxer> BTW, Arie, some details are indeed much better discussed here. I observed that if too many emails about minor details without general interest flood the mailing list, some people unsubscribe due to the noise
<arievw> OK. Will do :)
<Regenaxer> We are in the same time zone :)
<arievw> I used tar -xvf wiki.tgz
<arievw> Cleaned now and used tar xfvz
<arievw> Result the same
<Regenaxer> Should be fine. I omit the -
<Regenaxer> What result do you mean?
<Regenaxer> Browser at http://localhost:8080 ?
<arievw> No. It comes up OK, but it seems wrong. Sent a screenshot via mail ...
<Regenaxer> ok
<Regenaxer> to the list?
<Regenaxer> Better to me directly
<Regenaxer> mailing list takes time (and produces noise ;)
<arievw> Can I attach things here?
<arievw> Ah, ok then.
<arievw> Sorry.
<Regenaxer> No problem
<Regenaxer> I think directly to IRC things cannot be attached
<Regenaxer> We use pastebin or similar
<arievw> OK, will do.
<Regenaxer> The mailing list server polls every 4 minutes
<arievw> Guess I am a dinosaur :)
<Regenaxer> so it may take up to 8
<Regenaxer> :)
<Regenaxer> Me too
<Regenaxer> Mail not arrived yet
<Regenaxer> soon probably ...
<Regenaxer> got it!
<Regenaxer> Looks perfect
<Regenaxer> Why do you think it is wrong?
<arievw> It looks totally different in Firefox/Ubuntu than in Windows/Opera
<Regenaxer> I have only Chrome on the tablet here, and Firefox on Linux. Look the same roughly
<arievw> Well, Iĺl install firefox on Windows and try :)
<Regenaxer> Not bad or wrong, it is rather how the menu items are arranged, right?
<Regenaxer> Perhaps a matter of font sizes and available space
<arievw> Well, in the Ubuntu version I miss e.g. the documentation link ...
<Regenaxer> hmm, yes, this is strange - the data should be the same
<Regenaxer> No, wait!
<Regenaxer> You look at different DBs
<Regenaxer> Impressum etc. is only in the "real" DB
<Regenaxer> yes
<Regenaxer> it is picolisp.com!
<arievw> Also the page contents are different. In Opera it start with ¨programming simplified¨ but on Ubuntu the first page starts with ¨PicoLisp: The Scalpel of Programming¨
<Regenaxer> yes, locally you have an empty DB
<Regenaxer> only what is in wiki/init.l !
<Regenaxer> and wiki/home.txt and wiki/menu.txt
<Regenaxer> (as loaded in wiki/init.l)
_whitelogger has joined #picolisp
<Regenaxer> I know!
<Regenaxer> I just wrote that this is what you have in the empty DB
<arievw> Of course. So it does not reflect the real Wiki contents. Sigh.
<Regenaxer> yes, you have the sources of the code, not the whole DB
<arievw> Having the contents would locally would be beneficial :)
<Regenaxer> I cannot distribute it. It has user informations etc
<arievw> Because then I can test much better if it all behaves well before going live ...
<Regenaxer> Yes, but you need only to creates some text fragments
<arievw> Ah well. Then I´ll just start copying a few relevant pages to get going.
<Regenaxer> to test CSS and perhaps code
<Regenaxer> yeah
<arievw> Sorry for the fuss. It should have been obvious.
<arievw> Fresh start then :)
<Regenaxer> no problem :)
<arievw> afk
<Regenaxer> Good luck! :)
<Regenaxer> The DB on the server has 235 MiB meanwhile
<arievw> :) It scared the shit out of me that I overlooked the obvious ... Am I *that* old already?!
<arievw> But, with new courage I go on!
<arievw> afk
<Regenaxer> Oh! No worries! : en
<Regenaxer> ;)
<Regenaxer> How old are you btw?
u0_a581 has joined #picolisp
u0_a581 is now known as yunfan[Cr]
yunfan[Cr] has quit [Ping timeout: 264 seconds]
yunfan[Cr] has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
<arievw> @Alex: please check and try this css locally and let me know if it is ok: https://pastebin.com/vm7Gqk8d
<arievw> I am almost 61 :)
<arievw> afk
<Regenaxer> I'm 64 :)
<Regenaxer> is this a replacenment for wiki/lib.css?
<Regenaxer> or wiki/wiki.css?
<Regenaxer> seems wiki.css
<Regenaxer> Looks good, doesn't it? Is it ready to be installed on picolisp.com?
<arievw> Yes, wiki.css. I tried tot test it (also with different resolutions). Because of the mark-up currently used things may look a bit off for now. In the next days I´ll first make that in order.
<arievw> So I think it can be installed safely.
<Regenaxer> cool!
<Regenaxer> Did it, can you try?
<arievw> Yep.
<Regenaxer> if ok, I also release a new TGZ
<arievw> I think I have to make a few adjustments first. Pls wait :)
<Regenaxer> ok, no hurry
<arievw> OK. I adjusted the sizes a bit. It was a bit too large. Could you please use this wiki.css: https://pastebin.com/fA0J3X6c
<Regenaxer> Why did you remov 23jun18avw ?
<Regenaxer> Shall I put it back in?
<Regenaxer> Ah, there is also "edg" - who is that?
<arievw> He! I´ll Have a look
<Regenaxer> :)
<arievw> Baffled! Code seems OK afaict. So, yes, please re-add that line :)
<Regenaxer> So we have two editors today? edg and avw?
<arievw> Also I now use the same browser in both Windows and Linux to make comparison more honest.
<arievw> Ah. That was it! No edg was earlier. I´ll have a look :)
<Regenaxer> I see, it was 26apr18edg
<Regenaxer> I fix it
<Regenaxer> edg is Erik Gustafson
<arievw> Should be: line 1 ¨* 23jun18avw¨ and line 2 ¨26apr18edg¨
<Regenaxer> Installed it
<Regenaxer> yes
<arievw> OK. Thx.
<Regenaxer> fixed already
<Regenaxer> I release a TGZ
<Regenaxer> Released, you could download if you like to cross-check
<Regenaxer> oops, wait
<Regenaxer> ok, done
<arievw> OK. Thx. Next days i´ll rework stuff a bit and people can have a look if everything is fine.
<Regenaxer> Thank you!
<arievw> The stuff Karl-Heinz asked about is a PicoLisp code generation thing. Maybe he can get involved in that part :)
<Regenaxer> Sure!
jibanes has quit [Quit: Changing server]
jibanes has joined #picolisp
yunfan[Cr] has quit [Ping timeout: 268 seconds]
jibanes has quit [Quit: leaving]
jibanes has joined #picolisp
jibanes has quit [Client Quit]
jibanes has joined #picolisp
orivej has joined #picolisp
arievw has quit [Quit: Leaving]
andyjpb has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
andyjpb has quit [Ping timeout: 276 seconds]
alexshendi has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Remote host closed the connection]
pierpal has joined #picolisp
styx has joined #picolisp
pierpa has joined #picolisp
reed has joined #picolisp
<reed> Hi All. I'm trying to understand "use". If I do
<reed> (push 'Result 5) then (de f () (use (Result) (push 'Result 10) (show 'Result)))
<reed> Then execute (f)
<reed> I get "Result (10 5)"
<reed> How can I prevent the code in 'f' from being "contaminated" by the fact that Result was used outside of 'f'
jibanes has quit [Ping timeout: 268 seconds]
jibanes has joined #picolisp
reed has quit [Ping timeout: 260 seconds]
styx has quit [Quit: styx]
pierpal has quit [Ping timeout: 265 seconds]