rob_w changed the topic of #picolisp to: PicoLisp language | Channel Log: | Check also for more information || Attention due to latest spam floods this channel will only allow registered users to send messages - check
<razzy> hi, i tested comprimation on rosettacode. and it seems not functional for picolisp. it is not loosless compression. if i find mistake, should i fix it on rosetacode?
<razzy> *it seems not working for picolisp
<razzy> or i have wrong set of characters :]
bs29 has joined #picolisp
bs29 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
erkin has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
Michail11 has joined #picolisp
Michail11 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
EvilRoey2 has joined #picolisp
EvilRoey2 has quit [Remote host closed the connection]
ATDT911 has joined #picolisp
ATDT911 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
m_mans has quit [Quit: ZNC -]
zv has joined #picolisp
zv is now known as Guest11080
Guest11080 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
gareth__25 has joined #picolisp
gareth__25 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
dimi34ka has joined #picolisp
dimi34ka has quit [Ping timeout: 240 seconds]
mar77i_ has joined #picolisp
mar77i_ has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Regenaxer> razzy: ";" is *not* a comment character in PicoLisp!
Yoda4 has joined #picolisp
Yoda4 has quit [Ping timeout: 244 seconds]
Tionis has joined #picolisp
Tionis has quit [Remote host closed the connection]
<Regenaxer> razzy: and yes, wrong charset might be a problem. PicoLisp can read/print only UTF-8. Use eg. (in '("/usr/bin/iconv" "-f" "WINDOWS-1252" "enwiki8-bankrupt" (till))) or whatever codecs you have on input
<Regenaxer> Current locale is best set to UTF-8
Lildirt has joined #picolisp
Lildirt has quit [Ping timeout: 268 seconds]
<aw-> Regenaxer: hi
<Regenaxer> Hi aw-
<aw-> Regenaxer: have you fixed the issue with typing 字 in pil ?
<Regenaxer> No
<Regenaxer> I found no way to determine the print length
<Regenaxer> gave up :)
<aw-> no reliable way, right
<aw-> i wonder how the bash shell does it
<Regenaxer> I don't know how others do it, eg Termux
<Regenaxer> yeah
<aw-> that would probably be the best road to a solution
<Regenaxer> Also, fixing the line editor in all relevant places is not so simple
<Regenaxer> I would need to dig into it again
<aw-> right..
<Regenaxer> So I thought it is not worth the effort :/
m_mans has joined #picolisp
m_mans has quit [Client Quit]
<aw-> i can't say I have a need for it either.. just "it would be cool" that's all
<Regenaxer> exactly
<Regenaxer> Feels wrong not to have it
<Regenaxer> Even more in Vip
<Regenaxer> same problem
<aw-> yeah
alexshendi has joined #picolisp
<razzy> Regenaxer: it is in UTF-8
<Regenaxer> OK, good. Just to be sure
<Regenaxer> So what goes wrong?
<razzy> or utf-16,.. i will check
<Regenaxer> I mean as you said, it doesn't work. *How* does it not work?
<Regenaxer> If it were wrong charsets, you would see garbage text I think
<razzy> it is utf8 and i do think that in comprimmation charset should not matter
<Regenaxer> yes, but the reading may choke
<Regenaxer> but usually just reads garbage
pierpal has quit [Quit: Poof]
<Regenaxer> So how do you know it does not work?
pierpal has joined #picolisp
<razzy> Regenaxer: the diference between original and decomprimmated is several characters ("’" "’" "“" "”" "—" "’" "’" "—" "—")
<Regenaxer> It seems that lzwCompress was written by me, so I'm sure it works
<razzy> length of decomprimated is slightly more
<Regenaxer> The example (lzwCompress (chop "TOBEORNOTTOBEORTOBEORNOT")) works
<Regenaxer> You can't use 'diff' here, right? 'diff' is for lists
<Regenaxer> : (pack (lzwDecompress @))
<razzy> Regenaxer: i compare lists
<Regenaxer> returns a symbol
<Regenaxer> (diff original decomp))
<razzy> Regenaxer: example should work
<Regenaxer> decomp must be a symbol
<Regenaxer> I cannot test your case as I don't have the data
<razzy> Regenaxer: i can give you :]
alexshendi has quit [Read error: Connection reset by peer]
<razzy> Regenaxer:
<Regenaxer> Still, (diff original decomp) can't work
<Regenaxer> right?
<Regenaxer> original is a list, decomp a symbol
<razzy> Regenaxer: why? both are lists of chars
<Regenaxer> no
<razzy> decomp is also a list
<Regenaxer> (setq decomp (lzwDecompress comp))
<Regenaxer> lzwDecompress returns a string (symbol)
<Regenaxer> ah!
<Regenaxer> Sorry!
<Regenaxer> :)
<Regenaxer> you are right
<Regenaxer> ok, I check
<razzy> example works fine
hammer06513 has joined #picolisp
hammer06513 has quit [K-Lined]
<Regenaxer> I get different lengths
<razzy> should i let the fix on you?
<razzy> since you write it?
<Regenaxer> I think it is the charset
<Regenaxer> : (diff original decomp)
<Regenaxer> -> ("’" "’" "“" "”" "—" "’" "’" "—" "—")
<Regenaxer> : (mapcar char @)
<Regenaxer> -> (8217 8217 8220 8221 8212 8217 8217 8212 8212)
<razzy> i test different ones
<Regenaxer> I try with iconv
<Regenaxer> first convert to UTF-8
<razzy> it is utf-8, at least it says
<razzy> decompress add more characters
<razzy> i would look for mistake there
<Regenaxer> But the different chars are all in the high range
<Regenaxer> see: (let (Codes 255 ...
<Regenaxer> It supports only ASCII
<Regenaxer> and iso8859
<Regenaxer> but not above
<Regenaxer> Was not part of the task it seems
<razzy> ascii is less than utf-
<razzy> 8
<Regenaxer> I don't remember, many years ago
<razzy> ok
<Regenaxer> ASCII is up to 127
<Regenaxer> iso8859 till 255
<Regenaxer> It is just a rosetta task
<razzy> sure,.. how to fix :]
<Regenaxer> Why should we?
<razzy> not rosetta,.. my code :D
<razzy> utf8 compliant
<Regenaxer> ah, you want to use it! I thought just as an exercise ;)
<razzy> it is excecise,.. but i want test on other people datasets :]
<Regenaxer> (let (Codes 65535 ...
<razzy> and compare results
<razzy> i thought so :] thank you.
<Regenaxer> not sure, not tested :)
<Regenaxer> I did not look at the algo now
<razzy> i will test :]
<Regenaxer> ok
<Regenaxer> And change the comments to "#"
<razzy> what ; do?
<Regenaxer> I wrote above: ";" is not a comment char
<Regenaxer> it is in fact a function
<razzy> ; worked fine seems
<Regenaxer> (doc ';)
<Regenaxer> yes, because it is all symbols
<razzy> aaaaah,.. doc i looked for
<Regenaxer> evaluated gives NIL
<Regenaxer> not printed, so no harm here actually
<Regenaxer> OK, I ran it too:
<Regenaxer> $ pil razzy +
<Regenaxer> "length comprim:" 34600
<Regenaxer> "length original:" 140409
<Regenaxer> "difference" NIL
<Regenaxer> "length decomprim:" 140409
<razzy> but when i comment(;;) some parenthesess,.. it will break up
<razzy> :D
<razzy> right?
<Regenaxer> (;) is a function call, yes
<Regenaxer> (;;) should be undefined
<razzy> i mean ;; (some strange comment)
<Regenaxer> ah, yes
<razzy> thx
<Regenaxer> welcome! :)
<Regenaxer> You are making fast progress
<Regenaxer> indeed, there was ;; "difference" ("’" "
<Regenaxer> I think it will hang
<Regenaxer> "string" is evaluating to itself, so it never finds a function
<Regenaxer> !? ("’") "’" -- Undefined
<razzy> you mean my comments mess up my lists?
<Regenaxer> no, only gives the above error
<razzy> uff
<Regenaxer> tried it now, gives an error before that
<Regenaxer> "length decomprim:" 140425
<Regenaxer> [razzy-:48] pi@raspberrypi: -- Bad symbol namespace
<Regenaxer> ?
<Regenaxer> It is the tilde ~
<Regenaxer> The reader thinks it is a namespace modifier
<Regenaxer> namespace specification I mean
<razzy> :D it is alright now,.. using #
<Regenaxer> ok :)
<razzy> how could picolisp use 2 cores?
<razzy> it uses automagically?
<Regenaxer> Applications normally start many processes
<Regenaxer> But one process uses only 1 core
<razzy> sure, co if my code is expandable to several processes, it will do?
<Regenaxer> For PilOS however I had planned to distribute individual instructions to separate cores
<Regenaxer> yes
<razzy> awesome :D
<Regenaxer> GUI/DB applications spawn processes automatically
<Regenaxer> otherwise you can call 'later'
<razzy> not sure how am i using 2 processes now, what changes i done
<razzy> but it is burning :D
<Regenaxer> called (fork) ?
<razzy> nope
<Regenaxer> oh, burning?
<razzy> my CPUs
<Regenaxer> I think it is a single process, but the OS is quickly putting it here or there
<Regenaxer> each timeslice on another core by chance
<razzy> 2 different pids
<Regenaxer> oh, I see
<Regenaxer> What did you start?
<razzy> maybe you are right
<razzy> i will test it :D
<Regenaxer> What I wrote above "planned to distribute individual instructions" was wrong
<razzy> it shares memory, runs 2 pids
<Regenaxer> What I wanted was distribute complex functions
<Regenaxer> eg garbage collection
<razzy> i thought so
<Regenaxer> :)
<razzy> i would distribute depending on function tree (AST it is called)
<razzy> i think
<razzy> every branch on separate core
<Regenaxer> There is no AST on this level
<Regenaxer> no, because the bottleneck is on memory bandwith
<Regenaxer> so only certain things make sense
<Regenaxer> eg coroutine switching
<Regenaxer> operating on different stack segments
<razzy> Regenaxer: you would need to have representation of hardware to plan execution
<Regenaxer> What kind of representation?
<razzy> tree representation :]
<Regenaxer> hmm, there is no tree
<razzy> you than match hardware representaion to software representation
<razzy> and you are done :]
<Regenaxer> not even really syntax, just asm istructions
<Regenaxer> ok, so you do it ;)
<razzy> i will, some day
<Regenaxer> cool!
<razzy> oh my CPUs are burning :D i love it
<Regenaxer> :)
<razzy> 80C
<Regenaxer> uh
<razzy> now it works fine on utf8
<Regenaxer> good
<razzy> but not sure how to repeat 2 processes fluke
<Regenaxer> Some process remained from before perhaps
werkin has joined #picolisp
orivej has joined #picolisp
razzy has quit [Read error: Connection reset by peer]
razzy has joined #picolisp
werkin has quit [Quit: Leaving]
werkin has joined #picolisp
<razzy> how do i fork the streams of data
<razzy> stream of characters
<razzy> nevermind
<Regenaxer> ret
<Regenaxer> ok
orivej has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
<razzy> now i have problem :]
<Regenaxer> What is the problem if you do it number by number
<razzy> like read number by number?
<Regenaxer> remove the 'make's, and replace the 'link's by 'printsp' or 'println'
<Regenaxer> yes
<Regenaxer> stream of numbers, not a huge list
<Regenaxer> even better is to write in binary
<Regenaxer> 'pr' to print
<Regenaxer> and 'rd' to read
<razzy> i like binary but,... i just want this example to work
<razzy> not rewrite your functions
<Regenaxer> ok, but building a list without needing it is costly
<Regenaxer> btw, (till NIL) is just (till)
<Regenaxer> also, println is better than print, to have a final newline
<Regenaxer> At least vi complains otherwise ;)
<Regenaxer> Then, to read the whole list:
<Regenaxer> (in "enwiki8-bankrupt.lzw" (read))
<Regenaxer> or (rd) if you used (pr (lzwCompress ...
<razzy> aaaah awesomr
<razzy> ah, digging to bare metal :D
<razzy> step by step :}
<razzy> bit by bit
<Regenaxer> :)
wizonesolutions2 has joined #picolisp
wizonesolutions2 has quit [Remote host closed the connection]
<razzy> Regenaxer: i do not want to read whole list. i want to read string of numbers '23056 93021 3256' as list (23056 93021 3256)
<razzy> more precise stream of cells
<Regenaxer> I would say just stream of numbers
<Regenaxer> (out "x" (for N 9 (println N)))
<Regenaxer> (in "x" (while (read) (println @]
<Regenaxer> (out "x" (for N 9 (pr N)))
<Regenaxer> (in "x" (while (rd) (println @]
<Regenaxer> so remove 'make' and print instead of linking to the list
<razzy> when i use (lzwDecompress (in "enwiki8-bankrupt.lzw" (till NIL))) it takes this 6 88689 97086 76260 92165 93011) into this " "8" "8" "6" "8" "9" " " "9" "7" "0" "8" "6" " " "7" "6" "2" "6" "0" " " "9" "2" "1" "6" "5" " " "9" "3" "0" "1" "1" ")")
<razzy> is it possible to read it as cells?
<Regenaxer> Why cells? Just numbers
<Regenaxer> Forget the lists
<razzy> i do not want to forget lists
<Regenaxer> It is only for a simple rosetta task
<Regenaxer> Such large lists are overkill
<Regenaxer> ok, let me show you
<razzy> i want to store whole list as datastructure on disk
<razzy> because i like lists
<Regenaxer> Yes, but only the numbers, why the list?
<Regenaxer> hmm
<Regenaxer> So why do you (lzwDecompress (in "enwiki8-bankrupt.lzw" (till))) ?
<Regenaxer> till returns a list of chars
<Regenaxer> What did you write into the file?
<Regenaxer> a list?
<Regenaxer> then a single (read)
<Regenaxer> if separate numbers, then
<Regenaxer> (make (while (read) (link @)))
<Regenaxer> (in File (make (while (read) (link @))))
<Regenaxer> or whatever
<razzy> i do want list, but i want streamed list
<razzy> i try read :]
<Regenaxer> the file has "(" "1" ... "9" ")" ?
<Regenaxer> then
<Regenaxer> (in File (char) (until (= ")" (skip) (println (read]
<Regenaxer> But it is stupid to do your own parsing
orivej has joined #picolisp
<Regenaxer> Then better *not* write the "(" and ")" right?
<Regenaxer> they are useless
<Regenaxer> So there is no thing as a "streamed list"
<Regenaxer> s-exprs are always handled as a unit
<razzy> you could go cell by cell and it makes a stream
<razzy> all data should be handled as streams
<Regenaxer> There is no
<Regenaxer> cell in files
<razzy> there should be
<Regenaxer> How?
<razzy> :0
<razzy> :)
<Regenaxer> What do you mean?
<Regenaxer> Write short lists to the file?
<Regenaxer> (1) (2) (3) ...
<Regenaxer> *What* do you want to achieve?
<razzy> righ now testing, i will make better answers later
betawaffle8 has joined #picolisp
betawaffle8 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Regenaxer> works
orivej has quit [Ping timeout: 256 seconds]
<Regenaxer> For efficiency use 'pr' and 'rd' but then the file is not plain ASCII
Logan11 has joined #picolisp
Logan11 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
freemint has joined #picolisp
<freemint> Regenaxer i had lots of time to think yesterday and i want bounce some ideas of you.
<Regenaxer> aha
orivej has joined #picolisp
<freemint> 1. PicoLisp is great for building stuff on top of it. But it offers too little to build downwards and extend it. It would be interesting/nice if you could dynamicly build pilassmebly and execute and store it.
<Regenaxer> You can
<Regenaxer> write to a file, and pipe to the assebler
<Regenaxer> then call the .so lib
<freemint> You can but that could be supported / in a library which is sipped with pil
<Regenaxer> Too seldom needed for a standard lib
<Regenaxer> I think it is almost trivial
<Regenaxer> 3 lines?
<freemint> Oh?
<freemint> (well that settles that)
<Regenaxer> You could try and tell us the results
<Regenaxer> a simple example perhaps
<freemint> 2. There a great examples on how to work with a database (family), but there is little documentation (i think) how to build a database, that would be trivial too.
<Regenaxer> Yes
<freemint> But it is the reason why i have not managed to build anything interesting yet.
<Regenaxer> in fact, doc/app.html was planned to describe more
<Regenaxer> the whole app/*.l demo
<Regenaxer> This is a vast field do document completely
<Regenaxer> I use various strategies and patterns in applications
<freemint> I think i lack/need less than you think.
<Regenaxer> perhaps, but there is not a single way to describe
<Regenaxer> The best are still simply examples for all those use cases
<freemint> @1. how do i run the assembler on a file of pilassmebly ?
<Regenaxer> For example, a simple script:
<Regenaxer> I have several of such scripts
<Regenaxer> So basically a 'build' call
<Regenaxer> The rest is just loading and setting vars
<Regenaxer> So without vars it is a one-liner
<freemint> i never saw build anywhere
<freemint> I thought i would have to write my own build
<Regenaxer> it is the machinery of src64/lib/asm.l
<Regenaxer> Not seen normally
<freemint> @2. It would be really helpful to see the script you used to populate the family db
<freemint> i could not find it anywhere
<Regenaxer> I don't remember, normally an "init.l"
<Regenaxer> let me check
<Regenaxer> I don't have it
<Regenaxer> I always either have an "init.l" with (obj ..) (commit)
<Regenaxer> or a CSV
<freemint> i never saw anything on how to populate a database, which is why i never got it to work
<Regenaxer> The wiki.tgz has a good, typical example
<freemint> What is the "Map" in build?
<Regenaxer> ah, and the app/ demo too!
<Regenaxer> init.l
<freemint> ohhh,
<freemint> got to go
<freemint> afp
<Regenaxer> map has source info
<freemint> lets talk later
<Regenaxer> for editors
<Regenaxer> ok, I'm off today
<Regenaxer> friend's birthday party
werkin has quit [Quit: Leaving]
orivej has quit [Remote host closed the connection]
orivej has joined #picolisp
<Regenaxer> afp
<razzy> Regenaxer: how old are you?
grp has joined #picolisp
hexa-19 has joined #picolisp
hexa-19 has quit [Read error: Connection reset by peer]
alekz10 has joined #picolisp
alekz10 has quit [Read error: Connection reset by peer]
SuchWow10 has joined #picolisp
SuchWow10 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
erkin has joined #picolisp
Zooklubba20 has joined #picolisp
Zooklubba20 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
mario-goulart has quit [Remote host closed the connection]
mario-go` has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Client Quit]
pierpal has joined #picolisp
alexshendi has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
<razzy> anyone heard of open genera?
alexshendi has quit [Ping timeout: 260 seconds]
razzy has left #picolisp ["ERC (IRC client for Emacs 25.1.1)"]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpa has joined #picolisp
orivej has joined #picolisp
trqx18 has joined #picolisp
trqx18 has quit [K-Lined]
Guest15579 has joined #picolisp
Guest15579 has quit [Remote host closed the connection]
alexshendi has joined #picolisp
grp has quit [Quit: box shutting down...]
Fusl21 has joined #picolisp
Fusl21 has quit [Remote host closed the connection]
aw- has quit [Ping timeout: 260 seconds]
Strog2 has joined #picolisp
Strog2 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
mario-go` has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
mario-goulart has joined #picolisp
<freemint> razzy no, what's that?
<freemint> Where that escalated ...
<freemint> *Wheew that escalated
holodoc17 has joined #picolisp
holodoc17 has quit [Read error: Connection reset by peer]
grit2 has joined #picolisp
grit2 has quit [Killed (Sigyn (Spam is off topic on freenode.))]