<Cindy>
nikolapdp: what do you think about a function callback that gets called everytime an instruction gets decoded
<Cindy>
with the decoded instruction structure
<Cindy>
and then whenever the CPU will access code from a block, it will call another function that gives it the decoded instructions for that block
<Cindy>
or none
m3a has quit [Ping timeout: 260 seconds]
m3a has joined #osdev
<nikolapdp>
Cindy that sounds slow
<nikolapdp>
indirect calls are just slow
<Cindy>
nikolapdp: well, how can i handle it?
<zid>
interps are odd, they're slow no matter what you do, so do you really care? or is it because they're slow you should try to shave cycles on dispatch?
<Cindy>
i mean
<Cindy>
i want to make a cached interpreter
<zid>
nikolar: a student is reading a text in class and starts off “Goethe was a great poet” whereupon the teacher interrupts him and says “oe is pronounced as ö”. The kid starts again and says ”Göte was a great pöt”
<nikolapdp>
lol
<Cindy>
gote was a great pot
<FireFly>
Goatpot the great, gotcha
gog has quit [Remote host closed the connection]
gog has joined #osdev
goliath has quit [Quit: SIGSEGV]
Fingel has joined #osdev
gog has quit [Remote host closed the connection]
heat has joined #osdev
<heat>
pitust: some benchmarks i saw had it rip through their AMD free tier offering
<bslsk05>
news.ycombinator.com: Oracle Database 12.2. It is close to 25 million lines of C code. What an unimagi... | Hacker News
<Ermine>
On the one hand, hackernews isn't trustworthy
<heat>
the testing situation is not so different from linux's
<heat>
as-is the case with all complex software
<zid>
heat: Can't come soon enough
<Ermine>
On the other hand, oracle is old, clumsy and bureucracy-ridden, so it's unsurprising
<zid>
I like how I agree with everything that guy says, and come away with the exact opposite conclusion, GeDaMo
<zid>
"it requires you to understand the code before you can modify it, the horror!"
linearcannon has joined #osdev
<zid>
"You need to submit changes *after* they are tested!"
<Ermine>
Onyx tests are much faster!
<heat>
well yes because they're very basic and fucking suck
<Ermine>
They suck, but how fast!
<heat>
the testing intel does on individual linux patches goes something like: run selftests (but you as the dev should've run that already, if relevant), run tens of different stress jobs on the patch
<heat>
and i'm not sure if they run xfstests which is its own suite of 500 or so filesystem unit tests for common problems and regressions
<zid>
throw it into -next for 5 months, ship silicon that actually uses the feature in 4 years
<zid>
bugfix the immediate issues with reality not matching the spec hopefully before customers get them
<heat>
no, this is testing intel does as CI, for free, for random patches
linear_cannon has quit [Ping timeout: 240 seconds]
<zid>
fail
<zid>
write it down as errata
<Ermine>
anyway, I sould my soul to open source games
<Ermine>
xonotic is not too bad
<heat>
they also build your patch in tons of different configurations to make sure it's not slightly borked on like s390 randconfig when CONFIG_DRM=y but not =m
<heat>
you should sould your soul to me
<heat>
i am a trustworthy individual with vast soul-managing skills
<zid>
heat only uses blood magic, don't believe him
<zid>
he doesn't want to fix your soul he wants to use it in a ritual to summon the dark lord
<Ermine>
you know that part of my soul is yours already
<zid>
do you think nikolapdp is home yet
bauen1 has joined #osdev
zetef has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 256 seconds]
gog has joined #osdev
xenos1984 has joined #osdev
masoudd has quit [Ping timeout: 256 seconds]
<zid>
balatro is being mean still, won't give me my final joker
<zid>
I'll give it another 4 or 5 hundred attempts
Cindy has quit [Ping timeout: 268 seconds]
Cindy has joined #osdev
<zid>
remember to stare directly at the sun
<zid>
It is invigorating for your eyeballs
<Cindy>
yes
<Cindy>
stare at it
<Cindy>
remember to learn braille afterwards
<heat>
especially if you're looking at a solar eclipse
<Cindy>
reminds me
<Cindy>
I USE ECLIPSE
<heat>
i've been using intellij lately
<heat>
i don't regret it, beats eclipse up 10-0
<Cindy>
i use eclipse to write C
<Cindy>
and python
<heat>
yes which is BIZARRE
<Cindy>
not java
<heat>
why would ANYONE do that
<Cindy>
because it's a comfy editor
<Ermine>
intellij vs vscode
<Ermine>
fight!
<zid>
ncie mazatlán removed the solar filter
<Cindy>
it has support for meson and cmake
<heat>
i can get a better experience with clangd + vim
<Cindy>
wahtever
<Cindy>
i prefer eclipse
<zid>
heat you get to see the eclipse a little bit right?
<Ermine>
Literally everyone supports meson and cmake
<zid>
I'm too fast east
<zid>
far
<heat>
oh is there an eclipse coming?
<heat>
huh
<Ermine>
what about sublime text
<zid>
yea in like.. a couple minutes for you?
<heat>
is this a motherfucking java reference
<zid>
47 mins for ireland
<zid>
but I'm EAST OF ENGLAND so I won't see anyuthing
<zid>
You and gog can do a roadtrip + eclipse party
<heat>
yesssss
<heat>
i wanna go blind with gog
<heat>
then write java
<zid>
I have to wait until erm.. 2090
<zid>
when I am 100
<heat>
looking at the eclipse IDE actually gets you blind as well
<zid>
a month before my 101st birthday
<Cindy>
heat: eclipse dark mode
<Cindy>
i always used eclipse in dark mode
<Ermine>
I used debian for a while
<Ermine>
I wonder how I didn't get blind with those cringe fonts
<zid>
windows has super cringe font rendering
<zid>
I miss linux just for opentype
<heat>
we'll have a total eclipse in spain in 2027 too
<zid>
AA FONTS <3
<zid>
Fuck I love opentype, cleartype can suck a huge bag of dicks
voider has quit [Ping timeout: 256 seconds]
<zid>
I tried a janky freeware app that made GDI use opentype once, it sorta worked, but a lot of apps use like, GetFontMetrics or whatever and other crazy stuff and end up breaking
<zid>
like that classic cs1.6 wine bug
<zid>
that was the best thing
<zid>
heat do you know the cs1.6 wine bug
<heat>
no
<zid>
cs1.6 wouldn't run under wine for ages and nobody could figure out why because it was an application crash
<zid>
It was rendering the ingame chat to a fixed size texture, but the pirate/copyleft fonts on linux machines were slightly different
<zid>
so it'd draw outside the texture
* Ermine
tries out lapce
spareproject has quit [Remote host closed the connection]
<dzwdz>
was the out of bounds write in cs itself or in some api call that it made that expected a bigger buffer?
<dzwdz>
(also hi)
<zid>
memcpy from their freetype's output to the texture as far as I know
<zid>
Like, if you do opengl games you gotta link against gdi/freetype/opentype/etc then ask them to draw you some glyphs, then you copy them to a texture atlas or whatever
<zid>
then chop it into rectangles when you wanna render text
spareproject has joined #osdev
<dzwdz>
i'm just wondering why they thought hardcoding the font dimensions was better than getting them dynamically
<dzwdz>
that must've been more effort
<zid>
I mean yea, asking about font metrics and stuff is a waste of time
<zid>
if you know the font you're using
<zid>
extra code that exists only to slow it down
<dzwdz>
surely that's negligible though
<zid>
people love writing that shit
<dzwdz>
you only have to do it once
<zid>
what do you do if you get the 'wrong' answer though? bail? write a fully resizeable buffer implementation, etc?
<zid>
once per game
<dzwdz>
but i guess that makes sense
<zid>
thankfully the source engine uses a much cooler font rasterizer
<zid>
signed distance fields!
<heat>
might've just been harder to get the font's dimensions
<dzwdz>
wait, they're using them for the ui too?
<heat>
and the easy answer is "lol, this is M x N, cuz its THIS font"
rustyy has quit [Ping timeout: 260 seconds]
<zid>
idk about the ui actually, I think the ui is scaleform isn't it
<zid>
so flash handles all that part
<heat>
for go it is, might be for 1.6 too
<dzwdz>
heat: i mean since the memcpy overflowed they must've got the font dimensions anyways
<zid>
no?
<heat>
could've also been something like
<zid>
you tell it to render 'abcdef...' to a 1024x8 strip
<dzwdz>
i'm pretty sure go switched away from scaleform
<zid>
then memcpy 1024*8 bytes
<zid>
in source 2, yes
<zid>
I was talking source
<dzwdz>
no, way before source 2
<dzwdz>
2018ish?
<zid>
oh right
<heat>
unsigned char buffer[50000]; /* Surely enough to render a 9x16 font */
<dzwdz>
were they passing the buffer into the function for drawing glyphs and that was overflowing? or
<zid>
it wasn't render time, as in, engine rendering
<zid>
it was freetype/opentype rendering the glyphs to a box
<zid>
which then gets used as a texture on various rectangles every time you need an 'a' or a 'g'
<heat>
yeah might've just been unsigned char buffer[some size]; /* this is totes enough */
<heat>
just to avoid malloc or something
<heat>
cuz you're uploading it to a texture anyway
<zid>
I'm not sure whether it was internal, aka they told freetype too small a size, or if freetype just gives you an appropriately sized buffer and they did memcpy(fixed_size_texture, freetype_output, freetype_siz);
<chiselfuse>
but would this said BKDG be per cpu model?
<heat>
they stopped having BKDGs as soon as they had something to hide (read: stopped sucking)
<heat>
might be, dunno
<chiselfuse>
heat: what does stopping to suck have to do with having to hide something
<heat>
you don't want your competitors to get the leg up on you
autir has joined #osdev
<chiselfuse>
ah
<heat>
and they definitely might've licensed some technology they're not allowed to share anyway
<autir>
Hello
<heat>
hi
<gog>
hi
<chiselfuse>
hi
<kof673>
aloha
<autir>
What is an elegant way to discover if a specific machine supports a BIOS function call or not ?
<autir>
( x86 assembly real mode )
<childlikempress>
elegant?? hahahahaha
<gog>
you call it
<gog>
and then if it doesn't support it'll be uhhh
<gog>
i forget there will be a value in ax tho
<heat>
UwU oopsie, bios did a fucky wucky
<gog>
yes
<gog>
in es:di that value will be there and you'll need to test for it
<gog>
a pointer to that
rustyy has joined #osdev
<kof673>
this makes me think of the genie cartoon <system crash> because impossible to satisfy all the constraints simultaneously. some BIOSes may be better than others, just from ralf brown's interrupt list, the little i have seen, always lists of exceptions for different systems
<autir>
Well, I called an unsupported function in a machine and it rebooted. No good for the continuation of the process.
<kof673>
if it was elegant, > Ralf Brown is a well-known authority for maintaining both documented and undocumented BIOS interrupts, DOS interrupts, memory map and other system-oriented would not exist surely :)
<kof673>
yes, that is what i mean :)
zxrom has quit [Quit: Leaving]
<autir>
Yes, may that man live 1000 years
<kof673>
if i ever "finish" my "bootloader" i guess the idea is everything is in routines, so could hardcode safe ways to fail/etc. on specific hw if needed "Interceptor pattern"
<kof673>
or #define equivalents, etc. but then, how to detect specific hw with known problems
<Ermine>
heat: how do u use clangs with onyx
<heat>
download the clang build to <dir>, set CLANG_PATH=<path to dir>, do the normal make
<heat>
if you massage the compile_commands.json it might work
<heat>
like -D__onyx__ -U__linux__ at least
<gog>
you need to get it upstreamed into clang
<gog>
your target triple
<gog>
what are you waiting for
<heat>
(removing the --target)
<zid>
donyux
<zid>
d'onyx
<heat>
im not a big company :(
spareproject has quit [Remote host closed the connection]
<gog>
l'onyx
<Ermine>
Found Onyx Co. Ltd.
<Ermine>
Hire me
<gog>
hire me too
<sham1>
hire me three
<gog>
i can porgam
<Ermine>
You'll be transnational
<gog>
i already am
<heat>
hehe
<heat>
hehehe
<heat>
hehe
<sham1>
héhé
<heat>
🏳️⚧️🏳️⚧️🏳️⚧️🏳️⚧️🏳️⚧️🏳️⚧️🏳️⚧️🏳️⚧️
<gog>
yes i am from that country
<heat>
transnistria
<heat>
is your favourite road Transfăgărășan
<gog>
hey hey whoa
<heat>
sorry, Trans***ărășan
<gog>
thank you
<Ermine>
look, some kiddo was dreaming of founding a company to develop minix
<kof673>
that was the only good part of the templeos video "hehehehehe" <impersonation of bill g or linus i think>
<gog>
that reminds me there's a food service company whose slogan is "vefverslun fagfólsins"
<gog>
and i giggle every time i see it
<gog>
it means "the professionals' web store"
heat64 has joined #osdev
<heat64>
heat64???
<heat64>
now in 64-bits
<nikolapdp>
and i am still on 16 bits
<sham1>
Wait, you get bits?
heat has quit [Ping timeout: 250 seconds]
<nikolapdp>
yeah all 16 of them
* kof673
.oO( https://github.com/turbolent/w2c2 make that output function calls for nearly all operations, so it could maybe work even on a system with only 8-bit or 16-bit integer types, or whatever else (DSPs) )
<bslsk05>
turbolent/w2c2 - Translates WebAssembly modules to portable C (30 forks/665 stargazers/MIT)
<kof673>
s/it/the output code/
* kof673
hehehehehehe
<sham1>
héhéhéhé
<heat64>
hê
<sham1>
Anyway, my trackball got delivered to the pickup point. Might go grab it while going to work (it's destined for the office anyway)
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
heat has joined #osdev
heat64 has quit [Ping timeout: 250 seconds]
autir has quit [Quit: Leaving]
<Ermine>
It was my childhood when 64-bit was wow tech
<nortti>
I still keep thinking it was only fairly recently I got 64-bit CPU, but it's almost a decade already. guess it's not too surprising 32-bit support is dying now
<Ermine>
Actually I found out only recently that my first cpu was 64-bit actually. I thought it was 32-bit
<Ermine>
but WinXP is 32-bit only
<nikolapdp>
wasn't there a late release that also worked with 64-bit
<nortti>
there was a 64-bit version of xp for amd64
<nortti>
knew someone who ran it – apparently the driver support was quite bad
<heat>
windows xp was the software's most successful trashfire
<heat>
vista fixed it
<sham1>
linux
<heat>
linux is a lot less trashfire-ey now
<heat>
and was a lot less successful back in 01
xFCFFDFFFFEFFFAF has quit [Quit: 0xC000010A STATUS_PROCESS_IS_TERMINATING]
voider has joined #osdev
Left_Turn has joined #osdev
<geist>
yah linux desktop stuff back in 01 was definitely much more of the you gotta know what you're doing, you know if you wanna deal with it by even thinking of doing it sort of thing
<gog>
i remember when EDID was really dodgy
<geist>
i dont think any of the desktop environments we think of today were in much shape back then, except maybe openstep and CDE
<gog>
or it was my monitor
<gog>
either way i had to find the safe refresh rates manually
<geist>
yah there was still a fair amount of manually configuring xorg or running XF86config or whatnot
<gog>
yeh
<geist>
Xconfigurator, i think too
<gog>
never used that one, just XF86Config
<geist>
i think maybe xconfigurator was when xorg split off?
<gog>
hmm
Turn_Left has quit [Ping timeout: 256 seconds]
<gog>
i remember there were two implementations, one of them on X.org but it was really bitrotted
<zid>
I like xf86config it's fun I miss it
<gog>
and XF86
<gog>
but then the new Xorg forked from Xf86
<geist>
yah
<geist>
xf86config was more of a series of questions it asked, and the other one was more of a probing thing i think
<sham1>
Well, by the vista time, Linux was already quite nice. I remember starting to slowly convert
<gog>
i was using linux full-time off and on
<heat>
define quite nice
<gog>
i'd get tired of not having certain games and go back to windows for awhile
<sham1>
GNOME 2 was a thing
<gog>
then i'd get fed up with windows and rinse and repeat
<heat>
childlikempress: cuz she's that good that you don't need three
<heat>
two's enough
<mjg>
childlikempress: i was a playing a 1v1 with a dude in quek, another dude wanted to join, we told him it's a fucking DUEL
<bslsk05>
media1.tenor.com <no title>
<mjg>
childlikempress: his response "we can play a TRUEL"
<heat>
your response "bro what system are you evenr unning"
<heat>
his response "windows xp"
<heat>
your response "lol that doesn't scale to 16 cpus lol laptop scale"
<mjg>
at the time it was probably 98
<heat>
OH
<mjg>
ye i know, you were probably not even born yet
<heat>
your response "lol 98 suxorz use UNIX"
<mjg>
when that shite came out
<gog>
i'm uing unix
<heat>
i bet you didn't have a solaris license
<heat>
brokie
<mjg>
heat: interestingly his pc is was the first one i had seen linux on
<mjg>
heat: he bought from some NERD
<heat>
HE BOUGHT LINUX??
<mjg>
heat: we boot and fuck me, a linukkzzzz
<mjg>
reinstalled to windows real quick
<mjg>
at the time i only heard it existed, never seen it in actino
<mjg>
it booted all the way to tty, no x11
<heat>
little did you know
<heat>
it was going to be your downfall
<heat>
anyway why is dua lipa so fucking pretty
<heat>
it's insane
<childlikempress>
my computer still boots to tty, no x11
<childlikempress>
because fucked if i want to deal with xdm
<childlikempress>
startx is easier
<gog>
i bought a linux
<sham1>
My computer boots to Wayland
<heat>
childlikempress what distro
<gog>
i got a copy of SuSE 8.1 for cheap
<mjg>
childlikempress: ?
<mjg>
are you back to a bsd desktop?
<gog>
this was before i had cable
<childlikempress>
arch
<childlikempress>
BTW I USE ARCH
<heat>
OMG
<gog>
OMG
<heat>
LITERALLY ME
<gog>
i use arch
<mjg>
NERD
<heat>
gog: manjaro
<sham1>
:O
<gog>
shhhh
<gog>
is arch
<gog>
just special
<sham1>
Yes
<heat>
ubuntu is debian
<childlikempress>
yes arch for special needs users
<mjg>
childlikempress: i use ubuntu, just boots to some fucking login manager which automatically detects i3
<heat>
i'm special needs after the manjaro devs kneecapped me and stole my wallet
<mjg>
what do you do about screen locking tho
<heat>
manjaro devs pissed on my grandfather's grave
<childlikempress>
mjg: in theory xscreensaver
<childlikempress>
in practice i just don't bother :p
<mjg>
childlikempress: but after you are logged in into a tty, how do you prevent people from switching to it
<heat>
why is that a problem
<childlikempress>
oh. yeah i don't
* childlikempress
terrible opsec
* childlikempress
awaits flogging
* gog
gets the cat5-o-nine-tails
<mjg>
gog: can i get a hug please, i promise no shenanigans
<heat>
gog the manjaro devs are burning my house down
* gog
hug mjg
<mjg>
thanks dawg
<gog>
meow
* heat
hug mjg
<mjg>
heat: manjaor devs cause global warning
<mjg>
heat: fuck off
<heat>
this is what i get for being nice
<mjg>
grope'y little shit
<mjg>
hey, i did not consent, did i
<heat>
i'm so anti-consent i could be the head of the GNU project
<gog>
:|
<mjg>
you are the tail of the gnu project
<heat>
global warming isn't real btw
<childlikempress>
who's the cat of the gnu project
<gog>
me
<kof673>
cats are double sided, head and tail
<heat>
Big FreeBSD wants us to think global warming is real so we move off of our expensive high-powered computers into LAPTOP SCALE computers that freebsd can run better
<mjg>
gog is a honorary cat of the bsd prjoect
<mjg>
heat: dude laptops is what freebsd does NOT run on
<heat>
oh
<gog>
ngl i haven't used a BSD since i daily drove freebsd for about a 6 months back in the day
<childlikempress>
i have an old laptop somewhere running freebsd
<heat>
right, i meant Big OpenBSD
<childlikempress>
it works 'fine'(tm)
<childlikempress>
way better than win10 for that matter
<heat>
gog is the honorary cat of the BCHS stack
<gog>
i'm gonna make my next webapp in bchs
<mjg>
is bchs real WEBDEV though
<mjg>
i guess misusing a tool has a certain allure to it
<heat>
technically web and by-definition dev
<gog>
idk about sqlite though
<heat>
in fact anything that touches the web is by definition web development
<gog>
feels wrong to not have a full-steam MSSQL
<heat>
and thus, mjg webdev
<heat>
the webbest of devs as it POWERS NETFLIX
<gog>
altho postgres has some interesting features
<gog>
that make it really handy for small webapps
<heat>
gog have you tried Oracle Database
<gog>
no fuck off
<mjg>
one of the reasons i don't know work on postgres is that it is used by webdevs!!
<mjg>
just kidding, this is why i don't do mysql
<heat>
you can do Oracle Math and Oracle Addition on Oracle Numbers
<mjg>
yo heat you heard how oracle is even developed
<mjg>
fucking classic is printing pointers with %d
<heat>
i learned C on youtube
<mjg>
do you print out pointers with %d
<heat>
yes
<mjg>
interent jannies plz ban heat
<mjg>
thanks
<nikolapdp>
%x is even better
gbowne1 has quit [Remote host closed the connection]
<mjg>
i just found leftover kernel 4.15 packages on my ubuntu
<mjg>
installed
<gog>
how old is this install
gbowne1 has joined #osdev
<mjg>
started with 18
<mjg>
updated to 22.04 so far
<gog>
lol
<mjg>
what
<gog>
idk it just feels so old
<mjg>
it is younger than heat
<gog>
even though i used windows xp until it was literally unsupported by my video drivers
<gog>
6 years feels old
<mjg>
check out this trick
<mjg>
i installed fresh win xp
<mjg>
way back in the day
<mjg>
anyhow it does not want to take drivers for the sound card
<mjg>
as in drivers are only up to 9x
<mjg>
so here is a trick
<mjg>
you install windows 98 se, install the driver
<mjg>
and then upgrade to xp
<mjg>
then it fucking worked(!)
<nikolapdp>
l o l
<gog>
l o l
<gog>
|°|
<mjg>
bbl
<heat>
i started using linux around 4.0
<gog>
ldd
<gog>
what a baby
<gog>
i used linux back before we even had sysfs
<gog>
we had to deal with dev nodes manually
<heat>
you mean udev
<gog>
no
<gog>
we didn't have udev either
<gog>
we had neither udev nor sysfs
<gog>
everything that is now in sysfs was in random places in /proc
<heat>
you predate 2.5?
<gog>
yes
<gog>
2.4
<heat>
dang
<gog>
also 2.5 had the ill-fated devfs
<gog>
back when they had dev versions for massive changes
<gog>
i consider that the end of "traditional" linux and the beginning of "modern" linux
<gog>
i guess one could argue 3.0 was that also
<gog>
or the mainstreaming of systemd
<heat>
2.6 was modern linux
Arthuria has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
<mjg>
devfs was such a failure
<mjg>
too bad i shares the name with a non-failure on freebsd
<gog>
mjg what's better
<heat>
devtmpfs
<gog>
sysfs or sysctl
<gog>
by which i mean bsd sysctl
<heat>
you literally don't need udev, devtmpfs Just Works
<mjg>
sysfs is the suck
<mjg>
syfilis
<heat>
sysfs is good
<heat>
sysctl is ass
Turn_Left has joined #osdev
<heat>
sysctl can't represent hierarchies or relationships
<heat>
sysfs learned many things from procfs, mainly the "one attribute one file" thing which is ridonculously helpful if you ever want to change the format
<mjg>
lol
<mjg>
dude
Left_Turn has quit [Ping timeout: 256 seconds]
<Ermine>
have anybody seen a system without device manager
<heat>
you can totes do it in linux if you don't need module auto-loading
<Ermine>
true minimalist way implies disabling module support
<heat>
alpine doesn't have the spine to do that though
<Ermine>
alpine is more pragmatic
<Ermine>
those true minimalists tend to openbsd way of doing things
<heat>
alpine is more pragmatic than musl, but that's no achievement
<Ermine>
wdym no achievement
<heat>
hard to be less pragmatic than musl
<heat>
__MUSL__ is bad mkay
<heat>
issue tracker is bad cuz
<Ermine>
minimalism aside, some software depends on rules shipped by udev
<heat>
a true musl fan is subsequently a module hater and a shared library hater
<Ermine>
shared libraries bad, but there's no other way because mesa, hwcaps and maybe something else
<heat>
shared libraries good almost universally
<gog>
shared libraries very good
<heat>
gog is such a shared lib fan she is using shared libraries in UEFI
<Ermine>
no
<gog>
that's right
<Ermine>
why would they
<gog>
my dynamic linking kludge continues to evolve
<heat>
why would they what?
<heat>
be good?
<Ermine>
yes
<gog>
a shared library is a perfect example of an encapsulated implementation. you can swap them out! componentized applications!
<gog>
interfaces!
<gog>
we do all this crap with languages when it's right there in the ABI for us
<Ermine>
or good as in "linux software devs are good at having stable apis/abis"
<heat>
1) saves disk space 2) saves RAM 3) more often than not saves IO 4) if you use shared libraries then you don't need to recompile your package to update the lib 5) if you use shared libraries then whoever packages the .so is responsible for security and vuln mitigation, as opposed to static linking when you actively need to manage that yourself
<gog>
glibc has a pretty stable abi
<gog>
and if you're really serious you can use versioned symbols
<gog>
ELF has so many neat features
<childlikempress>
'neat'
<gog>
yes
<Ermine>
1) provably no or negligible saves, 2) provably no, 3) idk, 4) yes, but under windows, because they try hard not to break stuff, 5) responsibilities? in my foss?
<gog>
well the foss ecosystem is fucked up
<Ermine>
s/not to break/to not break/
<gog>
also there is a good reason to ship your own version of libraries for large applications that need to run on many systems
<gog>
so the disk/memory thing is whatever
<gog>
but if you do, why would you ship them static?
<Cindy>
hi
<gog>
hi Cindy
<kof673>
where do the single-header "libraries" fit into shared or static libraries?
<gog>
those are like double static
<gog>
because every TU that imports it has a copy unless you LTO
<kof673>
:0 this is just to say, people will go out of their way to attempt to avoid packaging issues
<gog>
or if you do the trick with implementation header guards
<heat>
this is the best case. now ls /bin | wc -l; and multiply by 700KiB
<Ermine>
static musl hello world is smaller
<heat>
i guarantee you this still applies with musl
<heat>
fedora doesn't require shared libs out of delirium
<heat>
we didn't helium our way into shared libraries
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
lh has quit [Ping timeout: 240 seconds]
<Ermine>
and iirc libc is basically the only universal lib out there
staceee has quit [Ping timeout: 240 seconds]
<heat>
i'm not talking about universality
<heat>
heck, libc is basically the best case scenario for a static library
linearcannon has quit [Ping timeout: 246 seconds]
<heat>
because no one structures their library in a .a-friendly way
<Ermine>
musl does?
<heat>
musl is a libc
troseman has joined #osdev
<Ermine>
basically the only thing I like in musl
<heat>
i guarantee you that if you statically link libssl you'll bring in a good chunk of openssl
lh has joined #osdev
troseman has quit [Client Quit]
<heat>
it's not about symbol imports, it's about symbol imports and their imports and their imports etc
<heat>
and the way statically linking works, it's not *only* about that, but if I do: "char buffer[50000000]; void func_you_need(){}" and you import func_you_need, you'll bring in the big fat array
<heat>
all of this is basically why atm glibc is ass to statically link, even though you import the same number of symbols from your hello world program
staceee has joined #osdev
<clever>
heat: linker gc can help, if nothing references a section containing buffer
<heat>
linker gc is spotty and not supported by many many libs
<clever>
and -ffunction-sections, while it helps gc, can also produce slower and larger code
<clever>
i have noticed a lot of libc's put one function per .c file
<heat>
you really can't enable any of those options by default
<clever>
so the .a file, winds up having one unit per function
<heat>
yes
<heat>
that's why
<clever>
and the linker can just pick one .o file, without needing function-sections
<heat>
this is awful, awful stuff
<clever>
./include/bits/syscalls-common.h:34:63: error: '__NR_adjtimex' undeclared (first use in this function); did you mean '__adjtimex'?
<clever>
[6:42 PM]
<heat>
if i had to write a large project with one function per CU i'd have whoever created .a shot
<clever>
i also recently ran into this on uclibc and risc-v32
<clever>
`rm libc/sysdeps/linux/common/adjtimex.c` is one potential solution
<clever>
then it just never tries to make a wrapper for the syscall
<clever>
the build system seems to rely on `*.c`, so just removing a file is enough
<clever>
heat: i would just build that part of the project with -ffunction-sections, you will get largely the same effect, if gc-sections is on
<heat>
right, but nearly no one turns on gc-sections
<heat>
so then your library is bad and bloated
Turn_Left has quit [Read error: Connection reset by peer]
<clever>
sneak it into your pkgconfig file :P
<heat>
evil :)
<Ermine>
well, okay, maybe there are saves
<Ermine>
I'm still sceptical though
Yoofie has quit [Read error: Connection reset by peer]
<Ermine>
There are saves because libraries are not .a-friendly, because everyone uses dynamic linking so nobody cares about static linking
<heat>
c++ -O2 main.cpp --static-libstdc++ (so only counting with the C++ standard library!): 1.2M stripped
<kof673>
> because everyone uses dynamic linking you already know what law that is
<heat>
libstdc++.so.6.0.28 size: 1.9M unstripped
<heat>
well, unstripped of symbols, it doesn't have DWARF
<heat>
libstdc++ is your bog standard library that's not static-library-shaped
<heat>
bog-standard
<gog>
gog-standard
<heat>
gog-standard library
<gog>
libgog++
<gog>
static linking clang to own the libs
<heat>
gog::hug<heat>()
MiningMarsh has joined #osdev
MiningMarsh has quit [Remote host closed the connection]
* gog
hug heat
* heat
hug gog
<gog>
class gog { friend class heat };
<kof673>
i do one function per .c file (and separate .h too) and similar for datums...but this is for even worse reasons :D
<heat>
class heat { friend class gog; /* i have no idea how to use friend in C++ */ };
<gog>
i think friend is generally a bad idea
<kof673>
i would say this is similar to single-header libraries: why is there not a utility to "convert" ? surely the language is parseable and not undefined. anyways...
<gog>
unless you really need to kludge something
<kof673>
that is, a tooling issue IMO
<childlikempress>
right, friend is completely useless
<childlikempress>
all you need to do is #define private public before you include your headers
<gog>
yes
MiningMarsh has joined #osdev
<gog>
hiding data is bad anyway
<gog>
if you have something to hide it means you're guilty
<heat>
no childlikempress, you're wrong
<heat>
what you want is -Dclass=struct in your CXXFLAGS
<gog>
you're both wrong
<gog>
you want to delete all of your c++ source and start over in rust
netbsduser has quit [Ping timeout: 255 seconds]
<heat>
ROST
<heat>
you're ALL wrong
<heat>
you want to delete all of your source and
<heat>
.
<gog>
move to the forest and rejoin nature
<gog>
instead of typing your arcane incantations into the screen you'll carve them into the bark of birch trees
<gog>
you'll program in the language of the goddess