< 1619309128 295426 :big_caballito!~bcbo@184.53.32.192 QUIT :Quit: leaving < 1619313311 664587 :sprock!~sprocklem@unaffiliated/sprocklem QUIT :Quit: ... < 1619314769 86496 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :I'm trying to figure out the tree structure of a purely concatenative language. < 1619314779 917545 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :and how it evolves over time. < 1619314856 281953 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :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. < 1619314868 648105 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :every time you see a "!", it should read "apply". < 1619315186 987962 :deltaepsilon23!~deltaepsi@unaffiliated/deltaepsilon23 JOIN :#esoteric < 1619315189 753611 :deltaepsilon23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Remote host closed the connection < 1619315223 649481 :oerjan!oerjan@sprocket.nvg.ntnu.no JOIN :#esoteric < 1619315346 829166 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Ping timeout: 268 seconds < 1619315405 974657 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 JOIN :#esoteric < 1619325566 420565 :MDude!~MDude@71.50.52.250 QUIT :Quit: Going offline, see ya! (www.adiirc.com) < 1619330319 687596 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Quit: Leaving < 1619331486 472801 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net QUIT :Read error: Connection reset by peer < 1619331502 809906 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net JOIN :#esoteric > 1619331517 842428 PRIVMSG #esoteric :14[[07NDBall14]]4 10 02https://esolangs.org/w/index.php?diff=82389&oldid=81619 5* 03Aspwil 5* (+488) 10 < 1619332311 64576 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net QUIT :Read error: Connection reset by peer < 1619332321 525338 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net JOIN :#esoteric < 1619333801 949561 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 JOIN :#esoteric < 1619334558 784286 :deltaepsilon23!~deltaepsi@unaffiliated/deltaepsilon23 JOIN :#esoteric < 1619334656 957501 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Ping timeout: 252 seconds < 1619335594 505319 :oerjan!oerjan@sprocket.nvg.ntnu.no QUIT :Quit: leaving > 1619337160 915918 PRIVMSG #esoteric :14[[07Toki pi ilo nanpa14]]4 10 02https://esolangs.org/w/index.php?diff=82390&oldid=82346 5* 03Olus2000 5* (+179) 10Added External resources < 1619337165 911438 :imode!~imode@unaffiliated/imode QUIT :Ping timeout: 260 seconds > 1619338056 65073 PRIVMSG #esoteric :14[[07Toki pi ilo nanpa14]]4 M10 02https://esolangs.org/w/index.php?diff=82391&oldid=82390 5* 03Olus2000 5* (+194) 10/* Expressions and operators */ added `nanpa nasa` for randomness < 1619338058 830458 :hendursa1!~weechat@gateway/tor-sasl/hendursaga JOIN :#esoteric < 1619338197 806238 :hendursaga!~weechat@gateway/tor-sasl/hendursaga QUIT :Ping timeout: 240 seconds > 1619339467 775737 PRIVMSG #esoteric :14[[07NDBall14]]4 10 02https://esolangs.org/w/index.php?diff=82392&oldid=82389 5* 03Aspwil 5* (+161) 10/* Language Overview */ < 1619339935 514602 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net QUIT :Read error: Connection reset by peer < 1619340251 73678 :LKoen!~LKoen@92.163.9.109.rev.sfr.net JOIN :#esoteric < 1619342831 923802 :deltaepsilon23!~deltaepsi@unaffiliated/deltaepsilon23 NICK :delta23 < 1619344557 171882 :mra90!Martin@nat/intel/x-tfhlxjpipwrgafjm PART #esoteric :"Leaving" < 1619345233 518051 :op_4!~tslil@2a01:4f8:c0c:7952::1 QUIT :Quit: ZNC 1.7.2+deb3 - https://znc.in < 1619345251 404810 :maximum_yellow!~tslil@2a01:4f8:c0c:7952::1 JOIN :#esoteric < 1619353053 17360 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`` perl -e 'printf "%.1f %.1f %.1f %.1f", 1e-1, "1e-1", 0x1p-1, "0x1p-1"' < 1619353054 19921 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0.1 0.1 0.5 0.0 < 1619353222 268070 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Heh. < 1619353277 690004 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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" < 1619353286 767584 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Which is not helpful. < 1619353497 983705 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`perl-e printf "%.1f", eval "0x1p-1" < 1619353498 983663 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0.5 < 1619353504 528195 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Nothing eval can't solve. ;) < 1619353513 604360 :int-e!~noone@int-e.eu PRIVMSG #esoteric :b_jonas: have you run into this perchance? < 1619353548 380115 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I really don't want eval... though I guess I could write down a pretty precise regexp for this case. < 1619353612 181156 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :All I know is hex/oct, but that's just for integers. < 1619353664 867685 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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. < 1619353764 768054 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`perl-e printf "%.1f", (hex "0x1")*2**"-1" < 1619353765 867365 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0.5 < 1619353773 382344 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I guess you could always split it into that ^ < 1619353863 689014 :int-e!~noone@int-e.eu PRIVMSG #esoteric :$_ = eval $_ if /^0x[0-9a-f]*(\.[0-9a-f]*)?p[+-][0-9]+$/; # ouch > 1619353941 467134 PRIVMSG #esoteric :14[[07NDBall14]]4 M10 02https://esolangs.org/w/index.php?diff=82393&oldid=82392 5* 03PythonshellDebugwindow 5* (+13) 10/* Language Overview */ Deadlink < 1619354013 951725 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`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 < 1619354015 39708 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0.5 < 1619354050 36339 :int-e!~noone@int-e.eu PRIVMSG #esoteric :hmm true < 1619354099 135470 :int-e!~noone@int-e.eu PRIVMSG #esoteric :uhm < 1619354133 401196 :int-e!~noone@int-e.eu PRIVMSG #esoteric :oh, hex can do 1a.a1 kind of stuff? < 1619354174 14486 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Oh, right, that. < 1619354176 802617 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Yeah, no. < 1619354183 370581 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Didn't think of that. Awkward. < 1619354210 954213 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ah, the example didn't have that. reading is hard :) < 1619354219 454797 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I guess you could still do it by applying an offset to the exponent. < 1619354245 360516 :int-e!~noone@int-e.eu PRIVMSG #esoteric :yeah no, it's not worth the effort, I'll trust the regexp instead < 1619354364 40705 :int-e!~noone@int-e.eu PRIVMSG #esoteric :oh right, there's \d for [0-9] < 1619354514 25882 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But I guess in this context I prefer [0-9] (also, \d is different for unicode but that doesn't come up) < 1619354519 798423 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`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 < 1619354521 226973 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0.65625 > 1619354641 138930 PRIVMSG #esoteric :14[[07Sabdt14]]4 M10 02https://esolangs.org/w/index.php?diff=82394&oldid=78268 5* 03PythonshellDebugwindow 5* (-1) 10/* Function declaration */ typo < 1619354731 23093 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :FWIW, I'm sure there's also some lower-level-than-eval function somewhere in B or somewhere that'd do it for you. < 1619354813 834776 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Quit: Leaving < 1619355479 545382 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`perl-e printf"%g, %g\n", 0x1p-1074, 0x1.8p-1073 < 1619355480 665699 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :4.94066e-324, 0 < 1619355497 906373 :int-e!~noone@int-e.eu PRIVMSG #esoteric :flaws everywhere < 1619355685 39828 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`interp c double x,y; sscanf("0x1p-1074 0x1.8p-1073", "%a %a", &x, &y); fprintf(stdout,"%a %a",x,y); < 1619355686 963879 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x0p+0 0x0.0007fp-1022 < 1619355690 70660 :int-e!~noone@int-e.eu PRIVMSG #esoteric :this is... worse. < 1619355827 274041 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`interp c double x = 0x1p-1074, y = 0x1.8p-1073; printf("%a %a", x, y); < 1619355829 99017 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x0.0000000000001p-1022 0x0.0000000000003p-1022 < 1619355850 671991 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Floats are hard. :/ < 1619355902 228838 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :If memory serves, the requirements for strtod (and indirectly scanf) are different than that for floating-point literals. < 1619355959 736538 :int-e!~noone@int-e.eu PRIVMSG #esoteric :it's still impressive how messed up the result for 0x1.8p-1073 is. < 1619356007 124355 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Hmm, they actually aren't for the special case of hexadecimal constants. < 1619356034 618630 :int-e!~noone@int-e.eu PRIVMSG #esoteric :another data point: 0x0p+0 0x0.07ffcp-1022 < 1619356035 625946 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :C11 6.4.4.2p3: "For hexadecimal floating constants when `FLT_RADIX` is a power of 2, the result is correctly rounded." 7.22.1.3p5 "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." < 1619356048 475889 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I think that means you could report a bug. < 1619356069 562509 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(of course, floating point is hard, and denormals are harder) < 1619356108 895765 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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) < 1619356146 910784 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru JOIN :#esoteric < 1619356202 429082 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :(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 < 1619356208 464672 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :them.) < 1619356219 140667 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`perl-e printf"%a, %a\n", 0x1p-1074, 0x3p-1074 < 1619356220 371628 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x1p-1074, 0x1.8p-1073 < 1619356322 348614 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I agree the 0x0.0007fp-1022 and especially the 0x0.07ffcp-1022 for 0x1.8p-1073 are pretty amazing. < 1619356330 43468 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`perl-e printf"%a, %a\n", 0x1p-1074, 0x1.0p-1074 #another variation on the theme < 1619356331 895071 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x1p-1074, 0x0p+0 < 1619356347 53587 :int-e!~noone@int-e.eu PRIVMSG #esoteric :So I guess Perl does pretty much what you suggested internally. < 1619356492 626883 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Oh wait, it doesn't parse these at all, x and y are not intialized < 1619356553 747068 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`interp c double x = 42,y = 42; sscanf("0x1p-1074 0x1.8p-1073", "%a %a", &x, &y); fprintf(stdout,"%a %a",x,y); < 1619356556 217401 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x1.5p+5 0x1.5p+5 < 1619356565 543762 :int-e!~noone@int-e.eu PRIVMSG #esoteric :okay, that is embarrassing < 1619356691 187255 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Oh. < 1619356773 591337 :int-e!~noone@int-e.eu PRIVMSG #esoteric :strtod handles those correctly. phew. < 1619356817 150615 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`interp c double x = strtod("0x1p-1074",0), y=strtod("0x1.8p-1073",0); fprintf(stdout,"%a %a",x,y); < 1619356820 947753 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x0.0000000000001p-1022 0x0.0000000000003p-1022 < 1619356862 861592 :int-e!~noone@int-e.eu PRIVMSG #esoteric :That's a relief. But it's also annoying that *scanf don't seem to support this format. < 1619356891 525365 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`interp c double x = 42,y = 42; sscanf("0x1p-1074 0x1.8p-1073", "%lf %lf", &x, &y); fprintf(stdout,"%a %a",x,y); < 1619356893 363696 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :0x0.0000000000001p-1022 0x0.0000000000003p-1022 < 1619356903 731402 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :You forgot the 'l', and turns out %a is alias of %f. < 1619356906 125270 :int-e!~noone@int-e.eu PRIVMSG #esoteric :uh < 1619356911 512060 :int-e!~noone@int-e.eu PRIVMSG #esoteric :thanks < 1619356943 224695 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I guess it's an out-of-range error for a `float`, which is why it didn't assign anything. < 1619356954 407492 :int-e!~noone@int-e.eu PRIVMSG #esoteric :And as floats these are 0, so that explains the near-0 results we saw < 1619356955 477497 :int-e!~noone@int-e.eu PRIVMSG #esoteric :sigh < 1619357007 673911 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Right, the thing that led me astray here is the implicit conversion to double in printf. C can be nasty. < 1619357061 664520 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(because of varargs magic) < 1619357116 610799 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(And while I do use C quite a bit, I hardly ever parse anything involving floating point numbers.) < 1619357300 587783 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 265 seconds < 1619358973 903038 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1619359119 325540 :MDude!~MDude@71.50.52.250 JOIN :#esoteric < 1619359417 637270 :dionys!dionys@gateway/shell/blinkenshell.org/x-buslsfhbhitunuvz QUIT :Ping timeout: 265 seconds < 1619360187 820321 :dionys!dionys@2a0a:d981::10 JOIN :#esoteric < 1619363615 288173 :xkapastel!uid17782@gateway/web/irccloud.com/x-ffvsvgtndmjolwtr JOIN :#esoteric < 1619366725 501641 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :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. < 1619366881 127198 :int-e!~noone@int-e.eu PRIVMSG #esoteric :b_jonas: Probably, but what's the excuse for not adding a function for the purpose then? (Unless I missed one...) < 1619366887 69912 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1619367084 646823 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric : int-e: they rarely add new core functions these days. there's probably something in a module. < 1619367141 665786 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :not that python's treatment of hex float format is much better... < 1619372512 541999 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`` python -c 'print (float.hex(0.1), float.fromhex("0x1.1p-1"))' < 1619372513 964242 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :​('0x1.999999999999ap-4', 0.53125) < 1619372550 918499 :Sgeo!~Sgeo@ool-18b9875e.dyn.optonline.net JOIN :#esoteric < 1619372551 27850 :int-e!~noone@int-e.eu PRIVMSG #esoteric :b_jonas: no literals apparently, but as you can see, they have a function for converting a hex string to a float < 1619372682 126513 :int-e!~noone@int-e.eu PRIVMSG #esoteric :which feels more normal to me than having a literal syntax for numbers but not way to parse that same format *shrugs* < 1619372710 51902 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I've complained, and I've solved my immediate problem. It's mostly good now, I'll live :) > 1619373462 503304 PRIVMSG #esoteric :14[[07Airline food14]]4 10 02https://esolangs.org/w/index.php?diff=82395&oldid=81929 5* 03Largejamie 5* (+68) 10/* Overview */ > 1619373478 390117 PRIVMSG #esoteric :14[[07Airline food14]]4 10 02https://esolangs.org/w/index.php?diff=82396&oldid=82395 5* 03Largejamie 5* (-2) 10/* Overview */ < 1619373689 107008 :grimler32!~grimler67@pool-108-49-215-20.bstnma.fios.verizon.net QUIT :Quit: Leaving < 1619373958 894393 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :int-e: the problem is just that < 1619373980 564252 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :`python3 -cprint("%d %X %g" % (71, 71, 71/2)) < 1619373981 497057 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :71 47 35.5 < 1619373996 964460 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :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 < 1619374012 765784 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :`python3 -cprint("%a" % (71/2,)) < 1619374013 604200 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :35.5 < 1619374022 344532 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :`python3 -cprint("%A" % (71/2,)) < 1619374023 675466 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :Traceback (most recent call last): \ File "", line 1, in \ ValueError: unsupported format character 'A' (0x41) at index 1 < 1619374027 948456 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :`python3 -cprint("%X" % (71/2,)) < 1619374028 820099 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :Traceback (most recent call last): \ File "", line 1, in \ TypeError: %X format: an integer is required, not float < 1619374048 447379 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :I mean %a was already used, but there's no other format letter for this either < 1619374067 934909 :Lord_of_Life_!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1619374139 929155 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 268 seconds < 1619374257 127383 :Lord_of_Life_!~Lord@unaffiliated/lord-of-life/x-0885362 NICK :Lord_of_Life < 1619374630 621784 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :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. < 1619374633 654600 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :https://docs.python.org/3/library/string.html#format-specification-mini-language "The available presentation types for float and Decimal values are: ... eEfFgGn% ..." < 1619374697 828883 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :They could've easily included a/A *there*, because right now it just throws "ValueError: Unknown format code 'a' for object of type 'float'". < 1619374749 347949 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :`python3 -cprint(f"{0.4:.2%}") # TIL < 1619374750 429104 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :40.00% < 1619374853 879361 :int-e!~noone@int-e.eu PRIVMSG #esoteric :`python3 -cprint(f"{0.4:.2‰}") < 1619374854 973661 :HackEso!~h@unaffiliated/fizzie/bot/hackeso PRIVMSG #esoteric :Traceback (most recent call last): \ File "", line 1, in \ ValueError: Unknown format code '\x2030' for object of type 'float' < 1619375021 676891 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Let's not get carried away here. < 1619375038 634104 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :That's the sort of thing you see on our wiki, not in a serious language. < 1619375083 563117 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ACTION checks the channel name < 1619375122 812279 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I think I tried it in the right place :) < 1619375229 931935 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :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. > 1619375266 725853 PRIVMSG #esoteric :14[[07Special:Log/newusers14]]4 create10 02 5* 03Angel 5* 10New user account < 1619375267 890975 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :I don't know how to write Python oneliners though. Is it even possible to express arbitrary Python constructs without using a newline? < 1619375306 659755 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :semicolons should work? good question. < 1619375314 887451 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :oneliners can take the form of comprehensions. > 1619375519 292912 PRIVMSG #esoteric :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=82397&oldid=82384 5* 03Angel 5* (+269) 10/* Introductions */ < 1619375568 546405 :fizzie!fis@unaffiliated/fizzie PRIVMSG #esoteric :Yeah, I'm just wondering how you'd for example declare a class, and then end that class declaration and do something using it. < 1619375857 440840 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :don't think that's possible. :\ < 1619375886 510615 :imode!~imode@unaffiliated/imode PRIVMSG #esoteric :kind of why I don't like Python as a language. < 1619376021 802373 :hendursa1!~weechat@gateway/tor-sasl/hendursaga QUIT :Ping timeout: 240 seconds < 1619377092 237891 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Read error: Connection reset by peer < 1619377290 229453 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1619377589 858833 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 JOIN :#esoteric < 1619377655 357652 :Soni!~quassel@unaffiliated/soniex2 QUIT :Quit: http://quassel-irc.org - Chat comfortably. Anywhere. > 1619377715 848042 PRIVMSG #esoteric :14[[07--yay14]]4 N10 02https://esolangs.org/w/index.php?oldid=82398 5* 03Angel 5* (+2317) 10Created 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,..." > 1619377737 434408 PRIVMSG #esoteric :14[[07Talk:--yay14]]4 N10 02https://esolangs.org/w/index.php?oldid=82399 5* 03Angel 5* (+0) 10Created blank page < 1619378380 927675 :xkapastel!uid17782@gateway/web/irccloud.com/x-ffvsvgtndmjolwtr QUIT :Quit: Connection closed for inactivity < 1619380792 378991 :Lord_of_Life_!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1619380967 6955 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 252 seconds < 1619380977 760689 :Lord_of_Life_!~Lord@unaffiliated/lord-of-life/x-0885362 NICK :Lord_of_Life < 1619382239 137793 :Soni!~quassel@unaffiliated/soniex2 JOIN :#esoteric < 1619382541 578150 :b_jonas!~a@catv-176-63-11-172.catv.broadband.hu PRIVMSG #esoteric :fizzie: I hate all the f-streams and bracket style format languages. < 1619383076 308494 :int-e!~noone@int-e.eu PRIVMSG #esoteric :the ability to write oneliners is overrated < 1619383348 791108 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I would certainly appreciate it. < 1619383370 762469 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Using the Python REPL to define functions is awful. If you make one mistake you have to go back and repeat every other line. < 1619383404 160641 :int-e!~noone@int-e.eu PRIVMSG #esoteric :REPLs are overrated too. Write it to a file, load it. < 1619383438 584908 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(especially when the REPL cannot save definitions... which I believe is the case for python) < 1619383450 623905 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Even when using it as a calculator? < 1619383483 730516 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I use ghci as a REPL and still define functions. < 1619383483 882797 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I guess I don't use Python as a calculator. < 1619383509 155165 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I don't know whether Python's REPL can save definitions, but if it did it automatically I'd disable it. < 1619383516 224389 :int-e!~noone@int-e.eu PRIVMSG #esoteric :You may have a point there... I like simple putting one-line definitions in ghci < 1619383518 308737 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I disable history in almost all REPLs, and also less search history, etc. < 1619383524 26860 :int-e!~noone@int-e.eu PRIVMSG #esoteric :simple putting -> putting simple < 1619383527 153047 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I mean the program `less`. < 1619383548 416735 :int-e!~noone@int-e.eu PRIVMSG #esoteric :the `less` history annoys me < 1619383554 15248 :int-e!~noone@int-e.eu PRIVMSG #esoteric :the `ghci` history is useful :P < 1619383563 111617 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(reverse-i-search)`let ': let c n 0 = 1; c n k = c (n-1) (k-1) * n `div` k < 1619383569 240586 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :In bash I have it set up to not save history when I exit, except if I explicitly ask it to. < 1619383590 474823 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(that right there is my most common definition in ghci) < 1619383620 160187 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That's a pretty common definition. < 1619383660 143326 :int-e!~noone@int-e.eu PRIVMSG #esoteric :uh. how do I parse that < 1619383707 829010 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I mean, everyone wants that one. < 1619383712 439186 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :And it's tragically missing. < 1619383723 815222 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I do put a bunch of definitions and imports in my .ghci. < 1619383745 473083 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Except ghci startup has gotten so slow that now I don't have them in by default. < 1619383748 15666 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Meh .ghci is all wrong though. < 1619383788 747593 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I believe .ghci is sourced twice if you run ghci in your home directory. Which I do a lot. But maybe that's fixed. < 1619383814 433117 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Looks like it's only once. < 1619383816 300664 :int-e!~noone@int-e.eu PRIVMSG #esoteric :But worse, it's picked up from whatever local directory I happen to be in and I don't want that at all. < 1619383857 622714 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm, doesn't seem great. < 1619383861 212809 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Too much browsing third-party code, too much using `ghci` as a calculator in whatever shell I happen to have open. < 1619383861 525795 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :*** WARNING: . is writable by someone else, IGNORING! < 1619383892 348697 :int-e!~noone@int-e.eu PRIVMSG #esoteric :So I use alias ghci='ghci -ignore-dot-ghci' < 1619383899 969492 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Makes sense. < 1619383956 312805 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(Hmm, cann I still provide a global .ghci file *after* giving that option? It's been a long time since I considered this.) < 1619383970 244269 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :You could try -ghci-script < 1619383986 643010 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Seems to work. < 1619384006 607076 :myname!~myname@2001:41d0:1:766f::1 PRIVMSG #esoteric :why don't you just empty .ghci then? < 1619384102 753470 :int-e!~noone@int-e.eu PRIVMSG #esoteric :myname: which problem does that solve? < 1619384116 293040 :myname!~myname@2001:41d0:1:766f::1 PRIVMSG #esoteric :you don't need the alias < 1619384138 610455 :int-e!~noone@int-e.eu PRIVMSG #esoteric :myname: the alias is for not picking up third party's .ghci files < 1619384277 398480 :int-e!~noone@int-e.eu PRIVMSG #esoteric :shachaf: thanks for the discussion :) Yes, -ghci-script works in conjunction with -ignore-dot-ghci < 1619384292 959998 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :myname: ghci reads ./.ghci, not just ~/.ghci. < 1619384300 372044 :myname!~myname@2001:41d0:1:766f::1 PRIVMSG #esoteric :ah < 1619384324 513613 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Now you can define c once and for all. < 1619384331 684772 :int-e!~noone@int-e.eu PRIVMSG #esoteric :already did < 1619384344 202440 :int-e!~noone@int-e.eu PRIVMSG #esoteric :it's my definition of choice < 1619384359 693619 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :The main use of .ghci is to enable all the extensions upfront, since enabling them whenever I test something is so much typing. < 1619384384 990498 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I have 43 extensions enabled. < 1619384389 907039 :int-e!~noone@int-e.eu PRIVMSG #esoteric :ouych < 1619384392 396761 :int-e!~noone@int-e.eu PRIVMSG #esoteric :-y < 1619384395 368920 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :No, 40, since a few are commented out. < 1619384411 30560 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also I don't do much Haskell anymore so it's all irrelevant anyway. < 1619384435 797401 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I'm not convinced that I can even name 40 extensions on the spot :) < 1619384472 300862 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(yes, I can do :set -X) < 1619384488 546739 :harha_!~harha@ns356919.ip-91-121-144.eu QUIT :Quit: ZNC - https://znc.in < 1619384503 628801 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :One of them is NoMonomorphismRestriction. Is that an extension? < 1619384505 116984 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I guess the main thing here is that I never got into the really deep type hackery. < 1619384519 447725 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Sure, it is. < 1619384549 439834 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :One of the funny extensions whose name starts with No. < 1619384550 444178 :int-e!~noone@int-e.eu PRIVMSG #esoteric :I guess it's incomparable if you look at code being accepted or not. < 1619384564 427627 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :You can see an old .ghci at https://slbkbs.org/ghci.txt < 1619384618 4738 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :SOme of these are a bit silly. < 1619384688 834465 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :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. < 1619384699 673510 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Which is very convenient even when you're experimenting in a file instead of the REPL. < 1619384738 629737 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I wonder what kind of type hackery counts as "really deep". < 1619384791 147428 :int-e!~noone@int-e.eu PRIVMSG #esoteric :polykinded type family types of things < 1619384812 55642 :harha_!~harha@ns356919.ip-91-121-144.eu JOIN :#esoteric < 1619384852 160958 :int-e!~noone@int-e.eu PRIVMSG #esoteric :In ghci I usually get away with one or two extensions at a time, and often none at all. < 1619384878 804003 :arseniiv_!~arseniiv@94.41.9.111.dynamic.ufanet.ru JOIN :#esoteric < 1619385056 795504 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru QUIT :Ping timeout: 260 seconds < 1619385193 603348 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Personally, I'm into kind hackery and value hackery, but not type hackery. < 1619385202 90129 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It's a parity thing. < 1619385210 200544 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Too bad GHC has type-in-type and ruins this. < 1619385210 315039 :int-e!~noone@int-e.eu PRIVMSG #esoteric :pfft < 1619385370 377149 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Do you like distributed consensus? I had some questions about Paxos, I think. < 1619386383 17256 :int-e!~noone@int-e.eu PRIVMSG #esoteric :. o O ( faux Paxos ) < 1619386424 671624 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Anyway, nah... never studied the stuff in detail. < 1619386680 28536 :LKoen!~LKoen@92.163.9.109.rev.sfr.net 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.” < 1619389736 510805 :arseniiv_!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :TIL how to compose permutations given in cycle form, it’s surprisingly natural < 1619389741 428589 :arseniiv_!~arseniiv@94.41.9.111.dynamic.ufanet.ru NICK :arseniiv < 1619389840 674004 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619389863 925256 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :and then you just compose with all remaining cycles one by one < 1619389910 658435 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :portals were my great discovery, before that I didn’t think you can multiply cycles on paper without converting them to substitutions and back < 1619389995 416241 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619390112 713464 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619390133 171831 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :I like liberating moments like those < 1619390610 470104 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619390851 176356 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :(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 < 1619390892 99070 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :) < 1619391472 868945 :int-e!~noone@int-e.eu PRIVMSG #esoteric :arseniiv: and you have to adhere to the parity restriction too < 1619391600 284771 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :int-e: shouldn’t it be included in d? Parity is (−1)^d < 1619391623 961583 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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. < 1619391678 704243 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619391752 299209 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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.) < 1619391754 279405 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :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 < 1619391773 987657 :int-e!~noone@int-e.eu PRIVMSG #esoteric :arseniiv: I just never write down the tables. < 1619391798 881099 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :int-e: ah, yeah, I mis-that-thinged the proposition < 1619391879 985736 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :int-e: now I probably wouldn’t too, though I almost don’t deal with permutations by hand at all in any case < 1619391909 499692 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :though tables of course are useful for some demonstrations, I don’t remember which… < 1619392006 397129 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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) < 1619392091 989276 :int-e!~noone@int-e.eu PRIVMSG #esoteric :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. < 1619392101 485037 :int-e!~noone@int-e.eu PRIVMSG #esoteric :every -> ever < 1619392178 759998 :int-e!~noone@int-e.eu PRIVMSG #esoteric :Knuth actually devotes some space on algorithms for this in TAoCP. < 1619392191 593051 :int-e!~noone@int-e.eu PRIVMSG #esoteric :(I forgot the details.) < 1619392435 465370 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :oh, didn’t read TAoCP extensively. No surprise he would do that there, though! < 1619392460 621912 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :yep, I mean for some reason before yesterday I thought multiplying cycles would be harrd < 1619392501 786884 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :I thought when implementing something in that vein several years ago, probably < 1619392519 70656 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :there were two classes for each representation, for that matter < 1619392536 607518 :int-e!~noone@int-e.eu PRIVMSG #esoteric :it's hard... in that you can mess things up very easily :) < 1619392578 705258 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :there is a common mistake when composing tables too, I knew about it and still made it a couple of times < 1619392625 353123 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :forgetting to add elements which aren’t mapped to anything in the first table (and thus usually absent from its keys) < 1619392643 43074 :arseniiv!~arseniiv@94.41.9.111.dynamic.ufanet.ru PRIVMSG #esoteric :the keys of a corresponding map > 1619394264 594910 PRIVMSG #esoteric :14[[07Suptiftam14]]4 M10 02https://esolangs.org/w/index.php?diff=82400&oldid=81912 5* 03PythonshellDebugwindow 5* (+1) 10/* Hello, world! */ Fix < 1619394750 920074 :delta23!~deltaepsi@unaffiliated/deltaepsilon23 QUIT :Quit: Leaving