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
itrsea has joined #osdev
joe9 has quit [Quit: leaving]
mrpops2ko has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
innegatives has quit [Quit: Connection closed for inactivity]
mrpops2ko has joined #osdev
frkazoid333 has quit [Ping timeout: 260 seconds]
frkazoid333 has joined #osdev
agent314 has joined #osdev
edr has quit [Quit: Leaving]
gog has quit [Ping timeout: 276 seconds]
jcea has quit [Ping timeout: 248 seconds]
_averymt has joined #osdev
averymt_ has quit [Ping timeout: 248 seconds]
msv has quit [Quit: Leaving]
m5zs7k has quit [Ping timeout: 248 seconds]
m3a has joined #osdev
msv has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
m5zs7k has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
agent314 has joined #osdev
netbsduser` has joined #osdev
osmten has joined #osdev
_averymt is now known as averymt
goliath has joined #osdev
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
netbsduser` has quit [Ping timeout: 260 seconds]
PublicWiFi has quit [Ping timeout: 244 seconds]
PublicWiFi has joined #osdev
GeDaMo has joined #osdev
Lucretia has joined #osdev
kata has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
lanodan has quit [Ping timeout: 252 seconds]
gog has joined #osdev
kata has quit [Read error: Connection reset by peer]
kata has joined #osdev
gog has quit [Quit: byee]
kata has quit [Read error: Connection reset by peer]
kata has joined #osdev
kata has quit [Quit: ZNC 1.9.1+deb2+b3 - https://znc.in]
kata has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
vdamewood has joined #osdev
averymt_ has joined #osdev
averymt has quit [Ping timeout: 276 seconds]
marshmallow has quit [Ping timeout: 268 seconds]
innegatives has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
osmten has quit [Quit: Client closed]
edr has joined #osdev
marshmallow has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucretia has quit [Remote host closed the connection]
Lucretia has joined #osdev
goliath has quit [Quit: SIGSEGV]
lanodan has joined #osdev
Left_Turn has joined #osdev
kata has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
ekko has joined #osdev
pabs3 has quit [Ping timeout: 260 seconds]
pabs3 has joined #osdev
dude12312414 has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
pabs3 has quit [Ping timeout: 248 seconds]
pabs3 has joined #osdev
innegatives has quit [Quit: Connection closed for inactivity]
innegatives has joined #osdev
Goodbye_Vincent1 has quit [Ping timeout: 252 seconds]
mjacob has quit [Ping timeout: 244 seconds]
mjacob has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
itrsea has quit [Quit: leaving]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
mxs9 has joined #osdev
kata has joined #osdev
kof673 has quit [Ping timeout: 260 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 248 seconds]
<Ellenor> quick, check your pow() https://slime.global/@junebug/114784176770209370
<bslsk05> ​bsky.app: @chordbug.bsky.social on Bluesky
<GeDaMo> Yikes :|
<zid> was already fixed internally 2 weeks ago apparently, but it's sort of crazy that broken pow (or maybe constant folding in msvc version used bug?) made it so far up the chain
<heat> yeah but who has tests anyway?
<zid> osu, apparently ;)
netbsduser` has joined #osdev
<zid> Also that is my nightmare about using random high level language shite
<nikolar> zid: how the heck did that happen
<zid> either a bug in pow itself, or a bug in msvc
<heat> someone changed pow + no tests
<zid> osu -> .net -> msvcrt.dll
<nikolar> heat: yeah but why
<heat> various reasons
<nikolar> why did anyone touch pow lol
<heat> speed, correctness
<nikolar> after probably 2 decades
<zid> might ahve been fucking with ifdefs
<zid> for newer cpus
<zid> and accidentally the wrong lines
<zid> pow's important to optimize
<GeDaMo> Somebody suggested they might have asked an AI :P
<nikolar> GeDaMo: that i can believe
<nikolar> zid: sure, but, isn't it almost always just a polynomial approximation
<nikolar> so, no particular thing to optimize for arch
<zid> if msvc were that good
<zid> you might
<zid> but msvc is shit, so I bet it's all inline assembly
<nikolar> kek i guess that's also true
<zid> gcc is too shit to use avx inside str* and mem*
<heat> glibc i386 pow is fully asm
<zid> fuz rewrote all freebsd's the other day
<heat> the other day aka like 2 years ago
<nikolar> zid: it would use avx on -O3, but no one compiles libc with -O3
<nikolar> i guess you could do -ftree-vectorize
<nikolar> but eh
<zid> it's shit at it
<zid> and worse
<zid> you need to do some fucky ass shit to make avx work with str* and mem*
<nikolar> sure, but it's *ok* and you don't need platform specific asm :)
<zid> except
<heat> yes you do
<zid> this is the fundamental function
<heat> no one cares about *ok*
<zid> that everything ELSE depends on for speed
<heat> it's the libc
<nikolar> yeah yeah
kata has quit [Read error: Connection reset by peer]
<nikolar> but pow isn't str* or mem*
<nikolar> and it's already going to be slow
<heat> ftree-vectorize will almost always be worse than whatever you can crap out manually
<zid> it's identical, but for -lm
<zid> instead of -lc
<zid> pow is *crucial*
<nikolar> exp is crucial
<nikolar> pow is just there
<heat> zid: do you have visual studio installed?
<zid> god no
<heat> they ship the ucrt lib source code
<heat> oh ok
<nikolar> heat: oh they ship the souce
<heat> yes
<nikolar> that would've been nice to see
<heat> install it
ekko has quit [Ping timeout: 260 seconds]
<nikolar> i guess no one is allowed to host it *legally*
<heat> on SLES!
<nikolar> heat: hell no
<GeDaMo> Maybe it's on github?
<zid> msvc needs multiple reboots to install
<nikolar> why
gog has joined #osdev
<zid> microsoft reasons
<zid> it probably hooks a bunch of explorer.exe to add right click menus, but uses illegal 3rd party ways to do it that needs it to reboot
kata has joined #osdev
<zid> because you can't reload files at runtime on windows
<nikolar> but why multiple reboots lol
<zid> on linux, once you start a program you can rm it, on windows the file is locked
<nikolar> ah yes
<nikolar> windows sucks
<nikolar> i almost forgot
<heat> yeah
<heat> versus on linux where the package manager can silently crash or corrupt processes
innegatives has quit [Quit: Connection closed for inactivity]
<nikolar> you should reboot on linux after updates, for sure
<nikolar> but you don't have to reboot a billion times to install them
<zid> if you have to update your package manager in the middle
<zid> you'd need two reboots under "you should reboot between udpates"
<zid> pow is actually a really cool function to optimize btw
<nikolar> why's that
<zid> There's a very clever but sort of naive impl. that gets you almost all of the speedup, and it's conceptually clever
\Test_User has quit [Ping timeout: 276 seconds]
<zid> you can binary-decompose integer exponents
<heat> musl pow is actually readable because it was written by ARM
<heat> thanks ARM
<zid> so if you have idk, ^135
<zid> you don't need to do n*n*n*n*n*n*n*n*n...
<zid> after the first multiply you already have n*n
<zid> so you can do m = n*n, m*m*m*m*m.. x135/2
<zid> but after the first m*m, you now have n*n*n*n, so you can do that 33 times
<zid> etc
hazard_hitman has joined #osdev
<zid> which ends up just being.. the binary expansion of 135
<zid> ^0b10000111 is round 0 * round 1 * round 2 * round 7
<zid> log2 multiplies instead of n
\Test_User has joined #osdev
<Ameisen> I was able to update my MIPS emulator and toolchain before my shoulder surgery: https://github.com/ameisen/vemips I wasn't able to get around to fixing portability issues yet so it's still stuck on Windows. Not hard to fix but I'm stuck with one arm.
<bslsk05> ​ameisen/vemips - MIPS32r6 Emulator (1 forks/9 stargazers/GPL-3.0)
<geist> grats! emulators are fun
<Ameisen> shoulder surgery is not, however
<Ameisen> nor was getting LLVM to build the toolchain.
<nikolar> Should've gone with gcc
<Ameisen> maybe. I'd used LLVM for it back in 2016, so wasn't wanting to change.
<Ameisen> but the build process got more convoluted and error-prone since then.
<zid> have you considered borrowing a second arm
<Ameisen> IIRC, I'd had more issues getting a GCC toolchain built in '16, but I don't recall details and past me didn't leave notes.
<Ameisen> I have, but the current arm is in the way.
<zid> how'd you fuck your shoulder, more interesting
<zid> than mips
<Ameisen> tore supraspinatus at physical therapy
<zid> see, this is why you should never exercise
<zid> it's bad for you
<Ameisen> i should be able to type properly in 2 months or so.
<zid> athletic 20 year olds are just early access arthritic middle aged people
<Ameisen> this is the worst vacation from work ever.
<Ameisen> geist: same VM that I've been working on for... ever, it feels like.
<Ameisen> almost 10 years
<heat> exercising regularly actually strengthens your body and significantly reduces injury
<zid> heat: propaganda by FIFA
<zid> Running ruins all your joints
<Ameisen> hypermobility + weights + inattentive therapist = very loud popping sound
<zid> oof
<Ameisen> no pain or weakness at time, surgeon said it was very unusual.
<Ameisen> i was a very odd case
<zid> I've almost broken my elbow a few times
<zid> jumping onto a bed and landing with my arm slightly too stiff
<zid> thankfully it buckled the *correct* way :p
fluix has joined #osdev
<Ameisen> i wanted a robot arm
<Ameisen> Deus Ex-like
<zid> robot handjobs cost extra btw
<zid> it's pay per use
\Test_User has quit [Ping timeout: 245 seconds]
<Ameisen> i cant even play most games. I can uncomfortably use a controller for a while. That's it.
<Ameisen> strategy games? nope.
<heat> you can play map games with a single arm
<Ameisen> i cannot use a mouse effectively with my off-hand
<heat> ah. yeah that's wose
\Test_User has joined #osdev
<zid> time to play a bunch of
<zid> qud
<Ameisen> or qwop
<zid> I'm not sure how much play you'll get out of quop compared to qud :P
<zid> 10 mins vs 1000 hours
kata has quit [Read error: Connection reset by peer]
<Ameisen> I really want to write code :(
<zid> sadly qwop is pretty degenerate, strategy wise
Turn_Left has joined #osdev
<zid> DRAGON NATURALLY SPEAKING 7.ISO
<Ameisen> debugging VMs is relaxing for me :(
<heat> i really want a nice new star wars clone wars game
<zid> I really want a new f-22 raptor game
<heat> sometimes we just can't get what we want
<Ameisen> will write batte droid AI in VeMIPS
<zid> or a single player spaceship game
<zid> there was one in the steam demo fest and it SUCKED
<Ameisen> user-written game logic was what VeMIPS was designed for
<heat> eww not the droid though!
<heat> the clones are the best
dude12312414 has quit [Ping timeout: 244 seconds]
<heat> i mean i kind of enjoy the droids, cuz no droids no clones
<heat> but...
Left_Turn has quit [Ping timeout: 252 seconds]
<Ameisen> armies of MIPS-driven Jar Jars
kata has joined #osdev
<heat> stop you're making it worse
<zid> Ameisen: I've always loved the idea of 'write your own AI to solve an mmo as a single player' as a concept
<zid> I've seen it attempted a few times (or close enough) but never *well*
<Ameisen> thats what I designed vemips for. also tinkered with a visual/node layer atop it.
<Ameisen> like blueprints in unreal
<zid> honestly the best attempt is exapunks and it wasn't even trying for that, kek
<Ameisen> inspired by a late 90s/early 00s game where you programmed cars and such in races using node logic
<Ameisen> my original goal was making a better version of MIT's battlecode
<Ameisen> they use Java, without a JIT. So, you're encouraged to write bad code - manually inlined and such. I wanted to avoid that.
<zid> oof yea, on a modern system you'd run it on a fake clock
<Ameisen> javac is non-optimizing
<Ameisen> :/
<zid> I've also seen just... line limits, but that has issues too
<zid> even token limits can be gamed hard (in un-fun ways)
<Ameisen> without a jit, the output is really bad
<Ameisen> and your energy costs are per-instruction, so its a very bad design
<zid> see: seb's chess tournament, he had some interesting ways people tried to cheat around the token limit
<Ameisen> if C++ _actually_ gets reflection in a compiler, I can rewrite part of vemips. Would love to get rid of the tablegen step.
<heat> i think the reflection proposal was accepted
<Ameisen> not fond of this:
<heat> also lol tablegen
<bslsk05> ​github.com: vemips/src/mips/instructions/processor_inst.cpp at master · ameisen/vemips · GitHub
<heat> very llvm-pilled
<Ameisen> accepted and in a compiler and usable are very different things
<zid> does that mean I can make a line of C++ that outputs a gigabyte of templates that outputs 10GB of reflection data?
<Ameisen> yes
<zid> nice
<heat> why do you have those restricts there?
<zid> ..why is it so complicated
<Ameisen> heat - msvc doesnt have strict aliasing. it assumes that all pointers or references can alias.
<heat> lol
<heat> sounds like a compiler issue
<heat> i would never spray my code with horrible restricts just for that
<zid> well yes, it's msvc, it just broke pow ;)
<Ameisen> ziud - theres a lookup table generator and also a dynamic recompiler that uses the data.
<Ameisen> zid*
<zid> because you had it so you used it :P
dude12312414 has joined #osdev
<Ameisen> I wrote them :/
<Ameisen> lookup table is needed to determine what the instruction is.
<zid> I prefer to use "arrays"
<zid> C23 feature
<bslsk05> ​github.com: vemips/src/mips/instructions/instructions_table.cpp at master · ameisen/vemips · GitHub
<heat> that looks slow
<Ameisen> mips instructions can be annoying to parse
<zid> I hope you checked the codegen for that
<Ameisen> it is. MIPS is annoying.
<zid> cus compilers tend to SUCK at optimizing out function pointers
<Ameisen> the instructions have weird masked formats
<Ameisen> the interpreter isnt the normal way it's used
<zid> yea but that's fine, you just do what you did, but each nested switch is a small array
<heat> computed goto or no-go
<Ameisen> the dynamic recompiler only fetches these once or so
<heat> ok
<Ameisen> unless you invalidate it
<Ameisen> but yeah, array at end would probably be faster.
<zid> MIPS should be orthogonal enough that you could probably just mask 16 bits off and index it into an array of functions, and pass the other 16 bits in :P
<Ameisen> there are, IIRC, 3 or 4 instruction formats
<Ameisen> r6 added more masked instructions as well
<Ameisen> i have a todo to weight the table by usage
<zid> that's what gprof is for ;)
<Ameisen> it's naively greedy right now
<Ameisen> vemips can already dump that data
<zid> I tested it on my gbz80, emulator, but it did precisely nothing, because it just compiles to a computed goto anyway
<Ameisen> i just havent integrated it into this.
<zid> I should test C23 case-ranges though
<zid> and do a mix of switch and masking
<Ameisen> ideally, you shouldnt be running interpreted, so i havent been very motivated to optimize the table.
<zid> so if F0 was mov A, F1 was mov B, etc: case 0xF0..0xFF: mov_reg_reg(op & 0xF);
<zid> rather than case F0: movA(); case F1: movB();
<zid> I imagine it also does precisely nothing though, because codegen is already just.. doing a computed goto, so it'd just be MORE work to do it this way
<Ameisen> not that the dynamic recompiler is much better in design. really need to rearch when I have my arm back.
<bslsk05> ​github.com: vemips/src/mips/processor/jit/jit1/jit1.cpp at master · ameisen/vemips · GitHub
<zid> more "used it cus I had it" in here too ;)
<Ameisen> such as?
<zid> namespace template forceinline decspec restrict alloc
<Ameisen> well, I've littlereason not to use namespaces
<Ameisen> or templates
itrsea has joined #osdev
_whitelogger has joined #osdev
<Ameisen> the rest are to stop MSVC from pessimizing
<Ameisen> it's also mostly 10-year old code
<Ameisen> Ive not yet sat down to redesign anything. Mostly just stabilied things and fixed bugs.
<Ameisen> if you wanna see something that isnt useful anymore: https://github.com/ameisen/vemips/tree/master/tools/vevcbridge
<bslsk05> ​github.com: vemips/tools/vevcbridge at master · ameisen/vemips · GitHub
<Ameisen> that was used to get the gdb server in it to talk to Visual Studio 2015's debugger, so you could line-by-line debug mips programs in the IDE.
<Ameisen> 2017+ broje it.
<zid> I just think it's funny how C++ it is
<zid> I'm sure it's fine
<bslsk05> ​github.com: vemips/src/mipsdbg/mipsdbg.cpp at master · ameisen/vemips · GitHub
<Ameisen> other thing is msbuild wrapper thing
<Ameisen> 2015 had added linus debugging via a thin gdb wrapper. I used that. 2017+ replaced it with something more 'concrete' that no longer worked.
<Ameisen> linux*
<zid> ofc I know a jit needs to allocate, the funny part was the namespace inline restrict template noexcept constexpr banana
<heat> linus debugging!!
<Ameisen> namespace is just in there to make an anonymous namespace. Similar to marking as static in C.
<Ameisen> local to TU
<zid> too far down the rabbithole, you can't see the trees for all that lsd :P
<Ameisen> C++ is the language of poor defaults
<Ameisen> thus 'noexcept' et al
<Ameisen> eh, if youuse it every day you get used to it
<zid> That's called normalizing deviance
<Ameisen> my day job is C++, usually Unreal flavored
<Ameisen> which is significantly worse
<Ameisen> my code is pretty C-like, which probably makes the differences stand out more
_averymt has joined #osdev
<Ameisen> https://github.com/ameisen/vemips/blob/master/vemips_sdk/MipsTest/interpreter.cpp - that's how I test. Optimizing BF interpreter drawing the Mandelbrot set. Designe to actually use features to test things, and can build and run in emulator or on host.
<bslsk05> ​github.com: vemips/vemips_sdk/MipsTest/interpreter.cpp at master · ameisen/vemips · GitHub
averymt_ has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
gog has quit [Quit: byee]
<heat> process 'steamapps/common/Europa Universalis IV/eu4' started with executable stack
<heat> so sad
<zid> CLAUSWIIIIITZ
<heat> it turns out it was crashing because the loaded nvidia driver had a mismatch with userspace
<zid> that'd do it
<zid> how did you manage that, package manager updated the userspace bit only?
<Ameisen> are the newer nvidia drivers stableyet
<Ameisen> I'm still using the last pre-5000 series ones
<heat> zid: yeah package manager updated the userspace bits while nvidia.ko was still loaded
<heat> Ameisen: yeah feels stable
<zid> nikolar, the great prophet, warned of this
<zid> You must heed his words
<zid> then stop sucking at eu4, by heeding my words
<Ameisen> oblivion remastered has been constantly crashing before with them.
<heat> oh now it's crashing with fullscreen
<heat> fml
<zid> steam broadcasting is not currently supported on this broadcaster's system
<zid> eww eu4 fullscreen
<heat> ok if you enable multisampling it craps itself
<heat> good to know
<zid> that was fast
<zid> how on earth did you find that out
<zid> multisampling is fucky on wsl2 too if that helps your soul
<Ameisen> I'm more of a Victoria player than EU
<bslsk05> ​forum.paradoxplaza.com: Client Challenge
<zid> have you tried using X11R6.org
<heat> something is blocking ironman :(
<zid> I assume you need the right set of 17 protocol extensions for wayland multisampling
<heat> ok it was a mod
<zid> rofl
<heat> if linux ironman wasn't a thing i would be very upset
<Ermine> NTOSKRNL.EXE
<heat> Ameisen: vic3 good yet?
<Ameisen> no
<zid> thankfully ironman's only requirement is steam connection
<zid> EU5 out yet?
<Ermine> am i the only one fool that is going to buy amd gpu despite them being shite?
<zid> weird that streamers got builds and played games of it, but there's just been.. nothing
<zid> usually you do that while announcing a release date, which is in a week or two
<heat> Ermine: yeah because you're a mesa fan
<zid> heat is an austria fan
<zid> plays on baby mode
<heat> i only buy crap gpus from nvidia
<heat> i'm trying to figure out the austria meta again :(
<zid> I agree with this man
<Ermine> kmspilled mesa fan
<Ameisen> https://i.imgur.com/pZqBDdv.png - test program running
goliath has joined #osdev
m5zs7k has quit [Ping timeout: 268 seconds]
m5zs7k has joined #osdev
jcea has joined #osdev
zid has quit [Ping timeout: 248 seconds]
zid has joined #osdev
gog has joined #osdev
fedaykin has quit [Quit: leaving]
fedaykin has joined #osdev
netbsduser` has quit [Ping timeout: 260 seconds]
karenw has joined #osdev
goliath has quit [Quit: SIGSEGV]
netbsduser` has joined #osdev
Left_Turn has joined #osdev
kata has quit [Read error: Connection reset by peer]
Turn_Left has quit [Ping timeout: 248 seconds]
anon17283 has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
netbsduser` has quit [Ping timeout: 248 seconds]
Lucretia has quit [Remote host closed the connection]
Bonstra has quit [Ping timeout: 244 seconds]
Bonstra has joined #osdev
anon17283 has quit [Ping timeout: 252 seconds]
kof673 has joined #osdev
_averymt is now known as averymt
\Test_User has quit [Ping timeout: 248 seconds]
\Test_User has joined #osdev
itrsea has quit [Remote host closed the connection]
itrsea has joined #osdev
frkazoid333 has quit [Ping timeout: 260 seconds]