egg changed the topic of #kspacademia to: https://git.io/JqLs2 | Dogs are cats. Spiders are cat interferometers. | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer. | We can haz pdf | Logs: https://esper.irclog.whitequark.org/kspacademia
umbralraptop has joined #kspacademia
umbralraptop has quit [Ping timeout: 189 seconds]
umbralraptop has joined #kspacademia
umbralraptop has quit [Ping timeout: 195 seconds]
umbralraptop has joined #kspacademia
umbralraptop has quit [Quit: Quit]
armed_troop has quit [Ping timeout: 183 seconds]
<SnoopJ>
hah! and several hours later now that I have my head screwed on and know what I'm looking at, I went to check on the status of supporting exception handling in wasmtime… and again!
_whitelogger has joined #kspacademia
_whitelogger has joined #kspacademia
_whitelogger has joined #kspacademia
armed_troop has joined #kspacademia
armed_troop has quit [Quit: Bye]
armed_troop has joined #kspacademia
<raptop>
...I swear, this paperwork requires signatures from the most random department people
<galois>
[mastodon] @MicroSFF: «The swordsmith inhaled sharply. "Is it bad?" the Hero asked. "This blade can't be repaired." "But it's the Blade of Fate!" "Sorry." "It's destined to help me kill the Dark Lord!" "Old Runsy?" "Runsy?" "I went to school with him. Did you know he's mortally allergic to cats?" #MicroFiction #TootFic #SmallStories»
<SnoopJ>
🤌
<raptop>
!u 🤌
<galois>
🤌: U+1f90c v13.0 (So) PINCHED FINGERS
raptop has quit [Ping timeout: 190 seconds]
raptop has joined #kspacademia
<whitequark>
⟨SnoopJ⟩ hah! and several hours later now... ⮪ hahahah
<SnoopJ>
whitequark, I was feeling kinda optimistic about being about to emulate my way out of the setjmp/longjmp headache at first, but it seems like I may have blundered sideways into a deeply cursed problem with trying to support languages that have arbitrary control flow
<whitequark>
yes
<whitequark>
use wasm2c then run the result on wasmtime
<whitequark>
lol
<SnoopJ>
that would be suitably absurd for this task
<SnoopJ>
whitequark, oh is that suggestion for like arbitrary exception handling? My need for setjmp/longjmp is pretty MicroPython specific in this case, it uses them to implement its handling of Python exceptions (which seems weird to me but I am not a PL wizard)
<SnoopJ>
less "call this wasm thing that might fall" and more "the guest program wants close control over its own flow"
<whitequark>
sjlj and exceptions are the same thing basically
<SnoopJ>
well, yes, I assume this is why MicroPython is implementing them in C this way
<whitequark>
exceptions have some fluff on top is all
<SnoopJ>
(or with asm if you opt out of setjmp but it's about the same since the asm uses whatever "go over there and resume execution" idiom is appropriate to the platform)
<whitequark>
SnoopJ: yea so, wasmtime doesn't have exceptions, but wasm2c does
<SnoopJ>
whitequark, my question is if wasm2c is addressing the problem of wanting to run some code and an exception might occur, or dealing with a guest program that wants to use setjmp/longjmp arbitrarily
<whitequark>
meaning you can use wasm2c to 'polyfill' exception support and use the result with wasmtime
<whitequark>
latter
<SnoopJ>
huh
<SnoopJ>
okay, I will have to give that a go then, that sounds like it would Just Work™
<whitequark>
wasm2c is just a wasm runtime with exception support whose output happens to be c99
<SnoopJ>
so the target wasm just wants setjmp/longjmp as imports and wasm2c knows what to do with that?
<SnoopJ>
hmm, I wonder if I could use wasm2c to build a support module that contains what I need, to avoid sending all of MicroPython through it
<SnoopJ>
…no, I probably could not do that, because the whole point of the wasm2c approach is that C has `goto`. I did mess around with it using a little test program but thing I don't really understand how wasm2c does exports