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: 260 seconds]
aw- has quit [Quit: Leaving.]
rob_w has joined #picolisp
mtsd has joined #picolisp
aw- has joined #picolisp
<aw-> Regenaxer: hi
<aw-> can you tell me if this is OK:
<Regenaxer> Hi aw-
<aw-> takes a list of 8-bit integers and converts it an unsigned int
<Regenaxer> yes
<Regenaxer> The result is correct
<Regenaxer> but it seems much too complicated
<Regenaxer> and overhead
<aw-> that's why I showed you ;)
<aw-> what am I doing wrong?
<Regenaxer> taking the length always smells wrong ;)
<Regenaxer> a simple while loop
<Regenaxer> or for
<Regenaxer> Let me think
<Regenaxer> http://ix.io/2DwS
<Regenaxer> 'length' and 'get' are extreme overhead
<Regenaxer> traversing the list many times
<Regenaxer> We are back at the array discussion from last PilCon :)
<Regenaxer> Building a temporary list (garbage) too
mtsd has quit [Quit: Leaving]
<aw-> wow that looks much simpler
<Regenaxer> :)
<Regenaxer> Is the list length arbitrary?
<aw-> yes
<Regenaxer> or fixed "normal" length?
<Regenaxer> 2, 4, 8? or also 7?
<aw-> 3,5,7 ...
<aw-> anything
<Regenaxer> ok
<aw-> i dont understand how your version is so simple
<Regenaxer> also more than 8?
<aw-> you're shifting N to the left by -8
<aw-> on every iteration
<Regenaxer> right
<aw-> wheres i am doing shifts of -24, 16, -8 etc...
<Regenaxer> yes, big-endian
<Regenaxer> both ways
<aw-> ohhh i see
<Regenaxer> I suspect you can even omit the list
<aw-> it's using the result for the next shift
<Regenaxer> use 'byte' directly
<aw-> so (>> -8 0) then (>> -8 255) ...
<aw-> brilliant
<Regenaxer> (let N 0 (do Size (setq N (| (byte P) ... (inc 'P)))))
<Regenaxer> no need to build a list first
<Regenaxer> (I assume you read the bytes from a buffer in memory)
<aw-> right
<aw-> no the bytes are a list
<Regenaxer> ok
<aw-> could be generated
<aw-> i can't make assumptions about it
<Regenaxer> I thought you read from mem from our prev discussions
<Regenaxer> ok
<aw-> yes previously
<Regenaxer> good
<aw-> thanks! this is so great
<Regenaxer> welcome :)
<aw-> i need to learn more of such Picolisp techniques
<Regenaxer> it is a bit different from C thinking
<Regenaxer> I do it unconciously
<Regenaxer> used to live in both worlds :)
<Regenaxer> We should discuss such things in PilCon perhaps
<Regenaxer> not sure how to explain though
mtsd has joined #picolisp
<aw-> picolisp idioms
<aw-> the "right" way to code
<aw-> or perhaps, the "better" way to code
<aw-> better/simpler/easier
<Regenaxer> yeah
<Regenaxer> the shorter the better usually
orivej has joined #picolisp
rob_w has quit [Ping timeout: 260 seconds]
rob_w has joined #picolisp
Blukunfando has quit [Ping timeout: 256 seconds]
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
Blukunfando has joined #picolisp
_whitelogger has joined #picolisp
rob_w has quit [Remote host closed the connection]
5EXAA5O9E has joined #picolisp
7GHACG3JD has joined #picolisp
wineroots has quit [Ping timeout: 256 seconds]
5EXAA5O9E has quit [Remote host closed the connection]
7GHACG3JD has quit [Remote host closed the connection]
rob_w has joined #picolisp
aw- has quit [Quit: Leaving.]
mtsd has quit [Quit: Leaving]
<tankf33der> Regenaxer: whats wrong with tutorial ?
<tankf33der> it was much longer.
<Regenaxer> yeah, sorry
<Regenaxer> But it referred to a lot of simple examples which then need to be in the distributoon all the time
<Regenaxer> doc/shape.l doc/family doc/hello et
<Regenaxer> c
<Regenaxer> I think we should not clobber the distro with such simple examples
<tankf33der> ok
<Regenaxer> Should go into the Wiki perhaps
<Regenaxer> We should perhap import the old tut into the wiki
<Regenaxer> Then anyone can improve it
rob_w has quit [Quit: Leaving]
<Regenaxer> Oh, indeed, Apple is soo restrictive!!
<Regenaxer> No chance for PilBox
jibanes has quit [Ping timeout: 256 seconds]
jibanes has joined #picolisp
<beneroth> Regenaxer, I like to see who makes the case for "users of an iOS-device" to be "owning" that device
<beneroth> maybe this can be turned on its heat and make Apple liable for everything going on on a such device?
<beneroth> (if not, well then there should be no good basis for Apples rules - and their rules should be forbidden by monopoly law)
<Regenaxer> I let my fingers off Apple ;)
<beneroth> it's mafia racketeering
_whitelogger has joined #picolisp