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
<mrvn> K.Lange: I see
Bonstra has quit [Ping timeout: 246 seconds]
nanovad has joined #osdev
MiningMarsh has quit [Read error: Connection reset by peer]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
smach has quit [Remote host closed the connection]
MiningMarsh has joined #osdev
lkurusa has joined #osdev
Celelibi has quit [Remote host closed the connection]
lanodan has quit [Ping timeout: 265 seconds]
lanodan has joined #osdev
Celelibi has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.7.1]
MiningMarsh has quit [Read error: Connection reset by peer]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
dude12312414 has joined #osdev
<kazinsal> yeah I've mentally always rhymed it with flange
* kazinsal ducks
<klange> y'all are getting bans for christmas this year
<Mutabah> Hey, you've never provided a pronounciation guide
<Mutabah> (At least, not here)
<Mutabah> So technically, this is your fault :)
<moon-child> 'rhymed with flange' likewise
<klange> There was a discussion on the matter in this channel's pedecessor circa 2018.
<gorgonical> the website does specify how to say it tho
<moon-child> hmmm it's hard to tell because my logs are spread over 3 computers, but I _think_ I wasn't there at the time
<moon-child> one log drops off in aug 2018 (nothing for 'pronounc' there), and another picks up in 2020
<gorgonical> I assume that it's said the way it's written on the toaru website right
rwxr-xr-x has quit [Ping timeout: 264 seconds]
gorgonical has left #osdev [Changed major mode]
epony has quit [Ping timeout: 268 seconds]
[itchyjunk] has quit [Ping timeout: 260 seconds]
[itchyjunk] has joined #osdev
gorgonical has joined #osdev
gorgonical has left #osdev [Killed buffer]
gorgonical has joined #osdev
MiningMarsh has joined #osdev
<graphitemaster> I always thought it was pronounced. Kay, Lang, ee
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
rwxr-xr-x has joined #osdev
<rwxr-xr-x> well shit yall
<rwxr-xr-x> i had a 103 degree fever
<rwxr-xr-x> now at 102.4 but holy
<rwxr-xr-x> any tips to get sleep tonight???
<gorgonical> There's a trick you can use: take a very hot bath, as hot as you can tolerate safely. Then when you get out, try to go somewhere cooler. The drop in body temperature supposedly helps make you tired. Might help relax you and get you to sleep
[itchyjunk] has quit [Remote host closed the connection]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<geist> huh i wouldn't have thought that, but that just might work
<moon-child> once I was rather sick and had a fever and a friend told me to take some codeine. I think it helped somewhat. Though I think it's not otc in the west
<zid> it's otc in the uk
<zid> but only blended with paracetamol
<gorgonical> and also in mexico. I don't know about the us though
<zid> I think fentanyl is otc in the US at this point :p
<moon-child> yeah it was part codeine, part paracetamol
<zid> What you want is a pint glass full of vodka, dramamine, ephedrene, heroin, etc
rwxr-xr-x has quit [Remote host closed the connection]
MiningMarsh has quit [Ping timeout: 255 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
epony has joined #osdev
MiningMarsh has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<zid> heat: it's almost day 8, better hurry up with day 7
dude12312414 has joined #osdev
xenos1984 has quit [Quit: Leaving.]
heat has quit [Ping timeout: 256 seconds]
<gorgonical> I just realized I have a problem with my forth interpreter that should have been obvious a month ago but wasn't thinking about
<gorgonical> That my load address won't be 0x0. lol
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
MiningMarsh has quit [Read error: Connection reset by peer]
<zid> Took me longer to remember how to print in green than anything else I think re advent :p
<gorgonical> Is there some way to solve the problem I've got without writing a reloc table and system?
<gorgonical> Seems like the assembler should be able to do this right?
<gorgonical> zid: I wish I was better about the aoc but I always fizzle out by about day 10
<zid> yea I fizzle around day 15 usually
<gorgonical> it doesn't help that I usually overload my aoc and try to use some language I am only passingly familiar with
<gorgonical> "it'll be a good reason to learn erlang!"
xenos1984 has joined #osdev
bgs has joined #osdev
MiningMarsh has joined #osdev
hussein is now known as nur
bgs has quit [Remote host closed the connection]
rorx has quit [Ping timeout: 252 seconds]
rorx has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
Burgundy has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
gorgonical has quit [Remote host closed the connection]
<epony> liquidungtalkmatricebroke
gog has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
heat has joined #osdev
paulpaul1076 has quit [Read error: Connection reset by peer]
VY2 has joined #osdev
<zid> heat I spy you
<zid> did you do day 5 7 or 8 yet
GeDaMo has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
\Test_User has quit [Ping timeout: 264 seconds]
hextuff has quit [Changing host]
hextuff has joined #osdev
VY2 has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
\Test_User has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
Brnocrist has joined #osdev
nyah has joined #osdev
TkTech has quit [Ping timeout: 252 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<heat> zid, I did 5, didn't do 7 nor 8 yet
<zid> show 5 thn
<zid> I did 8, then taught james chen some tetris, then had a bath while I was waiting for you
<bslsk05> ​github.com: aoc2022/day5.c at main · heatd/aoc2022 · GitHub
<zid> I need to rewrite my 5 not to suck really
Burgundy has quit [Ping timeout: 248 seconds]
<zid> yours looks complicated
<heat> it kind of bit me in the ass because I'm gonna write a list_head impl anyway for 7
<heat> why
<zid> just visually it does a lot
<heat> it's a stack implementation using a vector
<heat> actually allocates 2^n so it's ~O(1) insertion
<heat> just like std::vector
<zid> https://gist.github.com/zid/82dac0453e984be7c1fb08ce37a53617 my day 5, but it's similarly complex and ugly
<bslsk05> ​gist.github.com: 2022-day5.c · GitHub
<heat> I don't think mine is complex nor ugly
<zid> It doesn't encode the concepts as the source very 1:1 is my issue
<heat> i just needed to write my own stack because this is C lol
<heat> oh sure, but I want to reuse the stack bit probably
<zid> this needs cleaning up still
<zid> the ifdef does nothing, 118 and 119 should be below 121, etc
<heat> I can ^C and ^V and change a few types and I have a stack for the next days
<zid> and I really should have done something more clever than fully walking the list to do the initial data insert :p
<zid> like tracking a tail pointer
<heat> i'm planning to actually reimplement struct list_head for 7
<heat> it seems saner
<zid> then insert is just *tail = *n; tail = n; or whatever
<zid> I just used an array for day 7, it's insert only
<zid> leaf [MAX]; int leaf_count;
<heat> you know, if I were doing this in BSD I could've just used sys/queue.h
<heat> chad BSD vs virgin GNU plus linux
<zid> I'm doing C with no re-use except between levels
<heat> no re-use?
<zid> no stackoverflowing
<heat> oh sure
<zid> only if I wrote it on day 4 can I copy paste it to day 7
<zid> not if I wrote it last year, or I know list.h exists etc
<heat> but sys/queue.h is apart of the BSD libc
<zid> apart of it?
<heat> yes
<zid> (that's the opposite of a part of it)
<zid> english is fun
<heat> a part
<heat> whatever
<heat> fuck off
<zid> a- is a prefix for not, and a is the indefinite article, so it goes from 'one x' to 'no x' if you miss the space
<heat> you would just be using the facilities granted to you by the CEO of libc
<zid> what's in the libc isn't C though so I won't be doing things like that
<zid> no strfry
<zid> from glibc
<heat> how is it not C?
<zid> It's not in n1256.pdf
<heat> fucking cringe
<heat> what's C without system-specific extensions?
<zid> but the libc .so *has* to contain posix, so posix is always going to be available as '-lc'
<zid> doesn't mean posix is c
<heat> posix has C
<heat> it's a superset
<zid> mostly yea
<zid> it has some weird edge cases
<zid> C requires you seek between writes and reads, posix does not, for example
<zid> which I've actually had bite me, because msvcrt.dll *does* require it.
<heat> like manually fseek after fwrite and fread?
<zid> yes
<heat> wtf
<zid> if you mix them
<zid> fwrite fwrite is fine
<zid> but fread will go from the last offset you read from, not the new offset because of the write
<gog> meew
<zid> morning gog
<gog> afternoon
<zid> gog I had a bath, praise me
<Ellenor> beep b00p
<heat> zid, there's almost 0 reason for that to be the case wtf
<zid> does posix say that seek_end is UB on "b" files
<zid> C does, everybody ignores this, I also ignore it.
<zid> (compiler can't really optimize it to fail without intentionally doing it just to piss people off, so meh)
<zid> However, output shall not be directly followed by input without an
<zid> fsetpos, or rewind), and input shall not be directly followed by output without an
<zid> intervening call to the fflush function or to a file positioning function (fseek,
<zid> intervening call to a file positioning function, unless the input operation encounters end-
<zid> of-file
<zid> I'm guessing the issue is that fread doesn't *have* to flush, and fwrite *may* buffer.
<heat> what part of msvc needs this?
<zid> fwrite and fread
<heat> the win32 api shouldn't need an explicit fseek
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
<zid> presumably that means posix fread has to call fflush every time, or at least check a flag to see if it needs to do it
<zid> and then do it or emulate it
<heat> posix best
<gog> i went to gym and showered and then the pool and showered again
<zid> I forgot you were a disgusting exerciser
<heat> ok but did you write your own libc doesnt look like it tyvm
<gog> i did
<heat> show me pls
<zid> If I wrote a libc it would be sans w* and sans locale
<gog> while i was doing squats i wrote one in my mind
<heat> teach me senpai
<zid> the rest is fun, that stuff isn't
<jimbzy> Real squats or those fake sumo/box squats?
<heat> locale is cool
<heat> language support go brr
<heat> inclusiveness
<zid> I don't speak porto
<heat> me neither
<zid> I bet you do
<heat> negative
<gog> real ones but sometimes we do box
<heat> in english terms, they speak liverpool i speak centre of london
<zid> Posso então chamar-lhe porco.
<jimbzy> Good job.
<gog> depends on the muscle groups were trying to work
<jimbzy> I always like the ass-to-the-grass variety myself.
<heat> zid, shitty translatation moment
<heat> translation*
<jimbzy> It's always fun getting spit out of the power rack when you have to unload XD
<zid> Posso chamar-lhe então porco.
<zid> Posso então chamar-te porco.
<zid> I can't grammar
<heat> ok that's better
<zid> -vos
<heat> huh?
<zid> s/te/vos is also an option, I can't grammar
<heat> no it's not
<heat> i am a singular person
<zid> oh sorry, I just assumed from the girth
<heat> -lhe is either formal or brazillian portuguese for you or him/her
<zid> formal sounds funner
<heat> -te is european portuguese for you
<zid> "Verily sir, you art a piggy"
<zid> "It is in my most humble opinion, that are you porcine"
gildasio has quit [Ping timeout: 255 seconds]
<heat> it's mildly impressive that you know basic pronouns in portuguese
<zid> I don't
<zid> That's why I had to try them all
<zid> It's like cold reading, "I am getting a name.. it has an e in it... " "is it te?" "YES IT'S TE, THE NAME COMES TO ME"
<heat> well you got it right the first 2 times
<heat> -vos could work if portuguese was a woke gender neutral language
<zid> A tua mãe estava errada por te ter.
<zid> pronouns probably a mess
<zid> My pronouns are "Your highness" and "lord"
<heat> heh
<heat> not horrible
FreeFull has joined #osdev
<heat> I'll give you a solid american-immigrant-in-lisbon/10
<zid> american? fuck, that's like .1
<zid> GIT ME SOME O' THEM HORSE DUH OUVRES
<heat> at cloudflare here in lisbon barely anyone who spoke english knew portuguese
<Ermine> gog: may I pet you?
<GeDaMo> Horse eggs? :|
<zid> GeDaMo: hors d'oeuvre
<heat> which is like, yeah understandable, you live in lisbon, but if you for some reason get out of lisbon you'll struggle a ton
<zid> heat: portugal isn't important enough to bother learning portugeuseuse
<heat> /shrug
<zid> Live in an expat bubble until you go home again
<heat> don't pick portugal as your sunny cheap year-long destination then
<zid> There'll be a brit exclave somewhere
<zid> live there
<zid> brits are so good at learning foreign languages that if we had lost ww2 we'd know 7 entire words of german by now
<heat> that would mean living in algarve
<heat> don't take british children to algarve
<heat> you'll spark a decade long investigation after she goes missing
<zid> you can take them
<zid> just don't forget them in the woods
<Ermine> Brits == britons?
<zid> RULE BRITANIA
<heat> leaving children alone at home while you go out for drinks with the LADS is fucking class
<heat> "The following year a Twitter user was found dead from a helium overdose after Sky News confronted her about her 400 anti-McCann tweets"
<heat> how do you
<heat> what
<zid> helium overdose is a 'thing'
<zid> in that, hypoxia is fun
<zid> Your body can't sense lack of oxygen, only too much co2
<zid> so if you breathe pure nitrogen, helium etc, you can't tell you're dying
<zid> you get giddy, then you die
<heat> also making twitter useres accountable for what they say is hilarious
<heat> users*
<heat> can't type today
<zid> what's that MP's name, fuck
<zid> michael portillo, ty
<heat> np
<bslsk05> ​'The effects of hypoxia at high altitude' by Allan Carter (00:03:23)
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
cyao has joined #osdev
nikitalocalhost has joined #osdev
nlocalhost has quit [Ping timeout: 260 seconds]
gildasio has joined #osdev
<gog> Ermine: yes
* kof123 .oO( BSDaemon Steve Wozniak: acknowledge that something good came out of bsd Heat Steve Jobs : [after a long pause] No )
<heat> what
gxt has quit [Remote host closed the connection]
gildasio has quit [Read error: Connection reset by peer]
<Ellenor> meowp?
cyao has quit []
gildasio has joined #osdev
gxt has joined #osdev
nlocalhost has joined #osdev
nikitalocalhost has quit [Ping timeout: 252 seconds]
vdamewood has quit [Read error: Connection reset by peer]
<mrvn> zid: a lack of CO2 also disruppt breathing
vdamewood has joined #osdev
xenos1984 has quit [Quit: Leaving.]
zhiayang has quit [Quit: oof.]
zhiayang has joined #osdev
<gog> typedef meow * meowp;
<Ellenor> mrvn, we're not in danger of taht even if the concentration drops like 100ppm
<Ellenor> only 150 or more
<Ermine> meowp pgog; pgog = gog ; may I pgog->pet() ?
<Ermine> Actually pgog = &gog ;
<Ellenor> permissionsframework_request(&gog, "pet", 3); // ?
<zid> enum that 1 and that 2 tyvm
<heat> LPGOG
<heat> gEfiGogProtocol
<heat> gog()
<Ermine> win32/EFI kicks in
<heat> gog2(GOG_CLOEXEC)
<heat> gogat(AT_FDCWD, GOG_CLOEXEC)
<zid> CLOEXEC sounds like the hole that processes are shit out of
<Ellenor> that's fork()
<heat> wtf have you never used *_CLOEXEC
<heat> very amateur unix development
<zid> who
<heat> O_CLOEXEC, SOCK_CLOEXEC et al make your fd close on exec
<heat> it's what you're supposed to use by default so multi-threaded processes that fork+exec don't steal random fds
<zid> thieves :o
<zid> I bet heat is an fd thief
<heat> also helps to not leak fds
<heat> no never no sir nuh-uh
<zid> heat shows his cloexec to anyone who asks
<zid> true fact
<heat> no
<heat> i show my dtrace
<zid> what bodily orifice is a dtrace
<heat> 𓂸
<zid> the black box? :o
<zid> If your box is black you should see a doctor imo
<heat> 𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸𓂸v
<heat> 𓂸𓂸𓂸𓂸𓂸𓂸
<zid> Did you see mmo dark souls is out on steam at last
<heat> what's mmo dark souls?
<zid> dwarf fortress ofc
<heat> dont care seen based rebased merged pushed
<heat> i only play dark souls 1
<zid> Are those the available flags for if you get told information
<zid> wait, have you never played df?
<heat> no
<zid> omg
<GeDaMo> I tried it once, I got stuck in the help and couldn't get out :|
<zid> well, it has a graphical ui now if you want
xenos1984 has joined #osdev
jjuran has quit [Ping timeout: 268 seconds]
immibis_ has quit [Remote host closed the connection]
gorgonical has joined #osdev
<gorgonical> I did some reading -- there's no way I can have the assembler do relocations for labels in assembly code I wrote?
<zid> it will do internal ones
<zid> it can't do external ones, definitionally, they are external
<zid> it can't possibly know their address
<gorgonical> Then I must have my flags wrong. Right now it doesn't generate jump labels right
<gorgonical> Ironically if I use PIC/PIE it'll generate a GOT and reference it but the GOT still contains the absolute addresses\
<gorgonical> By generate jump labels I mean turn those labels into addresses. It generates absolute ones (0x5000) instead of e.g. 0x80205000
dude12312414 has joined #osdev
<heat> what? 0x5000 is (probably) relative, not absolute
<gorgonical> No, it is absolute. In the ELF that's the stack top label, 0-indexed
<gorgonical> By 0-indexed I mean absolute, I'm just saying the ELF does start at 0x0
<gorgonical> Unless I misunderstand how the GOT is supposed to store addresses
<zid> gog: Tom Scott informs me there is an iceland in iceland
<zid> I am pleased with this information
jjuran has joined #osdev
<heat> gorgonical, i don't understand your issue
<heat> the assembler will generate relocations
<zid> 0x5000 is 0x5000 relative to 0 though..
<heat> the linker relocates
<gog> zid: he's a liar
<zid> he showed a picture
<zid> liar and a photoshopper
<gog> Ísland er ekki til í Íslandi
<zid> it do
<heat> í Í íÍ
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
<Ermine> https://wiki.osdev.org/UEFI_Bare_Bones#Testing_the_emulator --- this command does not work.
<bslsk05> ​wiki.osdev.org: UEFI App Bare Bones - OSDev Wiki
<heat> rando idea, i don't know if this is new: make the kernel write a value to a user pointer on context switch in and another on switch-out. this makes it so user code can know if a thread is scheduled in and could make it adapt on, for instance, mutex spinning
<zid> the legendary ovmf
<zid> the thing qemu always prints if you fucked up loading an elf properly, but has no other use.
<heat> so you could effectively write adaptive mutexes with this pseudo-feature i'm making up
<heat> Ermine, use -bios OVMF.fd
<Ermine> heat: thank you.
<heat> I've never seen -pflash
<heat> I do know -bios works
<heat> now back to my Great Idea(tm), I think this should have negligible overhead on context switches. to make sure we don't page fault you could do something like lock that specific page holding the address
<zid> looks like -pflash is the generic one
<heat> obviously handling a page fault (from disk, from swap) is not viable
<zid> and -bios is the x86 one
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
<Ermine> -pflash opens OVMF.fd for reading somewhy. Unlike -bios
<heat> -bios should also open it for reading
<Ermine> heck, s/reading/writing/
<heat> -pflash probably expects a non-ROM region
<heat> OVMF.fd is not (supposed to be) writable btw
<heat> in theory you can but OVMF itself does not support it
<Ermine> Exactly, so I couldn't launch qemu without root. with -bios it works rootless.
<heat> OVMF_VARS.fd is the bit that should be -pflash'd for a writeable memory region
<bslsk05> ​github.com: sophia/debug.sh at myefi · adachristine/sophia · GitHub
<gog> i copy ovmf_vars.fd to my run directory
<gog> and just use ovmf.fd in place
<gog> wherever that is in your distro
MiningMarsh has quit [Ping timeout: 260 seconds]
<Ermine> Yay, tried it on real hardware, it works!
Bonstra has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
<epony> did you forget to run the tests?
xenos1984 has quit [Ping timeout: 256 seconds]
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
xenos1984 has joined #osdev
MiningMarsh has joined #osdev
<gorgonical> Okay I think I understand why the linker is seemingly not using pcrel addressing
<gorgonical> Two reasons: I hadn't turned on no-relax so it was trying to relax stuff, which can be fine. But more importantly, I think the linker doesn't understand my NEXT macro and as such doesn't/can't understand that when I say .word QUIT I want it to magically replace that with the pc-relative version
gareppa has joined #osdev
nikitalocalhost has joined #osdev
nlocalhost has quit [Ping timeout: 252 seconds]
nyah has quit [Remote host closed the connection]
Burgundy has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
Burgundy has quit [Ping timeout: 256 seconds]
kaichiuchi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
gog has quit [Read error: Connection reset by peer]
gdd has quit [Ping timeout: 246 seconds]
kaichiuchi has joined #osdev
gareppa has quit [Quit: Leaving]
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
gog has joined #osdev
<kaichiuchi> someone do me a favor, if at all possible
<kaichiuchi> please highlight me
<mrvn> me
<kaichiuchi> thanks
<kaichiuchi> I have come to the conclusion that IRC interfaces are garbage
dude12312414 has joined #osdev
<sortie> kaichiuchi
<kaichiuchi> thanks
<gog> irc is perfect in every way
<gog> it is the best protocol
<kaichiuchi> here's the problem
<geist> all hail irc
<gog> it will survive the coming nuclear and or climate apocalypse
<sortie> Tonight in osdev: I'm debugging a deadlock when my OS, which was built on itself, spawns a qemu, to boot up the new version built on itself
<kaichiuchi> a) yes, all hail IRC
<kaichiuchi> b) Quassel was nice until it looked *really* bad on my mac and there isn't a decent iOS client for it
<sortie> I'm starting to worry the AI hallucinating all of this osdev does simply not nest that deeply
<mrvn> don't worry, it has infinite many parents.
<kaichiuchi> on ubuntu Quassel looked great, but because I'm not using Quassel anymore (i'm using ZNC), google led me to hexchat
<gog> what about irccloud'
<geist> i started to try to figure out how to do bare metal rust last night. managed to eventually set up a cargo build to generate a static library that seems reasonable enough to try to link it with codez
<kaichiuchi> and hexchat looks like hell
<sortie> An OS isn't supposed to ssh into its own clone
<kaichiuchi> gog, I used to use IRCCloud
<geist> now i just need to bust out some asm to get it bootstrapped and start filling in the details
<gog> i have android i'm spoiled by revolutionirc
<sortie> gog, hey I use that too!
<kaichiuchi> i really like what Quassel has in mind but jesus christ
<gog> i used to use yaaic
<geist> re: irc clients i basically ended up switching to irccloud full time, after 20 years of using irssi
<gog> which i loved
<sortie> I just use hexchat on desktop
<gog> desktop irc clients are numerous
<sortie> Or my irc(1) hack natively
<gog> just pick one it's fine imo
<kaichiuchi> I'm 28 now, but when I was 13 until I stopped using IRC full time (read: when Discord killed it), I used irssi
<geist> but it is also nice to stay logged in all the time, assuming that's important for you
<sortie> You ever one of those days when you take an old IRC bot, rip out the logic, slap on a UI and a fresh coat of paint, and call it an IRC client
<gog> if i really cared about that i'd buy a shell and use irssi in a terminal tbh
<gog> in tmux
<gog> i used to use that setup and it worked great
<geist> yah that's what i basically did since forever
<kaichiuchi> IRCCloud has a native iOS app
<kaichiuchi> I'm starting to regret leaving IRCCloud
<geist> and can still fall back to if irccloud dies
<geist> yah the android and ios app are pretty good
<gog> let's all pool our money on a vps
<kaichiuchi> my thought was essentially this: do I pay $5 for one service, or $5 (nanode) for a VPS that I can do IRC on, along with other things in the future
<gog> also buy a domain and have a mastodon instance
<gog> osdev.lol
<geist> they're pretty cheap now. could grab a super low end specced freebie tier arm one on AWS which is perfectly suitable for running irssi
<geist> kaichiuchi: right
<gog> bring back osdev community on not discord
<kaichiuchi> except everything is just... bad
<geist> what i did get used to was things like auto pastebin and image stuff in irccloud that is frankly kinda nice
<gog> we'll make a killer web client
<gog> :P
gdd has joined #osdev
<kaichiuchi> one of the reasons I stopped using irccloud was the fact Textual kept fucking up with IRCCloud somehow
<gog> but imo
<kaichiuchi> but I'm starting to think that I've made a mistake
<kaichiuchi> sigh
<geist> why? you can just go back. it's not like you've permanently burned some bridge
<gog> unless you were paying for it
<kaichiuchi> heh, no I know
<kaichiuchi> I know I sound like all hope is lost
<gog> nah
dutch has joined #osdev
<geist> yeah i mean, like, just use what works for you
MiningMarsh has quit [Ping timeout: 268 seconds]
spikeheron has quit [Quit: WeeChat 3.7.1]
<gog> fediverse supersite for osdevving
<gog> cmon
<gog> let's do it
<geist> omg i switched keyboards and now my life is dooomed.... of coruse the old one is right there on the bed. but it's over there
<geist> DOOOOOOOMM
<gog> i need to buy a better one to use at work
<gog> the one they gave me is trash
<gog> my computer is way too fancy and expensive for that kind of thing
<geist> (actually happy with my keyboard, but was trying to badly make a point)
<gog> :P
<geist> my trusty ol daskeyboard is still working like a champ here
<geist> i get new ones, i piddle weith things like type Ms and whatnot, and i end up just going back to the daskeyboards
<gog> i've pointed out to the CEO a couple times that i want a workstation but it's gotta be something that isn't a thinkpad because they're not that good anymore
<gog> he laughed at me
<gog> he's gonna buy me a computer for that slight against my ego
<kaichiuchi> so
<gog> sorry
<kaichiuchi> on an unrelated note, I am converting my company to LLVM from IAR
<gog> nice
<geist> hah someone is still using IAR
<kaichiuchi> they hate it
<kaichiuchi> they absolutely hate it
<geist> for good reason
<kaichiuchi> then I got hired and I said "wtf IAR?"
<geist> didn't know it still exists honestly
<kaichiuchi> they're like "yeah. wanna do something about it?"
<geist> this is where you find all the dumb shit that folks have written against specific compiler behavior
<gog> we have software we hate that needs replacing but it means gutting half the application lol
<geist> have fun
<gog> applications
<gog> we're fucked
<kaichiuchi> yeah I'm not exactly looking forward to it
<kaichiuchi> but... we also don't compile with optimizations, which was a surprise
<geist> also worrisome. like maybe it breaks if you do?
<gog> it will
<gog> it's basically guaranteed in any large application
<kaichiuchi> well, problem
<geist> yah that's ar eason someone may have years ago turned it off
<kaichiuchi> we're going to run out of space soon
<kaichiuchi> -Os/-Oz would be a *really* big help right now
<geist> yah for lots of embedded style stuff that's totally fine
<kaichiuchi> this is my first job involving embedded anything
<kaichiuchi> lots of surprises...
<geist> oh fun
<geist> suggestion: get familiar with ARM assembly and always dissassemble what you're building
<gog> dang
<gog> i want that job
<geist> and keep an eye out for weird shit
<gog> lol
<geist> it matters a lot in embedded
<geist> also run 'size' on the output so you can get a feel for where the text/data/etc is going
<kaichiuchi> gog, yeah, I was stoked when I got it
<kaichiuchi> it's exactly where I want to be
<kaichiuchi> geist, I am doing my best to get familiar with ARM assembly
<kaichiuchi> heh
<gog> i do web dev and it's fine and i like my job and the culture is just my speed
<gog> but i hate web dev
<kaichiuchi> i live on the east coast of the US
<kaichiuchi> 90% of the jobs are web dev
<gog> iceland :P
<kaichiuchi> either web dev, or military/defense contractor bullshit
<gog> yeh
<gog> i didn't wanna do my internship with lockheed martin
<gorgonical> we're already past this put I now use emacs' rcirc as a client
<gog> so i didn't
<kaichiuchi> the only reason I got this job was some recruiter called me and I hated my current job immensely (i was in the semiconductor industry as a manual tester!)
<gog> i dropped out of school disillusioned and battling my mental health :P
<kaichiuchi> understand that at my prior job, we made machines that a Big Name uses for die bonding
<kaichiuchi> and the software was 99% manual tested.
<kaichiuchi> it was then I knew that I had to jump ship
<gog> serious industrial control stuff
<kaichiuchi> no, it was bad
<kaichiuchi> really bad
<gog> oof
<kaichiuchi> I don't want to say too much about my former employer's anything, but suffice it to say that the codebase is unmaintainable and once the old guys retire no one is going to be able to understand it
<gorgonical> regarding my forth: is there an easy way to solve the problem that threaded code contains pointers to rountines/words to execute, but they aren't pc-relative. I see two ways forward: invent a way to relocate those pointers or avoid the problem and make sure the linker starts it where the bootloader will put it
mctpyt has joined #osdev
<kaichiuchi> hang on, be right back
mctpyt has quit [Remote host closed the connection]
kaichiuchi has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
<gorgonical> My thought is to have the linker put it at the right address for now, just so I can test that other things work
kaichiuchi has joined #osdev
<kaichiuchi> hi
<gorgonical> wb
<mrvn> gorgonical: any global you take the address of (including code) makes your code require relocations or fixed position.
* mrvn wants position relative pointers.
<mrvn> Meaning a pointer is stored as the offset of the object and where it is stored.
<geist> we actually use that feature in fuchsia. it's an abi breaker but the C++ vtables are 32bit relative to the vtable
<kaichiuchi> yay irccloud
<geist> there's a switch on clang for it
<mrvn> geist: how do you do that?
<mrvn> patched gcc/clang?
<gorgonical> mrvn: yeah that's possible in principle, but I don't have a clue how i'd figure that out in raw asm
<geist> well, we dont keep patches, so it's got to be in mainline
<geist> we might only enable it for our particular triple, but i bet there's a command line switch for it
<geist> i'm looking at some of the patches for it like https://reviews.llvm.org/D72959
<bslsk05> ​reviews.llvm.org: ⚙ D72959 Relative VTables ABI on Fuchsia
<geist> but these are a few years old, so i bet it's more mainstream now
<geist> note it's not free: now it means all virtual calls via the vtable have to do a few instruction sequence to do the math
<geist> but the amount of load-time patching goes down a lot
MiningMarsh has joined #osdev
<kaichiuchi> test
<kaichiuchi> okay I think it worked
<mrvn> geist: you will already have the vtable in some register so it should be just one "add" to get the final address
<mrvn> geist: and vtables get smaller so you might even win on cache efficiency
<geist> sure. like i said you need a few instruction sequence
<mrvn> s/few/one/ is what I'm saying
* geist shrugs
<geist> depends on the arch, how you got the vtable pointer, etc
<mrvn> might be a few on x86 where you first have to free a register ...
<geist> right, whereas you might have been able to do basically a direct dispatch before
<geist> call *address*
<geist> but yeah you could do a lea PCREL<vtable>, reg; call [reg + offset]
<geist> or whatever
<mrvn> hmm, that would only work if you know the address of the vtable but then the compiler eliminates the virtual call
<geist> i could dig around for an exmaple but i donmt have one handy right now
<mrvn> lea PCREL<vtable>, reg also assumes you know the address of the vtable
<geist> oh yeah it'd be pointed to by the object, so actually easier
<mrvn> What I think you will get as code is loading the address of the vtable from the object and then load the function address as offset to that reg
<geist> well sure, that's literally what it has to do, but question is what is a nice sequence for that on various arches
<mrvn> So object in R0, vtable in R1, 32bit offset in R2, add R2, R2, R1, b R2
<geist> it probably 'hurts' x86 more sicne it's possible you could have avoided trashing as many registers in the non relative sequence
<mrvn> I might be totaly wrong but I think you can't get a different sequence because those would get optimized further.
<geist> but on an arch like arm64 it was probably already going to have to make two loads anyway to get the address into a reg to call
<geist> so in arm64 you're really just adding another add instruction to an already double load sequence
<mrvn> nod
<mrvn> If you can eliminate any of the loads then you can eliminate the virtual call and the compiler will do that.
<geist> interestingly riscv may have actually been nicer before, since it has a jsr [reg + offset] instruction, iirc
<geist> as long as the offset is within 2K
<geist> oh wait, no never mind. still woul hdave to double load
<mrvn> is that a indirect jump?
<geist> yah no it isn't. disregard
<geist> it *is* odd that riscv has a jmp reg + offset instruction, which is a little strange. most arches have a indirect branch/jmp/call but usually without a offset like that
<geist> but it actually fits into the way they compute large addresses
<mrvn> geist: great for jump tables
<mrvn> assuming all your target addresses are within 2k
<geist> actyually what it's for is they have an instruction that computes a 12K aligned address, and then you 'fill in' the last 12 bits in the jmp instruction
<geist> for 'far' calls basically
<j`ey> 4k aligned?
<geist> 4K yes
<geist> 12 bit aligned
<geist> it's very similar to how arm64 does it, except that riscv doesn't burn bits in a large relative branch instruction like arm64 does
<geist> so it falls back to a 2 instruction sequence to compute an address and indirect it much more often
<geist> but it's at least only 2 instructions, because the jsr has the 12 bit offset, etc
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
<geist> downside is of course you actually do more register indirect calls than you would have otherwise, so i guess it's up to the branch predictor to remember what's up
<geist> OTOH it hink modern branch predictors dont really care about register indirects anymore. they treat them just like regular branches and goes ahead and predicts them as usual
<geist> though it does seem like if the branch cache is cold it's harder for it to 'run ahead' and fetch through it since it can't know what is in the register yet
<mrvn> you mean they predict the contents of the register?
<mrvn> It's not a conditional branch so there is no predicting a yes/no state
<geist> i think most BTBs nowadays just remember where it went last and just go through it
<geist> but i dunno what the usual strategy is for a 'cold' hit on a branch that's indirect
<geist> but branch prediction is still a hot area of development/etc so honestly i dunno what the current state of the art is
<gorgonical> my understanding is that branch predictors are now monstrously complex and considered black magic
<mrvn> geist: probably. Remembering if the branch was taken would mean you still have to do the address computation for where it ends up.
* geist nods
MiningMarsh has quit [Read error: Connection reset by peer]
<moon-child> I think they can remember a couple of indirect addresses now
<moon-child> what I want to know (and am too lazy to test) is whether the overhead goes away completely if you compute the address far enough ahead of time
<moon-child> (say, 15-20 cycles)
<geist> yeah
<geist> mrvn: asked the origiunal author of the patch at they say you can just use the vtable relative stuff with -fexperimental-relative-c++-abi-vtables
FreeFull has quit []
<geist> only real caveat is it will break the ABI so you can't mix and match code compiled with and without
MiningMarsh has joined #osdev
DutchIngraham has joined #osdev