00:01:01 under that, (pprimes_i N L) determines if any of the primes in L divide N, but stops after it sees a divisor that is greater or equal to the square root of N 00:01:20 egelbot: plisttake 2 (pprimes_sa 4 [_->pnil] 2) 00:01:20 {2, 3} 00:01:23 egelbot: plisttake 9 (pprimes_sa 4 [_->pnil] 2) 00:01:23 exception("error plisttake") 00:01:46 egelbot: [pcons A D->D pforce] ((pprimes_sa 4 [_->pnil] 2) pforce) 00:01:46 (Dummy68DOT0 (pcons 2 (pprimes_sa 4 Dummy68DOT1 3))) 00:01:54 hi bye! 00:02:01 um 00:02:05 that should not be a closure 00:02:09 egelbot: [pcons A D->D pforce pforce] ((pprimes_sa 4 [_->pnil] 2) pforce) 00:02:10 (Dummy69DOT0 (pcons 2 (pprimes_sa 4 Dummy69DOT1 3))) 00:02:31 um 00:03:13 egelbot: def pprimes_sa = [B L F _-> print("pprimes_sa",B,L,F,_); [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->[_->nil] ](Fpnil] 2) 00:03:13 internal:1:55:semantical:undeclared _ 00:03:23 egelbot: def pprimes_sa = [B L F G-> print("pprimes_sa",B,L,F,G); [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->[_->nil] ](Fpnil] 2) 00:03:23 ("pprimes_sa", 4, Dummy70DOT0, 2, pforce) 00:03:23 ("pprimes_sa", 4, Dummy70DOT0, 3, pforce) 00:03:24 ("pprimes_sa", 4, Dummy70DOT0, 4, pforce) 00:03:24 exception("error plisttake") 00:04:09 egelbot: def pprimes_sa = [B L F G-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->[_->pnil] ](Fpnil] 2) 00:04:09 exception("error plisttake") 00:04:24 egelbot: def pprimes_sa = [B L F G-> [true-> [true R->R| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->pnil ](Fpnil] 2) 00:04:24 {2, 3} 00:04:27 YES! 00:05:12 Ooooh. Neat. 00:05:24 I have no idea how that works. 00:05:30 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa B L 2)];; plisttake 149 (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:05:31 exception("error plisttake") 00:05:58 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa B L 2)];; [(pprimes_u _ L) -> plisttake 149 L] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:05:58 {2, 3} 00:06:01 nope 00:06:17 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa B L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:06:17 (16, {2, 3}) 00:06:48 spruit11: I admit that basically all the identifiers I use are cryptic and chosen poorly 00:06:49 -!- arseniiv has quit (Ping timeout: 264 seconds). 00:06:53 both the globals and the locals 00:07:06 except a few by accident 00:07:46 egelbot: def pprimes_s = [(pprimes_u (B*B) L) -> pprimes_u (B*B) (pprimes_sa B L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:07:46 internal:1:32:syntactical:) expected 00:08:05 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa (B*B) L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:08:05 exception("error plisttake") 00:08:21 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa (B*B) L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_u 2 [_->pnil])) 00:08:22 (4, {2, 3}) 00:08:31 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa (B*B) L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:08:31 exception("error plisttake") 00:08:50 sigh 00:09:50 egelbot: plisttake 149 (pprimes_sa 4 [_->pnil] 2) 00:09:50 {2, 3} 00:10:10 It's a start! 00:10:14 egelbot: plisttake 149 (pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2) 00:10:15 exception("error plisttake") 00:10:22 egelbot: plisttake 1 (pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2) 00:10:22 exception("error plisttake") 00:10:28 egelbot: pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2 00:10:28 (pprimes_sa 16 (pprimes_sa 4 Dummy82DOT0 2) 2) 00:10:32 egelbot: pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2 pforce 00:10:33 (pprimes_sa 16 (pprimes_sa 4 Dummy83DOT0 2) 3) 00:10:40 what 00:10:55 2 should be a 00:10:56 oh 00:11:10 it thinks 2 isn't a prime because it's divisible by 2 00:11:13 great 00:11:26 ok, this is the time to turn in and debug it some other day 00:11:29 good night 00:11:40 Have a nice night. 00:11:44 mind you, even then it should at least have returned a lazy list 00:12:05 oh I see 00:12:41 I hope to learn a new trick because I don't know this approach. 00:12:44 egelbot: def pprimes_sa = [B L F G-> [true-> [true R->R pforce| _ R->pcons F R] (pprimes_i F L) (pprimes_sa B L(1+F)) |_->pnil ](Fpnil] 2) 00:12:44 {2, 3} 00:12:54 egelbot: pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2 pforce 00:12:55 (pcons 3 (pprimes_sa 16 (pprimes_sa 4 Dummy85DOT0 2) 4)) 00:13:08 egelbot: plisttake 149 (pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2) 00:13:09 {3, 5, 7, 11, 13} 00:13:26 still thinks that 2 is not a prime, which will be a problem in the next iteration, but that's fixable 00:13:47 Oh, right. I thought you were there for a moment. 00:14:10 now where was the definition of pprimes_i 00:15:33 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->Dfalse| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; "ok" 00:15:34 "ok" 00:15:40 egelbot: plisttake 149 (pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2) 00:15:40 {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} 00:15:44 no 00:16:00 egelbot: plisttake 149 (pprimes_sa 4 [_->pnil] 2) 00:16:00 {2, 3} 00:16:48 egelbot: def pprimes_i = [N L-> [pnil->false| (pcons A D)-> [true _->Afalse| false true->pprimes_i N D | _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error plistmember uncons"] (L pforce)];; "ok" 00:16:49 "ok" 00:16:52 egelbot: plisttake 149 (pprimes_sa 4 [_->pnil] 2) 00:16:53 {2, 3} 00:16:58 egelbot: plisttake 149 (pprimes_sa 16 (pprimes_sa 4 [_->pnil] 2) 2) 00:16:58 {2, 3, 5, 7, 11, 13} 00:17:09 [ p.i.40 00:17:09 b_jonas: ┌──┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 00:17:09 b_jonas: │39│0.931642j0.178144 0.931642j_0.178144 0.877747j0.321843 0.877747j_0.321843 0.80763j0.454005 0.80763j_0.454005 0.720253j0.573152 0.720253j_0.573152 0.6168j0.676984 0.6168j_0.676984 0.499364j0.763267 0.499364j_0.763267 0.370586j0.83007 0.370586j_0.83007 0.233484j0.875879 0.233484j_0.875879 0.0913366j0.899664 0.0913366j_0.899664 _0.0524256j0.900914 _0.0524256j_0.900914 _0.194311j0. 00:17:13 what 00:17:16 [ p:i.40 00:17:17 b_jonas: └──┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 00:17:21 um 00:17:24 [ q.i.40 00:17:25 b_jonas: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 00:17:29 b_jonas: |spelling error 00:17:29 b_jonas: | q.i.40 00:17:29 b_jonas: | ^ 00:18:23 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa (B*B) L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))) 00:18:24 (16, {2, 3, 5, 7, 11, 13}) 00:18:32 egelbot: def pprimes_s = [(pprimes_u B L) -> pprimes_u (B*B) (pprimes_sa (B*B) L 2)];; [(pprimes_u B L) -> (B,plisttake 149 L)] (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))) 00:18:32 (256, {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251}) 00:18:44 Looks good! 00:19:57 egelbot: def pprimes = [(pprimes_u B L) -> L] pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))))) 00:19:57 internal:1:132:syntactical:) unexpected 00:20:00 egelbot: def pprimes = [(pprimes_u B L) -> L] pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))) 00:20:04 no 00:20:08 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))))) 00:20:20 egelbot: plisttake 149 pprimes 00:20:21 exception("System:* overflow") 00:20:25 uh 00:20:28 B overflowed 00:20:28 darn 00:21:06 egelbot: (10 < 16.0, 20 < 16.0) 00:21:06 (System:true, System:true) 00:21:24 we can actually represent the bounds as floating point, because they're powers of two, but that's not the right comparison 00:21:44 oh well 00:21:46 20<16.0? 00:22:08 egelbot: 20 < 16.0 00:22:08 System:true 00:22:13 egelbot: 20.0 < 16.0 00:22:13 System:false 00:22:18 egelbot: 10.0 < 16.0 00:22:18 System:true 00:22:23 egelbot: 10 < 16.0 00:22:23 [ #s=: (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251) 00:22:24 System:true 00:22:24 b_jonas: 54 00:22:30 [ q.i.54 00:22:30 b_jonas: |spelling error 00:22:30 b_jonas: | q.i.54 00:22:30 b_jonas: | ^ 00:22:33 [ p:i.54 00:22:34 b_jonas: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 00:22:38 [ s-:p:i.54 00:22:39 b_jonas: 1 00:22:41 [ s-:p:i.53 00:22:41 b_jonas: 0 00:22:49 ok, so the list of the first 54 primes is correct 00:23:06 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))) 00:23:15 egelbot: plisttake 149 pprimes 00:23:17 {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 00:23:19 But you found a bug, right. 00:23:25 I think that goes only up to 65536 00:23:40 but I don't have a tail function so I can't easily check 00:24:08 egelbot: "well actually I can";nop;; [(pprimes_u B L) -> B] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))) 00:24:09 65536 00:24:13 yes, 65536 00:24:20 egelbot: 65536*65536 00:24:21 4294967296 00:24:45 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))) 00:24:54 egelbot: plisttake 149 pprimes 00:24:57 {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 00:25:04 so that's the list up to 1<<32 00:25:16 but we'd need it up to 1<<64 and B overflows there 00:25:18 so 00:25:42 Can you put this program in a script? 00:25:49 I want to study it 00:25:59 egelbot: 1<<63 00:26:00 -9223372036854775808 00:26:03 [[Conveyer]] M https://esolangs.org/w/index.php?diff=77148&oldid=77138 * Abbin21 * (+2) 00:26:46 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_sa (1<<63) [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))))) 00:26:54 egelbot: plisttake 149 pprimes 00:26:54 exception("error plisttake") 00:26:58 on 00:27:34 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_sa (1<<63) ([(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))))) 00:27:34 egelbot: plisttake 149 pprimes 00:27:34 exception("error plisttake") 00:27:44 well go back to the previous version then 00:28:05 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))) # only up to 1<<32 00:28:09 egelbot: plisttake 149 pprimes 00:28:11 {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 00:28:34 spruit11: I don't have a script, just copy it from https://esolangs.org/logs/2020-08-30.html and https://esolangs.org/logs/2020-08-31.html 00:29:34 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_sa (1<<63) ([(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil]))))))) 2) 00:29:40 egelbot: plisttake 149 pprimes 00:29:40 exception("error plisttake") 00:29:59 egelbot: def pprimes = [(pprimes_u B L) -> L] (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_s (pprimes_u 2 [_->pnil])))))) # only up to 1<<32 00:31:41 also wait 00:31:45 this isn't even the right approach 00:31:46 Aargh. I made a compare on all vm objects and now I think all integers are smaller than floats since I want those to be hash mappable. 00:31:52 this would be too slow if you go far 00:32:01 the problem is that we compute the smaller lists too many times 00:32:29 egelbot: 0 < 0.0 00:32:29 System:true 00:32:37 egelbot: 20 < 0.0 00:32:37 System:true 00:32:40 egelbot: -20 < 0.0 00:32:40 System:true 00:33:25 egelbot: true < 0.0 00:33:25 System:false 00:33:40 THis is maybe not a good compare. 00:34:03 we'd need to rewrite it so that pprimes_sa takes an eager list, then rewrite pprimes to first compute the eager list up to the square root of the bound you want 00:34:18 and then call pprimes_sa using that 00:34:26 so you compute each stage of the list only once 00:34:33 the whole lazy list thing is a stupid distraction 00:34:43 it shouldn't even be used 00:34:52 if computers weren't so fast we'd probably have noticed that 00:35:22 so this needs a heavy rewrite 00:35:50 Well. I am in awe. 00:35:55 Also, going to bed. 00:36:06 More bug squashing tomorrow. 00:36:13 Have a nice night. 00:36:14 o/ 00:51:33 so basically just rip out the lazy lists, and you'd get a much smaller code that actually doesn't do a crapton of redundant computation 00:52:19 even then it wouldn't be a very fast prime sieve of course, but it wouldn't just be wasting cycles 01:47:59 -!- adu has joined. 02:06:38 `" 02:06:41 1/1:214) HELLWORLD! It's like HELLO WORLD, except not *quite*. There is more agony. \ 598) elliott, cars aren't perfectly spherical. 02:30:26 `quote cows 02:30:28 395) Look, I often walk my dog through a field with cows in it. And I punched myself in the face once. \ 978) metar lead to canada, more metar and cows \ 984) man at least job applications in biosciences are just like "you are willing to put your arms through a cow" Bike: please send us a link to your CowHub profile of cows you have previously put your arms through on your own time for fun please provide 02:30:28 -!- egelbot has quit (Read error: Connection reset by peer). 02:42:12 Hmm, nothing about spherical cows. 03:28:33 -!- adu has quit (Quit: adu). 04:35:50 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77149&oldid=77143 * JonoCode9374 * (+144) /* Language specifications */ 04:36:26 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77150&oldid=77149 * JonoCode9374 * (+2) /* Language specifications */ 04:46:51 -!- Lord_of_Life_ has joined. 04:48:08 -!- Lord_of_Life has quit (Ping timeout: 256 seconds). 04:48:11 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 06:55:14 [[Conglument]] https://esolangs.org/w/index.php?diff=77151&oldid=77144 * Hakerh400 * (+161) 07:19:09 [[1CP=1ICL]] https://esolangs.org/w/index.php?diff=77152&oldid=77150 * IFcoltransG * (+68) /* Language specifications */ Bettered JonoCode9374's command specificity. 07:19:15 -!- Sgeo has quit (Read error: Connection reset by peer). 07:57:38 Now I added syntax for headings into my poll/survey software, and implemented creating a database schema from the question file. I hope that once this is done, it will be a good way to make and post a survey on the computer. 08:00:15 -!- sprocklem has quit (*.net *.split). 08:00:15 -!- kmc has quit (*.net *.split). 08:05:27 -!- sprocklem has joined. 08:05:27 -!- kmc has joined. 08:10:13 -!- hendursa1 has joined. 08:12:03 -!- hendursaga has quit (Ping timeout: 240 seconds). 08:14:03 @metar lowi 08:14:04 LOWI 310750Z VRB02KT 9999 FEW010 SCT015 BKN080 13/10 Q1019 NOSIG 08:15:00 -!- kritixilithos has joined. 08:54:19 -!- kritixil1 has joined. 08:56:43 -!- kritixilithos has quit (Ping timeout: 240 seconds). 09:03:57 -!- b_jonas has quit (Quit: leaving). 09:05:26 -!- imode has quit (Ping timeout: 240 seconds). 09:06:00 -!- t20kdc has joined. 09:10:26 -!- kritixilithos has joined. 09:12:37 [[Conglument]] M https://esolangs.org/w/index.php?diff=77153&oldid=77151 * Hakerh400 * (+5) 09:12:45 -!- kritixil1 has quit (Remote host closed the connection). 11:12:58 -!- arseniiv has joined. 11:42:07 -!- wib_jonas has joined. 11:45:04 [[AF]] N https://esolangs.org/w/index.php?oldid=77154 * CatLooks * (+9812) Created page with "'''AF''' is an [[esoteric programming language]] created by [[User:CatLooks|CatLooks]]. Programs written on this language consist of numbers 0, 1, 2 or 3. In each line of code..." 11:46:56 [[User:CatLooks]] https://esolangs.org/w/index.php?diff=77155&oldid=76721 * CatLooks * (-19) 11:48:30 [[Language list]] https://esolangs.org/w/index.php?diff=77156&oldid=77145 * CatLooks * (+9) 12:16:31 [[Special:Log/newusers]] create * DGCK81LNN * New user account 12:33:58 ``mkx ../bin/progress//echo $(($RANDOM%111-5))% 12:34:00 ​`mkx? No such file or directory 12:34:03 `mkx ../bin/progress//echo $(($RANDOM%111-5))% 12:34:07 ​../bin/progress 12:34:11 `progress 12:34:12 90% 12:35:03 `progress 12:35:04 22% 12:35:09 `5 progress 12:35:11 1/1:36% \ 45% \ 98% \ 87% \ 73% 12:39:11 wib_jonas: yeah I worried a bit that it would not actually be random but IIRC fizzie put in some effort into injecting some of the hosts randomness into the VM on startup, or something to that effect. 12:39:24 host's 12:43:52 int-e: I prefer a progress number that I can see updating, but we can't render that sanely on IRC 12:44:57 except possibly for very slow processes 12:45:06 it's easier in the terminal 12:46:31 the progress meter I'm currently watching is a binary counter and highly nonlinear 12:46:34 :P 12:47:14 int-e: replace it with https://metacpan.org/pod/Acme::ProgressBar which is as linear as it gets 12:47:55 -!- hendursa1 has quit (Quit: hendursa1). 12:48:12 -!- hendursaga has joined. 12:49:37 what does it do, print 0% at the start and 100% at the end? 12:50:35 haha 12:50:47 that is one way to do it I suppose. 12:51:23 int-e: no 12:51:37 wib_jonas: I skimmed the source in the meantime. 12:51:57 I was kind of close, and very far off at the same time. 12:52:35 in fact, I should probably add a progress bar to this program I have, because it's kind of slow (at least on the largest input file that I have) 12:53:29 it's reading a file so I can just compute progres from the tell 13:00:32 -!- aaaaaa has joined. 13:14:35 ARGH so I cleaned this monitor a few hours ago, and now the control buttons on the monitor are janking out, they sometimes think I'm pressing them even when I'm not and the opposite 13:14:48 they started by changing the brightness of the monitor all the way up 13:15:16 it's a kind of magic :-/ 13:15:55 I managed to dial the brightness down after like 10 minutes of suffering, but now I'm stuck with the contrast too high 13:29:23 -!- kritixilithos has quit (Ping timeout: 240 seconds). 13:48:39 -!- kritixilithos has joined. 13:51:32 -!- lambdabot has quit (Quit: just a moment, please...). 13:59:18 -!- lambdabot has joined. 14:00:36 [[Talk:AF]] N https://esolangs.org/w/index.php?oldid=77157 * CatLooks * (+19) Created page with "AF Discussion page." 14:05:29 [[Truth-machine]] https://esolangs.org/w/index.php?diff=77158&oldid=77147 * CatLooks * (+116) 14:06:31 [[Truth-machine]] https://esolangs.org/w/index.php?diff=77159&oldid=77158 * CatLooks * (-5) /* AF */ 14:06:38 ARGH the monitor is still acting up 14:08:28 Get an exorcist. 14:09:15 I wish I had some actual advice but I don't, at least nothing that isn't absurd (like getting a time machine) or radical and time-consuming (get a new monitor) 14:09:56 Is this a humidity problem that has some hope of fixing itself? 14:10:06 I could always pour in more ispropil-alcohol, hoping it dries out more easily then. Ideally someone would have to disassemble and clean the contacts and PCB then reassemble, but I'm not willing to do that, and I don't think anyone will do that with a cheap TFT monitor. 14:10:23 int-e: yes, that's what I'm hoping, but it's been hours now 14:10:43 and I'm trying to work in the meantime, but the monitor doesn't let me 14:17:18 -!- Sgeo has joined. 14:19:41 [[AF]] https://esolangs.org/w/index.php?diff=77160&oldid=77154 * CatLooks * (+166) 14:23:39 [[AF]] https://esolangs.org/w/index.php?diff=77161&oldid=77160 * CatLooks * (+53) 14:26:15 [[AF]] https://esolangs.org/w/index.php?diff=77162&oldid=77161 * CatLooks * (+4) 14:30:51 [[AF]] https://esolangs.org/w/index.php?diff=77163&oldid=77162 * CatLooks * (+88) /* Conditions */ 14:31:25 [[AF]] https://esolangs.org/w/index.php?diff=77164&oldid=77163 * CatLooks * (-66) /* Conditions */ 14:38:30 [[Conglument]] M https://esolangs.org/w/index.php?diff=77165&oldid=77153 * Hakerh400 * (+2) /* Overview */ 14:42:07 [[Conglument]] M https://esolangs.org/w/index.php?diff=77166&oldid=77165 * Hakerh400 * (+1) /* Syntax */ 14:43:55 I could always pour in more ispropil-alcohol, hoping it dries out more easily then. => that would be a nontrivial effect if it does! I’d expect that alcohol evaporation would compete with the evaporation of a thing that is there now (I haven’t read too far up) and it will slow things down, maybe just a bit. A nontrivial effect would be if eager evaporation of isopropyl makes convection more intense and that makes evapora 14:43:55 tion faster because of fresh air incoming. But that’s too speculative to be sure how much that can appear 14:44:46 ah! so then an advice is to fan those buttons in some manner 14:44:58 arseniiv: nah, the problem is that the liquid has probably already evaporated, but caused damage to the electronics since it was turned on 14:45:07 ohh 14:45:17 at least that's my guess 14:45:19 then adding isopropyl seems risky 14:45:34 it's possible that there is still some moisture in 14:45:59 right now I plugged it out, stole the monitor from a co-worker, and leaving this one turned off for a while 14:46:12 hoping that it will fix itself. if not, then I'm screwed 14:46:21 anyway I think blowing a dry air to the thing may help a bit 14:47:12 specifically to the tiny crevices of the buttons with something like a hand pump or what’s it called, if that’s available 14:49:26 -!- olsner has quit (Ping timeout: 240 seconds). 14:54:59 -!- Arcorann__ has quit (Read error: Connection reset by peer). 14:58:57 -!- olsner has joined. 15:05:28 [[Talk:Andrew's Programming Language]] https://esolangs.org/w/index.php?diff=77167&oldid=75161 * Tetrapyronia * (+452) /* Functions with 2+ Arrays and Programs */ new section 15:28:44 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77168&oldid=77142 * SunnyMoon * (+6) Yes, I have learned about numberlines today. It is a great point of knowledge. Learning is wonderful. 15:30:44 [[User:SunnyMoon]] M https://esolangs.org/w/index.php?diff=77169&oldid=77168 * SunnyMoon * (+61) Final message! 15:50:43 -!- kritixilithos has quit (Ping timeout: 240 seconds). 15:52:21 -!- wib_jonas has quit (Quit: Connection closed). 16:24:10 -!- adu has joined. 16:28:25 -!- kritixilithos has joined. 16:37:52 -!- LKoen has joined. 16:47:03 -!- Lord_of_Life_ has joined. 16:49:26 -!- Lord_of_Life has quit (Ping timeout: 240 seconds). 16:49:53 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 16:51:43 [[Thue]] M https://esolangs.org/w/index.php?diff=77170&oldid=75530 * HDWithZeroes * (+1) 16:59:24 [[Special:Log/newusers]] create * StargazingRobot * New user account 17:06:50 [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=77171&oldid=77117 * StargazingRobot * (+220) Introducting myself 17:14:08 -!- lambdabot has quit (Remote host closed the connection). 17:16:14 -!- adu has quit (Quit: adu). 17:16:23 -!- kritixilithos has quit (Ping timeout: 240 seconds). 17:17:03 -!- lambdabot has joined. 17:24:56 -!- b_jonas has joined. 17:30:56 :t 5 17:30:58 Num p => p 17:33:03 [[,,,]] https://esolangs.org/w/index.php?diff=77172&oldid=77129 * SunnyMoon * (+92) ,,, is a WIP 17:53:15 -!- kritixilithos has joined. 17:53:28 -!- adu has joined. 17:53:32 -!- adu has quit (Client Quit). 17:55:52 -!- kritixilithos has quit (Remote host closed the connection). 17:56:14 -!- kritixilithos has joined. 18:08:14 -!- imode has joined. 19:00:19 -!- kritixilithos has quit (Quit: quit). 19:02:33 -!- TheLie has joined. 19:09:40 'Move fast and break stuff.' Well, the interpreter is broken. 19:18:26 but did you break it faster than before? 19:19:07 "Breakfast and move stuff" could be the motto for a moving company. 19:22:18 spruit11: what did I bring about this time? is it the `def x y = 3 4;` bug? 19:28:49 Nah, I did it myself. I thought let compiled wrongly so I tried to fix that and introduced a bug. 19:29:12 The original semantics turned out to be correct anyway. 19:29:20 It just looks a bit weird. 19:30:30 -!- egelbot has joined. 19:30:54 egelbot: let X Y = 1 2 in Y X 19:30:54 (Local:Dummy00 (1 2)) 19:30:57 vs 19:31:05 egelbot: let (X Y) = 1 2 in Y X 19:31:05 (2 1) 19:31:50 I thought the first should be correct but turns out the second is better. 19:32:39 It's fixed again. 19:35:20 ah 19:35:50 egelbot: def (foo0 foo1) = 3 4 in (foo0, foo1) 19:35:51 internal:1:2:syntactical:combinator or operator expected 19:35:56 egelbot: def (foo0 foo1) = 3 4;; (foo0, foo1) 19:35:56 internal:1:2:syntactical:combinator or operator expected 19:36:05 egelbot: def foo0 foo1 = 3 4;; (foo0, foo1) 19:36:05 internal:1:11:syntactical:= expected 19:36:22 Yah. You can't do that. 19:36:29 makes sense, let X Y = ... should define X as a function 19:36:39 egelbot: def foo0 Foo1 = 3 4;; (foo0 7) 19:36:39 internal:1:11:syntactical:= expected 19:37:07 egelbot: let Foo0 Foo1 = 3 4 in (Foo0 7) 19:37:07 (Local:Dummy20 (3 4)) 19:37:13 huh 19:37:23 egelbot: let Foo0 Foo1 = 3 in (Foo0 7) 19:37:23 (Local:Dummy30 3) 19:37:27 ? 19:37:33 egelbot: let Foo0 = 3 in (Foo0 7) 19:37:33 (3 7) 19:37:37 egelbot: let Foo0 = 3 in Foo0 19:37:37 3 19:37:42 egelbot: let Foo0 Foo1 = 3 in Foo0 19:37:42 (Local:Dummy60 3) 19:37:44 egelbot: let Foo0 Foo1 = 3 in Foo1 19:37:45 (Local:Dummy70 3) 19:38:01 I don't understand what these do 19:38:45 let xx = expr0 in expr1 is just syntactic sugar for [ xx -> expr1 ] expr0 19:39:26 So in you last case you had an abstract of arity two which failed to rewrite on one argument. 19:39:31 *you 19:39:33 god 19:39:36 *your 19:40:00 um 19:40:37 egelbot: let Foo0 Foo1 = 3 4 in (Foo0, Foo1) 19:40:37 (Local:Dummy80 (3 4)) 19:40:59 egelbot: [Foo0 Foo1 -> Foo0, Foo1] (3 4) 19:41:00 internal:1:20:syntactical:] expected 19:41:09 egelbot: [Foo0 Foo1 -> (Foo0, Foo1)] (3 4) 19:41:09 (Local:Dummy90 (3 4)) 19:41:11 ok 19:41:18 egelbot: let (Foo0 Foo1) = 3 4 in (Foo0, Foo1) 19:41:18 (3, 4) 19:41:26 egelbot: [(Foo0 Foo1) -> (Foo0, Foo1)] (3 4) 19:41:26 (3, 4) 19:41:28 ok. 19:41:46 Right, and this is where the weirdity is. '3 4' composes to '(3 4)' as an argument. And there's no visual hint it does that. 19:42:03 I expected that it would bind Foo0 to a function, but egel does not have that syntax 19:42:20 not in let, not in def 19:42:29 ? 19:46:33 Oh, right. You mean `def f X = something` syntax? No, it's all straightforward combinator definitions. 19:47:02 Haskell doesn't have symbolic application expressions, so they can't pattern match an application, so if an application occurs in a pattern, they work like this: 19:48:10 `let (F X) = BODY in EXPR;` is the same as `let F X = BODY in EXPR;` and expands to `[F -> EXPR] [X -> BODY]`, where X is bound in BODY so BODY can have occurrances of the paramter X, but X is not bound in EXPR 19:48:12 let? No such file or directory 19:48:58 and other languages have such syntax too. but egel doesn't, because it wants to decompose application. 19:52:05 But it all makes sense! 19:52:13 Kidding. 19:52:44 Right. let f x = expr is a function def in Haskell. I can see that's confusing. 19:56:12 -!- arseniiv_ has joined. 19:57:56 -!- FreeFull has quit (Quit: Rebooting). 19:58:51 -!- FreeFull has joined. 19:59:18 -!- arseniiv has quit (Ping timeout: 258 seconds). 20:00:32 But it all makes some sense, right? `let (x y) = 1 2 in y x` is `(\(x y). y x) (1 2)` is `2 1`. But weird still. 20:03:01 Slightly embarrassing, though. 20:03:12 Or: a lot. 20:03:42 ¯\_(ツ)_/¯ 20:08:35 I don't really like Haskell's syntax, it's messed up, but this specific part of the syntax is goo 20:09:27 btw Mathematica has this haskell function creation syntax too, and it does have applications that can remain unevaluated and then get destructured, just not with that pattern 20:09:52 but Mathematica has magic underscore markers to disambiguate 20:09:59 so it's not quite the same syntax 20:11:14 They did it on purpose. The `f x = expr` syntax. Under water it's compiled to `f = \x . expr`. My language just makes that explicit again. 21:00:30 spruit11: sure 21:00:59 because it conflicts with other syntax that you use 21:02:24 1ms vs. 4ms... frustrating. 21:03:58 let me see if I can fix yesterday's mistakes and do this properly with non-lazy lists 21:04:57 -!- hendursaga has quit (Remote host closed the connection). 21:05:38 -!- olsner has quit (Ping timeout: 256 seconds). 21:05:53 -!- hendursaga has joined. 21:08:02 egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0];; def listtake_a = [P N S -> [1 _ nil->nil| 1 true _->nil| 1 false (cons A D)-> cons A (plisttake_a P(-1+N)D)| _ _ _->throw"error plisttake" ] (isint N)(N<=0)S ];; def st6 = {08,22,13,59,75,88,94,81,62,54,00,39,60,80,23,82};; listtake 7 st6 21:08:02 internal:1:135:semantical:undeclared plisttake_a 21:08:36 egelbot: def isint = [(X Y)->0|int->0|X::int->1|X->0];; 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 plisttake" ] (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 21:08:36 {8, 22, 13, 59, 75, 88, 94} 21:09:17 I should try to define a listdrop too 21:11:18 egelbot: def listdrop = [N S -> [ true M->M| _ nil->nil| _ (cons A D)->listdrop (-1+N)D ] (N<=0) S ];; listdrop 10 st6 21:11:18 {0, 39, 60, 80, 23, 82} 21:12:06 egelbot: (listdrop -4 st6, listdrop 0 st6, listdrop 15 st6, listdrop 16 st6, listdrop 17 st6, listdop 30 st6) 21:12:06 internal:1:87:semantical:undeclared listdop 21:12:11 egelbot: (listdrop -4 st6, listdrop 0 st6, listdrop 15 st6, listdrop 16 st6, listdrop 17 st6, listdrop 30 st6) 21:12:11 ({8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}, {8, 22, 13, 59, 75, 88, 94, 81, 62, 54, 0, 39, 60, 80, 23, 82}, {82}, {}, {}, {}) 21:14:49 egelbot: listtake 2 (listdrop 6 st6) 21:14:49 {94, 81} 21:14:57 looks good so far 21:15:08 You're a hero for working with alpha software! 21:15:31 spruit11: no I'm not. anyone can write code that is hard to understand. most of the work is done by the short random identifiers. 21:16:16 if I were a hero, I'd install it to HackEso. 21:16:19 Ah. Why do you need an `isint` predicate? Untyped voodoo? 21:16:22 but I'm still lazy. 21:16:47 spruit11: I don't really need that predicate. I just copied it from yesterday, when it seemed like a good idea for some reason. it shouln't be there probably. 21:17:07 Heh. Okay with me. The last days I hack on it every day so it wouldn't be nice to keep in sync anyway. 21:17:16 though on the other hand, I do need a fallback clause in listdrop for non-list inputs 21:17:43 egelbot: def listdrop = [N S -> [ true M->M| _ nil->nil| _ (cons A D)->listdrop (-1+N)D ] (N<=0) S| _ _->throw "error listdrop list" ];; listdrop 10 st6 21:17:43 {0, 39, 60, 80, 23, 82} 21:18:01 egelbot: listdrop 8 2 21:18:01 (Local:listdrop0 8 System:false 2) 21:18:04 um 21:18:21 please? there's a catch-all clause 21:18:38 ah 21:18:41 wrong place 21:18:51 Not in the inner combinator. 21:18:57 egelbot: def listdrop = [N S -> [ true M->M| _ nil->nil| _ (cons A D)->listdrop (-1+N)D| _ _->throw "error listdrop list" ] (N<=0) S ];; listdrop 10 st6 21:18:57 {0, 39, 60, 80, 23, 82} 21:19:01 egelbot: listdrop 8 2 21:19:01 exception("error listdrop list") 21:19:03 ok 21:20:40 You could throw the arguments too to see where it gets stuck on. 21:21:29 or return the non-list tail, I know. it doesn't matter, if it comes up and I need to debug it, I can just modify that definition. 21:21:40 Right. 21:21:54 Still no idea how all of this works. Please continue. 21:22:04 which part? the listtake and listdrop? 21:22:14 Oh, is it done? 21:22:16 they just slice a list, don't you have basically the same things in your prelude? 21:22:19 no, it's not really done, 21:22:26 I want to do the prime sieve properly 21:22:57 I don't see how to do it lazily without continuations or something, so I am interested. 21:23:00 starting from yesterday's code but removing the lazyness, then fix its top level 21:23:09 no, I'm *removing* the lazyness 21:23:14 Oh. 21:23:14 the lazyness was a stupid idea for it 21:23:47 Right, my examples were there to test how to do laziness in my language. Looking for more ideas. 21:25:40 hmm, I can't see the latest version of the definition of pprimes_i 21:25:50 -!- olsner has joined. 21:26:26 oh , here it is 21:28:02 egelbot: def primes_i = [N L-> [nil->false| (cons A D)-> [true _->Afalse| false true->pprimes_i N D| _ _->throw"error pprimes_i =="] (0==(N%A)) (A*Athrow"error pprimes_i uncons"] L] 21:28:02 internal:1:92:semantical:undeclared pprimes_i 21:28:13 egelbot: def primes_i = [N L-> [nil->false| (cons A D)-> [true _->Afalse| false true->primes_i N D| _ _->throw"error primes_i =="] (0==(N%A)) (A*Athrow"error primes_i uncons"] L] 21:29:39 ah yes, pprimes_sa needs more serious modifications 21:31:13 hmm, that's actually harder 21:31:41 I need a listrev 21:33:50 I forgot all my functional programming. how do you implement rev in a pure eager language? 21:33:53 hmm, nice storm again 21:35:23 THere's a reverse in the prelude. 21:36:57 ah yes, isn't rev the one you can't even write properly without either using mutability temporarily or some really crazy overkill? 21:37:05 let me look at your prelude 21:37:15 def reverse = foldl (flip cons) nil 21:37:20 Is that what you need? 21:38:37 maybe... I'm looking at that definition and foldl's right now 21:39:43 ah yes, I get it 21:39:44 thanks 21:40:27 egelbot: listrev_a [ S nil -> S| S (cons A D) -> listrev_a (cons A S) D ];; listrev st6 21:40:27 internal:1:2:semantical:undeclared listrev_a 21:40:44 egelbot: def listrev_a [ S nil -> S| S (cons A D) -> listrev_a (cons A S) D ];; def listrev = listrev_a {};; listrev st6 21:40:44 internal:1:16:syntactical:= expected 21:40:49 egelbot: def listrev_a = [ S nil -> S| S (cons A D) -> listrev_a (cons A S) D ];; def listrev = listrev_a {};; listrev st6 21:40:50 {82, 23, 80, 60, 39, 0, 54, 62, 81, 94, 88, 75, 59, 13, 22, 8} 21:41:55 egelbot: pack (listrev (unpack "policeman")) 21:41:55 "namecilop" 21:42:04 thanks for the pointer 21:44:36 np 21:49:24 egelbot: def primes_sa = [B L F R-> [ true S-> [ true->S R | _->S(cons F R) ] (primes_i F L) | _ _->R ] (F {13, 11, 7, 5, 3, 2} 21:49:58 egelbot: def primes_sa = [B L F R-> [ true S-> [ true->S R | _->S(cons F R) ] (primes_i F L) | _ _->R ] (Flistrev (primes_sa B L 2 {})];; primes_s 16 {2,3} 21:49:58 internal:1:137:syntactical:= unexpected 21:50:03 egelbot: def primes_sa = [B L F R-> [ true S-> [ true->S R | _->S(cons F R) ] (primes_i F L) | _ _->R ] (Flistrev (primes_sa B L 2 {})];; primes_s 16 {2,3} 21:50:03 {2, 3, 5, 7, 11, 13} 21:50:15 egelbot: primes_s 4 {} 21:50:15 {2, 3} 21:52:49 egelbot: def primes_16f = primes_s (1<<(1<<4)) (primes_s (1<<(1<<3)) (primes_s (1<<(1<<2)) (primes_s (1<<(1<<1)) {})));; var primes_16 = primes_16f;; listtake 149 primes_16 21:52:49 internal:1:128:syntactical:= unexpected 21:53:09 egelbot: def primes_16f = primes_s (1<<(1<<4)) (primes_s (1<<(1<<3)) (primes_s (1<<(1<<2)) (primes_s (1<<(1<<1)) {}))));; var primes_16 = primes_16f;; listtake 149 primes_16 21:53:09 internal:1:111:syntactical:) unexpected 21:53:20 egelbot: def primes_16f = primes_s (1<<(1<<4)) (primes_s (1<<(1<<3)) (primes_s (1<<(1<<2)) (primes_s (1<<(1<<1)) {})));; listtake 149 primes_16 21:53:20 internal:1:127:semantical:undeclared primes_16 21:53:23 egelbot: def primes_16f = primes_s (1<<(1<<4)) (primes_s (1<<(1<<3)) (primes_s (1<<(1<<2)) (primes_s (1<<(1<<1)) {})));; listtake 149 primes_16f 21:53:29 oops 21:53:34 egelbot: "ping" 21:53:42 spruit11: sorry 21:53:43 {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 21:53:43 "ping" 21:53:47 oh, it's alive! 21:54:03 egelbot: var primes_16 = primes_16f;; listtake 159 primes_16f 21:54:03 internal:1:16:syntactical:= unexpected 21:55:00 spruit11: how does var work? 21:55:45 egelbot: length {3,1,4} 21:55:45 internal:1:2:semantical:undeclared length 21:56:45 val 21:57:02 egelbot: egelbot: listlen_a = [P nil->P| P (cons A D)->listlen(1+P)D| _->throw"error listlen" ];; def listlen = listlen_a 0;; listlen {3,1,4} 21:57:02 internal:1:9:syntactical: unexpected 21:57:18 egelbot: val f = print "hello"; 5 21:57:18 hello 21:57:22 egelbot: egelbot: listlen_a = [P nil->P| P (cons A D)->listlen(1+P)D| _->throw"error listlen" ] 21:57:23 internal:1:9:syntactical: unexpected 21:57:24 egelbot: f 21:57:24 5 21:57:30 egelbot: egelbot: def listlen_a = [P nil->P| P (cons A D)->listlen(1+P)D| _->throw"error listlen" ] 21:57:30 internal:1:9:syntactical: unexpected 21:57:49 egelbot: def listlen_a = [P nil->P| P (cons A D)->listlen(1+P)D| _->throw"error listlen" ];; def listlen = listlen_a 0;; listlen {3,1,4} 21:57:49 internal:1:43:semantical:undeclared listlen 21:57:59 egelbot: def listlen_a = [P nil->P| P (cons A D)->listlen_a(1+P)D| _->throw"error listlen" ];; def listlen = listlen_a 0;; listlen {3,1,4} 21:57:59 3 21:58:03 It reduced the body and assigns the result to the combinator. Handy when you don't want to do a computation more often. 21:58:07 *reduces 21:58:21 egelbot: val primes_16 = primes_16f;; listlen primes_16 21:58:39 6542 21:58:53 egelbot: listdrop ((listlen primes_16) - 39) primes_16 21:58:53 {65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519, 65521} 21:59:03 ok, so those are the primes up to 64K 22:00:03 Nice! 22:01:26 now ideally I'd need to write a function that lists the primes in any interval, say F to B: for this it would first have to compute the primes form 0 up to about sqrt B with one call of let L = primes_s (...) primes_16; then compute the list of primes from B to F with a call to primes_sa B L F {} 22:01:54 which works because B is less than 1<<64 and so the fourth root of B is less than 1<<16 and so primes_16 is long enough for the first operation 22:02:02 Looks like you're already stretching the limit. Egel is very slow. 22:02:05 but instead I'll just say I'm leaving that as an exercise to the reader 22:02:25 spruit11: or I made some stupid mistake which is why my code is too slow 22:02:28 that is more likely 22:02:46 Nah. Don't think so. 22:03:10 you could probably find out by adding debugging print statements to trace the code, but I won't do that either now 22:03:21 (or unsafe mutability to trace it easier) 22:04:14 Could you put it in a pastebin? I'll read it then. I can't really reconstruct from irc what's going on. 22:04:35 I can try, yes 22:04:42 egelbot: tofloat 9999 22:04:42 9999.000000000000 22:04:47 egelbot: Math.sqrt (tofloat 9999) 22:04:47 internal:1:2:semantical:undeclared Math 22:04:56 : 22:04:58 egelbot: Math:sqrt (tofloat 9999) 22:04:58 99.99499987499375 22:05:02 yes, I remembered this time 22:05:10 egelbot: Math:ceil (Math:sqrt (tofloat 9999)) 22:05:10 100.0000000000000 22:05:20 egelbot: toint (1+ (Math:sqrt (tofloat 9999))) 22:05:20 exception("System:+ bad arguments") 22:05:27 egelbot: toint (1.0 + (Math:sqrt (tofloat 9999))) 22:05:27 100 22:05:31 egelbot: toint (1.5 + (Math:sqrt (tofloat 9999))) 22:05:31 101 22:05:34 -!- gitlogger has quit (Excess Flood). 22:05:35 something like that 22:09:10 egelbot: # nonsense 22:09:10 internal:1:12:syntactical:primary expression expected 22:09:17 egelbot: 1 # so picky! 22:09:18 1 22:09:28 ;) 22:09:29 you can't even put a comment on its own on a line? really? 22:09:39 that seems seriously crippled syntax 22:09:50 Hey! 22:10:02 Put you're right. I'll fix that. 22:10:08 But 22:11:26 Rosetta code made me think about the shortest egel program. An empty file. Stuff like that is important for some reason. 22:18:26 https://dpaste.com/2FBJZGE5U spruit11 22:19:01 Oh nice! 22:19:16 spruit11: I guess that counts now that you have val so you can reasonably have programs with the computation split to several expressions 22:19:32 so it's not too weird anymore for a program to have no single top-level expression 22:19:53 I'll put it in a file and see whether I can understand it from there. 22:20:06 not that it matters too much, you can just have the language definion explicitly say whether that's a valid program or not, even if it has to be an exception from the normal rules 22:20:10 Yah. But adding ;; made a lot of stuff nicer. 22:20:17 Good idea. 22:20:36 As well as the 'pretty' printing stuff. Nice too. 22:21:41 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”). 22:22:11 spruit11: as for pretty printing, I see that your closures now have more descriptive names, they include the name of the def in which the body apperas 22:24:28 Myah. They always did that but I now put them into a local namespace. I had an idea about printing the bodies of them (if local, print a string representation) but didn't pan out as I wanted. 22:24:58 that might just make the output unreadable though 22:25:09 symbolic names are probably better 22:25:59 Yah. But could make mobile code easier. That's a goal I once had. Still thinking about it. 22:26:28 maybe you need multiple printers, or a printer with options, in that case 22:26:32 But I guess I'll once adapt to a wire protocol. Which isn't very nice. 22:27:27 Mwa, the problem is that once compiled, I lose all textual information. Which is why I sometimes regret not impementing an even more braindead rewriter. 22:27:38 hmm wait, let me actually check that list 22:28:16 egelbot: listdrop (6542 - 39) primes_16 22:28:17 {65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519, 65521} 22:28:51 [ ]s=: p: (6524-39) + i.39 22:28:51 b_jonas: 64901 64919 64921 64927 64937 64951 64969 64997 65003 65011 65027 65029 65033 65053 65063 65071 65089 65099 65101 65111 65119 65123 65129 65141 65147 65167 65171 65173 65179 65183 65203 65213 65239 65257 65267 65269 65287 65293 65309 22:29:13 [ e=: 65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519, 65521 22:29:13 b_jonas: |ok 22:29:17 [ e-:s 22:29:17 b_jonas: 0 22:29:28 [ (#e),(#s) 22:29:29 b_jonas: 39 39 22:29:41 If I would design something with the aim of mobile code, I would now remove the combinator table (no more recursive defs) and bytecode generation (everything remains a term). 22:30:20 [ ]s=: p: (6542-39) + i.39 22:30:20 b_jonas: 65101 65111 65119 65123 65129 65141 65147 65167 65171 65173 65179 65183 65203 65213 65239 65257 65267 65269 65287 65293 65309 65323 65327 65353 65357 65371 65381 65393 65407 65413 65419 65423 65437 65447 65449 65479 65497 65519 65521 22:30:24 [ e-:s 22:30:25 b_jonas: 1 22:30:26 good 22:30:31 so the result is correct 22:30:35 always remember to test the result 22:30:37 Great! 22:31:05 spruit11: so that's another idea for egel2? 22:31:48 Myah. But you also lose a lot. Like mutual recursive defs are a pain. 22:32:05 To write yourself, I mean. 22:32:21 And even more abysmal performance, I guess. 22:33:13 Anyway, Wadler is already way more ahead of that with his typed contract language for some cybercoin scheme. 22:33:58 ahh yes, cybercoins. 22:34:16 `coins 22:34:18 ​bywcoin homagnccoin tedcoin fobcoin bitwirequarcoin guitafncoin tempr0mcoin symencoin aeolbcoin batcoin orticonvolucecoin pertychcoin ophysouttcoin inecoin gladhacoin tributecoin iagcoin xcvidolcoin metergoicoin govecoin 22:34:26 I still have some hope egel could be useful for short, fast, and dirty jobs. But I don't think I'll ever find a programmer who would use it for that. 22:35:12 You can only buy concert tickets for tribute acts with tributecoin. 22:36:07 spruit11: you could use it for short, fast, and dirty jobs yourself. that's how some of the toy languages work, like blsq, and some languages that later become big start that way too 22:38:52 Yah. Maybe I'll try a cgi thing once. 22:40:28 spruit11: you could try it for golf problems, I think that will reveal what you're still missing from the builtins for example 22:40:55 Golf problems? 22:41:01 yes 22:41:14 even if you're not particularly golfing them 22:41:17 just solving them 22:41:26 it could be other short programming problems too 22:41:28 Shortest code stuff? I forgot what golfing means. 22:41:43 yes 22:43:02 Yah. Well, one thing is that egel is too general somehow. Meaning, it isn't particularly good at anything. So maybe I'll try to find a thing it could be good at. 23:11:35 I don't really like Haskell's syntax, it's messed up => is there an exposition on this somewhere? It would be interesting to compare notes (not that I think I don’t like the syntax but maybe I have some implicit worries about it and they will float up to the consciousness) 23:11:47 -!- arseniiv_ has changed nick to arseniiv. 23:12:10 hm I’m unfortunately very late already, gtg bye! 23:14:11 now I wonder if there something like code golf for testing conlangs this way 23:20:04 -!- TheLie has quit (Remote host closed the connection). 23:25:15 -!- t20kdc has quit (Remote host closed the connection). 23:26:35 -!- arseniiv has quit (Ping timeout: 246 seconds).