dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid`>
Why is it -1C
<zid`>
and who can I blame for it
<Mutabah>
zid`: What's the context?
<zid`>
it is -1C
<zid`>
and I need someone to blame
<Mutabah>
Wait, negative 1 centigrade?
<zid`>
yes
<Mutabah>
I read that as "link against library `C`"
<Mutabah>
And hence "why did someone name this library capital C?"
<zid`>
might wanna.. upgrade your typeface
<Mutabah>
putty default 4lyfe?
vdamewood has quit [Read error: Connection reset by peer]
<zid`>
putty's default styling is super harsh
vdamewood has joined #osdev
<Mutabah>
Hmm... "Courrier" seems a little better
<zid`>
btw centigrade is out of fashion for 50 years
<Mutabah>
yeah, dunno why I chose that term
<Mutabah>
brain no werky i guess
<zid`>
poor mr. celcius
<geist>
while i agree, i kinda thing centigrade sounds more formal
<geist>
also yay -1. i like it cold, but not too cold
<geist>
right around 0 is a nice temp
<zid`>
centigrade is just wrong, technically
<zid`>
it's the name of the scale, not the unit
<zid`>
Any scale subdivided into 100 you could say centigrade for
<geist>
well sure. but still
<Mutabah>
22C
<Mutabah>
My favorite temp
<zid`>
Give me 16C
<zid`>
12-24 is my range
nur has joined #osdev
<zid`>
welp, advent in 10, should probably set up my text editor
<geist>
think it's time to sit down and try to get hello world rust working
<zid`>
oh no
<geist>
OH YEAH
<geist>
it's been done,b ut i'm trying to stumble through it the hard way, thus learning more in te process
<geist>
screwed around with cargo last night to try to get it to build a multi-arch static lib and explore how extern "C" and whatnot work. as is usual once you figure it out it's no big deal, but lots of trial and error
<epony>
it's getting leomessy which lang had the cargo cult crate packaging gems nodes now.. ;-)
<Mutabah>
geist: If you need help, feel free to ask me (or join #rust)
<zid`>
yea but if you join #rust you'll be surrounded by rust users
<klys>
think twice~
<epony>
just beware the rusty needle spiked people, they look like they have had too much eggnogging
<klys>
"Why hold people who you don't pay to a higher standard than the people who you do pay?" - theo
<epony>
looks like fixing the global TOCTOU in UNIX will not be Golang's priority either
<zid`>
wow day9 is.. a thing
<moon-child>
centigrade? How old-fashioned
<moon-child>
oh zid said taht already
<zid`>
arse, I pass the test input, but not my real input
bgs has joined #osdev
<zid`>
I finally found the bug, after an hour :D
bgs has quit [Remote host closed the connection]
m5zs7k has quit [Ping timeout: 260 seconds]
m5zs7k has joined #osdev
<mrvn>
Mutabah: 22 coulomb isn't much energy. :)
<Mutabah>
Well, no, because it's not energy :)
<geist>
oh dont worry, i'm already surrounded by rust users
<geist>
oooh speaking of eggnog i bought some the other day
<geist>
i should put something in it
<zid`>
I've never tried it, it sounds either really nice, or incrediby nasty, and I can't decide which it will be
<zid`>
You'd think I'd have at least heard of or seen it outside of american media, given what wikipedia says
<zid`>
The origins, etymology, and the ingredients used to make original eggnog drinks are debated. According to the Oxford English Dictionary, nog was "a kind of strong beer brewed in East Anglia"
<zid`>
(East Anglia is where I live)
<geist>
yeah in this case it's basically sweet milk. i'm sure it's not the same thing at all
<geist>
but it takes nicely to getting spiked
<geist>
and giving you a hangover
<zid`>
It seems that it was popular around colonial times, which is why it's a thing in the US
<zid`>
but it died out over here
<zid`>
so now it seems very american to us
<geist>
oh yeah i'm sure whatever is at the supermarket here is some americanized nonsense
<moon-child>
eggnog is good
m5zs7k has quit [Ping timeout: 246 seconds]
<moon-child>
Although. The other week I made the mistake of getting low-quality eggnog. And I can't bring myself to drink any more of it, but don't want to throw it out
m5zs7k has joined #osdev
NiD27 has joined #osdev
rorx_ is now known as rorx
auronandace is now known as ThinkT510
<epony>
^ snakenogg
invalidopcode has quit [Remote host closed the connection]
GeDaMo has joined #osdev
<zid`>
ah shit.
<zid`>
I decided to do some advent2015 figuring it'd be easy, but they hadn't quite settled on their current formula yet. Day 4 needs MD5. My self-imposed rule is no external code.
<zid`>
Guess I am implementing MD5.
m5zs7k has quit [Ping timeout: 265 seconds]
pounce has quit [Ping timeout: 246 seconds]
<epony>
what for?
<epony>
it might be quite the overhead if you only need md4
<epony>
just "this" without "for what" is no information
m5zs7k has joined #osdev
<epony>
you know rc4 is still used
gog has quit [Ping timeout: 252 seconds]
dormito has quit [Ping timeout: 264 seconds]
dormito has joined #osdev
<klys>
you better be drinking southern comfort or darigold or something good
<epony>
jagermeister and mouthwash alternator
<epony>
same as: rc4 and md5
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<zid`>
smoking cigarettes and moaning at strict aliasing meaning I have to do this the long way, mainly
<epony>
drop the cigs, not going to end well
gog has joined #osdev
<zid`>
maybe I'll give up and just assume LE
<epony>
until you have to program your NIC (software defined network) core
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
heat__ has joined #osdev
heat__ is now known as heat
<zid`>
Morning hate
<heat>
'ate the heat
<heat>
morning
<heat>
no i didn't do advent of code yet
<zid`>
I got stuck, for an hour
<zid`>
I like the part where I just implemented MD5, but get the wrong answer. I wonder why.
heat has quit [Remote host closed the connection]
heat has joined #osdev
<zid`>
Oh it works for an empty string at least, so I guess my plaintext padding etc is wrong
epony has quit [Quit: QUIT]
<zid`>
ah got it, length is suppsoed to be in bits
NiD27 has quit [Quit: Leaving]
gildasio has quit [Ping timeout: 255 seconds]
gxt has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
gxt has joined #osdev
<ddevault>
my EFI stub problems continue to haunt me
<ddevault>
I've basically copied linux's EFI header and linker script and still no dice
<ddevault>
attempting to build an EFI stub linux build to compare, not going well
<ddevault>
building edk2 also ran into numerous problems
heat has quit [Ping timeout: 256 seconds]
<ddevault>
right, now I have an EFI stub linux which does boot in qemu to compare with
<zid`>
It'd be gut wrenching if even that didn't boot :P
<ddevault>
my god it would be eh
<zid`>
what does the efi stub linux stuff consist of?
<ddevault>
linux on the left, my kernel on the right, if anyone is curious: https://l.sr.ht/t_KA.png
<bslsk05>
en.wikipedia.org: Bazel (software) - Wikipedia
<zid`>
yea if you spell it with an e you can have ei
<zid`>
magic e from FRENCH
<heat>
real talk 2 why the fuck does this shit have upside down e
<heat>
linguists NEED TO BE STOPPED
<zid`>
cus IPA was developed to be typeable on typewriters
<zid`>
cutting custom letters is harder than turning letters upside down
<zid`>
face -> feice, fak -> fak
<zid`>
if you see ^[aeiou].e$ where . = constant in english
<zid`>
you use different vowels
<zid`>
mac vs mace
<zid`>
stag vs stage
<heat>
so are you supposed to turn the paper upside down when typing?
<zid`>
or the typewriter
<heat>
linguists are bonkers
<zid`>
I prefer to do it like a ransom note
<zid`>
cut the letters out of a book and tape them all to a new sheet of paper
<heat>
turning the paper also means turning the typewriter
<heat>
it's all a matter of perspective
<zid`>
Only if it's jammed
FreeFull has joined #osdev
<kaichiuchi>
it’s only 1430
<kaichiuchi>
god
<heat>
1430?? praise be
<heat>
constantinople is still in byzantium's hands!
<gog>
it's 1930
<gog>
smh
<mrvn>
istanbule?
<heat>
quick, let us go forth and defend the holy land from the turks
<gog>
great depression
<heat>
1930? hei
<Ermine>
heat: Byzantium is a Constantinople, and empire was Byzantine.
<gog>
istanbul
<gog>
i stan
<heat>
tsargrad
<heat>
istanbul is actually a pretty recent name
<heat>
even under the ottomans it was still constantinople
<Ermine>
Byzantium is better. Roma invicta.
<heat>
byzantium cringe western roman empire good
<Ermine>
s/western//
<heat>
the russians always had the ambition of recapturing that shit
<Ermine>
?
jafarlihi has joined #osdev
<heat>
after byzantium went bye bye the russian empire thought of itself as the last roman empire
<heat>
the "third rome"
<heat>
many tsars had the personal ambition of recapturing tsargrad
<mjg>
i'm a descendant of the true roman citizens
<mjg>
true story
<mjg>
!!!
<heat>
polska strong 💪💪💪
<heat>
better than stupid roman 😡😡
<Ermine>
one tsar shitted himeself with such ambitions in 1856.
<heat>
Ermine, yup. tbf it took all the great powers to stop russia
<heat>
if you want to talk about historical russian L's you can't skip the polish-soviet war
<heat>
because polska stronk 💪💪💪💪💪💪💪💪💪💪💪💪
<heat>
consonants > weird letters and that was established in 1921
<Ermine>
I didn't really study the Polish-Soviet war. I know more about the Winter war. Russia was victorious, but it was Pyhrric victory.
<heat>
which winter war?
<heat>
you had plenty :v
<Ermine>
the one against Finland.
<heat>
russia was "victorious" with many quotes
<Ermine>
As I said, it's Pyhrric.
<jafarlihi>
Can I compile my 32 bit OS with x86_64 GCC cross compiler? Do I need to change anything or is it drop in replacement?
<Ermine>
Theoretically it can emit i386 code, but I'd get an i386 (or i686) cross-compiler.
<Ermine>
What happening with wiki.osdev.org?
<heat>
seems like it's having issues
<heat>
maybe the mythical chase will notice
<heat>
we have some sort of cargo cult for the osdev wiki
<Ermine>
It gives me exceptions about connecting to phpbb database.
<heat>
what do you want to hear
<heat>
i can try and osdev wiki myself
<geist>
jafarlihi: yep. it should work fine
<geist>
just compile with -m32
<geist>
*however* you might have trouble finding a libgcc.a for i386 if it hasn't been pre-compiled
<heat>
geist, i would not recommend -m32, it will break if you link in libgcc
<heat>
yeh
<heat>
x86_64-elf does not have a 32-bit multilib
<jafarlihi>
How am I supposed to set up my infra if my OS supports both 32 and 64? Have two compilers?
<geist>
the general solution is yes
<heat>
yes
<geist>
i keep around prebuilts for like 10 different arches, each has their own prefix
<geist>
it's messy, but works nicely
<jafarlihi>
Is it good idea to start with 32 bit then add 64 bit support later on, or would it be good to switch right away after having IDT, GDT, and such shit set up?
<geist>
go straight to 64
<geist>
there's not a strong reason to fiddle with 32bit anything if there's a 64bit equivalent
<jafarlihi>
Then I can get rid of my 32 bit cross compiler right?
<jafarlihi>
Or do I still need infra for both?
<geist>
probably, but it depends o what you're doing
<heat>
geist, i think skipping 32-bit isn't a good idea when starting out. paging is hard :(
<heat>
getting to 64-bit is a fucking task and a half, if you're starting out, in assembly
<heat>
compared to riscv and arm64 that is
<Ermine>
Do you mean having OS images for both x86 and x64 or do you mean making your system run both x86 and x64 binaries?
<jafarlihi>
I just want to get to 64 and I already have 32 bit shit set up like ISRs IDT and GDT, not sure what to do with current build system
<heat>
at one point we should all collectively say that x86 is not the ideal architecture for someone starting out
<heat>
riscv is simple and works, even if at the end of the day it's a bit of a trashy architecture
<Ermine>
heat: x86 is what many people have at their houses to experiment with. Anything else would require an emulator.
<heat>
which is exactly what you should use when starting out
sortie has quit [Ping timeout: 260 seconds]
sortie has joined #osdev
jafarlihi has quit [Quit: WeeChat 3.7.1]
<kaichiuchi>
but i want to use x86-64 :(
<kaichiuchi>
complexity is a given with this field no matter the architecture
<kaichiuchi>
i get that a simpler architecture might make things a little easier, but that won’t last
<geist>
hmm, thats true, also getting paging working is a pain, you're right
<geist>
i *guess* when you start out you're basically startig with hello world anyway, and it doesn't matter much what arch that's in
<kaichiuchi>
yeah, you are *going* to hit deep complexity at some point
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<sortie>
My kernel suffers from lost wakeups in my kthread_cond_{wait,signal,broadcast} API :(
<sortie>
The good news is that I can easily reproduce it (somehow running qemu natively while ssh'ing into the VM recursively has a double digit percentage chance of triggering it) and then I can easily attach gdb and inspect all the threads the deadlocked kernel, but... it's hard to figure out WHY the wakeups got lost and the code looks correct
<sortie>
My gdb skill level is now advanced enough that I can attach to a VM running my OS, run a gdb script I wrote, and it dumps stacktraces of all the threads (and I can easily switch to any thread to debug it)
<sortie>
All of my production VMs run with a VNC display via local ssh into, then I can switch to the qemu monitor, run gdbserver, and then attach a gdb to it (after building a matching kernel locally with debug symbols) and see why they malfunctioned
<sortie>
https://paste.ahti.space/f43ee1.html ← Hey I got a dual deadlock! The kernel 'worker' thread has work to do (but lost a wakeup and is still waiting) and the kernel 'interrupt' thread is stuck waiting for a mutex (which is currently unlocked, so it lost a wakeup)
<bslsk05>
paste.ahti.space <no title>
<heat>
kaichiuchi, geist, it's just that you have a much steeper hill to climb if you need to immediately set up paging, a gdt, etc before you've even seen a line of C
<heat>
i can tell you that newb-me would've felt discouraged if I needed to do that as my first steps
<sortie>
Yeah I recommend the 32-bit unpaged multiboot Bare Bones for that reason
<sortie>
Seeing the Hello World like that is massively motivating
<sortie>
Especially if you can try it on real hardware, that's just mind blowing
<heat>
while in 32-bit x86, riscv-anything, arm-anything, you can call or jalr or bl your way into C and try things out that way
<heat>
much more of a piecemeal experience
<heat>
just to set up x86_64 you have "what's a segment, what's a gdt, what are virtual and physical addresses, what's this paging thing and god oh god why is it so painful"
<heat>
compounded by the fact that you're writing everything in assembly
<heat>
the closest you have to easy-mode-x86_64 is something like booting straight from EFI and reusing their shit, crossing your fingers and hoping nothing breaks
<geist>
heat: sure, point taken
<sortie>
I may have reached the ”oh god how did it ever work“ stage of debugging
<sortie>
I added some assertions let's see if it burns
ThinkT510 has quit [Quit: WeeChat 3.7.1]
<heat>
sortie, fairly sure you have a race in your kutex_wait
<heat>
you should check the value under the lock, and start sleeping under it
<Ermine>
Make kutex_wait kute.
<sbalmos>
I keep thinking through my VFS designs, wondering if it's really worth it to have separate volumes for apps (user-read-only, executable perms) vs user data (user-writable, not executable perms)
<kof123>
i just decided make nearly all fields optional and deal with it later lol slow perhaps, but very flexible
<kof123>
so for specific use cases, user/whoever will need to make an fs with fields that play some role
<kof123>
and they can either cram things all on one fs, or divide across multiple
<kof123>
"mechanism, not policy" -- supposedly was used by X
<kof123>
so i will perhaps end up with "templates" like "if you need these features, need to point this thing at fs(es) with these minimum required fields enabled" etc.
<heat>
sbalmos, why is that part of your vfs?
<sbalmos>
heat: that just happened to be where I was sticking stream-of-conscious bullet point notes. not vfs, kinda fs / system policy related
ThinkT510 has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
<heat>
geist, hast thou played around with passing more info directly from the kernel to userspace, through a vdso like thing?
<heat>
i've been thinking that passing things like "is a thread currently scheduled or not?" directly from the kernel to the user through a simple write would be interesting
<heat>
like the kernel just writing that out in a context switch
gxt_ has joined #osdev
<heat>
could help on things like user mutex spinning
gxt has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
<geist>
yah main problem there of course is making sure the kernel can do it without any failure
<geist>
so probably would involve having to share a page or memory region with the kernel up front, and pin it so that it cannot go away
<geist>
*reading* from user space via something like that is much trickier
<heat>
the idea would be to register it through a syscall or something
<heat>
locking pages would be a pain ofc and if this were to be done naively in the libc you'd end up severely limiting the number of threads you can have (by the virtue of locked memory limits)
<heat>
in UNIX-likes that is
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #osdev
<geist>
yah. but i do think having a shared page per thread or so makes sense
<geist>
you can even use it as a bounce buffer for short messages and whatnot
<geist>
if yuo bake that into your syscall mechanism
DutchIngraham has quit [Quit: WeeChat 3.7]
spikeheron has joined #osdev
<sortie>
Today in "how did this even work in the first place" level of debugging: Turns out my futex(2) syscall implementation used the same wait queue linked list as the backend of kthread_mutex_lock(), however futex(2) also used kthread_mutex_lock to protect that list, so if that lock was contended, then a thread might end up in the linked list twice, and upon return unlink a bunch of unrelated kernel waiters, and they lose wakeups
<sortie>
Turns out the answer was that I basically had never run a workload that contended futex(2)
<sortie>
's backing mutex in a process until qemu which was multi-threaded enough to do it reliably
<heat>
cowabunga
wootehfoot has quit [Read error: Connection reset by peer]
FreeFull has quit []
xenos1984 has quit [Read error: Connection reset by peer]