beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
wineroots has quit [*.net *.split]
viaken has quit [*.net *.split]
tankf33der has quit [*.net *.split]
tankf33der has joined #picolisp
viaken has joined #picolisp
alexshe75 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
peterhil has quit [Ping timeout: 256 seconds]
alexshendi has joined #picolisp
alexshe75 has quit [Read error: Connection reset by peer]
alexshe75 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshe75 has quit [Ping timeout: 252 seconds]
alexshe46 has joined #picolisp
alexshendi has quit [Remote host closed the connection]
alexshendi has joined #picolisp
alexshe46 has quit [Read error: Connection reset by peer]
alexshe37 has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
hunar has joined #picolisp
<hunar> Good morning :)
<Regenaxer> Good morning hunar! :)
<aw-> hunar Regenaxer hi
<aw-> hunar: you can also obtain picolisp from https://github.com/picolisp/pil21
<Regenaxer> Hi aw-! :)
<aw-> one of our community members maintains a script that pushes all of Regenaxer's changes there, i think it runs hourly or something
<Regenaxer> yes, Mansur's setup
<Regenaxer> the first one
<hunar> Thanks aw-, I initially found a lot of repositories all with different usernames so I didn't know what is fork or up to date
<Regenaxer> The other mentioned yesterday is tankf33der`s
<aw-> maybe not hourly, daily i think
<hunar> Great :)
<aw-> hunar: in that case just pull it from picolisp.com - that's always the latest and most up-to-date anyways
<Regenaxer> not picolisp.com but software-lab.de
<aw-> err yes, sorry
<hunar> I will :D
<Regenaxer> :)
<hunar> I have a question :) Is there a built in function for converting float to integer? I made this now which works like i want (de floor (X)
<hunar> (/ X (** 10 *Scl)))
<Regenaxer> There is no dynamic way I think
<Regenaxer> only static via read-macros
<Regenaxer> '(** 10 *Scl) == 1.0
<Regenaxer> `(** 10 *Scl) == 1.0
<hunar> Oh, no problem then just wanted to make sure :D
<Regenaxer> But you are right, it is actually missing
<Regenaxer> Anyway it always boils down to the aaove exponentiation
<Regenaxer> I think I never change *Scl within an application
<Regenaxer> so the problem never arose
<Regenaxer> At least not within a source file
<Regenaxer> So setting *Scl at the top of a file usually suffices
<hunar> I also usually set *Scl once, but loading lib/math.l changes it to 6
<Regenaxer> Should not
<hunar> Ah, it doesn't if i defined it :)
<Regenaxer> yes
<Regenaxer> (and (=0 *Scl) (scl 6))
<hunar> No worries then :D
<hunar> why '(** 10 *Scl) doesn't work inside a function :/
<hunar> : (scl 3)
<hunar> -> 3
<hunar> : (de floor (X) (/ X '(** 10 *Scl)))
<hunar> -> floor
<hunar> : (floor 3.123)
<hunar> !? (/ X '(** 10 *Scl))
<hunar> (** 10 *Scl) -- Number expected
<Regenaxer> I mistyped, must be backquote
<Regenaxer> read macro
<hunar> Ah right
<hunar> I should have noticed :)
<Regenaxer> (de floor (X) (/ X 1.0)) is the same
<hunar> You're right :/ I'll write yours
alexshe37 has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
alexshe93 has joined #picolisp
alexshendi has quit [Ping timeout: 240 seconds]
<hunar> (setq R (mapcar zero (need 10))) how can I increment an element, I hoped this would work (inc (get R 3))
<Regenaxer> (mapcar zero (need 10)) is not good, it creates 'need' for nothing
<Regenaxer> Better (need 10 0)
<Regenaxer> or (make (do 10 (link 0)))
<Regenaxer> To increment a list destuctively
<Regenaxer> (map inc (need 10 0))
<Regenaxer> : (let L (need 10 0) (map inc L) L)
<Regenaxer> -> (1 1 1 1 1 1 1 1 1 1)
<Regenaxer> 'inc' takes a 'var'
<Regenaxer> (inc (cddr L)) increments the 3rd cell
<Regenaxer> : (inc (cddr L))
<Regenaxer> : L
<Regenaxer> -> 2
<Regenaxer> -> (1 1 2 1 1 1 1 1 1 1)
<hunar> (need 10 0) is great :D I didn't know it takes another argument
<Regenaxer> : (cddr L)
<Regenaxer> -> (2 1 1 1 1 1 1 1)
<Regenaxer> : (inc @)
<Regenaxer> -> 3
<Regenaxer> $: (cddr L)
<Regenaxer> -> (3 1 1 1 1 1 1 1)
<Regenaxer> : L
<Regenaxer> -> (1 1 3 1 1 1 1 1 1 1)
<Regenaxer> I think I need to explain the concept of 'var' again in next PilCon
<Regenaxer> : (doc 'need)
<Regenaxer> (need 'cnt ['lst ['any]]) -> lst
<Regenaxer> (need 'cnt ['num|sym]) -> lst
<Regenaxer> :)
<hunar> I cant use (cddr L) because I need to do some index math ... I made a custom rand and i want to test how much it produces each number, I loop a number of times and each iteration increment what R at (rand 1 10)
<Regenaxer> then nth instead of cXr
<Regenaxer> (inc (nth L 999))
<hunar> Oh, then I also want to see the explanation of var :D nth returns var but get doesnt :/
<Regenaxer> You can use 'accu for such counting
<Regenaxer> get returns the value, not the cell
<Regenaxer> a var is a cell or a symbol
<Regenaxer> (inc 'A)
<Regenaxer> (inc (0))
<hunar> Hmm, now i get it :D thanks .. I'll checkout 'accu
<Regenaxer> : (setq L (1 (2 3) 4))
<Regenaxer> -> (1 (2 3) 4)
<Regenaxer> -> 3
<Regenaxer> : L
<Regenaxer> : (inc (get L 2))
<Regenaxer> -> (1 (3 3) 4)
<Regenaxer> : (off S)
<Regenaxer> -> NIL
<Regenaxer> : (do 999 (accu 'S (rand 1 9) 1))
<Regenaxer> -> 110
<Regenaxer> : S
<Regenaxer> -> ((7 . 106) (6 . 102) (4 . 103) (3 . 103) (9 . 123) (1 . 110) (5 . 126) (8 . 106) (2 . 120))
<hunar> Thanks for the example :D
<Regenaxer> :)
razzy has joined #picolisp
aw- has quit [Quit: Leaving.]
hunar32 has joined #picolisp
hunar has quit [Ping timeout: 256 seconds]
alexshe93 has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
hunar has joined #picolisp
hunar32 has quit [Ping timeout: 256 seconds]
aw- has joined #picolisp
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
hunar has quit [Ping timeout: 256 seconds]
hunar has joined #picolisp
razzy has quit [Quit: leaving]
razzy has joined #picolisp
peterhil has joined #picolisp
hunar has quit [Ping timeout: 256 seconds]
hunar has joined #picolisp
alexshendi has quit [Quit: -a- Connection Timed Out]
alexshendi has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
hunar has quit [Ping timeout: 256 seconds]
razzy has joined #picolisp
alexshe27 has joined #picolisp
alexshendi has quit [Ping timeout: 240 seconds]
alexshe27 has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
razzy has quit [Ping timeout: 245 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
aw- has quit [Ping timeout: 250 seconds]
razzy has quit [Ping timeout: 250 seconds]
beneroth has joined #picolisp
beneroth has quit [Quit: Leaving]
razzy has joined #picolisp
peterhil has quit [Ping timeout: 256 seconds]
aw- has joined #picolisp