Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=24&m=4&d=21

Sunday, 21 April 2024

02:13:00 <heat> so it turns out i ported kcsan and now i keep finding races
02:20:00 <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
02:20:00 <heat> the bad news is that if i don't i find shit tons of races (some benign, some dubious af)
06:51:00 <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
06:52:00 <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
06:53:00 <GreaseMonkey> the BIOS date string is 1998-10-19 and it's an HP Brio 8314 or something
07:00:00 <kof673> i don't know, but i have seen such claims :/
09:33:00 <zid> GreaseMonkey: given my sample size is a single hp brio 8314, I'm going to say 100%
15:17:00 <sortie> <mjg> boo, sortix still does not have smp <mjg> wait, the wevpage even says no networking ,but that can't be correct
15:18:00 <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)
16:07:00 <heat_> sooooooo
16:08:00 <heat_> how do your printks work?
16:08:00 <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
16:09:00 <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?
16:15:00 <zid> Mine adds a row to a circular buffer of char *
16:15:00 <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)
16:15:00 <zid> you could add a lockless insert to that pretty easily I feel
16:16:00 <sortie> Its backend basically does the ANSI processing of the two dimensional table with the console contents
16:16:00 <zid> on architectures that had an atomic increment and give me the old value, do those exist? :p
16:16:00 <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
16:17:00 <heat_> zid, not sure, but you can always cmpxchg
16:17:00 <zid> yea wouldn't be a big deal on x86
16:17:00 <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
16:17:00 <heat_> i guess on llsc you probably get that for free
16:18:00 <sortie> E.g. a ring buffer is a fine enough approach but it can fill up and you may lose messages
16:18:00 <sortie> It might even be quite garbled if escape sequences are lost
16:18:00 <zid> you're hoping to lose messages on a ringbuffer
16:18:00 <zid> else it'd just be an infinitely long buffer
16:18:00 <zid> :P
16:18:00 <zid> You always have the *final* n entries, which is what everybody does for logs that get too big
16:19:00 <zid> rotate them, aka delete the head
16:19:00 <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
16:19:00 <zid> It's more of an issue for the serial logging
16:20:00 <zid> because that you want to happen 1:1 and it's slow
16:20:00 <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
16:20:00 <zid> so you need clever buffering
16:20:00 <heat_> my panic impl busts the console locks :)
16:20:00 <heat_> was locked? not anymore!
16:20:00 <zid> panic, buffer->head = "Help;"
16:20:00 <zid> disconnect the old linked list :p
16:21:00 <zid> they can fight over whose turn it is to write on a dead list
16:22:00 <zid> Mmm that was pretty nice, found a random packet of FAJITA MIX
16:22:00 <zid> tossed it over some chicken and peppers and had it with rice
16:23:00 <zid> https://cdn.discordapp.com/attachments/417023075348119556/1231641391440990349/773366.png?ex=6637b26e&is=66253d6e&hm=1fc5ba66036de77adcbaa8d8fc3099d8eef8be5d4d0cbc9cf9a028ed21eaf44d&
16:23:00 <zid> I found the world's largest picture of it
16:27:00 <heat_> oh okay so linux does a fun trick
16:27:00 <heat_> whoever unlocks the console (if it was locked) is responsible for flushing the logs out
16:29:00 <mjg> sortie: do you have memory reclamation implemented for low memory conditions
16:29:00 <mjg> sortie: for example if one was to keep creating new files (but keeping fds open(
16:33:00 <sortie> mjg, not at this time, malloc just return NULL
16:33:00 <heat_> didn't extfs have some reclamation logic?
16:34:00 <sortie> Not at such
16:34:00 <sortie> It does try to use 10% of system memory on the filesystem cache
16:34:00 <sortie> But nothing ever shrinks that actually
16:35:00 <mjg> you are literally worse than openbsd man
16:35:00 <mjg> :S
16:36:00 <sortie> I actually use openbsd man
16:36:00 <mjg> 0/10 would not host a php forum on it
16:36:00 <mjg> that i can somewhat believe
16:36:00 <heat_> mjg you should try writing an os
16:36:00 <heat_> it's harder than you believe
16:36:00 <sortie> it's fun
16:37:00 <zid> heat_: he's too busy making the bootloader support 4096 cores optimally
16:37:00 <heat_> 4096 cpus is LULSCALE
16:37:00 <heat_> literally laptop
16:37:00 <sortie> mjg, idk, committing a fixed amount of memory to a filesystem cache seems honestly quite fine to me
16:38:00 <heat_> it is unix tradition after all
16:38:00 <zid> just cache all the inodes etc until malloc starts to fail, then back off a quarter turn
16:38:00 <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
16:38:00 <sortie> That's not a problem if the filesystem cache is committed
16:38:00 <mjg> but can you survive the following test: 20 mln files get created
16:38:00 <zid> or was that the torque spec
16:38:00 <mjg> open + close
16:39:00 <mjg> not more than one open at a time
16:39:00 <sortie> I hope you like N squared lol
16:39:00 <heat_> more N is always better
16:39:00 <mjg> i'll note it's 20 * 1000 dirs * 1000 files
16:40:00 <mjg> so if the lulbehavior is coming from handling of one directory it's going to be fine
16:40:00 <mjg> sortie: just run this when you find some time https://people.freebsd.org/~mjg/fstree.tgz
16:41:00 <mjg> of "real" systems out there linux, freebsd and openbsd survived no problem, freebsd being the fastest(!)
16:41:00 <mjg> netbsd and dragonflybsd kept running into OOM
16:41:00 <mjg> solaris sruvived
16:41:00 <heat_> onyx does it in negative time
16:42:00 <heat_> time will literally go backwards
16:42:00 <sortie> Sortix is not exactly known for reliably surviving OOMs in the kernel
16:42:00 <mjg> well i am asking if you can survive this one
16:42:00 <sortie> It *is* supposed to work but a bunch of cases are unfortunately untested
16:42:00 <mjg> i'm collecting results for funzies
16:42:00 <sortie> mjg, obviously we know the result already
16:42:00 <mjg> i intend to add haiku and other kernels
16:43:00 <sortie> You can just quickly spin up a Sortix VM if you wanna try it out
16:43:00 <mjg> heat_ claims he will beat his kernel to shape
16:43:00 <heat_> zid, i'm wondering if processing format specifiers in chunks is any easier
16:43:00 <heat_> instead of the goto soup
16:43:00 <zid> how would you do it in 'chunks'
16:44:00 <zid> and the goto soup is a single goto
16:44:00 <heat_> like: while(*s) { if (*s == '%') s += process_specifier(s, va); }
16:44:00 <zid> so now it's recursive?
16:44:00 <zid> instead of a goto?
16:44:00 <heat_> why recursive?
16:44:00 <zid> You just put the body into a named function, then?
16:44:00 <zid> that's just STYLE
16:44:00 <zid> not chunking
16:45:00 <heat_> my printf is kinda weird
16:45:00 <heat_> https://github.com/heatd/hsd/blob/master/usr/sys/sys/printf.c#L126
16:45:00 <bslsk05> ​github.com: hsd/usr/sys/sys/printf.c at master · heatd/hsd · GitHub
16:46:00 <heat_> i process char-by-char instead of looking ahead
16:46:00 <zid> Mine's while(1){ while(*p != '%') putchar(*p); if(!*p) return; c = *p++; switch(c) { } }
16:46:00 <heat_> all in the same loop
16:46:00 <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
16:46:00 <zid> repeat
16:47:00 <zid> while(*p && *p != '%') even
17:01:00 <node1> Do you think today malware can be easily bypass (EDR) systems and antivirus software ??
17:02:00 <node1> And take somewhere sit inside the processor
17:05:00 <vaihome> node1 CIAs and NSAs penetration software might be able to do it, but even this software is affected by the antivirus guardian protection
17:06:00 <vaihome> sitting on your hard disk firmware, display adapter, etc.
17:06:00 <vaihome> BIOS
17:06:00 <vaihome> CMOS
17:06:00 <zid> ran out of the tablets I see
17:11:00 <node1> okay. but it looks like no one is safe
17:12:00 <heat_> you'll never be 100% safe
19:09:00 <dostoyevsky2> anyone know some good examples of orthogonal OSes?
19:11:00 <GeDaMo> Orthogonal in what sense?
19:15:00 <dostoyevsky2> GeDaMo: I don't want to say, because then it would just be my version of an orthogonal OS
19:15:00 <zid> ones where the pieces cannot move diagonally, so no queensor bishops
19:16:00 <heat_> the problem is that we don't know what an orthogonal os is
19:16:00 <heat_> so unless you define it you can't get an answer
19:17:00 <GeDaMo> You have single language systems like Oberon or Smalltalk
19:17:00 <leg7> What does that have to do with orthogonality?
19:17:00 <GeDaMo> It's the only thing I can think of :P
19:17:00 <leg7> ok
19:18:00 <dostoyevsky2> GeDaMo: Oberon an Smalltalk are orthogonal to other OSes?
19:18:00 <leg7> you tell us bro Xd
19:18:00 <zid> I already told you what it means heat smh
19:18:00 <GeDaMo> Orthogonal in the sense that the kernel and all the applications are written in a single language
19:19:00 <GeDaMo> I suppose that kind of applies to Unix too :|
19:19:00 <zid> Everything's C if you dig hard enough
19:19:00 <heat_> except go
19:19:00 <zid> unix requires very little digging
19:19:00 <leg7> I don't really understand why that would be important
19:19:00 <zid> it's.. romantic?
19:19:00 <dostoyevsky2> GeDaMo: Wouldn't orthogonalilty imply some kind of independence?
19:19:00 <zid> not sure if it's *important*
19:19:00 <heat_> MIT wrote a unix entirely in go
19:20:00 <heat_> for the fun of it
19:20:00 <zid> did they bootstrap the go in go
19:20:00 <leg7> I saw an os in python a few weeks ago
19:20:00 <zid> and the go compiler in hand assembled go
19:20:00 <zid> using an assembler written in go
19:20:00 <Ermine> unix in go?
19:20:00 <heat_> their tooling is in go
19:20:00 <GeDaMo> There was a Unix written in Pascal too
19:20:00 <dostoyevsky2> https://github.com/gokrazy/gokrazy
19:20:00 <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)
19:20:00 <heat_> i'm fairly sure all of the golang stuff is in go, it's in C++ if you use gcgo
19:21:00 <Ermine> OS in Pascal is less surprising
19:23:00 <dostoyevsky2> https://monogon.tech/monogon_os.html
19:23:00 <bslsk05> ​monogon.tech: Monogon — Metropolis
19:24:00 <dostoyevsky2> hmmm.. but that's also a userland written in Go, not the actual OS
19:24:00 <zid> I want a looongos to run on my loooong cpu
19:24:00 <zid> written in goooo
19:24:00 <zid> or foooortran
19:24:00 <heat_> there's a parameter to the golang build system named GOOS
19:26:00 <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)
19:26:00 <kof673> so package managers are a good example of unorthogonal perhaps :D
19:27:00 <kof673> but, orthogonal to each language perhaps, if not the whole
19:27:00 <kof673> > my version of an orthogonal OS yes, but i don't see a way around that
19:28:00 <kof673> anything anyone else tells you -- is just their version surely?
19:29:00 <kof673> wikipedia, orthogonality in a programming language: > The meaning of an orthogonal feature is independent of context; the key parameters are symmetry and consistency
19:29:00 <kof673> so "symmetric to what?" "consistent to what?" there is no way around that IMO
19:29:00 <kof673> even if the answer is just "internal consistency" (to itself, screw the outside world)
19:30:00 <kof673> and...it was leenode that thought they could ignore conway's law or somehow supercede it :D so...you have that...
19:31:00 <heat_> zid, are va_lists passed by reference or by value?
19:31:00 <dostoyevsky2> heat_: Go inspired me to start with this orthogonal OS ieda
19:31:00 <heat_> in arguments
19:33:00 <zid> heat_: hidden struct pointer param I think
19:33:00 <zid> https://godbolt.org/z/GafshxrqY
19:33:00 <bslsk05> ​godbolt.org: Compiler Explorer
19:33:00 <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.
19:34:00 <zid> codegen is what you'd want, right?
19:34:00 <zid> making an actual pointer might be better, for other architectures with diff conventions?
19:35:00 <kof673> --version --help those are "orthogonal" minor thing, but consider a world without those, or varying with every program :D and "--" even.
19:35:00 <heat_> i can't pass va_arg by value
19:35:00 <heat_> sorry, va_list
19:35:00 <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
19:35:00 <zid> I mean, I just did?
19:36:00 <heat_> cuz then if you consume args with va_arg in the called function, the caller can't touch va_list again
19:36:00 <zid> ah you mean like that
19:36:00 <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
19:36:00 <zid> right
19:36:00 <zid> idk why you're so intent on naming the body of your loop though
19:36:00 <heat_> the pointer should just work though
19:37:00 <heat_> i want it to be maintainable
19:37:00 <zid> the body of the loop is mess maintainable?
19:37:00 <heat_> because then i want to pimp my printf
19:37:00 <zid> less
19:37:00 <kof673> dostoyevsky2, well i would perhaps say one does not notice its presence, but the absence is glaring :D
19:37:00 <zid> pimp it then, it's just whether the code is inside vaprintf or directly above it, though
19:37:00 <zid> and doesn't change otherwise
19:37:00 <kof673> (for OSes/computer stuff, not directed towards mathematics)
19:38:00 <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.)
19:38:00 <kof673> *of a good admin
19:40:00 <heat_> zid, i feel like my current impl is awful and i'm trying to untangle it
19:40:00 <zid> Sounds likely
19:40:00 <zid> did you wanna look at the crappy one in my bootstrap again? :P
19:40:00 <heat_> nah
19:40:00 <heat_> what i'll probably end up doing is writing a simple state machine
19:40:00 <zid> https://github.com/zid/bootstrap/blob/master/boot/print.c#L95
19:40:00 <bslsk05> ​github.com: bootstrap/boot/print.c at master · zid/bootstrap · GitHub
19:41:00 <zid> oh no, a simple state machine!
19:41:00 <zid> it burns!
19:41:00 <heat_> %[$][flags][width][.precision][length modifier]conversion
19:41:00 <heat_> this is okay to parse
19:41:00 <zid> how do you implement $ actually
19:41:00 <zid> in C
19:41:00 <heat_> i think they end up using an array
19:42:00 <heat_> glibc might actually use malloc there, not sure
19:42:00 <zid> just va_arg everything into an array?
19:42:00 <heat_> yea
19:42:00 <zid> fair
19:42:00 <zid> be nice if there was a va_peek
19:42:00 <zid> you wouldn't need the frankly needless allocation
19:43:00 <heat_> geist, btw your printf tests are freaking amazing
19:43:00 <heat_> thank you
19:43:00 <zid> oh yea I got half way through porting those to C
19:43:00 <zid> when you were last on the printf train
19:44:00 <zid> I got interested too and wanted to write a more fleshed out printf for about 20 mins
19:44:00 <zid> before I got distracted by squirrels
19:49:00 <geist> heat_: oh thanks
19:49:00 <geist> reminds me i was just thinking of automating them if i haven't yet
19:50:00 <zid> has anyone used $ or %n outside of an exploit
19:50:00 <heat_> somehow someway someone has used %n for something just thinking they're clever
19:50:00 <zid> yea I am sure, sadly, the bastards
19:51:00 <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
19:51:00 <geist> it's occasionally useful
19:51:00 <zid> "Look, I can write %s%$1s to print a string twice!"
19:51:00 <heat_> int total_len = sprintf(buf, "%s%n%s", first_part, &first_part_len, second_part)
19:51:00 <zid> "You mean, you can use it in format attacks to leak the stack pointer"
19:52:00 <zid> I did a ctf recently and it had three format string attacks :P
19:52:00 <heat_> this is truly OPTIMAL stuff
19:52:00 <zid> Lot of messing with %n and $
19:52:00 <geist> i do like to compile with -Wformat=2 and whatnot
19:52:00 <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
19:52:00 <bslsk05> ​tristancacqueray.github.io: Introducing Butler Virtual Operating System – Tristan's Zettelkasten
19:52:00 <geist> OTOH that enables a warning that basically makes it illegal to have the format string anything but a native string
19:52:00 <geist> whcih i get it, but occasionally i's useful to select a format based on something
19:52:00 <zid> Yes, that's what makes something an OS in my view too, certificates
19:53:00 <zid> geist: why can you not select a format though? you just _Generic around the printf rather than around the """
19:53:00 <geist> that's the only way i've seen it let me do it without warning
19:53:00 <zid> compiler will hoist it anyway
19:53:00 <zid> lower it? :P Put it outside of the _Generic
19:54:00 <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
19:54:00 <bslsk05> ​github.com: lk/lib/debug/debug.c at master · littlekernel/lk · GitHub
19:54:00 <geist> so i have to move the ternary inside the printf
19:54:00 <geist> to make the warning stop, which is just dumb
19:54:00 <zid> (so that it's just mov rsi, str1; jmp out; mov rsi, str2; jmp out; ... out: call printf)
19:54:00 <zid> I actually had a fizzbuzz that used ? inside printf's arg list
19:54:00 <zid> and got -Wformat to give spurious answers
19:55:00 <zid> To be fair, I was being.. silly
19:55:00 <dostoyevsky2> GeDaMo: Also, arcan
19:56:00 <GeDaMo> dostoyevsky2: arcan?
19:57:00 <zid> printf(a&&b ? "%d\n" : "%s\n", a&&b ? i : (a ? "buzz" : b ? "fizz" : "fizzbuzz"));
19:57:00 <zid> gcc used to get very upset about this.
19:57:00 <zid> It couldn't figure out whether strings or ints matched the format string, weirdly :P
19:57:00 <heat_> woah?!
19:57:00 <heat_> you're a musl developer??
19:57:00 <zid> ikr
19:57:00 <zid> https://github.com/AbstractBeliefs/BadBuzz/tree/3de59f901d94a71cbed8a4efc5f95dc6ccd0624d/C
19:58:00 <bslsk05> ​github.com: BadBuzz/C at 3de59f901d94a71cbed8a4efc5f95dc6ccd0624d · AbstractBeliefs/BadBuzz · GitHub
19:58:00 <heat_> a true musl developer would have a "fizzbuzz" string and somehow + a random offset into the string
19:58:00 <zid> that's how I did my assembly one
19:58:00 <zid> I printed fizzbuzz or fizzbuzz+4
19:58:00 <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
19:58:00 <zid> or fizz (len=4 to write)
19:58:00 <bslsk05> ​'Arcan 0.6.3 - I, PTY, The Fool.' by arcanfrontend (00:05:29)
19:59:00 <zid> Just two C ones here though
19:59:00 <zid> I'm a big fan of zid.c, who needs conditionals
19:59:00 <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."
20:00:00 <zid> GeDaMo: https://github.com/AbstractBeliefs/BadBuzz/blob/3de59f901d94a71cbed8a4efc5f95dc6ccd0624d/C/zid.c That's the normal way to write a fizzbuzz yea?
20:00:00 <bslsk05> ​github.com: BadBuzz/C/zid.c at 3de59f901d94a71cbed8a4efc5f95dc6ccd0624d · AbstractBeliefs/BadBuzz · GitHub
20:00:00 <GeDaMo> Seems reasonable
20:02:00 <dostoyevsky2> GeDaMo: I think nobody really knows what arcan is, so I guess they could add the ? to name
20:08:00 <heat_> zid: printf(a&&b ? "%d\n" : "%.*s\n", a&&b ? i : 4*(!a+!b), "fizzbuzz"+!b*4);
20:08:00 <heat_> i think this works?
20:08:00 <heat_> it's optimal
20:12:00 <zid> obtimul
20:12:00 <zid> combining both is cute
20:13:00 <geist> maybe write it in assembly and then reverse back how to get C to generate it directly
20:13:00 <GeDaMo> You have a&&b twice :|
20:13:00 <zid> yea you need it on both sides sadly
20:14:00 <zid> you can't get ? to evalulate to two things at once, that'd be a nice trick though
20:14:00 <zid> f(p ? (a, b) : (a, c));
20:14:00 <zid> sadly you just get comma operator and it evaluates to b or c
20:18:00 <GeDaMo> I was wondering if it could be done with a macro but I can't be bothered :P
20:18:00 <zid> I don't think you can
20:20:00 <zid> C already has a structure for this, it's called "if"
22:10:00 <mjg> more messing with chatgpt: "write a closure program which(...)"
22:10:00 <mjg> response: Certainly! Below is a Python program that uses closures(...)
22:10:00 <mjg> :d
22:11:00 <heat_> just asked chatgpt to write me a printf
22:12:00 <heat_> it wrote a printf that uses printf to print
22:12:00 <mjg> :)
22:12:00 <mjg> it is garbage innit
22:12:00 <zid> makes sense
22:12:00 <zid> if I were a word predictor, I'd predict printf for printing text
22:24:00 <Ermine> printf(a&&b ? "%d\n" : "%.*s\n", a&&b ? i : 4*(!a+!b), "fizzbuzz"+!b*4); --- what does it do
22:29:00 <zid> prints either i with %d
22:29:00 <zid> or the first 4 characters of 'fizzbuzz' or the last 4 characters of 'fizzbuzz' or 'fizzbuzz'
22:30:00 <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
22:30:00 <zid> and str+b*4
22:34:00 <nikolapdp> mjg i assume you meant the programming lanuguage, in which case it's spelt clojure
22:35:00 <mjg> heh, i did not notice i typoed it
22:35:00 <mjg> my bad !
22:36:00 <nikolapdp> lol
22:36:00 <nikolapdp> got to spell right to get what you want init
22:36:00 <zid> nikolapdp always gives me clojure after we cuddle
22:36:00 <nikolapdp> innit
22:36:00 <nikolapdp> we like our lisps here
22:41:00 <heat> i want init?
22:41:00 <heat> no, dont initialize, shut down instead
22:42:00 <mjg> dtor
22:45:00 <Ermine> unitialized value detected
22:46:00 <heat> woah you're signing up to add KMSAN to onyx? okay then!
22:49:00 <mjg> how do you say PESSIMAL in portugese
22:49:00 <mjg> is it onyx
22:49:00 <heat> péssimo
22:49:00 <heat> keep that saved for posteriority
22:50:00 <heat> how do you say that in polish?
22:50:00 <heat> kwaszszwa?
22:50:00 <mjg> "skurwiała sraka"
22:54:00 <vaihome-> hi guys, I am buying a Core i7 machine today
22:56:00 <heat> my printf is passing all the tests
22:56:00 <heat> subscribe to my onlyfans
22:59:00 <zid> now add some $ and %n tests
23:00:00 <sortie> 'another day ssh'ing into my OS and compiling php on it
23:00:00 <heat> i'm not supporting $ nor %n
23:00:00 <heat> i will be supporting however pimped up specifiers
23:00:00 <sortie> You can get away without $
23:00:00 <heat> want to print an ipv4 address? don't worry, you'll be able to do that
23:00:00 <sortie> Lack of %n will blow up in your face
23:00:00 <heat> why?
23:00:00 <sortie> It's too used by ports in practice
23:01:00 <heat> this is for the kernel
23:01:00 <zid> %n in kernel sounds sick for exploits, add it
23:01:00 <heat> new kernel rule every printf must have a %n
23:01:00 <zid> I'm sure I can make a HID device with %n as its device name or something
23:03:00 <zid> my monitor has a message for you
23:04:00 <zid> it said squiggle, box, squiggle, hdmi symbol, dvi symbol, squiggle, squiggle, 1
23:04:00 <zid> I think it was trying to tell me that hdmi 1 just connected, but the font indexing was all broken
23:04:00 <heat> wow that's so racist
23:04:00 <heat> believe me i speak monitor
23:05:00 <kof673> squiggle is a technical term for tilde in some circles
23:07:00 <dostoyevsky2> kof673: some circles with a tilde in it?
23:14:00 <heat> i actually wrote vfprintf with some concept of a stream
23:14:00 <heat> i'll probably switch it to a more buffer-focused vsnprintf when i merge it
23:15:00 <heat> just to avoid the indirect calls. printk will just write to the ring buffer anyway
23:47:00 <geist> vaihome-: didja get it?
23:50:00 <nikolapdp> vaihome-: nice, i got a r7 recently :)