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
<zid> I literally
<zid> said exactly this
<zid> and you said no
<heat> yes because i misunderstood what you meant
<zid> Okay so then the follow up question I meant to ask after the trivial "yes", how do you do this with objects instead of values
<heat> the same way
<heat> objects are values
<zid> no, they're not
<zid> They're *incredibly* not.
<zid> If C++ has changed that, you need to specify that it has
<heat> the original C++ example I gave you uses objects
<zid> It uses all values.
<zid> oh C++
<zid> I can't read the C+=
<zid> I told you
<zid> and you already knew it
<heat> even the C one uses objects
<zid> If I could read C++, I would't be asking how to read this C++
<zid> no, it uses exclusively values
<zid> because C is pass by value
<zid> You passed the values of some pointers to struct, fine, and if that's still the rule in C++, then we're back to the original question, how do you do it?
<zid> Do you create temporary copies and some magic frees them? Do you malloc and leak from the middle? do you only return pointers to class members?
<zid> do methods' automatic variables actually count as class member vars and take up space in the instantiated memory for the class? etc
<heat> and C++ is also pass by value
<immibis> saying C also has objects is like saying the compiler toolchain also has objects - different meaning
<zid> oh my boyfriend is back, sweet
<heat> yeah you create temporaries
<zid> the compiler does, automatically?
<heat> yep
<zid> Okay, so not automatics, magic compiler temporaries
<zid> it just goes into the callers' automatics, like when you pass a struct by value and the compiler does the cool optimization?
<immibis> zid don't assume my gender
heat has quit [Quit: Client closed]
heat has joined #osdev
<zid> (where it ends up writing to the parent's stack from inside the leaf function)
<heat> it just goes into the callers' automatics, like when you pass a struct by value and the compiler does the cool optimization? <-- yes zid
<zid> okay, you could have said that 20 mins ago, but thank you
<heat> if you look at the codegen it's doing exactly that, for reasons unknown to me that probably involve the itanium C++ ABI
<zid> *I cannot look at it*
<zid> for the billionth time, *I cannot read C++*
<heat> i'm talking about the codegen
<twitter-now-x> everything openbsd does is fucking pessimized
<heat> the assembly
<zid> I CAN'T READ THAT EITHER!
<heat> then switch it to intel syntax :p
<zid> Notice how I had to go "wtf why is this doing byte indexing?" and shit? That's because I can't read the codegen
<zid> It's *heavily* leaning on idioms that I don't know
<zid> because I don't know the C++ abi
<zid> which you do
<zid> and have forgotten that you know
masoudd has joined #osdev
<zid> so you just assume I must also
<immibis> why are people who don't know C++ arguing about the fine details of C++?
<heat> ok sorry
warlock has quit [Quit: Lost terminal]
<mcrod> god i love this place
<twitter-now-x> heat: check out openbsd per-cpu counters
<heat> anyway yeah no malloc, etc, because that's stupid and no way it'd fly in code this... plain
<heat> there's one feature that requires the compiler to invoke malloc/new and that's coroutines... sometimes
<zid> yea I did make sure to point out I was aware it would leak
<zid> I am very aware it's stupid
<zid> I was just pointing out it was technically a way to implement it
<zid> by giving you some options, I hoped you might see what I was asking
<zid> because you hadn't been
<heat> btw, this is how one actually implements method chaining, usually https://godbolt.org/z/borc3WKoK
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> okay but
<zid> I can't read either side, as mentioned
<heat> you don't need temporaries, because it's just a pointer, and in case it's an inlined method/LTO'd to shit, you don't even need the movq %rax, %rdi
<zid> structs aren't allowed to have & in them in my world
<zid> and the right hand side appears to be using eax as an argument register on the right
<zid> so neither side makes any sense
<heat> ok, in C terms: each method just returns a pointer to itself
<heat> itself = the object
<zid> the this
<zid> what does it look like inside the method btw
<zid> if I wanted the parent to end up with a char[32] that stays in scope until the end of the chain
<zid> surely not my_method(void){ char a[32] = {"hello"}; return a; } ?
<heat> you shouldn't be able to do that unless it's the tail method of the chain
<zid> but then how do I chain objects
<zid> if I can't return pointers to automatics
<zid> we're back to my original question again
<zid> > Do you create temporary copies and some magic frees them? Do you malloc and leak from the middle? do you only return pointers to class members?
<zid> that bit
<heat> in a chain, whatever one method returns, you must use to call the next one
<zid> okay? doesn't seem relevent, but sure
<heat> unless it's the tail of the chain, in which case it can just go in a variable
<zid> I wouldn't expect anything else
<zid> because.. how would I write that I want a method to return one thing, but in a chain, have it secrelty pass something else entirely
<zid> "you get what the previous one returned" is.. exactly how I expected it to work
<heat> you're asking me if "a().b().c()" with b returning a char[32] is possible, right?
<zid> right, I want to use objects
<zid> not values
<zid> you said the compiler does magic automatics where the parent func gets them
<zid> not the method
<zid> so that they're ins cope
Burgundy has quit [Ping timeout: 240 seconds]
netbsduser`` has quit [Ping timeout: 255 seconds]
admiral_frost has quit [Ping timeout: 258 seconds]
admiral_frost has joined #osdev
qxz2 has joined #osdev
admiral_frost has quit [Quit: It's time]
admiral_frost has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
heat has quit [Quit: Client closed]
dude12312414 has joined #osdev
Arthuria has joined #osdev
air has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
gog has quit [Ping timeout: 260 seconds]
Osmten has joined #osdev
air has quit [Quit: cria 0.2.9cvs17 -- http://cria.sf.net]
Yoofie has quit [Read error: Connection reset by peer]
Yoofie has joined #osdev
air has joined #osdev
goliath has joined #osdev
CaptainIRS has quit [Read error: Connection reset by peer]
CaptainIRS has joined #osdev
masoudd has quit [Ping timeout: 255 seconds]
admiral_frost has quit [Quit: It's time]
valshaped7424880 has quit [Ping timeout: 264 seconds]
Left_Turn has joined #osdev
asarandi has quit [Quit: WeeChat 4.0.4]
danilogondolfo has joined #osdev
asarandi has joined #osdev
netbsduser`` has joined #osdev
gbowne1 has quit [Quit: Leaving]
tomith has quit [Read error: Connection reset by peer]
valshaped7424880 has joined #osdev
GeDaMo has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
<Ermine> oh I missed hot discussion
<Ermine> now I have to discuss osdev
gog has joined #osdev
admiral_frost has joined #osdev
<Ermine> why there are so many tty devices in linux?
Burgundy has joined #osdev
<GeDaMo> So all the users can connect with their serial terminals :|
<puck> Ermine: all the trans girls have got to get thei- no actually 64 is the hard limit, i think; 64 virtual consols, and 192 uarts (ttyS)
<puck> why is that a limit? idk, ask whomever made the major/minor number system
<Ermine> So, tty9 to tty63 lead to nowhere?
zxrom has quit [Quit: Leaving]
nyah has joined #osdev
<gog> tty skittles
Burgundy has quit [Ping timeout: 255 seconds]
<mcrod> gog may I pet you
lukflug has joined #osdev
[itchyjunk] has joined #osdev
<gog> yes
netbsduser`` has quit [Ping timeout: 258 seconds]
bauen1 has joined #osdev
* mcrod pets gog
* gog prr
kaitsh has quit [Quit: WeeChat 3.8]
admiral_frost has quit [Quit: It's time]
admiral_frost has joined #osdev
Osmten has quit [Quit: Client closed]
[itchyjunk] has quit [Remote host closed the connection]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 272 seconds]
<immibis> i still can't remember if it's a disk {operating system} or a {disk operating} system
<immibis> i should know this considering how many times i've questioned it
<immibis> and presumably had it answered
<klange> Wikipedia and other sources have me inclined to believe it is [disk] [operating system]
<gog> [disk operating [system]]
<mcrod> i’m playing around with PVS-Studio and Coverity
<mcrod> they’re pretty neat
<kof123> is it written in C? disk[operating_system] operating_system[disk]
<lukflug> I'd say it depends on which DOS you are talking about
bauen1 has quit [Ping timeout: 258 seconds]
Burgundy has joined #osdev
bauen1 has joined #osdev
Osmten has joined #osdev
Osmten has quit [Client Quit]
goliath has quit [Quit: SIGSEGV]
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
pounce has quit [Ping timeout: 260 seconds]
CryptsWiFi is now known as PublicWiFi
bauen1 has quit [Read error: Connection reset by peer]
bauen1 has joined #osdev
pounce has joined #osdev
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
admiral_frost has quit [Quit: It's time]
<pitust> ([disk] [operating) system]
<pitust> s/system/(system)
<sbalmos> given prior history at that point in time of "operating system" used together in other systems, but being ROM- or tape-based, I'd go for [disk] [operating system]
<lukflug> yeah, especially given the first time the term was used was DOS/360 as far as I know
rustyy has quit [Ping timeout: 255 seconds]
<lukflug> and DOS/360 is more of a [disk] [operating system] than a [disk operating] [system]
melonai has quit [Quit: Ping timeout (120 seconds)]
<lukflug> on the other hand, I can understand someone saying something like Apple DOS is more of a [disk operating] [system]
qubasa has quit [Ping timeout: 240 seconds]
rustyy has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Ping timeout: 252 seconds]
zxrom has joined #osdev
Arthuria has joined #osdev
masoudd has joined #osdev
kfv has joined #osdev
kfv has quit [Client Quit]
Arthuria has quit [Ping timeout: 260 seconds]
Arthuria has joined #osdev
Burgundy has quit [Ping timeout: 252 seconds]
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
kfv has joined #osdev
CaCode has joined #osdev
<mcrod> hi
melonai has joined #osdev
PapaFrog has quit [Read error: Connection reset by peer]
PapaFrog has joined #osdev
remexre has quit [Ping timeout: 240 seconds]
netbsduser`` has joined #osdev
kfv has quit [Quit: Textual IRC Client: www.textualapp.com]
heat has joined #osdev
<heat> puck: Ermine: those major/minor numbers are all static for those old-ass devices for compat raisins
<heat> because udev was not a thing so you just mknod'd your shit
<gog> devfs
<gog> developers fs
<Ermine> is there a reason it wouldn't work with old devices?
<gog> developers developers developers developers
<heat> DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DELVEOPRS
<gog> hey heat do you know what my major:minor numbers are
<gog> heat
<gog> can you guess
<heat> 69:420
<zid> 69:420
<gog> yes
<heat> Ermine: what wouldn't work?
<gog> funysexnumber:funyweednumber
<zid> mine are 1337:55378008
<Ermine> old-ass devices, heat
<gog> you need more tty skittles
<twitter-now-x> PERFORMANCE
<Ermine> or is this for old programs which hardcode tty names?
<heat> Ermine: no, just backwards compat. like they picked the scheme 30 years ago when it made sense, so now they're stuck supporting it
<gog> oh hi mateusz
flom84 has joined #osdev
<twitter-now-x> it's matthew
<mcrod> can I go home
<twitter-now-x> ask heat
<heat> matthew gosling
<gog> i know a guy named mateusz
<Ermine> hi mjg69
<twitter-now-x> heat: matthew pitt
<Ermine> 59*
<mcrod> i’m installing vs2010 for a webapp
<mcrod> i want to cry
<twitter-now-x> gog: ye, it's me!
<heat> Ermine: if any weirdo using mknod and static devs upgraded the kernel, and they actually changed the scheme, those ppl would be very upset. and probably would promptly call the kernel devs systemd plants or whatever
<heat> i think freebsd ditched the old static device numbers
<heat> i may be recalling wrong though
<Ermine> well, I know a case when introduction of udev broke workflow, namely, ctrl-alt-backspace stopped working in Xorg
<mcrod> am I the only fuckhead who still uses magic sysrq keys
<heat> i use the power button
<gog> twitter-now-x: no a different guy
<gog> a not you guy
<gog> a much nicer guy
<heat> mateusz garrett
<twitter-now-x> perhaps that was my previous nickname?
<twitter-now-x> niceprson?
<gog> oh
<gog> maybe
<twitter-now-x> there you go!
<gog> do you live in reykjavík
<heat> no one lives in reyjkaviafjivk
<twitter-now-x> who is to say, i might
<mcrod> i want to write a bootloader
<heat> iceland is not real
<heat> neither is belgium
<heat> wake up sheeple
<mcrod> but i have a feeling it’s going to be annoying
<gog> why is there an icelandic language bt there's no belgianese
<heat> why is there an ""icelandic"" if neither ice nor land speak
<mcrod> i’d like the bootloader to tell my kernel how much memory is on the system etc
<mcrod> but that seems too much
<heat> no that's pretty basic
<gog> what
<mcrod> the bootloader should probably just… boot
<heat> but can you write a kernel instead?
<twitter-now-x> lmao
flom84 has quit [Remote host closed the connection]
<twitter-now-x> i'm writing a web browser
<mcrod> i could
<twitter-now-x> way ahead of all of you
<heat> twitter-now-x: hi mr kling, how are you?
<twitter-now-x> CURL69 is how i am
<mcrod> i dunno i think the kernel should figure out how much RAM is available
<twitter-now-x> 640KB is availabl
<mcrod> otherwise we’re sharing platform code
<heat> huh?
<heat> my man, the bootloader/firmware tells you how much memory you have, and where. the kernel really can't do that
<mcrod> yes the EFI does
<heat> and BIOS, and device tree systems, multiboot1/2, etc
<mcrod> but why can’t I ask EFI during kernel boot ?
<heat> because you've exited boot services
<mcrod> oh.
<heat> in fact, getting the memory map is part of exiting boot services
<mcrod> i didn’t realize you’re fucked after that
flom84 has joined #osdev
<heat> you're not fucked, you're much better off without EFI
<mcrod> but why would I want to care about BIOS
<mcrod> simplicity in comparison i’m sure
<gog> it's the same memory map basically
zxrom has quit [Ping timeout: 255 seconds]
<gog> that reminds me i was starting a new efi experiment
<gog> everybody is going to hate it
<heat> mcrod: i don't mean "you're better off using the BIOS"
<heat> I mean "you're better off alone"
<heat> using the firmware is like a toxic relationship
<heat> get your shit and LEAVE
* gog hums the better off alone tune
<mcrod> now you’re speaking my language
<bslsk05> ​'Alice Deejay - Better Off Alone (Official Video)' by Alice Deejay (00:02:55)
<gog> peak 1990's
<twitter-now-x> peak 90s is TWIN PEAKS THEME
<twitter-now-x> heat furiously googling the name
<heat> i'm not googling anything, i can't be arsed
<twitter-now-x> i think you are sed
<twitter-now-x> i took a nap and now i'm in a trolley mood, but the bad kind
<mcrod> alcohol withdrawal?
<heat> yeah i've had a... complicated day
<heat> many emotions
<twitter-now-x> i don't trhink alco
<twitter-now-x> drink
<mcrod> i don’t either
<twitter-now-x> by a series of incremental ungeezering changes i brought down a real workload from almost to 3 minutes to 15 seconds
<twitter-now-x> where is my fucking applause
<zid> OH TELL ME WHY, DO WE BUILD CASTLES IN THE SKKY
<mcrod> so basically my bootloader should grab info from the system, set up the environment to launch the kernel, then launch the kernel and pass that info to the kernel
<mcrod> “info” being memory map bullshit as an example
<heat> congrats twitter-now-x
<heat> mcrod: yeah but i seriously advise you to skip the bootloader
<mcrod> but then it needs some type of filesystem support that I don’t wanna do
<gog> use grub
<mcrod> ok i will skip the bootloader and use grub for now
<heat> or use EFISTUB for the shits and giggles
<gog> skip writing the kernel too
<heat> webdev webdev webdev
<mcrod> so I guess I can start with just grabbing really basic info and outputting it to the screen
<heat> yeah sure
<zid> E820 is life
<mcrod> can’t I ask the system to tell me what the CPU speed is
<mcrod> or do I have to calculate it using RDTSC or some shit
<zid> heat: ATB - 9pm (Till I Come)
heat31 has joined #osdev
<heat31> no not really mcrod
<mcrod> seems a bit silly that the system can’t report it
<heat31> modern intel has a pair of registers that can help you calculate the current frequency
<heat31> APERF and MPERF
<mcrod> o
<bslsk05> ​'Robert Miles - Children [Dream Version]' by Robert Miles (00:07:33)
<heat31> also SMBIOS reports a static frequency IIRC, but it's not actually... useful
<zid> No more posting til you've listened to this
remexre has joined #osdev
heat has quit [Ping timeout: 245 seconds]
heat31 is now known as heat
<mcrod> wut
zxrom has joined #osdev
<heat> mcrod: btw i advise you to just get something that, erm, runs
<heat> displaying things is harder and trickier
<zid> heat: You had better not be posting without the music playing
<mcrod> i mean… yeah
<mcrod> but “runs” could mean just an infinite loop
<heat> yeah but something that loads and doesn't immediately crash is already a win, and probably the first win
<mcrod> fair
<heat> usually what I do at least
<heat> https://github.com/heatd/hsd i vouch for this resource
<bslsk05> ​heatd/hsd - (0 forks/1 stargazers/GPL-2.0)
<mcrod> what I do want to do is try to get an error handling thing set up ASAP
<mcrod> i.e., MCA
<heat> what's MCA?
<mcrod> machine check architecture
<mcrod> although i don’t think it’s needed
<heat> machine checks are the least of your worries
<heat> they only happen on bad ram, etc
<heat> something needs to be seriously fucked with the hw
<mcrod> i think i mean exception handlers
<gog> that's not too hard
<gog> just need a suitable IDT
<mcrod> i got MCA mixed up with exception handler
<mcrod> because terminology
<gog> there's no beastie boy named "exception handler"
<gog> there's no beastie boy named "MCA" anymore either actually :(
<heat> usr/sys/stand/trap.c
<mcrod> no i wanna figure it out
_whitelogger has joined #osdev
<mcrod> ok dad
zxrom has quit [Quit: Leaving]
heat has quit [Quit: Client closed]
flom84 has quit [Ping timeout: 260 seconds]
<gog> i've been sitting here like a dumbass waiting for a db transaction to complete
Burgundy has joined #osdev
<gog> i forgot to type "commit"
<gog> i'm going home i've had enough of my shit
gog has quit [Quit: Konversation terminated!]
vdamewood has joined #osdev
<mcrod> i’m waiting for our security people to approve a .bat that has been a part of this project since i was 18
masoudd has quit [Ping timeout: 260 seconds]
heat has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duderonomy has joined #osdev
Arthuria has quit [Ping timeout: 272 seconds]
<pitust> lmao
heat has quit [Quit: Client closed]
gog has joined #osdev
heat has joined #osdev
bauen1 has quit [Ping timeout: 258 seconds]
goliath has joined #osdev
<twitter-now-x> emperors new slowdown
<heat> twitter-now-x what did you find
<heat> spill the beanz
<twitter-now-x> thread stack caching on linux is total shite
<twitter-now-x> caches up to 2 per cpu
<twitter-now-x> past that it unmaps them
<twitter-now-x> except turns out in a real world setting this notorioiusly is not enough
<heat> lgtm don't use vmap stacks
<heat> CONFIG_VMAP_STACK=n quick fix there m8
_whitelogger has joined #osdev
<heat> twitter-now-x that shit uses vmalloc right?
<heat> i think there's a lot of activity there on making that fast, pcpu and shit
<heat> having a bullshit stack cache because the current code sucks sounds like the wrong idea tbh
* twitter-now-x burps
<twitter-now-x> that's part of a bigger rant
<twitter-now-x> key is that thread creation + destruction don't scale on linux for shit
<twitter-now-x> and the kstack problem is a minor contributor
dude12312414 has joined #osdev
zxrom has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
freakazoid332 has quit [Ping timeout: 260 seconds]
<bslsk05> ​redirect -> www.reddit.com: Reddit - Dive into anything
<zid> Not what I was expecting from the title, but still good
xenos1984 has quit [Read error: Connection reset by peer]
bauen1 has joined #osdev
<twitter-now-x> heat: container support in onyx when
masoudd has joined #osdev
<heat> no
danilogondolfo has quit [Remote host closed the connection]
* twitter-now-x deletes his onyx vm
xenos1984 has joined #osdev
onering has joined #osdev
Beato has quit [Ping timeout: 255 seconds]
heat has quit [Quit: Client closed]
nyah has quit [Remote host closed the connection]
heat has joined #osdev
hrberg has joined #osdev
Turn_Left has quit [Remote host closed the connection]
Turn_Left 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!]
xenos1984 has quit [Ping timeout: 258 seconds]
xenos1984 has joined #osdev
masoudd_ has joined #osdev
masoudd has quit [Read error: Connection reset by peer]
gbowne1 has joined #osdev
zhiayang has quit [Quit: oof.]
zhiayang has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 240 seconds]
[itchyjunk] has joined #osdev
admiral_frost has joined #osdev
heat has quit [Quit: Client closed]
zhiayang has quit [Quit: oof.]
heat has joined #osdev
masoudd_ has quit [Ping timeout: 272 seconds]
rustyy has quit [Ping timeout: 264 seconds]
rustyy has joined #osdev
lukflug has quit [Quit: Leaving]
<mcrod> hi
zoey has joined #osdev
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zoey has quit [Remote host closed the connection]
duderonomy has joined #osdev
frkzoid has joined #osdev
Burgundy has quit [Ping timeout: 255 seconds]
CaCode has quit [Quit: Leaving]
Left_Turn has quit [Ping timeout: 240 seconds]
goliath has quit [Quit: SIGSEGV]
admiral_frost has quit [Ping timeout: 240 seconds]
heat has quit [Quit: Client closed]
admiral_frost has joined #osdev
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mcrod> no more arch for me
<mcrod> maybe
<mcrod> ok i fixed it :)
duderonomy has joined #osdev