<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
<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
<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]
<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]
<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
<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