nisanharamati has quit [Quit: Connection closed for inactivity]
khan_ has joined #ponylang
khan has quit [Ping timeout: 240 seconds]
khan_ is now known as khan
jemc has quit [Ping timeout: 248 seconds]
gokr has joined #ponylang
codec1 has joined #ponylang
khan has quit [Quit: khan]
bimawa has joined #ponylang
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
codec1 has quit [Ping timeout: 268 seconds]
_andre has joined #ponylang
codec1 has joined #ponylang
gokr has quit [Ping timeout: 240 seconds]
codec1 has quit [Quit: Leaving.]
codec1 has joined #ponylang
codec1 has quit [Ping timeout: 240 seconds]
gokr has joined #ponylang
zetashift has joined #ponylang
endformationage has joined #ponylang
zetashift is now known as sp33der89
jemc has joined #ponylang
gokr has quit [Ping timeout: 255 seconds]
abelard has joined #ponylang
<abelard>
hey guys, I have a question
<abelard>
what is error exactly? is it a primitive?
<jemc>
abelard: in the runtime, `error` is just an unwinding of the stack to the nearest containing `try` block's `else` clause
<jemc>
at compile time, it is a "jump away" instruction that makes the compiler enforce that either there needs to be a `try` block containing the error or the method signature needs to be "partial" (with a question mark), with the enforced assumption that there is another `try` block somewhere up the call stack
<abelard>
ah, I see. thanks jemc
<abelard>
by the way, if I'm handling an error, is printing from the main actor a more desirable behavior than printing from the actor in which the error occured?
<jemc>
the best practice depends on a lot of factors - it can be different depending on the nature of what you're building, what your goals are, and what kind of error you're handling
<abelard>
basically I want to print an error and exit
<abelard>
to print from main, I'd have to return an enum so main would know what to print
<jemc>
if you want something cleaner, or if you have other cleanup that needs to happen on exit, I'd suggest you take a different approach:
<jemc>
introduce a "custodian" actor that keeps a handle on everything that needs to be `dispose`d for an exit (like any open network sockets), and also give it the capability to print what you want to print