asciilifeform: and btw for so long as one either a) refrains from bytewise addressing, period or b) addresses bytes of a word via b0 := W and 0xFF, b1 := shr(W, 8) and 0xFF, b2 := shr(W, 16) and 0xFF , ... , etc -- you dun create endianism problem.
asciilifeform: ( given as you never operate on anyffing that came down the wire without passing checksum )
asciilifeform: mircea_popescu: the beauty is that there's no actual need to standardize one.
asciilifeform: ( you let it emit precisely e.g. 512byte into a preallocated buffer that never moves ; the ip it came from, into a 32bit , and that's it )
asciilifeform: imho there's no particular shame in wrapping an os call that doesn't have possibility of overflows
asciilifeform: diana_coman: then you may want to wrap unix recv() as i described ( can use my mmap example )
asciilifeform: but for certain things 'stream' is actually the correct abstraction (e.g. the variable-length tx in classical btc block)
asciilifeform: they baked this sad into file i/o also ( hence how it shows up in 'horsecocks' )
asciilifeform: it presumes that you want unbounded bags of octets
asciilifeform: sorta like the idjicy of gnat's builtin unix cmdline handling
asciilifeform: diana_coman: currently you're only stuck with streams on acct of gnatsockets peculiar design
asciilifeform: supposedly will arrive by end of next wk ( in practice, whoknows, iirc the last shot was 1 week of postage and 5 of orc customs )
asciilifeform: BingoBoingo, mod6 , ben_vulpes : ordered ! 308.28 orcbux ( 62.18 of'em orc fee, 37.21 -- postage, the rest -- 8 drives and pack of 20 adhesive hedgehogs )☟︎☟︎
asciilifeform: ( imho the tradition where 'just about errybody's little endian, but we spend cpu and flip bytes erry time we send something because in 1989 somebody had a pdp' is asinine )☟︎
asciilifeform: ( afaik udp doesn't give guarantees of integrity, at least on all systems, so you're stuck with embedding checksum even if you weren't doing crypto authentications )
asciilifeform: to round out thread, http://btcbase.org/log/2018-09-14#1850330 << in my orig udp attempt, i dispensed with the traditional 'gotta be in network byte order (tm)' doctrine, in favour of 'if packet doesn't pass muster, THEN flip the endianism and try again 1ce'☝︎☟︎
asciilifeform: ( tho will add, ada Strings actually work with arbitrary garbage, given as they do not use the idiot c 'null termination' paradigm )
asciilifeform: ( tho naturally you won't use ada String for arbitrary octetolade. but same principle. )
asciilifeform: http://btcbase.org/log/2018-09-14#1850298 << i'll add to this, that i've been to hobo encampments and found them to be... ~substantially~ cleaner and better organized than the 'open sores' atrocities. i suspect that the shitgnomatic level of horror is only found in dilapidated third world psych wards where inmates live in own shit.☝︎
asciilifeform: but nao that i think about it, iirc mircea_popescu maintains currently a mswin eulora client, so you might be stuck with gnat's.
asciilifeform: ( the appeal of 'own gnatsockets' is similar to that of what i did with mmap : adacore's implementation is quite obese on acct of handling winblowz and other broken os )
asciilifeform: then again if you write 'own gnatsockets' you would have to do what i did for 'horsecocks' mmap system and actually handle all possible unix eggogs (granted there are not many of these for udp)
asciilifeform: so in this model you'd have 2 routines, 1 which takes a port, listens on it, and comes back 'someday' with a 512byte buffer fulla packet and the originator ip ; and another that eats a 512byte buffer and a dest ip, and returns immediately.
asciilifeform: tcp is very difficult to sanely work with without a stream abstraction, but udp -- trivial.
asciilifeform: diana_coman: incidentally, i was initially quite unsure re the wisdom of using the streams. but they are part of the standard and do appear to work as described. however for your application it isn't even clear to me that you need'em , could simply call out to unix's socket routine and get octet array of fixed length (e.g. 512byte) to work on.
asciilifeform: ( i had'em in the 1st drafts of ffa, then abolished , they interfere with proper compartmentalization )
asciilifeform: the only lang feature that gets in the way of this partitioning is 'generics', but iirc diana_coman did not use these anywhere☟︎
asciilifeform: diana_coman: and incidentally ( as you prolly already discovered ) you can keep the restrictive flags, on the subset of the coad that doesn't use tasking. ( and this applies in general )
asciilifeform: i then wrote the mmap thing, with aim to bake the 'reads and stores blox , then O(1) tx retrieval' demo, but never got a chance to glue the two together
asciilifeform: ( what it was, was simply a btc block and tx reader, i fed an entire noad's 'dumpblock' chain into it, plus a buncha randomly bitflipped mutilations, behaved correctly )
asciilifeform: diana_coman: re streams, you may find the 'buf_streams' item in horse.tar.gz interesting
asciilifeform: diana_coman: currently i am lacking a bigendian iron (or a gnat for such) so never got a chance to truly and properly test endianism conversion (as for ffa, it is endian-insensitive, but this is simple where there is no networking)
asciilifeform: BingoBoingo: but if you're feeling energetic, why not go nao.
asciilifeform: ( interestingly -- wrote all blox without even 1 eggog )
asciilifeform: BingoBoingo: dun have to be right now, can go in the morning. and when you do, also plz retrieve the 2 retired usb stix from dulap, they've been zero'd
asciilifeform: BingoBoingo: didja remember to take photo ?
asciilifeform: BingoBoingo: i for one can't think of who exactly lies in bellcurve below folx who will sign up for 'pay now, see wtf it is later'
asciilifeform: started out as quasi-physical totem of some kind
asciilifeform: BingoBoingo: always? cuz i definitely recall 'any day nao you will see'em in lolmart shelves'
asciilifeform: BingoBoingo: speaking of garza's 'hashlets' thing
asciilifeform: BingoBoingo: i dungetit, what's lower than 'it's a miner^H^H^Hcloud^H^Hpetroladditive^H^Hdentists-don't-want-you-to-know' ?
asciilifeform wonders how many of the still-operating garzas are aware of their ultimate purpose in the scheme
asciilifeform: it's rather like how when they shot lavrentiy beria -- pile the crimes onto 1 d00d, then flush him, and it's as if the enablers 'never happened'☟︎
asciilifeform: btw BingoBoingo recall when the butterfly labs thing likewise came to an end, similarly
asciilifeform: iirc while pirate et al ran pyramids, garza ran the btc equiv of those oldtime scamolas where you mix magic snake oil into yer petrol tank
asciilifeform: y'know, sorta like how the gavin-foundation ran through.
asciilifeform: *lifespan, but let's leave the typo in for effect!1
asciilifeform: gotta wonder, what precisely caps the lifespam of a garza-style op. my guess is that it was never +ev at any point, and d00d simply ran out of his usg-allotted 'capital' to pay the shills etc☟︎
asciilifeform: so 'blow up' is not fully descriptive imho
asciilifeform: BingoBoingo: iirc d00d targeted the very bottom seg of the bell curve from day 1
asciilifeform: BingoBoingo: wouldja happen to have a link to where the sentence ?
asciilifeform: BingoBoingo: i guess 1 usg.rubber only holds so-much jizz, handler finally slipped on a new one and threw garza into the bin