klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<dzwdz> with drives, the network card, other hardware, whatever
<dzwdz> here there's no such thing, everything is actually a file but for real this time but actually
<dzwdz> i'm eloquent
<heat> how is that actually performant though
<dzwdz> computers fast
<heat> it's probably very hard to do so
<dzwdz> i don't really care about performance too much, i managed to max out a 100mbps link so i'm happy with that
<dzwdz> i'm more concerned about just experimenting with ideas
<dzwdz> and this one is pretty nice for sandboxing
<heat> i'm fairly sure that given a high enough core count even a standard monolithic linux with normal filesystems starts getting bottlenecked with filesystem stuff
<demindiro> My plan is to make the difference between micro- and whateverkernel irrelevant.
<demindiro> e.g. a driver can run in either user or kernel-space and userspace would never know
<heat> see rump
<dzwdz> thankfully i don't care :p
<heat> yeah i know
<heat> I just wonder if there's any shenanigan you could pull off to make everything-a-file-but-really actually viable
<dzwdz> and it's nice for messing around with ideas for sandboxing software and whatnot
* gog drives
<dzwdz> you can very easily make a program that e.g. asks the user for permission before some other program opens any file
<heat> gog nooooooo that's not very iceland
<dzwdz> that particular example would get boring quick
<gog> heat: lmao what everybody drives here
<heat> what
<heat> isn't it like a standard northern european country where everyone bikes everywhere or takes public transportation
<dzwdz> but so far there wasn't really any system you could experiment with such stuff on
<dzwdz> to my knowledge, at least
<dzwdz> public transportation++
<gog> iceland is 17
<gog> portugal is 24
<zid`> that's just gdp related
<heat> socialist paradise moment
<zid`> NK clearly the best country
<gog> we have garbage public transit and bike infra
<zid`> least awful car centric city design confirmed
<gog> ok maybe not garbage
<gog> but it's not good
<gog> there's this big grand sweeping plan for a BRT system that was supposed to begin construction this year
<gog> they've started one 50m segment
<zid`> imagine if india wasn't at 59, but at 900 like the US, phew
<gog> 50 meter
<zid`> the entire place would be carpark
<heat> in any case I don't think this is a good metric
<dzwdz> how do you even end up with 1.4 cars per person
<zid`> "We're invading china for more parking spaces"
<zid`> dzwdz: wealth
<heat> you may own a car but how do you use it and how often?
<zid`> Plus half of those cars are armoured personnel carriers for when we finally invade spain
<heat> like norway, netherlands, germany are all places with really solid public transportation and bike-culture
<gog> we don't have that
<gog> it's improving
<gog> but not quickly enough to outpace the growth of car ownership
<heat> meanwhile moldova is much lower than them, but the country is more rural and in general financially poor
<zid`> In 2022 Gibraltar bid to be awarded city status as part of the Platinum Jubilee Civic Honours. The bid was refused, but when researchers looked through the National Archives, they found that it had already been recognised as a city by Queen Victoria in 1842
<zid`> When your empire so empirey you forget you made places into cities 180 years ago
<gog> there's another plan to sink the main highway into the city into a cut and cover tunnel
<dzwdz> (good night)
<gog> that's a phenomenially expensive and stupid idea
<dzwdz> (good whatever-it-is-in-your-timezone)
<zid`> gog: give me like £2000 and i'll rebuild all of ryjek a few miles over to the side but better
<gog> lol ok
<zid`> with public transport and light rail and stuff
<gog> yes
<zid`> instead of roads
<gog> give us light rail
<gog> please dear god just one line with two branches
<heat> do you want maglev for the futuristic urbanist landscape hellhole
<zid`> Don't worry, some billionaire will pretend to have invented trains again soon, and you can pilot trial something that is basically trains but worse
<zid`> they will fail, and you'll be set back another 40 years on getting light rail
<heat> oh yes +1 we need elon's idea
<gog> if i could get to work in under 30 minutes via transit i would happily move somewhere cheaper so i could have a bigger house
<heat> tunnels but on kind of a rail and with slow elevators in and out
<zid`> (It's amazing how often that has happened)
<gog> but rn i'd have to buy a car to justify the opportunity cost
<gog> so i wipe out the savigns on rent
<gog> not worth it to me
<heat> zid`, have you followed elon's stupid ass idea?
<zid`> when 50cc moped
<gog> gadgetbahns
<zid`> heat: elon isn't the first and won't be the last to reinvent trains
<heat> but this one is surprisingly bad
<gog> just build a train
<gog> it's so easy
<gog> you put down a steel track
<gog> and then you put down another one
<gog> simple as
<heat> simple 'as
<zid`> what is your ' for there heato
<heat> oi luv can u shut up bout ur "electric cars" and pour be another pint will ya
<heat> me*
<gog> yes
<gog> fuck electric cars
<gog> give me electric trains
<zid`> don't worry gog
<heat> i want fossil fuel trains
<zid`> because the electric cars will be able to link to each other
<heat> burn things
<heat> get power
<zid`> and form some kind of 'convoy' where each car is connected and they drive a set route
<gog> even diesel trains are an improvement
<zid`> fuck I've invented trains again
<gog> but electricity is so cheap here the economics of it would be better over the long term
<gog> capital investments are good actually
<gog> maintenance of way is expensive but so is building new roads every 25-40 years
<zid`> "They go on to describe how riders would "travel along predetermined routes", and that the app would have a function where they would "request to be dropped off"."
<zid`> "Backward compatibility w/roads"
<gog> lmao
<gog> god
<gog> we techies sure are brain geniuses eh
<zid`> We *know* the solution to all this shit, it's trivial to come up with tabula rasa too
<zid`> we just don't do it
<gog> i'd settle for BRT corridors on existing roadways rn
<zid`> busses have ELASTIC CAPACITY
<heat> ok how many 10s of lanes do you want on ur new highway
<gog> borgarlinan is ambitious and not a bad plan
<heat> they'll be wide enough for all your trucks
<gog> but we could get so much more with a much smaller investment faster
<gog> everybody wants sweeping grand projects rather than small, incremental ones
<gog> it's not appropriate for a city this size really, not from scratch
<zid`> The netherlands is doing good shit on that front
<zid`> they had plans like "reduce on-road parking by 800 spaces this year"
<heat> zid`, the tube map is spooky af
<zid`> that 4 meter by 100 meter box painted lies is now a flowerbed and picnic tables
<zid`> etc
<gog> yes
<gog> we can do it
<heat> also haha the IKEA sponsor means you know which stations have a nearby IKEA
<zid`> tube map is genius
<zid`> mapmen have a video on it
<heat> useful but 1) what's your endgame here?
<heat> do you go to IKEA and then plan to take your new sofa on the tube?
<gog> unfortunately we're run by a coalition of a conservative neolib party and a spineless social democrat party
<zid`> heat: ikea is flatpack
<gog> which means our government never gets anything useful done
<zid`> so yes, you take it on the tube
<heat> gog, hah like that matters
<heat> no government gets anything useful done
<gog> it's known to happen sometimes
<gog> every now and then
<gog> chances are better when it's not all legislatively deadlocked
<zid`> needs to be less than 2 meters else TFL might cut your head off
<heat> is it just me or is london way too big
<zid`> central london, or the london metropolitan area?
<heat> IMO dresden half of it
<zid`> london is a sort of tumor that is growing across the entire UK
<zid`> a mile a year
<heat> whatever the tube map is
<heat> so metropolitan area I think
<heat> it's IMO begging to get dresden'd
<zid`> You'd need a lot of bombs
<zid`> also the correct verb is coventised
<zid`> coventration
<heat> no, it's getting dresden'd
<zid`> coventry was nearly levelled
<zid`> That's pathetic, some of it is still standing
<heat> brits can't bomb as well as the US
<zid`> hmm?
<zid`> You think the US flattened coventry?
<zid`> I mean, they're famous for bad aim and friendly fire, but hitting coventry would be amazing even for them
<heat> no
<heat> dresden
<heat> obviously the UK flattened coventry
<gog> they did the right thing
<zid`> what, it was an inside job!?
<zid`> They used to say “when the Germans fly over, the English duck. When the English fly over the Germans duck. And when the Americans fly over, everyone ducks
<heat> this is a certified pat tillman moment
SpikeHeron has quit [Quit: WeeChat 3.8]
<gog> if it moves, kill it
levitating has joined #osdev
demindiro has quit [Quit: Client closed]
SpikeHeron has joined #osdev
nyah has quit [Quit: leaving]
Matt|home has quit [Quit: Leaving]
gog has quit [Quit: byee]
[itchyjunk] has quit [Ping timeout: 252 seconds]
[itchyjunk] has joined #osdev
fedorafan has quit [Ping timeout: 248 seconds]
fedorafan has joined #osdev
Iris_Persephone has joined #osdev
<Iris_Persephone> heyyy guys
<heat> 3 y's means you wanna bang me
<Iris_Persephone> I mean sure but would need to clear it with the gf :p
<Iris_Persephone> anyway this is actually a Linux Mint VM instead of the Win10 machine I normally use
<Iris_Persephone> because of uhhh
<Iris_Persephone> masochism I guess
<zid`> should I set up a linux mint VM
<heat> no
<zid`> okay boss
<heat> no one should ever use linux mint
<Iris_Persephone> it's better than Ubuntu at least
<heat> fedora or arch or death
<zid`> what should I do with my gentoo then
<zid`> delete?
<Iris_Persephone> well depends on how long it took you to compile it
<heat> decompile it
<zid`> I don't have enough drive space to decompile it
<zid`> the binaries are way smaller
<levitating> heat: linux mint is good
<levitating> cinnamon is amazing
<Iris_Persephone> levitating: yes exactly
<Iris_Persephone> this guy gets it
<heat> u can use cinnamon in other distros
<Iris_Persephone> ok but what advantage does that give
<heat> no intense ubuntu-derived pain
<heat> sorry, debian-derived ubuntu-derived pain
<levitating> From all the debian based distribution I've never had that much debian-derived ubuntu-derived pain on linux mint. But I get what you mean.
<levitating> Sadly ubuntu-based distro's tend to get a lot of support. And linux mint actually has very good repositories itself.
<heat> reject support, use le arch wiki
<levitating> le arch?
<heat> yes, the arch wiki but exclusively in french
<zid`> nobody has mentioned whether mint has crossdev
<zid`> or other useful things
<heat> what's crossdev?
<heat> is that a christian thing
<zid`> yes
<zid`> it's a gentoo package for good christian boys that lets you install crosscompilers by tuple name
<levitating> I think debian has decent cross compilation toolkits?
<heat> you're not a good christian boy
<heat> damn you dirty protestants
<zid`> I'm a hacker though
<levitating> Probably not as cool as gentoo
<heat> martin luther? more like martin CRINGE
<zid`> eww protestants
<zid`> portugal has to be catholic right
<zid`> cus spanish inquisition and all that
<heat> absofuckinglutely
<sakasama> ... but I was told that if you crossdev you're going to hell.
<zid`> and is in balkans
<heat> we also inquisitioned
<heat> no, that's minus points for catholicism
<Iris_Persephone> heat: okay "no ubuntu pain" is actually a good reason
<zid`> You should go on a random tour of the UK heat, the tourguide will be like "And this is the secret tunnel the catholics built using a spoon to escape"
<heat> orthodox >>>>>> any other brand
<Iris_Persephone> but Mint is much better in that regard and I don't wanna mess with my OS that much
<Iris_Persephone> actually you know what that sounds fun
<zid`> compared to fedora? pulling your toenails out
<heat> zid`, actually, something more horrifying: portugal's king in the 1500's wanted to marry a spanish princess, so spain forced portugal to kick out all the jews, and they couldn't take shit. so some of them literally ate their gold and crossed the border
<zid`> when isabella
<heat> no, wrong wedding
<heat> although this one was also isabella apparently
<zid`> it's always isabella
<zid`> france is always louis
<heat> uk is always prince charles the wretched
<heat> sorry, king charles*
<Iris_Persephone> is that the new song from Billy Idol? "Iberian Wedding"?
<zid`> That's pretty impressive
<heat> thats small
<heat> Charles V had a much better empire
<zid`> compared to the UK's girth sure, compared to everywhere else it's huge
<Iris_Persephone> why is so much of that greyed out
<zid`> Didn't exist yet
<zid`> Everyone knows a place isn't a real place until the british have civilized it
* mrvn just ordered a Raspberry Pi Debug Probe. Looks like a usefull pice of hardware.
<zid`> That's why none of the world is grey anymore
<heat> yes, they're gray now
<zid`> no takebacksies on civilizing
<Iris_Persephone> did you know they only invented colour in the 1930s
<heat> literally OP
<heat> eu4 mid game but IRL and early game
<zid`> no indonesia?
<Iris_Persephone> before then everyone saw everything in black and white
<zid`> Iris_Persephone: more importantly, they saw it not from a train
<heat> Iris_Persephone, before the 2010s everything was blurry too
<zid`> nah before 1993
<bslsk05> ​www.youtube.com: New York City in 1993 in HD - DTheater DVHS Demo Tape - YouTube
<heat> zid`, guess how charles v's wife was called
<zid`> slut?
<heat> no
<zid`> or do you mean what she was called
<heat> isabella
<zid`> isabella
<zid`> 'how' is 'by what method'
<zid`> common ESL mistake
<zid`> I was 4 years old when everything stopped being blurry, was pretty fun
<Iris_Persephone> for me everything was blurry until third or fourth grade
<Iris_Persephone> then I realized I needed glasses
<zid`> There's a squirrel at 3 minutes
<zid`> That squirrel is so fucking dead by now too, ancient legacy squirrel
<zid`> progenitor of all nyc squirrels
<zid`> earliest common ancestor
<Iris_Persephone> hey so which distro would you recommend frankensteining Cinnamon onto
<Iris_Persephone> preferably one with some measure of compatibility with Debian
<heat> bedrock linux
<zid`> linux mint
<Iris_Persephone> zid`: I just watched that video you sent of the VHS
<Iris_Persephone> that hurts to look at
<Iris_Persephone> so low framerate and blurry and washed out
craigo has quit [Ping timeout: 255 seconds]
<zid`> that's.. not a vhs
<nikolar> heat: so you daily drive bedrock then
<zid`> It's 'd-theatre', which was digital video on what is the same as a vhs though
<zid`> in HEIGCH DEE
<Iris_Persephone> oh god I just looked up Bedrock
<Iris_Persephone> what on earth
<nikolar> Exactly
<heat> i'm sure you have many questions
<nikolar> Dark magic for high level wizards
<Iris_Persephone> this cannot be stable
<Iris_Persephone> or secure
<Iris_Persephone> or performant
<levitating> I do daily drive bedrock
<levitating> I have linux mint, archlinux and kali
<Iris_Persephone> why Kali
<levitating> It's stable, secure and performant
<levitating> Iris_Persephone: I do cyber security work, sometimes I need something from the kali repo's.
<nikolar> See, perfectly stable
<levitating> The developer is often active here on irc
fedorafan has quit [Ping timeout: 252 seconds]
<Iris_Persephone> screwit let's get the test machine up and running
fedorafansuper has joined #osdev
<nikolar> Lol
heat has quit [Ping timeout: 246 seconds]
<levitating> I installed linux mint on this laptop, a year later I hijacked it and installed arch along side it. And then I slowly shifted to installing everything on arch until I could completely boot the arch init instead of mints.
<Iris_Persephone> it's at least a decade old and will probably thermal throttle during the entire install process but all i have on it is just mint and a half-finished LFS
<Iris_Persephone> so yeet
<levitating> Good luck
<levitating> I am heading to bed
<levitating> I hope to hear from your endeavours tomorrow
<levitating> I am sure you'll like it
<levitating> Make sure to tell paradigm at #bedrock that his software rocks.
<nikolar> Honestly running it on a snapshotting root fs doesnt sound bad
<levitating> (if you can find snapshotting software that understands it)
<nikolar> Just snapshot before updating
<Iris_Persephone> god this keyboard is so grotty because the laptop lives under my bed
<nikolar> Sounds like a great place for a laptop
<Iris_Persephone> I have a lot more machines than I do space
<nikolar> Put it in a bag then :)
<Iris_Persephone> the battery is shot so if it gets plugged out it turns off
<Iris_Persephone> and I was doing a lot of work which needed it to be up
<nikolar> Well good luck with bedrock
<nikolar> Might try it myself
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build]
eck has joined #osdev
Arthuria has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
smach has quit [Remote host closed the connection]
<Iris_Persephone> alllright I'll be shutting down the vm and hopefully the next time I chat here it will be with Bedrock
Iris_Persephone has quit [Quit: Leaving]
fedorafansuper has quit [Quit: Textual IRC Client: www.textualapp.com]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
Iris_Persephone has joined #osdev
<Iris_Persephone> yooooo this shit's cracked
<Iris_Persephone> I love it
[itchyjunk] has quit [Remote host closed the connection]
dude12312414 has joined #osdev
bradd has joined #osdev
Arthuria has quit [Remote host closed the connection]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
bgs has joined #osdev
kfv has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<geist> hmm, what is bedrock?
<geist> there are tons of things called bedrock, so a little hard to search for
<zid`> I assume bedrocklinux.org
<zid`> given it was a "what distro" conversation
<geist> oooh okay, yah that makes sense
<geist> i was thinking about some sort of chat based solution, like some sort of irc proxy thing
slidercrank has joined #osdev
<jjuran> I thought Bedrock was a next-generation C++ development utopia / vaporware for classic Mac OS
mahk has quit [Ping timeout: 248 seconds]
<geist> yeah that's what i mean if you search for bedrock you get a bunch of things, even just software things
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 255 seconds]
mahk has joined #osdev
<Iris_Persephone> yeah bedrock linux
<Iris_Persephone> gonna restart to check my init so see you soon
Iris_Persephone has quit [Remote host closed the connection]
Iris_Persephone has joined #osdev
<Iris_Persephone> lmao I changed my init to use Fedora's instead and it completely broke my network drivers
<Iris_Persephone> because Bedrock expects the init, display manager, and desktop environment to come from the same stratum
<dinkelhacker> heat clever geist - Just saw your responses on my LK question from yesterday in the logs. Thx for clearing that up. Makes sense now.
bgs has quit [Remote host closed the connection]
Iris_Persephone has quit [Remote host closed the connection]
<CompanionCube> nikolar: be warned that it can confuse GRUB on btrfs/zfs, at least with the usual initramfs cmdline so the installer may abort if this would happen
<nikolar> CompanionCube: what if I'm not using grub on zfs
<CompanionCube> that's fine, the confusion is with grub-mkconfig
<nikolar> Ah fair
<nikolar> Well I'll try it out and we'll see
<nikolar> The more i use Linux, the weirder my system gets
<CompanionCube> (specifically mount weirdness trips up the path resolution logic when generating a valid root=)
<nikolar> Yeah I'm aware that grub is bit odd on zfs
<zid`> why does CompanionCube get red
<zid`> did you bribe him CompanionCube :o
<nikolar> I just copied and pasted his nick ¯\_(ツ)_/¯
<CompanionCube> i happen to like red
<zid`> nikolar: type com then press tab for me real quick?
<CompanionCube> nikolar is likewise teal.
<CompanionCube> zid`: you're green
<nikolar> CompanionCube:
<zid`> That'll be £20 thank you very much.
<nikolar> it's only colored when i copy and paste
<nikolar> and i'm on my phone
<zid`> need a special osk with a tab button?
<nikolar> Lol yeah
fluix has quit [Read error: Connection reset by peer]
fluix has joined #osdev
danilogondolfo has joined #osdev
alpha2023 has quit [Read error: Connection reset by peer]
alpha2023 has joined #osdev
Burgundy has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
gog has joined #osdev
gog has quit [Client Quit]
gog has joined #osdev
xenos1984 has joined #osdev
gildasio has joined #osdev
<zid`> omg is that the real gog!?
<zid`> I'm such a huge fan
<nikolar> hello gog
mctpyt has joined #osdev
Burgundy has quit [Ping timeout: 252 seconds]
<gog> i'm not the real gog i'm sorry
<gog> i'm a gog impersonator
<zid`> wait no, I think I'm confusing you with morgan freeman anyway, sorry my bad
<gog> ah yes
<gog> easy mistake
<Amorphia> I, too, get confused for morgan freeman *all the time*
mctpyt has quit [Ping timeout: 248 seconds]
GeDaMo has joined #osdev
nyah has joined #osdev
alexander has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
alexander has joined #osdev
<gog> it's your soothing voice
<Amorphia> ^______________^
KaitoDaumoto has joined #osdev
* kof123 .oO( ascii excitebike )
ytarip is now known as piraty
* moon-child pets morgan freeman
gxt_ has quit [Ping timeout: 255 seconds]
gxt_ has joined #osdev
craigo has joined #osdev
craigo has quit [Remote host closed the connection]
bgs has joined #osdev
gog has quit [Remote host closed the connection]
gog has joined #osdev
Jari-- has quit [Ping timeout: 260 seconds]
k4m1_ is now known as k4m1
craigo has joined #osdev
slidercrank has quit [Ping timeout: 255 seconds]
<sham1> Look at you casually petting God
<gog> mew
<lav> mew
mctpyt has joined #osdev
<gog> hi lav
* gog patpatpatpat lav
fedorafan has joined #osdev
<lav> eeeeeee
<lav> mowww
Left_Turn has quit [Ping timeout: 248 seconds]
heat has joined #osdev
<heat> omg i accidentally made someone install bedrock
<geist> bad person you
<mjg> > Bedrock Linux is a meta Linux distribution which allows users to mix-and-match components from other, typically incompatible distributions.
<mjg> dafaq
<geist> yah the little mission statement at the top does not instill a lot of confidence
<mjg> what's next, a meta OS which allows mixing onyx and sortix
<gog> that sounds like a great idea with no pitfalls whatsoever
<mjg> ye i'm sure it works!
<heat> mjg, onyx and openbsd
<gog> sortix/kOnyx
<mjg> i'm guessing if it is operational at all they just spawn containers
<mjg> or vms
<mjg> GNU/Onyx
<geist> seems like even just containers would end up with IPC incompatibilities
<lav> we should just make another repo with all the good packages from other distros and nkne of the bad sides, duh
<lav> *none
<lav> typing is hard when you're a cat
<heat> we should make a stable rolling release distro with high performance and a high focus on security
<mjg> heat openbsd binary compat for freebsd when
<mjg> april 1 would be a great fucking time to post
<heat> 1) why 2) who compiles for openbsd
<mjg> brah
<mjg> no troll gene i see
<mjg> you got shafted at conception
<heat> i have many troll genes
<mjg> recessive?
<heat> like the "use bedrock linux" one
<mjg> i'm saying it would be funny to build openbsd faster than openbsd
<mjg> hurr hurr
<mjg> they don't have cross build
<geist> rabble rabble rabble solaris rabble rabble
<mjg> oh there it is
* geist beams
<mjg> you can't stop yourself from bringing it up
<mjg> can you geist
<geist> i cannot
<mjg> where did bonwick touch you
<geist> hey bonwick is a nice guy, met him before
<mjg> show me on java mascott
<mjg> orly?
<heat> he habitually flames solaris. he's an habitual solaris flamer
<geist> what me? I dont flame solaris
* mjg rocks a 'solaris MOTHERFUCKER!" t-shirt
<heat> mjg, have you seen the t-shirts the old UNIX boomers used for the facesofopensource thing
<heat> it's that kind of vibe
<geist> yah jeff and his zfs other buddy did some preso at apple when i was there
<mjg> no
<heat> oh boy
<mjg> ahrens?
<bslsk05> ​www.facesofopensource.com: Faces of Open Source
<geist> and then had a dinner somewhere in the bay area
<mjg> have you heard of faces of atheism?
<geist> i forget who the other guy was. would have been 2005
<mjg> that would be the 2nd dude if my history is correct
<geist> hmm? who is that?
<mjg> :p
<mjg> if memory serves right, that's the primiary reason (apart from bonwick) why zfs exists
<mjg> the story goes dude got hired with a promise he will be working on a new fs
<mjg> and something akin to zfs is something bonwick wanted to do for quite some time
<mjg> and bam
<gog> i am enlightened by my own intelligence
* gog dabs
<mjg> atheism?
<mjg> :]
<mjg> i'm afraid to google for that shit quote
<mjg> G may shaft me later with funny results in unrelated searches
mctpyt has quit [Ping timeout: 252 seconds]
<GeDaMo> # How can anybody be enlightened? Truth is, after all, so poorly lit #
<mjg> #iam14andthisisdeep
<mjg> or rather r/iam14andthisisdeep
* lav bows to gog
SpikeHeron has quit [Quit: WeeChat 3.8]
<bslsk05> ​www.facesofopensource.com: BSD - Faces of Open Source
<heat> how much do you hate these fellas
<mjg> :]]
<mjg> i had a 3rd degree run in with the last one
<mjg> mckusick was ok
<mjg> the last one tried to give me shit but i backfired
<mjg> hoisted by his own petard if you will
<heat> L. Ron Hubbard >>
<mjg> there is a lul problem that kqueue on freebsd gives you a fd which is *NOT* inherited on fork
<mjg> os x got kqueue with the same limitation
<gog> mjg: yeah the cringe r/atheism quote from back when i cared about that kind of thing
<mjg> jkh tried to give me shit claiming this breaks posix
<mjg> all while claiming os x is posix certified
<mjg> what do you know, i take a look at os x sources and kqueue over there is also *NOT* inherited on fork
<mjg> as you can imagine, posix compliance testing does not use kqueue, so they never ran into the problem
<mjg> so that was my only encounter with the guy
<mjg> i happen to know him from shit installer code
<geist> met jkh a few times at apple
<mjg> how was it
<geist> or was it terry l
<mjg> :D
<geist> actually both, i think they were both there
<mjg> you are on a roll with names dawg
<mjg> yep
<mjg> i never encountered the L guy, but i heard stories
<mjg> none positive, but maybe that's my circle
<geist> nothing bad to report. as is usual folks in person are typically human and decent
<heat> >kqueue on freebsd gives you a fd which is *NOT* inherited on fork
<heat> what the fuck
<geist> might not be duplicable
<geist> fork really messes up a lot of notions of open endpoints to things
<mjg> heat: i don't know the reasoning by the author. from the internals it is pretty clear bad shit can happen if another proc gets the fd
<geist> or mor specifically, it really limits a lot of choices because fork is there to mess it up
<geist> yah exactly
<mjg> i would say if this is not fixable, you should be given a dummy fd at least
<mjg> this would be less wtf-is-happening-prone
<geist> so sounds like they were just f it
* geist nods
<mrvn> mjg: Windows was posix certified too. None of linux or bsds is.
<mjg> anyhow, from what i was told, terry loved to exaggerate on all claims of work done
* geist shrugs
<mjg> ye i don't think freebsd would pass and i don't think it matters for over a decade now
<mrvn> mjg: problem is that what you really need is the stuff in posix that's optional.
<heat> who's terry?
<geist> yah possibly. he seemed like a reasonable guy at the time, but then i didn't argue with him about something or anything
<geist> but i'm also generally conflict averse, which is primarily why i dont participate in those sort of large OS projects
<mjg> geist: as usual there is 3 sides to every story and i was told $stuff by one side ;)
<geist> yah totally
<mrvn> mjg: what happens when you send the kqueue FD over an unix domain socket?
<geist> also why i'm bad at arguing these sort of things. my natural instinct is to try to see it from all sides and come to a consensus
<mjg> mrvn: you can't do it
<geist> which doesn't really work if everyone wants to fight
<mjg> well i learned that consensus rarely works
<mrvn> mjg: so they have special code in the network stack that checks all FDs that get send and fails on kqueue?
<mjg> mrvn: yea, same on fork
<mrvn> that is so bad, *shiver*
<geist> it works if everyone is trying to reach it, but it just takes a bad apple to mess it all up
<heat> who tf is terry tho?
<mjg> mrvn: BSD
<mrvn> mjg: does it even work with threads?
<geist> terry lambert
<mjg> mrvn: yes
<mjg> it's the *proc* boundary which is a problem
<mjg> it stores addresses somwhere inside
<mjg> geist: i tend to see at least one bad apple :p
<heat> maybe you're the bad apple :v
<mjg> key problem is that there is more potential motivation for a change or lack thereof than doing the best job even by your own assemsnet
<mjg> as in people have political and/or financial reasons to favor or block something
<mjg> even the programmers
Left_Turn has joined #osdev
<mjg> mgmt is ofcourse the classic
<heat> when they get your shot for faces of open source make sure you take a shirt that says "PESSIMAL" or "SunOS 4.1.4"
<mjg> heat: you are just whining becaues theo nacked your patch
<mjg> heat: or "PESSIMAL SunOS 4.1.4"
[itchyjunk] has joined #osdev
<heat> linus did such a steve jobs pose and I kinda like it
<heat> +1 for linux as steve jobs
<heat> linus*
<mjg> no turtleneck == no steve
<mjg> sorry mate
<mjg> why there is no Elon Musk
<mjg> btw eric allman on the photo is the guy who gave the world SENDMAIL
<heat> i know
<mjg> i prsume you are too young to have been touched by it
<mjg> same liek with xfree86
<heat> also mckusick's hubby right?
<mjg> ye
<mjg> interestingly he admitted sendmail was poorly made
<mjg> afair he claimed he tried to keep backwards compat at all costs
<mjg> and the result... speaks for itself
<geist> which is?
<geist> that mail was sent?
<mjg> have you seen sendmail config ?
<mjg> it's an LSD trip
<geist> yah its terribad. but i think pretty quickly you just use some other language to generate it, iirc
<mjg> that i don't know about
<mjg> i do know one workplace i was at had sendmail and there was one dude able to configure it
<geist> though admit it's been a whiel sicne i set up an atual mail server using sendmail. back when i used to run my own it was generally BSD based, and i switched to that other mail thing somewhere in the 2000s... oh what was it
<mjg> we deciphered part of the config for lulz once
<geist> postfix i think
<mjg> see, postfix resembles an MTA which is configurable
<heat> i use geeeeeeeeeeemail
<mjg> same with exim
<mjg> ooh there is also qmail, that's another one
<mjg> like fuck me
<mjg> qmail is religion mate
<geist> but yeah then about 10 years ago i just said fuck it and moved to gmail
<mjg> :]
<geist> it was getting too hard keeping spam filtering up to date enough
<mjg> same
<mjg> i had postfix at home, just like seti
<geist> i remember running a sparcstation 2 w/openbsd as my mail server for much longer than i should have, mostly for lulz
<geist> like 2000-2005
<heat> sparc AND openbsd?
<heat> it's like mjg hate mail
<geist> yah the idea was 'try to hack this script kiddies!'
<mjg> :)
<mjg> my peak wtfer moment was having 3 cmputers at home, each with a different bsd variant
<mjg> with openbsd as the router
<geist> yeah in the late 90s/early 2000s i always used openbsd as a router
<mjg> that was 2002-2005
<mjg> i did not know fuck
<geist> i switched over to m0n0wall in the mid 2000s and have been using a variant of that (now pfsense) ever sense
<mjg> so i found a guide how to configure the fireall
<mjg> it started with broken instructions how to install ipf
<geist> yah openbsd firewall config was really straightforward
<mjg> you use pfsense now?
<geist> yeah
<geist> have been mostlky happy with that for at least 10 years
<geist> when m0n0wall turned into pfsense
<heat> mjg has just found the other freebsd user
<mjg> geist: sorry to say mate but you are using my code then
<mjg> geist: even more than you think as i'm contracting for netgate
<geist> yah though really pfsense it doesn't matter what the kernel is. i use it because i like the combinatio of configurability and power, not that it runs any particular kernel
<geist> yah i have a real netgate box, etc
<mjg> ye i think for soho use you could frankly get away with openbsd even
<geist> i think i'm on my second gen, and it's hitting the end of its life. will probably need to get a new one in a year or two
<mjg> it's just a matter of having a way to configure it
<geist> yah i have a complex enough config that i really dont wasnt to do manually
<geist> ie, ipv6, multiple vlans, etc
<mjg> right
<mjg> at my age i appreciate not *having* to deal with configs
<geist> indeed
<geist> my only real complaint with pfsense is over the years it has tended to have some 'X triggers Y' sort of bugs that pop up
<geist> or lack of
<geist> ie, network drops, service Y doesn't restart properly, sort of stuff
bradd has quit [Ping timeout: 255 seconds]
<geist> you learn the quirks and when to go in and reset something
<geist> and the ipv6 path is clearly not as well tested
<mjg> hey any bugs are totally *not* mine!
<heat> ngl i would trust mjg code
<mjg> hell ye!
<heat> picky mofos make for great programmers
<geist> what sort of layer do you work at within pfsense?
<mjg> only 2 crashes in heck of a long time!
<mjg> geist: i do kernel performance
<geist> word.
<mjg> but also kernel crashes and similar
<mjg> this is where i fuck with armv7 :[
<geist> my ol sg-4860 can keep up, but i only have a 1Gb connection, so really doesn't need more than that
<mjg> mofo is picky about alignment and there is plenty of buggy code out there
<mjg> which works... until it does not
<geist> and the 4860 is a 4 core atom so it's already got a lot more horsepower than the lower end ARM boxes they sell
<heat> mjg, does ubsan help?
<geist> yah hopefully their next arm boxes will at least switch to v8
<mjg> heat: bugs are known and hard to fix
<heat> lol
<heat> typical BSD?
<mjg> not in bsd
<mjg> in ports like snort
<mjg> geist: there is only one armv7 and it is going to die in october or so
<mjg> geist: the 2 other arm models are 64 bit
<mjg> they are however core-count-starved -- only 2
<geist> yah, was just looking at their product page
<heat> itanium router when
<geist> ah yeah the two on sale are dual a53s, but i guess there's a v7 still in the support list
<heat> how much power do you need for a router?
<geist> for simple routing without vlan or whatnot the dual core a53 is probalby good up to a gigabit i bet?
<mjg> just pushing ipv4 saturates the link
<geist> for a while when i had fiber i also had to deal with pppoe deframing and whatnot
<mjg> i think some turbo mild filtering will also do
<geist> the previous m0n0wall box couldn't keep up with that completely
<mjg> heh pppoe is not that great, but you should be close to line rate on that one
<mjg> i mean the support
<geist> it was annoying. basically ticked a bug in the eepro driver in freebsd that caused it to collapse back to a single queue
<geist> bcause it could't handle VLAN tagging + pppoe at the same time
<geist> and then that woud saturate a core
<geist> it was a well known problem that i think had no real solution
<mjg> :))
<geist> so even a fairly beefy rangeley atom would get saturated at 1Gb
<geist> but when i moved a couple years ago problem went away, no more pppoe with my cable modem
<mjg> so funny bit: things are so fast/slow that the memory allocator is a big part of the profile
<mjg> the code in it is terrible
<mjg> basically avoidable branche'z all over
<geist> yah i haven't looked into it but i assume a sizable chunk of the freebsd net stack is still IRQ context?
<heat> mjg, which allocator?
<heat> kernel?
<mjg> heat: ye, the uma code
<geist> i honestly dont know exaclty what 'modern' implementations of netstacks on unices (ie, bsd and linux) do nowadays re: irq vs thread context
<geist> classically it was the former, but that can't be the case as much anymore
<mjg> geist: yes and no. interrupts get acked quickly and then the work lands in interrupt threads
<heat> on linux it's all softirq
<geist> ah yeah and freebsd has a slightly different but some sort of functional irq thread thing
<mjg> ye it is thread conteøt
<geist> yah my normal instinct is to get that shit into a thread right away. doing it *really* efficiently is of course the hard part
<heat> linux essentially has special softirq for RX and TX with some budgeting on the network stack part
<mjg> btw, there is dtrace probes all over which compile to a branch
<mjg> compiling without it gives about 2% bump in pps rate
<geist> heat: yeah that's right. i vaguely remember reading about the softirq stuff at one poonit
<geist> it's on one hand pretty terrible, but on the other hand works well. as is lots of linux things
<geist> terrible solution optimized
<heat> it's actually pretty cute, the netif_* stuff works in more or less a polling way
<heat> interrupts purely raise the softirq and disable RX/TX irqs
<mjg> well maybe i ran into a weird corner case, but from my test the linux kernel stack was pretty shit
<heat> and then the softirq code keeps polling the netif for packets with some budgeting
<mjg> i'm guessing anyone serious about net perf on linux is using userstacks
<mjg> so the kernel side stopped getting love long time ago
<geist> heat: yeah, what i remember not liking as much as how much networking is baked into softirq mechanism, iirc
<geist> vs it being a generic solution for anything that wants to use it
<heat> mjg, cloudflare does just fine on the kernel stack
<geist> OTOH, networking is a major part of it
<heat> there is literally no user stack for them
<heat> geist, the coolest thing is their socket locking scheme
<mjg> is there a way you can get a flaemgraph from production?
<mjg> and share
<mjg> chancesa re not legally tho :p
<geist> i honestly dont know what google does and i couldn't share if i did
<heat> i'm not there anymore (yet)
<geist> but now i'm curious
<mjg> heat: maybe they share it somewhere
<mjg> heat: perhaps you could ask
<mjg> i think they used to do writeups about stuff?
<mjg> anyhow, for a sample wtf, search for clear_page in that flamegraph
<mjg> that was happening for mere ipv4 forwarding
<heat> when I possibly rejoin in a few months I'll see what I can do
<heat> getting flamegraphs was pretty easy though
<mjg> i don't rmeember numbers, but on *that* box, freebsd was faster
<mjg> i'm sure it was, the q is if you can leak them out :)
<mjg> which may happen to be true
<heat> you pretty much just opened a chat with a bot and asked it for a flamegraph for a specific service
<heat> and it gave you a link
<heat> automagically great
<heat> geist, i think it's pretty implicit that google does userspace networking
* geist nods
<geist> shows you how much i know about the core biz
<heat> tbf i'm not at all convinced that you should do userspace networking
<heat> it seems like an easy way out
<mjg> it does bypass tons of technical debt
<mjg> and quite frankly years of neggligence concerning performance
<mjg> even in linux
<mjg> that aside, one immeidate advantage is the ability to freely use SIMD
<mjg> at no extra cost
<mjg> if you wanted to match a userspace networking stack in the kernel, you would need to dedicated cpu cores to do it
<mjg> at which point you may as well have a user stack
<geist> or hardware stack really
<geist> like a custom asic that does it for you
<mjg> right
<heat> yeah but where would you plausibly use SIMD?
<mjg> they use some simd magic to match ip against several others *at the same time*, for example
<mjg> i don't know the specifics
<heat> who's they? pfsense?
<mjg> user stacks
<heat> ah
<mjg> you are inherently behind for not using simd. and even if you want to use simd, you pay for register save/restore
<mjg> which is again inhrently more expensive than not having to do it
<mjg> it is in fact so expensive i see it on the profile when pushing ipsec
<mjg> in freebsd
* heat nods
<heat> i guess you could pull it off in freebsd by just having special kernel threads that can do FPU?
<mjg> you would need a guarantee nothing else will schedule there
<mjg> and there is no support for it strictly speaking
<heat> why? to the 1st statement
<mjg> short of that guarantee you have to fuck with simd save/restore
<mjg> unless you somehow know for a fact the newly scheduled ghread does not use it
<mjg> liek ever
<heat> yeah, that's the point
<heat> kernel threads that do fpu save and restore on context switch
<mjg> that's part of the expensve one is trying to avoid here mate
<mjg> :]
<heat> why?
<mjg> because it shows on the profile
<heat> the userspace stack will also do fpu save and restore on ctx switch
<mjg> userspace stack wont have to save/restore squat if you let it run on cpus uninterrupted
<mjg> which is the usual setup
<mjg> see isolcpus on linux
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
<heat> right
<heat> i don't see why one could not do that for the kernel threads too
<heat> and the "do fpu save/restore when ctx switching" could still be a solid win I imagine, depending on how much one would use SIMD
<mjg> you can do it but at that point why are you doing kernel side networking?
<mjg> as in what's the upside
<mjg> the downside is that should it crash, the entire system goes down
<mjg> similarly you can't really upgrade without a reboot
<heat> you use a solid battletested 20-30 year old network stack with every tiny feature implemented
<heat> and you avoid going around kernel <-> userspace too much
<mjg> you mean slow
<mjg> L[
<mjg> you do realize user stacks don't do kernel trips
<mjg> nic rings are exported to uesrspace for direct access
<heat> you still need to hand it off to the other user processes somehow
<bslsk05> ​cgit.freebsd.org: src - FreeBSD source tree
<heat> and I don't imagine they can do ring buffer stuff there
<mjg> heat: user net stacks are puerfly for forwarding shit only
<mjg> heat: from one box to the next
<heat> mjg, haha
<mjg> only 2 remote users in the default install
<heat> who are bill and lynne here?
<heat> i imagine bill is bill joy or something?
<mjg> ye and i think his wife
Burgundy has joined #osdev
<heat> sun was a great company
<mjg> hm
<mjg> i take that back, i don't have good basis to guess
<mjg> can't be arsed to ask around either
<heat> bah, sorry
<heat> not joy, jolitz
<heat> these are probably the jolitzes
<mjg> ye that's who i meant
<mjg> geezers man
Burgundy has left #osdev [#osdev]
gog has quit [Quit: Konversation terminated!]
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
<mrvn> mjg: the same argument for network stacks goes for IO stacks. You might as well do a microkernel then.
gog has joined #osdev
Vercas has quit [Ping timeout: 255 seconds]
slidercrank has joined #osdev
qubasa has quit [Remote host closed the connection]
fedorafan has quit [Ping timeout: 252 seconds]
fedorafan has joined #osdev
xenos1984 has quit [Ping timeout: 252 seconds]
terminalpusher has joined #osdev
bnchs has joined #osdev
xenos1984 has joined #osdev
nikolar has quit [Quit: ZNC - https://znc.in]
nikolar has joined #osdev
ilovethinking has joined #osdev
<ilovethinking> hey hey hey
<ilovethinking> what's up guys and gals (not only gals this time)
<heat> good
<heat> i feel represented now
<ilovethinking> anyways are there any man users present
<ilovethinking> mac*
<ilovethinking> becaise i can't manage to set up grub and im sure someone has done it
poyking16 has joined #osdev
<ilovethinking> didn't search for it with "build"
<ilovethinking> thanks mr heat
<ilovethinking> i basically do the same the script does
<ilovethinking> yeah same error
<gog> mew
<lav> mew
<heat> colon four
<gog> :4
<lav> cat sound
<heat> cat.mp4
* gog patpatpatpat heat
* heat starts licking his balls
<heat> am i doing cat good
<lav> very good
Burgundy has joined #osdev
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
gorgonical has joined #osdev
<sham1> Isn't that more a dog thing?
<heat> no
<heat> cats lick themselves all over
<gorgonical> For the first time I have a real, actual osdev question
<bnchs> what is this revolutionary question
<gorgonical> So my kernel works in trustzone as a single-core kernel. I have figured out how to trick trusted-firmware into giving control permanently to the kernel. However, secondary cores have a problem
<gorgonical> Basically, the psci_cpu_on interface to bringup secondary cpus allows an entry point pc, but this is only meant for non-secure operation. As far as I understand it, there's no way for secure kernels to say "please enter here." This is becuase this isn't really how arm wants you to use trustzone
<gorgonical> So I have a few options: break the psci interface spec in the firmware, allow my firmware dispatcher to snoop and do some interception to transpose the non-secure entry point to the correct entrypoint field, or change the process that secondary cores enter the kernel with
<gorgonical> and I think the last option is the least bad. Instead of supplying a different PC to enter at, it might be straightforward to have a primary/secondary core flag that's pc-relatively addressed. The very beginning of head.S is just a fork to see if we're the boot core or not
ilovethinking has quit [Remote host closed the connection]
fedorafansuper has joined #osdev
fedorafan has quit [Ping timeout: 252 seconds]
<gorgonical> The silence is ambiguous on whether this is endorsement or condemnation of my idea
<mrvn> What's the point of running in trust zone?
<gorgonical> We are doing some research on trusted IO, so we want everything to be secured by trustzone hardware and such
<mrvn> But if everything is trusted you might as well have nothing in the trust zone
<gorgonical> Yes that's true. Connectivity and most peripherals will be handled by an untrusted kernel
<gorgonical> Reducing the amount of things that trusted boot has to sign off on and attestation must verify the state of is desirable
<mrvn> And if your trusted kernel only runs on one core what should other cores do when they get asked to switch to trustzone?
<gorgonical> mrvn: the thought is to have a static partition of x cores for linux, y cores for trustzone
<gorgonical> So the kernel will be multicore
<heat> gorgonical, it's just a very specific question that I can't really give valuable input to
<gorgonical> heat: I appreciate the input. The question is more about the last one
<gorgonical> I haven't read a million head.S files, so I don't exactly know if that's a thing people do
<heat> oh yes, that's totally a thing
<gorgonical> E.g. if you *can* provide a pc target for a core you're turning on, why shouldn't you?
<mrvn> My knowledge was that when you set a trustzone or hyprvisor kernel then all cores get started at the same entry point and it's your job to make that work.
<gorgonical> mrvn: that's right
<gorgonical> That's how the trusted firmware reference implementation does it, anyway
<heat> lk has that sort of thing on asm because aiui the firmware just gets all cores in the normal entry point
<heat> because PSCI etc is all firmware bullshit
<mrvn> So simply check the core ID and if it's an X core then leave the trustzone and if it's a Y core then stay in the trustzone.
<mrvn> And make your own "wait for core 0 to fiish bootstrapping" mechanism.
<gorgonical> mrvn: an important point -- I assume that whatever kernel you boot is responsible for actually issuing the psci_cpu_on call
<gorgonical> It's conceivable that the firmware does it and puts them in a holding pen, though
<gorgonical> I don't know exactly the control flow for tf-a
<mrvn> not to my knowledge. That holding pen is part of the trust/hypervisor kernel.
<mrvn> but that's probably all very hardware specific.
<gorgonical> Yeah. It seems that cores are off until the kernel issues it. So then boot core can easily serially bringup cores and I don't expect any ordering/race/holding pen stuff to be an issue
<mrvn> (more specifically firmware specific)
<mrvn> Not every SoC will have power control for every core. So there isn't even an on/off. The cores just all start.
<gorgonical> in some ways having a robust firmware substratum under the kernel makes a lot of things possible, but it also greatly expands the surface area you have to understand
<gorgonical> oooh I see what you mean. Hmm right I need to check on that. My impression is that we do have discrete power control but I need to make sure of that. Thank you
<mrvn> Does a trustzone kernel even get a device tree?
<gorgonical> Not by default, but you can easily supply one if you have u-boot in the loop
<gorgonical> It's pretty trivial to add a trusted dtb to the uboot image that gets loaded to where you want
<mrvn> and now you have to check how/if uboot brings up the cores and puts them in a holding pen.
<gorgonical> Now ironically the tee-enabled setups that uboot supports are op-tee specific so you have to modify uboot a little bit to actually put that information into the entry point information, but it can be done
<gorgonical> mrvn: this is just the uboot tpl/spl. Most of the el3 firmware is arm tf-a
<gorgonical> I would be surprised if the uboot tpl/spl is doing something like the holding pen itself
<gorgonical> the rk3399 has this wacky composite firmware for boot
bnchs has quit [Remote host closed the connection]
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
poyking16 has quit [Quit: WeeChat 3.7.1]
bgs has quit [Remote host closed the connection]
alethkit has quit [Changing host]
alethkit has joined #osdev
<dzwdz> hi again
<dzwdz> any ideas how i could set the CFLAGS with which libgcc is build?
<dzwdz> i tried setting them in make's arguments and in gcc's configure script, neither worked
<dzwdz> it seems to ignore the LIB_SPEC in gcc/config/*.h too
<heat> 1) why
<heat> 2) multilib, but it's probably the wrong solution
<dzwdz> i need to add another include path
<heat> but why
<dzwdz> my libc is split into two parts, the one used exclusively by userland, and another that's also used by the kernel
<dzwdz> i'm compiling libgcc against my libc, and the headers in my libc reference the shared headers
<dzwdz> which are in another directory
<heat> so either everything is in sysroot, in which case, it just works, or your headers are broken
<dzwdz> everything is indeed in sysroot
<dzwdz> /usr/include/include{,_shared}/
<heat> ok, so how does it break?
<heat> how does e.g #include <stdlib.h> not work
<dzwdz> that one does
<heat> what doesn't?
<dzwdz> wait whoops
<dzwdz> /usr/include{,_shared/
<dzwdz> #include <errno.h> doesn't, because /usr/include/errno.h references /usr/include_shared/myos/errno.h
<heat> ok, move your shared to under /usr/include, done
<heat> or keep using the weird layout and add the -I to your target spec
<dzwdz> as in, LIB_SPEC? or where
<dzwdz> if you mean LIB_SPEC i did that
<heat> no, LIB_SPEC is for linking
<dzwdz> oh
<dzwdz> whoops
<dzwdz> wait then what is LINK_SPEC for
<heat> also linking
<dzwdz> hmm
<dzwdz> for the record, the reason i have this weird reason is that i have other shared include files under myos/
<bslsk05> ​gcc.gnu.org: Spec Files (Using the GNU Compiler Collection (GCC))
<heat> fwiw your whole hierarchy seems broken
<heat> there is no reason to have include_shared
<dzwdz> that i don't want neither hanging around directly in /usr/include/ nor /usr/include/shared/myos/
<heat> you can have /usr/include and /usr/include/shared
<heat> why?
<dzwdz> both are messy in different ways
<dzwdz> i want to separate the headers specific to my os
<dzwdz> the same way libraries often make their own directory in /usr/include/
<heat> yes
<heat> how does that not work for you?
<dzwdz> but from the perspective of someone who just makes userland stuff, having some files be in <myos/...> and some in <shared/myos/...> is pretty damn weird
<dzwdz> that doesn't work because some of the myos/ headers are shared, and some are userland-only
<heat> user api stuff should go into something like bits/
<dzwdz> actually, do you know any resources on how i should layout my /usr/include/?
<dzwdz> i've been just winging that
<dzwdz> badly
<heat> no
<heat> i can tell you how linux does it
<dzwdz> sure
<heat> some headers (mainly standard libc headers, and maybe some other randos) get put in /usr/include
<heat> sys/ has a bunch of historical UNIX headers and mainly POSIX header stuff
<heat> some extensions too
<dzwdz> that's mandated by posix anyways, isn't it
<heat> yeah sure
<heat> bits/ has a bunch of target-specific and cpu-specific defines, structs, etc. sometimes even just includes linux uapi headers (like glibc). musl doesn't use kernel headers, it just defines them on its own
<zid`> musl is bad and should feel bad though
<dzwdz> what's bad about musl
<klange> musl is a libc for linux. Period. And that's the main thing that's bad about it.
<heat> then you have asm/ and asm-generic/ which has user api stuff directly from the kernel
<gog> it's musl to my ears
<heat> the names are AIUI mostly just a legacy thing
<gog> muesli
<klange> If you're willing to accept that and implement a Linux-compatible ABI, musl is pretty okay as far as libcs go - better than newlib for sure.
<gog> i'm gonna write my own libc
<dzwdz> i use it as reference sometimes, it's well written
<klange> I wrote my own libc. It's garbage. sortie wrote a libc, it's much better.
<heat> then ofc libraries create their own directories under /usr/include so openssl/, SDL/, etc
<gog> my libc will undoubtedly be garbage
<gog> although my printf isn't bad, just incomplete
<heat> dzwdz, it's frequently too clever
<dzwdz> hm, any examples?
<heat> all the DNS parsing code
<bslsk05> ​elixir.bootlin.com: intscan.c - src/internal/intscan.c - Musl source code (v1.2.3) - Bootlin
<zid`> is this the one we looked at before
<heat> good bits of the old malloc (the new one is much better and more readable)
<heat> yes
<heat> int bs = "\0\1\2\4\7\3\6\5"[(0x17*base)>>5&7];
<heat> look at this fucken line
<heat> bad variable names, single character variable names
<zid`> It's clearly marked as bullshit heat
<zid`> leave it alone
<heat> no comments!
<dzwdz> what the fuck
<zid`> musl is the Lada Riva of software
<dzwdz> is that supposed to be a log2 or something
<dzwdz> from the context it kinda looks like it
<heat> like, is all of this code correct? probably, dalias is very skilled and good at what he does
<heat> can I know for sure? absolutely fucking not
<zid`> it needs like 20 more static functions with some names
<zid`> and it'll be fine
<heat> and freaking *comments*
<zid`> even if it's just s/thing/ -> f(thing); where f() { return thing; }
<heat> they do not have comments almost anywhere
<zid`> then you can at least give names to the expressions
<zid`> bs_remove_space() or whatever yaknow
<dzwdz> just checked, that indeed is a log2
<zid`> bs_check_valid(char bs) { return lut[bs]; }
<zid`> bs_log2
<zid`> there, now you don't need to check
<dzwdz> i mean even if it was named it'd take you a bit to figure out why it works
<zid`> doesn't matter
<dzwdz> yes
<zid`> most code you have to read to figure out *how* it works, what's more important is knowing what it's doing
<dzwdz> i wonder how much (if) this is efficient than a more straightforward log2 implementation
<zid`> because a) that's just important and b) it makes the WHY it works much harder to grok, if you don't even know WHAT it's doing
<dzwdz> i suppose the straightforward implementation branches
<gog> who needs comments
<sham1> Comments are a crutch for bad identifier names
<zid`> correct sham1
<sham1> Documentation on the other hand is great
<dzwdz> if musl had comments i wouldn't have had the fun of figuring out what the hell bs is!
<gog> i will never document or comment
<dzwdz> musl is fun oriented
<zid`> bs_limited_range_ghetto_log2 would have made that immediately clear
danilogondolfo has quit [Remote host closed the connection]
<sham1> Abbreviations are also terrible. Although wouldn't bs be block size in this case?
<sham1> Probably not bullshit though
<dzwdz> bitshift
<sham1> Okay, so it's bullshit. Why not call it bitshift
<zid`> int sa; /* Shift amount */
xenos1984 has quit [Read error: Connection reset by peer]
<dzwdz> i wonder
<zid`> what do we feel about that sham1
* sham1 grumbles about hard 80 column rules
<zid`> bad name but with a comment giving it a better one
<dzwdz> because you could replace the bs=log2(base);asdf<<bs; with just asdf*base
<sham1> That doesn't show up in any autocomplete now does it
<dzwdz> what architectures suck at multiplication
<zid`> the good ones
<heat> obviously it should be named s
<dzwdz> sham1: tbf the variable is only used in like the next 3 lines
<heat> for shift, or alternatively, sex
<sham1> Like if the name is a loop index counter or something, I won't lose sleep over something like "i", especially since it's so well known
<dzwdz> i think that if log2 was separated out, bs would be fine
<sham1> But come on, you have smart editors, you don't need to save keystrokes by shortening identifiers
<dzwdz> even without any comment
<zid`> I like a nice short identifier
<zid`> as long as I know what they are
<dzwdz> you immediately see that it's used for a bitshift below the declaration
<heat> brelse!!!!!111111111!!!!1111111
<mrvn> dzwdz: for a log2 approximation just count leading zeroes.
<sham1> Wouldn't that be what is happening?
<sham1> Like in the code anywau
<dzwdz> pretty much
<dzwdz> base is always a power of two
<mrvn> "IIint bs = "\0\1\2\4\7\3\6\5"[(0x17*base)>>5&7];" isn't counting leading zeroes
<dzwdz> wouldn't counting leading zeroes require branches on some archs?
nikolar has quit [Remote host closed the connection]
<mrvn> gcc/clang have a builtin for it. If it can be done without branches then it will
<mrvn> modern cpus have an opcode for it
<dzwdz> and this can always be done without branches
<dzwdz> which i assume was the intention of whoever wrote it
<mrvn> it requires 5+ ops and a memory access.
<mrvn> Way slower than a well prediected branch
<dzwdz> roughly how long does a read from l1 take compared to a single instruction?
Matt|home has joined #osdev
<mrvn> Who says it's in l1?
<dzwdz> me :)
nikolar has joined #osdev
<dzwdz> i'm just curious what the best case would be
<zid`> few ns
<dzwdz> i think with counting zeros the best approach would be something like 3 branches, 10ish instructions
<mrvn> what are you asking? latency? duration? delay? number of fetches run in parallel?
<zid`> clz needs a fuck load of branches
<dzwdz> that's a good question and i have no clue
<mrvn> dzwdz: log2 = 64 - leading_zeroes(base); Where is there a jump?
<dzwdz> in leading_zeroes
<bslsk05> ​www.7-cpu.com: Intel Haswell
<mrvn> dzwdz: that's an opcode
<gorgonical> Says that the l1 hit latency is 4 cycles
<dzwdz> gorgonical: ty
<dzwdz> mrvn: but not everywhere, right?
<dzwdz> i assume that's the reason why the code doesn't just read `int bs = log2(base)`
<zid`> aida reads my l1 as 1.1ns away
<moon-child> is more like 5 cycles now
<moon-child> generally
<zid`> at 5ghz that's 5 cycles :P
xenos1984 has joined #osdev
<moon-child> caches got bigger, clocks got higher, more stuff is in between...
<zid`> I don't dare run aida on my current machine
<zid`> it will be depressing
<moon-child> aida?
<heat> dzwdz, log2 can be a stupid simple single instruction or 100
<heat> depends on the arch
<gorgonical> I'm about to run the phoronix test suite on my desktop
<gorgonical> I am not confident
<zid`> lol okay I ran it
<moon-child> why phoronix?
<zid`> My dead desktop: 60GB/s memory read
<zid`> My current desktop: 12GB/s
<gorgonical> I can't find a linux version of aida64
<gorgonical> The only one is for the ubuntu store
<zid`> The cache is slightly faster at least though, cus it's way newer
<gorgonical> moon-child: if you have an alternative suggestion I'll gladly run that
<mrvn> heat: a simple loop going from 1<<0 to 1<<63 takes few instructions
<moon-child> alternative to what? What are you looking for?
<gorgonical> a cache latency thing
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
<zid`> ECC: Not supported, Error Detection Method: ECC
<zid`> that's the saddest part
<mrvn> By the way: For malloc you probably want to check for size <= 16 and size >= 64k (or so) and only log2() otherwise.
<bslsk05> ​pvk.ca: Linear-log bucketing: fast, versatile, simple - Paul Khuong: some Lisp
<zid`> heat: https://cdn.discordapp.com/attachments/417023075348119556/1078456096575995955/image.png re you finding out that people put licence keys in acpi
<zid`> #9, SLIC
<mrvn> moon-child: that uses __builtin_clzll(x);
fedorafan has joined #osdev
<moon-child> it uses it. But it is not the same as it
<mrvn> indeed. it uses a bit of fraction of the log2
<moon-child> no
<moon-child> it's a floating point format
<moon-child> the exponent is the log2. The significand bits come from the actual size, not its log
<mrvn> bins for 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, ... that's not just the integer part of log2()
<moon-child> (exponent is the truncated log2, I should say)
<moon-child> it's the integer part of log2(n) and the high bits of n. Not the integer part of log2(n) and some of the fractional bits of log2(n)
fedorafansuper has quit [Ping timeout: 252 seconds]
<mrvn> that's aproximatively the same
<moon-child> that's why it's log-_linear_ bucketing. For a given lzcnt, the buckets are linearly spaced
<moon-child> it's not the same at all
<mrvn> it's a fair enough approximation of log2() with 2 or 3 fractional bits and works out to even nicer bucket sizes.
<heat> lazy cnt
<mrvn> All this bucket searching is probably something for the header so the compiler can compute that at compile time in many cases.-
<mrvn> especially for c++ where you allocate more objects.
terminalpusher has quit [Remote host closed the connection]
<moon-child> yes, this is something I planned to do in my malloc
<moon-child> ...if I ever get around to working on it
<moon-child> __builtin_constant_p helpful here
nikolar has quit [Quit: ZNC - https://znc.in]
<moon-child> one annoying thing is I need special handling for tiny things (say, <16). __builtin_constant_p(x >= 16) seems to work in some cases. However, the more common case is malloc(16 * n) (for n the array length, 16 the element size). In which case I need __builtin_constant_p(n==0||n>=16)
<moon-child> I don't remember if it could do that or not, but it definitely couldn't do it when 16 is not a power of two, because of overflow
<clever> that reminds me of some cheating gcc did on me ages ago, i was using sin and cos with constants, so gcc just filled the answers in, and didnt link to libmath
<clever> when things became variables, link error!
k8yun has joined #osdev
nikolar has joined #osdev
k8yun has quit [Max SendQ exceeded]
k8yun has joined #osdev
gog has quit [Ping timeout: 255 seconds]
k8yun has quit [Max SendQ exceeded]
k8yun has joined #osdev
<mrvn> clever: my sin/cos is a template generated table looklup
<mrvn> fixed point math for the RPi1
<mrvn> "The oldes computer was owned by Adam and Eve. It was an Apple with very limited memory. One bite and it crashed."