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
<gog> maybe i'll do some osdev during this week off
<mcrod> what
<gorgonical> that's why I bought a steam controller
<heat> out of the box, and even after installing custom drivers it does not work
<mcrod> redshift is a night light thing
<mcrod> for DEs/WMs that don't have night light natively (e.g., i3)
<zxrom> OS development was easier 40-50 years ago. An OS for a ZX Spectrum or an Atari 8-bit could be written alone in a few months.
<mcrod> also I'm highlighting some poor bastard
<gog> i plugged my wife's xbox controller into my computer with a usb-c cable and it worked immediately
<mcrod> which OS
<gog> manjaro
<gorgonical> i use slackware and have had no problems
<heat> 40 years ago is more or less right in the original berkeley CSRG BSD stuff
<heat> and that most definitely cannot be written in a few months
<mcrod> also, it is exceedingly difficult to customize i3 to the level the r/unixporn people do
<gog> is that practical tho
<heat> gog, mine is too new to work
<heat> with bluetooth, with usbc, nothin works well
<mcrod> gog: sure
<gog> i used to do these fancy desktop things but i found them to be cumbersome
<gog> probably just me tho
<gog> i'm very set in my ways i think
<gorgonical> the peak of desktop ui was windows 98 and I stand by that
<mcrod> i love you.
<kof123> cray had a quote ...you could do whatever you wanted in the 50s/60s or so, because noone "knew" what an OS was
<mcrod> I've said that for 10 years
<mcrod> how do people trick out nvim to do all of this fancy shit too
<heat> i like windows 11
<mcrod> really, I swear it must take WEEKS
thinkpol has joined #osdev
<gorgonical> eeeeeeeeeeeemacs
<mcrod> i've always been a bit fascinated at how sleek some of the r/unixporn (sorry) stuff looks
<mcrod> except no one documents anything
<gorgonical> i think of that stuff like the actors in weight loss infomercials. they've posed this sleek shot which is not really representative of how it feels when using it for real
<heat> yeah exactly like po-yes yes weight loss infomercials exactly
<mcrod> fair comparison
<mcrod> https://github.com/jdhao/nvim-config stuff like what this guy has though, you can't tell me it doesn't look useful
<bslsk05> ​jdhao/nvim-config - A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more... (420 forks/2462 stargazers/MIT)
<heat> i use vscode, and it works
<mcrod> yeah yeah I get it
<heat> i'm happy that my thing works
<mcrod> i won't lie to you though, I'm almost hopeless without an IDE
<mcrod> I actually haven't needed to type anything in gdb other than bt full in.. an embarrassingly long time
<mcrod> and why would you *want* to type something in gdb anyway?
<heat> i do
<heat> its faster
<mcrod> the fuck you mean it's faster
<heat> debugger GUIs suck ass
<mcrod> so do you set breakpoints with commands?
<heat> and it's not like I need more than bt and print anyway
<heat> yeah, in the rare occasion i need one
<heat> usually for my kernel needs it works like a post-mortem tool
<mcrod> i see
<heat> there's no way it's useful for a highly concurrent environment where things like memory may not even be concurrent due to bugs
<heat> err, coherent in that second concurrent
<heat> gdb does not tell you if your TLB is fucked
nyah has quit [Quit: leaving]
mavhq has quit [Ping timeout: 250 seconds]
<gog> mcrod: i love you too
<mcrod> <3
leon has quit [Ping timeout: 240 seconds]
<gog> LESS THAN THREEEEEEEE
<heat> all im getting is garbage ideas on radix tree iteration
energizer has quit [Remote host closed the connection]
energizer has joined #osdev
mavhq has joined #osdev
<gorgonical> since it's thursday and for many people that's basically friday I want to ask a casual question
<gorgonical> if you could instantly and effortlessly learn another human language what would your pick be
<zid> english
<gorgonical> interesting choice
<zid> I'm not legally allowed to speak a second language
<zid> but maybe I'd be better at scrabble
<gorgonical> zid's like robert tappan morris and has been forbidden from speaking english for fear of wreaking too much havoc
leon has joined #osdev
dutch has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
heat_ is now known as heat
<heat> probably russian
<heat> i'll learn it one day i'm sure
<heat> through sheer interest and/or invasion
<gorgonical> heat I thought you were in Britain
<gorgonical> unless you think Russia has got some big plans
<heat> i'm not quite in britain
<heat> slowly getting colonized by the english though
<gorgonical> I would probably pick Finnish. I had a go of learning it but without a reason it becomes a sort of slog after a while
<heat> romanian would also be fun
<gorgonical> some very fascinating linguistic changes in romanian. Like lingua -> limba, that's a pretty big change
<zid> imagine learning romanian though
zxrom has quit [Read error: Connection reset by peer]
<zid> tens of thousands of hours of effort, so that you could be mauled by street dogs and get robbed
<gorgonical> yeah but you could tell a lot of people about vlad the impaler from all the source text you can now read
zxrom has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
gog has quit [Ping timeout: 250 seconds]
goliath has quit [Quit: SIGSEGV]
<bslsk05> ​'Down memory lane: Two decades with the slab allocator -- Bryan Cantrill' by Systems We Love (00:24:14)
nvmd has quit [Quit: WeeChat 3.8]
smeso has quit [Quit: smeso]
[itchyjunk] has quit [Read error: Connection reset by peer]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
smeso has joined #osdev
randm has quit [Remote host closed the connection]
randm has joined #osdev
radens has quit [Quit: Connection closed for inactivity]
heat has quit [Ping timeout: 240 seconds]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
bradd has quit [Quit: No Ping reply in 180 seconds.]
bradd has joined #osdev
slidercrank has joined #osdev
DanDan_ has joined #osdev
slidercrank has quit [Ping timeout: 250 seconds]
gmacd has joined #osdev
mi7 has quit [Quit: leaving]
osmten has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
innegatives has joined #osdev
gmacd has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
dayimproper has joined #osdev
innegatives has quit [Quit: WeeChat 3.8]
gmacd has quit [Ping timeout: 240 seconds]
danilogondolfo has joined #osdev
GeDaMo has joined #osdev
slidercrank has joined #osdev
dza has quit [Remote host closed the connection]
dayimproper has quit [Ping timeout: 268 seconds]
<moon-child> mjg: you had a nice paper about locks right?
<zid> I also have a nice paper about waterway management
<moon-child> ty zid very helpful
<zid> I am a tricksy imp
kivikakk has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<sham1> Imba imp
<zid> not heard imba in a while, we shifted to op
slidercrank has quit [Ping timeout: 250 seconds]
dza has joined #osdev
slidercrank has joined #osdev
sm2n has quit [Remote host closed the connection]
patwid has quit [Remote host closed the connection]
alethkit has quit [Remote host closed the connection]
yyp has quit [Remote host closed the connection]
alecjonathon has quit [Remote host closed the connection]
staceee has quit [Remote host closed the connection]
exec64 has quit [Remote host closed the connection]
yuiyukihira has quit [Remote host closed the connection]
whereiseveryone has quit [Remote host closed the connection]
noeontheend has quit [Remote host closed the connection]
pitust has quit [Remote host closed the connection]
milesrout has quit [Remote host closed the connection]
listentolist has quit [Remote host closed the connection]
tom5760 has quit [Remote host closed the connection]
vismie has quit [Remote host closed the connection]
tommybomb has quit [Remote host closed the connection]
jleightcap has quit [Remote host closed the connection]
gjn has quit [Write error: Broken pipe]
utzig has quit [Remote host closed the connection]
ddevault has quit [Write error: Connection reset by peer]
osmten has quit [Quit: Client closed]
utzig has joined #osdev
listentolist has joined #osdev
yuiyukihira has joined #osdev
jleightcap has joined #osdev
sm2n has joined #osdev
patwid has joined #osdev
alethkit has joined #osdev
pitust has joined #osdev
noeontheend has joined #osdev
alecjonathon has joined #osdev
vismie has joined #osdev
whereiseveryone has joined #osdev
ddevault has joined #osdev
staceee has joined #osdev
tom5760 has joined #osdev
gjn has joined #osdev
tommybomb has joined #osdev
milesrout has joined #osdev
yyp has joined #osdev
exec64 has joined #osdev
nyah has joined #osdev
LostFrog has joined #osdev
PapaFrog has quit [Read error: Connection reset by peer]
kof123 has quit [Ping timeout: 258 seconds]
<mjg> moon-child: me? no
<mjg> moon-child: but maybe you are talking about the mcs one
osmten has joined #osdev
<moon-child> maybe? I recall something that explained fairness/throughput and possibly also numa nicely
osmten has quit [Client Quit]
<zid> My document also covers fairness/throughput
<bslsk05> ​'Archimedes and a Boat Lift: the Falkirk Wheel' by Tom Scott (00:02:28)
goliath has joined #osdev
pounce has quit [Ping timeout: 256 seconds]
gog has joined #osdev
kof123 has joined #osdev
<gog> henlo
<zid> chimkens
<gog> :o
<gog> i had chimkens for dinner last night
<gog> with broccoli and mushroom and cashews and sriracha soy
<zid> broncoli and mashrom
<gog> yes
<zid> That sounds nice without the brocoli
<zid> I just had.. oven pizza and vindaloo dipping sauce
<gog> u don't like broc?
<gog> dang
<zid> vegetale is evil
<gog> whaaaaaaaaaaat
<zid> https://ui.assets-asda.com/dm/asdagroceries/5057172201662_T1?defaultImage=asdagroceries/noImage&resMode=sharp2&id=klyRB3&fmt=jpg&dpr=off&fit=constrain,1&wid=256&hei=256
<gog> i'm getting sushi tonight
<gog> i had pizza on tuesday
<zid> I can't afford real food
<zid> I have to make pretend food
<gog> :(
<gog> pizza is good tho
<zid> it's not real pizza
<gog> you can eat it tho right?
<zid> barely
<gog> it has cheese and crust and sauce
<zid> There's a big range between 'has cheese' and 'is good takeaway pizza'
Brnocrist has quit [Ping timeout: 268 seconds]
Brnocrist has joined #osdev
osmten has joined #osdev
<zid> (spotted in cambridge recently)
danilogondolfo has quit [Ping timeout: 240 seconds]
danilogondolfo has joined #osdev
<gog> what is this
<zid> a ketraffe.
<gog> ok
<gog> oh ket as in ketamine
<zid> apparently ketamine turns your hooves into gentleman sausages
<zid> til
<gog> no thanks
* zid makes a note: Apparently has hooves
<bslsk05> ​rtic.rs: Preface - Real-Time Interrupt-driven Concurrency
Jari-- has joined #osdev
<Jari--> hi al dudes
<Jari--> hows menuetos doing?
<gog> there was a release 2 days ago
<bslsk05> ​'MenuetOS (64bit, 100% asm) - Some games' by MenuetOS 64bit (00:00:46)
<Jari--> Googles YouTube is buggy
<gog> this is a video from 6 years ago
<Jari--> get some demo up, thats cool
<Jari--> gog: this I was looking for, a demo
<gog> you could try the latest yourself if you're that curious
Turn_Left has joined #osdev
awita has joined #osdev
<Jari--> yeah
<Jari--> not but later maybe
xenos1984 has quit [Remote host closed the connection]
xenos1984 has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
<gog> meow
dutch has quit [Quit: WeeChat 3.8]
dutch has joined #osdev
Jari-- has quit [Ping timeout: 250 seconds]
friedy has joined #osdev
Gooberpatrol66 has quit [Remote host closed the connection]
Gooberpatrol66 has joined #osdev
osmten has quit [Quit: Client closed]
PublicWiFi has joined #osdev
friedy has quit [Quit: Client closed]
dude12312414 has joined #osdev
<Ermine> gog: may Inp
<Ermine> erm
<Ermine> s/Inp/I pet you/
<bnchs> may i pet gog
<zid> may Input you
friedy has joined #osdev
heat has joined #osdev
<gog> :|
<gog> Ermine: bnchs: yes
* Ermine pets gog
* gog prr
<gog> mouse rat
friedy has quit [Quit: Client closed]
<zid> I'm using a hamster lately
<zid> I kept fucking up the cables on my mice
<zid> I figured it'd be really shit, but it's actually only marginally shit
<gog> me too
pounce has joined #osdev
Brain__ has joined #osdev
DynamiteDan has quit [Excess Flood]
DynamiteDan has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Brnocrist has quit [Ping timeout: 246 seconds]
slidercrank has quit [Ping timeout: 240 seconds]
slidercrank has joined #osdev
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
DanDan_ is now known as DanDan
bauen1_ has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
frkazoid333 has quit [Ping timeout: 250 seconds]
awita has quit [Ping timeout: 250 seconds]
tiggster has joined #osdev
gmacd has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
dude12312414 has joined #osdev
xenos1984 has joined #osdev
<mcrod> hi
Matt|home has quit [Quit: Leaving]
frkzoid has joined #osdev
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
Arthuria has joined #osdev
Brnocrist has joined #osdev
Matt|home has joined #osdev
* geist yawns
<geist> good morning everyone
<geist> it's friday!
<sham1> Yeah!
<geist> unless you're in au or nz in which case it's probably saturday, but saturday is caturday which is just as good
gmacd has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
crankslider has joined #osdev
<mcrod> or your time zone is EST :p
bgs has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
gorgonical has quit [Remote host closed the connection]
slidercrank has quit [Killed (NickServ (GHOST command used by crankslider))]
crankslider is now known as slidercrank
crankslider has joined #osdev
gorgonical has joined #osdev
<gorgonical> I overslept this Friday. It was an accident, I swear!
gmacd has joined #osdev
bgs has quit [Remote host closed the connection]
<heat> hi
hmmmm has joined #osdev
<mcrod> heat: may I pet you
<heat> sure
* mcrod pets heat
* heat pull requestsssssssss
* mcrod dies
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gmacd has quit [Ping timeout: 268 seconds]
gmacd has joined #osdev
<geist> more like pet requests
innegatives has joined #osdev
gmacd has quit [Ping timeout: 250 seconds]
<heat> geist you never told me how you get your symbols in zircon
<heat> i assume thru the bootloader?
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<geist> what do you mean get the symbols?
<heat> i'm assuming zircon can do addr -> symbol matching?
<heat> at runtime that is
<geist> no, not at all
<heat> oh
<geist> we have some external scripts to symbolify a kernel dump
<foudfou> hi all, stuck at making my 32-bit x86 xv6-like toy OS a higher half kernel. OS includes a bootloader (i.e. no GRUB) and kernel is a flat binary (i.e. no symbols). Switching page dir after mapping memory fails because EIP=00100a32 which is not mapped yet, I think. What am I missing?
<geist> you can basically paste it into a script that does it automatically
<geist> there's a structured output of the way kernel dumps backtraces that it groks
* heat nods
<geist> foudfou: did you when setting up the initial page table also make sure the code where the cpu is currently running is identity mapped (ie, 1:1 mapping?)
<geist> thats a common trick yo uhave to do, then onc eyou 'bounce' to the higher part of memory you can unmap it
<heat> i think i'm stuck committing linking warcrimes until one of the linkers grows a "please put symbols here" option
<heat> also: vbar trick but in IDT? :v
<geist> eyah but not worth confusing a new person over
<heat> it's probably too limited and won't work when switching modes
<heat> still a fun option tho
<geist> on x86 i dont think it's worth it, honestly, the complexity of doing that particular trick is more trouble than it's worth
<geist> for arm and riscv it may be better, since there are less exception vectors, and it's easier to point it somewhere arbitrary
<geist> so yeah, genera stratey is to leave the 'bottom' part of memory identity mapped in the first page table you set up, so that as soon as you turn it on the cpu can keep running at the low address
<geist> then a few instructions later, jmp to the higher address and then you can unmap the bottom
<bslsk05> ​github.com: os-dev/kernel_entry.asm at higher-half · foudfou/os-dev · GitHub
<bslsk05> ​github.com: os-dev/paging.c at higher-half · foudfou/os-dev · GitHub
<geist> something like that yes
<geist> i cant tell you if that code works, but it looks like at least in comment that it's trying to do what i'm describing
<gog> hi
<heat> foudfou, do you know where you're faulting?
<foudfou> i suspect the pb is in the stack: the page dir switch happens in a function, so lower addresses are still on the stack
<heat> where are you faulting?
<heat> what function does EIP point to?
<foudfou> heat: yes. right after the switch: EIP=00100a32
<foudfou> 80100a2f: 0f 22 d8 mov %eax,%cr3
<foudfou> 80100a32: 90 nop
<heat> which switch?
<geist> yeah that's a pretty strong indicator that you're not setting up the page tables right
<heat> ok i see the problem, that's already in C
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<heat> you keep running in lower mappings, then create a page dir without those identity mappings, it blows up
<foudfou> heat: the second one (1. is before main(), 2. after setting up paging)
<geist> ah yeah. you need to probably do all of this in asm, that initial setup asm
<heat> enter higher half mate
<geist> set the cr3, enable paging, then immediately branch to the high address, *then* enter C
<heat> he does all of that except branching to a high address
<geist> yep. looking at the code now
* geist goes afk for a bit
<geist> almost there!
rorx has quit [Ping timeout: 268 seconds]
<foudfou> yes, that's what I'm attempting to do https://github.com/foudfou/os-dev/blob/higher-half/kernel/kernel_entry.asm#L54, but that actually translates to
<bslsk05> ​github.com: os-dev/kernel_entry.asm at higher-half · foudfou/os-dev · GitHub
<foudfou> 1c: e8 4a 06 00 00 call 0x66b
<heat> yess, calls are relative
<heat> try something like "mov eax, main; call eax"
* foudfou trying
gmacd has joined #osdev
<foudfou> so much better <3
gmacd has quit [Ping timeout: 268 seconds]
<heat> nice!
<gog> heat
<heat> gog
gmacd has joined #osdev
<Ermine> heat gog
<foudfou> all my gratitude heat and geist <3
<heat> you're welcome
<Ermine> Trying to build gcc 8. But nowadays sys/mount.h and linux/fs.h conflict
<Ermine> el-risitas.mp4
gmacd has quit [Ping timeout: 268 seconds]
<Ermine> I hope removing one of them is correct way to go
<heat> why is gcc 8 including <linux/fs.h>?
<heat> or sys/mount.h ...
<Ermine> sanitizer includes it
<sham1> Why is sanitizer including <linux/fs.h> or sys/mount.h
<heat> to intercept functions
<heat> yeah i have no good solution except fixing the headers or patching up the source code
<sham1> Also, isn't gcc 8 ancient?
<heat> wait, this is alpine right?
<sham1> Hmm, actually not that ancient
<Ermine> no, i'm on fedora rn
<Ermine> I need relatively ancient compiler for relatively ancient code
<heat> the two headers not being compatible is odd then
<heat> yeah i have no problems here
<Ermine> ttps://sourceware.org/glibc/wiki/Release/2.36
<bslsk05> ​sourceware.org: Release/2.36 - glibc wiki
<heat> "It has been fixed upstream and backported to 2.36 release branch."
<mcrod> i wonder if it's ever worth it to use a different libc version than provided
<Ermine> heat: yes, and this confuses me even more
<heat> i'm on glibc 2.37
<bslsk05> ​paste.sr.ht: err.log — paste.sr.ht
<mcrod> i.e., if you want to use glibc 2.37 but the distro ships glibc 2.36
<Ermine> fedora 38 ships 2.37
<mcrod> I would think it'd be black magic to use a libc that isn't from the _system_
<heat> are you sure you're on 2.37?
<Ermine> Yes
<heat> /usr/lib64/libc.so.6 | grep version
<Ermine> Yes, it gave 2.37
<heat> 30ec2b68d65180c81df71f6c8a062d88d6660f29 /usr/include/sys/mount.h
<heat> sha1sum
innegatives has quit [Quit: WeeChat 3.8]
<Ermine> 30ec2b68d65180c81df71f6c8a062d88d6660f29 /usr/include/sys/mount.h
<heat> dis bizarre
<heat> are u building against old headers accidentally or something?
<heat> my test was just a main.c: '#include <linux/fs.h>\n#include <sys/mount.h>\n' cc -Wall -Wextra
gmacd has joined #osdev
<Ermine> It works
<Ermine> Maybe gcc has its own old headers
<Ermine> in some include-fixed directory?
<heat> i dont know?
<heat> you should look at the gcc invocation for that file and try and figure that out
gmacd has quit [Ping timeout: 265 seconds]
<Ermine> Do not want. Removing sys/mount.h include helped.
<heat> nice
dude12312414 has joined #osdev
friedy has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
friedy has quit [Quit: Client closed]
rorx has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 265 seconds]
thatcher has quit [Remote host closed the connection]
thatcher has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 250 seconds]
gmacd has joined #osdev
<mrvn> mcrod: it's easy to use a different glibc in a chroot.
<Ermine> Now I wonder why gcc has its own sys/mount.h
<heat> i don't think it does?
<mcrod> mrvn: yeah but why the hell would you ever want to
<Ermine> heat: find . -name mount.h -print: ./build/prev-gcc/include-fixed/sys/mount.h ./build/gcc/include-fixed/sys/mount.h ./build/stage1-gcc/include-fixed/sys/mount.h
<heat> i don't have an include-fixed for that locally
<heat> even then, those are autogenerated I think
* Ermine shrugs
<heat> thru fixincludes
<Ermine> Ah, breakincludes
<Ermine> I thought about other meaning of 'fixed'
<heat> tbh i don't understand what fixincludes does
<bslsk05> ​ewontfix.com: EWONTFIX - Breakincludes
<heat> ok its just a bunch of weird hacks for weird systems
<mrvn> mcrod: because binaries will be linked against it
gxt__ has quit [Ping timeout: 240 seconds]
gxt__ has joined #osdev
<mcrod> heat: writing pure posix sh is pain
<heat> that's because you su-
<mcrod> unfortunately, cmake -S . -B build -G Ninja "${CMAKE_BUILD_FLAGS}" is causing a ' to be prepended and appended to the cmake command, causing it to generate shit ninja files which ninja then complains about
<heat> you are good and valid
<mcrod> thanks.
<mcrod> mrvn: wait, you're not suggesting statically linking glibc are you?
<heat> lmao
<heat> "why does my dns not work"
<heat> mcrod, btw what?
<mcrod> you heard me
<heat> show sauce
<mcrod> yeah yeah hang on
<bslsk05> ​pastebin.com: #!/bin/sh## SPDX-License-Identifier: MIT## Copyright 2023 Michael Rodrig - Pastebin.com
<heat> where's the ''?
<heat> can u give me some output
<bslsk05> ​pastebin.com: + printf 'Have you installed this software? [Y/N] '+ read -r REPLYy+ expr - Pastebin.com
<heat> my man that's just normal quoting
<heat> + printf 'Have you installed this software? [Y/N] '
<heat> where you have "Have you ..."
<mcrod> listen
<mcrod> i know how it sounds
<mcrod> what I do know is that if I run the script, CMake generates the ninja shit then bombs
<mcrod> if I type the command manually, it works fine
<heat> what's "bombs" here
<bslsk05> ​pastebin.com: Building and installing CMake v3.26.4, this may take a while.+ cd build+ '[' - Pastebin.com
<mcrod> didn't happen with bash
<mcrod> let me diff this
Arthuria has quit [Ping timeout: 256 seconds]
<mcrod> ...
<heat> DAWG CMAKE_BUILD_FLAGS IS USED BY CMAKE???
<heat> am i seeing this correctly?
<mcrod> yes
<heat> hahahahahaha
<mcrod> er wrong one
<bslsk05> ​pastebin.com: ❯ diff build/CMakeFiles/rules.ninja bbuild/CMakeFiles/rules.ninja1120c1120< - Pastebin.com
<mcrod> left is broken, right is working
<mcrod> i think this is giving me a stroke
<heat> can you check if -a or allexport is set?
<heat> (in bash)
<heat> i don't see why it should be set, but it seems that it is
<mcrod> welllllll
<mcrod> a) I'm on zsh
<heat> can zsh be sh?
<mcrod> god ok
<mcrod> hang on
<mcrod> it is now, launched from zsh
<heat> i want you to check it in your script
<mcrod> oh.
<heat> also, is it possible you accidentally set this exported and now its in your environment?
<mcrod> i doubt it, but one second
<heat> printenv CMAKE_BUILD_FLAGS
<mcrod> doesn't say shit via command line
<mcrod> through the script it looks like it just kills the script
gmacd has quit [Ping timeout: 250 seconds]
<heat> ok 1) good 2) confusing
frkazoid333 has joined #osdev
<mcrod> does this script work for you
<mcrod> ./build_toolchain.sh --target-dir=target --staging-dir=staging --use-lto --verbose if you want
<heat> i know its my script
<heat> :p
<mcrod> influenced
<mcrod> not *yours*
<mcrod> :(
<mcrod> but yeah, no idea.
<heat> found the problem
<heat> you're quoting the string
<heat> it's seeing "-DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=""${TARGET_DIR}""/cmake"
<heat> and then thinks CMAKE_BUILD_TYPE="Release -DCMAKE_INSTALL_PREFIX....."
<heat> do not blindly quote things
<heat> word splitting is definitely what you want here
<heat> yeah, removed the quoting and it works
danilogondolfo has quit [Remote host closed the connection]
<kof123> for shell i always like to put: options/variables functions then there is an implied main() after the functions
<kof123> and alphabetize functions, to keep things orderly
gmacd has joined #osdev
<heat> alphabetize functions?? haha that's going too far
<heat> i wouldn't even alphabetize includes if clang-format didn't do it for me
<geist> yeah same. i used to try to collect them by some sort of logic
<geist> but kinda just bleh about it and alphabetize
<geist> though i still do like to do the trick where if a foo.c has a corresponding foo.h, include it first by itself
<geist> as a test to make sure the foo.h has the appropriate subincludes
<kof123> heat: i said shell :D my c89 is one function per file lol
<kof123> but you can just make an all.c and include them all. im not sure i see the purpose of "one-header-full-of-code libraries"
<heat> you're either a libc person exclusively or you're NUTS
gmacd has quit [Ping timeout: 240 seconds]
<geist> yeah one function per file is pretty extreme
<geist> only real reason to do that is if you're making a .a file and you are using old tooling
<kof123> i dont get heat's comment. what about libc?
<heat> libcs are usually laid out like that
<kof123> :/
<heat> because of the libc.a
<kof123> double :/
<heat> in theory you want to bring in as little .a members as possible
<kof123> oh, ok, that makes sense
Turn_Left has quit [Read error: Connection reset by peer]
<heat> this is important particularly in libc.a because people usually don't pass --gc-sections or whatever
<geist> right exactly
<geist> otherwise there's not as much reason to do that, and with more functions in a single .c or .cc or whatnot you can use local static functions that get inlined better, etc
<geist> or anon namespace in C++, etc
<heat> yeah, and it's logically easier to go through as a hooman
<kof123> thats an editor issue
<geist> i mean if i saw a project that hard core made a separate .c file for every function for no obvious reason i'd definitely think that was exceptionally weird. not sure i've ever seen that
<geist> i've seen the opposite where everything is one mega .c file for no apparent reason either, but there's maybe some minorly decent reason for that, maybe
<heat> ultra mega large .hpp 4lyfe
<heat> i have a modern C++ single-header json parser in my tree. all files that include it blow up the compile time
<geist> usually the mega .c projects are old, like from the late 80s or early 90s
<geist> and just never got broken up, probably because they have tons of globals and whatnot and splitting it all up would be a pain
<mcrod> god fuck
<mcrod> I fucking followed shellcheck and it fucked me
<heat> god fuck indeed.
<heat> you can't blindly follow shellcheck without understanding what they're saying
<mcrod> yeah yteah I know
<mcrod> *yeah
<mcrod> i'm quoting "the string", what's "the string" here; the actual string declaration or when I pass it to the cmake call
<geist> huh didn't know about shellcheck
<mcrod> never mind, got it
<mcrod> yeah shellcheck is kinda cool
<heat> mcrod, when you pass it yeah
<heat> word splitting is what you want here, because each word gets its own arg
<mcrod> yeah, I getcha
gmacd has joined #osdev
<heat> geist, is a pmap style vm thing objectively good?
<heat> i'm starting to think otherwise, most pmap.c-style-things are just almost straight up copied from other architectures, but ever-so-slightly different
gmacd has quit [Ping timeout: 240 seconds]
<gog> hi
<Ermine> heat: how does it feel to watch El Risitas memes while understanding what he is talking about
<Ermine> hi gog
<gog> hi Ermine
<heat> i don't understand what he's talking about mate
<Ermine> Ah, so Portugese != Spanish ?
<heat> gog: help
<gog> portuguese is very not spanish
<gog> i can actually understand my portugese co-worker when she speaks spanish
<gog> when my boss speaks spanish, not a fucking word
<heat> portuguese btw
<gog> pourtutgueuse
<geist> heat: hmm what do you mean copied?
<geist> i think pmap things are a good abstraction, yes
<Ermine> heat: sorry, my bad
<heat> geist, well, if you have an x86 mmu.cpp, and want an arm64 mmu.cpp, you'll just copy it, change some things slightly, and it's done
<geist> well, i think that's an oversimplification
<heat> with arm64 less so, but a great example is riscv64
<geist> answer is not really. because they have similar page tables doees not mean the code is really that similar
<geist> well, that's also because architectures have tended to implement a similar design
<geist> but you're just dealing with those style architectures
<heat> right
<heat> which makes me think if abstracting that stuff in $CURRENT_YEAR is counterproductive
<geist> but once you get into the more advanced parts of the mmu they diverge
<geist> ie, ASIDs, PCIDs, batching of TLB flushes, etc
<heat> since everything has x86-style pts, you can at least share all that, even "open-code" it like linux does
<geist> also things like virtualuzation and maybe reusing the code for stage 2 translations
<geist> because things look similar does not make them the same
<geist> i've seen that sort of fallacy fallen into many times at work: 'these two things are similar, lets reabstract it to ghave a single implmentation' and then you end up with a worse single thing that has to handle everything, poorly
<heat> oh, i'm not saying they're the same, but they're so similar that they're effectively shareable as seen in linux mm
<heat> have some defines per arch, some helper functions, and it Just Works-ish
<geist> sure
<geist> i dont agree but i see the appeal
<heat> pre-processor-defining yourself into success is appealing to me, even if you need dark magic to glue things together
<heat> success? no idea what I meant there
<heat> s/success/sharing/
<heat> at least being able to assume page tables exist is nice. i don't know how zircon mmu works there
<heat> particularly because of the anon memory problem i've been thinking about the past few weeks
elastic_dog has quit [Ping timeout: 265 seconds]
<geist> zircon does not. it's a pmap style interface
gmacd has joined #osdev
<geist> there's some unit tests that kinda do, but they're basically trying to trigger edge cases
gmacd has quit [Ping timeout: 250 seconds]
puck has quit [Excess Flood]
puck has joined #osdev
elastic_dog has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<mcrod> gog hi
<gog> mcrod: hi
<mcrod> may I pet you