00:00:14 which inner [] bind by reference 00:00:15 I can always pass the vector -say- to itself as a field? 00:00:24 yes 00:00:36 but the vector isn't part of th DAG 00:00:39 it's separat 00:00:52 you just have a reference to vector that is a primitive type like a number 00:00:53 Ah. Hmm. 00:01:04 that's what lisp does 00:01:28 and python and ruby etc 00:01:47 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77106&oldid=77105 * SoundOfScripting * (+468) /* Language specifications */ 00:01:55 All those languages allow cycles. Only early Lisp rewrote DAGs. 00:02:10 I don't think even early lisps did 00:02:24 Yah, sure. The first one did. I read the report. 00:02:25 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77107&oldid=77106 * SoundOfScripting * (-1) 00:03:28 I think all serious lisps have set-car and set-cdr, even the oldest ones (possibly with a different name), but these days we want programs to not use it anywhere, so that conses are known to be globally immutable and the interpreter can optimize using that 00:03:55 and yes, some toy lisps might not have it, like my toy lisp for example 00:04:13 Nono. The actual first Lisp was reference counted. 00:04:33 By -whatshisname- McArthy. In the report. 00:04:35 yes 00:04:46 that doesn't stop this 00:05:21 you can just end up in uncollectable cycles if your program is not careful 00:05:55 but you can free a cycle either by breaking it, or using some newer data structure that allows weak referencing 00:06:31 Right. My hope was that just being pure would cut it. But it's all way to slow. If it wasn't as slow as it is now, I wouldn't add vectors. 00:06:48 and it's John McCarthy (1927..2011) 00:06:58 Ah right. 00:07:03 McCarthy. 00:07:37 if you don't want mutability, you can consider lazy promises that you have to explicitly evaluae too 00:07:53 that solves a few of the problems, though not most 00:08:18 but if you want to keep immutability completely, you can also do that 00:08:27 I would like to avoid mutability but it doesn't seem worth it. 00:08:50 -!- adu has joined. 00:09:00 In the sense that, I should give programmers mutable fast containers where they can't use lists. 00:09:11 But that's assuming 'programmers'. 00:09:13 Tall order. 00:09:15 I think it's worth in a non-toy language, but this is a toy language 00:09:41 -!- Arcorann__ has joined. 00:09:47 Yah. But sometimes I flip opinion and hope it could be something like a bash or python. 00:09:50 sorry, that's conflicting 00:09:58 And then I think: nah. 00:10:02 I think it's worth *to adds mutable structures* in a non-toy language, but this is a toy language 00:10:12 And then I flip opinion again. 00:10:24 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77108&oldid=77107 * SoundOfScripting * (+341) /* Language specifications */ More instructions :) 00:11:44 I admit that olvashato doesn't have mutability, because I didn't want them for the programs I wrote, but you could add them in a library 00:11:59 it's a bit messy because of the prolog side, but possible 00:12:26 Today I wanted to compare my abysmal performance to Python. 00:12:43 my toy lisp does have mutability 00:12:48 Which gave an out of stack after going 900 deep into recursion. 00:13:01 heh 00:13:03 So then I thought: maybe there's a use case after all. 00:13:14 And now I think: nah. 00:13:37 ¯\_(ツ)_/¯ 00:13:48 what if esolang where computations have to be done with constantly changing operator precedence, and said operators modify precedence? 00:27:44 I could add explicitly managed vectors. Where you indirectly reference a vector pool with an index. And you're responsible for managing memory. 00:28:45 But if you're managing memory already you might as well make sure that your vector doesn't contain cycles. 00:29:11 Ah well. Gonna hack on the double semicolon, I think. 00:29:55 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77109&oldid=77108 * SoundOfScripting * (+78) 00:30:07 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77110&oldid=77109 * IFcoltransG * (+9) /* Language specifications */ Commented out unnecessary section 00:32:21 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77111&oldid=77110 * SoundOfScripting * (+3) 00:33:22 spruit11: by "explicitly managed", do you mean that the user has to free them explicitly, they're not refcounted or tracked by the refcounter or garbage collector that handles your DAG nodes? 00:33:47 to be clear, all that mutability stuff is less important than what I mentioned earlier 00:34:11 Right. You reference a vector indirectly in a pool. That way you break the cycle. But the cost for that is also that you would need to free it. 00:34:35 hmm, that would be much more inconvenient 00:34:52 I was thinking it would at least be refcounted 00:35:12 Yah. Doesn't seem worth it. 00:35:31 Oh. 00:35:35 Wait. 00:35:56 I could free it if the reference is destroyed? 00:36:02 What voodoo is this? 00:36:12 that is the voodoo of recounting 00:36:36 I mean don't you already have something like that for the DAG nodes? 00:37:23 Uh. I abuse C++'s native refcounting. 00:38:36 C++'s "native refcounting"? what do you mean? do you mean std::shared_ptr, which is a reference-counted smart pointer type? 00:38:42 Yah. 00:38:49 why is that an abuse? 00:39:01 you can use that for the vectors too 00:39:35 Uh, yes and no. 00:40:05 I need a form of indirection over a vector pool. But that's all yes. 00:40:40 I don't see why it's an abuse, and I'm not sure in what sense it counts as "native", but then that's because I remember the past when that wasn't in the standard library yet, and also I know it's implemented as a pure library feature 00:41:02 um... vector pool? 00:41:48 what why? 00:42:04 Well. The thing is that in the 'graph' you construct you don't want cycles. But if a 'vector' object only stores an index into a global vector pool, you can't create cycles. 00:42:49 sure you can, if it's reference-counted both ways, as in the vector keeps alive the dag node it points to and the dag node keeps alive the vector it points to, then it can form cycles 00:42:56 it doesn't matter if you allocate them from a pool or not 00:43:23 Damn. 00:43:35 Right. 00:43:49 No vector pool than but unsafeness. 00:44:00 why? what's unsafe in this? 00:44:02 Thanks for that. For a moment I thought I found a way out. 00:44:28 make it reference-counted both ways, and document that it's only reference counted so if you leave a cycle it won't be collected and that that's the user's responsibility 00:44:32 The unsafe part is that I would allow the programmer to form cycles in what should be a DAG. 00:44:52 Right. We agree. 00:46:04 but it's not a cycle that will bother the pattern matcher or the pretty-printer or anything, because the pattern matcher doesn't go arbitrarily deep through vectors because there's no such pattern, and you can just make the pretty-printer either not print the contents of vectors at all, only a reference, like it doesn't print the content of a function now, or make it track which vector it met and not 00:46:10 print repeated vectors 00:46:25 so I don't see why the cycles are a problem 00:47:09 unless this is like your PhD thesis and you have "DAG" prominently in the plan you submitted and now you have to resubmit the plan and wait for permission from a committee to be allowed to write non-DAGs 00:47:12 I think I fully agree with you. 00:47:41 Nono. If I would be doing a PhD I would already been kicked out for not having a type system. 00:49:09 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77112&oldid=77111 * IFcoltransG * (+875) /* Language specifications */ Add oculi for converting between bits and bytes 00:49:52 well, technically there's another case when you don't want this: if you want to make a sandbox version of egel to run untrusted code by multiple users (like a javascript interpreter in an old browser that runs everything in one procesS), and want to be able to free every object created by a user by just freeing a few top-level references, in which case you need either a garbage collector, or allocate 00:49:58 everything into arenas, different users never share an arena, and free each arena owned by a user when you're done with them 00:50:10 but you would need a lot of other changes too if you wanted that 00:50:53 Life is never easy. 00:51:34 I already regret compiling to bytecode. And I also regret having a global pool for recursive structures. 00:51:53 Life would be so much nicer without those two. 00:52:10 spruit11: ah yes, that's when you make an incompatible egel2 00:52:25 where you keep the ideas you like and redesigne and rewrite everything 00:53:36 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77113&oldid=77112 * IFcoltransG * (+291) Clarified Tokigun's half cell movements 00:53:44 Hmyah. I'll end up with a toy of a toy. 00:53:49 A noble cause! 00:54:27 Anyway, you got me fired up. I am hacking on the double semicolon now. 00:54:37 nice 00:59:46 Isn't a double semicolon just one whole colon? 01:00:37 fizzie: no, because English sucks 01:00:48 but good point 01:02:11 spruit11: also, if you do a major rewrite where you keep some code and rewrite some of it, you will need to learn branching in version control 01:06:17 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77114&oldid=77113 * IFcoltransG * (+273) /* Language specifications */ Added equality check command 01:19:02 I have not used branched version control so far, but that would probably be one case where it could be used. 01:23:52 -!- egelbot has joined. 01:24:14 egelbot: using System;; 1+1;; 2+2 01:24:14 2 01:24:14 4 01:30:22 egelbot: using String;; strlen "hello" 01:30:22 5 01:31:06 Well, that takes care of that. 01:32:52 -!- adu has quit (Quit: adu). 01:38:44 egelbot: getenv "EGEL_PS0" 01:39:21 egelbot: getenv "PATH" 01:39:21 "/home/marco/.local/bin:/home/marco/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin" 01:39:51 Weird path. 01:39:58 Ah well. 01:44:52 spruit11: nice, that was quick 01:45:16 Yah, it was painless. 01:47:42 egelbot: 3+3 01:47:42 6 01:47:54 egelbot: getenv "HOME" 01:47:54 "/home/marco" 01:48:00 egelbot: getenv "DISPLAY" 01:48:00 ":0" 01:48:09 Hey! 01:48:09 egelbot: getenv "LANG" 01:48:09 "en_US.UTF-8" 01:48:18 egelbot: getenv "LC_ALL" 01:48:45 egelbot: {getenv "USER", getenv "TERM", getenv "LC_ALL"} 01:48:45 (System:cons "marco" (System:cons "xterm-256color" (System:cons System:nop System:nil))) 01:49:36 egelbot: (getenv "_",) 01:49:36 internal:1:14:syntactical:primary expression expected 01:49:43 egelbot: tuple (getenv "_") 01:49:43 (System:tuple "./egel-bot") 01:50:43 egelbot: using Math;; sin 1.0 01:50:43 0.8414709848078965 01:51:55 egelbot: data foo;; let bar = [X -> 2];; foo;; bar foo 01:51:55 internal:1:31:syntactical:in expected 01:52:02 def 01:52:10 egelbot: data foo;; var bar = [X -> 2];; foo;; bar foo 01:52:10 internal:1:21:syntactical:= unexpected 01:52:16 egelbot: data foo;; def bar = [X -> 2];; foo;; bar foo 01:52:17 foo 01:52:17 2 01:52:37 egelbot: data foo;; def bar = [X -> 2];; bar foo;; quux 01:52:37 2 01:52:37 internal:1:44:semantical:undeclared quux 01:52:52 egelbot: data foo;; def bar = [X -> 2];; quux;; bar 01:52:52 internal:1:34:semantical:undeclared quux 01:53:01 egelbot: bar 01:53:01 bar 01:53:04 egelbot: bar foo 01:53:04 2 01:53:13 right 01:53:49 egelbot: val id = [ X -> X ];; val one = 1;; id one 01:53:49 1 01:54:00 Okay, that works too. 01:54:28 egelbot: data foo;; def foo0 = foo;; data foo;; def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo) 01:54:28 (System:tuple foo foo System:true System:true) 01:54:36 hmm 01:54:44 egelbot: data foo;; def foo0 = foo;; 01:54:44 internal:1:30:syntactical:primary expression expected 01:54:49 egelbot: data foo;; def foo0 = foo;; 1 01:54:49 1 01:55:04 egelbot: data foo;; 2 01:55:04 2 01:55:10 egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo) 01:55:11 (System:tuple foo foo System:true System:true) 01:55:14 still true 01:55:26 egelbot: def foo = 5; data foo;; 2 01:55:26 internal:1:15:syntactical:primary expression expected 01:55:31 egelbot: def foo = 5;; data foo;; 2 01:55:31 2 01:55:34 egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo) 01:55:34 (System:tuple foo foo System:true System:true) 01:55:38 egelbot: def foo = 5;; 01:55:38 internal:1:16:syntactical:primary expression expected 01:55:42 egelbot: def foo = 5;; foo 01:55:42 5 01:55:45 egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo) 01:55:45 (System:tuple 5 5 System:false System:false) 01:55:48 what 01:56:12 foo = 5 01:56:18 yes 01:56:38 So isfoo reduces to false. 01:56:40 but I thought foo0 still has the binding to the old foo, which is a different foo even if its name is the same 01:56:48 No. 01:57:11 oh well 01:57:16 One global table for definitions you can interactively modify. 01:57:30 and anything lowercase refers to that? 01:57:31 ok 01:57:45 I mean they're resolved late, even when they're already in a definition? 01:57:53 egelbot: def isfoo = [foo -> true | _ -> false];; 01:57:53 internal:1:43:syntactical:primary expression expected 01:57:56 Yah. 01:58:00 egelbot: data foo 01:58:07 egelbot: def isfoo = [foo -> true | _ -> false] 01:58:11 egelbot: isfoo 01:58:11 isfoo 01:58:16 egelbot: def Isfoo = [foo -> true | _ -> false] 01:58:16 internal:1:2:syntactical:combinator or operator expected 01:58:30 egelbot: data foo 01:58:34 egelbot: isfoo foo 01:58:34 System:true 01:58:54 so isfoo has a definition that refers to foo by name and dynamically resolves it 01:58:57 ok 01:59:09 Combinators lowercase, variables uppercase. It was the only thing which I thought made sense in an untyped environment. 01:59:47 yeah, it's like prolog I guess 01:59:56 The problem is [ x -> x ], I need/want to know whether x is a variable of combinator. 02:00:05 except for, you know, the implicit unevaluated function thing 02:00:16 Yah, Prolog chose the solution. 02:00:46 Well, Prolog is another operational model. This is just a broken down FP. 02:01:09 this is not the syntax I like too much, but it works and is consistent 02:01:09 *the same solution. 02:02:00 Yah. But `[x -> x]` right? In a typed environment you can check whether it binds correctly to a combinator or otherwise should bind to a variable. 02:03:29 I would suggest no case difference, in a pattern if a name stands alone rather than as the head of an application then it's a freshly bound variable, there's some way to disambiguate it to a constructor (with an empty parenthesis when you use parenthesis function calls, or with a namespace prefix), and a few important nullary constructors (eg. true, false, just, unit) are keywords 02:03:37 Making the distinction up front means you can visually see the difference, and simplifies the interpreter (which otherwise would need heuristics). 02:04:09 but it might not work well in egel because application doesn't use parens, so you can't use an empty paren 02:04:21 No. But Egel is untyped. You can have a variable in the head. 02:04:44 egelbot: [ (X Y Z) -> Z Y X ] {1} 02:04:44 (System:nil 1 System:cons) 02:05:24 And for orthogonality I want to keep that. 02:05:37 and constructors are not namespaced under enum typenames, so you don't have a convenient namespace syntax that you can use to name any constructor already 02:05:52 spruit11: yeah, egel does that unevaluated thing, so this wouldn't work 02:07:13 No. It's weird stemming from Haskell/OCaml but if you see Egel as an LC+constants it's the only thing which makes sense. 02:07:22 (lambda calculus) 02:07:34 [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77115&oldid=76891 * Hakerh400 * (+24) 02:08:43 [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77116&oldid=77115 * Hakerh400 * (-20) 02:09:44 Right, in an untyped LC+constants `1 2` is a term and you want to be able to pattern match on that. 02:10:29 spruit11: no, only if you allow unevaluted applications 02:10:45 I don't see that? 02:10:48 normally `1 2` would try to call the function `1` which is an error because it's not a function 02:11:11 but in spruit you allow any application and they just default to unevaluated 02:11:16 It's normally allowed by the grammar... 02:11:25 it's not the grammar 02:11:45 you could write (1 2) in the code, and it wouldn't even give an error until you try to evaluate it 02:11:48 T := V | C | T T | \V. T 02:12:05 but if you want to pattern match to something, then it has to try to evaluate it, fully in an eager language, or to top level constructor in a lazy language 02:12:08 like haskell 02:12:22 Okay. Then I just difer on what I consider an untyped LC+constants. 02:12:28 yeah 02:12:29 *differ 02:17:35 [[Special:Log/newusers]] create * R123124 * New user account 02:17:44 -!- Heavpoot has quit (Remote host closed the connection). 02:21:06 [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=77117&oldid=76916 * R123124 * (+108) /* Introductions */ 03:32:30 [[Special:Log/upload]] upload * RocketRace * uploaded "[[File:Linear transformation latex.gif]]" 03:34:18 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77119&oldid=77114 * RocketRace * (+321) \ 03:36:39 -!- adu has joined. 03:37:01 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77120&oldid=77119 * RocketRace * (+26) /* Language specifications */ 03:51:46 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77121&oldid=77120 * RocketRace * (+222) 03:52:37 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77122&oldid=77121 * RocketRace * (+12) /* Language specifications */ 03:57:33 [[Babalang]] https://esolangs.org/w/index.php?diff=77123&oldid=76378 * RocketRace * (+0) Remove from 2020 category and put into 2019 category 03:58:00 [[Babalang]] M https://esolangs.org/w/index.php?diff=77124&oldid=77123 * RocketRace * (+0) Undo revision 77123 by [[Special:Contributions/RocketRace|RocketRace]] ([[User talk:RocketRace|talk]]) 04:06:46 [[Consequential]] https://esolangs.org/w/index.php?diff=77125&oldid=74207 * TheCoderPro * (+5) /* Instructions */ 04:24:05 -!- adu has quit (Quit: adu). 04:24:42 -!- adu has joined. 04:45:09 [[,,,]] https://esolangs.org/w/index.php?diff=77126&oldid=77071 * TwilightSparkle * (+27) /* Syntax */ 04:46:01 -!- Lord_of_Life has quit (Ping timeout: 258 seconds). 04:46:49 -!- Lord_of_Life has joined. 04:48:11 -!- Frater_EST has joined. 04:55:46 -!- Matthias29 has joined. 04:56:00 hey 04:56:37 I'm writing the first implementations of .5d5dbfwmttwmtt and then compiling using .5dbfwmtt 05:01:57 man, it takes a lot of hackery to write a reasonably fast interpreter. 05:04:21 -!- Frater_EST has left. 06:05:26 -!- adu has quit (Ping timeout: 240 seconds). 06:09:22 -!- adu has joined. 07:04:44 -!- adu has quit (Quit: adu). 08:01:14 -!- kritixilithos has joined. 08:10:12 -!- hendursa1 has joined. 08:10:20 [[,,,]] M https://esolangs.org/w/index.php?diff=77127&oldid=77126 * SunnyMoon * (-22) Grammar fix! 08:12:23 -!- hendursaga has quit (Ping timeout: 240 seconds). 08:15:38 [[,,,]] M https://esolangs.org/w/index.php?diff=77128&oldid=77127 * SunnyMoon * (-1) Oh, the one is not needed. 08:20:22 [[,,,]] M https://esolangs.org/w/index.php?diff=77129&oldid=77128 * SunnyMoon * (-10) There is hence twice on a sentence. 08:49:29 -!- Sgeo has quit (Read error: Connection reset by peer). 08:52:56 -!- imode has quit (Ping timeout: 240 seconds). 09:45:59 -!- Matthias29 has quit (Remote host closed the connection). 10:05:58 -!- iovoid has quit (Quit: iovoid has quit!). 10:06:31 -!- FraterEST has joined. 10:07:03 -!- iovoid has joined. 10:07:41 -!- FraterEST has quit (Read error: Connection reset by peer). 10:09:38 -!- clog has quit (Ping timeout: 260 seconds). 10:12:00 -!- glowcoil has quit (Ping timeout: 244 seconds). 10:12:31 -!- ^[_ has quit (Ping timeout: 244 seconds). 10:12:53 -!- dnm has quit (Read error: Connection reset by peer). 10:13:53 -!- dnm has joined. 10:13:55 -!- ^[_ has joined. 10:22:43 -!- haavard has quit (Ping timeout: 260 seconds). 10:26:07 -!- haavard has joined. 10:44:41 -!- glowcoil has joined. 11:02:56 -!- hendursa1 has quit (Remote host closed the connection). 11:03:50 -!- hendursa1 has joined. 11:07:12 -!- glowcoil has quit (Ping timeout: 244 seconds). 11:08:42 -!- glowcoil has joined. 11:30:21 egelbot: 1;; raise "oops";; 2 11:30:21 1 11:30:21 internal:1:6:semantical:undeclared raise 11:30:38 egelbot: def raisepls = raise "oops" 11:30:38 internal:1:17:semantical:undeclared raise 11:30:48 egelbot: def raisepls = (raise "oops") 11:30:48 internal:1:18:semantical:undeclared raise 11:30:56 egelbot: def raisepls = (0; raise "oops"; 0) 11:30:56 internal:1:21:semantical:undeclared raise 11:30:59 hmm 11:31:15 egelbot: (print 3; raise "oops"; print 4) 11:31:15 internal:1:3:semantical:undeclared print 11:53:54 throw 11:54:12 egelbot: (print 3; throw "oops"; print 4) 11:54:13 internal:1:3:semantical:undeclared print 11:54:28 egelbot: (say 3; throw "oops"; say 4) 11:54:28 3 11:54:29 4 11:54:29 exception(System:nop) 11:54:36 egelbot: Io.print "hello, world" 11:54:36 internal:1:2:semantical:undeclared Io 11:54:55 IO prints to stdout and isn't included in the bot. 11:55:16 The bot uses say. I guess I could change that? 11:55:32 ah 11:55:37 egelbot: say "hello, world" 11:55:38 hello, world 11:55:48 wasn't there a declaration to load any module though? 11:56:17 Yah. If you know the path on my system you can make the bot print to my stdout. 11:56:26 egelbot: (say "hello, world"; raise "oops"; say "hello, world") 11:56:26 internal:1:23:semantical:undeclared raise 11:56:38 import "path_local/io.ego" 11:56:51 egelbot: (env "PWD", env "_") /* those paths? it might be able to guess. */ 11:56:51 internal:1:37:syntactical:? unexpected 11:57:01 egelbot: (getenv "PWD", getenv "_") /* those paths? it might be able to guess. */ 11:57:01 internal:1:43:syntactical:? unexpected 11:57:04 hmm 11:57:11 Use # for comments 11:57:33 I had C style syntax but I changed. Made it all much better. 11:57:52 egelbot: (getenv "PWD", getenv "HOME", getenv "_") 11:57:52 (System:tuple "/home/marco/Programming/egel-bot/src" "/home/marco" "./egel-bot") 11:57:54 Also #!/usr/bin/env egel now works for scripting. 11:57:57 right, so those 11:58:02 yay! 11:58:15 does that include mixing declarations and expressions? 11:58:38 egelbot: [_ -> say "hello, world"; raise "oops"; say "hello, world"] 0 11:58:38 internal:1:28:semantical:undeclared raise 11:58:42 what... still? 11:58:45 throw 11:58:49 oh 11:58:50 egelbot: throw 1 11:58:50 exception(1) 11:59:02 egelbot: 3; throw 4; 5 11:59:02 exception(5) 11:59:11 egelbot: (13; throw 14; 15) 11:59:11 exception(15) 11:59:12 Oops. 11:59:22 You found a bug! 11:59:26 egelbot: 3;; throw 4;; 5 11:59:26 3 11:59:26 exception(4) 11:59:26 5 11:59:32 that's not a bug, it's just creative precedence 11:59:50 it interprets that as throw(4;5) 11:59:58 egelbot: 3; (throw 4); 5 11:59:58 exception(4) 12:00:04 Oh. Right. Phew. 12:00:11 egelbot: ((say 3); (throw 4); (say 5)) 12:00:11 3 12:00:12 exception(4) 12:00:16 see 12:00:29 So I guess I should take a look at the syntax. 12:00:31 egelbot: def raisepls: throw "oops" 12:00:31 internal:1:14:syntactical:= expected 12:00:48 egel had strange precedence already when I last looked 12:00:49 IIRC 12:00:56 Moving say to print makes sense. There's no reason it should be say in the bot. 12:01:17 spruit11: you may want both print and println though 12:01:21 for convenience 12:01:32 Yah, the operator table doesn't allow for equal precedencies. 12:01:41 But that's for way later. 12:02:03 For now, I'll change say to print and do your pretty printing hack. 12:02:04 egelbot: def raisepls = (throw "oops") 12:02:20 egelbot: ((say 3); raisepls; (say 5)) 12:02:20 3 12:02:21 exception("oops") 12:02:41 egelbot: let Raisepls = (throw "Oops") in ((say 3); Raisepls; (say 5)) 12:02:41 exception("Oops") 12:03:02 egelbot: def saypls = "please" 12:03:09 egelbot: def raise = [ X -> throw X ] 12:03:15 egelbot: raise 6 12:03:15 exception(6) 12:03:31 egelbot: (say 3; 4) + (saypls; 5) 12:03:31 3 12:03:31 9 12:03:41 egelbot: def saypls = say "please" 12:03:45 egelbot: (say 3; 4) + (saypls; 6) 12:03:45 please 12:03:46 3 12:03:46 10 12:03:50 hmm 12:03:54 creative evaluation order too 12:04:11 I know raise is popular in academia but I rather stick to the now more popular throw. 12:04:22 Yah, it's left to right. 12:04:24 throw is fine, I just programmed too much python 12:04:31 Uh, right to left. 12:05:28 It's a bit weird but also more orthogonal I feel. `f x y` goes from right to left. 12:06:07 anyway, this means you can put just one word instead of two in the [ ... | _ _ -> raisebadargs] trailer in function definitions 12:06:53 well, the evaluation order is noticable only when you use impure functions like say, and there are ways to force it in that case, so it doesn't matter too much 12:07:10 egelbot: (say 3; say 4) 12:07:10 3 12:07:11 4 12:07:23 I was thinking on throwing exceptions now on everything, including unevaluated combinators. But I still think I'll leave it up to the programmer. 12:07:58 There has to be some weirdity! 12:08:00 ok. not great for your bot that doesn't tolerate infinite loops, but doesn't matter as much for HackEso which will just time out in like a minute 12:08:53 (it's not really a minute, but something on that order of magnitude, don't depend on the exact timeout value) 12:09:14 Great. I'll hack on pretty printing today, I think. 12:09:40 Does the build script work for you? 12:10:59 And install script? 12:11:18 I guess I should add a 'local' option to install once. 12:15:09 -!- egelbot has quit (Remote host closed the connection). 12:15:11 spruit11: dunno, I think I wrote a simple custom install script for HackEso, because that was simpler than modifying your install script, but I used the Makefile with some arguments to set pathnames 12:15:58 -!- egelbot has joined. 12:16:00 but basically I just had to invoke a make target for each library and one for the interpreter, then copy files and install a wrapper script 12:16:39 egelbot: print 5 12:16:39 5 12:16:43 egelbot: agitprop 12:16:43 visit https://egel-lang.github.io/ 12:17:18 HackEso has somewhat unusual filesystem hierarchy for legacy reasons, so I needed custom paths anyway 12:18:34 It would be nicer if people could get just a local install by running `install local`, right? 12:18:53 admittedly those legacy reasons include my changes... 12:19:21 spruit11: sure, that's basically what I'm doing, but you need to be able to specify make parameters for the paths, like six of them 12:19:28 -!- hendursa1 has quit (Quit: hendursa1). 12:19:32 make that eight 12:19:40 I suck? 12:19:45 -!- hendursaga has joined. 12:19:46 What did I do now? 12:20:19 I'll check that. At least running build should do what it's supposed to do. 12:20:44 egelbot: quine0 12:20:44 egelbot: print(List:foldr(+)""(List:map[K->List:nth K{"\\","\"",",","egelbot: print(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})) 12:21:15 one for where the executable goes, one for where the shared libraries go, one for where the scripts go, a prefix that you can set to /usr/local or /usr/local/egel-1.4 or /usr or ~/local can set defaults all three of those previous ones, and a shadow copy of all four of these for when you want the path to differ between installation time and runtime (though you may not need to know the runtime bin) 12:21:39 like I said, your install.sh might work, but it was simpler for me to just copy files than to figure out how to use install.sh 12:21:45 and the Makefile just worked 12:21:58 What if I dump everything in '~/egel/'? 12:22:08 spruit11: that's what you have the prefix for 12:22:19 Hmm. That seems a bad idea. 12:22:21 you can set the prefix to ~/egel/ if you want to, but for HackEso we want a different path 12:22:29 Ah. Okay. 12:22:32 because ~/egel/ is not a useful location to install to 12:22:50 nor would I want to install egel to ~/egel/ on my machine, because I control the filesystem hierarchy under my ~ 12:23:08 Okay, not going to change that. 12:23:11 (and the distribution defaults together with me control the filesystem hierarchy everywhere in general) 12:23:25 `` echo $HOME # actually, what's ~? 12:23:26 ​/tmp 12:23:28 and of course all this is for non-windows 12:23:45 Maybe I'll once add `install.sh local path-to-install-dir`. 12:23:54 But first the pretty printing. 12:23:55 spruit11: the wiki explains some of the filesystem hierarchy of HackEso 12:24:21 Yah. But you're to particular for me to adapt the build script to. 12:24:27 *too 12:24:39 you don't have to adapt them, I can just set the paths and write the wrapper 12:24:51 I mean, you don't have to do anything really, I could have done all that I was just lazy 12:24:57 Right. I'll think about that. 12:25:09 Pretty printing is higher on the list now. 12:25:10 but it's easier if you add make variables 12:25:13 for all the paths 12:25:22 because then people don't need to edit the makefile, just set make variables 12:25:51 Uh. I have two scripts. One builds, one installs. 12:26:08 The build script should run? 12:26:17 run what? 12:26:19 The rest is just copying over? 12:26:30 Run a build of the system.. 12:27:08 It sounded to me like you wanted the build script to install. 12:27:14 no 12:27:48 I'll read it again. 12:27:52 I didn't really specify that, but I just imagined a default make target called all that builds, and a make target called install that depends on all and installs, and possibly make targets for test 12:28:30 but if you have separate scripts, rather than the makefile, well then those should have some ways to set the paths 12:28:43 Ah. Right. 12:29:35 I just use bash for install/build because the internet meme is that recursive make is bad. 12:29:46 Better on the safe side. 12:30:12 But I'll guess it needs the variables anyway. 12:30:21 -!- clog has joined. 12:32:16 No. Won't change it. It's too fragile to play with given my limited understanding of make. 12:32:28 I guess pretty printing then 12:34:57 [[Talk:Modulous]] M https://esolangs.org/w/index.php?diff=77130&oldid=77038 * Abyxlrz * (-763) 12:35:15 [[Talk:Modulous]] M https://esolangs.org/w/index.php?diff=77131&oldid=77130 * Abyxlrz * (-193) 12:39:44 [[User:Abyxlrz]] https://esolangs.org/w/index.php?diff=77132&oldid=76934 * Abyxlrz * (+216) 12:40:05 [[User:Abyxlrz]] M https://esolangs.org/w/index.php?diff=77133&oldid=77132 * Abyxlrz * (-82) 13:06:03 -!- dingwat has quit (Quit: Connection closed for inactivity). 13:17:56 -!- olsner has quit (Ping timeout: 240 seconds). 13:32:28 -!- pikhq has quit (Read error: Connection reset by peer). 13:32:39 -!- pikhq has joined. 13:36:51 fungot: would you rather be part of a clique or of an independent set? 13:36:52 int-e: that line might evaluate to the same precision, but is a bit shorter, and let them run it off the top 13:38:07 -!- olsner has joined. 13:38:23 -!- hendursaga has quit (Ping timeout: 240 seconds). 13:39:25 fungot: Are you golfing some code again? 13:39:25 fizzie: because if he already has a speech synthesizer) chandler, touche. with an unlimited playfield it would be difficult 13:40:20 -!- hendursaga has joined. 13:42:45 -!- adu has joined. 13:46:23 -!- kritixilithos has quit (Ping timeout: 240 seconds). 13:48:25 [[User:SunnyMoon]] https://esolangs.org/w/index.php?diff=77134&oldid=77063 * SunnyMoon * (+12) Well, I am speaking the truth... 13:49:23 [[User:SunnyMoon]] https://esolangs.org/w/index.php?diff=77135&oldid=77134 * SunnyMoon * (-23) This might be too much. 13:49:36 -!- kritixilithos has joined. 13:53:13 egelbot: def p X Y = (100*X)+Y 13:53:13 internal:1:8:syntactical:= expected 13:53:24 egelbot: def (p X Y) = (100*X)+Y 13:53:24 internal:1:2:syntactical:combinator or operator expected 14:00:41 egelbot: def sn8 = {0.3021,-1.0936,-0.3613,-2.8156,1.0762,0.2826,-3.0046,0.2187,0.9145,-0.2781,0.0047,0.4804,0.6407,0.3894,0.6457,0.7520,-0.5128,-0.6787} 14:00:53 egelbot: nth sn8 5 14:00:53 internal:1:2:semantical:undeclared nth 14:01:02 egelbot: aref sn8 5 14:01:02 internal:1:2:semantical:undeclared aref 14:02:08 egelbot: List.nth sn8 5 14:02:08 internal:1:2:semantical:undeclared List 14:03:27 egelbot: "from prelude";; def nth = [ 0 (cons X XX) -> X | N (cons X XX) -> nth (N - 1) XX ] 14:03:27 "from prelude" 14:03:36 egelbot: nth sn8 5 14:03:36 (nth (System:cons 0.3021000000000000 (System:cons -1.093600000000000 (System:cons -0.3613000000000000 (System:cons -2.815600000000000 (System:cons 1.076200000000000 (System:cons 0.2826000000000000 (System:cons -3.004600000000000 (System:cons 0.2187000000000000 (System:cons 0.9145000000000000 (System:cons -0.2781000000000000 (System:cons 0.004700000000000000 (System:cons 0.4804000000000000 (System:cons 0.6407000000000000 (System:cons 0.3894000 14:03:42 egelbot: nth 5 sn8 14:03:42 0.2826000000000000 14:05:25 egelbot: sn8 14:05:25 (System:cons 0.3021000000000000 (System:cons -1.093600000000000 (System:cons -0.3613000000000000 (System:cons -2.815600000000000 (System:cons 1.076200000000000 (System:cons 0.2826000000000000 (System:cons -3.004600000000000 (System:cons 0.2187000000000000 (System:cons 0.9145000000000000 (System:cons -0.2781000000000000 (System:cons 0.004700000000000000 (System:cons 0.4804000000000000 (System:cons 0.6407000000000000 (System:cons 0.389400000000 14:06:03 `? spam 14:06:06 Spam is a delicious meat product. See http://www.spamjamhawaii.com/ 14:06:48 int-e: yeah, if only spruit11 made this bot accessible on some other channel, or if I installed egel to HackEgo, it would be better. 14:06:51 `hwrl spam 14:06:52 oh well 14:06:53 https://hack.esolangs.org/repo/log/tip/wisdom/spam 14:07:52 Hmm. Did I forget about the link in that wisdom... or did I genuinely never see it before... 14:11:21 fungot, how many hours are there in 4 simultaneous 4 corner 96-hour Cubic™ Days in only 24 ohur rotation? 14:11:21 b_jonas: just cobbled together. :d) there just would be one big macro?! would be rather pointless. ( or not) 14:12:47 one big pointless macro day? ok 14:50:12 -!- t20kdc has joined. 14:58:17 [[Conveyer]] M https://esolangs.org/w/index.php?diff=77136&oldid=77093 * Abbin21 * (+0) /* Example Code */ 15:10:19 -!- adu has quit (Quit: adu). 15:16:03 -!- adu has joined. 15:20:26 -!- egelbot has quit (Remote host closed the connection). 15:24:08 Well, that sucked. But I think I have pretty printing. 15:24:37 ☺ 15:24:40 egelbot: cons 1 nil 15:25:41 -!- egelbot has joined. 15:25:43 egelbot: cons 1 nil 15:25:44 {1} 15:25:56 egelbot: {1,2,3,4,5} 15:25:56 {1, 2, 3, 4, 5} 15:26:05 egelbot: (1,2,3,4,5) 15:26:06 (1, 2, 3, 4, 5) 15:26:35 Well. 'pretty' 15:26:48 egelbot: cons cons 15:26:48 {...} 15:27:11 egelbot: cons 1 cons 15:27:11 {1...} 15:28:07 It just cuts with '...' when it can't make sense of the term anymore. 15:28:31 egelbot: tuple 1 2 3 15:28:31 (1, 2, 3) 15:28:48 egelbot: tuple 15:28:49 System:tuple 15:29:24 By popular request! 15:29:33 I'll shut up now. 15:41:59 -!- adu has quit (Quit: adu). 15:55:26 -!- adu has joined. 16:15:25 -!- egelbot has quit (Remote host closed the connection). 16:16:00 -!- egelbot has joined. 16:46:30 -!- Lord_of_Life_ has joined. 16:48:25 -!- Lord_of_Life has quit (Ping timeout: 240 seconds). 16:49:21 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 17:01:21 -!- Sgeo has joined. 17:18:40 oh nice! pretty printing 17:19:03 egelbot: cons 1 2 17:19:03 {1...} 17:19:10 no dotted list syntax? 17:19:14 egelbot: (1,2) 17:19:14 (1, 2) 17:19:21 egelbot: tuple 8 3 2 17:19:21 (8, 3, 2) 17:19:22 egelbot: tuple 8 3 17:19:22 (8, 3) 17:19:24 egelbot: tuple 8 17:19:24 (8) 17:19:25 egelbot: tuple 17:19:25 System:tuple 17:19:27 um 17:19:36 spruit11: one of those is wrong 17:19:44 egelbot: tuple 8 17:19:45 (8) 17:19:46 ^ 17:19:49 egelbot: (8) 17:19:49 8 17:19:51 egelbot: (8,) 17:19:51 internal:1:5:syntactical:primary expression expected 17:20:00 Ah, right. Good catch. 17:20:20 I want to avoid the ,) syntax. 17:20:29 Is there a good reason to want it? 17:21:02 spruit11: no, but print it as (System:tuple 8) then 17:21:09 Yah, I will. 17:21:20 egelbot: cons (cons 9 8) (cons 7 6) 17:21:20 {{9...}, 7...} 17:21:35 Is this what you had in mind? 17:21:41 egelbot: {{9,8}, {7,6}} 17:21:41 {{9, 8}, {7, 6}} 17:21:49 no, because you can't see the tail 17:21:57 of a dotted list 17:23:20 The dots are just there to show something went wrong. But I can it's confusing. 17:24:11 *can see 17:27:03 look 17:28:01 ``` swipl -qg "M = '[|]'(9,'[|]'(8,'[|]'(7,[]))), display(M)" # in SWI prolog, cons is spelled '[|]' (sane prologs spell it . instead) so that's a list that I write out as conses and empty list, and the pretty-printer shows it with bracket list syntax 17:28:04 ​[9,8,7] 17:28:49 ``` swipl -qg "M = '[|]'(9,'[|]'(8,'[|]'(7,gotcha))), display(M)" # that's not a proper list, because there's no empty list in its tail. so the pretty-printer shows it as a dotted list 17:28:50 ​[9,8,7|gotcha] 17:29:46 ``` swipl -qg "N = [6,5,4], M = [9,8,7|N], display(M)" # you can use the dotted list syntax in input too 17:29:47 ​[9,8,7,6,5,4] 17:29:47 Heh. 17:30:12 lisps do the same, but instead of a | delimiter, they use a dot, that's why they're called dotted list 17:30:16 You make my life difficult. 17:30:31 lisps are older, so they get to name it 17:30:50 egelbot: {2,3}+4 17:30:50 exception("System:+ bad arguments") 17:30:58 Well. I value your input! 17:31:01 egelbot: data foo;; foo {2,3} 4 17:31:01 (foo {2, 3} 4) 17:31:09 egelbot: data foo;; foo 4 {2,3 2} 17:31:09 (foo 4 {2, (3 2)}) 17:31:15 egelbot: data foo;; foo 4 (2,3 2) 17:31:15 (foo 4 (2, (3 2))) 17:31:31 egelbot: data foo;; (2,(foo 3 2)) 17:31:31 (2, (foo 3 2)) 17:31:36 egelbot: data foo;; {2,foo 3 2} 17:31:36 {2, (foo 3 2)} 17:32:26 egelbot: def + = [];; {2,3+8} 17:32:26 internal:1:11:syntactical:-> expected 17:33:09 Nice try. But you can't rewrite to nothing. 17:33:33 egelbot: data +;; {2,3+8} 17:33:33 internal:1:7:syntactical:lowercase expected 17:34:02 Ah. You punish me for every design decision. 17:34:17 You want data to be able to be operators too? 17:34:26 sorry, that's not what want, and no 17:34:34 Ah. Okay 17:34:34 I type these also to see how they fail 17:34:39 Right. 17:34:51 try to break the code with unexpected cases 17:34:59 that's how we do testin 17:35:13 Yah, the REPL is good for that. 17:35:58 I'll print something for badly formed lists but I don't think I will make it conform to the input syntax. 17:38:51 I recommend {9,7|7} 17:39:06 sice egel already uses | as a delimiter 17:40:01 egelbot: (cons 1 nil, cons 1 nil 2) 17:40:01 ({1}, {...}) 17:40:11 egelbot: (cons 1, cons) 17:40:11 ({...}, System:cons) 17:42:36 [[Casini]] M https://esolangs.org/w/index.php?diff=77137&oldid=76437 * Abbin21 * (+24) 17:42:50 [[Conveyer]] M https://esolangs.org/w/index.php?diff=77138&oldid=77136 * Abbin21 * (+23) 18:00:23 -!- egelbot has quit (Remote host closed the connection). 18:01:24 -!- egelbot has joined. 18:01:50 egelbot: cons 1 1 18:01:51 {1...} 18:01:54 f 18:02:53 -!- egelbot has quit (Remote host closed the connection). 18:03:14 -!- egelbot has joined. 18:03:22 egelbot: cons 1 1 18:03:22 {1|1} 18:03:32 Needed to recompile the bot. 18:04:01 I'll test it offline and see what I did made any sense. 18:08:51 -!- egelbot has quit (Remote host closed the connection). 18:12:10 -!- egelbot has joined. 18:12:23 egelbot: cons 1 (cons 2) 18:12:24 {1, |(System:cons 2)} 18:12:39 That is a bit ugly. 18:14:03 -!- imode has joined. 18:18:28 -!- egelbot has quit (Remote host closed the connection). 18:18:34 -!- adu has quit (Quit: adu). 18:18:50 -!- egelbot has joined. 18:19:06 -!- egelbot has quit (Remote host closed the connection). 18:23:28 -!- egelbot has joined. 18:23:55 Heh. I need some kind of predicate to make it work nicely. Now it seems hacked. 18:23:58 Gawd. 18:24:23 I guess I should make it nice. 18:40:12 -!- egelbot has quit (Remote host closed the connection). 18:41:48 egelbot: cons 9 (cons 8 (cons 7 (cons 6 (cons 5 (cons 4 (cons 3 nil)))))) 18:41:52 ah 18:45:41 -!- TheLie has joined. 18:52:34 -!- adu has joined. 18:52:37 Moment, I can't seem to get the recursion right. 18:54:15 -!- adu has quit (Client Quit). 18:59:49 -!- Frater_EST has joined. 19:04:22 -!- adu has joined. 19:14:59 -!- adu has quit (Ping timeout: 240 seconds). 19:17:34 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77139&oldid=77135 * SunnyMoon * (+100) Yea... 19:19:02 -!- egelbot has joined. 19:19:31 I failed to make it nice. It will need some more thought. 19:19:52 egelbot: cons 19:19:53 System:cons 19:19:55 egelbot: cons 1 19:19:55 (System:cons 1) 19:19:58 egelbot: cons 1 nil 19:19:58 {1} 19:20:08 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77140&oldid=77139 * SunnyMoon * (+0) This is a better word for 'operations'. 19:20:08 egelbot: cons 1 cons 19:20:09 {|(System:cons 1 System:cons)} 19:20:20 egelbot: cons 9 8 7 19:20:20 (System:cons 9 8 7) 19:21:06 egelbot: cons 1 (cons 2 nil) 19:21:06 {1, 2} 19:21:14 So, that works. 19:21:18 egelbot: cons 1 (cons 2 3) 19:21:19 {1, |(System:cons 2 3)} 19:21:27 But I didn't get this nice. 19:21:34 -!- kritixilithos has quit (Quit: quit). 19:21:47 -!- adu has joined. 19:21:49 yeah, that should ideally say {1, 2| 3} or something 19:23:33 I will puzzle a bit more. 19:25:33 but this output is at least accurate too 19:25:37 so it's fine 19:26:04 egelbot: (tuple (tuple 9 8) (tuple 7 6)) (tuple 5 4) 19:26:05 ((9, 8), (7, 6), (5, 4)) 19:26:30 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77141&oldid=77140 * SunnyMoon * (+46) Game dev update 19:28:06 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77142&oldid=77141 * SunnyMoon * (-44) The link is too much unexpected. 19:32:30 -!- Frater_EST has left. 19:35:25 -!- egelbot has quit (Remote host closed the connection). 19:38:27 -!- egelbot has joined. 19:39:09 egelbot: cons 1 (cons 2 3) 19:39:09 {1, 2| 3} 19:39:13 Pffrt. 19:43:31 egelbot: (cons 9 8, cons 9 (cons 8 7), cons 9 (cons 8 (cons 7 6)), cons 9 nil, cons 9 (cons 8 nil), cons 9 (cons 8 (cons 7 nil)), cons 9 (cons 8 (cons 7 (cons 6 nil)))) 19:43:31 ({9| 8}, {9, 8| 7}, {9, 8, 7| 6}, {9}, {9, 8}, {9, 8, 7}, {9, 8, 7, 6}) 19:43:37 looks better 19:44:07 Yay recursion! 19:45:12 egelbot: (cons, cons 9, cons nil, cons nil nil, cons nil 9, cons 9 8 7, cons 9 8 nil, cons 9 nil 7, cons 9 nil nil, cons nil 8 7, cons nil 8 nil, cons nil nil 7, cons nil nil nil, cons (cons 9 nil) nil) 19:45:12 (System:cons, (System:cons 9), (System:cons {}), {{}}, {{}| 9}, (System:cons 9 8 7), (System:cons 9 8 {}), (System:cons 9 {} 7), (System:cons 9 {} {}), (System:cons {} 8 7), (System:cons {} 8 {}), (System:cons {} {} 7), (System:cons {} {} {}), {{9}}) 19:45:15 -!- Arcorann__ has quit (Read error: Connection reset by peer). 19:45:35 Yay line noise! 19:46:24 Oh gawd. Took a day but I am laughing about it. ;) 19:46:47 egelbot: cons nop nil 19:46:48 {System:nop} 19:47:11 egelbot: nop nil cons 19:47:14 I am wondering whether I should nop with unit once. 19:47:23 Nop is shorter.. 19:47:34 Unit sounds nice. 19:47:42 hmm 19:47:51 egelbot: 2;; nop "hello";; 3 19:47:51 2 19:47:51 3 19:47:54 interesting 19:48:44 -!- hendursaga has quit (Quit: hendursaga). 19:48:45 I didn't know nop worked as a head 19:49:09 -!- hendursaga has joined. 19:49:41 No. Print just checks the tag whether it's a nop. And an array inherits the tag from the head. 19:49:55 It's a small bug in print 19:50:06 egelbot: (nop 9) 8 19:50:16 egelbot: (nop "hello", 9) 19:50:16 ((System:nop "hello"), 9) 19:50:58 egelbot: def gobble = [_ -> gobble] 19:51:09 egelbot: gobble 7 4 9 8 1 10 19:51:09 gobble 19:51:16 egelbot: gobble "anything" 19:51:16 gobble 19:51:43 Yah. That's neat right. 19:52:54 that's underload's v builtin 19:55:38 it's an ordinary but useless combinator, it's just there to more easily demonstrate what can be done with the c builtin but not in pure lambda calculus 19:55:38 -!- arseniiv has joined. 19:56:16 Heh. 19:57:49 sorry, unlambda's v builtin 19:57:52 not underload's 19:57:56 also now I realize what I forgot 19:58:06 I should have washed the shower curtains... oh well 19:58:33 Ah. Right. People do that. 20:00:49 https://mathoverflow.net/questions/369825/tietze-like-transformations-for-defining-interesting-bijections-between-algebr 20:01:04 egelbot: def f = [ X Y -> f (X+Y) | X -> X ];; f 1 2 3 4 5 6 20:01:05 21 20:01:17 Like gobble. 20:07:03 M:tG rules question. In my turn, I pop Mindslaver. In the opponent's first main phase, I choose that they cast Master Warcraft. Who decides which creatures of the opponent attacks? 20:08:06 The controller of the controller of Master Warcraft, I believe, so it is unchanged. 20:08:24 zzo38: the controller is my opponent 20:08:35 Yes, but you control your opponent. 20:08:58 [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77143&oldid=77122 * IFcoltransG * (+0) /* Language specifications */ Spelling 20:09:06 (So I think the spell has no effect, although it can still be cast, stuff can be triggered from it, etc.) 20:09:28 RIght, you control your opponent and make all decisions for him 20:10:09 right, that's what you'd think first, but is it like that really? it's two conflicting static effects, Mindslaver says that I make the decision, Master Warcraft says that the opponent makes the decision, these aren't replacement abilities because they don't use "instead", so you don't apply Mindslaver as a replacement after Master Warcraft, Master Warcraft just wins because of later timestamp, doesn't 20:10:15 it? 20:10:48 I do not believe so. If player 1 controls player 2, then all decisions to be made by player 2 according to the rules and effects of the game are made by player 1 instead. 20:11:05 I am not a judge but 'you make all decions' looks pretty final to me. 20:12:05 spruit11: we have 101.1 to say that it's not final 20:13:13 (The exception is conceding, but that is not "an effect of the game", and rule 716.6 specifically says that conceding doesn't count anyways. Also, Master Warcraft does not override control of a player. Rule 101.1 does not seem to contradict that.) 20:17:31 I think rule 101.1 only says if the cards say to do something different from what the rules would say ordinarily happens; replacement effects and other rules which it does not contradict would presumably still apply. 20:21:33 -!- egelbot has quit (Remote host closed the connection). 20:21:41 let's see. "716.5. ... all choices and decisions the controlled player is allowed to make or is told to make by the rules or by any objects." so maybe Master Warcraft tells the opponent to make the decision in which case I would make them 20:31:50 I think that inventing a new programming language and writing a literate program using it to write the rule sof the game, would make the rules more clearly, possibly. 20:32:41 -!- egelbot has joined. 20:32:53 zzo38: perhaps, but I want to understand the existing rules of M:tG 20:33:00 egelbot: nop 1 20:33:00 (System:nop 1) 20:33:02 egelbot: nop 20:34:01 I wonder how MTGA does it. They must have some sort of rule set compiler. 20:34:15 b_jonas: Yes, and knowing what the rules are would also help with attempting to do what I mentioned, anyways, too. 20:34:56 There's an open source mtg application too, now I think of it. 20:36:14 The open source software that I have seen seems to not implement all of the cards; some aren't implemented, such as text editing effects, and what it does implement does not seem general enough. 20:36:40 Ah. Shame. But somewhat expected. 20:37:02 (I suggested a RDF-based format to define the effects of cards; for example [:counter [:target :spell]] is the same like "counter target spell". This RDF-based format would also enable text editing effects to work, too.) 20:37:26 It's a hard game to implement. And mtg might always bring out a card which doesn't fit into your game. 20:37:40 egelbot: [D -> ([D true], [D false], [D (true 9)], [D (9 true)], [D ((true 9) 9)], [D (true 9 9)] [D ((false 9) 9)], [D (false 9 9)],)][X:true -> 1 | _ -> 0] 20:37:40 internal:1:16:syntactical:-> expected 20:38:04 Card: 'wash my clothes and bring beer' comes to mind. 20:38:32 egelbot: [D -> ((D true), (D false), (D (true 9)), (D (9 true)), (D ((true 9) 9)), (D (true 9 9)) (D ((false 9) 9)), (D (false 9 9)),)][X:true -> 1 | _ -> 0] 20:38:32 internal:1:126:syntactical:primary expression expected 20:38:38 spruit11: you mean Ashnod's Coupon 20:38:47 well that only does the beer prat 20:38:57 I want it. 20:38:59 for washing clothes ... hmm, I'm not sure there's a card for that yet 20:39:00 spruit11: "Wash my clothes and bring beer" doesn't count; no other Un-cards count either, as far as I am concerned. 20:39:17 (Those are outside of the scope of the core rules of the game.) 20:40:29 Sometimes new cards will require new rules, but that already happens anyways. 20:41:20 I already wondered whether MTGA will stifle innovation. 20:41:36 * spruit11 <- plays mtga daily 20:41:58 maybe you could use Oblivion Ring to exile an item of clothing, then return it, and since it's a new object, the stains aren't preserved, but that's inefficient because you somehow have to repeat it for every piece of clothing individually, plus of course need a way to kill O-Ring 20:45:21 In my own custom sets of cards, I have written some improvements to the rules, some of which just improve the mathematical structure and do not usually affect the game, such as specifying that all text changing effects work on the AST, that spellings do not affect whether or not a name is equal to another (the AST does instead), and several new terms such as "persistent property", "kind", etc. 20:45:50 (I do some of that to try to make the rules less confusing.) 20:46:54 Do anyone of you play Arena? 20:47:43 spruit11: no, we're only theoretical M:tG players on this channel 20:47:43 I do not, but I am on Linux and would prefer open source software that I can actually see all of the rules, and experiment with making up my own cards too, anyways 20:47:57 zzo38: that is unlikely for both technical and legal reasons 20:48:02 I run it on my linux machine. 20:48:05 (And I do not actually play the game much either, mostly just discussion of stuff) 20:49:07 I used to run it on vanilla wine but I caved and now use lutris. Works flawlessly. 20:49:20 * spruit11 fingers crossed 20:50:08 While open source implementations of Magic: the Gathering exist, I don't know about test cases, etc, and anyways as I said they are incomplete. 20:50:14 spruit11: oh wow 20:53:33 (In addition to experimenting with custom cards, might also want custom rules, LAN play, UI customization, etc) 20:56:13 so interactive egel can't actually persist values between statements, it can only persist definitions, and has to recompute everything. 20:56:37 that means keeping the process alive has much less advantages as with ordinary languages 20:56:46 I mean for an irc bot 20:57:09 every value is lost at double semicolons 20:57:28 Unless you use val. 20:57:45 egelbot: val f = print "hello"; 3 20:57:46 hello 20:57:50 egelbot: f 20:57:50 3 20:57:53 oh wait 20:57:58 hmm 20:58:13 egelbot: data foo; val f = fool 20:58:13 internal:1:10:syntactical: unexpected 20:58:19 egelbot: data foo val f = fool 20:58:19 internal:1:11:syntactical:val unexpected 20:58:23 egelbot: data foo;; val f = fool 20:58:23 internal:1:21:semantical:undeclared fool 20:58:26 egelbot: data foo;; val f = foo 20:58:32 egelbot: f 20:58:32 foo 20:58:43 egelbot: def foo = 2;; foo;; f 20:58:44 2 20:58:44 foo 20:58:59 `val` reduced the body before assigning it to a combinator. 20:59:00 val`? No such file or directory 20:59:07 *reduces 20:59:30 I wonder if you can use f in any way that gets it reduced 20:59:54 Hmm? 21:00:09 I know there are also some open source implementations of Pokemon battles, although I want a purely text based one. 21:01:16 egelbot: (f, [2 -> 9] f, [foo -> 9] f, [5 -> 9] f) 21:01:16 (foo, (Dummy6DOT0 foo), 9, (Dummy6DOT2 foo)) 21:01:25 [[Conglument]] N https://esolangs.org/w/index.php?oldid=77144 * Hakerh400 * (+16354) +[[Conglument]] 21:01:30 [[Language list]] https://esolangs.org/w/index.php?diff=77145&oldid=77049 * Hakerh400 * (+17) +[[Conglument]] 21:01:34 [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77146&oldid=77116 * Hakerh400 * (+17) +[[Conglument]] 21:01:58 egelbot: (foo, [2 -> 9] foo, [foo -> 9] foo, [5 -> 9] foo) 21:01:59 (2, 9, (Dummy7DOT1 2), (Dummy7DOT2 2)) 21:01:59 Yah. That's why I regret compiling combinators. You lose the text representation. 21:02:16 But, ah well. 21:02:30 ignore that, I could just add a fallback clause 21:02:44 bugh. 21:02:51 I don't know how to make this faster. 21:02:52 egelbot: (f, [2 -> 9 | _ -> 0] f, [foo -> 9 | _ -> 0] f, [5 -> 9 | _ -> 0] f) 21:02:52 (foo, 0, 9, 0) 21:03:03 egelbot: (foo, [2 -> 9 | _ -> 0] foo, [foo -> 9 | _ -> 0] foo, [5 -> 9 | _ -> 0] foo) 21:03:04 (2, 9, 0, 0) 21:03:24 egel's rules are so weird 21:03:32 Heh? 21:03:45 That's good! Right? 21:03:54 ;) 21:04:00 they make sense but only in the esoteric way 21:04:58 I could always throw still. And make everything neater. And end with a Haskell.. 21:05:25 https://github.com/egel-lang/egel 21:05:34 ^ I added a mascot 21:06:04 egel: data still; throw still 21:06:09 egelbot: data still;; throw still 21:06:10 exception(still) 21:14:25 [[Truth-machine]] https://esolangs.org/w/index.php?diff=77147&oldid=77036 * Hakerh400 * (+49) 21:14:54 -!- adu has quit (Quit: adu). 21:17:36 egelbot: dis [ X -> X ] 21:17:37 "Dummy11DOT0::0400010005000000000a000000480400060006000000050a0000004801000700010100080002010009000301000a000401000b000606000c0007000b07000d000c000000060b000d06000600020001070007000600000004030001000200070b0003" 21:18:41 Didn't show that. I once added the ability to disassemble and reassemble the bytecode. 21:19:11 egelbot: [F->(F(9<8),F(8<9),F true,F false))][X->if X then"yes"else"no"] 21:19:12 internal:1:36:syntactical:] expected 21:19:18 egelbot: [F->(F(9<8),F(8<9),F true,F false)][X->if X then"yes"else"no"] 21:19:18 ("no", "yes", "yes", "no") 21:20:54 egelbot: let Six=6,Seven=7,Eight=8 in {Seven,Eight,9} 21:20:55 internal:1:11:syntactical:in expected 21:21:02 egelbot: let Six=6;Seven=7;Eight=8 in {Seven,Eight,9} 21:21:02 internal:1:17:syntactical:in expected 21:21:14 egelbot: let Six Seven Eight=6 7 8 in {Seven,Eight,9} 21:21:14 (Dummy13DOT0 (6 7 8)) 21:21:41 DUh? 21:21:43 ? 21:21:48 You found another bug? 21:21:51 egelbot: let tuple Six Seven Eight=tuple 6 7 8 in {Seven,Eight,9} 21:21:51 (Dummy14DOT0 (6, 7, 8)) 21:21:58 what's egelbot do? 21:22:12 imode: it evaluates egel. see our wiki if you want to know what egel is. 21:22:18 neat. 21:22:45 ideally I should just install egel to HackEso so I can evaluate egel there, but I'm lazy 21:22:45 egelbot: let X Y = 1 2 in Y X 21:22:45 (Dummy15DOT0 (1 2)) 21:22:54 eager combinator rewriting, huh? 21:23:11 plus this one is funnier because if I make an infinite loop then spruit11 has to kill the bot and restart it. 21:23:18 Hehe. 21:23:26 HackEso would just time out that session 21:23:46 how's the rewriting handled? how fast are basic operations like addition etc.? I must know! 21:23:55 also this one can spam irc because a command can output any number of lines 21:24:37 egelbot: let (X Y) = 1 2 in Y X 21:24:37 (2 1) 21:25:02 imode: dunno, there's some paper on it in the egel-docs repository 21:25:15 sick. 21:25:48 It's a slow interpreter. The reduction system is the interesting part. 21:26:15 how slow? microseconds-per-operation slow? 21:26:56 egelbot: String.charAt 0 "hello" 21:26:56 internal:1:2:semantical:undeclared String 21:27:09 Roughly Python speed. If you don't count that I rewrite additions instead of generating bytecode for it. 21:27:12 hmm, how did that work? 21:27:31 egelbot: String:charAt 0 "hello" 21:27:32 'h' 21:27:36 you generate byteode for this? huh. 21:27:40 ah right thanks 21:27:44 egelbot: String:charAt 0 "hello" 21:27:44 'h' 21:28:22 egelbot: 1 + 2 21:28:22 3 21:28:31 now if I could actually time that out with perf... 21:29:00 egelbot: 3 | 4 21:29:00 internal:1:4:syntactical:| unexpected 21:29:01 I use gprof. 21:29:09 egelbot: 7 & 4 21:29:09 internal:1:4:semantical:undeclared & 21:32:10 egelbot: 7 && 4 21:32:10 4 21:32:40 yeah 21:32:52 egel doesn't build on my machine. 21:32:55 I should change that once. I will use && for 'lazy' (forgot the name) boolean expressions. 21:33:12 looks to be missing libicu, but I have that installed. 21:33:23 egelbot: "and I think it was"; toint "a" 21:33:23 0 21:33:35 egelbot: "and I think it was"; toint (charAt 0 "a") 21:33:36 internal:1:31:semantical:undeclared charAt 21:33:44 egelbot: "and I think it was"; toint (String:charAt 0 "a") 21:33:45 97 21:33:46 yeah, that 21:34:11 egelbot: "but the opposite direction is not"; totext 97 21:34:12 "97" 21:34:34 egelbot: unpack "a" # oh right, we have this now 21:34:35 {'a'} 21:34:40 but it doesn't really help 21:34:46 toint is still the ord function 21:35:05 and I think chr was uglier 21:35:40 egelbot: "\\u0061" 21:35:40 "\\u0061" 21:35:42 egelbot: "\u0061" 21:35:43 internal:1:4:lexical:error in string 21:35:49 egelbot: "\x0061" 21:35:49 internal:1:4:lexical:error in string 21:35:51 egelbot: "\x61" 21:35:52 internal:1:4:lexical:error in string 21:35:54 hmm 21:36:02 And I thought I could move egel to beta status! 21:36:09 egelbot: unquote "\\u0061" 21:36:09 internal:1:2:semantical:undeclared unquote 21:36:12 egelbot: String:unquote "\\u0061" 21:36:12 internal:1:2:semantical:undeclared unquote 21:36:15 There's still a lot to do. 21:36:20 egelbot: String:unescape "\\u0061" 21:36:20 "a" 21:36:23 yes, that was it 21:36:24 I'm just curious about how stuff like basic addition performs. 21:36:46 going on a rewriting-related performance journey myself. 21:36:53 Basic addition is really, really slow. 21:36:59 how slow? 21:37:11 sorry, that sounds way more forceful than it actually is. 21:37:16 Dunno. 21:37:44 weird, the cflags resolve to -licuio -licui18n -licuuc -licudata... 21:37:53 But I think in the order of ten thousand micro instructions. 21:38:18 `error: ‘icu_65’ is not a namespace-name` 21:38:19 error:? No such file or directory 21:38:43 Should be something like that, in the ball park of a thousand to ten thousand. 21:38:58 Instead of one instruction.. 21:39:12 Bash is even slower! 21:39:38 interesting. how do you do the rewriting? just a basic recursive tree search/replace? 21:39:51 https://github.com/egel-lang/egel-tex/blob/master/semantics/semantics.pdf 21:39:56 ^ look there 21:40:04 neato burrito. 21:40:08 It's a graph rewriter. 21:40:22 egelbot: [X->[X->(X,X)]8]9 21:40:22 (8, 8) 21:40:26 correct 21:40:26 WIth a bit of a different graph representation than you would expect. 21:41:02 hells yeah. you do subexpr sharing? 21:41:25 Yah. 21:41:28 egelbot: pack {'5','2','7'} 21:41:29 "527" 21:42:41 FWIW I've found that you get better general perf if you use a queue rather than doing an eval over a ton of in-memory nodes. data locality is better. 21:43:06 Yah. That's true. But this model is just nice. 21:43:50 Well. I find it nice. It's about as simplistic as I could make it. 21:43:54 But slow. 21:44:08 For my definition of simplistic. 21:44:11 https://git.imode.tech/?p=python/modal;a=blob;f=modal.py;hb=HEAD 21:44:16 egelbot: 0xBD4388FF 21:44:17 internal:1:4:lexical:error in hexadecimal int 21:44:22 ? 21:44:30 Uuuu. 21:44:34 h. 21:44:36 https://git.imode.tech/?p=python/modal;a=blob;f=prelude.modal;hb=HEAD 21:44:51 egelbot: BD4388FF 21:44:51 internal:1:2:semantical:undeclared BD4388FF 21:45:00 wonder if it can do octal. 21:45:04 No. 21:45:34 I even forgot I added hexadecimal. 21:46:46 egelbot: 0xff 21:46:46 255 21:46:48 egelbot: 0xfff 21:46:49 4095 21:46:52 egelbot: 0xffF 21:46:52 internal:1:6:semantical:undeclared F 21:46:57 egelbot: 0xFf 21:46:57 internal:1:4:lexical:error in hexadecimal int 21:47:12 Ah, I didn't add uppercase hex. 21:47:12 what 21:47:25 0xFf ? 21:47:26 -!- TheLie has quit (Remote host closed the connection). 21:47:35 oh, that was from you wait 21:47:38 egelbot: def format08x = [D->[L->pack{L 7,L 6,L 5,L 4,L 3,L 2,L 1,L 0}][C->[0->'0'|1->'1'|2->'2'|3->'3'|4->'4'|5->'5'|6->'6'|7->'7'|8->'8'|9->'9'|10->'A'|11->'B'|12->'C'|13->'D'|14->'E'|15->'F'](16&&(D>>(4*C)))]];; format08x 3175319807 21:47:39 exception("System:pack invalid arguments") 21:47:59 egelbot: def format08x_dbg = [D->[L->{L 7,L 6,L 5,L 4,L 3,L 2,L 1,L 0}][C->[0->'0'|1->'1'|2->'2'|3->'3'|4->'4'|5->'5'|6->'6'|7->'7'|8->'8'|9->'9'|10->'A'|11->'B'|12->'C'|13->'D'|14->'E'|15->'F'](16&&(D>>(4*C)))]];; format08x_dbg 3175319807 21:47:59 {'0', (format08x_dbgDOT1 16), (format08x_dbgDOT1 16), '0', (format08x_dbgDOT1 16), '0', '0', (format08x_dbgDOT1 16)} 21:48:05 16? 21:48:12 oh 21:48:20 egelbot: def format08x_dbg = [D->[L->{L 7,L 6,L 5,L 4,L 3,L 2,L 1,L 0}][C->[0->'0'|1->'1'|2->'2'|3->'3'|4->'4'|5->'5'|6->'6'|7->'7'|8->'8'|9->'9'|10->'A'|11->'B'|12->'C'|13->'D'|14->'E'|15->'F'](15&&(D>>(4*C)))]];; format08x_dbg 3175319807 21:48:20 {'B', 'D', '4', '3', '8', '8', 'F', 'F'} 21:48:24 better 21:48:29 -!- frouts has joined. 21:48:39 simple to me is a one-file-to-four-file language with a LoC count under 1k. 21:48:41 egelbot: def format08x = [D->[L->pack{L 7,L 6,L 5,L 4,L 3,L 2,L 1,L 0}][C->[0->'0'|1->'1'|2->'2'|3->'3'|4->'4'|5->'5'|6->'6'|7->'7'|8->'8'|9->'9'|10->'A'|11->'B'|12->'C'|13->'D'|14->'E'|15->'F'](15&&(D>>(4*C)))]];; format08x 3175319807 21:48:41 "BD4388FF" 21:48:45 that's it 21:49:04 As always, at some point you pick up speed and run miles ahead of me. ;) 21:49:30 nah, this is something I did write back then and is probably in the IRC logs 21:50:01 egelbot: String:unescape "\\U00000061" 21:50:01 "a" 21:50:04 imode: Sorry for the build thing but I just edit Makefiles until they work for me. No idea how to make that robust. 21:50:19 lol, no worries. I piggyback off of the Go build tools to do sanity checking etc. for me. 21:50:47 was there a string concatenation function? 21:51:29 egelbot: String:append "he" "llo" 21:51:29 "hello" 21:51:41 egelbot: def format08X = [D->[L->pack{L 7,L 6,L 5,L 4,L 3,L 2,L 1,L 0}][C->[0->'0'|1->'1'|2->'2'|3->'3'|4->'4'|5->'5'|6->'6'|7->'7'|8->'8'|9->'9'|10->'A'|11->'B'|12->'C'|13->'D'|14->'E'|15->'F'](15&&(D>>(4*C)))]];; format08X 3175319807 21:51:41 "BD4388FF" 21:51:43 was just eager to see how fast or slow this is compared to my stuff. having an internal crisis right now, because additions of 1024 bit numbers are in the 100-200usec range. 21:51:46 egelbot: data format08x 21:52:05 b_jonas: String:append 21:52:09 spruit11: is there a way to undefine a name? 21:52:22 egelbot: undef format08X 21:52:22 internal:1:2:semantical:undeclared undef 21:52:26 egelbot: using String;; append "hello " "world!" 21:52:26 "hello world!" 21:52:39 egelbot: def chr = [C -> String:unescape (String:append "\\U" (format08X))];; chr 93 21:52:39 exception("String:append bad arguments") 21:52:48 egelbot: def chr = [C -> String:unescape (String:append "\\U" (format08X C))];; chr 93 21:52:48 "]" 21:52:48 b_jonas: No. I didn't add an undef. 21:53:06 egelbot: chr 97 21:53:06 "a" 21:53:08 ok, we have a chr 21:54:39 -!- frouts has quit (Quit: -a- IRC for Android 2.1.57). 21:54:54 imode: It's 64 bit wide addition and very, very slow since it's a graph rewrite on three nodes expressed as heavyweight C++ object. So no worries. Yours is probably faster. 21:55:50 egelbot: def strjoini = [nil -> "" | (cons A D) -> String:append A (strjoini D)];; "not the most efficient, but it will do for now"; strjoini {"he","l","lo"} 21:55:50 "hello" 21:55:51 that's still a reasonable complexity if those rewrites are built-in and have access to the actual backing ints. 21:57:05 Right. 21:57:45 egelbot: [L->say (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 10); say "fak alol" 21:57:45 internal:1:6:semantical:undeclared say 21:57:49 what 21:57:51 egelbot: say 4 21:57:51 internal:1:2:semantical:undeclared say 21:57:54 egelbot: say "foo" 21:57:54 Print 21:57:54 internal:1:2:semantical:undeclared say 21:58:00 egelbot: Print "foo" 21:58:01 internal:1:2:semantical:undeclared Print 21:58:03 egelbot: print "foo" 21:58:04 foo 21:58:05 I changed it back. 21:58:07 egelbot: print "foo"; print "bar" 21:58:08 foo 21:58:08 bar 21:58:14 shouldn't that be called println 21:58:23 egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 10); print "fak alol" 21:58:24 mehraj-PRIVMSG b_jonas :duruzsol-PRIVMSG #esoteric :szellos- 21:58:24 fak alol 21:59:17 egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](String:append(chr 13,chr 10)); print "fak alol" 21:59:18 exception("String:append bad arguments") 21:59:24 egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](String:append(chr 13)(chr 10)); print "fak alol" 21:59:24 mehraj 21:59:24 fak alol 21:59:41 ok that's better, it sends the cr through but not the lf 21:59:53 and the IRC client ignores anything from cr to lf 22:00:04 Oh right. You already thought I should harden that, I remember. 22:00:09 egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](String:append(chr 13)(chr 0)); print "fak alol" 22:00:09 mehraj 22:00:10 fak alol 22:00:23 egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 0); print "fak alol" 22:00:24 mehrajPRIVMSG #esoteric :fak alol 22:00:50 ok, so to actually break this, I probably have to load IO or some such library, or use the unsafe functions maybe 22:01:25 or find some function you accidentally left in System that shouldn't be there 22:01:33 I don't understand what all those functions are 22:02:17 Yah. Severily lacking documentation is another thing. 22:02:41 egelbot: "\u00610000" 22:02:41 internal:1:4:lexical:error in string 22:02:44 egelbot: "\x00610000" 22:02:45 internal:1:4:lexical:error in string 22:02:57 just stick to unescape then 22:03:01 and chr 22:04:19 I'll add a chr once. 22:04:39 egelbot: int 22:04:39 System:int 22:04:56 spruit11: it doesn't really matter, we can't do anything too interesing with strings anyway 22:05:22 Hmm? You don't have all primitives? 22:05:33 no, I mean we can't break the bot or anything 22:05:41 Oh, right. 22:05:43 we have enough primitives to draw mazes or suchlike if we want 22:05:56 maybe not enough to send byte strings that are invalid utf-8, I dunno 22:06:30 Right. I was wondering about that anyway. 22:07:06 It looked sane to support utf-8 but I am not that sure anymore. 22:07:15 egelbot: [T->(T true,T 6,T (6 2),T (6,2),T {6,2},T int)][(_ _)->0|_:int->1|_->0] 22:07:15 internal:1:60:syntactical:-> expected 22:07:31 where exactly? 22:07:47 egelbot: [T->(T true,T 5)][(_ _)->0|_:int->1|_->0] 22:07:47 internal:1:30:syntactical:-> expected 22:08:06 egelbot: [T->(T true,T 5)][(X X)->0|X:int->1|X->0] 22:08:07 internal:1:23:semantical:redeclaration of X 22:08:12 egelbot: [T->(T true,T 5)][(X Y)->0|X:int->1|X->0] 22:08:13 internal:1:29:semantical:undeclared int 22:08:20 egelbot: [T->(T true,T 5)][(X Y)->0|X:System:int->1|X->0] 22:08:20 internal:1:29:semantical:undeclared int 22:08:30 :: 22:08:36 I think 22:08:43 egelbot: [T->(T true,T 5)][(X Y)->0|X::int->1|X->0] 22:08:43 (0, 1) 22:08:54 egelbot: [T->(T true,T 5,T (6 2),T (6,2),T {6,2},T int)][(X Y)->0|X::int->1|X->0] 22:08:54 (0, 1, 0, 0, 0, 1) 22:09:03 egelbot: [T->(T true,T 5,T (6 2),T (6,2),T {6,2},T int)][(X Y)->0|int->0|X::int->1|X->0] 22:09:03 (0, 1, 0, 0, 0, 0) 22:09:18 egelbot: [T->(T true,T 5,T 2.5,T 6.0,T (6 2),T (6,2),T {6,2},T int)][(X Y)->0|int->0|X::int->1|X->0] 22:09:18 (0, 1, 0, 0, 0, 0, 0, 0) 22:09:22 ok good enough 22:09:33 egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0] 22:17:26 egelbot: def listtake_a = [P N S -> [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake = [N S -> listtake nil N S];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; take 7 st6 22:17:26 internal:1:269:semantical:undeclared take 22:17:37 egelbot: listtake 7 st6 22:17:57 egelbot: "did I put you into an infinite loop?" 22:18:04 oops 22:18:37 `ping 22:18:38 pong 22:21:02 oh yeah 22:21:17 egelbot: def listtake_a = [P N S -> [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake_a = [N S -> listtake nil N S];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; listtake 7 st6 22:21:22 that was the bug 22:21:23 spruit11: sorry 22:21:48 I made it fall into growing a term one by one 22:22:08 making an application with listtake as the head longer and longer 22:22:14 -!- egelbot has quit (Ping timeout: 256 seconds). 22:22:20 if it copies the whole application, then that will take a while to run out of memory 22:23:45 Oh, right. 22:24:08 -!- egelbot has joined. 22:24:59 egelbot: def listtake_a = [P N S -> [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake = [N S -> listtake_a nil N S];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; listtake 7 st6 22:24:59 internal:1:143:semantical:undeclared isint 22:25:07 egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0] 22:25:13 egelbot: listtake 7 st6 22:25:14 internal:1:2:semantical:undeclared listtake 22:25:17 egelbot: def listtake_a = [P N S -> [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake = [N S -> listtake_a nil N S];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; listtake 7 st6 22:25:17 exception("error listtake") 22:25:24 that's slightly better 22:27:42 egelbot: def listtake_a = [P N S -> say ("listtake_a",P,N,S); [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:27:43 internal:1:29:semantical:undeclared say 22:27:49 egelbot: def listtake_a = [P N S -> print ("listtake_a",P,N,S); [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw "error listtake" ] (isint N)(N <= 0)S];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:27:49 exception("error listtake") 22:28:37 egelbot: def listtake_a = [P N S -> print ("listtake_a",P,N,S); "substitute"];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:28:37 "substitute" 22:29:08 egelbot: print ("listtake_a",nil,7,st6) 22:29:08 (System:print ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82})) 22:29:19 egelbot: print ("listtake_a",nil,7,st6); 0 22:29:20 0 22:29:25 egelbot: print (tostr("listtake_a",nil,7,st6)); 0 22:29:25 internal:1:9:semantical:undeclared tostr 22:30:14 Oh. Sorry. Print doesn't print tuples yet. Just the primitives. 22:30:18 egelbot: print (totext ("listtake_a",nil,7,st6)); 0 22:30:19 exception("System:totext bad arguments") 22:30:33 argh 22:32:24 egelbot: print 1 "A" 5.0 7 22:32:25 1A5.0000000000000007 22:32:35 egelbot: print 1 "A" 5.0 7 true 22:32:36 (System:print 1 "A" 5.000000000000000 7 System:true) 22:32:57 Uh. Right. Alpha software. I'll fix print. 22:35:18 egelbot: def listappend = [nil S->S| (cons A D) S->cons A (listappend D S)| _ _->throw"error listappend"];; listappend {8,22,13,59} {75,88} 22:35:18 {8, 22, 13, 59, 75, 88} 22:35:43 Shall I restart the bot? 22:35:58 if you want 22:36:05 -!- egelbot has quit (Remote host closed the connection). 22:36:20 -!- egelbot has joined. 22:36:24 egelbot: def listappend = [nil S->S| (cons A D) S->cons A (listappend D S)| _ _->throw"error listappend"];; listappend {8,22,13,59} {75,88} 22:36:24 {8, 22, 13, 59, 75, 88} 22:36:37 egelbot: print (1,2) 22:36:38 (1, 2) 22:36:41 egelbot: print (1,2) true 22:36:42 (1, 2)System:true 22:36:53 egelbot: print (1,2) true 5 "hello" 'a' 22:36:53 (1, 2)System:true5hello'a' 22:37:07 the char is wrong. 22:37:40 egelbot: def listflatten_a = [S nil->S| S(cons A D)->listappend A(listflatten_a S D)| _ _->throw"error listflatten"] def listflatten = [L->listflatten_a{}L];; listflatten {{8,22,13,59},{75,88},{},{94,81,62}} 22:37:40 internal:1:110:syntactical:def unexpected 22:38:08 spruit11: is there a way to just access to pretty-printer and get a string from it? 22:38:32 egelbot: def listflatten_a = [S nil->S| S(cons A D)->listappend A(listflatten_a S D)| _ _->throw"error listflatten"];; def listflatten = [L->listflatten_a{}L];; listflatten {{8,22,13,59},{75,88},{},{94,81,62}} 22:38:33 {8, 22, 13, 59, 75, 88, 94, 81, 62} 22:38:43 -!- egelbot has quit (Remote host closed the connection). 22:38:51 os now it actually requires the double semicolon between defs? 22:38:57 -!- egelbot has joined. 22:38:59 egelbot: print (1,2) true 5 "hello" 'a' 22:38:59 (1, 2)System:true5"hello"'a' 22:39:21 Aargh. I made it worse. 22:41:32 -!- egelbot has quit (Remote host closed the connection). 22:41:48 you could just make separate functions to print a string, to println a string, to format any value with the pretty-printer, and to format and println any values separated by spaces 22:41:48 -!- egelbot has joined. 22:41:55 egelbot: print (1,2) true 5 "hello" 'a' 22:41:56 (1, 2)System:true5helloa 22:42:14 egelbot: print{3,"a"} 22:42:14 {3, "a"} 22:42:20 ok that should help 22:42:35 thanks 22:42:52 b_jonas: No problem. I am a bit hazy all the programming today though. 22:42:56 brb 22:44:16 egelbot: def todo=throw"unimplemented";; def listtake_a = [P N S -> print("listtake_a",P,N,S);todo];; def listtake = [N S -> listtake_a nil N S];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; listtake 7 st6 22:44:16 ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}) 22:44:17 exception("unimplemented") 22:44:23 ok so that part is ok 22:44:28 now what was my actual definition? 22:45:20 egelbot: def todo=throw"unimplemented";; def listtake_a = [P N S -> print("listtake_a",P,N,S); [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:45:20 internal:1:201:semantical:undeclared isint 22:46:12 egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0] 22:46:15 egelbot: def todo=throw"unimplemented";; def listtake_a = [P N S -> print("listtake_a",P,N,S); [0 _ nil->nil| 0 true _->nil| 0 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:46:15 ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}) 22:46:16 exception("error listtake") 22:46:46 -!- t20kdc has quit (Remote host closed the connection). 22:46:57 egelbot: def todo=throw"unimplemented";; def listtake_a = [P N S -> [U V W->print("listtake_i",U,V,W)] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:46:57 ("listtake_i", 1, System:false, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}) 22:47:24 so (isint N) is 1, (N<=0) is false 22:47:49 oh right 22:48:28 egelbot: def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)->cons A (listtake_a (N-1) D P)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:48:29 exception("error listtake") 22:49:10 egelbot: def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)-> print("listtake_c",A,N,(N-1),D,P); cons A (listtake_a (N-1) D P)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:49:10 ("listtake_c", 8, 7, (7 -1), {22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}, {}) 22:49:11 exception("error listtake") 22:49:14 ah 22:49:19 egelbot:7 - 1 22:49:19 6 22:49:20 egelbot:7 -1 22:49:20 (7 -1) 22:49:32 yeah, that was something I suffered with last time too 22:50:00 egelbot: def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)->cons A (listtake_a(-1+N)D P)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:50:00 exception("error listtake") 22:50:36 oh, A is wrong 22:50:48 somehow 22:51:08 no it's not wrong 22:51:12 8 really is hte first element 22:51:27 however, 22:52:01 egelbot: def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)-> print("listtake_c",); cons A (listtake_a P(-1+N)D)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:52:01 internal:1:99:syntactical:primary expression expected 22:52:30 egelbot: def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)-> cons A (listtake_a P(-1+N)D)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)S ];; def listtake = [N S -> listtake_a nil N S];; listtake 7 st6 22:52:31 {8, 22, 13, 59, 75, 88, 94} 22:52:35 FINALLY 22:53:22 egelbot: listtake 2 st6;; listtake 99 st6;; listtake -2 st6;; listtake 0 st6;; listtake 2 {};; listtake 2 6;; 22:53:22 internal:1:102:syntactical:primary expression expected 22:53:35 egelbot: listtake 2 st6;; listtake 99 st6;; listtake -2 st6;; listtake 0 st6;; listtake 2 {};; listtake 2 6 22:53:35 {8, 22} 22:53:35 {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82} 22:53:35 {} 22:53:35 {} 22:53:35 {} 22:53:36 exception("error listtake") 22:53:53 Heh. 22:57:53 egelbot: def plisttake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (listtake_a P(-1+N)D)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)(S()) ];; def plisttake = [N S -> listtake_a nil N S];; plisttake 7 [F->pcons 8[F->pcons 22[F->pcons 13[F->nil]]]] 22:57:53 internal:1:163:syntactical:primary expression expected 22:58:10 egelbot: def plisttake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (listtake_a P(-1+N)D)| _ _ _->throw"error listtake" ] (isint N)(N <= 0)(S()) ];; def plisttake = [N S -> plisttake_a nil N S];; 22:58:10 internal:1:163:syntactical:primary expression expected 22:58:22 egelbot: def plisttake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N <= 0)(S()) ];; def plisttake = [N S -> plisttake_a nil N S];; 22:58:22 internal:1:165:syntactical:primary expression expected 22:58:27 egelbot: def plisttake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N <= 0)(S()) ] 22:58:27 internal:1:165:syntactical:primary expression expected 22:58:45 egelbot: () 22:58:46 internal:1:3:syntactical:primary expression expected 22:58:47 oh 22:58:50 egelbot: unit 22:58:50 internal:1:2:semantical:undeclared unit 22:58:56 egelbot: nop 22:59:18 egelbot: def plisttake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N <= 0)(S nop) ];; def plisttake = [N S -> plisttake_a nil N S];; 22:59:18 internal:1:221:syntactical:primary expression expected 22:59:41 egelbot: data pcons;; data pnil;; data pforce;; 22:59:41 internal:1:40:syntactical:primary expression expected 22:59:44 egelbot: data pcons;; data pnil;; data pforce 23:00:04 egelbot: def plisttake_a = [P N S -> [1 _ pnil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N <= 0)(S nop) ];; def plisttake = [N S -> plisttake_a nil N S] 23:00:58 egelbot: def pst3 = [F->pcons 8[F->pcons 22[F->pcons 13[F->pnil]]]];; plisttake 7 pst3 23:00:58 {8, 22, 13} 23:01:28 egelbot: (plisttake 0 pst3, plisttake 2 pst3, plisttake 1 pst3, plisttake -1 pst3, plisttake 3 pst3) 23:01:28 ({}, {8, 22}, {8}, {}, {8, 22, 13}) 23:01:31 looks good 23:02:07 egelbot: def plisttake_a = [P N S -> [1 _ pnil->nil| 1 true _->nil| 1 false (pcons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N <= 0)(S pforce) ];; def plisttake = [N S -> plisttake_a nil N S] 23:02:13 egelbot: (plisttake 0 pst3, plisttake 2 pst3, plisttake 1 pst3, plisttake -1 pst3, plisttake 3 pst3, plisttake 7 pst3) 23:02:14 ({}, {8, 22}, {8}, {}, {8, 22, 13}, {8, 22, 13}) 23:05:56 -!- dingwat has joined. 23:08:31 lol at -1+N 23:10:14 egelbot: plistmember = [N H-> [pnil->false| (pcons A D)-> [true->true| false->plistmember N D| _->throw"error plistmember =="] (N==A)| _->throw"error plistmember uncons"] (H pforce)];; plistmember 7 pst3;; plistmember 8 pst3;; plistmember 13 pst3;; plistmember 12 pst3 23:10:15 internal:1:14:syntactical:= unexpected 23:10:27 egelbot: 3==3 23:10:27 System:true 23:10:38 egelbot: def plistmember = [N H-> [pnil->false| (pcons A D)-> [true->true| false->plistmember N D| _->throw"error plistmember =="] (N==A)| _->throw"error plistmember uncons"] (H pforce)];; plistmember 7 pst3;; plistmember 8 pst3;; plistmember 13 pst3;; plistmember 12 pst3 23:10:38 System:false 23:10:38 System:true 23:10:38 System:true 23:10:38 System:false 23:10:42 great 23:13:57 egelbot: (-100)%9 23:13:57 -1 23:14:00 egelbot: (100)%9 23:14:00 1 23:14:04 egelbot: (100)%7 23:14:04 2 23:17:09 def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (H pforce)];; (pprimes_i 15 pst3, pprimes_i 15 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:17:16 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (H pforce)];; (pprimes_i 15 pst3, pprimes_i 15 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:17:16 internal:1:200:semantical:undeclared H 23:17:27 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; (pprimes_i 15 pst3, pprimes_i 15 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:17:27 (System:false, System:false, System:true, System:true, System:true, System:false, System:false, System:false) 23:17:35 nope 23:19:25 oh right, wait 23:19:47 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; (pprimes_i 15 pst3, pprimes_i 15 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:19:47 exception("System:+ bad arguments") 23:20:06 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; (pprimes_i 15 pst3, pprimes_i 15 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:20:06 (System:false, System:false, System:true, System:true, System:true, System:true, System:true, System:true) 23:20:11 still no 23:20:41 egelbot: (pprimes_i 15 pst3, pprimes_i 16 pst3, pprimes_i 8 pst3, pprimes_i 66 pst3, pprimes_i 88 pst3, pprimes_i 13 pst3, pprimes_i 39 pst3, pprimes_i 91 pst3) 23:20:42 (System:false, System:true, System:true, System:true, System:true, System:true, System:true, System:true) 23:20:45 better 23:21:23 egelbot: (pprimes_i 17 pst3, pprimes_i 4 pst3, pprimes_i 67 pst3, pprimes_i 89 pst3, pprimes_i 14 pst3, pprimes_i 38 pst3, pprimes_i 91 pst3) 23:21:23 (System:false, System:false, System:false, System:false, System:false, System:false, System:true) 23:21:34 ok 23:22:03 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->true| _ false->false| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; "ok" 23:22:04 "ok" 23:23:47 -!- Arcorann__ has joined. 23:33:29 egelbot: data pprimes_u;; pprimes_sa = [B L F P->[ [true R->R| false->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F pprimes_u (B*B) (pprimes_sa B L 2 [_->pnil])];; plisttake 149 (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 23:33:29 internal:1:30:syntactical:= unexpected 23:33:54 egelbot: data pprimes_u;; def pprimes_sa = [B L F P->[ [true R->R| false->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F pprimes_u (B*B) (pprimes_sa B L 2 [_->pnil])];; plisttake 149 (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 23:33:54 internal:1:48:syntactical:-> expected 23:34:24 egelbot: data pprimes_u;; def pprimes_sa = [B L F P->[ [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F pprimes_u (B*B) (pprimes_sa B L 2 [_->pnil])];; plisttake 149 (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 23:34:25 internal:1:48:syntactical:-> expected 23:34:35 egelbot: data pprimes_u;; def pprimes_sa = [B L F P->[ [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F internal:1:48:syntactical:-> expected 23:34:43 ah 23:35:07 egelbot: data pprimes_u;; def pprimes_sa = [B L F P->[true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F internal:1:132:syntactical:] unexpected 23:36:11 egelbot: data pprimes_u;; def pprimes_sa = [B L F P->[true [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P](F internal:1:52:syntactical:-> expected 23:36:29 egelbot: data pprimes_u;; def pprimes_sa = [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P ](F "ok" 23:36:47 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa B L 2 [_->pnil])];; plisttake 149 (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 23:36:47 exception("error plisttake") 23:37:15 egelbot: plisttake 3 pst3 23:37:15 {8, 22, 13} 23:37:46 oh right 23:38:00 What is it? 23:38:47 egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))) 23:38:47 internal:1:98:syntactical:) unexpected 23:38:50 egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 23:38:50 exception("error plisttake") 23:39:17 egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_u 2 [_->pnil]) 23:39:17 {} 23:39:24 egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_u 2 [_->pnil])) 23:39:24 {} 23:39:26 wow, someone's having fun. 23:39:32 spruit11: I'm trying to make a prime sieve 23:39:48 there's still a step after this, because I have to automatically figure out how many times to iterate pprimes_s 23:39:56 but first I have to debug this 23:40:08 egelbot: [(pprimes_u B L) -> (B, plisttake 149 L)] (pprimes_s (pprimes_u 2 [_->pnil])) 23:40:08 (4, {}) 23:40:12 that's wrong 23:40:20 egelbot: (pprimes_s (pprimes_u 2 [_->pnil])) 23:40:20 (pprimes_u 4 pprimes_sDOT0) 23:40:39 egelbot: [(pprimes_u B L) -> (L pforce)] (pprimes_s (pprimes_u 2 [_->pnil])) 23:40:39 pnil 23:41:33 egelbot: pprimes_i 2 [_->pnil] 23:41:33 System:false 23:41:36 egelbot: pprimes_i 3 [_->pnil] 23:41:36 System:false 23:42:21 egelbot: pprimes_sa 4 [_->pnil] 2 [_->pnil] 23:42:21 (pprimes_saDOT0 2 (pprimes_saDOT2 4 Dummy47DOT0 2 Dummy47DOT1)) 23:42:31 that's not even the right type 23:43:30 egelbot: "so the definition was";nop;; def pprimes_sa = [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->pprimes_sa B L(1+F)P] |_->P ](Fpnil] 2 [_->pnil] 23:43:30 (pprimes_saDOT0 2 (pprimes_saDOT2 4 Dummy49DOT0 2 Dummy49DOT1)) 23:43:35 let's debug that 23:43:42 although I should probably leave that for tomorrow 23:43:50 it's getting late 23:44:55 egelbot: [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] |_->P ](Fpnil] 2 [_->pnil] 23:44:55 (Dummy50DOT0 2 Dummy50DOT2) 23:45:28 egelbot: [B L F P-> (Fpnil] 2 [_->pnil] 23:45:29 System:true 23:46:10 egelbot: [B L F P-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] ] 4 [_->pnil] 2 [_->pnil] 23:46:11 (Dummy52DOT0 2 Dummy52DOT2) 23:46:45 egelbot: [B L F P-> (pprimes_i F L) ] 4 [_->pnil] 2 [_->pnil] 23:46:45 System:false 23:47:01 oh wait 23:47:09 egelbot: [B L F P-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] ] 4 [_->pnil] 2 [_->pnil] pforce 23:47:09 (pcons 2 Dummy54DOT2) 23:47:14 that is the right result 23:47:25 at least its pcar is 23:47:49 egelbot: [pcons A D -> D pforce] ([B L F P-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] ] 4 [_->pnil] 2 [_->pnil] pforce) 23:47:49 (Dummy55DOT0 (pcons 2 Dummy55DOT3)) 23:47:57 but that's wrong 23:48:31 egelbot: [B L F P-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) "substr" ] 4 [_->pnil] 2 [_->pnil] pforce 23:48:31 (pcons 2 "substr") 23:48:54 egelbot: pprimes_sa 4 [_->pnil] 2 [_->pnil] pforce 23:48:54 (pcons 2 (pprimes_saDOT2 4 Dummy57DOT0 2 Dummy57DOT1)) 23:49:17 egelbot: [pcons A D -> D pforce] (pprimes_sa 4 [_->pnil] 2 [_->pnil] pforce) 23:49:18 (Dummy58DOT0 (pcons 2 (pprimes_saDOT2 4 Dummy58DOT1 2 Dummy58DOT2))) 23:49:22 that's wrong 23:49:43 ah 23:50:43 egelbot: def pprimes_sa = [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) pprimes_sa B L(1+F)P |_->P ](Fpnil] 2 [_->pnil] 23:50:43 (pcons 2 pprimes_sa Dummy59DOT0 3 Dummy59DOT1) 23:51:03 egelbot: def pprimes_sa = [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) pprimes_sa B L(1+F)P |_->P ](Fpnil] 2 [_->pnil]) 23:51:03 exception("error plisttake") 23:51:15 only even if that's right, it's too strict 23:51:29 I mean too eager (non-lazy) 23:51:50 I have no idea what you're doing? 23:52:04 egelbot: def pprimes_sa = [B L F P _-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)P) |_->P ](Fpnil] 2 [_->pnil]) 23:52:04 exception("error plisttake") 23:52:17 egelbot: def pprimes_sa = [B L F P _-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)P) |_->P ](Fpnil] 2 [_->pnil]) 23:52:17 (pprimes_sa 4 Dummy62DOT0 2 Dummy62DOT1) 23:53:34 why is there even a P argument in that? 23:54:27 egelbot: def pprimes_sa = [B L F _-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->[_->nil] ](Fpnil] 2) 23:54:28 (pprimes_sa 4 Dummy63DOT0 2) 23:55:07 spruit11: I'm trying to get the lazylist of primes between F and B half-inclusive, provided that L is a list of primes from 2 to at least the square root of B 23:55:56 here I'm testing with (B,L,F)=(2,[_->nil],4), the first nontrivial case, the result should be {2,3} in lazy list form 23:56:30 egelbot: def pprimes_sa = [B L F _-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->[_->nil] ](Fpnil] 2) 23:56:30 (pprimes_sa 4 Dummy64DOT0 2) 23:56:48 egelbot: (pprimes_sa 4 [_->pnil] 2) pforce 23:56:48 (pcons 2 (pprimes_sa 4 Dummy65DOT0 3)) 23:56:49 Heh. 23:57:15 Is this Okasaki voodoo? 23:59:04 then pprimes_s , which I'll have to modify now, will do the same but automatically pass the correct B, and then I just need to do like six iterations or so of pprimes_s to get the lazy list of all primes 23:59:56 and after that, I just need a function to print a prefix of that list up to a bound you request, and since it's all lazy, it won't actually force the infinite list of primes, only force it up to that bound