←2020-08-29 2020-08-30 2020-08-31→ ↑2020 ↑all
00:00:14 <b_jonas> which inner [] bind by reference
00:00:15 <spruit11> I can always pass the vector -say- to itself as a field?
00:00:24 <b_jonas> yes
00:00:36 <b_jonas> but the vector isn't part of th DAG
00:00:39 <b_jonas> it's separat
00:00:52 <b_jonas> you just have a reference to vector that is a primitive type like a number
00:00:53 <spruit11> Ah. Hmm.
00:01:04 <b_jonas> that's what lisp does
00:01:28 <b_jonas> and python and ruby etc
00:01:47 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77106&oldid=77105 * SoundOfScripting * (+468) /* Language specifications */
00:01:55 <spruit11> All those languages allow cycles. Only early Lisp rewrote DAGs.
00:02:10 <b_jonas> I don't think even early lisps did
00:02:24 <spruit11> Yah, sure. The first one did. I read the report.
00:02:25 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77107&oldid=77106 * SoundOfScripting * (-1)
00:03:28 <b_jonas> 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 <b_jonas> and yes, some toy lisps might not have it, like my toy lisp for example
00:04:13 <spruit11> Nono. The actual first Lisp was reference counted.
00:04:33 <spruit11> By -whatshisname- McArthy. In the report.
00:04:35 <b_jonas> yes
00:04:46 <b_jonas> that doesn't stop this
00:05:21 <b_jonas> you can just end up in uncollectable cycles if your program is not careful
00:05:55 <b_jonas> but you can free a cycle either by breaking it, or using some newer data structure that allows weak referencing
00:06:31 <spruit11> 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 <b_jonas> and it's John McCarthy (1927..2011)
00:06:58 <spruit11> Ah right.
00:07:03 <spruit11> McCarthy.
00:07:37 <b_jonas> if you don't want mutability, you can consider lazy promises that you have to explicitly evaluae too
00:07:53 <b_jonas> that solves a few of the problems, though not most
00:08:18 <b_jonas> but if you want to keep immutability completely, you can also do that
00:08:27 <spruit11> I would like to avoid mutability but it doesn't seem worth it.
00:08:50 -!- adu has joined.
00:09:00 <spruit11> In the sense that, I should give programmers mutable fast containers where they can't use lists.
00:09:11 <spruit11> But that's assuming 'programmers'.
00:09:13 <spruit11> Tall order.
00:09:15 <b_jonas> 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 <spruit11> Yah. But sometimes I flip opinion and hope it could be something like a bash or python.
00:09:50 <b_jonas> sorry, that's conflicting
00:09:58 <spruit11> And then I think: nah.
00:10:02 <b_jonas> I think it's worth *to adds mutable structures* in a non-toy language, but this is a toy language
00:10:12 <spruit11> And then I flip opinion again.
00:10:24 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77108&oldid=77107 * SoundOfScripting * (+341) /* Language specifications */ More instructions :)
00:11:44 <b_jonas> 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 <b_jonas> it's a bit messy because of the prolog side, but possible
00:12:26 <spruit11> Today I wanted to compare my abysmal performance to Python.
00:12:43 <b_jonas> my toy lisp does have mutability
00:12:48 <spruit11> Which gave an out of stack after going 900 deep into recursion.
00:13:01 <b_jonas> heh
00:13:03 <spruit11> So then I thought: maybe there's a use case after all.
00:13:14 <spruit11> And now I think: nah.
00:13:37 <spruit11> ¯\_(ツ)_/¯
00:13:48 <Heavpoot> what if esolang where computations have to be done with constantly changing operator precedence, and said operators modify precedence?
00:27:44 <spruit11> 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 <spruit11> But if you're managing memory already you might as well make sure that your vector doesn't contain cycles.
00:29:11 <spruit11> Ah well. Gonna hack on the double semicolon, I think.
00:29:55 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77109&oldid=77108 * SoundOfScripting * (+78)
00:30:07 <esowiki> [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77110&oldid=77109 * IFcoltransG * (+9) /* Language specifications */ Commented out unnecessary section
00:32:21 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77111&oldid=77110 * SoundOfScripting * (+3)
00:33:22 <b_jonas> 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 <b_jonas> to be clear, all that mutability stuff is less important than what I mentioned earlier
00:34:11 <spruit11> 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 <b_jonas> hmm, that would be much more inconvenient
00:34:52 <b_jonas> I was thinking it would at least be refcounted
00:35:12 <spruit11> Yah. Doesn't seem worth it.
00:35:31 <spruit11> Oh.
00:35:35 <spruit11> Wait.
00:35:56 <spruit11> I could free it if the reference is destroyed?
00:36:02 <spruit11> What voodoo is this?
00:36:12 <b_jonas> that is the voodoo of recounting
00:36:36 <b_jonas> I mean don't you already have something like that for the DAG nodes?
00:37:23 <spruit11> Uh. I abuse C++'s native refcounting.
00:38:36 <b_jonas> 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 <spruit11> Yah.
00:38:49 <b_jonas> why is that an abuse?
00:39:01 <b_jonas> you can use that for the vectors too
00:39:35 <spruit11> Uh, yes and no.
00:40:05 <spruit11> I need a form of indirection over a vector pool. But that's all yes.
00:40:40 <b_jonas> 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 <b_jonas> um... vector pool?
00:41:48 <b_jonas> what why?
00:42:04 <spruit11> 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 <b_jonas> 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 <b_jonas> it doesn't matter if you allocate them from a pool or not
00:43:23 <spruit11> Damn.
00:43:35 <spruit11> Right.
00:43:49 <spruit11> No vector pool than but unsafeness.
00:44:00 <b_jonas> why? what's unsafe in this?
00:44:02 <spruit11> Thanks for that. For a moment I thought I found a way out.
00:44:28 <b_jonas> 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 <spruit11> The unsafe part is that I would allow the programmer to form cycles in what should be a DAG.
00:44:52 <spruit11> Right. We agree.
00:46:04 <b_jonas> 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 <b_jonas> print repeated vectors
00:46:25 <b_jonas> so I don't see why the cycles are a problem
00:47:09 <b_jonas> 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 <spruit11> I think I fully agree with you.
00:47:41 <spruit11> Nono. If I would be doing a PhD I would already been kicked out for not having a type system.
00:49:09 <esowiki> [[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 <b_jonas> 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 <b_jonas> 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 <b_jonas> but you would need a lot of other changes too if you wanted that
00:50:53 <spruit11> Life is never easy.
00:51:34 <spruit11> I already regret compiling to bytecode. And I also regret having a global pool for recursive structures.
00:51:53 <spruit11> Life would be so much nicer without those two.
00:52:10 <b_jonas> spruit11: ah yes, that's when you make an incompatible egel2
00:52:25 <b_jonas> where you keep the ideas you like and redesigne and rewrite everything
00:53:36 <esowiki> [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77113&oldid=77112 * IFcoltransG * (+291) Clarified Tokigun's half cell movements
00:53:44 <spruit11> Hmyah. I'll end up with a toy of a toy.
00:53:49 <spruit11> A noble cause!
00:54:27 <spruit11> Anyway, you got me fired up. I am hacking on the double semicolon now.
00:54:37 <b_jonas> nice
00:59:46 <fizzie> Isn't a double semicolon just one whole colon?
01:00:37 <b_jonas> fizzie: no, because English sucks
01:00:48 <b_jonas> but good point
01:02:11 <b_jonas> 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 <esowiki> [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77114&oldid=77113 * IFcoltransG * (+273) /* Language specifications */ Added equality check command
01:19:02 <zzo38> 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 <spruit11> egelbot: using System;; 1+1;; 2+2
01:24:14 <egelbot> 2
01:24:14 <egelbot> 4
01:30:22 <spruit11> egelbot: using String;; strlen "hello"
01:30:22 <egelbot> 5
01:31:06 <spruit11> Well, that takes care of that.
01:32:52 -!- adu has quit (Quit: adu).
01:38:44 <spruit11> egelbot: getenv "EGEL_PS0"
01:39:21 <spruit11> egelbot: getenv "PATH"
01:39:21 <egelbot> "/home/marco/.local/bin:/home/marco/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin"
01:39:51 <spruit11> Weird path.
01:39:58 <spruit11> Ah well.
01:44:52 <b_jonas> spruit11: nice, that was quick
01:45:16 <spruit11> Yah, it was painless.
01:47:42 <b_jonas> egelbot: 3+3
01:47:42 <egelbot> 6
01:47:54 <b_jonas> egelbot: getenv "HOME"
01:47:54 <egelbot> "/home/marco"
01:48:00 <b_jonas> egelbot: getenv "DISPLAY"
01:48:00 <egelbot> ":0"
01:48:09 <spruit11> Hey!
01:48:09 <b_jonas> egelbot: getenv "LANG"
01:48:09 <egelbot> "en_US.UTF-8"
01:48:18 <b_jonas> egelbot: getenv "LC_ALL"
01:48:45 <b_jonas> egelbot: {getenv "USER", getenv "TERM", getenv "LC_ALL"}
01:48:45 <egelbot> (System:cons "marco" (System:cons "xterm-256color" (System:cons System:nop System:nil)))
01:49:36 <b_jonas> egelbot: (getenv "_",)
01:49:36 <egelbot> internal:1:14:syntactical:primary expression expected
01:49:43 <b_jonas> egelbot: tuple (getenv "_")
01:49:43 <egelbot> (System:tuple "./egel-bot")
01:50:43 <spruit11> egelbot: using Math;; sin 1.0
01:50:43 <egelbot> 0.8414709848078965
01:51:55 <b_jonas> egelbot: data foo;; let bar = [X -> 2];; foo;; bar foo
01:51:55 <egelbot> internal:1:31:syntactical:in expected
01:52:02 <spruit11> def
01:52:10 <b_jonas> egelbot: data foo;; var bar = [X -> 2];; foo;; bar foo
01:52:10 <egelbot> internal:1:21:syntactical:= unexpected
01:52:16 <b_jonas> egelbot: data foo;; def bar = [X -> 2];; foo;; bar foo
01:52:17 <egelbot> foo
01:52:17 <egelbot> 2
01:52:37 <b_jonas> egelbot: data foo;; def bar = [X -> 2];; bar foo;; quux
01:52:37 <egelbot> 2
01:52:37 <egelbot> internal:1:44:semantical:undeclared quux
01:52:52 <b_jonas> egelbot: data foo;; def bar = [X -> 2];; quux;; bar
01:52:52 <egelbot> internal:1:34:semantical:undeclared quux
01:53:01 <b_jonas> egelbot: bar
01:53:01 <egelbot> bar
01:53:04 <b_jonas> egelbot: bar foo
01:53:04 <egelbot> 2
01:53:13 <b_jonas> right
01:53:49 <spruit11> egelbot: val id = [ X -> X ];; val one = 1;; id one
01:53:49 <egelbot> 1
01:54:00 <spruit11> Okay, that works too.
01:54:28 <b_jonas> egelbot: data foo;; def foo0 = foo;; data foo;; def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo)
01:54:28 <egelbot> (System:tuple foo foo System:true System:true)
01:54:36 <b_jonas> hmm
01:54:44 <b_jonas> egelbot: data foo;; def foo0 = foo;;
01:54:44 <egelbot> internal:1:30:syntactical:primary expression expected
01:54:49 <b_jonas> egelbot: data foo;; def foo0 = foo;; 1
01:54:49 <egelbot> 1
01:55:04 <b_jonas> egelbot: data foo;; 2
01:55:04 <egelbot> 2
01:55:10 <b_jonas> egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo)
01:55:11 <egelbot> (System:tuple foo foo System:true System:true)
01:55:14 <b_jonas> still true
01:55:26 <b_jonas> egelbot: def foo = 5; data foo;; 2
01:55:26 <egelbot> internal:1:15:syntactical:primary expression expected
01:55:31 <b_jonas> egelbot: def foo = 5;; data foo;; 2
01:55:31 <egelbot> 2
01:55:34 <b_jonas> egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo)
01:55:34 <egelbot> (System:tuple foo foo System:true System:true)
01:55:38 <b_jonas> egelbot: def foo = 5;;
01:55:38 <egelbot> internal:1:16:syntactical:primary expression expected
01:55:42 <b_jonas> egelbot: def foo = 5;; foo
01:55:42 <egelbot> 5
01:55:45 <b_jonas> egelbot: def isfoo = [foo -> true | _ -> false];; (foo0, foo, isfoo foo0, isfoo foo)
01:55:45 <egelbot> (System:tuple 5 5 System:false System:false)
01:55:48 <b_jonas> what
01:56:12 <spruit11> foo = 5
01:56:18 <b_jonas> yes
01:56:38 <spruit11> So isfoo reduces to false.
01:56:40 <b_jonas> 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 <spruit11> No.
01:57:11 <b_jonas> oh well
01:57:16 <spruit11> One global table for definitions you can interactively modify.
01:57:30 <b_jonas> and anything lowercase refers to that?
01:57:31 <b_jonas> ok
01:57:45 <b_jonas> I mean they're resolved late, even when they're already in a definition?
01:57:53 <b_jonas> egelbot: def isfoo = [foo -> true | _ -> false];;
01:57:53 <egelbot> internal:1:43:syntactical:primary expression expected
01:57:56 <spruit11> Yah.
01:58:00 <b_jonas> egelbot: data foo
01:58:07 <b_jonas> egelbot: def isfoo = [foo -> true | _ -> false]
01:58:11 <b_jonas> egelbot: isfoo
01:58:11 <egelbot> isfoo
01:58:16 <b_jonas> egelbot: def Isfoo = [foo -> true | _ -> false]
01:58:16 <egelbot> internal:1:2:syntactical:combinator or operator expected
01:58:30 <b_jonas> egelbot: data foo
01:58:34 <b_jonas> egelbot: isfoo foo
01:58:34 <egelbot> System:true
01:58:54 <b_jonas> so isfoo has a definition that refers to foo by name and dynamically resolves it
01:58:57 <b_jonas> ok
01:59:09 <spruit11> Combinators lowercase, variables uppercase. It was the only thing which I thought made sense in an untyped environment.
01:59:47 <b_jonas> yeah, it's like prolog I guess
01:59:56 <spruit11> The problem is [ x -> x ], I need/want to know whether x is a variable of combinator.
02:00:05 <b_jonas> except for, you know, the implicit unevaluated function thing
02:00:16 <spruit11> Yah, Prolog chose the solution.
02:00:46 <spruit11> Well, Prolog is another operational model. This is just a broken down FP.
02:01:09 <b_jonas> this is not the syntax I like too much, but it works and is consistent
02:01:09 <spruit11> *the same solution.
02:02:00 <spruit11> 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 <b_jonas> 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 <spruit11> Making the distinction up front means you can visually see the difference, and simplifies the interpreter (which otherwise would need heuristics).
02:04:09 <b_jonas> 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 <spruit11> No. But Egel is untyped. You can have a variable in the head.
02:04:44 <spruit11> egelbot: [ (X Y Z) -> Z Y X ] {1}
02:04:44 <egelbot> (System:nil 1 System:cons)
02:05:24 <spruit11> And for orthogonality I want to keep that.
02:05:37 <b_jonas> 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 <b_jonas> spruit11: yeah, egel does that unevaluated thing, so this wouldn't work
02:07:13 <spruit11> 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 <spruit11> (lambda calculus)
02:07:34 <esowiki> [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77115&oldid=76891 * Hakerh400 * (+24)
02:08:43 <esowiki> [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77116&oldid=77115 * Hakerh400 * (-20)
02:09:44 <spruit11> 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 <b_jonas> spruit11: no, only if you allow unevaluted applications
02:10:45 <spruit11> I don't see that?
02:10:48 <b_jonas> normally `1 2` would try to call the function `1` which is an error because it's not a function
02:11:11 <b_jonas> but in spruit you allow any application and they just default to unevaluated
02:11:16 <spruit11> It's normally allowed by the grammar...
02:11:25 <b_jonas> it's not the grammar
02:11:45 <b_jonas> 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 <spruit11> T := V | C | T T | \V. T
02:12:05 <b_jonas> 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 <b_jonas> like haskell
02:12:22 <spruit11> Okay. Then I just difer on what I consider an untyped LC+constants.
02:12:28 <b_jonas> yeah
02:12:29 <spruit11> *differ
02:17:35 <esowiki> [[Special:Log/newusers]] create * R123124 * New user account
02:17:44 -!- Heavpoot has quit (Remote host closed the connection).
02:21:06 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=77117&oldid=76916 * R123124 * (+108) /* Introductions */
03:32:30 <esowiki> [[Special:Log/upload]] upload * RocketRace * uploaded "[[File:Linear transformation latex.gif]]"
03:34:18 <esowiki> [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77119&oldid=77114 * RocketRace * (+321) \
03:36:39 -!- adu has joined.
03:37:01 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77120&oldid=77119 * RocketRace * (+26) /* Language specifications */
03:51:46 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77121&oldid=77120 * RocketRace * (+222)
03:52:37 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77122&oldid=77121 * RocketRace * (+12) /* Language specifications */
03:57:33 <esowiki> [[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 <esowiki> [[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 <esowiki> [[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 <esowiki> [[,,,]] 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 <Matthias29> hey
04:56:37 <Matthias29> I'm writing the first implementations of .5d5dbfwmttwmtt and then compiling using .5dbfwmtt
05:01:57 <imode> 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 <esowiki> [[,,,]] 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 <esowiki> [[,,,]] M https://esolangs.org/w/index.php?diff=77128&oldid=77127 * SunnyMoon * (-1) Oh, the one is not needed.
08:20:22 <esowiki> [[,,,]] 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 <b_jonas> egelbot: 1;; raise "oops";; 2
11:30:21 <egelbot> 1
11:30:21 <egelbot> internal:1:6:semantical:undeclared raise
11:30:38 <b_jonas> egelbot: def raisepls = raise "oops"
11:30:38 <egelbot> internal:1:17:semantical:undeclared raise
11:30:48 <b_jonas> egelbot: def raisepls = (raise "oops")
11:30:48 <egelbot> internal:1:18:semantical:undeclared raise
11:30:56 <b_jonas> egelbot: def raisepls = (0; raise "oops"; 0)
11:30:56 <egelbot> internal:1:21:semantical:undeclared raise
11:30:59 <b_jonas> hmm
11:31:15 <b_jonas> egelbot: (print 3; raise "oops"; print 4)
11:31:15 <egelbot> internal:1:3:semantical:undeclared print
11:53:54 <spruit11> throw
11:54:12 <spruit11> egelbot: (print 3; throw "oops"; print 4)
11:54:13 <egelbot> internal:1:3:semantical:undeclared print
11:54:28 <spruit11> egelbot: (say 3; throw "oops"; say 4)
11:54:28 <egelbot> 3
11:54:29 <egelbot> 4
11:54:29 <egelbot> exception(System:nop)
11:54:36 <b_jonas> egelbot: Io.print "hello, world"
11:54:36 <egelbot> internal:1:2:semantical:undeclared Io
11:54:55 <spruit11> IO prints to stdout and isn't included in the bot.
11:55:16 <spruit11> The bot uses say. I guess I could change that?
11:55:32 <b_jonas> ah
11:55:37 <b_jonas> egelbot: say "hello, world"
11:55:38 <egelbot> hello, world
11:55:48 <b_jonas> wasn't there a declaration to load any module though?
11:56:17 <spruit11> Yah. If you know the path on my system you can make the bot print to my stdout.
11:56:26 <b_jonas> egelbot: (say "hello, world"; raise "oops"; say "hello, world")
11:56:26 <egelbot> internal:1:23:semantical:undeclared raise
11:56:38 <spruit11> import "path_local/io.ego"
11:56:51 <b_jonas> egelbot: (env "PWD", env "_") /* those paths? it might be able to guess. */
11:56:51 <egelbot> internal:1:37:syntactical:? unexpected
11:57:01 <b_jonas> egelbot: (getenv "PWD", getenv "_") /* those paths? it might be able to guess. */
11:57:01 <egelbot> internal:1:43:syntactical:? unexpected
11:57:04 <b_jonas> hmm
11:57:11 <spruit11> Use # for comments
11:57:33 <spruit11> I had C style syntax but I changed. Made it all much better.
11:57:52 <b_jonas> egelbot: (getenv "PWD", getenv "HOME", getenv "_")
11:57:52 <egelbot> (System:tuple "/home/marco/Programming/egel-bot/src" "/home/marco" "./egel-bot")
11:57:54 <spruit11> Also #!/usr/bin/env egel now works for scripting.
11:57:57 <b_jonas> right, so those
11:58:02 <b_jonas> yay!
11:58:15 <b_jonas> does that include mixing declarations and expressions?
11:58:38 <b_jonas> egelbot: [_ -> say "hello, world"; raise "oops"; say "hello, world"] 0
11:58:38 <egelbot> internal:1:28:semantical:undeclared raise
11:58:42 <b_jonas> what... still?
11:58:45 <spruit11> throw
11:58:49 <b_jonas> oh
11:58:50 <spruit11> egelbot: throw 1
11:58:50 <egelbot> exception(1)
11:59:02 <b_jonas> egelbot: 3; throw 4; 5
11:59:02 <egelbot> exception(5)
11:59:11 <b_jonas> egelbot: (13; throw 14; 15)
11:59:11 <egelbot> exception(15)
11:59:12 <spruit11> Oops.
11:59:22 <spruit11> You found a bug!
11:59:26 <b_jonas> egelbot: 3;; throw 4;; 5
11:59:26 <egelbot> 3
11:59:26 <egelbot> exception(4)
11:59:26 <egelbot> 5
11:59:32 <b_jonas> that's not a bug, it's just creative precedence
11:59:50 <b_jonas> it interprets that as throw(4;5)
11:59:58 <b_jonas> egelbot: 3; (throw 4); 5
11:59:58 <egelbot> exception(4)
12:00:04 <spruit11> Oh. Right. Phew.
12:00:11 <b_jonas> egelbot: ((say 3); (throw 4); (say 5))
12:00:11 <egelbot> 3
12:00:12 <egelbot> exception(4)
12:00:16 <b_jonas> see
12:00:29 <spruit11> So I guess I should take a look at the syntax.
12:00:31 <b_jonas> egelbot: def raisepls: throw "oops"
12:00:31 <egelbot> internal:1:14:syntactical:= expected
12:00:48 <b_jonas> egel had strange precedence already when I last looked
12:00:49 <b_jonas> IIRC
12:00:56 <spruit11> Moving say to print makes sense. There's no reason it should be say in the bot.
12:01:17 <b_jonas> spruit11: you may want both print and println though
12:01:21 <b_jonas> for convenience
12:01:32 <spruit11> Yah, the operator table doesn't allow for equal precedencies.
12:01:41 <spruit11> But that's for way later.
12:02:03 <spruit11> For now, I'll change say to print and do your pretty printing hack.
12:02:04 <b_jonas> egelbot: def raisepls = (throw "oops")
12:02:20 <b_jonas> egelbot: ((say 3); raisepls; (say 5))
12:02:20 <egelbot> 3
12:02:21 <egelbot> exception("oops")
12:02:41 <b_jonas> egelbot: let Raisepls = (throw "Oops") in ((say 3); Raisepls; (say 5))
12:02:41 <egelbot> exception("Oops")
12:03:02 <b_jonas> egelbot: def saypls = "please"
12:03:09 <spruit11> egelbot: def raise = [ X -> throw X ]
12:03:15 <spruit11> egelbot: raise 6
12:03:15 <egelbot> exception(6)
12:03:31 <b_jonas> egelbot: (say 3; 4) + (saypls; 5)
12:03:31 <egelbot> 3
12:03:31 <egelbot> 9
12:03:41 <b_jonas> egelbot: def saypls = say "please"
12:03:45 <b_jonas> egelbot: (say 3; 4) + (saypls; 6)
12:03:45 <egelbot> please
12:03:46 <egelbot> 3
12:03:46 <egelbot> 10
12:03:50 <b_jonas> hmm
12:03:54 <b_jonas> creative evaluation order too
12:04:11 <spruit11> I know raise is popular in academia but I rather stick to the now more popular throw.
12:04:22 <spruit11> Yah, it's left to right.
12:04:24 <b_jonas> throw is fine, I just programmed too much python
12:04:31 <spruit11> Uh, right to left.
12:05:28 <spruit11> It's a bit weird but also more orthogonal I feel. `f x y` goes from right to left.
12:06:07 <b_jonas> anyway, this means you can put just one word instead of two in the [ ... | _ _ -> raisebadargs] trailer in function definitions
12:06:53 <b_jonas> 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 <b_jonas> egelbot: (say 3; say 4)
12:07:10 <egelbot> 3
12:07:11 <egelbot> 4
12:07:23 <spruit11> 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 <spruit11> There has to be some weirdity!
12:08:00 <b_jonas> 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 <b_jonas> (it's not really a minute, but something on that order of magnitude, don't depend on the exact timeout value)
12:09:14 <spruit11> Great. I'll hack on pretty printing today, I think.
12:09:40 <spruit11> Does the build script work for you?
12:10:59 <spruit11> And install script?
12:11:18 <spruit11> 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 <b_jonas> 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 <b_jonas> 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 <spruit11> egelbot: print 5
12:16:39 <egelbot> 5
12:16:43 <spruit11> egelbot: agitprop
12:16:43 <egelbot> visit https://egel-lang.github.io/
12:17:18 <b_jonas> HackEso has somewhat unusual filesystem hierarchy for legacy reasons, so I needed custom paths anyway
12:18:34 <spruit11> It would be nicer if people could get just a local install by running `install local`, right?
12:18:53 <b_jonas> admittedly those legacy reasons include my changes...
12:19:21 <b_jonas> 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 <b_jonas> make that eight
12:19:40 <spruit11> I suck?
12:19:45 -!- hendursaga has joined.
12:19:46 <spruit11> What did I do now?
12:20:19 <spruit11> I'll check that. At least running build should do what it's supposed to do.
12:20:44 <spruit11> egelbot: quine0
12:20:44 <egelbot> 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 <b_jonas> 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 <b_jonas> 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 <b_jonas> and the Makefile just worked
12:21:58 <spruit11> What if I dump everything in '~/egel/'?
12:22:08 <b_jonas> spruit11: that's what you have the prefix for
12:22:19 <spruit11> Hmm. That seems a bad idea.
12:22:21 <b_jonas> you can set the prefix to ~/egel/ if you want to, but for HackEso we want a different path
12:22:29 <spruit11> Ah. Okay.
12:22:32 <b_jonas> because ~/egel/ is not a useful location to install to
12:22:50 <b_jonas> nor would I want to install egel to ~/egel/ on my machine, because I control the filesystem hierarchy under my ~
12:23:08 <spruit11> Okay, not going to change that.
12:23:11 <b_jonas> (and the distribution defaults together with me control the filesystem hierarchy everywhere in general)
12:23:25 <fizzie> `` echo $HOME # actually, what's ~?
12:23:26 <HackEso> ​/tmp
12:23:28 <b_jonas> and of course all this is for non-windows
12:23:45 <spruit11> Maybe I'll once add `install.sh local path-to-install-dir`.
12:23:54 <spruit11> But first the pretty printing.
12:23:55 <b_jonas> spruit11: the wiki explains some of the filesystem hierarchy of HackEso
12:24:21 <spruit11> Yah. But you're to particular for me to adapt the build script to.
12:24:27 <spruit11> *too
12:24:39 <b_jonas> you don't have to adapt them, I can just set the paths and write the wrapper
12:24:51 <b_jonas> I mean, you don't have to do anything really, I could have done all that I was just lazy
12:24:57 <spruit11> Right. I'll think about that.
12:25:09 <spruit11> Pretty printing is higher on the list now.
12:25:10 <b_jonas> but it's easier if you add make variables
12:25:13 <b_jonas> for all the paths
12:25:22 <b_jonas> because then people don't need to edit the makefile, just set make variables
12:25:51 <spruit11> Uh. I have two scripts. One builds, one installs.
12:26:08 <spruit11> The build script should run?
12:26:17 <b_jonas> run what?
12:26:19 <spruit11> The rest is just copying over?
12:26:30 <spruit11> Run a build of the system..
12:27:08 <spruit11> It sounded to me like you wanted the build script to install.
12:27:14 <b_jonas> no
12:27:48 <spruit11> I'll read it again.
12:27:52 <b_jonas> 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 <b_jonas> but if you have separate scripts, rather than the makefile, well then those should have some ways to set the paths
12:28:43 <spruit11> Ah. Right.
12:29:35 <spruit11> I just use bash for install/build because the internet meme is that recursive make is bad.
12:29:46 <spruit11> Better on the safe side.
12:30:12 <spruit11> But I'll guess it needs the variables anyway.
12:30:21 -!- clog has joined.
12:32:16 <spruit11> No. Won't change it. It's too fragile to play with given my limited understanding of make.
12:32:28 <spruit11> I guess pretty printing then
12:34:57 <esowiki> [[Talk:Modulous]] M https://esolangs.org/w/index.php?diff=77130&oldid=77038 * Abyxlrz * (-763)
12:35:15 <esowiki> [[Talk:Modulous]] M https://esolangs.org/w/index.php?diff=77131&oldid=77130 * Abyxlrz * (-193)
12:39:44 <esowiki> [[User:Abyxlrz]] https://esolangs.org/w/index.php?diff=77132&oldid=76934 * Abyxlrz * (+216)
12:40:05 <esowiki> [[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 <int-e> fungot: would you rather be part of a clique or of an independent set?
13:36:52 <fungot> 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 <fizzie> fungot: Are you golfing some code again?
13:39:25 <fungot> 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 <esowiki> [[User:SunnyMoon]] https://esolangs.org/w/index.php?diff=77134&oldid=77063 * SunnyMoon * (+12) Well, I am speaking the truth...
13:49:23 <esowiki> [[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 <b_jonas> egelbot: def p X Y = (100*X)+Y
13:53:13 <egelbot> internal:1:8:syntactical:= expected
13:53:24 <b_jonas> egelbot: def (p X Y) = (100*X)+Y
13:53:24 <egelbot> internal:1:2:syntactical:combinator or operator expected
14:00:41 <b_jonas> 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 <b_jonas> egelbot: nth sn8 5
14:00:53 <egelbot> internal:1:2:semantical:undeclared nth
14:01:02 <b_jonas> egelbot: aref sn8 5
14:01:02 <egelbot> internal:1:2:semantical:undeclared aref
14:02:08 <b_jonas> egelbot: List.nth sn8 5
14:02:08 <egelbot> internal:1:2:semantical:undeclared List
14:03:27 <b_jonas> egelbot: "from prelude";; def nth = [ 0 (cons X XX) -> X | N (cons X XX) -> nth (N - 1) XX ]
14:03:27 <egelbot> "from prelude"
14:03:36 <b_jonas> egelbot: nth sn8 5
14:03:36 <egelbot> (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 <b_jonas> egelbot: nth 5 sn8
14:03:42 <egelbot> 0.2826000000000000
14:05:25 <b_jonas> egelbot: sn8
14:05:25 <egelbot> (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 <int-e> `? spam
14:06:06 <HackEso> Spam is a delicious meat product. See http://www.spamjamhawaii.com/
14:06:48 <b_jonas> 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 <int-e> `hwrl spam
14:06:52 <b_jonas> oh well
14:06:53 <HackEso> https://hack.esolangs.org/repo/log/tip/wisdom/spam
14:07:52 <int-e> Hmm. Did I forget about the link in that wisdom... or did I genuinely never see it before...
14:11:21 <b_jonas> fungot, how many hours are there in 4 simultaneous 4 corner 96-hour Cubic™ Days in only 24 ohur rotation?
14:11:21 <fungot> b_jonas: just cobbled together. :d) there just would be one big macro?! would be rather pointless. ( or not)
14:12:47 <b_jonas> one big pointless macro day? ok
14:50:12 -!- t20kdc has joined.
14:58:17 <esowiki> [[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 <spruit11> Well, that sucked. But I think I have pretty printing.
15:24:37 <APic>
15:24:40 <spruit11> egelbot: cons 1 nil
15:25:41 -!- egelbot has joined.
15:25:43 <spruit11> egelbot: cons 1 nil
15:25:44 <egelbot> {1}
15:25:56 <spruit11> egelbot: {1,2,3,4,5}
15:25:56 <egelbot> {1, 2, 3, 4, 5}
15:26:05 <spruit11> egelbot: (1,2,3,4,5)
15:26:06 <egelbot> (1, 2, 3, 4, 5)
15:26:35 <spruit11> Well. 'pretty'
15:26:48 <spruit11> egelbot: cons cons
15:26:48 <egelbot> {...}
15:27:11 <spruit11> egelbot: cons 1 cons
15:27:11 <egelbot> {1...}
15:28:07 <spruit11> It just cuts with '...' when it can't make sense of the term anymore.
15:28:31 <spruit11> egelbot: tuple 1 2 3
15:28:31 <egelbot> (1, 2, 3)
15:28:48 <spruit11> egelbot: tuple
15:28:49 <egelbot> System:tuple
15:29:24 <spruit11> By popular request!
15:29:33 <spruit11> 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 <b_jonas> oh nice! pretty printing
17:19:03 <b_jonas> egelbot: cons 1 2
17:19:03 <egelbot> {1...}
17:19:10 <b_jonas> no dotted list syntax?
17:19:14 <b_jonas> egelbot: (1,2)
17:19:14 <egelbot> (1, 2)
17:19:21 <b_jonas> egelbot: tuple 8 3 2
17:19:21 <egelbot> (8, 3, 2)
17:19:22 <b_jonas> egelbot: tuple 8 3
17:19:22 <egelbot> (8, 3)
17:19:24 <b_jonas> egelbot: tuple 8
17:19:24 <egelbot> (8)
17:19:25 <b_jonas> egelbot: tuple
17:19:25 <egelbot> System:tuple
17:19:27 <b_jonas> um
17:19:36 <b_jonas> spruit11: one of those is wrong
17:19:44 <b_jonas> egelbot: tuple 8
17:19:45 <egelbot> (8)
17:19:46 <b_jonas> ^
17:19:49 <b_jonas> egelbot: (8)
17:19:49 <egelbot> 8
17:19:51 <b_jonas> egelbot: (8,)
17:19:51 <egelbot> internal:1:5:syntactical:primary expression expected
17:20:00 <spruit11> Ah, right. Good catch.
17:20:20 <spruit11> I want to avoid the ,) syntax.
17:20:29 <spruit11> Is there a good reason to want it?
17:21:02 <b_jonas> spruit11: no, but print it as (System:tuple 8) then
17:21:09 <spruit11> Yah, I will.
17:21:20 <b_jonas> egelbot: cons (cons 9 8) (cons 7 6)
17:21:20 <egelbot> {{9...}, 7...}
17:21:35 <spruit11> Is this what you had in mind?
17:21:41 <b_jonas> egelbot: {{9,8}, {7,6}}
17:21:41 <egelbot> {{9, 8}, {7, 6}}
17:21:49 <b_jonas> no, because you can't see the tail
17:21:57 <b_jonas> of a dotted list
17:23:20 <spruit11> The dots are just there to show something went wrong. But I can it's confusing.
17:24:11 <spruit11> *can see
17:27:03 <b_jonas> look
17:28:01 <b_jonas> ``` 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 <HackEso> ​[9,8,7]
17:28:49 <b_jonas> ``` 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 <HackEso> ​[9,8,7|gotcha]
17:29:46 <b_jonas> ``` 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 <HackEso> ​[9,8,7,6,5,4]
17:29:47 <spruit11> Heh.
17:30:12 <b_jonas> lisps do the same, but instead of a | delimiter, they use a dot, that's why they're called dotted list
17:30:16 <spruit11> You make my life difficult.
17:30:31 <b_jonas> lisps are older, so they get to name it
17:30:50 <b_jonas> egelbot: {2,3}+4
17:30:50 <egelbot> exception("System:+ bad arguments")
17:30:58 <spruit11> Well. I value your input!
17:31:01 <b_jonas> egelbot: data foo;; foo {2,3} 4
17:31:01 <egelbot> (foo {2, 3} 4)
17:31:09 <b_jonas> egelbot: data foo;; foo 4 {2,3 2}
17:31:09 <egelbot> (foo 4 {2, (3 2)})
17:31:15 <b_jonas> egelbot: data foo;; foo 4 (2,3 2)
17:31:15 <egelbot> (foo 4 (2, (3 2)))
17:31:31 <b_jonas> egelbot: data foo;; (2,(foo 3 2))
17:31:31 <egelbot> (2, (foo 3 2))
17:31:36 <b_jonas> egelbot: data foo;; {2,foo 3 2}
17:31:36 <egelbot> {2, (foo 3 2)}
17:32:26 <b_jonas> egelbot: def + = [];; {2,3+8}
17:32:26 <egelbot> internal:1:11:syntactical:-> expected
17:33:09 <spruit11> Nice try. But you can't rewrite to nothing.
17:33:33 <b_jonas> egelbot: data +;; {2,3+8}
17:33:33 <egelbot> internal:1:7:syntactical:lowercase expected
17:34:02 <spruit11> Ah. You punish me for every design decision.
17:34:17 <spruit11> You want data to be able to be operators too?
17:34:26 <b_jonas> sorry, that's not what want, and no
17:34:34 <spruit11> Ah. Okay
17:34:34 <b_jonas> I type these also to see how they fail
17:34:39 <spruit11> Right.
17:34:51 <b_jonas> try to break the code with unexpected cases
17:34:59 <b_jonas> that's how we do testin
17:35:13 <spruit11> Yah, the REPL is good for that.
17:35:58 <spruit11> 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 <b_jonas> I recommend {9,7|7}
17:39:06 <b_jonas> sice egel already uses | as a delimiter
17:40:01 <b_jonas> egelbot: (cons 1 nil, cons 1 nil 2)
17:40:01 <egelbot> ({1}, {...})
17:40:11 <b_jonas> egelbot: (cons 1, cons)
17:40:11 <egelbot> ({...}, System:cons)
17:42:36 <esowiki> [[Casini]] M https://esolangs.org/w/index.php?diff=77137&oldid=76437 * Abbin21 * (+24)
17:42:50 <esowiki> [[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 <spruit11> egelbot: cons 1 1
18:01:51 <egelbot> {1...}
18:01:54 <spruit11> f
18:02:53 -!- egelbot has quit (Remote host closed the connection).
18:03:14 -!- egelbot has joined.
18:03:22 <spruit11> egelbot: cons 1 1
18:03:22 <egelbot> {1|1}
18:03:32 <spruit11> Needed to recompile the bot.
18:04:01 <spruit11> 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 <spruit11> egelbot: cons 1 (cons 2)
18:12:24 <egelbot> {1, |(System:cons 2)}
18:12:39 <spruit11> 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 <spruit11> Heh. I need some kind of predicate to make it work nicely. Now it seems hacked.
18:23:58 <spruit11> Gawd.
18:24:23 <spruit11> I guess I should make it nice.
18:40:12 -!- egelbot has quit (Remote host closed the connection).
18:41:48 <b_jonas> egelbot: cons 9 (cons 8 (cons 7 (cons 6 (cons 5 (cons 4 (cons 3 nil))))))
18:41:52 <b_jonas> ah
18:45:41 -!- TheLie has joined.
18:52:34 -!- adu has joined.
18:52:37 <spruit11> 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 <esowiki> [[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 <spruit11> I failed to make it nice. It will need some more thought.
19:19:52 <spruit11> egelbot: cons
19:19:53 <egelbot> System:cons
19:19:55 <spruit11> egelbot: cons 1
19:19:55 <egelbot> (System:cons 1)
19:19:58 <spruit11> egelbot: cons 1 nil
19:19:58 <egelbot> {1}
19:20:08 <esowiki> [[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 <spruit11> egelbot: cons 1 cons
19:20:09 <egelbot> {|(System:cons 1 System:cons)}
19:20:20 <b_jonas> egelbot: cons 9 8 7
19:20:20 <egelbot> (System:cons 9 8 7)
19:21:06 <spruit11> egelbot: cons 1 (cons 2 nil)
19:21:06 <egelbot> {1, 2}
19:21:14 <spruit11> So, that works.
19:21:18 <spruit11> egelbot: cons 1 (cons 2 3)
19:21:19 <egelbot> {1, |(System:cons 2 3)}
19:21:27 <spruit11> But I didn't get this nice.
19:21:34 -!- kritixilithos has quit (Quit: quit).
19:21:47 -!- adu has joined.
19:21:49 <b_jonas> yeah, that should ideally say {1, 2| 3} or something
19:23:33 <spruit11> I will puzzle a bit more.
19:25:33 <b_jonas> but this output is at least accurate too
19:25:37 <b_jonas> so it's fine
19:26:04 <b_jonas> egelbot: (tuple (tuple 9 8) (tuple 7 6)) (tuple 5 4)
19:26:05 <egelbot> ((9, 8), (7, 6), (5, 4))
19:26:30 <esowiki> [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77141&oldid=77140 * SunnyMoon * (+46) Game dev update
19:28:06 <esowiki> [[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 <spruit11> egelbot: cons 1 (cons 2 3)
19:39:09 <egelbot> {1, 2| 3}
19:39:13 <spruit11> Pffrt.
19:43:31 <b_jonas> 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 <egelbot> ({9| 8}, {9, 8| 7}, {9, 8, 7| 6}, {9}, {9, 8}, {9, 8, 7}, {9, 8, 7, 6})
19:43:37 <b_jonas> looks better
19:44:07 <spruit11> Yay recursion!
19:45:12 <b_jonas> 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 <egelbot> (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 <spruit11> Yay line noise!
19:46:24 <spruit11> Oh gawd. Took a day but I am laughing about it. ;)
19:46:47 <b_jonas> egelbot: cons nop nil
19:46:48 <egelbot> {System:nop}
19:47:11 <b_jonas> egelbot: nop nil cons
19:47:14 <spruit11> I am wondering whether I should nop with unit once.
19:47:23 <spruit11> Nop is shorter..
19:47:34 <spruit11> Unit sounds nice.
19:47:42 <b_jonas> hmm
19:47:51 <b_jonas> egelbot: 2;; nop "hello";; 3
19:47:51 <egelbot> 2
19:47:51 <egelbot> 3
19:47:54 <b_jonas> interesting
19:48:44 -!- hendursaga has quit (Quit: hendursaga).
19:48:45 <b_jonas> I didn't know nop worked as a head
19:49:09 -!- hendursaga has joined.
19:49:41 <spruit11> No. Print just checks the tag whether it's a nop. And an array inherits the tag from the head.
19:49:55 <spruit11> It's a small bug in print
19:50:06 <b_jonas> egelbot: (nop 9) 8
19:50:16 <spruit11> egelbot: (nop "hello", 9)
19:50:16 <egelbot> ((System:nop "hello"), 9)
19:50:58 <b_jonas> egelbot: def gobble = [_ -> gobble]
19:51:09 <b_jonas> egelbot: gobble 7 4 9 8 1 10
19:51:09 <egelbot> gobble
19:51:16 <b_jonas> egelbot: gobble "anything"
19:51:16 <egelbot> gobble
19:51:43 <spruit11> Yah. That's neat right.
19:52:54 <b_jonas> that's underload's v builtin
19:55:38 <b_jonas> 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 <spruit11> Heh.
19:57:49 <b_jonas> sorry, unlambda's v builtin
19:57:52 <b_jonas> not underload's
19:57:56 <b_jonas> also now I realize what I forgot
19:58:06 <b_jonas> I should have washed the shower curtains... oh well
19:58:33 <spruit11> Ah. Right. People do that.
20:00:49 <rain1> https://mathoverflow.net/questions/369825/tietze-like-transformations-for-defining-interesting-bijections-between-algebr
20:01:04 <spruit11> egelbot: def f = [ X Y -> f (X+Y) | X -> X ];; f 1 2 3 4 5 6
20:01:05 <egelbot> 21
20:01:17 <spruit11> Like gobble.
20:07:03 <b_jonas> 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 <zzo38> The controller of the controller of Master Warcraft, I believe, so it is unchanged.
20:08:24 <b_jonas> zzo38: the controller is my opponent
20:08:35 <zzo38> Yes, but you control your opponent.
20:08:58 <esowiki> [[1CP=1ICL]] M https://esolangs.org/w/index.php?diff=77143&oldid=77122 * IFcoltransG * (+0) /* Language specifications */ Spelling
20:09:06 <zzo38> (So I think the spell has no effect, although it can still be cast, stuff can be triggered from it, etc.)
20:09:28 <spruit11> RIght, you control your opponent and make all decisions for him
20:10:09 <b_jonas> 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 <b_jonas> it?
20:10:48 <zzo38> 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 <spruit11> I am not a judge but 'you make all decions' looks pretty final to me.
20:12:05 <b_jonas> spruit11: we have 101.1 to say that it's not final
20:13:13 <zzo38> (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 <zzo38> 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 <b_jonas> 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 <zzo38> 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 <b_jonas> zzo38: perhaps, but I want to understand the existing rules of M:tG
20:33:00 <spruit11> egelbot: nop 1
20:33:00 <egelbot> (System:nop 1)
20:33:02 <spruit11> egelbot: nop
20:34:01 <spruit11> I wonder how MTGA does it. They must have some sort of rule set compiler.
20:34:15 <zzo38> b_jonas: Yes, and knowing what the rules are would also help with attempting to do what I mentioned, anyways, too.
20:34:56 <spruit11> There's an open source mtg application too, now I think of it.
20:36:14 <zzo38> 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 <spruit11> Ah. Shame. But somewhat expected.
20:37:02 <zzo38> (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 <spruit11> 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 <b_jonas> 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 <egelbot> internal:1:16:syntactical:-> expected
20:38:04 <spruit11> Card: 'wash my clothes and bring beer' comes to mind.
20:38:32 <b_jonas> 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 <egelbot> internal:1:126:syntactical:primary expression expected
20:38:38 <b_jonas> spruit11: you mean Ashnod's Coupon
20:38:47 <b_jonas> well that only does the beer prat
20:38:57 <spruit11> I want it.
20:38:59 <b_jonas> for washing clothes ... hmm, I'm not sure there's a card for that yet
20:39:00 <zzo38> 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 <zzo38> (Those are outside of the scope of the core rules of the game.)
20:40:29 <zzo38> Sometimes new cards will require new rules, but that already happens anyways.
20:41:20 <spruit11> I already wondered whether MTGA will stifle innovation.
20:41:36 * spruit11 <- plays mtga daily
20:41:58 <b_jonas> 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 <zzo38> 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 <zzo38> (I do some of that to try to make the rules less confusing.)
20:46:54 <spruit11> Do anyone of you play Arena?
20:47:43 <b_jonas> spruit11: no, we're only theoretical M:tG players on this channel
20:47:43 <zzo38> 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 <b_jonas> zzo38: that is unlikely for both technical and legal reasons
20:48:02 <spruit11> I run it on my linux machine.
20:48:05 <zzo38> (And I do not actually play the game much either, mostly just discussion of stuff)
20:49:07 <spruit11> 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 <zzo38> 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 <b_jonas> spruit11: oh wow
20:53:33 <zzo38> (In addition to experimenting with custom cards, might also want custom rules, LAN play, UI customization, etc)
20:56:13 <b_jonas> so interactive egel can't actually persist values between statements, it can only persist definitions, and has to recompute everything.
20:56:37 <b_jonas> that means keeping the process alive has much less advantages as with ordinary languages
20:56:46 <b_jonas> I mean for an irc bot
20:57:09 <b_jonas> every value is lost at double semicolons
20:57:28 <spruit11> Unless you use val.
20:57:45 <spruit11> egelbot: val f = print "hello"; 3
20:57:46 <egelbot> hello
20:57:50 <spruit11> egelbot: f
20:57:50 <egelbot> 3
20:57:53 <b_jonas> oh wait
20:57:58 <b_jonas> hmm
20:58:13 <b_jonas> egelbot: data foo; val f = fool
20:58:13 <egelbot> internal:1:10:syntactical: unexpected
20:58:19 <b_jonas> egelbot: data foo val f = fool
20:58:19 <egelbot> internal:1:11:syntactical:val unexpected
20:58:23 <b_jonas> egelbot: data foo;; val f = fool
20:58:23 <egelbot> internal:1:21:semantical:undeclared fool
20:58:26 <b_jonas> egelbot: data foo;; val f = foo
20:58:32 <b_jonas> egelbot: f
20:58:32 <egelbot> foo
20:58:43 <b_jonas> egelbot: def foo = 2;; foo;; f
20:58:44 <egelbot> 2
20:58:44 <egelbot> foo
20:58:59 <spruit11> `val` reduced the body before assigning it to a combinator.
20:59:00 <HackEso> val`? No such file or directory
20:59:07 <spruit11> *reduces
20:59:30 <b_jonas> I wonder if you can use f in any way that gets it reduced
20:59:54 <spruit11> Hmm?
21:00:09 <zzo38> I know there are also some open source implementations of Pokemon battles, although I want a purely text based one.
21:01:16 <b_jonas> egelbot: (f, [2 -> 9] f, [foo -> 9] f, [5 -> 9] f)
21:01:16 <egelbot> (foo, (Dummy6DOT0 foo), 9, (Dummy6DOT2 foo))
21:01:25 <esowiki> [[Conglument]] N https://esolangs.org/w/index.php?oldid=77144 * Hakerh400 * (+16354) +[[Conglument]]
21:01:30 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=77145&oldid=77049 * Hakerh400 * (+17) +[[Conglument]]
21:01:34 <esowiki> [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=77146&oldid=77116 * Hakerh400 * (+17) +[[Conglument]]
21:01:58 <b_jonas> egelbot: (foo, [2 -> 9] foo, [foo -> 9] foo, [5 -> 9] foo)
21:01:59 <egelbot> (2, 9, (Dummy7DOT1 2), (Dummy7DOT2 2))
21:01:59 <spruit11> Yah. That's why I regret compiling combinators. You lose the text representation.
21:02:16 <spruit11> But, ah well.
21:02:30 <b_jonas> ignore that, I could just add a fallback clause
21:02:44 <imode> bugh.
21:02:51 <imode> I don't know how to make this faster.
21:02:52 <b_jonas> egelbot: (f, [2 -> 9 | _ -> 0] f, [foo -> 9 | _ -> 0] f, [5 -> 9 | _ -> 0] f)
21:02:52 <egelbot> (foo, 0, 9, 0)
21:03:03 <b_jonas> egelbot: (foo, [2 -> 9 | _ -> 0] foo, [foo -> 9 | _ -> 0] foo, [5 -> 9 | _ -> 0] foo)
21:03:04 <egelbot> (2, 9, 0, 0)
21:03:24 <b_jonas> egel's rules are so weird
21:03:32 <spruit11> Heh?
21:03:45 <spruit11> That's good! Right?
21:03:54 <spruit11> ;)
21:04:00 <b_jonas> they make sense but only in the esoteric way
21:04:58 <spruit11> I could always throw still. And make everything neater. And end with a Haskell..
21:05:25 <spruit11> https://github.com/egel-lang/egel
21:05:34 <spruit11> ^ I added a mascot
21:06:04 <b_jonas> egel: data still; throw still
21:06:09 <b_jonas> egelbot: data still;; throw still
21:06:10 <egelbot> exception(still)
21:14:25 <esowiki> [[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 <spruit11> egelbot: dis [ X -> X ]
21:17:37 <egelbot> "Dummy11DOT0::0400010005000000000a000000480400060006000000050a0000004801000700010100080002010009000301000a000401000b000606000c0007000b07000d000c000000060b000d06000600020001070007000600000004030001000200070b0003"
21:18:41 <spruit11> Didn't show that. I once added the ability to disassemble and reassemble the bytecode.
21:19:11 <b_jonas> egelbot: [F->(F(9<8),F(8<9),F true,F false))][X->if X then"yes"else"no"]
21:19:12 <egelbot> internal:1:36:syntactical:] expected
21:19:18 <b_jonas> egelbot: [F->(F(9<8),F(8<9),F true,F false)][X->if X then"yes"else"no"]
21:19:18 <egelbot> ("no", "yes", "yes", "no")
21:20:54 <b_jonas> egelbot: let Six=6,Seven=7,Eight=8 in {Seven,Eight,9}
21:20:55 <egelbot> internal:1:11:syntactical:in expected
21:21:02 <b_jonas> egelbot: let Six=6;Seven=7;Eight=8 in {Seven,Eight,9}
21:21:02 <egelbot> internal:1:17:syntactical:in expected
21:21:14 <b_jonas> egelbot: let Six Seven Eight=6 7 8 in {Seven,Eight,9}
21:21:14 <egelbot> (Dummy13DOT0 (6 7 8))
21:21:41 <spruit11> DUh?
21:21:43 <b_jonas> ?
21:21:48 <spruit11> You found another bug?
21:21:51 <b_jonas> egelbot: let tuple Six Seven Eight=tuple 6 7 8 in {Seven,Eight,9}
21:21:51 <egelbot> (Dummy14DOT0 (6, 7, 8))
21:21:58 <imode> what's egelbot do?
21:22:12 <b_jonas> imode: it evaluates egel. see our wiki if you want to know what egel is.
21:22:18 <imode> neat.
21:22:45 <b_jonas> ideally I should just install egel to HackEso so I can evaluate egel there, but I'm lazy
21:22:45 <spruit11> egelbot: let X Y = 1 2 in Y X
21:22:45 <egelbot> (Dummy15DOT0 (1 2))
21:22:54 <imode> eager combinator rewriting, huh?
21:23:11 <b_jonas> 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 <spruit11> Hehe.
21:23:26 <b_jonas> HackEso would just time out that session
21:23:46 <imode> how's the rewriting handled? how fast are basic operations like addition etc.? I must know!
21:23:55 <b_jonas> also this one can spam irc because a command can output any number of lines
21:24:37 <spruit11> egelbot: let (X Y) = 1 2 in Y X
21:24:37 <egelbot> (2 1)
21:25:02 <b_jonas> imode: dunno, there's some paper on it in the egel-docs repository
21:25:15 <imode> sick.
21:25:48 <spruit11> It's a slow interpreter. The reduction system is the interesting part.
21:26:15 <imode> how slow? microseconds-per-operation slow?
21:26:56 <b_jonas> egelbot: String.charAt 0 "hello"
21:26:56 <egelbot> internal:1:2:semantical:undeclared String
21:27:09 <spruit11> Roughly Python speed. If you don't count that I rewrite additions instead of generating bytecode for it.
21:27:12 <b_jonas> hmm, how did that work?
21:27:31 <spruit11> egelbot: String:charAt 0 "hello"
21:27:32 <egelbot> 'h'
21:27:36 <imode> you generate byteode for this? huh.
21:27:40 <b_jonas> ah right thanks
21:27:44 <b_jonas> egelbot: String:charAt 0 "hello"
21:27:44 <egelbot> 'h'
21:28:22 <imode> egelbot: 1 + 2
21:28:22 <egelbot> 3
21:28:31 <imode> now if I could actually time that out with perf...
21:29:00 <b_jonas> egelbot: 3 | 4
21:29:00 <egelbot> internal:1:4:syntactical:| unexpected
21:29:01 <spruit11> I use gprof.
21:29:09 <b_jonas> egelbot: 7 & 4
21:29:09 <egelbot> internal:1:4:semantical:undeclared &
21:32:10 <spruit11> egelbot: 7 && 4
21:32:10 <egelbot> 4
21:32:40 <b_jonas> yeah
21:32:52 <imode> egel doesn't build on my machine.
21:32:55 <spruit11> I should change that once. I will use && for 'lazy' (forgot the name) boolean expressions.
21:33:12 <imode> looks to be missing libicu, but I have that installed.
21:33:23 <b_jonas> egelbot: "and I think it was"; toint "a"
21:33:23 <egelbot> 0
21:33:35 <b_jonas> egelbot: "and I think it was"; toint (charAt 0 "a")
21:33:36 <egelbot> internal:1:31:semantical:undeclared charAt
21:33:44 <b_jonas> egelbot: "and I think it was"; toint (String:charAt 0 "a")
21:33:45 <egelbot> 97
21:33:46 <b_jonas> yeah, that
21:34:11 <b_jonas> egelbot: "but the opposite direction is not"; totext 97
21:34:12 <egelbot> "97"
21:34:34 <b_jonas> egelbot: unpack "a" # oh right, we have this now
21:34:35 <egelbot> {'a'}
21:34:40 <b_jonas> but it doesn't really help
21:34:46 <b_jonas> toint is still the ord function
21:35:05 <b_jonas> and I think chr was uglier
21:35:40 <b_jonas> egelbot: "\\u0061"
21:35:40 <egelbot> "\\u0061"
21:35:42 <b_jonas> egelbot: "\u0061"
21:35:43 <egelbot> internal:1:4:lexical:error in string
21:35:49 <b_jonas> egelbot: "\x0061"
21:35:49 <egelbot> internal:1:4:lexical:error in string
21:35:51 <b_jonas> egelbot: "\x61"
21:35:52 <egelbot> internal:1:4:lexical:error in string
21:35:54 <b_jonas> hmm
21:36:02 <spruit11> And I thought I could move egel to beta status!
21:36:09 <b_jonas> egelbot: unquote "\\u0061"
21:36:09 <egelbot> internal:1:2:semantical:undeclared unquote
21:36:12 <b_jonas> egelbot: String:unquote "\\u0061"
21:36:12 <egelbot> internal:1:2:semantical:undeclared unquote
21:36:15 <spruit11> There's still a lot to do.
21:36:20 <b_jonas> egelbot: String:unescape "\\u0061"
21:36:20 <egelbot> "a"
21:36:23 <b_jonas> yes, that was it
21:36:24 <imode> I'm just curious about how stuff like basic addition performs.
21:36:46 <imode> going on a rewriting-related performance journey myself.
21:36:53 <spruit11> Basic addition is really, really slow.
21:36:59 <imode> how slow?
21:37:11 <imode> sorry, that sounds way more forceful than it actually is.
21:37:16 <spruit11> Dunno.
21:37:44 <imode> weird, the cflags resolve to -licuio -licui18n -licuuc -licudata...
21:37:53 <spruit11> But I think in the order of ten thousand micro instructions.
21:38:18 <imode> `error: ‘icu_65’ is not a namespace-name`
21:38:19 <HackEso> error:? No such file or directory
21:38:43 <spruit11> Should be something like that, in the ball park of a thousand to ten thousand.
21:38:58 <spruit11> Instead of one instruction..
21:39:12 <spruit11> Bash is even slower!
21:39:38 <imode> interesting. how do you do the rewriting? just a basic recursive tree search/replace?
21:39:51 <spruit11> https://github.com/egel-lang/egel-tex/blob/master/semantics/semantics.pdf
21:39:56 <spruit11> ^ look there
21:40:04 <imode> neato burrito.
21:40:08 <spruit11> It's a graph rewriter.
21:40:22 <b_jonas> egelbot: [X->[X->(X,X)]8]9
21:40:22 <egelbot> (8, 8)
21:40:26 <b_jonas> correct
21:40:26 <spruit11> WIth a bit of a different graph representation than you would expect.
21:41:02 <imode> hells yeah. you do subexpr sharing?
21:41:25 <spruit11> Yah.
21:41:28 <b_jonas> egelbot: pack {'5','2','7'}
21:41:29 <egelbot> "527"
21:42:41 <imode> 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 <spruit11> Yah. That's true. But this model is just nice.
21:43:50 <spruit11> Well. I find it nice. It's about as simplistic as I could make it.
21:43:54 <spruit11> But slow.
21:44:08 <spruit11> For my definition of simplistic.
21:44:11 <imode> https://git.imode.tech/?p=python/modal;a=blob;f=modal.py;hb=HEAD
21:44:16 <b_jonas> egelbot: 0xBD4388FF
21:44:17 <egelbot> internal:1:4:lexical:error in hexadecimal int
21:44:22 <b_jonas> ?
21:44:30 <spruit11> Uuuu.
21:44:34 <spruit11> h.
21:44:36 <imode> https://git.imode.tech/?p=python/modal;a=blob;f=prelude.modal;hb=HEAD
21:44:51 <imode> egelbot: BD4388FF
21:44:51 <egelbot> internal:1:2:semantical:undeclared BD4388FF
21:45:00 <imode> wonder if it can do octal.
21:45:04 <spruit11> No.
21:45:34 <spruit11> I even forgot I added hexadecimal.
21:46:46 <spruit11> egelbot: 0xff
21:46:46 <egelbot> 255
21:46:48 <spruit11> egelbot: 0xfff
21:46:49 <egelbot> 4095
21:46:52 <spruit11> egelbot: 0xffF
21:46:52 <egelbot> internal:1:6:semantical:undeclared F
21:46:57 <spruit11> egelbot: 0xFf
21:46:57 <egelbot> internal:1:4:lexical:error in hexadecimal int
21:47:12 <spruit11> Ah, I didn't add uppercase hex.
21:47:12 <b_jonas> what
21:47:25 <b_jonas> 0xFf ?
21:47:26 -!- TheLie has quit (Remote host closed the connection).
21:47:35 <b_jonas> oh, that was from you wait
21:47:38 <b_jonas> 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 <egelbot> exception("System:pack invalid arguments")
21:47:59 <b_jonas> 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 <egelbot> {'0', (format08x_dbgDOT1 16), (format08x_dbgDOT1 16), '0', (format08x_dbgDOT1 16), '0', '0', (format08x_dbgDOT1 16)}
21:48:05 <b_jonas> 16?
21:48:12 <b_jonas> oh
21:48:20 <b_jonas> 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 <egelbot> {'B', 'D', '4', '3', '8', '8', 'F', 'F'}
21:48:24 <b_jonas> better
21:48:29 -!- frouts has joined.
21:48:39 <imode> simple to me is a one-file-to-four-file language with a LoC count under 1k.
21:48:41 <b_jonas> 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 <egelbot> "BD4388FF"
21:48:45 <b_jonas> that's it
21:49:04 <spruit11> As always, at some point you pick up speed and run miles ahead of me. ;)
21:49:30 <b_jonas> nah, this is something I did write back then and is probably in the IRC logs
21:50:01 <b_jonas> egelbot: String:unescape "\\U00000061"
21:50:01 <egelbot> "a"
21:50:04 <spruit11> 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 <imode> lol, no worries. I piggyback off of the Go build tools to do sanity checking etc. for me.
21:50:47 <b_jonas> was there a string concatenation function?
21:51:29 <b_jonas> egelbot: String:append "he" "llo"
21:51:29 <egelbot> "hello"
21:51:41 <b_jonas> 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 <egelbot> "BD4388FF"
21:51:43 <imode> 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 <b_jonas> egelbot: data format08x
21:52:05 <spruit11> b_jonas: String:append
21:52:09 <b_jonas> spruit11: is there a way to undefine a name?
21:52:22 <imode> egelbot: undef format08X
21:52:22 <egelbot> internal:1:2:semantical:undeclared undef
21:52:26 <spruit11> egelbot: using String;; append "hello " "world!"
21:52:26 <egelbot> "hello world!"
21:52:39 <b_jonas> egelbot: def chr = [C -> String:unescape (String:append "\\U" (format08X))];; chr 93
21:52:39 <egelbot> exception("String:append bad arguments")
21:52:48 <b_jonas> egelbot: def chr = [C -> String:unescape (String:append "\\U" (format08X C))];; chr 93
21:52:48 <egelbot> "]"
21:52:48 <spruit11> b_jonas: No. I didn't add an undef.
21:53:06 <b_jonas> egelbot: chr 97
21:53:06 <egelbot> "a"
21:53:08 <b_jonas> ok, we have a chr
21:54:39 -!- frouts has quit (Quit: -a- IRC for Android 2.1.57).
21:54:54 <spruit11> 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 <b_jonas> 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 <egelbot> "hello"
21:55:51 <imode> that's still a reasonable complexity if those rewrites are built-in and have access to the actual backing ints.
21:57:05 <spruit11> Right.
21:57:45 <b_jonas> egelbot: [L->say (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 10); say "fak alol"
21:57:45 <egelbot> internal:1:6:semantical:undeclared say
21:57:49 <b_jonas> what
21:57:51 <b_jonas> egelbot: say 4
21:57:51 <egelbot> internal:1:2:semantical:undeclared say
21:57:54 <b_jonas> egelbot: say "foo"
21:57:54 <spruit11> Print
21:57:54 <egelbot> internal:1:2:semantical:undeclared say
21:58:00 <b_jonas> egelbot: Print "foo"
21:58:01 <egelbot> internal:1:2:semantical:undeclared Print
21:58:03 <b_jonas> egelbot: print "foo"
21:58:04 <egelbot> foo
21:58:05 <spruit11> I changed it back.
21:58:07 <b_jonas> egelbot: print "foo"; print "bar"
21:58:08 <egelbot> foo
21:58:08 <egelbot> bar
21:58:14 <b_jonas> shouldn't that be called println
21:58:23 <b_jonas> egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 10); print "fak alol"
21:58:24 <egelbot> mehraj-PRIVMSG b_jonas :duruzsol-PRIVMSG #esoteric :szellos-
21:58:24 <egelbot> fak alol
21:59:17 <b_jonas> 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 <egelbot> exception("String:append bad arguments")
21:59:24 <b_jonas> 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 <egelbot> mehraj
21:59:24 <egelbot> fak alol
21:59:41 <b_jonas> ok that's better, it sends the cr through but not the lf
21:59:53 <b_jonas> and the IRC client ignores anything from cr to lf
22:00:04 <spruit11> Oh right. You already thought I should harden that, I remember.
22:00:09 <b_jonas> 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 <egelbot> mehraj
22:00:10 <egelbot> fak alol
22:00:23 <b_jonas> egelbot: [L->print (strjoini {"mehraj",L,"PRIVMSG b_jonas :duruzsol",L,"PRIVMSG #esoteric :szellos",L})](chr 0); print "fak alol"
22:00:24 <egelbot> mehrajPRIVMSG #esoteric :fak alol
22:00:50 <b_jonas> 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 <b_jonas> or find some function you accidentally left in System that shouldn't be there
22:01:33 <b_jonas> I don't understand what all those functions are
22:02:17 <spruit11> Yah. Severily lacking documentation is another thing.
22:02:41 <b_jonas> egelbot: "\u00610000"
22:02:41 <egelbot> internal:1:4:lexical:error in string
22:02:44 <b_jonas> egelbot: "\x00610000"
22:02:45 <egelbot> internal:1:4:lexical:error in string
22:02:57 <b_jonas> just stick to unescape then
22:03:01 <b_jonas> and chr
22:04:19 <spruit11> I'll add a chr once.
22:04:39 <b_jonas> egelbot: int
22:04:39 <egelbot> System:int
22:04:56 <b_jonas> spruit11: it doesn't really matter, we can't do anything too interesing with strings anyway
22:05:22 <spruit11> Hmm? You don't have all primitives?
22:05:33 <b_jonas> no, I mean we can't break the bot or anything
22:05:41 <spruit11> Oh, right.
22:05:43 <b_jonas> we have enough primitives to draw mazes or suchlike if we want
22:05:56 <b_jonas> maybe not enough to send byte strings that are invalid utf-8, I dunno
22:06:30 <spruit11> Right. I was wondering about that anyway.
22:07:06 <spruit11> It looked sane to support utf-8 but I am not that sure anymore.
22:07:15 <b_jonas> egelbot: [T->(T true,T 6,T (6 2),T (6,2),T {6,2},T int)][(_ _)->0|_:int->1|_->0]
22:07:15 <egelbot> internal:1:60:syntactical:-> expected
22:07:31 <b_jonas> where exactly?
22:07:47 <b_jonas> egelbot: [T->(T true,T 5)][(_ _)->0|_:int->1|_->0]
22:07:47 <egelbot> internal:1:30:syntactical:-> expected
22:08:06 <b_jonas> egelbot: [T->(T true,T 5)][(X X)->0|X:int->1|X->0]
22:08:07 <egelbot> internal:1:23:semantical:redeclaration of X
22:08:12 <b_jonas> egelbot: [T->(T true,T 5)][(X Y)->0|X:int->1|X->0]
22:08:13 <egelbot> internal:1:29:semantical:undeclared int
22:08:20 <b_jonas> egelbot: [T->(T true,T 5)][(X Y)->0|X:System:int->1|X->0]
22:08:20 <egelbot> internal:1:29:semantical:undeclared int
22:08:30 <spruit11> ::
22:08:36 <spruit11> I think
22:08:43 <b_jonas> egelbot: [T->(T true,T 5)][(X Y)->0|X::int->1|X->0]
22:08:43 <egelbot> (0, 1)
22:08:54 <b_jonas> 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 <egelbot> (0, 1, 0, 0, 0, 1)
22:09:03 <b_jonas> 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 <egelbot> (0, 1, 0, 0, 0, 0)
22:09:18 <b_jonas> 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 <egelbot> (0, 1, 0, 0, 0, 0, 0, 0)
22:09:22 <b_jonas> ok good enough
22:09:33 <b_jonas> egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0]
22:17:26 <b_jonas> 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 <egelbot> internal:1:269:semantical:undeclared take
22:17:37 <b_jonas> egelbot: listtake 7 st6
22:17:57 <b_jonas> egelbot: "did I put you into an infinite loop?"
22:18:04 <b_jonas> oops
22:18:37 <b_jonas> `ping
22:18:38 <HackEso> pong
22:21:02 <b_jonas> oh yeah
22:21:17 <b_jonas> 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 <b_jonas> that was the bug
22:21:23 <b_jonas> spruit11: sorry
22:21:48 <b_jonas> I made it fall into growing a term one by one
22:22:08 <b_jonas> making an application with listtake as the head longer and longer
22:22:14 -!- egelbot has quit (Ping timeout: 256 seconds).
22:22:20 <b_jonas> if it copies the whole application, then that will take a while to run out of memory
22:23:45 <spruit11> Oh, right.
22:24:08 -!- egelbot has joined.
22:24:59 <b_jonas> 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 <egelbot> internal:1:143:semantical:undeclared isint
22:25:07 <b_jonas> egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0]
22:25:13 <b_jonas> egelbot: listtake 7 st6
22:25:14 <egelbot> internal:1:2:semantical:undeclared listtake
22:25:17 <b_jonas> 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 <egelbot> exception("error listtake")
22:25:24 <b_jonas> that's slightly better
22:27:42 <b_jonas> 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 <egelbot> internal:1:29:semantical:undeclared say
22:27:49 <b_jonas> 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 <egelbot> exception("error listtake")
22:28:37 <b_jonas> 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 <egelbot> "substitute"
22:29:08 <b_jonas> egelbot: print ("listtake_a",nil,7,st6)
22:29:08 <egelbot> (System:print ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}))
22:29:19 <b_jonas> egelbot: print ("listtake_a",nil,7,st6); 0
22:29:20 <egelbot> 0
22:29:25 <b_jonas> egelbot: print (tostr("listtake_a",nil,7,st6)); 0
22:29:25 <egelbot> internal:1:9:semantical:undeclared tostr
22:30:14 <spruit11> Oh. Sorry. Print doesn't print tuples yet. Just the primitives.
22:30:18 <b_jonas> egelbot: print (totext ("listtake_a",nil,7,st6)); 0
22:30:19 <egelbot> exception("System:totext bad arguments")
22:30:33 <b_jonas> argh
22:32:24 <spruit11> egelbot: print 1 "A" 5.0 7
22:32:25 <egelbot> 1A5.0000000000000007
22:32:35 <spruit11> egelbot: print 1 "A" 5.0 7 true
22:32:36 <egelbot> (System:print 1 "A" 5.000000000000000 7 System:true)
22:32:57 <spruit11> Uh. Right. Alpha software. I'll fix print.
22:35:18 <b_jonas> 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 <egelbot> {8, 22, 13, 59, 75, 88}
22:35:43 <spruit11> Shall I restart the bot?
22:35:58 <b_jonas> if you want
22:36:05 -!- egelbot has quit (Remote host closed the connection).
22:36:20 -!- egelbot has joined.
22:36:24 <b_jonas> 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 <egelbot> {8, 22, 13, 59, 75, 88}
22:36:37 <spruit11> egelbot: print (1,2)
22:36:38 <egelbot> (1, 2)
22:36:41 <spruit11> egelbot: print (1,2) true
22:36:42 <egelbot> (1, 2)System:true
22:36:53 <spruit11> egelbot: print (1,2) true 5 "hello" 'a'
22:36:53 <egelbot> (1, 2)System:true5hello'a'
22:37:07 <spruit11> the char is wrong.
22:37:40 <b_jonas> 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 <egelbot> internal:1:110:syntactical:def unexpected
22:38:08 <b_jonas> spruit11: is there a way to just access to pretty-printer and get a string from it?
22:38:32 <b_jonas> 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 <egelbot> {8, 22, 13, 59, 75, 88, 94, 81, 62}
22:38:43 -!- egelbot has quit (Remote host closed the connection).
22:38:51 <b_jonas> os now it actually requires the double semicolon between defs?
22:38:57 -!- egelbot has joined.
22:38:59 <spruit11> egelbot: print (1,2) true 5 "hello" 'a'
22:38:59 <egelbot> (1, 2)System:true5"hello"'a'
22:39:21 <spruit11> Aargh. I made it worse.
22:41:32 -!- egelbot has quit (Remote host closed the connection).
22:41:48 <b_jonas> 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 <spruit11> egelbot: print (1,2) true 5 "hello" 'a'
22:41:56 <egelbot> (1, 2)System:true5helloa
22:42:14 <b_jonas> egelbot: print{3,"a"}
22:42:14 <egelbot> {3, "a"}
22:42:20 <b_jonas> ok that should help
22:42:35 <b_jonas> thanks
22:42:52 <spruit11> b_jonas: No problem. I am a bit hazy all the programming today though.
22:42:56 <spruit11> brb
22:44:16 <b_jonas> 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 <egelbot> ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82})
22:44:17 <egelbot> exception("unimplemented")
22:44:23 <b_jonas> ok so that part is ok
22:44:28 <b_jonas> now what was my actual definition?
22:45:20 <b_jonas> 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 <egelbot> internal:1:201:semantical:undeclared isint
22:46:12 <b_jonas> egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0]
22:46:15 <b_jonas> 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 <egelbot> ("listtake_a", {}, 7, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82})
22:46:16 <egelbot> exception("error listtake")
22:46:46 -!- t20kdc has quit (Remote host closed the connection).
22:46:57 <b_jonas> 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 <egelbot> ("listtake_i", 1, System:false, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82})
22:47:24 <b_jonas> so (isint N) is 1, (N<=0) is false
22:47:49 <b_jonas> oh right
22:48:28 <b_jonas> 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 <egelbot> exception("error listtake")
22:49:10 <b_jonas> 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 <egelbot> ("listtake_c", 8, 7, (7 -1), {22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}, {})
22:49:11 <egelbot> exception("error listtake")
22:49:14 <b_jonas> ah
22:49:19 <b_jonas> egelbot:7 - 1
22:49:19 <egelbot> 6
22:49:20 <b_jonas> egelbot:7 -1
22:49:20 <egelbot> (7 -1)
22:49:32 <b_jonas> yeah, that was something I suffered with last time too
22:50:00 <b_jonas> 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 <egelbot> exception("error listtake")
22:50:36 <b_jonas> oh, A is wrong
22:50:48 <b_jonas> somehow
22:51:08 <b_jonas> no it's not wrong
22:51:12 <b_jonas> 8 really is hte first element
22:51:27 <b_jonas> however,
22:52:01 <b_jonas> 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 <egelbot> internal:1:99:syntactical:primary expression expected
22:52:30 <b_jonas> 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 <egelbot> {8, 22, 13, 59, 75, 88, 94}
22:52:35 <b_jonas> FINALLY
22:53:22 <b_jonas> egelbot: listtake 2 st6;; listtake 99 st6;; listtake -2 st6;; listtake 0 st6;; listtake 2 {};; listtake 2 6;;
22:53:22 <egelbot> internal:1:102:syntactical:primary expression expected
22:53:35 <b_jonas> egelbot: listtake 2 st6;; listtake 99 st6;; listtake -2 st6;; listtake 0 st6;; listtake 2 {};; listtake 2 6
22:53:35 <egelbot> {8, 22}
22:53:35 <egelbot> {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}
22:53:35 <egelbot> {}
22:53:35 <egelbot> {}
22:53:35 <egelbot> {}
22:53:36 <egelbot> exception("error listtake")
22:53:53 <spruit11> Heh.
22:57:53 <b_jonas> 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 <egelbot> internal:1:163:syntactical:primary expression expected
22:58:10 <b_jonas> 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 <egelbot> internal:1:163:syntactical:primary expression expected
22:58:22 <b_jonas> 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 <egelbot> internal:1:165:syntactical:primary expression expected
22:58:27 <b_jonas> 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 <egelbot> internal:1:165:syntactical:primary expression expected
22:58:45 <b_jonas> egelbot: ()
22:58:46 <egelbot> internal:1:3:syntactical:primary expression expected
22:58:47 <b_jonas> oh
22:58:50 <b_jonas> egelbot: unit
22:58:50 <egelbot> internal:1:2:semantical:undeclared unit
22:58:56 <b_jonas> egelbot: nop
22:59:18 <b_jonas> 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 <egelbot> internal:1:221:syntactical:primary expression expected
22:59:41 <b_jonas> egelbot: data pcons;; data pnil;; data pforce;;
22:59:41 <egelbot> internal:1:40:syntactical:primary expression expected
22:59:44 <b_jonas> egelbot: data pcons;; data pnil;; data pforce
23:00:04 <b_jonas> 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 <b_jonas> egelbot: def pst3 = [F->pcons 8[F->pcons 22[F->pcons 13[F->pnil]]]];; plisttake 7 pst3
23:00:58 <egelbot> {8, 22, 13}
23:01:28 <b_jonas> egelbot: (plisttake 0 pst3, plisttake 2 pst3, plisttake 1 pst3, plisttake -1 pst3, plisttake 3 pst3)
23:01:28 <egelbot> ({}, {8, 22}, {8}, {}, {8, 22, 13})
23:01:31 <b_jonas> looks good
23:02:07 <b_jonas> 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 <b_jonas> egelbot: (plisttake 0 pst3, plisttake 2 pst3, plisttake 1 pst3, plisttake -1 pst3, plisttake 3 pst3, plisttake 7 pst3)
23:02:14 <egelbot> ({}, {8, 22}, {8}, {}, {8, 22, 13}, {8, 22, 13})
23:05:56 -!- dingwat has joined.
23:08:31 <spruit11> lol at -1+N
23:10:14 <b_jonas> 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 <egelbot> internal:1:14:syntactical:= unexpected
23:10:27 <b_jonas> egelbot: 3==3
23:10:27 <egelbot> System:true
23:10:38 <b_jonas> 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 <egelbot> System:false
23:10:38 <egelbot> System:true
23:10:38 <egelbot> System:true
23:10:38 <egelbot> System:false
23:10:42 <b_jonas> great
23:13:57 <b_jonas> egelbot: (-100)%9
23:13:57 <egelbot> -1
23:14:00 <b_jonas> egelbot: (100)%9
23:14:00 <egelbot> 1
23:14:04 <b_jonas> egelbot: (100)%7
23:14:04 <egelbot> 2
23:17:09 <b_jonas> 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*A<N) | _->throw"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 <b_jonas> 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*A<N) | _->throw"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> internal:1:200:semantical:undeclared H
23:17:27 <b_jonas> 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*A<N) | _->throw"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 <egelbot> (System:false, System:false, System:true, System:true, System:true, System:false, System:false, System:false)
23:17:35 <b_jonas> nope
23:19:25 <b_jonas> oh right, wait
23:19:47 <b_jonas> 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*A<D+99999) | _->throw"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 <egelbot> exception("System:+ bad arguments")
23:20:06 <b_jonas> 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*A<N+99999) | _->throw"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 <egelbot> (System:false, System:false, System:true, System:true, System:true, System:true, System:true, System:true)
23:20:11 <b_jonas> still no
23:20:41 <b_jonas> 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 <egelbot> (System:false, System:true, System:true, System:true, System:true, System:true, System:true, System:true)
23:20:45 <b_jonas> better
23:21:23 <b_jonas> 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 <egelbot> (System:false, System:false, System:false, System:false, System:false, System:false, System:true)
23:21:34 <b_jonas> ok
23:22:03 <b_jonas> 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*A<N) | _->throw"error plistmember uncons"] (L pforce)];; "ok"
23:22:04 <egelbot> "ok"
23:23:47 -!- Arcorann__ has joined.
23:33:29 <b_jonas> 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<B)];; 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:33:29 <egelbot> internal:1:30:syntactical:= unexpected
23:33:54 <b_jonas> 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<B)];; 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:33:54 <egelbot> internal:1:48:syntactical:-> expected
23:34:24 <b_jonas> 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<B)];; 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:34:25 <egelbot> internal:1:48:syntactical:-> expected
23:34:35 <b_jonas> 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<B)];; "ok"
23:34:35 <egelbot> internal:1:48:syntactical:-> expected
23:34:43 <b_jonas> ah
23:35:07 <b_jonas> 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<B)];; "ok"
23:35:07 <egelbot> internal:1:132:syntactical:] unexpected
23:36:11 <b_jonas> 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<B)];; "ok"
23:36:11 <egelbot> internal:1:52:syntactical:-> expected
23:36:29 <b_jonas> 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<B) ];; "ok"
23:36:29 <egelbot> "ok"
23:36:47 <b_jonas> 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 <egelbot> exception("error plisttake")
23:37:15 <b_jonas> egelbot: plisttake 3 pst3
23:37:15 <egelbot> {8, 22, 13}
23:37:46 <b_jonas> oh right
23:38:00 <spruit11> What is it?
23:38:47 <b_jonas> egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))
23:38:47 <egelbot> internal:1:98:syntactical:) unexpected
23:38:50 <b_jonas> egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))
23:38:50 <egelbot> exception("error plisttake")
23:39:17 <b_jonas> egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_u 2 [_->pnil])
23:39:17 <egelbot> {}
23:39:24 <b_jonas> egelbot: [(pprimes_u B L) -> plisttake 149 L] (pprimes_s (pprimes_u 2 [_->pnil]))
23:39:24 <egelbot> {}
23:39:26 <imode> wow, someone's having fun.
23:39:32 <b_jonas> spruit11: I'm trying to make a prime sieve
23:39:48 <b_jonas> there's still a step after this, because I have to automatically figure out how many times to iterate pprimes_s
23:39:56 <b_jonas> but first I have to debug this
23:40:08 <b_jonas> egelbot: [(pprimes_u B L) -> (B, plisttake 149 L)] (pprimes_s (pprimes_u 2 [_->pnil]))
23:40:08 <egelbot> (4, {})
23:40:12 <b_jonas> that's wrong
23:40:20 <b_jonas> egelbot: (pprimes_s (pprimes_u 2 [_->pnil]))
23:40:20 <egelbot> (pprimes_u 4 pprimes_sDOT0)
23:40:39 <b_jonas> egelbot: [(pprimes_u B L) -> (L pforce)] (pprimes_s (pprimes_u 2 [_->pnil]))
23:40:39 <egelbot> pnil
23:41:33 <b_jonas> egelbot: pprimes_i 2 [_->pnil]
23:41:33 <egelbot> System:false
23:41:36 <b_jonas> egelbot: pprimes_i 3 [_->pnil]
23:41:36 <egelbot> System:false
23:42:21 <b_jonas> egelbot: pprimes_sa 4 [_->pnil] 2 [_->pnil]
23:42:21 <egelbot> (pprimes_saDOT0 2 (pprimes_saDOT2 4 Dummy47DOT0 2 Dummy47DOT1))
23:42:31 <b_jonas> that's not even the right type
23:43:30 <b_jonas> 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 ](F<B) ];; pprimes_sa 4 [_->pnil] 2 [_->pnil]
23:43:30 <egelbot> (pprimes_saDOT0 2 (pprimes_saDOT2 4 Dummy49DOT0 2 Dummy49DOT1))
23:43:35 <b_jonas> let's debug that
23:43:42 <b_jonas> although I should probably leave that for tomorrow
23:43:50 <b_jonas> it's getting late
23:44:55 <b_jonas> egelbot: [B L F P-> [true-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] |_->P ](F<B)] 4 [_->pnil] 2 [_->pnil]
23:44:55 <egelbot> (Dummy50DOT0 2 Dummy50DOT2)
23:45:28 <b_jonas> egelbot: [B L F P-> (F<B)] 4 [_->pnil] 2 [_->pnil]
23:45:29 <egelbot> System:true
23:46:10 <b_jonas> egelbot: [B L F P-> [true R->R| _ R->[_->pcons F R]] (pprimes_i F L) [_->"subst"] ] 4 [_->pnil] 2 [_->pnil]
23:46:11 <egelbot> (Dummy52DOT0 2 Dummy52DOT2)
23:46:45 <b_jonas> egelbot: [B L F P-> (pprimes_i F L) ] 4 [_->pnil] 2 [_->pnil]
23:46:45 <egelbot> System:false
23:47:01 <b_jonas> oh wait
23:47:09 <b_jonas> 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 <egelbot> (pcons 2 Dummy54DOT2)
23:47:14 <b_jonas> that is the right result
23:47:25 <b_jonas> at least its pcar is
23:47:49 <b_jonas> 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 <egelbot> (Dummy55DOT0 (pcons 2 Dummy55DOT3))
23:47:57 <b_jonas> but that's wrong
23:48:31 <b_jonas> 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 <egelbot> (pcons 2 "substr")
23:48:54 <b_jonas> egelbot: pprimes_sa 4 [_->pnil] 2 [_->pnil] pforce
23:48:54 <egelbot> (pcons 2 (pprimes_saDOT2 4 Dummy57DOT0 2 Dummy57DOT1))
23:49:17 <b_jonas> egelbot: [pcons A D -> D pforce] (pprimes_sa 4 [_->pnil] 2 [_->pnil] pforce)
23:49:18 <egelbot> (Dummy58DOT0 (pcons 2 (pprimes_saDOT2 4 Dummy58DOT1 2 Dummy58DOT2)))
23:49:22 <b_jonas> that's wrong
23:49:43 <b_jonas> ah
23:50:43 <b_jonas> 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 ](F<B) ];; pprimes_sa 4 [_->pnil] 2 [_->pnil]
23:50:43 <egelbot> (pcons 2 pprimes_sa Dummy59DOT0 3 Dummy59DOT1)
23:51:03 <b_jonas> 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 ](F<B) ];; plisttake 9 (pprimes_sa 4 [_->pnil] 2 [_->pnil])
23:51:03 <egelbot> exception("error plisttake")
23:51:15 <b_jonas> only even if that's right, it's too strict
23:51:29 <b_jonas> I mean too eager (non-lazy)
23:51:50 <spruit11> I have no idea what you're doing?
23:52:04 <b_jonas> 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 ](F<B) ];; plisttake 9 (pprimes_sa 4 [_->pnil] 2 [_->pnil])
23:52:04 <egelbot> exception("error plisttake")
23:52:17 <b_jonas> 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 ](F<B) ];; (pprimes_sa 4 [_->pnil] 2 [_->pnil])
23:52:17 <egelbot> (pprimes_sa 4 Dummy62DOT0 2 Dummy62DOT1)
23:53:34 <b_jonas> why is there even a P argument in that?
23:54:27 <b_jonas> 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] ](F<B) ];; (pprimes_sa 4 [_->pnil] 2)
23:54:28 <egelbot> (pprimes_sa 4 Dummy63DOT0 2)
23:55:07 <b_jonas> 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 <b_jonas> 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 <b_jonas> 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] ](F<B) ];; (pprimes_sa 4 [_->pnil] 2)
23:56:30 <egelbot> (pprimes_sa 4 Dummy64DOT0 2)
23:56:48 <b_jonas> egelbot: (pprimes_sa 4 [_->pnil] 2) pforce
23:56:48 <egelbot> (pcons 2 (pprimes_sa 4 Dummy65DOT0 3))
23:56:49 <spruit11> Heh.
23:57:15 <spruit11> Is this Okasaki voodoo?
23:59:04 <b_jonas> 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 <b_jonas> 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
←2020-08-29 2020-08-30 2020-08-31→ ↑2020 ↑all