🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:00 reportable6 left, nativecallable6 left, quotable6 left, sourceable6 left, notable6 left, tellable6 left, releasable6 left, shareable6 left, greppable6 left, bloatable6 left, |Tux| left, ilogger2 left, |Tux| joined 00:03 ilogger2 joined 00:09 reportable6 joined 00:46 greppable6 joined, releasable6 joined 01:46 notable6 joined 01:47 shareable6 joined, bloatable6 joined 01:48 tellable6 joined, quotable6 joined 01:54 frost joined 02:48 nativecallable6 joined 03:48 evalable6 left, linkable6 left 03:49 evalable6 joined 03:50 linkable6 joined 03:53 sourceable6 joined 04:53 greppable6 left, shareable6 left, committable6 left, nativecallable6 left, unicodable6 left, coverable6 left, reportable6 left, quotable6 left, evalable6 left, linkable6 left, benchable6 left, statisfiable6 left, bisectable6 left, releasable6 left, tellable6 left, bloatable6 left, notable6 left 04:54 unicodable6 joined, reportable6 joined, releasable6 joined, coverable6 joined, benchable6 joined, evalable6 joined 04:55 bisectable6 joined, committable6 joined, greppable6 joined, quotable6 joined, notable6 joined 04:56 nativecallable6 joined, linkable6 joined, tellable6 joined, shareable6 joined, bloatable6 joined, statisfiable6 joined 05:56 reportable6 left, sourceable6 left, releasable6 left, committable6 left, unicodable6 left, notable6 left, bisectable6 left, bloatable6 left, nativecallable6 left, tellable6 left, shareable6 left, benchable6 left, quotable6 left, coverable6 left, greppable6 left, evalable6 left, statisfiable6 left, linkable6 left 05:57 releasable6 joined, unicodable6 joined, shareable6 joined, notable6 joined 05:58 quotable6 joined, committable6 joined, bisectable6 joined, greppable6 joined, benchable6 joined, evalable6 joined 05:59 nativecallable6 joined, linkable6 joined, bloatable6 joined, statisfiable6 joined, sourceable6 joined, reportable6 joined, tellable6 joined, coverable6 joined 06:06 reportable6 left 06:08 reportable6 joined 07:21 [Coke] joined 07:23 sena_kun joined 07:25 [Coke]_ left 07:26 [Tux] left 07:33 [Tux] joined 08:29 Kaiepi left 09:29 evalable6 left, linkable6 left 09:31 linkable6 joined 09:32 evalable6 joined 10:53 Kaiepi joined 11:06 dogbert2 joined 11:10 dogbert17 left 11:15 frost left 11:19 frost joined 11:50 dogbert2 left 11:53 dogbert11 joined 12:07 reportable6 left 12:09 reportable6 joined 12:57 Xliff joined 13:53 vrurg_ joined, vrurg left 14:21 dogbert17 joined, dogbert11 left 15:26 notable6 left, greppable6 left, statisfiable6 left, reportable6 left, evalable6 left, quotable6 left, linkable6 left, shareable6 left, coverable6 left, committable6 left, tellable6 left, nativecallable6 left, bloatable6 left, benchable6 left, sourceable6 left, releasable6 left, unicodable6 left, bisectable6 left 15:27 tellable6 joined, shareable6 joined, reportable6 joined, quotable6 joined, notable6 joined, coverable6 joined, bisectable6 joined, evalable6 joined, linkable6 joined, bloatable6 joined 15:28 sourceable6 joined, greppable6 joined, committable6 joined, releasable6 joined, benchable6 joined, nativecallable6 joined, statisfiable6 joined 15:29 unicodable6 joined 15:38 frost left 15:44 Xliff left 16:33 dogbert11 joined 16:35 dogbert17 left 16:50 dogbert11 left 16:52 dogbert11 joined
Geth rakudo/lizmat-died-naturally: 072d961bb3 | (Elizabeth Mattijsen)++ | src/main.nqp
Set $*DIED-NATURALLY if exiting program without exception

Inspired by stackoverflow.com/questions/730405...gramm-died
This minimal change allows an END block to do special actions if the program exited because of an exception:
... (5 more lines)
rakudo: lizmat++ created pull request #4988:
Set $*DIED-NATURALLY if exiting program without exception
17:05 dogbert17 joined, dogbert11 left 18:07 reportable6 left 18:09 reportable6 joined
gfldex lizmat: does `exit(1)` inside an END-phaser do the right thing? 19:02
lizmat I believe so? 19:03
m: END { exit(1) } 19:04
camelia ( no output )
lizmat m: END { say "last END" }; END { exit(1) }
camelia last END
lizmat m: END { say "not last END" }; END { exit(1) }; END { say "last end" }
camelia last end
not last END
lizmat hmmm
ah, I remember... if you're basically inside the exit handler, "exit" becomes a noop ? 19:05
m: END { say "not last END" }; END { exit(1); say "after exit" }; END { say "last end" }
camelia last end
not last END
lizmat but only for the END block in which you exit
m: END { say "last END" }; END { exit(1); say "after exit" }; END { say "not last end" } 19:06
camelia not last end
last END
lizmat and in reverse order
m: END { say "last END" }; END { say "before exit"; exit(1); say "after exit" }; END { say "not last end" }
camelia not last end
before exit
last END
gfldex From a sysadmin standpoint I don't like END at all. It is very tempting to believe the core will be run. And then some native lib segfaults or you hit an OOM-condition. 19:08
lizmat well, there's that of course... I guess at some point we could think about catching segfaults in a meaningful way
19:09 linkable6 left, evalable6 left
lizmat and aren't OOM's handled by a "kill" first? That should run END, shouldn't it ? 19:09
19:09 linkable6 joined
lizmat unless it's a kill -9 f course 19:09
19:09 evalable6 joined
gfldex And that's why setting the exit-code is important. We typically deal with abnormal termination with a shell wrapper. That `exit` may not do what you expect it to, is at least an ENODOC. 19:11
19:11 vrurg_ left 19:13 vrurg joined
gfldex m: my atomicint $i; my @proms; for ^20 { @proms.push: start { exit ++⚛$i; } }; await @proms; 19:18
camelia ( no output )
gfldex ^^^ poor way to implement a RNG :)
lizmat gfldex: the first thread issuing exit() determines the final exit value
any other exit values are ignored 19:19
gfldex because of the state container in exit
lizmat that seemed to be the most sensible way of dealing with multiple threads doing an exit()
gfldex ENODOC issed as #4097 19:25
19:28 sena_kun left 19:29 sena_kun joined 19:36 discord-raku-bot left, discord-raku-bot joined 19:37 discord-raku-bot left, discord-raku-bot joined 20:58 sena_kun left 21:58 evalable6 left, linkable6 left 21:59 linkable6 joined 22:01 evalable6 joined 23:01 linkable6 left, evalable6 left 23:03 evalable6 joined 23:04 linkable6 joined