log☇︎
46200+ entries in 0.031s
mircea_popescu: asciilifeform thinkaboutit! if isadmin!
mircea_popescu: asciilifeform so then you do it from ada.
mircea_popescu: var selectedTextBox = (TextBox)sender, if (IsAdmin) { selectedTextBox.Enabled = true; selectedTextBox.Text = superSecretPassword; } else{ selectedTextBox.Clear();}
asciilifeform: mircea_popescu: you dun make timeouts using magic periphs, but using the os scheduler ( which in turn uses interrupt controller , having oscillator of some form so you can do slices )
asciilifeform: mircea_popescu: this is an ancient evil, was called 'abstraction inversion'
mircea_popescu: asciilifeform how's it to have timeout if it doesn't know time ?
mircea_popescu: the only way to have sane republic is precisely the http://trilema.com/2015/causes-and-purposes/ which specifically here means, NO CALLS BACK UP THE TREE. ☟︎
asciilifeform: hrm i can't actually think of a periph that 'wants to know time'
mircea_popescu: and so on, this constant up AND DOWN the tree calling paradigm recreates c++, java and usg necessarily.
mircea_popescu: "peripheral should know of time" --> ntp.
mircea_popescu: see, cuz things flow a certain way. "we want to include morons, retards and other bureaucrats" --therefore--> "smartphones" and "ntp" and so on.
mircea_popescu: the issue of having every god damn peripheral aware of time is another fucking bojum
asciilifeform: on raw irons tho, gotta have a mechanism that actually 'ada', given as that's the only scheduler you have, unless baked new
mircea_popescu: (yes, the objection stands, "mp, ada machjine long way off because all peripherals are c-machines". sure, they are. we also make items.)
asciilifeform: just need a working timeout in the read call
mircea_popescu: asciilifeform but then i gotta what, write my own drivers/kernel mods for every peripheral ?
mircea_popescu: but in any case one can't have an ada machine without working abort (which specifically means, NOT import the c consrtruct, cuz wtf am i gonna do.)
asciilifeform: rather than the enclosing thread
asciilifeform: seems to me that the correct layer for timeout is the i/o call
mircea_popescu: ie, two layers are needed to implement the citizen/foreigner distinction.
mircea_popescu: seems to me self-evident that there's need for exactly two layers of exception handler : a) our code fucked up, in which case end it all or else b) some ~item~ such as whatever, a fg fucked up, in which case REPORT THIS TO ME, don't wait for it forever./
asciilifeform: but also agree with mircea_popescu , you gotta have a way to halt a wedged device i/o at least.
asciilifeform did point out, this, in the 'order son to seppuku' thrd
mircea_popescu: because in truth, abort is the wrong solution in 999 cases out of 1k
asciilifeform: i use'em as strictly as equivalent of the red lamp
a111: Logged on 2016-01-21 13:29 asciilifeform: 'if i make it what i think is the right size, it crashes!111'
mircea_popescu: much like there's a very sensible design reason to not even expose abort in ada code : do NOT encourage morons who http://btcbase.org/log/2016-01-21#1379603 ☝︎
mircea_popescu: it's not clear that the complex exception handling mechanism with propagations and whatnot that eventually yielded the "try/catch" mechanism exposed in fucking code is ~at all useful~.
asciilifeform: ( in ffa, exceptions are a 'catch fire' condition, and drop into the last-chance handler, but in moar complicated proggy, with, say, devices, you may want to actually handle and keep working )
mircea_popescu: right, it's a misnomer, i'm not arguing that part.
asciilifeform: mircea_popescu: recall that an exception differs from other control transfers in that it can unwind the call stack
mircea_popescu: not all archs work well for this, and evidently not all implementations are fucking useful.
mircea_popescu: diana_coman in ~principle~ zero cost exception handling is this thing : ~instead~ of calling code when exceptions arise, you instead unroll all calls in place, where exceptions might arise. this way you don't get a run-time penalty (because you paid for it in code space)
diana_coman: mircea_popescu, so up to v, that's clear enough, lol
mircea_popescu: the most valuable (from a timing perspective) loops are the innermost ones, because they get jumped in and out of hundreds of tyimes.
mircea_popescu: diana_coman http://p.bvulpes.com/pastes/6d1R4/?raw=true << like that.
asciilifeform: should've stuck to e.g. 'short jump'/'long jump' mode or similar
diana_coman: that one might not care about that or the other maybe but that doesn't mean it dun' exist now
diana_coman: asciilifeform, yes; my point was simply that their "zero-cost" is in fact all sorts of costs
asciilifeform: imho elaborately propagating ( rather than catching in exactly 1 place ) exceptions is bad idea on any platform
diana_coman: also re zero-cost: "this method has considerably poorer performance for the propagation of exceptions"
diana_coman: not a big deal; reading here on the sjlj theoretically the biggest slowdown would be when there are some exception handlers so maybe I should add that to testing
diana_coman: so far yes because it's already at 0.46 secs; do you want it up to k or what?
diana_coman will let it run some 1k times and see an avg
diana_coman: mircea_popescu, such a thing? http://p.bvulpes.com/pastes/YaMpS/?raw=true
asciilifeform: sounds like Right Thing
asciilifeform: aa yea finally read to that pt
mircea_popescu: the design calls for 20 loops each spawned by an if-even test.
asciilifeform: oughta suffice for test
mircea_popescu: there were 20 in the design.
asciilifeform: serpent will do tho
mircea_popescu: i wanted something in there of a little heft to make sure we're not being optimized or w/e.
asciilifeform: i.e. try with simply the wrappings.
asciilifeform: mircea_popescu: in that sense ideal test is empty loop, rather than loop containing an item that is simply heavy but not on acct of jumpism
asciilifeform: so it's a poor test of hypothesis of 'does longjmp runtime nail speed of jumps'
a111: Logged on 2019-02-12 14:05 diana_coman: mircea_popescu, eucrypt's test on Serpent seem good candidates as one can even adjust how many iterations to do if you want some specific time intervals; current full test of the serpent module (including i/o because of using test vectors in file) is reported by time at ~2.3s without sjlj; this has no tasks/exceptions as such;thing is: time is not extremely precise but I could run I suppose some 1k times and see
asciilifeform: http://btcbase.org/log/2019-02-12#1895272 << serpent dun have many jumps in it, recall, it's unrolled, even fewer jumps (conditional or otherwise) than ffa ☝︎
asciilifeform: iirc on unix it uses standard posix signals, on raw irons, whichever interrupt system the chip provides
asciilifeform: https://archive.is/HpVWP << likbez re the interrupts mechanism, if we end up wanting to try such thing. ( a bare-iron gnat will ~have~ to use it, for basic machine i/o handling, so asciilifeform is doomed to test it sooner or later , fwiw )
mircea_popescu: well, someone else gets to rage in the logs for a while.
asciilifeform: currently diana_coman is the 'test all gnat knobs' pioneer; asciilifeform's item is deliberately spartan re what is used, as it was designed to run even on e.g. msdos, where there are no threads
asciilifeform: ( just as not yet used task system prior to diana_coman uncrating it )
asciilifeform: had not yet had occasion to put to use.
asciilifeform: looked but not tested.
mircea_popescu: did you ever use / look at this thing in any depth ?
asciilifeform: it shits a signal handler into the obj. same as you'd have if you were writing daemon in c.
mircea_popescu: yeah but i have nfi what it shits into the obj code, and so on. but not off the table, no.
asciilifeform: it's a standard pkg, rather than gnatism (i.e. also worx on raw irons, anyffin with an interrupt controller)
mircea_popescu: i guess, though i am not sure the correct approach is adding packages.
asciilifeform: mircea_popescu: there's also the ada.interrupts package, which actually sets up signal handlers. if all you want is emergency stop of thread, that'll do it
mircea_popescu: and fixing means ~have it handle all sigs~ wtf bs half-job is this.
mircea_popescu: anyway, it's fucking insulting as all hell, this zcx implementation. i suspect we will have to fix it anyway, because it is not really feasible to NOT have one, on irons that support it.
mircea_popescu: exactly what i had in mind for "hey diana_coman check this" if you returned true.
asciilifeform: mircea_popescu: the obvious use case is e.g. dead FG
a111: Logged on 2019-02-10 17:37 asciilifeform: will add to this also, that if yer thread is actually wedged, it will almost always be on acct of http://btcbase.org/log/2019-02-08#1893811 , i.e. waiting for a blocking unix i/o, and no matter what yer pthreads proggy is written in , c, ada, cobol, whatever, it will still become a zombie, cuz unix is retarded.
mircea_popescu: asciilifeform here's a thought : fuck a peripheral so as per http://btcbase.org/log/2019-02-10#1894696 it zombies all it touches ; THEN have an ada prog touch it ; and THEN see if abort aborts. ☝︎
asciilifeform: i think mircea_popescu is suggesting to try with ~input~ block
diana_coman: certainly, but I'm kind of suspicious that it actually works anyway
mircea_popescu: nah, we need to test this properly, with a macroscopically blocking item
diana_coman: so hm, if you have a put_line and then the infinite loop, does that still work?
asciilifeform: (i.e. delay-abort test worx from it)
asciilifeform: err, an async-select control transfer point
asciilifeform: but that actually makes an abort point
asciilifeform: it blocks (for short time)
asciilifeform: diana_coman: correct, if you throw e.g. a put_line in there, the async select worx (from which you can then abort)
diana_coman: asciilifeform, it works aka you checked that it was *blocked* on that i/o when it got aborted?
asciilifeform: ( the idea is, i suspect, that if you have one of ~these~, you fucked yer own proggy at time of writing )
asciilifeform: the 1 thing that you can't async-stop in the zxc model, looks like, is a straight loop with no i/o
asciilifeform: gnat seems to add a stop point when you invoke those
mircea_popescu: problem is you can't put a delay 0 ~inside~ the only thing we fear, which is unix peripheral calls.
asciilifeform: inside the loop, that is
asciilifeform: mircea_popescu: it only worx if you http://btcbase.org/log/2019-02-12#1895105 (i.e. add a 'delay' or i/o instruction (interestingly, the latter always work as abort-point , but only for the async select method ) ☝︎
asciilifeform: mircea_popescu: 'abort point' control transfer aint 'zero cost', lol, it adds cost to ~loops~
mircea_popescu: enjoy our zero cost health services from the confort of your own home!
mircea_popescu: ima brb make some zero cost public services. like the zero cost garbage pickup, and the zero cost hospital, and so on.
asciilifeform: btw this is why i sewed ffa into a linkable lib. ~it~ can still be built with restrictions even if running inside a proggy with tasks etc
mircea_popescu: this is what i was coming to : do you have a better approach to evaluating the putative sjlj runtime cost than the above thing diana's implementing nao ?
asciilifeform: gotta test
a111: Logged on 2019-02-12 13:18 bvt: i expect it will be slower, but it won't hurt to do the check. the impact will depend on how exceptions are used (i don't think it can have any impact on ffa, for example). but i don't have enough experience with it to provide any numbers
asciilifeform: http://btcbase.org/log/2019-02-12#1895234 << ffa uses exceptions strictly as 'fucking stop whole program (and if it's running on a micro, whole machine, and flash 'dead!' lamp) right nao!' , so won't impact. my understanding is that it'd impact only speed of the ~exceptions~, longjump is slower cuz it crosses pages -- cachaistically. ☝︎☟︎