rob_w changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information || Attention due to latest spam floods this channel will only allow registered users to send messages - check https://freenode.net/kb/answer/registration
_whitelogger has joined #picolisp
orivej has quit [Ping timeout: 245 seconds]
alexshendi has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
erkin has joined #picolisp
pierpal has quit [Ping timeout: 246 seconds]
ubLIX has joined #picolisp
mtsd has joined #picolisp
<tankf33der> o/
<tankf33der> Regenaxer: here ?
<mtsd> Morning tankf33der
<Regenaxer> Hi tankf33der, mtsd!
<tankf33der> i have a copy note
<mtsd> Hi Regenaxer
<tankf33der> cant make it live
<tankf33der> do you have full code somewhere ? :/
<Regenaxer> I use it in this form inline in several places
<Regenaxer> also in rosetta
<Regenaxer> eg "Find the missing permutation"
<tankf33der> ok. super.
<Regenaxer> or "Sorting algorithms/Permutation sort"
<Regenaxer> This permutation pattern cannot be abstracted well into a function (I believe)
<Regenaxer> In the distro it is in "misc/fannkuch.l" BTW
<tankf33der> works now. thanks.
<Regenaxer> Perfect
<Regenaxer> It is really a funny piece of code. I have to re-think each time how it works ;)
pierpal has joined #picolisp
<tankf33der> T.
beneroth has joined #picolisp
<beneroth> hi all
<Regenaxer> Hi beneroth
<mtsd> Hi beneroth
ubLIX has quit [Quit: ubLIX]
freemint has joined #picolisp
<freemint> good morning
<Regenaxer> Hi freemint
<mtsd> Hello freemint
<freemint> Do you have any experience with importing a developer board in to germany from USA or INDIA?
<Nistur> mornin'
<mtsd> Morning Nistur
<Regenaxer> Hi Nistur
<Nistur> o/
<Nistur> artists make me cry...
razzy has joined #picolisp
<beneroth> freemint, probably no problem. but expect customs taxes (zoll gebühren)
<beneroth> Nistur, bad art? good art? or just the utter lack of understanding for what's technological feasible? :D
<Nistur> more the latter
<beneroth> nice software architecture illustration: https://xkcd.com/2044/
<Nistur> beneroth: I'm trying to remove superfluous data from this project, as it's currently 2.5GB and has almost zero content... and as I'm doing this (and the rest of the team KNOWS what I'm doing) one of them adds a 1.7GB bundle of textures... of dirt and grass.
<beneroth> ahaha
<beneroth> good call. games use up waaaay to much storage space
<beneroth> look at Zelda 1 for how to do it correctly (they re-used textures and whole dungeon layouts with e.g. turning and mirroring all over the game)
<beneroth> that's the reason why the hills have eyes in mario, the hills are the same sprite as the clouds
<Nistur> yup
<beneroth> I'm crying about my IT contact from a webinterface I should built a client for.
<beneroth> I'm asking about protocoll (xml soap) details, how files should be send... and he writes me I must just put the filepath in the xml and then the file is automatically taken care of. WTF?
* beneroth goes into a corner and cries
<beneroth> Nistur, we should get drinks at the dark melancholic bar
<Nistur> sounds good.
<freemint> beneroth the board probably lacks CE. do you have Amy experience with that?
<freemint> beneroth `(when (you are developing a web server) (put link to file as url) (make file available as url under this url))
<beneroth> freemint, its about a local windows path. his client library does automatically pick it up and put it into the necessary format to upload it, but my client doesn't do that...
<beneroth> and my question was about the format/structure of the final request going to the server - the guy didn't understood that.
<freemint> i see
<freemint> mhh i had the wrong idea how your program works
<beneroth> no worries, you could have been right.
<beneroth> (thought that would have been easy :) )
<beneroth> I just cry about the fact that he can't even tell what exact protocol/format he uses. he just uses some libraries he doesn't know anything about.
<beneroth> because the specification mentions some specific protocol, but when I asked him about it he was like "never heard of that"
<beneroth> and my request have some mistakes in it, but I only get kinda random errors back. one of the 4 or more parsers on their side hits something unexpected.
<freemint> i see
<beneroth> layer of software upon other layers. a mess. and use of protocols which are largely out of use for 15 years now
<freemint> that is annoying
<beneroth> aye
<freemint> have you tried to fuzz the right input
orivej has joined #picolisp
<beneroth> not beside doing some manual try and error
<beneroth> but the span of possible inputs is too large to get somewhere with fuzzying. will only find ways to crash their server, I guess. not want I want.
<beneroth> not what I want.
<freemint> ... i see how many "atoms" does such typical query has
<beneroth> its XML soap. probably to be wrapped into DIME (binary MIME-like format proposed by Microsoft and abandoned by 2003)
<beneroth> "the standard has been withdrawn and never made RFC status. However, Microsoft did at one time recommend DIME for transmitting files via Web services. It was also used in Java EE, but differences in the implementation of the protocol made it difficult."
<beneroth> says wikipedia
<beneroth> so I can't be sure if I made any mistakes or if their implementation just varies.
<beneroth> or the specification is wrong and they don't use DIME but one of multiple possible SOAP/MIME variants
<beneroth> but yeah, my contact can't tell me because he doesn't know shit what his own software does.
<freemint> where did he get the software from
<freemint> have you tried your software against a reference implementation
<beneroth> dunno. I suspect he actually wrote it, using some old libraries. or he just inherited it from another guy and is now the poor guy in charge of it.
<beneroth> happens all the time with business software
<freemint> the world really needs a website which collects reference implementations for anything
<beneroth> or project managers which actually use open standards and simple proven solutions.
<beneroth> but fashion is more attractive :)
<beneroth> and also using seemingly-standard tech. SOAP was THE thing to connect applications together 10 years ago. then one guy came and just used plain old HTTP without any additional mountains of XML definitions -> REST was born, SOAP and XML mess died. well are dying. some still use it, as you can see, and sometimes even some of the worst exotic variants of it :)
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #picolisp
<freemint> afb
freeemint has joined #picolisp
freemint has quit [Ping timeout: 264 seconds]
freeemint has quit [Ping timeout: 245 seconds]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 252 seconds]
mtsd has quit [Quit: Leaving]
freemint has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
grp has joined #picolisp
ubLIX has joined #picolisp
ubLIX has quit [Quit: ubLIX]
orivej has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
<razzy> beneroth: nice ilustration :] agree 100%
<razzy> rise above, break the cycle
freeemint has joined #picolisp
freemint has quit [Ping timeout: 246 seconds]
alexshendi has joined #picolisp
<beneroth> Regenaxer, how to re-interpret (cast) a number returned from (rd 'cnt) into a UTF-8 string? is there a way beside reading it with (char) from a stream?
freemint has joined #picolisp
freeemint has quit [Ping timeout: 252 seconds]
<beneroth> theory question. In my use case I work with (char) on the stream.
<beneroth> I know the size in bytes of a certain string which is embedded in the middle of a binary file. so I seek to the start position and read then with (for N Size (link (char))), but as (char) might consume more than one byte it might read more bytes than it should, no?
<beneroth> (in case there is a multibyte char in the input)
<Regenaxer> You mean 'format' (cast a number to a string)?
<Regenaxer> Concerning char: Correct
<Regenaxer> Hmm, I begin to understand
<Regenaxer> You want the bit pattern of the number to be taken as a bit pattern of the bytes
pierpal has quit [Read error: Connection reset by peer]
<Regenaxer> It needs the same arithmetics the pil reader is doing
ubLIX has joined #picolisp
pierpal has joined #picolisp
<Regenaxer> So I would indeed go with (char), and decrement the count according to the value of the read char
<beneroth> ah I see
<beneroth> get the char, putting it into (char) and check its numeric value
<beneroth> ok
<Regenaxer> aes
<Regenaxer> yes
<Regenaxer> if <= 127, 1 byte
<Regenaxer> <= 2047, 2 bytes
<Regenaxer> else 3
<beneroth> one other question: how to seek (as in C) within a file? for text there is (from) and (skip) etc, but what if I want to skip a certain number of bytes?
<Regenaxer> You could 'echo' in a pipe
<Regenaxer> or call 'dd' in a pipe
<beneroth> I have a binary file. I want to start reading with (rd 'cnt) after a certain offset
<beneroth> (for N Offset (rd 1))
<beneroth> I guess the database file access seek is coded in asm?
<beneroth> (well no, it is)
<Regenaxer> It uses pread()
<Regenaxer> ie lseek() + read()
<Regenaxer> But 'rd' needs a stream
<beneroth> I see. both not available somehow on lisp level, right?
<Regenaxer> so this stream could be from 'dd'
<Regenaxer> right
<Regenaxer> It makes no sense directly, as it ignores the stream's buffering
<beneroth> ok. so use another process/pipe to do the skip, or use the (for N Offset (rd 1))
<Regenaxer> ignores or messes up I mean
<beneroth> or maybe (out "/dev/null" (echo (- Offset 1) 1)) ?
<Regenaxer> yes, though reading in a loop might be slower
<beneroth> naturally
<Regenaxer> Not "/dev/null"
<beneroth> I would guess (echo 'cnt 'cnt) uses also pread() ? "In case of two cnt arguments, the first one specifies the number of bytes to skip in the input stream." ?
<Regenaxer> Well, echo is also not efficient here.
<Regenaxer> reads in a loop too
<beneroth> ah ok
<Regenaxer> Same reason, buffering
<beneroth> I see
<Regenaxer> Well, could be done better probably
<beneroth> I will use (for N Offset (rd 1)), speed is not so critical. another process is also overhead and dependency
<beneroth> T
<beneroth> well as you say, stream vs. file/block device
<Regenaxer> yes, thats the easiest
<beneroth> different use cases. picolisp is mainly meant for text streams
<Regenaxer> Perhaps not meant, but that is what it normally operates on
<beneroth> I still like to do my bit shovelling here with picolisp as speed is not critical this is nicer to have in pil than to write it in another language
<beneroth> "tuned for" ? :)
<Regenaxer> not tunes specially, just for practical reasons
<Regenaxer> what the interpreter needs
<beneroth> yeah, and for what applications you used it mainly. it probably would be a bit different if you would have worked more in e.g. embedded software with pil than web applications :)
<Regenaxer> correct
<Regenaxer> It is easy to write a custom function in C or asm for such purposes
<Regenaxer> Perhaps you can use 'blk'?
<Regenaxer> no, it expects PLIO
<Regenaxer> you have raw data, right?
<beneroth> nothing wrong with some specialisation. pil has a lot features to not restrict usage, but some limits are natural. absolutely legitimate.one just has to know where the limits (or well, sub-optimal default usage) are to correctly use the tools :)
<beneroth> aye
<beneroth> not plio
<Regenaxer> T
<beneroth> standard draft which never became a standard. deprecated in 2003. officially not in use anymore since at least 2008.
<Regenaxer> I see :)
<beneroth> it was very hard to find this text file :D
<Regenaxer> :)
<beneroth> (as it never became a standard it was removed from the official rfc pages)
<Regenaxer> In your case above, I think I would go with 'dd'
<beneroth> well currently I only build myself some parsing functions to read example data, to compare my implementations results with the output from old microsoft libraries.
<beneroth> will probably not need to parse (read) in production, only write.
<Regenaxer> (in '(dd "is=xxx" ...) (make (while (char) (link @]
<Regenaxer> not is=
<beneroth> thanks for the advice!
<Regenaxer> skip= I think
<Regenaxer> ibs, obs etc.
<Regenaxer> I forgot the syntax, but this is probably the most efficient if the file is large
<beneroth> no buffering?
<Regenaxer> The 'in' does it
<beneroth> not so large. few kB at max.
<Regenaxer> when reading the pipe
<beneroth> yes. I mean (dd) :)
<beneroth> eh dd
<Regenaxer> dd copies low-level I think
<Regenaxer> reading and writing blocks of size ibs and obs
orivej has joined #picolisp
erkin has quit [Ping timeout: 244 seconds]
erkin has joined #picolisp
lodsw has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
lodsw has quit [Quit: ZNC 1.6.6 - http://znc.in]
lodsw has joined #picolisp
lodsw has quit [Quit: halt and catch fire]
lodsw has joined #picolisp
pierpal has quit [Ping timeout: 240 seconds]
grp has quit [Quit: box shutting down...]