00:04:21 LKoen: That isn't the only problem with the syntax for types; also combined types are confusing. 00:04:32 how so? 00:07:08 For example, if you want a function that returns a pointer to an array of function pointers, or something else complicated, then syntax can get mixed up if you do not use typedef. 00:25:01 -!- 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.”). 00:29:00 -!- Lord_of_Life_ has joined. 00:30:47 -!- Lord_of_Life has quit (Ping timeout: 272 seconds). 00:31:51 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 01:33:17 -!- sprocklem has joined. 01:38:04 -!- Sgeo has quit (Read error: Connection reset by peer). 01:39:51 -!- Sgeo has joined. 01:44:16 -!- oerjan has joined. 01:52:51 [[User:Lebster]] https://esolangs.org/w/index.php?diff=69592&oldid=69357 * Lebster * (+21) /* Languages I like */ 02:03:50 [[StupidStackLanguage]] M https://esolangs.org/w/index.php?diff=69593&oldid=69464 * Lebster * (-16) /* Print the Fibonacci Sequence */ 02:58:17 this latest oots comic makes me worry that at some point mr. scruffy will leap at the snarl, thinking it's a yarn 02:58:32 it might be a foreshadowing 03:49:28 I read that Windows 10 will sometimes reboot the computer due to update even if it is in use, but will it do that even if the defragment is in progress? 04:26:26 -!- sprocklem has quit (Quit: aaaa). 04:44:58 -!- imode has joined. 05:01:41 -!- hakatashi has quit (Remote host closed the connection). 05:02:15 -!- hakatashi has joined. 05:05:43 -!- sparr has quit (Ping timeout: 245 seconds). 05:13:42 -!- sparr_ has joined. 05:19:41 -!- FreeFull has quit. 05:19:46 -!- Frater_EST has joined. 05:59:24 -!- imode has quit (Ping timeout: 265 seconds). 06:11:02 -!- sprocklem has joined. 06:18:10 -!- sprocklem has quit (Read error: Connection reset by peer). 06:18:43 -!- sprocklem has joined. 06:36:24 -!- oerjan has quit (Quit: Nite). 06:36:58 -!- ArthurStrong has joined. 06:51:36 -!- sprocklem has quit (Ping timeout: 265 seconds). 06:53:09 -!- sprocklem has joined. 06:58:26 -!- sprocklem has quit (Remote host closed the connection). 06:58:44 -!- sprocklem has joined. 07:24:51 @metar lowi 07:24:52 LOWI 040650Z 26025G41KT 9999 -SHRA FEW010 SCT025 OVC040 06/02 Q1009 BECMG 27015G30KT 07:24:57 (eww) 08:03:24 -!- Sgeo_ has joined. 08:07:08 -!- Sgeo has quit (Ping timeout: 268 seconds). 08:50:35 [[Isthmus Cyclicus Crypticus]] M https://esolangs.org/w/index.php?diff=69594&oldid=69261 * Salpynx * (+113) /* Hello, World! */ not much of an improvement, but shows combinations of cardinal directions 08:54:01 -!- cpressey has joined. 09:17:49 [[User talk:RocketRace]] https://esolangs.org/w/index.php?diff=69595&oldid=69232 * RocketRace * (+117) 09:28:37 [[Isthmus Cyclicus Crypticus]] https://esolangs.org/w/index.php?diff=69596&oldid=69594 * Salpynx * (+31) /* External resources */ link to wip interpreter 09:48:07 -!- b_jonas has quit (Quit: leaving). 10:08:40 -!- ArthurStrong has left. 10:37:55 -!- sprocklem has quit (Ping timeout: 265 seconds). 10:39:13 -!- sprocklem has joined. 10:44:05 -!- sprocklem has quit (Ping timeout: 265 seconds). 10:44:46 -!- sprocklem has joined. 11:00:21 -!- wib_jonas has joined. 11:06:19 -!- atslash has quit (Ping timeout: 265 seconds). 11:08:05 -!- atslash has joined. 11:14:09 -!- wmww has quit (*.net *.split). 11:14:10 -!- Sgeo_ has quit (*.net *.split). 11:14:10 -!- Frater_EST has quit (*.net *.split). 11:14:10 -!- MDude has quit (*.net *.split). 11:14:10 -!- rodgort has quit (*.net *.split). 11:14:11 -!- shinh_ has quit (*.net *.split). 11:14:11 -!- Bowserinator has quit (*.net *.split). 11:14:11 -!- aji has quit (*.net *.split). 11:14:11 -!- dog_star has quit (*.net *.split). 11:14:13 -!- shig has quit (*.net *.split). 11:14:13 -!- LBPHacker has quit (*.net *.split). 11:14:13 -!- wib_jonas has quit (*.net *.split). 11:14:15 -!- zemhill_________ has quit (*.net *.split). 11:14:15 -!- dnm has quit (*.net *.split). 11:17:09 -!- fizzie has quit (*.net *.split). 11:17:18 -!- fizzie has joined. 11:17:49 -!- dog_star has joined. 11:17:49 -!- shig has joined. 11:17:49 -!- LBPHacker has joined. 11:18:01 -!- wmww has joined. 11:18:02 -!- diverger has quit (*.net *.split). 11:18:02 -!- zzo38 has quit (*.net *.split). 11:18:02 -!- aloril has quit (*.net *.split). 11:18:03 -!- nchambers has quit (*.net *.split). 11:18:03 -!- vertrex has quit (*.net *.split). 11:18:03 -!- Lykaina has quit (*.net *.split). 11:18:03 -!- laerling has quit (*.net *.split). 11:18:03 -!- BWBellairs has quit (*.net *.split). 11:18:11 -!- vertrex has joined. 11:18:28 -!- Sgeo_ has joined. 11:18:28 -!- Frater_EST has joined. 11:18:28 -!- MDude has joined. 11:18:28 -!- rodgort has joined. 11:18:30 -!- vertrex has quit (Changing host). 11:18:30 -!- vertrex has joined. 11:18:46 -!- shinh_ has joined. 11:18:46 -!- Bowserinator has joined. 11:18:46 -!- aji has joined. 11:18:54 -!- wib_jonas has joined. 11:18:54 -!- zemhill_________ has joined. 11:18:54 -!- dnm has joined. 11:19:18 -!- laerling has joined. 11:19:47 -!- laerling has quit (Changing host). 11:19:47 -!- laerling has joined. 11:20:13 -!- nchambers has joined. 11:20:36 -!- aloril has joined. 11:21:36 -!- ^[ has quit (Ping timeout: 252 seconds). 11:21:50 -!- diverger has joined. 11:22:50 -!- ^[ has joined. 11:23:09 -!- Lykaina has joined. 11:26:41 -!- BWBellairs has joined. 11:40:24 -!- nico_nico has joined. 11:40:33 -!- nico_nico has quit (Client Quit). 11:40:47 -!- nico_nico has joined. 11:54:13 -!- LBPHacker has quit (Quit: Entering cryogenic sleep in three, two, on--). 11:56:38 -!- LBPHacker has joined. 12:24:47 -!- nico_nico has quit (Quit: Leaving). 12:29:31 -!- Lord_of_Life_ has joined. 12:30:50 -!- Lord_of_Life has quit (Ping timeout: 240 seconds). 12:30:51 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 12:40:13 oerjan: he'll leave and disappear after Belkar's death, possibly to be seen once more at Belkar's funeral in the epilogue (like Eto Demerzel at Hari Seldon's funeral or Fawkes at Dumbledore's funeral), so he just won't have the opportunity to meet the snarl. 12:40:49 he may do one last vengeance rampange before disappearing of course, depending on how exactly Belkar dies 13:43:29 -!- oren has joined. 13:49:33 [[LSCEF]] https://esolangs.org/w/index.php?diff=69597&oldid=69576 * IFcoltransG * (+235) /* Usage in interpreters */ Added SWI-Prolog 14:50:01 [[LSCEF]] https://esolangs.org/w/index.php?diff=69598&oldid=69597 * IFcoltransG * (+454) /* Usage in interpreters */ Added Chez Scheme 14:51:30 [[LSCEF]] M https://esolangs.org/w/index.php?diff=69599&oldid=69598 * IFcoltransG * (+29) /* Usage in interpreters */ Amended comments in implementations 15:28:02 -!- spruit11 has joined. 15:57:13 Here are some possible transposition typos for `git`: `fur`, `hoy`, `dye` 15:57:46 I am no stranger to `hoy status`. 15:58:52 cpressey: because hands can be out of sync, "hot", "die" 16:02:53 -!- egelbot has joined. 16:03:22 egelbot: [X -> say X] "hello!" 16:03:22 hello! 16:03:35 \o/ 16:04:01 egelbot: are you the replacement to kspalaiologos's bfbot? 16:04:01 internal:1:44:lexical:error in char 16:04:07 Can I occassionally run a bot here? 16:04:10 sure 16:04:14 if it's not too spammy 16:04:24 if it does cause too much spam then take it to #esoteric-blah 16:04:40 It's my own language. 16:05:04 `echo egelbot: hi 16:05:07 egelbot: hi 16:05:07 internal:1:2:semantical:undeclared hi 16:05:13 It only responds when you send it an expression. 16:05:36 `echo egelbot: say "hi"` 16:05:37 egelbot: say "hi"` 16:05:37 internal:1:10:lexical:unrecognized lexeme ` 16:05:40 egelbot: say "`echo hi" 16:05:41 `echo hi 16:05:41 hi 16:06:21 egelbot: agitprop 16:06:21 visit https://egel-lang.github.io/ 16:06:37 ^if you want to know more, read there. 16:06:37 I remember in another channel there was one bot that had a brainfuck interpreter, and one bot that printed the titles of webpages anyone linked 16:06:49 ooh, there's loke a documentation 16:07:17 It's an untyped rewriter. Think untyped lambda calculus with constants. 16:07:21 Taneb: yeah, there are some of those titlebots in some channels of irc. they're pretty annoying 16:07:21 Someone, naturally, made a brainfuck program that printed a URL, and put a webpage with that program as its title up 16:07:31 Which caused a loop 16:07:52 That channel now has a policy that all bots must use NOTIFY and not respond to NOTIFY 16:07:55 I can't really call it a proper PL so I thought maybe some of you would be interested. 16:08:07 Taneb: do you mean NOTICE rather than NOTIFY? 16:08:13 Quite possibly 16:09:06 Yes, I do 16:09:34 egelbot: say "hello,\nPRIVMSG #esoteric :fellow esoteric bots" 16:09:34 hello,-PRIVMSG #esoteric :fellow esoteric bots 16:10:16 The bot is not really hardened. 16:10:17 spruit11: sorry, there are some stupid commands that we have to test whenever something like an evaluator bot wanders in here 16:10:35 But I won't run it when I am not online. 16:10:44 It's easy to make it loop. 16:12:58 egelbot: [ X -> X X ] [ X -> X X ] 16:13:25 -!- egelbot has quit (Remote host closed the connection). 16:13:42 -!- egelbot has joined. 16:13:42 Be nice to the bot! 16:14:19 egelbot: 98 + 46 + -36 + 80 + -20 + -90 + 13 + -3 + 60 + -68 + 20 + 55 + -46 + 47 + 42 + -2 + 34 + -1 + 28 16:14:20 257 16:14:33 `perl -eprint(98 + 46 + -36 + 80 + -20 + -90 + 13 + -3 + 60 + -68 + 20 + 55 + -46 + 47 + 42 + -2 + 34 + -1 + 28) 16:14:34 257 16:14:36 Is that correct? 16:14:41 Oh, neat. 16:14:57 Nice try, I am not that certain about my parsing. 16:15:22 egelbot: 65536*65536 16:15:22 4294967296 16:15:32 egelbot: 4294967296*4294967296 16:15:33 (System:* 4294967296 4294967296) 16:15:47 It refuses to rewrite on overflow. 16:15:49 egelbot: 2 3 16:15:50 (2 3) 16:15:54 Occassionaly. 16:15:56 egelbot: 1 + 2 3 16:15:56 (System:+ 1 (2 3)) 16:16:01 egelbot: 1 + 16:16:01 internal:1:6:syntactical:primary expression expected 16:16:05 egelbot: + 2 16:16:05 internal:1:2:semantical:undeclared !+ 16:16:17 egelbot: 1 + + 2 16:16:18 internal:1:6:semantical:undeclared !+ 16:16:39 Right, it complains it cannot find a monadic +. 16:17:08 egelbot: let vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 16:17:08 internal:1:78:syntactical:in expected 16:17:13 egelbot: let vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in vn[0] 16:17:13 internal:1:86:syntactical:-> expected 16:17:34 Bit of a hack, when it decides you wanted a monadic +, it looks for !+ in the context. 16:17:39 egelbot: let vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in car 0 16:17:40 internal:1:6:semantical:undeclared vn 16:17:51 It's not a lisp. 16:18:08 Few things are these days 16:18:15 egelbot: let vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in [cons x y -> x] vn 16:18:16 internal:1:6:semantical:undeclared vn 16:18:19 Variables are uppercase. 16:18:33 doesn't have to be a list to have useful library functions 16:18:39 egelbot: let Vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in [cons x y -> x] Vn 16:18:39 internal:1:88:semantical:undeclared x 16:18:54 oh, so lowercase words are taken as constructors or something? 16:18:54 X Y 16:18:58 egelbot: let Vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in [cons X Y -> x] Vn 16:18:59 internal:1:95:semantical:undeclared x 16:18:59 Right. 16:19:03 as in prolog 16:19:04 ok 16:19:09 egelbot: let Vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in [cons X Y -> X] Vn 16:19:09 (Dummy11DOT0 (System:cons 38 (System:cons 32 (System:cons 75 (System:cons -24 (System:cons -19 (System:cons 53 (System:cons 14 (System:cons 13 (System:cons -28 (System:cons -52 (System:cons 93 (System:cons 90 (System:cons 80 (System:cons 22 (System:cons -98 (System:cons -14 (System:cons -96 (System:cons -81 (System:cons -95 System:nil)))))))))))))))))))) 16:19:15 nope 16:19:16 Constants or combinators. 16:19:38 I'm trying to get 38 but this didn't give that 16:19:43 egelbot: let Vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} in [ cons X Y -> X ] Vn 16:19:43 (Dummy12DOT0 (System:cons 38 (System:cons 32 (System:cons 75 (System:cons -24 (System:cons -19 (System:cons 53 (System:cons 14 (System:cons 13 (System:cons -28 (System:cons -52 (System:cons 93 (System:cons 90 (System:cons 80 (System:cons 22 (System:cons -98 (System:cons -14 (System:cons -96 (System:cons -81 (System:cons -95 System:nil)))))))))))))))))))) 16:20:00 (cons X Y) 16:20:30 egelbot: let X = {1,2} in [ (cons X Y) -> X ] X 16:20:31 1 16:20:31 egelbot: let Vn = {38,32,75,-24} in [ System:cons X Y -> X ] Vn 16:20:32 (Dummy14DOT0 (System:cons 38 (System:cons 32 (System:cons 75 (System:cons -24 System:nil))))) 16:20:43 oh right, parenthesis 16:20:48 egelbot: let Vn = {38,32,75,-24} in [ (System:cons X Y) -> X ] Vn 16:20:49 38 16:21:07 Right, your lambda was a ternary combinator. 16:21:18 egelbot: let X = 38; Y = 32 in X 16:21:19 internal:1:16:syntactical:in expected 16:21:22 egelbot: let X = 38, Y = 32 in X 16:21:23 internal:1:12:syntactical:in expected 16:21:28 egelbot: let X Y = 38 = 32 in X 16:21:29 internal:1:15:syntactical:in expected 16:21:31 egelbot: let X Y = 38 32 in X 16:21:32 (Dummy16DOT0 (38 32)) 16:21:44 egelbot: let {X,Y} = {38,32} in X 16:21:44 38 16:22:37 It sometimes refuses to rewrite an introduced unknown combinator (/LC expression). Usually, those start with Dummy. 16:22:48 It's not very user friendly. 16:22:54 Just me goofing. 16:23:52 egelbot: let Vn = {38,32,75,-24} in let Sum = [ nil -> 0 | X S -> X + (Sum Y) ] in Sum Vn 16:23:52 internal:1:64:semantical:undeclared Sum 16:24:09 do I need a Y combinator for this? 16:24:14 let X = F in E gets rewritten to [ X -> E ] F. [X->E] to Dummy something. 16:24:28 egelbot: let Vn = {38,32,75,-24} in let SumW F = [ nil -> 0 | X S -> X + (F Y) ] in SumW SumW Vn 16:24:29 internal:1:67:semantical:undeclared F 16:24:41 Yah, you can either use top level recursive defs or local Y combinators. 16:25:00 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F Y) ] in SumW SumW Vn 16:25:00 internal:1:78:semantical:undeclared Y 16:25:04 Local lets aren't recursive. 16:25:09 egelbot: let Vn = {38,32,75,-24} in let Sum = [ nil -> 0 | (cons X S) -> X + (Sum Y) ] in Sum Vn 16:25:09 internal:1:71:semantical:undeclared Sum 16:25:25 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (Sum Y) ] in SumW SumW Vn 16:25:25 internal:1:76:semantical:undeclared Sum 16:25:31 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F Y) ] in SumW SumW Vn 16:25:31 internal:1:78:semantical:undeclared Y 16:25:36 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F S) ] in SumW SumW Vn 16:25:36 (System:+ 38 (Dummy24DOT1 (System:cons 32 (System:cons 75 (System:cons -24 System:nil))))) 16:25:38 egelbot: def fix f = f (fix f) 16:25:39 internal:1:10:syntactical:= expected 16:25:50 It's eager. 16:25:59 Don't use lazy fixes. 16:26:08 Is that an eager fix? 16:26:13 No, right? 16:26:14 I don't know 16:26:34 Eager fixes need some protection to not loop. Moment 16:26:39 egelbot: agitprop 16:26:40 visit https://egel-lang.github.io/ 16:26:46 egelbot: def fix f x = f (fix f) x 16:26:46 internal:1:10:syntactical:= expected 16:26:50 def vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 16:26:53 egelbot: def vn = {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 16:27:00 egelbot: vn 16:27:01 (System:cons 38 (System:cons 32 (System:cons 75 (System:cons -24 (System:cons -19 (System:cons 53 (System:cons 14 (System:cons 13 (System:cons -28 (System:cons -52 (System:cons 93 (System:cons 90 (System:cons 80 (System:cons 22 (System:cons -98 (System:cons -14 (System:cons -96 (System:cons -81 (System:cons -95 System:nil))))))))))))))))))) 16:27:15 egelbot: def fix F X = F (fix F) X 16:27:16 internal:1:10:syntactical:= expected 16:27:24 egelbot: def fix = [ F X -> F (fix F) X ] 16:27:29 egelbot: def fix = [ F -> F [ X -> (fix F) X ] ] 16:28:00 egelbot: "foo"+"bar" 16:28:00 "foobar" 16:28:04 egelbot: "foo"+2 16:28:04 (System:+ "foo" 2) 16:28:10 egelbot: "foo" + 2 16:28:10 (System:+ "foo" 2) 16:28:21 egelbot: "foo" + (chr 110) 16:28:21 internal:1:11:semantical:undeclared chr 16:28:21 It refuses to rewrite that. 16:28:23 egelbot: def fix = [ F X -> F (fix F) X ] 16:29:15 egelbot: fix [FAC 0 -> 1 | FAC N -> N * (FAC (N- 1)) ] 5 16:29:15 120 16:29:20 egelbot: 2; 3 16:29:20 3 16:29:21 egelbot: let F = [ F -> [ 0 -> 1 | 1 -> 1 | X -> F (X - 2) + F (X - 1)] ] in fix F 5 16:29:21 8 16:29:37 egelbot: def xn = 1; 3 + xn 16:30:10 egelbot: 4 + xn 16:30:14 Hmm. 16:30:36 egelbot: def fix = [ F -> F (fix F) ] 16:30:39 egelbot: let F = [ F -> [ 0 -> 1 | 1 -> 1 | X -> F (X - 2) + F (X - 1)] ] in fix F 5 16:30:43 You found a bug? 16:30:46 -!- egelbot has quit (Read error: Connection reset by peer). 16:30:48 hmm 16:30:51 okay. 16:30:54 hi int-e 16:31:01 -!- egelbot has joined. 16:31:03 Not sure what happened there. 16:31:12 egelbot: def fix = [ F X -> F (fix F) X ] 16:31:25 egelbot: def xn = 1 16:31:32 egelbot: xn + 3 16:31:32 4 16:31:36 Hmm. 16:31:44 wait, you haven't been welcomed yet 16:31:48 `welcome spruit11 16:31:49 spruit11: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: . (For the other kind of esoterica, try #esoteric on EFnet or DALnet.) 16:31:51 `welcome egelbot 16:31:52 egelbot: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: . (For the other kind of esoterica, try #esoteric on EFnet or DALnet.) 16:31:52 internal:1:90:syntactical:! unexpected 16:31:53 spruit11: I guess F -> F (fix F) is too eager indeed. 16:32:03 Something I'll need to check. Haven't looked at the source code for a while. 16:32:07 Hello people! 16:32:34 Oh right. It's a recursive def of xn. 16:32:38 egelbot: }+{32} 16:32:39 internal:1:2:syntactical:primary expression expected 16:32:42 egelbot: {38}+{32} 16:32:42 (System:+ (System:cons 38 System:nil) (System:cons 32 System:nil)) 16:32:57 def xn = (1; 3+ xn). That loops. 16:33:03 oh. 16:33:15 so how do I put two statements in one line, the first of which is a defn? 16:33:18 I'm not clear about the syntax here 16:33:30 egelbot: let sum = fix [SUM {} -> 0 | SUM (cons x y) -> x + SUM y] in sum {1,2,3,4} 16:33:30 internal:1:41:semantical:undeclared x 16:33:34 You can't in the irc REPL. 16:33:41 ok 16:33:41 egelbot: let sum = fix [SUM {} -> 0 | SUM (cons X Y) -> X + SUM Y] in sum {1,2,3,4} 16:33:41 internal:1:6:semantical:undeclared sum 16:33:49 yeah... 16:33:50 It's either a def or an expression. 16:34:00 egelbot: let SUM = fix [SUM {} -> 0 | SUM (cons X Y) -> X + SUM Y] in SUM {1,2,3,4} 16:34:00 10 16:34:01 egelbot: 38&32 16:34:02 internal:1:4:semantical:undeclared & 16:34:06 egelbot: 38 | 32 16:34:06 internal:1:5:syntactical:| unexpected 16:34:09 egelbot: 38 & 32 16:34:09 internal:1:5:semantical:undeclared & 16:34:10 The capital variable names are killing me. 16:34:13 egelbot: 38 < 32 16:34:13 System:false 16:34:19 egelbot: 38 <= 32 16:34:20 System:false 16:34:22 egelbot: 38 == 32 16:34:22 System:false 16:34:24 egelbot: 38 = 32 16:34:24 internal:1:5:syntactical:= unexpected 16:34:33 egelbot: 38 != 32 16:34:33 internal:1:5:syntactical:!= unexpected 16:34:39 egelbot: 38 <> 32 16:34:39 internal:1:5:semantical:undeclared <> 16:34:42 Had to make a decision. Prolog-like parsing simplifies a lot. 16:34:44 egelbot: 38 ~= 32 16:34:45 internal:1:5:semantical:undeclared ~= 16:34:47 egelbot: 38 /= 32 16:34:47 internal:1:5:semantical:undeclared /= 16:34:51 egelbot: 38 ^= 32 16:34:51 internal:1:5:semantical:undeclared ^= 16:35:07 egelbot: not false 16:35:07 System:true 16:35:18 In an untyped language it's hard to disambiguate between constants and variables otherwise. 16:35:33 Simplified a lot. 16:36:08 :t Just 16:36:09 a -> Maybe a 16:36:20 I'm kind of used to the opposite convention. 16:36:35 [ X -> X ] (how do I know X is a variable or constant?) 16:36:36 spruit11: X (- > X ] how do (8 8$0 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0) know X is a variable or constant ?) 16:36:41 int-e: one is the prolog convention, the other is the Standard ML or Haskell conventino 16:36:47 and I suspect the prolog one is older 16:37:30 Right, you can trace back to Prolog and found they took the simplest convention known at that point. 16:37:47 there's also the cheating solution where constructors start with an uppercase letter, but there are a few lowercase keywords that are frequently constructors, like true false nil cons some none 16:37:48 It shaves of a context lookup and possible mistakes. 16:38:31 so back to that recursion, why did the definition of SumW that I try not work? 16:38:44 let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F S) ] in SumW SumW Vn 16:38:50 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F S) ] in SumW SumW Vn 16:38:50 (System:+ 38 (Dummy15DOT1 (System:cons 32 (System:cons 75 (System:cons -24 System:nil))))) 16:39:03 Dunno. 16:39:22 Don't you need fix? 16:39:34 wib_jonas: because you need to invoke the recursive call using F F 16:39:34 Not sure what you're doing/ 16:39:49 oh 16:39:52 egelbot: let Vn = {38,32,75,-24} in let SumW = [ F nil -> 0 | F (cons X S) -> X + (F F S) ] in SumW SumW Vn 16:39:52 121 16:39:57 that's it 16:40:08 though it's not the best way to implement sum, wait a moment 16:41:08 egelbot: let Vn = {38,32,75,-24} in let SumT = [ R B nil -> B | R B (cons X S) -> R R (B + X) S ] in let Sum S = SumT SumT 0 S in Sum Vn 16:41:08 internal:1:118:semantical:undeclared S 16:41:23 egelbot: let Vn = {38,32,75,-24} in let SumT = [ R B nil -> B | R B (cons X S) -> R R (B + X) S ] in let Sum = [ S -> SumT SumT 0 S ] in Sum Vn 16:41:24 121 16:41:29 Neat! 16:42:01 egelbot: let Vn={38,32,75,-24} in let SumT=[R B nil->B|R B(cons X S)->R R(B + X)S] in let Sum=[S->SumT SumT 0 S] in Sum Vn 16:42:02 121 16:42:26 -!- sprocklem has quit (Ping timeout: 240 seconds). 16:42:35 now I just also have to define some other list operations 16:42:42 Hehe, your LC fu is better than mine. 16:43:02 You can take a look at the prelude. Probably it's already in there. 16:43:05 Moment. 16:43:13 int-e: thanks, that was the problem 16:43:32 https://github.com/egel-lang/egel-bot/blob/master/src/script.eg 16:44:16 spruit: what I'd like to know is what built-in functions there are, since apparently the & operator doesn't work 16:44:38 I didn't document that, unfortunately. 16:45:03 it's probably somewhere in the source 16:45:32 Right. If you want to look at the source, it's here: 16:45:36 (moment) 16:45:38 https://github.com/egel-lang/egel/tree/master/src 16:45:55 mind you, 16:46:03 egelbot: say("foo"+"bar") 16:46:03 foobar 16:46:13 https://github.com/egel-lang/egel/tree/master/src/builtin 16:46:47 ah, the builtin directory. thanks 16:46:55 Those list the builtins. But they're pretty much still subject to change. 16:47:04 (Even if I didn't code for a while.) 16:49:05 hmm... so is there a chr function? 16:49:09 You'll mostly want https://github.com/egel-lang/egel/blob/master/src/builtin/system.cpp 16:49:58 ok, that'll take some time to read 16:50:12 Not sure it's in the bot. 16:50:16 Lemme check. 16:50:19 Uh. 16:50:28 egelbot: using String 16:50:40 egelbot: pack {110,114} 16:50:40 (System:pack (System:cons 110 (System:cons 114 System:nil))) 16:50:52 egelbot: toLower "A" 16:50:52 "a" 16:51:56 egelbot: pack { 'b' , 'f' } 16:51:56 "bf" 16:51:59 egelbot: 'b' 16:51:59 'b' 16:52:03 egelbot: toInt 'b' 16:52:03 internal:1:2:semantical:undeclared toInt 16:52:15 egelbot: toint 'b' 16:52:15 98 16:52:19 egelbot: totext 101 16:52:19 "101" 16:52:37 egelbot: char 101 16:52:37 (System:char 101) 16:53:22 I'll look more at this later 16:53:22 Uh, this is silly. I don't think there is. 16:56:43 egelbot: 1 != 2 16:56:43 internal:1:4:syntactical:!= unexpected 16:56:46 mmm 16:57:06 (see also https://github.com/egel-lang/egel/blob/master/src/builtin/system.cpp#L344 ) 16:57:20 so this is a symbolic term-rewriting thing like maple and mathematica, where if a function application makes no sense then the interpreter just leaves it as an unevaluated function application value? 16:57:27 -!- cpressey has quit (Quit: A la prochaine.). 16:57:48 egelbot: (3 4) 16:57:48 (3 4) 16:57:51 Something like that. 16:58:10 and are there values with mutable fields? 16:58:11 But worse than maple or mathematica. More a SASL. 16:58:43 No, there's mutation on expression but that's unsafe. 16:59:45 The language more serves as a front end on a thought I had about implementing an FP language in C++ in a memory-safe manner. 17:00:23 It's just a funny thing, not really usable for anything. 17:00:50 `grwp usable 17:00:52 No output. 17:01:07 `quote usable 17:01:08 690) elliott_: how usable is borges in the real world 17:01:18 -!- imode has joined. 17:01:31 Doesn't come up much, it seems. 17:01:50 does say work like in blsq or lambdabot where it just returns an object that will be formatted without quoting anything, or is it a function with a side-effect? 17:02:03 The idea is that in memory, everyting is a DAG, given a number of invariants, and that makes for a robust C++ implementation. 17:02:40 That's the most important thing about this thingy, the rest is just me goofing with an untyped LC rewriter. 17:03:17 [[Egel]] N https://esolangs.org/w/index.php?oldid=69600 * B jonas * (+387) Created page with "Egel is a functional programming toy language created by Marco Devillers. == External links == * [https://egel-lang.github.io/ Some documentation] * [https://github.com/egel-..." 17:03:34 we need at least a stub entry with pointers; I can add more details when I figure out what the heck the language is 17:04:12 You can look at the examples. It supports a number of thing you wont find in other LC languages. 17:04:13 I guess I can test that 17:04:38 Exception and multi-adic combinators. 17:04:41 *+s 17:04:51 egelbot: {38, say "foo", 32, say "bar", 75} 17:04:51 bar 17:04:52 foo 17:04:52 (System:cons 38 (System:cons System:nop (System:cons 32 (System:cons System:nop (System:cons 75 System:nil))))) 17:05:05 looks like it is a function with side effects 17:05:08 also... 17:05:26 egelbot: try 1 + throw "hi" catch [ X -> say X] 17:05:26 hi 17:05:36 looks like it can say more than one line to irc 17:05:44 Oh yah. Also: concurrency. 17:05:52 Yes, it could. 17:06:16 I think I put a delay on that but as I said, the bot isn't hardened. 17:06:48 I won't run it when I am not online. It's just to show-case. 17:07:15 Also for myself, you can blow up my laptop any time you feel like. 17:08:31 can the bot join more than one channel, so that we can experiment with possibly spammy things and then show only the result here? 17:08:39 No. 17:09:05 pity. that'd be a helpful feature, since the bot being new, we'll certainly do more experiments on it 17:09:10 I have #egel. But I don't go there anymore. 17:09:13 I will try to as well later 17:09:20 when I'm back 17:09:42 this looks like an interesting toy language 17:09:50 -!- wib_jonas has quit (Remote host closed the connection). 17:09:52 Thanks! 17:09:56 Oh right. 17:47:07 -!- sprocklem has joined. 17:48:54 -!- zzo38 has joined. 18:01:36 -!- sprocklem has quit (Ping timeout: 268 seconds). 18:03:07 -!- LKoen has joined. 18:29:25 -!- b_jonas has joined. 18:30:08 egelbot: dog cat 18:30:08 internal:1:2:semantical:undeclared dog 18:30:15 egelbot: cons 1 2 3 18:30:15 (System:cons 1 2 3) 18:30:38 spruit11: how do you define a new named constructor? 18:31:13 do you just def dog = [] ? 18:31:17 egelbot: [] 2 18:31:17 internal:1:3:syntactical:-> expected 18:31:56 egelbot: let F = [true -> "yes"] in {F true, F false, F 0, F 1, F -1, F {}} 18:31:56 (System:cons "yes" (System:cons (Dummy34DOT1 System:false) (System:cons (Dummy34DOT1 0) (System:cons (Dummy34DOT1 1) (System:cons (Dummy34DOT1 -1) (System:cons (Dummy34DOT1 System:nil) System:nil)))))) 18:32:41 egelbot: let F = [X Y -> (10 * X) + Y] in {F 7 1, F 7 0, F 0 2, (F 7) 1, F (7 1)} 18:32:41 (System:cons 71 (System:cons 70 (System:cons 2 (System:cons 71 (System:cons (Dummy35DOT1 (7 1)) System:nil))))) 18:33:38 egelbot: let F = [X Y -> (10 * X) + Y] in [F -> F 2] (F 7) 18:33:38 72 18:34:16 -!- int-e has left. 18:34:17 egelbot: let F = [X Y -> (10 * X) + Y] in [S -> {S (F 7), S (F 6)}] [F -> F 2] 18:34:17 (System:cons 72 (System:cons 62 System:nil)) 18:35:23 b_jonas: data 18:35:37 egelbot: data tree, leaf 18:35:51 egelbot: [[0 -> 0] -> 3] [0 -> 0] 18:35:51 internal:1:3:syntactical:-> expected 18:35:57 egelbot: tree (leaf 1) (leaf 'a') 18:35:57 (tree (leaf 1) (leaf 'a')) 18:36:04 egelbot: [0 -> 0] 0 18:36:04 0 18:36:05 egelbot: [0 -> 0] 1 18:36:05 (Dummy40DOT0 1) 18:36:39 It refuses to rewrite a combinator introduced by the lambda. 18:36:48 The language is very spartan. 18:36:51 egelbot: let C = [tree -> 2 | leaf -> 0] in {C tree, C leaf} 18:36:51 (System:cons 2 (System:cons 0 System:nil)) 18:37:16 thanks 18:37:26 Np. 18:37:35 Nice to see some interest. 18:39:13 egelbot: [(X Y) -> X] (2 5) 18:39:13 2 18:39:16 egelbot: [(X Y) -> Y] (2 5) 18:39:16 5 18:39:28 egelbot: [(X Y) -> Y] {2, 5} 18:39:28 (Dummy44DOT0 (System:cons 2 (System:cons 5 System:nil))) 18:39:33 egelbot: [(X Y) -> X] {2, 5} 18:39:33 (Dummy45DOT0 (System:cons 2 (System:cons 5 System:nil))) 18:39:42 egelbot: [(X Y Z) -> (X, Y, Z)] {2, 5} 18:39:42 (System:tuple System:cons 2 (System:cons 5 System:nil)) 18:39:52 what 18:39:56 ah ok 18:40:03 egelbot: [(X Y Z) -> X)] {2, 5} 18:40:04 internal:1:15:syntactical:] expected 18:40:07 egelbot: [(X Y Z) -> X] {2, 5} 18:40:07 System:cons 18:40:11 egelbot: [(X Y Z) -> Y] {2, 5} 18:40:11 2 18:40:13 egelbot: [(X Y Z) -> Z] {2, 5} 18:40:14 (System:cons 5 System:nil) 18:40:23 egelbot: [(X Y) -> X] {2, 5} 18:40:24 (Dummy50DOT0 (System:cons 2 (System:cons 5 System:nil))) 18:40:32 hmm 18:40:37 egelbot: [(X Y) -> X] (2 5 1) 18:40:37 (Dummy51DOT0 (2 5 1)) 18:40:58 egelbot: [(X Y) -> X] (cons 2 {5}) 18:40:58 (Dummy52DOT0 (System:cons 2 (System:cons 5 System:nil))) 18:41:01 egelbot: [(X Y) -> X] ((cons 2) {5}) 18:41:01 (Dummy53DOT0 (System:cons 2 (System:cons 5 System:nil))) 18:41:10 egelbot: ((cons 2) {5}) 18:41:10 (System:cons 2 (System:cons 5 System:nil)) 18:42:32 -!- FreeFull has joined. 18:42:41 I wonder if we can build and install this on HackEso. the docs says that it needs libicu, but that's probably not unsurmountable 18:45:21 It isn't hardened. 18:45:46 Maybe if I harden it, or someone else writes a script around it. 18:46:29 I could limit the bot to 100k rewrites, just would take me some time, and I still wouldn't know if that's enough to harden. 18:46:44 Dunno. 18:50:32 HackEso has a built-in time limit for its commands, so you don't need a time limit in the interpreter 18:50:47 60 seconds usually 18:55:03 -!- b_jonas_ has joined. 18:55:38 -!- b_jonas has quit (Ping timeout: 240 seconds). 18:56:46 -!- b_jonas_ has changed nick to b_jonas. 18:56:50 (sorry, technical difficulties) 18:57:30 egelbot: let F = [X Y -> (10 * X) + Y] in {F 7 3, F 7, F} 18:57:30 (System:cons 73 (System:cons (Dummy55DOT1 7) (System:cons Dummy55DOT1 System:nil))) 18:57:51 so this term rewriting system has a full untyped lambda calculus in it, right? 18:59:48 -!- wmww has quit (*.net *.split). 19:00:30 -!- LBPHacker has quit (*.net *.split). 19:00:30 -!- dog_star has quit (*.net *.split). 19:00:31 -!- shig has quit (*.net *.split). 19:01:03 egelbot: let Nth = [0 (X _) -> X | K (_ S) -> Nth (K - 1) S] in Nth 3 {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 19:01:03 internal:1:39:semantical:undeclared Nth 19:01:16 oh yeah, recursion 19:01:43 egelbot: let NthR = [R 0 (X _) -> X | R K (_ S) -> R R (K - 1) S] in let Nth = NthR NthR in Nth 3 {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 19:01:43 (Dummy57DOT2 Dummy57DOT2 3 (System:cons 38 (System:cons 32 (System:cons 75 (System:cons -24 (System:cons -19 (System:cons 53 (System:cons 14 (System:cons 13 (System:cons -28 (System:cons -52 (System:cons 93 (System:cons 90 (System:cons 80 (System:cons 22 (System:cons -98 (System:cons -14 (System:cons -96 (System:cons -81 (System:cons -95 System:nil)))))))))))))))))))) 19:01:55 -!- wmww has joined. 19:01:57 egelbot: let NthR = [R 0 (cons X _) -> X | R K (cons _ S) -> R R (K - 1) S] in let Nth = NthR NthR in Nth 3 {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 19:01:58 -24 19:02:09 egelbot: let NthR = [R 0 (cons X _) -> X | R K (cons _ S) -> R R (K - 1) S] in let Nth = NthR NthR in Nth 4 {38,32,75,-24,-19,53,14,13,-28,-52,93,90,80,22,-98,-14,-96,-81,-95} 19:02:09 -19 19:02:12 -!- LBPHacker has joined. 19:02:12 -!- dog_star has joined. 19:02:12 -!- shig has joined. 19:03:51 -!- imode has quit (Ping timeout: 265 seconds). 19:06:29 -!- arseniiv has joined. 19:06:59 if we want to build the parts with libicu, then I think we'll need the libicu-dev debian package 19:07:17 now let me see these builtin functions 19:08:34 egelbot: k 3 7 19:08:34 3 19:08:41 egelbot: id 3 19:08:41 internal:1:2:semantical:undeclared id 19:08:45 egelbot: identity 3 19:08:45 internal:1:2:semantical:undeclared identity 19:08:53 egelbot: [X->X] 3 19:08:53 3 19:09:01 egelbot: [X X->X] 3 7 19:09:01 internal:1:5:semantical:redeclaration of X 19:09:20 egelbot: + 19:09:20 internal:1:3:syntactical:primary expression expected 19:09:22 egelbot: (+ 19:09:22 internal:1:4:syntactical:primary expression expected 19:09:24 egelbot: (+) 19:09:24 System:+ 19:09:28 egelbot: (+) 2 5 19:09:29 7 19:09:54 egelbot: let (+) = [X Y->(10*X)+Y] in 7+3 19:09:54 (Dummy67DOT0 Dummy67DOT1) 19:09:56 nope 19:10:02 egelbot: let (&) = [X Y->(10*X)+Y] in 7&3 19:10:02 internal:1:7:semantical:undeclared & 19:10:18 egelbot: let 2 = 5 in 2 19:10:18 (Dummy69DOT0 5) 19:10:32 how does that work? 19:10:33 -!- LKoen has quit (Remote host closed the connection). 19:10:36 egelbot: let 2 0 = 5 in 2 0 19:10:37 (Dummy70DOT0 5) 19:10:46 egelbot: let 2 0 = 5 in 2 19:10:46 (Dummy71DOT0 5) 19:10:55 egelbot: let (2 0) = 5 in 2 19:10:55 (Dummy72DOT0 5) 19:11:09 let X = 2 in X 19:11:15 egelbot: let X = 2 in X 19:11:15 2 19:12:09 spruit11: what do declarations like 2 = 5 mean in egel? 19:12:38 oh I see 19:13:47 it just desugars (let 2 = 5 in 2) to something like ([2 -> 2] 5) I think 19:13:56 egelbot: let 2 = 5 in 6 19:13:56 (Dummy74DOT0 5) 19:14:08 egelbot: [2 -> 6] in 5 19:14:08 internal:1:11:syntactical:in unexpected 19:14:11 egelbot: [2 -> 6] 5 19:14:11 (Dummy75DOT0 5) 19:14:14 right 19:14:46 ah 19:15:29 egelbot: 16511&&40537 19:15:29 89 19:15:44 `perl -eprint(16511&40537) 19:15:45 89 19:15:50 Right. 19:15:52 egelbot: 16511||40537 19:15:52 56959 19:15:55 `perl -eprint(16511|40537) 19:15:56 56959 19:16:05 so these are in the standard library, just under a strange name. nice 19:16:07 A let is just a lambda. 19:16:29 egelbot: 16511^^40537 19:16:29 56870 19:16:34 `perl -eprint(16511^40537) 19:16:35 56870 19:16:40 The standard library wasn't very well thought over and is still subject to change. 19:16:44 egelbot: 1/0 19:16:45 (System:/ 1 0) 19:16:50 egelbot: 0x407F 19:16:50 internal:1:7:semantical:undeclared F 19:17:21 Right, I still don't know whether to stop rewriting or throw an exception on `1/0`. 19:17:26 egelbot: &H407F 19:17:26 internal:1:2:syntactical:primary expression expected 19:18:43 egelbot: 1<<7 19:18:43 128 19:18:48 egelbot: 1<<12 19:18:48 4096 19:18:49 egelbot: 1<<22 19:18:49 4194304 19:18:52 egelbot: 1<<30 19:18:52 1073741824 19:18:53 egelbot: 1<<31 19:18:53 2147483648 19:18:54 egelbot: 1<<32 19:18:54 4294967296 19:18:56 egelbot: 1<<35 19:18:56 34359738368 19:18:58 egelbot: 1<<47 19:18:59 140737488355328 19:19:02 egelbot: 1<<62 19:19:02 4611686018427387904 19:19:03 egelbot: 1<<63 19:19:04 -9223372036854775808 19:19:05 egelbot: 1<<64 19:19:05 1 19:19:16 egelbot: (1<<63)+(1<<63) 19:19:16 (System:+ -9223372036854775808 -9223372036854775808) 19:19:53 egelbot: 2 != 3 19:19:54 internal:1:4:syntactical:!= unexpected 19:20:03 egelbot: (!=) 2 3 19:20:03 System:true 19:20:05 egelbot: (!=) 2 2 19:20:05 System:false 19:20:08 heh 19:20:35 egelbot: true == false 19:20:35 System:false 19:20:37 egelbot: true == true 19:20:37 System:true 19:20:41 egelbot: {} == {} 19:20:41 System:true 19:20:43 egelbot: {2} == {3} 19:20:44 System:false 19:20:45 egelbot: {2} == {2} 19:20:45 System:true 19:21:01 Ah. Not sure what unequality is. 19:21:04 egelbot: [_->0] == [_->0] 19:21:04 System:false 19:21:07 egelbot: ~= 19:21:07 internal:1:4:syntactical:primary expression expected 19:21:30 spruit11: (!=) is the unequality function, the lexer just doesn't tokenize it as an infix operator apparently 19:21:42 True. 19:21:45 egelbot: {(!=) 2 2, (!=) 2 3} 19:21:45 (System:cons System:false (System:cons System:true System:nil)) 19:21:52 Been a while. Never tested that it seems. 19:22:00 egelbot: let X = [_->0] in X == X 19:22:00 System:true 19:22:20 egelbot: let X = [_ _->0] in (X 2) == (X 2) 19:22:20 System:true 19:22:23 Neat. 19:22:32 egelbot: let X = [_ _->0] in (X 2) == (X 1) 19:22:32 System:false 19:22:54 egelbot: let (X, Y) = ([_ _->0], [_ _->0]) in (X 1) == (X 1) 19:22:54 System:true 19:22:56 egelbot: let (X, Y) = ([_ _->0], [_ _->0]) in (X 1) == (Y 1) 19:22:56 System:false 19:22:58 egelbot: let (X, Y) = ([_ _->0], [_ _->0]) in (Y 1) == (Y 1) 19:22:58 System:true 19:23:37 hmm, so what are these array things? 19:23:52 What array? 19:24:04 Nice eq checks by the way. 19:24:54 https://github.com/egel-lang/egel/blob/master/src/builtin/system.cpp#L372 19:25:02 Most of your eq checks used dyadidic lambda's. 19:25:05 egelbot: toint "D" 19:25:05 0 19:25:19 egelbot: toint 'D' 19:25:19 68 19:25:23 egelbot: toint "32" 19:25:23 32 19:25:26 egelbot: toint '\n' 19:25:26 10 19:25:32 so that _is_ a newline 19:25:38 egelbot: unpack "foo" 19:25:38 (System:cons 'f' (System:cons 'o' (System:cons 'o' System:nil))) 19:25:45 egelbot: toint (unpack "\n") 19:25:45 (System:toint (System:cons '\n' System:nil)) 19:25:49 Yah. 19:26:10 egelbot: [{X} -> toint X] (unpack "\n") 19:26:10 10 19:26:22 so that is a newline 19:26:26 egelbot: say "foo\nbar" 19:26:26 foo-bar 19:26:31 egelbot: say "foo\r\nbar" 19:26:31 internal:1:11:lexical:error in string 19:26:40 egelbot: say "foo\x0D\nbar" 19:26:40 internal:1:11:lexical:error in string 19:26:48 That's part of the hardening of the bot. 19:27:01 Just replaces \n with - in the output. 19:27:11 Just to be sure. 19:28:57 spruit11: what are these arrays that that line in builtin/system.cpp refer to? 19:29:02 egelbot: int 19:29:02 System:int 19:29:19 egelbot: let X = [ _ -> 0 ] in (X 2) == (X 2) 19:29:19 System:true 19:31:31 Dunno? 19:31:38 What line? 19:31:45 https://github.com/egel-lang/egel/blob/master/src/builtin/system.cpp#L372 19:32:01 Oh, right. 19:32:04 also, is this actually using libicu somewhere? there's no mention in https://github.com/egel-lang/egel/blob/master/src/builtin/string.cpp , but perhaps it's used somewhere else 19:32:06 egelbot: (1 2) 19:32:06 (1 2) 19:32:22 So, that's under water an array [1,2]. 19:32:28 You're not supposed to know. 19:32:30 oh thanks for the link, I was lazy to see in the logs what this new language is 19:32:54 arseniiv: I added a stub entry to the wiki 19:32:57 All strings are libicu strings. 19:33:09 Chars are UChar32. 19:33:38 There's a regex module but not available from the bot. 19:33:56 egelbot: '\r' 19:33:56 internal:1:4:lexical:error in char 19:33:57 b_jonas: neat! 19:33:58 egelbot: '\n' 19:33:58 '\n' 19:34:06 egelbot: '\\' 19:34:06 '\\' 19:34:09 egelbot: '\\s' 19:34:09 internal:1:5:lexical:error in char 19:34:26 Yah, that gets parsed to a newline and unescaped again. 19:34:44 BTW does anybody have a thought about this little detail of Haskell import system which I think isn’t too great: https://www.reddit.com/r/haskell/comments/ewrfaw/monthly_hask_anything_february_2020/fgjhwlz/ 19:35:04 Don't expect too much support for unicode. I just took it as a good start. 19:35:18 Don't remember what lexer can handle. 19:35:38 But most unicode should be fine. 19:36:19 egelbot: '∀' 19:36:19 '∀' 19:36:28 I’d like at least field names of a `data X` be either in a subnamespace `X` or a subnamespace named by the corresponding constructor (for the example, `X1.field1`), at least 19:36:30 egelbot: unescape "foo\\rbar" 19:36:30 "foo\rbar" 19:36:51 There are namespaces, just not in the bot. 19:37:04 egelbot: def car = [(cons X S) -> X] 19:37:11 egelbot: car {3,1} 19:37:11 3 19:37:23 egelbot: cons 19:37:24 System:cons 19:37:25 spruit11: sorry that’s my ramblings about the Haskell in general :) 19:37:27 egelbot: toint(car(unpack(unescape "\r"))) 19:37:27 internal:1:30:lexical:error in string 19:37:37 egelbot: toint(car(unpack(unescape "\\r"))) 19:37:37 13 19:37:39 there it is 19:37:45 egelbot: toint(car(unpack(unescape "\\x00"))) 19:37:45 0 19:37:47 egelbot: toint(car(unpack(unescape "\\x0"))) 19:37:47 0 19:37:49 egelbot: toint(car(unpack(unescape "\\x01"))) 19:37:49 1 19:37:51 egelbot: toint(car(unpack(unescape "\\x0D"))) 19:37:51 13 19:37:53 egelbot: toint(car(unpack(unescape "\\x0A"))) 19:37:53 10 19:38:04 I don't even remember that. 19:38:07 egelbot: say(unescape "foo\\rbar") 19:38:07 foo 19:38:17 egelbot: say(unescape "foo\\rPRIVMSG #esoteric :bar") 19:38:17 foo 19:38:17 bar 19:38:20 oops 19:38:40 egelbot: say(unescape "foo\\rPRIVMSG b_jonas :hello jonas") 19:38:40 foo 19:38:40 You hacked around it? 19:39:05 Oh right, doesn't escape \\r, only \\n. 19:39:08 Didn't know. 19:39:12 Will fix. 19:39:27 it was one of the first things I tried, but say escapes "\n", and there's no chr function so I didn't know how to get a "\r" until I read the library 19:39:34 make sure to escape "\x00" too 19:39:44 Right. 19:40:08 But you can easily blow up my laptop, so I won't run this a lot. 19:40:29 yes, that's why I'm saying I should try to build and install this interpreter to HackEso 19:40:38 you have the sources, if they can build cleanly then it should be possible 19:40:41 Needs more hacking and this was good enough for my purposes at the time. 19:40:54 I am not really that happy about the build. 19:41:23 It depends on libegel installed systemwide. 19:41:25 ooh 19:41:33 egelbot: head {3,1,4} 19:41:33 internal:1:2:semantical:undeclared head 19:41:36 nope 19:41:44 You can work around that, if you know how to. 19:41:53 egelbot: List:head {3,1,4} 19:41:53 3 19:41:55 there 19:42:12 egelbot: List:nth {3,1,4} 0 19:42:12 (List:nth (System:cons 3 (System:cons 1 (System:cons 4 System:nil))) 0) 19:42:16 egelbot: using List 19:42:16 egelbot: List:nth 0 {3,1,4} 19:42:16 3 19:42:20 egelbot: List:nth 1 {3,1,4} 19:42:20 1 19:42:28 That opened the namespace. 19:42:40 egelbot: head {1,3} 19:42:40 1 19:47:47 egelbot: List:map [X->10*X] {7,6,1} 19:47:47 (System:cons 70 (System:cons 60 (System:cons 10 System:nil))) 19:48:06 I wish the writer had a concise syntax for lists and tuples, rather than printing the internal form 19:48:14 egelbot: (2,1) 19:48:14 (System:tuple 2 1) 19:48:17 egelbot: 2;1 19:48:17 1 19:48:24 egelbot: (2;1)+10 19:48:24 11 19:48:34 egelbot: (;) 19:48:35 internal:1:3:syntactical:primary expression expected 19:49:22 egelbot: 0x407f 19:49:22 16511 19:49:23 egelbot: 0x407F 19:49:23 internal:1:7:semantical:undeclared F 19:49:24 eww 19:49:47 egelbot: let F = 0 in 0x407F 19:49:47 (1031 0) 19:50:12 -!- rain1 has joined. 19:50:46 egelbot: List:foldl (+) {"a","b","c"} 19:50:46 (List:foldl System:+ (System:cons "a" (System:cons "b" (System:cons "c" System:nil)))) 19:50:52 egelbot: List:foldr (+) {"a","b","c"} 19:50:52 (List:foldr System:+ (System:cons "a" (System:cons "b" (System:cons "c" System:nil)))) 19:50:59 egelbot: List:foldr (+) "" {"a","b","c"} 19:50:59 "abc" 19:51:00 You are thorough! 19:51:24 Could have save me a lot of unit tests. ;) 19:51:47 thanks, I'll link to that line in the channel logs for my next interview :-) 19:52:12 I only did some tests in the REPL. 19:52:42 Just relying on what I know and whether it seemed correct on cursory glance. 19:52:54 egelbot: List:foldr(+)""(List:map[K->List:nth{"zero","one","two","three"}K]{3,0,1,3}) 19:52:54 (System:+ (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "three" System:nil)))) 3) (System:+ (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "three" System:nil)))) 0) (System:+ (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "three" System:nil)))) 1) (System:+ (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "thr 19:53:01 no 19:53:21 egelbot: [K->List:nth{"zero","one","two","three"}K]0 19:53:21 (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "three" System:nil)))) 0) 19:53:35 egelbot: List:nth {"zero","one","two","three"} 0 19:53:35 (List:nth (System:cons "zero" (System:cons "one" (System:cons "two" (System:cons "three" System:nil)))) 0) 19:53:49 egelbot: List:nth 0 {"zero","one","two","three"} 19:53:50 "zero" 19:53:51 oh right 19:53:58 egelbot: List:foldr(+)""(List:map[K->List:nth K{"zero","one","two","three"}]{3,0,1,3}) 19:53:58 "threezeroonethree" 19:54:04 good 19:54:21 \o/ 19:55:08 I opened the namespace, you no longer need to type List. 19:55:29 yes, but I want to write this is such a way that it works out of box when you rerun the interpreter 19:55:36 Ah, right. 19:55:54 egelbot: List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: List:foldr(+)","(List:map[K->List:nth K{"}]{3,1,1,4}) 19:55:54 "egelbot: List:foldr(+)\"\"(List:map[K->List:nth K{" 19:56:14 egelbot: List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: List:foldr(+)","(List:map[K->List:nth K{"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1}) 19:56:14 "egelbot: List:foldr(+)\"\"(List:map[K->List:nth K{\"\\\\\",\"\\\"\",\",\",\"" 19:56:19 Wut? 19:56:23 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: List:foldr(+)","(List:map[K->List:nth K{"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1})) 19:56:23 egelbot: List:foldr(+)""(List:map[K->List:nth K{"\\","\"",","," 19:56:30 I'm trying to write my favorite form of quine 19:56:44 Oh, I never was good at those. 19:56:52 this is an easy one to write 19:56:56 Don't really grok them. 19:57:00 Neat! 19:57:12 because it has a generic enough structure that works in many languages 19:57:53 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1..."}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,2})) 19:57:53 egelbot: List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1...", 19:58:07 that said, this might be too long for an irc line, so I'll have to specialize it 19:58:23 There's an eval too. 19:58:33 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1..."}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,2,})) 19:58:34 internal:1:191:syntactical:primary expression expected 19:58:42 egelbot: eval "[X -> X]" 1 19:58:43 1 19:58:47 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1..."}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,2})) 19:58:47 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1...", 19:59:02 Not sure I implemented that correctly. But seems to work. 19:59:36 It leaks, since it needs to rerun the interpreter. 19:59:52 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1..."}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 19:59:52 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1..."}]{3,1,1... 20:00:06 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1...5,1,5}))"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:06 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1...5,1,5}))"}]{3,1,1...5,1,5})) 20:00:24 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:24 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:33 Got it? 20:00:43 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:43 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}]{3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:44 Looks right. 20:00:56 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:00:56 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:01:15 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:01:15 egelbot: say(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: say(List:foldr(+)","(List:map[K->List:nth K{","}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5}))"}] {3,1,1,4,1,0,0,1,2,1,0,1,1,2,1,2,1,2,1,3,1,2,1,4,1,2,1,5,1,5})) 20:01:20 probably 20:01:36 it is possible to write much shorter quines of course, this is just one that I like because it's easy to write 20:01:59 I have no idea what you did but color me impressed. 20:02:27 you can read the list manipulation part, right? 20:02:38 Yah. 20:02:56 there's a list of strings, and a list of integers, and I index the list of integers with each of the list of strings and print them 20:03:12 works well in most languages 20:03:24 if they have a way to write string constants like this 20:03:34 This will need some thought on my part. I saved the expression for later. 20:04:53 you can usually get shorter or nicer quines if you use properties that are more specific to the language 20:06:15 Looks okay enough to me. 20:07:17 I am off. Will let the bot run for a while. 20:07:17 egelbot: "A""D" 20:07:17 ("A" "D") 20:07:46 egelbot: [Q B->]"\"""\\" 20:07:46 internal:1:8:syntactical:primary expression expected 20:08:04 Yah, hint. There's no real difference between data constructors and other constants. 20:08:10 egelbot: 1 2 20:08:10 (1 2) 20:08:18 This works fine. 20:08:23 egelbot: cons 1 nil 20:08:23 (System:cons 1 System:nil) 20:08:29 This works fine 20:08:37 egelbot: nil 1 cons 20:08:37 (System:nil 1 System:cons) 20:08:41 But that too. 20:08:51 There's no difference. It's just composition. 20:09:27 egelbot: [Q B L->L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q]"\"""\\""[Q B L->L+Q+B+...L+Q]" 20:09:27 "[Q B L->L+Q+B+...L+Q]\"\\\"\"\"\\\\\"\"[Q B L->L+Q+B+...L+Q]\"" 20:09:39 egelbot: [Q B L->L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q]"\"""\\""[Q B L->L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q]" 20:09:39 "[Q B L->L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q]\"\\\"\"\"\\\\\"\"[Q B L->L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q]\"" 20:09:43 no 20:09:44 needs say 20:10:03 egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""[Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:03 [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""[Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:11 egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:12 egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:21 egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:21 egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]"\"""\\""egelbot: [Q B L->say(L+Q+B+Q+Q+Q+B+B+Q+Q+L+Q)]" 20:10:34 egelbot: quote "a\nb" 20:10:34 internal:1:2:semantical:undeclared quote 20:10:42 Ah, You removed the fold. 20:10:44 egelbot: escape "a\nb" 20:10:44 internal:1:2:semantical:undeclared escape 20:10:54 spruit11: and removed the list indexing 20:11:17 also wrote it in such a way that there's nothing after the final double quote, so we don't need a fourth string 20:14:08 [[Language list]] https://esolangs.org/w/index.php?diff=69601&oldid=69589 * B jonas * (+11) [[Egel]] 20:15:58 [[Egel]] https://esolangs.org/w/index.php?diff=69602&oldid=69600 * B jonas * (+9) 20:16:43 egelbot: get 0 ("foo" "bar") 20:16:43 (System:get 0 ("foo" "bar")) 20:16:47 egelbot: get ("foo" "bar") 0 20:16:47 (System:get ("foo" "bar") 0) 20:16:50 egelbot: get ("foo" "bar") 1 20:16:51 (System:get ("foo" "bar") 1) 20:16:55 egelbot: get {1,2} 0 20:16:55 (System:get (System:cons 1 (System:cons 2 System:nil)) 0) 20:16:59 egelbot: get {6,7} 0 20:16:59 (System:get (System:cons 6 (System:cons 7 System:nil)) 0) 20:17:01 egelbot: get {6,7} 1 20:17:01 (System:get (System:cons 6 (System:cons 7 System:nil)) 1) 20:17:03 egelbot: get 0 {6,7} 20:17:03 (System:get 0 (System:cons 6 (System:cons 7 System:nil))) 20:17:11 egelbot: get 0 (6 7) 20:17:12 (System:get 0 (6 7)) 20:17:42 egelbot: get (6 7) 0 20:17:43 (System:get (6 7) 0) 20:17:44 egelbot: get (6 7) 1 20:17:45 (System:get (6 7) 1) 20:18:09 egelbot: getv (6 7) 20:18:09 (System:getv (6 7)) 20:18:21 Uh. 20:19:10 egelbot: charAt "foo" 0 20:19:10 (String:charAt "foo" 0) 20:19:14 egelbot: charAt 0 "foo" 20:19:14 'f' 20:19:15 egelbot: charAt 1 "foo" 20:19:16 'o' 20:19:41 egelbot: getv (var 0) 20:19:41 internal:1:8:syntactical:primary expression expected 20:20:07 egelbot: getv (v 0) 20:20:07 0 20:20:27 Right, that's for an unsafe extension of Egel. 20:20:44 egelbot: setv 1 (v 0) 20:20:44 (System:setv 1 (System:v 0)) 20:20:51 egelbot: 10 % 3 20:20:51 1 20:21:03 egelbot: next 20:21:03 internal:1:2:semantical:undeclared next 20:21:05 egelbot: last 20:21:06 internal:1:2:semantical:undeclared last 20:21:11 egelbot: data next 20:21:15 egelbot: data last 20:21:20 egelbot: {next, last} 20:21:20 (System:cons next (System:cons last System:nil)) 20:21:29 egelbot: setv (v 1) 1 20:21:29 (System:v 1) 20:21:36 egelbot: setv (v 0) 1 20:21:36 (System:v 1) 20:21:39 egelbot: loop 20:21:39 internal:1:2:semantical:undeclared loop 20:21:58 It overwrites the term. But the term needs to be a DAG, so that's unsafe. 20:22:50 egelbot: def loop = [Func Init -> [(next X) -> loop Func X | (last R) -> R] (Func Init)] 20:23:07 I'm trying to see if I can translate http://math.bme.hu/~ambrus/pu/olvashato/t2.olv 20:23:13 egelbot: iota 20:23:14 internal:1:2:semantical:undeclared iota 20:24:45 egelbot: def iota = [N -> loop [(K, D) -> if k <= 0 then last D else next (K - 1, cons (k - 1) D)] (n, {})] 20:24:45 internal:1:93:semantical:undeclared n 20:24:54 egelbot: def iota = [N -> loop [(K, D) -> if k <= 0 then last D else next (K - 1, cons (k - 1) D)] (N, {})] 20:25:01 egelbot: iota 7 20:25:22 egelbot: 47319 20:25:28 I probably made an infinite loop 20:25:33 Not exactly sure what that does but I like 'coalgebraic' loops more. 20:25:39 Oh right, moment. 20:25:49 -!- egelbot has quit (Read error: Connection reset by peer). 20:26:04 -!- egelbot has joined. 20:26:22 egelbot: data next 20:26:28 egelbot: data last 20:26:41 egelbot: def ones = (1, [ _ -> ones ]) 20:26:53 egelbot: ones 20:26:53 (System:tuple 1 onesDOT0) 20:27:08 egelbot: tail ones 20:27:08 internal:1:2:semantical:undeclared tail 20:27:12 uh. 20:27:28 egelbot: [ (X,Y) -> Y ] ones 20:27:29 onesDOT0 20:27:37 Oh, right. 20:27:55 egelbot: def ones = [ _ -> (1, ones) ] 20:28:01 egelbot: ones 20:28:01 ones 20:28:08 egelbot: ones 0 20:28:09 (System:tuple 1 ones) 20:28:19 I probably did a stupid typo, but it's not easy to debug this 20:28:34 Right, that recursive can be used as an infinite list of ones. 20:28:48 Egel isn't user friendly. 20:29:02 no, the code that I'm translating isn't user-friendly 20:29:38 Ah. ;) 20:30:05 Anyway, back later. 20:44:16 fizzie: I'm not sure if I'll try to build this egel interpreter on HackEso, but if I will, then I'll ask for the libicu-dev package. is that big? the library itself is already installed, only the dev package isn't, it seems 20:48:05 My advice: Don't install. I am perfectly fine as is. 20:48:24 In 2600 it says: If you're referring to Spring having the IPv6 assignment of "2600" and not us, we definitely were not a part of how that played out. We'll have our revenge when IPv9 is implemented. 20:48:54 spruit11: yes, but I want to experiment with the interpreter, and in a way that infinite loops don't kill it and suchlike 20:49:03 I thought that the next usable number of internet version numbering is ten and not nine, but, maybe I forgot or maybe they forgot or maybe we both forgot 20:49:13 egelbot: ["a" -> 1 | X -> 0] "a" 20:49:13 1 20:49:22 egelbot: ["a" -> 1 | X -> 0] "b" 20:49:22 0 20:50:21 you can still run egelbot in paralllel to that 20:53:56 b_jonas: Oh. If you could get it to work otherwise I would want to see it! 20:55:09 egelbot: [ X Y -> 2 | X -> 1 | -> 0 ] 'a' 20:55:10 1 20:55:12 egelbot: [ X Y -> 2 | X -> 1 | -> 0 ] 20:55:13 0 20:55:35 b_jonas: There, the more esoteric part of Egel. 20:58:19 spruit11: "otherwise"? 20:58:21 other than what? 20:58:36 egelbot: [-> 0] 20:58:36 0 20:59:09 egelbot: let X = [1 -> 6 | -> 7] in {X 0, X 1} 20:59:09 (System:cons (7 0) (System:cons (7 1) System:nil)) 20:59:22 that doesn't look right 20:59:26 egelbot: let X = [1 -> 6 | X -> 7] in {X 0, X 1} 20:59:26 (System:cons 7 (System:cons 6 System:nil)) 21:00:09 egelbot: let X = [1 -> 6 | -> 7] in X 1 21:00:09 (7 1) 21:00:09 Nono, that's right. 21:00:15 egelbot: let X = [1 -> 6] in X 1 21:00:15 6 21:00:38 egelbot: [ -> 1 ] 2 21:00:39 (1 2) 21:00:52 A zero-adic lambda. 21:00:59 Just rewrites to 1. 21:01:18 egelbot: [_ _ -> 6] 0 1 21:01:19 6 21:01:23 egelbot: [Z Z -> 6] 0 1 21:01:23 internal:1:5:semantical:redeclaration of Z 21:01:27 nice 21:01:40 egelbot: [_ _ -> 6 + _] 0 1 21:01:40 internal:1:14:semantical:undeclared _ 21:01:59 egelbot: P 21:01:59 internal:1:2:semantical:undeclared P 21:02:00 Hmm, kind-of right? 21:02:32 I shouldn't allow wildcards in expressions. That's a feature. 21:02:35 Will fix. 21:02:36 what I don't understand is why def'ed variables are lowercase, as well as constructors, but local variables are uppercase. or is some of that optional? 21:03:05 Anything 'constant' is lowercase. 21:03:20 def f = [ X-> X ] 21:03:28 egelbot: def f = [ X-> X ] 21:03:32 egelbot: f 21:03:32 f 21:03:35 def Pk1 = 1 21:03:37 egelbot: def Pk1 = 1 21:03:38 internal:1:2:syntactical:combinator or operator expected 21:03:53 Right, it's a combinator which may rewrite. 21:04:23 egelbot: [ f -> 'hi' ] f 21:04:23 internal:1:11:lexical:error in char 21:04:31 egelbot: [ f -> "hi" ] f 21:04:32 "hi" 21:06:05 I took it as far as I could go. I.e., you have some 'introspection' qualities. 21:06:10 egelbot: sin 21:06:11 internal:1:2:semantical:undeclared sin 21:06:17 egelbot: Math:sin 21:06:17 Math:sin 21:06:26 egelbot: using Math 21:06:27 ok that's weird 21:06:40 egelbot: [ sin -> "using sin" ] sin 21:06:41 "using sin" 21:07:46 egelbot: [0 -> 6| ] 0 21:07:46 internal:1:11:syntactical:-> expected 21:07:47 I was looking for exploitable features in the operational model. But couldn't take it very far. 21:08:02 egelbot: [0 -> 6| 1 X -> 7] 0 2 21:08:03 (6 2) 21:08:05 egelbot: [0 -> 6| 1 X -> 7] 1 2 21:08:06 7 21:08:17 egelbot: [0 -> 6| X 1 -> 7] 0 1 21:08:18 (6 1) 21:08:27 egelbot: [X 1 -> 7| 0 -> 6] 0 1 21:08:27 7 21:08:40 egelbot: [X 1 -> 7| -> 6] 0 1 21:08:41 7 21:08:48 egelbot: [1 -> 7| -> 6] 1 21:08:49 7 21:09:16 egelbot: let X = [1 -> 7| -> 6] in X 1 21:09:17 (6 1) 21:09:23 ... 21:09:36 Hmm. 21:09:41 yeah, nicely esoteric 21:09:53 that other thing too, where 21:10:07 egelbot: (cons 2) nil 21:10:07 (System:cons 2 System:nil) 21:10:12 egelbot: {2} 21:10:12 (System:cons 2 System:nil) 21:10:15 It's probably something to do with let. 21:10:17 functions are clearly curried 21:10:17 but 21:10:26 egelbot: [X Y -> 6] {2} 21:10:26 (Dummy33DOT0 (System:cons 2 System:nil)) 21:10:30 egelbot: [X Y Z -> 6] {2} 21:10:30 (Dummy34DOT0 (System:cons 2 System:nil)) 21:10:40 egelbot: [(X Y) -> 6] {2} 21:10:40 (Dummy35DOT0 (System:cons 2 System:nil)) 21:10:42 egelbot: [(X Y Z) -> 6] {2} 21:10:43 6 21:10:53 you can't match them as curried, you need to match the exact number of arguments 21:11:01 that too is strange 21:11:03 Right. 21:11:35 Thinking about let X = [1 -> 7| -> 6] in X 1 21:12:05 egelbot: [1 -> 7 | -> 6] 21:12:05 6 21:12:19 evaluates it nullary immediately 21:12:30 egelbot: {[1 -> 7 | -> 6]} 21:12:30 (System:cons 6 System:nil) 21:12:33 that too 21:12:38 egelbot: ([1 -> 7 | -> 6],) 21:12:38 internal:1:19:syntactical:primary expression expected 21:12:43 egelbot: tuple [1 -> 7 | -> 6] 21:12:43 (System:tuple 6) 21:13:06 egelbot: [ X -> X 1 ] [1 -> 7| -> 6] 21:13:06 (6 1) 21:13:21 Right, it fits if you understand the operational model. 21:13:32 It's eager. 21:13:55 This, [1 -> 7| -> 6], gets rewritten to 6 first, then applied. 21:14:16 oh, that's a nice weasel phrase. "it fits if you understand the operational model." I'll try to tell that to my supervisor the next time something is broken at work 21:14:26 Hey! 21:14:26 fungot, do you fit if you understand the operational model? 21:14:27 b_jonas: http://lambda-the-ultimate.org/ node/ 841??! 21:14:42 `8-ball do you fit if you understand the operational model? 21:14:43 It is decidedly so. 21:15:12 No, it's just that you need to be very careful with zero-adic functions. 21:15:25 They might rewrite before you apply them. 21:15:34 It's a feature, not a bug! 21:15:36 "very careful" as in I should probably never use them 21:15:41 Right. 21:16:04 Like I said, I took the operational model as far as I could get it to go. 21:16:20 I wasn't designing something to be actually used. 21:16:30 This is #esoteric, right? 21:16:35 yes 21:16:39 Right. 21:17:29 The thought was: Lisp got very far by exploiting their operational model as far as they could get it. Let's try the same. 21:18:23 I wanted to explore what you can do. 21:18:41 Most of what you can do turned out to be bad. 21:18:45 So? 21:20:22 I think we can do this even without nullary functions: 21:21:18 egelbot: [_ _ -> 2 | _ -> 1] 0 0 21:21:18 2 21:21:24 egelbot: ([_ _ -> 2 | _ -> 1] 0) 0 21:21:24 2 21:21:34 egelbot: let X = [_ _ -> 2 | _ -> 1] 0 in X 0 21:21:34 Right! 21:21:34 (1 0) 21:22:44 Sure, but you can do it! 21:22:59 It's a bit of joke, the language. 21:23:08 You're supposed to laugh now! 21:23:48 But I agree, variadic lambda's don't really make sense. At least, I haven't found good use for them yet. 21:24:03 Still looking, though. 21:24:11 Well, I was. 21:46:18 -!- rain1 has quit (Quit: leaving). 21:50:34 egelbot: unescape "\u006D\U0000006D\u0142\U00000142" 21:50:35 internal:1:13:lexical:error in string 21:50:48 egelbot: unescape "\\u006D\\U0000006D\\u0142\\U00000142" 21:50:49 internal:1:2:semantical:undeclared unescape 21:50:57 egelbot: unescape "\\u006D\\u0142" 21:50:57 There's only provisional support for unicode. 21:50:57 internal:1:2:semantical:undeclared unescape 21:51:06 egelbot: unescape "\\u006d\\u0142" 21:51:06 internal:1:2:semantical:undeclared unescape 21:51:08 I am not sure what the lexer does on it. 21:51:10 egelbot: unescape "\\u0061" 21:51:10 internal:1:2:semantical:undeclared unescape 21:51:16 egelbot: unescape "\\x61" 21:51:17 internal:1:2:semantical:undeclared unescape 21:51:27 wait 21:51:31 egelbot: unquote "\\u0061" 21:51:32 internal:1:2:semantical:undeclared unquote 21:51:36 egelbot: String:unquote "\\u0061" 21:51:36 internal:1:2:semantical:undeclared unquote 21:51:41 egelbot: String:unescape "\\u0061" 21:51:41 "a" 21:51:47 egelbot: String:unescape "\\u006D\\U0000006D\\u0142\\U00000142" 21:51:48 "mmłł" 21:51:51 that works 21:51:59 so it's possible to implement chr from that 21:52:03 egelbot: using String 21:52:50 I honestly forgot what unescape is supposed to do. 21:52:56 Lemme check. 21:54:31 Oh, right. That's from libicu. 21:55:01 egelbot: [U->[F->F F[X->X]0 U][F B L U->[false->B|true->F F(B L)(L+1)U]L System:false 21:55:16 egelbot: [U->[F->F F[X->X]0 U][F B L U->[false->B|true->F F(B L)(L+1)U](L (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98) 21:55:32 egelbot: [U->[F->F F()0 U][F B L U->[false->B|true->F F(B L)(L+1)U](L internal:1:14:syntactical:primary expression expected 21:55:38 egelbot: [U->[F->F F tuple 0 U][F B L U->[false->B|true->F F(B L)(L+1)U](L (System:tuple 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98) 21:56:07 I use tuple for printing here only because the output format of lists is annoyingly verbose 21:56:14 egelbot: 1 & 2 21:56:14 internal:1:4:semantical:undeclared & 21:56:20 egelbot: (&) 1 2 21:56:21 internal:1:3:semantical:undeclared & 21:56:26 egelbot: data & 21:56:26 internal:1:7:syntactical:lowercase expected 21:56:30 egelbot: data(&) 21:56:30 internal:1:6:syntactical:lowercase expected 21:57:03 Constants compose, you might not even need that. 21:57:31 sure, for numbers I don'yt 21:57:46 ideally you should make lists and tuples print in a nicer way 21:57:55 Yah. 21:58:01 is there a way to declare a constructor that is an infix operator? 21:58:11 Uh, don't think so. 21:58:19 egelbot: data ^ 21:58:19 internal:1:7:syntactical:lowercase expected 21:58:23 No. 21:58:35 egelbot: let (&) = [X Y -> 10 * X + Y] in 7 & 1 21:58:36 internal:1:7:semantical:undeclared & 21:58:44 egelbot: let (&) = [X Y -> 10 * X + Y] in (&) 7 1 21:58:45 internal:1:7:semantical:undeclared & 21:58:51 What you can do is introduce a combinator which just doesn't rewrite. 21:59:01 If you really want it. 21:59:25 are there infixes that behave like an uppercase variable? 21:59:35 Uh? 22:00:14 you know, so when I write say (X & Y) it should be parsed as ((&) X Y) where (&) is like an uppercase name that you can use as a local variable in lambdas 22:00:24 but possibly for an infix other than & 22:00:44 like, infixes starting with : or something 22:00:44 in GHC Haskell you can use :& 22:00:47 mhm 22:00:59 Uhm, no. Guards are simplified expressions and parsed differently. 22:01:37 So, you can have [ (/) X Y -> 3 ] like guards, but that's about it. 22:01:49 spruit11: even if I can't use the infix form in a pattern, only in an expression, my question stand 22:02:29 spruit11: like can I write [(&) -> 3 & 7] [X Y -> 10*X+Y] 22:02:40 egelbot: [(&) -> 3 & 7] [X Y -> 10*X+Y] 22:02:40 internal:1:4:semantical:undeclared & 22:02:43 I think so. 22:02:45 where (&) should be a local variable 22:02:46 ok 22:02:52 Oh, no. 22:02:54 -!- sprocklem has joined. 22:03:00 Operators are always constants. 22:03:01 so no local variable infixes 22:03:07 Just parsed differently. 22:03:48 There's no big difference between 'v' or '-' except they're parsed differently. And all uppercase are variables. 22:04:01 Right. 22:04:30 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F(B L)(L+1)U](L internal:1:69:syntactical:] unexpected 22:04:33 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F(B L)(L+1)U](L (System:tuple 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110) 22:07:48 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true->B|false->[false->B L|true->T T(C+1)]C*C<=L]0==L%C])(L+1)U](L System:false 22:08:21 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true->B|false->[false->B L|true->T T(C+1)](C*C<=L)](0==L%C)])(L+1)U](L (System:tuple 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:08:33 egelbot: [F->F F 2 3 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true->B|false->[false->B L|true->T T(C+1)](C*C<=L)](0==L%C)])(L+1)U](L (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:09:15 egelbot: [(0<0)->"yes"|_->"no"]true 22:09:15 internal:1:5:syntactical:) expected 22:10:53 egelbot: [F->F F 2 3 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true _->B|_ false->B L|_ _->T T(C+1)](C*C<=L)(0==L%C)])(L+1)U](L (2 3) 22:11:10 egelbot: [F->F F 2 3 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true _->B|false false->B L|false true->T T(C+1)](C*C<=L)(0==L%C)])(L+1)U](L (2 3) 22:11:22 egelbot: [F->F F 2 3 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true _->B|false false->B L|false true->T T(C+1)](0==L%C)(C*C<=L)])(L+1)U](L (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:11:47 egelbot: [F->F F 2 3 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true _->B|_ true->T T(C+1)|_ _->B L](0==L%C)(C*C<=L)])(L+1)U](L (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:12:04 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true _->B|_ true->T T(C+1)|_ _->B L](0==L%C)(C*C<=L)])(L+1)U](L (System:tuple 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:12:45 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F([T->T T 2][T C->[true true->B|_ true->T T(C+1)|_ _->B L](0==L%C)(C*C<=L)])(L+1)U](L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:13:42 egelbot: [F->F F tuple 2 111][F B L U->[false->B|true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:14:12 egelbot: [F->F F tuple 2 111][F B L U->[true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(LB])(L+1)U](L (Dummy72DOT4 Dummy72DOT5 (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 111 111 System:false) 22:14:27 egelbot: [F->F F tuple 2 111][F B L U->[true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(LB](L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:14:53 egelbot: [F->F F tuple 2 111][F B L U->[true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(LB](L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:18:15 [ ')',~'(System:tuple ',":p:i.29 22:18:16 b_jonas: (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 22:19:27 -!- LKoen has joined. 22:26:36 oh wait 22:26:44 egelbot: = 2 5 22:26:44 internal:1:2:syntactical:primary expression expected 22:26:45 nope 22:35:42 egelbot: != 2 5 22:35:42 internal:1:2:semantical:undeclared !!= 22:36:01 What are you trying to do? 22:36:10 egelbot: 2 == 5 22:36:11 System:false 22:36:16 egelbot: 2 != 5 22:36:16 internal:1:4:syntactical:!= unexpected 22:36:25 Uh. RIght. 22:36:34 egelbot: (!=) 2 5 22:36:34 System:true 22:36:42 Guess I never fixed that. 22:37:40 just checking if using = as an infix invokes (!=) 22:37:53 but it doesn't, probably because = is special in grammar for let 22:37:58 Right. 22:38:02 and for def too 22:38:12 It's a keyword I think too. 22:39:44 Right, I checked in the lexer, it's definitely a keyword. 22:40:11 egelbot: != 1 2 22:40:11 internal:1:2:semantical:undeclared !!= 22:40:55 Right, I never used it so far. Another thing to fix. Probably I'll introduce another operator for that. 22:41:16 I do appreciate that you at least added a proper arithmetical library 22:41:23 egelbot: def (/=) = (!=) 22:41:23 internal:1:2:syntactical:combinator or operator expected 22:41:27 egelbot: def (~=) = [ X Y -> not ( X == Y ) ] 22:41:27 internal:1:2:syntactical:combinator or operator expected 22:41:33 egelbot: def ~= = [ X Y -> not ( X == Y ) ] 22:41:39 egelbot: def /= = (!=) 22:41:47 egelbot: 2 /= 2 22:41:47 System:false 22:41:48 egelbot: 2 /= 3 22:41:48 System:true 22:41:49 -!- int-e has joined. 22:41:57 egelbot: (2,2)<(2,1) 22:41:57 System:false 22:41:59 egelbot: (2,2)<(2,3) 22:41:59 System:true 22:42:02 -!- int-e has left. 22:42:03 egelbot: (2,2)<(1,3) 22:42:03 System:false 22:42:05 egelbot: (2,2)<(3,3) 22:42:06 System:true 22:42:07 egelbot: (2,2)<(3,1) 22:42:07 System:true 22:42:09 egelbot: (2,2)<(1,1) 22:42:09 System:false 22:42:24 Yah, it's overlap because operators starting with '!' are supposed to be prefix, I think. 22:42:34 Didn't think of it. 22:42:37 Will fix. 22:42:38 it looks as if these try to do a full lexicographical ordering. that's nice. 22:42:42 egelbot: 2 < true 22:42:43 System:true 22:42:59 Yah, it does a best effort on basis of a table. 22:43:50 The table orders operators lexicographically where the first char defines the class (infix/prefix). 22:44:28 -!- int-e has joined. 22:44:31 That way you can always introduce an operator without thinking to much about fixity numbers. 22:44:40 FWIW, this is ridiculous: echo $(< 2020-02-04.txt wc -l) $(< 2020-02-04.txt grep -Ev 'egelbot' | wc -l) ==> 1424 622 22:44:59 But the table isn't stable yet. 22:45:14 Oh, right. Shall I shut it down? 22:45:28 I can run the bot in #egel. 22:47:44 Well from where I'm standing (I'm a bit grumpy though) it would be nice if the noisy experiments could happen somewhere else... highlights are still welcome here? 22:50:40 -!- 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:52:36 spruit11: is there a simple comment syntax? 22:52:58 egelbot: (1.5<2,2.0<2,2.5<2) 22:52:58 (System:tuple System:false System:false System:false) 22:53:13 egelbot: (2<1.5,2<2.0,2<2.5) 22:53:13 (System:tuple System:true System:true System:true) 22:54:15 int-e: I asked if I could talk to the bot on a different channel. not yet apparently. it should be possible to install the interpreter to HackEso, in which case I could talk to it on both channels. 22:55:06 egelbot: (abs 2,abs 2.0) 22:55:07 (System:tuple (Math:abs 2) 2.000000000000000) 22:55:27 egelbot: 2+2.0 22:55:28 (System:+ 2 2.000000000000000) 22:55:47 egelbot: (tofloat 2,toint 2,tofloat 2.0,toint 2.0,tofloat 2.5,toint 2.5) 22:55:48 (System:tuple 2.000000000000000 2 2.000000000000000 2 2.500000000000000 2) 22:56:04 egelbot: (1/0,1.0/0.0) 22:56:04 exception(System:divzero) 22:56:09 egelbot: (1.0/0.0) 22:56:09 exception(System:divzero) 22:56:20 yeah fine. I'll be back in a couple of days then. 22:56:21 -!- int-e has left. 22:56:30 that latter should probably give an infinity though 22:57:24 egelbot: floor(1e199/3) 22:57:25 internal:1:9:semantical:undeclared e199 22:57:28 egelbot: floor(1.0e199/3) 22:57:28 (Math:floor (System:/ 1.000000000000000e+199 3)) 22:57:31 uh 22:57:35 egelbot: floor(1.e199/3) 22:57:35 internal:1:10:lexical:error in float 22:57:43 egelbot: floor(1.e199/3.0) 22:57:43 internal:1:10:lexical:error in float 22:57:47 egelbot: floor(1.0e199/3.0) 22:57:48 3.333333333333333e+198 22:58:03 Comments start with #. 22:58:14 I had C-style but got rid of that. 22:58:16 egelbot: toint(floor(1.0e199/3.0)) # let me test comment syntax 22:58:16 -9223372036854775808 22:59:03 egelbot: (random,random,random) 22:59:04 (System:tuple 1681692777.000000 846930886.0000000 1804289383.000000) 22:59:20 that is almost certainly a bug or a documentation bug 22:59:56 Which one? 23:00:00 egelbot: [X->(X*X,X*X*X,X*X*X*X)]1.0e99 23:00:01 (System:tuple 9.999999999999999e+197 9.999999999999999e+296 inf) 23:00:02 the random 23:01:23 Right. That's a bug. 23:02:32 egelbot: Math:random 23:02:32 1714636915.000000 23:02:38 Weird. 23:03:16 egelbot: say 3.2 23:03:16 3.200000000000000 23:03:21 egelbot: say (3.2,1) 23:03:21 (System:say (System:tuple 3.200000000000000 1)) 23:03:31 egelbot: say {3.2,1} 23:03:31 (System:say (System:cons 3.200000000000000 (System:cons 1 System:nil))) 23:04:32 Ah, random() in the C-source probably links to something else. Only way I can explain it. 23:05:53 There's a better random here: https://github.com/egel-lang/egel/blob/master/lib/random/random.cpp 23:06:01 But you can't use that from the bot. 23:07:19 I forgot. Fix /= and random. There was something else? 23:08:43 Oh, right. Escaping in the bot. 23:10:02 egelbot: [F->F F tuple 5][F B X->[true->F F(B(X/10)(X-1))|false->B](-20 (Dummy105DOT2 Dummy105DOT2 (System:tuple 0 (5 -1))) 23:10:33 egelbot: [F->F F tuple 5][F B X->[true->F F(B(X/10))(X-1)|false->B](-20 oops 23:10:42 sorry 23:10:50 egelbot: 9999 23:10:57 I think I made another infinite loop 23:11:12 -!- egelbot has quit (Read error: Connection reset by peer). 23:11:19 Anp 23:11:24 Uh. NP. 23:11:25 but why is that infinite? 23:11:32 -!- egelbot has joined. 23:11:38 I don't know what you're trying to do. 23:11:49 numeric loop 23:12:28 The 'F F' after true? 23:12:38 that's for the recursion 23:12:46 see the prime lister above 23:12:54 I am not sure how your fixpoint work. But twice 'F F'? 23:13:05 egelbot: [F->F F tuple 2 111][F B L U->[true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(LB](L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 23:13:07 *+s 23:13:31 Uh. You're already better at coding Egel than I am. 23:13:33 that one has twice F F too 23:14:13 no, I am just better at coding Egel than you are at reading Egel, especially when I write terse incomprehensible code with meaningless short variable names so that it's easy to type to irc 23:14:28 this doesn't use much special properties of egel really 23:14:36 just ordinary eager functional code 23:14:53 I have no problem meeting people smarter than me. ;) 23:15:03 so where's the typo? 23:15:03 I find it impressive. 23:15:14 egelbot: -20<-19 23:15:14 internal:1:5:syntactical:<- unexpected 23:15:17 egelbot: -20< -19 23:15:17 System:true 23:15:18 egelbot: -20< -20 23:15:19 System:false 23:15:20 egelbot: -20< -21 23:15:20 System:false 23:16:14 I don't understand why that's infinite 23:17:03 AH. 23:17:06 X-1 23:17:09 ah 23:17:12 egelbot: [F->F F tuple 5][F B X->;[true->F F(B X)(X- 1)|false->B](-20 internal:1:26:syntactical:primary expression expected 23:17:22 egelbot: [F->F F tuple 5][F B X->[true->F F(B X)(X- 1)|false->B](-20 (System:tuple 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19) 23:17:25 thanks 23:17:39 egelbot: [F->F F tuple 5][F B X->[true->F F(B(0.1*tofloat X))(X- 1)|false->B](-20 (System:tuple 0.5000000000000000 0.4000000000000000 0.3000000000000000 0.2000000000000000 0.1000000000000000 0.000000000000000 -0.1000000000000000 -0.2000000000000000 -0.3000000000000000 -0.4000000000000000 -0.5000000000000000 -0.6000000000000001 -0.7000000000000001 -0.8000000000000000 -0.9000000000000000 -1.000000000000000 -1.100000000000000 -1.200000000000000 -1.300000000000000 -1.400000000000000 -1.500000000000000 -1.600000000000000 -1.700 23:17:48 Sorry, that's another one I don't really have a good solution for. 23:18:06 nah, in normal non-IRC code I don't omit whitespace this much 23:18:26 Because it's untyped, it's hard to disambiguate between '-1' and '-' applied to '1'. 23:22:39 random binds to stdlib's random(). A number between 0 and RAND_MAX. 23:22:47 Mistake. 23:24:23 egelbot: [F->F F tuple 5][F B X->[true->F F(B([P->P P 0(0.1*tofloat X)0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2*U*V)|_->sqrt(abs(U*U+V*V))](S<12)]))(X- 1)|false->B](-20 internal:1:131:semantical:undeclared sqrt 23:24:42 egelbot: sqrt 2.0 23:24:42 internal:1:2:semantical:undeclared sqrt 23:24:45 egelbot: Math:sqrt 2.0 23:24:45 1.414213562373095 23:24:52 egelbot: import Math 23:24:52 internal:1:9:syntactical:text expected 23:25:31 what was the syntax for the import statement? 23:25:56 using 23:26:11 import is for files. 23:26:21 egelbot: using Math 23:26:21 using for namespaces. 23:26:27 egelbot: sqrt 2.0 23:26:27 1.414213562373095 23:26:41 egelbot: [F->F F tuple 5][F B X->[true->F F(B([P->P P 0(0.1*tofloat X)0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2*U*V)|_->sqrt(abs(U*U+V*V))](S<12)]))(X- 1)|false->B](-20 sorry, I think that's another infinite loop 23:27:01 -!- egelbot has quit (Read error: Connection reset by peer). 23:27:07 I mean it should have been done by now 23:27:16 -!- egelbot has joined. 23:27:26 I did a reset. 23:27:51 one difficulty is that since the < operator works on everything, if I pass the wrong object to the comparison, it might always return true, so the loop could run infinitely because of that 23:27:55 even if I'm not passing a number 23:30:19 A major problem with Egel is that if you make a typo in a recursive def, and it refuses to rewrite, it may just generate enormous terms. 23:30:27 let me break that down 23:30:49 I thought it was something to exploit, but it seems throwing exceptions just works way better. 23:31:33 Like, if your numbers get large. You might end up with '+ bignum0 bignum1' expressions. 23:31:59 It's better to just throw an exception then, and I am going to change that. 23:32:38 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P(S+1)X Y(X+U*U-V*V)(Y+2*U*V)|_->(U,V)](S<10)] 23:32:38 (Dummy0DOT2 1 -0.8000000000000000 0.3000000000000000 -0.8000000000000000 (System:+ 0.3000000000000000 (System:* (System:* 2 0.000000000000000) 0.000000000000000))) 23:33:01 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2*U*V)|_->(U,V)](S<10)] 23:33:01 (System:tuple (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (System:- (System:* (System:+ -0.8000000000000000 (S 23:33:01 -!- egelbot has quit (Excess Flood). 23:33:21 It refuses to rewrite something. 23:33:42 -!- egelbot has joined. 23:33:46 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2*U*V)|_->(U,V)](S<2)] 23:33:46 (System:tuple (System:+ -0.8000000000000000 (System:- 0.6400000000000001 (System:* (System:+ 0.3000000000000000 (System:* (System:* 2 0.000000000000000) 0.000000000000000)) (System:+ 0.3000000000000000 (System:* (System:* 2 0.000000000000000) 0.000000000000000))))) (System:+ 0.3000000000000000 (System:* (System:* 2 -0.8000000000000000) (System:+ 0.3000000000000000 (System:* (System:* 2 0.000000000000000) 0.000000000000000))))) 23:33:48 '(System:* (System:* 2 0.000000000000000) 0.000000000000000))' <- doesn't seem right. 23:33:58 ah 23:34:01 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(U,V)](S<2)] 23:34:02 (System:tuple -0.2499999999999999 -0.1800000000000000) 23:34:04 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(U,V)](S<10)] 23:34:05 (System:tuple -2.551589956236643 -3.469983401598749) 23:35:11 ] (+*:)^:(11)~ _0.8j0.3 23:35:22 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(U,V)](S<11)] 23:35:23 (System:tuple -6.330173502603112 18.00794959165446) 23:36:28 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)<2](S<11)] 23:36:28 internal:1:88:semantical:undeclared abs 23:36:35 egelbot: using Math 23:36:38 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)<2](S<11)] 23:36:39 System:false 23:37:28 egelbot: [P->P P 0 -0.8 0.3 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)<2](S<11)] 23:37:29 System:false 23:39:21 egelbot: [P->(P 0.3,P 0.4)][P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)<2](S<11)]-0.8 23:39:22 (System:tuple (Dummy7DOT1 0.3000000000000000) (Dummy7DOT1 0.4000000000000000) Dummy7DOT3 -0.8000000000000000) 23:39:46 egelbot: [P->(P 0.3,P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)<2](S<11)]-0.8) 23:39:46 (System:tuple System:false System:false) 23:40:31 egelbot: [P->(P 0.3,P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)]-0.8) 23:40:31 (System:tuple 0 0) 23:41:47 egelbot: [P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)]-0.8) 23:41:48 " " 23:43:06 egelbot: [P->(P -7)+(P -8)+(P -9)][X->[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)](0.1*tofloat X))] 23:43:07 " " 23:43:17 egelbot: [P->(P -6)+(P -7)+(P -8)+(P -9)][X->[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)](0.1*tofloat X))] 23:43:17 " " 23:43:22 that doesn't look right 23:43:35 egelbot: [P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)]-0.6) 23:43:35 " " 23:43:39 egelbot: [P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)]-0.2) 23:43:39 " " 23:43:51 egelbot: [P->(P 0.3,P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2)](S<11)]-0.2) 23:43:52 (System:tuple 0 0) 23:44:15 egelbot: [P->(P 0.3,P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(U,V)](S<11)]-0.2) 23:44:16 (System:tuple (System:tuple -0.2033919406239670 0.2129649016690347) (System:tuple -0.2238013223122670 0.2711989067998540)) 23:45:31 FireFly: J-bot stopped reacting 23:45:32 ] 1 23:45:52 egelbot: [P->(P 0.3,P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->(abs U)+(abs V)](S<11)]-0.2) 23:45:52 (System:tuple 0.4163568422930016 0.4950002291121210) 23:45:58 -!- atslash has quit (Quit: This computer has gone to sleep). 23:45:58 oh 23:46:12 egelbot: [P->(P -6)+(P -7)+(P -8)+(P -9)][X->[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2.0)](S<11)](0.1*tofloat X))] 23:46:13 ":\' " 23:46:39 [ 1 23:46:39 FireFly: 1 23:46:45 b_jonas: wrong prefix :p 23:46:47 oh 23:46:58 Uh. What are you trying to do? 23:47:09 and, while it accepts that prefix ] in private message, I put a space before it accidentally 23:47:15 spruit11: more numeric calculations. you'll see. 23:47:20 there were just some typos in my code 23:47:31 Ah. 23:47:42 I need food. 23:47:44 brb. 23:48:12 -!- atslash has joined. 23:49:39 egelbot: [P->[H->H H""5][H B X->[true->H H(B+P X)(X- 1)|_->B](-20[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2.0)](S<11)](0.1*tofloat X))] 23:49:40 " \'::::::::::\' \'\'\' " 23:49:57 egelbot: [P->[H->H H""5][H B X->[true->H H(B+P X)(X- 1)|_->say B](-20[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P 0.3)(P 0.4)]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2.0)](S<11)](0.1*tofloat X))] 23:49:58 '::::::::::' ''' 23:50:02 good, good 23:51:18 egelbot: [Y->[P->[H->H H""5][H B X->[true->H H(B+P X)(X- 1)|_->say B](-20[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P Y)(P(Y+ 0.1))]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2.0)](S<11)](0.1*tofloat X))]]0.3 23:51:19 '::::::::::' ''' 23:53:17 egelbot: [H->H -0.9;H -0.7;H -0.5;H -0.3;H -0.1;H 0.1;H 0.3;H 0.5;H 0.7;H 0.9][Y->[P->[H->H H""5][H B X->[true->H H(B+P X)(X- 1)|_->say B](-20[P->[0 0->" "|0 1->"."|1 0->"'"|1 1->":"](P Y)(P(Y+ 0.1))]([P X Y->P P 0 X Y 0.0 0.0][P S X Y U V->[true->P P(S+1)X Y(X+U*U-V*V)(Y+2.0*U*V)|_->[true->1|_->0]((abs U)+(abs V)<2.0)](S<11)](0.1*tofloat X))]] 23:53:18 .:. 23:53:19 .. ..::.... 23:53:19 :::::::::: 23:53:20 ::::::::::::..::: 23:53:20 ::::::::::::::::::..... 23:53:21 .::::::::::::::::'' 23:53:21 '::::::::::' ''' 23:53:22 .:':::::::: 23:53:23 .:: 23:53:23 .' 23:53:39 yay! Mandelbrot fractal calculation 23:53:44 Neat! 23:53:52 Or rather. 23:53:56 Awesome! 23:54:23 it's basically translated from the Mandelbrot code in https://code.jsoftware.com/wiki/User:B_Jonas 23:55:08 not exactly the same, but uses the same grid 23:56:33 obviously it would have been nicer to write the top level loop as a loop too, rather than with a series of constants like that 23:56:37 but I'm lazy now 23:57:35 int-e: you wanted the highlights only, right? ^ Mandelbrot fractal calculation 23:58:08 egelbot: [F->F F tuple 2 111][F B L U->[true->F F([T->T T 2][T C->[_ true->B L|true _->B|_ _->T T(C+1)](0==L%C)(LB](L (System:tuple 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109) 23:58:23 It'll take me a week to understand this. 23:58:39 Was it difficult to translate from J? 23:59:16 it's not that hard to understand 23:59:32 it just has four nested loop-like thingies 23:59:54 the outermost loop iterates on the rows of the output, that's the H -0.9;H -0.7;H -0.5;H -0.3;H -0.1;H 0.1;H 0.3;H 0.5;H 0.7;H 0.9 part