ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
beneroth_ has joined #picolisp
beneroth has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 264 seconds]
razzy has joined #picolisp
orivej has joined #picolisp
<tankf33der> morning
<tankf33der> i wanna test if all functions from glob.l have any usage in pil21-test codebase.
<tankf33der> i will find orphans.
<Regenaxer> I think some functions are difficult to test
<Regenaxer> good morning btw :)
<tankf33der> Regenaxer: which one ?
<Regenaxer> Everything with user interaction
<Regenaxer> E.g. the readline() behavior
<Regenaxer> or 'ctty'
<Regenaxer> Or breakpoints
<Regenaxer> '!'
<tankf33der> i am only about glob.l functions.
<Regenaxer> yes
<tankf33der> seed, diff, rank and so on.
<Regenaxer> 'ctty' and '!' are there
<tankf33der> its ok, will be false alarms.
<Regenaxer> ah, ok, these are possible
razzy has quit [Quit: Connection closed]
rob_w has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
<aw-> hi
<Regenaxer> Cheers aw-
<aw-> is this acceptable to generate a "good" random string: (lowc (hex (rand (** 2 37) (** 2 38))))
<aw-> after (seed (in '/dev/urandom ...
<Regenaxer> Looks good, depends what is needed
<Regenaxer> yes
<Regenaxer> For websites, I use http://ix.io/2wUZ
<aw-> just to generate a random user id
<aw-> it's not for passwords or anything "secure"
<Regenaxer> yes, hex digits
<Regenaxer> ok
<aw-> oh haha, password generator with complexity requirements
<aw-> thanks
<Regenaxer> not needed here
<aw-> yeah i like hex because there's no confusion between 1,l,I,0,O ..
<Regenaxer> each site has its own crazy requirements
<Regenaxer> T
<aw-> depends on the font, some fonts really make it hard to tell them apart
<Regenaxer> and hex is simple to generate
<aw-> yes
<aw-> anything new i should test in pil21?
<Regenaxer> (** 2 37) etc are constants, so you can use a read macro
<Regenaxer> I think nothing atm
<Regenaxer> Was busy with PilBox
<aw-> oh yeah, i'm using constants, i just put (** 2 37) so it was clear _what_ those constants are ;)
<aw-> or, what those integers are
<Regenaxer> perfect
<aw-> (lowc (hex (rand 137438953472 274877906944)))
<aw-> i'm not sure how good is the distribution, all values start with 2 or 3 but it's quite random after that ;)
<Regenaxer> you could achieve more general first chars
<Regenaxer> (rand `(hex "1...") `(hex "F..."))
<aw-> hmmm... oh yeah that's a good idea actually
<aw-> ok i choose (hex "0fffffffff") to (hex "ffffffffff")
<aw-> perfect
<Regenaxer> :)
<aw-> thanks
<Regenaxer> welcome
<Regenaxer> yeah, but overkill here perhaps ;)
Blukunfando has quit [Read error: Connection reset by peer]
_whitelogger has joined #picolisp
Blukunfando has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Quit: Leaving]
aw- has quit [Quit: Leaving.]
orivej has joined #picolisp
libertas_ is now known as libertas
<Regenaxer> ht:In and ht:Out done
rob_w has quit [Remote host closed the connection]
aw- has joined #picolisp
<aw-> Regenaxer: ht:Read ?
<tankf33der> Regenaxer: passed and included to mainbase.
<Regenaxer> aw-, yes, and In, Out etc
<Regenaxer> tankf33der, thanks!
<Regenaxer> I made a short test for Out and In by writing to a file with pil64, then compared it with Out and checked with In
<Regenaxer> ok so far
<Regenaxer> But no hard core tests so far
<Regenaxer> Will finish src/db.l next
<aw-> great
<Regenaxer> aw-, btw, what was it we discussed last time?
<Regenaxer> When writing ht, it occurred to me that it has exactly what you need
<Regenaxer> you did some rd
<Regenaxer> bytewise
<Regenaxer> then assembled a char
<Regenaxer> What exactly was intended?
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
<Regenaxer> I think t was ht:Read, no?
<beneroth> I thought it was another decoding
<aw-> hmmm no it wasn't ht:Read
<aw-> custom decoding as beneroth said
<beneroth> same principle
<aw-> it was mixed (rd) and ..
<aw-> (char (char ...)
<aw-> 07:27 <aw-> (in Fd (make (link (char) (char) (char)) (rd 1) (link (char) (char) (char))))
<aw-> Regenaxer: the goal was to read utf-8 characters
<Regenaxer> yes, and ht:Read does the same
<Regenaxer> for a given length
<Regenaxer> What is the difference?
<aw-> i don't know.. i only use ht:Read with http.l
<aw-> there's not much documentation on it
<Regenaxer> sadly yes
<Regenaxer> But I feel that ht:Read does exactly what you needed
<Regenaxer> read bytewise, returning chars
<aw-> so it can parse (2 97 98 3 99 100 101) into "ab" "cde" ?
<Regenaxer> no, not from a list
<Regenaxer> from a stream
<Regenaxer> as you did with rd iirc
<aw-> ok.. a stream of bytes?
<aw-> yes same
<aw-> how can i try it?
<Regenaxer> yes, stream is always bytes
<Regenaxer> (ht:Read Count)
<aw-> ok one sec
<aw-> (in (pipe (wr 97 98)) (ht:Read 2))
<aw-> -> ("a" "b")
<Regenaxer> yes, always a list
<aw-> (in (pipe (wr 99 100 26085)) (ht:Read 6))
<aw-> -> NIL
<Regenaxer> T
<aw-> doesnt work for multi-byte chars
<Regenaxer> it does
<Regenaxer> wr does not work this way
<Regenaxer> try a file
<aw-> ok one sec
<Regenaxer> or use 'print' in the pipe
<Regenaxer> (prin "雅子")
<aw-> ok that works but i don't understand why
<aw-> why doesn't (wr) work?
<Regenaxer> it writes only *bytes*
<Regenaxer> prin is the way
<aw-> yes, i am reading bytes
<Regenaxer> 26085 is not a byte :)
<aw-> correct
<aw-> oh oops, sorry you're right
<Regenaxer> ht:Read checks the length
<Regenaxer> it got only 3
<Regenaxer> so NIL is returned
<aw-> yes yes all my tests are using bytes, my mistake with 26085
<aw-> haha
<Regenaxer> So ht:Read is like 'line', but with a counw
<Regenaxer> count
<Regenaxer> returning chars in a list
<Regenaxer> Sorry, I did not think of ht:Read last time
<Regenaxer> ht:Fmt and ht:Pack do analog thins
<Regenaxer> things
<Regenaxer> handling utf8
<Regenaxer> just lik all i/o functions
<Regenaxer> except wr
<aw-> (in (pipe (wr 99 100 230 151 165)) (ht:Read 5))
<aw-> this works
<Regenaxer> cool
<aw-> ok interesting.. maybe I can use ht:Read
<Regenaxer> It is also more efficient, reading the stream directly
<aw-> how does ht:Pack work?
<Regenaxer> It takes a list and packs it
<aw-> (ht:Pack Lst) ?
<Regenaxer> but takes care of some html tags
<Regenaxer> yes
<aw-> i was doing this: (pack (mapcar char (99 100 26085)))
<Regenaxer> &lt; is packed as <
<aw-> oh... yeah i can't accept that
<aw-> i can't "modify" the incoming data in any way
<Regenaxer> yes, also fine, but ht:Pack is for html
<Regenaxer> yeah, ok
<aw-> ok i'll see if I can use ht:Read instead
<aw-> thanks
<Regenaxer> great
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej_ has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> running latest pil21 under gc+
<Regenaxer> good
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
Blukunfando has quit [Remote host closed the connection]
Blukunfando has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp