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
<mcrod> so now I have erroneous red squigglies everywhere.
<heat> mcrod: the clangd extension works fine on vscode
<mcrod> apparently not my good friend
<heat> what errors are you getting?
<heat> is it seeing the compile_commands.json?
pounce has quit [Remote host closed the connection]
<mcrod> oh. that might be important.
<mcrod> i forgot I had to do that with vscode
<mcrod> CLion doesn't give two shits
pounce has joined #osdev
<heat> you know what doesn't suck? Itanium. Itanium doesn't suck
<kazinsal> itanium's designers sucked
<heat> no, you suck
<gog`> meow
* kazinsal pets gog`
<mcrod> yeah that still didn't work
<mcrod> but at least I have a compile_commands.json ow
<mcrod> now
* gog` prr
* gog` pets kazinsal
<heat> mcrod try restarting vscode after spawning the compile_commands.json
<mcrod> i did already
<heat> what errors are you getting sir
<mcrod> nothing related to clangd itself
<mcrod> more or less "unknown type name" which is straight bullshit
<mcrod> or my favorite, "the include file is not found, even though I can compile the whole project just fine"
<mcrod> remember the days where people didn't have to dick around this hard for basic shit to work? pepperidge farm remembers.
<heat> what basic shit?
<heat> language servers? no
<mcrod> when you were a fetus
<mcrod> visual studio had intellisense solved
<mcrod> I have no idea why this works on CLion, and not vscode
<heat> intellisense is far easier
<heat> versus "take my magic commands from my magic build system and make it weeeeeeeerkkkkkkk"
<zid> that's called cmake
[itchyjunk] has quit [Ping timeout: 245 seconds]
[itchyjunk] has joined #osdev
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
<mcrod> ok I think fixed
nyah has quit [Quit: leaving]
carbonfiber has joined #osdev
heat has quit [Quit: Client closed]
heat has joined #osdev
<bslsk05> ​gist.github.com: printf.c · GitHub
<Cindy> your printf is average, can't print, but does print, when it does, it performs averagely
<zid> Did you write it like this as a joke?
<heat> write it like what?
<zid> Oh.
<Cindy> i had an AI write my review, sorry for that
<heat> No problem at all! It's interesting that you chose to use an AI to write your review. AI technology has come a long way, and it's fascinating to see how it can assist us in various tasks, including writing. While AI-generated content can sometimes lack the human touch and personal experience, it can still provide valuable insights and perspectives.
<heat> If you feel like sharing your own thoughts and opinions about the subject, I'd be happy to hear them. Remember, a review is ultimately about your own experience and perspective, so feel free to add any additional details or impressions you'd like to share.
<zid> after all that moaning, this looks very similar to mine, re the vfprintf part, I just gobble all the non % really early
<zid> instead of that weird perc thing
<zid> I have a backwards goto instead of a continue and a flag
<zid> to tell it to do special shit the next iteration
<heat> ugh i keep seeing weird edge cases
<heat> also mildly annoying that i need 64 bit div for long long :/
<heat> and i dont like with libgcc because that's for smelly losers
<zid> heat: It'd be neat if you wrote a test rig btw
<zid> I'd probably flesh my printf out if I had one
<zid> just int main(void) { /* 300 calls to print */ }
* mcrod stares at the goto
<zid> I can link it against glibc and then diff the output vs mine
MiningMarsh has quit [Ping timeout: 264 seconds]
<heat> there's a test rig already in zircon, i'll probably make it use google test and that's enough for me
<zid> link?
<bslsk05> ​fuchsia.googlesource.com: zircon/kernel/tests/printf_tests.cc - fuchsia - Git at Google
<zid> if it's just a fuck load of printfs I can copy paste that'd be cool
<heat> came from the geists
<zid> will need some cleaning up but yea should work
<zid> should I try do it with a regex? :D
<bslsk05> ​fuchsia.googlesource.com: zircon/kernel/tests/printf_tests.cc - fuchsia - Git at Google
<heat> ew
<heat> ofc dont forget to delet the C++-ey bits up top
<zid> hmm I'd like an online regex thing that can just print matches
<zid> idk which ones can do that..
<zid> oh, replace with \1 maybe
<heat> mcrod, what's the problem with the goto mr mcrod
<mcrod> nothing really, but I usually just stare at goto with big question marks initially, i.e., are you absolutely sure that's needed
zxrom_ has joined #osdev
<zid> oh there's some strlen buf crap mixed in, guess I will fix that manually
<heat> in theory i could write an actual statey machine there yes
<heat> general wisedom would say it's better, osdev geniuses say it sux and printf should be implemented with goto
<heat> and i defer to the geniuses
zxrom has quit [Ping timeout: 246 seconds]
<zid> state machines are just goto maps
<zid> .*EXPECT_TRUE\(test_(printf\(\".*\)).*
<zid> that'll do
<zid> oh maybe I should actually do the test_printf thing and compare to the first string..
<bslsk05> ​gist.github.com: test_printf.c · GitHub
<zid> oh that needs fixing
<zid> double )
heat has quit [Remote host closed the connection]
heat has joined #osdev
<zid> oh it's hard word-wrapped and it broke my grep in a bunch of places, nice
lainon has joined #osdev
<zid> k fixed it up and hardcoded it to 64bit
<heat> nice
<heat> i don't have more time for the printf since i need to write the write of the unix
<heat> i'll probably come back to this later on
<zid> yea I don't plan to do it right this second
<zid> I need to play more bloodstained
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
lh has joined #osdev
foudfou has quit [Remote host closed the connection]
lainon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
foudfou has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
vdamewood has quit [Quit: Life beckons]
deflated8837 has quit [Ping timeout: 250 seconds]
deflated8837 has joined #osdev
vdamewood has joined #osdev
<bslsk05> ​www.reddit.com: Reddit - Dive into anything
<heat> r/linux is r/linuxcirclejerk
<zid> good news though, for the past 15 years it has been the year of the linux smartphone
<zid> literal billions of people directly interact with a graphical linux install near daily
<heat> but his 5 year old does exec startx
<[Reinhilde]> what tot he hell
<heat> omg his 5 year old uses devuan!
<heat> systemd bad!
<heat> i didnt even know r/linux posters could reproduce
<dh`> you'd be surprised who manages to reproduce
dude12312414 has joined #osdev
heat has quit [Ping timeout: 246 seconds]
<Griwes> sadly, avoiding reproduction is more involved than reproducing
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid> re that printf thing, wtf is sv
<zid> EXPECT_TRUE(test_printf("test", "%V", "test"sv));
<moon-child> c++ user-defined literal for std::string_view?
<moon-child> maybe?
<zid> ah
* moon-child tries to know as little c++ as possible
<zid> %V is made up anyway *deletes*
<moon-child> yeah i was about to ask about that
<zid> ask geist I guess
<zid> Can't go wrong with adding colour codes
<moon-child> success
<moon-child> failure
<zid> exactly
<sham1> Clearly %V takes a std::string_view
<zid> that would make sense I guess
<zid> whatever one of those is
<sham1> One is just left asking just how a complex C++ object interacts with a C vararg
<zid> I assume it has overloaded operator 'evaluate this shit' that pulls out a string?
goliath has joined #osdev
<remexre> are there any good tutorials on doing stuff "right" to make a modern aarch64 OS on a "normal-shaped" SoC?
<remexre> like, i think i understand the 40k-foot-view, but it'd be helpful to see an annotated example of like, a properly async serial console
zxrom__ has joined #osdev
zxrom_ has quit [Ping timeout: 246 seconds]
zxrom__ is now known as zxrom
nyah has joined #osdev
slidercrank has joined #osdev
valshaped742 has quit [Read error: Connection reset by peer]
valshaped742 has joined #osdev
duderonomy has quit [Ping timeout: 245 seconds]
duderonomy has joined #osdev
riverdc has quit [Quit: quitting]
riverdc has joined #osdev
ehmry has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
ehmry has joined #osdev
danilogondolfo has joined #osdev
<geist> yes, that’s some string view extension
hrberg has joined #osdev
Mids_IRC3 has quit [Quit: Mids_IRC3]
<sham1> Why one would use string_view with printf instead of for example fmt, I have no jdea
awita has joined #osdev
dh` has quit [Read error: Connection reset by peer]
gog` has quit [Ping timeout: 260 seconds]
GeDaMo has joined #osdev
gog has joined #osdev
mahk has quit [Ping timeout: 245 seconds]
mahk has joined #osdev
lainon has joined #osdev
<gog> hi
Left_Turn has joined #osdev
<vdamewood> hi
* vdamewood gives gog a fishy
xenos1984 has quit [Read error: Connection reset by peer]
<GeDaMo> If wishes were fishes, we'd all cast nets
* sham1 casts the internet
lainon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* gog chomp fishy
<mjg> osdev chatlog nfts for sale
<mjg> you can join an exclusive club of people rugpulled by me
<mjg> who is in
<gog> me me me
<mjg> stay tuned. i'm really excited about this project
<mjg> #notfinancialadvice
<GeDaMo> What kind of rug? :|
<mjg> have you seen a russian place with a rug on the wall?
<mjg> that kind
<mjg> colorful' n shit
xenos1984 has joined #osdev
lainon has joined #osdev
lainon has quit [Client Quit]
<Ermine> That's considered tasteless
lg_ is now known as lg
* mjg slaws like a gopnik
<mjg> squats
<Ermine> Make sure your heels are lowered. Otherwise you're dishonored one
<gog> slaw
<Ermine> What should I cook today
<Ermine> I thought of paella but idk how to pick good ingredients. And that's going to be expensive
Left_Turn has quit [Ping timeout: 246 seconds]
Left_Turn has joined #osdev
gog` has joined #osdev
<gog> gog` wtf are you doing
gog` has quit [Client Quit]
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<mcrod> hi
<gog> hi
<mcrod> gog may i pet you
<gog> yes
* mcrod pets gog
* gog prr
Left_Turn has quit [Ping timeout: 240 seconds]
Left_Turn has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
Left_Turn has joined #osdev
dutch has quit [Quit: WeeChat 4.0.1]
Left_Turn has quit [Ping timeout: 240 seconds]
mahk has quit [Ping timeout: 246 seconds]
Left_Turn has joined #osdev
dutch has joined #osdev
mahk has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
<LittleFox> sometimes this channel is wild - one day you discuss with professional OS developers and another day you see pets being exchanged - very nice :3
<jimbzy> A lot of days you see both.
<LittleFox> maybe should be idling less then ^^
<gog> LittleFox: may i pet you
Left_Turn has joined #osdev
<LittleFox> sure, but beware the scales - they might be sharp
<LittleFox> hm, my name isn't up-to-date here
LittleFox is now known as DragonFox
* gog pet DragonFox
<DragonFox> *purrrr*
<DragonFox> *offers headpats in return*
* gog prr
<mjg> so there was a study about chatgpt's effectiveness in investing
<gog> how effective was it
Left_Turn has quit [Remote host closed the connection]
<mjg> and it found it outperforms other models by 500% or some shit
<mjg> right?
<mjg> wrong
Left_Turn has joined #osdev
<mjg> the author pulled in 4 different LLMs, including 3 different versions of chatgpt
<mjg> and asked them to evaluate a headline about a company, whether it is positive
<mjg> so... chatgpt 3.5 won over 4
<mjg> basically lol strat which got lucky
<mjg> but now this is making rounds with a claim that chatgpt beats traders
<gog> ah yes science
<gog> where you test a hypothesis, only the hypothesis, and have no experimental control
<mjg> on top of that the author inflates the win by not denoting it came from gazillion small transactions which would kill majority of it due to fees
<mjg> this is the same as an octopus or osme other animal making better picks
<gog> i'd trust the octopus more than llms
<mjg> octobus never made up a scientific paper, i can tell you that much
<mjg> [octo*b*us is a very nice typo if i may say]
<gog> "scientific" paper
<gog> octobussy
<zid> they made a bond film about that
nur has joined #osdev
[itchyjunk] has joined #osdev
<mcrod> i am very sleepy
<gog> eepy
* gog tuck in mcrod with a plushie
* mcrod sleep
<zid> Professionally tucked by a trans girl, how lucky
<mcrod> at least someone tucks me in
<gog> zid: that's an underhanded way to call him a dick
<gog> smh
<zid> does tucking work if you have a.. large spread?
<gog> a what
<zid> I feel like it'd look like I shit myself
<zid> A grand outlay.
<gog> oh
<gog> idk
<gog> ¯\_(ツ)_/¯
<zid> An exorbitant platter.
arminweigl has quit [Ping timeout: 246 seconds]
arminweigl has joined #osdev
PublicWiFi is now known as SortedWiFi
SortedWiFi is now known as PublicWiFi
MiningMarsh has joined #osdev
MiningMarsh has quit [Client Quit]
MiningMarsh has joined #osdev
MiningMarsh has quit [Client Quit]
goliath has quit [Quit: SIGSEGV]
MiningMarsh has joined #osdev
dude12312414 has joined #osdev
ehmry has left #osdev [https://quassel-irc.org - Chat comfortably. Anywhere.]
puck has quit [Excess Flood]
puck has joined #osdev
wns has joined #osdev
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
awita has quit [Remote host closed the connection]
MiningMarsh has joined #osdev
<DragonFox> o_o
<DragonFox> what's going on here now? :D
<DragonFox> <gog> zid: that's an underhanded way to call him a dick
<DragonFox> lol
<gog> OwO
<bslsk05> ​twitter: <dragonairily> hi good morning this post kept me awake all night and now u guys can see it too https://pbs.twimg.com/media/DM-JlzDX4AAMKi5.jpg
<gog> Þöð
<zid> thorn still doesn't look like a real letter to me
<zid> eth is fine
<sham1> I dislike that thoth
<sham1> That's not even a good spelling
<zid> do icelanders really pronounce it Þöð? That's cray
<mcrod> guys
<mcrod> i'm getting a cheesesteak
<gog> idk
<gog> omg cheesesteak
<zid> they had better not
<GeDaMo> Θώθ
<gog> UwU
<GeDaMo> Why not Zoidberg? :|
<sham1> 3:
<gog> whoop whop whop whop whop
wns has quit [Read error: Connection reset by peer]
<gog> nooooo the table i needed isn't all entity frameworked
<gog> noooooooooooooooooo
<sham1> Sad
* gog jumps out the window
netbsduser has quit [Remote host closed the connection]
<GeDaMo> Autodefenestration :|
<zid> always tragic to see
* gog returns through the same window
<gog> autorefenestration
goliath has joined #osdev
<zid> I think that's when you reinstall your own windows after the fs corrupts
<gog> that's a terrible idea
<gog> just install freebsd
<gog> freebsd is very good to use
<gog> oh heat isn't here
<zid> yea usually that summons him
<sham1> gog: I have one better
<sham1> USE OPENBSD
<gog> i'm not even going to joke about that sorry
<zid> sham1: how could you?
<gog> L + ratio + you fell off + touch grass
<zid> Even as a joke, geez
<zid> Pretty sure a lot of countries have laws against that now, they call it cyberbulling, you can get banned for saying stuff like KYS in chat, and imo what you just said crosses so many more lines.
<kazinsal> the ghost of theo de raadt curses you and your builds forevermore
<zid> My builds are already cursed
tomith has quit [Quit: tomith]
<sham1> Not to worry. Theo will protect me. Somehow
<zid> I wrote the makefiles and the code
<gog> makefiles? more like BREAKfiles amirite
<gog> sksksksksks
<sham1> Needs more ninjas
<zid> The meson ninjas attack at dawn, alert the cmake for the ants.
<zid> that's my sleep cell activiation node
<zid> code*
<zid> sleeper*
<zid> That's*
<sham1> Let's hope there is not too much maven. I mean mayhem
<kazinsal> first day back at work after three weeks off: 2486 unread emails
<kazinsal> yaaaaay
<sham1> rip
<GeDaMo> Select all, delete! :P
<kazinsal> deeply considering it
<gog> oof
<zid> You weren't at work, those emails aren't for you
<gog> yes
<gog> but kazinsal is canadian
<gog> does that count
<kazinsal> I didn't look at my work stuff at all for any of the time I was off so it's fun reading the fires that went on and either burnt out or got drenched in my absence
<zid> canadians are americans
<zid> as much as they refuse to admit it
<kazinsal> eat shit eh
<zid> The alternative is that they're french
<zid> so they have it bad both ways tbh
<kazinsal> manger de merde, tabarnak
<gog> lel
<gog> i've heard my wife use the word "tabarnak" sometimes
<zid> <bizzare hockey noises>
<gog> she lived in quebec for like a year
<gog> and picked up a lot of french
<FireFly> the heck is tabarnak :p
<kazinsal> it's a quebecois french curse word
<zid> FireFly: <bizzare hockey noises>
<kazinsal> literally translates to "tabarnacle"
<FireFly> I.. see
<kazinsal> functionally translates to ANGRY FRENCH SWEARING
<FireFly> so a bit like when they call you a chatte that's not actually suggesting you're a cute kitty
<kazinsal> quebec french swearing is a complicated mess that's basically about stringing together catholic sacraments for metaphorical verbal abuse
<kazinsal> thankfully, we have them mostly contained east of ontario
<bl4ckb0ne> kazinsal: its "mangeux de marde"
<zid> And to pronounce it, you ignore everything past 3/4 in each word
dh` has joined #osdev
<bl4ckb0ne> in this case you can do "d'marde" instead of using the 2 words
<zid> mang d mard
<zid> see, works fine
<bl4ckb0ne> doesnt
xvmt has quit [Ping timeout: 250 seconds]
slidercrank has joined #osdev
<FireFly> oh that's just "eat shit"
<FireFly> amazing, I can read things in french
<FireFly> (sometimes)
<zid> tu mange le piscine
<zid> juh muh apple zid
<bl4ckb0ne> FireFly: its "shit eater" but same vibe
<zid> eats of shit
<zid> mon chat est dans le poubelle
<bl4ckb0ne> j'ai une tour eiffel dans mon pantalon
<FireFly> je mange des crème glacée
<FireFly> er I guess that should be a le or whatever
<FireFly> idk I'm not french
<sham1> This chat is not very Bauhaus
<FireFly> was
lainon has joined #osdev
<kazinsal> mon aéroglisseur est plein d'anguilles
<bl4ckb0ne> FireFly: mixed plural and singular here
<bl4ckb0ne> kazinsal: kek
<zid> les
<FireFly> bl4ckb0ne: yeah I'm not even going to attempt getting grammar right :D
<FireFly> my french exclusively comes from doing duolingo for like a year
<zid> french has the adjectives in the wrong order
<sham1> Could even call the chat pessimal
<zid> disgraceful language
<bl4ckb0ne> FireFly: either "je mange une crème glacée" or "je mange des crèmes glacées"
* FireFly caresser le chat
<FireFly> bl4ckb0ne: ahh
<FireFly> so my brain wasn't entirely kaputt at least
<zid> why not les
<bslsk05> ​languageatlas.com: When To Use Les And Des In French [Explanation + 6 Examples] | Language Atlas
<zid> oh definite vs indefinite
<zid> des is unes, effectively
<zid> French is southern american, using "them" for plural "a" :P
<zid> (actually probably the reverse, louisianna purchase and all that)
<gog> volcano happening
<bl4ckb0ne> which one this time
<zid> Just volcano
<gog> fagradalsfjall-area
<zid> It's like saying "There's a mosquito in my room" "Oh yea!? Which one!?"
<bslsk05> ​www.ruv.is: Eldgos er hafið á Reykjanesskaga - RÚV.is
<zid> quick, call tom scott
<gog> yes
<bl4ckb0ne> is it the same as last time
<gog> same area yeah
<FireFly> spicy :o
xenos1984 has quit [Ping timeout: 246 seconds]
<gog> not katla. that one is also being sus currently and that'll be a ansty one
<bl4ckb0ne> thats the one that was active when i went there in 2017
<sham1> zid: Mr. Scott gets there. The volcano suddenly just implodes and stops spewing lava as he gets into the area
<zid> correct.
<FireFly> gog: I can't help but think https://en.wikipedia.org/wiki/Katla_(dragon) when I see that name :p
<zid> You summon tom to stop it
<gog> yeah they're expecting a glacial flood from katla
<kazinsal> Thomas Scott: Volcano Defuser
<zid> silly billies
<gog> heh nice
<zid> volcanos are full of *hot* not *cold*
<zid> what idiots are you talking to gog
<FireFly> a glacial flood of lava sounds Bad
<gog> katla is under a glacier
<bl4ckb0ne> hot under cold makes wet
<gog> ^
<zid> hot under cold makes FszzzzSzzzsZzzsssS noises
<zid> it's called the mcgurk illusion, and happens when light passes through two slits at the same time.
<FireFly> can't spell katla without kat(t) :o
<gog> :o
<sham1> :O
<gog> meow
<sham1> :3
<sham1> Y'know, there were some things I expect to find when I googled for "colon three", but this was not it: <https://www.youtube.com/watch?v=yYLIeepBI_c>
<bslsk05> ​'【MV】CoLoN: 「THREE」Music Video' by CoLoN:のオンナゴコロン ー イケメン覗き見部屋 ー (00:04:43)
<zid> That's what noise volcanos make right?
<zid> onnagokorosooikemen
<zid> ikemen is handsome, idk the rest, stupid katakana
<zid> wait, noo not soo? meh japanese is hard
<sham1> I'd expect for volcanoes to be loud more than anything
* zid delets from youtube history
<sham1> Good choice
SGautam has joined #osdev
<bslsk05> ​'『旅の途中』 Ninomae Ina'nis (Cover)' by Ninomae Ina'nis Ch. hololive-EN (00:04:59)
<zid> replace with this
<sham1> > hololive
<sham1> How about I don't and I say I did
<zid> I watched 10 seconds of yours
<sham1> I didn't watch any of mine
<zid> and mine is actually decent
<sham1> I just found it on Google
<zid> (this is a cover of the spice and wolf OP song)
<zid> She sings it, and animated a music video for it, herself, pretty impressive
<zid> Oh, and in a foreign language to boot
<zid> Stupid talented (read: hard working) people
<zid> with executive function
<zid> bastards the lot of them
xenos1984 has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eddof13 has joined #osdev
gog has quit [Quit: Konversation terminated!]
xenos1984 has joined #osdev
xvmt has joined #osdev
gog has joined #osdev
guideX has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #osdev
ih8win8 has joined #osdev
* mcrod slaps zid
<mcrod> maybe you'll know
<mcrod> how hard is gameboy APU sound generation
<zid> not very
<zid> 4 basic channels with like 2 regs eac
<zid> and the maximum the cpu can fiddle with them is 1MHz
<mcrod> is it really as simple as (I have no idea, I have no spec I'm looking at right now, just a general question) "ok, channel 2 is to make square waves, so make a square wave when enabled with frequency x for t time"
<zid> so even without any technical knowledge of how sound works so that you can cut corners, you could just sample at 1MHz then ask a library to downsample :P
<ih8win8> What is a USB PHY? I hear this term PHY thrown around, and I'm not entirely sure what it is.
<zid> physical
<ih8win8> So, basically like the physical layer in OSI networking terminology.
<zid> mcrod: sound enable reg for all off / ch1 off / ch2 off / ch3 off / ch4 off, sound panning (2 bits * 4) for which speaker each channel goes to
<mcrod> hm, i see
<zid> sweep channel has 'sweep pace', 'add/sub' and 'slope'
<zid> then 2nd reg is wave duty and length
<mcrod> so as far as I know, oversimplfying it, the APU is basically just a shit ton of counters, right?
<zid> 3rd reg is volume, volume direction, volume change pace
<zid> yes
<zid> You can literally model it all perfectly accurately at 1MHz just ticking a very basic state machine
<zid> The only issue re accurate sound emulation is that if you try to pretend it's a 44kHz system, the cpu could have changed the registers many many times per sample
<zid> so if you want it to be quick *and* accurate, you need to implement a sort of time warping
<mcrod> yeah, the sync stuff scares me
<zid> But if you just leave it at 1MHz, then the cycles are the same
<zid> you just downsample at the end
<mcrod> to the best of my knowledge, most emulators will run until the sound buffer is full, dump the sound buffer to the sound device, repeat
<zid> yes, that's how you sync to wall time
<mcrod> but what if sound is disabled?
<zid> because 10ms of 44kHz audio is 10ms of walltime
<mcrod> I guess it's just a matter of taking a different path then
<zid> no matter what
<zid> mine vsyncs, close enough, cus I don't have audio
heat has joined #osdev
<zid> I had a nice 'bug' before I had a nice LCD implementation that effectively the emulator turned into a while(1) if the display was disabled :P
<heat> hello, its me, the creator of onyx, the world's least innovative operating system
<zid> Did you innovate a %V into your printf yet
<heat> no
<heat> printing std::string_view is for losers
<heat> and as i said, i don't innovate
<zid> Isn't %V just %*s anyway
<heat> yes, but %*s sucks
<zid> idk if evaluating a class or whatever in C++ can return two params though
<heat> it doesn't evaluate anything
<heat> their solution is a huge hack but just works
<zid> nice
<zid> what do you get if you evaluate a class?
<heat> given std::string_view is basically {ptr, len}, they send thru varargs
<zid> just type class blah?
<zid> with value "stop trying to take values"
Turn_Left has joined #osdev
<heat> what is "evaluate"?
<zid> value context
<heat> i don't see what you mean
<zid> int a = 4; a = 7; that second line is lvalue context, so it doesn't mean 4 = 7
<heat> ah ok
<zid> but b = a; means b = 4; cus a was evaluated, the rhs is an evaluation
<zid> 'evaluation' meaning 'to get the value of'
<heat> it will just copy
<zid> okay but what type and what value, and can I interact with that
<heat> given std::string_view a; printf("%V", a); makes a copy of a and sends it down the varargs drain
<heat> "a" will be of type std::string_view& (aka a reference)
<zid> okay so pointer (reference) to type
<zid> class blah
<zid> same as strings
<zid> or functions
<zid> ****************f(); :D
<heat> i'm not sure if it gets a std::string_view&
<heat> might get a brand new copy in the varargs thing for all I know, i've never checked that
Left_Turn has quit [Ping timeout: 260 seconds]
<heat> that /may/ be the hack IIRC
<heat> that you get a "std::string_view*" from all that garbage
<zid> I assumed they could just overload the evaluate
<zid> so 'sv' evaluates to the string it wraps
<heat> ok, it gets a copy
<zid> you can overload conversion to blah I think
<zid> so if you overloaded 'whatever type it ends up as' conversion, that could work
<heat> there's no conversion happening
<zid> like if(sv) you can overload cast to bool, like 'cin' does
<zid> idk how you convince it to convert it to char * though
<heat> you cannot possibly convert it to char*
<zid> only because there's no default operator for that, you absolutely *could*
<heat> string_views are not zero terminated
<zid> same way you can convert a class iostream blah to 'false'
<bslsk05> ​fuchsia.googlesource.com: zircon/kernel/lib/libc/fprintf.cc - fuchsia - Git at Google
<heat> see this? they just get a copy of the object on the other end of the vararg garbage
<zid> You'd actually want it to evaluate to a *tuple* where you did case 'V': len = va_arg(fmt, size_t); str = va_arg(fmt, char *); but I imagine that's even less possible
<zid> yea I'm not talking about what they actually do
<zid> I was wondering if you could make it evaluate to something arbitrary
<zid> (so that I could maek it work via the regular C abi)
<zid> but C++ doesn't really do tuples any more than C does really I don't think?
<sham1> std::tuple
* sham1 runs
<heat> a C++ tuple is just a fucked up templated struct
<zid> yea I don't consider that a language feature
<sham1> Yes, with a weird way of accessing it
<zid> that's a stdlib implementation of a feature
<zid> like hash tables
<zid> C++ has no hash table /operator/
<kazinsal> typedef struct { uintptr_t a, b; } tuple_t;
<sham1> Achually
<sham1> std::tuple is STL
<zid> and there's the "any moreso than C"
<zid> yes, STL = standard library
<sham1> No it isn't
<sham1> They're two different things
<heat> aktshually, STL is not a thing
<zid> standard (template) library
<zid> part of the standard () library
<heat> it's the C++ standard library
<heat> the STL is an old term
<sham1> Apply the as-if rule
<zid> Like how stdio is part of the C standard library, they have some templates
<zid> that they named stl
<sham1> As if STL is still a relevant name
<mcrod> i've been doing some STL rewrite stuff on my own
<mcrod> i actually find that it helps me understand the language better
<heat> haven't learned your lesson yet?
<mcrod> it's still a crapshoot
<zid> so yea, anyway, C++ doesn't support tuple types, like say, python seems to
<mcrod> but at least I know more
Left_Turn has joined #osdev
<mcrod> heat: no
<heat> zid: anyway, yes, you could have some struct S {char *str; size_t len}; and then pass it through C varargs
<zid> where I could do f(g(x)); where g returns a tuple type and f() takes two params
<zid> both of which get filled
<zid> heat: Obviously
<heat> then std::string_view could have an operator S() that converts the string view to S (just like operator bool converts to bool)
<zid> but someone has to allocate that and fuck that
<zid> and why do it at runtime
<zid> I can do it at compile time
<sham1> my_printf("%V", &(struct S){.str = "Hello heat", .len = sizeof("Hello heat") - 1});
<heat> allocate what?
<zid> If your answer is "the compiler will just turn it into a struct that gets passed via the st-" YES, WELL DONE
<zid> that's what I'm asking for
<mcrod> the thing is, usually my implementations are significantly faster than whatever the fuck the STL does
<zid> tuples, for vargargs purposes
<mcrod> and that comes as no surprise
<geist> heat: re: the string view thing, i didn't add that FWIW
<geist> but some folks wanted it so it appeared one day
<sham1> But why? Also is it by value or by reference
<heat> let me guess, roland?
<zid> Like traveller communities
<geist> what i dont remember is how the warning in the compiler was squelched
<zid> You have an open field on it, and one day you wake up and it's got a caravan on it
<geist> heat: probably
<heat> with a pragma
<heat> #pragma clang diagnostic ignored "-Wnon-pod-varargs"
<sham1> Ah, _Pragma
<zid> -Wno-pops-pod-varagsmns
<geist> ah
<zid> I saw it earlier heat linked it
<geist> yeah there's definitely folks on the team that are of the opinion that const char * is bad. etc
Turn_Left has quit [Ping timeout: 245 seconds]
<geist> newer code it's hard to pass one around without someone telling you to use a string view
<zid> Yea, it's very easy to have OPINIONS in a C++ codebase, with how many options you have
<sham1> Why do they think const char * is bad
<mcrod> i don't understand what's the greatness with std::string_view
<heat> also yeah it was roland i win
<zid> C's like "You're doing it this way, glhf"
<mcrod> seems like it's mostly crap
<heat> dude
<geist> iirc the string view can have a length and you can use it to point to a substring, etc etc
<zid> it's something you occasionally implement
<zid> in about 2-3 mins
<zid> when you're dealing with strings
<geist> right, which then folks will instantly say 'well then use string view and you dont have to reimplemt it'
<heat> imagine a std::string? but without actual allocation behind it, points at anything, and does all std::string operations
<geist> which has some truth
<zid> so it saves you those couple of minutes hwen you're using C++ like python
<sham1> std::string_view can quite literally just be struct string_view { char *m_begin; char *m_end; } // modulo constness
<heat> including things like /*std::string_view a;*/ std::string s{a};
<heat> sham1, bruh
<geist> right and then you can pass it into a bunch of things. it's quite powerful
<heat> struct string_view {char *_M_begin; char *_M_end;} you mean
<geist> it's not what it's implemented as, it's wha tyou can do with it in standard apis, etc
<heat> also needs to be template <typename _Type> struct basic_string_view
<sham1> I don't break the C standard by doing _Capital
<geist> the implementation is of course not complicated, which is good, because if it were complicated the overhead would be too high
<heat> you're breaking the C++ standard by not doing it
<sham1> Good. C99 foreva
<mcrod> hm
<heat> hm
<mcrod> sham1: how old are you
<sham1> 24
<mcrod> it doesn't make any difference at all, this is for my own curiosity
<mcrod> ok 24
* mcrod notes
<heat> GEN Z GANG!
<sham1> yes
SGautam has quit [Quit: Connection closed for inactivity]
<mcrod> you are one of the few people in that age group I've come across in recent times who say C99 forever or similar
<geist> anyway i need to get more used to string views, honestly. it's one i really cant argue much about
<heat> send me your tiktok
<mcrod> the rest are in their 40s or 50s
<heat> yes, i say C89 forever!
<mcrod> no
<geist> though of course one of the downsides is printf (vs iostream)
<mcrod> i forbid it
<heat> oh right, I say K&R forever
<geist> but we solved that with the %V thing, so back full circle
<sham1> geist: will this be supported in Carbon
<heat> lets devolve back into monke K&R UNIX C program
* sham1 runs
<GeDaMo> BCPL forever! :P
<sham1> It's evolving, but backwards
<sham1> C23 seems promising aside from all the UwUs in the draft specs
<sham1> And I was so looking towards #embed
<heat> who's the weeb that wrote the spec?
<geist> sham1: hmm, what's carbon?
<mcrod> C23 is slowly reminding me of C++ though
<geist> or more implrtnatly, which carbon are we talking about here?
<heat> google experimental language cuz they got upset with c++
<geist> ah
<mcrod> I saw `constexpr` and it was a legitimate thing
<mcrod> and I honestly thought the 60 year olds would have a stroke and die there.
<heat> with constexpr C23 is no longer implementable by non-major-compiler-vendors
<heat> cheers mate
<sham1> auto in C will be weaker than in C++ fwiw. And oh well, constexpr will mean that I can give a name to an array size without having it suddenly become a VLA and ruining everything
<mcrod> what do you mean?
<sham1> If I do something like
<mcrod> #define HEAT_BRAIN_SIZE_ARR 1
<mcrod> there
<geist> yah const/constexpr proper constants are a nice thing in C++
<sham1> const size_t N = 5; heat_t heats[N]; // This will be a VLA
<geist> having to reduce the amount of #define FOO number is pretty good in general
<mcrod> i'm being obtuse for a reason
<sham1> I don't count preprocessor macros, they're not typed
<geist> right
<heat> mcrod, did you watch the UNIX talk i linked?
<mcrod> and that reason is the C standards people are _usually_ resistant to change
<geist> typed constants is generally a good win
<mcrod> heat: shit I forgot
<heat> do it now
<heat> benno can't wait any longer
<mcrod> man I'm working
<sham1> constexpr size_t N = 5; heat_t heats[N]; // This ain't no stinkin' VLA
<mcrod> well, how much am I working, really
<heat> there you go
<geist> so then the question is does that reduce the 'this variable must be impemented' rule that tends to exist in C
<geist> vs C++ where a constant doesn't always need to exist
<geist> though i forget the precise semantics of that
<geist> except you can generally just blat them around and not worry too much (in C++)
<zid> I like the 'vla types but no vlas' thing because vlas suck but sizeof(a[4]) is good
<mcrod> constexpr is fine in C
<sham1> zid: yeah. I can finally do something like `void foo(size_t n, int (*arr)[n]) and have that work
<zid> C already has that but for.. minimum sizes
<mcrod> again my only point is the C standards committee is afraid of change
<mcrod> even removing trigraphs was a minor, but nevertheless a real question
<zid> I think you need a keyword though but I forget what it is [static 5] or whatever?
<mcrod> hard to imagine
<mcrod> i think the committee actually spent some time on that issue and gave it serious thought
<zid> C standards comittee haven't bothered to extend the language with *any* of the common tropes C programmers find themselves reimplementing 400 times a year and that's just sad
<zid> no 'length of an array' operator, so now there's a billion sizeof(a) / sizeof(a[0]) macros
<zid> endian macros
<zid> blah blah
<zid> all of that could have been added in the 80s in 20 minutes
<sham1> zid: you don't need static or const for that. In that case the compiler exactly knows that the size of the array is n
<mcrod> [static 5] doesn't do shit in gcc
<mcrod> the manual states this
<zid> it warns
<zid> if the size of an array passed in is smaller than 5
<sham1> Because it's a pointer to an array of size n. While arr[static 5] just warns, yeah
<mcrod> hm
<sham1> IIRC either clang or llvm uses [static 1] as a "non-nullable" pointer
<sham1> Well, clang/llvm
SGautam has joined #osdev
<zid> sadly the analyzer isn't *great* about doing it for malloc, if at all
<sham1> True. It's trying its best
<zid> oh it treats it as a maximum inside the function at least
<zid> <source>:1:12: note: at offset 6 into destination object 'a' of size [0, 5]
<zid> 1 | int f(char a[static 5])
<zid> not sure I'd ever pick that up as a defensive style though
<ih8win8> I'm writing a driver for a USB hub, and after powering on one of the hub's ports, the port turns itself off after a few milliseconds. Any idea what would cause that?
<zid> usb power saving?
<zid> failed negotiation / init?
<ih8win8> Is pumping out SOF packets required to keep the port on?
<zid> couldn't tell you any details, sorry, that was just my ideas
<ih8win8> Ok, I'll read up on power saving.
<guideX> do you guys think cosmos is a good way to build an os?
<zid> never heard of it so no
<zid> My recommendation is gcc.
<bslsk05> ​www.gocosmos.org: COSMOS - COSMOS
<guideX> hmm ok
<zid> So it's just a single-program bare metal virtual machine sort of deal?
<guideX> it compiles down to bare metal also
lainon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<guideX> I have used it in the past to make a math os, but was hoping to make something graphical
<heat> the mckusick-karels allocator is kind of a cute idea
<heat> i wonder if you could augment it into some slab-ish shit
<zid> The general problem with this is that as you go to extend what it supports out of the box, you either need to personally rewrite it and make their code part of your code, or just scrap it
<zid> this -> stuff like this
<guideX> zid, I have modified the userkit before, yeah it can be a pita
<guideX> adding major features is harder
<zid> It's much easier to write a program than it is to write a compiler for said programs :p
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<guideX> idk, I made my pulsar os out of cosmos a while back, it doesn't do much https://github.com/guidex/pulsar mostly math
<bslsk05> ​guideX/pulsar - pulsar os (0 forks/0 stargazers)
linearcannon has joined #osdev
<zid> that's not a pretty screenshot :(
<ih8win8> Why does USB have to be so fucking complicated
<guideX> what I liked about it, you can debug from visual studio when in the virtual machine
<zid> you can debug with a debugger anyway in qemu
<zid> I might try using IDA one day see if it works
<ih8win8> except for the fact that qemu doesn't emulate real hardware with 100% accuracy.
<zid> doesn't need to, and by the time you care, you can just add a gdb stub yourself
linear_cannon has quit [Ping timeout: 246 seconds]
linearcannon has quit [Ping timeout: 240 seconds]
linear_cannon has joined #osdev
<heat> *** Configuration i386-pc-aout is now obsolete
<heat> *** and so support for it has been REMOVED.
<heat> MOTHERFUCKERS
<kazinsal> pwned
<heat> probably trivial to write my own elf to aout though?
<Griwes> I, uh, why are you using aout
<heat> im trying to write a minimal 4BSD clone
<Griwes> well, should probably be using era appropriate toolchains too, then :P
<kazinsal> bootstrap your own aout linker
TkTech has quit [Ping timeout: 260 seconds]
<zid> I assume aout got its name from tools spitting out 'a.out' as a default filename?
<zid> namely assemblerizers
<zid> or linkidoors
<kazinsal> yeah
<zid> when a.elf
<heat> kazinsal, i probably dont need my own linker, a standard elf can be trivially aout'd i think
<kazinsal> pre-unix, even, dates back to ken's original PDP-7 assembler
<zid> I bet gnu would reject that patch for ld
<heat> intux_mag;/* magic number */
<heat> unsigned ux_dsize;/* data size */
<heat> unsigned ux_tsize;/* text size */
<heat> unsigned ux_bsize;/* bss size */
<heat> unsigned ux_ssize;/* symbol table size */
<heat> unsigned ux_entloc;/* entry location */
<heat> unsigned ux_unused;
<heat> unsigned ux_relflg;
<heat> IDEAL
<zid> Yea that's almost the same as the playstation exe format
<zid> just it has a symbol table
<Griwes> love multiline pastes into irc
<zid> in exchange for a stack field
<heat> i can almost hear your crying Griwes
<kazinsal> the original a.out format is even simpler
<heat> how do you know the base address for the exec?
<kazinsal> who needs bss
<heat> do you Just Know?
<Griwes> you may want to get your hearing, or brain, checked then, because you seem to be having auditory hallucinations
<kazinsal> in the original a.out, the base address for the exec is 0
<heat> Griwes, my brain is melting, hence this stupid idea
<kazinsal> since the first word is a relative jump to the entrypoint
<Griwes> yeah that scans
<heat> ok so I as the ABI person can just define all aouts to start at X and they just do
<heat> brilliant
<heat> see, we're already shedding off so much complexity
<zid> It is almost TIME FOR BOOK
<zid> Are you the excite
<heat> the mckusick-karels offers no way to return memory back to the page allocator and i find that beautiful
<zid> bookwormboowkrobokwobmrobookworm
hbag has quit [Quit: The Lounge - https://thelounge.chat]
<bslsk05> ​www.businessinsider.com: Truth Behind Tech Industry's Fake Work Problem: Bad Managers, Bosses
<guideX> hey why are those guys in the treadmill though
<guideX> are they saying treadmills are for lazy managers xD
danilogondolfo has quit [Quit: Leaving]
<guideX> welp, back to the fake work xD
<gog> hi
<heat> gog
<heat> hi
<heat> its me warmth famed creator of onyx
<mjg> does sortix build on onyx
<heat> no
<mjg> if not then i truly have no use for it
<sham1> pog
<heat> mjg do you want to see my shitnix
<heat> this one is worse than onyx
<mjg> wait
<mjg> wtf
<mjg> i just looked up
<mjg> 22:30 < heat> im trying to write a minimal 4BSD clone
<gog> heat
<mjg> you for real :S
<gog> while you were away
<heat> yes
<gog> i said installing freebsd was a prferable alternative to installing windows
<gog> but you werent' there to see it
<heat> are you trying to get an edge out of me
<sham1> Yes
<gog> idk
<bslsk05> ​github.com: GitHub - heatd/hsd
<gog> but when i realized you weren't there
<gog> i was sad
<gog> i love you, little buddy
<heat> i passed away momentarily, played rocket league with zid, then someone resurrected me using the power of love
<heat> i love you too champ
gog is now known as pogchamp
<heat> pog
<mjg> write it in k&r mofer
<heat> oh, believe me, i would love to
<mjg> what's the old up
<heat> but i can't stand gcc's warnings
<mcrod> question
<pogchamp> you need a vintage compiler
<mjg> get yourslef a freebsd 3 system
<mjg> :]
<mcrod> how bad is x86-64's instruction encoding
<sham1> yes
<heat> bad
<mcrod> oh good
<ih8win8> I mean, it's basically like 32-bit x86.
<mjg> dude the encoding is made it so that people writing optimization manuals can have more gotchas moments
<mjg> shit which you think is shorter can in fact be /longer/
<heat> hinting nops!!!!
* pogchamp nopsleds out of the room
<sham1> Instructions are variable length
<pogchamp> yes
<heat> mcrod, pal when are you submitting CODE to hsd
<pogchamp> no unnecessary bytes
<heat> i need an ATA driver, can someone get me an IDE ata driver?
<sham1> And there is no good way to know how many bytes you need to read to know what you need
<heat> i'll do the v7 filesystem impl
<mcrod> ok i'll commit that right away
<sham1> You just read them
<heat> the worst part of writing this is that i need to rewrite everything
<heat> and thus sucks ass
<sham1> So yes, x86 is pain. Might be worth it to some, but it's pain
<sham1> And AMD64 just piled more stuff on gop5
<sham1> Top
<mcrod> so
<mcrod> tell me something
<mcrod> then a disassembler is nontrivial
<heat> yes
<mcrod> excellent
<sham1> It is non-trivial, yes
<heat> how is that related to the ATA driver?
<sham1> You sound too enthusiastic about it being non-trivial
<sham1> If you're thinking about a disassembler, my first piece of advice is "don't". My second piece of advice is "please do not".
<mcrod> that sounds like a challenge my good man
<heat> dude, im giving you the oportunity to write shit code
<ih8win8> MIPS and PPC have really nice encodings.
<heat> but no, lets write a disassembler
<sham1> A disassembler can also be shit code
<ih8win8> x86 is basically like bytecode.
<sham1> Very organically grown bytecode with bad manners and a bad attitude
* mjg burps
<mjg> yer all suckkK
<sham1> Sure
<heat> mjg do you liek my malloc
<heat> it's very BSD traditional
<sham1> No
<mjg> the only thing bsd is doing fine is asserts
<mjg> and even then that's a massively late addition
<mjg> which i think is mostly a frebsdism
<heat> HOTPATCH: hsd now has malloc
<zid> bookworm chapter soooo gooood :(
* zid fixes his face
SGautam has quit [Quit: Connection closed for inactivity]
<mjg> heat: btw do you know how minor numbers came about
<mjg> bsd 4.2 and so on
<heat> no
<mjg> originally it was bsd, bsd2, bsd3 'n shit
<mjg> so when the time came to make 5 they got slapped by at&t (sysv)
<mjg> they figured "bsd 6 then" but ultimatley ended up just adding minors to 4.
<heat> dope
<mjg> i do find it amusing
<Ermine> onyx HSD
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mjg> i think armed with this knowledge
<mjg> you should make hsd5
<mjg> or 5hsd
<Ermine> Heat Software Distribution
<heat> note how hsd is GPLv2 because no one should copy this
<sham1> Why not agplv3+
<heat> actually people should learn from it, it's not bad
<heat> just stupid simple though
<Ermine> Why not gpl1
<heat> mjg, ngl their struct user u; idea was cute
<mjg> :(
<mjg> ngl heat u suckkK
<heat> shut up u doofus
<mjg> do you know about EDOOFUS?
<bslsk05> ​fxr.watson.org: fxr.watson.org: identifier "EDOOFUS"
lainon has joined #osdev
<mjg> it is a "you fucked up" error
<heat> you have been obsoleted
<mjg> so
<mjg> do you know how lack of usage came ot be
<heat> go ahead bsd history man
<mjg> someone (i think from apple?) complained this is some offensive shit right there
<sham1> Nethack confirms it!
<mjg> there are also used to be offensive fortunes
<mjg> which you had to enable to see
<mjg> that also got axed
<heat> yes, the unfunny theo ones
<mjg> no
<mjg> theo quotes are newfag
<mjg> lemme find an example
<heat> nope, the old fortune theo quotes
<heat> those are not new
<mjg> > There once was a miner named Dave, Who kept a dead whore in his cave. She was ugly as shit, And missing one tit, But think of the money he saves.
<mjg> this kind of stuff
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<heat> :|
<Griwes> that fits my definition of "unfunny"
<mjg> theo stuff is like late 90s at best
<heat> "why are there no women in tech????"
<mjg> Griwes: i found it hilarious around high school
<heat> Techbros ☕
<Griwes> most things that highschoolers find hilarious I would find unfunny
<mjg> ok boomer
<mjg> i just remembered there was an option to sudo to make it talk shit to you
<mjg> if you mess up usage
<mjg> > Listen, burrito brains, I don't have time to listen to this trash.
<mjg> > My pet ferret can type better than you!
<heat> cringe
<mjg> ye not that great
<mjg> i would almost applaud the idea, if it did not add a lol feature to a SUID program
* mjg questiones some priorities
<zid> heat would love though
<heat> love what
<zid> things that highschoolers find hilarious
* mjg tries a fart joke
<mjg> it's gone with the wind
<mjg> :rimshot:
<heat> rimshot indeed
<heat> mjg dawg why did they have malloc if the vast majority of things were static?
<mjg> i don't know, could be an attempt at making it not static?
<zid> That's how most code should work, people just got lazy
<mjg> i mean you do need a n allocator first...
<zid> They seem to be under the misunderstanding that anybody would ever use one copy of their code, much less two copies of it, so they alloc the struct/class that their file operates on
<zid> rather than just having a static one
<zid> with the excuse "what if I need two?"
<zid> The obvious response being "I'll change it to a [2] for you then"
<zid> It's like premature optimization but, premature dynamism
<mjg> i'm allergic to claims of premature optimization
<pogchamp> optimize early and often
<mjg> webtard is going to select * from loltable; and filter or count in the php code
<mjg> when you point out how inefficient it is
<mjg> "wow premature optimizaiton"
<heat> pogchamp, optimize early but rarely
<mjg> why optimize
<mjg> computers fast
<mjg> webdevs told me
<zid> optimize by making it slower
<zid> and use more memory
<mjg> the same webdevs which now rave about rust eating only a small % of cpu
<heat> jeez there was a guy on the fuchsia discord today that wanted protobufs for cli arguments instead of argv
<heat> i said it was slow (plus a bunch of other problems)
<heat> "but even the smallest microcomputer is faster than a PDP11"
<zid> "It won't be after you're finished"
ih8win8 has quit [Ping timeout: 260 seconds]
pogchamp is now known as pog
<pog> we have a mess of stored procs in our db to make things a little faster
<zid> What's even faster is just not using web technologies to begin with
<zid> keep the entire thing in memory at all time
<pog> maybe we should stop using computers
<zid> cus now you have enough cpu and memory to do so
<heat> reject the internet
<heat> use 2.11BSD
<heat> oh wait 2.11BSD got backported networking
<zid> as soon as you need to split it onto two machines you end up saying "ehh we'll just scale it more" and write slower and slower code, and use slower and slower techs
<heat> man, they ruined that too
<pog> but also what i like about efcore is that it abstracts the query so you _can_ filter and count in code and on th eback end it becomes a sql query
ih8win8 has joined #osdev
<heat> the 8259 is a very quirky little thing
eddof13 has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Left_Turn has quit [Read error: Connection reset by peer]
<immibis> mjg: just the other day I found out a server with 60 cores and 1TB RAM costs under $2000 to buy (used). assuming there's no catch, there is no excuse for not fitting your data on one server if you're smaller than Wikipedia.
<immibis> Stack Overflow is also a one-server-per-tier system, but uses more than one for redundancy.
<immibis> (could run on one database server, one web server, and one offloaded search engine server)
<pog> hi
<mcrod> hi pog
<zid> immibis: noo you should buy 100 $20 machines and write code that needs all of them all of the time because of all the NOSQL you use
<immibis> the english wikipedia text dump is only 20GB
<immibis> (compressed)
<zid> and images can just be spread across machines via hash or something without them having to nosql or whatever
<zid> so that should be easy too
<immibis> that becomes a problem when you add more machines. Fortunately, disks are also quite big.
<zid> as in, upload image, image hashes to 37, 37.images.wikipedia has it
<zid> that's the link that's on the website
<heat> i dont know the x86 interrupt frame by heart
<heat> i have failed my family
<zid> imagine wanting to know
<Cindy> i don't know anything about x86
<zid> good, it can be a surprise
<Cindy> it's just graphing calculator CPU architecture
<zid> oh you're bnchs
<Cindy> yes
<zid> /saveini
<klange> My graphing calculators all came with Z80s.
<immibis> I don't know what you're talking about. My graphing calculator uses a SuperH CPU
<Matt|home> <heat> i dont know the x86 interrupt frame by heart <-- 80h is the only one you need trust me -_- all the others are superfluous
<klange> I did eventually upgrade to one with an ARM9-26EJ-S
<Matt|home> gotta love the design philosophy.. "let's make an interrupt that does literally everything" yeah ok
<zid> it's what dos did
<heat> Matt|home, that's not an interrupt frame, that's an interrupt vector
<zid> there's no *real* need to spread them around, it just steals device irqs and stuff
<Matt|home> heat : im being frivolously sued by an insurance company, if i say it's a frame it's a frame, if i say it's a vector it's a frame
<Matt|home> or something
* Matt|home throws his laptop out the window
<mjg> immibis: you don't want everything served from ONE machine
<immibis> you want it mirrored across two machines, in case one breaks
<mjg> aka single point of falure
<mjg> besides that had to be a rather funny power hungry machine if it costs only 2k
<immibis> if you need a distributed consensus, you need at least 3 machines, but master/replica will do just fine for most people
<immibis> ... my last company was working on a distributed consensus on 2 machines because that's what everyone expects in the networking world. don't tell anyone it will never be bulletproof.
<immibis> not even with STONITH
<immibis> i mean, they weren't even planning on STONITH
<mjg> dude
<mjg> 2 machine redundancy was a massive fetish at my first job
<mjg> and it did not even work
<immibis> did they put them on the same circuit in the same rack in the same data center and the power went out?
lucartc has joined #osdev
<mjg> brah
<mjg> i got a one up for you
<mjg> another job had 2 redundant UPS to power DC
<mjg> they decided to do maintenance on one of them mid-day
<immibis> did they plug one into the other?
<mjg> and puff, entire dc went down ofc
<mjg> no, the physical labels on them were backwards
<mjg> so they shifted all load to one and then powered it off
<mjg> :]
<mjg> as for the first job, it was 2 machines in the same rack connected with a short ethernet cable
<mjg> basically redundnacy was only for the case where one crashes
<immibis> it's typical for a DC to be wired with two entirely separate power circuits and servers plug into both
<mjg> networking redundnacy classic is 2 links to a provider
<mjg> all going in the same tunnel
<immibis> yes and then someone accidentally digs up the 1 fiber cable
<immibis> or the 1 bundle of fiber cables
<mjg> btw one day $certainjob was doing spring cleaning and they found a disconnected fiber
<mjg> turns out company was extra for a backup link
<mjg> since it was not even plugged in, makes you wonder if failover was ever configured
<mjg> as they say, it fails and it is over innit
<immibis> so the lesson is test your redundancy
<mjg> who even does that
<mjg> the utter classic is setup it up, NEVER validate
<mjg> adn then be afraid to do it
<immibis> one obvious way to test would be to serve half of reads from the replica server. maybe logged-out users or something
goliath has quit [Quit: SIGSEGV]
<mjg> what's your product
<heat> your replica server should be a rpi running off an sd card
<heat> do not test it ever
<mjg> newfag
<mjg> floppy
<mjg> ram-only
<heat> can you stop saying newf*g?
<heat> it's not funny
<heat> and some people may be offended by that
frkzoid has quit [Ping timeout: 246 seconds]
pog has quit [Quit: byee]
<mcrod> if you want to say it go to efnet :(
<mjg> heat: fair
<mjg> what's the genz equivalent
<immibis> mjg: mine? don't have one
<immibis> there's noob but that's a bit dated now
<mjg> noob?
<mjg> mate
<mjg> what's next, a rookie? ;)
ih8win8 has quit [Quit: Leaving]
<immibis> no, that's older than newf*g
xvmt has quit [Ping timeout: 264 seconds]
<mjg> i have not seen a single episode
<mjg> is this actually funny or is this another "does not make sense therefore funny"
<heat> i think you know the answer
gog has joined #osdev
<heat> is this funny
<gog> no
<heat> oh fuck off
<bslsk05> ​www.reddit.com: Reddit - Dive into anything
<heat> is this funny?
<geist> heat heat heat heat heat
<geist> heat
<geist> omg omg
<geist> heat
<mcrod> this is a great day.
<mcrod> I just had the best OTP passcode ever
<heat> heat
<heat> wait no
<heat> geist
<mcrod> 8675309
<heat> geist
<heat> geist
<heat> geist
<geist> heat
<geist> RUUUUUST
<klange> shut the hell up all of you
<heat> RUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUST
<mcrod> RUUUUUUUUUUUUUUUUUUUUUUUUUST
xvmt has joined #osdev
<geist> aww, sowwy klange
<Mutabah> Good morning everyone :)
<geist> hai
<mcrod> hi geist
<mjg> funny-o-meter is at solid 0 for genz humor innit
<mjg> unless you are a genz
<geist> i think genz humor works in some different universe
<geist> it's post absurd
<Griwes> I prefer genz humor over 90s internet "humor"
<mjg> maybe the joke is on us -- the only thing they don't laugh at is jokes?
<mcrod> i miss the 90s
<mcrod> and the mid 2000s
<mcrod> they really knew how to party back in those days.
<geist> it's entirely possible the genz humor is meta humor
<mcrod> in truth, the mid 2000s was basically when the internet was truly lawless, in the sense that anything, absolutely anything went
<geist> and the joke is how non genzers react to it
<mcrod> IRC today is much different from IRC 15 years ago
<mjg> geist: :]
<heat> geist: the joke is how stupid and unfunny it is
<heat> it's meta funny, yes
<mjg> there used to be a concept of antijoke
<mjg> which was unny to some extent
<heat> literally pissed my pants from laughing just now
<geist> right, like intentionally being unfunny
<geist> ie, that guy. andy kaufman
<mjg> your mom is so fat....
<mjg> i'm genuinely concerned