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
<zid> heat why are you read copy updating with sequence counters
<heat> i dont know, i think its supposed to avoid some sort of rename() problem
vdamewood has joined #osdev
<mcrod> hi
fmlatghor has joined #osdev
<gog> hi
<gog> mcrod can i have a hug
* vdamewood hands gog a hug
* gog hug
<gog> can i have a fishy too
* vdamewood was just typing /me when gog asked
* fmlatghor hands gog bass
* vdamewood gives gog a fishy
* gog chomp fishies
* vdamewood plays bass
<gog> groovy
<fmlatghor> you're playing bass or you play bass?
* vdamewood should have said plays the bass
* vdamewood plays the bass
<vdamewood> It may not sound great, but at least I can play scales on it.
<fmlatghor> I haven't touched a traditional instrument in a while. Been meaning to mess with my accordion
<vdamewood> Seriously, I play guitar and recorder.
<fmlatghor> like the nice recorders?
<fmlatghor> the ones classical musicians play?
<vdamewood> I would, but they're so high maintanance that I only play my wooden one on special occasion and just play my cheap, plastic one normally.
<zid> smh, music is just pressing buttons these days
<fmlatghor> what do you mean
<zid> <accordian players looking nverous>
<vdamewood> zid: It's programming for me.
<fmlatghor> ah
<bslsk05> ​vdamewood/seirina - Music synthesis code (0 forks/2 stargazers/Apache-2.0)
<fmlatghor> I love music
<fmlatghor> when I'm playing bach it feels like I'm writing code
<fmlatghor> everything falls into the right place
<vdamewood> I can feed it a text file with letters on it, and the code will spit out Mary Had a Little Lamb played on the sawtooth wave
<fmlatghor> oh nice
<fmlatghor> been meaning to get into writing synths and all that stuff. I like messing around with supercollider
<vdamewood> Though, the file I currently test with is the Final Fantasy Prelude
<vdamewood> or rather, the first 5 bars of it.
<vdamewood> In fact, it's writing this code that I'm procrastinating on at this very moment!
wblue has quit [Quit: wblue]
<gorgonical> I still want an answer to my question about tty printing if anyone's reading the logs
<zid> What was it
<zid> <gorgonical> If I'm at the start of the line and hit ^h, should the interpreter send back a "cursor forward" control character to maintain the cursor pos in the tty?
<gorgonical> Yes
<zid> isn't ^H backspace
<zid> that would depend on.. if the cursor needs to move
<gorgonical> Well on screen over the QEMU serial I have to actually press ^H to send it
<zid> i.e if I am C:\> then backspace does nothing
<gorgonical> Backspace doesn't actually send ^H at least with default configuration of screen
<Mutabah> A fancier terminal would be in raw mode
<zid> if I am some_very long command_with lots of \n args then ^H can even go back a row
<Mutabah> and then just do nothing when it sees the `^H`
<zid> term doesn't care what backspace does *to your program*, it just does what it gets told, afterall
<gorgonical> But the main gist of my question is that If I send the ^H over screen to the interpreter, the interpreter is responsible for undoing the action my terminal does?
<zid> it does something entirely different to the cursor when I play nethack :P
<klange> If you are asking about canonical mode in a tty, backspace when the buffer is empty should do absolutely nothing.
<gorgonical> I send ^H, screen moves my cursor back, but there's no characters on input, so is my program on the other side supposed to send a "move cursor forward" command to indicate that?
<zid> the program is what controls the cursor at all times, unless you have echo hardware enabled
<klange> Why is your screen moving the cursor back in the first place?
<gorgonical> oh klange I think you just answered the question for me
<gorgonical> I overlooked that, lol
<zid> (nethack gunna be sad if you press backspace and it deletes something)
<gorgonical> I am in fact having the interpreter echo the character back to the console...
<zid> curses requires hw echo to be disabled at all times
<gorgonical> So it's echoing the ^H, so yeah lol
<klange> The tty layer is traditionally responsible for the implementation of echoing inputs, so in canonical mode you can just not if the input doesn't do anything.
<gorgonical> I implemented that so long ago I forgot that it does that
<klange> (and for apps that disable canonical mode, they usually often disable echo as well, so they can be in complete control over the process)
<gorgonical> hmm
<gorgonical> Is canonical mode more than "line mode" so to speak?
<gorgonical> Because I don't actually know that much about tty but I did implement a line-oriented input for my interpreter because typos were driving me crazy
<gorgonical> So I guess I have a non-conforming canonical mode then, because backspace/^H runs off the beginning of the line
<gorgonical> Wait, is canonical mode on the sending side or receiving side?
<heat> gorgonical, oh that ^H is cute
<heat> qemu serial's terminal emulator does not send IIRC ascii 7f (the default tty erase), so you need to override it with stty usually
<zid> backspace is honstly a fucking mess
<heat> tty byte processing is done on the receiving side
<gorgonical> I've acquired mostly the muscle memory to ^H so it's fine
<gorgonical> heat: that's good becuase I was about to cry if I learned screen would have done it all for me
<zid> readline()
<heat> it *might*
<zid> is what does it all for you
<heat> because ncurses, readline, whatever are very smart
<heat> if you do -serial stdio you'll (probably) have the backspace thing fixed
<gorgonical> But if I'm doing like screen /dev/pts/2 to connect, I get a raw tty to the VM
<gorgonical> oh maybe that's why. I'm not just using QEMU's integrated thing
<xelxebar> Argument registers in the Linux syscall ABI are not at all obvious at first glance. Even i386 and x86-64 are wildly different. Is there a logic to the particular choices? Would be interested in reading up about how these choices were made.
<vdamewood> Someone rolled a 16-sided die
<Mondenkind> 64-bit kernel is the same as userspace except it uses r10 which in userspace is reserved for plt thunks
<gorgonical> heat: reason is that's how I feed in my environment, is by having screen paste my word definitions over the simulated serial port, which the interpreter reads and defines, etc.
<zid> rbx is banned by the cpu, rax is a return, so you're left with rsi, rdi, then rdx, then numbers
<gorgonical> readbuf core.f, paste . so it just spits them over the line
<Mondenkind> what about rcx
<Mondenkind> you idiot
<Mondenkind> you absolute bufoon
<Mondenkind> buffoon?
<zid> I meant rcx not rbx anyway
<vdamewood> Why not rcx?
<Mondenkind> then what about rbx
<Ermine> is 16 die a thing? Seems like it's not platonic
<zid> rbx *could* be used, but isn't
<vdamewood> Ermine: It's not platonic, no, but neither is a d10.
<Mondenkind> vdamewood: syscall uses it
<zid> rcx is where the old RIP ends up
<zid> when syscall happens
<vdamewood> Ermine: Anyway, there's a game called Dungeon Crawl Classics that uses the d16.
<heat> Mondenkind, rbx is a callee-saved register on the sysv abi
<vdamewood> It uses all sorts of non-Platonic diece, d5, d7, d14, d16, d24, and d30.
<Mondenkind> yeah, but that's just kicking the can down the roat
<Mondenkind> road
<heat> sure
<zid> so for your d16, do you use a disgusting bifurcated triangluar prism thing
<zid> or a football
<Ermine> I guess they make all sides equally probable somehow
<zid> Ermine: bifurcated triangular prism
<zid> it's just a spinning top that can be either way up, and has 8 sides
<zid> you can do that for any even d
<zid> it's just fuck ugly
<vdamewood> zid: Actually, for the other weird ones, they don't do that.
<heat> xelxebar, but yeah TL;DR the linux x86_64 syscall abi is the x86_64 sysv abi, but with certain registers replaced due to the syscall instruction
<heat> oh, and FPU registers are preserved across calls
<vdamewood> the d24 and d30 just use non regular polygons.
<heat> riscv, arm64 are also similar, they just use a standard calling convention
<zid> so you're a football not a disgusting spinning toy person vdamewood?
<klange> gorgonical: Have you read https://www.linusakesson.net/programming/tty/ ?
<bslsk05> ​www.linusakesson.net: The TTY demystified
<vdamewood> zid: If by football you mean that checkerboard wrapped around a ball, sure.
<zid> yes
<vdamewood> But not that US/Canadian egg-shaped, wannabe rugby ball.
<zid> Just project some equally spaced rays from the center of a sphere
<zid> then shave it a bit so you get some equal area flat pads
<vdamewood> zid Ermine: The d5 and d7 are totally bonkers.
<zid> fuck what was that shape called
<zid> rombok or something
<vdamewood> zid: Google says not that.
<zid> gombo
<zid> gomboc
<vdamewood> Google says gombo is food. :)
<zid> it's all erdos'y anyway
<zid> it should be gumbuts
<zid> fucking hungarian
MiningMarsh has quit [Ping timeout: 248 seconds]
<vdamewood> If it's hungarian, should it be shp_gomboc ?
<zid> wat
<zid> oh
<vdamewood> I didn't quite part your hair with that joke, did I?
<gorgonical> klange: I haven't but I will tonight
<gorgonical> thank you
<klange> I want to avoid saying things that imply this is the only right way to do it, but if you want to take the traditional approach that things like POSIX expect, TTY Demystified as a great resources for understanding how it all pieces together.
<klange> is a great resource*
<klange> bleh
heat has quit [Ping timeout: 245 seconds]
<gorgonical> vdamewood: that was an incredible pun
<vdamewood> gorgonical /me bows
netbsduser has quit [Ping timeout: 258 seconds]
ornx has quit [Quit: WeeChat 3.8]
<geist> klange: hmm that does look like a great read
gog has quit [Ping timeout: 260 seconds]
<zid> oh gog just quit, what a quitter, I had a pic
<bslsk05> ​i.imgur.com <no title>
mhall has quit [Quit: Connection closed for inactivity]
troseman has quit [Quit: troseman]
vdamewood has quit [Quit: Life beckons]
melonai has quit [Ping timeout: 260 seconds]
Valeria22 has quit [Quit: Konversation terminated!]
[itchyjunk] has quit [Read error: Connection reset by peer]
melonai has joined #osdev
elderK has quit [Quit: Connection closed for inactivity]
bradd has joined #osdev
bradd has quit [Remote host closed the connection]
bradd has joined #osdev
Burgundy has joined #osdev
bgs has joined #osdev
elastic_dog has quit [Ping timeout: 258 seconds]
xvmt has quit [Read error: Connection reset by peer]
xvmt has joined #osdev
elastic_dog has joined #osdev
jijibao has joined #osdev
<zid> damnit, sick skip failed
<zid> failed I'd go to bed and wake up feeling better
<zid> I woke up from hurting
<zid> figured*
jijibao has quit [Quit: Client closed]
jijibao has joined #osdev
jijibao has quit [Quit: Client closed]
jijibao has joined #osdev
danilogondolfo has joined #osdev
jijibao has quit [Killed (ozone (No Spam))]
benlyn has joined #osdev
mhall has joined #osdev
remexre has quit [Read error: Connection reset by peer]
remexre has joined #osdev
kpel has joined #osdev
Left_Turn has joined #osdev
Jari-- has joined #osdev
Hammdist has joined #osdev
nyah has joined #osdev
GeDaMo has joined #osdev
gog has joined #osdev
kpel has left #osdev [Leaving]
flom84 has joined #osdev
flom84 has quit [Quit: Leaving]
flom84 has joined #osdev
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
<mcrod> hi
<nikolar> Hello
<gog> hi
orccoin has joined #osdev
[itchyjunk] has joined #osdev
MiningMarsh has joined #osdev
leon_on9527 has joined #osdev
<mcrod> gog may I pet you
<gog> yes
<Ermine> gog: may I pet you as well
<gog> yes
netbsduser has joined #osdev
<ZipCPU> I'm struggling with a bit of a question: How many features does a computer program running on bare hardware need to have in order to be called an "operating system"? Is it enough if it can time share a fixed set of tasks?
<gog> it doesn't even really need to time share
<gog> it can be completely synchronous
<ZipCPU> Then ... what is the minimum requirement to be called an O/S?
<Jari--> noun the low-level software that supports a computer's basic functions, such as scheduling tasks and controlling peripherals.
<Jari--> ZipCPU MS-DOS used to be called a disk driver :)
<ZipCPU> "low-level" requires an upper level too, doesn't it?
<Jari--> still an OS
<Jari--> ZipCPU CP/M like OS is easiest to make, but you might want some features from the present
<ZipCPU> "CP/M"?
* ZipCPU googles
<ZipCPU> Is multitasking a requirement of an O/S? Or does the O/S just need to be a software interface layer to access the peripherals?
<Jari--> ZipCPU nopes, i.e. CP/M is singletasking
<ZipCPU> Can an O/S therefore be no more than a software library for accessing peripherals?
<Jari--> ZipCPU well, as long as it boots up, I would say
<Jari--> you can run it from an USB stick i.e. nowadays
<ZipCPU> I mean ... If I port newlib to a h/w architecture, and support nothing more than stdio over a serial port, does that count as an "O/S"?
<ZipCPU> As background, I'm a CPU author--see https://zipcpu.com/about/zipcpu.html Most of my "software" is loaded over serial port over custom designed, FPGA-based hardware. It may later be loaded into a flash (i.e. ROM) for starting automatically.
<bslsk05> ​zipcpu.com: About the ZipCPU
<ZipCPU> My question is sort of a ... when can I say that the software I've built to run on this device constitutes an "Operating System"?
<ZipCPU> So ... I can access a serial port via newlib. I have access to SD-Cards recently via another project I've built. SD Cards require device drivers --- but when does it all become an "O/S"?
<Jari--> ZipCPU see kernel
flom84 has quit [Ping timeout: 245 seconds]
leon_on9527 has quit [Remote host closed the connection]
yoyofreeman has quit [Remote host closed the connection]
yoyofreeman has joined #osdev
kaitsh has joined #osdev
kaitsh has quit [Client Quit]
d61 has joined #osdev
zxrom has quit [Quit: Leaving]
zxrom has joined #osdev
yoyofreeman has quit [Read error: Connection reset by peer]
yoyofreeman has joined #osdev
d61 has quit [Quit: WeeChat 3.8]
* Ermine pets gog
* gog prr
stolen has joined #osdev
d61 has joined #osdev
d61 has quit [Client Quit]
danilogondolfo has quit [Ping timeout: 245 seconds]
danilogondolfo has joined #osdev
Turn_Left has joined #osdev
flom84 has joined #osdev
Left_Turn has quit [Ping timeout: 245 seconds]
flom84 has quit [Ping timeout: 245 seconds]
Valeria22 has joined #osdev
SGautam has joined #osdev
yoyofreeman has quit [Read error: Connection reset by peer]
yoyofreeman has joined #osdev
flom84 has joined #osdev
yoyofreeman has quit [Read error: Connection reset by peer]
joe9 has joined #osdev
<sham1> hi
<gog> hi
<Ermine> hi
<zid> go away I'm sick
<sham1> Nou
<gog> no u
<zid> everybody's being mean to me and I am sick :(
<zid> Thank god for codeine
<GeDaMo> In what way are you sick? :|
<zid> gastroenteritis is my guess
<zid> I think gog poisoned me
<GeDaMo> Ugh
<gog> you shouldn't have crossed me
<gog> ¯\_(ツ)_/¯
<gog> you'll remember next time
<zid> I need a tall lesbian with her head shaved on one side to spoon me to sleep
<froggey> who doesn't
<gog> i don't have a sideshave anymore
<gog> it's not a hairstyle that really worked for me
heat has joined #osdev
<heat> gog gog gog gog gog
<heat> gog
<heat> gog
<sham1> goggers
<zid> being happy is not allowed heat
<zid> I am ill it's making me sicker
<gog> heat heat heat heat heat
<gog> heat
<gog> heat
<sham1> zid: you can be sick among yourselves
<zid> there are multiple of me now!?
<zid> are we all sick?
<zid> if not, why am *I* the sick one of the group that's unfair
<heat> gog: bugzilla
<gog> i'm not sick/but i'm not well/and i'm so hot/'cause i'm in hell
<gog> heat: zimbabwe
zxrom has quit [Ping timeout: 245 seconds]
<Jari--> gog interesting song
<gog> Jari--: i'm not sick but i'm not well by lit
<gog> terrible song
<gog> but it reminds me of childhood
<froggey> the peep show theme
<gog> yes
<gog> that's right it is
<Jari--> gog, Google for Uranium Rock, this is awesome :-)
<sham1> Holy hell
d61 has joined #osdev
<heat> google for en passant
xenos1984 has quit [Ping timeout: 245 seconds]
xenos1984 has joined #osdev
flom84 has quit [Quit: Leaving]
<zid> google for where to get morphine
<zid> then tell me
<sham1> NHS
<zid> they'll just tell me to take the codeine I have and see a doctor if it doesn't get better
danilogondolfo has quit [Remote host closed the connection]
<Jari--> zid I had this Tramal before
<Jari--> tramadol
joe9 has quit [Quit: leaving]
gog has quit [Quit: Konversation terminated!]
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
sparklysara has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 246 seconds]
gog has joined #osdev
xenos1984 has quit [Ping timeout: 245 seconds]
xenos1984 has joined #osdev
<gorgonical> Why is linux making my life so hard
xenos1984 has quit [Ping timeout: 246 seconds]
<gorgonical> Something happens when Linux is booted from uboot that kills my kernel's serial port output
<gorgonical> And I'm guessing it has to be something Linux is doing to the GIC? Because its DTB doesn't even show other cores or the serial ports
<gorgonical> I guess it could conceivably be doing something with PSCI that quiesces all cores or something
<gorgonical> Can Linux on core 0 somehow prevent the GIC timer on core 1 from firing?
<nortti> are you trying to run your OS on the same machine simultaneously with linux?
<gorgonical> yeah, for research
<gorgonical> I don't expect my OS to have full functionality, it runs as a secure kernel
sparklysara has quit [Remote host closed the connection]
elastic_dog has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
elastic_dog has joined #osdev
flom84 has joined #osdev
flom84 has quit [Ping timeout: 246 seconds]
<heat> gorgonical, you mean the ARM timer I assume?
<heat> that one is per-core
<heat> but yes, it can
<heat> if it re-configures the GIC into masking everything but what it needs, which is very likely
<heat> i like accidentally hitting arcane vim shortcuts with basic keys
Hammdist has quit [Ping timeout: 246 seconds]
orccoin has quit [Ping timeout: 245 seconds]
SGautam has joined #osdev
<heat> I NEED NVIM HELP
<heat> i'm putting my cursor on identifiers (in this case, in function calls), and doing g+shift+I for supposedly goto implementation
<heat> but it don't work :(
<heat> huh, gd works
d61 has quit [Quit: WeeChat 3.8]
<heat> and yes for the record i'm trying to use nvim now
<heat> it's surprisingly usable but unsurprising given it's mostly an IDE in a terminal
<heat> vscode without a GUI
<nikolar> is g+shift+I supposed to work with it's builtin lsp heat
<nikolar> i am on vim so i can't help with nvim directly
joe9 has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
flom84 has joined #osdev
zxrom has joined #osdev
flom__84__ has joined #osdev
flom84 has quit [Ping timeout: 246 seconds]
flom__84__ has quit [Quit: Leaving]
flom84 has joined #osdev
vdamewood has joined #osdev
bliminse has quit [Ping timeout: 245 seconds]
bgs has quit [Remote host closed the connection]
<heat> nikolar, i think so yeah
<heat> help says it lists implementations of the symbol
<heat> huh
bliminse has joined #osdev
flom84 has quit [Quit: Leaving]
goliath has quit [Quit: SIGSEGV]
<gog> hi
<gog> i'm less sad than i was yesterday
<gog> i also don't feel as sickly today as i have been
* kazinsal pets gog
<zid> I figured out a surefire way to not be in agony, which is nice
* gog prr
<gog> also my heart doesn't have any clogs so that's cool
<zid> Try your wardrobe then, at the bottom
<zid> we'll find you some clogs somewhere, dw
<gog> i prefer heels
<zid> I never saw the appeal of heels, in either direction
<kazinsal> perfect for getting stepped on ^W^W^W^W^W
<zid> Clearly the sexiest footwear is the bear feet attached to the bear onesie they are wearing.
<Ermine> gog: may I pet you
<nikolar> heat lol for me it just does the same thing as I
<nikolar> maybe i need to have an lsp setup or something
<nikolar> vim is the same in that it acts as I
<gog> Ermine: yes
heat_ has joined #osdev
heat has quit [Ping timeout: 256 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
<heat_> mjg, hi
<heat_> how r u
<mjg> very meh-y, how are you
Turn_Left has quit [Read error: Connection reset by peer]
<heat_> im fine
<heat_> i've been slowly thinking about dcache locking but i haven't done much osdev
<heat_> hence, happy
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
<mjg> meh
<heat> i've realized my locking is contrived and borken in some cases
<heat> linux dcache locking is also annoyingly complex and not straight forward
<mjg> i looked over some of it recently
<mjg> i think they avoidably landed themselves in a corner
Jari-- has quit [Ping timeout: 252 seconds]
joe9 has quit [Quit: leaving]
<mjg> one thing you can immediately do better than linux
<mjg> is implemented sensible fucking asserts
<mjg> as much as it pains me to say it, freebsd does this mostly right
<heat> why are they in a corner?
<heat> it looks sensible for a really high performance thing
<mjg> it is not
<heat> keep mutating it until its fast, but complex
<heat> dcache_lock poggers
<mjg> for example mofer
<mjg> that lockref thing they were happy about is CRAP
<mjg> it is cmpxchg loops both ways, which SUCK
<mjg> lock xadd even one way has way bigger throughput
<mjg> two ways is a the winner
<mjg> s/a/
<mjg> anyhow right now you can't sensibly make invasive changes with confidence
<mjg> because the kernel lacks any fucking asserts
<mjg> [almost]
[itchyjunk] has quit [Ping timeout: 245 seconds]
<mjg> check out freevnode on freebsd
<mjg> VNASSERT(vp->v_data == NULL, vp, ("cleaned vnode isn't"));
<mjg> VNPASS(vp->v_holdcnt == VHOLD_NO_SMR, vp);
<mjg> VNASSERT(vp->v_usecount == 0, vp, ("Non-zero use count"));
<mjg> VNASSERT(bo->bo_numoutput == 0, vp, ("Clean vnode has pending I/O's"));
<mjg> VNASSERT(vp->v_writecount == 0, vp, ("Non-zero write count"));
<mjg> VNASSERT(bo->bo_clean.bv_cnt == 0, vp, ("cleanbufcnt not 0"));
<mjg> and so on
<mjg> whatever you do, tons of asserts
<mjg> and they ofc compile away for production
<mjg> in contrast, BUG_ON is *always* present
<mjg> and they don't have something only for debug
<mjg> what they do have instead is a comment about a func saying "please take i_lock mofo"
<mjg> which is most peculiar given that lockdep grown support for asserting this kind of stuff years ago
[itchyjunk] has joined #osdev
benlyn has quit [Ping timeout: 250 seconds]
* Ermine pets gog
fmlatghor has left #osdev [WeeChat 3.8]
<heat> mjg: i would prefer doing it statically
<heat> like statically making sure this lock is held, etc using the clang stuff
<heat> but it's not easy
SGautam has quit [Quit: Connection closed for inactivity]