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
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
freemint has quit [Ping timeout: 248 seconds]
ubLIX has quit [Quit: ubLIX]
orivej has quit [Ping timeout: 248 seconds]
alexshendi has quit [Ping timeout: 252 seconds]
_whitelogger has joined #picolisp
freemint has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
miskatonic has joined #picolisp
orivej has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
freemint has joined #picolisp
freemint has quit [Ping timeout: 252 seconds]
freemint has joined #picolisp
ubLIX has joined #picolisp
ubLIX has quit [Quit: ubLIX]
freemint has quit [Ping timeout: 246 seconds]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
wasamasa has joined #picolisp
<wasamasa> hey peeps
<wasamasa> I'm revisiting this lisp implementation I wrote in pil and found a really stupid error
<wasamasa> to parse string contents I use (any "\"foo\"") which works fine as long as strings are written correctly
<wasamasa> however it can throw an "EOF Overrun" error
<wasamasa> if I try (catch '("EOF Overrun") (any "\"")) in a pil session, it hangs
<wasamasa> I have to kill -9 it
<wasamasa> how do you properly handle this situation?
<wasamasa> other than writing your own parser detecting wonky strings
<beneroth> EOF error = you have missing parenthesis in your picolisp code
<wasamasa> have you tried evaluating (any "\"")?
<beneroth> it's an error thrown from the picolisp reader, therefore it cannot really be handled within your program code, as the picolisp interpreter cannot fully parse your code
<beneroth> you could end your picolisp code with an ] instead of ), as ] automatically closes all parenthesis. but better find the mistake in the code :)
<wasamasa> it's not about code, duh
<beneroth> ah
<beneroth> I see
<wasamasa> it's about the behavior of any
<beneroth> hahaha
<beneroth> yeah sorry mate
<beneroth> well ok, than the EOF is because of the missing closing " in the input code to any :)
<wasamasa> sure, but can you catch it?
<beneroth> not valid picolisp code/symbol, so it cannot work
<wasamasa> because it doesn't appear so
<beneroth> : (catch '("") (any "\""))
<beneroth> -> "EOF Overrun"
<wasamasa> hm
<beneroth> '("") -> catch all error strings
<wasamasa> good to know
<wasamasa> can you reproduce with (catch '("EOF Overrun") (any "\"")) ?
<wasamasa> also, it doesn't work for me :(
<wasamasa> probably because of the ancient picolisp version, september 2017
<beneroth> (catch) is dual-use: either using it with symbols (which are issued with (throw 'sym)), but that is for non-local jumping/event handling. or to catch errors (issued with (quit "message")). this two ways of (catch) should/cannot be mixed
<wasamasa> yup, I know that behavior from elisp
<beneroth> hm... I can reproduce, but then pil hangs...
<wasamasa> good
<wasamasa> ok, then it's not just me
<beneroth> T
<beneroth> it might be that you cannot properly catch this, because (any) actually uses the raw picolisp reader, I suspect
<wasamasa> I've tried looking at its sources and found asm code :(
<wasamasa> ok, then I'll write my own string parser
<beneroth> Regenaxer can answer this question tomorrow (in like 10 hours), or you can ask on mailing list
<beneroth> yes, that would be the proper solution
<rick42> wasamasa never asks easy questions :)
<wasamasa> don't worry, it will get worse
<rick42> hehehe
<wasamasa> I'll soon switch from software development to infosec
<wasamasa> so my job is to find funny inputs triggering fun behavior
<rick42> oh wow! lots od work there discovering many "horrors" ;)
alexshendi has joined #picolisp
<wasamasa> who knows, maybe picolisp will appear in a public hacker challenge
<wasamasa> it's one of the few binaries on my system without any kind of mitigations enabled
<beneroth> nice :)
<wasamasa> I won't be the first to throw lisp at people though
ubLIX has joined #picolisp
orivej has quit [Ping timeout: 244 seconds]
ubLIX has quit [Quit: ubLIX]