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
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
navi has quit [Ping timeout: 252 seconds]
troseman has joined #osdev
troseman has quit [Quit: troseman]
netbsduser has joined #osdev
gog has quit [Ping timeout: 272 seconds]
kof673 has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
netbsduser has quit [Ping timeout: 245 seconds]
netbsduser has joined #osdev
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
<heat> so it turns out i ported kcsan and now i keep finding races
<heat> the good news is that if i limit it to a couple of object files i can find the races i'm looking for
<heat> the bad news is that if i don't i find shit tons of races (some benign, some dubious af)
zxrom has quit [Quit: Leaving]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
netbsduser has joined #osdev
terrorjack has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
night has quit [Quit: No Ping reply in 180 seconds.]
kanzure has quit [Remote host closed the connection]
kanzure has joined #osdev
netbsduser has quit [Ping timeout: 245 seconds]
onering has quit [Remote host closed the connection]
night has joined #osdev
Beato has joined #osdev
Fingel has joined #osdev
Fingel has quit [Remote host closed the connection]
Fingel has joined #osdev
craigo has joined #osdev
heat has quit [Ping timeout: 268 seconds]
vdamewood has joined #osdev
cow321_ has joined #osdev
Matt|home has joined #osdev
cow321 has quit [Ping timeout: 240 seconds]
cow321_ is now known as cow321
netbsduser has joined #osdev
netbsduser has quit [Ping timeout: 245 seconds]
netbsduser has joined #osdev
netbsduser has quit [Ping timeout: 255 seconds]
netbsduser has joined #osdev
GeDaMo has joined #osdev
gbowne1 has quit [Quit: Leaving]
netbsduser has quit [Ping timeout: 255 seconds]
netbsduser has joined #osdev
<GreaseMonkey> how common is it for a BIOS to set DL to the wrong value when booting off a hard disk? i had to patch the FreeDOS MBR bootloader to work around my shitty BIOS
<GreaseMonkey> i worked out the problem by forcing it to retry on failure, and i heard the floppy drive thrash, so i made use of a very generous code cave and set it to the correct value of 0x80
<GreaseMonkey> the BIOS date string is 1998-10-19 and it's an HP Brio 8314 or something
netbsduser has quit [Ping timeout: 252 seconds]
<kof673> i don't know, but i have seen such claims :/
Matt|home has quit [Ping timeout: 245 seconds]
Fingel has quit [Quit: Fingel]
vdamewood has quit [Quit: Life beckons]
zxrom has joined #osdev
bitoff has quit [Ping timeout: 240 seconds]
xFCFFDFFFFEFFFAF has joined #osdev
zxrom has quit [Quit: Leaving]
<zid> GreaseMonkey: given my sample size is a single hp brio 8314, I'm going to say 100%
zxrom has joined #osdev
raykv423 has quit [Quit: Connection closed for inactivity]
duckworld_ has joined #osdev
duckworld has quit [Remote host closed the connection]
duckworld_ is now known as duckworld
navi has joined #osdev
leg7 has joined #osdev
Left_Turn has joined #osdev
gog has joined #osdev
CompanionCube has quit [Quit: ZNC - http://znc.in]
Stary has quit [Quit: ZNC - http://znc.in]
Stary has joined #osdev
CompanionCube has joined #osdev
d5k has joined #osdev
vaihome has joined #osdev
bitoff has joined #osdev
duckworld has quit [Ping timeout: 244 seconds]
duckworld has joined #osdev
heat has joined #osdev
goliath has joined #osdev
xFCFFDFFFFEFFFAF has quit [Remote host closed the connection]
op has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
duckworld_ has joined #osdev
duckworld has quit [Remote host closed the connection]
duckworld_ is now known as duckworld
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
netbsduser has joined #osdev
goliath has quit [Quit: SIGSEGV]
<sortie> <mjg> boo, sortix still does not have smp <mjg> wait, the wevpage even says no networking ,but that can't be correct
<sortie> mjg: The website correctly describers the latest stable 1.0 release but does not cover the state of the nightly releases. Networking has been implemented since. SMP has not been implemented (if you want the parallelism, spin up another Sortix VM)
geist-sdf has quit [Quit: Lost terminal]
leg7 has quit [Ping timeout: 268 seconds]
Ellenor is now known as MelanieMalik
MelanieMalik is now known as MelMalik
<heat_> sooooooo
<heat_> how do your printks work?
<heat_> my printk currently just prints to the main console, this is /okay/ and all but it doesn't work e.g under spinlocks as printk takes some mutexes in the normal console path
<heat_> i want to make it more bulletproof. first step would be to redirect output to the console and to the kernel log. second step is that i don't really know how to print things if i can't grab the locks. maybe schedule stuff out for a worker thread to do?
<zid> Mine adds a row to a circular buffer of char *
<sortie> My Log::PrintF works in most places, it does require preemption, and cannot be used nested in the places that are used to implement it (such as locking)
<zid> you could add a lockless insert to that pretty easily I feel
<sortie> Its backend basically does the ANSI processing of the two dimensional table with the console contents
<zid> on architectures that had an atomic increment and give me the old value, do those exist? :p
<sortie> And then it informs the backing storage that the contents updated in a region and it schedules a redraw in a background worker thread
<heat_> zid, not sure, but you can always cmpxchg
<zid> yea wouldn't be a big deal on x86
<sortie> heat_, the big issue with worker threads is what happens when the work queue is full, how do you allocate enough storage ahead of time? Are you willing to lose work? Does that require blocking? If so it's not quite in the background
<heat_> i guess on llsc you probably get that for free
<sortie> E.g. a ring buffer is a fine enough approach but it can fill up and you may lose messages
<sortie> It might even be quite garbled if escape sequences are lost
<zid> you're hoping to lose messages on a ringbuffer
<zid> else it'd just be an infinitely long buffer
<zid> :P
<zid> You always have the *final* n entries, which is what everybody does for logs that get too big
<zid> rotate them, aka delete the head
<sortie> In my case it blocks until the data has been properly scheduled, which is safe and doesn't lose data, it does mean the printing may block for a moment and can't be used in any context
<zid> It's more of an issue for the serial logging
<zid> because that you want to happen 1:1 and it's slow
<sortie> heat_, fun fact, my panic implementation has a contingency where it tries to kthread_mutex_trylock all the console data structures, and if it succeeds, it can retain the information on screen. Otherwise it resets the screen contents
<zid> so you need clever buffering
<heat_> my panic impl busts the console locks :)
<heat_> was locked? not anymore!
<zid> panic, buffer->head = "Help;"
<zid> disconnect the old linked list :p
<zid> they can fight over whose turn it is to write on a dead list
<zid> Mmm that was pretty nice, found a random packet of FAJITA MIX
<zid> tossed it over some chicken and peppers and had it with rice
<zid> I found the world's largest picture of it
<heat_> oh okay so linux does a fun trick
<heat_> whoever unlocks the console (if it was locked) is responsible for flushing the logs out
<mjg> sortie: do you have memory reclamation implemented for low memory conditions
<mjg> sortie: for example if one was to keep creating new files (but keeping fds open(
<sortie> mjg, not at this time, malloc just return NULL
<heat_> didn't extfs have some reclamation logic?
<sortie> Not at such
<sortie> It does try to use 10% of system memory on the filesystem cache
<sortie> But nothing ever shrinks that actually
<mjg> you are literally worse than openbsd man
<mjg> :S
<sortie> I actually use openbsd man
<mjg> 0/10 would not host a php forum on it
<mjg> that i can somewhat believe
<heat_> mjg you should try writing an os
<heat_> it's harder than you believe
<sortie> it's fun
<zid> heat_: he's too busy making the bootloader support 4096 cores optimally
node1 has joined #osdev
<heat_> 4096 cpus is LULSCALE
<heat_> literally laptop
<sortie> mjg, idk, committing a fixed amount of memory to a filesystem cache seems honestly quite fine to me
goliath has joined #osdev
<heat_> it is unix tradition after all
<zid> just cache all the inodes etc until malloc starts to fail, then back off a quarter turn
<sortie> My Linux livelocks like weekly because the system encountered a low memory situation and Linux tried to purge the filesystem cache but still needs to swap stuff in to make forward progress and it can't make progress fast enough and it live locks
<sortie> That's not a problem if the filesystem cache is committed
<mjg> but can you survive the following test: 20 mln files get created
<zid> or was that the torque spec
<mjg> open + close
<mjg> not more than one open at a time
<sortie> I hope you like N squared lol
<heat_> more N is always better
<mjg> i'll note it's 20 * 1000 dirs * 1000 files
<mjg> so if the lulbehavior is coming from handling of one directory it's going to be fine
<mjg> sortie: just run this when you find some time https://people.freebsd.org/~mjg/fstree.tgz
<mjg> of "real" systems out there linux, freebsd and openbsd survived no problem, freebsd being the fastest(!)
xFCFFDFFFFEFFFAF has joined #osdev
<mjg> netbsd and dragonflybsd kept running into OOM
<mjg> solaris sruvived
<heat_> onyx does it in negative time
<heat_> time will literally go backwards
<sortie> Sortix is not exactly known for reliably surviving OOMs in the kernel
<mjg> well i am asking if you can survive this one
<sortie> It *is* supposed to work but a bunch of cases are unfortunately untested
<mjg> i'm collecting results for funzies
<sortie> mjg, obviously we know the result already
<mjg> i intend to add haiku and other kernels
<sortie> You can just quickly spin up a Sortix VM if you wanna try it out
<mjg> heat_ claims he will beat his kernel to shape
<heat_> zid, i'm wondering if processing format specifiers in chunks is any easier
<heat_> instead of the goto soup
<zid> how would you do it in 'chunks'
<zid> and the goto soup is a single goto
<heat_> like: while(*s) { if (*s == '%') s += process_specifier(s, va); }
<zid> so now it's recursive?
<zid> instead of a goto?
<heat_> why recursive?
<zid> You just put the body into a named function, then?
<zid> that's just STYLE
<zid> not chunking
MiningMarsh has quit [Ping timeout: 256 seconds]
<heat_> my printf is kinda weird
<bslsk05> ​github.com: hsd/usr/sys/sys/printf.c at master · heatd/hsd · GitHub
<heat_> i process char-by-char instead of looking ahead
<zid> Mine's while(1){ while(*p != '%') putchar(*p); if(!*p) return; c = *p++; switch(c) { } }
<heat_> all in the same loop
<zid> if it's a regular character print them in a tight loop, if it's not, return if it's 0, else gobble specifiers
<zid> repeat
<zid> while(*p && *p != '%') even
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
MiningMarsh has joined #osdev
xFCFFDFFFFEFFFAF has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
<node1> Do you think today malware can be easily bypass (EDR) systems and antivirus software ??
<node1> And take somewhere sit inside the processor
zxrom has quit [Ping timeout: 245 seconds]
<vaihome> node1 CIAs and NSAs penetration software might be able to do it, but even this software is affected by the antivirus guardian protection
<vaihome> sitting on your hard disk firmware, display adapter, etc.
<vaihome> BIOS
<vaihome> CMOS
<zid> ran out of the tablets I see
xenos1984 has joined #osdev
<node1> okay. but it looks like no one is safe
<heat_> you'll never be 100% safe
d5k has quit [Ping timeout: 245 seconds]
leg7 has joined #osdev
alpha2023 has quit [Read error: Connection reset by peer]
alpha2023 has joined #osdev
node1 has quit [Quit: Client closed]
zxrom has joined #osdev
Arthuria has joined #osdev
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
xFCFFDFFFFEFFFAF has joined #osdev
cuppajoeman has joined #osdev
dostoyevsky2 has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
CaptainIRS has joined #osdev
CaptainIRS has quit [Client Quit]
CaptainIRS has joined #osdev
CaptainIRS has quit [Client Quit]
CaptainIRS has joined #osdev
goliath has quit [Quit: SIGSEGV]
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #osdev
<dostoyevsky2> anyone know some good examples of orthogonal OSes?
Left_Turn has quit [Ping timeout: 245 seconds]
<GeDaMo> Orthogonal in what sense?
<dostoyevsky2> GeDaMo: I don't want to say, because then it would just be my version of an orthogonal OS
<zid> ones where the pieces cannot move diagonally, so no queensor bishops
<heat_> the problem is that we don't know what an orthogonal os is
<heat_> so unless you define it you can't get an answer
<GeDaMo> You have single language systems like Oberon or Smalltalk
<leg7> What does that have to do with orthogonality?
<GeDaMo> It's the only thing I can think of :P
<leg7> ok
<dostoyevsky2> GeDaMo: Oberon an Smalltalk are orthogonal to other OSes?
<leg7> you tell us bro Xd
<zid> I already told you what it means heat smh
<GeDaMo> Orthogonal in the sense that the kernel and all the applications are written in a single language
<GeDaMo> I suppose that kind of applies to Unix too :|
<zid> Everything's C if you dig hard enough
<heat_> except go
<zid> unix requires very little digging
<leg7> I don't really understand why that would be important
<zid> it's.. romantic?
<dostoyevsky2> GeDaMo: Wouldn't orthogonalilty imply some kind of independence?
<zid> not sure if it's *important*
<heat_> MIT wrote a unix entirely in go
<heat_> for the fun of it
<zid> did they bootstrap the go in go
gbowne1 has joined #osdev
<leg7> I saw an os in python a few weeks ago
<zid> and the go compiler in hand assembled go
<zid> using an assembler written in go
<Ermine> unix in go?
<heat_> their tooling is in go
<GeDaMo> There was a Unix written in Pascal too
<bslsk05> ​gokrazy/gokrazy - turn your Go program(s) into an appliance running on the Raspberry Pi 3, Pi 4, Pi Zero 2 W, or amd64 PCs! (114 forks/3148 stargazers/BSD-3-Clause)
<heat_> i'm fairly sure all of the golang stuff is in go, it's in C++ if you use gcgo
<Ermine> OS in Pascal is less surprising
<bslsk05> ​monogon.tech: Monogon — Metropolis
<dostoyevsky2> hmmm.. but that's also a userland written in Go, not the actual OS
<zid> I want a looongos to run on my loooong cpu
<zid> written in goooo
<zid> or foooortran
<heat_> there's a parameter to the golang build system named GOOS
<kof673> i somewhat disagree with "the same language" that is superficial IMO, at least strictly interpreted. while this is already handwavey...."language x for kernel, language y for drivers, language z for userland" i would still call "orthogonal" -- it is when it is chaos and mix and match with no rhyme or reason that is "unorthogonal" (ignoring that ABI means -- one can argue all of this is superficial)
<kof673> so package managers are a good example of unorthogonal perhaps :D
<kof673> but, orthogonal to each language perhaps, if not the whole
<kof673> > my version of an orthogonal OS yes, but i don't see a way around that
<kof673> anything anyone else tells you -- is just their version surely?
<kof673> wikipedia, orthogonality in a programming language: > The meaning of an orthogonal feature is independent of context; the key parameters are symmetry and consistency
<kof673> so "symmetric to what?" "consistent to what?" there is no way around that IMO
<kof673> even if the answer is just "internal consistency" (to itself, screw the outside world)
<kof673> and...it was leenode that thought they could ignore conway's law or somehow supercede it :D so...you have that...
<heat_> zid, are va_lists passed by reference or by value?
<dostoyevsky2> heat_: Go inspired me to start with this orthogonal OS ieda
<heat_> in arguments
MiningMarsh has quit [Ping timeout: 245 seconds]
cydox has quit [Quit: WeeChat 4.2.2]
<zid> heat_: hidden struct pointer param I think
MiningMarsh has joined #osdev
<bslsk05> ​godbolt.org: Compiler Explorer
<heat_> 257) It is permitted to create a pointer to a va_list and pass that pointer to another function, in which case the original function may make further use of the original list after the other function returns.
<zid> codegen is what you'd want, right?
<zid> making an actual pointer might be better, for other architectures with diff conventions?
<kof673> --version --help those are "orthogonal" minor thing, but consider a world without those, or varying with every program :D and "--" even.
<heat_> i can't pass va_arg by value
<heat_> sorry, va_list
<dostoyevsky2> kof673: I think mathematics has many examples of orthogonality, where you take something established and give it a new meaning by inventing a new kind of numbers
<zid> I mean, I just did?
<heat_> cuz then if you consume args with va_arg in the called function, the caller can't touch va_list again
<zid> ah you mean like that
<heat_> The object ap may be passed as an argument to another function; if that function invokes the va_arg macro with parameter ap, the value of ap in the calling function is indeterminate and shall be passed to the va_end macro prior to any further reference to ap
<zid> right
<zid> idk why you're so intent on naming the body of your loop though
<heat_> the pointer should just work though
<heat_> i want it to be maintainable
<zid> the body of the loop is mess maintainable?
<heat_> because then i want to pimp my printf
<zid> less
<kof673> dostoyevsky2, well i would perhaps say one does not notice its presence, but the absence is glaring :D
<zid> pimp it then, it's just whether the code is inside vaprintf or directly above it, though
<zid> and doesn't change otherwise
<kof673> (for OSes/computer stuff, not directed towards mathematics)
<kof673> and this was supposedly the sign of a sysadmin -- you don't notice their maintenance/etc. it is invisible/transparent (planned, handled ahead of time, noone has to change their workflow, etc.)
<kof673> *of a good admin
Arthuria has quit [Ping timeout: 245 seconds]
<heat_> zid, i feel like my current impl is awful and i'm trying to untangle it
<zid> Sounds likely
<zid> did you wanna look at the crappy one in my bootstrap again? :P
<heat_> nah
<heat_> what i'll probably end up doing is writing a simple state machine
<bslsk05> ​github.com: bootstrap/boot/print.c at master · zid/bootstrap · GitHub
<zid> oh no, a simple state machine!
<zid> it burns!
<heat_> %[$][flags][width][.precision][length modifier]conversion
<heat_> this is okay to parse
<zid> how do you implement $ actually
<zid> in C
<heat_> i think they end up using an array
<heat_> glibc might actually use malloc there, not sure
<zid> just va_arg everything into an array?
<heat_> yea
<zid> fair
<zid> be nice if there was a va_peek
<zid> you wouldn't need the frankly needless allocation
<heat_> geist, btw your printf tests are freaking amazing
<heat_> thank you
<zid> oh yea I got half way through porting those to C
<zid> when you were last on the printf train
<zid> I got interested too and wanted to write a more fleshed out printf for about 20 mins
<zid> before I got distracted by squirrels
<geist> heat_: oh thanks
craigo has quit [Quit: Leaving]
<geist> reminds me i was just thinking of automating them if i haven't yet
<zid> has anyone used $ or %n outside of an exploit
<heat_> somehow someway someone has used %n for something just thinking they're clever
<zid> yea I am sure, sadly, the bastards
<geist> yeah that's the one that returns how many bytes it's written up until then? I've used that before for trying to align some column thing
<geist> it's occasionally useful
<zid> "Look, I can write %s%$1s to print a string twice!"
<heat_> int total_len = sprintf(buf, "%s%n%s", first_part, &first_part_len, second_part)
<zid> "You mean, you can use it in format attacks to leak the stack pointer"
<zid> I did a ctf recently and it had three format string attacks :P
<heat_> this is truly OPTIMAL stuff
<zid> Lot of messing with %n and $
<geist> i do like to compile with -Wformat=2 and whatnot
<dostoyevsky2> GeDaMo: https://tristancacqueray.github.io/blog/introducing-butler <- I think this goes in an orthogonal direction, where you build on OS based on existing OSes... The question then is: What makes it an OS... and I think the answer is: Certificate vaults
<bslsk05> ​tristancacqueray.github.io: Introducing Butler Virtual Operating System – Tristan's Zettelkasten
<geist> OTOH that enables a warning that basically makes it illegal to have the format string anything but a native string
<geist> whcih i get it, but occasionally i's useful to select a format based on something
<zid> Yes, that's what makes something an OS in my view too, certificates
<zid> geist: why can you not select a format though? you just _Generic around the printf rather than around the """
<geist> that's the only way i've seen it let me do it without warning
<zid> compiler will hoist it anyway
<zid> lower it? :P Put it outside of the _Generic
<geist> https://github.com/littlekernel/lk/blob/master/lib/debug/debug.c#L136 is an example. the compiler isn't smart enough apparently to realize it can only be one of two things
<bslsk05> ​github.com: lk/lib/debug/debug.c at master · littlekernel/lk · GitHub
<geist> so i have to move the ternary inside the printf
<geist> to make the warning stop, which is just dumb
<zid> (so that it's just mov rsi, str1; jmp out; mov rsi, str2; jmp out; ... out: call printf)
<zid> I actually had a fizzbuzz that used ? inside printf's arg list
<zid> and got -Wformat to give spurious answers
<zid> To be fair, I was being.. silly
<dostoyevsky2> GeDaMo: Also, arcan
<GeDaMo> dostoyevsky2: arcan?
<zid> printf(a&&b ? "%d\n" : "%s\n", a&&b ? i : (a ? "buzz" : b ? "fizz" : "fizzbuzz"));
<zid> gcc used to get very upset about this.
<zid> It couldn't figure out whether strings or ints matched the format string, weirdly :P
<heat_> woah?!
<heat_> you're a musl developer??
<zid> ikr
<bslsk05> ​github.com: BadBuzz/C at 3de59f901d94a71cbed8a4efc5f95dc6ccd0624d · AbstractBeliefs/BadBuzz · GitHub
<heat_> a true musl developer would have a "fizzbuzz" string and somehow + a random offset into the string
<zid> that's how I did my assembly one
<zid> I printed fizzbuzz or fizzbuzz+4
<dostoyevsky2> GeDaMo: https://www.youtube.com/watch?v=jIFjzN7dk10 <- internally arcan issues certificates that you can e.g. open windows on other servers... it has a certificate store for that
<zid> or fizz (len=4 to write)
<bslsk05> ​'Arcan 0.6.3 - I, PTY, The Fool.' by arcanfrontend (00:05:29)
<zid> Just two C ones here though
<zid> I'm a big fan of zid.c, who needs conditionals
<GeDaMo> OK, it wasn't Pascal https://en.wikipedia.org/wiki/TUNIS "was a portable operating system compatible with Unix V7, but with a completely redesigned kernel, written in Concurrent Euclid."
<bslsk05> ​github.com: BadBuzz/C/zid.c at 3de59f901d94a71cbed8a4efc5f95dc6ccd0624d · AbstractBeliefs/BadBuzz · GitHub
<GeDaMo> Seems reasonable
<dostoyevsky2> GeDaMo: I think nobody really knows what arcan is, so I guess they could add the ? to name
<heat_> zid: printf(a&&b ? "%d\n" : "%.*s\n", a&&b ? i : 4*(!a+!b), "fizzbuzz"+!b*4);
<heat_> i think this works?
<heat_> it's optimal
<zid> obtimul
<zid> combining both is cute
<geist> maybe write it in assembly and then reverse back how to get C to generate it directly
<GeDaMo> You have a&&b twice :|
<zid> yea you need it on both sides sadly
troseman has joined #osdev
<zid> you can't get ? to evalulate to two things at once, that'd be a nice trick though
<zid> f(p ? (a, b) : (a, c));
<zid> sadly you just get comma operator and it evaluates to b or c
troseman has quit [Client Quit]
<GeDaMo> I was wondering if it could be done with a macro but I can't be bothered :P
<zid> I don't think you can
op has quit [Remote host closed the connection]
dostoyevsky has joined #osdev
<zid> C already has a structure for this, it's called "if"
Left_Turn has joined #osdev
Fingel has joined #osdev
sskras has quit [Quit: Connection closed for inactivity]
zetef has joined #osdev
netbsduser has quit [Ping timeout: 245 seconds]
hmw[at] has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
xenos1984 has quit [Read error: Connection reset by peer]
Ram-Z has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
Ram-Z has joined #osdev
MiningMarsh has joined #osdev
Arthuria 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!]
Ram-Z has quit [Quit: ZNC - http://znc.in]
Ram-Z has joined #osdev
netbsduser has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<mjg> more messing with chatgpt: "write a closure program which(...)"
<mjg> response: Certainly! Below is a Python program that uses closures(...)
<mjg> :d
<heat_> just asked chatgpt to write me a printf
<heat_> it wrote a printf that uses printf to print
<mjg> :)
<mjg> it is garbage innit
<zid> makes sense
<zid> if I were a word predictor, I'd predict printf for printing text
sbalmos has joined #osdev
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
Fingel has quit [Quit: Fingel]
<Ermine> printf(a&&b ? "%d\n" : "%.*s\n", a&&b ? i : 4*(!a+!b), "fizzbuzz"+!b*4); --- what does it do
vaihome has quit [Ping timeout: 256 seconds]
<zid> prints either i with %d
<zid> or the first 4 characters of 'fizzbuzz' or the last 4 characters of 'fizzbuzz' or 'fizzbuzz'
<zid> fizz and buzz are both 4 chars long so a[0] and a[4] are the start of each string, and if you only print 4 characters you get 'fizz' or 'buzz', or if you print 8 of 'fizzbuzz' you get 'fizzbuzz', hence the a+b*4 stuff
<zid> and str+b*4
navi has quit [Quit: WeeChat 4.2.1]
<nikolapdp> mjg i assume you meant the programming lanuguage, in which case it's spelt clojure
<mjg> heh, i did not notice i typoed it
<mjg> my bad !
<nikolapdp> lol
<nikolapdp> got to spell right to get what you want init
<zid> nikolapdp always gives me clojure after we cuddle
<nikolapdp> innit
<nikolapdp> we like our lisps here
vaihome- has joined #osdev
<heat> i want init?
<heat> no, dont initialize, shut down instead
<mjg> dtor
<Ermine> unitialized value detected
<heat> woah you're signing up to add KMSAN to onyx? okay then!
<mjg> how do you say PESSIMAL in portugese
<mjg> is it onyx
<heat> péssimo
<heat> keep that saved for posteriority
<heat> how do you say that in polish?
<heat> kwaszszwa?
<mjg> "skurwiała sraka"
<vaihome-> hi guys, I am buying a Core i7 machine today
<heat> my printf is passing all the tests
<heat> subscribe to my onlyfans
zxrom has quit [Quit: Leaving]
<zid> now add some $ and %n tests
<sortie> 'another day ssh'ing into my OS and compiling php on it
<heat> i'm not supporting $ nor %n
<heat> i will be supporting however pimped up specifiers
<sortie> You can get away without $
<heat> want to print an ipv4 address? don't worry, you'll be able to do that
<sortie> Lack of %n will blow up in your face
<heat> why?
<sortie> It's too used by ports in practice
<heat> this is for the kernel
<zid> %n in kernel sounds sick for exploits, add it
<heat> new kernel rule every printf must have a %n
<zid> I'm sure I can make a HID device with %n as its device name or something
zetef has quit [Remote host closed the connection]
<zid> my monitor has a message for you
<zid> it said squiggle, box, squiggle, hdmi symbol, dvi symbol, squiggle, squiggle, 1
<zid> I think it was trying to tell me that hdmi 1 just connected, but the font indexing was all broken
<heat> wow that's so racist
<heat> believe me i speak monitor
<kof673> squiggle is a technical term for tilde in some circles
<dostoyevsky2> kof673: some circles with a tilde in it?
<heat> i actually wrote vfprintf with some concept of a stream
<heat> i'll probably switch it to a more buffer-focused vsnprintf when i merge it
<heat> just to avoid the indirect calls. printk will just write to the ring buffer anyway
heat has quit [Remote host closed the connection]
Arthuria has quit [Ping timeout: 268 seconds]
heat has joined #osdev
leg7 has quit [Remote host closed the connection]
<geist> vaihome-: didja get it?
<nikolapdp> vaihome-: nice, i got a r7 recently :)