←2020-07-26 2020-07-27 2020-07-28→ ↑2020 ↑all
00:26:30 -!- xelxebar_ has quit (Quit: ZNC 1.7.2+deb3 - https://znc.in).
00:26:48 -!- xelxebar has joined.
00:38:03 -!- xelxebar has quit (Ping timeout: 240 seconds).
00:45:52 -!- xelxebar has joined.
01:45:39 -!- LKoen has joined.
01:59:45 <esowiki> [[Turinf machine]] N https://esolangs.org/w/index.php?oldid=76240 * Hakerh400 * (+2362) +[[Turinf machine]]
01:59:50 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=76241&oldid=76189 * Hakerh400 * (+21) +[[Turinf machine]]
01:59:53 <esowiki> [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=76242&oldid=76152 * Hakerh400 * (+21) +[[Turinf machine]]
02:08:47 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
02:12:16 -!- Phantom___Hoover has joined.
02:18:38 -!- Phantom___Hoover has quit (Ping timeout: 256 seconds).
02:50:38 <b_jonas> lol today's is a good one https://www.smbc-comics.com/comic/cantor
03:25:36 -!- adu has joined.
03:30:38 * pikhq would like to note that we math folk are prone to sudden cases of madness
03:32:17 <shachaf> What should the value for true be? 1 or -1?
03:33:30 <pikhq> Uh, I feel like I need more context for that
03:33:50 <zzo38> I think there are advantages and disadvantages for each way
03:35:07 <shachaf> OK, should booleans be signed or unsigned integers?
03:35:16 <shachaf> Assuming they're thought of as 1-bit integers.
03:35:47 <pikhq> I'd be tempted to say "unsigned"
03:36:05 <pikhq> idk, [-1, 0] feels like a weirder range for a data type than [0, 1]
03:48:29 <salpynx> -1 as true seems wrong. -1 = false 1 = true could be useful, -1 = none or null also works. If you're asking about 1 bit signed or unsigned, doesn't 1 bit just give you a sign?
03:50:57 <pikhq> Sure, but if you do it as 2's complement, it does end up making sense
03:51:03 <salpynx> maybe I need to think about this more, but 1 bit signed seems like -0 or +0
03:51:08 -!- adu has quit (Quit: adu).
03:53:07 <pikhq> 1 bit signed is: 1 bit is the sign bit, 0 bits are the data, so your max is 0, and your min is ~max - 1 = -1
03:53:32 <pikhq> erm, -max - 1
03:58:45 <salpynx> yes, that makes sense, as 2s complement for signed 1bit numbers. Is it useful though? Maybe, but doesn't seem especially connected to booleans. It's using 1 bit to represent something else
03:59:31 <pikhq> I make no claim that it is in any sense useful. :)
04:00:30 <shachaf> I've heard people say that booleans should be signed and I think it sounded reasonable at one point?
04:00:33 <shachaf> But I'm not sure why.
04:00:58 <pikhq> I bet it's so that all bits will be true if you use more than 1 bit to represent them.
04:01:46 <salpynx> I think I could accept signed booleans as -1 = false 0 = true
04:02:58 <salpynx> ... which is just inverted
04:05:22 <salpynx> next time I look at a truth table I'll be wondering whether those are signed or unsigned values...
04:13:45 <shachaf> pikhq: I figured that much, but why is that important? Is that the only thing?
04:13:54 <shachaf> I mean, I shouldn't be asking you, since you didn't make this claim.
04:13:54 <esowiki> [[Surtic]] M https://esolangs.org/w/index.php?diff=76243&oldid=75669 * Digital Hunter * (+215) /* Quine */
04:14:15 <pikhq> Yeah, I recall hearing it but super vaguely
04:17:53 <esowiki> [[Surtic]] M https://esolangs.org/w/index.php?diff=76244&oldid=76243 * Digital Hunter * (-1) /* |Quines */
04:56:03 -!- MDude has quit (Quit: Going offline, see ya! (www.adiirc.com)).
06:14:10 -!- xelxebar has quit (Remote host closed the connection).
06:14:29 -!- xelxebar has joined.
06:30:41 <zzo38> I read about German word "Umwelt", but in English it might be "umbworld", so I look that too in Wiktionary, it is there, and seems to be recent (from 2008, apparently)
06:32:48 -!- TheLie has joined.
07:02:40 -!- hendursaga has quit (Remote host closed the connection).
07:03:35 -!- hendursaga has joined.
07:06:40 -!- imode has quit (Ping timeout: 256 seconds).
07:36:15 -!- TheLie has quit (Remote host closed the connection).
07:39:22 -!- craigo has joined.
07:55:04 -!- kritixilithos has joined.
08:03:30 -!- hendursa1 has joined.
08:04:23 -!- kritixilithos has quit (Ping timeout: 240 seconds).
08:04:53 -!- kritixilithos has joined.
08:05:23 -!- hendursaga has quit (Ping timeout: 240 seconds).
08:30:12 -!- Phantom___Hoover has joined.
08:35:06 -!- Sgeo has quit (Read error: Connection reset by peer).
08:46:01 -!- sftp has quit (Ping timeout: 272 seconds).
08:47:02 -!- sftp has joined.
09:04:43 -!- b_jonas has quit (Quit: leaving).
10:04:25 -!- t20kdc has joined.
10:05:03 -!- kritixilithos has quit (Ping timeout: 240 seconds).
10:34:17 <esowiki> [[Esolang:Categorization]] https://esolangs.org/w/index.php?diff=76245&oldid=76239 * Ais523 * (-22) Undo revision 76239 by [[Special:Contributions/Icecream17|Icecream17]] ([[User talk:Icecream17|talk]]) rv, I don't think this edit adds anything to the page
10:37:53 -!- craigo has quit (Ping timeout: 256 seconds).
10:41:56 -!- kritixilithos has joined.
11:03:30 -!- Lord_of_Life_ has joined.
11:06:19 -!- Lord_of_Life has quit (Ping timeout: 246 seconds).
11:06:27 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
11:11:46 <esowiki> [[Turi]] M https://esolangs.org/w/index.php?diff=76246&oldid=75407 * Osmarks * (+4) improvement of some kind
11:18:07 <esowiki> [[Turi]] M https://esolangs.org/w/index.php?diff=76247&oldid=76246 * Osmarks * (+90) clarify digit
11:19:00 <esowiki> [[Turi]] M https://esolangs.org/w/index.php?diff=76248&oldid=76247 * Osmarks * (+0) fix F# interpreter
11:21:09 -!- Frater_EST has joined.
11:23:52 -!- adu has joined.
11:30:15 <esowiki> [[Turi]] https://esolangs.org/w/index.php?diff=76249&oldid=76248 * Osmarks * (+693) command, command
11:30:43 <esowiki> [[Turi]] M https://esolangs.org/w/index.php?diff=76250&oldid=76249 * Osmarks * (+1)
11:37:23 <esowiki> [[Turi]] https://esolangs.org/w/index.php?diff=76251&oldid=76250 * Osmarks * (+160)
11:52:53 <esowiki> [[Subreal]] https://esolangs.org/w/index.php?diff=76252&oldid=76211 * RocketRace * (+3468) Begin detailing infinite surreal numeric literals
11:54:45 -!- sftp has quit (Ping timeout: 272 seconds).
11:55:35 <esowiki> [[Subreal]] M https://esolangs.org/w/index.php?diff=76253&oldid=76252 * RocketRace * (-1) Syntax
11:55:41 -!- aaaaaa has joined.
11:57:02 -!- sftp has joined.
12:03:23 -!- kritixilithos has quit (Ping timeout: 240 seconds).
12:08:50 -!- craigo has joined.
12:16:12 -!- xkapastel has joined.
12:16:31 -!- wib_jonas has joined.
12:17:42 <wib_jonas> shachaf: re https://esolangs.org/logs/2020-07-27.html#lo "What should the value for true be? 1 or -1?" => I talked about that in #esoteric previously, you may find it somewhere in the chat logs. It's complicated.
12:37:55 -!- rain1 has quit (Remote host closed the connection).
12:38:15 -!- rain1 has joined.
12:51:56 <wib_jonas> shachaf: Basically -1 is the better representation more often, because of boolean masking operations, but 1 is sometimes also useful, partly because of intrinsic use like summing a boolean array to get a count, partly because of the x86_64 SETcc instructions inherited from 386 back when branchless code wasn't yet a priority;
12:53:24 <wib_jonas> however, that applies for low-level code, in high level code you probably want to decouple the representation from the symbolic value, so the optimizer decides the representation which can differ for different pieces of code, but when you convert a bool to an int a true value is converted to 1, this is already the case in C and C++.
12:53:57 <wib_jonas> The optimizer or interpreter can also choose different sizes (1 bit, 1 byte, 2 bytes, 4 bytes, 8 bytes etc) for the booleans.
12:54:15 <wib_jonas> Or can temporarily store them in the carry flag, for single boolean tests.
12:55:06 <wib_jonas> pikhq, salpynx: ^
12:55:18 <int-e> I'm pretty sure SETcc exist in order to accomodate boolean values 0/1, not vice versa.
12:55:36 <int-e> i.e., if the C convention had been -1 for true, SETcc would just set all the bits.
12:56:03 <wib_jonas> int-e: because C was already using that, and because on those old CPUs the difference rarely matters, because you don't want to have branchless code.
12:56:21 <wib_jonas> but at the same time fortran and basic was also ran on those cpus and is using different conventions
12:57:27 <wib_jonas> all the new vector instructions use -1 as the representation when they write a true, and check the sign bit to decide if a boolean is true.
12:58:03 <wib_jonas> and of course 1 is useful for indexing arrays.
13:05:56 <int-e> IIRC i386 added a prefetch queue so was the first x86 CPU to suffer from branching code.
13:06:46 <int-e> Sure, writing -1 is more useful for masking tricks.
13:08:40 <int-e> And I believe SETcc is really a historical accident... an instruction clearly in the CISC mindset (something like, make every subexpression a compiler face translatable into one or two instructions) that turned out to be valuable for deeply pipelined architectures that hate (unpredictable) branches.
13:10:25 -!- salpynx has quit (Remote host closed the connection).
13:10:44 <wib_jonas> int-e: I'm not sure, but I think even 286 could technically benefit from branchless code, because it still does prefetching like the 6502 does, so a taken branch costs two extra cycles compared to a non-taken branch, but I might be mixing up cpus here.
13:11:26 <wib_jonas> but the pipeline just gets deeper and deeper after that, so the later a non-mobile cpu is, the more it benefits from branchless code
13:11:38 <wib_jonas> (there's some non-monotonicity in the low-power mobile cpus)
13:12:50 <wib_jonas> it's just that that 2 cycle penalty for the taken branch is almost always cheaper than executin both branches
13:13:51 <int-e> hmm, https://en.wikipedia.org/wiki/Prefetch_input_queue suggests this goes back all the way to 8086 and 8088. Hmm.
13:14:12 <wib_jonas> but you're right that a lot of the instruction set are historical instructions, the whole x86 instruction set started out as being able to do anything in a *single* instruction that a z80 instruction can do, as if being a single instruction was somehow an advantage
13:14:20 <int-e> but maybe i386 was the first to use it for more than one instruction in advance?
13:14:35 <wib_jonas> (mind you, one instruction instead of multiple is a pretty good heuristic, barring other complications, but still)
13:14:42 -!- salpynx has joined.
13:15:00 <wib_jonas> int-e: yeah, probably, the 386 has a longer penalty for taken branches because it has a decode queue and always decodes as if branches weren't taken
13:15:19 <wib_jonas> or something, I totally forgot all this historical crap because it's irrelevant for anything I program these days
13:15:50 <wib_jonas> I don't claim that I understand current cpus, nobody does, but I try to have heuristics that apply to them
13:15:58 <int-e> I mainly remember because on i386 you could *observe* the prefetch queue length with self-modifying code.
13:16:23 <int-e> (poke less than 16 bytes ahead of the current instruction and the newly written instruction won't be executed this time.
13:16:26 <int-e> )
13:16:45 <int-e> Later processors fixed that, restoring the illusion of sequential writes and reads.
13:17:11 <wib_jonas> int-e: yes, but technically that's true on any modern x86, and it's still screwed by 386 compatibility, as in, every time you do any branch, even a short conditional branch, it has to make sure that self-modifying code is executed correctly (even if slowly), and that slows down the whole architecture even when you don't want to use self-modifying
13:17:11 <wib_jonas> code much
13:17:43 <wib_jonas> int-e: no I don't think so, I think x86 still promises only that self-modifying code executess correctly only if you do a branch instruction between
13:18:06 <wib_jonas> that's for self-modifying in a single cpu core of course
13:18:27 <wib_jonas> but it's possible that the implementation is like what you say
13:18:27 <int-e> by "later" I mean the next few generations, so basically early Pentiums.
13:18:44 <wib_jonas> pentiums introduce out of order execution, right?
13:19:15 <int-e> I think so.
13:19:44 <wib_jonas> out of order execution with register renaming is such a crazy mad science invention, it's a wonder x86 cpus can do it without way too many stupid bugs
13:20:24 <wib_jonas> if there weren't actual cpus doing it, I'd guess it was theoretically possible but never worth in practice, because you can't implement it correctly and gain performance with it
13:20:42 <int-e> But as prefetch queues grew, they were increasingly likely to break good old-fashioned self-modifying 8086 code, so for a while there was a good reason to invalidate the queue when it overlapped with a store.
13:21:21 <wib_jonas> like, caching memory? sure, the memory is several clock cycles from you, signals can't propagate that fast, so you put a small cache close to the cpu. it's magic, and hard to implement, but it is worht.
13:21:59 -!- tromp has joined.
13:22:11 <wib_jonas> "good old-fashioned self-modifying 8086 code" => is that so common really? x86 has index registers, most code doesn't self-modify so quickly. but maybe I just don't read old code.
13:22:28 <int-e> it was common
13:23:04 <int-e> if only because for example, some of the libraries that shipped with compilers contained self-modifying code. (Borland's BGI had quite a few instances.)
13:23:54 -!- tromp_ has quit (Ping timeout: 260 seconds).
13:24:35 <int-e> Things like Bresenham line-drawing code that encodes the direction taken by replacing incs with decs as needed, and possibly modifying immediates of some instructions because registers were so scarce.
13:25:18 <int-e> Obviously none of this is sane once you have multiple threads.
13:27:03 <int-e> And it's also pretty firmly in the domain of hand-written assembly code.
13:29:48 <wib_jonas> int-e: self-modifying code sure, but the kind of self-modifying code that doesn't do a jump instruction between? every cpu technically has to support some kind of self-modifying code, so you can load a program.
13:30:01 <wib_jonas> replacing incs with decs as needed? wow
13:30:53 <wib_jonas> I've heard of BASIC code that uses machine code to replace between WRITE and READ for its save/load code...
13:30:59 <wib_jonas> no wait, it's not READ
13:31:06 <wib_jonas> replaces between PUT and GET
13:32:30 <int-e> wib_jonas: The only reason I know a bit about this is that I once wrote code to measure the length of the prefetch queue. It produced interesting numbers on 386, 486, but on Pentium it always resulted in 0. I don't recall whether I ever ran it on a 286.
13:33:08 <wib_jonas> as in, game code printed into a magazine for a particular BASIC computer, probably commodore 64, where the game can be saved or loaded by writing the values of some variables and arrays in a partly unrolled loop.
13:33:22 <int-e> (it worked by poking an inc instruction into a bunch of nops that were about to be executed)
13:34:18 <fizzie> I think modifying operands of memory-referencing instructions is reasonably common in Z80 code.
13:34:48 -!- kritixilithos has joined.
13:34:53 <int-e> It happens in MIX code too :P
13:35:21 <int-e> (Unless my memory deceives me very badly. It might.)
13:36:35 <int-e> Isn't there a MIX-in-MIX emulator in TAoCP that relies on copying instructions for most of its work?
13:37:03 <int-e> (Not quite the same, but also an instance of heavily self-modifying code.)
13:43:43 <fizzie> rfk86 has one case that changes the immediates in an upcoming pair of "bit N, a" and "set N, a" instructions, because I don't think there's a variant of those instructions that takes a register operand.
13:44:29 <wib_jonas> int-e: what happens in MIX code? oh yeah, early self-modifying code. sure, it's a 70s computer, it made sense back then, most MIX implementations probably have synchronized memory access and don't even bother prefetching a single instruction
13:45:19 <wib_jonas> in MIX, you effectively have to use self-modifying code to do function returns efficiently. you could avoid them, but it would be slower.
13:46:13 <wib_jonas> MMIX fixes this, it has very strict rules about when self-modifying code is allowed, even on a single thread:
13:47:15 <wib_jonas> there's a single special instruction to remove a memory range from code caches, and you must execute it between writing memory and executing it, no matter how many other things you do in between
13:47:41 <wib_jonas> so the linker would execute that instruction on all the code loaded before it transfers control to the program
13:49:16 <wib_jonas> and the operating system probably executes that instruction when zeroing a page before mapping it, so that a program can't sneakily get side channel information about data that was mapped to a different process, which sound silly, but MMIX's operating system interface is always like this,
13:49:42 <wib_jonas> .
13:51:38 <wib_jonas> so I guess to zero a page, you first call the pre-write instruction to throw away (roll back) any write-behind data cache, then you zero each word, then you call the pre-execute instruction to make sure the code cache doesn't leak information
13:52:37 <wib_jonas> and this just gets worse if the cpu has three different kinds of branch prediction caches, like x86 has, and you have to make sure neither of them can leak side channel data from your cryptography code
14:04:03 <wib_jonas> Ok I'm scared now. I'm writing code, I'm making a class with several arithmetic operators overloaded on it, it's intended to be used mixed with ordinary integers in a weakly typed language where you don't know in compile time if a variable has an integer or this type, I recognize that this is usually two much magic,
14:04:10 -!- hendursa1 has quit (Quit: hendursa1).
14:04:27 -!- hendursaga has joined.
14:04:48 <wib_jonas> I already wrote multiple paragraphs of explanation for what the fuck this class does in comments, and I still haven't manged to convince myself that I should abandon this and do the more usual non-magic solution.
14:05:42 <wib_jonas> Either I'll realize that later, halfway into writing this or when maintaining the code, or if not, maybe operator overloading arithmetic operations is sometimes actually useful.
14:30:42 -!- salpynx has quit (Remote host closed the connection).
14:43:17 -!- Sgeo has joined.
15:07:32 -!- Arcorann has quit (Read error: Connection reset by peer).
15:17:03 -!- kritixilithos has quit (Ping timeout: 240 seconds).
15:25:51 -!- xkapastel has quit (Quit: Connection closed for inactivity).
15:49:05 -!- kritixilithos has joined.
16:15:15 -!- wib_jonas has quit (Quit: Connection closed).
16:22:31 -!- LKoen has joined.
16:35:09 <zzo38> I did remember reading a MIX-in-MIX emulator in TAoCP that relies on copying instructions for most of its work. (I only borrowed that book, so I do not still have.)
17:11:19 -!- b_jonas has joined.
17:24:59 -!- LKoen has quit (Remote host closed the connection).
17:44:34 -!- zzo38 has quit (Ping timeout: 256 seconds).
17:46:34 <esowiki> [[User:Palaiologos]] M https://esolangs.org/w/index.php?diff=76254&oldid=73739 * Palaiologos * (-59)
17:51:39 -!- zzo38 has joined.
18:52:17 -!- Phantom__Hoover has joined.
18:55:24 -!- Phantom___Hoover has quit (Ping timeout: 256 seconds).
19:05:31 -!- kritixilithos has quit (Quit: quit).
19:21:56 <rain1> https://groupprops.subwiki.org/wiki/Groups_of_order_2%5En check the last 2 entries of this table
19:34:02 -!- tromp has quit (Remote host closed the connection).
19:40:11 -!- tromp has joined.
19:41:41 -!- tromp has quit (Remote host closed the connection).
19:42:05 -!- tromp has joined.
19:44:31 <b_jonas> zzo38: I have a pair of M:tG rules theory questions. with "Skullbriar, the Walking Grave" plus "Gisa and Geralf", we can now have counters on a card on the stack. is it possible (in non-un magic) to have a counter on a sorcery or instant spell on the stack? if there's a lifelink or deathtouch counter on a card on the stack that isn't a sorcery or instant, is it possible for the keyword that it gives to
19:44:37 <b_jonas> matter for the rules before it's moved to another zone?
19:45:35 <b_jonas> I'm asking this because of a hypothetical nonexistant card that lets you directly put a counter on a spell.
19:46:27 <zzo38> b_jonas: Rule 122.1b says that keyword counters do count on objects in zones other than the battlefield, but it seems to say that if the object isn't in the battlefield, it has to be a card in order for the keyword counters to work, and that doesn't make much sense to me.
19:46:54 <zzo38> But lifelink and deathtouch would be suitable if the spell deals damage.
19:50:50 <b_jonas> zzo38: yes, and I know examples where a counter on a card in the gy or stack matters: a +1/+1 counter for Morbid Bloom, or a flying counter on a Skullbriar that you cast from the graveyard
19:50:50 <int-e> . o O ( enchant target counter )
19:51:39 <zzo38> int-e: Only players and objects can be targeted. (The rules previously allowed zones to be targeted too, but this is no longer the case.)
19:51:56 <b_jonas> (Hidden Spider works differently from the other Hidden enchantments, I know this because Hidden Spider is an actually useful card that I used in my green decks.)
19:52:46 <int-e> zzo38: Did they get rid of the golden rule that the card text wins?
19:53:28 <int-e> It's sill of course, maybe Un-territory.
19:53:29 <zzo38> int-e: No, but it even if the card text says something, it doesn't necessarily mean that the rules support it.
19:53:41 <int-e> *silly
19:53:47 <zzo38> (But, in Un-cards, you can ignore the fact that the rules don't support it.)
20:00:08 -!- salpynx has joined.
20:01:35 -!- MDude has joined.
20:02:39 <zzo38> (My own card set I am making with TeXnicard includes a fixed version of rule 122.1b, mentioned in the text of the "Rules" user variable.)
20:08:47 -!- xkapastel has joined.
20:28:09 -!- tromp has quit (Remote host closed the connection).
20:30:27 -!- tromp has joined.
20:51:06 -!- tromp has quit (Remote host closed the connection).
20:53:23 -!- tromp has joined.
22:01:23 -!- imode has joined.
22:15:43 -!- tromp has quit (Remote host closed the connection).
22:27:29 -!- aaaaaa has quit (Quit: leaving).
22:27:53 -!- adu has quit (Quit: adu).
22:42:52 -!- adu has joined.
23:02:42 -!- xkapastel has quit (Quit: Connection closed for inactivity).
23:04:34 -!- Lord_of_Life_ has joined.
23:06:57 -!- Lord_of_Life has quit (Ping timeout: 256 seconds).
23:06:57 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
23:10:42 -!- aaaaaa has joined.
23:19:18 -!- aaaaaa has left.
23:23:05 -!- adu has quit (Quit: adu).
23:31:32 -!- Arcorann has joined.
23:41:27 -!- V has joined.
←2020-07-26 2020-07-27 2020-07-28→ ↑2020 ↑all