LittleFox has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
LittleFox has joined #osdev
elastic_dog has joined #osdev
sortie has quit [Quit: Leaving]
<heat>
bazinga
<zid>
if you never did that ever again, I would be happier
<heat>
bazinga
<geist>
yeah it reminds me of how terribly stupid that show is
<geist>
and how that probably reinforced so many stereotypes of how smart people are
<mjg>
:d
<zid>
It's autism blackface, geist
<geist>
pretty much
<zid>
it's also like.. not even funny?
<mjg>
i heard calling the show blackface is "the whitest thing ever"
<geist>
that was my problem honestly. i just found it to be kinda petty and dumb after a few episodes
<mjg>
zid: it had some funny bits here and there
<zid>
I've seen a grand total of 40 seconds of it, but it was with the laughtrack removed
<zid>
it was *horrendously* cringe
<mjg>
but for the most part the joke is sheldon being socially oblivious
<geist>
well, it's mostly just un-smartly written sitcom. better than some, honestly, but still pretty low bar
diamondbond has joined #osdev
<kazinsal>
yeah, it's just... not funny
<kazinsal>
they also flanderized all the characters heavily really early on
<mjg>
i was surprised to find that uspposedly the target audience is smart people
<mjg>
according to the audience
<zid>
Sitcoms used to have pauses because they couldn't say their next line yet because of th audience laughing over them
<kazinsal>
like the one dude who was socially awkward at first and then like, second season onward is willing to jump out of windows to avoid seeing women
<geist>
only in as much as you might identify witht hem, but then over time they squander it pretty quickly
<geist>
it also went on way too long
<zid>
now they stare down the barrel of the camera grinning, as its written into the script for them to do
<zid>
while they play canned stuff over it in post
<kazinsal>
the target audience is people who go "ha ha stupid nerd talk funny"
<geist>
I'D BUY THAT FOR A DOLLAR
<mjg>
i rmeember one joke
<zid>
kazinsal: yup
<mjg>
lemme find it
<geist>
i mean i didn't super hate it early on, but i also didn't really watch it much after maybe S1
<bslsk05>
'The Big Bang Theory | Leonard Hofstadter Chicken Joke' by Best Television Clips (00:01:11)
<kazinsal>
geist: well I guess I'm rewatching robocop this weekend
<mjg>
i find the joke to be funny
<mjg>
judge me all you want
* geist
gets in their SUX 6000 and heads to Detroit
<zid>
I find modern american sitcoms incredibly over-wrought
<mjg>
geist: high five robocop from me
<geist>
on the average yes, but there are clever shows here and there
<geist>
like say 30 rock, or Community
<mjg>
so do you guys like the office (us)?
<zid>
and yet malcolm in the middle is probably some of the best american television ever made
<geist>
the bad place is pretty good
<zid>
guess how many times someone stares down the camera waiting for a laugh in that
<gog>
malcolm in the middle is so good
<moon-child>
mjg: it wasn't a bad joke, but the presentation was meh
<geist>
a good smart ensemble comedy can be great, but you have to really try hard. in general it's not the 3 camera stuff too, it's the more sophisticatwd things where they can move around between sets, etc
<moon-child>
not subtle enough
<zid>
It's like, 10x better than the formula would suggest it should be, but everything in it just worked perfectly
<geist>
honestly i think in parts some of the funniest stuff i've seen in a show in a long time is various scenes in Letterkenny
<geist>
it's like hick canadian shakespeare
<zid>
letterkenney had very good writing for a while
<gog>
i haven't seen it
<zid>
I fell out of love with it on the radio callin season
<zid>
they'd basically just said every joke they made up when they were teenagers at that point and were 'writing' it
<zid>
if you know what I mean
<zid>
rather than just some friends rattling off all their old favourites very naturally
darkstardevx has quit [Read error: Connection reset by peer]
<geist>
yeah that was kinda my problem with it too. individual scenes can be works of art but their overall plots have sort of run out of steam
<zid>
The first ep is on youtube in.. 240p
<geist>
but when they have a good 3 or 4 person scene where the words just flow with a beat to it. it's totally genius
<bslsk05>
'LetterKenny season1 episode1' by FuckEbonics (00:24:25)
<heat>
>FuckEbonics
<heat>
hard skiiiiip
<gog>
roblox_oof.wav
<geist>
hah
<geist>
NO EDITS IN IRC
<zid>
gog: Thingy wants $100 from you now
<gog>
ah shit
* kazinsal
takes a drag from a comedically large cigarette in horror
<zid>
tommy something
<zid>
That's his full name.
<zid>
tallarico
<gog>
yes
<geist>
i've been watching a whole series of BBC mokumentaries by Philomena Cunk that are hilarious
<FireFly>
good hbomberguy imo
<geist>
she's totally nailed the deadpan humor
<gog>
i've seen some clips of those
<zid>
I've only seen this, and the vaccines one
<gog>
they're hilarious
<zid>
the vaccines one was very very good
<geist>
oh i'll have to watch that one next
<zid>
note we were talking about hbomberguy there, not philomena cunk
<zid>
in case you didn't catch it
<gog>
i was talking about philomena
<geist>
hah but she has one on vaccines too
<zid>
yes, me and FireFly weren't
<heat>
everyone's talking about different things
<gog>
i recommend the hbomberguy vid on fallout: new vegas
<zid>
weirdly, the other youtube filmographer person I like
<zid>
also has a video on new vegas
<FireFly>
I think I've only seen philomena cunk in the uh.. annual wipes, until the black mirror guy stopped doing those
<zid>
yea I've seen her for like 40 seconds total, in a screen wipe at some point
<zid>
I was too busy watching adam curtis' new documentary
<heat>
oh yeah that girl
<heat>
yeah i find her hilarious
<geist>
youtube started recommending them after i was watching a bunch of clips of Peep Show after zid had sent the vid last week
<zid>
hmm?
<geist>
so now youtube is flooding me with tons of michell and webb and philomena cunk and peep show
<geist>
and... i do not mind
<FireFly>
mitchell & webb is good stuff
<zid>
did I link a mitchell and webb sketch?
elastic_dog has quit [Ping timeout: 252 seconds]
<zid>
It's found footage from the BBC moscow office, edited together to form a 7 hour brief history of 80s to 90s russia leading up to the election of putin
<mjg>
assume you did not mofo
<geist>
oh you linked the one where he's being interviewed for the loan
<zid>
mjg: I'd like to buy a gift for my aunt
<zid>
sure that was me?
<mjg>
i linked the interview with JOHNSON
<FireFly>
reminds me of how every now and then I end up getting an urge to listen to Clarke and Dawe sketches for some hours, they're also all good :p
<mjg>
you hippy parasite
<geist>
the turkey fucker clip?
<mjg>
yes
elastic_dog has joined #osdev
<zid>
notte me
<geist>
oh well it's funny anyway
<kaichiuchi>
question
<heat>
I love everything the daily show shit out from 1999 - 2015
<geist>
100%
<geist>
that was mostly pure genius, as well as pretty much anything that john oliver does
<heat>
i don't like the new wave all that much although I really like jordan keppler
<kaichiuchi>
if given the choice between an implementation of 'x' with well predicted branches or an implementation of 'x' branchless, which would you choose
<heat>
oh and omg the colbert report
<heat>
💯
<zid>
I wonder if it's time for my bidecenical watch of red dwarf soon
<kaichiuchi>
my _belief_ is that the branchy version, if the branches are in fact, well predicted, will yield higher performance
<heat>
kaichiuchi, bench
<kaichiuchi>
yeah yeah I know
<kaichiuchi>
this is just an abstract thing
<geist>
kazinsal: hmm, good question. also depends on what 'class' of cpu you're running on
<geist>
er kaichiuchi
<geist>
too many ks!
<kaichiuchi>
oops :p
<kazinsal>
ha
<geist>
KA FITE
<heat>
if you keep branches they may get flattened to cmovs
<zid>
profiling is an obscene behavior only done by louts
<geist>
kazinsal: they sort earlier than you too
<kaichiuchi>
if you're on a machine with a poor branch predictor or no branch predictor at all
<heat>
and cmovs are probably faster than bit hackery
<kaichiuchi>
then I think you always want the branchless option
<kaichiuchi>
_always_
<geist>
the flip side of course larger programs may hurt you in the long run, but generally that doesn't show up on benchmarks
<zid>
heat always appreicate it when I throw in new vocab words for him like louts
<geist>
or at least microbenchmarks
<zid>
so he can fully naturalize
<heat>
absolutely
<mrvn>
kaichiuchi: yes
<heat>
nothing better than byzantine english words
<zid>
It's modern
<geist>
modren
<zid>
modren sounds like a drug
<kaichiuchi>
you're thinking of motrin
<mrvn>
kaichiuchi: don't optimize what you haven't benchmarked.
<kaichiuchi>
mrvn: I know
<zid>
In terms of animal vegetable mineral pharmaceutical
<kaichiuchi>
but again, just a general "what if"
<zid>
it's definitely the latter
<mrvn>
kaichiuchi: and don't assume just because the source has a branch that you get a branch
<geist>
i'd say in the last 10-20 years it's become generally more acceptable to just compare and branch all over the place
<mrvn>
kaichiuchi: write what you mean, not what you want executed. The compiler knows better than you in almost all cases.
<geist>
since modern machines have so much energy into fantastic branch prediction
<geist>
hence why things like conditional instructions in arm went away, etc
<zid>
Just hide the bad branch behind a different easier branch
<heat>
MACHINE LEARNING AI BRANCH PREDICTOR AMD RYZEN
<geist>
WITHR SUSUSUST
<heat>
NEURAL NET
<heat>
WRITTEN IN
<heat>
R UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU ST
<zid>
now the slow bits are slow and the fast bit is no slower
<kaichiuchi>
I promise you it was just simply a question :'(
<kaichiuchi>
from a purely theoretical standpoint
<zid>
just trick it into always predicting not-taken and you're golden
<kaichiuchi>
i thought about it on the way home from work
<heat>
if you're worried about branchless code it's because you haven't written enough C++ yet
<heat>
go write a shitty std::function
<kaichiuchi>
I want to cry about all of that
<heat>
where are the branches? who knows
<zid>
Imagine writing efficient enough code to care about branches
<gog>
imagine writing code
<kaichiuchi>
well
<zid>
we're still trying to deal with 1GB copies of the entire universe not being eliminated after the templates made 4 extras
<kaichiuchi>
I do want my gameboy emulator to run on a bunch of shit
<kaichiuchi>
including my 486 packard bell
<mrvn>
kaichiuchi: The difference between a username with 7 chars and a username with 8 chars can be magnitudes larger than your branch vs. branchless.
diamondbond has quit [Quit: Leaving]
<zid>
I ran mine baremetal
<zid>
for kicks
<kaichiuchi>
you wrote a gameboy OS?
<zid>
Sure?
<zid>
It's one of the top posts on r/osdev
<kaichiuchi>
i guess that works
<zid>
I can go find it if you want
<kaichiuchi>
sure
<mrvn>
gog: write code, don't just imagine
<zid>
and by 'top' I mean 18th best ever with a whopping 153 points
<heat>
so I was talking with a co-worker and I said "I dont like heavy C++ because I find it hard to understand what codegen comes out"
<heat>
that's where I realized most normal C++ devs don't care about codegen and can't read assembly
<zid>
I wrote a kernel, had nothing to actually.. run on it
<kaichiuchi>
zid very nice
<kaichiuchi>
heat: I don't think anyone does anymore
<kaichiuchi>
it's not just a C++ thing
<heat>
if you're a C person and can't read assembly then I feel sorry for you and would not hire you for shit
<zid>
I just deleted sdl.c and replaced it with sdl_get_framebuffer() { return 0xBEEF0000; } :P
<kaichiuchi>
can't tell you about anyone I've known looking at assembly in the past few years
<mrvn>
heat: even the few that can read it most can't say which is faster if given 2 codegens.
<heat>
C is in many ways super predictable
<zid>
kernel leaves fb mapped there
<mrvn>
heat: hah, how many decades old is your compiler?
<heat>
you can't more or less map out your codegen?
<zid>
LTO does an amazing job on my emulator, all it can do to speed it up is.. remove the while(1){ lcd(); cpu(); } and inline them both into main
<kaichiuchi>
being able to read disassembly, and recognize when the compiler is failing to do a job in the critical path and optimize for it
<zid>
while destroying every symbol wrt debugging
<mrvn>
heat: Apart from not seeing what function gets called C++ and C are basically the same for codegen.
<kaichiuchi>
that's kind of important
<heat>
sorry, that's blatantly untrue mrvn
<kaichiuchi>
compilers are not perfect
<kaichiuchi>
they... are spooky and very good
<heat>
it's way way easier to get shit codegen if you go down the modern heavy duty C++ path
<kaichiuchi>
but still not perfect
<mrvn>
heat: what optimization does c++ differently than C other than picking what function /template to call?
<heat>
who knows what std::accumulate gens? i definitely don't
<heat>
do you want to compare the layers of shit you go through to get to actual concrete expressions?
<mrvn>
heat: it might be easier to write shitty code in c++ by layering tons of abstractions. But that's not about codegen but about how you programm
<zid>
some of that is a C++ thing some of that is a.. C++ programmer thing
<kaichiuchi>
christ
<zid>
it's not like you *have* to use ::<<<<T &::<><>:::> type code.. but they won't not do it
<kaichiuchi>
I wrote a template and everything became unreadable
<kaichiuchi>
and it's not even a complex template
<heat>
even for a simple lambda, can you predict the codegen? I can't, I'll tell you that
<mrvn>
heat: the abstractions hid which functions get called. If you understand that part the codegen after that is toally the same.
<kaichiuchi>
I can get through it but it's not beautiful looking anymore
<mrvn>
heat: a simple lambda has the same codegen as a named function.
<zid>
So much of C++ not being dogshit relies on the compiler making optimization passes at *very* strange points, imo
<heat>
I mean a lambda that captures
<heat>
not a [] which is just a function pointer
<mrvn>
heat: still the same codegen
<mrvn>
heat: + the alloc for the capture
<kaichiuchi>
i do think that the C++ community has a hardcore die hard belief in the compiler, which isn't wrong but again, compilers are not perfect and sometimes they generate suboptimal code
<heat>
the alloc, construction of the lambda object, then calling operator() (or not, if it gets fully inlined)
<kaichiuchi>
sometimes auto-vectorization fails in obvious cases where you'd benefit
<heat>
it is blatantly wrong
<zid>
kaichiuchi: C++ isn't even parseable to begin with :P
<heat>
llvm-libc tries to use an optimized memcpy based on the compiler
<heat>
*facepalm*
<kaichiuchi>
if you're dealing with C/C++, you should have even a passing understanding of the target arch's assembly language
<kaichiuchi>
because I'm not exactly a savant level or something with x86-64
<zid>
I don't think you like *should* have that, but, how the fuck did you end up writing C
<heat>
lambdas don't allocate on the heap
<zid>
if that's not a thing you can deal with
FreeFull has joined #osdev
<zid>
If you wanna learn on the training simulator only (The virtual machine described by the spec) that's great, but.. sometimes crashes happen
<kaichiuchi>
the other problem is, sometimes compilers cannot peel away the abstractions
<mrvn>
heat: where else would they allocate? How else would you be able to return a lambda or store it?
<kaichiuchi>
because there's *too much shit*
<heat>
.....
<heat>
on the stack?
<mrvn>
heat: that wouldn't survive exiting the creating function
<heat>
yes it would
<heat>
... you need to read up on the ABI
<heat>
you can return everything
<heat>
actually, you can even do it in C
<kaichiuchi>
actually you've lost me here too
<heat>
in no way shape or form does a return of a complex object ever allocate
<mrvn>
heat: say you make a sorted container and pass it a "compare" lambda and return that container. If the lambda where on the stack the container would break.
<heat>
if you pass it a lambda, it copies the lambda and that's that
<mrvn>
heat: and where is the lambda in that case then? The heap.
<heat>
holy fucking shit
<heat>
are you trolling me
<mrvn>
s/make/allocate/ to make it clearer
<heat>
the lambda is wherever the lambda is
<heat>
if the member variable is on the heap, it's obviously stored on the heap
<mrvn>
so what you want to say is that lambdas are value types.
<heat>
if it's on the stack, it's stored on the stack. if it's in .data, it's in .data
<heat>
yes
<mrvn>
I'm not sure what the x86 or ARM ABIs say but I think I would want my lambdas use heap allocation and type erasure.
<heat>
"In C++11, a lambda expression will always result in some form of automatic object, whether a stack variable or an unnamed temporary. There's nothing you can do to change that."
<heat>
what do ABIs have to do with heap allocation and type erasure
<heat>
I do not want my lambdas to use heap allocation
<zid>
I do, then I'd have even more excuses not to use C++
<zid>
"yea but I can't use basic language features without it allocating memory, that's a no-go for this project"
<mrvn>
zid: good point
<mrvn>
heat: the ABI say how the type for lambda is implemented
<heat>
they do not
<mrvn>
heat: then who does?
<heat>
the compiler
<heat>
and the C++ standard
<mrvn>
heat: and how then can you link object files from different compilers together if each has their own private lambda type?
<heat>
"[Note 1: A closure object behaves like a function object."
<heat>
closuretype.operator()()
<mrvn>
heat: yes, behaves. that's not really defining the type
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<heat>
what else do you need?
<heat>
you call operator()()
<mrvn>
construction, destruction, copying, moving
<mrvn>
but I guess "function objects" include that too
wootehfoot has quit [Read error: Connection reset by peer]
<mrvn>
heat: so why then did you say: "you need to read up on the ABI" if the ABI has nothing about lambdas type?
<heat>
it has about returning classes and structs
<mrvn>
well, mostly they aren't returned but constructed in space provided by the caller.
<heat>
yes, so you do know your ABI?
<mrvn>
mostly just the calling convention
<heat>
there you have it
<mrvn>
doesn't tell me if a lambda is a "struct lambda { fn_t *code; foo cap1; bla cap2; ...}" or "struct lambda { fn_t *code; capure_t * cpature; }" like
poisone has joined #osdev
<mrvn>
lambdas could even have small cpature optimization.
<Mutabah>
Read the source to `std::function`?
<Mutabah>
(I'm guessing that's where the magic is)
<mrvn>
Mutabah: that code scares me.
<heat>
magic for what?
<Mutabah>
the maybe-boxing
<heat>
hm?
<heat>
un-rustify that for me
<Mutabah>
maybe allocating
<mrvn>
Mutabah: a lot of magic is just templates so every use case is looked at separately and the compiler and source can do something else for every case.
<mrvn>
That and function overloading makes seeing what code will come out of some source potentially impossible for a human.
<mrvn>
But I think c++ is still better than perl there. In perl there are parts where the interpreter simply has to guess what the user might have wanted bacuse it's undecidable.
<Mutabah>
Yep... although there's probably just two main cases, depending on the capture data size
<mrvn>
Mutabah: no capture and some cpature?
<mrvn>
if a global object creates a lambda with reference capture does the compiler optimize that into just referencing the .data section in the code instead of a capture?
<mrvn>
My guess would be it might but still capture the reference because it cant change the type of the lambda.
<heat>
Mutabah, yeah it probably has a small buffer I would say, although who knows
<zid>
Stack sizes not being fixed and trackable still fucking annoying in 2022
<zid>
at least in C I can just add it up on my fingers
<kaichiuchi>
please. you don't have any fingers.
<mrvn>
zid: the compiler might optimize stuff out giving a smaller stack or decide to spill some register to store come common computations or from unrolling loops leading to a bigger stack
<mrvn>
s/come/some/
<zid>
I have extras
<zid>
they're wbbed
<kaichiuchi>
hey zid
<kaichiuchi>
should I pull out my packard bell and run gcc on it
<zid>
if you want?
<zid>
not sure what it has to do with me
<kaichiuchi>
i don't know either.
<mrvn>
zid: isn't your problem that you don't know the size of random std::something types?
<mrvn>
Makes me wonder if there is any static analyser that computes stack sizes and warns when it exceeds limits or becomes unpredictable.
<heat>
there is, in gcc itself!
<mrvn>
heat: static? Not just runtime?
<heat>
static
<heat>
-Wframe-larger-than
<mrvn>
heat: that's just one function. I mean look at the whole program and try to figure out total stack usage
<heat>
/shrug
<heat>
I think linux calculates stack depth by snooping around in interrupts
<zid>
linux kernel has a plugin
<zid>
to calculate it at compile time
<geist>
zid: i can run clang on a 486 for you if you want
<zid>
geist: Thanks for the offer, but it's sgi workstation or nothing for me
<heat>
>clang on a 486
<mrvn>
The stack usage should be in the DWARF2 data so if you can make a call graph you can output the stack usage easily enough.
<kaichiuchi>
I wasn't joking about porting my emulator to my 486
<kaichiuchi>
i'm pretty stoked for that
<mrvn>
recursions are tricky to predict though
<kaichiuchi>
how much performance I can squeeze before it completely shits the bed
<mrvn>
kaichiuchi: do you even have a 486 cpu?
<kaichiuchi>
yes
<mrvn>
condolences
<kaichiuchi>
my packard bell which is currently sitting at 1.6C
<kaichiuchi>
condolences hell no
<kaichiuchi>
I love this shit
<heat>
clang can't compile for 486 afaik btw
<mrvn>
I rather have my m68k
<zid>
I can get fullspeed on a 486, as long as you don't want prehistorik man to run correctly
<geist>
heat: IT CAN WITH RUUUUUST
<kaichiuchi>
if I could have a warehouse full of ancient shit I would
<mrvn>
geist: how is your m68k board doing?
<kaichiuchi>
zid: is the pixel FIFO really that intensive?
<heat>
geist, i don't think rust can either :((
<geist>
it looks nice, on the table
<mrvn>
heat: RUST can do everything
<mrvn>
all bow to RUST
<kaichiuchi>
no
<geist>
just spray a can of RUST on the problem areas
<heat>
welcome to rustlangorg
<heat>
this is rustlangorg
Vercas6 has quit [Remote host closed the connection]
* geist
kicks you in the rust pit
<kaichiuchi>
zid: I did run no$gmb on it and no surprise it wasn't really TOO bad
<mrvn>
geist: is it pure enough to not be conductive?
<kaichiuchi>
but I think a modern compiler is going to beat someone who wrote it entirely in assembly these days, 20 years ago
<zid>
and no$ is even sorta accurate some of the time occasionally!
<kaichiuchi>
my god am I that old
<zid>
nobody optimizes for 486
<zid>
you think gcc 12's codepath for the 486 is any better than gcc6's? :P
<kaichiuchi>
no
<kaichiuchi>
I mean, maybe :(
<kaichiuchi>
let me have some hope
poisone is now known as hamradio
<zid>
You might pick up some minor gains from lto
<zid>
but you'll lose them all again to bad instructions
<mrvn>
zid: for all the stuff optimized before generating asm it will
hamradio is now known as mockddos
<zid>
it's going to treat it like a pentium and spam cmov or whatever
<zid>
(idk how to optimize for 486)
<mrvn>
zid: no cmov in 486 codegen
<mrvn>
gcc is pretty flexible in that regard. It has to to be able to generate code for so many different cpus.
<kaichiuchi>
hm
<kaichiuchi>
I didn't know COM files were limited to 65,279 bytes in size
FreeFull has quit []
<zid>
they just pick a random segment, load to 0x100
<mrvn>
My biggest worry would be that gcc -O2 leads to too much bloat. It tries to be smart and trades memory for speed and a 486 just doesn't have it.
<zid>
and the PSP is at 0-FF
<zid>
done
<mrvn>
kaichiuchi: welcome to the wonderful world of 16bit code.
<kaichiuchi>
it's awesome
<heat>
did you guys know PE executable traditionally just relocate and patch all over the .text and .data?
<heat>
it's disgusting
<mrvn>
kaichiuchi: you aren't even switching to 32bit?
<zid>
.rdata is a new invention?
<kaichiuchi>
I don't have a 32-bit processor anymore
<kaichiuchi>
wait
<kaichiuchi>
that is a lie
<zid>
I mean, I do if you count my xeons and q6600 and stuff
<kaichiuchi>
but they're not as old as I'd like them to be
<zid>
but otherwise I don't
<mrvn>
02:31 < mrvn> kaichiuchi: do you even have a 486 cpu?
<mrvn>
02:31 < kaichiuchi> yes
<kaichiuchi>
oh.
<zid>
The last 32bit cpu I owned was a 3GHz P4 prescott
<bslsk05>
learn.microsoft.com: PE Format - Win32 apps | Microsoft Learn
<heat>
read it from the source
<heat>
i'm not making this up, i literally read it from the shitty PE spec
<mrvn>
Does clang support producing 16bit x86 code?
<heat>
what a horrible format
<zid>
lol spec
<heat>
yes
<zid>
like anybody in windows land ever kept to the spec
<mrvn>
does it have a special type for far pointer?
Vercas6 has joined #osdev
<heat>
idk
<mrvn>
maybe it has a memory model for <64k and >64k code and the later only has far pointers.
mockddos is now known as enduser
[itchyjunk] has quit [Ping timeout: 252 seconds]
[itchyjunk] has joined #osdev
Vercas6 has quit [Remote host closed the connection]
Vercas6 has joined #osdev
enduser has quit [Ping timeout: 268 seconds]
TkTech has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
Vercas6 has quit [Remote host closed the connection]
isaacwoods has quit [Quit: WeeChat 3.7.1]
<geist>
sos i tried to link my arm64 kernel with exported dynamic symbols last night
<geist>
Interesting weird quirk: some of the symbols are using a GOT table for Reasons Unknown (though more on that later)
<geist>
But when linking with a dynamic section, it ends up not resolving the GOT table but you end upwith a bunch of RELA entries to patch it up
<geist>
and thus it ends up full of zeros
<geist>
But when not using dynamics, the got is fully pre-populated
<geist>
But. All of this appears to only be on arm64. The other arches with the same code dont use a got table
<geist>
This is linked with BFD ld
dh` has quit [Ping timeout: 260 seconds]
<geist>
It’s definitely a quirk of the linker, because the symbols that are resolved from the GOT are __start __end style section symbols that are generated in the linker
<geist>
So i guess i should stop using that little known feature, though it’s super handy
<heat>
how do lld or gold link it?
<geist>
Haven’t tried yet, but some of it depends on if the __start __stop stuff works there
<geist>
which is probably alone a reason i need to move away from it
elastic_dog has quit [Remote host closed the connection]
<geist>
Just checked all the other serious arches on LK, none of the rest of them use a GOT. So it’s some quirk of how the arm64 linker generates the linker symbols
<heat>
i've had some problems with the GOT myself
elastic_dog has joined #osdev
<heat>
clang ftrivial-auto-var-init calls memset a lot, but it does so using the GOT in my case
<heat>
there's no GOT, and EDK2 dies a horrible death by not linking
<geist>
And the silly thing is arm64 is perfectly capable of resolving symbols within 32bit of the PC, so it doesn’t need a GOT to pull it off
<geist>
It’s I’m guessing mostly just some hard coded logic somewhere using some conservative mechanism
<geist>
It even using the pcrel instructions to reference the GOT itself
<heat>
have you tried the good ol method?
<heat>
that being ld -r
<geist>
Well, yes actually. LK already ld -rs a bunch of mod .o files, this is all in the final link where the magic symbols are generated
<geist>
Actually i should check to see if they’re already PCREL32_GOT at the compiler’s point
<heat>
oh wait, this is for the kernel, not modules
<heat>
it might be advisable to just EXPORT_SYMBOL everything you want to export
<geist>
Yeah, trying to link LK with the dynamic section intact so i can load modules and link it. There’s a trick with the linker invocation to get basically a binary + dynamic
<geist>
Sure, but that doesn’t change the mechanism. The problem here is when linking with dynamic, it breaks the GOT table, for Some Reason
<geist>
And then i got to looking into why it’s using a GOT anyway, and the answer is <shrug>
<geist>
It’s just weird linker behavior
<heat>
linux's EXPORT_SYMBOL just does a symbol table by hand
<geist>
Oh oh i see. Didn’t know that
<heat>
as god intended
<geist>
Yeah i might do that, but I’m trying to just piddle with loading ELF stuff at run time with minimum changes elsewhere
<heat>
currently my hack for symbols is to just hope the bootloader can load them for me
<heat>
like multiboot does
<heat>
I kinda wish there was a hack to make symtab a LOAD segment
gog has quit [Ping timeout: 268 seconds]
<geist>
Anyway, will piddle with this more in a minute
<geist>
*seems* like you could force it to be load via linker script nonsense
<geist>
Like flattening it into .rodata or whatnot
<geist>
Anyway, brb
<heat>
lld doesn't like this
<heat>
ld.lld: error: section type mismatch for .symtab
<heat>
>>> <internal>:(.symtab): SHT_SYMTAB
<heat>
>>> output section .rodata: SHT_PROGBITS
<heat>
fwiw -rdynamic creates a got, plt and leaves some relocs
<heat>
(in my case)
<heat>
--export-dynamic has the same result
vdamewood has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
heat_ has joined #osdev
heat has quit [Ping timeout: 246 seconds]
<geist>
yah i ended up with --export-dynamic and --no-dynamic-linker
<geist>
that's sufficient on BFD at least do get the job done
poisone has joined #osdev
lg has quit [Ping timeout: 256 seconds]
lg has joined #osdev
poisone has quit [Read error: Connection reset by peer]
vinleod has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
<geist>
omg my brain just exploded
<geist>
i just now discovered that 'curl' is short for 'cat url'
* geist
mind blown
<kazinsal>
:O
silverwhitefish has joined #osdev
<mjg>
:d
<mjg>
makes sense now that you mention it
<mjg>
wget would be web get then?
<geist>
yeah probably
<mjg>
geist: ok mofo, what does 'dd' stand for
<geist>
i always assumed it was disk... something
<mjg>
that would be convert and copy
<geist>
disk direct or whatnot
<mjg>
except cc was alreadyy taken
<mjg>
for real
<geist>
no way. heh
<mjg>
great interview question!
<geist>
i was just reading the help files on sdf.org and they were mentioning curl being this, etc
gorgonical has quit [Remote host closed the connection]
poisone has joined #osdev
<moon-child>
so can wget not POST things?
<mjg>
should you ask that about curl
<moon-child>
hmmm, no
<moon-child>
because I can say cat x | cat > y
silverwhitefish has quit [Quit: One for all, all for One (2 Corinthians 5)]
zaquest has quit [Remote host closed the connection]
<mjg>
but | is a file bro
<moon-child>
Everything is a file!*
<mjg>
* except stuff which is not
<moon-child>
* Terms and conditions may apply. If you or a family member has been affected by ioctl(2), you may be entitled to compensation.
<mjg>
class action against ioctl inventors would be glorious
<mjg>
i don't know if 'invented' is even the right word
<mjg>
defecated? to borrow from yesterday
<moon-child>
lol
<geist>
OMG ONG OMG ASODNG GNAG DAFG DFGSDFG SDFG NEW RUST
ZombieChicken has quit [Remote host closed the connection]
hmmmm has quit [Ping timeout: 256 seconds]
<geist>
hrm, this is annoying. so opensbi 1.1 (in qemu 7.2) on qemu-virt machines now reserves the first 512KB of ram by marking it unavailable in the PMP
<Mutabah>
geist: That seems... excessively enthusiastic
<geist>
okat, that's fine *except* there seems to be no real way to know this
<geist>
it's not described in the device tree or anything, you have to seemingly Just Know not to touch that memory
heat_ has quit [Ping timeout: 252 seconds]
<geist>
ah hah i think there is one, under /reserved_memory/mmode_resv@<address>
wootehfoot has joined #osdev
sdhsdsj_ has joined #osdev
<geist>
so according to linux docs basically any sub node under /reserved-memory is a list of regions, each with its own base/length
<geist>
the name is not important, or at least doesn't affect the fact that it's reserved. acts as a name that maybe the OS cares about. makes sense
<ddevault>
wut
<ddevault>
why does EFI's GetMemoryMap return a descriptor size of 48
<ddevault>
it's 40 bytes
<geist>
maybe it's rounded up for some reason
<ddevault>
it's an array ;_;
<ddevault>
I can't just magically make my code index members as if the type size were +8
<ddevault>
ah on further reading of the EFI spec it seems this bullshit has been officially placed on my plate and the EFI services are allowed to do this
poisone has quit [Read error: Connection reset by peer]
<Mutabah>
ddevault: If there's an entry size, expect it to be bigger (or even smaller) than your expectations
<ddevault>
aye
fwg has joined #osdev
poisone has joined #osdev
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
<ddevault>
I'm trying to understand translation regimes on aarch64
<ddevault>
there's secure and non-secure and different regimes for different exception levels
<ddevault>
but I suspect there's only one regime that matters at an early stage of aarch64 kernel development
<ddevault>
geist: any tips on what that might be?
<ddevault>
guessing it's the "non-secure EL1&0 translation regime"
<j`ey>
EL1&0
<j`ey>
yes
<ddevault>
and I'm also guessing I can just ignore stage 2 translations
<j`ey>
yeah
<ddevault>
cool
poisone has quit [Read error: Connection reset by peer]
<ddevault>
not sure why people talk about aarch64 as if it's simpler than x86_64 -_-
<ddevault>
it's certainly easier as I slowly understand all of the parts I can ignore, though
<zid>
aarch64 always struct me as the bits you need to do are more complex
<kazinsal>
aarch64 has the advantage of originally being much more of a clean break from arm32 than x86_64 was from x86
<zid>
the EL stuff and PT stuff especially
<ddevault>
I think the main source of complexity is that aarch64 supports a mind-bogglingly diverse range of use-cases
<kazinsal>
the big issue is that was a decade ago so aarch64 has also accrued a decade's worth of continuous development
<kazinsal>
I have similar concerns about risc-v 10 years on
<ddevault>
well at least we're getting in at the ground level on risc-v
<ddevault>
so we can read all of the simple manuals now and implement our kernels and then backwards compatibility our way into the future
<zid>
when risc-v r4300i
<kazinsal>
I was kind of hoping we'd see real world production levels of rv64i based boards by now
<ddevault>
sanity check my early MAIR plans: attr0 is "normal"; inner/outer write-back non-transient, write-allocate, read-allocate; attr1 is nGnRnE
<kazinsal>
in the realm of networking appliance boards we still only have janky small run x86 boards and at the larger scales x86 boards that were originally designed for massive OEM runs that eventually got overproduced and trickled down into the whitebox realm
poisone has joined #osdev
<j`ey>
ddevault: sounds good
<ddevault>
ty j`ey
<kazinsal>
I just poked at the Juniper sales tool and the base hardware for an SRX4100 is $31000. the platform it's based on is $5000 at "retail" prices
<kazinsal>
if you've ever wondered why network hardware has an 80% discount for not-for-resale pricing and even base distributor pricing is heavily discounted from list prices, this is why
<kazinsal>
there's unfortunately no risc-v equivalent at the hobbyist end though
poisone has quit [Remote host closed the connection]
<ddevault>
ayy I have successfully installed my page tables
<bslsk05>
github.com: raspi3-tutorial/mmu.c at master · bztsrc/raspi3-tutorial · GitHub
<ddevault>
though I am cross-referencing the manual and trying to grok it as much as I can
_poisond has quit [Read error: Connection reset by peer]
<j`ey>
(i * 0x40000000)
<j`ey>
line 70, what's that?
<ddevault>
the physical address for each mapping
<ddevault>
in the identity map
<j`ey>
oh sorry, i was reading the thing above, youre just doing a block mapping
<j`ey>
i thought that was trying to do page mapping
<ddevault>
nah, just 1 GiB identity mappings
_poisond has joined #osdev
<ddevault>
gotta go, will tackle this problem later
<ddevault>
pushed what I've got if anyone else wants to study it some more
<j`ey>
can't spot whats wrong rn
wootehfoot has quit [Ping timeout: 252 seconds]
_poisond has quit [Read error: Connection reset by peer]
sdhsdsj_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heat has joined #osdev
<zid>
heat why is your cloak sortix and not boros
<sortie>
It's part of a witness relocation program where we hide them in plain side as Sortix developers
<zid>
ahh
<heat>
why is my cloak sortix: because I contributed a bit a long time ago and never removed it
<sortie>
heat has been credited for many features
<zid>
are they like pokemon and you can collect them
<heat>
why is my cloak not boros: because you're bad and poopy and do not have a cloak
<zid>
or do you have to ask a server admin to change it
<sortie>
zid, actually it was me asking a server admin to give it to heat
<heat>
you need to ask an admin yeah
<sortie>
zid, don't make me give you a cloak too
<zid>
I should ask one to give sortie a boros cloak then
<zid>
scam
* sortie
has no idea what boros is
<heat>
his OS
<zid>
'os'
<heat>
baremetal gameboy emulator
<zid>
My.. elf that happens to run in kernel space
<zid>
and comes with a companion elf that is entirely unrelated, which is a gameboy emulator
<sortie>
s/space/santa/z
<zid>
My.. elf that happens to run in kernel santa
<heat>
how do I get a cloak
<heat>
I want an OpenBSD cloak
<heat>
openbsd/bdfl/deraadt
<heat>
real talk though it does feel silly to still have a sortix cloak after all this time of not actively contributing to the project modulo some code review comments
<sortie>
heat, up to you
<sortie>
You have provided some value and it's not like I got that many contributors so the criteria is pretty easy to meet :)
<sortie>
You can always join and contribute some more code when you feel in a "static void" mood instead of all the screaming
<zid>
I am always in a static void mood
<heat>
yeah it's just that I really don't have much time to contribute to hobby OSes, with my full time part time project being my OS and then the part time part time project which is STATIC VOID (and makes me go bald)
<sortie>
Let yourself be subsumed
<heat>
i'm also owing mjg a freebsd patch i need to finish up
<heat>
yes, a BSD, I know, I'm stooping so low
<kaichiuchi>
hi
<heat>
bazinga<>
<kaichiuchi>
bazinga!
<kaichiuchi>
did I mention I hate C++ yet
<kaichiuchi>
well I hate C++
<heat>
but you loved C++ :/
<kaichiuchi>
also I wonder if people actually use RTTI/exceptions in the real world
<heat>
yes
<kaichiuchi>
RTTI sounds like "my design is really shit"
<heat>
i linked you to a codebase where even dtors can throw
<kaichiuchi>
oh
<kaichiuchi>
well that's disgusting
<zid>
The better you are at C++ the less of the difference between n1256 and C++ you use
<zid>
true fact
<kaichiuchi>
so far, I have a few restrictions I've placed upon myself: no RTTI/exceptions/dynamic dispatch
<kaichiuchi>
or dynamic memory allocation
<zid>
still on the table: Writing the entire project into a single header file
<kaichiuchi>
no
<kaichiuchi>
heat: fun fact, the class template shaved 2 seconds off of the unit test time
isaacwoods has joined #osdev
[itchyjunk] has joined #osdev
wootehfoot has joined #osdev
poisone has joined #osdev
ss4 has joined #osdev
ss4 has quit [Remote host closed the connection]
wootehfoot has quit [Ping timeout: 268 seconds]
poisone has quit [Read error: Connection reset by peer]
<bslsk05>
en.wikipedia.org: Fallacies of distributed computing - Wikipedia
poisone has joined #osdev
<epony>
plan9 leans on files too much, and so does leanucks
xenos1984 has joined #osdev
<heat>
kaichiuchi, ah cool!
FreeFull has joined #osdev
FreeFull has quit [Client Quit]
FreeFull has joined #osdev
Vercas0 has joined #osdev
Vercas has quit [Remote host closed the connection]
Vercas0 is now known as Vercas
[itchyjunk] has quit [Read error: Connection reset by peer]
<bnchs>
rn i'm reverse engineering an OS
nyah has joined #osdev
Burgundy has joined #osdev
<sortie>
noooo you'll undo years of engineering
<bnchs>
i wish i could do that to windows
<bnchs>
would save people's time trying to make that horrible OS lol
<heat>
windows is a good OS
<bnchs>
whatever
<bnchs>
anyway i'm reverse engineering an OS for this emulator
<mrvn>
heat: which windows?
<heat>
recent ones
<bnchs>
hahahahaha
<bnchs>
.... wait, you're not joking?
<kaichiuchi>
windows 11 isn't god awful for me
<kaichiuchi>
though I wish I could disable a lot of the bullshit nagware security BULLSHIT
<bnchs>
never used windows 11
<bnchs>
but i saw how shit windows 10 was
<bnchs>
ran like fucking dogshit in this laptop
<bnchs>
despite everything i've done
<bnchs>
and this isn't a PC from 2005, this is a laptop that has intel core i5 and 4 GB of ram
<kaichiuchi>
4GB isn't much these days
<kaichiuchi>
I would probably go as far to say 16GB should be the "new minimum"
<bnchs>
well it's pretty good for my case
<bnchs>
where i'm not a gamer
<kaichiuchi>
even if you aren't a gamer, web browsers use a lot of RAM
<bnchs>
well i don't browse modern websites
<kaichiuchi>
uh
<kaichiuchi>
well, okay
<bnchs>
if i see a website with 100 MB of JS, i'm not clicking on that
<kaichiuchi>
that's everything
<bnchs>
not everything
<bnchs>
you've probably only seen youtube or github
<bnchs>
and all the other big tech websites
<kaichiuchi>
I can promise you there's about a gallon of JS in just about everything that the vast majority of people use
<bnchs>
i'm using invidious
<kaichiuchi>
do I think that's okay? no
<bnchs>
with no javascript
<bnchs>
kaichiuchi: yeah
<kaichiuchi>
i just... use youtube
<bnchs>
i don't support bloated websites
<GeDaMo>
I use mpv for watching Youtube
<kaichiuchi>
I think you're going to be really disappointed when you realize the majority of the planet is running on poorly written software
<heat>
windows is a solid operating system built by very skilled people
<bnchs>
kaichiuchi: i don't care
<heat>
the nt kernel is very nice
<bnchs>
people can run whatever they want
<kaichiuchi>
i mean yeah
<kaichiuchi>
you do what you want
<bnchs>
and rn my ram usage is like 24%
<kaichiuchi>
understand that I fully agree that RAM usage is a problem
<bnchs>
yeah i do
poisone has quit [Read error: Connection reset by peer]
<heat>
web browsers are very complex as web browsing is a very complex problem to solve
<bnchs>
though i like to use netsurf and mpv
<kaichiuchi>
right now I have safari open (with just irc cloud), discord, Mail.app
<kaichiuchi>
and I'm sitting at 9.5GB in RAM usage
<bnchs>
developers got too comfortable with too much memory
<bnchs>
even i choose to not use too much memory
<heat>
i'm on 5GB used with firefox and 3 electrons open
<kaichiuchi>
jetbrains toolbox which doesn't really actually do much is just sitting at 400MB
<bnchs>
880 MB used with ghidra, irssi, mpv
<GeDaMo>
I have Firefox, Thunderbird, Pidgin, Audacious and a couple of terminals open, just under 2G
<kaichiuchi>
that's all well and good
<kaichiuchi>
but what's your swap space usage looking like
<bnchs>
barely used
<bnchs>
like 1%
<kaichiuchi>
heh
<heat>
GeDaMo, I can't get fucking firefox to behave
<kaichiuchi>
see, I don't disagree in that memory usage has gone out of control
<bnchs>
anyway i want y'all to check out my shit code
<bnchs>
and make fun of me
<kaichiuchi>
there's a lot of things I agree with you on
<heat>
windows 11 works pretty well for me, windows 10 worked pretty well for me, 8.1 worked well, 8 was not the best, 7 worked well, vista was shitty, xp was the GOAT
<kaichiuchi>
yeah XP was mostly great
<GeDaMo>
I use Noscript and uBlock Origin on most sites
<heat>
xp was great but also because it was kinda shitty
<kaichiuchi>
i use ublock origin
<kaichiuchi>
can't live without it
<heat>
vista was an important step forwards but broke a lot of stuff
<kaichiuchi>
honestly, I would've been fine with windows 2000
<heat>
8/8.1 were also good steps forwards but in ways that people weren't too receptive about
<jimbzy>
2K was pretty sweet.
<jimbzy>
I liked XP, too.
<kaichiuchi>
you see, I like fucking with retro stuff because people had to write software under serious constraints
<kaichiuchi>
and *that* is interesting
<bnchs>
true
<jimbzy>
Retro games are full of sorcery like that.
<kaichiuchi>
solving problems with what we'd call the absolute shittiest hardware
<bnchs>
maybe embedded development is for you :)
<kaichiuchi>
but to them it was high-end
<kaichiuchi>
bnchs: i'm an embedded developer
<bnchs>
oh
<kaichiuchi>
why do you think I didn't disagree with you
<kaichiuchi>
:p
<bnchs>
same, kinda
<kaichiuchi>
motherfuckingwebsite is a nice example of what you mean
<heat>
much of the retro stuff was very half-assed
<heat>
like all of UNIX
<kaichiuchi>
nevertheless
<kaichiuchi>
problems were solved
<heat>
and problems today are solved, in better ways
<kaichiuchi>
no doubt
<heat>
gcc is 1000000000x better than old cc(1)
<bnchs>
true
<kaichiuchi>
I am not at all saying we should for example use a compiler from the 80s
<heat>
is it interesting to fuck with? yeah sure
<heat>
should you yearn for the sweet embrace of 1980s UNIX? fuck no
<kaichiuchi>
no
<kaichiuchi>
again
<jimbzy>
Yeah, but you know Borland Turbo C was pretty fucking awesome.
<kaichiuchi>
the whole point is "solving problems efficiently under serious hardware constraints"
<heat>
that depends on what you call a serious hardware constraint
<heat>
constraints are just relative
<bnchs>
sometimes you gotta make software for a cheap ass hardware
<bnchs>
like a calculator
<GeDaMo>
I remember reading that the original Turbo Pascal used a neat trick for linking: it copied the first part of the IDE which contained the standard library onto the beginning of the generated executable
<heat>
making a calculator for a calculator is much like solving a big ass problem on a big ass machine
<heat>
it's just that the scale differs
<bnchs>
calculators have small stack and memory
<bnchs>
and just enough registers
<kaichiuchi>
I think what I'm getting at is programmers often don't think about hardware anymore
<kaichiuchi>
and that's disgusting
<heat>
your big ass machine's big ass memory will look tiny compared to your big ass problem
<bnchs>
you have to find a way to display stuff
<bnchs>
heat: you're not gonna cram in a fucking threadripper and 128 GB of ram
<bnchs>
that would be the most expensive calculator to manufactor
<heat>
that's not my point
<heat>
<heat> constraints are just relative
<kaichiuchi>
for my gameboy emulator, without any die hard crazy serious optimizations it probably has no hope of running on my eval board, nor my packard bell
<bnchs>
also these calculators have like slow clock speeds
<bnchs>
1.5 MHz at the most
ephemer0l has quit [Ping timeout: 268 seconds]
<kaichiuchi>
to play devil's advocate, I think what heat is trying to get across is "constraints are only relative to the problem at hand"
<kaichiuchi>
there are certain problems, no matter how hard you try, or how well optimized, that *cannot* be done efficiently on weak hardware
<heat>
absolutely
<bnchs>
yes
poisone has joined #osdev
<heat>
4.4BSD cc(1) could run on a VAX right?
<bnchs>
that makes sense
<kaichiuchi>
you can't play elden ring on a 486, for example
<kaichiuchi>
just not going to happen
<kaichiuchi>
ever
<heat>
your CPU is 100000000x faster than a VAX but your gcc(1) doesn't run 100000000x faster because it also does 5000000x more stuff
<kaichiuchi>
I think "as efficient as it can get" is better to say in terms of retro stuff
<heat>
disregarding large software that does things at scale is just plain wrong
<poisone>
kaichiuchi ram usage is not problem if you install 16gb for play/web or 32gb for coding
<jimbzy>
That's interesting, especially when it comes to old console software, like the NES/GB/etc.
<heat>
web browsers use up a lot of resources but web browsers also do every fucking thing
<poisone>
this is not an issue this was fixed 10 years ago
<bnchs>
32gb for coding?
<poisone>
yes virtual machines ide's
<poisone>
tons of tabs
<heat>
e c l i p s e
<bnchs>
jesus christ, do you run ide's in VMs?
<kaichiuchi>
heat: I think the problem on the web browser front is exactly that, they do too much
<poisone>
stfuu
<heat>
kaichiuchi, they do too much because they serve the user and not the programmer, perhaps in an extreme way
<poisone>
no i've run phpstorm+vagrant+edge for developing sites. but i've run some another programs
<jimbzy>
I imagine it was written with performance in mind rather than maintainability, so I'd say it was probably as efficient as it could be.
<kaichiuchi>
undoubtedly, yes
<kaichiuchi>
back in those days they were also fighting compilers when optimizations were still kinda in their infancy
<heat>
a web browser tries to have like infinite backwards compat, but it also tries to be as fast as possible, support as many interactive features as users want, etc
<poisone>
try edge
<poisone>
ms do big work
<jimbzy>
That's impressive, too, because it had to work correctly because there was no over-the-air patching going to happen :p
<bnchs>
edge is chromium with a m$ skin
<mrvn>
poisone: 16GB? That's a rounding error
<heat>
omg m$
<poisone>
it's speed is fast, dev features is super
<kaichiuchi>
that's why I kind of wish I was my age now, 20 years ago
<jimbzy>
I'm going to ask my SEGA dev buddy about that when I see him.
<kaichiuchi>
I would've been a much better programmer
<heat>
kaichiuchi, lie
<kaichiuchi>
nonsense my friend
<bnchs>
bro all i know is m68k assembly and C
<heat>
do you want really bad 20 year old code? it's most of it
<mrvn>
kaichiuchi: I wish I was the age I was 20 years ago now.
<jimbzy>
Go check out some of id's stuff
<jimbzy>
Pretty funky.
<heat>
the way you write C in 2022 is miles better than the way you wrote C 20 years ago
<poisone>
yes, windows until xp is at very bad coding level
<kaichiuchi>
mrvn: yes i'm old
<kaichiuchi>
well not really old
<poisone>
but we're do not have alternatives for home pc
<mrvn>
kaichiuchi: me too
<kaichiuchi>
but getting there
<kaichiuchi>
heat: hey I'm not saying K&R C was hot
<kaichiuchi>
I'm saying that you had to _really_ think about the hardware and pumping out every last drop of performance you possibly could
<jimbzy>
C with classes was pretty hot.
<mrvn>
heat: 20 years ago was C99. The distance to "modern" C is shrinking.
<heat>
I am aware of what 20 years ago is
<kaichiuchi>
20 years ago, I was 8
<heat>
still lots of shit software
<mrvn>
just saying C hasn't changed that much.
<heat>
the way you write it has
<jimbzy>
20 years ago, I was hanging out in #osdev
<jimbzy>
XD
<kaichiuchi>
I think what really pisses me off is everyone is living in a land where they think they don't have to care about performance
<heat>
i have a perfect snippet for my point
<bnchs>
kaichiuchi: would you like rust?
<bnchs>
with all their hidden memory allocations? :)
<kaichiuchi>
I don't think I like Rust too much
<poisone>
me?
<kaichiuchi>
well, I'm going through a similar thing right now with my gameboy emulator
<bslsk05>
github.com: freebsd-src/random.c at releng/4.4 · freebsd/freebsd-src · GitHub
<bnchs>
well that's why i don't write in C++
<kaichiuchi>
I'm not using the STL, because I _cannot_
<heat>
ah yes, the hidden memory allocation that you yourself hide in functions
<bnchs>
memory allocations you can't control, caused by the stdlib
<heat>
yeah
<heat>
what do you think the libc uses, paper sheets?
<bnchs>
you don't understand
<heat>
i do understand
<heat>
every standard library allocates memory
<poisone>
no you noy
<bnchs>
yes
<poisone>
ah SHIT
* poisone
is not sexaully today anymore
<zid>
I'm back, and confused
<jimbzy>
The first time I really started looking into how libc works it made me sick to my stomach.
<heat>
what's your suggestion? abandon standard libraries?
<jimbzy>
I still have nightmares about printf()
<zid>
is this a new one or an existing one with a name change
<kaichiuchi>
jimbzy: writing in C++ without the STL is revealing a lot of things the STL has to do to hide away a lot of the crud C++ actually is
<heat>
zid, i am not sure
<kaichiuchi>
and then praying to god the compiler doesn't completely fuck it all up
<heat>
dude
SGautam has joined #osdev
<jimbzy>
STL is what makes C++ worth using imho.
<zid>
Well yea, otherwise it's just C with broken i/o :P
<bnchs>
heat: i mean shit like the only way to use dynamically allocated memory
<bnchs>
vectors
<zid>
Imagine seriously using iostream
<jimbzy>
zid, zactly.
<bnchs>
you can't allocate in rust without it being "unsafe"
<kaichiuchi>
the problem is the STL is inefficient for anything where performance is concerned
<kaichiuchi>
std::unordered_map is slow
<kaichiuchi>
std::map is slow
<heat>
if what the standard library does was done by the language itself people would be saying C++ is shit because it's not low-level enough
<heat>
reality IS cud
<epony>
the term "safe" is speculative
<heat>
crud*
<bnchs>
seen people use std::map for dynarec
<zid>
yea but you can use templates everywhere and maybe the unordered_map code you used to solve advent of code will compile away to nothing
<kaichiuchi>
yeah, maybe.
<zid>
(key word being maybe)
<poisone>
create tape update then delete
<poisone>
*rape
<heat>
you can't abstract your little function pointers with "this" everywhere into the language because "boohoo, not low level enough, where muh C for real men who write real programs"
<poisone>
fucking human пальцы
<poisone>
fingers
<zid>
heat: I wrote a real program once, cannot recommend
<kaichiuchi>
there are a lot of features from C++ that would be useful in C
<zid>
did anybody ping geist or should I do it
<heat>
sortie, hello sortman, people with bad language
<kaichiuchi>
you just did
<epony>
nothing is safe if another process / subroutine / procedure can hijack your computation because you fail to isolate data and instructions
<sortie>
heat, 5-0
<zid>
nah I need to do @geist#1283 everybody knows that
<heat>
@sortie
<zid>
#hashtaggeist
<bnchs>
nah i need to do <@!230809283089238029098> everybody knows that
<heat>
@everyone where we goin out for dinner
<zid>
heat: getting kebab
<sortie>
This is your final warning
<zid>
sister's over for pre-christmas christmas
<sortie>
This is not twitter despite the hashtags
<zid>
to exchange gifts
<sortie>
You @ me bro?
<zid>
she's doing christmas christmas elsewhere
<heat>
"pre-christmas christmas"
<heat>
sounds like hell
<kaichiuchi>
anyway
<kaichiuchi>
when I get home from sushi
<zid>
nah it's pretty chill
<kaichiuchi>
I'm going to hook up my packard bell
<j`ey>
bnchs: btw you can allocate in rust w/o unsafe
<kaichiuchi>
which has been sitting at 1.6C
<zid>
j`ey: what happens if it fails?
<bnchs>
j`ey: holy shit tell me now
<j`ey>
Box::new()
<heat>
kaichiuchi, btw you can't say "people don't care about performance" and then ask for higher-level features
<heat>
that itself always abandons performance ever so slightly
<kaichiuchi>
absolutely I can
<bnchs>
..... i meant a list
<j`ey>
zid: abort, but there's new APIs for that
<zid>
I don't need bleeding edge performance, but I'd like to be able to write a thing and debug a thing
<zid>
j`ey: I'd say abort was unsafe, our definitions differ I guess
<bnchs>
an array of structs
<j`ey>
zid: not rust's 'unsafe'
<zid>
yea
<zid>
to me that's not what I want out of an `unsafe`
<zid>
for me I want "this won't crash"
<j`ey>
bnchs: ok, well.... that wasnt obvuious
<SGautam>
What's a good resource for learning parallel computing?
<zid>
SGautam: two computers
<SGautam>
Asking on #osdev coz you guys are into low level stuff too
<SGautam>
:D
<heat>
lol
<SGautam>
lol
<bnchs>
2 CPUs on the same board
<SGautam>
I mean, stuff like OpenCL
<zid>
nobody can afford that
<heat>
no one learns opencl, use cuda
<SGautam>
hmm
<bnchs>
cuda's proprietary, use opencl
<zid>
yea just follow a cuda tutorial if you wanna learn cuda
<kaichiuchi>
heat: out of curiosity, how old are you
<SGautam>
But isn't OpenCL universal?
<heat>
kaichiuchi, 20
<epony>
lies
<zid>
nobody uses cuda though, use opencl, then port it back to cuda for when you actually wanna run it
<bnchs>
SGautam: yes
<kaichiuchi>
jesus
<kaichiuchi>
i'm old
<zid>
cus you'll be running it on an nvidia card
Vercas has quit [Remote host closed the connection]
<SGautam>
While CUDA is NVIDIA specific
<SGautam>
oh well
<heat>
kaichiuchi, you said you're 28 right?
<kaichiuchi>
yes
<zid>
this is like opengl vs directx
<heat>
that's not much older than me
<zid>
you "should" use opengl, but you will just use directx in practice
<kaichiuchi>
if you round it up i'm 30
<bnchs>
opengl anyday everyday
<zid>
You're both babies
<mrvn>
zid: vulcan to the rescue
<epony>
it is an entire elementary and middle school more
<zid>
I'm pulling age-rank here
<heat>
SGautam, CUDA is the only one that's used because AMD and Intel suck at GPU computing
<GeDaMo>
Damned kids! :P
<heat>
OpenCL is the "generic" but also the bad, unused one
<zid>
GeDaMo is my babydaddy does that count for anything
<bnchs>
zid: what does he do to you
<heat>
it's like opengl - most opengl impls suck because no one uses opengl, everyone uses direct3D or vulkan
<zid>
I said that already heat
<zid>
get with the program
<epony>
depends on your counter register width
<bnchs>
heat: opengl is widely used though
<heat>
opengl also has high amounts of bad interfaces and cruft
<zid>
'widely' used by about 2 games, and a couple of cad packages
<bnchs>
wtf are you talking about
<heat>
yes... widely used in.... linux?
<heat>
oh wait, sorry, opengl is used in linux, freebsd, netbsd, openbsd, dragonfly bsd
<SGautam>
Isn't OpenGL entirely replaced by Vulkan now?
<bnchs>
yes
<heat>
also red hat linux, debian linux, arch linux, alpine linux, ubuntu linux
<zid>
gentoo with the desktop profile
<bnchs>
SGautam: if it was, my GPU would have supported it
<bnchs>
but no
<zid>
gentoo with the server profile
<zid>
gentoo with the desktop profile with selinux enabled
<epony>
^ if this can be classified as talk, pidgeons could be sorting your google matrices now
<epony>
stream pigeons vs shared pigeons
<zid>
heat: do you have lebkuchen?
<heat>
nein
<zid>
fix your life
<bnchs>
9
<kaichiuchi>
i had some german cookies yesterday
<epony>
"shader"
<kaichiuchi>
my american self was humbled
<SGautam>
Fr tho, is OpenGL still a marketable skill?
<bnchs>
SGautam: yes
<epony>
no
<heat>
no
dude12312414 has joined #osdev
<heat>
never was
<epony>
was
<zid>
Yea but they'll make you write dx not gl
<heat>
who are you selling yourself to? the elusive linux game maker?
<SGautam>
this is depressing
<epony>
before DX became the dominant alt-reality video programming language
<epony>
(it didn't)
<heat>
vulkan is actually valuable at least
<zid>
glsl is cool though
<GeDaMo>
Better to understand the basic concepts then translate to whatever API you need
<epony>
GL is usable
<bnchs>
epony: yes
<epony>
the other trendy acronyms are faek
<bnchs>
i can't even use vulkan
<zid>
GeDaMo: which is why it's a hireable skill, but you will be told to write dx after you're hired
<SGautam>
DirectX and WinAPI generally suck ass and the code is difficult to read at least for me.
<zid>
it's the same shit with a different vaneer
dude12312414 has quit [Remote host closed the connection]
<bnchs>
also btw don't tell me to buy new computer
<zid>
why would you need a new computer, yours is probably newer than mine
<bnchs>
how old is yours
<zid>
just get a dedicated gpu
<GeDaMo>
And mine
<epony>
we'll buy one for heat, it will be a 22 year old Sun worksation
<zid>
2011
<GeDaMo>
2009
<bnchs>
okay i remain corrected
<kaichiuchi>
my PC is 3 years old
<epony>
everyone chip in 5 cents
<bnchs>
2012
<kaichiuchi>
but that's because I care about the latest and hip thing
<bnchs>
kaichiuchi: obvious for an apple user
<zid>
mine is actually mostly from 2012, but it's on socket 2011 so I am counting it as 2011
<kaichiuchi>
bnchs: i've only owned 2 apple laptops in my life
<bnchs>
oh
<epony>
socket 2001 when?
<heat>
SGautam, d3d is not that bad
<zid>
modern dx and modern gl are basically the same thing anyway
<epony>
remember slot 1
<kaichiuchi>
the 1st one I bought in 2011, and I waited until it was completely unsupported by apple (i.e. no further OS support) before buying this one
<kaichiuchi>
so...
<heat>
you can get around using the WinAPI through the same way you would get around using the X11 API
<bslsk05>
en.wikipedia.org: British invasion of Iceland - Wikipedia
<heat>
simple 'as
<gog>
yes
<epony>
the financial system is toast
<sham1>
Yeah, I can guess what the letters are pronounced as, but still. How very archaic
<FireFly>
I still think it has some absurdly silly elements to it
<FireFly>
'Uncomfortable with the crowd [near the foreign destroyer], Consul Shepherd turned to the Icelandic police. "Would you mind ... getting the crowd to stand back a bit, so that the soldiers can get off the destroyer?" he asked. "Certainly," came the reply.[39]'
<zid>
gog: At least we have trees, suck it
<gog>
:(
<zid>
maybe gog's just afraid of trees
<zid>
staying in iceland in case they see one in another country
<epony>
btw beware Japan is releasing the Fukushima water radiation basins and English imports of fish from Japan are "all open" for the event (seell e-bration come-on!)