<epony>
GNU is UNIX like it could have been if modern times (which were too in the past so it's a bit dated) would go back (further) in time to do feature competition
<heat>
mjg, I am forever in your debt, friend
<kaichiuchi>
wait why do you have a people.freebsd.org
<mjg>
aaaw
<mjg>
kaichiuchi: fuck if i know
<kaichiuchi>
i want one :(
<mjg>
should be person.freebsd.org
<mrvn>
kaichiuchi: because we don't yet have enough bad unix implementations
<epony>
should be user.
<kaichiuchi>
mrvn: hey, have some faith my brother
<heat>
I want a freebsd.org account but i'm too lazy to write mjg's patch
<heat>
maybe next week
<mjg>
you have been saying that for a year!
<mrvn>
kaichiuchi: if I have faith you will do it properly then it will be bad.
<epony>
it's not a patch if it does not apply
<heat>
seriously I need to find a way to get remote vscode on freebsd
<heat>
vim sucks
<heat>
nano sucks harder
<kaichiuchi>
I really
<heat>
give me GUI
<kaichiuchi>
*really wish*
<mrvn>
if you doo it poorly it will still be bad. :)
<kaichiuchi>
people would care more about freebsd
<mjg>
what's going wrong with vscode?
<heat>
the remote extension ssh's and installs some shit with typical prebuilt stuff
<mrvn>
kaichiuchi: the more intersting thing though is: In what will you implement it? How?
<kaichiuchi>
C++ :(
<mrvn>
kaichiuchi: 03? 11? 17? 21? 23?
<kaichiuchi>
probably C++17 for now
<mrvn>
*booooooooo*
<heat>
mjg, hmm would the linux emulation help or something?
<mjg>
maybe
<mjg>
what is landing there
<epony>
the essential parts you need are there since 1985 (in C++) and in 1975 (in C) so technically nothing is holding you back in that regard
<mjg>
heat: i see vscode in the ports tree, so there is that
<mjg>
heat: anyhow kldload linux64
<epony>
but 1989-1999 is a good chunk of standards definitions for both languages too
<kaichiuchi>
jesus why does the open group want to know where I live so bad
<bslsk05>
gist.github.com: Configure FreeBSD to work with VScode's remote ssh extension · GitHub
<epony>
have to ask the latin inquisition instead
joe9 has quit [Quit: leaving]
<mjg>
heat: hacking vscode to not run into the problem would be a better thing here
<heat>
i think this bit is proprietary
<mjg>
luller
<mjg>
nice editor
<heat>
shut up closet nano user
<epony>
why don't you just write some stupid Windows application like the rest of the normal people instead of pretending you will be targeting a BSD system
<mjg>
i have an mcedit t-shirt
<epony>
up that with a TurboC one
<epony>
LLVM goes back in time to bootstrap GCC
<epony>
GCC refuses the licence and rewrites LLVM in sane C
<epony>
self-hosting ripples propagate and microsoft can not be found in the encyclopedia
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
sympt2 has joined #osdev
sympt has quit [Ping timeout: 260 seconds]
sympt2 is now known as sympt
<Clockface>
i have a bunch of assembly code with impliet byte sizes and stuff
<Clockface>
and i know NASM knows what it all means because its assembling just fine
<Clockface>
is there any way to make it go through the source file but not fully assemble, kind of like -E
<heat>
for what?
<Clockface>
since i know there are a lot of variations for each instruction
<Clockface>
is there any way to partially assemble so i can see exactly what variation is being used
<heat>
objdump -d
<heat>
apart from that, look at the opcodes lmao
<zid>
partially.. assemble?
<zid>
why not just.. actually assemble it?
<Clockface>
well like the preprocessor
<zid>
I don't see what partial does for you
<heat>
the NASM preprocessor has nothing to do with instructions
<Clockface>
i would prefer if i dident have to dissasemble a binary after its built
<heat>
well it's your only way
<Clockface>
idk what to call it, but the thing that decides which exact variation of MOV im using
<heat>
for doing $thing for $some reason
<zid>
Assembling.
<zid>
You're asking to look at the result of assembling something.
<zid>
That's called opening the output file in an editor
<Clockface>
true
<zid>
a hex editor, a disassembler, etc
<mrvn>
disassembly might change what it prints rather what the bit pattern encodes too
<zid>
a disassembler just being a fancy hex editor that has a mode to translate 0x90 into "nop" etc, like when mine puts ascii up one side
<zid>
you want one that puts asm up one side
<Clockface>
dissasemblers dont output source code though
<Clockface>
like
<Clockface>
MOV al, thing
<zid>
yes they do?
<Clockface>
translates to MOV byte al, thing
<Clockface>
which is assemblable in the exact same way
<Clockface>
i dont want to have to use a dissasembler to look at things like that
<zid>
label names will be lost if you go back and forth yes, but who gives a shit, it's an info panel
<zid>
you'll never GO back and forth
<heat>
why do you want this btw?
<Clockface>
im experimenting to see if llvm-mca is smart enough to advise on manually written assembly
<heat>
of course
<Clockface>
but the NASM program im using is vague, which llvm-mca was not designed for
<heat>
why do you want this btw?
<heat>
objdump -d
<Clockface>
objdump outputs a lot of other garbage besides the program
<Clockface>
i could write a script to get rid of it
<heat>
use a command to trim the edge
<Clockface>
but im hoping i dont have to put work in
<Clockface>
lol
<Clockface>
fine
<zid>
ndisasm is easier to trim
<zid>
and.. comes with nasm..
<Clockface>
wait wat
<Clockface>
thanks
<zid>
it's easier to trim because it doesn't understand input files, so doesn't print "contents of section .text" at the top
<heat>
shoot me if I ever willingly use nasm
<zid>
because it disassembles the header :P
<Clockface>
good enough
<Clockface>
lol
<Clockface>
ill just trim objdump
<Clockface>
you werent kidding about ndisasm dissasembling more than it should
<zid>
it's fairly useful along with its skip optio
<heat>
why do you want to look at llvm-mca?
<zid>
to disassemble random binaries
<zid>
you can give it how many bytes to skip and the virtual address of the first byte
<Clockface>
alright
<Clockface>
heat: why wouldent i?
<heat>
because you're going to realize your assembly is shit, like everyone's
<heat>
llvm-mca has in-depth knowledge of the CPU's uarch
<heat>
you're just a fleshy boi
<Clockface>
what if i just
<Clockface>
played with it
<Clockface>
until llvm say its not shit
<zid>
I won't even touch assembly I'm sane
<zid>
assembly is what my C compiler produces only
<Clockface>
i work with a boomer who thinks C makes things too complicated
<zid>
That isn't because he's a boomer
<Clockface>
and insists on using excel BASIC and assembly for everything
<Clockface>
he learned to program very long ago
<Clockface>
and hasnt changed since
<heat>
fleshy bois rarely beat the compiler at special purpose snippets
<heat>
fleshy bois never beat the compiler at general purpose code
<Clockface>
on crappy little microcontrollers assembly still wins out
<Clockface>
its just because more advanced CPU's arent so straightforward
<Clockface>
to optimize
<heat>
X doubt
<heat>
have you seen gcc's codegen?
<zid>
Nobody's ever made a good 6502 compiler
<heat>
it's ridonculous
<zid>
it's too unlike an x86 :P
<zid>
The fact is just that C doesn't map to it well at all
<heat>
they know of 200+ ways to do basic add/sub/mul operations you actually struggle to make it codegen one
<zid>
If you wrote your C program like a union of 256 chars and did everything through that, it'd generate nice code..
<zid>
but people insist on using garbage like "functions" and "structs", smh
<Clockface>
did you mean: subroutines
<zid>
no
<zid>
C does not have subroutines
<heat>
methods
<zid>
heat: boil.
<Clockface>
isnt a function just a subroutine with arguments?
wootehfoot has joined #osdev
<zid>
depends what you mean by subroutine, but C functions do not require taking arguments
<heat>
void func() // take them all
<zid>
The definition is either identical or different, depending
<moon-child>
fleshy bois can always beat the compiler if they know what they're doing
<moon-child>
but usually have better things to do with their time :P
<zid>
am I allowed to steal from the computer
<zid>
if I am allowed to steal from the compiler and benchmark variations etc I can probably beat a compiler
<zid>
if I have to do it in an empty room by myself I will lose every time
<Clockface>
writing assembly without a manual is like writing javascript without a search engine
<heat>
fleshy bois can very very very rarely beat the compiler
<zid>
why would you need a manual to write assembly
<heat>
believe me, you don't know the CPU better than it
<moon-child>
the compiler has a manual. Why shouldn't I get one?
<zid>
I remember the cpu I write assembly for sometimes' entire ISA
<Clockface>
when you are doing something substantial in assembly usually you run up against stuff you dont use very often
<moon-child>
the compiler is very knowledgeable, but not very wise
<heat>
you would need robot-like memory and robot-like atention and god-like knowledge of everything
<zid>
https://izik1.github.io/gbops/ like.. 3/4 of them are reg to reg loads, the rest is all 8x the same thing for each reg
<bslsk05>
izik1.github.io: gbops - The Game Boy opcode table
<heat>
not very human characteristics
<zid>
there's 30 things to remember total
<moon-child>
register allocation, instruction selection, and instruction scheduling are hella annoying for compilers
<moon-child>
but it's basically a search problem
<moon-child>
which humans are quite good at
<moon-child>
as they can prune big portions of the search space heuristically
<Clockface>
sometimes the compiler doesnt know how something will be used too
<heat>
sure it does
<Clockface>
so you can pick and choose what to sacrafice for other things more accurately
<heat>
have you seen lto?
<heat>
it can know that on a global scale
<zid>
we're not allowed to mention things post 1992
<zid>
That's why I used 6502 as an example
<zid>
it gives the compiler the worst possible chance
<heat>
LTO is just crazy optimal assembly that no human would or could ever write
<Clockface>
i still use C for most of my programs on PC's
<zid>
LTO is the main reason I'd need to steal the compiler's output
<moon-child>
plenty of things the compiler knows. Plenty of things it doesn't, too
<Clockface>
but you can still beat C if its very important for some reason
<zid>
Some of the time, yes
<moon-child>
the only thing the compiler has on humans is scalability and patience
<zid>
some things are just.. only really doable one way and very obvious
<heat>
you can beat gcc if its really special purpose shit (and you know what you're doing)
<heat>
like a memcpy
<Clockface>
exactly
<zid>
This isn't the 80s where maybe there's a weird BCD instruction you can use to skip a flag check or something and the compiler isn't going to see it
<zid>
ISAs are better and compilers are way better
<heat>
99.9% of C you're not beating it
<Clockface>
yes but for 1000 C programmers that still leaves 0.01% for a random assembly guy
<Clockface>
lol
<heat>
Clockface, how would you multiply a number by -3?
<heat>
BIIIIIIIIITCONNEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEECT unix version
<moon-child>
BORN TO IOCTL
<moon-child>
DENNIS RITCHIE IS A FUCK
<moon-child>
Kill Em All 1969
<moon-child>
I am creat man
<moon-child>
410,757,864,530 ZOMBIE PROCESSES
<mrvn>
moon-child: keep playing with it writing some more complex code and you will find the compiler will cast variables to the larger type (so the upper half is 0) and then still go ahead and multiply that 0 with the other side and add the result and handle the overflow and carry.
<heat>
zid, did you know you can resolve PCI ids using solely DNS?
<mrvn>
moon-child: as soon as it goes into emulating larger registers with 2 smaller ones it breaks down.
<heat>
its craaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazy
<moon-child>
what
<moon-child>
mrvn: sure; I'm not implying that you can get good extended-prec arithmetic without handholding. Only that you can do the handholding and it's not that bad
<mrvn>
moon-child: and I'm telling you that the handholding only works in simple cases. You do have to cast the variables to the larger type and there is no way to tell the compiler the upper half is still 0.
scoobydoob has joined #osdev
scoobydoo has quit [Ping timeout: 256 seconds]
scoobydoob is now known as scoobydoo
<zid>
heat: someone has a TEXT record on every 16 * 16 bit id on a domain somewhere?
<heat>
yup
<zid>
my friend did that with bc once
<heat>
see lspci -Q
<zid>
you could do 4.times.3.friendo.com or whatever and it'd respond with 12
<zid>
lspci: DNS queries are not available in this version
<zid>
*checks USE flags*
<heat>
cmon zid why are you not letting your lspci utility access the internet
<heat>
it's perfectly safe
<zid>
I'm trying!
<zid>
USE="kmod udev zlib -dns -static-libs"
<zid>
well that's an easy fix
<zid>
okay what did it do, all m y devices are detected anyway
<heat>
you should've seen some delay as it resolved everything
<zid>
yea
<heat>
OR you may need to disable the local pcid database
<zid>
the diff is idnetical though
<zid>
how
Burgundy has quit [Ping timeout: 268 seconds]
<heat>
because it's the same database
<zid>
-Q is the override
<zid>
ah okay
<heat>
the guy who runs lspci is the guy who runs that DNS domain which is also the website that usually comes up when you google for pci devids
<heat>
he has a full monopoly on pci id stuff
<zid>
I like that website
<heat>
what's qemu's BAR6 supposed to be?
<zid>
its what
<zid>
don't devices usually have bars, not emulators
<heat>
info pci I mean
<zid>
info: No menu item 'pci' in node '(dir)Top'
<heat>
in qqqqqqqqqqemu
<zid>
okay which device?
<heat>
PCI devices have at most 6 BARs, not 7 (0-indexed)
<heat>
e1000 is an easy one
<zid>
my 8086:100e has an easy one
<zid>
32bit memory at -1
<zid>
I assume that's the option rom but is disabled
<heat>
exactly, I don't get it
<heat>
hm
<heat>
what does disabled mean in PCI ROM terms?
<zid>
ethernet cards love having roms, and the bios leaving them writeable is kinda lame
<zid>
after it runs it at boot
[itchyjunk] has quit [Ping timeout: 272 seconds]
<mrvn>
Do ARM servers have an x86 emulator in their bootloader like Xfree did on alpha to run those PCI ROMs?
xenos1984 has quit [Read error: Connection reset by peer]
<heat>
I know some uefi firmware includes qemu to do that
<zid>
heat are all the bugs fixed in onyx yet
<heat>
which ones?
<zid>
The.
<mrvn>
all known, unknown and potential bugs have been fix. I promise. trust me.
<zid>
oh that's not a worthy gift for one such as yourself
terrorjack has joined #osdev
<epony>
get 10x PCs of $200 USD each and parallelise your work across them
<epony>
use RPi's and program them in Rust
<epony>
then come back and tell us how much performance and elegance the ARM architecture has
<epony>
promise, nobody will laugh
<heat>
geist, how are dtb ranges in pcie nodes supposed to work?
<geist>
iirc its hella complicated, and there is some sort of tagged format there
<geist>
i actually went through one day and manually decoded it
<geist>
but there *is* a pci spec for dtb. it predates linux getting ahold of it if you search around
<heat>
yes I think I found the tagged format but I don't understand what it's actually representing
<geist>
yeah, it makes sense to manually walk through it once to grok. also i looked at bit at the qemu code that dynamically assembles it to understand what it was doing
<geist>
not *terribly* well commented, but basically understandable
<geist>
i dont have it in front of me but i had a commented up version of what qemu virt machine was feeding me and it kinda makes sense
<geist>
at the minimum you can get the PCI ecam range ut of it i think, but it's also describing things like where the PCI bus lives in physical space
<geist>
for both MMIO32, MMIO64, and IO ports
<heat>
I've been poking around $things to find out how PCI bus resource assignment is done
<geist>
ie, which range are owned by what root complex
<geist>
and the whole interrupts thing is a thing too
<heat>
I think any sort of PC stuff requires the PCI firmware spec which is a wonderful $2K holy grail I assume
<geist>
yeah and/or you Just Find It
<heat>
unfortunately it hasn't fallen off a truck yet
<geist>
what PC stuff are you looknig for?
<geist>
in general i've settled on 'PC doesn't need to be configured becase it's already done by bios' but for other arches you might have to bootstrap it from scratch
<heat>
all the stuff the firmware does and I could
<geist>
in which case the DTB probably describes what you want: where the aperture of physicla space you can allocate out to busses and devices
<heat>
I assume that ACPI is heavily involved here in figuring out the ranges for the complexes
<CompanionCube>
i found a pci pdf from 2004, does that count?
<geist>
for the hackery i've done for LK for arm and riscv virt i just hard coded it as inputs to the bus
<heat>
CompanionCube, let me guess, local bus?
<CompanionCube>
yes?
<heat>
that's old news
* heat
spits onto your pdf
<heat>
it's the firmware one that doesn't seem to want to fall of a truck
<heat>
and, you know, I assume it has a lot of nice wisedom
<CompanionCube>
interestringly
<CompanionCube>
heat: coursehero seems to have the firmware spec from 2010 probably for cheaper than $2k
<heat>
i know
<heat>
i've been desperately searching for it for like the last hour :P
<geist>
i can probably look into whether or not there's at least something interesting in the spec you need
<zid>
So what you're saying heat is that we need to take an 8GB flash drive to the ISO headquarters and pull of the most monetarily valueable heist of all time
<mrvn>
zid: if you are there why limit yourself to 8GB. Surely they have more specs.
ZombieChicken has quit [Remote host closed the connection]
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
Lumia has joined #osdev
* kof123
.oO( "410,757,864,530 ZOMBIE PROCESSES" ♫ 99 zombie virtio_balloons, floating in my kvm room ♫ )
justmatt has quit [Quit: rebooting]
justmatt has joined #osdev
justmatt has quit [Quit: rebooting]
Lumia has quit [Quit: ,-]
justmatt has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
<geist>
noice. finally got around to doing a riscv ubuntu 22.04.1 install on a qemu VM
<geist>
not very fast, but at least a nice riscv 'native' install
<zid>
I was going to suggest something to run on it, but all I could think of was qemu
<zid>
so that you could run an x86 os
ThinkT510 has quit [Quit: WeeChat 3.7.1]
ThinkT510 has joined #osdev
danilogondolfo has joined #osdev
GeDaMo has joined #osdev
eroux has joined #osdev
k0valski18891 has quit [Quit: Peace out !]
heat has quit [Ping timeout: 252 seconds]
unimplemented has joined #osdev
unimplemented has quit [Read error: Connection reset by peer]
gildasio has quit [Ping timeout: 255 seconds]
gildasio has joined #osdev
epony has quit [Remote host closed the connection]
unimplemented has joined #osdev
<kaichiuchi>
hi
Burgundy has joined #osdev
nyah has joined #osdev
EthicsGradient is now known as FateAmenableToCh
FateAmenableToCh is now known as HonestMistake
Turn_Left has quit [Quit: Leaving]
elastic_dog has quit [Killed (mercury.libera.chat (Nickname regained by services))]
<Ermine>
no = disagree or no = do not want to discuss?
<kaichiuchi>
i have to be careful, because there are probably elon musk crazies on IRC
Left_Turn has joined #osdev
terminalpusher has joined #osdev
<jimbzy>
I use C++ like "More Gooder C", so I don't feel like I'm qualified to discuss. :P
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 246 seconds]
epony has joined #osdev
<sortie>
I have a feeling Elon C is not very good
<ghostbuster>
it depends which C++ you're reading/writing.. 2022 C++ is almost unrecognizable compared to 2005 C++
<sortie>
Yeah that's kinda part of why I switched from C++ to C
<sortie>
I was writing really old style C++ because that's what I grew up with and honestly it felt closer to C as a home than modern C++
<sortie>
I should learn how to write proper modern C++ although really worried about properly handling all the edge cases and throws on memory exhaustion
<ghostbuster>
i don't pretend to know how to do that stuff
[itchyjunk] has joined #osdev
HonestMistake is now known as DjanSeriy
<jimbzy>
I like 2005 C++, ghostbuster.
<ghostbuster>
you must be a masochist lol
<ghostbuster>
those template errors are the stuff of legend
* jimbzy
shrugs.
<jimbzy>
Didn't use templates much back then because nobody knew what they were. XD
heat has joined #osdev
<jimbzy>
The STL was like black magic.
<heat>
pogchamp, bazel
<heat>
sortie, what is proper modern C++?
<Ermine>
I missed it, what bazel means?
<heat>
bazinga
<jimbzy>
Sounds like an energy drink, heat. ;)
<heat>
sortie, it's hard to define what modern C++ is because its meaning probably heavily depends on who you're asking
<pogchamp>
heat: basal ganglia
<heat>
there's a consensus of "modern C++" but if you for instance ask google they'll tell you that they won't use the STL because no exceptions and rtti, they won't use operator overloading, etc
<jimbzy>
Modern C++ is whatever you want it to be.
<bslsk05>
twitter: <deplinenoise> If you bring up std::accumulate() in my interviews, they tend to be very short. [https://twitter.com/Sickeroni/status/1490960666286780420 <Sickeroni> @pshufb How he would sum an array.  most will answer with "for loop", some with "ranged for loop" and almost nobody with "std::accumulate" ]
<jimbzy>
Let me tell you about Modern Cpp. It can be what you want it to be. You ain't got no responsibility. Every dev, every dev is free. It's a million miles from reality!
<bslsk05>
'The Temptations - Cloud Nine' by Will Common (00:03:33)
<pogchamp>
my wife is making chili and cornbread
* pogchamp
pogs
<jimbzy>
Nice
<heat>
pogchamp, pogchamp
<jimbzy>
People call me weird for having cornbread with chili.
<kaichiuchi>
heat: honestly
<kaichiuchi>
I get what he's saying, but std::accumulate is the idiomatic way to do that now
<kaichiuchi>
don't really like those interviewers
<kaichiuchi>
the correct thing to say is "well, think about it in terms of debug performance, what might happen?"
<kaichiuchi>
etc
<pogchamp>
heat
<kaichiuchi>
not "yeah you're a fucking idiot for not doing things idiomatically"
<kaichiuchi>
er, -not
<kaichiuchi>
the whole point is to see what they know, and if they don't know that much, if they can be taught
<heat>
depends
<heat>
I don't think std::accumulate is idiomatic
<kaichiuchi>
people shouldn't duplicate what the STL provides for them, is the official argument
<heat>
if someone wanted to bring that sort of code into my codebase I would shoot myself
<heat>
before I shot them ofc
<kaichiuchi>
pogchamp: do not take this badly
<kaichiuchi>
but we're in #osdev
<kaichiuchi>
no such thing as having a wife
<kaichiuchi>
:')
<heat>
kaichiuchi, duplicate what? a for loop incrementing things? cmon
<kaichiuchi>
heat: understand that I agree with you
<kaichiuchi>
but <algorithm> is what people are probably expected to use
<heat>
<algorithm> was C++'s bad trip into functional land
<heat>
it sucks
<heat>
hard
<kaichiuchi>
I wouldn't be shocked if someone who just learned C++ wrote std::accumulate
<kaichiuchi>
i'm a sinner, I've used stuff from <algorithm>
<heat>
I think i've only used remove and maybe reverse
<kaichiuchi>
i'm just saying, if I'd ask someone "how would you reverse a string" and if they say `std::reverse()` I'm not going to bitch depending on what the project is
<kaichiuchi>
that's the key there: "depending on what the project is"
<kaichiuchi>
if it's something like game development I'd definitely ask if they could reverse a string without using the built-in facilities
<heat>
but std::reverse is at the very not-that-trivial
<heat>
very least*
<heat>
but std::accumulate? cmon
<heat>
+= too hard?
<kaichiuchi>
my friends from my old job cringe at me when I say that the STL is mostly bullshit
<heat>
it absolutely is
<kaichiuchi>
but they're also regular plain old C++ application developers
<heat>
tell them to get unit tests first
<heat>
*burn*
<kaichiuchi>
they're nice people
<kaichiuchi>
but they're a little naive
<kaichiuchi>
i don't think they'd survive doing game development because they'd bitch that everyone has their own STL
<kaichiuchi>
"debug performance" doesn't register with them
<kaichiuchi>
I usually bitch at them when they hail big O as super super important, which it is
<kaichiuchi>
but big O is only half the battle
<heat>
no one survives game development
<kaichiuchi>
people in CS get too caught up in the theoreticals and forget that they're writing code for machines that fuck with every single thing you do
<kaichiuchi>
an algorithm could look beautiful theoretically, but when you shit out the code for it on a PC, it could be quite inefficient
<bslsk05>
'Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019' by CppCon (01:29:55)
<kaichiuchi>
of course.
<clever>
kaichiuchi: one thing ive spent a lot of time on, was profiling opcodes, so i could count how many cycles a function would take
<kaichiuchi>
heat: i clicked in a random place and saw the GNU make_heap monstrocity
<clever>
in theory, that would then allow a compiler to come up with 5 different implementations, and compare them
<epony>
who is going to do the comparison ;-)
<kaichiuchi>
clever: i dunno, I just get really, really upset when people don't care about performance
<clever>
epony: ideally, the compiler, teach it how to cycle count, based on the results from benchmarking single opcodes
<kaichiuchi>
9 times out of 10 I hear "premature optimization is the root of all evil", which is true
<epony>
like you see how much 'human" attention the "distributed" repositories get
<kaichiuchi>
but whenever I say "here's better code"
<epony>
optimisation is important
<kaichiuchi>
"this works, and it's fast enough"
<epony>
you start with it and you end with it
<kaichiuchi>
see, I'm writing an emulator, as far as I'm concerned the whole thing has to be hyper-optimized
<epony>
blanket statements are incorrect most of the time
<kaichiuchi>
but that's what you see when you look on stackoverflow
<kaichiuchi>
"how can I do this better"
<kaichiuchi>
"who cares? premature optimization is the root of all evil!"
<kaichiuchi>
"std::accumulate() isn't a bottleneck, why would you want to write your own"
<epony>
so it's always about optimal and efficient (at the same time) design and implementation
<kaichiuchi>
"why would you want to write your own anything, just use spdlog, boost, and about a dozen other libraries"
<clever>
kaichiuchi: because i have a vector core that can accumulate 16 things at once!
<clever>
16x faster
<kaichiuchi>
I just get really, really really upset when people think performance doesn't always matter
<clever>
why say no to that?? :D
<kaichiuchi>
I just hate that there's this sort of bullshit that's going around in the CS world
<kaichiuchi>
clever: because it's "fast enuffffff"
<jimbzy>
Trade offs.
<epony>
it's always about performance and speed-time-resources balance and optimums, just people have smaller teams or personal / group constraints that limit their ability to reach into better implementations and they decide to also not go for the design optimums, because that's how they justify other goals and objectivest that are not obvious and not specified honestly upfront
<bslsk05>
'vpu accelerated mandelbrot, final version' by michael bishop (00:00:18)
<kaichiuchi>
there's trade offs in everything you do
<clever>
kaichiuchi: but it isnt fast enough!
<clever>
even with vector accelerations
<kaichiuchi>
for HPC and video game stuff, there are no trade offs
<jimbzy>
Sure there are.
<kaichiuchi>
it's either you write performant code, or you write nothing at all
<epony>
so, is a way to not explain incorrect or suboptimal choices, instead of delegating that or designing for a system that could do it later
<jimbzy>
That's simply not true with game development.
<kaichiuchi>
are you kidding?
<jimbzy>
Yes
<kaichiuchi>
ok
<clever>
kaichiuchi: that reminds me, something like 5 of the last games ive played, are in denial about 4:3 monitors existing, lol
<jimbzy>
Not really, though.
<clever>
the games all letterbox themselves
<kaichiuchi>
jimbzy: people want their games to reach the masses, and a lot of people have shit systems
<jimbzy>
I know a lot of game developers, and there are trade offs.
<kaichiuchi>
*a lot of people*
<heat>
are you joking
<heat>
no they don't
<kaichiuchi>
no I'm not joking
<heat>
they demand $600 top of the line GPUs
<epony>
and in England people speak in re-verse so they are saying the opposite thing of what they mean and there is never understanding so the crime (murder) rate is high ;-)
<jimbzy>
Yep, and who's going to play a game when a bug makes it unplayable and the code is so arcane that nobody can fix it?
<heat>
accumulate being slightly faster does literally nothing on that
<kaichiuchi>
i wasn't talking about accumulate
<kaichiuchi>
.
<kaichiuchi>
performance is money to these companies
<epony>
so at least when programming and declaring your goals and objectives try to not have the "doublespeak" premise
<heat>
it's not
<heat>
very clearly
<jimbzy>
I'm not saying it isn't, but they have to balance performance with other factors.
<heat>
they sell products, not performance
<epony>
what "other factors" ;-)
<kaichiuchi>
look, I get what the argument is
<heat>
if the video game runs slow on your machine, the traditional narrative is "ugh, slow ass old machine, get a new one"
<epony>
it's all about peformance and efficiency and replacement rather than rigorous methodology
<jimbzy>
When it comes to games, it's usually about assets, but that's a horse of a different color.
<epony>
that kind of programming requires you to "implement" similarity and likeness rather than do the compute
<epony>
and ultimately it's all about performance and efficiency
<epony>
or simply: resource optimisation
<epony>
that commands the logic operation, and the data is compacted and manipulated to fit for a faster logic processing
<kaichiuchi>
on another note
<kaichiuchi>
I think people who write shader code are wizards
<pogchamp>
jimbzy: cornbread with chili is mandatory
<kaichiuchi>
fuck i want cornbread with chili
<pogchamp>
come over to my house
<kaichiuchi>
do you think your wife can make me some and you can catapult it across the ocean
<kaichiuchi>
oh
<kaichiuchi>
okay
joe9 has joined #osdev
<jimbzy>
epony, I'm not disagreeing with any of that. I'm just saying the idea that game developers are obsessed with performance and efficiency isn't true. A lot of times "good enough" is good enough.
<jimbzy>
Some are, but many aren't.
<jimbzy>
I'd go so far as to say the majority aren't, or at least those I have met in my travels weren't.
<heat>
kaichiuchi, the real wizards are the nvidia engineers that rewrite their shaders :v
<kaichiuchi>
well you see
<kaichiuchi>
I look at shadertoy sometimes
<kaichiuchi>
and I think "how the fuck can a human write this"
<kaichiuchi>
it looks like a MATLAB script
<kaichiuchi>
it's probably not as terribly difficult as I'm thinking it is
<bslsk05>
www.pokcas.com: Iceland Foods Loses Trademark Battle With Icelandic Government
<kaichiuchi>
jimbzy: even so, it still looks super complicated
<zid>
the fuck does that have to do with their finanical outlook
<kaichiuchi>
i've been told game development isn't hard, it's coming up with the game itself that is
<zid>
wtf
<kaichiuchi>
and I don't believe that
<kaichiuchi>
well, I think it's all complicated
<jimbzy>
You'd be surprised.
<zid>
'gamedev' is super super broad
<kaichiuchi>
AAA game
<kaichiuchi>
.
<zid>
it can mean modelling realistic fluid dynamics, or it can mean pong
<jimbzy>
There are plenty of libraries, engines and assets available for use, but figuring out how to make them into something that's entertaining is difficult.
<zid>
even on an AAA title
<kaichiuchi>
how specific do you want me to be
<kaichiuchi>
any top 10 game released in the past 2 years
<jimbzy>
I like the Godot engine, myself. A lot of my pals use Unity or Unreal.
<jimbzy>
Then you have libraries like SDL and what not.
<jimbzy>
Assets can be purchased from sites like, itch.io or commissioned.
<jimbzy>
I mostly like piddling around with 2D stuff because I suck at 3D modeling.
<bslsk05>
'CppCon 2014: Mike Acton "Data-Oriented Design and C++"' by CppCon (01:27:46)
<epony>
^ the C in C++ with Assembler affinity for cache and CPU super-compact data optimisation
<epony>
as in "no other way" for fast paced action games
<epony>
and also, optimisation is the mother of all optimums
<epony>
it's a state of "fast" which you can "lose" any moment with stupidity
<epony>
the more stupid you are the sooner and the quicker to lose it and be hopeless thereafter saying that "it's not about performance while others speed next to you"
<epony>
that's the same in fighter jets and interceptors too
<epony>
it's the same for deep space travel and outrunning a turtle
<epony>
it's the same in economic and production
<epony>
it's always a shortage, defficiency, lack of resources and contention (because your machine is not large enough and fast enough)
<epony>
and even if it is, you're not solving the problems that would prove it is slow and small
<epony>
it is the same for kernels and operating system development, but you have to be more precise and more correct about it, games make short-corner cutting the primary objective, operating systems do not have that luxury
<epony>
you'll be surprised to see / know / understand what is happening inside the microprocessors too
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 246 seconds]
<epony>
what you're taught in (university) school is the kid/adapted/generalistic version of things
<epony>
it's a thinning the micro-optimisations targetting microprocessors specific features and undocumented artefacts kind of "game"
<epony>
into (ab)using more of your processors and machine intended use, with cache hit ratio optiomisationd and data conversion ahead of time to assure linear processing at almost zero overhead and tweaking experimentally microoperations in machine code for processor specific gains / bypasses
<epony>
it's more than you have imagine there cold be
<epony>
could be, because you're not taught all important aspects of the machine operation, you're taught programming a naive theoretical model of a language implementation
<epony>
it's easy to overcome such limitations
<epony>
picking the right set of goals and objectives (optimums and targets) is where you end up, battling the compilers and their corner-cutting trickery
<epony>
for kernels can not and should not be failing at various "doing it easy" choices
<epony>
that's the difference with game programming
<epony>
games cheat, kernels do not have that luxury (and when they do you get "fsync"-gated)
<epony>
or 'told how stupid Linux gets'
xenos1984 has quit [Ping timeout: 252 seconds]
<epony>
but superoptimisation that does not break operation and logic correctness are.. used
xenos1984 has joined #osdev
<epony>
in compilers and in "busy (beaver)" routines
<epony>
and sometimes it's a choice of sub-optimal designs (displacing the overhead) because the machines are not "enough" for the elaborate and all fancy functionality (no object oriented programming in the fast execution loops, that thing practically does not exist, it's a usability for the modelling facility that does not fly)
<epony>
the entire operation is turned so that these are avoided and sustained data throughput is machine-specific
<epony>
there are extremes on optimisation, and that is an example of practical means to that on programming level (controlling the machne operation with high level language tools and overcoming the incorrect assumptions that compilers naively make)
<epony>
it's still not the engineering variant, but is close to it
<epony>
programmers are very naive bunch of people
<epony>
it comes from the teaching and engineering "ommissions"
<epony>
you can fix / fill that in yourself
<epony>
optimisations are important
k0valski18891 has joined #osdev
<heat>
i have an issue
<heat>
i tried generating a header dependency graph into an svg and I get something unzoomable
<heat>
not even 2000% works ;_;
<GeDaMo>
Could it be a problem with the viewer?
<heat>
the svg is 40k lines :)
danilogondolfo has quit [Remote host closed the connection]
<GeDaMo>
It's the 21st century! 40k is nothing :P
<heat>
yeah i'll never be able to generate a good svg of this shit
<bslsk05>
include-what-you-use/include-what-you-use - A tool for use with clang to analyze #includes in C and C++ source files (330 forks/3147 stargazers/NOASSERTION)
<zid>
heat: Did you remember to turn the oven off when you made your chicken nuggts?
<heat>
sadly no nuggies here
<zid>
There's your problem
<zid>
how are you going to attract talent to your project if you don't have nuggets to offer them
<zid>
heat is the type of person to invite people back to his hotel room and doesn't even offer any cocaine
<heat>
the only right place to do cocaine is in the footie stadium on the toilet seat
<zid>
see
<zid>
heat what do you think hookers want, yoghurt?
<zid>
smh
<heat>
is it worrying that I save ACPI tables people give me?
<zid>
I didn't give you it btw, I rented it to you
<zid>
it's the 31st today so rent is due
<heat>
you'll never catch me
<zid>
what's the rental price on a house in goose, like €30/mo?
<zid>
we can scale it down from there
<kaichiuchi>
it's generally $1,500/month here
<kaichiuchi>
oh a house
<kaichiuchi>
rent is like $2k/month
<kaichiuchi>
accordingly no one can pay it
<zid>
>in goose
<heat>
kaichiuchi secret goose
<zid>
I was busy making fun of portugal and you're interrupting
<kaichiuchi>
i was busy making fun of my area
<pogchamp>
hi
<kaichiuchi>
hi
<heat>
pog
<pogchamp>
pog
<heat>
the reverse of pog is gop
<pogchamp>
graphics output protocol
<heat>
do you have something to say, closet republican
<zid>
reverse republican
<pogchamp>
yeah i'm detransitioning and dedicating my life to spreading the word of the lord
<heat>
republicans are all in the closet anyway
<zid>
so what is a reverse republican, out of the closet? does that make them very gay, or very straight?
<bslsk05>
twitter: <UpshotTowers> 2016: Samir Nasri pays a visit to the 'Drip Doctors' for an 'injection of nutrients'.   He later posts a string of tweets claiming the nurse “provided me a full sexual service too right after", before insisting he'd been hacked.   He's then banned for doping. https://pbs.twimg.com/media/Ff_gY8WWQAUpQBZ.jpghttps://pbs.twimg.com/media/Ff_gY8uXEAcSmmn.jpg
<jimbzy>
I've been spending New Years on IRC since the Y2K, so it's sort of a tradition at this point.
xenos1984 has joined #osdev
<kaichiuchi>
i can't drink
<kaichiuchi>
well, I *could*
<kaichiuchi>
but it might interfere with my meds and that's ano
<kaichiuchi>
*a no
<heat>
:/
<heat>
what meds do you take?
<jimbzy>
Yeah, alcohol and rx medications can be a bad combination.
<kaichiuchi>
heat: escitalopram 5mg
<kaichiuchi>
and lord I wish it wasn't necessary
<kaichiuchi>
it's not even necessarily for depression
<kaichiuchi>
just really bad anxiety
<heat>
ah
<heat>
sucks :(
<kaichiuchi>
it's okay
<kaichiuchi>
now that I'm not saying "paper or plastic" anymore, I feel a lot better
<heat>
fwiw my family members have taken anxiety meds et al over time and alcohol and there was no issue
<geist>
lexapro. that's a fairly standary SSRI
<kaichiuchi>
yeah it's not likely to have any serious interactions
<kaichiuchi>
but I don't want to risk it
<kaichiuchi>
geist: yep.
<geist>
anyway. probably not a fantastic idea broadcasting your meds to the internet
<kaichiuchi>
i don't see why not
<geist>
do keep in mind this is publically logged for essentially ever
<geist>
*shrug* okay
<kaichiuchi>
i don't have a problem saying that I have a mental health issue
<geist>
okey dokey. just pointing out in case you didn't know this is logged
<kaichiuchi>
it's appreciated
<heat>
yeah, normalize mental health
<geist>
since you're relative new her, etc etc
<geist>
hey look i dont have a problem with it either, just dont know what the situation is where you are, what country you're in etc
<kaichiuchi>
pennsylvania
<kaichiuchi>
I would say that some people on the internet have seen me unravel and I've said some pretty goddamn awful shit
* geist
does a spit take
terminalpusher has quit [Remote host closed the connection]
<kaichiuchi>
but
<kaichiuchi>
what can you do
<kaichiuchi>
heh
<geist>
penn...penn...oh no!
<zid>
geist: That's a harsh reaction to pen- oh you beat me
<heat>
kaichiuchi do you speak funny
<kaichiuchi>
PENNISVANIA
<geist>
actually i know very little about pennsylvania. i've only eer lived in the south and west coast
<heat>
like those damn east coasters
terminalpusher has joined #osdev
<kaichiuchi>
i think I speak a little odd
<kaichiuchi>
yeah PA sucks
<kaichiuchi>
particularly for work
<kaichiuchi>
90% of the jobs on the east coast are military or webdev
<kaichiuchi>
the remaining 10% is when you're lucky enough to have a recruiter contact you for C/C++ like I was
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<geist>
brush up on that Ada!
<heat>
work for general electric and make either appliances or machine guns
<kaichiuchi>
the first job I had here, I was a test engineer as I said
<kaichiuchi>
even though I applied for C++, I didn't have a degree so they said "lol no way"
<kaichiuchi>
but... I needed an in, of any kind, no matter how bad it was
<jimbzy>
That's when you say, "Degree? I'm not even supposed to be in this country!"
<kaichiuchi>
i refuse to do military work, and I refuse to do webdev, and I'm too scared to make an extreme change like moving to the opposite side of the US
<heat>
EXTRME
<kaichiuchi>
hell yeah extreme
<geist>
interesting chip: amz8068pc
<heat>
geist, rando question but can device trees describe ioport ranges?
<kaichiuchi>
also, a part of me wants to dump the firmware from an old VCR
<geist>
dont see why not, except i've not see a DTC on a x86 machine (or other intel style machine) that would have io ports
<kaichiuchi>
also
<heat>
what's the property? all I see are MMIO ranges