log☇︎
153500+ entries in 0.096s
apeloyee: you sort them at the biginning, using a mux.
apeloyee: let a, b be inputs; a > b. shift b left so that it has one digit less than a (using CLZ and secretshift), subtract b from a repeatedly (at most thrice). b:= new result, a:=b
asciilifeform: apeloyee: if you can think of a subquadratic constanttime gcd, plz do write in
asciilifeform: hm, i must've been thinking of some other gcd algo, because lehmer's is a definite dead end.
asciilifeform: currently i suspect that it is possible to constantize lehmer's logn gcd.
apeloyee: just do some muxes in the end. 2*bitness divisions obv suffice (actually less, but I'm sleepy now)
asciilifeform: ( and still not constant time )
apeloyee: I'm simply saying trial division is better than what you have
asciilifeform: why do you think constanttime gotta be, apeloyee ?
apeloyee: you gcd is O(N^3), and so is trial divisiom
apeloyee: asciilifeform: just do trial division.
asciilifeform: save massive time
asciilifeform: want to gcd(candidate, biggestprimorialthatfitsintheffabitness) ☟︎☟︎
asciilifeform: for the initial sieve ~prior~ to miller-rabin ☟︎☟︎
apeloyee: now let's try generalizing to standard barrett (the error will grow to 2 of course). let L be number of digits in N: 2^(L-1) <= N < L. L is calc'd with the CLZ algorithm
asciilifeform: eagle eyes, apeloyee . i dun suppose you have a constant time gcd up your sleeve ?
deedbot: asciilifeform updated rating of apeloyee from 1 to 2 << A - N*floor(A*R/4^K) < 2*N
apeloyee: and in one side only, as obv can't be bigger than (A/N)*4^K
apeloyee: which is equal to (A/N - 1)*4^K
apeloyee: A <4^K, so the above strictly >(A*4^K)/N - A.
apeloyee: let rewind. A*R = A*(4^K - B)/N = (A*4^K)/N - A*B/N; as B <= N, then the previous >= (A*4^K)/N - A. clear?
asciilifeform: let's start with the above
asciilifeform: dunno if i do, still trying to swallow the proof.
apeloyee: A - N*floor(A*R/4^K) < 2*N <- do you agree with this? (the proof is unnecessarily complicated in that paste)
asciilifeform: i can read, and see this. but why is it 1 ?
apeloyee: barrett original needed two
apeloyee: in the posted version exactly ONE is needed
asciilifeform: was 3 in barrett's original proof. but with doublewide c, looks like only 1 ? ( though i do not yet have a proof for this )
apeloyee: why three?
asciilifeform: neato apeloyee , ty.
asciilifeform: adds exactly one sub-and-mux to the existing 3.
asciilifeform: oh hm this worx.
asciilifeform: apeloyee: so what'd the correction step look like, with the pseudoquotient
apeloyee: we had that thread today!!! ☟︎
apeloyee: meaning you divide 4^K - 1 by the modulus, not 4^K
apeloyee: if N is 2^(K-1), then ordinary quotient won't fit in K+1 bits. but pseudo-quotient (one less the actual quotient) still works.
apeloyee: in that link
a111: Logged on 2017-10-05 16:15 asciilifeform: the (unsurprising) surprise is that ^method is wholly absent from the public lit
a111: Logged on 2017-10-05 18:20 apeloyee: asciilifeform: ok, how it's different then from http://btcbase.org/log/2017-09-20#1716301
apeloyee: btw, i'd like to know the answer to http://btcbase.org/log/2017-10-05#1721304 ☝︎
asciilifeform: same thing we do for the wholeword shift
asciilifeform: ( example : if wordbitness is 64, any subword shift is from 0 .. 63, and therefore can be expressed using 6 muxgated shifts . )
asciilifeform: though it does look like it'll have to do log2(wordbitness) shifts for the initial subword slide, rather than 1, to avoid leaking on machines without barrel
asciilifeform: ftr apeloyee has entirely valid, imho, algo, but terribly confusing pseudocode
trinque: but this is getting ridiculous
trinque: when I get around to it sure
asciilifeform: and possibly he will agree to swap it in.
asciilifeform: apeloyee: please make a new one ? and give to trinque , signed with old
apeloyee: no thinking that i can think of.
mircea_popescu: apeloyee what was the thinking there ?!
asciilifeform: subkey, to be specific.
asciilifeform: why didja make a key that expired in weeks, apeloyee ?!
asciilifeform: ( in trinque's planet, but not yet here )
trinque: yes, and I barfed the key out of same gpg to put it on the wot site
mircea_popescu: trinque well in fairness, it does say BAD right there in the leadup
trinque: apeloyee: gpg: BAD04B14A4545828FABCE63C3DB30625393C0BB1: skipped: unusable public key << gpg has this to say about your fp ☟︎
apeloyee: per spec the bitness is a power of two
asciilifeform: and i suspect that he is right that it would beat doublewide-x variant.
apeloyee: I assumed the elementary shift doesn't leak. whatever, just do the sub-word shifts with the same algorithm (with word size 1)
asciilifeform: not only an idea, but afaik the only practical method that isn't W-shifts-by-1-with-mux
mircea_popescu: a hey that's actually an idea.
asciilifeform: this is in fact cheaper than knuth div.
asciilifeform: you shift by all possible whole word shifts, and mux-keep the correct one; then shift by all wordsize-1 possible subword shifts, and muxkeep the right one.
asciilifeform: hm i think i finally see what algo apeloyee was trying to implement ( the pseudocode doesn't actually do it )
apeloyee: goddamnit. it's FIXED!!! first sub-word one (which doesn't leak in our model), then by 1 word, then by 2, then 4, 8 and so on
asciilifeform: second, ~any~ wholeword shift leaks info re the shift amount, because different address sequence .
asciilifeform: first of all, didja ever say how to dispose of the 'while' statement ?
apeloyee: yes, the sub-word shift
asciilifeform: apeloyee: it ain't log(bitness) ! not if you don't want to leak any info re the shift amount.
apeloyee: asciilifeform: write to gmp authors that you got your 4096-bit mul faster than that.
trinque: apeloyee: you tried sending a private message to deedbot with !!up ?
apeloyee: log(bitness) passes over and the same number of muxes are "massive costs" in your universe?
a111: Logged on 2017-09-21 16:22 asciilifeform: !~later tell apeloyee i studied your algo, it (aside from truly massive cost, that would annihilate savings from newton, or barrett, or just about any other trick) ~still leaks~, because shifting by >wordsize is a fundamentally different op from shifting <wordsize; and the only way for this to not be true is for all shifts to happen as a series of wordsize shifts; and a shift by ffawidth-1 (max shiftness) would then consist of ffawor
mircea_popescu: well excepts are not good signs are they ?
apeloyee: (except the first sub-word one)
mircea_popescu: trinque http://btcbase.org/log/2017-10-05#1721246 << any idea what this is ? ☝︎
apeloyee: the operations themselves leak anyway. i thought they shouldn't leak operands?
mircea_popescu: apeloyee but now you can tell what size the shift was, to some degree, by timing.
apeloyee: a shift by multiple of the wordsize takes considerably less time than by not << and a multiply takes more time than add, what.
asciilifeform: and to make this untrue, you gotta do W (bitness of ffa) shifts by 1, at all times.
asciilifeform: a shift by multiple of the wordsize takes considerably less time than by not
apeloyee: leaks _what_? it does the same fixed shifts, regardless of operands
ben_vulpes: will bring bot to spec.
asciilifeform: your secret shift leaks timing, apeloyee
asciilifeform: apeloyee: didja deliberately ignore my observation where multiword shift is intrinsically different timing than subword ?
mircea_popescu: ben_vulpes technology is built by steps. so far, being able to put in machine terms a "ask all the bots see which one mentions 'payments' as a string" is a legitimately useful ability.
mircea_popescu: the part what's under discussion is the ~why~ nobody implemented the json/sexpr part of the spec./
ben_vulpes: and what, a machine-understandable description of what each extra-spec command does? i didn't think anyone here operated machines that /thought/.
mircea_popescu: well yes. the part where the spec should be followed is not under discussion.
ben_vulpes: the response from the bots to what they can do. either they're all spec-compliant, respond the same way to the same set of commands, or they don't.
apeloyee: and ftr secret shift does work. if asciilifeform thinks it's slower than division, he must be chugging really strong stuff.
mircea_popescu: but practice aside, shouldn't i have the ability to query a bank of seated whores, "what can you do ?"
mircea_popescu: exactly like the original url worked, in practice the spec never delivered this magical ability to query servers for resources to the end user.
mircea_popescu: well the original case was to end up with a proper universal api.
ben_vulpes: i am struggling to see the case of ever. someone programming against bots should read the help themselves and implement the api described.
apeloyee: asciilifeform: ok, how it's different then from http://btcbase.org/log/2017-09-20#1716301 ☝︎☟︎
mircea_popescu: now the question here is, do we actually want to ditch the machine portable portion of the help ?
mircea_popescu: ok so results of audit : Framedragger, shinohai, phf : your bot has no help implemented whatsoever, in spite of spec. trinque Framedragger you don't follow the json/sexpr portion, bot simply puts out the same help. ☟︎☟︎
lobbesbot: mircea_popescu: (help [<plugin>] [<command>]) -- This command gives a useful description of what <command> does. <plugin> is only necessary if the command is in more than one plugin. You may also want to use the 'list' command to list all available plugins and commands.
ben_vulpes: mircea_popescu: ty