--- Log opened Mon Feb 11 00:00:23 2019 |
00:31 | | Degi_ [Degi@Nightstar-4mugn8.dyn.telefonica.de] has quit [Connection reset by peer] |
03:07 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Operation timed out] |
03:17 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
03:17 | | mode/#code [+ao McMartin McMartin] by ChanServ |
04:34 | | mac [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
04:34 | | mode/#code [+o mac] by ChanServ |
04:37 | | macdjord [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
04:42 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
04:42 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
04:58 | | macdjord|slep [macdjord@Nightstar-grpbnp.mc.videotron.ca] has joined #code |
04:59 | | mode/#code [+o macdjord|slep] by ChanServ |
05:02 | | mac [macdjord@Nightstar-grpbnp.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
05:23 | <&[R]> | lol, found a way to use xs' syntax to shift an array (since it doesn't have a command to do so) |
05:23 | <&[R]> | Not sure if there's an equiv way to pop though |
05:24 | <&[R]> | Can push/unshift fine |
05:25 | <&[R]> | (a b) = $a # this shifts into b, leaving a with the remainder; basically what you'd expect b = <={shift a} to do. |
05:41 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
05:42 | | celticminstrel is now known as celmin|sleep |
05:47 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
06:33 | <&[R]> | ; fn test {|funcs| for fn-try $funcs {$&if $fn-try true {throw error $fn-try} } } ; fn runtest {|fn-func|$&seq {fn-%seq = test} {func} {fn-%seq = $&seq}} ; catch {|e msg| echo $e $msg} {runtest {true; echo 1; false; echo 2}} |
06:33 | <&[R]> | 1 |
06:33 | <&[R]> | error {false} |
06:33 | <&[R]> | ; |
06:33 | <&[R]> | YAY! I'll be able to use this to replace makepkg with an xs script |
06:33 | <&[R]> | Just with better named functions |
07:37 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Operation timed out] |
08:07 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
08:07 | | mode/#code [+ao McMartin McMartin] by ChanServ |
08:25 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
08:32 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
08:32 | | mode/#code [+ao McMartin McMartin] by ChanServ |
08:38 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
10:58 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
12:02 | | gnolam_ [lenin@Nightstar-ego6cb.cust.bahnhof.se] has joined #code |
12:06 | | gnolam [lenin@Nightstar-ghphrt.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
12:26 | < gnolam_> | "You like wifi in your malicious USB cables?": https://twitter.com/_MG_/status/1094389042685259776 |
12:26 | | gnolam_ is now known as gnolam |
12:26 | | mode/#code [+o gnolam] by ChanServ |
13:22 | | celmin|sleep is now known as celmin|away |
15:35 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
15:35 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
16:07 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
16:16 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code |
16:16 | | mode/#code [+o Alek] by ChanServ |
16:44 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
16:47 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code |
16:47 | | mode/#code [+o Alek] by ChanServ |
17:10 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:41 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
17:45 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code |
17:45 | | mode/#code [+o Alek] by ChanServ |
17:53 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
17:56 | | Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code |
17:56 | | mode/#code [+o Alek] by ChanServ |
18:29 | | Kindamoody|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
18:29 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
18:29 | | Kindamoody|autojoin is now known as Kindamoody |
18:50 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
19:15 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
20:19 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
20:19 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
21:00 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
21:00 | | mode/#code [+ao McMartin McMartin] by ChanServ |
21:01 | | * McMartin breaks out his copy of Advanced Programming in the UNIX Environment |
21:06 | <~Vorntastic> | Apitue |
21:07 | <&McMartin> | Somewhere out there is a person whose idea of retrocomputing is to get C programs to work on SVR2 and SunOS |
21:07 | <&McMartin> | I never want to meet this person, even if they probably spent five years maintaining Nethack |
21:08 | <&McMartin> | (I need to refresh my knowledge of how BSD signals work and the whole chapter on signals is actively presented as a neverending litany of failures and fatal bugs in corner cases that are so non-corner that not even sleep() can be implemented without doing arbitrary damage to the process heap and system I/O state) |
21:09 | <~Vorntastic> | That sounds spectacularly devastating |
21:12 | <&McMartin> | Basically, these are software interrupts that work like hardware interrupts, except, in the initial design |
21:12 | <&McMartin> | - By default they generally just kill your process |
21:12 | <&McMartin> | - When you handle it so it *doesn't* kill your process the first thing it does before calling you is reset the behavior back to the default kill-your-process |
21:13 | <&McMartin> | - All such interrupts are completely nonmaskable in the original design, and can only be caught, set to default, or ignored |
21:13 | <&McMartin> | - Also you can't check the pre-existing state of it without changing it |
21:13 | <&McMartin> | And thanks to those last three there are race conditions literally everywhere and the only mechanism it provided for dealing with this was "hope for the best" |
21:14 | <~Vorntastic> | Wait I do not understand the second bullet |
21:14 | <&McMartin> | My favorite part is indeed the second process |
21:14 | <&McMartin> | So, I want to trap SIGHUP to do a thing, say |
21:14 | <&McMartin> | A thing that isn't "die" |
21:14 | <&McMartin> | So I call signal(SIGHUP, my_awesome_sighup_handler) to set it |
21:14 | <&McMartin> | And it returns SIG_DFL to indicate it was previously default |
21:15 | <&McMartin> | So the last point is "this is the only way in original signals to actually check what the handler was" |
21:15 | <&McMartin> | Now SIGHUP comes in. |
21:15 | <~Vorntastic> | Okay. (Ircds often hook that to reload configs) |
21:16 | <&McMartin> | (many *d things do, because as non-terminal programs they won't otherwise get it.) At the point my_awesome_sighup_handler starts, the handler has been set back to the default "die" operation by the OS |
21:16 | <&McMartin> | Even if my first instruction is another call to signal to rehook it for next time, there's a race condition where you can kill me with two SIGHUPs appropriately timed. |
21:16 | <&McMartin> | BSD 4.3 and SVR4 both fixed this by introducing new signal semantics with a different API, but they weren't compatible with each other and POSIX mostly followed BSD. |
21:17 | <~Vorntastic> | So wait, it literally goes - f = signal(hup, default); f()? |
21:17 | <&McMartin> | p. much. |
21:17 | | Degi [Degi@Nightstar-ai6v48.dyn.telefonica.de] has joined #code |
21:19 | <~Vorntastic> | Fail |
21:19 | <&McMartin> | Also it would happily deliver signals while you were, say, in the middle of malloc() and mid-edit to heap freelists and the like |
21:19 | <&McMartin> | But that's more "yeah, welcome to interrupt handling" |
21:22 | <&McMartin> | Er, sorry. SVR3 was the one with its own incompatible reimplementation of this stuff, SVR4 was the one that was post-POSIX |
21:33 | <&[R]> | Also gotta love how "signal-safe" is a thing |
21:34 | <&[R]> | I almost suspect windows event handling is better, but I doubt it given how often windows would get hung |
21:35 | <&McMartin> | The data structure named "Windows Events" has similar fundamental nonatomicity problems, but it isn't quite as offensive about it as SA_RESETHAND. |
21:35 | <&McMartin> | And NT never had the suite of problems associated with EINTR and other system-call interrupts |
21:35 | <&[R]> | Ultimately it's designed as PC instead of an interrupt right? |
21:36 | <&[R]> | IPC* |
21:36 | <&McMartin> | Windows Events were more like non-blocking semaphores that you could do the equivalent of select() on. |
21:37 | <&McMartin> | And also NT does not think that everything is a file and has a dedicated async I/O API from at least NT5 where people start caring about it |
21:37 | <&McMartin> | Kind of unfair comparison there really because because the failparade in Unix took place in the 1970s, 1980s, and 1990s, and as such you can make a decent case that we didn't, as a discipline, actually have the slightest clue what we were doing yet |
21:38 | <&McMartin> | I mean, ffs |
21:38 | <&[R]> | Fair enough |
21:38 | <&McMartin> | It was the *mid-2000s* before we actually had a systematic treatment of how atomic updates would work that did not actually permit as OK the crash bugs that were in every implementation of fucking java.lang.StringBuffer up to that point |
21:39 | <&McMartin> | I recall this because I remember the paper coming out at a conference I was actually attending >_< |
21:39 | <&McMartin> | And everyone is "Oh, we will have to change the standard libraries" and we should be "how the Hell did this ever fucking work" |
21:40 | <@Tamber> | "badly" / "only just" |
21:41 | <&McMartin> | ("Well, we've guarded every access to the internal data structure with the same lock!") |
21:41 | <&McMartin> | ("Yes, but you lock, confirm that there's enough room in the buffer to do the write, unlock it, relock it again later, and then do the write blindly") |
21:42 | <&McMartin> | (But yeah, "'synchronized' will not save you" was not properly characterized until like fifteen years ago, which is more than slightly embarassing) |
21:43 | <~Vorntastic> | Man I saw that one coming the first time I saw synchronized ever |
21:52 | <&McMartin> | Anyway, yeah |
21:53 | <&McMartin> | My vague recollection of what was wrong with Windows Events was that they needed some extra atomicity around them to work and that this boiled down to "when you actually need a condition variable, nothing else will do" |
21:54 | <&McMartin> | "What if we want to unblock a signal and then pause, waiting for the previously blocked signal to occur? Assuming the signal is SIGINT, the incorrect way to do this is: (full-page example)" |
21:55 | <~Vorntastic> | Like, "this looks like it must go haywire a whole lot" was the first thing to cross my mind reading how synchronized worked |
21:56 | <&McMartin> | It turns out properly recursive mutexes and super-aggressive serialization cover for a multitude of sins |
22:09 | <~Vorntastic> | Apparently! |
22:13 | <&McMartin> | But yeah, you'd get textbook definitions of "race condition" that were merely "you have two accesses of the same data in two threads, at least one of them is a write, and at least one is not protected by a lock" and that was it |
22:14 | <&McMartin> | Which turns out to be neither sufficient nor necessary. |
22:16 | <&McMartin> | And apparently we nailed nonblocking synchronized algorithms in 2011. |
22:17 | <&McMartin> | (We knew it was *possible* in the 1980s, but actually *doing* it was orders of magnitude slower than using mutexes and Not Being A Dick About It) |
22:45 | <&McMartin> | A shocking injustice has been discovered |
22:45 | <&McMartin> | ed is not installed by default in Fedora 29 |
22:46 | | gnolam_ [lenin@Nightstar-ghphrt.cust.bahnhof.se] has joined #code |
22:49 | | gnolam [lenin@Nightstar-ego6cb.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
22:58 | | gnolam [lenin@Nightstar-ego6cb.cust.bahnhof.se] has joined #code |
22:58 | | mode/#code [+o gnolam] by ChanServ |
22:58 | | gnolam__ [lenin@Nightstar-ghphrt.cust.bahnhof.se] has joined #code |
23:01 | | gnolam_ [lenin@Nightstar-ghphrt.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
23:02 | | gnolam [lenin@Nightstar-ego6cb.cust.bahnhof.se] has quit [Ping timeout: 121 seconds] |
23:06 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
23:19 | | gnolam__ is now known as gnolam |
23:19 | | mode/#code [+o gnolam] by ChanServ |
23:34 | <&[R]> | https://it.slashdot.org/story/19/02/11/2128216/doomsday-docker-security-hole-uncovered |
23:49 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:49 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:58 | | gnolam_ [lenin@Nightstar-ego6cb.cust.bahnhof.se] has joined #code |
23:58 | | gnolam__ [lenin@Nightstar-ghphrt.cust.bahnhof.se] has joined #code |
--- Log closed Tue Feb 12 00:00:24 2019 |