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 am watching a movie that is older than heat, it's also in a higher resolution than his OS supports
<heat> my OS supports every res dunno what you're on about
<dostoyevsky2> multicore cpus made programming too complicated, imho
<zid`> heat: modeset me 4k pls
<Ermine> 4k movie from before 2000?
<heat> that's an interesting q, i wonder if the GOP drivers usually support every res
<zid`> yes
<Ermine> I don't believe you
<heat> 1080p i know they support, 4k maybe not (but it's not unreasonable to do so)
<zid`> wizard of oz (1939) has a 4k release
<zid`> oh, found the oldest
<zid`> The Cabinet of Dr. Caligari, 1920
<Ermine> Is it hard to support 4k in gop? Should be just a larger framebuffer
<Ermine> And some way to make gpu modeset
<zid`> 1024x640 is the largest my machines support I think
<heat> yeah but the q is "why would you"
<heat> 1024x640 is very small, might be VESA, do you still BIOS boot/CSM boot?
<zid`> why would nvidia offer better, it's only for 4 seconds before the REAL DRIVER loads
<zid`> it's shit slow enough already
<heat> better experience
<zid`> when 3fps isn't making your mouse awful enough to use already :D
<heat> personally i find the screen not flickering the fuck out as it modesets to a different res to be a good feature
<zid`> yea, software scaling is nice
<zid`> on an LCD
<zid`> cus LCDs fucking suck at it
<Ermine> With nvidia I used to have GRUB_GFX_PAYLOAD=keep, so I would to have grub to modeset to needed resolution
goliath has quit [Quit: SIGSEGV]
<heat> ok so i have this interval tree implementation here
<zid`> I have my nvidia driver set to 1:1 scaling with pillars and letters
<heat> i could keep it generic as-is, or i could make it a mega horrible parameterized macro and save 32 bytes
<zid`> how much do you save if you write it in C with UB
<heat> this is C, and i can't use UB here
<zid`> you've never written C
<heat> i have never written C
<gog> nobody writes in C anymore
<gog> it's TYOOL 2024 and we have ruuuuuuuuuuust
<Ermine> 32 bytes per whole system?
<heat> 32 bytes per vma
<heat> basically the problem is that vmas are {ulong start, end; /* buncha shit */ struct interval_tree_node private_node, shared_node;}
<heat> and struct interval_tree_node is {/* buncha bst shit */ ulong start, end; ulong max_end;}
<heat> so with the generic code i'd be storing start and end redundantly 4 times
<zid`> bunch of UB'd fix that right up
<dostoyevsky2> gog: doesn't Rust still rely on many c libraries?
<gog> idk i don't write in rust either
<gog> but yeah probably
<zid`> gog: We're having an uncle buck watchalong, heat isn't old enough for its rating so it's on you
* gog grabs her hatchet
<dostoyevsky2> gog: I personally like to use Rust like `fn main() { unsafe { my c code here } }' ... it's the best of both worlds and I can always say: hey, it's written in Rust
<zid`> ooh we could gnaw that thing off her face with that
<zid`> gog: why are you also so cool?
<zid`> always*
<zid`> heat never knows any cool stuff, but you always know it
<gog> uncle buck is an OK hughes flick, but planes, trains and automobiles is top notch
<zid`> I just love john candy
<gog> you ever watch any SCTV?
<zid`> no it wasn't a thing I was capable of watching
<gog> he was pretty funny alongside rick moranis
<heat> none of those names are real
<zid`> heat doesn't know who john candy is, see, he *never* knows cool things
<Ermine> ok boomer
<gog> cat did a big steppy on my chest owie
<zid`> 3kg cat, big foot, somehow still diamond anvil pressures
<zid`> I swear they have special stepping-on-you bones in their feet
<gog> yes
netbsduser has joined #osdev
Matt|home has quit [Quit: Leaving]
navi has quit [Ping timeout: 260 seconds]
<zid`> pancake the size of a horse, anyone?
<zid`> You should see the toast, I couldn't even get it through the door
netbsduser has quit [Ping timeout: 255 seconds]
gog has quit [Quit: byee]
netbsduser has joined #osdev
srjek has quit [Ping timeout: 252 seconds]
netbsduser has quit [Ping timeout: 252 seconds]
heat has quit [Ping timeout: 240 seconds]
bradd has joined #osdev
Arthuria has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
netbsduser has joined #osdev
netbsduser has quit [Ping timeout: 256 seconds]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
netbsduser has joined #osdev
* geist arrives home after work, yawns
netbsduser has quit [Ping timeout: 268 seconds]
<zid`> oof 5am, they're working you to the bone
_whitelogger has joined #osdev
netbsduser has joined #osdev
Arthuria has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 264 seconds]
<kof673> > effectively an OS? > yeah i'm not sure a brain is an OS well, you can model anything in terms of anything else. is that useful, is that "true", is that ...forcing a round peg into a square hole, etc. ..........that's "THE LAW" of you-know-who
<kof673> people will bring their [individual, group, time period, whatever] "context" wherever they go, and at some level recreate/reflect/project it onto whatever they are doing (such as building a model of a brain) > A domain of evil it is. In you must go." "What's in there?" Luke said, Yoda responsed, "Only what you take with you.”.
Gooberpatrol66 has joined #osdev
_whitelogger has joined #osdev
netbsduser has joined #osdev
k0valski18891621 has joined #osdev
koolazer has quit [Remote host closed the connection]
netbsduser has quit [Ping timeout: 260 seconds]
Mondenkind is now known as childlikempress
netbsduser has joined #osdev
GeDaMo has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
netbsduser has joined #osdev
Mach has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
gbowne1 has quit [Quit: Leaving]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
Nixkernal has joined #osdev
housemate has joined #osdev
housemate has quit [Ping timeout: 268 seconds]
cryo_ has joined #osdev
cryo_ is now known as Guest9734
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
housemate has joined #osdev
housemate has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
gog has joined #osdev
netbsduser has joined #osdev
<GreaseMonkey> it's been about 16 years since i last touched USB and this time i'm hoping i've learnt enough to actually succeed
<GreaseMonkey> admittedly, getting networking working is probably going to be less of a pain
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
srjek has joined #osdev
gimli has joined #osdev
<gimli> hey
goliath has joined #osdev
gimli has quit [Quit: leaving]
gimli has joined #osdev
<gog> hi
<nikolapdp> yoi
navi has joined #osdev
m257 has joined #osdev
gimli has quit [Quit: leaving]
pebble has joined #osdev
flash has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
Guest9734 is now known as MrCryo
azonenberg has quit [Ping timeout: 268 seconds]
pebble has quit []
stolen has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
azonenberg has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 268 seconds]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
Matt|home has joined #osdev
m257 has joined #osdev
m257 has quit [Quit: Client closed]
m257 has joined #osdev
heat has joined #osdev
spare has joined #osdev
mavhq_ is now known as mavhq
m3a has quit [Ping timeout: 255 seconds]
m3a has joined #osdev
Mach has quit [Ping timeout: 256 seconds]
vinleod is now known as vdamewood
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
FreeFull has joined #osdev
Nixkernal has joined #osdev
m257 has quit [Quit: Client closed]
MrCryo_ has joined #osdev
<mjg> on a funky note, i'm watching Sons of Anarchy
MrCryo has quit [Ping timeout: 256 seconds]
<mjg> pretty ok so far as background
MrCryo_ has quit [Remote host closed the connection]
MrCryo has joined #osdev
<Ermine> I've added ace ventura on my to watch list
m257 has joined #osdev
Gooberpatrol_66 has joined #osdev
Gooberpatrol66 has quit [Read error: Connection reset by peer]
stolen has quit [Quit: Connection closed for inactivity]
leg7 has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
Gooberpatrol_66 has quit [Remote host closed the connection]
m257 has quit [Quit: Client closed]
<leg7> How can I read/write from disk in protected mode if I don't have access to bios interrupts? for example in real mode I could just interrupt to use floppy disk functions and get data of the disk but in protected mode I have no idea how to do this. I've read fwrite from musl but it seems to be unrelated
MrCryo has quit [Remote host closed the connection]
<heat> you write a driver
<heat> musl is completely unrelated, like really really far away from what you're doing now
<leg7> Do you have an example?
<leg7> I have the lk source if that has one
<bslsk05> ​github.com: lk/dev/virtio/block/virtio-block.c at master · littlekernel/lk · GitHub
<heat> i dont know if geist has drivers for more traditional hardware
<heat> i have a bunch of drivers (ide, ahci, nvme) but those aren't great examples, they're a lot more complex
<bslsk05> ​wiki.osdev.org: Floppy Disk Controller - OSDev Wiki
<leg7> something like this?
<leg7> the problem is that I'm using grub and I'm not sure if it'll fit on a floppy disk
<heat> the wiki has awful examples and no one uses floppies
<nortti> you may wish to write a driver for ATA instead
<heat> if you want to read off of your iso, consider just using a module
<heat> like, isos are completely braindamaged, their fs is completely fucked, and you'll need at least 2 drivers for your thing to work everywhere, plus the filesystem
<heat> instead of that, just create a tarball of stuff (or some filesystem image!) and read from memory, grub can pass it to you ezpz
<geist> leg7: yeah that'll totally fit on a floppy. i mean much more complicated things fit on floppies
<geist> but yeah dont worry about floppires
<heat> first you'll need to find a floppy, then a floppy drive
<heat> lastly, you find out you actually can't boot from a floppy drive because UEFI does not support floppies
<geist> yah the only real reason to fiddle with floppies is for legacy retro purposes
<geist> even virtually
<heat> linux has been trying to get rid of their floppy driver for a few years now
<leg7> ok
<leg7> I would like to have a disk image with a boot partition and a files partition and have fat32 on them or something.
<leg7> so an ATA driver would suffice to handle a hard drive?
<heat> an IDE driver will yeah
<heat> but not everywhere, and god oh god do not do FAT32 as your first fs
<leg7> what would you recommend as a first fs?
<heat> ext2
<leg7> is it simpler?
<kazinsal> it's more logical, has more features, and doesn't require bizarre UTF-16 directory entry filename stuff
<leg7> ok
<leg7> so I have to write an IDE driver to use the drive, implement ext2
<heat> doing FAT32 will screw your VFS design
<leg7> oh ok
<heat> it's better to have a VFS first, then try to retrofit FAT32 into it
<heat> (later)
<kazinsal> one of these days I oughta sit down and just kind of a do a "how 2 OS design" powerpoint or intro paper or something that explains not just how bits go together but *why* they go together the way they do
<kazinsal> probably more productive than actually writing any dang code
<leg7> yes pls
<heat> what bits though?
<leg7> once I have an IDE driver and ext2 how would I make my disk image on my hosted system?
<leg7> mbr disk with partition 1 and 2 as ext2?
<heat> kinda but use gpt please it's 2024
<leg7> wouldn't it complicate things
<heat> no
<leg7> I don't have uefi support
<heat> you don't need it
<leg7> ok
<leg7> so gpt disk with 2 ext2 partitions
<leg7> then I can intall grub on the first 1 + the kernel
<leg7> and the files on the second one?
<heat> sure
<leg7> ok cool
<heat> i would not recommend you do that though, for the time being
<leg7> well we are 2 working on the project
<kazinsal> the GPT format isn't particularly complicated -- just a bit more reading to do to learn how the bits fit together
<leg7> it's a uni project and my friend would like to be able to display in image
<heat> installing something on a hard drive does not suit itself to quick iteration
<leg7> well can't I do all of this with a file and qemu?
<heat> basically because grub can't install itself to a random disk image. it actually needs it to be mounted, with a proper filesystem
<heat> the ubiquotous grub-mkrescue everyone use in osdev is actually the best solution for "quick and dirty way to get something into a disk and booting"
<heat> ubiquitous?
<kazinsal> I used to do TFTP boot for quick iteration
<heat> yah you can do PXE booting too
<leg7> can't I make a file with dd which would be my disk, use fdisk to partition it, and then make loop devices to mount them?
<heat> yes, but it's the slowest iteration ever
<Matt|home> o\
<leg7> Would it still be slow if I automate it?
<heat> with passwordless sudo, etc maybe not
<leg7> how would you do it? Do I really have a choice if I want a filesystem?
<heat> currently i have an iso with a kernel and an initrd. that then mounts a drive i give it. this allows me to iterate super quickly on the kernel, which is most of what i do
<heat> this is not an installation nor supposed to be permanent
<heat> also when i do need quick userspace iteration, i put it all on a ramdisk, in an iso
<heat> literally a compressed tarball i extract at boot time (in the kernel) into a tmpfs
<leg7> ok ty
<immibis> kazinsal: i've thought i should make a youtube video titled "how do computers work?" since I seem to be decent at explaining stuff in an oversimplified way, less people seem to know how computers work, and that format seems to be popular. don't really know how to go about it though.
<immibis> may still try it (trying things you don't know how to do is a way to know how to do them)
<gog> how do computer's work? they don't
<gog> FIN
<heat> FIN|ACK you mean
<heat> you can't send packets without ACK after the connection has been established
<zid`> IT was a drive-by
<zid`> IAC COMPUTER-STATUS don't work IAC
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Nixkernal has joined #osdev
leg7 has quit [Ping timeout: 264 seconds]
Matt|home has quit [Quit: Leaving]
xenos1984 has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<netbsduser> ext2 is called "the platonic form of traditional filesystems" for good reason
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
<heat> -Wthread-safety-analysis is so frustrating
<zid`> RUST
<heat> but unironically, yes
<zid`> -Wrust
<heat> clang is so so so weak at figuring out what code means, that Wthread-safety-analysis is super weak and has lots of spurious warnings on non-trivial locking patterns
<zid`> nice
<zid`> now imagine the compiler can only optimize based on what it can prove about that
<zid`> and it won't compile if it can't
<zid`> if only such a language existed
<heat> rust can prove a lot more than a C compiler can
<bslsk05> ​github.com: Issues · ClangBuiltLinux/thread-safety-analysis · GitHub
<heat> it fucking melts completely
<heat> i'm finding a trivial problem that is completely unexplainable except by "clang has been sniffing glue"
<heat> kernel/mm/vm_object.cpp:259:25: error: expecting page 'pagebatch[i]' to be held at start of each loop [-Werror,-Wthread-safety-analysis]
<heat> ^
<heat> for (int i = 0; i < found; i++)
<heat> lock_page(pagebatch[i]);
<heat> kernel/mm/vm_object.cpp:260:13: note: page acquired here
<zid`> nice
<mjg> lol
<bslsk05> ​users.rust-lang.org: Multicore-friendly struct layout vs locking - The Rust Programming Language Forum
<mjg> there goes your rust analysis
zetef has joined #osdev
<zid`> I added a fan to my window because I was hot
<zid`> now I am cold
<zid`> weather is stupid I want AC
<kazinsal> AC is nice
<kazinsal> it's a beautiful 25 outside and a nice 21 inside
<zid`> disregard computer, one of you become a heat pump technician
<heat> ok
<nikolapdp> heat is volunteering
<zid`> nikolapdp quick, ask for 2nd dibs
<nikolapdp> i literally just logged on
<zid`> QUICK
<childlikempress> kazinsal: how does your place have a/c T_T
<bslsk05> ​redirect -> login.microsoftonline.com: Redirecting
<kazinsal> consolation prize for rent being absurd
<childlikempress> 'proper wayland support' there's nothing proper about that
<Ermine> there is
<Ermine> > My point is that Skype isn't properly working on the most utilized and widespread operating system
<heat> what crack is that guy on?
<kazinsal> don't run a server OS on a desktop I guess
<Ermine> heat: copium
<heat> also: who the fuck uses skype in 2024
<Ermine> my supervisor, unfortunately
<heat> my condolences
<zid`> skype is glorious robust microsoft technology
<kazinsal> yeah, you should be moved to teams by now
<kazinsal> the new client is Fine, I Guess
<Ermine> nah
<heat> google meet is nice
zetef has quit [Remote host closed the connection]
<Ermine> is this their current incarnation?
<zid`> MPC-HC is such a pain to set up
<zid`> Thank you for coming to my tedx talk
<heat> is it intuitive for (start, end) to include end?
<heat> or should it be exclusive?
<zid`> that depends if (start, end] or (start, end)
<heat> these are arguments, not math
<zid`> inclusive then
<heat> okay thanks
<Ermine> usually stuff is [start, end)
<nikolapdp> yes
<zid`> I prefer it to just be off by 7
<zid`> in both directions, so it's both 7 too high to start with and 7 too low to end with
<zid`> spices things up
<Ermine> In any case, if one end is included and another is excluded, length is end - start
<zid`> end - start + 1 for life
<Ermine> + 7
<childlikempress> heat: i prefer to exclude end
<zid`> +15
<childlikempress> isn't that how c++ iterators work also?
<zid`> I just map it to the indexing scheme directly cus you know, programming
<zid`> kill_clients(0, 4) should kill 0 1 2 3 4
<zid`> it'sfirst and last
<zid`> not start and end
<zid`> initial and final
<heat> childlikempress, i dont know i don't use c++ iterators
<childlikempress> me neither
<heat> but this is an iterator
<childlikempress> you're the c++er
<heat> i am not the c++er
<zid`> lol
<zid`> you should say more believeable lies heat
<heat> i've used the C++ standard library a handful of times
<heat> meaning that if you ask me to read a string in C++ i'll use scanf
<childlikempress> i thought all c++ programmers hate the c++ standard library with a passion
<childlikempress> using scanf just shows you're not a c programmer
<zid`> childlikempress: It's those galaxy brain memes
<childlikempress> no self-respecting c programmer would ever use scanf
<zid`> they go C, C++, C++ without exceptions/stl, C
<zid`> from least brain to most brain
<heat> yes, "C" programmers use gets()
<childlikempress> shit
<heat> i did use scanf in a facebook coding interview over iostreams
<zid`> have you considered using sscanf
<heat> it was some task where you had to parse a line and... yeah i don't know how one would use iostreams to taht effect
<heat> yeah i've used sscanf
<zid`> text file parsing is a pain and has gross edge cases
<zid`> like short or long lines cutting your shit up
<zid`> sscanf at least lets you print error messages if someone gives you a gigabyte long line
<heat> getline() deals with long lines
<zid`> 'deals with'
<heat> yeah it reads it all
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mjg> makes you wonder though, how did gets even came to be
<mjg> gets is 100% php webdev
<heat> C and UNIX were the OG php webdev
<heat> pioneers of crap
<mjg> like for real, while php was an idiot magnet, fundamental disregard for reliability and security was the norm prior to its arrival
<mjg> user input? just fuckin' grab it as is, no validation required
<mjg> with adding an extra layer of buffer overflows
<Ermine> C was created for lulz
goliath has quit [Quit: SIGSEGV]
<Ermine> My noob code was scanf("%c") and realloc(len + 1)
<Ermine> code for reading a line, that is
<childlikempress> jemalloc makes realloc(len + 1) work ok, right?
<heat> getc getc getc getc
<Ermine> it was me after reading like first 4 chapters of head first C
leon has quit [Ping timeout: 256 seconds]
<Ermine> And I thought that "Press any key to continue" is a good ui
agent314 has joined #osdev
gbowne1 has joined #osdev
zxrom has quit [Quit: Leaving]
<mjg> Ermine: mon "head first c" is such a shite book
<mjg> fuckin' ASS c all the way
<Ermine> probably
<Ermine> it's been a lot of time ago
Vercas9 has joined #osdev
zxrom has joined #osdev
<mjg> besdies, good news is that now there is no reason for new people to learn that fucking langauge anyway
<mjg> modulo some fringe cases
<zid`> system("pause"); is the correct way to write programs
<zid`> terminal emulators are for noobs
<nikolapdp> you're right mjg, we should all switch to rust
<mjg> 's literally happening
<heat> thanks joe biden
<childlikempress> she joe on my biden till it's joever
<heat> thank you childlikempress, very cool!
<childlikempress> happy to help
<zid`> nikolapdp: When are you being shot out of the sky over the czech republic?
<zid`> (standard serbian behaviour)
<nikolapdp> why would i be anywhere close to the czech republic
<zid`> Your national service stint as a flight attendant, presumably
<zid`> idk how the serbian government organizes it
<nikolapdp> that was a one off
<nikolapdp> and she lived
Vercas9 has quit [Quit: buh bye]
<Ermine> disagreed
<zid`> Are you sure they aren't trying to farm the WR repeatedly, but now that they have it they've temporarily stopped
<zid`> soon as someone else breaks it you'll be right up there
<nikolapdp> nah
leon has joined #osdev
<Ermine> working with memory directly is a worthwhile experience
<Ermine> at least you know *why* and *when* you need any kind of memory safety
<childlikempress> working with memory directly
<heat> yes
<childlikempress> because that's totally a thing you can do
<heat> boss u know exactly what he meant
Turn_Left has quit [Read error: Connection reset by peer]
<childlikempress> no i'm making a point which is that there's always layers of abstraction above and below
<Ermine> you're making a nitpick
<heat> C is close enough to the hardware and raw enough that learning it is always worthwhile
<heat> if not just to understand what problems the other language solve (garbage collection, memory safety, concurrency problems, etc)
<heat> it doesn't matter that if you're working with DRAM or SRAM or cache lines or cache as RAM or if you have an MMU or if its a segmented system, a buffer overflow is a buffer overflow and a free is a free
netbsduser has quit [Ping timeout: 252 seconds]
agent314_ has joined #osdev
agent314 has quit [Ping timeout: 260 seconds]