klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<mjg> heat_: what? it totes has python3
<mjg> -r-xr-xr-x 2 root wheel 5232 Apr 6 04:48 /usr/local/bin/python3.7*
<mjg> -r-xr-xr-x 1 root wheel 5232 Apr 6 03:59 /usr/local/bin/python3.8*
<mjg> -r-xr-xr-x 1 root wheel 5200 Apr 6 01:15 /usr/local/bin/python3.9*
<klange_> 100% certain heat is joking, "Python 4" is not a thing and is not going to be a thing any time soon.
<nortti> I think heat is asking about a binary literally called "python3"
<nortti> oh
<klange_> oh sorry zid made that joke
<heat_> yes, i meant "python3"
<heat_> mjg, i assume you don't have that?
<heat_> i still don't know how anyone's supposed to use python in BSD systems
<heat_> sed thru all python scripts?
<klange_> make a symlink manually?
<klange_> why the fuck do i have an underscore
klange_ is now known as klange
<moon-child> feels like the solution here is an update-alternatives kinda thing
<moon-child> which I think(?) freebsd has an ad-hoc one for java, but nothing more general
<immibis> python ℵ₀
<heat_> moon-child, yeah i mean, or just don't have multiple python versions installed to begin with
heat_ is now known as heat
<heat> im not aware of this being a problem in everything linux
<moon-child> i don't know anything about python, but it doesn't necessarily seem unreasonable to allow having multiple versions installed
<moon-child> I have multiple versions of clang and gcc
<moon-child> actually why the fuck do i have gcc11
<nortti> gentoo also keeps multiple pythons around normally
<nortti> though there is one symlinked to "python" at least
<heat> the BSDs have this weird idea here where they don't provide a fuckin python3 symlink so it's literally uninvokable unless you fucking go around fishing for python3* in your PATH
<nortti> I don't remember than from what I ran freebsd myself, but that was like seven years ago now so it could be I either have forgotten or it was different in the python2 times
<nortti> (I do know for example that macos has stopped providing a system python with the python3 transition)
<nortti> *that
<heat> and, you know, if no one ever needs multiple python versions installed in linux distros, you may not need it in your BSD system either?
<nortti> I just said gentoo does that
<moon-child> $ where python3
<moon-child> /usr/bin/python3
<heat> ok, but other ones dont
<moon-child> nortti: ^ macos
<nortti> oh, huh
<klange> 2/3 was a sensible thing to have both of, but individual py3 releases likely serve little purpose
<moon-child> wasn't there some compat break at some point?
<moon-child> minor. But within the py3 series
<heat> the only thing I can think of is weird source-based distros (including BSDs) having weird compat issues building from source so they want multiple pythons
<heat> yes, python sometimes breaks compat
<nortti> new releases of python have dropped parts of stdlib at least
<heat> but its minor and you fix it and move on
<nortti> and 3.14 (I think) will drop more, including cgi
<klange> those things that get dropped from the standard library get packaged separately anyway
<klange> smaller deprecations within packages are the bigger nuisance
<nikolar> Aren't you supposed to do `#!/usr/bin/env python3`
<mjg> heat: it is probably optional or some shit
<mjg> aha
<mjg> PLIST_FILES= bin/2to3-3 \ bin/idle3 \ bin/pydoc3 \ bin/python3 \
<mjg> python3-3_3 Meta-port for the Python interpreter 3.x
<mjg> this should do it
<mjg> lmao. i considered ordering pizza online, they have an extra cost for a low price order
<mjg> which amounts to over 25% of what it would cost me at another joint
<mjg> not ordering that shit on mere principle
dormito has quit [Ping timeout: 248 seconds]
dormito has joined #osdev
<zid> did you figure out `eselect python python_3.9` yet
nyah has quit [Quit: leaving]
[itchyjunk] has quit [Ping timeout: 250 seconds]
warlock has quit [Quit: Lost terminal]
<heat> mjg, hmm ok thanks
xenos1984 has quit [Read error: Connection reset by peer]
<heat> so sane python is optional, got it
bnchs has quit [Quit: Lost terminal]
<heat> nikolar, /usr/bin/env python3 doesn't work if python3 doesn't exist
<nikolar> Fair enough
<zid> I mean, if python3 doesn't exist, it not working is the correct behavior :P
<zid> "yea that's /usr/bin/grep" not really gunna cut it
<heat> env should fallback to kuroko smh
[itchyjunk] has joined #osdev
xenos1984 has joined #osdev
goliath has quit [Quit: SIGSEGV]
bnchs has joined #osdev
CapEnt has joined #osdev
gog has quit [Ping timeout: 256 seconds]
terminalpusher has joined #osdev
heat has quit [Ping timeout: 248 seconds]
CapEnt has quit [Ping timeout: 256 seconds]
Burgundy has joined #osdev
mavhq has joined #osdev
Burgundy has quit [Ping timeout: 240 seconds]
<mjg> the real bummer is "bsd grep", which genuinely sucks perf wise to compared to gnu grep
<geist> huh that's interesting. i'd assume it'd be faster because it possibly does less
<moon-child> does less in what sense?
<moon-child> it has a crap string search algorithm
<mjg> does less optiomization mate
<mjg> right
<geist> oh i assume it also has generally less switches etc
<geist> and that in general on the average things that are less feature rich may have less conditionals in their path
<mjg> it may be gnu grep has lolo switches which when used cause perf to degrade to bsd level
<geist> but of course, could just be not as optimized as you say
<mjg> however, the fast path is optimized af as far as i know
<geist> yah like if you have it in regexp mode
<geist> that *cant* be as fast
<geist> though i dunno, maybe really fast regexp compilers are marvesl of engineering
<geist> having never written one
<mjg> one of the bsd grep people concedes things are crap but there is some WIP to uncrap it
<mjg> i don't know how it compares to gnu with the patchez
<geist> write it in RUSSSST
<mjg> there is a grep "replacement" in rust and it isd ecently fast, but loses to gnu
<mjg> interestingly it prints matches *faster*, but searches *slower*
<mjg> probably some glibc bullshit
<mjg> rg
<mjg> oh and it can do threading, which whenu sed makes it faster in terms of total real time, as one can imagine
<mjg> gnu grep does not thread
<mjg> really though, bsd grep is several times slower. i got a near 1G file to grep and it takes a minute or so
<mjg> gnu grep sorts it out in seconds
Burgundy has joined #osdev
* mjg makes a sadface
<geist> may also be something silly like how many read() calls it makes, etc
<mjg> it's algos
GeDaMo has joined #osdev
terminalpusher has quit [Ping timeout: 245 seconds]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
k0valski188917 has joined #osdev
k0valski18891 has quit [Ping timeout: 256 seconds]
k0valski188917 is now known as k0valski18891
pkal has joined #osdev
Left_Turn has joined #osdev
slidercrank has joined #osdev
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
dennis95 has joined #osdev
vdamewood has joined #osdev
goliath has joined #osdev
gog has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
zhiayang has quit [Quit: oof.]
Left_Turn has quit [Ping timeout: 265 seconds]
<mrvn> mjg: You can make the regexp (non extended syntax) linear and the search linear. But compiling a complex regexp can then take forever. But who ever greps for such complex things?
zhiayang has joined #osdev
Left_Turn has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
nyah has joined #osdev
Left_Turn has joined #osdev
gog` has joined #osdev
gog has quit [Ping timeout: 264 seconds]
bauen1 has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
gog` is now known as gog
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
Left_Turn has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
Left_Turn has joined #osdev
<sham1> You'd be surprised
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<FireFly> ripgrep is a lot faster in my experience, afaik it also compiles to a DFA and minimizes rather than using PCRE (well I mean, faster assuming you don't use --pcre of course)
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 250 seconds]
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<nortti> mrvn: do you mean BRE by non extended syntax? how do you implement backreferences linearly?
divine has quit [Ping timeout: 248 seconds]
<FireFly> oh, I read it as "actual regular expressions"
divine has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
bauen1 has joined #osdev
<bslsk05> ​swtch.com: Implementing Regular Expressions
<bslsk05> ​www.researchgate.net: Just a moment...
<GeDaMo> "A parsing machine for PEGs"
heat has joined #osdev
terminalpusher has joined #osdev
awita has joined #osdev
[_] is now known as [itchyjunk]
sinvet has quit [Ping timeout: 256 seconds]
GeDaMo has quit [Remote host closed the connection]
GeDaMo has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
_awita_ has joined #osdev
nyah_ has joined #osdev
FreeFull has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
GeDaMo has quit [*.net *.split]
awita has quit [*.net *.split]
nyah has quit [*.net *.split]
GeDaMo has joined #osdev
xenos1984 has joined #osdev
bauen1 has quit [Ping timeout: 256 seconds]
bauen1 has joined #osdev
Ali_A has joined #osdev
bauen1 has quit [Ping timeout: 265 seconds]
bauen1 has joined #osdev
<gog> hi
<sham1> ih
<lav> hi gog
<lav> may you pet me?
* gog patpatpatpatpat lav
Ali_A has quit [Quit: Client closed]
<bnchs> hi lav and gog
<gog> hi bnchs and lav
<bnchs> can i pet you or have pets?
<Ermine> hi gog, may I pet you
* gog patpatpatpat bnchs
<gog> Ermine: yes
* bnchs prrs
* Ermine patpatpatpats gog
* gog prr
* lav prrrr
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
<sham1> brrr
<heat> mjg, if you could bench the same grep query on multiple greps that would be cool
<heat> it's entirely possible most of them entirely depend on libc regex
<heat> or maybe some of them are able to avoid using regex at all
<heat> (in simpler queries)
slidercrank has quit [Ping timeout: 240 seconds]
_awita_ has quit [Ping timeout: 268 seconds]
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
nyah_ is now known as nyah
terminalpusher has quit [Remote host closed the connection]
CalculusCats has quit [Remote host closed the connection]
CalculusCats has joined #osdev
bnchs has quit [Quit: ZNC 1.8.2 - https://znc.in]
CalculusCats has quit [Quit: Meow Meow Meow Meow Meow Meow Meow...]
CalculusCats has joined #osdev
CapEnt has joined #osdev
FreeFull has quit []
cultpony_ has joined #osdev
cultpony has quit [Ping timeout: 240 seconds]
cultpony_ is now known as cultpony
dennis95 has quit [Quit: Leaving]
rnicholl1 has joined #osdev
<heat> mjg, are you the kind of person to optimize /bin/yes
<sham1> Should optimize /bin/true
<geist> depends on if you need to return a locale specific true
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<sham1> Okay GNU
<zid> right-to-left support is important, wouldn't want it to print eurt
<geist> oh heh i literally didn't know about /bin/yes until now
<geist> looks like the man page says it just returns either 'y' or whatever string you pass it
<heat> lol
<heat> yep
<geist> so i guess you could pass it some huge weird string that maybe it would need ot know about?
<zid> I have a makefile I use it in
<heat> GNU yes is super optimized and does several GB/s iirc
<zid> I have a tool that doesn't have an automatic mode and always asks for "(y/n)?" :(
<zid> have to yes | it
<geist> side note i need to internalize the syntax for 'run this and pass it as input' bash syntax i found a while back
<geist> something like
<geist> command << $(command) but i think it was slightly different
<geist> kinda handy for certain situations
<zid> I use the << EOF version, that sounds similar
<geist> something like that yeah
<gog> heredoc
<heat> whatsupdoc
<geist> i think you can use that to pass in input on another FD, etc
<geist> like `foo | (bar 2< $(someother comommand))` or some nonsense
<gog> meowdoc
<heat> worddoc
<gog> bash has all kind of funny constructs for moving stuff between fds
<sham1> updoc
<sham1> New feature for bash
<gog> whatis updoc
<heat> its all good
<mjg> heat: for lulz, yes
<geist> i forget what OS it was i was futzing with, may have been TOPS-20 or some other early OS
<mjg> for realzis, no
<geist> but it had this pretty interesitng command mechanism where you basically set up a bunch of state via a set of commands and then ran the program. ie, you were basically doing something like
<geist> `set input = foo; set output = bar; set cwd = baz; execute program; put result -> file' etc
<heat> oh cool freebsd also batches multiple writes in yes
<geist> like, pretty unweildy, but actually quite powerful. lots of the earlier big mainframe like OSes had stuff like that
<gog> basicaly env vars
<gog> but also not
<geist> you could set up these large chains of programs and terminating conditions ahead of time, and then execute this command program
<geist> functionally pretty similar to modern bash or whatnot, except more explicit
<geist> you could also in the command script set up things like what permissinos to run thigns under, memory quotas, etc
<geist> i think VMS had some similar stuff
<geist> i guess kinda more to the point, it's another case where unix dumped all of that to be simple and then it gets slowly added back over time in a different way
<kof123> i dont have experience, but glimpses of "mainframe' type stuff that does sound about right, setting up input/output/etc.
<kof123> think: batch stuff
<kof123> you want a nice report when it is finished (and the sysadmin or whoever wants accounting details)
<geist> yeah exactly
<geist> probably the analogy would be in the batch days you'd have a punch card describing the job, etc
<kof123> somewhere IIRC courthouses using some ibm stuff, you get charged per db accesses ...this wasnt that long ago, maybe still the case ...
<heat> this anti unix rhetoric is sickening!
<bslsk05> ​'AT&T Archives: The UNIX Operating System' by AT&T Tech Channel (00:27:27)
<kof123> yeah, i think algol or something i saw this like a header re: punch card
<geist> heat: there there
<gog> this is anti-unix discrimination
<kof123> hey now, supposedly es/rc has some fd stuff
<heat> pipelines!!!!
<kof123> more unix than unix!
<kof123> *friendlier syntax
<geist> i do like the idea of things like 'for this set of programs, restrict the FS view to this' kinda things
<geist> we have a bunch of that in fuchsia now, though it's via a different mechanism
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<heat> pledge and unveil!!!!!!!!!!!!!!!!!!!!!
<geist> more modern unixy strategies adds it back with chroot and cgroups and whatnot
<heat> this is theo deraadt's world and we're just side characters
<zid> I'm RMS's side girl
<geist> /tmp is a big one. honestly you should just be able to say someting like 'each program gets it's own /tmp namespace, and/or the shell can point two programs at the same one'
<geist> but really even /tmp is a unix hack because global namespace
<heat> i think you're supposed to use TMPDIR now?
<heat> which on macos points to like ~/.tmp or something
<geist> yah but it's not enforced i guess. in label based oses like VMS you could have say a TMP: path that each process gets or whatnot
<heat> also if possible you also have O_TMPDIR which never actually names the file
<nortti> iirc VMS doesn't really do environment variables?
<heat> it's still fs-backed but unlinked
<geist> sure. i mean that's the modern workaround for the globla 'everything is one thing' good/bad you get with unix
<geist> nortti: it's sort of the other way around. i think VMS leans much more heavily on environment variables
<geist> something NT picked up really: there are multiple levels of 'system variables' that come from various levels of the system
<zid> programs should be launched like CGIs
<nortti> ah, okay
<geist> ie, some are set at the system level, everything sees, and changes are seen in real time, etc
<zid> just 128kB of env strings for how it was invoked
<geist> then user, then job, then process, etc
<zid> wanna know your pid? getenv("PID")
<nortti> I remember someone talking of VMS using like LIB: for where your libs go vs. environment varibles for picking that kinda thing
<geist> but in the case of VMS i think it's basically a syscall to read them, vs it being a blob of private data passed along like you get in unix
<nortti> ah
<zid> (The fact CGIs do this can't be fast, I'm surprised web people put up with it)
<geist> nortti: iirc stuff like drive letters are just system variables. ie SYS: is a variable that says something like 'device:/foo/bar/partition/fs' etc
<heat> CGIs are pretty fucking dead
<geist> but the key is since the sytem variables are owned and known by the kernel, the kernel can actually operate on them for things like open_file()
<nortti> neat
<geist> ie, path substitution can intrinsically use variables
<geist> that's why, for example, changing a dir in VMS is actually `set def <path>`
<zid> only because people just send you a docker container and a unix emulator in javascript heat
<geist> you're setting a local system variable that's basically CWD (i forget the real name)
<geist> so yeah it's kinda like environment variables, but it's closer to jut system strings, some of which are intrinsically operated on by the system, some of which you just set for some specific purpose
<geist> and the different scopes they can live in there's some rules about how a more local scope can override a higher scope (or if they can at all). i dunno those rules
<geist> i think it's a fairly clean idea, honestly. NT picked up some of that, which is why you have systsem environment variables and user environment variables
<heat> sorry can't hear you over /proc/self/environ poking my stack
<geist> ah it's actually a variable called 'default' i think
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/SF4fJ75H
<geist> thats the current path
goliath has quit [Quit: SIGSEGV]
_awita_ has joined #osdev
<mrvn> geist: AmigaOS was better. You could open a file on a floppy, take the floppy out of drive 0 and put it in drive 1 an continue reading. If you didn't put it back the OS would ask you to put it in ANY drive.
<geist> makese sense, if it knows at any time where any given volume is, and it's not aggressively keeping a cache, it would just follow where it happens to be
<geist> apple 2 prodos would probably have a similar effect
<geist> it's volume label based, and it just remembers where any given volume is, or rescans it when it cant find it
<mrvn> geist: yeah, the OS remembers the original path to the file before subtitution of variables and labels.
<geist> yep. prodos is suspiciously similar to VMS in this case: you set the 'prefix' variable to set the current path
<geist> and prefix makes sense, it's basically just prepending it to paths if you dont specifiy a full one
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
<kof123> we can plant a house / we can build a tree / we can make a volume / full of libraries
Burgundy has quit [Ping timeout: 256 seconds]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gog> sick nirvana reference
techmetx11 has joined #osdev
zarock has joined #osdev
<mrvn> "We can rebuild him, we have the technology."
techmetx11 has quit [Client Quit]
techmetx11 has joined #osdev
<heat> gog: gog
techmetx11 is now known as bnchs
<bnchs> hi
<heat> hi
<bnchs> high
<bnchs> hi gog heat
<heat> hi benches
<lav> hi wenches
<bnchs> hi lav
* bnchs pets lav
* mrvn hates mondays.
<bnchs> mrvn: me too
* lav prrr
<lav> nyaa
<lav> miaou
<lav> nya
<heat> lav my cat can't poop
<heat> help
* lav likes lasagne too
<lav> heat: have you tried feeding it?
<heat> yes, she fat
<lav> oh, she?
<heat> yes?
<lav> i thought everyone knew girls don't poop
<heat> ah!
<heat> there it is, thanks!
<bnchs> lav: girls don't poop?
<lav> i'm happy to help ^^
<bnchs> damn
<bnchs> that must be why she's fat
<bnchs> her body just stores everything in fat lol
<lav> nono girls just magic their poop away like the terfs wizards
<bnchs> poopus vaporus
<nortti> I thought the harry potter explanation was that they pooped wherever and then magiced it away
<heat> they what now
<bslsk05> ​www.vice.com: Yes, Harry Potter Wizards Shit Their Pants, It's Canon
<gog> heat
<heat> no?
<heat> they pooped wherever before the 1700s
<heat> therefore harry potter wizards do not shit their pants, lazy journalism, checkmate leftists
<heat> tbf this isn't very far from IRL pooping is it?
<heat> just, you know, poop bucket
<nortti> aye
<bnchs> heat: poop bucket, piss bottles
<heat> now, a real question: do wizards also queef
<heat> the stunning silence means no one is ready to find out
<kof123> heralds don't pun because they cant
_awita_ has quit [Quit: Leaving]
wereii has quit [Quit: ZNC - https://znc.in]
wereii has joined #osdev
<immibis> heat: in famous transphobe JK Rowling's canon, all wizards are biologically male. Biologically female magic users are known as "witches"
<gog> trans wizards
* geist installs an actual physical TPM module
<gog> trans platofrm module module
wereii has quit [Quit: ZNC - https://znc.in]
<gog> adult human magic user
<zid> That's inter-domain wizardy, actually touching hw, gog
<bslsk05> ​www.goodreads.com: Trans Wizard Harriet Porber Series by Chuck Tingle
<gog> oh that's right he wrote that book haha
<zid> You get paid extra for that
<nortti> two of them, even
<geist> heh didn't know chuck tingle wrote in that area
<gog> i didn't know about the second one
<gog> chuck tingle is the 21st century's most prolific author
wereii has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
<heat> whos chuck tingle
<geist> oh boy.
<gog> heat: he writes novels that have ridiculous titles and he puts out a new one every few months it seems
<gog> also they have queer/gay themes
<gog> most of the time sex
<geist> nominated for a hugo award!
<gog> yes
<gog> he writes in many genres
<zid> chuck tingle is no chuck testa though
<gog> including sci fi
<heat> "Tingle presents himself as a taekwondo grandmaster from Billings, Montana, who acquired a PhD in holistic massage at DeVry University (which does not offer such a degree)."
<heat> i like this guy
<nortti> I think he started out in anthropomorphic dinosaur erotica before branching out
<gog> maybe i should read the harriet porber books before he writes a new one
<gog> don't wanna be behind the canon
<heat> all the characters sound like they fuck a whole lot more than ron and hermione
<heat> which is most definitely a very large plus
<zid> That's why I like the swiss flag.
<bslsk05> ​www.amazon.com: Sorry! Something went wrong!
<gog> i know a lot about gun safety alraedy
<geist> wel;l, that was pretty uneventful. updated tpm, switched bios to using it and then windows picked it up
<gog> nice
<zid> I have an AMD so I have a cpu tpm
<gog> i guess i do too
<zid> intel is dead afterall
<geist> i do too, but i wanted to switch to a physical one away from the ftpm
<geist> since will probably updated to win 11 here relatively soon
<gog> but what if you want an ISA bus
<geist> then hypothetically i have a way to move TPM bits with me if i update the mobo after a while, etc
<gog> you can't have the TPM and an ISA bus
<zid> w10 says I am ready for w11, I only just switched to w10 one reboot ago
<heat> why
<geist> ISA schiesse
<gog> y'all haven't seen the devices that adapt a TPM header to ISA
<heat> no
<zid> it's just an exposed ISA bus I take it?
<geist> this particular one is using the SPI TPM bus
<gog> oh
<geist> well, if it's going to be exposed it's probably using the LPC bus
<zid> so you can turn it back into a full slot
<gog> well it's LPC
<geist> which is what ISA is nowadays
<geist> yeah
<geist> side note: saw some hackaday the other day where i got wired up a LPC -> ISA slot bridge thing
<geist> so he could use a ISA soundblaster on a modern machine. works
<gog> yes
<geist> thus somewhat proving that LPC does what it says it does and is just a serialized ISA thing
<zid> yea wouldn't be surprsing if somehow it'd "forgotten" how to be compatible over the years
<zid> so it working is nice
<geist> well i mean stuff like does a lot of the really legacy stuff get pushed that hard anymore. ISA DMA, etc
<geist> that has a tendency to get broken and no one cares
<zid> hardware bitrot
<zid> in the feature set and robustness
<geist> yah
<geist> this particular machine has a thing on the bus, in the form of one of the nuvoton superio chips so it can do ps2 and serial
<immibis> the device you're thinking of might be called the dISAppointment
<geist> but i bet a fair amount of machines that dont have that dont populate anything on LPC
<bslsk05> ​hackaday.com: ISA Over TPM To Your PC | Hackaday
<geist> ah yeah, makes sense. so i guess other than the SPI tpm interface some tpms just use LPC. that makes sense
<zid> I'd like a superio breakout mobo
<geist> and i can see how that might take out your superio chip if it does. i should double check that it hasn't here, but i explicitly got the ASUS SPI_TPM interface version
<zid> like, we all have these mega amazing superio chips
<geist> zid: yeah totally, like the best nuvoton chip you can get with everything broken out
<zid> but nobody actually connects half the pins to headers
<zid> if you're lucky you get a serial header
<geist> i dunno precisely how much config they require. may have firmware the bios squirts over, etc.
innegatives has joined #osdev
<zid> they don't, afaik
<geist> yah i always buy machines with a serial header, which basically requires a superio somewhere
<innegatives> Can x86 instruction have both an displacement and an immediate?
<zid> I scanned over the data-sheet and they were honestly pretty simple looking
<immibis> probably because you now have PCIe ports to plug things into
<zid> Speaking of which, I need to plug my pci-e usb card in so I can play the new hololive fighting game
<zid> my controller only speaks OHCI
<geist> innegatives: oh gosh, i dunno. every time i say something definitive about x86 somene comes up with a counterexample
<geist> i'd generally think no? but then i'm probably wrong
<zid> what would it.. achieve?
<zid> I'm going to go "hard no", I'm not a wi mp.
<geist> also probably depends on what 'slots' the immediate and the displacement are in
<geist> something like mov immediate, displacement(register) i guess is totally possible
<geist> so in that case yes
<zid> hmm, maybe shl [rax+48], 4 or something?
<geist> but an immediate and displacement on the 'same side' of the isntruction probably no
<zid> yea agreed about the same side
<innegatives> im just trying to understand bit pattern for when there's both immediate and displacement, does displacement come first before the immediate?
<geist> that you need the manual
<geist> no use asking humans when that's a perfect manual question
<zid> Multiply r/m64 by 2, imm8 times.
<zid> til it exists
<zid> REX.W + C1 /4 ib SAL r/m64, imm8
<geist> but in general yeah i forget if the raw instruction is mostly dest, source or source, dest
<geist> since the asm syntaxes cant agree, there's no real reason to believe it's either way
<geist> and it's not really that regular anyway, since the various extension bytes might contain info about either arguments
<geist> but definitely if there's at least two sets of extension bytes, there has to be a particular order
<geist> actually honestly probably easiest to just assemble and then disassemble it to see what the assembler does
<innegatives> ok thx
<zid> I mean, that's precisely what was suggested to him the other 5 times he's done this :P
<innegatives> here's how my emulator is coming along: https://github.com/jafarlihi/core86
<bslsk05> ​jafarlihi/core86 - [WIP] 8086 emulator (0 forks/7 stargazers/MIT)
<geist> i've been thinking of writing (or rewriting my existig) emulators in rust just because
<zid> port my gameboy emu to rust geist
<zid> my cpu.c is only 2300 lines
<geist> oh you mean the one using the Z80!
<zid> ~z80
<geist> i know you love it when i say it's a z80
<geist> that gameboy, with that z80 in it
<bslsk05> ​github.com: gameboy/cpu.c at master · zid/gameboy · GitHub
<zid> I partially macroified it but never finished
<zid> just half the loads
<geist> also sircmpwn, who is someone else now that i keep forgetting, used to complai when i said something about z80
<geist> yah i had my own Z80 emulator that i never quite finished
<zid> (It also still has my stupid dispatcher for CB prefix, heh)
<heat> its ddevault
<zid> It is however, a very accurate gameboy emulator
<geist> https://github.com/travisg/emu/blob/master/cpu/cpuz80.cpp most f*cking irregular cpu ever
<bslsk05> ​github.com: emu/cpuz80.cpp at master · travisg/emu · GitHub
<zid> significantly more accurate than everything but a couple of extreme accuracy ones
<geist> mostly WRT flag calculation which is a nightmare compared to cleaner arches
<zid> There's an instruction you can run to see if if a cpu is x86, z80, or gbcpu
<zid> DAA
<zid> they set the flags completely differently, each
<geist> there ya go
<geist> i'm still pretty impressed with the completely cycle accurate, time accurate emulator that someone wrote in asm for a PIC that runs on the altairclone
<zid> mine is sub-cycle accurate :(
<geist> it even passes all the battery of CP/M level tests for 8080
<geist> though i guess to be fair it's emulating an 8080 not a z80
<geist> and blinks leds while it's at it
<zid> I'd do time-accurate if it were really possible on a PC
<zid> just put idle cycles in until rdtsc agreed or whatever, but then you get scheduled out and lose 10ms
<geist> yah clearly this thing must be written in hand assembly, though i remember looking up the PIC it's running on and it's *only* like 32Mhz
<zid> and your 'lower input lag by sampling the button inputs near the end of the frame' turns into 'everything is a frame late because you missed vblank'
<geist> so that'll be pretty tight to do a full system emulation and still be timing accurate
<heat> you've seen holyc, now cursedc: if (InsertStr == (char *)NULL) {
<zid> that's cursedC++ isn't it
<heat> no
<zid> casting void pointers is a C++ thing
<heat> you don't cast NULL in C++
<zid> explain (char *)malloc()
innegatives has quit [Quit: WeeChat 3.5]
<kof123> c89 has some statements there may have once been a reason for it
<kof123> the heat thing, not the zid
<kof123> *draft. i dont know about the final
<heat> because https://godbolt.org/z/a8EhK7eeb tadaaaaaaaaa
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> what am I supposed to do with this
<heat> integers can still cast to pointers implicitly
<zid> okay?
<heat> at least 0 can
<zid> Not sure what relevence that has
<heat> NULL must be a 0 or a nullptr
<zid> there's a specific line in the C spec to do with null pointer constants etc, this is about void * being a compatible type with char *
<heat> not (void *) 9
<heat> erm, (void *) 0
<geist> i think it also has to do with a null pointer needing to be 'false'
<geist> and thus a integer value of 0 or something
<heat> NULL explicitly cannot be a void *
<zid> So you're.. backing me up then?
<kof123> eh, see c-faq.com or whatever it is
<kof123> at least for ye olde rules
<gog> #define NULL (int) 1;
<heat> gog, you're chaotic good
<zid> trans-good more like
<heat> the 1, the int cast, the implicit ;
<gog> gender chaos
<zid> gender weird syrup
<zid> gender goo
<zid> what colour is gender fluid btw
<heat> purple
<gog> i should buy an apple ii
<zid> apple ][
<gog> i prefer the apple //
<heat> --
<zid> app][e
<zid> heat is downvoting our map pick
<heat> what are you picking?
<heat> i pick de_mirage
<gog> the_bridge