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=23

Tuesday, 23 April 2024

00:20:00 <kof673> mjg: not related to fred, but just as a general "conway's law" :D not arguing for or against : > Strategic Partners of WEF 2009 AMD [no idea currently] when you say "AMD" (or thousands of other entities) ...."stakeholder" stuff is involved, atop the usual corporate veil
00:20:00 <kof673> just meant as "like webdev...there are x other "stakeholders" "
00:21:00 <kof673> i doubt that directly affects such a micro decision, but macro level more perhaps
00:29:00 <kof673> this is meant in the spirit of "what will amd do?" excuse me sir, i think you mean amd/stakeholders
01:22:00 <Matt|home> apologies for the off topic question: does anyone know if management software exists for multi platform LANs, or if it's just not practical? example: something that allows me to make one setting change on one computer reflect across the entire network, like adding a new user to a mac locally will update to adding a new user across every machine regardless of OS
01:23:00 <Matt|home> or would that be a hugely stupid security flaw? i assume this is why most industry sticks to one OS on their networks
01:25:00 <CompanionCube> which OSes, specifically?
01:26:00 <Matt|home> uhhh well ideally software that could support as many platforms as possible so everything from android to ios to windows, but if that's completely infeasible (which i assume it is) then at least soemthing that can operate across linux and windows would suffice
01:27:00 <CompanionCube> well, android/ios aren't really multi-user operating systems, but for Linux and Windows the relevant thing to look at would be Active Directory
01:29:00 <Matt|home> yeah im still unclear on the difference between something like active directory and SMB or whatever, but if my assumption that it's basically a fancy UI for network and system management and it works on linux as well i'll look into setting it up
01:29:00 <Matt|home> thanks CompanionCube
01:29:00 <CompanionCube> SMB is a network filesystem
01:30:00 <CompanionCube> Active Directory is Microsoft's branding for their solution to this, which involves a few different elements
01:30:00 <Matt|home> yeah something to do with domains or some such, i don't know anything about windows management yet
01:31:00 <Matt|home> ty <3
01:31:00 <CompanionCube> probably it's very overkill for you but oh well
01:31:00 <Matt|home> maybe, if it's a ridiculous amount of effort i won't bother
01:32:00 <Matt|home> for me in terms of level of "not worth it" it was when i was setting up a BIND server for fun. that was my upper limit on effort for a project i didn't have _that_ much interest in
01:32:00 <Matt|home> never set up a BIND server ;_; just don't do it.. boycott..
01:34:00 <CompanionCube> for linux the thing you want to look up is 'Samba'
01:35:00 <Matt|home> yeah i know how samba works thankfully :D
01:35:00 <CompanionCube> well if you want you can use that to run the thing, it has support for that
01:36:00 <Matt|home> CompanionCube , just out of curiosity can i ask what your preferred work environment is for computer stuff? just a personal preference i don't care about specifics
01:37:00 <CompanionCube> Matt|home: this was the result of me asking a similar question, but no i don't really have opinions
02:15:00 <geist> yah Kerberos, which relates to AD somehow nowadays
02:15:00 <geist> but basically the gist is you get user management into a central database
02:15:00 <geist> i have never set any of this up so i have no idea
02:25:00 <CompanionCube> kerberos is the auth bit of the puzzle, like on unix
03:55:00 <kof673> Matt|home, i don't now modern stuff but ancient "yellow pages" stuff for various unix...it depends on what platforms/versions.
03:56:00 <kof673> i mean, in unixland you can ghetto just sort of synchronize groups/passwd files across machines, but that is assuming they are identical on all osen, etc.
03:56:00 <kof673> but IIRC i believe that is more less all that "yellow pages" did lol
03:56:00 <kof673> *more or less
03:56:00 <kof673> there were "netgroups" too but not sure anyone uses them...nfs does i think, 1+ machines can be added to a "netgroup" and that can be used in various configuration files
03:57:00 <kof673> point being: ancient stuff certainly did exist, but not sure anyone uses them. stuff like novell netware, the os would either include a client and/or it cost extra
03:57:00 <kof673> *the other os that had to interface, for file server/login i believe, maybe some more things, printing...
03:57:00 <kof673> *know
03:58:00 <kof673> there are much simpler DNS servers, it is nice for a LAN to have .internal local names but some people don't like "split DNS" if you had to later expose this :D
03:59:00 <kof673> and if you only use ssh keys to reach other machines...then remote machines e.g. headless might even be fine with password login totally disabled :D
04:00:00 <kof673> UNIXland i think generally you can do diskless stuff, /home and other things over NFS, but yeah, not sure if this is still "modern" :D
04:01:00 <kof673> and then....let's say firefox...can it handle a shared /home directory, if you run firefox on two different machines, two different cpus, or will that crash and burn if you don't point them at separate directories/profiles :D
04:02:00 <kof673> depends on the program if it will like you sharing configuration files across cpus/osen, for example :D
04:05:00 <kof673> many years ago, i use to have a window manager set up, so that the menu options would find the "least loaded machine" and remote X display the selected program...but it depends on the program how well that works :D
04:06:00 <kof673> https://docs.freebsd.org/en/books/handbook/network-servers/ that covers the old ancient NIS/"yellow pages"
04:06:00 <bslsk05> ​docs.freebsd.org: Chapter 32. Network Servers | FreeBSD Documentation Portal
04:07:00 <kof673> other osen might vary :D
04:14:00 <kof673> IIRC i believe like DNS you can say "search local files first, then go out to the network" and pick the ordering of lookups for users and groups
04:25:00 <kof673> for 'manual' "synchronization of files across machines/whatever" isn't that what puppet and other stuff is for? i don't follow these things :D
07:35:00 <dostoyevsky> kof673: how about a distributed file system?
07:48:00 <GreaseMonkey> how fiddly does IDE get in practice? using raw IDE in QEMU with nothing but RBIL and guesswork seems to take about as much code space as using the INT 13h LBA stuff, but, well, QEMU can be quite generous in this regard
07:48:00 <GreaseMonkey> using one of the guides on the osdev wiki actually worked when using the freedos live cd
08:07:00 <Mutabah> IDE is pretty simple iirc, although I've only worked with emulators
09:02:00 <ddevault> day 3 https://files.catbox.moe/nvd67p.png
09:03:00 <nikolapdp> ddevault what are the additions
09:03:00 <ddevault> everything, I started from scratch(ish)
09:04:00 <nikolapdp> oh nice, basically caught up to what you had as it seems
09:04:00 <ddevault> nah, this isn't related to helios
09:04:00 <nikolapdp> oh?
09:04:00 <ddevault> this is a more recreational project, monolithic unix-ish OS
09:04:00 <nikolapdp> neat
09:04:00 <nikolapdp> code?
09:04:00 <ddevault> I pulled in some helios code that is applicable to a monolithic kernel and the rest is from scratch
09:04:00 <bslsk05> ​git.sr.ht: ~sircmpwn/bunnix - A simple monolithic Unix-ish kernel - sourcehut git
09:04:00 <ddevault> https://git.sr.ht/~sircmpwn/bunnix
09:04:00 <nikolapdp> bunnix, nice name
09:05:00 <ddevault> speedrunning a Unix for fun :^)
09:05:00 <nikolapdp> heh nice
09:05:00 <nikolapdp> are you doing a basic unix like v7 or are you planning something more ambitious
09:05:00 <ddevault> dunno
09:05:00 <ddevault> maybe self hosting
09:06:00 <nikolapdp> sounds doable
09:06:00 <nikolapdp> tcc+hare
09:06:00 <ddevault> more likely cproc than tcc
09:06:00 <ddevault> the main challenge would be binutils
09:07:00 <ddevault> right now I'd like to get a shell and some basic utilities, plus ext4 and FAT and a VFS
09:07:00 <ddevault> then I'll put in some kind of libc and see about a few ports
09:07:00 <nikolapdp> porting an existing shell sounds challenging
09:07:00 <nikolapdp> or did you mean writing your own
09:07:00 <ddevault> dunno, depends
09:07:00 <ddevault> ash with job control patched out probably isn't that hard
09:07:00 <kof673> dostoyevsky, yes, i was just trying to say "username/groups/password synchronization" is very old :D
09:07:00 <ddevault> but yeah for the start I'll just write a simple shell myself
09:08:00 <nikolapdp> neat
09:08:00 <kof673> and nfs is lowest common denominator for old stuff.....
09:10:00 <kof673> nis is ancient, but kerberos and ldap always seemed more work to me
09:12:00 <ddevault> maybe I'll use mlibc to speed things up
09:12:00 <ddevault> C++ though, blegh
09:15:00 <kof673> i just wanted to throw in an old answer, i'm sure he wants something more modern and runs more modern things :D
09:15:00 <nikolapdp> musl seems to be a popular choice for a first libc
09:16:00 <ddevault> musl is the basis of the helios libc
09:16:00 <ddevault> but mlibc would probably be better for a "speedrun"
09:17:00 <ddevault> since it's much more portable
09:18:00 <ddevault> but it is written in C++ which promises a significant amount of headache
09:18:00 * kof673 pets both gog and pog, gives both cheese
09:22:00 * pog prr and fascinate
09:24:00 <nikolapdp> well i'd avoid cp
09:24:00 <nikolapdp> cpp
09:48:00 <heat> a libc written in C++ is as much of a headache as one written in C
09:49:00 <heat> unless it's garbage. in that case, the C one would probably be worse
09:49:00 <ddevault> spoken like a true C++ user
09:50:00 <heat> the things i write are barely considered C++
09:50:00 <nikolapdp> lol
09:50:00 <ddevault> spoken like a true C++ user
09:50:00 <ddevault> MY subset of C++ is good actually!
09:50:00 <heat> i write C
09:50:00 <heat> but seriously, there's no difference unless you have headers full of identifiers named new and class
09:50:00 <nikolapdp> c doesn't have lambdas
09:51:00 <ddevault> do you compile your C code with gcc or g++
09:51:00 <heat> good news neither do I
09:51:00 * pog lambdas
09:51:00 <nikolapdp> i've seen your code heat, you do
09:51:00 <heat> my lambdas are just syntactical sugar around plain function pointers
09:52:00 <heat> because i dont have std::function and all that horribleness
09:52:00 <nikolapdp> so you do use lambdas
09:52:00 <heat> https://github.com/heatd/Onyx/blob/master/kernel/kernel/mm/slab.cpp
09:52:00 <bslsk05> ​github.com: Onyx/kernel/kernel/mm/slab.cpp at master · heatd/Onyx · GitHub
09:52:00 <heat> does a C programmer understand this file?
09:52:00 <heat> i'd wager yes
09:52:00 <nikolapdp> lol still not c
09:52:00 <nikolapdp> but yes, sure, i do understand
09:52:00 <heat> read it
09:53:00 <heat> you know what this is?
09:53:00 <nikolapdp> read what
09:53:00 <heat> it's like kernel C, with the scoped locks and everything
09:53:00 <nikolapdp> i mean it's in the name of the file
09:53:00 <pog> i don't understand it
09:54:00 <heat> but you're a cat pog
09:54:00 <heat> that's understandable
09:56:00 <pog> oh yeah
09:56:00 <zid> monig
09:58:00 <nikolapdp> morng
10:00:00 <leg7> mrnng
10:01:00 <heat> kenrel
10:05:00 <pog> kornol
10:05:00 <leg7> krnl
10:05:00 <heat> ddevault, btw dash is also pretty portable
10:05:00 <heat> it doesn't need job control
10:05:00 <heat> it'll *try to* get job control, but if it doesn't work it can't be arsed to try again
10:06:00 <heat> so as long as you have some sort of tty device you can write and read to, you're fine
10:06:00 <ddevault> cool, that'll do
10:06:00 <heat> bash is significantly more fucked up as it tries to poll your fds and do line editing and all that jazz
10:07:00 <ddevault> yeah not going to bother with bash
10:07:00 <ddevault> and I really don't want to implement TTYs properly, TTYs suck
10:07:00 <nikolapdp> they do
10:07:00 <heat> that's sane
10:07:00 <zid> TTY for life
10:07:00 <zid> what's wrong with ttys :(
10:08:00 <heat> zid what happens when your session leader dies but you still have processes in the foreground pgrp
10:08:00 <heat> this is a tty semantics quiz
10:08:00 <zid> I don't have session leaders
10:08:00 <nikolapdp> lol
10:08:00 <pog> omg this property injection pattern is fucking killing me
10:09:00 <zid> that's nothing to do with ttys, that's "what linux does"
10:09:00 <zid> as usual
10:09:00 <heat> wrong
10:09:00 <zid> you failed to separate them
10:09:00 <heat> it's specified by POSIC
10:09:00 <ddevault> session leaders are defined by POSIX
10:09:00 <heat> POSIX
10:09:00 <zid> and?
10:09:00 <ddevault> (poorly) defined
10:09:00 <zid> Still nothing to do with ttys
10:09:00 <ddevault> wrong
10:09:00 <heat> it's not "what linux does", it's "what POSIX says ttys do"
10:09:00 <ddevault> they interact with TTYs in meaningful ways
10:09:00 <zid> That's like saying that cats are shit because they don't have front toes
10:09:00 <zid> then I find out you mean "what certain americans do to cats"
10:10:00 <heat> i'm saying cats are shit because they're weird and smelly
10:10:00 <ddevault> if you don't have session leaders your TTY implementation is not POSIX conformant
10:10:00 <ddevault> go read the spec
10:10:00 <zid> okay, good
10:10:00 <zid> no
10:10:00 <heat> (cats are not shit btw, don't cancel me)
10:10:00 <zid> posix doesn't get to control how my 50kg box of metal and plastic from the 60s works
10:11:00 <zid> sorry posix
10:11:00 <heat> anyway the answer was
10:11:00 <heat> it's an orphaned process group, so the foreground gets a SIGHUP + SIGCONT and those processes' controlling tty gets cleared
10:20:00 <Ermine> heat: bash, at least old, doesn't need job control either
10:21:00 <Ermine> it (iirc, 3.x or 4.x) runs in minix somehow
10:22:00 <heat> that's possible, they're all designed to run in shite situations without job control
10:22:00 <heat> maybe against /dev/console?
10:24:00 <heat> also probably stuff like curl | bash -
10:29:00 <Ermine> I've run it over ssh. Still more pleasant than ksh
10:37:00 <heat> yeah but ssh is a pty so you do have job control
10:38:00 <heat> i use bash for everything because i'm remotely human and i dont use zsh
10:45:00 <leg7> fish is best
10:46:00 <zid> You're thinking of 'what's the best thing to catch in a net in the sea'
10:46:00 <zid> we were talking about shells
10:46:00 <leg7> https://fishshell.com/
10:46:00 <bslsk05> ​fishshell.com: fish shell
10:50:00 * pog chomp fish
10:57:00 <leg7> Are X86 operand sizes relevant to programmers? I thought the assembly language handeled them
10:58:00 <leg7> Section 3.6 of the intel volume 1 manual
10:58:00 <leg7> basic architecture
10:59:00 <GeDaMo> Well, you have to care a little bit about the size of values
11:01:00 <leg7> well in nasm you have to explicitly give the size of operands
11:02:00 <leg7> for example: mov byte [eax + 4], 8
11:02:00 <GeDaMo> Not always, most of the time the assembler can determine the size from registers used
11:02:00 <leg7> yes but not in nasm
11:02:00 <leg7> maybe in gas
11:03:00 <GeDaMo> That's because you're writing a literal to memory, there's nothing there to specify how many bytes you want to write unless you specify
11:03:00 <heat> mov byte [eax + 4], 8 = movl $8, 4(%eax)
11:03:00 <heat> it's as ambiguous
11:03:00 <GeDaMo> If you do mov [eax+4],ebx then it know you're writing 4 bytes because of the size of ebx
11:03:00 <heat> well, in this case, it's not ambiguous
11:04:00 <GeDaMo> It would be movb if you want to write a byte
11:04:00 <GeDaMo> gas uses the mnemonic suffixes to specify size
11:04:00 <leg7> well I'm not sure that would compile gedamo
11:04:00 <heat> what would?
11:04:00 <GeDaMo> Which? mov [eax+4],ebx
11:04:00 <leg7> yes
11:05:00 <heat> thats valid intel syntax
11:05:00 <GeDaMo> 1 0000 67895804 mov [eax+4],ebx
11:05:00 <heat> mov %ebx, 4(%eax) is valid at&t
11:05:00 <GeDaMo> Admittedly that's using gas in Intel mode :P
11:05:00 <leg7> wouldn't it have to be: mov dword [eax+4], ebx
11:05:00 <leg7> in nasm
11:05:00 <GeDaMo> No
11:05:00 <GeDaMo> ebx sets the size
11:06:00 <GeDaMo> Being a 32 bit register
11:06:00 <heat> https://godbolt.org/z/rqW86MWc7
11:06:00 <bslsk05> ​godbolt.org: Compiler Explorer
11:06:00 <heat> compiles just fine
11:06:00 <GeDaMo> From nasm 1 00000000 6667895804 mov [eax+4],ebx
11:08:00 <GeDaMo> Huh, I didn't know godbolt does asm :P
11:11:00 <leg7> https://www.nasm.us/doc/nasmdoc2.html#section-2.2.3
11:11:00 <bslsk05> ​www.nasm.us: NASM - The Netwide Assembler
11:12:00 <GeDaMo> Yes, it doesn't store variable types
11:12:00 <GeDaMo> Registers are not variable
11:12:00 <GeDaMo> Er, variables
11:12:00 <zid> https://godbolt.org/z/do4sWPxn1
11:12:00 <bslsk05> ​godbolt.org: Compiler Explorer
11:12:00 <zid> I mean, you could always have done that
11:13:00 <leg7> yeah I just sent that for clarification
11:15:00 <zid> godbolt didn't even used to have C on its dropdown
11:15:00 <zid> so I had to use C++ and -x c
11:15:00 <leg7> All arithmetic instructions (except the DIV and IDIV instructions) allow the source operand to be an immediate value. The maximum value allowed for an immediate operand varies among instructions, but can never be greater than the maximum value of an unsigned doubleword integer (232).
11:15:00 <leg7> Is this true even in long mode?
11:15:00 <zid> yes
11:15:00 <leg7> ok that's a bit odd
11:15:00 <zid> there's a single mov reg imm64 encoding and that's it
11:15:00 <zid> why?
11:15:00 <zid> You almost exclusively never load 64bit constants
11:16:00 <zid> from .text
11:16:00 <leg7> don't you mean mov reg imm32?
11:16:00 <heat> no
11:16:00 <zid> no?
11:16:00 <zid> You asked if the 32bit limit applied only to pmode
11:17:00 <leg7> yeah
11:17:00 <zid> I said long mode has a singular 64bit immediate instruction, but is otherwise true
11:17:00 <leg7> ok
11:17:00 <GeDaMo> "REX.W + B8+ rd io MOV r64, imm64 OI Valid N.E. Move imm64 to r64." https://www.felixcloutier.com/x86/mov
11:17:00 <bslsk05> ​www.felixcloutier.com: MOV — Move
11:17:00 <zid> even the 32bit versions are barely used in practice
11:17:00 <heat> 64-bit imm instructions for everything would possibly make some of the encodings unencodeable in 15 bytes
11:17:00 <heat> and that would be fun
11:18:00 <zid> I'd say 80% of the time you're dealing with values like "divide by 8", and 19.99% of the time it'd fit in say, a short if that encoding existed
11:18:00 <leg7> so how does something like mov eax, 2^33 work?
11:18:00 <leg7> I mean rax
11:18:00 <zid> You typically don't, let's start with that, but you could either form it mathematically, or with a non-immediate load.
11:18:00 <zid> mov eax, [someval]
11:18:00 <leg7> ok
11:19:00 <zid> when was the last time you wrote 'long long' into a C program
11:19:00 <GeDaMo> The research that lead to RISC found that most immediate values were small
11:19:00 <zid> then passed 2^33 to that function
11:19:00 <zid> that's how often you need that
11:19:00 <zid> yea it's like, zipf's law or whatever I imagine GeDaMo
11:19:00 <zid> 50% are 1 digit, 25% are 2, 12.5% are 3, etc
11:20:00 <GeDaMo> I think the research was by Andrew Tanenbaum
11:20:00 <zid> It's n ice to quantify, but it's fairly obvious
11:20:00 <zid> I've *never* used a 128bit number, but I use '1' constantly. QED.
11:20:00 <heat> mov rax, 2^33 Just Works
11:20:00 <heat> mov r64, imm64
11:20:00 <zid> oh cus of the movsx
11:20:00 <zid> err movabs
11:21:00 <zid> yea, that's the one encoding that DOES exist, lol
11:21:00 <GeDaMo> "Another finding, not fully explored at the time, was Tanenbaum's note that 81% of the constants were either 0, 1, or 2." https://en.wikipedia.org/wiki/Berkeley_RISC
11:21:00 <zid> You meant to say "How does one do add rax, 2^33-7" or whatever
11:21:00 <zid> GeDaMo: I am a geniarse
11:21:00 <zid> if you rub it you get a wish!
11:21:00 <GeDaMo> Er, no thanks :|
11:22:00 <leg7> Well according to the intel manual an immediate value can never be greater than 2^32
11:22:00 <leg7> So it shouldn't work
11:22:00 <zid> you don't listen do you
11:22:00 <zid> There are *zero arithmetic ops that have an immediate bigger than 2^32*
11:22:00 <heat> mov isn't an arithmetic instruction
11:22:00 <zid> there is a *single mov* encoding
11:23:00 <leg7> "The maximum value allowed for an immediate operand varies among instructions, but can never be greater than the maximum value of an unsigned doubleword integer (232)."
11:23:00 <leg7> So the manual is wrong
11:23:00 <zid> are you reading the ia-32e manual
11:23:00 <zid> or the ia-32
11:23:00 <heat> >All arithmetic instructions
11:23:00 <heat> ARITHMETIC INSTRUCTION
11:23:00 <heat> MOV DOES NO ARITHMETIC
11:24:00 <zid> ergh he pasted that last one out of context?
11:24:00 <heat> full quote above
11:24:00 <leg7> The second sentence is independent of the first one
11:24:00 <GeDaMo> mov rax, 0x1234567812345678 can be encoded; add rax, 0x1234567812345678 cannot
11:24:00 <zid> oh ffs yea it's just that one cut in half
11:24:00 <zid> It fucking is not.
11:24:00 <leg7> All arithmetic instructions (except the DIV and IDIV instructions) allow the source operand to be an immediate value. The maximum value allowed for an immediate operand varies among instructions, but can never be greater than the maximum value of an unsigned doubleword integer (232).
11:24:00 <zid> That's not how language works
11:25:00 <heat> ok the answer is
11:25:00 <zid> The thing we told him 8 times
11:25:00 <zid> already
11:25:00 <heat> you're apparently reading an old ass document
11:25:00 <zid> I even asked if he had the ia-32 or ia-32e manual
11:25:00 <leg7> it says it varies among instructions not that it varies among arithmetic instructions. I understand what you're saying it's just that the manual is ambigous here
11:25:00 <leg7> Intel® 64 and IA-32 ArchitecturesSoftware Developer’s Manual
11:26:00 <leg7> Order Number: 325462-082USDecember 2023
11:26:00 <zid> Okay so then maybe you could suggest they tighten that wording up very slightly
11:26:00 <leg7> yes
11:26:00 <zid> but it's not exactly hard to understand
11:26:00 <leg7> It's not hard for you when you know all the instruction encodings
11:26:00 <leg7> I'm reading the manual and it contradicts what you say and you treat me like an idiot when I bring it up
11:26:00 <zid> If I was in a chapter called "Art history of the 1700s" and then the sentence "The predominant technique for painting is sticking brushes up your nose"
11:27:00 <zid> that *still* doesn't say anything about 1900s painting technique
11:27:00 <heat> wow okay this is truly fucking bizarre
11:27:00 <heat> they haven't touched this section since the fucking pentium or something
11:27:00 <zid> nice
11:27:00 <heat> the ppro manual reads exactly the same
11:27:00 <zid> still doesn't matter though
11:27:00 <heat> https://i.imgur.com/ADRqbYg.png
11:27:00 <bslsk05> ​i.imgur.com <no title>
11:28:00 <heat> boss, you forgot a whole mode boss
11:28:00 <heat> the rax is a lie
11:28:00 <zid> hey at least it has fs and gs
11:28:00 <zid> no 3dnow though :(
11:29:00 <pog> 3dnow was an amd extension
11:29:00 <leg7> I asked the question in the first place because when you read 3.7.1 it looks like this only applies to 32bit
11:29:00 <zid> it also just used the mmx nomenclature anyway
11:29:00 <zid> it does
11:29:00 <zid> but it doesn't say anything about 64bit, so you just don't know, which is why you asked
11:29:00 <zid> it doesn't make any *false* claims in that regard
11:29:00 <leg7> yes
11:29:00 <zid> It also happens to still be true
11:29:00 <zid> you just can't *tell*
11:29:00 <zid> But we answered you, 8 times
11:29:00 <zid> and you just argued
11:30:00 <leg7> Yes because the manual says otherwise so I wanted to know which is right.
11:30:00 <zid> You just acknowledged that it only applied to 32bit
11:30:00 <zid> now you're saying it says otherwise
11:30:00 <zid> pick
11:30:00 <GeDaMo> There is one instruction which allows a 64 bit immediate, mov to 64 bit register
11:31:00 <zid> Either you're saying the rax register doesn't exist
11:31:00 <zid> or you're saying that limitation only applies in 32bit
11:31:00 <zid> you can't have *both*
11:31:00 <leg7> I feel like you are always misunderstanding me on purpose to make me look stupid
11:31:00 <zid> If you actually read what the manual says in that chapter, it says 64bit code *does not exist* and that *immediates are limited to 32bit*
11:32:00 <zid> You can't then claim it says 64bit code's immediates are mentioned
11:32:00 <zid> leg7: Maybe don't argue about answers to your questions then?
11:32:00 <zid> Be cooperative instead of combatitive
11:32:00 <zid> and you'll find us more cooperative
11:33:00 <heat> linix kernel
11:33:00 <heat> leg7, you just found a really shitty part of the manual, that's all
11:34:00 <zid> There was no "Oh, weird, the manual here confused me *link*" and we'd have gone "haha yea funny manual is old, it hasn't been updated with rax look, so clearly this can't apply to 64bit"
11:34:00 <heat> it's almost verbatim the same as the ppro manual
11:34:00 <heat> pog, bazel
11:34:00 <pog> msbuild
11:34:00 <leg7> How am I supposed to know the manual hasn't been updated in 10 years jeez
11:34:00 <zid> We got a badly cropped quote designed to de-contextify it to make it look bad with "manual is wrong", looked like it was designed to trick *us*
11:35:00 <zid> 10? oh dear
11:35:00 <zid> You wish
11:35:00 <zid> also, arguing again
11:35:00 <zid> pentium pro was 1995
11:35:00 <heat> hey stop arguing everyone
11:35:00 <zid> my calculator says that was -1771 years ago
11:35:00 <zid> I think I fucked up
11:35:00 <heat> whats your favourite build system
11:35:00 <zid> 29 years ago, nice
11:36:00 <heat> BUILD SYSTEM WAR
11:36:00 <zid> If you have a favourite you care more about wanking than you do about code or software
11:36:00 <zid> qed
11:36:00 <zid> It's like having a favourite serial killer
11:36:00 <heat> wanking tends to be better than software
11:36:00 <heat> no tech debt at least
11:36:00 <zid> computers were a mistake
11:36:00 <pog> software is bad anyway and we should stop building it
11:36:00 <zid> factorio is the only useful pieceof software
11:37:00 <pog> balatro
11:37:00 <pog> zid i won blue deck on black stake
11:37:00 <zid> balatro is love2d, so technically it's not software
11:37:00 <GeDaMo> Let's see you write an OS in Factorio :P
11:37:00 <zid> nice, ur not super shit anymore, that's pretty good
11:37:00 <leg7> Bro you really have to relax. I never tried attacking you, I just ask for clarification and quote the manual and you make me out to be this idiot who is conspiring against you or something. I'm just here for help and information, When I tell you the manual contradicts you it's not to be an asshole it's just because it did.
11:37:00 <pog> factorio circuits are turing-complete
11:37:00 <zid> I didn't say you attacked me
11:37:00 <zid> I said you were arguing
11:37:00 <zid> which you are
11:37:00 <heat> hey everyone chill the fuck out
11:38:00 * GeDaMo grates cheese over everyone
11:38:00 <heat> as samuel l jackson once said
11:38:00 <heat> tell your bitch to be cool
11:38:00 <zid> GeDaMo: I actually suggested to nik yesterday we should make a z80 in factorio
11:38:00 <heat> bitch be cool
11:38:00 <zid> idk how to do it though, best way would be to just write a compiler that spat out the map
11:38:00 <zid> but idk how to do the routing part
11:39:00 <zid> like, if you compiled it to a netlist of factorio parts, you need to turn that into a laid-out PCB with all the wires, and that sounds hard
11:39:00 <zid> I think it's Np hard, too
11:39:00 <GeDaMo> Maybe a Verilo / VHDL to Factorio compiler :P
11:39:00 <GeDaMo> Er, Verilog
11:39:00 <zid> factorio doesn't have point to point wire connections
11:39:00 <GeDaMo> Conveyor belts?
11:39:00 <zid> else it'd be easy
11:39:00 <leg7> zid you made me really sad
11:39:00 <leg7> goodbye
11:39:00 <pog> there are a bunch of youtube videos about making cpus in factorio
11:40:00 <zid> yea someone posted a megabyte of dram yesterday
11:40:00 <zid> I'd care more if bots could handle wire betters tbh :P
11:40:00 <pog> deploying a local redis docker was the best idea i've had today. my testing flow is about 3x faster
11:40:00 <zid> they're annoying, but I think a few of the dev logs have shown imprpovements to that are coming
11:41:00 <heat> redis mongo docker
11:41:00 <heat> the tech people expect us to think this is real
11:41:00 <zid> GeDaMo: sort of p2p but the latency would be insane, and you can't cross them, so it doesn't really help
11:41:00 <zid> wires can cross but the range is tiny
11:41:00 <zid> If gog says "on rails" at any point in the next 20 minutes, can I shoot her?
11:41:00 <zid> It's a mercy
11:42:00 <GeDaMo> Can you put conveyor belts underground or is that just pipes?
11:42:00 <zid> you can but that grants you one crossing
11:42:00 <GeDaMo> (I haven't played much Factorio :P )
11:42:00 <zid> so it's still constrainted
11:42:00 <zid> which means you need a constraint solver still
11:42:00 <zid> so you may as well use wires again
11:45:00 <zid> GeDaMo teach me how to adapt REGISTER COLOURING for eletricity pole colouring I guess :P
11:54:00 <nikolapdp> another constraint, underground belts can only be so long
11:54:00 <Ermine> i wonder why android doesn't use ncm for usb tethering
11:55:00 <Ermine> (instead of rndis)
11:55:00 <zid> pog: https://pbs.twimg.com/media/GL03yw5WcAAFBCj.jpg:large
11:55:00 <zid> disregard programming, acquire 4700 lines of ifs()
11:56:00 <zid> It amazes me just how much WORK people can get done with relatively little ability, and produce such cool things
11:56:00 <GeDaMo> Why isn't that some kind of database table? :|
11:56:00 <zid> meanwhile I could write much nicer code but I can't *produce* anything :(
11:56:00 <pog> ooooooof
11:56:00 <pog> i try to strike a balance between productive coding and attractive coding
11:56:00 <zid> worst part
11:56:00 <zid> spaces: 4
11:56:00 <pog> just stuff the nasty parts into a file you never have to look at
11:58:00 <Ermine> cpus in minecraft are funny btw
11:59:00 <Ermine> gargantuan constructs which work at shite clock rates, but work nonetheless
12:03:00 <heat> pessimal clock rates
12:03:00 <heat> imagine your cpu had to run tons of java just to do an op
12:03:00 <heat> fucking pessimal stuff
12:03:00 <heat> truly shite webdev
12:05:00 <Ermine> even 16bit
12:05:00 <Ermine> 'truly shite webdev' would be if it was written in javascript
12:06:00 <zid> your cpu would be slow too if the speed of light was 1m/s and wires didn't exist :p
12:06:00 <nikolar> :)
12:07:00 <nikolar> The world would be wacky if the speed of light was 1m/s
12:08:00 <ddevault> https://files.catbox.moe/ly5sd9.png
12:08:00 <zid> There was a game of that a while back
12:08:00 <zid> mit student project or whatever id
12:08:00 <zid> but everything redshifted as you moved etc
12:09:00 <zid> yea I was right
12:09:00 <zid> v
12:09:00 <zid> http://gamelab.mit.edu/games/a-slower-speed-of-light/
12:09:00 <bslsk05> ​gamelab.mit.edu: A Slower Speed of Light – MIT Game Lab
12:09:00 <zid> I did grab it and play for 30 seconds back in 2016
12:35:00 <nikolapdp> very nice ddevault
12:36:00 <nikolapdp> yea same actually lol
13:35:00 <ddevault> more https://files.catbox.moe/y43id4.jpg
13:36:00 <zid> SPIN UP
13:36:00 <zid> 250G of western digital power
13:37:00 <zid> poor port 1 got span up and nothing's there?
13:37:00 <ddevault> (staggered spin up, that was a real bitch the first time I wrote an AHCI driver)
13:37:00 <ddevault> port 1 is ATAPI, it's silently ignored
13:37:00 <nikolapdp> very nice ddevault
13:45:00 <zid> when do we get the porn off the drive
13:45:00 <zid> ascii naked nikolar
14:42:00 <zid> discord is having a right moment
15:35:00 <zid> why are pigs cheaper than cheese
15:47:00 <GeDaMo> Pigs are self reproducing :P
15:52:00 <zid> heat: important build info for my KERNAL
15:52:00 <zid> https://cdn.discordapp.com/attachments/588052727267983413/1232357710020743209/image.png?ex=66292a0e&is=6627d88e&hm=e05cc6f03b9841726d56c7c969430c1d5c75d71d27163944e2a54edb764e5e3e&
16:28:00 <ddevault> end of day 3: https://files.catbox.moe/ie7u6w.png
16:51:00 <zid> pog: You made me think of balatro, so I beat purple for ghost deck
16:52:00 <zid> weird shit deck but was super easy to play and just barely scored enough
16:52:00 <zid> sigil turned half my deck into 2s, and I found vampire
16:52:00 <zid> so just.. throw tarot upgrades onto 2s and play 5 of a kind, done
16:52:00 <zid> had random trash other jokers like the +4 mult one :p
17:06:00 <pog> the only illegal hand i got so far is flush house
17:06:00 <pog> i haven't gotten 5 of a kind yet
17:06:00 <pog> anyhow time to go home
17:47:00 <heat> ddevault, cool stuff!
17:47:00 <heat> i like how you wrote down some video mode on your laptop :P
17:47:00 <ddevault> haha yep
17:48:00 <heat> are you taking drivers from your other thing into this one?
17:49:00 <heat> (forgot the name)
17:49:00 <ddevault> yeah
17:49:00 <ddevault> porting them in and adapting them for the monolithic approach
17:49:00 <ddevault> lots of original code though
17:50:00 <ddevault> god having a slab allocator in the kernel simplifies the fuck out of things doesn't it
17:55:00 <mjg> yo, did 8086 have rings?
17:55:00 <mjg> i don't know how much shit i can legally talk about dos
17:57:00 <mjg> i would ask chatgpt but perhaps someone here will know
17:57:00 <GeDaMo> I don't think so
17:57:00 <mjg> maybe i should just google the programmer's manual
17:58:00 <GeDaMo> https://archive.org/details/bitsavers_intel80869yLanguageReferenceGuideOct78_5061675/mode/2up
17:58:00 <heat> ddevault, how do you allocate without a slab allocator?
17:59:00 <heat> or allocator in general i'd guess
17:59:00 <ddevault> helios only has a page allocator
17:59:00 <ddevault> the memory manager is in userspace
17:59:00 <heat> oh
17:59:00 <heat> not many objects then?
17:59:00 <ddevault> somewhat north of a dozen
17:59:00 <ddevault> but all of them are at or rounded up to the page size
18:01:00 <ddevault> plus stack and some globals of course
18:02:00 <heat> yeah i guess it works if they're page-size-ish
18:03:00 <ddevault> yeah, it's stuff like a PML4 or thread state
18:03:00 <ddevault> it's a microkernel after all
18:10:00 <netbsduser> that's very micro
18:11:00 <zid> nikolapdp they're talking about you again
18:11:00 <netbsduser> mach and spring have comprehensive and complete virtual memory implemented in the kernel with an external pager interface for backing objects
18:27:00 <nikolar> :(
18:28:00 <ddevault> well, to be fair I am considering having a fatter microkernel, particularly with a more sophisticated memory manager
18:28:00 <ddevault> the monolithic project is giving me a lot of ideas for improving the microkernel
18:30:00 <ddevault> both in userspace and kernel space
18:30:00 <ddevault> though I imagine most of the memory manager could still be in userspace, but improved nonetheless with some of what I've learned
18:33:00 <nortti> < mjg> yo, did 8086 have rings? ← nope, only one mode of execution, and segments were all 64K in size, read/write/exec, and located at segment_reg * 16 physical
18:33:00 <mjg> nortti: ye that's what i'm reading so far
18:33:00 <heat> yeah weren't rings apart of the 286 protected mode stuff?
18:33:00 <mjg> looks like they came with 285
18:33:00 <nortti> aye
18:33:00 <mjg> i have to oficially shit on dos a little less
18:34:00 <mjg> i always assumed they *could* have used rings, but just did not. in contrast to unix which started with kernel/user separation
18:34:00 <GeDaMo> There were multi-user, multi-tasking systems on 8086
18:34:00 <mjg> with actual protection?
18:34:00 <nortti> no
18:34:00 <mjg> right
18:34:00 <mjg> cooperative multi-tasking is what dos is known for
18:35:00 <mjg> and what was fucking with windows before the nt switch
18:35:00 <nortti> no there were preëmptive systems, they just relied on the user processes not to stomp on each other / the kernel
18:35:00 <mjg> preemptive?
18:35:00 <heat> no, preëmptive, the european version of preemptive
18:35:00 <mjg> you mean something else than cooperative multi-tasking?
18:36:00 <mjg> i only know of tsr's or whatever the acronym
18:36:00 <nortti> yeah, for example xenix ran on 8088 PCs
18:36:00 <GeDaMo> Terminate and Stay Resident
18:36:00 <GeDaMo> Also Concurrent CP/M
18:36:00 <mjg> huh
18:36:00 <mjg> TIL
18:36:00 <heat> xenix? you sure?
18:36:00 <GeDaMo> Yes
18:36:00 <nortti> yeah
18:36:00 <mjg> so how much can i legally shit on dos
18:37:00 <heat> 8088 sounds too small for xenix
18:37:00 <nortti> why?
18:37:00 <GeDaMo> "The first 8086 port was for the Altos Computer Systems' non-PC-compatible 8600-series computers (first customer ship date Q1 1982)." https://en.wikipedia.org/wiki/Xenix
18:37:00 <heat> it.. just does
18:37:00 <heat> maybe my mental map of xenix history is slightly off
18:37:00 <heat> but they ditched 16 bit fairly quickly
18:38:00 <heat> they = unix in general
18:38:00 <nortti> mjg: you can shit on it for having too limited of a hardware abstraction layer, leading to software poking the hardware directly, and also for having no affordances for multitasking in its design
18:39:00 <mjg> heh, so chatgpt correctly claims 8086 did not have rings, i'm impressed
18:39:00 <heat> did you know it does not scale
18:39:00 <heat> actually, no, it scales perfectly
18:39:00 <heat> no locks
18:39:00 <mjg> wrong
18:39:00 <heat> LOCKLESS
18:39:00 <mjg> intel docs for 8086 already talk about the LOCK prefix
18:39:00 <mjg> :s
18:39:00 <mjg> so
18:39:00 <heat> i bet you wont find a single LOCK in dos
18:40:00 <nortti> lemme see…
18:40:00 <mjg> this reminded me of a fucker who claimed some algo is not lockless
18:40:00 <mjg> cause there was a lock-prefixed instruction in generated asm
18:40:00 <mjg> :d
18:40:00 <heat> i agree
18:40:00 <nortti> yeah, no lock prefix in dos 1.25 at least
18:40:00 <heat> you'll need a lock somewhere
18:40:00 <mjg> dozzZ
18:41:00 <mjg> lemme tell ya, norton commander was my emacs
18:41:00 <mjg> for the uninitiated, emacs users do eerything in the fucking editor
18:41:00 <mjg> in dos times it was common to just run nc
18:41:00 <heat> oh yes
18:41:00 <heat> the very common linux irc user that never heard of emacs
18:41:00 <nortti> I would not expect much locking in any case, as even up to windows 3.11 you had "the critical section", as in, one single synchronization object for the entire system
18:41:00 <mjg> it even had shit like ncedit, which is how mcedit came to be
18:42:00 <heat> minecraft edit??
18:42:00 <mjg> hm... did 3.x even support smp?
18:42:00 <mjg> i know nt kernel did, while running the same "shell" or whatever they call it as win 3.x
18:42:00 <acidx> 3.11 in enhanced mode used virtual8086 for every app
18:43:00 <acidx> but the system itself was running in protected mode
18:43:00 <mjg> so presumably as far as source code went, some understanding of multicore had tobe there
18:43:00 <heat> but the nt kernel was good
18:43:00 <nortti> dos 2.0 has LockOper, syscall number 92
18:43:00 <acidx> but, no, win3.11 didn't support smp IIRC. it wasn't that common on desktops back then.
18:43:00 <nortti> aye
18:44:00 <Bitweasil> Far as I know, only the NT series supported SMP. None of the consumer Windows did, until XP.
18:45:00 <Bitweasil> (... and call 2000 what you will, it wasn't really aimed as a consumer OS, though it did a fine enough job at it)
18:45:00 <mjg> hey i had a 2000 on my desktop in high school]
18:45:00 <mjg> rock solid until blaster showed up
18:45:00 <Bitweasil> Blaster? I ran 2k on my box in college for a few years.
18:45:00 <mjg> xp series was shutting down after a minute, 2000 was losing networking
18:45:00 <geist> correct everyone has said here. SMP was very exotic on consumer stuff util late 90s
18:46:00 <nortti> okay looks like LockOper is file locking https://www.ctyme.com/intr/rb-3016.htm
18:46:00 <bslsk05> ​www.ctyme.com: Int 21/AH=5Ch
18:46:00 <mjg> the exploit was causing some process to crash and it was taking networking down with it
18:46:00 <GeDaMo> There were a few asymmetric systems in the 80s :P
18:46:00 <Bitweasil> The Pentium Pros could do it, but were certainly "exotic workstation chips." I believe there were some SMP 486s, but with bizarre glue.
18:46:00 <nortti> geist: how big of a flex was bebox being dual CPU, actually?
18:46:00 <Bitweasil> nortti, you were a god among men if you had one of those. :p
18:46:00 <geist> it was kinda a flex yeah
18:46:00 <geist> also macs had some MP machines, but they weren't properly SMP
18:46:00 <acidx> the LEDs in the case were a flex, probably
18:46:00 <Bitweasil> ... "probably"? :p
18:47:00 <geist> and yeah the LEDs being up front was a major flex
18:47:00 <Bitweasil> BeBox said "I appreciate the weird architectures, and I have money."
18:47:00 <acidx> I've never seen a real working bebox before
18:47:00 <geist> i have a pair of them
18:47:00 <acidx> I saw one at one of the brazilian google offices a while back
18:48:00 <kazinsal> you could probably build some exotic bespoke SMP 8088 system but you'd need a lot of glue logic
18:48:00 <Bitweasil> I'm pretty sure the SMP 486s were "a lot of custom glue."
18:48:00 <acidx> I think that bebox was Bruno Albuquerque's box
18:49:00 <Bitweasil> PPro and following had it natively, more or less.
18:49:00 <nortti> kazinsal: would you? there's no caching, and DMA is already something supported, so presumably bus arbitration is not too hard
18:49:00 <Bitweasil> My first "modern" computer after the 486 was a SMP Pentium 3 board, and I've owned a bunch of P6 based SMP boxes over the years - quad PPro, quad P3 Xeon, etc.
18:49:00 <acidx> I worked at a PC repair shop in the 90s and I remember a SMP Pentium Pro rolling in one day. it was running NT 4 IIRC. I was amazed by the idea
18:50:00 <Bitweasil> Probably had, like, 128 meg RAM too! :D
18:50:00 <Bitweasil> I still think the single fastest system I've ever used in my life was a SMP P3 866 box, Rambus, and a U320 SCSI 15k drive, running XP.
18:50:00 <acidx> right. I had a 486 with 8 megs of ram back then
18:51:00 <Bitweasil> The NVMe stuff is a lot faster, but everything is *so* much more massive these days...
20:03:00 <netbsduser> who even likes rings
20:03:00 <netbsduser> no one
20:04:00 <netbsduser> needless junk, i have no idea why they put it in the vax instead of a traditional user/supervisor mode, but it's aged like milk
20:08:00 <mjg> what filesystem is now being shipped with windows and does it data checksumming?
20:08:00 <mjg> does it do*
20:09:00 <mjg> i know they had something other than ntfs, but i don't know if it ships
20:09:00 <puck> refs?
20:09:00 <mjg> ye that one
20:09:00 <puck> the "dev drive" feature uses ReFS
20:10:00 <puck> https://learn.microsoft.com/en-us/windows/dev-drive/
20:10:00 <bslsk05> ​learn.microsoft.com: Set up a Dev Drive on Windows 11 | Microsoft Learn
20:10:00 <heat> refs doesn't ship
20:10:00 <heat> they ship ntfs
20:10:00 <vdamewood> NotTested File System
20:10:00 <vdamewood> Rarely Effective File System
20:11:00 <mjg> is it still possible to isntall windows on fat? (i'm guessing no, but in that case when was it lost? 7?)
20:12:00 <vdamewood> I think v/ista
20:12:00 <vdamewood> Come to think of it, It might have even been XP.
20:23:00 <mjg> i think xp allowed to convert fat to ntfs
20:23:00 <mjg> but i don't recall if it *demanded* it
20:32:00 <zid> we know the requirement for reiserfs, what do you have to kill to work on ntfs?
20:33:00 <zid> I'll go with small swedish village and work outwards if it wasn'tenough
20:36:00 <MelMalik> greople
20:44:00 * sham1 chants "DEVELOPERS DEVELOPERS" at zid
20:44:00 <zid> ooh good call sham
20:44:00 * kof673 sees lunduke in the front row getting spit on
20:45:00 <nikolar> lol
20:45:00 <sham1> > lunduke
20:45:00 <sham1> Mate really went off the deep end
20:45:00 <sham1> It's a shame, really
20:45:00 <gog> developers developers developers
20:45:00 * Bitweasil throws a chair
20:46:00 <gog> the ballmer peak is real btw
20:46:00 <gog> after i have a liquid lunch i write some great code
20:46:00 <sham1> I don't think Ballmer ever threw a chair
20:46:00 <gog> oh yes he did
20:46:00 <gog> in meetings
20:46:00 <gog> he'd throw chairs and shout and
20:46:00 <sham1> Oh, nvm
20:46:00 <zid> It's disinhibiting, gog
20:46:00 <zid> sounds good for a performative art like programs
20:46:00 <sham1> If you take enough alcohol, you won't even feel ashamed for shitcode
20:46:00 <zid> "eh fuck it, we'll just do one of these, and one of those, bam"
20:46:00 <sham1> (which is like shitposting but for code)
20:47:00 <gog> you know what they call shitcode that ships and makes money?
20:47:00 <zid> exactly sham, you just wanna take the edge off
20:47:00 <gog> they don't
20:47:00 <gog> nobody cares
20:47:00 <zid> I can't deliver so I'd need the booze
20:47:00 <sham1> Nobody cares except for developers who have to maintain the thing after
20:47:00 <sham1> Then again, no one cares for those developers
20:47:00 <gog> i'll be dead before anybody else has to maintain my code
20:47:00 <sham1> Which is why the Ballmer chant was (and still is) necessary
20:47:00 <gog> could be 6 months, could be 50 years
20:48:00 <gog> developers? developers. developers!
20:48:00 <sham1> Developers
20:48:00 <sham1> https://www.youtube.com/watch?v=Vhh_GeBPOhs
20:48:00 <bslsk05> ​'Steve Ballmer: Developers' by MrWueb007 (00:00:24)
20:57:00 <ghostbuster> anyone know why include/linux/pgtable.h contains definitions like #define pmd_offset pmd_offset, #define pud_offset pud_offset, etc
20:57:00 <nikolar> so that you get macros instead of enums
20:58:00 <nikolar> or whatever it is
20:58:00 <zid> git blaame :P
20:58:00 <nikolar> lol
20:58:00 <zid> (I imagine that code is too ancient though)
20:58:00 <nikolar> yeah probably
20:59:00 <zid> https://github.com/torvalds/linux/commit/974b9b2c68f3d35a65e80af9657fe378d2439b60
20:59:00 <bslsk05> ​github.com: mm: consolidate pte_index() and pte_offset_*() definitions · torvalds/linux@974b9b2 · GitHub
21:00:00 <ghostbuster> macros instead of functions, but why?
21:00:00 <zid> looks like he just chopped what it was defined as off, and replaced it with his new one
21:00:00 <heat> ghostbuster, it's a common pattern
21:00:00 <heat> basically you can't check in C if a function is defined, but you can check if a macro is defined
21:01:00 <zid> so that the thingy stayed a macro
21:01:00 <ghostbuster> ah
21:01:00 <nikolar> yeah basically
21:01:00 <heat> what happens in the linux mm is that they have many layers of headers, with ifdef'd code, ifndef'd fallbacks, etc
21:01:00 <nikolar> not particularly important most of the time
21:01:00 <heat> so this is common
21:01:00 <ghostbuster> makes sense, thanks
21:02:00 <ghostbuster> still trying to wrap my brain around 5x levels of page tables
21:02:00 <heat> https://elixir.bootlin.com/linux/latest/source/include/linux/pgtable.h#L121
21:02:00 <heat> there you go, here's the fallback
21:02:00 <bslsk05> ​elixir.bootlin.com: pgtable.h - include/linux/pgtable.h - Linux source code (v6.8.7) - Bootlin
21:03:00 <heat> if you're not looking specifically into understanding and working on linux, learning the linux page table nomenclature is really futile
21:03:00 <heat> their thing is really backwards
21:03:00 <ghostbuster> yeah i think i read something about how they got named
21:04:00 <heat> they made up nice names for everything, but then for the 5th level they just said fuck it, p4d
21:04:00 <heat> page tables are named pte
21:04:00 <heat> (the lowest level page tables)
21:04:00 <heat> the page table entries are not pte but ptep
21:04:00 <nikolar> isn't that what intel calls the them
21:04:00 <heat> calls what?
21:04:00 <zid> PTE yea, but not PTEP
21:05:00 <heat> the lowest level of page tables on x86 intel is named page table
21:05:00 <heat> the entries are named PTEs
21:05:00 <heat> page table -> page directory -> page directory pointer table -> PML4 -> PML5
21:05:00 <heat> personally i think we should've done page directory pointer table table
21:06:00 <heat> wait, no, page directory pointer table pointer table
21:06:00 <zid> I wanted page directory directory pointer table table
21:07:00 <ghostbuster> i'm looking at linux on x86 now but i also want to understand apple os and ARM eventually
21:08:00 <geist> if you want to look at a general purpose open source OS i'd recommend starting with the BSDs first
21:08:00 <nikolar> you mean mac os?
21:08:00 <geist> they're a bit clearer to read
21:08:00 <geist> than linux
21:09:00 <ghostbuster> i mean macOS/iOS/iPadOS/watchOS/tvOS/visionOS/etc lol
21:09:00 <nikolar> yeah doubt you'd find much public information, though the kernel code is open source
21:09:00 <geist> yah fwiw the kernel is called XNU, part of the darwin project
21:10:00 <geist> XNU most folks will know what you're talking about
21:10:00 <ghostbuster> i am context switching between a bunch of learning material for diff. architectures and OSes
21:10:00 <ghostbuster> right now trying to reproduce this exploit https://www.willsroot.io/2022/01/cve-2022-0185.html
21:10:00 <bslsk05> ​www.willsroot.io: Will's Root: CVE-2022-0185 - Winning a $31337 Bounty after Pwning Ubuntu and Escaping Google's KCTF Containers
21:12:00 <ghostbuster> managed to get the kernel running in gdb and crash it: PGD 10cb3a067 P4D 10cb3a067 PUD 10f23c067 PMD 4141414141414141
21:26:00 <zid> if GNU is so great why didn't god put richard stallman bones everywhere to test us like he did dinosaurs
21:27:00 <sham1> Because RMS (pbuh) is still alive
21:27:00 <ghostbuster> does he need all his bones
21:28:00 <sham1> I'm sure He prefers having all of his bones
21:28:00 <ghostbuster> not what i asked
21:28:00 <heat> gnu people don't need most bones, they can't get up from their chairs anyway
21:28:00 <zid> sham1 work on ur reading comprehension
21:28:00 * sham1 mutters in gnu
21:28:00 <heat> >Recently, several friends on my CTF team Crusaders of Rust
21:28:00 <heat> christ save us
21:29:00 <zid> They're going on a crusade to battle rust over the holy land!?
21:29:00 <zid> nice guys
21:29:00 <nikolar> if not, we're doomed
21:29:00 <sham1> Shooting down the Shaheds due to them not using Rust
21:30:00 <sham1> And doing the same for the Iron Dome
21:33:00 <heat> iron dome obviously has rust
21:33:00 <nikolar> kek
21:33:00 <friedy> Can't stand Rust I'm never using it unless I'm one day forced to
21:34:00 <heat> literally 1984
21:34:00 * ghostbuster overwrites friedy's page tables
21:34:00 <hunta987> oxidized dome
21:34:00 <heat> joe biden is making me use a memory safe language
21:34:00 <sham1> The rocketn't
21:34:00 <sham1> Watch Bibi rename stuff in zoomer lingo
21:34:00 <heat> the leftist snowflakes cant handle real programming languages
21:35:00 <nikolar> lol ↑ but unironically
21:35:00 <nikolar> considering a left leaning government recommended rust
21:36:00 <heat> tfw you try to be as egregious as possible and someone agrees with you
21:36:00 <nikolar> lol
21:36:00 <nikolar> that's what you wanted right :p
21:36:00 <sham1> Something something overton window something
21:40:00 <friedy> Rustaceans say "This is the future!! It's gonna replace C!!! Embedded Rust!!!" Me "Okay bro"
21:41:00 <heat> okay bro, let me get back to you once i finish my fortran program
21:41:00 <sham1> Somehow, somewhere, a pacemaker stops working because in one of the 2^64 transient dependencies of the Rust-based firmware, you get a panic
21:42:00 <sham1> Although I'll be fair to Rust people for once and say that they probably wouldn't do that, but you never know. They managed to smuggle the `alloc` crate into Linux
21:43:00 <sham1> The significance being of course that `alloc` doesn't let you detect allocation problems other than by panics
21:43:00 <Ermine> oxidized world won?
21:44:00 <sham1> Seemingly
21:44:00 <sham1> I'm surprised that Linus gave it the green light
21:45:00 <Ermine> you didn't get the joke
21:45:00 <sham1> Many of his objections against C++ are also applicable in Rust, after all
21:45:00 <sham1> Clearly not
21:45:00 <nikolar> That's not wrong
21:45:00 <sham1> I didn't see a joke
21:45:00 <nikolar> They just wore him down
21:46:00 <Ermine> It was a reference to "the plastic world has won" punk rock song
21:46:00 <sham1> Ah
21:47:00 <heat> kernel rust alloc can fail
21:47:00 <Ermine> actually it's named the other way, but it contains that song
21:47:00 <Ermine> s/song/line
21:48:00 <Ermine> i'm kinda fucked these days
21:48:00 <kof673> songs within songs, lines within lines, plastic world without end
21:50:00 <heat> part of the reason why i'm moving back to C interfaces for my kernel is if i ever want to add rust, i can just do it
21:51:00 <nikolapdp> why would you want that
21:51:00 <heat> it's safer
21:51:00 <Ermine> btw rust produces too big code which is unsuitable for embedded targets
21:51:00 <nikolapdp> FEARLESS CONCURRENCY
21:51:00 <nikolapdp> SAFETY
21:51:00 <heat> rust should produce more or less what llvm produces
21:51:00 <hunta987> I don't understand why they'd make panic a default macro in Rust, why encourage programs to fail? Maybe it was intended to be a release build version of assert(false)
21:52:00 <heat> i don't understand why they'd make abort() a default function in C, why encourage programs to fail?
21:52:00 <Ermine> heat: that's what my friend which works with such hw said. And he likes rust
21:52:00 <heat> Ermine, yes, but language runtime aside the codegen should be similar, unless rustc really sucks ass at generating llvm IR
21:53:00 <Ermine> probably
21:53:00 <heat> rust however really depends on LTO which is its own set of problems
21:53:00 <nikolapdp> i mean abort() isn't encouraged as the default error handling mechanism in c
21:53:00 <nikolapdp> unlike with panic!() in rust
21:54:00 <heat> okay so what you're thinking is that what tutorials do is automatically great
21:54:00 <mjg> i don't think panic! is encouraged per se
21:54:00 <nikolapdp> no, that's what rust people think
21:54:00 <heat> they .unwrap(), sometimes the .unwrap() goes sideways and it panics
21:54:00 <mjg> unless you mean de facto encouraged as a consequence of unwrap
21:54:00 <nikolapdp> that too
21:54:00 <mjg> which does seem to be common
21:54:00 <heat> you should not unwrap unless you're not ready to deal with the fuck up
21:54:00 <heat> it's like
21:54:00 <heat> int *ptr = malloc(sizeof(int)); *ptr = 10; /* error checking is for wankers */
21:55:00 <Ermine> otoh armclang does wonders when it comes to binary sizes
21:55:00 <Ermine> (also it probably cheats and compresses stuff)
21:56:00 <mjg> concuRustency
21:56:00 <nikolapdp> lol
21:57:00 <heat> conculinuxkernel
21:57:00 <heat> top 10 smp_mb() uses
21:57:00 <Ermine> concix
21:58:00 <heat> hey ermine what memory barrier are you?
21:58:00 <heat> i'm a dma_wmb()
21:58:00 <zid> error checking is infact, for wankers
21:58:00 <zid> all it does it make it harder to debug
21:58:00 <mjg> your girlfriend is smp_rmb() on amd64
21:58:00 <mjg> compiles to nothing LOL
21:58:00 <heat> :(
21:58:00 <heat> you're a big ol meanie aren't you
21:59:00 <sham1> mjg: I thought that the joke would have been about her being shared around
21:59:00 <mjg> i'm not fat
21:59:00 <mjg> otherwise ye
21:59:00 <sham1> But I guess that also works
21:59:00 <mjg> sham1: that's your gf
21:59:00 <heat> this LOSER doesn't know the x86 memory model lol
21:59:00 <heat> get OWNED son
21:59:00 <Ermine> gotta study those barriers
21:59:00 <zid> heat: I'd rather have a crash than have MessageBox("Write error"); return 1;
22:00:00 <zid> returned from main too so I have no fuckin idea
22:00:00 <nikolapdp> zid: asm("ud2");
22:00:00 <mjg> https://imgflip.com/i/8nsp6k
22:00:00 <bslsk05> ​imgflip.com: They don't know - Imgflip
22:00:00 <zid> nikolapdp: yes pls
22:00:00 <zid> as long as the ud2 is with the code that caused it
22:01:00 <nikolapdp> there, solved your issue with memory checking
22:01:00 <zid> and not a shared global ud2 that is jmp'd to from everywhere
22:01:00 <nikolapdp> you obviously macro it
22:01:00 <nikolapdp> to abort or something
22:01:00 <zid> and pray the compiler
22:01:00 <zid> doesn't merge them all
22:01:00 <zid> nothing's stopping it just emitting jmp abort
22:01:00 <heat> global ud2 is alright
22:01:00 <zid> instead of ud2
22:01:00 <heat> it's as alright as an abort()
22:01:00 <sham1> Surely it would have to be a volatile ud2
22:01:00 <sham1> volatile ask even
22:02:00 <nikolapdp> asm blocks are opaque, it can't merge them
22:02:00 <sham1> ASM
22:02:00 <zid> You might actually have to force inline it
22:02:00 <zid> it can merge the *label* though niko
22:02:00 <nikolapdp> that's why you macro it
22:02:00 <zid> so you'd have to wrap it in an inline tagged func
22:02:00 <nikolapdp> #define abort do { asm ("ud2"); } while (0)
22:02:00 <zid> oh macro func right
22:02:00 <nikolapdp> boom
22:02:00 <zid> yea that'd do I guess
22:02:00 <heat> sham1, TRIVIA: what does smp_wmb compile to, and what does an __atomic_store_n(&var, __ATOMIC_RELEASE) (or smp_store_release) compile to
22:02:00 <heat> on x86
22:03:00 <nikolapdp> there's probably __builtint_debug_trap or whatever
22:03:00 <nikolapdp> if you want portable
22:03:00 <zid> nothing, mov
22:03:00 <heat> __builtin_trap() exists
22:03:00 <mjg> heat: can you smp_rmb(); smp_wmb(); instead of smp_mb()?
22:03:00 <sham1> Yeah, I was under the impression that movs are atomic
22:03:00 <nikolapdp> heat: yeah that one
22:03:00 <heat> smp_wmb compiles to an add $0 to a random stack location
22:03:00 <mjg> smp_wmb?
22:03:00 <sham1> What the hell
22:03:00 <heat> because stores are all happens-before wrt each other
22:03:00 <mjg> smp_mb does
22:04:00 <heat> DID I GET SOMETHING WRONG???
22:04:00 <mjg> 's an optimization over mfence
22:04:00 <mjg> mofer
22:04:00 <heat> wow i did
22:04:00 <nikolapdp> lol
22:04:00 <heat> shit!
22:04:00 <sham1> God damn x86
22:04:00 <mjg> it's a well known optimization to spinlocks to merely mov 0,(%rdi)
22:04:00 <zid> was the answer 'nothing'
22:04:00 <heat> yes
22:04:00 <mjg> which you are probably using
22:04:00 <nikolapdp> isn't smb_wmb a literal noop
22:04:00 <mjg> and now this shit
22:04:00 <zid> I got 100% marks then
22:04:00 <heat> i know the release codegen
22:05:00 <zid> If you said the answer was anything else, I was going to counter with I never defined SMP and I was right anyway, though
22:05:00 <mjg> then you know there is no stock fuckery to it
22:05:00 <nikolar> lol
22:05:00 <mjg> stack
22:05:00 <heat> yes but smp_wmb() != a release store
22:05:00 <mjg> atmic_store above should compile to the a mov and that's it
22:05:00 <mjg> s/the//
22:06:00 <mjg> ignoring the missing value to store to it
22:06:00 <heat> does smp_wmb() just literally guarantee happens-before wrt stores?
22:06:00 <heat> thought it was somewhat stronger
22:06:00 <heat> LKMM am i right
22:06:00 <zid> Magic 8-ball, is heat right?
22:07:00 <zid> It says "Don't ask me you blind fuck, I'm a bowling ball"
22:07:00 <heat> i am always right, even when i'm wrong
22:07:00 <heat> wasn't this an awful political catchphrase in some awful CNN show in the US in the 00s
22:07:00 <mjg> the cpu guarantees the right ordering, you only ask the compiler to not muck with it
22:07:00 <mjg> (here cpu == amd64)
22:08:00 <mjg> now things get funny if you need a full barrier
22:08:00 <mjg> i'm curious why that lock xadd 0 is cheaper than mfence
22:08:00 <mjg> there is probably some stupid internal reason
22:08:00 <mjg> as per usual, optimizations are not always what's logical
22:08:00 <mjg> fuckin ucode
22:10:00 <heat> yes but what i'm asking is
22:10:00 <heat> is smp_wmb() just a release barrier?
22:12:00 <mjg> yes
22:12:00 <Ermine> mjg needs to write spinlocks for onyx
22:12:00 <heat> ok thanks
22:12:00 <heat> no please
22:12:00 <heat> i'm okay
22:12:00 <mjg> :(
22:12:00 <mjg> ok
22:12:00 <mjg> i'm gonna dod them for openbsd
22:13:00 <heat> department of defense?
22:13:00 <mjg> dogs of dogshire
22:13:00 <mjg> did you UNPESSIIMAL your locken though
22:13:00 <heat> not yetten
22:14:00 <Ermine> sometime...
22:14:00 <mjg> i'm lookingat the code now, is is the bare minimum variant
22:14:00 <mjg> you are getting a pass
22:14:00 <heat> do you want me to give you a ticket lock impl
22:15:00 <mjg> 00:14 < mjg> you are getting a pass
22:15:00 <mjg> quit while ahead
22:15:00 <heat> no
22:15:00 <mjg> look mofer
22:15:00 <mjg> if you implement a fair lock and concede onyx mostly runs in a vm
22:16:00 <mjg> you gonna have to make it kvm locking aware
22:16:00 <heat> ugh
22:16:00 <Ermine> kvm locking aware?
22:16:00 <mjg> sounds like you changed your mind
22:16:00 <mjg> Ermine: kick the vcpu holding the lock, if needed
22:16:00 <heat> i don't want to paravirt my whole kernel
22:17:00 <heat> it sounds depressing
22:17:00 <mjg> it is shite work
22:17:00 <mjg> if you want a sliver of more performance add backoff with a small ceiling
22:18:00 <mjg> like literally 16 spins or something
22:18:00 <heat> my big problem isn't lock performance
22:18:00 <heat> it's the locks
22:18:00 <mjg> if you are heavily contended, there is some win to be gained from primitives degrading less
22:18:00 <mjg> mofo
22:18:00 <childlikempress> simply never lock anything
22:19:00 <mjg> childlikempress: wrong, always lock everything
22:19:00 <childlikempress> lockfree all the things
22:19:00 <mjg> childlikempress: except in rust
22:19:00 <heat> i don't want to be heavily contended
22:19:00 <mjg> heat: use linux
22:19:00 <heat> that's the point
22:19:00 <childlikempress> wamjg:
22:19:00 <mjg> childlikempress: rust docs say fearless concurrency and it's all locks
22:19:00 <heat> mjg, can't use linux, i talk to women
22:19:00 <mjg> childlikempress: and you are going to tell me that's slow?
22:19:00 <mjg> fuck you
22:20:00 <mjg> i'm not buyin'
22:20:00 <childlikempress> no time for fear when you're 🎵waiting🎵on🎵locks🎵
22:20:00 <Ermine> chad onyx developer be like
22:20:00 <mjg> OOOH
22:20:00 <zid> nikolapdp: Are you on wet food and dry food or do you just get the dry?
22:20:00 <kof673> goto wamjg;
22:20:00 <mjg> i updated to ubuntu 24 few days back
22:20:00 <heat> i slack off on my actual responsibilities, not my social life
22:20:00 <mjg> i only now noticed utf works in the terminal!
22:21:00 <mjg> i mean random shite like music notes
22:21:00 <heat> mâteuśz guŝik
22:21:00 <mjg> that's a nice improvement
22:21:00 <childlikempress> did you not see any of my emojis before :(
22:21:00 <mjg> childlikempress: nope :(
22:21:00 <Ermine> I installed kde and found a crippling bug
22:21:00 <nikolapdp> i eat food
22:21:00 <childlikempress> i actually put an emoji every few messages😘
22:21:00 <zid> wet or dry though
22:21:00 <heat> 𓂺
22:21:00 * kof673 whispers to nikolapdp, frogs are both wet and dry, amphibious
22:22:00 <childlikempress> 𓂺
22:22:00 <Ermine> also had to modprobe rndis_host to make usb tethering work
22:22:00 <nikolapdp> lol i don't eat frgs
22:22:00 <nikolapdp> rfogs
22:22:00 <mjg> this does not show for me
22:22:00 <Ermine> (Insert another yotld joke here)
22:22:00 <heat> rndis is a vulnerable protocol
22:23:00 <heat> that's probably why you needed to modprobe it
22:23:00 <mjg> rndisecure
22:23:00 <mjg> i thought it got reited
22:23:00 <mjg> even the module
22:23:00 <zid> https://cdn.discordapp.com/attachments/588052727267983413/1232453095615627326/tumblr_pnymduBetu1rdwp99_1280.png?ex=662982e3&is=66283163&hm=5ab1c4bdf0cb793b80bfba2af27ddbc3d849f7408dfedda196bbfc94494ab232&
22:23:00 <zid> ^ from sexual advances
22:23:00 <mjg> there was some flame about it
22:23:00 <Ermine> gregkh really wants to retire it, but too many stuff is using it
22:23:00 <mjg> right, it is almost imopssible to retire stuff as long as there is hw for it
22:24:00 <Ermine> But really, what prevents android from using ncm?
22:24:00 <mjg> and vendors love to reuse bad stuff
22:24:00 <heat> zid, watch some girl asking the guy what that cute blowfish is
22:24:00 <heat> followed by a long depressing explanation of openbsd
22:24:00 <nikolar> lol
22:24:00 <Ermine> how to make girl goth
22:24:00 <mjg> heat: ey, do you have preemption at arbitrary points in the kernel?
22:24:00 <heat> yes
22:25:00 <zid> I made a girl goth once all down my shirt
22:25:00 <mjg> who disbles preemption around spin_lock calls?
22:25:00 <heat> i do
22:25:00 <friedy> you guys are too funny lmao
22:25:00 <zid> heat and mjg are getting married now
22:25:00 <heat> that tends to be what you do with spinlocks
22:25:00 <mjg> ooh i see, i got tricked by trylock doing this in the implementation
22:26:00 <mjg> and the rest happening in header files
22:26:00 <mjg> i mean for the other routines
22:26:00 <mjg> you should probably assert in __spin_lock that preemption is disbaled
22:26:00 <heat> why
22:26:00 <heat> webdev assert that's what that is
22:27:00 <mjg> no, you document requirements with asserts
22:27:00 <mjg> and should someone break them one day you find out
22:27:00 <heat> the fact that the function starts with a double underscore is a large big warning
22:27:00 <mjg> also note that's not code which would be present in compiled production kernel
22:27:00 <Ermine> I have a feeling that I saw special version of spin_lock which disables prevention. Am I hallucinating?
22:27:00 <heat> large big is a stupid combination
22:27:00 <childlikempress> int x = 5; assert(x == 5)
22:27:00 <mjg> you are linuxing it big time
22:27:00 <heat> Ermine, you are not, i used to have a spin_lock_preempt, bad idea
22:28:00 <heat> note that _irqsave implicitly disables preemption
22:28:00 <childlikempress> spinlock can run with preemption enabled, as a treat
22:29:00 <mjg> yolo_spinlocks
22:29:00 <mjg> i'm gonna publish a paper
22:29:00 <heat> please mommy don't disable preemption please please please mommy i beg you
22:29:00 <heat> i'll be nice
22:29:00 <heat> i won't use all the other threads' timeslices
22:29:00 <childlikempress> https://github.com/Gankra/cargo-mommy this mommy?
22:29:00 <bslsk05> ​Gankra/cargo-mommy - Mommy's here to support you when running cargo~ (46 forks/537 stargazers/Apache-2.0)
22:30:00 <heat> can we get gcc to do that?
22:30:00 <dostoyevsky2> preemption always gets in the way
22:30:00 <childlikempress> gcc please🥺
22:31:00 <mjg> __builtin_unreachable();
22:31:00 <mjg>
22:31:00 <mjg> panic("sched_load_finish returned");
22:31:00 <mjg> you told the compiler to not emit that panic
22:31:00 <mjg> implicitly
22:31:00 <heat> i like how you look at the oldest parts of my kernel
22:31:00 <heat> can you git blame those lines for me?
22:31:00 <Ermine> you can make compiler driver around gcc and make it extensible
22:31:00 <mjg> dude i'm just scrolling through the scheduler
22:31:00 <heat> it's wack
22:31:00 <heat> there, saved you some minutes
22:32:00 <heat> i stole the freebsd loadavg code cuz i didn't get the maths
22:32:00 <mjg> may i recommend:
22:32:00 <mjg> #define __assert_unreachable() \
22:32:00 <mjg> __FILE__, __LINE__, __func__)
22:32:00 <mjg> panic("executing segment marked as unreachable at %s:%d (%s)\n", \
22:32:00 <heat> ubsan does that for me
22:32:00 <mjg> and for non-debug define __assert_unreachable() __builtin_unreachable()
22:33:00 <mjg> well the above would definitely have been avoided
22:33:00 <Ermine> is getting after __builtin_unreachable a UB?
22:33:00 <heat> executing an unreachable is UB
22:33:00 <mjg> the compiler assumes you are NOT going to get there
22:34:00 <heat> well, aktshually __builtin_unreachable() is not UB cuz it's a compiler builtin
22:34:00 <heat> C23 unreachable() is
22:34:00 <mjg> why do you even calculate load
22:35:00 <heat> unix
22:35:00 <mjg> you got your jollies from seeing 'uptime'
22:35:00 <heat> yes
22:35:00 <mjg> understandable
22:36:00 <mjg> geunine question, what's this bit in sched_lock:
22:36:00 <dostoyevsky2> mjg: maybe you want to know why the fans are spinning so much, so the load can help narrow it down
22:36:00 <mjg> unsigned long cpu_flags = spin_lock_irqsave(l);
22:36:00 <mjg> unsigned long _ = spin_lock_irqsave(&thread->lock);
22:36:00 <mjg> (void) _;
22:36:00 <mjg> dostoyevsky2: in onyx?
22:36:00 <heat> oh god you're looking at sched_lock
22:36:00 <heat> never look at sched_lock
22:37:00 <mjg> what's _
22:37:00 <mjg> looks very perl-y
22:37:00 <heat> _ as unused is pretty common
22:37:00 <heat> RUST uses it too
22:37:00 <mjg> unused what
22:37:00 <mjg> in that code
22:37:00 <clever> haskell as well
22:37:00 <hunta987> python
22:37:00 <Ermine> go
22:38:00 <heat> mjg, what if told you a lot of my scheduler locking is subtly busted
22:38:00 <nikolar> see, heat, the c way to mark something as unused is (void)func();
22:38:00 <heat> (void) _;
22:38:00 <heat> dumbass
22:38:00 <mjg> oh shit, i missed that this is the reutrn value from spin_lock_irqsave
22:38:00 <zid> (void) antibabypillen;
22:38:00 <zid> that's how you get your compiler pergant
22:38:00 <nikolapdp> i meant without assigning it to a variable, dumbass
22:39:00 <mjg> you guys ok
22:40:00 <mjg> so how does your scheduler do compared to ULE
22:40:00 <nikolapdp> he started it :(
22:40:00 <mjg> heat is a genz
22:40:00 <mjg> are you a genz
22:41:00 <nikolapdp> i am a genz
22:41:00 <mjg> oh, in that case carry on
22:41:00 <nikolapdp> lol
22:41:00 <nikolapdp> what did you expect
22:41:00 <zid> my hot genz bf
22:41:00 <mjg> i'm an old fart, osdev is a millenial and boomer game
22:41:00 <heat> mjg, i don't know, poorly?
22:42:00 <mjg> younger folk in the area are pretty rare
22:42:00 <heat> it's functional as in "it runs the things"
22:42:00 <Ermine> 3 genz's agains one boomer?
22:42:00 <nikolapdp> who's the third
22:42:00 <heat> ermie
22:42:00 <Ermine> me
22:42:00 <nikolapdp> let's go
22:42:00 <mjg> 8(
22:42:00 <heat> where
22:42:00 <mjg> you guys should go to discord
22:42:00 <nikolapdp> nah we like boomer stuff clearly
22:42:00 <nikolapdp> osdev, irc
22:42:00 <heat> are you ever going to get a discord?
22:43:00 <heat> or does freebsd not run discord?
22:43:00 <heat> oh wait, you don't use freebsd do you?
22:43:00 <mjg> dude i'm on linux
22:43:00 <mjg> is that a jab because of ULE
22:43:00 <heat> multilayered roast
22:43:00 <heat> no
22:43:00 <mjg> cause as i told you, it is not
22:43:00 <Ermine> you can always open discord in browser
22:43:00 <mjg> i'm openly a linux user
22:43:00 <mjg> :>
22:43:00 <heat> anyway i really need to run kcsan against many parts of my kernel
22:43:00 <heat> the scheduler is one
22:44:00 <Ermine> which is apparently the only option while being in wayland with hidpi display
22:44:00 <mjg> Kentucky Fried Sanitizer
22:44:00 <dostoyevsky2> mjg: Are you writing an OS based on Linux?
22:45:00 <mjg> dostoyevsky2: i'm not writing any os
22:45:00 <mjg> i'm here to take cheap stabs at the few people who do
22:45:00 <nikolar> Ermine: i mean the "desktop" version of discord is a browser in disguise so no much of a difference
22:45:00 <nikolar> except you can actually control the version
22:45:00 <dostoyevsky2> isn't any program an OS in some way?
22:46:00 <Ermine> nikolar: what concerns me is blurriness
22:46:00 <nikolar> what blurrines, no oh hidpi nor wayland so :)
22:46:00 <Ermine> i have both
22:47:00 <heat> dostoyevsky2, not really
22:47:00 <childlikempress> uhhh pretty sure the c way to mark something as unused is /*NOTUSED*/
22:47:00 <heat> mjg, kcsan has limited weak memory emulation where it re-orders writes
22:47:00 <heat> i *really* want to try it
22:47:00 <kof673> "any program evolves until it can read email" (paraphrase) </jwz> eventually, if you don't kill it first :D
22:47:00 <Ermine> but if you implement coroutines in you program, poof! and you get cooperative scheduling
22:48:00 <mjg> heat: oh, ncie
22:48:00 <mjg> nice even
22:48:00 <Ermine> childlikempress: it's netbsd way of doing things I guess
22:48:00 <dostoyevsky2> mjg: and onyx is a distributed OS written in clojure? https://github.com/onyx-platform/onyx
22:48:00 <bslsk05> ​onyx-platform/onyx - Distributed, masterless, high performance, fault tolerant data processing (206 forks/2044 stargazers/EPL-1.0)
22:48:00 <Ermine> /* NOTUSED */
22:48:00 <childlikempress> heat: huh how does that work?
22:48:00 <childlikempress> Ermine: it's lint(1)
22:48:00 <Ermine> /* NOTREACHED */
22:49:00 <mjg> dostoyevsky2: ooh, no
22:49:00 <mjg> dostoyevsky2: https://github.com/heatd/Onyx
22:49:00 <bslsk05> ​heatd/Onyx - UNIX-like operating system written in C and C++ (10 forks/76 stargazers/NOASSERTION)
22:49:00 <Ermine> heat: they stole your os name! We must sue them!
22:51:00 <heat> childlikempress, basically i think they keep track of N writes and reads inside a single function and reorders it
22:51:00 <childlikempress> is it just static reordering? or do they maintain a software write queue?
22:52:00 <mjg> i would expect compiler support to reorder things arbitrarily, while respecting all the fences ofc
22:52:00 <nikolar> heat do you just shuffle the writes :P
22:52:00 <mjg> most notably do stores before loads if possible
22:53:00 <nikolar> yeah that too
22:53:00 <childlikempress> mjg: if you don't maintain a software write queue then 1) there will be certain reorderings you can't perform and 2) you always get the same order
22:53:00 <childlikempress> vs being able to do a random order every time you run the code
22:53:00 <mjg> i was thinking you quickly compile a bunch of kernels and crashtest them in qemu
22:54:00 <mjg> while only mucking with the code you are changing, so the cycle should be faster
22:54:00 <heat> childlikempress, https://docs.kernel.org/dev-tools/kcsan.html
22:54:00 <bslsk05> ​docs.kernel.org: Kernel Concurrency Sanitizer (KCSAN) — The Linux Kernel documentation
22:54:00 <heat> https://docs.kernel.org/dev-tools/kcsan.html#modeling-weak-memory even
22:54:00 <bslsk05> ​docs.kernel.org: Kernel Concurrency Sanitizer (KCSAN) — The Linux Kernel documentation
22:54:00 <mjg> but now that i said it, perhaps an emulated qemu cpu could fuck with it?
22:55:00 <mjg> it could pretend to be ppc or something on that front
22:55:00 <childlikempress> ohh cool
22:55:00 <heat> it turns the google people
22:55:00 <childlikempress> so basically it is a queue but only one element
22:55:00 <heat> they know some stuff eh
22:56:00 <heat> turns out*
22:56:00 <heat> ktsan is the superior option but hard to pull off in a kernel setting
22:56:00 <heat> much less a kernel with a custom memory model
22:57:00 <heat> ktsan could find you all of the problems
22:58:00 <netbsduser> i could use one of these so-called "sanitisers"
22:58:00 <childlikempress> just one?
22:58:00 <heat> i'm collecting them all
22:59:00 <heat> Ermine, WRITE A KMSAN IMPLEMENTATION NOW
22:59:00 <heat> THE ONYX PROJECT NEEDS YOUR HELP!
22:59:00 <netbsduser> have just integrated some pleasant work to partially free up certain parts of the sync/waiting interfaces from locking, and it would be helpful if one of these "sanitisers" could help assure me of no raciness
22:59:00 <dostoyevsky2> netbsduser: OpenBSD might have them all activated by default
23:00:00 <netbsduser> dostoyevsky2: impossible
23:00:00 <heat> that would be funny but the compiler can only activate a very small subset at a time
23:00:00 <netbsduser> i tried one of the "sanitisers" in userland, i think it was address-san or memory-san - i forgot which, stupid names - and it adds a massive performance penalty
23:01:00 <heat> not that massive
23:01:00 <Ermine> heat: I gotta defend my diploma on Thursday
23:01:00 <netbsduser> i've also used the kaddress-san once, i didn't do a proper implementation, i just got it to help me out with looking at certain addresses
23:01:00 <heat> ASAN (particularly inlined!) is usable
23:01:00 <heat> 2x slower maybe, but still usable
23:02:00 <netbsduser> oh, that's nothing
23:02:00 <netbsduser> i get a worse penalty from an O0 build and without that you can't debug at all
23:02:00 <heat> sure i can
23:02:00 <heat> i debug with -O2 on
23:03:00 <Ermine> after that I'll do something on onyx
23:03:00 <netbsduser> i like to be able to see my variables not gdb whining "{optimised out}"
23:03:00 <heat> that is annoying but most of them are okay
23:03:00 <nikolapdp> Ermine good luck
23:03:00 <Ermine> thx
23:03:00 <nikolapdp> how do you defend your diploma
23:03:00 <heat> good luck!
23:04:00 <netbsduser> sometimes you can identify where you want to find out about the contents of a variable and insert a printf there so you can see it despite gdb's pretensions but it's a bit of a time sink
23:04:00 <netbsduser> yes good luck Ermine
23:04:00 <dostoyevsky2> netbsduser: Or maybe write the OS in Rust? I think that should cover a lot of sanitation
23:04:00 <Ermine> thank you heat and netbsduser
23:04:00 <netbsduser> nikolapdp: by a viva, you have to hold your ground in front of a panel of experts grilling you
23:05:00 <netbsduser> dostoyevsky2: rust cannot even capture half of the tricks i employ
23:05:00 <netbsduser> and i have more in the pipeline
23:05:00 <nikolapdp> what do they grill you about
23:06:00 <nikolapdp> rust is really overrated
23:06:00 <netbsduser> for example i will be depending on certain objects which have reached their end-of-life but are still accessible in certain cases maintaining type stability for a grace period (this will be an RCU use)
23:06:00 <Ermine> nikolapdp: about literally everything
23:06:00 <nikolapdp> kek
23:07:00 <Ermine> "Your title page is shite"
23:07:00 <Ermine> "Your references list is shite"
23:07:00 <dostoyevsky2> nikolapdp: I guess if you wanted to use Rust for an OS without unsafe, you'd have to copy data a lot... or invent some phantom pointers for avoiding circular data structures
23:07:00 <Ermine> "Your topic is off-topic in our department"
23:08:00 <netbsduser> rust is very good at enforcing the conventional but in a kernel (and i imagine this applies to other software which has to employ every trick in the book, like database engines) you aren't dealing in the conventional anymore
23:08:00 <heat> rcu is hard to express in rust's type system yeah
23:08:00 <heat> we'll see how that unfolds
23:09:00 <heat> worst case unsafe {} with a large big comment
23:09:00 <heat> whts up with me and large big today
23:09:00 <nikolapdp> might as well use c then
23:09:00 <heat> what
23:09:00 <nikolapdp> > worst case unsafe {} with a large big comment
23:09:00 <heat> "rust gets you wins but sometimes it doesn't fit the bill and you need to go manual"
23:09:00 <heat> "might as well use C then!"
23:09:00 <nikolapdp> indeed
23:09:00 <dostoyevsky2> just make your fn main() unsafe... then you have one localized unsafe :)
23:10:00 <heat> does it need to solve all the problems for you to use it?
23:10:00 <heat> because C solves none of them
23:11:00 <kof673> nikolapdp, https://0x0.st/s/viVQXnwb0PZ-KeaVUV7ZdA/Hd-h.jpg there is *a* green frog in the middle, both wet and dry...then it turns to dry land supposedly so you may cross at the equinox lol
23:11:00 <kof673> (they might use another frog earlier)
23:15:00 <dostoyevsky2> kof673: is that the loading screen of your OS?
23:18:00 <gog> hi
23:18:00 <heat> woah gog hi
23:19:00 <heat> you just missed a heated conversation about zig
23:19:00 <nikolapdp> hello gog
23:19:00 <gog> i'm over zig
23:19:00 <nikolapdp> zig??
23:19:00 <nikolapdp> i missed that discussion too
23:19:00 <heat> oh you're over zig?
23:19:00 <heat> are you a hare stan now?
23:20:00 <nikolapdp> yes, we stan hare here
23:21:00 <heat> i stan nim
23:21:00 <hunta987> im a nimwit
23:21:00 <kof673> dostoyevsky, i thought about an ouroborus lol
23:22:00 <dostoyevsky2> kof673: like an infinite loading screen
23:24:00 <dostoyevsky2> I wonder if one could write an OS that just displays https://www.youtube.com/watch?v=qItugh-fFgg in a loop on a weekend... But must be written in Zig ofc
23:24:00 <bslsk05> ​'All Your Base Are Belong To Us' by zuchini (00:04:21)
23:35:00 <Ermine> embed this video, write a decoder, and get frames on the screen with GOP's BitBlt
23:39:00 <kof673> well i want something like synthesis but c89...jitty
23:39:00 <kof673> *synthesis os was
23:39:00 <nikolapdp> tcc
23:40:00 <dostoyevsky2> Ermine: I guess I could just embed an existing video decoder + the video data... but not sure how to play the sound...
23:41:00 <nikolapdp> pcspkr :)
23:41:00 <hunta987> with a fast timer you can get "good" sound from the pc speaker
23:41:00 <hunta987> clockrate
23:43:00 <dostoyevsky2> could an OS just ask the bios for some hardware address (dma or the like) where one could draw graphics and play sound?
23:43:00 <childlikempress> tcc is awful codegen
23:43:00 <Ermine> yes, use VESA and you get framebuffer
23:43:00 <gog> isn't it connected directly to channel 2 of the PIT?
23:44:00 <gog> on ibm compat ig
23:44:00 <nikolapdp> childlikempress: but it can jit :)
23:44:00 <gog> you're PWMing pretty hard and it's cpu-bound
23:44:00 <Ermine> or GOP on EFI systems, and you can get framebuffer
23:45:00 <childlikempress> nikolapdp: luajit a nice ~pareto-optimal point with actually decent codegen
23:45:00 <geist> driving the PC speaker to simulate some sort of DAC style playback is tricky but i assume it's a solved problem
23:45:00 <geist> though it may take a lot of cpu time
23:45:00 <acidx> it's not that hard!
23:45:00 <Ermine> for anything better than pc speaker you need to drive a sound card
23:45:00 <acidx> have to jig the PIT to drive the speaker
23:45:00 <Ermine> (hda driver would suffice I guess)
23:46:00 <clever> geist: i lost it decades ago, but i had a win95 driver, that would bit-bang the speaker to play wave files, and it had an option to improve quality, by turning IRQ's off, lol
23:46:00 <acidx> last time I did this I had a ring buffer that would be consumed in an ISR
23:46:00 <gog> the pit is running at like 1.4mhz or something right
23:46:00 <geist> yah but to constantly reprogram it to play back a PCM sound file i assume involves some sort of transformation
23:46:00 <clever> windows saw it as a pcm based sound card, so you could then play audio in any app
23:46:00 <nikolapdp> childlikempress: you've just remineded me that i should look into it
23:46:00 <geist> or di you just whack the PIT to tick it once?
23:46:00 <dostoyevsky2> Ermine: I guess one could let qemu simualte a sound card where you can just stream some wav the same way one could stream the video via framebuffer?
23:46:00 <zid> are you talking about people's windows again nikolapdp
23:46:00 <nikolapdp> no zid
23:47:00 <zid> pokémon yellow does this btw
23:47:00 <Ermine> dostoyevsky2: tbh i don't know how audio hardware works
23:47:00 <acidx> here's some code I wrote for a ms-dos/real mode game some friends were working on: https://github.com/lpereira/Mines/commit/089dc8ecfaa37da5e1701b86d82a97adec4b9645
23:47:00 <bslsk05> ​github.com: [MS-DOS] Preliminary audio support using PC-Speaker · lpereira/Mines@089dc8e · GitHub
23:47:00 <zid> it bit bangs 1bit audio into one of the channels with interrupts off to make pikachu say "Pikachu" in horrible aliased noise :D
23:48:00 <clever> :D
23:49:00 <gog> there's no small amount of psychoacoustics to make it work
23:49:00 <acidx> (the code that's there will just play some white noise, I didn't push the finished MOD player to github)
23:49:00 <gog> like whats the minimum interval before it doesn't sound like a tone of x Hz anymore
23:52:00 <geist> hmm ` outb(0x42, sample >> 1);` is that the trick?
23:52:00 <dostoyevsky2> Ermine: I guess the easiest audio APIs where like: just beeping for a given length, then they added pitch and volume... but they didn't have streaming yet, so then came synthesizers, where you can model a waveform... and eventually you play full samples, like wav files
23:52:00 <geist> loading 7 bits of the sample as some sort of counter or whatnot?
23:54:00 <geist> acidx: so i see it setting up the counter at 16khz and then feeding noise into it, what's the mechanism for the data getting fed in on that line?
23:54:00 <geist> does the timer shift it out?
23:55:00 <acidx> geist: the code that's there doesn't do it, it was just the initial commit. I didn't push the new code as it was crashing somewhere and I didn't have time to fix it. but the idea was essentially a ring buffer that was consumed by the ISR and populated by code outside the ISR
23:55:00 <acidx> all the mixing and whatnot happened outside the ISR
23:56:00 <geist> yeah but the key is that 'play sample' routine. it loads it into a register
23:56:00 <geist> what is the mechamism by which that twiddles the speaker?
23:56:00 <geist> (i'd read the comments on what you're programming the timer as but you didn't write any :)
23:58:00 <acidx> the previous write to 0x43 will change how the next two bytes will be interpreted https://web.archive.org/web/20080201210533/gd.tuwien.ac.at/languages/c/programming-bbrown/advcw3.htm#sound
23:58:00 <bslsk05> ​web.archive.org: Advanced C, part 3 of 3
23:59:00 <geist> ah that's what i was looking for, thanks