< 1527638682 208064 :zemhill___!bfjoust@selene.zem.fi JOIN :#esoteric < 1527638719 696049 :ocharles!sid30093@musicbrainz/user/ocharles QUIT :Ping timeout: 265 seconds < 1527638720 41866 :zemhill__!bfjoust@selene.zem.fi QUIT :Ping timeout: 265 seconds < 1527638745 2373 :ocharles_!sid30093@gateway/web/irccloud.com/x-fxqwusuipnflvpgu JOIN :#esoteric < 1527638748 587570 :Lord_of_Life!Elite12246@gateway/shell/elitebnc/x-lmamvjzbbtsuhnbe QUIT :Ping timeout: 265 seconds < 1527638748 832820 :fungot!~fungot@momus.zem.fi QUIT :Ping timeout: 265 seconds < 1527638764 240934 :fungot!~fungot@momus.zem.fi JOIN :#esoteric < 1527639238 455861 :Lord_of_Life!Elite12246@gateway/shell/elitebnc/x-dhqxaekqpwvduauq JOIN :#esoteric < 1527640682 499602 :copumpkin!copumpkinm@haskell/developer/copumpkin QUIT :Ping timeout: 269 seconds < 1527640693 622454 :ProofTechnique[m!prooftechn@gateway/shell/matrix.org/x-tgbndvbdryzfmpej QUIT :Ping timeout: 256 seconds < 1527642032 310840 :ProofTechnique[m!prooftechn@gateway/shell/matrix.org/x-bgtofhuymsbnuryp JOIN :#esoteric < 1527642455 358227 :Sgeo_!~Sgeo@ool-18b98dd9.dyn.optonline.net JOIN :#esoteric < 1527642621 351870 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net QUIT :Ping timeout: 240 seconds < 1527643001 960669 :copumpkin!copumpkinm@haskell/developer/copumpkin JOIN :#esoteric < 1527643389 908466 :boily!~alexandre@cable-192.222.236.157.electronicbox.net QUIT :Quit: OPAL CHICKEN < 1527644735 95519 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is there a language where, you can write "{ X; ... }" and have it turn into "{ Y; ...; Z; }", where Z is some end code for Y? < 1527644761 463038 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This isn't quite like e.g. C++ destructors because the code wouldn't be executed at early exit. < 1527644860 52086 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :shachaf: hmm, weird, several languages have something like that but it's normally specifically to make the early-exit case work < 1527644881 446391 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :so if you want to exclude it, it might be hard to find a language which supports that exclusion < 1527644893 723372 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :D has a range of operators like that but I'm not sure if any have the exact semantics you want < 1527644917 303006 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :there are some languages flexible enough to do just about anything, e.g. Perl would let you dynamically change the parser so that it slipped in a Z before the } < 1527644926 199926 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :but I don't think that's what you're looking for either < 1527645025 197513 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :ais523: I might want something that supports different behavior for early and non-early exit. < 1527645093 648923 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :I guess this is the point where I ask what you're trying to do in more general terms :-D < 1527645095 167847 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But really the early-exit case is well explored, so I'm wondering whether anything handles this behavior. < 1527645182 629738 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I wonder what the best way to describe it is. < 1527645220 15203 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :I'm reminded of the way you can put an "else" on a loop in Python < 1527645225 967202 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :this isn't the same at all but it seems similar in a way < 1527645232 346211 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yes, I was thinking about that. < 1527645283 971636 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :you could probably do something with the condition of a for-loop < 1527645303 475346 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Hmm, maybe. But I also want to be able to goto Z or something. < 1527645303 947551 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if you had a do-for loop and made it evaluate to false, it'd have the exact semantics you wanted < 1527645318 180345 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :(surely there's got to be a language with a do-for loop?) < 1527645333 978952 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So one thing I was thinking about was how in a lot of languages, say Ruby, you write things like "open(filename) {|f| ... }" < 1527645350 296486 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Where "open" takes a function argument and takes care of the cleanup and so on. < 1527645351 199431 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :I thought https://esolangs.org/wiki/TMMLPTEALPAITAFNFAL might sometimes have one, but apparently not < 1527645375 416691 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :shachaf: right, I think all serious languages are moving in that direction < 1527645381 23483 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :or, well, maybe not /all/ of them < 1527645383 999305 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :but a lot of major ones < 1527645384 990535 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Whereas in C++ RAII-style, you just write "{ File f = open(...); ... }", and f is automatically closed at the end of the scope. < 1527645412 926628 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :even Java has "try (InputStream f = new FileInputStream(…)) {…}" < 1527645422 376588 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :In a lot of ways the C++ way is nicer -- e.g. you don't end up with deeply-nested scopes and lots of lambdas if you have a lot of these things. And also some other things. < 1527645431 330027 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :(I think "try" is a case of reusing a keyword to avoid accidentaly invalidating old variable names) < 1527645444 452904 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So I was wondering whether you can make all control flow use this mechanism. < 1527645448 699571 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :I see RAII as similar < 1527645465 745754 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :For example write { if(p); ... } to mean "if (p) { ... }" < 1527645478 600172 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :oh, you definitely /can/ do that in D < 1527645479 556866 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Where the if executes the rest of the block only if its argument is true. < 1527645481 985689 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :but maybe only at the function level < 1527645488 65536 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :actually you can even do that in Perl < 1527645492 762216 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :{ last unless p; … } < 1527645504 33906 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :(where "last" jumps out of the current block) < 1527645510 146627 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Well, I don't just want it for if, I want it for everything. < 1527645522 431382 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :yes, if is easiest < 1527645534 568421 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :the other cases, e.g. while, are suspiciously similar to come from < 1527645546 597948 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :{ while(p); ... }, { repeat(5); repeat(3); ... }, etc. < 1527645565 156450 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :There were some other things I wanted that are less related to this. < 1527645566 372297 :tromp_!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Remote host closed the connection < 1527645582 707226 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :You might be able to write { x = for_in(arr); ...x... } to iterate an array < 1527645666 220140 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :And then all these things can be implemented in terms of conditional goto or something. < 1527645707 76574 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :There are a lot of nice things you can get if you can make it work. < 1527645814 846194 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if you don't mind early exits continuing the loop, then you could use a cross between destructors and continuations < 1527645826 282536 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :perhaps the equivalent of breaking from a loop would be leaking the object < 1527645834 556750 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I want to support both break and continue. < 1527645836 678094 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :(Rust has an explicit function for leaking objects) < 1527645852 94487 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This is very continuationy, of course. < 1527645875 558028 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It's kind of like in { X; ... }, X gets the ... as an argument, CPS. < 1527645883 915069 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :hmm, Tableaux's @n syntax is basically "put the rest of the code into a block" in effect < 1527645888 134637 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :although it wasn't intended as that at all < 1527645892 3541 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :(This use use of the acronym isn't standard.) < 1527645899 203415 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :come to think of it, this is basically Python one-liners < 1527645954 100613 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Anyway I don't really want it to be implemented in terms of complicated things like lambdas if possible. < 1527645976 634620 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :right, I guess what we want here is sugar for a "consuming block" < 1527645984 684755 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :This is in the end pretty similar to the generated assembly you get for all these constructs. < 1527645991 597349 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :Lispers often use ] to represent "do ) for the rest of the program", so [ would work as a mirror of that < 1527645995 341553 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So I want a straightforward translation to low-level code. < 1527646031 303687 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :There are also questions of how you represent if-else and switch and so on. I have some ideas that end up being pretty lisp-like. < 1527646049 756581 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :right, I'm mentally thinking about this as sugar for Lisp more than anything else < 1527646050 548543 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm not sure what you mean by [ < 1527646081 363975 :moei!~moei@softbank221078042071.bbtec.net QUIT :Ping timeout: 248 seconds < 1527646086 927326 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I was thinking of an indentation-sensitive syntax where if you write { to open a block and then you unindent to some level, you automatically get }s inserted to match the level. < 1527646108 907628 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Then what you would get with this syntax looks more or less like Python. < 1527646124 642622 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :basically, } means "close one block, then close an additional block for each [ since the previous { or }" < 1527646161 660000 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if you're doing this as indentation-sensitive, then it's basically a normal indentation-sensitive language with a minimum indentation of 0 (rather than 1 like most of these languages use < 1527646164 52332 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if a: < 1527646166 875486 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric : x; < 1527646168 870814 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric : if b: < 1527646171 120393 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric : y; < 1527646172 639841 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :z; < 1527646196 564416 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :an easy way to stop if/else chains running to the right :-D < 1527646198 196515 :moei!~moei@softbank221078042071.bbtec.net JOIN :#esoteric < 1527646207 136029 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I guess that's true. < 1527646217 379385 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :most langauges have an elseif or the like specifically to optimize that case indentation-wise < 1527646222 468415 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :in this langauge you wouldn't need it < 1527646229 852881 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I think indentation-sensitive languages should generally have a non-indentation-sensitive syntax option, like Haskell. < 1527646246 488980 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :How are you thinking "else" would be implemented? < 1527646254 955878 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I had some ideas but they were a little awkward. < 1527646283 481664 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :it'd require the matching if to have an indented (or same-line) block, otherwise you'd effectively have an else at the start of a block < 1527646286 41365 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if a: < 1527646288 551042 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric : x; < 1527646290 243631 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :else: < 1527646291 651031 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :y; < 1527646310 404486 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I don't want if-else to be keywords, though, just regular user-implemented things. < 1527646326 685573 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Ideally not even macros, just functions. < 1527646386 434854 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Assuming you have this one mechanism to insert code/variables at the end of a scope, and conditional goto, and appropriate labels for the beginning/end, you should be able to implement all the standard control flow in user code. < 1527646409 547081 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Though it gets kind of complicated, I think maybe you need five different labels for what I was thinking of. < 1527646420 931451 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :it's remarkably hard to do a nicely sugared else with conditional goto < 1527646427 239959 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :("start", "upkeep", "end", "cleanup" < 1527646433 577463 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :of course you can do it, but you need something like a stack of else addresses < 1527646458 718187 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :You could do something lisp-style: { cond; { if(x); ... }; { else; ... }; } < 1527646458 819778 :ais523!~ais523@unaffiliated/ais523 PRIVMSG #esoteric :if you name them all individually it's easy, but people normally rely on the natural nesting of if/else < 1527646470 222665 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Where each if/else just needs to refer to the block immediately above. < 1527646526 933 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe that's what you meant by "a stack of else addresses". < 1527646855 771798 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also if you have "return values" like { x := for(a); ... }, that's a little tricky < 1527646869 891610 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I guess it's a bit SSAy, which is similar to being a bit CPSy. < 1527647023 741796 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Anyway there are a lot of things that would be simplified with this model. < 1527647048 445116 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Things like nested loops or other control flow, of course. < 1527647095 45045 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :But also initializers, like Go's "if x := y; z { ... }", which just turns into "{ x := y; if(z); ... }", or the initializer of a for loop. < 1527647124 109862 :Warrigal!~tswett@unaffiliated/tswett JOIN :#esoteric < 1527647138 503427 :Warrigal!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Yo. < 1527647147 657793 :Warrigal!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Nut'n much, I'm just trying to figure out how to prove that 0 + x = x. < 1527647168 217839 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :http://inutile.club/estatis/falso/ hth < 1527647243 362646 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Anyway there are a bunch of other things you can do if you use the model of "things inside blocks describe the block they're in" for everything, and allow flexible enough macros or something. < 1527647308 324517 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe you can define functions as { (int x, char y) := args(); }, where args is a thing that interprets your calling convention. < 1527647375 137528 :Warrigal!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Are you... talking to me? < 1527647384 899223 :Warrigal!~tswett@unaffiliated/tswett NICK :tswett < 1527647401 496667 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Or maybe even { fun(f); (int x, char y) := args(); }. Which can get compiled to something like ".globl f; f: mov $rdi, ...; whatever" < 1527647439 356221 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So it's like a high-level thing with a pretty direct translation to assembly in terms of labels and (conditional) goto. < 1527647462 557127 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe lambdas can specify their captures this way too, I don't know. < 1527647490 549629 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Something tells me you're not talking to me. < 1527647500 224974 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :tswett: The link was for you. < 1527647509 528751 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :*nod* < 1527647515 948837 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That's as much as I can help without more context. < 1527647557 611124 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also you changed your nick and I have no nick permanence so I forgot you existed. < 1527647567 802648 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :*nod nod* < 1527647608 89769 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Yeah, so, I'm trying to prove that 0 + x = x. < 1527647620 47843 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :The main axiom I've got is... < 1527647639 307373 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :+ is the unique binary operator on natural numbers such that p + 0 = p and p + S(x) = S(p + x). < 1527647698 14789 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :There's no axiom allowing proofs by induction. < 1527647719 52064 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :then it seems p. tricky hth < 1527647733 498347 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Yeah, I'm definitely not sure that what I'm trying to do is possible to do. < 1527647748 842741 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Now, it's pretty trivial that 0 + 0 = 0. < 1527647770 74001 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :And, of course, we have 0 + S(x) = S(0 + x). < 1527647849 204820 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :It probably wouldn't be too much of a stretch to say that, for any particular number y, if 0 + y = y, then 0 + S(y) = S(y). < 1527648040 241172 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Lemme abstract a little. I have a function f such that f(0) = 0 and f(S(x)) = S(f(x)). < 1527648094 644411 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Oh, there we go. Uniqueness of inductively defined functions. < 1527648180 423202 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :It's an axiom schema which has an instance which says: "There is exactly one function f such that f(0) = 0 and f(S(x)) = S(f(x))." < 1527648192 409680 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Since 0 + x satisfies those equations, and x also satisfies those equations, 0 + x = x. < 1527648299 175453 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :can you translate that to categories twh < 1527648352 492940 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Uhhhh, sure. < 1527648380 709641 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :So we've got an arrow plus : N * N -> N. < 1527648391 110281 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :And arrows zero : 1 -> N and succ : N -> N. < 1527648444 674851 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Ummmm, what's the next thing. < 1527648480 524549 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is this a natural numbers object or what? < 1527648484 319802 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Yes. < 1527648532 764710 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :So, consider the arrows const_zero : N -> N and id_N : N -> N. < 1527648564 687232 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Where const_zero = zero . 1_N. < 1527648608 251916 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Uh, forget about const_zero, actually. < 1527648627 407356 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :For that matter, forget about id_N. < 1527648638 8794 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :By the definition of a natural number object, there's exactly one arrow f : N -> N such that f . zero = zero and f . succ = succ . f. < 1527648654 446759 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :id_N satisfies these equations, so f = id_N. < 1527648748 747613 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :But plus . (zero &&& id_N) satisfies these equations too, so f = plus . (zero &&& id_N). < 1527648801 491758 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :I'm really botching my categories. There's no such thing as (zero &&& id_N). < 1527648867 395319 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :What I mean by plus . (zero &&& id_N) is plus . ((zero . 1_N) &&& id_N). < 1527648891 827387 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Where 1_N is the unique morphism N -> 1. < 1527648953 288256 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Now, of course, since equality is an equivalence relation, this means that... < 1527648972 301596 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :plus . ((zero . 1_N) &&& id_N) = id_N < 1527648981 485874 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :Or, written in conventional pointful notation... < 1527648985 133127 :tswett!~tswett@unaffiliated/tswett PRIVMSG #esoteric :0 + x = x < 1527651987 212947 :Naergon!~Naergon@188.29.165.19.threembb.co.uk QUIT :Ping timeout: 245 seconds < 1527652235 446886 :tswett!~tswett@unaffiliated/tswett QUIT :Quit: Leaving < 1527652424 683131 :erkin!~erkin@unaffiliated/erkin JOIN :#esoteric < 1527652540 209584 :Warrigal!~tswett@unaffiliated/tswett JOIN :#esoteric < 1527652906 229832 :Warrigal!~tswett@unaffiliated/tswett NICK :tswett < 1527653357 744291 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527653397 410472 :sprocklem!~sprocklem@unaffiliated/sprocklem QUIT :Quit: brb < 1527653430 205641 :sprocklem!~sprocklem@unaffiliated/sprocklem JOIN :#esoteric < 1527653552 199000 :sprocklem!~sprocklem@unaffiliated/sprocklem QUIT :Client Quit < 1527653579 658898 :sprocklem!~sprocklem@unaffiliated/sprocklem JOIN :#esoteric < 1527653630 667891 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Ping timeout: 268 seconds < 1527654743 796572 :imode!~imode@unaffiliated/imode QUIT :Ping timeout: 255 seconds < 1527654775 189898 :sprocklem!~sprocklem@unaffiliated/sprocklem QUIT :Quit: brb < 1527654798 286744 :sprocklem!~sprocklem@unaffiliated/sprocklem JOIN :#esoteric < 1527655890 85258 :xkapastel!uid17782@gateway/web/irccloud.com/x-pvedxcvruuzthypk QUIT :Quit: Connection closed for inactivity < 1527656581 392583 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527656865 327742 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Ping timeout: 256 seconds < 1527657970 308134 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1527658737 734580 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527658881 452848 :heroux!sandroco@gateway/shell/insomnia247/x-bhypzmfahowfwsyq QUIT :Ping timeout: 248 seconds < 1527658993 247875 :heroux!sandroco@gateway/shell/insomnia247/x-lkpvfakijrzurtpg JOIN :#esoteric < 1527659032 757512 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Ping timeout: 268 seconds < 1527659061 272378 :imode!~imode@unaffiliated/imode QUIT :Ping timeout: 240 seconds < 1527659664 143877 :arseniiv!~arseniiv@145.255.8.243 JOIN :#esoteric < 1527659673 306846 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527659931 296160 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Ping timeout: 240 seconds > 1527659967 484472 PRIVMSG #esoteric :14[[07Roie14]]4 M10 02https://esolangs.org/w/index.php?diff=55447&oldid=55433 5* 03Galaxtone 5* (-29) 10Holding off on TC actually, there's a problem. < 1527660363 695168 :atslash!~atslash@static.231.107.9.5.clients.your-server.de JOIN :#esoteric < 1527661358 627931 :erkin!~erkin@unaffiliated/erkin QUIT :Quit: Ouch! Got SIGIRL, dying... < 1527661368 186677 :friendlyGoat!~Jonah@50-50-141-33.snpr.wi.frontiernet.net JOIN :#esoteric < 1527661387 845089 :erkin!~erkin@unaffiliated/erkin JOIN :#esoteric < 1527661460 565656 :friendlyGoat!~Jonah@50-50-141-33.snpr.wi.frontiernet.net QUIT :Client Quit < 1527662094 658787 :atslash!~atslash@static.231.107.9.5.clients.your-server.de QUIT :Ping timeout: 256 seconds < 1527662280 260861 :impomatic!~digital_w@host86-186-214-72.range86-186.btcentralplus.com JOIN :#esoteric < 1527663036 403199 :ais523!~ais523@unaffiliated/ais523 QUIT :Quit: quit < 1527663226 368826 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric > 1527663347 711790 PRIVMSG #esoteric :14[[07Roie14]]4 M10 02https://esolangs.org/w/index.php?diff=55448&oldid=55447 5* 03Galaxtone 5* (+164) 10Changed IO so it actually works, Fixed confusion > 1527667127 587125 PRIVMSG #esoteric :14[[07Seeker14]]4 M10 02https://esolangs.org/w/index.php?diff=55449&oldid=55446 5* 03Plokmijnuhby 5* (+52) 10It seems like you should be able to do input without doing an operation on it. I think this was the intended behaviour. > 1527667279 542250 PRIVMSG #esoteric :14[[07Seeker14]]4 M10 02https://esolangs.org/w/index.php?diff=55450&oldid=55449 5* 03Plokmijnuhby 5* (-23) 10Made a slight mistake. > 1527667407 549596 PRIVMSG #esoteric :14[[07Seeker14]]4 M10 02https://esolangs.org/w/index.php?diff=55451&oldid=55450 5* 03Plokmijnuhby 5* (-52) 10Sorry, just read the next section. Maybe this? < 1527667513 488451 :atslash!~atslash@static.231.107.9.5.clients.your-server.de JOIN :#esoteric > 1527667575 237669 PRIVMSG #esoteric :14[[07Seeker14]]4 M10 02https://esolangs.org/w/index.php?diff=55452&oldid=55451 5* 03Plokmijnuhby 5* (+3) 10/* Infinite counter (using seekers) */ I'm fairly confident that was wrong, anyway. < 1527669258 482419 :xkapastel!uid17782@gateway/web/irccloud.com/x-weyhgttzlsfpyfvn JOIN :#esoteric < 1527669622 175857 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Remote host closed the connection < 1527669656 840320 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527669666 293184 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Remote host closed the connection < 1527669680 730917 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527672151 393486 :Lord_of_Life!Elite12246@gateway/shell/elitebnc/x-dhqxaekqpwvduauq QUIT :Changing host < 1527672151 393548 :Lord_of_Life!Elite12246@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1527672151 471032 :Lord_of_Life!Elite12246@unaffiliated/lord-of-life/x-0885362 QUIT :Changing host < 1527672151 471093 :Lord_of_Life!Elite12246@gateway/shell/elitebnc/x-dhqxaekqpwvduauq JOIN :#esoteric < 1527672882 743455 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Remote host closed the connection < 1527673373 796292 :trout!~variable@freebsd/developer/variable QUIT :Ping timeout: 255 seconds < 1527673527 866189 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527678869 83104 :variable!~variable@freebsd/developer/variable JOIN :#esoteric < 1527680461 381218 :variable!~variable@freebsd/developer/variable QUIT :Ping timeout: 256 seconds < 1527680524 920129 :plokmijnuhby!4e954f6e@gateway/web/freenode/ip.78.149.79.110 JOIN :#esoteric < 1527680536 330610 :plokmijnuhby!4e954f6e@gateway/web/freenode/ip.78.149.79.110 PRIVMSG #esoteric :waddup < 1527680699 417518 :variable!~variable@freebsd/developer/variable JOIN :#esoteric < 1527681266 399369 :Naergon!~Naergon@unaffiliated/naergon JOIN :#esoteric < 1527681364 904230 :plokmijnuhby!4e954f6e@gateway/web/freenode/ip.78.149.79.110 QUIT :Ping timeout: 260 seconds < 1527681779 370022 :xkapastel!uid17782@gateway/web/irccloud.com/x-weyhgttzlsfpyfvn QUIT :Quit: Connection closed for inactivity > 1527682615 953914 PRIVMSG #esoteric :14[[07Special:Log/newusers14]]4 create10 02 5* 03Akangka 5* 10New user account > 1527683038 349062 PRIVMSG #esoteric :14[[07Esolang:Introduce yourself14]]4 10 02https://esolangs.org/w/index.php?diff=55453&oldid=55434 5* 03Akangka 5* (+199) 10/* Introductions */ > 1527683052 586478 PRIVMSG #esoteric :14[[07OISC14]]4 10 02https://esolangs.org/w/index.php?diff=55454&oldid=54359 5* 03Akangka 5* (+167) 10 < 1527688837 501900 :Guest13947!sid154965@gateway/web/irccloud.com/x-fcebzexizwvaivdw NICK :Lynn < 1527688867 527823 :Lynn!sid154965@gateway/web/irccloud.com/x-fcebzexizwvaivdw NICK :Guest31035 < 1527689767 389834 :variable!~variable@freebsd/developer/variable QUIT :Quit: /dev/null is full < 1527690932 23781 :xkapastel!uid17782@gateway/web/irccloud.com/x-uirzywbkmczeegrs JOIN :#esoteric < 1527692282 415825 :SopaXorzTaker!~SopaXorzT@unaffiliated/sopaxorztaker JOIN :#esoteric < 1527692640 771081 :variable!~variable@freebsd/developer/variable JOIN :#esoteric < 1527692782 371823 :variable!~variable@freebsd/developer/variable QUIT :Client Quit < 1527695065 754469 :APic!apic@apic.name JOIN :#esoteric < 1527696022 951768 :olsner!~salparot@c83-253-165-33.bredband.comhem.se PRIVMSG #esoteric :shikhin: you might know alercah from in here? < 1527696099 420802 :olsner!~salparot@c83-253-165-33.bredband.comhem.se PRIVMSG #esoteric :but of course you don't actually need to know anyone to join them in ##:D < 1527696353 588612 :alercah!~alercah@unaffiliated/alercah PRIVMSG #esoteric :was about to say < 1527697464 715038 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1527697976 706724 :Cale!~cale@2607:fea8:9960:472:2159:9db2:3953:2c87 QUIT :Quit: Leaving < 1527698202 156660 :int-e!~noone@int-e.eu PRIVMSG #esoteric :that sounds like an extremely silly channel < 1527698347 287689 :shikhin!shikhin@unaffiliated/shikhin PRIVMSG #esoteric :olsner, alercah: Ah, I see. < 1527698352 149213 :shikhin!shikhin@unaffiliated/shikhin PRIVMSG #esoteric :int-e: No! < 1527698610 645000 :LKoen!~LKoen@2a01:e35:2eed:a430:3dd3:1deb:1c8f:2539 JOIN :#esoteric < 1527698711 978170 :xkapastel!uid17782@gateway/web/irccloud.com/x-uirzywbkmczeegrs QUIT :Quit: Connection closed for inactivity < 1527699271 770727 :LKoen!~LKoen@2a01:e35:2eed:a430:3dd3:1deb:1c8f:2539 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.” < 1527699918 881664 :MDude!~MDude@c-73-187-225-46.hsd1.pa.comcast.net QUIT :Quit: Going offline, see ya! (www.adiirc.com) < 1527700166 112332 :aloril_!~aloril@80.246.146.6 QUIT :Ping timeout: 260 seconds < 1527701056 249009 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1527701189 293870 :izabera!~izabera@unaffiliated/izabera NICK :motaneva < 1527701226 156223 :motaneva!~izabera@unaffiliated/izabera NICK :izabera > 1527701803 107318 PRIVMSG #esoteric :14[[07OISC14]]4 M10 02https://esolangs.org/w/index.php?diff=55455&oldid=55454 5* 03Ais523 5* (+2) 10/* List of OISCs */ grammar < 1527703854 904109 :contrapumpkin!~copumpkin@haskell/developer/copumpkin QUIT :Read error: Connection reset by peer < 1527703955 691362 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net QUIT :Remote host closed the connection < 1527704153 385940 :contrapumpkin!~copumpkin@haskell/developer/copumpkin JOIN :#esoteric < 1527706634 523013 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is there any high-level language that has conditional goto? < 1527706718 76555 :Guest6451!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr PRIVMSG #esoteric :is that fancy talk for an if < 1527706749 960820 :Guest6451!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr PRIVMSG #esoteric :also probably not < 1527706752 33055 :Guest6451!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr NICK :Slereah < 1527706763 816382 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :It's fancy talk for "if (p) goto q;" < 1527706797 377459 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also it doesn't have to be that high-level. < 1527706813 900966 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I just want it to be in terms of an expression argument instead of a flags register or something. < 1527706837 784773 :Slereah!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr PRIVMSG #esoteric :Well assembly has them < 1527706842 686725 :Slereah!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr PRIVMSG #esoteric :Not very high level < 1527706901 693326 :Slereah!~Slereah@ALille-651-1-18-38.w2-5.abo.wanadoo.fr PRIVMSG #esoteric :As high level languages got developped goto became a big taboo so I don't think there were a lot of variants < 1527707415 186844 :arseniiv!~arseniiv@145.255.8.243 QUIT :Ping timeout: 260 seconds < 1527707525 456480 :SopaXorzTaker!~SopaXorzT@unaffiliated/sopaxorztaker QUIT :Ping timeout: 256 seconds < 1527708249 710027 :aloril!~aloril@80.246.146.6 JOIN :#esoteric < 1527708731 505134 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 JOIN :#esoteric < 1527708760 78174 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: yes, there are basic-like languages that have only an IF comparison GOTO label statement, not a full IF THEN < 1527708840 72883 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: in particular, the simple programming language of my sharp el-5120 programmable calculator only has such a conditional statement. the comparison uses one of the six arith comparison operators, with basically any expression (including complicated ones) possible on both sides of that operator < 1527708916 619630 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :some older programmable calculators from before precedence expression parsing also have some comparison-goto statements, although usually it's just comparison to zero < 1527709047 456243 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :whereas older intercals and older APLs only have a computed goto, rather than a conditional one < 1527709071 476968 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :although intercal's is somewhat limited < 1527709089 932388 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :it's not a real computed goto, just a BASIC-style switch-goto < 1527709107 102773 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :(which is written as ON expr GOTO labellist in BASICs) < 1527709214 507909 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and... hmm, I don't know the history here, but don't some older fortran variants only have if-goto? or do they have single-line if like traditional BASICs do too? < 1527709216 620505 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Makes sense. < 1527709240 132471 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Did you see the thing I said about blocks yesterday? < 1527709281 76119 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :plus FORTRAN has that unique "three-way if" statement that is a switch-goto with exactly three targets depending on whether the controlling expression is zero or negative or positive < 1527709320 242862 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: do you mean about the destructor exceptions? I wanted to say something about that too < 1527709339 240730 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yes, except now I think destructors are kind of a red herring now < 1527709347 999905 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :in C++ and some other languages, you could query in the destructor whether it's currently unrolling exceptions or not < 1527709369 452864 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :so if you test that and only run your cleanup if they aren't unrolling, then you get what you asked for < 1527709374 152872 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Yes, I saw that. But unwinding the stack due to exception is pretty special, more special than break/early return. < 1527709395 539766 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :alternately you could use a non-local exit mechanism and a destructor that aren't compatible with each other, so that non-local exit doesn't properly unwind the stack. < 1527709405 479472 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :ah, I see. < 1527709407 129858 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I bet ternary computers have a three-way if. < 1527709418 378208 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :well, in ruby 1.8 those are implemented very similarly < 1527709450 633410 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Oh, I remember all these features of Ruby 1.8 < 1527709456 482238 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :redo, retry, all those strange things < 1527709462 999478 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Did they take some of these things out? < 1527709470 875912 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :I don't think so < 1527709473 775725 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and those aren't strange < 1527709486 927217 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :those are just like gotos with lexical targets, as in < 1527709536 807792 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :if you have a function call with a block passed, written as either f(args){block} or f(args)do block end; and it basically makes a lambda of that block and passes it as an argument in a special place and < 1527709572 442843 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :in the impl of the function f the shortcut yield statements calls that callback, but instead of calling it can also just store that callback and do whatever it wants; < 1527709614 156184 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :so anyway, if you have a call like f(args){block} then imagine you put goto labels in it like this: label RETRY; f(args) { label REDO; ...; label NEXT; } label BREAK; < 1527709644 18569 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :In Ruby you can write a regular while function that can be used like while(p) { ... }, right? < 1527709647 164834 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and then the four control statements go to those four labels, only they remember the right labels lexically even when you're multiple levels inside such calls < 1527709653 491204 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That's a pretty unusual feature for a function, I think. < 1527709666 318926 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :except that these loop controls also apply for some built-in loop statements other than those syntaxes < 1527709703 699423 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: no, that wouldn't work firstly because "while" is actually a keyword with a different syntax, secondly because you'd need to make a lambda of the condition too because it has to be evaluated multiple times < 1527709725 484562 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :No, that's the weird thing about retry, the way you wrote it. < 1527709733 941018 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :That you can have the argument to the function reevaluated. < 1527709741 333433 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :but yes, you can write if and while conditionals that way, and that's how smalltalk and postscript etc do it < 1527709750 122389 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :whereas ruby has a couple of builtin syntaxes for those < 1527709765 29999 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I thought in Ruby you could do it without a lambda. < 1527709771 253102 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: yes, but it's still just a goto, only with a lexical label, and ruby doesn't normally have gotos < 1527709790 86789 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: I don't think you can < 1527709807 233706 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :the function f can't call retry to recompute its arguments < 1527709820 834909 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :it's onlk the brace block that knows (lexically) where that label is < 1527709825 422494 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :wob_jonas: See http://ruby-doc.com/docs/ProgrammingRuby/html/tut_expressions.html#UM < 1527709830 841395 :user24!~void@p200300886901540015E7616E3670A412.dip0.t-ipconnect.de JOIN :#esoteric < 1527709862 790188 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :I'm trying this now in Ruby 2.5 and it says it's an invalid retry. < 1527709877 514126 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :So maybe this *was* removed sometime after 1.8. < 1527709899 940400 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :for "for" and "while" loops, two and three respective of those control statements are the same as the two and three control statements of C and perl respectively. < 1527709925 517948 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :it's only logical that ruby added a fourth one, and that it allowed them arbitrarily deep with the lambda lexically bound < 1527710021 857892 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :but for more complicated loops, they're different: < 1527710075 827400 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :in perl, the control statements will act on the actual innermost loop, not on the loop that's in the lexical context of where you put the loop statement, which can get to broken invariants if the loop is in another function that doesn't expect you to use loop control statements on it, < 1527710116 360367 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and the same is true if you use loop labels in perl: with those you can distinguish different loops, but among two nested loops with the same label (or two recursive instances of the same loop code), the loop control statement will act on the innermost one. < 1527710165 173399 :tromp!~tromp@ip-217-103-3-94.ip.prioritytelecom.net JOIN :#esoteric < 1527710192 365106 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :ruby has actual lexical loops, although you could simulate them in any language if you have call/ec or selective exception catching checking the value of the exception not just the type < 1527710288 15374 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :the part that I find strange is that many of these languages with these powerful control constructs are reluctant to support gotos, despite that there is little or no technical difficulties implementing them. ruby doesn't normally have gotos, although I think there's some non-vanilla hack adding them; python doesn't have goto; lua does have goto no < 1527710288 134840 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :w but didn't use to have it for a while; < 1527710313 274439 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and rust doesn't have goto yet, but I hope people will eventually agree to add one after the rewrite of the borrow checker. < 1527710426 843600 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :luckily perl has a goto (and it's quite powerful a tool too, but still only syntactical if you try to goto out from a lambda body), and C++ has a goto too (with some limitations) < 1527710500 527985 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :languages should just add goto and come from (plain one, not computed one; the computed one is much more difficult). < 1527710534 762316 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :non-eso languages that is < 1527710543 793400 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :some esolangs have good excuses not to have it < 1527712649 918025 :\oren\!~oren@ec2-52-2-213-98.compute-1.amazonaws.com PRIVMSG #esoteric :wob_jonas: I don't understand why more languages don't have unless aand until < 1527713282 910639 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :\oren\: I don't like those these days < 1527713435 209318 :impomatic!~digital_w@host86-186-214-72.range86-186.btcentralplus.com QUIT :Ping timeout: 260 seconds < 1527713920 341376 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Is there something like continuation-passing style in low-level languages that don't support closures and so on? < 1527713935 70362 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Maybe that's what I'm looking for. < 1527713957 229149 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :SSA is one sort of answer. < 1527713969 297426 :Cale!~cale@CPEf48e38ee8583-CM0c473de9d680.cpe.net.cable.rogers.com JOIN :#esoteric < 1527714153 493031 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :shachaf: you just emulate closures by storing a state and all upvalues in that case < 1527714208 648465 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Well, yes. < 1527714267 633489 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :and then you optimize that by having a persistent structure that stores most of your values, rather than creating a new structure for every state < 1527714273 246812 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 PRIVMSG #esoteric :object-oriented style < 1527715152 475845 :wob_jonas!b03f193a@gateway/web/cgi-irc/kiwiirc.com/ip.176.63.25.58 QUIT :Quit: http://www.kiwiirc.com/ - A hand crafted IRC client < 1527715522 245476 :user24!~void@p200300886901540015E7616E3670A412.dip0.t-ipconnect.de QUIT :Quit: Leaving < 1527715685 405122 :Naergon!~Naergon@unaffiliated/naergon QUIT :Ping timeout: 256 seconds < 1527717269 173336 :Naergon!~Naergon@unaffiliated/naergon JOIN :#esoteric < 1527718136 307841 :friendlyGoat!~Jonah@50.105.198.143 JOIN :#esoteric < 1527718141 688841 :friendlyGoat!~Jonah@50.105.198.143 QUIT :Remote host closed the connection < 1527718512 741372 :atslash!~atslash@static.231.107.9.5.clients.your-server.de QUIT :Quit: This computer has gone to sleep < 1527718860 710469 :atslash!~atslash@broadband-46-188-0-82.2com.net JOIN :#esoteric < 1527719097 688116 :atslash!~atslash@broadband-46-188-0-82.2com.net QUIT :Ping timeout: 240 seconds < 1527719131 123711 :Elronnd!elronnd@slashem.me NICK :Elronnd`srn < 1527719137 445527 :Elronnd`srn!elronnd@slashem.me NICK :Elronnd\srn < 1527719716 516775 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Remote host closed the connection < 1527720788 854924 :xkapastel!uid17782@gateway/web/irccloud.com/x-esrgrtqkiyzrfmyk JOIN :#esoteric < 1527721207 738941 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :ais523: So I think a pretty natural way to express "for x: ...\nelse: z" is "loop: { for (x) { ...break loop...; }; }", if you have labeled breaks. < 1527721258 952575 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also, blocks should support return values, and return should just be the same thing as break? < 1527721265 592919 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Then inlining is very straightforward. < 1527721283 474443 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Also ais523 isn't here. Maybe he logreads. < 1527721298 126716 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :Apparently Rust recently got support for return values for blocks. < 1527721916 984873 :Cale!~cale@CPEf48e38ee8583-CM0c473de9d680.cpe.net.cable.rogers.com QUIT :Remote host closed the connection < 1527722374 300633 :Cale!~cale@2607:fea8:995f:fb71:75f8:f06a:ff2d:f227 JOIN :#esoteric < 1527722689 652267 :ais523!~ais523@unaffiliated/ais523 JOIN :#esoteric < 1527723201 354884 :Cale!~cale@2607:fea8:995f:fb71:75f8:f06a:ff2d:f227 QUIT :Ping timeout: 240 seconds < 1527723889 739417 :Cale!~cale@CPEf48e38ee8583-CM0c473de9d680.cpe.net.cable.rogers.com JOIN :#esoteric < 1527724101 361024 :danieljabailey!~danieljab@cpc75709-york6-2-0-cust725.7-1.cable.virginm.net QUIT :Ping timeout: 240 seconds < 1527724568 708139 :danieljabailey!~danieljab@cpc75709-york6-2-0-cust725.7-1.cable.virginm.net JOIN :#esoteric