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
patrixl has joined #picolisp
patrixl has left #picolisp [#picolisp]
patrixl has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
patrixl has quit [Quit: Leaving.]
dexen has quit [Ping timeout: 240 seconds]
<tankf33der> i am stuck
<tankf33der> http://ix.io/2zyP
<Regenaxer> Good morning tankf33der
<tankf33der> morning
<tankf33der> i dont understand math behind these ceil and floor rounds.
<tankf33der> eh
<Regenaxer> (/ N (** 10 *Scl) gives the integer part
<Regenaxer> (rounds down)
<Regenaxer> : (/ 1234 100)
<Regenaxer> -> 12
<Regenaxer> this rounds up:
<Regenaxer> : (/ (+ 1234 99) 100)
<Regenaxer> -> 13
<tankf33der> aaaa
<Regenaxer> `(dec (** 10 *Scl))
<Regenaxer> to round up or down, add 50
<Regenaxer> you can then always multiply with (** 10 *Scl) to scale up if necessary
<tankf33der> why you wrote this "... add 50" then above you never adds except (+ N `(dec (** 10 *Scl)))
<tankf33der> ?
<Regenaxer> 50 if you want to round *up* for >= 1250 and *down* for <= 1249
<tankf33der> ok
<tankf33der> works now. thanks.
<Regenaxer> :)
<tankf33der> http://ix.io/2zyV
<tankf33der> afk.
<Regenaxer> Cool
<Regenaxer> (for L (sort R) (println L)) could be (mapc println R)
<Regenaxer> (mapc println (sort R))
<tankf33der> right.
<tankf33der> committed to git, to rossetacode later.
<Regenaxer> good
mtsd has joined #picolisp
mtsd has quit [Client Quit]
mtsd has joined #picolisp
DKordic has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
mtsd has quit [Quit: Leaving]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
_whitelogger has joined #picolisp
dexen has joined #picolisp
<tankf33der> next
<tankf33der> http://ix.io/2zB8
<tankf33der> this way.
<Regenaxer> Can't you simply use '$dat' ?
<tankf33der> indeed.
<Regenaxer> (- ($dat "2019-9-30" "-") ($dat ...))
<tankf33der> http://ix.io/2zBf
<Regenaxer> Perfect
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
_whitelogger has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Quit: leaving]