←2021-04-24 2021-04-25 2021-04-26→ ↑2021 ↑all
00:05:28 -!- big_caballito has quit (Quit: leaving).
01:15:11 -!- sprock has quit (Quit: ...).
01:39:29 <imode> I'm trying to figure out the tree structure of a purely concatenative language.
01:39:39 <imode> and how it evolves over time.
01:40:56 <imode> 1 2 [add] comppose ! compose ! 3 4 [add] compose ! compose ! ! swap ! ! [add] ! <-- form two quotations, evaluate the first one, swap them, evaluate the second one, then add their results.
01:41:08 <imode> every time you see a "!", it should read "apply".
01:46:26 -!- deltaepsilon23 has joined.
01:46:29 -!- deltaepsilon23 has quit (Remote host closed the connection).
01:47:03 -!- oerjan has joined.
01:49:06 -!- delta23 has quit (Ping timeout: 268 seconds).
01:50:05 -!- delta23 has joined.
04:39:26 -!- MDude has quit (Quit: Going offline, see ya! (www.adiirc.com)).
05:58:39 -!- delta23 has quit (Quit: Leaving).
06:18:06 -!- Sgeo has quit (Read error: Connection reset by peer).
06:18:22 -!- Sgeo has joined.
06:18:37 <esowiki> [[NDBall]] https://esolangs.org/w/index.php?diff=82389&oldid=81619 * Aspwil * (+488)
06:31:51 -!- Sgeo has quit (Read error: Connection reset by peer).
06:32:01 -!- Sgeo has joined.
06:56:41 -!- delta23 has joined.
07:09:18 -!- deltaepsilon23 has joined.
07:10:56 -!- delta23 has quit (Ping timeout: 252 seconds).
07:26:34 -!- oerjan has quit (Quit: leaving).
07:52:40 <esowiki> [[Toki pi ilo nanpa]] https://esolangs.org/w/index.php?diff=82390&oldid=82346 * Olus2000 * (+179) Added External resources
07:52:45 -!- imode has quit (Ping timeout: 260 seconds).
08:07:36 <esowiki> [[Toki pi ilo nanpa]] M https://esolangs.org/w/index.php?diff=82391&oldid=82390 * Olus2000 * (+194) /* Expressions and operators */ added `nanpa nasa` for randomness
08:07:38 -!- hendursa1 has joined.
08:09:57 -!- hendursaga has quit (Ping timeout: 240 seconds).
08:31:07 <esowiki> [[NDBall]] https://esolangs.org/w/index.php?diff=82392&oldid=82389 * Aspwil * (+161) /* Language Overview */
08:38:55 -!- Sgeo has quit (Read error: Connection reset by peer).
08:44:11 -!- LKoen has joined.
09:27:11 -!- deltaepsilon23 has changed nick to delta23.
09:55:57 -!- mra90 has left ("Leaving").
10:07:13 -!- op_4 has quit (Quit: ZNC 1.7.2+deb3 - https://znc.in).
10:07:31 -!- maximum_yellow has joined.
12:17:33 <int-e> `` perl -e 'printf "%.1f %.1f %.1f %.1f", 1e-1, "1e-1", 0x1p-1, "0x1p-1"'
12:17:34 <HackEso> 0.1 0.1 0.5 0.0
12:20:22 <fizzie> Heh.
12:21:17 <int-e> More like meh, since I do have a string of the last form. And all I'm finding is "oh you don't have to convert strings to floats in perls because that happens automagically in a scalar context"
12:21:26 <int-e> Which is not helpful.
12:24:57 <fizzie> `perl-e printf "%.1f", eval "0x1p-1"
12:24:58 <HackEso> 0.5
12:25:04 <fizzie> Nothing eval can't solve. ;)
12:25:13 <int-e> b_jonas: have you run into this perchance?
12:25:48 <int-e> I really don't want eval... though I guess I could write down a pretty precise regexp for this case.
12:26:52 <fizzie> All I know is hex/oct, but that's just for integers.
12:27:44 <int-e> https://www.effectiveperlprogramming.com/2015/06/perl-v5-22-adds-hexadecimal-floating-point-literals/ only suggests 'eval' (possibly restricted) as well. Sigh. Oh well, I guess I'll do that then.
12:29:24 <fizzie> `perl-e printf "%.1f", (hex "0x1")*2**"-1"
12:29:25 <HackEso> 0.5
12:29:33 <fizzie> I guess you could always split it into that ^
12:31:03 <int-e> $_ = eval $_ if /^0x[0-9a-f]*(\.[0-9a-f]*)?p[+-][0-9]+$/; # ouch
12:32:21 <esowiki> [[NDBall]] M https://esolangs.org/w/index.php?diff=82393&oldid=82392 * PythonshellDebugwindow * (+13) /* Language Overview */ Deadlink
12:33:33 <fizzie> `perl-e $_ = "0x1p-1"; $_ = (hex $1)*2**$2 if /^(0x[0-9a-f]*(?:\.[0-9a-f]*)?)p([+-][0-9]+)$/; printf "%.1f", $_; # with the same regex
12:33:35 <HackEso> 0.5
12:34:10 <int-e> hmm true
12:34:59 <int-e> uhm
12:35:33 <int-e> oh, hex can do 1a.a1 kind of stuff?
12:36:14 <fizzie> Oh, right, that.
12:36:16 <fizzie> Yeah, no.
12:36:23 <fizzie> Didn't think of that. Awkward.
12:36:50 <int-e> ah, the example didn't have that. reading is hard :)
12:36:59 <fizzie> I guess you could still do it by applying an offset to the exponent.
12:37:25 <int-e> yeah no, it's not worth the effort, I'll trust the regexp instead
12:39:24 <int-e> oh right, there's \d for [0-9]
12:41:54 <int-e> But I guess in this context I prefer [0-9] (also, \d is different for unicode but that doesn't come up)
12:41:59 <fizzie> `perl-e $_ = "0x1.5p-1"; $_ = (hex $1.$2)*2**($3-4*length $2) if /^(0x[0-9a-f]*)(?:\.([0-9a-f]*))?p([+-][0-9]+)$/; printf $_; # just for completeness
12:42:01 <HackEso> 0.65625
12:44:01 <esowiki> [[Sabdt]] M https://esolangs.org/w/index.php?diff=82394&oldid=78268 * PythonshellDebugwindow * (-1) /* Function declaration */ typo
12:45:31 <fizzie> FWIW, I'm sure there's also some lower-level-than-eval function somewhere in B or somewhere that'd do it for you.
12:46:53 -!- delta23 has quit (Quit: Leaving).
12:57:59 <int-e> `perl-e printf"%g, %g\n", 0x1p-1074, 0x1.8p-1073
12:58:00 <HackEso> 4.94066e-324, 0
12:58:17 <int-e> flaws everywhere
13:01:25 <int-e> `interp c double x,y; sscanf("0x1p-1074 0x1.8p-1073", "%a %a", &x, &y); fprintf(stdout,"%a %a",x,y);
13:01:26 <HackEso> 0x0p+0 0x0.0007fp-1022
13:01:30 <int-e> this is... worse.
13:03:47 <fizzie> `interp c double x = 0x1p-1074, y = 0x1.8p-1073; printf("%a %a", x, y);
13:03:49 <HackEso> 0x0.0000000000001p-1022 0x0.0000000000003p-1022
13:04:10 <fizzie> Floats are hard. :/
13:05:02 <fizzie> If memory serves, the requirements for strtod (and indirectly scanf) are different than that for floating-point literals.
13:05:59 <int-e> it's still impressive how messed up the result for 0x1.8p-1073 is.
13:06:47 <fizzie> Hmm, they actually aren't for the special case of hexadecimal constants.
13:07:14 <int-e> another data point: 0x0p+0 0x0.07ffcp-1022
13:07:15 <fizzie> C11 "For hexadecimal floating constants when `FLT_RADIX` is a power of 2, the result is correctly rounded." "If the subject sequence [of strtod] has the hexadecimal form and `FLT_RADIX` is a power of 2, the value resulting from the conversion is correctly rounded."
13:07:28 <fizzie> I think that means you could report a bug.
13:07:49 <int-e> (of course, floating point is hard, and denormals are harder)
13:08:28 <int-e> fizzie: I was trying to show that your code is flawed because 2**($3-4*length $2) can underflow (so 0x1.8p-1073 being 0 is pretty much expected)
13:09:06 -!- arseniiv has joined.
13:10:02 <fizzie> (A /correctly rounded result/ means, 3.9p1, a "representation in the result format that is nearest in value, subject to the current rounding mode, to what the result would be given unlimited range and precision". Subnormal numbers may be a little bit of a grey area, since they're not required to exist, though I think a reasonable reading would mean if they *do* exist, a correctly rounded result must use
13:10:08 <fizzie> them.)
13:10:19 <int-e> `perl-e printf"%a, %a\n", 0x1p-1074, 0x3p-1074
13:10:20 <HackEso> 0x1p-1074, 0x1.8p-1073
13:12:02 <fizzie> I agree the 0x0.0007fp-1022 and especially the 0x0.07ffcp-1022 for 0x1.8p-1073 are pretty amazing.
13:12:10 <int-e> `perl-e printf"%a, %a\n", 0x1p-1074, 0x1.0p-1074 #another variation on the theme
13:12:11 <HackEso> 0x1p-1074, 0x0p+0
13:12:27 <int-e> So I guess Perl does pretty much what you suggested internally.
13:14:52 <int-e> Oh wait, it doesn't parse these at all, x and y are not intialized
13:15:53 <int-e> `interp c double x = 42,y = 42; sscanf("0x1p-1074 0x1.8p-1073", "%a %a", &x, &y); fprintf(stdout,"%a %a",x,y);
13:15:56 <HackEso> 0x1.5p+5 0x1.5p+5
13:16:05 <int-e> okay, that is embarrassing
13:18:11 <fizzie> Oh.
13:19:33 <int-e> strtod handles those correctly. phew.
13:20:17 <int-e> `interp c double x = strtod("0x1p-1074",0), y=strtod("0x1.8p-1073",0); fprintf(stdout,"%a %a",x,y);
13:20:20 <HackEso> 0x0.0000000000001p-1022 0x0.0000000000003p-1022
13:21:02 <int-e> That's a relief. But it's also annoying that *scanf don't seem to support this format.
13:21:31 <fizzie> `interp c double x = 42,y = 42; sscanf("0x1p-1074 0x1.8p-1073", "%lf %lf", &x, &y); fprintf(stdout,"%a %a",x,y);
13:21:33 <HackEso> 0x0.0000000000001p-1022 0x0.0000000000003p-1022
13:21:43 <fizzie> You forgot the 'l', and turns out %a is alias of %f.
13:21:46 <int-e> uh
13:21:51 <int-e> thanks
13:22:23 <fizzie> I guess it's an out-of-range error for a `float`, which is why it didn't assign anything.
13:22:34 <int-e> And as floats these are 0, so that explains the near-0 results we saw
13:22:35 <int-e> sigh
13:23:27 <int-e> Right, the thing that led me astray here is the implicit conversion to double in printf. C can be nasty.
13:24:21 <int-e> (because of varargs magic)
13:25:16 <int-e> (And while I do use C quite a bit, I hardly ever parse anything involving floating point numbers.)
13:28:20 -!- Lord_of_Life has quit (Ping timeout: 265 seconds).
13:56:13 -!- Lord_of_Life has joined.
13:58:39 -!- MDude has joined.
14:03:37 -!- dionys has quit (Ping timeout: 265 seconds).
14:16:27 -!- dionys has joined.
15:13:35 -!- xkapastel has joined.
16:05:25 <b_jonas> int-e: I think hex float syntax is newer than perl, so they didn't just want to change how a string is converted to a number for compatibility. but I don't know how to parse hex floats in perl, I haven't been doing perl for a while.
16:08:01 <int-e> b_jonas: Probably, but what's the excuse for not adding a function for the purpose then? (Unless I missed one...)
16:08:07 -!- imode has joined.
16:11:24 <b_jonas> int-e: they rarely add new core functions these days. there's probably something in a module.
16:12:21 <b_jonas> not that python's treatment of hex float format is much better...
17:41:52 <int-e> `` python -c 'print (float.hex(0.1), float.fromhex("0x1.1p-1"))'
17:41:53 <HackEso> ​('0x1.999999999999ap-4', 0.53125)
17:42:30 -!- Sgeo has joined.
17:42:31 <int-e> b_jonas: no literals apparently, but as you can see, they have a function for converting a hex string to a float
17:44:42 <int-e> which feels more normal to me than having a literal syntax for numbers but not way to parse that same format *shrugs*
17:45:10 <int-e> I've complained, and I've solved my immediate problem. It's mostly good now, I'll live :)
17:57:42 <esowiki> [[Airline food]] https://esolangs.org/w/index.php?diff=82395&oldid=81929 * Largejamie * (+68) /* Overview */
17:57:58 <esowiki> [[Airline food]] https://esolangs.org/w/index.php?diff=82396&oldid=82395 * Largejamie * (-2) /* Overview */
18:01:29 -!- grimler32 has quit (Quit: Leaving).
18:05:58 <b_jonas> int-e: the problem is just that
18:06:20 <b_jonas> `python3 -cprint("%d %X %g" % (71, 71, 71/2))
18:06:21 <HackEso> 71 47 35.5
18:06:36 <b_jonas> but there's no format specification for hex floats, you have to call an extra function to format to a hex float for some reason
18:06:52 <b_jonas> `python3 -cprint("%a" % (71/2,))
18:06:53 <HackEso> 35.5
18:07:02 <b_jonas> `python3 -cprint("%A" % (71/2,))
18:07:03 <HackEso> Traceback (most recent call last): \ File "<string>", line 1, in <module> \ ValueError: unsupported format character 'A' (0x41) at index 1
18:07:07 <b_jonas> `python3 -cprint("%X" % (71/2,))
18:07:08 <HackEso> Traceback (most recent call last): \ File "<string>", line 1, in <module> \ TypeError: %X format: an integer is required, not float
18:07:28 <b_jonas> I mean %a was already used, but there's no other format letter for this either
18:07:47 -!- Lord_of_Life_ has joined.
18:08:59 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
18:10:57 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
18:17:10 <fizzie> I thought it was all about f-strings nowadays, and not the % operator. But those don't seem to have a syntax for hex floats either.
18:17:13 <fizzie> https://docs.python.org/3/library/string.html#format-specification-mini-language "The available presentation types for float and Decimal values are: ... eEfFgGn% ..."
18:18:17 <fizzie> They could've easily included a/A *there*, because right now it just throws "ValueError: Unknown format code 'a' for object of type 'float'".
18:19:09 <fizzie> `python3 -cprint(f"{0.4:.2%}") # TIL
18:19:10 <HackEso> 40.00%
18:20:53 <int-e> `python3 -cprint(f"{0.4:.2‰}")
18:20:54 <HackEso> Traceback (most recent call last): \ File "<string>", line 1, in <module> \ ValueError: Unknown format code '\x2030' for object of type 'float'
18:23:41 <fizzie> Let's not get carried away here.
18:23:58 <fizzie> That's the sort of thing you see on our wiki, not in a serious language.
18:24:43 * int-e checks the channel name
18:25:22 <int-e> I think I tried it in the right place :)
18:27:09 <fizzie> I think you could write a wrapper class to support ‰ though, because AIUI the way it works is, the whole format specification gets passed to the __format__ method, which can interpret it in arbitrary ways.
18:27:46 <esowiki> [[Special:Log/newusers]] create * Angel * New user account
18:27:47 <fizzie> I don't know how to write Python oneliners though. Is it even possible to express arbitrary Python constructs without using a newline?
18:28:26 <imode> semicolons should work? good question.
18:28:34 <imode> oneliners can take the form of comprehensions.
18:31:59 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=82397&oldid=82384 * Angel * (+269) /* Introductions */
18:32:48 <fizzie> Yeah, I'm just wondering how you'd for example declare a class, and then end that class declaration and do something using it.
18:37:37 <imode> don't think that's possible. :\
18:38:06 <imode> kind of why I don't like Python as a language.
18:40:21 -!- hendursa1 has quit (Ping timeout: 240 seconds).
18:58:12 -!- Lord_of_Life has quit (Read error: Connection reset by peer).
19:01:30 -!- Lord_of_Life has joined.
19:06:29 -!- delta23 has joined.
19:07:35 -!- Soni has quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.).
19:08:35 <esowiki> [[--yay]] N https://esolangs.org/w/index.php?oldid=82398 * Angel * (+2317) Created page with "[[--yay]] is a [[Category:stack-based]] esoteric programming programming language created with the goal of creating an esoteric programming language (I know, very impressive,..."
19:08:57 <esowiki> [[Talk:--yay]] N https://esolangs.org/w/index.php?oldid=82399 * Angel * (+0) Created blank page
19:19:40 -!- xkapastel has quit (Quit: Connection closed for inactivity).
19:59:52 -!- Lord_of_Life_ has joined.
20:02:47 -!- Lord_of_Life has quit (Ping timeout: 252 seconds).
20:02:57 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
20:23:59 -!- Soni has joined.
20:29:01 <b_jonas> fizzie: I hate all the f-streams and bracket style format languages.
20:37:56 <int-e> the ability to write oneliners is overrated
20:42:28 <shachaf> I would certainly appreciate it.
20:42:50 <shachaf> Using the Python REPL to define functions is awful. If you make one mistake you have to go back and repeat every other line.
20:43:24 <int-e> REPLs are overrated too. Write it to a file, load it.
20:43:58 <int-e> (especially when the REPL cannot save definitions... which I believe is the case for python)
20:44:10 <shachaf> Even when using it as a calculator?
20:44:43 <shachaf> I use ghci as a REPL and still define functions.
20:44:43 <int-e> I guess I don't use Python as a calculator.
20:45:09 <shachaf> I don't know whether Python's REPL can save definitions, but if it did it automatically I'd disable it.
20:45:16 <int-e> You may have a point there... I like simple putting one-line definitions in ghci
20:45:18 <shachaf> I disable history in almost all REPLs, and also less search history, etc.
20:45:24 <int-e> simple putting -> putting simple
20:45:27 <shachaf> I mean the program `less`.
20:45:48 <int-e> the `less` history annoys me
20:45:54 <int-e> the `ghci` history is useful :P
20:46:03 <int-e> (reverse-i-search)`let ': let c n 0 = 1; c n k = c (n-1) (k-1) * n `div` k
20:46:09 <shachaf> In bash I have it set up to not save history when I exit, except if I explicitly ask it to.
20:46:30 <int-e> (that right there is my most common definition in ghci)
20:47:00 <shachaf> That's a pretty common definition.
20:47:40 <int-e> uh. how do I parse that
20:48:27 <shachaf> I mean, everyone wants that one.
20:48:32 <shachaf> And it's tragically missing.
20:48:43 <shachaf> I do put a bunch of definitions and imports in my .ghci.
20:49:05 <shachaf> Except ghci startup has gotten so slow that now I don't have them in by default.
20:49:08 <int-e> Meh .ghci is all wrong though.
20:49:48 <int-e> I believe .ghci is sourced twice if you run ghci in your home directory. Which I do a lot. But maybe that's fixed.
20:50:14 <shachaf> Looks like it's only once.
20:50:16 <int-e> But worse, it's picked up from whatever local directory I happen to be in and I don't want that at all.
20:50:57 <shachaf> Hmm, doesn't seem great.
20:51:01 <int-e> Too much browsing third-party code, too much using `ghci` as a calculator in whatever shell I happen to have open.
20:51:01 <shachaf> *** WARNING: . is writable by someone else, IGNORING!
20:51:32 <int-e> So I use alias ghci='ghci -ignore-dot-ghci'
20:51:39 <shachaf> Makes sense.
20:52:36 <int-e> (Hmm, cann I still provide a global .ghci file *after* giving that option? It's been a long time since I considered this.)
20:52:50 <shachaf> You could try -ghci-script
20:53:06 <shachaf> Seems to work.
20:53:26 <myname> why don't you just empty .ghci then?
20:55:02 <int-e> myname: which problem does that solve?
20:55:16 <myname> you don't need the alias
20:55:38 <int-e> myname: the alias is for not picking up third party's .ghci files
20:57:57 <int-e> shachaf: thanks for the discussion :) Yes, -ghci-script works in conjunction with -ignore-dot-ghci
20:58:12 <shachaf> myname: ghci reads ./.ghci, not just ~/.ghci.
20:58:20 <myname> ah
20:58:44 <shachaf> Now you can define c once and for all.
20:58:51 <int-e> already did
20:59:04 <int-e> it's my definition of choice
20:59:19 <shachaf> The main use of .ghci is to enable all the extensions upfront, since enabling them whenever I test something is so much typing.
20:59:44 <shachaf> I have 43 extensions enabled.
20:59:49 <int-e> ouych
20:59:52 <int-e> -y
20:59:55 <shachaf> No, 40, since a few are commented out.
21:00:11 <shachaf> Also I don't do much Haskell anymore so it's all irrelevant anyway.
21:00:35 <int-e> I'm not convinced that I can even name 40 extensions on the spot :)
21:01:12 <int-e> (yes, I can do :set -X<tab>)
21:01:28 -!- harha_ has quit (Quit: ZNC - https://znc.in).
21:01:43 <shachaf> One of them is NoMonomorphismRestriction. Is that an extension?
21:01:45 <int-e> I guess the main thing here is that I never got into the really deep type hackery.
21:01:59 <int-e> Sure, it is.
21:02:29 <shachaf> One of the funny extensions whose name starts with No.
21:02:30 <int-e> I guess it's incomparable if you look at code being accepted or not.
21:02:44 <shachaf> You can see an old .ghci at https://slbkbs.org/ghci.txt
21:03:38 <shachaf> SOme of these are a bit silly.
21:04:48 <shachaf> Oh, the other thing is, when you enable extensions in your .ghci, you can ghci a file and not have to write the extensions at the top.
21:04:59 <shachaf> Which is very convenient even when you're experimenting in a file instead of the REPL.
21:05:38 <shachaf> I wonder what kind of type hackery counts as "really deep".
21:06:31 <int-e> polykinded type family types of things
21:06:52 -!- harha_ has joined.
21:07:32 <int-e> In ghci I usually get away with one or two extensions at a time, and often none at all.
21:07:58 -!- arseniiv_ has joined.
21:10:56 -!- arseniiv has quit (Ping timeout: 260 seconds).
21:13:13 <shachaf> Personally, I'm into kind hackery and value hackery, but not type hackery.
21:13:22 <shachaf> It's a parity thing.
21:13:30 <shachaf> Too bad GHC has type-in-type and ruins this.
21:13:30 <int-e> pfft
21:16:10 <shachaf> Do you like distributed consensus? I had some questions about Paxos, I think.
21:33:03 <int-e> . o O ( faux Paxos )
21:33:44 <int-e> Anyway, nah... never studied the stuff in detail.
21:38:00 -!- 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.”).
22:28:56 <arseniiv_> TIL how to compose permutations given in cycle form, it’s surprisingly natural
22:29:01 -!- arseniiv_ has changed nick to arseniiv.
22:30:40 <arseniiv> to compose a permutation σ in cycle form with a single cycle c, you kind of place portals right before all elements in σ which belong to c and then “re-glue” as needed
22:31:03 <arseniiv> and then you just compose with all remaining cycles one by one
22:31:50 <arseniiv> portals were my great discovery, before that I didn’t think you can multiply cycles on paper without converting them to substitutions and back
22:33:15 <arseniiv> I don’t know if someone teaches that somewhere, but probably this method is implemented somewhere in GAP CAS, at least, as there are primitive permutation objects which you represent in cycle form and they don’t belong to any predefined group
22:35:12 <arseniiv> one certainly can inject all multiplied permutations into a certain minimal S_n group and compute using substitution form and then convert back to cycles but now I see this isn’t a necessity at all
22:35:33 <arseniiv> I like liberating moments like those
22:43:30 <arseniiv> the strangest is that I wouldn’t end up with this on my own. I ended up here because I helped a person to prove you can’t make a certain class of permutations by composing just m transpositions. The proof ended up surprisingly simple but side effect was discovering this for myself
22:47:31 <arseniiv> (the precise statement is: if a permutation from S_n has m cycles, including fixed points, then you can get it by composing ≥ n − m transpositions, and can’t for less than that. The simple truth there is that by composing with a transposition, you either add or subtract 1 from that number d, and that () has d = 0, so naturally, just induction and you’re done
22:48:12 <arseniiv> )
22:57:52 <int-e> arseniiv: and you have to adhere to the parity restriction too
23:00:00 <arseniiv> int-e: shouldn’t it be included in d? Parity is (−1)^d
23:00:23 <int-e> arseniiv: the portal thing... note that (a b c) can be read as a -> b, b -> c, c -> a; so (a b c) (b d) with a "portal" between the b-s makes a -> b -> d the composition of two table lookups.
23:01:18 <arseniiv> I need of course to add that my thing only proves that no < n − m suffices, and proving n − m suffices is another thing which in my case was proven beforehand so I helped just with this one
23:02:32 <int-e> arseniiv: You can basically prove the parity property, but you didn't mention it. (I mean: n-m works, n-m+1 doesn't, n-m+2 works agein, n-m+3 doesn't, etc.)
23:02:34 <arseniiv> int-e: yeah, of course both things are equivalent but converting from tables to cycles and back is still not good when you use only tables or only cycles
23:02:53 <int-e> arseniiv: I just never write down the tables.
23:03:18 <arseniiv> int-e: ah, yeah, I mis-that-thinged the proposition
23:04:39 <arseniiv> int-e: now I probably wouldn’t too, though I almost don’t deal with permutations by hand at all in any case
23:05:09 <arseniiv> though tables of course are useful for some demonstrations, I don’t remember which…
23:06:46 <int-e> say: (1 2 3) (3 4 5) (2 5): 1 maps to 2, then 5. 5 maps to 3, 3 maps to 1. That's (1 5 3). And 2 maps to 3, then 4; 4 maps to 5 then 2, so (2 4). And that's the whole result in cycle form: (1 5 3) (2 4)
23:08:11 <int-e> The point being, you can do all this fairly easily without every writing down a table. But applying a permutation to a single element is the same as such a table lookup.
23:08:21 <int-e> every -> ever
23:09:38 <int-e> Knuth actually devotes some space on algorithms for this in TAoCP.
23:09:51 <int-e> (I forgot the details.)
23:13:55 <arseniiv> oh, didn’t read TAoCP extensively. No surprise he would do that there, though!
23:14:20 <arseniiv> yep, I mean for some reason before yesterday I thought multiplying cycles would be harrd
23:15:01 <arseniiv> I thought when implementing something in that vein several years ago, probably
23:15:19 <arseniiv> there were two classes for each representation, for that matter
23:15:36 <int-e> it's hard... in that you can mess things up very easily :)
23:16:18 <arseniiv> there is a common mistake when composing tables too, I knew about it and still made it a couple of times
23:17:05 <arseniiv> forgetting to add elements which aren’t mapped to anything in the first table (and thus usually absent from its keys)
23:17:23 <arseniiv> the keys of a corresponding map
23:44:24 <esowiki> [[Suptiftam]] M https://esolangs.org/w/index.php?diff=82400&oldid=81912 * PythonshellDebugwindow * (+1) /* Hello, world! */ Fix
23:52:30 -!- delta23 has quit (Quit: Leaving).
←2021-04-24 2021-04-25 2021-04-26→ ↑2021 ↑all