00:00:13 -!- FreeFull has quit.
00:03:36 <int-e> shachaf: I'm not sure about whether it's *too* much. :P
00:04:06 -!- oerjan has joined.
00:05:36 <Lykaina> just backed up echidna-uno
00:06:19 <HackEso> real: 0m0.000s, user: 0m0.000s, sys: 0m0.000s \ Thu Sep 19 00:06:19 UTC 2019
00:06:35 <fizzie> The empty command: it's fast.
00:06:47 <shachaf> Running commands isn't that fast.
00:07:13 <Lykaina> takes several seconds to compile echidna
00:11:30 <HackEso> /srv/hackeso-code/multibot_cmds/lib/limits: line 5: exec: datereal0m0.901s: not found
00:13:34 * oerjan scrolls a bit in the logs and notices someone called PaniniTheDevelop
00:13:54 <oerjan> i'm now hoping for a sanskrit-grammar-based esolang
00:14:11 * oerjan won't read all the logs these days, alas
00:15:11 <Lykaina> the one i do most my coding on
00:16:21 <oerjan> i don't know, i'm about a month backlogged, although it's still alive
00:16:33 <oerjan> make that 1 month 11 days
00:17:04 <oerjan> where i'm at they were doing a Birthday Tournament based on the Fantasy Rules Committee
00:17:49 <oerjan> and trying to clear up bugs for a broken space minigame
00:19:02 <Lykaina> but i need to find out if any of my email addresses are still receiving stuff
00:19:06 * oerjan is actually trying to read _that_ log, but has about 450 messages left
00:19:58 <shachaf> So is there a nomic-style thing based on something computer-interpretable which is good?
00:20:16 <int-e> oerjan: are you adding messages to the log faster than you read them?
00:20:53 <oerjan> shachaf: i don't know but i had some fun in schemenomic way back
00:21:40 <oerjan> int-e: not on average but i go several days between binges
00:21:50 <oerjan> well, it's about the same days i'm on irc
00:27:41 <oerjan> once again schlock mercenary (from yesterday) triggers my fridge logic: what's to prevent the pa'anuri from obliterating the station with their long gun the moment they notice it's been retaken?
00:28:18 <oerjan> unlike the ship, it's unlikely to be able to do massive evasion maneuvers
00:31:22 -!- Cale has quit (Remote host closed the connection).
00:31:50 <int-e> oerjan: nothing? it is a great risk :P
00:32:48 <int-e> (I don't know where Howard Taylor is going with this atm. My thought was that if you want to kill off a nigh-indestructible amorph, this is one way to do it.)
00:33:02 -!- arseniiv has quit (Ping timeout: 276 seconds).
00:33:22 <oerjan> he's been killed off before, restored from backup
00:33:30 <oerjan> and these days everyone has backups
00:33:36 <int-e> Yeah that's the hole in my idea.
00:33:49 <int-e> Maybe the backup servers... but those have never been talked about.
00:34:23 <oerjan> i hope they do multiple redundancy.
00:35:35 <int-e> This is the last book... will he bring up old, forgotten lore? Gate keepers, attorney drones (too bad about that contract)...
00:36:15 <oerjan> and it's not clear how distributed they are. many people might not want Petey / the Oafans to have that complete control so maybe they have their own servers.
00:36:28 <int-e> Anyway. I like the characters, I've always liked the grand scheme of things so far... I forgive the details :)
00:36:54 <int-e> I'll wait to see where this is going.
00:37:00 <oerjan> another fridge logic: _if_ petey controls all the backups then he could essentially do the Gatekeeper scheme without killing people
00:37:45 <int-e> But he's benevolent... right?! :P
00:38:11 <oerjan> i'm hoping to see Pa'anuri talk at some point. for other enemy races, tayler has pretty much always shown that not everyone is evil, but not for the pa'anuri.
00:39:11 <int-e> Again, I'm happy to wait and see.
00:39:15 <oerjan> well maybe not always. but often.
00:39:41 <int-e> . o O ( attorney drones are another exception :P )
00:39:46 <oerjan> i'm thinking there are so many loose ends, how can they possibly fit in one book.
00:39:57 -!- Cale has joined.
00:40:22 <int-e> I suspect some loose ends will be left behind for good.
00:40:28 <int-e> Especially from the early books.
00:45:15 <int-e> In the meantime I'm wondering who exactly the attacker in GG is. (Is it Lucrezia? Is it a van Rijn clank?)
00:45:35 <oerjan> i thought it was pretty clearly lucrezia
00:45:48 <oerjan> she admits to having killed Queens before, after all
00:46:01 <int-e> It's just... time travel is so weird.
00:46:38 <oerjan> and she can hop bodies too
00:46:41 <int-e> But yeah maybe for this particular question I'm just stupid.
00:47:09 <oerjan> i'm also wondering whether she's organic or a clank, though, the color is a bit ambiguous
00:52:18 <oerjan> lucrezia's time travel appears to be of the novikov self consistency principle kind, which is still mind bending but a bit saner than rewriting timelines
00:54:32 <oerjan> incidentally, that purple extradimensional gentleman apparently has a name that is only visible in the chapter selection menu
00:54:53 <oerjan> (although people on the girl genius wiki have picked it up)
01:06:21 -!- imode has quit (Ping timeout: 268 seconds).
01:13:30 <b_jonas> "This is the last book..." => ah yes. and it's the last book of OotS too. it's crazy how far we've gone. we've been reading it for a while.
02:11:03 -!- Phantom_Hoover has joined.
02:52:34 -!- imode has joined.
03:17:02 -!- Phantom_Hoover has quit (Ping timeout: 265 seconds).
03:17:35 <Lykaina> b_jonas: does this have enough from echidna? http://sif.lesidhetree.com/sara/echidna/echidna-uno-doc.pdf
03:18:25 <Lykaina> oh, 256 1-byte memory on this one
03:41:00 <Lykaina> correction: http://sif.lesidhetree.com/sara/echidna/echidna-uno-doc_1.pdf
04:26:23 -!- tromp_ has quit (Remote host closed the connection).
04:27:22 -!- oerjan has quit (Quit: Nite).
04:37:26 -!- Lord_of_Life has quit (Ping timeout: 276 seconds).
04:38:36 -!- Lord_of_Life has joined.
05:09:10 -!- tromp has joined.
05:13:50 -!- tromp has quit (Ping timeout: 276 seconds).
06:15:13 <Lykaina> correction: http://sif.lesidhetree.com/sara/echidna/echidna-uno-doc_0002.pdf
06:15:47 -!- rodgort has quit (Quit: Leaving).
06:20:00 -!- rodgort has joined.
06:21:46 -!- Lykaina has quit (Quit: leaving).
06:47:42 -!- tromp has joined.
06:49:35 -!- tromp_ has joined.
06:53:56 -!- tromp has quit (Ping timeout: 276 seconds).
07:05:37 -!- Lord_of_Life has quit (Read error: Connection reset by peer).
07:10:35 -!- Lord_of_Life has joined.
07:39:55 -!- b_jonas has quit (Remote host closed the connection).
08:04:15 <esowiki> [[User talk:Fizzie]] N https://esolangs.org/w/index.php?oldid=66249 * YamTokTpaFa * (+365) /* Requesting to install Extension:Math to this wiki */ new section
08:05:12 <esowiki> [[Totally Accurate Malbolge]] https://esolangs.org/w/index.php?diff=66250&oldid=55343 * YamTokTpaFa * (+29)
08:05:41 <esowiki> [[Cubestate]] https://esolangs.org/w/index.php?diff=66251&oldid=53053 * YamTokTpaFa * (+24)
08:09:27 -!- imode has quit (Ping timeout: 265 seconds).
08:10:22 <esowiki> [[Template:Disambig]] https://esolangs.org/w/index.php?diff=66252&oldid=30340 * YamTokTpaFa * (+160)
08:10:38 <esowiki> [[Template:Disambig]] M https://esolangs.org/w/index.php?diff=66253&oldid=66252 * YamTokTpaFa * (-1)
08:13:50 <esowiki> [[Esolang talk:Introduce yourself]] N https://esolangs.org/w/index.php?oldid=66254 * YamTokTpaFa * (+255) /* Shall we archive this project page regularly? */ new section
08:14:56 <esowiki> [[Mindcrush]] https://esolangs.org/w/index.php?diff=66255&oldid=40559 * YamTokTpaFa * (+60)
08:15:24 <esowiki> [[Codesine/implementation]] https://esolangs.org/w/index.php?diff=66256&oldid=44357 * YamTokTpaFa * (+30)
08:28:06 -!- cpressey has joined.
08:28:35 -!- Phantom_Hoover has joined.
08:42:35 <esowiki> [[FISHQ9+]] https://esolangs.org/w/index.php?diff=66257&oldid=53379 * Dtuser1337 * (+4) /* C */
08:52:43 -!- tromp_ has quit (Remote host closed the connection).
08:54:13 -!- tromp has joined.
08:56:26 -!- tromp_ has joined.
08:59:13 -!- tromp__ has joined.
08:59:23 -!- tromp has quit (Ping timeout: 276 seconds).
09:00:39 -!- tromp_ has quit (Ping timeout: 252 seconds).
09:04:35 -!- tromp__ has quit (Ping timeout: 276 seconds).
09:12:47 -!- tromp has joined.
09:18:29 <esowiki> [[User talk:Fizzie]] https://esolangs.org/w/index.php?diff=66258&oldid=66249 * Fizzie * (+901) /* Requesting to install Extension:Math to this wiki */ Thoughts.
09:20:56 -!- ais523 has joined.
09:25:10 <ais523> fizzie: "0b10" is a pp-number (n1570 6.4.8p1), thus by 6.4p4 parsing it as "0 b 10" is not allowed; so this is a syntax error as there's no valid parses
09:25:38 <ais523> there's a nice example in 6.4p5 that specifically talks about this case, and it's compared to the example of x+++++y (which is also a syntax error)
09:25:58 <ais523> although I guess this is more about lexing than parsing
09:27:23 <ais523> now, you can certainly make a reasonable argument that pp-numbers shouldn't allow random letters embedded in them, but they dod
09:28:31 <fizzie> ais523: Oh, I didn't notice it has got /identifier-nondigit/ in it.
09:28:37 <ais523> hmm, re the discussion of time(1): how does that command actually work? what's the API for timing commands?
09:29:01 <fizzie> I just saw it's got special formats for e, E, p, P and thought it'd be an exhaustive list.
09:29:16 <ais523> e, E, p, P are the only letters that bridge a sign to their right
09:29:29 <ais523> other letters are allowed but don't incorporate a + or - to their right as part of the number
09:29:34 -!- wib_jonas has joined.
09:30:15 <ais523> hmm, this reminds me of a huge annoyance I have with languages that allow - in identifiers
09:30:33 <ais523> the problem is that identifiers then end up with a random mix of hyphens and underscores in and it's hard to remember which to use
09:30:35 <wib_jonas> ais523: that is at least more consistent with C++'s relaxed rules, which allow most combinations of numbers and letters as a token lexed to a user-defined literal
09:30:42 <fizzie> By the way, the context for this was whether GNU C (with -fno-gnu-keywords, otherwise it's clear) is a superset of C in the sense that all strictly conforming programs behave the same.
09:30:48 <ais523> if a language allows hyphens in identifiers, it should probably ban underscores, and vice versa
09:30:49 <wib_jonas> (and their more relaxed rules for string literals and character literals)
09:30:59 <wib_jonas> this way we can have one preprocessor that works for all language variants
09:31:24 <ais523> ah right, the preprocessor is meant to be the same between C and C++, isn't it?
09:31:24 <fizzie> I was reading through the extensions and landed on binary literals in the hopes of making those valid, but looks like the pp-number thing precludes that.
09:32:11 <ais523> in C89/GNU89, you can use // comments to tell the two languages apart using the //*…*/ trick
09:32:38 <ais523> oh, there's also the extern inline thing
09:32:39 <wib_jonas> ais523: I think the opposite way, a language should allow hyphens, underscores, and one or two more characters in identifiers, because that way you can conveniently put base64-encoded stuff into generated identifiers, and still have a delimiter
09:33:01 <wib_jonas> but of course printable ascii characters are sparse, so this may not be practical in some languages
09:33:02 <ais523> but maybe -fno-gnu-keywords would disable that? logically it should
09:33:33 <wib_jonas> and hyphens are already used for other meanings in C and many languages, so we shouldn't allow hyphens in particular
09:33:38 <fizzie> ais523: I think it disables 'inline' in C90 mode.
09:33:42 <ais523> isn't that just an argument for allowing two punctuation marks as part of an identifier?
09:33:56 <ais523> many languages have that, the most common choices being $ and _
09:33:57 <shachaf> Do you think languages should allow spaces in identifiers, like ALGOL 68?
09:34:21 <ais523> shachaf: oddly the use of _ within identifiers may have indirectly come from ALGOL 68
09:34:27 <wib_jonas> ais523: yes, it doesn't need to be hyphen specifically, though there's some precedent for hyphens
09:34:45 <ais523> in ambiguous situations you used a leading . to mark something a keyword and leading or trailing _ to mark something as an identifier
09:34:51 <wib_jonas> there's also precedent for not allowing hyphens, but allowing _ @ $ . and I think one more in assembly syntax
09:34:57 <ais523> and with two-word identifiers it was usual to put the _ between the words to mark them both as identifiers
09:35:16 <wib_jonas> though this is used more on windows
09:35:27 <ais523> wib_jonas: it makes a lot of sense for asm to allow at least one character the source language doesn't
09:35:31 <ais523> so that you can generate temporary identifiers
09:35:40 <wib_jonas> ais523: yes, or mangled identifiers
09:36:03 <ais523> some languages allow arbitrary strings as identifiers, but you can't write them literally in source code
09:36:11 <wib_jonas> but on the other hand, it also makes sense to allow that character in the source language, possibly with some escaping, but heavily discourage using it in production, because it may clash with temporary or mangled identifiers,
09:36:24 <ais523> there's some escape syntax, normally similar to that for strings but with a different delimeter
09:36:36 <myname> ais523: afaik php does that
09:36:47 <wib_jonas> so that if you _really_ want to, you can write C code that directly refers to C++ identifiers, even if they're mangled the windows way with @ signs, rather than the unix way with ZZ prefix
09:37:01 <myname> like, you can happily define $GLOBALS[""] but you cannot access it via $
09:37:03 <wib_jonas> we already have this working as the de facto way to access fortran identifiers from C
09:37:46 <ais523> VHDL actually disallows two consecutive underscores from appearing anywhere in an identifier
09:37:48 <shachaf> ais523: Was this on plaforms that didn't support bold keywords?
09:37:51 <ais523> presumably for this sort of reason
09:37:54 <ais523> shachaf: i.e. all of them
09:37:58 <wib_jonas> "arbitrary strings as identifiers, but you can't write them literally in source code" => yeah. perl allows arbitrary or almost arbitrary strings, definitely much more freely than the ordinary identifier syntax
09:38:12 <wib_jonas> and in fact this is used for some internal hidden stuff, although somewhat inconsistently
09:38:13 <ais523> "keywords in bold, identifiers in italic" is the "official" definition of the language but nobody actually stores programs like that
09:38:18 <shachaf> Should I support spaces in identifiers?
09:39:51 <wib_jonas> https://sourceware.org/binutils/docs-2.32/as/Symbol-Intro.html#Symbol-Intro says that gas allows $ _ . as punctuation
09:40:07 <wib_jonas> details depend on the architecture conventions
09:41:03 <wib_jonas> shachaf: that too depends on the language. in some languages it makes sense, in others it doesn't. it can also make sense to allow but _ignore_ spaces in identifiers.
09:41:42 <ais523> wib_jonas: :: and ' are treated as synonymous inside an identifier
09:42:10 <wib_jonas> ais523: IIRC only if you use symbolic references, not if you access the symbol table directly
09:42:26 <wib_jonas> also :: is special because it delimits packages
09:43:33 <ais523> if you're accessing the symbol table directly, is it even an identifier any more?
09:44:48 <ais523> anyway, ${":'::"} and ${"::':"} turn out to be different variables (the latter is the same variable as ${":::::"})
09:45:01 <wib_jonas> also :: is special because it delimits packages
09:45:10 <wib_jonas> `perl -e $f::g = 3; $t = 4; $u = 5; $::{"f::g"} = *t; $::{"f'g"} = *u; print join(",", ${"f::g"}, ${"f'g"}, ${$::{"f::g"}}, ${$::{"f'g"}});
09:45:29 <wib_jonas> ^ right. though I think a few of the rules have changed at some point after perl 5.12
09:45:40 <ais523> yes, I know, ' is special for the same reason
09:45:57 <ais523> this is mostly useless in modern Perl, but it has lead to some interesting modules like ACME::Don't
09:46:04 <fizzie> Ah, the T_PAAMAYIM_NEKUDOTAYIM token.
09:46:37 <fizzie> I think they at least changed the error message to no longer say that in PHP, and added T_DOUBLE_COLON as an alias for the token.
09:46:56 <ais523> is there an explanation for why it was in Hebrew in the first place? IIRC the other tokens weren't
09:46:58 <wib_jonas> ais523: yeah, maybe it doesn't count as an identifier then, I don't know. the symbol table still doesn't behave like an ordinary hash, but its keys mostly do, only its values don't
09:47:07 <ais523> …did PHP's parser use strlen for hashing too? :-D
09:47:40 <fizzie> I think it was in Hebrew just as a little easter egg about the developers.
09:50:27 <ais523> (the reason PHP's built-in functions are named so inconsistently is that they used to be hashed using strlen, and thus needed a wide distribution among the possible names)
09:51:38 <shachaf> One odd thing is that "nekudatayim" would be a more correct transliteration.
09:52:56 <myname> one of my favorite php bugs was that matching for class names or interfaces is made on lowercase of the name. this results in class Foo implement BarInterface not working on turkish locales because lowercase will result in a small i without a dot which does not match the small i with the dot that it's matched against
09:54:45 <wib_jonas> myname: right. which is why compilers shouldn't care about the locale, not even as much as javac does, to decide what encoding to decode string literals from
09:55:29 <ais523> if a program uses locale-sensitive operations (e.g. is written case-insensitively), it should have an explicit locale declaration, just like programs typically have an explicit encoding declaration
09:56:17 <wib_jonas> also excel cares about the number and date formats that are set globally to the user, so some more obscure things that you can do with macros (that effectively eval a formula) will break if you use the spreadsheet on a machine with different settings,
09:57:22 <ais523> it's a very common mistake to use an IO routine intended for human-readable numbers on machine-readable numbers or vice versa
09:57:27 <wib_jonas> because on locales with dot as the decimal separator, dot is parsed as decimal point, comma as argument separator, and semicolon as magic; on machines with comma as the decimal point, comma is parsed as decimal point, semicolon as function argument separator, and backslash as magic.
09:57:53 <wib_jonas> and these stupid industry systems that we use at work are even worse in this respect, depending on the global locale, as well
09:58:15 <wib_jonas> though not quite in the way that excel is, they depend on the locale in different ways
09:58:37 <wib_jonas> but the end result is also that you sometimes have to set global locale settings to be able to run a program
10:02:12 <ais523> the locale settings for a program should in theory tell it how to interact with the user and the user's files, terminals, etc.
10:02:25 <ais523> so that means you need two different APIs, one for the user's files, one for the program's own files
10:02:32 <ais523> but this is a distinction that not enough languages draw
10:02:45 <ais523> and most that do, don't draw in a useful manner
10:03:09 <ais523> (Java, for example, has a concept of a "program's own files" when working out the security implications of opening a file, but this doesn't extend to encoding/locale as far as I know)
10:05:20 <wib_jonas> there's also the strange but tolerable results that you get on windows when a program uses a stock message box and the message in it is in a different language than the captions of the "Yes" and "No" buttons, because the latter come from windows's message language, the former from the program's
10:07:20 <ais523> right, the Windows library has an API for "show me a dialog box with yes/no buttons" that's orders of magnitude easier to use than a custom dialog box would be
10:07:30 <ais523> so that helps to get the dialog boxes standardised
10:07:51 <ais523> (arguably it'd make sense to have an API for "show me a dialog box with n buttons, here's the text to show on them" but last time I checked, it didn't)
10:08:08 <shachaf> I wish platform APIs were much simpler, with things like that moved into a standard library that you can link if you want.
10:08:10 <wib_jonas> Luckily I finally managed to get a configuration of windows at work where the message language of every program is english, even that of office and firefox. Though firefox breaks that config once every few years.
10:08:59 <ais523> I assume your workplace normally uses Hungarian?
10:09:13 <wib_jonas> So I only get mixed language stuff on machines other than my main one, though I do have to touch other machines (by remote access) often.
10:09:31 <wib_jonas> ais523: yes, or at least mixed hungarian and english, because many programs aren't localized to hungarian
10:10:25 <ais523> surely the appropriate fallback for programs with no hungarian localisation would be Finnish? ;-)
10:10:35 <wib_jonas> mind you, windows 10 sort of requires you to install the message localization of windows in order to be able to use hungarian keyboard layout, even when that's not the primary keyboard layout. so I do have a full copy of hungarian messages on windows on the hard disk.
10:11:45 <wib_jonas> ais523: they don't have localization in finnish too. they're Siemens programs, they sometimes have parts that are accidentally localized only in german, not in english, or that can be switched to english but default to german, or where a list in the english help file is sorted by the german order.
10:11:47 <HackEso> /srv/hackeso-code/multibot_cmds/lib/limits: line 5: exec: òh: not found
10:11:49 <ais523> I guess Hungarian isn't /that/ hard to type on a UK keyboard (at least under X/Gnome)
10:12:13 <shachaf> I use the keyboard layout US International (AltGr deadkeys)
10:12:25 <shachaf> It's great. Everyone should have an AltGr key.
10:12:27 <ais523> myname: Hungarian has a double acute, which is basically an acute and umlaut at the same timee
10:12:52 <myname> i have no idea on how to pronounce that, but i like it
10:12:54 <ais523> although the "acute" is more of a length mark, the macron is more standard for that
10:13:20 <wib_jonas> ais523: does that include uppercase letters like ÁÉŐ, and common punctuation like „a” b – c … d?
10:13:25 <ais523> shachaf: what does altgr-` produce on that?
10:13:58 <shachaf> It behaves like a deadkey, so altgr-` a produces à
10:14:04 <ais523> as are “”, but I don't know where the inverted ” is
10:14:05 <shachaf> But ` by itself produces `
10:14:25 <ais523> ah, I see, so it's different from the UK layout but mostly just a rearrangement of keys it has
10:14:40 <ais523> on a UK layout, dead grave is AltGr-#
10:15:01 <shachaf> The default US English layout has no deadkeys and no way to type à
10:15:38 <ais523> and this is the standard UK English layout
10:15:49 <ais523> there are variants but they're mostly things like Dvorak that make really major changes
10:16:06 <ais523> that said, the altgr-combinations work differently on Linux and Windows, and kind-of suck on Windows
10:16:08 <shachaf> I should probably make my own layout or at least my own compose key file at one point.
10:16:17 <wib_jonas> ais523: in theory yes, but I can be the devil's advocate and argue against. The letters á and é are overwhelmingly more common than any other accented letter in Hungarian, and "é" changes openness compared to "e" and "á" changes every vowel quality compared to "a".
10:16:17 <shachaf> Since I often don't know how to type the things I want.
10:16:21 <wib_jonas> The length of vowels is hard to perceive in some context, you find situations where the length is uncertain in writing or can be changed deliberately for meter, and this is the most common for words ending in "ú", but very rarely happens for "e" vs "é".
10:16:21 <ais523> Linux has a really complete set of them
10:16:33 <shachaf> Fortunately I have a good Unicode searcher and selector.
10:16:47 <ais523> the only real change I made to the layout was to move Compose to Caps Lock (and Caps Lock to Shift-Shift), because Compose is used often enough that the default binding of Shift-AltGr is awkward
10:18:13 <ais523> I think I might also have re-enabled Ctrl-Alt-Backspace? but I don't want to try pressing it to find out
10:18:49 <wib_jonas> ais523: I don't usually bother with the altgr combinations on windows. I mostly just switch back to the US-english layout for typing fancy puntuation. There are even some ascii characters for which I really can't remember which key is it on with altgr on the Hungarian layout. The ampersand is somewhere in the z-m row, but I don't know where.
10:19:05 <ais523> (I know I re-enabled a lot of Alt-SysRq sequences but those don't have much to do with the keyboard layout, and in fact are IIRC typed in QWERTY regardless of what the layout is)
10:19:09 <shachaf> Hmm, I use Caps Lock for Esc. Maybe I should map Esc to compose.
10:19:21 <wib_jonas> As for typing non-ascii stuff on windows, I mostly just open either Wordpad or Word, type the unicode character code in hex, press alt-x, and copy-paste.
10:19:49 <ais523> having a dedicated key for Esc that means something on its own is an antipattern :-(
10:20:52 <ais523> it's convenient but it's ambiguous with a lot of things that use Esc as a prefix
10:21:03 <shachaf> What uses Esc as a prefix?
10:21:08 <wib_jonas> I do type some hungarian text occasionally in mails, and for that I sometimes use the hungarian layout for words.
10:21:10 <Taneb> <ais523> on a UK layout, dead grave is AltGr-# Oooh, this is helpful
10:21:39 <shachaf> Apparently in my layout, AltGr-Shift-3 a produces ā
10:22:11 <ais523> ā is altgr-shift-] a for me
10:22:38 <ais523> the dead accents are basically all AltGr + punctuation on the right side of the keyboard
10:23:00 <wib_jonas> shachaf: I type that one by character code, 0x101
10:23:07 <ais523> there's a sort-of logic to it, with AltGr-; AltGr-' AltGr-# acute, circumflex, grave
10:23:41 <ais523> "dead grave" sounds a lot scarier than it actually is
10:23:43 <shachaf> AltGr-' AltGr-6 AltGr-` seems much more logical.
10:24:18 <ais523> indeed, but sequences like altgr-6 are risky to use for forward compatibility reasons
10:24:24 <ais523> as that's where newly discovered punctuation marks go
10:24:37 <ais523> (most notably, altgr-4 for €)
10:24:55 <shachaf> AltGr-Shift-4 produces £ here
10:25:05 <wib_jonas> there's a logic to the character codes in the iso-8859-1 and latin-extended-A regions too. the order is always the same: grave, acute, circumflex, tilde, umlaut, macron, brevis for vowels.
10:25:22 <ais523> shachaf: ugh, I'd expect £ variants to be tied to 3
10:27:37 <shachaf> What does the x86-64 extension do?
10:27:39 <myname> you must have lots of fun on international shippings
10:28:00 <shachaf> Presumably it gives you access to a second set of punctuation marks.
10:28:44 <shachaf> If you use the REX prefix on ISO-8859-1, I mean.
10:28:58 <ais523> aren't the REX prefixes capital letters?
10:29:08 <ais523> apart from the null REX prefix, which is @
10:29:45 <ais523> I'm not sure whether rex.b or rex.x would be more appropriate for the second set of punctuation marks
10:30:13 <ais523> `asm .byte 0x41, 0x90, 0x42, 0x90, 0x44, 0x90, 0x48, 0x90
10:30:13 <shachaf> Or rex.r? I don't think puncutation marks even use memory addressing.
10:30:15 <HackEso> 0: 41 90 xchg %eax,%r8d \ 2: 42 90 rex.X xchg %eax,%eax \ 4: 44 90 rex.R xchg %eax,%eax \ 6: 48 90 rex.W nop
10:31:09 <ais523> actually, yes, rex.r is the only one that makes sense in almost every context
10:31:39 <ais523> as the examples above show, rex.b is the relevant bit when you have only the one non-fixed argument
10:31:52 <ais523> presumably because most commands can take either register or memory
10:32:28 <ais523> so I'm guessing we use a prefix of capital A to switch to the other set of punctuation marks
10:33:06 <shachaf> But https://www.felixcloutier.com/x86/xchg says 90+rd is XCHG EAX,r32
10:33:21 <shachaf> Why would that use REX.B instead of REX.R?
10:33:49 <ais523> more to the point, why doesn't one affect the EAX and the other affect the r32?
10:34:09 <shachaf> REX.R specifically affects the "reg" field of the ModR/M byte.
10:34:30 <shachaf> Actually, no, this is still kind of odd.
10:35:31 <shachaf> `asm .byte 0x44, 0x87, 0324
10:35:32 <HackEso> 0: 44 87 d4 xchg %r10d,%esp
10:35:45 <shachaf> `asm .byte 0x41, 0x87, 0324
10:35:46 <HackEso> 0: 41 87 d4 xchg %edx,%r12d
10:35:47 <ais523> <AMD> REX.B: 1-bit (msb) extension of the ModRM r/m field 1 , SIB base field 1 , or opcode reg field, permitting access to 16 registers.
10:36:00 <shachaf> Oh, that's better than the source I read.
10:36:13 <ais523> AMD invented this instruction set, so I use their documentation to learn about it
10:36:34 <ais523> the " 1 " should be "¹", there was a character encoding mishap
10:36:41 <ais523> it's just a reference to a footnote
10:36:53 <shachaf> I wonder why it's not REX.R, though.
10:37:11 <shachaf> To me the opcode reg field seems a lot like the modr/m reg field.
10:37:27 <wib_jonas> "a prefix of capital A to switch to the other set of punctuation marks" => actually it's more like a prefix  in utf-8
10:38:46 <ais523> wib_jonas: your statement is really confusing, not because I don't understand it, but because trying to make sense of it means mixing character encodings in a really weird way
10:39:04 <ais523> are you assuming that the encoding is UTF-8-as-Latin-1 mojibake?
10:39:23 <ais523> although mojibake isn't really a character encoding, it's something else
10:39:36 <ais523> /encoded/ mojibake is a character encoding
10:39:54 <ais523> you should be able to set the locale to, say, "UTF-8 misinterpreted as Latin-1 and then encoded in UTF-8"
10:49:31 <ais523> hmm, actually Latin-2 would be the appropriate set to mojibake into in Hungary
10:49:52 <ais523> but C2 is still  there
11:05:11 <shachaf> Is there any reason to target 32-bit x86 nowadays?
11:05:50 -!- Phantom_Hoover has quit (Ping timeout: 246 seconds).
11:07:03 <ais523> my current attitude towards 32-bit x86 is to not worry about performance at all on it
11:07:13 <ais523> I'll write programs that are only efficient on 64-bit systems
11:07:26 <fizzie> Will they still work on 32-bit systems?
11:07:41 <ais523> at the source code level, yes
11:07:50 <ais523> I don't normally write raw asm, but when I do it's processsor-specific
11:10:50 <myname> is there such a thing as processor-indipendent asm?
11:12:02 <wib_jonas> ais523: "UTF-8 misinterpreted as Latin-1 and then encoded in UTF-8" is called double-utf, but yes
11:12:20 <ais523> myname: WebAssembly is created as that
11:12:25 <ais523> there were a few attempts before then that didn't catch on
11:12:32 <wib_jonas> and the more common version is à before a letter to turn it to an accented letter
11:12:34 <ais523> also, C gets described at that sometimes, but I don't think it's an accurate description
11:14:27 <wib_jonas> and yes, it might not make more sense, but using a REX prefix to switch punctuation marks also doesn't make much sense
11:15:04 <fizzie> There's certainly various degrees of processor-dependedness, in the sense that you can target the lowest common denominator of a specific instruction set.
11:21:28 <esowiki> [[Salary program]] N https://esolangs.org/w/index.php?oldid=66259 * A * (+410) Created page with "The [[Salary program]] is a well-known [[Golf]]-oriented [https://esolangs.org/wiki/Category:Program_forms program form] on [https://codegolf.stackexchange.com/ CGCC] [https:/..."
11:24:32 <cpressey> myname: There's also LLVM. The idea is quite old (see e.g. https://en.wikipedia.org/wiki/P-code_machine)
11:26:21 <ais523> IIRC LLVM isn't portable, in the sense that different targeted platforms will have slightly differently looking LLVM
11:28:53 <wib_jonas> Right, LLVM is lower level in the sense that if you want to generate good optimized machine code through LLVM, then you already optimize the LLVM code you write to the particular cpu and instr set and other circumstances. In particular, you tell LLVM where to use 32-bit integers and where 64-bit ones, and that's a decision that depends on your cpu.
11:29:37 <cpressey> That seems like a rather ungenerous definition of "portable" to me
11:29:46 <ais523> I wonder if it's portable in the sense of being able to transpile any LLVM IR onto any CPU
11:30:06 <ais523> or, more, compile/assemble, I guess
11:30:11 <ais523> not sure what the right verb for this is
11:31:03 <shachaf> It occurred me recently that "compiler", "assembler", and "linker" all have roughly the same meaning.
11:31:05 <cpressey> At any rate, it bills itself as portable, and it's fairly widely used, so one should at least be aware of it.
11:31:44 <shachaf> It also billed itself as low-level, and as a virtual machine.
11:32:15 <ais523> I didn't think of LLVM as a universal asm because I didn't think of it as an asm
11:36:39 <cpressey> idk but the first line of the manual is "This document is a reference manual for the LLVM assembly language."
11:37:42 -!- ais523 has quit (Ping timeout: 258 seconds).
11:55:03 <fizzie> The LLVM modules generated by clang aren't portable in the sense that they contain datalayout -- https://llvm.org/docs/LangRef.html#data-layout -- and target triple -- https://llvm.org/docs/LangRef.html#target-triple -- specifications that identify the target processor. But I think those are optional, and it's probably possible to write LLVM modules that are applicable to more than one target.
11:57:21 <wib_jonas> cpressey: when LLVM bills itself portable, doesn't that mean that it can produce output machine code to multiple architecutres, but not necessarily from the same input? just like how gas and the rest of binutils are portable, they can assemble ARM assembly code to ARM machine code or x86_64 assembly code to x86_64 machine code, but not ARM assembly
11:57:44 <wib_jonas> ah yes, that's what ais hints about the word "portable" I guess
11:58:56 <fizzie> AIUI, the LLVM IR also encodes assumptions about the platform's ABI if you call anything external to the program, so it's not portable in that sense.
11:59:19 <fizzie> http://llvm.org/docs/FAQ.html#can-i-compile-c-or-c-code-to-platform-independent-llvm-bitcode "Also, since many platforms define their ABIs in terms of C, and since LLVM is lower-level than C, front-ends currently must emit platform-specific IR in order to have the result conform to the platform ABI."
12:00:24 <fizzie> But a self-contained program written in the LLVM IR might be "portable" to some degree.
12:04:45 <esowiki> [[Greentext]] https://esolangs.org/w/index.php?diff=66260&oldid=55935 * YamTokTpaFa * (+9)
12:05:43 <esowiki> [[Template:WIP]] M https://esolangs.org/w/index.php?diff=66261&oldid=66184 * YamTokTpaFa * (-2)
12:10:34 <esowiki> [[Salary program]] https://esolangs.org/w/index.php?diff=66262&oldid=66259 * A * (+209)
12:11:01 -!- ais523 has joined.
12:13:29 <ais523> OK, so LLVM is portable as a language in its own right, but can't be portable when used as a backend for something else because the "something else" may need to vary things based on the details of the platform and LLVM can't vary them the same way
12:16:52 <wib_jonas> ais523: no, I think it's more like that most of LLVM is portable, so it's portable enough that you can write working programs that LLVM can compile on multiple systems, but that's not typically what you do, because you use LLVM to make optimized programs, and you can't write good optimized program that LLVM compiles from the same source on multiple
12:17:05 <wib_jonas> this is even true to a lesser extent for C or C++ actually
12:18:34 <ais523> wib_jonas: well, you could write the program in "high-level" LLVM and optimise it for the target platform
12:18:44 <ais523> it's not like LLVM translates directly into asm anyway, e.g. you need to do register allocation
12:20:09 <wib_jonas> yes, and LLVM knows a lot about the platform-specific stuff, it abstracts away most of the unportability, but not all of it
12:20:45 <wib_jonas> anyway, I don't really know much about this, because luckily I don't write programs in LLCM
12:20:51 <wib_jonas> in LLVM -- darn, I can't type this
12:21:05 <wib_jonas> that's for serious compiler maintainers to know about
12:28:02 -!- APic has quit (Ping timeout: 265 seconds).
12:47:08 <wib_jonas> lol... I'm reading the intel x86 architecture reference manual. it has some statements that are necessary but still funny.
12:47:37 -!- arseniiv has joined.
12:48:39 <wib_jonas> in particular, it has a note about when you execute from memory that is also used as paging table entries, and how when the cpu updates the dirty and accessed bits of those page table entries because of paging, it has less guarantees than usual about self-modifying code
12:49:39 <wib_jonas> they need this statement because, for legacy 386 compatibility reasons, x86 provides very strong guarantees about the semantics of self-modifying code (even though the performance of such is abysmal)
12:50:47 <ais523> executing a page table is admittedly not something I had thought of
12:51:19 <ais523> there are similarly silly cases, like executing an interrupt vector, which are at least likely to be easy to implement
12:52:00 <ais523> (although I imagine that in some architectures, interrupt vectors are actually executable code rather than a list of addresses)
12:54:17 <wib_jonas> yes, 6502 has executable interrupt vectors, as in, the interrupts jump to a fixed address rather than load the jump address from a fixed address
12:59:37 -!- APic has joined.
13:22:15 <wib_jonas> It also has the ridiculous statement "Processors need not implement any TLBs." about caching page translation info
13:23:35 -!- Lykaina has joined.
13:23:55 <Lykaina> http://sif.lesidhetree.com/sara/echidna/echidna-uno-doc_0002_1.pdf
13:29:41 <ais523> a thought I've been having: currently, assemblers do two jobs, one is converting asm to machine code, the other is resolving things like jump destinations and .align directives and the like
13:29:49 <ais523> but the latter job duplicates what the linker does
13:30:27 <ais523> perhaps it would make sense for assemblers to /only/ do the first job, and the linker is the only thing that does the second
13:30:47 <ais523> (for performance, this means that you would probably want to link individual object files as they were created, and then link those object files together later in the build)
13:31:11 <ais523> current linkers support incremental link, I think, even though it isn't the normal way to do things; this would be an extreme version of that
13:32:50 <ais523> the advantage of doing things this way is that the exact layout of an object file in memory could be deferred to later in the build if necessary
13:33:06 <wib_jonas> ais523: I think that would be rather inefficient in the common case, when and a lot of references are quickly resolved by the assembler, and would be inefficient to emit symbolically to the linker, since the linker would have to do all the tasks of the second pass of the assembler, plus the assembler is usually not run separately but is built into
13:33:06 <wib_jonas> the compiler in such a way that it doesn't go through actual assembly syntax.
13:33:54 <wib_jonas> as in, the assembler resolves all the local references, so the linker only moves larger sections around
13:34:51 <ais523> well, the advantage of leaving the local references unresolved is that you can move small parts of the code around, e.g. to substitute a short jump for a long jump in the case where the target happens to be nearby
13:35:05 <ais523> present compilers have to leave enough space for the longest possibile jump
13:35:13 <wib_jonas> How much this matters may depend on the cpu architecture of course, in some older cpus you'd have a lot of local references because there are few ways to avoid jumps and you have to load large constants as memory accesses rather than immediates.
13:35:46 <ais523> if your large constants are memory accesses you'd often be loading from rodata anyway (= you need the linker)
13:35:54 <ais523> although I guess there's an argument for putting them in text
13:36:40 <wib_jonas> ais523: I don't think that will often happen, because each function (in the low-level sense) will be assembled to the same section, and you use calls and returns rather than jumps between functions, and those can't be short even if the functions are close to each other.
13:37:01 <wib_jonas> if there's an opportunity for a short jump, then the functions will be compiled together at the optimizer and inliner state already.
13:37:04 <ais523> tail calls are jumps, in some calling conventions
13:37:56 <wib_jonas> ais523: no, you can't load all the constants from rodata, because then you have to load their _address_ somehow, and you'd have to load those from rodata too etc
13:38:19 <ais523> but I see, assuming PIC
13:38:36 <ais523> then rodata probably isn't in a constant space relative to text due to ASLR, and you don't want to do the relocation at runtime
13:38:41 <wib_jonas> on those older cpus, you load the long immediates from the text with IP-relative or similar accesses. you can still do that on modern cpus like x86_64, it's just usually not worth because they have more convenient immediates.
13:38:56 <wib_jonas> this is for old cpus which don't have a way to load a full immediate
13:39:00 <ais523> maybe rodata is in a constant location relative to text, because rodata is constants too
13:39:14 <ais523> wib_jonas: modern CPUs can't load full sized immediates either
13:39:28 <wib_jonas> ais523: sure, but they're closer to it
13:39:46 <ais523> on x86-64 largest possible immediate is 64 bits for movabs, largest register is typically 256 bits wide
13:40:21 <wib_jonas> right, but the 64 bit load is enough to give the address into anywhere else at least
13:41:26 <wib_jonas> but I guess you're right, you could load such constants (or even index small tables) from the code section and place them close to the function
13:41:34 <wib_jonas> that still usually works on x86_64
13:46:37 <wib_jonas> basically, by putting the read-only data and the code into the same section (but not in the same cache line), you guarantee that they're no farther than 2**31 bytes, so you can access them with a simple and efficient RIP-relative access, and the linker doesn't have to translate the addresses
13:47:10 <ais523> now I'm wondering if it's bad to have executing code and read-only data on the same cache line
13:47:38 <ais523> it's obviously bad to have executing code and writable data on the same cache line, but there's no obvious reason why in the former case you couldn't just load it into both L1 caches
13:49:26 <ais523> fwiw, the thing that inspired the "let's do the linking outside the assembler" idea was that I was reading about how TLS is implemented
13:49:46 <ais523> and there are four different ways to implement TLS, some of which are faster but less general, and the optimisation is done by the linker
13:50:01 <ais523> which means it has to delete code sequences from the executable and replace them by sequences of different length, sometimes
13:50:18 <ais523> currently this is implemented by leaving padding in the code so that the linker can overwrite it, but that seems ridiculous
13:50:24 <wib_jonas> ais523: also, if the linker moved around code in small parts, then the assembler would have to be able to tell it not only how to move the code, but also how to adjust the detailed debugging information and the unrolling info. that would make the linker even more complicated than it already is.
13:51:30 <wib_jonas> ais523: same cache line => only bad in the sense that it can waste the L1 cache, because the L1 cache is separated to an L1D cache that is used for data access only and an L1C cache that is used for code access only, and both are small, so you'd have a half-used entry for the same cache line in both;
13:52:00 <ais523> well, it depends on whether you can fit other useful data into the same cache line
13:52:08 <ais523> if not there's no actual loss
13:52:25 <wib_jonas> plus to some amount the same thing for decode caches and branch prediction and branch target caches, but those usually work at 16-bit sized units rather than 64-bit ones currently
13:52:32 <ais523> err, depending on where the code ends
13:52:54 <ais523> if you have 1½ cache lines of code and ½ a cache line of data, you want to merge them into 2 cache lines, not separate them into 3
13:53:17 <ais523> as either way you end up with 3 cache lines between the two L1 caches
13:53:21 <wib_jonas> ais523: yes, if you can fit read-only data without losing space, then it's not bad, but separating data and code to separate cache lines is a good enough general rule and you rarely lose from following it
13:53:50 <ais523> so why not have rodata in a fixed location relative to text, and put the constants in rodata?
13:54:35 <ais523> "rodata in a fixed location relative to text" is probably required anyway (especially if you don't have a PIC base register), otherwise the references to data from rodata will be too expensive
13:54:35 <wib_jonas> ais523: in fact it may make sense to separate them to separate pages, at least on some cpus... I don't recommend the recommendations taht the optimization manual says
13:54:57 <wib_jonas> but even if they're in separate pages, they can be within 2**31 bytes from each other, which is still useful
13:55:04 <ais523> fwiw, many compilers seem to prefer using multiple movabs instructions
13:56:22 <wib_jonas> ais523: sort of, but putting them to fixed location can be done in the linker, which places those two segments and resolves references between them at link time. I think it could even place them within 2**31 from enough (unless they're very large of course)
13:57:27 <wib_jonas> multiple movabs instructions => sure, if you can use them, use them
13:57:57 <ais523> interestingly, AMD doesn't use the term "movabs"
13:58:00 <wib_jonas> at that point it's a tricky call, can depend on what's tight in that part of the code, L1 cache accesses or decoding
13:58:00 <ais523> to them it's just a variant of the mov instruction
13:58:15 <wib_jonas> does intel use it? I think they don't either\
13:58:32 <wib_jonas> I think movabs is just an AT&T assembly syntax thing
13:58:41 <ais523> I would have thought movabs would decode quickly; it's easy to find the end of it, for example
14:02:02 <ais523> `asm .byte 0x66, 0x66, 0x48, call 0x12345678
14:02:06 <HackEso> /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: junk at end of line, first unrecognized character is `0' \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: junk at end of line, first unrecognized character is `0'
14:02:09 <ais523> `asm .byte 0x66, 0x66, 0x48; call 0x12345678
14:02:11 <HackEso> 0: 66 66 48 e8 00 00 00 00 data16 data16 callq 0x8
14:02:23 <ais523> `asm .byte 0x66, 0x66, 0x48; call $0x12345678
14:02:24 <HackEso> 0: 66 66 48 e8 00 00 00 00 data16 data16 call 0x8
14:02:25 <wib_jonas> ais523: it's not just about the speed of decoding, it's also that if you use, say, four movabses to load a 32 byte constant rather than a single 32-byte memory load, then you get longer code, which uses up more of the decoded cache
14:02:47 <ais523> `asm .byte 0x66, 0x66, 0x48; callq $0x12345678
14:02:48 <HackEso> 0: 66 66 48 e8 00 00 00 00 data16 data16 call 0x8
14:02:54 <wib_jonas> it could also decode slowly, but that's less of a problem
14:03:05 <ais523> hmm, I wonder what's happening to the argument to call
14:03:19 <wib_jonas> but I guess most of the time the decoding won't be the problem
14:03:24 <ais523> oh right, the µop cache
14:03:43 <ais523> it's kind-of crazy that something like that is beneficial
14:03:49 <wib_jonas> ais523: that, and the other cache that runs very short loops, but you don't put constant loads in those
14:05:05 <ais523> the branch predictors on modern processors predict loop counts for loops with a small fixed loop count
14:05:23 <wib_jonas> ais523: it's beneficial only in intel cpus, not on amds, because intel has a broken decoder that only decodes one aligned 16-bit block of code per cycle, and if you write floating point machine learning code that never hits an L1 cache miss, then it will execute four floating-point add-multiplies in a clock cycle, and those four instructions are
14:05:29 <ais523> arguably it'd make more sense just to have a processor instruction for a loop with a small fixed count, then the prediction could be perfect
14:06:37 <ais523> in AMD processors there are three decode units and an instruction can take up one, two, or all three of them (the three-unit instructions also cause a pipeline stall in the decode, so they're recommended against)
14:07:08 <ais523> at least, that's how it worked last time I checked, it might have changed since
14:08:20 <ais523> `asm nopw %cs:0x0(%rax,%rax,1)
14:08:21 <HackEso> 0: 2e 66 0f 1f 04 00 nopw %cs:(%rax,%rax,1)
14:08:34 <ais523> that's not as long as I thought it would be
14:09:19 <ais523> perhaps there should be a VEX version of a NOP?
14:09:33 <wib_jonas> "2E" for segment override, "66" for data size override, "0F 1F" for the opcode, "04" for mod/rm byte, "00" for SIB byte
14:10:12 <wib_jonas> but you can add a displacement if you want a longer one
14:10:21 <wib_jonas> and drop the segment override, that never helps
14:11:14 <wib_jonas> ais523: the intel manual and the amd manual both describe what nops you should use, and the intel gives a 9-byte nop as the longest, but all the nops that are longer than one byte have an input dependency on a general register that you can choose
14:12:22 <wib_jonas> that said, when writing or compiling actual code, you can use instructions that are technically not nops, but are fast and don't do anything that matters in the context of the particular code, such as zero a register
14:13:01 <wib_jonas> that works for shorter nops only I think, but there it may sometimes be easier than following intel's recommendations
14:13:10 <wib_jonas> for longer nops I think you're out of luck
14:13:46 <ais523> `asm .byte 0xc4, 0xe1, 0x79, 0x1f, 0x04, 0x00
14:13:47 <HackEso> 0: c4 e1 79 1f (bad) \ 4: 04 00 add $0x0,%al
14:14:06 <ais523> that was an attempt to encode a NOP using VEX, just for fun
14:14:19 <ais523> (I know you can't actually use VEX on non-SSE instructions)
14:14:33 <ais523> (but it's in an opcode map that means the syntax exists, at least, the processors just reject it)
14:14:58 <HackEso> 0: 66 45 29 c0 sub %r8w,%r8w
14:15:06 <ais523> although that isn't a no-op, of course
14:15:29 <ais523> `asm .byte 0x67; and %r8, %r8
14:15:30 <HackEso> 0: 67 4d 21 c0 addr32 and %r8,%r8
14:15:34 <wib_jonas> yeah, I think you can do this only for two or three byte long nops
14:15:55 <wib_jonas> maybe more if you zero an SSE register, but on newer cpus only
14:15:56 <ais523> there's no reason you /can't/ stick an 0x67 prefix on there
14:16:03 <ais523> even if 0x66 would cause trouble
14:16:12 <ais523> although, both sub and and change flags
14:16:19 <ais523> (and is better because at least it doesn't change the register)
14:16:38 <wib_jonas> doesn't the 0x67 prefix cause a decoding slowdown?
14:16:55 <ais523> not sure; it's used so rarely that maybe it does
14:17:17 <wib_jonas> yes, but it doesn't _read_ the flags, and doesn't _read_ the registers, it only writes them
14:17:31 <ais523> surely lea is the best instruction, anyway?
14:18:17 <ais523> you could use a 4-byte displacement there
14:18:26 <ais523> `asm leaq 0(%r12), %r12
14:18:27 <HackEso> 0: 4d 8d 24 24 lea (%r12),%r12
14:18:30 <wib_jonas> on newer cpus, you can get four and five byte instructions to zero an xmm register
14:18:52 <ais523> that can be terrible for performance in some cases, initializing the FPU takes ages
14:19:00 <ais523> if it's switched off for power-saving purposes
14:19:05 <ais523> (probably bad for power drain, too)
14:19:14 <ais523> admittedly, lots of things use vector registers nowadays
14:19:29 <ais523> `asm leaq 0x12345678(%r12), %r12
14:19:30 <HackEso> 0: 4d 8d a4 24 78 56 34 12 lea 0x12345678(%r12),%r12
14:19:40 <wib_jonas> or more likely, if you're using 32-byte ymm registers and you suddenly zero a 16-byte one
14:19:59 <ais523> `asm .byte 0x4d, 0x8d, 0xa4, 0x24, 0x00, 0x00, 0x00, 0x00
14:20:00 <HackEso> 0: 4d 8d a4 24 00 00 00 00 lea 0x0(%r12),%r12
14:20:06 <wib_jonas> "lea is the best instruction" => again, that depends on what for and where
14:20:06 <ais523> that should be a true NOP, I think
14:20:14 <ais523> and might be pretty fast to both decode and run
14:20:26 <ais523> doesn't play well with 0x66 prefixes, though
14:22:20 <wib_jonas> and I think on intel it's strictly worse than nopw 0(%rax,%rax,1)
14:22:50 <ais523> according to AMD, an lea runs in one cycle if it only has one register and no scale on the LHS
14:23:03 <wib_jonas> no, I mean worse than nopw 0(%r12,%r12,1)
14:23:18 <ais523> although, on AMD (and probably also Intel), a nop runs in zero cycles (the only time it spends is the time spent in decode)
14:24:03 <ais523> I think that only applies to 0x90 nop, though
14:24:16 <ais523> which is why the recommended pattern on AMD is 0x66 0x66 0x66 0x90
14:24:22 <ais523> repeated to fill space
14:24:37 <wib_jonas> the eight-byte nop doesn't execute, the only cost it has is that it has a false _read_ dependency on %r12, so it won't be scheduled until the value of %r12 is available
14:25:05 <wib_jonas> it doesn't actually compute the address or attempt access the memory if I understand correctly
14:25:23 <wib_jonas> and I think it doesn't even tie up any execution core, but that doesn't typically matter
14:25:39 <ais523> 0x90 NOP has the benefit that it isn't scheduled at all, though
14:26:26 <wib_jonas> whereas an instruction like sub %r12d,%r12d is three bytes long, doesn't depend on any input register, and only writes flags, not any register in execution
14:26:45 <ais523> yes it does, it writes 0 in %r12d
14:27:02 <ais523> do you mean sub $0, %r12d
14:27:04 <wib_jonas> ais523: the effect writes the register, but the execution units and the register file don't know that
14:27:18 <wib_jonas> it's handled in decoding/scheduling by renaming the register
14:27:36 <wib_jonas> so that %r12 will refer to a zero register rather than whatever entry contained the value before the instruction
14:27:44 <ais523> oh I see, in that case you should be using xor I think
14:28:04 <wib_jonas> it does also write the register for the purpose of dependencies (but doesn't read)
14:28:18 <ais523> don't the processors that special case sub-of-itself also special case mov 0?
14:28:34 <wib_jonas> I don't think so, but I'm not sure
14:28:45 <ais523> mov $0 seems to be superior in two ways: a) it doesn't change flags (thus removing potential false dependencies on flags), b) the encoding is longer
14:29:09 <ais523> `asm movq 0x00000000, %r12d
14:29:10 <HackEso> /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: operand type mismatch for `movq' \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: operand type mismatch for `movq'
14:29:12 <ais523> `asm movq 0x00000000, %r12
14:29:13 <HackEso> 0: 4c 8b 24 25 00 00 00 00 mov 0x0,%r12
14:29:44 <ais523> maybe it depends on how the 0 is encodedd
14:29:49 <HackEso> 0: 4c 8b 24 25 00 00 00 00 mov 0x0,%r12
14:29:58 <ais523> although I don't think there is an 8-bit mov into a non-8-bit register
14:30:04 <ais523> `asm movzxq 0x00, %r12
14:30:09 <HackEso> /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: unsupported syntax for `movzx' \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: invalid instruction suffix for `movzx'
14:30:16 <HackEso> 0: 4c 0f b6 24 25 00 00 00 00 movzbq 0x0,%r12
14:30:28 <ais523> that one probably isn't optimized, to be fair
14:30:42 <wib_jonas> for a long nop, I'd also suggest prefetcht2 0, which is 8 bytes long
14:30:49 <HackEso> 0: 49 c7 c4 00 00 00 00 mov $0x0,%r12
14:30:52 <wib_jonas> and can be 9 byte if you add a redundant REX prefix
14:31:01 <ais523> `asm movzxbq $0x00, %r12
14:31:02 <HackEso> /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: no such instruction: `movzxbq $0x00,%r12' \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: no such instruction: `movzxbq $0x00,%r12'
14:31:13 <ais523> movzx doesn't allow an immediate, right
14:31:24 <ais523> `asm movzbq $0x00, %r12
14:31:25 <HackEso> /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: operand type mismatch for `movzb' \ /tmp/asm.s: Assembler messages: \ /tmp/asm.s:1: Error: operand size mismatch for `movzb'
14:31:33 <wib_jonas> ais523: r12 is callee-saved, that's why it segfaults
14:31:37 <ais523> yes, it helps if you get the instruction name right, but not enough ;-)
14:31:45 <ais523> wib_jonas: no, I dereferenced NULL, that's why it segfaults
14:32:14 <ais523> I find the "numbers are memory addresses by default" pattern pretty unintuitive
14:32:49 <wib_jonas> I wonder if you could also use a two-byte short jump as a nop of between 2 and 120something bytes long
14:33:31 <wib_jonas> of course that's also not always applicable, it works best if you have no other jump in the 16-byte block
14:33:52 <wib_jonas> or something like that, I'm not sure how all that works
14:35:29 <ais523> is there an unconditional two-byte jump?
14:35:49 <HackEso> 0: e9 00 00 00 00 jmpq 0x5
14:36:08 <ais523> `asm jmp a; .align 8; a: nop
14:36:10 <HackEso> 0: eb 06 jmp 8 <a> \ 2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) \ \ 0000000000000008 <a>: \ 8: 90 nop
14:39:50 <cpressey> If you search the web for static deadlock detection you get papers on statically detecting deadlock in Go, Java, C with pthreads, C#, Erlang, the Linux kernel, and a language called "SHIM"
14:40:50 <ais523> hmm… Rust doesn't guarantee deadlock-freedom, so that would be an obvious language to try
14:40:51 <wib_jonas> there's no unconditional jump with 16-bit offset by the way, despite that there are conditional jumps with 16-bit offset, all for historical reasons
14:41:06 <cpressey> I think the basic idea is simple - every place you acquire a resource, check what resources you already could've acquired. Form a graph. If it's got a cycle, you've got a problem.
14:41:23 <ais523> wib_jonas: conditional and unconditional jumps normally have different rules on what offset sizes they allow, not just on x86
14:42:05 <ais523> well, that boils down to the well-known algorithm of "always take locks in a specific order"
14:42:22 <wib_jonas> the 8-bit unconditional jump comes from the original 8086, or perhaps before, yet it's still actually useful on x86_64
14:42:32 <ais523> there's a Valgrind plugin that looks for locks being taken in an inconsistent order at any point during the program lifetime, even if no actual deadlock happens
14:42:59 <ais523> an 8-bit unconditional jump is frequently used to implement "else", so it makes sense that it'd still be around
14:43:51 <wib_jonas> yeah, it comes from before: the z80 already had an unconditional jump with 8-bit offset
14:44:42 <ais523> on the 6502, I think unconditional jumps are 16 bits (absolute, not offset), conditional jumps are 8-bit (offset)
14:45:17 <ais523> it's a 16-bit-address processor so you don't need any more bits than that
14:48:28 <ais523> I'm reading the LLVM spec: there's a lot of behaviour that's target-specific in subtle ways, but so far I haven't seen anything that forces you to use it
15:10:12 -!- wib_jonas has quit (Remote host closed the connection).
15:32:27 <esowiki> [[Seed]] https://esolangs.org/w/index.php?diff=66263&oldid=66019 * Palaiologos * (+117)
15:33:12 <esowiki> [[User:Palaiologos]] https://esolangs.org/w/index.php?diff=66264&oldid=63560 * Palaiologos * (+69)
15:49:19 -!- arseniiv has quit (Quit: gone completely :o).
15:53:28 -!- cpressey has quit (Quit: A la prochaine.).
16:00:44 <esowiki> [[Hexar]] M https://esolangs.org/w/index.php?diff=66265&oldid=66245 * Enchant3d * (+41)
16:01:55 <esowiki> [[Hexar]] M https://esolangs.org/w/index.php?diff=66266&oldid=66265 * Enchant3d * (-20)
16:14:16 <Lykaina> effing fire drill in my building. couldn't find my keys and got locked out
16:14:46 <Lykaina> (since then, found keys after being let back in)
16:22:11 -!- imode has joined.
16:37:26 -!- Lord_of_Life_ has joined.
16:39:00 -!- Lord_of_Life has quit (Ping timeout: 258 seconds).
16:39:01 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
16:40:15 -!- sebbu has quit (Read error: Connection reset by peer).
16:41:05 -!- sebbu has joined.
17:05:54 -!- FreeFull has joined.
17:15:18 -!- Phantom_Hoover has joined.
17:17:21 -!- b_jonas has joined.
17:18:16 <b_jonas> ais523: by the way, shachaf asked for one of your esolangs in https://esolangs.org/logs/2019-09-18.html#lgd
17:19:47 <ais523> right, in MiniMAX commands have a read word and a write word so overlapping them is the only way to produce a memory location that can be both read and written
17:31:45 <b_jonas> https://twitter.com/volatile_void/status/1174015227924570119 "Little-known fact “NaN” is a recursive acronym, it stands for “Not a NaN”"
17:32:33 <ais523> I was going to say "how can an x be a not-x" but then realised that NaN isn't comparable with itself
17:32:33 <ais523> so that's cleverer than it seems
17:33:40 <b_jonas> it's like those numbers used in bistromathic drives
17:34:34 <ais523> hmm, is it the case that NaN != NaN? or just that !(NaN == NaN)?
17:36:54 <b_jonas> this one you ais might be qualified to answer
17:36:58 <b_jonas> https://twitter.com/gro_tsen/status/1174039625347846144
17:37:08 <b_jonas> "Serious question: what plausible use cases exists for a “char ****p” (or more indirections)? I only once used a “char ***p” and that already seemed very contrived (and I was confused every time I re-read this code)."
17:40:12 <ais523> I'm not sure there is one
17:40:23 <ais523> the void ***** referenced in Three Star Programmer's documentation is a joke
17:41:24 <ais523> I guess a page table is sort-of like a void ****** or so with a constant but large number of *s
17:44:06 <olsner> https://github.com/boostorg/mpl/blob/develop/include/boost/mpl/assert.hpp#L222 uses a 13-star type
17:44:47 <fizzie> The standard use for char *** is when you want to pass &argv to a function that wants to muck with it.
17:45:57 <ais523> olsner: is that testing for compiler brokenness of some sort?
17:46:45 <olsner> hm, and the line above that is a typedef with 12-star pointer to pointer-to-member of the 13-star type, so that's effectively a 26-star type or something
17:46:46 <ais523> actually, no, it looks more like it's trying to come up with a type that isn't in use elsewhere in the program
17:46:57 <olsner> yeah, I think that's what they're doing
17:48:23 <shachaf> Should I write "int const x;" instead of "const int x;"?
17:48:46 <b_jonas> shachaf: it doesn't matter
17:48:56 <shachaf> Or "int const *x;", I suppose that's more relevant.
17:49:17 <shachaf> I know they have the same meaning.
17:49:39 <olsner> I always use "const int" for those, even though it requires you to change const placement when making fancier types
17:49:39 <ais523> after a code formatter taught me how to do it, I started always using *const (no whitespace) for situations where the pointer itself is const
17:49:44 <shachaf> A program without whitespace is also "the same thing" as a program with whitespace, but you can still ask questions about it.
17:49:47 <b_jonas> if you are writing code for an existing project, or your supervisor asks you to follow a certain coding style, write it in a way to match the style of that code or follow those recommedations. otherwise, write whatever.
17:50:00 <b_jonas> the same is true for int *x; versus int* x;
17:50:07 <ais523> so I prefer "const int x;", "const int *x;", etc., because that makes it clearer that it's the pointer referent that's const, not the pointer itself
17:50:35 <shachaf> ais523: The idea of "int const x;" is that it's consistent with "int *const x;"
17:51:12 <b_jonas> shachaf: sure, but these are points of coding style where even people who write good C/C++ programs don't agree, and they mostly came to the agreement that either is fine
17:51:24 <shachaf> b_jonas: What if I don't have a supervisor and I just want things to be good instead of bad?
17:51:33 <ais523> shachaf: yes, but when you move up to "int const *const x;" the pattern doesn't feel like it holds any more
17:51:35 <shachaf> I try not to write C/C++ polyglots.
17:51:38 <b_jonas> so for some stupid whitespacing or style, people might complain if it's code that they'll read, but for this one, nobody will complain unless you have to match an existing coding style
17:51:54 <ais523> isn't "C/C++" undefined behaviour?
17:52:22 <b_jonas> ok, let's say C++ programs
17:52:31 <ais523> `! c float C = 4.0; printf("%f", C/C++);
17:52:37 <b_jonas> and if shachaf asks about this in C programs, then I can't help much
17:52:45 <ais523> I was expecting a warning
17:53:13 <olsner> does `! c build with all the warnings on?
17:54:06 <shachaf> I think very few people understand C++.
17:54:35 <ais523> olsner: probably not; I actually wasn't expecting it to work at all
17:55:29 <ais523> `` printf '#include <stdio.h>\nint main(void) { float C = 4.0; printf("%f", C/C++); }' | gcc -Wall -Wextra -x c /dev/stdin
17:55:31 <HackEso> [01m[K/dev/stdin:[m[K In function ‘[01m[Kmain[m[K’: \ [01m[K/dev/stdin:2:40:[m[K [01;35m[Kwarning: [m[Ktoo many arguments for format [[01;35m[K-Wformat-extra-args[m[K] \ [01m[K/dev/stdin:2:55:[m[K [01;35m[Kwarning: [m[Koperation on ‘[01m[KC[m[K’ may be undefined [[01;35m[K-Wsequence-point[m[K]
17:55:53 <ais523> `` printf '#include <stdio.h>\nint main(void) { float C = 4.0; printf("%f", C/C++); }' | gcc -fno-diagnostics-color -Wall -Wextra -x c /dev/stdin
17:55:55 <HackEso> /dev/stdin: In function ‘main’: \ /dev/stdin:2:40: warning: too many arguments for format [-Wformat-extra-args] \ /dev/stdin:2:55: warning: operation on ‘C’ may be undefined [-Wsequence-point]
17:56:06 <shachaf> If you do it in C++ constexpr you might get useful information about UB.
17:56:17 <b_jonas> ``` set -e; gcc -fdiagnostics-color=never -Wall -O -o tmp/a.out -x c - <<< $'#include<stdio.h>\n''int main(void) { float C = 4.0; printf("%f", C/C++); return 0; }'; tmp/a.out # there is a warning
17:56:19 <HackEso> <stdin>: In function 'main': \ <stdin>:2:49: warning: operation on 'C' may be undefined [-Wsequence-point] \ 1.250000
17:56:26 <ais523> `` printf '#include <stdio.h>\nint main(void) { float C = 4.0; printf("%f", C/C++); }' | gcc -fno-diagnostics-color -Wall -Wextra -x c /dev/stdin
17:56:27 <HackEso> /dev/stdin: In function ‘main’: \ /dev/stdin:2:40: warning: too many arguments for format [-Wformat-extra-args] \ /dev/stdin:2:55: warning: operation on ‘C’ may be undefined [-Wsequence-point]
17:56:33 <ais523> `` printf '#include <stdio.h>\nint main(void) { float C = 4.0; printf("%%f", C/C++); }' | gcc -fno-diagnostics-color -Wall -Wextra -x c /dev/stdin
17:56:36 <HackEso> /dev/stdin: In function ‘main’: \ /dev/stdin:2:49: warning: operation on ‘C’ may be undefined [-Wsequence-point]
17:56:49 <b_jonas> I had to look up -fdiagnostics-color=never , I didn't remember the option syntax
17:56:51 <ais523> both printf(1) and my IRC client use % as an escape symbol
17:57:00 <ais523> b_jonas: so did I, I just looked it up faster
17:57:33 <ais523> info is such a good documentation format in terms of the user experience (some of its internals are ridiculous, though)
17:57:49 <olsner> write a filter that translates color escape sequences to IRC colors
17:59:04 <b_jonas> ais523: I don't use printf for this. I just use the $'foo' literals.
17:59:33 <b_jonas> shachaf: info as in the program, or info as in the format?
18:00:20 <b_jonas> because I think what gives the good user experience is when the docs are written in texinfo format well, which is hard to write, but when it's written that way, it compiles to multiple different formats including info, html, pdf, each of which you can read with multiple clients.
18:00:36 <b_jonas> well, it compiles to info, html, pdf, but not much else.
18:01:28 <b_jonas> shachaf: that I can understand. read one of the outputs with a different client
18:01:42 <ais523> very few other formats allow both index search (often in multiple indexes by subject) /and/ free text search /and/ have a hierarchical table of contents
18:01:53 <b_jonas> the html output produced is decent, not the one overloaded with client-side scripts that you see on the web these days
18:02:06 <ais523> I found the appropriate gcc option by typing "idiagnostics-" and a newline
18:02:19 <olsner> but can info produce man pages?
18:02:41 <b_jonas> olsner: I don't think so, at least not in a sane way
18:02:43 <ais523> b_jonas: in chm's predecessor, .hlp, the free text search took several minutes
18:02:52 <ais523> although that was likely related to the computers at the time
18:03:36 <ais523> also, AFAIK neither .chm nor .hlp allow the whole thing to be easily read in depth-first order (whereas info does)
18:03:38 <b_jonas> is chm basically just restricted html wrapped up in a compressed file with some extra info about the table of contents?
18:04:10 <b_jonas> what I don't know is how you can sanely export the extra info in some easily usable format
18:06:35 <b_jonas> that reminds me, there's a certain documentation format that I find somewhat annoying
18:07:20 <fizzie> Documentation in UHS format, so that you don't accidentally reveal too much to the user.
18:07:21 <b_jonas> namely when the help is embedded in the program, and you can print it by invoking it with like programname help topic, but you have to do it one node at a time, and it can be hard to find out what all the nodes are, plus you may have to iterate over multiple programs
18:07:27 <b_jonas> for some reason, version control software uses this
18:07:44 <b_jonas> it's the most annoying for subversion, which has really good user reference documentation, but tucked away this way
18:08:06 <b_jonas> you have to iterate over all svn* programs, run them with help, then with help topic, then with help topic again for topics that are two levels deep
18:08:28 <b_jonas> hg technically does it too, but it also comes with all that documentation installed as a single manpage, which negates all the drawbackzs
18:08:30 <ais523> b_jonas: "man git-commit", etc.
18:08:44 <b_jonas> ais523: yes, I'm not talking about git, only svn, hg, and fossil
18:09:03 <b_jonas> I also don't understand why it's only version control software that do this
18:09:22 <ais523> because they're copying svn
18:09:35 <b_jonas> if only they had a command like programname help all, that would also fix the problem
18:09:53 <b_jonas> at one point I started to write a script to export all the docs from svn, but I haven't finished it
18:09:59 <fizzie> "helpfull" is a flag with a good name.
18:10:00 <b_jonas> I should do that so I can do full text searches
18:10:07 <b_jonas> fizzie: yeah, that could work too
18:10:07 <ais523> or, well, a likely reason is that VCS is particularly likely to want to bundle a large number of commands with separate behaviour into one executable
18:10:20 <b_jonas> fizzie: as long as (programname help) tells that that command exists
18:10:22 <ais523> that said, busybox does this correctly
18:11:10 <b_jonas> I'm not too familiar with busybox. I only use it when running the debian installer.
18:11:37 <ais523> it's basically one executable that implements cut-down versions of a lot of different commands
18:11:49 <ais523> to benefit from being able to share code between them
18:12:05 <ais523> basically, it's a size-optimized minimal userland
18:12:24 <b_jonas> ais523: yes, but for svn it's not even one executable, it's twenty, with zero or one or two levels deep help depending on which program it is
18:12:53 <shachaf> Somehow my system supports "man git commit", with a space.
18:12:56 <b_jonas> of course, you only need five of those twenty programs, but how would you know which five unless you can read their help?
18:13:11 <b_jonas> shachaf: yes, that's a little magic built into man
18:14:16 <ais523> heh, busybox's documentation is comparable to the program itself
18:14:17 <fizzie> It should be forced to show a dialog on first use listing possible alternatives.
18:14:41 <ais523> clear is documented by busybox as "Clear screen", not even a full stop
18:14:45 <b_jonas> shachaf: try (man apt get)
18:14:54 <ais523> whereas the manual page for clear(1) is one and a half pages
18:15:18 <b_jonas> ais523: the manual is shorter because the busybox programs usually have fewer options or features than the programs that they mimic though
18:15:33 <ais523> busybox clear doesn't have any
18:15:40 <ais523> but then, clear(1) only has three
18:16:05 <ais523> most of it is a discussion of the history of clearing screens
18:17:18 <ais523> huh, busybox actually is a complete userland, it has things like init and crond
18:17:45 <b_jonas> ais523: yes, that's its point, you put it on a disk with a libc plus a few device files and directories, you get a full tiny userland
18:18:14 <b_jonas> it's used in debian's generated initrd so you get a small rescue system if it can't mount root for some reason
18:18:19 <ais523> also dpkg, which I guess makes sense if you're using it as a rescue system for Debian
18:18:29 <b_jonas> mind you, busybox is configurable at compile time, so which programs it has may depend on which system
18:18:34 <b_jonas> you can probably compile it to not have init
18:19:36 -!- tromp has quit (Remote host closed the connection).
18:19:47 <b_jonas> init isn't really big anyway, all the complicated parts are off-loaded to getty and login
18:21:09 <b_jonas> complicated parts like setting up the serial terminal for logins when you don't know in advance what sort of modem and terminal the remote party has
18:21:42 <b_jonas> setting environment variables from key=value entries that the user writes after their username
18:22:11 <ais523> it has mke2fs, which is a bit of a surprise and seems out of place
18:22:21 <b_jonas> printing /etc/issue and interpreting all the possible escape sequences in ity
18:22:32 <ais523> I wouldn't want a cut-down simplified program to be making my filesystems
18:22:41 <b_jonas> mke2fs is exactly what you want on a rescue system
18:22:50 <b_jonas> to be able to set up a real system, or repair a half-working one
18:22:54 <ais523> especially as ext2 is pretty old by now and it doesn't to ext3/ext4
18:23:06 <ais523> b_jonas: why would you want to reformat a disk when repairing a half-working system?
18:23:17 <b_jonas> ais523: not a whole disk, just a partition, like a boot partition
18:23:22 <ais523> especially as you're only going to have to rereformat it later using mkfs.ext4
18:23:44 <ais523> and generally if I'm trying to solve a problem, I'd expect reformatting things to make it worse, not better
18:23:48 <b_jonas> or a temporary fs to which you copy files from some cds or network
18:24:03 <ais523> fsck (which it doesn't have) would be a much more useful program to include
18:24:07 <fizzie> I think it has a getty as well.
18:24:22 <b_jonas> ais523: obviously you don't want to reformat a part of the disk from which you want to save the data
18:24:28 <fizzie> A lot of the OpenWRT userland is in busybox.
18:24:36 <b_jonas> ais523: and mkfs is a much simpler smaller program than fsck
18:24:54 <b_jonas> ais523: fsck has to know a lot of things about the file system, including handling all the invalid states that it shouldn't be in
18:25:07 <b_jonas> mkfs only has to know about valid and empty states, the rest is handled by the kernel afterwards
18:25:55 <b_jonas> ais523: as for ext2 vs ext3, you can add an ext3 journal to an existing ext2 partition afterwards with tune2fs
18:26:21 <b_jonas> ext4 would be nice, but I think the mkfs required for that would be bigger
18:26:48 <fizzie> And Android uses toybox, which also has a bunch of programs: http://landley.net/toybox/status.html
18:26:55 <b_jonas> and ext2 is a good enough common denominator for when you need a scratch filesystem to store things on but don't need it to be maximally efficient, just readable and writable by most software
18:27:52 <b_jonas> ais523: even my custom dos bootfloppy has the format program to format a partition, both for this sort of temporary thing, or to bootstrap a bootable dos onto a hard disk
18:29:07 <b_jonas> of course that boot floppy is highly obsolete now
18:35:33 <b_jonas> ais523: also, at some point I ran a system with the grub-l boot loader on a different disk from the root file system. in that case, if the hard disk with the boot loader breaks down, I can repair it by creating a boot partition on the other disk, format it to either ext[23] or vfat, and installing the grub-l boot loader and config files for it there. nowadays the simpler option would be to install grub2
18:35:39 <b_jonas> of course, but imagine the same thing before grub2 was stable.
18:36:08 <b_jonas> (actually my system is still configured that way, but there is a boot file system already on the other disk, so I don't have to create it)
18:37:34 <b_jonas> I'll have to stop using grub-l when I use a hard disk larger than 2 terabyte as root disk, but not before
18:38:02 -!- ais523 has quit (Ping timeout: 240 seconds).
18:42:54 -!- ais523 has joined.
18:56:39 -!- tromp has joined.
19:01:13 -!- tromp has quit (Ping timeout: 258 seconds).
19:02:43 -!- tromp has joined.
19:07:47 -!- tromp has quit (Ping timeout: 276 seconds).
19:16:37 -!- ais523 has quit (Ping timeout: 268 seconds).
20:01:58 <b_jonas> do you recall what I said a few days ago about Sonic and Zelda?
20:02:49 <b_jonas> it turns out that in the Banjo-Kazooie video games, the name of the player characters are Banjo and Kazooie, Kazooie being the bird and Banjo the big creature. I never suspected that. Just what kind of Nintendo game is that to have such a title?
20:06:06 -!- MrBismuth has quit (Read error: Connection reset by peer).
20:08:42 -!- Lykaina has quit (Quit: leaving).
20:32:16 -!- MrBismuth has joined.
20:53:03 -!- arseniiv has joined.
21:14:32 -!- imode has quit (Ping timeout: 276 seconds).
21:18:10 -!- tromp has joined.
21:38:07 -!- imode has joined.
22:00:01 -!- Lykaina has joined.
22:00:55 <Lykaina> this is the now-working arduino subset: http://sif.lesidhetree.com/sara/echidna/echidna-uno-doc_0003.pdf
22:14:48 -!- atslash has quit (Ping timeout: 258 seconds).
22:15:10 -!- atslash has joined.
22:22:50 -!- atslash has quit (Ping timeout: 240 seconds).
22:23:32 -!- atslash has joined.
22:32:08 <b_jonas> I said earlier that at work, I finally have a windows installation where none of the software messages are localized to hungarian.
22:32:47 <b_jonas> Well, this almost bit me back. The result is that MS Word defaults to letter paper size, and I have to change that explicitly.
22:42:10 -!- FreeFull has quit.
22:45:56 <kmc> how much time and money is wasted annually by the fact that letter and A4 are slightly different
22:54:30 <b_jonas> kmc: probably not much money, it just bothers the sense of aesthetic of geeks like us when people zoom documents down to fit the paper
22:57:05 <b_jonas> also the form that I have to fill for sending registered mail on snailmail post is half a centimeter higher than the envelopes that you usually use as the outer layer of such mail, so if I put them together in a folder to be able to find the pair easily at the post office, the top and bottom of the form likely gets crumpled
22:58:20 <b_jonas> the post office has been using the same form for decades, they probably have a huge warehouse filled with them because they were printed in a high quantity when they didn't yet know how unpopular the internet would make snail mail
22:59:21 -!- imode2 has joined.
23:00:29 -!- imode has quit (Ping timeout: 276 seconds).
23:01:34 <b_jonas> ah no! it's not the same warehouse full, because I have two different versions, and one of them refers to a government law dated to 2012
23:02:17 <b_jonas> they still all have the checkbox saying package, despite that you need the other red form for packages, not this green form
23:04:25 <b_jonas> and I have one of the versions on two different colored paper sheets, so they probably weren't all printed together
23:04:57 <b_jonas> heck, I think I have at least three different versions, even ignoring the paper color
23:11:38 -!- olsner has quit (Ping timeout: 240 seconds).
23:24:48 -!- imode2 has quit (Remote host closed the connection).
23:27:16 -!- imode has joined.
23:33:10 -!- olsner has joined.
23:38:26 -!- olsner has quit (Ping timeout: 240 seconds).