<heat>
The accompanying book, I Can Be a Computer Engineer, was issued in 2013 together with I Can Be an Actress.[10][11] The book received extensive criticism, especially beginning in November 2014, for depicting Barbie as relying on two male friends to program the game she is designing.[9][11][12] In addition, they need to help her after she accidentally infects her and her sister Skipper's computer with a virus (via the pink heart-shaped USB stick she
<heat>
wears around her neck), after ignoring advice from her (female) computer teacher
<heat>
hahaha ha what the fuck
<heat>
how do you blunder this badly?
<heat>
mjg, btw yes i liked oppenheimer a lot
<heat>
it's the typical christopher nolan movie, aka not a lot of action but lots of "action" (politics and such)
<heat>
IIRC dunkirk was very similar, if you saw that one
<sham1>
heat: probably made Barbie look absolutely incompetent, which is a bad message to send
<kof123>
not a lowly coder, not a dev, an engineer!
<sham1>
Rockstar developer
<sham1>
Whilst not even programming in Rockstar
<heat>
game dev barbie works at bethesda
<heat>
100hr work weeks and harassment? nice!
<sham1>
Game development companies sound absolutely hellish when it comes to that
<gog>
ubisoft, activision-blizzard
<gog>
epic
<gog>
bethesda
<sham1>
This is why indie developers are necessary
<gog>
each has at least one high-profile incident involving sexual harrassment
<sham1>
ubisoft?
<gog>
ubi has the most egregious one
<heat>
bbbbubuubut Inspired by historical events and characters, this work of fiction was designed, developed, and produced by a multicultural team of various beliefs, sexual orientations and gender identities
<heat>
ubisoft inclusive good!
<gog>
performative wokeness
<Ermine>
butbutbut traditional values where
<sham1>
buttbuttbutt
<sham1>
That's my values
<heat>
Inspired by historical events and characters, this work of fiction was designed, developed, and produced by a monocultural team of traditional family and christian values
<Ermine>
Russian government, unfortunately, paid attention to videogames and sponsored this crap
<Ermine>
So there are Patriotic(tm) video games
<Ermine>
which promote Traditional Values(tm)
<sham1>
rip
terminalpusher has joined #osdev
janemba has quit [Ping timeout: 245 seconds]
<bl4ckb0ne>
is there hardbass in the game
<bl4ckb0ne>
and can you squat with the heels on the floor
<Ermine>
no, beginning of xvii century is too early for this
* zid
puts everyone in timeout
<Ermine>
zid: ?
<GeDaMo>
What did they make vodka out of before potatoes? :|
<zid>
serfs
<gog>
hi
<Ermine>
hi gog
<zid>
gog was busy taking s-rank adventurer exam
<gog>
what is that
janemba has joined #osdev
<Ermine>
heat: I'm thinking about adding ifunc or ifunc-like functionality into musl, and I don't see any way to make it work good in case of static linking
<sham1>
In fact I think there is one exactly using underscores
<heat>
actually though you can't do that
<heat>
because then it's not a reserved identifier
<heat>
hence, lame and smelly
<moon-child>
'fput'=0x66707574 so represent it with a string of 0x66707574 underscores
<heat>
but its not a fucking reserved identifier dman it moon-child are you not paying attention
<puck>
_ is 95 so represent it with 95 underscores,
<heat>
you need at least a non-underscore char
<moon-child>
why
<moon-child>
REAL MEN implement the c++ stl entirely out of underscores
<sham1>
And this is why C++ is banned
<heat>
WAIT SORRY
<heat>
YOU DONT NEED A NON-UNDERSCORE CHAR
<heat>
CARRY ON
<moon-child>
ty heat
<heat>
All external identifiers that begin with an underscore.
<heat>
All identifiers that begin with an underscore followed by a capital letter or by another underscore (these reserved identifiers allow the library to use numerous behind-the-scenes non-external macros and functions).
<heat>
hence _ is reserved, __ is reserved
<heat>
etc etc
<gog>
thank god i'm not a real man
<heat>
aw they're banning char *🐱 = "cat";
<heat>
fuckers
<gog>
WHAT
<heat>
/ both are ill formed in C23. Emoji are not XID_Start characters
<gog>
dang
<moon-child>
literally unusable
<gog>
i'm forking the C standard
<gog>
gog-c will allow emoji identifiers
<heat>
char *__🐱();
<mjg>
this is bullshit
<mjg>
i'm going to RUST
<sham1>
Rust doesn't allow for 🦀 as an identifier
<sham1>
It even has a custom error for it
<moon-child>
literally unusable
<gog>
heat my branch with the syscall madness is now 1136 insertions to 310 deletions
<Ermine>
Well idk where I should start reading i915 code so let's do that bootloader thing
<SGautam>
I've been having some difficulty in understanding how a network stack works, suppose I have to make request to an IP address like 74.128.54.175 or something, so first my application will package that as an HTTP request like "GET 74.128.54.175", then the network driver will package that as a TCP/IP request, and then the actual NIC driver will add an ethernet layer to it to forward it to the router w/ the associated MAC.
<SGautam>
Am I right?
<heat>
not quite
<heat>
lets say you're using python to do an http request
<Ermine>
in HTTP you put file you want to GET, not ip
<heat>
with fucking requests idk (I think that's deprecated but who gives a shit)
<heat>
requests may use CURL, i don't know, lets assume python crafts the http request itself
<SGautam>
reading
<heat>
they resolve the host (api.github.com) using DNS (involves UDP/TCP to a bunch of shit), craft the request (it's just a bunch of weirdly formatted plain text), send it through TCP (in this case, cuz https is tcp:443)
<heat>
where sending through TCP involves doing something like send(sock_fd, buffer, buffer_len, 0), that gets to the kernel
<heat>
kernel's tcp code looks at your call, copies all the data, crafts new packets and/or appends to existing ones, then tries to "send" whatever it can
<heat>
sending to TCP basically involves calling the underlying layer, which may be IPv4 or IPv6
<SGautam>
And the application must pass the IPv4/6 identity of api.github.com to the IP layer, along w/ the TCP request, correect?
<heat>
the application does not do TCP correctly
<heat>
erm
<heat>
s/correctly//
wereii has joined #osdev
<heat>
directly*
<heat>
that's what i wanted
<heat>
assuming v4, the ipv4 code looks at your "send" crafts IP headers with a full dest and IP options and whatnot, sends it to the next layer
<heat>
but before sending it to the next layer(!!), you route it internally
m5zs7k has quit [Ping timeout: 245 seconds]
<SGautam>
Why route it internally?
<heat>
i.e do you need to send it through a gateway (a "router"), is it on a local network, etc. gets you information on how the next layer is supposed to send it
m5zs7k has joined #osdev
<SGautam>
Ah, so the router / gateway will tell me if this packet will go to the outside world or stay on LAN?
<heat>
no
<heat>
that's something your routing table has
<heat>
usually informed by the router itself when configuring the interface
<SGautam>
they resolve the host (api.github.com) using DNS (involves UDP/TCP to a bunch of shit), craft the request (it's just a bunch of weirdly formatted plain text), send it through TCP (in this case, cuz https is tcp:443) <-- Who does this? The network driver?
<heat>
python?
<heat>
the ethernet layer gets all that info, and puts together the ethernet header with the hardware addresses for the destination, etc
<heat>
if you need to go through a gateway, destination = router's mac. if it's on the local network, destination = destination ip's mac
<heat>
then the ethernet layer just pushes it to the queue discipline (which we will ignore), which pushes it to the NIC driver
<heat>
driver takes your packet, sets up the internal TX data structures, sends
<heat>
dun
<SGautam>
Hmm... and then the router will probably add its own set of layers for things like NAT.
<heat>
maybe
<SGautam>
So that when the packet for my request comes from somewhere in California to my ISP's network, they know how to get it to me.
<SGautam>
I mean that's what NAT does, right?
elastic_dog has quit [Ping timeout: 244 seconds]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<heat>
lets ignore NAT, NAT is annoying
<heat>
also NAT usually does not need headers AFAIK?
<SGautam>
Does the ISP assign my IP address a port then?
<heat>
NAT basically multiplexes your one public ip (your router's)
<heat>
your IP address does not have a port?
<gog>
NAT just caches which local IP corresponds wo which external port
awita has joined #osdev
<SGautam>
Suppose my public IP is 40.152.34.192, now I'm guessing that many devices in my area will have this same IP.
awita has quit [Remote host closed the connection]
<heat>
no
<heat>
that's unique
<heat>
your phone and your laptop (connected to the same local network) will have the same public IP
<bslsk05>
github.com: Onyx/kernel/kernel/net/tcp.cpp at master · heatd/Onyx · GitHub
<bslsk05>
github.com: Onyx/kernel/kernel/net/ipv6/ipv6.cpp at master · heatd/Onyx · GitHub
<SGautam>
That means we can only have 4.9 billion unique devices online
<bslsk05>
github.com: Onyx/kernel/kernel/net/ethernet.cpp at master · heatd/Onyx · GitHub
<bslsk05>
github.com: Onyx/kernel/drivers/net/e1000/e1000.cpp at master · heatd/Onyx · GitHub
<heat>
plenty of sources there for you
<heat>
SGautam, no
<clever>
when you send packets to the router, it will overwrite the src ip, and claim its coming from 40.152.34.192
<clever>
the router will keep track of that, and fix the dest ip when the reply comes back in
<heat>
yes, and it will also play games with ports
<heat>
so connections from the same port don't fuck you over
<clever>
yeah, if the port was already in use, it also messes with that
<SGautam>
Ah, OK, so the NAT is like a router -> devices level thing.
<heat>
NAT is done entirely on the router, yes
<gog>
i'm routing i'm routing
<heat>
now that I realize it, I really did overuse auto in my networking code
<heat>
ew
<SGautam>
So the role of the ISP is to simply forward the request from the router to the destination. And they charge money for it because it is them laying down the actual wiring infrastructure to your home.
<heat>
yes
<heat>
and because you actively pay to peer with other ASes in internet exchanges
<SGautam>
thanks for clearing up some stuff man
<SGautam>
is there a good book you guys would recommend?
<SGautam>
I feel like I need to do some reading before writing code.
ajunior has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<heat>
what are you doing?
<Ermine>
There's a link in channel topic
<SGautam>
heat: Writing a torrent library from scratch as a hobby project
<heat>
you don't need any of that then
<heat>
i'm not familiar with the torrent protocol but i know it won't involve writing your own TCP/IP stack ;)
<Ermine>
What you need is how to do networking in your operating system (in Unix case, this is sockets)
<SGautam>
yah, but every P2P paper I come across always ends up using all sorts of terminology like DHCP, TCP/IP, uPnP, etc. etc. and I feel like I need to have a fair bit of background in networking theory
elastic_dog has joined #osdev
<heat>
probably not
<heat>
none of that shit actually matters
<heat>
for torrents
<SGautam>
I think torrents use some kind of uPnP for port forwarding
<SGautam>
Although they can manage w/out it as well.
<Ermine>
Find bittorrent spec and read whay you need to do
<Ermine>
Meanwhile, that piece of shit finally exited boot services!!!
<Ermine>
efi hello world which gets memory map, exits boot services and stalls
<heat>
poggers
<heat>
we loadin onyx now?
<bl4ckb0ne>
Ermine: the secret ingredient is never calling exitbootservices
<Ermine>
Not so fast
<Ermine>
bl4ckb0ne: iirc I wanted to test something
<sham1>
I thought that the secret ingredient was crime
<Ermine>
what if there were automatic style converters, like WindowsyCamelCase -> fine_snake_case
<moon-child>
that sounds like a terrible idea
<moon-child>
in the case of efi, names aren't really part of the spec, so you can use whatever names you want. Eg cefi uses snake case
<heat>
when in rome do as the romans do
<Ermine>
I copypasted stuff from spec and I don't like their style
<heat>
tough shit
<Ermine>
fuchsia headers use their own style
<Ermine>
But you have a point
<heat>
rewriting everything to use unix_hacker_style is silly
<Ermine>
Probably
<Ermine>
i like this style because i don't like pressing shift button
<heat>
docs use camel case, spec uses camel case, examples use camel case, the code usually uses camel case
<heat>
my underscore is also behind a shift button so it makes no difference to me :P
<gog>
snake casing
<gog>
snake casing
<gog>
snake_case_best_case
<Ermine>
Well well okay
* moon-child
chomps-on-kebab
<gog>
iUseCamelCaseAtWorkThough
<heat>
_ is stupid
<gog>
shut up heat
<Ermine>
yeah
<heat>
true hackers do shit like namei()
<heat>
resolvep
<sham1>
PascalCaseForTypes, camelCaseForMethods
<gog>
true hackers know the offset of their sub routines
<heat>
lookuppn
<gog>
and call them by that
<heat>
do you know what lookuppn is gog?
<gog>
i don't
<heat>
you know why?
<gog>
no
<heat>
because you didn't try man 9 lookuppn
<moon-child>
lookup penis norway
<heat>
now you're going to try that, it's going to fail and you're going to realize that 1) no one uses man(9) anymore 2) no one uses direct UNIX descendents anymore
<sham1>
It'd only be norway if it was no
<heat>
3) lookup penis nepal
<sham1>
lookuppno
<sham1>
On that note, fuck YAML
<sham1>
It's terrible
<gog>
i don't care what lookuppn is
<heat>
gog do you know what swapper is?
<moon-child>
do NOT fuck yaml
<gog>
do you
<heat>
you don't? no shit, it swaps!
<heat>
just kidding, it doesn't swap
<heat>
get pranked by UNIX bro haha
<moon-child>
swapper? I hardly know 'er!
<sham1>
moon-child: oh yeah, YAML might have an STD. Forgot
<gog>
hhhhhhhhhhhhhhhhh
<sham1>
But yeah, it's the worst thing
<gog>
Y'All Motherfuckers Lying
<moon-child>
the bad jokes will continue until morale improves
<heat>
y'all
<heat>
gog cowgirl
<heat>
yeeeeeeeeehaw
<gog>
i do say howdy from time to time
<heat>
gosh darnit fellas
<gog>
dang i need a cowgirl outfit now
<sham1>
gosh
<moon-child>
aw heck
<bl4ckb0ne>
sham1: secret ingredient is always crime
<bl4ckb0ne>
but there can be more than one
<sham1>
Okay good
<sham1>
Crisis averted
<geist>
Ermine: what fuchsia headers are you looking at?
<Ermine>
bl4ckb0ne: from which place should I start reading i915 code
<bslsk05>
fuchsia.googlesource.com: zircon/kernel/lib/efi/include/efi/system-table.h - fuchsia - Git at Google
<sham1>
But why is it like that
<Ermine>
bl4ckb0ne: well I thought you knew that, sorry for bothering
<sham1>
Mixing the styles just looks odd
<gog>
different people working on it maybe
<heat>
i'm having the hugest mandela effect moment
<geist>
it's not consistently that way. my guess is someone added the later structs and used PascalCase because that's the style we're supposed to use
<geist>
and the older structs are still snake cse
<geist>
the efi stuff almost predates fuchsia, i think we wrote that extremely early
<heat>
i remembered it all being snake case
<geist>
ie, 2016
* gog
sliters around
<sham1>
It just looks like no one said anything during code review
<geist>
well, or new things were written with the new case, and the old stuff wasn't refactor
<geist>
most of the kernel has a huge mix of that too, for similar reasons
<geist>
a new style was mandated because, but older code gets converted slowly as folks touch it
<sham1>
And no one's touching the EFI code I assume
<geist>
correct
<geist>
the efi code is pretty much make it work, dont touch it. headers also touch a lot of things, so if you refactor a header you hae to go touch all the parts where it's used, etc
<geist>
so it becomes more work for just pretty sake
<sham1>
Fair enoughj
<geist>
honeslty i mostly dislike the google style, but most folks just go with it because the point is to have a style, not really like it
<heat>
the gang deals with dodgy efi implementations
<geist>
heck snake vs pascal case is one of the biggest inconsistencies of the google style i've seen
<geist>
hah, honestly i would hav ejust left off the hadle
<sham1>
You can't handle it
<geist>
but that's also i forget called out somewhere
aosync has joined #osdev
<moon-child>
I still have yet to use a fancy c or c++ ide, because everything I've tried has completely crapped out, but possibly if you leave in the parameter name an ide can show it when calling
<moon-child>
which seems like a valid reason for leaving it in
<geist>
yeah, usually if it's intrinsically obvious what it is i'll leave it out, but you may be right
<heat>
i like leaving params in
<heat>
because of that
<heat>
param names that is
<heat>
actually clangd seems to be struggling on that for function pointers, huh
<sham1>
Parameter names are as much a piece of the documentation as the function name or comments
<heat>
although sometimes confusing when it comes to line length, but usually i have clang-format enabled so that's no biggie
<sham1>
I don't know what I'd do without clang-format
<geist>
format your code?
<sham1>
Format manually? Like cave people?
<heat>
manually???
<heat>
preposterous
<geist>
yeah, like everyone before you that had toiled in the cave mines
<sham1>
I'd at least want indent(1)
<geist>
back in my day!
<heat>
omg GNU indent haha
<sham1>
GNU indent, BSD indent. Either way
<Ermine>
netbsd still has a file for it
<dh`>
which is probably wrong
<sham1>
At least you can have a config file for indent(1) so you could be fairly sure that it indents it properly regardless of the system
<dh`>
iirc the last time someone looked at indent it was all busted
<Ermine>
that said, one guy tried to push all changes needed to clang-format during some gsoc
<sham1>
Yeah, sadly kernel normal form isn't usable with clang-format
<dh`>
having used clang-format on one project, I really don't like it
<geist>
fwiw i've found astyle to be fairly useful
<geist>
somewhat more configurable with switches
<dh`>
autoformatting defeats the purpose of having formatting, which is to increase readability
<Ermine>
Maybe go's idea of enforcing style with gofmt is good
<sham1>
Meanwhile in Java: "Take this XML dump from Eclipse settings" and apply to burn area
<geist>
somewhat agreed, but really the point of formatting is not to increase readability, from what i discovered
<geist>
it's to put everyone on the same page
<sham1>
Well autoformatting is about putting everyone in the same page
<geist>
thats my long realization and what i had to eventually settle with at work, because google is so fixated on stuff like this
<dh`>
there's a tradeoff between uniformity and expressivity
<sham1>
Formatting is about readability. The machine doesn't care if you put all your tokens in one line
<geist>
i dont like it, but it *does* at least make arguing about it moot
<geist>
which i ... guess is useful
<dh`>
and autoformatting caters to the people who think it is only about uniformity
<geist>
correct. and at least at work, that's exactly what it is all about
<geist>
because clang format trashes expressions badly when it gets too long
<geist>
and i hate it, but it is what it is
<Ermine>
some formatting guidelines are useful on their own
<sham1>
Uniform formatting makes for more cohesive codebase
<dh`>
like, people I have run into who think that if you change your project's style guide you must immediately go massedit all 200000 lines of code or whatever to conform
<Ermine>
like not doing lines more than 80 chars long
<sham1>
Although some debates are just silly
* sham1
glares at tabs v spaces
<heat>
i find clang-format to sometimes be annoying but many more times to be incredibly useful and effective
<geist>
yup, we did it for fuchsia early on, so i at least jumped in line to to the 200k line format myself, so all the line changes go back to me :)
<dh`>
and who apparently bluescreen if faced with style rules like "don't change the indent width of files"
<sham1>
Clearly the correct option is the vertical tab
<geist>
agreed but also a battle i lost
<geist>
and eventually just settled on, if you hate tabs so much, then enjoy my 4 space indents, and if you dont like that? your fault for bitching about tabs
vinc has quit [Read error: Connection reset by peer]
<sham1>
I should probably just gist my .clang-format for my personal C stuff so I don't need to type it out every time
<dh`>
I occasionally get complaints about mixed tabs and spaces in the os161 tree and I always respond with "hard tabs are 8 spaces wide, fix your editor"
<geist>
that happened a bunch with early LK code where people were constantly bitching at me for using tabs
<geist>
i kept telling them that it was better, etc
<geist>
but i eventually just gave up and mass reformatted as 4 space indents
<geist>
and then at least a smaller set of people bitch about 4 spaces than tabs
<dh`>
and sometimes I get pushback along the lines of "if you strictly use tabs you can change the size to suit your personal preference"
<sham1>
Tabs for indent, spaces for alignment. When you do that, it doesn't matter how wide a tab is. Hell, it could even be the size of a space
<geist>
but i dont really care now, because my editor can deal with either
<dh`>
except it doesn't actually work
<geist>
that was really my experience
<geist>
it's fine for indents but the alignment thing falls apart over time
<geist>
OTOH, stuff like clang-format just kills whatever alignment you do at the end of the line anyway, so <shrug>
<dh`>
it doesn't even work for indents unless you're very careful
<sham1>
Although alignment is a sore point. For example, if you need to split an argument list over multiple lines, how does one align. To the right? Ew, no
<geist>
right so for personal stuff over the long term i settled on spaces as the only way to make it look like what i want
<dh`>
I have also settled on three spaces as the best size and that doesn't interact well with hard tabs
<heat>
why should i care about any of this when i can ctrl+s trigger clang-format and have it look kinda like i want to 96% of the time?
<geist>
but yeah i dislike a lot of code that mixes the two. a long time ago i set up my .vimrc to show tabs as a > character
<geist>
so i can see when they're mixed and it really really sticks out
<dh`>
because anywhere you've formatted things carefully to not be confusing clang-format will erase your work
<geist>
heat: sure. if you're comfortable with that then that seems like a good solution
<heat>
my biggest painpoint with clang-format is macros, because it really doesn't handle macros all that well
<geist>
it's mandated at work by gerrit nowadays so it's moot there
<heat>
c++ macros bad and all that
<dh`>
for work I set my emacs config to never write hard tabs (because ghc gets really angry if you let it) ... and this causes it to be unable to write makefiles correctly
<geist>
hah yeah i end up having to copy a tab from somewhere else
<dh`>
clang-format also has all kinds of exciting bugs, like it will sometimes reflow comments in really strange ways
<geist>
and then keep duping a line with a tab in it to edit
<dh`>
which means if your project endorses it you all have to use the exact same version and then when your distro has a different clang you have a problem
<geist>
what we do have at work that's kinda neat is our script that locally runs clang-format and the one in gerrit only runs it on lines that you modified in the CL
<geist>
so at least you dont get nailed with needing to reformat the entire file becaus eyou touched one line in it
<geist>
and that works fairly well in practice, since pretty much all the files are already basically formatted
<geist>
but mabe a few stragglers here and there
<geist>
there's a way to invoke clang format with a list of lines to consider
<dh`>
not to mention that if you always reflow comments before committing it routinely creates tons of extra changes that make the diffs unreadable
<sham1>
You can turn clang-format off for sections of code fwiw
<geist>
yeah for headers where some long table of things is there i frequently turn it off
<dh`>
like, you fix a typo like reename -> rename and it insists on repacking the line to
<dh`>
s/to//
<sham1>
So if you have an array for example with carefully typed things where being next to each other is significant, you can tell it to sod off
<sham1>
See: OpenGL context studf5
<dh`>
anyway I've found autoformatting to be a significant headache and in the course of using it I don't think it ever detected a single mistake or solved any real problem
<sham1>
Well emacs' cc-mode also is technically an autoformatter
<geist>
it's 100% social problems, it should never solve a technical issue
<dh`>
cc-mode is only advisory
<dh`>
though it's gotten a lot more aggressive over the years
<dh`>
in principle if you write something like if (foo); {
<dh`>
oops();
<dh`>
}
<dh`>
the autoformatter should catch it
<dh`>
but that doesn't actually happen in practice
<geist>
i dunno, i wouldn't consider that an autoformatter's job
<geist>
that's more of a lint/warning/etc compiler thing
<dh`>
it's about the only useful thing an autoformatter can actually do
<dh`>
oh, IIRC clang-format in particular also doesn't fix mistakes like char* foo
<geist>
clang-format *explicitly* says it doesn't dot hat and thats not its job
<geist>
it only adds and removes whitespace
<dh`>
and I'm aware that's doubtless because there's a sizeable community of people who think that isn't a mistak
<dh`>
e
<dh`>
that is whitespace!
<geist>
hmm?
<dh`>
char* foo vs. char *foo
<geist>
oh that, yep. well, that ship sailed a long time ago
<dh`>
it's still wrong!
<dh`>
oldmanyellsatsky.jpg
<geist>
that i made peace with
<dh`>
I have not, it's wrong for the horizontal groupings to not match the syntax
<geist>
that's a cloud i have ceased to be angry with, and i still write it the char *foo way, and clang-format 'fixes' it to conform to the style guide
CaCode has quit [Quit: Leaving]
<geist>
so in that case it does the job for me: means i dont have to personally type in the incorrect way, i let the computer do it for me
<dh`>
and the reason it matters is when people write char* foo, bar
<dh`>
and that does happen
<geist>
i 100% understand, but our style guide says do it the wrong way
<geist>
and now i at least dont have to type it that way
<dh`>
sigh.
<geist>
OTOH we also generally dont like multiple var declarations like that, which tends to avoid the problem
<geist>
or only in very trivial cases like int x, y;
<sham1>
You can tell clang-format to fix char* foo into char *foo
<dh`>
yes, that's one of the consequences, people become supertitious about declaring multiple vars because sometimes it doesn't work and they don't understand why
<geist>
sham1: we do, we have it set to fix it to the left, because that's what our style guide says
<heat>
dh`, clang-format fixes * alignment
<dh`>
er, superstitious
<geist>
but yes that's an option, i think it understands 3 modes: left, right, and whatever the file seems to use. the latter is some sort of fuzzy logic
<dh`>
hmm, I remember it not, must be confusing it with some other peeve
<heat>
no middle??? smh
<sham1>
That's just wrong
<heat>
char * foo;
<geist>
i think it defaults to fuzzy logic, which is maybe why you didn't see it change it
<heat>
it's lawful neutral
<bl4ckb0ne>
what do you want to do with hboot Ermine
<sham1>
At least putting the star at the type is meaningful even though it's wrong
<dh`>
(how do people who like to do it wrong write function pointers? char(* foo)()?
<geist>
i think no space there
<sham1>
Probably
<geist>
`char (*foo)()` i think
<sham1>
And if one puts it in the middle, char ( * foo)()
<dh`>
or maybe they just can't read/understand the syntax
<dh`>
oops
<dh`>
)
<sham1>
Consistent to a fault
<heat>
middle is perfect
<heat>
left sucks
<heat>
right also sucks
<heat>
one must not be too extreme
<sham1>
heat: do you dereference by doing * ptr
<heat>
obv
<geist>
but like i was saying before, *this* is actually where a autoformatter like clang-format is kinda nice. if your organization/project/etc has rules that you dont like but must abide by, let the formatter do it for you
<geist>
you can still write code in your native style, and just have the formatter fuck up your code before you commit it
<geist>
not ideal, but at least you dont have to do it
<sham1>
Well at least it's consistent. Declaration follows usage
<geist>
that's the silver lining as far as i'm concerned
<Ermine>
bl4ckb0ne: nothing, I just pointed at its efi headers
<dh`>
the project that was enforcing clang-format also hadn't caught up to reality on braces for single-line blocks and clang-format doesn't fix that up
<sham1>
geist: I assume that Google also mandates int& foo
<geist>
sham1: yes
<geist>
i still type it the other way, but clang format fixes it
<heat>
i do int& foo but int *foo
<heat>
shoot me
<dh`>
...
<sham1>
I also write references like pointers, because they have the same issues when you declare multiple in the same line
<sham1>
Well, whenever I program in C++ which is once in a blue moon
<heat>
im pretty sure int& is the canonical way to write references
<heat>
vs int *
<dh`>
so is char* in C++-land
<dh`>
I have no idea why
<sham1>
But when in Rome, int* foo
<dh`>
it still doesn't match the syntax
<sham1>
And thus int& bar
<sham1>
And int&& baz
<heat>
int&&& foobar
<sham1>
Don't give the C++ committee any more ideas
<heat>
&&& works
<geist>
i remember internally on some google mailing list Rob Pike wrote some long rant about the whole pointer alignment thing
<geist>
pretty good, but alas.
<heat>
not syntactically but you can copies of lvalues and shit AFAIK
<sham1>
Of course. I don't agree with Mr. Like on many things but he has a relatively nice C style
<heat>
mr like
<sham1>
Pike
<sham1>
Why was that autocorrected, I have no idea
<heat>
knob like and ryan bernieghan
goliath has quit [Quit: SIGSEGV]
<geist>
yeah met him once, he's an interestig guy
<sham1>
Doesn't use syntax highlighting
<sham1>
Although who am I to judge. I program in a monospaced Comic Sans
<bl4ckb0ne>
Ermine: those are nice headers, I like them
<bl4ckb0ne>
no gnu crap
<heat>
rob is younger but a few weeks ago i realized that we're not that far away from having all the UNIX oldies die off
<mcrod>
hi
<heat>
and hence lose heaps of knowledge and history
<sham1>
We already lost Ken
<heat>
no?
<heat>
we lost dennis
<sham1>
Err, Richie
<sham1>
Yes
<sham1>
Got my Bell Labs employees mixed up
<sham1>
Ken is still going
<bl4ckb0ne>
he has big kenergy
<bl4ckb0ne>
dmr did non
<mcrod>
eventually unix will die too
<mcrod>
and on that day I will cheer
<sham1>
I suppose that the heat death of the universe is as good a time as any
<heat>
mcrod, fuck you
<mcrod>
heat: fuck you too
<sham1>
Get a room
<heat>
8=====D fuck you mcrod
<mcrod>
yum
<sham1>
dnf
<dh`>
I don't use or like syntax highlighting
<mcrod>
now i know we're definitely talking about the old days.
<dh`>
the other day I was writing some python in an emacs instance I hadn't configured it all off yet
<dh`>
and the syntax highlighting it does for python is really weird
<dh`>
like words change color arbitrarily with no obvious pattern
<dh`>
super distracting and not the slightest bit helpful
<dh`>
neither does angry fruit salad increase readability
<heat>
"He was running introductory computer laboratory exercises for students and instructed the course attendees to send him an e-mail as a test, to which Tove responded with an e-mail asking for a date"
<heat>
holy cow linus has so much rizz
<heat>
he's rizzed up
LostFrog has quit [Read error: Connection reset by peer]
PapaFrog has joined #osdev
xelxebar has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
<mcrod>
heat: i'm at O&S
<mcrod>
fuck you
<mjg>
opearing & systems?
<mjg>
what kind of name is that
[itchyjunk] has quit [Ping timeout: 245 seconds]
psykose has joined #osdev
<mcrod>
no
<mcrod>
ornstein and smough
<mcrod>
also known as the two biggest fucking assholes i've ever seen in DS1 so far
Turn_Left has joined #osdev
<mcrod>
how the fuck am I supposed to beat these guys
<psykose>
with skill
wblue has joined #osdev
<Ermine>
so heat, onyx kernal is multiboot2 right?
Left_Turn has quit [Ping timeout: 260 seconds]
<heat>
Ermine yas
<heat>
mcrod separate the bastards
andydude has joined #osdev
<mcrod>
i am
<mcrod>
but then ornstein fucking teleports
duderonomy has quit [Ping timeout: 244 seconds]
<mcrod>
you know what's slightly annoying, unrelated to dark souls
<mcrod>
it seems that you absolutely cannot use directx from C without some massive pain
<psykose>
that still sounds like dark souls
<mcrod>
directx boss fight?
[itchyjunk] has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
Burgundy has quit [Ping timeout: 264 seconds]
<bl4ckb0ne>
hi psykose
<bl4ckb0ne>
can i pat you
<psykose>
don't you already have kids to pat
<bl4ckb0ne>
yes but i have lots of pats available to share