log☇︎
122600+ entries in 0.037s
asciilifeform: it isn't
asciilifeform: working with the 8168 woke me up to the fact that i was wrong when naively thought that hardware were still made by sane folk
asciilifeform: (it can, e.g, readily serve www, or even gossipd etc)
asciilifeform: can even do without disk, for certain applications
asciilifeform: it is possible to make a very useful box where ONLY cpu/ram and nic work.
asciilifeform: well, if anyone can find me a nic !
asciilifeform: *pretend
asciilifeform: where you don't need the 30k lines.
asciilifeform: the thing doesn't fallback to some 'pretent it is 1995' mode
asciilifeform: again, this isn't a case of 'it'll be a 10baseT until i get around to X', it's a case of 'init or go cry'
asciilifeform: outside of museum.
asciilifeform: no one could.
asciilifeform: at any rate, i would have implemented a 10baseT nic driver, IF ANYONE COULD SOURCE THE FUCKING CHIP
asciilifeform: nope. describing the various uses of a comp
asciilifeform: under ddos.
asciilifeform: or serving up www.
asciilifeform: (not even speaking of network disk! or x11 etc.)
asciilifeform: phf: if you'd like to try to, e.g., bitcoin, on a 10M nic, be my guest.
asciilifeform: this is the kind of thing that drives folks to the bottle, to the nuthouse.
asciilifeform: ^ does not successfully run any example of the actual chip i was able to get my hands on.
asciilifeform: oh did i mention that i surveyed other folks' attempts, e.g., https://github.com/ReturnInfinity/BareMetal-OS/blob/master/os/drivers/net/rtl8169.asm
asciilifeform: i had ~all the extant ones brought in (this was a commercial project) and obtained data sheets, etc.
asciilifeform: they are ALL at least as bad as linked item.
asciilifeform: it is a mythical thing, that does not exist on the market.
asciilifeform: that you can buy.
asciilifeform: there ISN'T a 'simple' nic.
asciilifeform: phf: what target ?
asciilifeform: any and all of these are opportunities for deadlocking.
asciilifeform: oh and witness the sheer number of busy-waits, e.g., https://github.com/mtorromeo/r8168/blob/master/src/r8168_n.c#L4885
asciilifeform: and if you think the bios does this for you, you're probably posting from 1995.
asciilifeform: oh did i mention that the pci bus has to be correctly set up also ?
asciilifeform: phf: nope. it wedges.
asciilifeform: everybody simply took vendor's magic routines.
asciilifeform: i suspect that NO ONE has ever drivered this thing from scratch. not the winblows folks, either.
asciilifeform: if the thing dun go, there is physically no way to determine why it dun go.
asciilifeform: none of the warmup process is in any sense debuggable, either
asciilifeform: and evidently i kept missing some detail.
asciilifeform: phf: the thing needs real-time interrupt handling just to init.
asciilifeform: and ended up with a thing that, per the data sheet, ought to work, but never did.
asciilifeform: i actually sat for 6 months or so and reimplemented this thing in asm
asciilifeform: (1000s of lines of magicola)
asciilifeform: and a good chunk of it is https://github.com/mtorromeo/r8168/blob/master/src/r8168_n.c#L11871
asciilifeform: https://github.com/mtorromeo/r8168/blob/master/src/r8168_n.c << 13,255 lines alone
asciilifeform: i hunted for years and found what imho is the simplest GB/s-capable nic, the rt8168. here is the linux driver, https://github.com/mtorromeo/r8168/tree/master/src ☟︎
asciilifeform: let's do what mircea_popescu asked and work a concrete example.
asciilifeform: thing gets ~less dirty~
asciilifeform: cleaning has a meaning
asciilifeform: i'm not convinced.
asciilifeform: and massive layer of gas mask (with many holes) between them.
asciilifeform: where there's a lisp layer and a liquishit layer.
asciilifeform: welcome to lisp on linux.
asciilifeform: lemme guess, your save-lisp would just ignore the peripherals, which get inited every time.
asciilifeform: (and many of the ones that are, don't read correctly)
asciilifeform: good chunk of'em aren't even memory-mapped.
asciilifeform: the disk controller's ?
asciilifeform: how will you save the nic state registers ?
asciilifeform: and with networked 'disk' this is a regular thing.
asciilifeform: and box that has persistent storage drop out from under it, ever, for any reason, is in a sad state.
asciilifeform: link - saturates.
asciilifeform: the realities, as often is, differ from the idealities.
asciilifeform: i worked at a rupturefarm once where we made a massive cluster of diskless boxen.
asciilifeform: lolfs.
asciilifeform: or logs db. or, or.
asciilifeform: not if you want to do anything resembling, say, bitcoin node.
asciilifeform: phf: unfortunately is is ~not~ possible to do without, e.g., disk dma.
asciilifeform: phf: it is possible to make a useful machine with 0 video (serves x11 over nic).
asciilifeform: cue mircea_popescu: 'it works great on my t40! 640x480 is enough for anyone'
asciilifeform: (i.e. sans proprietary turds)
asciilifeform: phf: we don't even have sane vga on ~linux~ yet.
asciilifeform: lol
asciilifeform: http://support.amd.com/TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf << and before anyone asks, it is neither available in any other format, nor accurately convertible -- is sufficient illustration of my point. flip through it and weep.
asciilifeform: with variable success, sure.
asciilifeform: mircea_popescu: a good chunk of what i've done here since showing up is to try and fill in the gaps in the 'pioneer with arrows in his back' part of my www.
asciilifeform: phf: linux wasn't trying to multiprocessorate every arithmetic instruction etc.
asciilifeform: i have the dead trees, they fill most of a shelf.
asciilifeform: the whole bag of shit is required.
asciilifeform: there is not, and will not ever be, a 10 page useful compression of it.
asciilifeform: and yes, ALL of it is - unfortunately - pertinent.
asciilifeform: mircea_popescu: it is documented, and you won't like it at all, e.g., here -- http://developer.amd.com/resources/developer-guides-manuals
asciilifeform: which is not at all like the naive, reasonable conception pictured here.
asciilifeform: yes. and it made sense to me in '07. but not in '10 when i understood how the actual extant pc iron works. ☟︎
asciilifeform: no, it was a ~reasonable~ point, but when you go and try to actually implement it, on actual iron, it drives you to nuttery. because the thing is encrusted with unfathomable layer of undocumented turdolade and 'no this doesn't actually work, because fuckyou'
asciilifeform: let's say the 8 cores operate on same memory location. how do they maintain cache coherence when writing output ?
asciilifeform: they share the bottleneck.
asciilifeform: mircea_popescu: it dun work because, again, pc arch is retarded. the processors fight over the bus.
asciilifeform: mircea_popescu: believe or not, i thought of this.
asciilifeform: things that the silicon ought to be doing. and ~WAS~ doing in 1976.
asciilifeform: mircea_popescu: understand, addition there is no longer 'ADD rax, rbx' but a pound of type bit checks and possible code paths on failure or type-promotion etc.
asciilifeform: pointing out that the intrinsic complexity far exceeds linux, bsd, whichever c os, kernel.
asciilifeform: spoon of shit in barrel of wine.
asciilifeform: and if you use ANY 'c code in the drivers' you get gabriel_laddel.
asciilifeform: mircea_popescu: the two are really not comparable.
asciilifeform: mircea_popescu: try to understand that linux is barely a thing at runtime. whereas a lisp os has to make up for 10,001 idiocies of the hardware, e.g., lack of garbage collector, lack of type bits in every (yes) machine word that get tested on every (yes) arithmetic operation, etc.
asciilifeform: but mircea_popescu has it, the sane approach involves 0 c and 0 unix, and i came to this conclusion in '07.
asciilifeform: phf: why take my word for it, thing was published, eons ago, read.
asciilifeform: also is.
asciilifeform: mircea_popescu: they're dead ends.
asciilifeform: phf: a MB of hand-written asm, and reliance on x86-32isms, e.g., segmentation, is 'married'.
asciilifeform: movitz is worse yet because it is ~married~ to 32-bit x86
asciilifeform: and the hardware ~is~ shit. boot up one of these (if you can actually get it to boot.) and say hello to 1 fps graphics, disks without dma (you don't know what these feel like until trying personally), nic that works when the moon is full strictly, etc. ☟︎