IRC channel logs

2021-12-24.log

back to list of logs

<fnstudio_>is there anything like an "assert" statement that can be used in guile to check something and abruptly terminate execution if that something is false? (sorry i might be mixing up concepts and terminology from other languages)
<pinoaffe>fnstudio_: you might want to just do (when condition (raise-exception something)) or (unless condition (raise-exception something))
<fnstudio_>pinoaffe: great, very helpful thanks - what's something though? simply a string?
<fnstudio_>well, i suppose i can try :)
<pinoaffe> fnstudio_: could be a string, could be something else :)
<pinoaffe>fnstudio_: https://www.gnu.org/software/guile/manual/html_node/Raising-and-Handling-Exceptions.html
<fnstudio_>amazing, thanks pinoaffe (yes, the documentation might be a bit obscure on that point as a matter of fact, it says "object" but it might not be immediately apparent what an object is in that context)
<fnstudio_>but i think i get it now, thanks again
<pinoaffe>fnstudio_: if I'm not mistaken it can be pretty much anything and will just get passed to the current exception handler, but it may need to be an exception object, see https://www.gnu.org/software/guile/manual/html_node/Exception-Objects.html
<fnstudio_>brilliant, thanks
<lloda>fnstudio_: 'ra' is a pun, you pronounce each letter so it sounds like /ər eɪ/ = array
<fnstudio_>lloda: ah, cool! i hadn't thought of that
<sneek>Welcome back fnstudio_, you have 1 message!
<sneek>fnstudio_, notmaximed says: You can use the macro named 'assert' from (rnrs base) (search for 'assert' in the manual)
<fnstudio_>thanks notmaximed, that's exactly what i needed
<tohoyn>Merry Christmas!
<tohoyn>has the bytecode format of guile changed recently? I get the following error when I run a Theme-D program compiled to guile and use both guile 3.0.7 and the newest version of guile in git: Pre-boot error; key: misc-error, args: ("load-thunk-from-memory" "incompatible bytecode version" () #f)Keskeytetty (luotiin core-tiedosto)