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
justmatt has quit [Quit: ]
justmatt has joined #osdev
<heat> ugh 6.1 got me major regressions in qemu
<zid> want me to bisect you?
<heat> yes
* zid sharpens his guillotine
<zid> 6.1 of what btw
<zid> freebsd?
<heat> linux
<zid> I'm still on 5.13
<zid> should I update
<heat> major progress in vm stuff but idk yet
<heat> it seems to really want to migrate pages and qemu blocks like shit because of it
<kaichiuchi> hi
<zid> make oldconfig -j144
<zid> just in case
<heat> i might try lts and see how things look there
<heat> just to rule out other fuggery
<zid> "Mitigations for speculative exeuction vulnerabilities?" N"
<zid> N N N
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #osdev
<zid> what was my nuvoton chip again
<heat> 2
<zid> I don't think it was
<zid> we need this for sure
<geist> MAAAAPLE
<kaichiuchi> maple
<pog> maple
justmatt has quit [Quit: ]
<moon-child> m'aple
<zid> need to prune my shit, almost 4 mins to build
<moon-child> 4 minutes? wtf are you doing
<zid> ikr
<zid> the fuck is a lifebook
<heat> high amounts of bullshit
<bslsk05> ​github.com: pics/README.md at master · corkami/pics · GitHub
wootehfoot has quit [Read error: Connection reset by peer]
<zid> til I have a boot partition somewhere?
<geist> Oh what is this?
<heat> chatgpt
<zid> ah no, I just edited the grub1 files not grub2
<heat> it's so confident at spouting bullshit
<epony> lifebook is a copy https://en.wikipedia.org/wiki/Buckminster_Fuller#Lifestyle "Fuller documented his life copiously.." --you get a copy and you get a copy and you get a copy everybody gets a copy
<bslsk05> ​en.wikipedia.org: Buckminster Fuller - Wikipedia
<geist> Yeah that’s referring to the initial android bootloader fork, which still sits around somewhere in the android tree
<zid> wtf does dark grey mean in ls
<geist> I guess the real mistake everyone has made is lots of folks fork LK for some purpose and then just call it LK
<zid> what stage2.old problem
<heat> heh seems like it only learned about lk from android
<sonny>  /join #freebsd
<sonny> oops
<heat> NOOOOOo
<heat> DONT
<moon-child> why not
<heat> because it's freebsd
<moon-child> what's wrong with freebsd
<moon-child> freebsd is cool
<moon-child> 90s berkley lsd notwithstanding
<zid> freebsd is the opposite of cool
<zid> going rock climbing with your personal trainer then doing cocaine is cool
<zid> freebsd is not cool
<epony> what do you need your fingers for anyway..
<moon-child> ime doing cocaine and _then_ going rock climbing with your personal trainer is cooler
<zid> freebsd is more like kicking a rock down the highstreet and calling anybody who looks at you a wanker, while on meth
<epony> have you see the Hesher?
<bslsk05> ​en.wikipedia.org: Hesher (film) - Wikipedia
<epony> "seen" T.J. lately?
<pog> what if you use freebsd while doing coke with your personal trainer halfway up the cliff
<epony> you fall
<zid> No personal trainer would allow you to use freebsd
<zid> I volunteer that their qualifications are fradulent
<epony> your mortal remains get pecked by birdies
<zid> They're supposed to promote growth
<kazinsal> yeah personal trainers are usually netbsd diehards
<zid> not turning into a cave hobbit shouting about your precious BSD
<kaichiuchi> i'm playing with compile-time unit testsing
<pog> i will do both
<kaichiuchi> testing
<epony> testicicling
<kaichiuchi> this might be a metric fuckton better than pulling in googletest
<epony> ice ice icicle, pop pop pop-sickle, test test..
<zid> oh I am dumb.
<zid> I just did rm /usr/src/linux so I could update my symlink
<sonny> not sure what there is to dislike it's all unix :P
justmatt has joined #osdev
<zid> but I had apparently unpacked linux-6.1.1.tar.gz to there
<zid> I hope I had gzconfig enabled
<epony> Smeagol uses OpenBSD, Sauron uses FreeBSD and Gandalf uses NetBSD.. you suck using Linux.
<sonny> lol
<zid> no that can't be right, re-extract puts it at linux-6.1.1/ where the fuck did this symlink come from
<heat> GNU is not unix
<kaichiuchi> oh
<kaichiuchi> thanks for reminding me to look at the UNIX standard
<sonny> GNU is not unix*
<kaichiuchi> I hate that it's called SUS
<epony> it's pronounced gehanukka-UH!
<kaichiuchi> I really do
<heat> kaichiuchi is SUS
<kaichiuchi> stop it >:(
<sonny> kaichiuchi what are you working on?
<heat> amogus
<kaichiuchi> a game boy emulator that is going to run on my 486
<epony> his character
<zid> have you ran mine on it yet
<sonny> kaichiuchi nice
<kaichiuchi> zid: no
<zid> pfft
<kaichiuchi> zid: I will seriously drag it out of my backporch tomorrow and try to compile it
<kaichiuchi> :')
<epony> you can call it :teh: SYSTEM if you like..
<epony> it's just a C library
<sonny> lemme know what os you guys find interesting
<heat> openbsd
<epony> don't lie to pappa
<zid> I wonder if it's finally time to change the memcpy for a mmap
<pog> ntoskrnl
terminalpusher has quit [Remote host closed the connection]
<sonny> pog: you actually have info on it? I read about it a little bit
<pog> no
<pog> reactos has an implementation of it
<heat> windows internals books
<epony> you might turn to a blue smurf if you keep using the blue toilet paper edition
<sonny> yeah ik I have to get the book eventually :(
wgrant has quit [Quit: WeeChat 3.5]
<zid> I just found a chocolate santa I need to eat
<epony> it's been everywhere
<sonny> windows nt approach to oop is undesireable to me, the end result is kinda close to unix if you squint
<epony> s/ oop / oops /g;s/ oops / oom /g
* pog ooms
<epony> if you squint you fart because your skin is too tight
<zid> pog: Can I interest you in 8GB of 800MHz DDR3?
<zid> I have it spare
<pog> yes
<zid> I replaced it with 16GB of 933MHz ECC <3
<sonny> fancy
<epony> UNIX has fork (exec), DOS/WIN has spawn (hog)
<zid> It has thermal sensors!
<epony> the difference is paramount, you can't squint that much
<sonny> lol
<epony> you'll turn inside out
wgrant has joined #osdev
<sonny> spawn makes more sense
<epony> noes
<heat> what
<zid> heat: tells you how warm it is
<epony> it makes sense if you're Mozilla or Office
<heat> i know, re spawn
<heat> spawn is a bad interface
<zid> didn't take my lead, okay
<sonny> afk
<Mutabah> heat: Compared to prototype processes, or compared to fork/vfork?
<heat> all of them
<heat> fork is bad but easy to use
<heat> spawn is good but hard to use
<epony> vfork hahaha
<zid> CreateRemoteThread is the best interface
<heat> I don't have a formed opinion re prototype processes but they're at least cleaner than fork and theoretically can do all of it
<moon-child> what are prototype processes?
<epony> other things that start with v are vfat and vmalware
<heat> it's APIs where you create a process and do operations on it
<heat> and only then start it
<moon-child> hmmm interesting
<moon-child> seems kinda like an orthogonolisation of ptrace et al
<heat> like pid_t pid = create_process(); newfile = open(pid, "/fileIwantToOpen", ...); dup2(pid, newfile, stdin); close(pid, newfile); start(pid);
<heat> yeah
<heat> fuchsia does this
* pog forks
<epony> it fucsyer
<epony> the best "OS"^W application for this kind of computer https://en.wikipedia.org/wiki/System_on_a_chip#Applications is called intermediate representation (bytecode)
<bslsk05> ​en.wikipedia.org: System on a chip - Wikipedia
<epony> it's designed to sell applications
<epony> you've seen this already, no? https://www.youtube.com/watch?v=36myc8wQhLo
<bslsk05> ​'USENIX ATC '21/OSDI '21 Joint Keynote Address-It's Time for Operating Systems to Rediscover Hardware' by USENIX (01:06:19)
<zid> what is nls, what is jbd2
<zid> jdb2 some kind of db, dunno what for
<heat> jbd2 = journaling support
<zid> ah requirement for ext stuff I assuem?
<heat> ext4 yes
<sonny> epony I did but I forgot what it was about
<zid> CONFIG_HYPERVISOR_GUEST enables mshyperv.o unconditionally, how rude
<zid> I don't give a shit about mshyperv
<heat> ah nls is native language support for filesystems
<epony> sonny, it talks about SoC being complex and the part which you're programming being small, isolated and confined, leaving you stuck and stuffed in a corner of the complex microprocessor at the mercy of the proprietors which do not standardise on shit nothing
<epony> and vary year by year, so.. in short, it means you're very screwed on such a device / system / platform
<sonny> what was his solution? I dont' see SoC going away
<epony> (obsoleted / unable to compete with the device vendor providing its proprietary OS embedded on it)
<epony> well, you can give 50% of your proceedings to the owners of the platform with each sale you make, welcome to the world of Microsoft on mobile
<epony> it's been making it happen with the "use Java" and you being stupid "using Java", which runs on RISC ISA chips as expected and worse on other ISAs (aw snap, poor you)
<epony> who said there is a solution ;-) you're owned
<sonny> he didn't end there lol
<epony> ah yeah, he was proposing a hybrid
<epony> between a SoC and a generally programmable CPU
<epony> for servers and such
<sonny> interesting
<epony> yeah, ETH is a known institute in computing
<zid> time make bzImage -j12 time gogogo, bet I shaved at LEAST two seconds off with my prune
<epony> and this professor is actually a professor, not only an internet personality
<epony> you know like Rob Pike, telling you to go screw your nuts with Golang since the systems research is obsoleted by his "presentation"
<sonny> lmao
<epony> famous author of Blit invents a gopher concurrency model for threads without hardware support in the microprocessors, fantastic achievent, neeeext
<sonny> I haven't gone deep enough to see what is like writing OS code for a SoC
<sonny> my assumptions are still from the 1980s
<epony> for starters OOP is not used for kernel programming
<zid> 3m44s!
<sonny> epony I think they share the same point, the ETH prof started his presentation that way iirc
<zid> Let's pretend I have a 96 core threadripper and that comes out to.. 28 seconds
<epony> and then, micro-kernels do not gain anything because you still have to implement the same functionality outside your kernel
<sonny> isolation though
<epony> you got isolation between the functional blocks in the modern CPUs
<sonny> I thought the cpu was the functional block
<epony> but you don't have between the execution of instructions in the CPU
<epony> it eats chunks of roughly 1K instructions which get split and reordered and executed in many execution stages
<epony> what isolation ;-)
pog has quit [Ping timeout: 260 seconds]
<sonny> zid 7% improvment
<sonny> in time*
<sonny> epony namespace isolation
<sonny> oop did a few kernels
<epony> and then.. if your kernel is isolating "its elements" and your virtual machine running everything is one application, what isolation do you get?
<zid> -j6 which uses.. significantly less hyperthreading only 4m51
<zid> so 18.25 seconds on a 96 core threadripper, clearly
<sonny> epony that's a hack
<epony> berkeley risc and java are not a coincidence
<sonny> but it's as close as we can get with unix/c programming model
<epony> it's not related to UNIX at all
<sonny> sure, it's about the structure of the process and memory isolation
<epony> it's about a proprietary / business model of running applications which you can not escape, you're isolated, the execution in the processor is not
<sonny> could say the same thing if you swap vm's with segments
<epony> any defect of the lookaside tables results in the same faults you have on servers running competing applications from different context (clients VMs snooping on other VMs)
<epony> so, why would you go with that isolation at all, if you're not gaining any "real and actual" security and isolation
<sonny> it's good enough
<epony> for control - managed runtimes - $$$$$
<sonny> there's additional benefits lol
<epony> none ;-)
<sonny> moving servers has "zero" cost
<sonny> etc
<sonny> run legacy stuff without hardware is another big save
<epony> that's wrong.. because you need to rewrite your applications to run on the virtualised application language / system
<sonny> not always
<epony> it's a total failure ;-) you can't run applications you had until now on SoCs
<zid> hrmph my mouse is buggered in xfce4 and idk why
<zid> oh vmware bug I think
<sonny> epony just wait til someone makes the vm, it's ok
<epony> it's existing since the o-code days of BCPL
<bslsk05> ​en.wikipedia.org: BCPL - Wikipedia
<sonny> zid what resolution are you running at? just curious
<bslsk05> ​en.wikipedia.org: Binary translation - Wikipedia
<epony> nope, it's about Berkeley RISC on embedded appliance-computers
<epony> and profits
<bslsk05> ​en.wikipedia.org: Berkeley RISC - Wikipedia
<epony> a couple of years after that, the same designs were used in the CISC ISAs which were also 10x cheaper and much more efficient as performance and energy use, wiping the expensive "RISC / UNIX workstation" market clean (defunct) bankrupting Sun and making Java obsolete (inapplicable) on open architecture machinery
<epony> now the push is to set that in the compiler toolchain (the low and medium level virtual machines, llvm / mlvm) and use that to "port" (binary translate) applications, but the SoCs are too weak on handhelds and the applications can't run there without rewrite (nothing new)
<epony> it's even weaker on watches and wearables
<epony> do you really need the "Java" or the virtual machinery any more.. yes, if you're into locking things for profits and rewrites
<epony> it's C++ internally anyway (the implementation language)
<epony> the only advantage is source-to-source translation (program logic serialisation), the data serialisation is solved already (trivial)
<epony> and you're not using that on smaller machine programming, you're programming on larger machines and cross compiling ;-)
<epony> duh (total SNAFU)
<heat> geist, what's the maximum recursion you would tolerate in zircon or lk?
<heat> assuming this is silly data structure stuff with small stack frames
<sonny> epony don't forget the insane effort to get cisc to come close, and it was not energy comparable lol
<zid> heat: is zero a valid option?
<kaichiuchi> is mayonnaise an instrument
<heat> absolutely
<kaichiuchi> perfect.
<heat> my response works for both questions
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> yeah you can do aliases that way
<heat> pretty nifty
<zid> how do I declare a method
<zid> in C++
<heat> struct S { void blah(){} };
<epony> sonny, it was RISC that was grown up to become a CISC (come close to sane computing)
<sonny> yeah I can't disagree with that
<sonny> I'm a purist though
<zid> wait, what's the difference between using sturct and class there
<moon-child> a struct is a class where everything is public by default?
<moon-child> iirc
<heat> struct members have public visibility by default, class members have private by default
<heat> struct S { ... }; roughly = class S { public: ... };
<heat> I think that the only other difference is that struct and class may have different linkage so referring to a class as a struct and vice-versa is allowed but problematic and wrong
<epony> sonny, the differences are the number of registers and the register-register model of programming, for which you have problems writing compilers with too many registers and too little of a specification, it ends up needing the CISC design as it gives it a structure to model in software, without it, these blocks just don't form and all applications do it in their own suboptimal variants
<epony> the best ones "get their hardware implementation" the rest are.. failures of computing (unused functions in libraries)
<zid> yea this is just aliaseses, neat though
<zid> demangles it nicely though
<zid> bob::f -> hello
<sonny> epony need? it just makes more sense for a vm ... you want few instructions so less memory is used
<zid> how do I do the new bob() crap
<heat> wdym?
<zid> bob b = new bob(); isn't it
<sonny> I guess I just said the same thing you said
<heat> ah no, bob *b = new bob();
<heat> this isn't java
<zid> I've not done either
<zid> b is not a class
<zid> (I made it a class just in case, it still says it)
<heat> hm?
<zid> bob *b = new bob(); return b::f();
<zid> 'b' is not a class
<heat> oh right
<heat> b->
<zid> why can't I use ::!?
<heat> :: is for namespaces or static members
<zid> how do I dec a static member
<zid> (sounds lewd)
<heat> struct S { static void func() {} };
<zid> I did that and it changed it to jmp at least, rather than vtable
<zid> but :: no cmpiles
<zid> b is not a class
<heat> ah ok i may be wrong there then
<zid> C++ impossible confirmed
<heat> wait no
<heat> ofc
<zid> even a guy who wrotes an OS in it can't do 'use ::'
<heat> :: doesn't work on variables but on the class itself
<heat> afaik bob::f();
<zid> oh so like.. struct blah {} Blah; Blah::f() because ::f is a real function, pretending to be a member of every instance of blah?
<zid> that was confusing
<zid> ignore the first part witht he code
<heat> they're all real functions
<zid> methods are not real functions
<zid> they're function pointers
<heat> ok sure
<heat> well
<heat> no
<heat> that is wrong
<zid> you can overload/inherit/subspeciation/etc them
<zid> so they have to be ptrs
<zid> not functions
<heat> negative
<zid> you can't do struct blah { asm("mov eax, 12"); }
<heat> struct S { void foo(); }; <-- no vtable here
<epony> sonny, yep.. remember the starting premise of resource hogging spawn vs the small resource efficient fork (exec).. guess which is going away (failure of computing) on small computers (embedded / mobile / wearable)
<zid> you have to do struct blah { public void f(); } and default constructor somewhere does blah.f = some_f_impl;
<heat> struct S { virtual void foo(); }; <-- virtual means overridable, vtable here with default impl
<heat> struct S { virtual void foo() = 0; }; <-- = 0; here means pure virtual, vtable with no default impl
<zid> ofc it does
<zid> very C++ that
<zid> "let's just pretend = 0 means that"
<heat> well it's the = 0 + virtual stuff
<heat> kind of like a funcptr = NULL;
<heat> the difference between static functions in classes and methods is that methods take a "this" and static functions don't
<zid> adding virtual doesn't make it do some weird stuff, but not call a function pointer
<heat> hm?
<zid> mov [rax], OFFSET FLAG:_ZTV3bob+16; mov rdi, rax; jmp bob::f()
<zid> it still calls a static function, but now it.. writes a function pointer into somewhere first
<heat> sure, because the compiler can devirtualize
<zid> ah okay
<sonny> epony on a small device I would hope fork stays
<zid> I don't know scoping / tu /etc rules to know when/if/how/can it do that
<zid> I didn't give f a definition so I hoped that'd do it
<heat> me neither
<heat> I would guess it's free to do that
<bslsk05> ​godbolt.org: Compiler Explorer
<zid> I didn't think I gave it enough info to emit a direct jmp
<zid> The fact this compiles at all is very C++
<heat> why?
<zid> where's it going to get the definition of f from?
<zid> this 'is' the bob class, right?
<epony> sonny, the small devices are larger than what UNIX needed and they are even larger than computers from the late 90ies but only in short term intervals
<heat> it gets the definition from nowhere
<zid> so why does it compile
<heat> because it's compiling, not linking
<heat> it just gets a declaration
<sonny> epony so still gbs of memory? wow
<zid> yes, but where is the *linker* going to get it, this is the place I would have defined it
<zid> if it were going to exist?
<heat> wdym where?
<zid> you're supposed to put class shit into headers and share them all and spend 400 years compiling code over and over
<epony> sonny, yes the smart phones start from the java runtimes of feature phones
<heat> no.
Burgundy has quit [Ping timeout: 256 seconds]
<heat> you can put class shit into normal source files just fine
<zid> why does nobody know how to do this
<epony> sonny, that's where wearables are too, small arm-java-puters
<zid> I assume some other feature stops them
<heat> because 1) c++ people are craiezie 2) you can't do templates in source files
<heat> as in, they won't work as you want them to
<zid> I heard they had to do.. some thing
<zid> where you wrap a class in a class
<zid> it has a name, I don't remember it
<epony> the watch is a shrunk feature-phone with the smart-phone programming (virtual OS)
<heat> type erasure?
<zid> no
<sonny> epony neither buyers or sellers know what the personal mobile device should be
<heat> the gist of putting shit into source files is that templates need to be instanciated by the compiler, so it needs to see the whole source of the thing while it's templated
<zid> pimpl
<heat> s/into source/into headers/g
<heat> ah yeah
<epony> sonny, the important thing is.. compilers are getting better, that is the real objective (and why OOP itself does not matter, but it was useful and required as support), applies to recursion before it too
<epony> all important stages of compiler and microprocessor design
<zid> std::unique_ptr<Bob> _b;
<zid> so just turning it back into a regular C opaque pointer
<sonny> yeah
<epony> you can be sure at one thing though, none of that revolves around functional programming and Lisp ;-)
<sonny> lol
<heat> member functions (what you'd call methods in other OOP) are just plain old functions with some slightly different name mangling and a this pointer as an arg
<zid> but now with a shit load of boilerplate!
<heat> no magic there
<zid> yea makes sense
<zid> bob::f is the same as bob_f
<sonny> epony you keep forgetting transactional memory
<zid> unless it's overrideable
<heat> yup
<zid> and you're saying only 'virtual' lets you do that?
<epony> sonny, oneday.. memory computing will be fashionable again
<heat> but with nicer syntax
<heat> yes
<zid> You say nicer
<sonny> it's an alternate solution for concurrency/specing memory models
<zid> but I'd say it ruins 99% of people's code, so that the ONE guy doing actual OOP
<zid> doesn't have to do b(b, f);
<zid> and gets b(f)
<heat> not having to pass around pointers and not doing ptr-> is nicer
<heat> how does it ruin people's code?
<zid> microsoft just supplies macros for it btw
<epony> as memory accelerators (microprocessors near the memory that work on the memory instructed by the central processor)
<zid> DX is all DX_Func(b, f); which expands to b->vtbl->func[4](b, f)
<epony> you have that as memory controllers built into modern main CPUs
<zid> heat: making them think "this is a class, better put it in a header"
<heat> no?
<zid> They literally do this
<heat> member functions have little to do with header-only libs or whatever
<zid> I've seen people write entire programs in .h files where main.c is #include "main.h" int main(void) { Project *p = new Project(); }
<zid> they do this because they're 'taught' to do this
<heat> you do have some good uses of putting code in headers though
<zid> so that the 1 guy can do actual oop
<heat> small functions should be put in headers as to inline them
<zid> without having to do b->f(b)
<zid> you know what else can inline them? The linker.
<heat> sure can, with LTO
<zid> even without lto
<heat> how?
<epony> sonny, until then, that kind of programming is a klugey use of graphics accelerators / specialised accelerators for data processing (TPUs)
<zid> size based heuristics :P
<heat> if someone tells you "put everything in header files" then it's not the language's fault
<zid> It is if it encourages you to do it to make language features function
<zid> and it's a pain in the arse to convert if you ever want to later use that feature
<heat> nah
<zid> that would not be the language's fault?
<heat> fact 1) member functions are nice syntax sugar
<heat> yes?
<zid> that's irrelevent
<sonny> lol
<zid> I'm talking about putting shit into headers when they don't need to be, not whether member functions have nice syntax
<heat> fact 2) the compiler needs to see a whole template to instantiate it
<heat> do we also agree on that?
<zid> not a clue
<heat> well, take my word for it, yes
<bslsk05> ​en.wikipedia.org: Tensor Processing Unit - Wikipedia
<zid> If it needs to be there, it needs to be there
<zid> I'm specifically *not* talking about that case.
<zid> I'm talking about the case where it is and should not be.
<heat> so templates should either 1) be reserved for small things 2) should be abused if you have l i m i t l e s s c o m p u t e and want to get better inlining or whatever
<sonny> epony TPU seems premature but I guess they already have software to make use of it
<heat> you have little reason to put things in the headers if not for those things
<heat> except the typical inline BS you do in C already
<zid> what inline Bs I do in C
<zid> I've literally never used the inline keyword in C, it's like register
<zid> but again, all this is highly offtopic
<sonny> why use templates when there is constexpr or whatever?
<bslsk05> ​elixir.bootlin.com: page-flags.h - include/linux/page-flags.h - Linux source code (v6.1.1) - Bootlin
<epony> sonny, it's pushing more of the compute with remote programming but local on device execution so these systems can utilise the client resources, instead of server resources
<heat> sonny, because templates are not constexpr and constexpr is not templates
<zid> the linux kernel is horribly abusive to compilers and language specs, fwiw
<epony> it's a big big hierarchy of computing, not the trivial client-server model any more
<zid> that's why it doesn't build with lto
<heat> it does
<zid> it does not
<heat> yes it does
<zid> andi klein has a special branch that keeps fixing it
<zid> then they keep breaking it
<zid> last branch is 5.13
<heat> the google people do it
<zid> because they do things like sprinkle inline keywords everywhere
<zid> and putting code in headers
<zid> to simulate LTO
<heat> in any case, the typical C bs is doing small, trivial stuff in headers
<heat> because it makes sense
<sonny> epony seems inspired by JS ;)
<heat> this *does not* break LTO
<zid> It absolutely breaks LTO unless you static it
<heat> if you can avoid paying a function call and you get better codegen in the process, you do it
<heat> zid, sure, which is why you static it
<zid> which guess what?! They don't always do!
<epony> sonny, remember, it's a platform to sell applications and services, and you do the investment and processing, while the central botnet controlling your device operation and selling you access to your device functionality running on your premises
<zid> they have to do the -fno-common bullshit that all the C++ compilers had to do to stop everything exploding because everybody used inline wrong
<heat> none of those headers has a single inline without static
<zid> in exactly that way
<sonny> epony yeah, very inverted
<zid> gcc defaulted -fcommon the other way recently and broke every single C++ program ever, judging by the bug reports I saw :P
<epony> think about it this way: Google is selling you a very small Google appliance in your device, a search / data processing appliance that is proprietary that it pushes as software on your device, and you pay for that
<moon-child> tbf, those programs were stupid and sucked
<zid> I ended up boilerplate responding "If you have duplicate symbol warnings, and -fcommon fixes it, read this news post"
<zid> if anyone posted a godbolt
<zid> 9/10 they said "oh, thanks"
<zid> 8/10 then complained that gcc is wrong
<epony> sonny, remember, it's an proprietary binary runtime delivery remote controlled application runtime mechanism that works for selling services and applications delivery to other parties so they can run applications on your devices
<zid> cus that's what people who join compiler channels are like
<sonny> pretty much xD
<epony> that is "java" in a nut-shell
<epony> and that is why the bytecode of these languages and virtual machines is exactly modelling the instruction set of the risc cores of the SoC appliances
<zid> moon-child: gotta throw inline in everywhere, badly though! :( It's my god given right.
<heat> I don't see your point
<zid> what point? that the gcc people and the kernel people are constantly at each other's throats?
xenos1984 has quit [Read error: Connection reset by peer]
<zid> That's fairly well documented
<heat> first it was "C++ member functions are bad because people fuck around and put everything in headers", then it was "C people also fuck around and put everything in headers", now it's "C people misuse inline"?
<zid> I didn't say that at all
<zid> that's probably your misunderstanding
<heat> which part?
<zid> I was replying to the syntax being "nicer" than normal syntax, I said this only really applies in very rare situations, real oop, that is, where I would in C have to do f->b(f)
<zid> 99% of the time, what they wanted, was a function, they're just trained to write shit as classes
<zid> so that other language features work
<zid> and because it's a class, they're also tempted to put it into a header
<heat> language features don't need classes
<heat> that's just shitty "OOP-only" university teachings
<zid> yes, agreed, people are taught wrong.
<heat> (because of java, et al, which do require classes)
<zid> 99% of the time, what they wanted, was a function, they're just trained to write shit as classes
<zid> It's rare someone actually writes a 'this' that was actually required, and not just an artefact of them using a class to structure their code
<zid> required as in, to achieve some class-like effect, and not just "I don't know about `static int x; int increment(void){ x++; }`"
<heat> using a class there may make sense
<zid> instead they bundle it into a class, do this->x++; instead, and then they bundle that into a header, because they were incorrectly taught to do that as well
<heat> testing, modularity, etc
<zid> then compile it into every file
<zid> and pray the compiler both doesn't explode on duplicated symbols, and eliminates all the copies
<heat> functions defined inside a class {}; are all implicitly inline btw
<zid> and if the language does *anything* to promote *any* behavior, the language has some culpability for it
<zid> regardless of what it is
<heat> globals and statics are all nice and shit but then you lose a lot of "nice software development" stuff
<heat> like testing
<heat> and mocking
<zid> yes because #ifdef TEST int main() #endif is impossible to do, or #define static
<zid> that's a great excuse to make everything global all of the time
<heat> for an actual project? yes
<zid> keep taking the tablets
<heat> you can get a very big dependency net very quickly
<heat> try and unit test linux's elf loader
<zid> again, linux kernel code is utter dogshit
<zid> please stop using it as an example of literally anything
<heat> ok, what project do you want me to use?
<zid> why would you need to do that
<heat> I can also do mine. try and unit test my elf loader
<zid> I am aware that you'd have to re-do the dep tree from the perspective of that file being the 'main' one
<zid> The good solution to that is not to make everything global all of the time
<heat> you will quickly realize that an elf load needs a file and a filesystem behind that and the vfs and then when loading you depend on the memory subsystem and virtual memory and page faulting and ....
<zid> It's to actually encapsulate shit
<zid> opaque pointers yo
<zid> (and if I had my own way, pointers to structs with incomplete types embedded into them would be totally legal)
<heat> opaque pointers to stuff as encapsulation is literally the "make everything a class" syndrome
<zid> It's full 100% encapsulation
<heat> btw linux 6.1 builds with LTO no problem
<moon-child> zid: haha memcpy go brrrr
<zid> clang or gcc?
<heat> clang
<zid> clang lto is different
<zid> idk why it works, but it does
<heat> ok lets see gcc
<heat> kconfig rejects gcc lto
<heat> odd
<zid> (cus it's too powerful for linux kernel)
<zid> It cannot handle such strong potions
xenos1984 has joined #osdev
<kaichiuchi> templates are fun
<heat> gcc is also really buggy in many places
<heat> like strict aliasing!
<heat> (and clang too ofc)
<moon-child> linux builds with -fno-strict-aliasing (and you should too!)
<heat> and so does freebsd, and so does musl
<zid> Yea it improves your code quality a thousand percent
<heat> gcc has historically made a bunch of incorrect transformations on fstrict-aliasing
<zid> "I'm doing really really sketchy shit with the optimizer, hold my aliasing"
<zid> no it makes very *correct* transformations, that some people *believe* should be correct
<moon-child> even the correct ones will fuck you up
<zid> err incorrect
<zid> People *love* to get on aliasing's bad side then claim the compiler is being unreasonable about "perfectly normal code"
<kaichiuchi> all hail restrict
<bslsk05> ​gcc.gnu.org: 107107 – [10 Regression] Wrong codegen from TBAA when stores to distinct same-mode types are collapsed?
<bslsk05> ​gcc.gnu.org: 107115 – Wrong codegen from TBAA under stores that change effective type?
<zid> 10.0 introduced a scorcher of a bug
<zid> and the first bug says it works on 9 11 12 and 13
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
Beato has quit [Quit: I have been discovered!]
<kaichiuchi> why do people use fno-strict-aliasing anyway?
<kaichiuchi> is there some gotcha I'm missing
<zid> because it's hard if you're an idiot not to cast pointers
<heat> 1) legacy code 2) sloppy code 3) strict aliasing is buggy and gains you little
Beato has joined #osdev
<heat> musl disabled strict aliasing because of these bugs with ~0% perf difference
<bslsk05> ​www.ralfj.de: Pointers Are Complicated III, or: Pointer-integer casts exposed
<zid> That's a good article
terrorjack has joined #osdev
<zid> about how hard it is to reason about on both sides
<zid> musl isn't the sort of codebase where pointer aliasing would speed anything up in the first place, to be fair
<heat> what would?
<kaichiuchi> i see
<bslsk05> ​lkml.org: LKML: (Linus Torvalds): Re: Invalid compilation without -fno-strict-aliasing
<kaichiuchi> heh
<zid> people doing OOP style crap where they're constantly messing with multiple pointers in potentially silly ways, and don't want the compiler to have to treat every access as a barrier
<zid> if you're implementing memcpy, strict aliasing can only *ever* introduce bugs, not introduce speedups. If you're doing void filter_packet_into_list_of_new_packets_in_serialized_db_string(packet *a, packet *b, int len1, int len2, ...
<zid> then yea, it might actually improve codegen
<Mutabah> having recently read some decompile code that was very likely once C++, and noted the number of useless method calls caused by a lack of strict aliasing
<moon-child> zid: you can implement memcpy using memcpy
<Mutabah> ... yeah, proper strict aliasing can definitely improve oop code
<Mutabah> als... memcpy should be assembly
<zid> see, everybody agrees
<heat> llvm-libc moment
<moon-child> oh yea I saw that
<moon-child> lol
<zid> link for context?
<heat> llvm-libc's memcpy is just __m256 intrinsics and shit
<bslsk05> ​github.com: llvm-project/memcpy_implementations.h at main · llvm/llvm-project · GitHub
<heat> it fully trusts the compiler to vectorize it properly
<zid> >is a header file
<kaichiuchi> so in short what I'm hearing is
<kaichiuchi> strict aliasing causes more trouble than it's worth, and often times doesn't really improve codegen, so it's better to disable it to save yourself a problem
<zid> no
<zid> strict aliasing basically never causes problems, unless you're writing code that is sketchy as fuck to begin with
<moon-child> ok but when I'm writing an os
<zid> you've never compiled anything with it off before
<kaichiuchi> right
<moon-child> I have to write sketchy as fuck code
<kaichiuchi> I've never in my life used -fno-strict-aliasing
<moon-child> in order to os properly
<zid> moon-child: 100% true
<moon-child> similarly: -fwrapv -fno-delete-null-pointer checks
<moon-child> (latter can probably be skipped in usermode)
<zid> -fslow-math
<zid> -O2 /* -O3 is too buggy */
<moon-child> :D
<moon-child> also you are stupid for using /* instead of #, and I no longer respect you
<zid> You don't write your cflags out dynamically by writing a C program?
<moon-child> not usually, but when I do, I wrap them in ""
<moon-child> _technically_ you could make this work by wrapping the whole thing in macro which stringifies with #
<heat> moon-child, wdym no delete null pointer checks?
<heat> you need that for C++ noexcept
<moon-child> fuck c++
<heat> (which clang just ignores and they have not taken my patch yet..............................)
<moon-child> anyway: this caused a vulnerability in linux
<moon-child> because null was mapped, and the compiler assumed if you access null, you die. But it kept going...
<heat> that's on them
<heat> the code could run on a variety of environments where 0x0 is a valid address
<moon-child> that's 100% on the compiler
<Mutabah> the C spec says that accessing NULL is UB
<moon-child> if the code is going to run on an environment where 0x0 is a valid address, then the compiler shouldn't be assuming that accesses to null will fault...
<heat> taking "UB" too literally is dangerous ;)
<Mutabah> It can be, but in other cases it's useful for simplifying the code to allow cascading optimisation
<zid> You can't be a conformig enironment
<Mutabah> e.g. being able to delete a NULL check might simplify some inlined code into a single memory access (where it might otherwise have several branches)
<moon-child> only pussy languages are too scared to define all the behaviour
<sonny> lol
<sonny> I thought C avoided that because they want to be portable assembly
<Mutabah> sonny: Originally I believe
<zid> I just define it all to be exactly what amd64 does with these exact mappings etc
<Mutabah> but it's been kept as undefined in modern C because it allows optimisers to make some useful assumptions
<moon-child> yes and that's incredibly stupid
<zid> and because C doesn't just run on desktops
<sonny> I read why 0 was picked for null, was a convenient hack
<zid> people make shitty C compilers for all sorts of awful micros
<zid> all of the time
<moon-child> if you want to make those assumptions, make the language sound
<moon-child> so you _can't_ violate the assumptions
<sonny> but letting the sentinel value remain a symbol makes sense
<zid> it's *very* handy not to have the language require 128bit floats and that division by 0 does something specific etc
<Mutabah> ^
<Mutabah> Even requiring "division by zero will fault" isn't correct, because a CPU could return the maximum value on a division by zero
<Mutabah> or return zero
<moon-child> that's true, but has nothing to do with messing up otherwise perfectly reasonable code
<zid> which means you have to compare around *every* divide
<moon-child> say 'division by zero may fault, or return an unspecified value', for instance
<sonny> 0/0==1
<zid> to make the cpu conform to the language
<moon-child> if your cpu doesn't do one of those then you super duper suck regardless
<zid> C instead makes the language conform to what the AND of all cpus do anyway :P
<zid> and everything else is IDB/UB
<sonny> lmao
<zid> moon-child: clang is *aggressively* shit at making "I tried to make this conform but failed" programs into unrunnable bugfiestas
<Mutabah> Maybe I'm being impacted by my rust expirence
<Mutabah> where if you hit UB, you've done something VERY wrong
<zid> gcc will just optimize in a way that your bug is hittable more easily, clang will aggressively do the wrong thing on purpose :P
<Mutabah> (also, I was a very exprienced C programmer before learning rust... so I could see most UB potential pretty easily)
<moon-child> Mutabah: rust is mostly sound, with a _relatively_ small surface area of unsoundness. I don't like the language, but this aspect of its design is reasonable
<zid> Literally on purpose, they repeat it on their bugzilla on all these bugs
<moon-child> (and one which it does not even a little bit share with c)
<zid> fn main() { (|| loop {})() }
<Mutabah> moon-child: Refering to the fun you can have with `#[no_mangle]`?
<zid> Mutabah: what does that do on modern rust?
<Mutabah> zid: Defined infinite loop
<moon-child> Mutabah: huh?
<Mutabah> I'm pretty sure that issue got patched
<Mutabah> moon-child: The unsoundness holes
<moon-child> no I'm talking about unsafe
<zid> clang refused to patch it, or add a diagnostic, and instead made it delete the entire function, leaving just the label, that made any call to that function instead call the next one in the output
<zid> the exact same infinite loop issue
<Mutabah> moon-child: Oh. Well, that's an explicit opt in to where you maintain the soundness yourself
<sonny> lol
<zid> bugzilla response is "if you don't like the behavior, make yur linker pad all functions to 16 bytes with ud2"
<moon-child> 'unsafe' is unsound
<moon-child> using 'unsafe', I can write a program that proves a contradition
<moon-child> contradiction
<Mutabah> `unsafe` can be used to make your code unsound
<moon-child> I am talking about the language
<moon-child> the language, including unsafe, is unsound because it contains false theorems
<Mutabah> ("unsound" means that the code _does_ invoke undefined behaviour.. or that safe code can trigger UB)
heat has quit [Ping timeout: 260 seconds]
<sonny> programming holes
<Mutabah> "unsafe"/"unchecked" means that protections are now off, you need to make sure that you maintain the rules yourself
<epony> that's the problem, people think that hardware models the software, that is processors following language features → NO SUCH THING ever / at all
<moon-child> A sound theorem (https://en.wikipedia.org/wiki/Soundness) is one whose conclusion follow from its premises, and whose premises are true. A sound programming language is one that, in accordance with the curry-howard correspondence (https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence), proves only sound theorems
<bslsk05> ​en.wikipedia.org: Soundness - Wikipedia
<bslsk05> ​en.wikipedia.org: Curry–Howard correspondence - Wikipedia
<moon-child> a sound program is one that contains only sound theorems. You can write sound programs even in super-unsound languages like c. But it's very easy to mis-step
<epony> it's not unsound, there is no such property
<sonny> epony forgot about fpgas and asics
<Mutabah> Maybe that's a difference in meaning... I see soundness as a property of code
<epony> it's machine independent programming with an ability to do things that are machine specific (the standard does not prohibit such use)
<Mutabah> and safety a property of languages/apis
<zid> sound to me is "does what it's *supposed* to do"
<Mutabah> yep.
<zid> no exploits or boogs
<zid> which is why C program can be sound, or unsound
<Mutabah> sound code conforms to the language spec such that no conforming compiler/optimiser will cause it to behave differently in anything other than speed
<moon-child> Mutabah: I just explained to you what it means and why it applies to both
<zid> but a C program can be both correct and sound, or correct and unsound :P
<epony> sonny, nope, general programmable computers, as in microprocessors.. implement features and functional blocks that are needed, and then the programming languages "model" the hardware in logic and programmability
<Mutabah> moon-child: Ah, I didn't quite see the rest of your comment.
<sonny> epony hw languages though
<zid> oh hey, clang has stopped solving the collatz conjecture
<Mutabah> moon-child: The term "sound" in my expirence is different to that usage. Saying that a languge is "unsound" (with my expience of the word) implies that it has an inherent issue that makes it impossible to write correct code
<zid> That's a big blow for mathematics :(
<epony> sonny, are modelling frameworks that are not languages for programming applications and operating systems
<epony> hardware description language
<epony> to ease the people, and to reduce the chance of human error at design stage of the functional blocks
<sonny> well that was my point, fpga and asics can be used for apps
<zid> One of clang's releases just did mov al, 1; ret for the entire function, which is kind of funny
<epony> that's a reprogrammable lattice, that is not designed (the lattice) for a language
<sonny> lmao ok
<zid> oh it's set to C
<epony> yep, no such thing as microprocessor designed to run C
<zid> *sets it to C++ as is correct* There we go, now it solves the collatz conjecture
<epony> ^ forget it, that's the stipidity of people wishing a microprocessor designed to run Lisp
<epony> the processors are designed in functional blocks that do operations and have instructions
<sonny> instructions == language
<zid> C++ says infinite loops are UB, the only way this program exits the loop is via "return true", ergo it must return via the return true, ergo this function returns true
<epony> sonny, NO
<sonny> xD
<zid> collatz conjecture solved
smeso has quit [Quit: smeso]
<epony> a programming language is some "synthetic language", that combines certain functionality of expression into linguistic conveniences, comes from macro-programming
<epony> instructions are elementary operations that the microprocessor takes and executes, that's how the machine microprocessor is programmed in reality
<epony> so the hardware separation is there
<moon-child> tbf, collatz _has_ been shown to hold for all ints
<moon-child> (int=c machine int)
<moon-child> sooo technically it's not wrong
<zid> it has __int128 to head you off at the pass there moonchild
<moon-child> oh I didn't actually click
<zid> (another 'let's ignore UB' here is actually the *3 overflowing)
<moon-child> unsigned overflow is ok
<zid> __int128 is unsigned?
smeso has joined #osdev
<zid> I have no idea
<moon-child> no. But unsigned __int128 is
<moon-child> 'bool collatz(unsigned __int128 x)'
<zid> ah I also didn't click it then
<moon-child> lol
<epony> below that is machine (physical) above that is programming (user provided logic, in contrast with machine provided logc) and there is no getting away from resource management regardless of the programming model, nor from the hardware - software separation
<bslsk05> ​en.wikipedia.org: Reconfigurable computing - Wikipedia
nick64 has joined #osdev
<epony> that's why system programming languages are required to have machine specific programming capabilities / features (or standard non-specified behaviour and similar "ommissions")
<epony> portability between different machine leaves these details out of the spec for the language, the machines have these details very precisely specified in the actual physical logic (even when it's reconfigurable and reprogrammable with on chip programming)
papaya has quit [Quit: leaving]
<epony> dancing around the language open for the implementer decisions, is actually discussing the compiler implementation for a particular machine and its decisions how much other machines are supported (how well)
<epony> rationalising that into what processors should be doing is not how things happen for processor design
knusbaum has quit [Ping timeout: 268 seconds]
<epony> with virtual machines and their programming you can do whatever you like, there is always a physical machine to program and it takes that program and executes it on real physical hardware, otherwise it's theoretic computing which does not have much (any) performance
[itchyjunk] has quit [Remote host closed the connection]
\Test_User has quit [Quit: .]
\Test_User has joined #osdev
sonny has quit [Quit: Client closed]
\Test_User has quit [Quit: \Test_User]
\Test_User has joined #osdev
spikeheron has quit [Quit: WeeChat 3.7.1]
epony has quit [Read error: Connection reset by peer]
dutch has joined #osdev
epony has joined #osdev
<geist> zid: huh that UB loop is interesting
<geist> i've definitely bumped into 'infinite loops are UB' much to my chagrin
<geist> ie, if you want a true infinite loop, at least put a asm("") in the middle
<geist> or clang at least simply gives up and generates a broken function
antranigv has quit [Quit: ZNC 1.8.2 - https://znc.in]
antranigv has joined #osdev
nick64 has quit [Quit: Connection closed for inactivity]
<HeTo> I think for (volatile auto x = true;;) { x; } should make it defined because of the read of a volatile variable. then again you probably want a halt or yield of some sort there anyway
air has quit [Quit: Client killed by user]
<moon-child> while (true) { halt } //for example
air has joined #osdev
eroux has quit [Ping timeout: 265 seconds]
eroux has joined #osdev
elastic_dog is now known as Guest1434
elastic_dog has joined #osdev
kof123 has joined #osdev
\Test_User has quit [Quit: \Test_User]
\Test_User has joined #osdev
bauen1 has quit [Remote host closed the connection]
<geist> HeTo: yeahthat works but it actually does work when doing that by storing to a stack variable
<geist> `while (true) asm("");` seems to do the right thing on both clang and gcc with no additional instructions
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
Brnocrist has quit [Ping timeout: 264 seconds]
Turn_Left has quit [Read error: Connection reset by peer]
Left_Turn has joined #osdev
GeDaMo has joined #osdev
seer has quit [Ping timeout: 272 seconds]
Brnocrist has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
freemint has quit [Ping timeout: 248 seconds]
gog has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
bauen1 has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
[itchyjunk] has joined #osdev
wootehfoot has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
Burgundy has joined #osdev
<kaichiuchi> hi
<kaichiuchi> hm, learned something new
<klys> hello
knusbaum has joined #osdev
<kaichiuchi> still playing with compile-time unit testing
<kaichiuchi> what’s really cool is I can run multiple unit tests in parallel with no additional effort
gildasio has quit [Ping timeout: 255 seconds]
<sham1> Making it so that unit tests would have a "dependency" would be weird. They're *unit* tests after all
<sham1> It tests the units
<kaichiuchi> it’s a little strange the more i think about it, yeah
<kaichiuchi> the question is how would you report results?
<kaichiuchi> apparently you can write a file at compile-time now
<HeTo> you can static_assert that the tests succeed
<kaichiuchi> that’s what i’m doing now
<kaichiuchi> I guess that’s sufficient
<kaichiuchi> trying not to kill myself worrying about other stuff yet
<sham1> Testing how units relate to each other would be more integration testing
gildasio has joined #osdev
<kaichiuchi> hm
<kaichiuchi> i don’t think this’ll work…
<kaichiuchi> the idea is to test the CPU emulation at compile-time using test ROMs and comparing the output to known good test logs
<kaichiuchi> unless I change the depth limit?
<kaichiuchi> but I feel like that’s the wrong thing to do
wootehfoot has quit [Ping timeout: 252 seconds]
terminalpusher has joined #osdev
<dzwdz> are there any OSes where you can "fork" a socket?
<dzwdz> that is - create a new socket to the same process, with the process knowing the original socket it forked off
<zid> dup?
xenos1984 has quit [Read error: Connection reset by peer]
<dzwdz> if you use dup, then both fds still refer to the same socket, don't they?
<dzwdz> the other side isn't aware that you did a dup() and can't send/receive data to only one of the dup'd sockets
<dzwdz> for example, let's say you have some local protocol for gui apps
<dzwdz> where they can issue a command that creates a new window and prevents any further commands that'd modify something outside of that window
<dzwdz> a program with a socket that allowed it to affect some window could "fork" that socket, and use the new socket to create a window
<dzwdz> so it'd have one socket that had full control over its window, and one new socket that only had control over the subwindow
<dzwdz> does that make sense
dra has joined #osdev
xenos1984 has joined #osdev
heat has joined #osdev
Matt|home has joined #osdev
<zid> ah you want connect() then :P
terminalpusher has quit [Remote host closed the connection]
<heat> yeah you need to just create a new socket and connect
<zid> heat ghostbusters 2 is on now, gunna watch with me?
<heat> no
<zid> smh
<zid> (slicing my ham)
<heat> i've never seen ghostbusters
<heat> deal with it oldies
<zid> oh, they're very good movies
<kaichiuchi> hi
<mats2> cute
<Matt|home> eh.
<heat> kaichiuchi, bazin
<kaichiuchi> i wanna go home
<Matt|home> a lot of people have nostalgia goggles on when it comes to ghostbusters.. it's fairly dated with unconventional humor. i'd still argue it's worth watching though
bauen1 has quit [Ping timeout: 260 seconds]
* Matt|home is trying to get his energy up to get some work done..
<zid> disregard work
<zid> acquire ghost busting
<Matt|home> i need an attractive female with a nice sounding voice for my project unfortunately.. and those are few and far between
<heat> hello
<zid> sigourney weaver's not good enough?
<Matt|home> lol no
<Matt|home> she's like what, 70 ?
<Matt|home> heat - you are an attractive female with a nice sounding voice i can use for my project?
<heat> absolutely
<zid> 73, apparently
<Matt|home> awesome. i can't pay you though.
<heat> I can do a mean gilbert gottfried impression
<zid> she looks pretty young in this though, 43 years ago
<heat> (RIP)
<kaichiuchi> okay so implementing std::function isn’t as terribad as I thought
<zid> 33 years ago
<Freja> sigourney weaver is a) attractive and b) good voice, what matters how old she is
<Matt|home> zid - yeah i saw her in cabin in the woods, she's still workin apparently
<Matt|home> it matters because she's an A-list hollywood actress and i don't have millions of dollars to hire her :p and gj kaichiuchi
<Freja> but why do you require these criteria for your project in the first place
<GeDaMo> Cabin in the Woods must be at least ten years old :|
<GeDaMo> I haven't seen it but I think she's in the new Avatar movie
<heat> "Weaver with Ronald Reagan and Fahd of Saudi Arabia in 1985." ah yes, a supervillain
<zid> You know fiver exists right
<zid> fivr whatever it's called
<heat> In 2009, Weaver signed a petition in support of director Roman Polanski, who had been detained while traveling to a film festival in relation to his 1977 sexual abuse charges, which the petition argued would undermine the tradition of film festivals as a place for works to be shown "freely and safely", and that arresting filmmakers traveling to neutral countries could open the door "for actions of which no-one can know the effects."
<zid> voice actors are $20/hr
<heat> nigel farage is cheaper than that IIRC
<Matt|home> well it's a bit cynical, but i have some scripts for youtube videos i want to do.. unfortunately having a pretty face and voice is not something i have, and if i really wanna generate views those are kind of necessary, especially for STEM stuff. plus i've got allergies and my throat is constantly dry/scratchy so i sound awful
<heat> wtf
<heat> that's weird
<heat> hello woma, give voice for nerd horny?
<kaichiuchi> that is… very odd
<Matt|home> so finding a good face for my channel is necessary
<kaichiuchi> I would reconsider what you’re saying
<Matt|home> ? no not really. people watch videos when the thumbnails are more attractive and the titles are slightly clickbaity
<Matt|home> i've done research into this. sure there are slight exceptions but overall the trend is younger + pretty = better money
<heat> no
<heat> is tom scott a young, attractive female?
<Freja> tom scott is fuckin bae
<Matt|home> again there are exceptions. eevblog for example has the most irritating voice i've ever heard but he does good quality videos. ben from applied science has great quality but the most boring presentations
<Matt|home> and they have good view counts ish
<Matt|home> but im playing a numbers game
<GeDaMo> Use a CGI avatar
<GeDaMo> Like a vTuber
<Matt|home> yeah i thought about it
<heat> I learned about tom scott from computerphile, a youtube channel about literally old british people talking about computers
<kaichiuchi> still doesn’t sit right at all
<Freja> what do clicks and view counts really measure, you want actual engagement not just random clicks, and a good fanbase comes from producing quality content people want more of
<Matt|home> like i said it's cynical as all hell, but if i want to make a living then i can't be picky. i think youtube pays what, a dollar for every thousand views nowadays? yeah im not playing around with that
<kaichiuchi> do you really think you’re going to get that?
<kaichiuchi> the people who do get *lucky*
<GeDaMo> Success is mainly down to luck
<Matt|home> nah. i have a nasty feeling it's gonna fail hard, but if i get a couple good videos out people enjoy then at least i'll be a little happy even if i wasted time
<Freja> a pretty face and a nice voice won't make you a living from youtube
<Matt|home> i'd still like to increase my chances even if marginally
<kaichiuchi> there’s like 73636366363 excellent STEM videos on youtube if you ignore “leetcode”
<kaichiuchi> i still can’t believe people worship leetcode
<Matt|home> thanks kaichiuchi i'm aware :p in any case
<heat> kaichiuchi, leetcode is the way if you want to get a job
<kaichiuchi> i’ve never done a single leetcode problem in my life
<kaichiuchi> and i’m an embedded engineer
<GeDaMo> I'm not sure I've ever seen a "leetcode" video :|
<heat> i've done my fair share of leetcode grinding
<Matt|home> i thought about going the total opposite direction too at one point.. im a grizzled bear looking motherfucker, so i figured dressing up in like a pink japanese schoolgirl outfit with a purple pink and pastel room while i delivered a monotone dead serious video on a dry topic might be engaging.. but jesus christ that's a lot of work
<heat> and i hate every second of it, but oh well
<kaichiuchi> the problem with leetcode is it doesn’t actually measure anything
<Matt|home> i've heard about it, is leetcode like uh... god what was it called. that website a long time ago that tried teaching web programming interactively
<Matt|home> something hacker
<GeDaMo> Is it not one of those "challenge" sites?
<kaichiuchi> hackerrank
<Matt|home> website hacker or whatever
<Matt|home> no , hackthissite i remember :D
<Freja> ah good old HTS
<heat> kaichiuchi, it does measure something, it measures how easy you are to work with
<kaichiuchi> this is what people do: they “grind” leetcode, end up memorizing some answers, and then pray they get asked them at the interview
<kaichiuchi> no it doesn’t
<Matt|home> ... so wait leetcode is just a bunch of coding problems?
<kaichiuchi> yeah
<Matt|home> ... that's almost irrelevant
<heat> if you do leetcode assignments in an interview the best part is to forget the actual problem and see how the person behaves
<kaichiuchi> the problem is a lot of companies ask textbook questions from leetcode
<kaichiuchi> which people are grinding on the regular
<Matt|home> okay. let me ask one very important question
<zid> I had a slinky but I straightened it.
<kaichiuchi> when I was interviewed here, I was asked to design an alarm clock
<kaichiuchi> that makes PERFECT sense
<Matt|home> if you are a competent coder who is familiar with the intracacies of a few languages, like you're familiar with the standards and know how to write for it
<kaichiuchi> that’s relevant to my job
<zid> Like, electronically desig?
<kaichiuchi> and i was there for 4 hours
<Matt|home> will they ask you some questions that you would not know the answer to if you didn't memorize some of the leetcode problems?
<kaichiuchi> no give a high level design
<zid> or product design
<heat> Matt|home, yup
<Matt|home> give me an example
<kaichiuchi> like, how would you handle DST, how would data be stored, etc etc
<zid> how many manhole covers does it take to reverse a list in place in new york
<kaichiuchi> and then they gave me a C test
<kaichiuchi> and that was it.
<zid> handle DST? you check /etc/timezone duh
<heat> Matt|home, I can't solve a bunch of shitty algorithmic problems because 1) I'm not a algo person 2) I mostly do kernel coding
<heat> anything fancier than a hashtable here is a bonus
<Freja> zid: why are manhole covers round
<kaichiuchi> i’ve met some actual incompetent people at my old job where all they did was grind leetcode
<Matt|home> yeah. see that's the kind of crap i'm against. that's not a good metric for measuring a good coder
<zid> Freja: stop em falling in?
<kaichiuchi> but they couldn’t actually write real code
<Freja> zid: :o
<Matt|home> that's filling out a randomized checkbox
<zid> mine are square though
<zid> easier to cut out of a plate
<kaichiuchi> they knew how to solve a specific subset of problems and not how to solve practical problems
<Freja> :^)
<heat> if I give you the 2sum problem it's still solveable even if you haven't looked at the solutions
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<heat> anything harder? probably tough
<kaichiuchi> I get mad when I hear that someone is “grinding” leetcode because you’re playing a game of luck with companies
<kaichiuchi> it’s not the fault of the someone
<heat> how many times have I used dynamic programming in the real life? 0
<zid> heat: I need you to write a parser that takes groups like [[3],1] and [3,1] and compares if the left side is smaller than the right side
<kaichiuchi> it’s the fault of corporatism
<heat> zid, lol
<Matt|home> yeah don't grind fucking coding problems that's not going to help unless you're bored and have nothing better to do
<zid> to be honest
<zid> there's a BUNCH of people who come to #osdev asking how to write an OS
<zid> and what they should be doing
<zid> is programming challenges (or literally anything else)
<zid> cus they can't actually code yet
<Matt|home> i'm still having trouble with paging and addressing ;_;
<kaichiuchi> i remember when my boss at my old job gave me the trapping rainwater problem
<kaichiuchi> after I was already hired
<zid> kaichiuchi: did you offer him a tarp
<kaichiuchi> no
<zid> That's how I'd do it
<Matt|home> .. what is the trapping rainwater problem
<kaichiuchi> heat has seen an excerpt of code from that place
<kaichiuchi> it’s the ultimate proof that leetcode people are garbage
<zid> people invested in leetcode are infact, total weenies
<Matt|home> cool tell me , i have 10 mins before i have to go
<zid> but it's not a bad resource if you're out of ideas for what to write
<kaichiuchi> I shouldn’t be so prejudicial
<kaichiuchi> but god
<zid> like advent of code
<kaichiuchi> I have nothing but bad memories
<heat> people invested in leetcode want to get a job
<kaichiuchi> so did I
<zid> I wouldn't necessarily hire someone who ranked on advent of code, but it isn't a downside
<kaichiuchi> never did leetcode
<heat> and you're an embedded guy, different market
<heat> probably a smaller company too
<kaichiuchi> i was in retail for 10 years because I couldn’t afford school
<kaichiuchi> no
* Matt|home googles rainwater ;_;
<kaichiuchi> we have like… $5 billion in revenue
<kaichiuchi> the conglomerate as a whole
<heat> these days most companies are either FAAAAAAAAAAAAAAAAAAAAAAAAAAANG or want to emulate it
<kaichiuchi> yes
<heat> and ofc having FAAAAAAAAAAAAAAAAAAAAAANG on your resume is really good
<zid> I think it's time to play tetris
<bslsk05> ​www.geeksforgeeks.org: Trapping Rain Water - GeeksforGeeks
<kaichiuchi> if you have any FAANG on your resume you’re set for life
<Matt|home> oh that's annoying and rather bullshit..
* Matt|home googles faang..
<Matt|home> ah.
<zid> fucked arse amp noodle goog
<zid> oh that's fairly simple to get an solutio
<zid> I'm sure there's some cleverer shit you can do
<zid> but just rasterizing it would be trivial
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
Burgundy has quit [Ping timeout: 268 seconds]
<zid> The problem with these is that the dataset is so tiny you can't tell how it's scaling
<zid> If it were 10 million * 10 million and had very few bars the fastest solution is much different
<kaichiuchi> hm…
<kaichiuchi> I think I should generate a jump table at compile time
<zid> I think you should initialize an array of function pointers
<kaichiuchi> what i do now is just have two very large switch-case tables
<zid> yea that's what you want the compiler ultimately to transform it into anyway
<zid> a big computed goto
<kaichiuchi> but there’s an obvious pattern that I don’t want to deduce at run time
<zid> with the function pointer array you're just praying it turns it into the goto
<zid> it's less likely than using the switch
<kaichiuchi> but if the same can be deduced and generated at compile time that’d be better
<kaichiuchi> and yeah, right
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
<zid> movzx esi, sil; movsxd rax, [rbp+rsi*4]; add rax, rbp; jmp rax
<zid> mine's an array of offsets by the looks of it
<zid> cute, and my CB() turns into AVX
<zid> LTO puts the entire program into a single function, fun to debug
<zid> it merges NOP / LD B, B / LD C, C / etc
<dzwdz> does anyone here have a working ata pio read/write driver?
<dzwdz> mine's being weird and i want to look at a known working one
<zid> are you the one I read the wiki page to a few weeks ago? :P
<kaichiuchi> do you read the wiki as a bedtime story
<dzwdz> i don't think so, no
<zid> ah someone else was doing ata pio then
<zid> I ended up just copy pasting the relevent lines of the wiki
<zid> until it clicked
<dzwdz> it's really brief about the writing part
<zid> likely because it's simple
<dzwdz> i still managed to fuck it up ^^
<zid> 28 or 48 bit?
<dzwdz> 28bit
<dzwdz> one thing i'm not doing that the wiki tells me to do is flushing caches
<zid> command 30, write words
<zid> use a delay
<zid> cache flush after the write is done
<zid> (command e7)
<zid> might wannt poll DRQ until the drive becomes ready after sending the command too
<dzwdz> i'm polling on BSY and RDY before reading every sector
<dzwdz> oh maybe that's the issue
<zid> be more cognizent that there's a real drive somewhere with slow spinny rust in it
<zid> is my main advice
<zid> and that the isa bus is piss slow
<dzwdz> there's not, i'm on a vm and the disk image is on a ramdisk
<zid> yea but the other end is pretending there is!
<dzwdz> i guess
<dzwdz> i'm polling for DRQ now too, but i still have the issue
<zid> I've had this exact issue writing a cd-rom driver for the playstation
<dzwdz> namely, after writing to a few sectors, reading them yields 0s
<zid> I got it working on hardware at least, but the emulators are still all wrong
<zid> (literally all of them)
<dzwdz> even though i wrote actual data there, and the actual data shows up in the disk image
<zid> did you cache flush?
<dzwdz> what am i, smart
<zid> you likely have the empty sector in the cache still
<dzwdz> the sector wasn't even empty in the first place
<zid> so you need to drop it so the read grabs from the actual device not the cache
<zid> I'd do a cache drop at init time too then
<heat> writes hit the cache though?
<zid> idk, never read the ata code/spec
<dzwdz> why would reading skip the cached written sector
<zid> I'm just reading the wookie
gxt has quit [Remote host closed the connection]
<zid> and the wookie is notoriously shite
gxt has joined #osdev
<heat> i think I know why my OS makes the MGLRU go craycray
<dzwdz> okay what the fuck
<heat> my page allocator structures are located in the page itself
<dzwdz> i think you're right
<zid> This conversation is very deja vu
<heat> this means I fault every page on startup and the lru code isn't liking that
<dzwdz> if i write in a certain way, the sectors read as all zeros until i read like 65kb
<dzwdz> which i assume bumps them out of the cache
<heat> have you considering enabling qemu tracing
<dzwdz> good idea
<heat> -trace "ide*"
<zid> dzwdz is the reincarnation of dyao
<zid> cyao*
lockna has joined #osdev
<zid> [08:57] <cyao> Hello, does someone have a working driver for ATA PIO write (28 bit mode)? Can't figure out why my driver is not working
<dzwdz> did they have the same cache issue?
<zid> reading the wookie out loud over irc has been a cromulation solution both times :P
<zid> no he'd just totally biffed his outb code
<zid> he was doing pusha / inb / popa / ret
<zid> destroying al in the process
<zid> he thought he was getting forward progress by just messing with his code, but it was just changing the stale value in `al`
<zid> he was basically fuzzing his own code
gog has quit [Read error: Connection reset by peer]
<dzwdz> oh great i added a debug print and it fixed itself
<zid> uh-oh
<dzwdz> i've partially figured out what the issue is
<dzwdz> after i do that one write, something somewhere is ignoring the addresses i'm providing to read() and just reading consecutive sectors
<zid> I accept cash and paypal
dzwdz has left #osdev [Connection timed out.]
<heat> he aint payin
<zid> shh
notdzwdz has joined #osdev
<notdzwdz> i have NEVER made this joke in this channel
<zid> I accept notcash and notpaypal too
<notdzwdz> i'm notpaying
gog has joined #osdev
<zid> just put it on heat's tab imo
<Ermine> notlol
<zid> or.. cold's tab? notheat?
gog is now known as pog
<zid> hi poggers
<Ermine> notgog == pog
<pog> pog and gog
<zid> is og
<pog> i dropped my computer and something is rattling inside
<zid> Your cpu fell out, sorry
<pog> dang
<pog> seems to work fine
<zid> I have a spare E5-1620 if you need
<pog> guess a cpu is unnecessaryt
demindiro has joined #osdev
<notdzwdz> update: polling before every command seems to fix it
<zid> so doing it properly makes it act more properly, good to know
<kaichiuchi> hi
<zid> surprised it's emulated well enough for it to matter, but hw would absolutely care
<notdzwdz> the wookie didn't say i needed the drive to be RDY when issuing commands
<zid> yea it does
<notdzwdz> what
<zid> (It's also obvious)
<zid> "The method suggested in the ATA specs for sending ATA commands tells you to check the BSY and DRQ bits before trying to send a com.."
<zid> "you never want to send new commands to a drive that is already servicing a previous command, anyway. Your driver always needs to block if the current device is actively modifying BSY/DRQ/ERR, and your dev"
<notdzwdz> well shit
<notdzwdz> guess i'm dumb
<notdzwdz> thanks
<zid> This is very similar to how the playstation's cd-rom drive works at least
<zid> but the interface is slightly saner
<zid> command set is nicer too
<notdzwdz> i inserted a bunch of 400ns delays everywhere too, for good measure
<kaichiuchi> the HC-05 is nice
<zid> they've hooked it up wrong in several ways
<zid> and the firmware is buggy and unfinished
<zid> but I'm sure the HC05 itself is nice
xenos1984 has quit [Ping timeout: 252 seconds]
<kaichiuchi> the BIOS is a work of art
<kaichiuchi> a work of art of what not to do
<zid> The interrupts on the cd-rom drive are insane
xenos1984 has joined #osdev
<kaichiuchi> yes
<zid> They have like 3 types of interrupts, and they've hooked them up as INT1, INT3, and INT5
<zid> not 1 2 and 4, 1 3 and 5
<zid> they've numbered them, rather than using it as a mask
<zid> so you can mask INT0 and it turns INT1 into INT0, INT3 into INT2, and INT5 into INT4
<zid> and if you actually do this, all the emulators fuckin explode :P
terrorjack has quit [Ping timeout: 252 seconds]
<heat> im fucking pissed
<heat> mglru shot my workflow to bits
<zid> majorleague game LRU, it's for pros not you
<Ermine> why LRU
<kaichiuchi> heat: sorry, was that “bleeding edge doesn’t always work out” i’m hearing?
dude12312414 has joined #osdev
<zid> I'm still struggling with C89
<zid> Can't imagine using things newer than myself
* Ermine thinks if it possible to do OS in Fortran
<GeDaMo> Wasn't there somebody in here writing an OS in Cobol?
<heat> kaichiuchi, stfu
<kaichiuchi> :)
<j`ey> heat: why it break
<heat> first time getting regressed by the arch kernel
<kaichiuchi> that’s what I said
<kaichiuchi> and then i stopped that
<kaichiuchi> but here i am using arch again
<heat> j`ey, qemu-system-... <onyx> seems to cause major thrashing
<j`ey> blame onyx
<heat> sortix too
<j`ey> what about linux?
<heat> even linux seemed to do that
<heat> (but less)
dude12312414 has quit [Client Quit]
<heat> it thrashes so hard ps aux and htop stop working
<heat> I assume it's hugging the mmap lock
<j`ey> is it optional?
<j`ey> I mean, did you turn it on with a commandline, or is it arch default
<heat> yeah you can explicitly disable it, but it's arch's default
<heat> /sys/kernel/mm/lru_gen/enabled
<kaichiuchi> heat: just know that I am laughing to myself hysterically at work
<kaichiuchi> but i love you
<epony> htop is supposed to stop working anyway
<epony> No steam engine in this flying island https://en.wikipedia.org/wiki/Fortress_(programming_language)#History "The name "Fortress" was intended to connote a secure Fortran, i.e., "a language for high-performance computation that provides abstraction and type safety on par with modern programming language principles".. In July 2012, Steele announced that active development on Fortress would cease after a brief winding-down period, citing complications with using
<epony> Fortress's type system on existing virtual machines."
<bslsk05> ​en.wikipedia.org: Fortress (programming language) - Wikipedia
bauen1 has joined #osdev
<epony> not all of these are suitable for system programming either https://en.wikipedia.org/wiki/Category:Programming_language_families the domain specific languages are not general or system programming ones
<bslsk05> ​en.wikipedia.org: Category:Programming language families - Wikipedia
<epony> many have tried, only you have a chance to succeed.. in repeating the same kind of success
<chibill> Hey I finally managed to join back in! After days of Matrix / Element giving me issues.
Gooberpatrol66 has quit [Quit: Leaving]
<epony> for example declarative programming languages would be a non-starter for system programming https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms#Performance_comparison and you can reason about purely functional in the same "conclusion" for most such attempts
<bslsk05> ​en.wikipedia.org: Comparison of programming paradigms - Wikipedia
<epony> but you can call your "application" an "operating system" just remember, it's an application not a system, if it does not have design features and functions an typical (by various classification) operating system has
<epony> and there is your list of applications that assume some of that roles capabilities but fail in the efficiency and performance (and resource management in general) so are application systems, not operating systems https://en.wikipedia.org/wiki/Comparison_of_application_virtual_machines
<bslsk05> ​en.wikipedia.org: Comparison of application virtualization software - Wikipedia
Burgundy has joined #osdev
terrorjack has joined #osdev
<pog> nya
<zid> poggers goes woof though
<pog> nyoof
<zid> good poggers, go fight kevin
<zid> dababy can watch
<bslsk05> ​'Did Poggers EAT Kevin!? (Poppy finds a Boyfriend 😡) *gone sus*' by The Urban Rescue Ranch (00:10:33)
<pog> nooo poggers don't eat kevin
<epony> Rust eats Java
<epony> right there stuck on the LLVM eating a small but very important part of the kernel compilation bringing in a monster dependency for giggles and laughter, enjoy
<epony> you were compiling too fast anyway, no speeding
danilogondolfo has joined #osdev
<bslsk05> ​en.wikipedia.org: Berkeley Packet Filter - Wikipedia
<kaichiuchi> zid: i’m going to do something evil with my emulator
<kaichiuchi> but i don’t want to tell you what it is, yet.
<zid> That'd make a refreshing change from the good th-
<zid> so business as usual?
sham1 has quit [Quit: WeeChat 3.5]
sham1 has joined #osdev
<kaichiuchi> yes
xenos1984 has quit [Ping timeout: 248 seconds]
epony has quit [Ping timeout: 268 seconds]
<pog> hi
<zid> Hi peggy
<pog> hmmm
<pog> zebracakes
pog is now known as gog
xenos1984 has joined #osdev
<kaichiuchi> i love zebra cakes
<kaichiuchi> they’re incredibly bad for you but delicious
gog is now known as pogchamp
<pogchamp> i have pannetone
<pogchamp> panettone*
dude12312414 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
nanovad has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
nanovad has joined #osdev
<kaichiuchi> you have what now
<zid> colour samples?
<mats2> you kids make me feel old
<pogchamp> i have fancy italian dessert bread
<mats2> pog was an insult in my day
<pogchamp> haha pog
<pogchamp> how old are you mats2
<mats2> 29+-5
<pogchamp> pfff
<pogchamp> you're my age
<mats2> just in case anybody tries to reset my ebay password and steal my pogs
<pogchamp> or you're 10 years younger than me
<pogchamp> hard to say with that error bar
<mats2> i learned my lesson after mtgox stole my bitpogs
<pogchamp> pff
<pogchamp> i only deal in controlled substances
<pogchamp> risky but the value stays ahead of inflation
<mats2> i get it
<mats2> cocaine mining is highly predictable and transparent
<pogchamp> yes
<kaichiuchi> i’m 28
<pogchamp> cool
<kaichiuchi> no not cool
<kaichiuchi> i want to be 14 again
<kaichiuchi> and do everything right this time
<sortie> heat, if you need a reliable OS with qemu to run your Sortix VMs on, I'm your guy
<pogchamp> haha mood
* pogchamp eyes her time machine
<pogchamp> one day
<pogchamp> but then again it never happened so it can't ever because time is a closed loop
<pogchamp> shit
<sortie> pogchamp, uh, somebody just appeared for a moment and wanted me to tell you dB2iIB9UmzbLOmNP6rCZSJMullFIUXYV2m+PFwl4IJbcYZyj5cQi8W21UADBZqQtkTPFVk7xCp8n
<kaichiuchi> everyone wishes they could change things
<kaichiuchi> but apparently as people get older they have no regrets
<kaichiuchi> perhaps that’s just acceptance.
epony has joined #osdev
<sortie> The layman's time travel is to predict what you'll regret and take the opposite path
* sortie is very happy
<pogchamp> well i know that now
<kaichiuchi> if I had done better when I was younger
<kaichiuchi> eh, for once i don’t want to get into it
<kaichiuchi> told the same story for years
<pogchamp> let's just oof in silence
<pogchamp> sortie: that's not base64
<kaichiuchi> suffice it to say that if I had not been a naive stupid kid who thought he was the world’s greatest authority on everything, I’d be better
<sortie> pogchamp, you never had your future self send you a weird binary base64 blob?
<pogchamp> not yet
<sortie> You will soon always have had so
<pogchamp> shit
<kaichiuchi> if i had a time machine i’d just go into the future to figure out what to invest in and be rich
<pogchamp> i wonder what she's going to send me
<sortie> I bet it's the boot sector for a machine you're yet to invent
<pogchamp> sweet
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<kaichiuchi> archpog512
danilogondolfo has quit [Remote host closed the connection]
<pogchamp> i'm going to reinvent itanium
<pogchamp> but good
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
nanovad has quit [Ping timeout: 268 seconds]
<FireFly> yess
<FireFly> good
<heat> sortie, get kvm and i'm sold
sonny has joined #osdev
<sortie> heat, just spin up a Linux middle VM with KVM
nanovad has joined #osdev
<heat> actually im not too sure if its linux
<heat> it's still getting upset
<heat> after my changes and disabling mglru my boot got faster but it's still slow
terrorjack has joined #osdev
<heat> sortix still has !fun
nanovad has quit [Read error: Connection reset by peer]
nanovad has joined #osdev
<heat> i don't get this ;_;
<heat> sortie, how does your page allocator work?
<sortie> I don't see any '!fun' in Sortix's codce?
<sortie> code
<heat> at some point during my OS and your OS's boot it gets qemu and linux very upset
<sortie> heat, it makes a big array of unused frames, using unused frames to populate it
nanovad has quit [Client Quit]
<klys> it's that second part that's the real trick
<sortie> It intentionally tries not to touch most memory until it's actually allocated the first time, but it will touch a fixed % of it to make that list
<heat> that seems very harmless
<sortie> Previously I made each page link to the next but that touched all memory and forced commitment and could go boom
nanovad has joined #osdev
<sortie> (if the VM was overcommitted)
<klys> fixing the right number of pages for the right phase of allocation implies some calculation
<heat> just so you understand the scale of the issue, after booting Sortix the process locks up for some 30-60s, the window doesn't respond and htop/ps aux stops working on it
<heat> your fun.iso with fun boot optimizations you gave out some months ago measures 0.25s boot time!
<sortie> heat, ah yeah I fixed those deadlocks when spawning qemu on Sortix the other day, did they also fix it in your hobby Linux OS?
<sortie> heat, 0.25 s!
<sortie> Now that's an acceptable boot speed!
<heat> if anything went boom it's your corp's fault :v
<sortie> As long as it's for glorious shareholder value
<zid> heat: is this qemu running on onyx, booting sortix, or something?
<heat> i legit don't understand what's going on
<zid> I've never actually asked what it is the hell you're doing
<heat> its qemu running on linux
<zid> so none of your code involved?
<heat> qemu running on linux and booting $random_iso_of_operating_system_i_have
<heat> yup
<klys> posibly ymmv should you have the full invocation commandline
<zid> what did you change, updated leenooks? I updated to 6.11 and it seems fine for me at least :P
<zid> but I also no ever actual update always
<heat> I updated leenooks and qemu one of these days
<heat> plus a bunch of random shit
<heat> you know how arch is
<zid> no but I assume not too different to gentoo
<heat> rolling release, updating always picks up a bunch of stuff to update
<zid> I have good news and bad news
<zid> bad news, my new rice cooker's first use instructions to wash in soapy water were wholly inadequate, it needed a boil in break cleaner
<zid> good news, the vindaloo this now-yellow rice is with is melting my face off so I can't tell
<heat> ok rebooting on lts, lets see
heat has quit [Remote host closed the connection]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
<zid> is your computer fixed ye
<heat> i don't know
<zid> what benchmark are we running
<heat> reboot to a kernel, run qemu and see if poopy pants, try and use up a bunch of memory, run qemu, etc
<heat> I tried on lts and 6.1.1 and everything seems fine but I'm also not using much swap
<zid> why is my user/ dir broken in boros/ rn?
<zid> My main.c is missing
<heat> linux 6.1
<heat> theres your issue
<zid> I am on 6.1.1
<zid> why are you on 6.1
<heat> i'm on 6.1.1 too
<zid> oh phjew
<heat> all i'm saying is that in 6.1 there was a bug that deleted boros/user/main.c
<zid> The one true uname
<zid> it didn't delete it, it's just an ancient one
<zid> not the one with the changes that make it work
<zid> that I definitely wrote
<zid> git stash list empty
<heat> not even PREEMPT_DYNAMIC smh
<zid> is that the pluggable scheds thing
<zid> that I said no to
<zid> cus it added an if() to the hot path in the sched
<heat> no
<heat> it allows you to pick preemptible vs other weird models dynamically
<zid> so yes then
<zid> that's exactly what it is
<heat> that doesn't add an if
<heat> "The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled but if runtime patching is not available for the specific architecture then the potential overhead should be considered."
<zid> so the docs also agree :P
<zid> "the runtime overhead exists"
<heat> static call is just .text patching
<zid> and the patchy code I need to keep mapped, that's literal bytes of wasted memory
<zid> I need it all for my pictures of goats
<zid> weird how you're the one getting slowdowns and not me
FreeFull has joined #osdev
<bslsk05> ​twitter: <storyofseasons> his new years resolution is to destroy his enemies ␤ ␤ (with love) https://pbs.twimg.com/media/FkF9MhQWAAAe-0V.png
sham1[m] has joined #osdev
<kaichiuchi> hm
<kaichiuchi> wonder why I don't have a kernel update
<kaichiuchi> oh
sonny has left #osdev [#osdev]
ornx has joined #osdev
andydude has joined #osdev
sham1 has quit [Quit: WeeChat 3.5]
sham1 has joined #osdev
sham1 has quit [Client Quit]
andydude has quit [Quit: andydude]
sham1[m] is now known as sham1
andydude has joined #osdev
andydude has quit [Client Quit]
bgs has joined #osdev
bgs has quit [Remote host closed the connection]
elastic_dog is now known as Guest9840
Guest9840 has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev