<ddevault>
what the actual fuck is wrong with these people
gildasio1 has joined #osdev
<jjuran>
o.O
<zid>
I assume that's for illustrative purposes
<zid>
then there are tables for each microarch that are how many bits and stuff
<zid>
this is just for describing the bottom 2 bits
<zid>
the descriptor type
<zid>
the rest being covered in numbers would just be clutter
<GeDaMo>
That's paid DLC :P
<ddevault>
would be fine if I could actually find anything about the actual bits
<ddevault>
like sure, document it elsewhere
<ddevault>
but WHERE
<zid>
paid DLC
gildasio1 has quit [Remote host closed the connection]
gildasio1 has joined #osdev
gog has quit [Quit: byee]
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
gog has joined #osdev
wootehfoot has joined #osdev
mykernel has quit [Ping timeout: 268 seconds]
k0valski18891 has joined #osdev
k0valski18891 has quit [Quit: Peace out !]
elastic_dog has quit [Ping timeout: 260 seconds]
elastic_dog has joined #osdev
<zid>
New idea, advent of osdev
<zid>
we set up a server that runs submissions in qemu, and you have to solve various challenges bare metal, like writing a network driver for the custom NIC
epony has quit [Remote host closed the connection]
<bslsk05>
github.com: aoc2022/day3.c at main · heatd/aoc2022 · GitHub
<heat>
suck it
<heat>
now this scales through all your c o r e s
spikeheron has joined #osdev
<zid>
sick
<zid>
what's a cunt fmap
<heat>
count frequency map
<zid>
histogram
<zid>
is the noun for that
<heat>
come on, cant you read your unix
<gog>
no that's the stuff that makes you sneezy and itchy
<heat>
what's bread()
<zid>
like 80% of advent levels are histograms
<zid>
for some reason
<heat>
yooooooo
<zid>
did static not exist in the 90s?
<heat>
there's a sick optimization
<zid>
xor
<zid>
it all together?
<zid>
that should uniquify them
<heat>
I was thinking of replacing the shitty int[] with a simple u64
<zid>
oh, I think mine is faster you know
<kof123>
its not enterprise ready unless you bundle it with a bunch of libraries because you dont trust the system, custom installer, service contract required, etc.
<kof123>
instructions must also include "disable selinux"
<zid>
hmm no xor only works if the bags are the same except for the different one
isaacwoods has joined #osdev
<heat>
yup
<heat>
xor can give you false positives
<zid>
aka utter nonsense, almost all of the time
<stefanct>
i have made a custom elf section (for arm11 exception handlers) that is not getting loaded by gdb. how do i mark it to be "loadable"?
<mrvn>
heat: why are you writing K&R C?
<heat>
mrvn, why are you not writing K&R C?
<zid>
stefanct: In the elf headers
<mrvn>
heat: less to type, more readable, definition is initialisation
<zid>
(you didn't say how you made the section, so I can't be more specific yet)
<heat>
K&R C has less to type, more readable if you're a shell script person, it's also K&R C
<mrvn>
What programming competition site are you solving anyway?
<zid>
heat: You didn't answer me about static did you?
<heat>
adventofcode.com
<mrvn>
heat: you have to type the variable name of arguments twice.
<heat>
zid, good question, I don't know if static was there at the beginning
<stefanct>
ok, some backstory... i am trying to use/handle interrupts in a qemu'ed pi0 (arm1176jzf-s) loading my elf with gdb.
<heat>
it was part of C89 though
<stefanct>
i am using the default linker file of ggc 7 that seems to not include a section for the handlers and starts the text section at 0x8000.
<stefanct>
so i am using -Wl,--section-start=.handlers=0x0 to create one when linking with gcc
<zid>
just write a linker script
<zid>
If you're booting it then it doesn't need to be fancy and handle weird environmental affectations
<zid>
just shove some bytes at various addresses
<mrvn>
heat: "unsigned long id = (unsigned long) arg;" Why don't you use uintptr_t?
<jjuran>
heat: It's possible that writing `id % 8` as `id % 8u` might generate more efficient code
<stefanct>
well, it does not even have to boot apparently... because it works just fine with the default load address that is at a later address, where newlib startup stuff is put
<heat>
K&R C
<heat>
K&R C K&R C
<heat>
K&R C
<mrvn>
jjuran: highly doubtfull. it's a literal
<mrvn>
heat: typedef uint64_t u64;
<mrvn>
heat: it's C99
<heat>
day3-threaded is
<jjuran>
mrvn: It's true with the 68K compiler I use.
<heat>
because I couldn't bother and posix isn't K&R'able anyway
<mrvn>
jjuran: actually scratch that. the integer promotion might be different with 8u
<jjuran>
Anyway, looks like your linked list has insertion that's O(n) instead of O(1). I don't see how even multithreaded code can be leaderboard competitive if you're not optimizing for run-time complexity.
<heat>
no one is measuring performance
<heat>
i half assed a linked list impl because fuck it
<jjuran>
Clearly you care about performance or you wouldn't be using threads ;-)
<mrvn>
jjuran: maybe the worker thread finishes faster than reading the input so the list is always empty/small
rwxr-xr-x has quit [Remote host closed the connection]
<heat>
zid wanted enterprise I gave him not enterprise but core-scalable code
<heat>
ez
<mrvn>
heat: looking at "thr_main" you could just insert new work at the front.
<heat>
i can't befuckinglive you're code reviewing my shitty K&R C mega-joke
<mrvn>
heat: you should add padding to "struct wq" to avoid false sharing. :)
<jjuran>
heat: That's part of the joke :-)
<heat>
in any case, WONTFIX for all of that
<jjuran>
awww
<heat>
part of the K&R UNIX exercise is halfassing things up to a good extent and WONTFIXing everything
bauen1 has quit [Ping timeout: 256 seconds]
<heat>
probably even defend my work to the death
<jjuran>
True, it's important to embrace the cultural context
<mrvn>
heat: what's the URL of the competition?
<heat>
adventofcode.com
<heat>
it's not really a competition
<heat>
i mean, sorta
bauen1 has joined #osdev
<jjuran>
It's a challenge
<GeDaMo>
Wax on, wax off :P
<heat>
i crashed visual studio code
<heat>
trying to create a large enough input to fuck it
<gog>
mew
<Ermine>
Hi gog, may I pet you?
heat has quit [Remote host closed the connection]
<gog>
yes
* Ermine
pets gog
* gog
prr
* Ermine
gives gog a fishie
* gog
chomp fishy
heat has joined #osdev
<Ermine>
gog: how are you doing?
<gog>
doin alright, lazy saturday
<gog>
how you?
<heat>
my perf(1) report is using 2.5G of ram halfway through processing it
<Ermine>
I was busy at the first part, but second part is lazy too. Compensating sleep deficit during the week.
<gog>
same
<gog>
it's an off-parenting week so sleep will be easier
<Ermine>
Oh, that's great!
<heat>
with a 1.2GB input the shitty linked list is already noticeable
<heat>
in any case this is not scaling very well
<mrvn>
heat: and if you insert at the front?
<heat>
that bottleneck disappears but I get other problems
<mrvn>
you are hammering the lock and semaphore at 3x 128byte per job.
<heat>
fgets looks slow, so does what I assume is the semaphore system
<heat>
cntfmap only takes 50% of cpu time
<mrvn>
why not read 3*(128+1) byte to get all 3 strings at once?
<Ermine>
heat: are you doing advent of code assignments?
<heat>
Ermine, yes
<heat>
mrvn, fgets only gets a single string
<mrvn>
heat: read
<Ermine>
cool
<heat>
s/string/line
heat has quit [Remote host closed the connection]
heat_ has joined #osdev
<Ermine>
use skalibs : )
<Ermine>
(Well, I guess no external libs)
<heat_>
oh wow, pthread_spin_lock is horrible
<heat_>
i'm very negatively surprised as mjg would say
<mrvn>
heat_: you could use pipes to send the workload to each thread
<Ermine>
btw are there alternative threading APIs available. I heard that pthreads suck.