log☇︎
83000+ entries in 0.018s
asciilifeform: ( http://btcbase.org/log/2015-01-10#971993 << thread. possibly elsewhere also. ) ☝︎
asciilifeform: see the classic, https://lwn.net/Articles/629259/ , and the rms thread, re why this is not available for c/cpp gcc
asciilifeform: ikr?
asciilifeform: mod6: http://wotpaste.cascadianhacker.com/pastes/Ibqes/?raw=true << example with w_mul
asciilifeform: and /me considered pasting the example, but turns out it potentially fires in every single line, lol
asciilifeform: so for instance i throw in pragma Restrictions (No_Exception_Propagation); and see "Constraint_Error may result in unhandled exception" and then wonder where,
asciilifeform: pretty great for debugging failures of, e.g., pragma Restrictions(No_Implicit_Conditionals);
asciilifeform: barfs raw ast out of gnat
asciilifeform: in other 'news', '-gnatG' flag is very very spiffy ☟︎☟︎
asciilifeform: http://210.86.180.160/ << lol, readable dirs
asciilifeform: ( they get set afresh each time it muls )
asciilifeform: ( also posted earlier, at some point )
asciilifeform: mod6: they dun need initializing, they are the low and high words of word*word mul
asciilifeform: mod6: see in https://archive.is/DGDu1
asciilifeform: note that our L does not depend on the results of the arithmetic at any point
asciilifeform: same reason i didn't implement fft
asciilifeform: ( only begins to +ev a considerable way above 8192b )
asciilifeform: generalization of karatsuba, but pretty useless for fitsinhead rsatron imho
asciilifeform: mod6: toom-cook ?
asciilifeform: ( and -- damningly -- i can't think of why. )
asciilifeform: http://btcbase.org/log/2017-07-10#1681458 << massive ☝︎
asciilifeform bbl, meat
asciilifeform: if you want ( and we do ) an ABSOLUTE, iron grasp.
asciilifeform: the tightest, in practice, space of all, however, is.. the head
asciilifeform: ( lessay you had to put one in a very... tight space. e.g. 'uci' payload... )
asciilifeform: part of what asciilifeform was even doing re 'p' is answering the q of 'what is the minimal practical rsatron'
asciilifeform: ( esp. if you use muller's delay-insensitive logic )
asciilifeform: or even... mechanical
asciilifeform: aha
asciilifeform: mircea_popescu: aka 'path dependent'
asciilifeform: probably an ada build and a handrolled asm, per cpu make, is best that can be had.
asciilifeform: i don't expect to see many reimplementations, sadly, however, because one of the items of said spec is 'the following ops are in constant spacetime...'
asciilifeform: p ain't a 'code is the spec' crock-o-shit tho. up asciilifeform's sleeve, is an actual spec
asciilifeform: but try and get back lost clarity!!
asciilifeform: we can always get the speed BACK later
asciilifeform: upstack, ffa wants to double as a 'how to rsa' 'b00k' , i.e. at every point tradeoff was made for clarity rather than speed.
asciilifeform: the way folx used to stitch shifters together.
asciilifeform: and if made correctly they oughta plug in for longer arity.
asciilifeform: same principle
asciilifeform: in my mind's eye thing would be a 32kBit-arity alu...lol
asciilifeform: tru!
asciilifeform: but unrolled is moar cacheable.
asciilifeform: constant-arity loops - equally fixed
asciilifeform: ( i dun know of any compelling practical reason to do this, outside of something like a hand-sewn gossipd packet filter in asm on bare iron, for max horsepower )
asciilifeform: but iirc this came up in old thread.
asciilifeform: pretty lulzy, jmpless rsatron then
asciilifeform: e.g. mircea_popescu's 4096
asciilifeform: phunphakt -- if you nail down, to a fixed bitness, the N-arity of the arithmetic, you can unroll all of the loops.
asciilifeform: ( ffa in asm is - somewhat surprisingly - easier than ada or even c )
asciilifeform: in the interest of bootstrapology.
asciilifeform: relatedly, after adatronic 'p' is fully nailed down and flying, i'ma bake one in x64 asm.
asciilifeform: my gnat is mine, but what's in yours - only beelzebub knows
asciilifeform: ftr asciilifeform doing this chore does not excuse other folx from same
asciilifeform: seems like it works - almost astonishingly - as printed on the box...
asciilifeform: mod6: aha. i wanted to see how the bounds checks are done, and whether gcc4.9 takes any liberties with'em
asciilifeform: on -O2 it's surprisingly notbad
asciilifeform: the asm
asciilifeform: of gnat, i mean
asciilifeform: i've been reading, btw, the output
asciilifeform: lol
asciilifeform: ( and -- fits-in-head !! )
asciilifeform: in some critical applications (airplane, rsatron) this is still unacceptable and hence spark
asciilifeform: most you'll get is a stop.
asciilifeform: mod6: you won't physically ever see a segfault in ada proggy built with default 'fascism' level
asciilifeform: mod6: note that 'blow up' still dun mean 'segfault'
asciilifeform: every single time it was 'guess wat, this is How It Works in the adult hut. for reasons that Make Sense'...
asciilifeform: quite possibly i'dve given up long ago if not for this repeated experience
asciilifeform: 'oooh hey turns out, Right Thing'
asciilifeform: every time, to date, when i bashed head against wall and went 'WAI DOES IT DOOO THAT!1!!1' i ended up repenting
asciilifeform: ada is a thing for a reason, i found. hence this entire thread.
asciilifeform: slice has own bounds, the correct ones.
asciilifeform: nope.
asciilifeform: aha.
asciilifeform: every. time.
asciilifeform: they get checked against the bounds
asciilifeform: wrong
asciilifeform: about which you can prove particulars.
asciilifeform: in that they are replaced with a far more constrained item
asciilifeform: rid.
asciilifeform: in much the same way as 'in' parameters (in ada procedures)
asciilifeform: upstack, array slices ( which commonlisp also has ) are important to being rid of having to use c-style pointers
asciilifeform: (no_implicit_loops pragma iirc)
asciilifeform: ( behind the curtain )
asciilifeform: seekrit : in the 'most fascist' restriction mode, ada... copies slices
asciilifeform: worst of all worlds.
asciilifeform: and bloats the algo.
asciilifeform: nope. blows the cache.
asciilifeform: that's a copy, we do this also sometimes.
asciilifeform: *slice
asciilifeform: that ain't called a sloce
asciilifeform: no!!!!
asciilifeform: so you can get it back from a slice
asciilifeform: and ergo retain the original's indexing.
asciilifeform: slices are not arrays in their own right, they are offsets into another array
asciilifeform: though i also found it at first difficult to understand why.
asciilifeform: because not doing it would lead to increased ugly.
asciilifeform: mircea_popescu: it ain't tho.
asciilifeform: rot13 spoiler: Nqn neenl fyvprf xrrc gur 'Svefg naq 'Ynfg bs jurerire va gur cnerag gurl pnzr sebz! sbe fbzr ernfba guvf vf abg zragvbarq naljurer ohg va gur fgnaqneq. Xnengfhon bs pbhefr raqf hc vaibxvat gur onfrpnfr zhygvcyvre jvgu fyvprf gung qba'g ortva jvgu mreb, naq gb qrfgvangvba neenl gung yvxrjvfr qbrfa'g. Fb jr tbggn abeznyvmr.
asciilifeform: incidentally, (imaginary) prize to the first d00d who understands why this had to be rewritten with the loops indexing from 0 .. L-1, rather than, e.g., for i in X'Range ... as formerly
asciilifeform: so may as well get head start.