klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
stilicho has joined #osdev
TaelTydes has quit [Remote host closed the connection]
stilicho57 has joined #osdev
gog has quit [Quit: byee]
Lucretia has quit [Read error: Connection reset by peer]
dra has joined #osdev
TaelTydes has joined #osdev
eddof13 has quit [Quit: eddof13]
stilicho has quit [Quit: Client closed]
<kof673> you are likely better off making your own, but https://archive.org/details/floppinux_0.2.1 https://archive.org/stream/floppinux-manual/floppinux-manual_djvu.txt qemu wants pentium2 (busybox) and 24M ram or so .........upx cuts busybox in about half, and with a 2nd floppy, could surely fit a toolchain and perhaps openssh and whatever else in there :D
<bslsk05> ​archive.org: Full text of "FLOPPINUX 0.1.0 Manual"
dra has quit [Ping timeout: 248 seconds]
<kof673> by toolchain i mean non-gcc, tinyc or smallerc or ack.....one of the budget compilers lol
<kof673> upx works wonders
surabax has quit [Quit: Leaving]
edr has quit [Quit: Leaving]
<heat> annoyance of the day: nvcsw and nivcsw
Arthuria has joined #osdev
Yoofie646446 has quit [Read error: Connection reset by peer]
Yoofie6464463 has joined #osdev
Yoofie6464463 has quit [Read error: Connection reset by peer]
<nikolar> what are those heat
<heat> exactly.
<heat> number of voluntary context switches and number of involuntary context switches
<heat> BSD naming at its finest
<heat> (struct rusage members)
<geist> yes but `sysstat -vmstat 1` is all worth it
<geist> `systat -vmstat 1`
<heat> geist yearns for the observability
<geist> it doesn't work unless you can observe it, indeed
<geist> i think top was like the 2nd thing i wrote in newos when i got it working
<heat> i still dont have top :p
<zid> heat still a bottom
<heat> i would like to have it but it requires procfs to be fully nailed down
<heat> and it isn't right now
<kof673> i sometimes do names like that but that is because c89 maybe gives you 7 or 8 siginificant chars for externally-visible symbols lol
<kof673> *significant. not sure if/why bsd would do that :D
<kof673> and ....filesystem too..what does fat16 offer?
levitating has quit [Remote host closed the connection]
<kof673> what i really would like to know, is how many symbols are guaranteed, if any. 2000? 5000? 10000?
<kof673> i have considered combining functions lol
Arthuria has quit [Ping timeout: 252 seconds]
Maja_ has quit [Ping timeout: 248 seconds]
sdomi has quit [Ping timeout: 248 seconds]
sdomi has joined #osdev
kof673 has quit [Ping timeout: 240 seconds]
stilicho57 has quit [Quit: Client closed]
mpetch has quit [Quit: Leaving]
kof673 has joined #osdev
<ring0_starr> kof, long file names are available on any FAT variant
<ring0_starr> and are optional on all
stilicho has joined #osdev
<kof673> sure, i am talking in bsd era 1985 . not that i believe they cross-compiled from dos...........
<kof673> did they purposely use short names to be cute, or was there a real reason? i don't know
<kof673> what does the old unix c compilers give you? </rhetorical>
<kof673> i just don't think it was a bsd thing..............compiler or something maybe limited it.......or they picked up the "habit" just in case
<kof673> again, even c89, still did not guarantee more than 7 or 8 chars for symbols
stilicho has quit [Quit: Client closed]
<kof673> but because so many compilers go above and beyond what the standard "requires", people may not be aware :D
<kof673> passwd still had a gecos field or whatever........unix picked up ideas from who knows where.............
<kof673> does posix even say you get a certain number of chars for function names in a c implementation lol
<kof673> they surely exceed that, but .........where is it written?
<kof673> there is not a define MAX_SYMBOL_NAME_LENGTH to my knowledge :D
craigo has joined #osdev
Yoofie6464463 has joined #osdev
<kof673> i was not around then, but if you look at 1988 dos C code or whatever, i would not be surprised to see short names too..........
<kof673> if this is modern code...that is different :D
<geist> it's probably been extended at least to 32 or so
bauen1 has quit [Ping timeout: 245 seconds]
<kof673> lol
<kof673> i'm not saying you should do that but.......what were they thinking in 1985? may have been normal depending on when the code was written...
craigo has quit [Ping timeout: 248 seconds]
Gooberpatrol66 has quit [Quit: Konversation terminated!]
the_oz_ has quit [Ping timeout: 276 seconds]
Jaiza has joined #osdev
netbsduser` has joined #osdev
<ring0_starr> holy shit
<ring0_starr> void foo(); void bar(); (foo, bar)();
<ring0_starr> why is this valid..
<ring0_starr> i feel as though this should not be valid
<geist> wat
<geist> is it an empty arg passed to two functions in a comma operator?
<ring0_starr> the fact that a comma operator is allowed in that expression
<bslsk05> ​godbolt.org: Compiler Explorer
<geist> you are correct though
<geist> looks like it's calling bar and not foo
<ring0_starr> as per c99 6.5.17
<geist> yah it may be bar(), then just a plain foo pointer?
<ring0_starr> 6.5.17.2
<ring0_starr> it just feels wrong though
<ring0_starr> > The left operand of a comma operator is evaluated as a void expression; there is a
<ring0_starr> sequence point after its evaluation.
<geist> clang takes it but warns that the left side of the comma operator has no effect
<ring0_starr> the syntax for the comma operator says it's expression, assignment-expression
<geist> i guess that makes sense. (x, y, z) -> z from an expression point of view
<ring0_starr> yeah I learned about this by looking at a macro in OpenSSL and going "WTF" for a full 5 minutes
<geist> so (x, y, z) is, z(); x; y;
<geist> or something
<ring0_starr> it's like if you don't explicitly prevent something from being valid, it'll be abused in the most creative way possible
<ring0_starr> assignment-expression is defined as: conditional-expression, or unary-expression assignment-operator assignment-expression. okay, didn't know about the first one
<geist> i'll have to riddle roland at work tomorrow and see if he gets it on the first time
<geist> he knows a lot of eccentric stuff in the language
<ring0_starr> and conditional-expression is literally just a daisy chain of definitions for OR and AND expressions
<ring0_starr> so they've somehow defined the comma operator to be basically everything by passing the buck along to another expression type
netbsduser` has quit [Ping timeout: 245 seconds]
<geist> but yeah, (foo, bar()) seems right
<geist> which of course actually does also work
vdamewood has quit [Quit: Life beckons]
<ring0_starr> and i feel like the way expressions are daisy-chain defined in C is kind of an abuse of ebnf
bauen1 has joined #osdev
<ring0_starr> just my opinion though
<ring0_starr> expression ought to be defined top down heirarchically
Yoofie64644634 has joined #osdev
Yoofie646446349 has joined #osdev
Yoofie6464463 has quit [Ping timeout: 248 seconds]
Yoofie646446349 is now known as Yoofie6464463
Yoofie64644634 has quit [Ping timeout: 252 seconds]
Yoofie64644631 has joined #osdev
Yoofie6464463 has quit [Ping timeout: 252 seconds]
Yoofie64644631 is now known as Yoofie6464463
Jaiza has quit [Read error: Connection reset by peer]
Jaiza has joined #osdev
rorx has quit [Ping timeout: 248 seconds]
<kof673> eh, it makes sense. (foo, bar, baz) it gets a pointer, the end result is baz in this case, then baz() is invoked. x = ( foo(), bar(), baz() ); x = ( foo, bar, baz )(); by making foo()/bar()/baz() output you can see the former calls them just fine, return value is of baz(), while the latter only calls baz()
<kof673> (stuff_inside_parens) .........gets handled first......
<kof673> (foo, bar, baz)() of course. it just does the left () first
rorx has joined #osdev
goliath has joined #osdev
<ring0_starr> if , were the composition operator it'd look kinda mathy
<ring0_starr> (f * g)(x) == f(g(x))
<ring0_starr> not that I want my C to try to look like math
<kof673> i have seen some compiler be picky about *fp fp() (*fp)() whatever but do not recall
<kof673> had to fix code or make an ifdef
<geist> yeah you're right. i basically never use comma operators so i always have to look it up every time
<kof673> don't listen to me, just i think that is what is going on........
<kof673> "you only *think* you know" i only *think* i know
<ring0_starr> but anyway about the short identifiers bit
<ring0_starr> creat(2)
<ring0_starr> that's 5 chars
<ring0_starr> > <kof673> did they purposely use short names to be cute, or was there a real reason? i don't know
<kof673> i'm not defending it lol
<ring0_starr> > The implementation
<ring0_starr> may further restrict the sipniticance
<ring0_starr> of an
<ring0_starr> and uppercase letters are different.
<ring0_starr> euernal name (an identifier ,that has external linkape) to six characters and may ignore
<ring0_starr> These limitations
<ring0_starr> on identifiers
<ring0_starr> are all
<ring0_starr> distinctions
<ring0_starr> of alphabetical
<ring0_starr> case for such names.”
<ring0_starr> ok didn't mean to paste all those \ns
<kof673> that's even worse lol
<ring0_starr> the limit says 6! 6! and creat uses 5 only
<ring0_starr> I believe one of dennis ritche's famous last words before he died were "I regret not spelling creat with an e". Literally
<kof673> i got the 8 and 7 from filenames then...there was some filesystem that was 7.3 i believe
<kof673> not c-related
<kof673> probably not a real concern for that, just cat everything into one giant file or whatever and name it x.c
<ring0_starr> woah, my pdf reader really butchered that line of text
<ring0_starr> sip niti cance
<ring0_starr> euernal!
Leftas has quit [Ping timeout: 252 seconds]
GeDaMo has joined #osdev
<ring0_starr> but anyway, kof, look at UNIX System III, src/uts/pdp11/os/main.c - it has identifiers like "firstaddr" (9 chars) so clearly they can make names legible if they want to (and there's no external linkage requirement)
<kof673> gimme a link :D i think local vars, structure names, limit is much longer........it is global variables, function names, the limit IIRC
<kof673> or, it is really a linker somewhere why the limit was made maybe..........
<ring0_starr> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/uts/pdp11/os/main.c
<bslsk05> ​www.tuhs.org <no title>
<kof673> that is just local argument name though isn't it :D this isn't that important :D
<kof673> k&r-style ..........
<ring0_starr> https://www.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/cmd/ld/ld.pdp.c
<bslsk05> ​www.tuhs.org <no title>
Leftas has joined #osdev
<ring0_starr> struct symbol {
<ring0_starr> charsname[8];
<geist> i was thinking there was some sort of issue/etc with 12 and 18 bit machines that were using 6 bit alphanumerics, and the desire to fit them in a word
the_oz has joined #osdev
<kof673> that would make sense too........except how much C ran there?
<geist> i know pdp-8 had 12 bit numbers so it tries to generally fit two per, though unix never ran there
<geist> but i think pdp7 or so was one of the first, and it may have been an 18 bit machine
<geist> in that case two words gets you 6 characters
<geist> if using upper case only, etc
<geist> maybe not a C thing but may have affected the design of B and then held over
<geist> or something like 5 chars and a null (creat, open, close, etc) would fit in 2 words
msv has quit [Ping timeout: 248 seconds]
<bslsk05> ​www.tuhs.org <no title>
<ring0_starr> you have to talk to DMR himself before using the --o flag for ld
<kof673> i do 7 or 8 sometimes, but .....probably only thing i will ever actually meet is whatever the pdp10 gcc toolchain uses to assemble on the tops-20 side............or there is emulator for multics now, but not exactly high priority........
<ring0_starr> unix version 1 has identifiers longer than 8 definitely
<ring0_starr> unfortunately it doesn't look like the source for v1's ld is available
<kof673> i am speculating, i mean not sure i can even get my hands on a toolchain where that is an issue.....
<ring0_starr> it would be interesting to see where that comes from
<kof673> AFAI am concerned, it is just getting enough to write a virtual machine/scripting language/etc. and that it does not matter
<kof673> *and then it does not matter. but a place like that, how much ram do you even have?
<ring0_starr> idk
<ring0_starr> interesting to note that C99 removes the specific verbiage specifying limitations on identifier lengths
<ring0_starr> just deferring to "some implementations may be more restrictive"
<ring0_starr> the 6 character limit is only a C90 thing, something i'd interpret as a lower bound in any implementation.
<ring0_starr> oh actually im wrong, they just redirect you to 5.2.4.1 in C99, the 6 char hard lower bound is still there. interestingly though, it says this: "each universal character name specifying a short identifier of 0000FFFF or less is considered 6 characters" note that 0xFFFF is 0177777
Lucretia has joined #osdev
monkeyPlus has joined #osdev
msv has joined #osdev
Jaiza has quit [Ping timeout: 252 seconds]
Jaiza has joined #osdev
bauen1 has quit [Ping timeout: 246 seconds]
d1rg3_ has quit [Ping timeout: 244 seconds]
Jaiza has quit [Read error: Connection reset by peer]
Jaiza has joined #osdev
Jaiza has quit [Read error: Connection reset by peer]
Jaiza has joined #osdev
Jaiza has quit [Read error: Connection reset by peer]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
d1rg3_ has joined #osdev
d1rg3_ has quit [Read error: Connection reset by peer]
Jaiza has joined #osdev
<zid> excuse me
<zid> where is nikolar
<zid> I have misplaced him
<nikolar> here!
bauen1 has joined #osdev