00:26:38 * ihope sends something to this chat channel 00:34:21 -!- Arrogant has joined. 00:43:20 * lament lets his irc client do it for him 00:44:13 * ihope is jealous 00:46:58 Ook! I just realized Haskell's imperative composition thingamajig is "tricky". Then again, maybe not. 00:58:13 Yep. I think Haskell's "imperatives" aren't compatible with those of Lazy K. 00:59:40 Lazy K just needs two more "characters": GET and END. 01:01:57 Hmm, but end-of-list could easily represent this END character, and GET isn't really required anyway. 01:02:04 So yep, they're compatible. 01:03:44 -!- Arrogant has quit ("I AM QUIT HAVE A NICE DAY"). 01:16:48 -!- ihope has quit ("Chatzilla 0.9.68.5 [Firefox 1.0.7/20050915]"). 01:35:09 * Sgep calls his language MKBL 01:35:17 MetaKit Based Language 02:30:37 BBL 04:11:13 -!- kipple has quit (Read error: 110 (Connection timed out)). 04:15:59 Night all 04:55:47 Night all 04:59:51 -!- Sgep has quit. 05:15:06 -!- sekhmet has quit (Read error: 113 (No route to host)). 05:18:31 -!- sekhmet has joined. 05:27:24 hmm... I wonder if I can change Linguine if it remains 100% backward compatible with the original? :) 05:28:29 I think I can make jix's life easier by treating jump locations like y values.. first it's a number, so jump 100, but jump *100 would jump to the line given in cell 100 05:29:39 that would make subroutines a lot easier.. could set the return line number then the function can jump to it 05:29:59 bah.. gonna do it.. the spec will just need to be amended :) 05:45:44 wish I would have thought of it before.. seems obvious now :/ 06:08:12 amended version uploaded 06:17:46 and uploaded again.. bug, fixed now 06:18:31 this is cool 06:19:04 now I can write something very similar to c functions 06:19:27 by just adding that one thing .. hehe 06:21:41 -!- Arrogant has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:17:24 added a pi calculator and general mult/div/ascii->int examples 08:17:29 and now I'm going to bed :) 08:17:38 -!- calamari has quit ("Leaving"). 08:30:48 -!- kipple has joined. 09:37:54 -!- Arrogant has quit (Read error: 113 (No route to host)). 09:59:31 -!- Keymaker has joined. 10:39:31 LOL. I was reading an example of how to use Yacc and Lex, but I kind of lost my concentration when they started talking about the "analizer" 10:42:25 :) 10:45:59 hah 11:54:06 -!- kipple has quit (Read error: 104 (Connection reset by peer)). 11:55:12 -!- kipple has joined. 12:07:50 fizzie: snowin' there? 12:09:18 * Keymaker grabs the camera and goes to take some snow pictures 12:09:19 bbl 12:10:44 I'm afraid fizzie is asleep, but living in the neighbourhood I can say that it is indeed snowing. Slightly. 12:26:50 back. ok, nice :) and cool, in neighbourhood 12:26:58 you know fizzie personally, i assume 12:31:04 Yes. 12:36:15 ineiros: what's your favourite esolang? :) 12:46:14 Can't say I have one, the esoteric bug hasn't really bitten me... yet. :) Though I find "natural language" esolangs, such as Perligata and Shakespeare rather fascinating. 12:46:57 hehe :) 13:12:34 -!- Keymaker has quit (Read error: 113 (No route to host)). 13:29:49 -!- jix has joined. 13:35:24 *Yawn* 14:48:18 Perligata? never heard of that one... 14:48:27 * kipple googles 15:58:11 -!- ihope has joined. 15:58:49 I decided once again that Haskell's IO types are not compatible with Lazy K programs. 16:01:51 But I found a way to do infinity. Just have an 'a' combinator, which takes a Church numeral and returns the appropriate infinity. 16:02:21 Adding a 0 and a + combinator should be able to make anything :-) 16:02:43 And an i combinator, I suppose. 16:04:04 -!- ihope has quit ("Chatzilla 0.9.68.5 [Firefox 1.0.7/20050915]"). 18:40:43 -!- calamari has joined. 18:40:49 hi 18:41:13 moin calamari 18:41:15 hi jix 18:41:39 last night I improved Linguine slightly.. should make that c->Ling compiler must easier 18:41:55 the only thing I changed was to allow dereferencing of jumps 18:41:55 yeah i thought linguine had that feature 18:42:08 it does now :) 18:42:13 (and i noted it because i tried pi with the old interpreter) 18:42:28 hehe 18:42:43 there is one feature i'd like to see .. thats bitshift right by 1 bit... 18:43:00 divide by 2 18:43:04 yeah 18:43:21 i managed to implement it somewhat fast in software (it's speed is log(n)*some_factor now...) 18:43:46 but that code is messy and it's really needed often 18:44:01 I put up generic multiply and divide routines 18:44:16 they aren't too fast, tho 18:44:30 yeah i was talking about numbers like 10000000000000000000000000000000000000000000000000000000000000000 18:44:39 but my div by 2 routine does that pretty fast now 18:44:58 oh and i used your read-a-number routine in my linguine program.. is that ok? 18:45:07 certainly 18:46:04 here is my collatz program: http://rafb.net/paste/results/Qfq8AC85.html 18:46:25 http://mathworld.wolfram.com/CollatzProblem.html (here is more information) 18:46:32 thanks, was just about to ask :) 18:46:50 just enter a number and it calculates all steps until it reaches 1 18:47:50 oh and i wouldn't call my language c anymore.. i made too many changes (some because they look nicer some because i don't know how to parse them) 18:48:16 the most important change is that casting is done in this way int:bla instead of (int)bla 18:48:43 is that for parsing? 18:48:52 yes 18:49:17 btw, does it accept a program on stdin and output on stdout ? 18:49:28 because the parser i'm using is too stupid to get the difference between (int)bla and (bla) 18:49:34 if so, it may be able to be rewritten in Linguine :) 18:50:43 I translated that pi program.. it was originally Haskell, someone converted it to Ruby, then I converted it to Python and finally to Linguine 18:50:47 hah that would be difficult 18:50:56 because i'm using a parser generator 18:51:03 oh.. yeah 18:51:07 that generates ruby code 18:51:16 and the other parts are all written in ruby too 18:51:18 -!- Keymaker has joined. 18:51:32 I'm used to writing my own parsers :) haven't figured out how to use the aut ones yet 18:51:39 auto 18:51:41 nice looking program jix (can't run it, but looks good visually) 18:51:44 hi Keymaker 18:51:47 hi 18:51:58 Keymaker: why can't you run it? 18:51:59 yeah it's very compact :) 18:52:13 i don't have python on this computer (this isn't my computer) 18:52:20 besides, this is old and doesn't have much memory 18:52:53 line 4 to 8 is my fast divide by 2 routine 18:52:53 does it have any compilers or interpreters ? 18:52:59 the problem with it is that it needs log(n) memory cells... so i can't use it in my compiler 18:53:16 that's why i'd like to see that divide by 2 instruction 18:56:00 I'm afraid to add any instructions.. because then it might be wondered why I don't add > or !=, or and/or/xor/not, ^, etc :) 18:56:28 Keymaker: what do you think.. does it become less esoteric if I add multiply and divide? 18:56:44 noo 18:56:48 not multiply and divide 18:56:52 that would make it less esoteric 18:57:36 but a divide by 2 instruction would make it only a pico-bit less esoteric but would make some calculations a lot faster 18:57:44 I can cell the right shift >.. that would be funny :) 18:57:48 cell->call 18:58:49 calamari: no 18:58:49 can a general division routine be improved with divide by 2? 18:59:03 calamari: i mean "no, it doesn't become that less esoteric" 18:59:05 hmm i think it can 18:59:24 computers are using right (and left) shifts for division 18:59:30 true 18:59:47 okay I'll add it 19:00:11 what is that right shift? 19:00:36 a/2 == a >> 1 19:00:57 i don't know what ">>" does :) 19:00:58 calamari: wait 19:01:02 it will be x>y 19:01:08 let me see if it really improves generic division 19:01:11 okay 19:01:31 Keymaker: it's a right bit shift 19:02:15 Keymaker: for example 10 in binary is 1010.. if I shift the bits right I get 101 (the 0 is lost), and 101 = 5 19:02:33 so it's the same as 10 / 2 = 5 19:03:08 of course if it was 11 (1011) you still get 5 :) 19:03:34 cool, didn't know of that trick 19:03:57 jix: actually, I seem to remember implementing division for the 6502 19:04:05 it was binary division if I recall 19:04:17 you have to remember that we use bignums 19:04:22 so it only works on 'evens'? 19:04:33 not it floors on odds 19:04:35 -t 19:04:52 well it works on odds too, it just drops any remainder 19:06:25 i think it helps 19:06:28 you can do: 19:06:31 1000/3 19:06:31 500/1+500/3 19:06:31 500/1+250/1+250/3 19:06:33 ... 19:06:52 wait... 19:06:53 no 19:06:56 stupid me 19:07:02 very stupid me 19:07:09 1000/3 != 666 != 833 19:10:37 http://courses.cs.vt.edu/~cs1104/BuildingBlocks/divide.030.html there is a shift the divisor one place right 19:11:00 heh, i was just browsing that page :) 19:11:29 that is binary division 19:12:17 yeah i know.. but i wasn't getting the right shift in there... 19:12:21 those concatenations use *10 19:12:35 so that part will be slow 19:12:56 actually nm 19:12:59 times two 19:13:00 no a+a = a * 10 (base 2) 19:13:01 lol 19:13:18 there are are 10 kinds of people... :) 19:13:23 yeah... 19:14:04 that gives remainder too, which is very nice 19:14:24 * calamari codes it up for his pi program 19:15:18 and even * 10 (base 10) is easy thats b = a+a; c=b+b; result = c+c+b 19:15:41 or b = a+a+a result = b+b+b+a 19:17:16 yeah 19:17:24 I use that often in my pi program 19:17:32 even did *3 and *4 that way 19:17:53 if you do a+a then a+a again that is *4 19:18:18 you do that in your readnum routine too 19:18:30 yep.. that is for times 10 19:18:55 didn't realize you were checking it out that closely :) 19:19:13 my program is the first one that uses the | operator?! 19:19:18 I think so 19:20:36 cool 19:21:08 okay, uploaded.. haven't tested it yet, lol 19:21:19 oh and there is no way to generate a random number... 19:21:43 I won't add that one 19:21:50 ok 19:22:38 I had a time funciton in Numberix (for random number seeds), but I don't think it was ever used hehe 19:24:12 1[1?,1~10:2,0+*0,2=*0,0+*0,0+*0,0+*2,0+*1,0-48]1 19:24:13 2[0#,5=10,5$,0~1:0,1=*0,1|1,1<-1:3,0>1]2 19:24:13 3[1=*0,0+*1,0+*1,0+1]2 19:24:16 that's the new collatz 19:24:46 is it faster? 19:24:50 yes 19:24:52 cool 19:25:04 a lot 19:25:10 nice 19:26:26 good job hehe 19:26:59 now I need to decipherthat and steal the algorithm >:) 19:27:55 oh wait.. nm 19:27:59 it's not there hehe 19:29:54 dc -e '10 20 ^ 1 - p' | xargs echo | xargs echo | tr -d ' ' | time python linguine.py collatz2.lng => 1.57 real 0.42 user 0.13 sys 19:30:22 dc -e '10 20 ^ 1 - p' | xargs echo | xargs echo | tr -d ' ' | time python linguine.py collatz.lng => 9.63 real 4.48 user 0.24 sys 19:30:37 that's a factor of more than 8 (user time) 19:31:24 HAH i know how to left shift using > .... 1>-10 19:32:39 lol 19:32:57 NOO! 19:33:00 that doesn't work 19:33:02 stupid python 19:33:08 ValueError: negative shift count 19:33:24 ruby knows how to negative shift! 19:33:41 that's what you get for trying to use undefined behavior :) 19:33:57 it wasn't undefined for me.. i'm used to ruby 19:34:03 I should do that tho... you can use a neg everywhere else 19:34:28 what does it do with >>0 19:34:32 Shifts _fix_ left _count_ positions (right if _count_ is negative). 19:34:32 * calamari checks 19:34:34 not undefined! 19:34:41 ruby defines that 19:34:49 >>> print 4 >> 0 19:34:49 4 19:35:09 but there's an error in the documentation... >> and << share the SAME doc... 19:38:24 okay uploaded 19:39:00 I like the -y trick.. it seems to fit with the lang 19:42:04 shortened collatz 19:42:04 1[1?,1~10:2,0>-1,2=*0,2>-2,0+*2,0+*1,0-48]1 19:42:05 2[0#,5=10,5$,0~1:0,1=*0,1|1,1<-1:3,0>1]2 19:42:05 3[1=*0,0+*1,0+*1,0+1]2 19:43:28 is it faster that using addition, or just shorter? 19:43:50 shorter 19:43:55 but that code is only executed once 19:44:57 any opinions on how I can get the high order bit of a number? 19:45:12 there is no high order bit in bignums 19:45:41 not sure how I can implement that binary division then 19:46:04 http://courses.cs.vt.edu/~cs1104/BuildingBlocks/divide.030.html 19:46:25 yeah .. but this line is the problem: If that portion of the dividend above the divisor is greater than or equal to the divisor 19:47:54 I found my binary division routine... it also requires getting at the leftmost bit 19:48:12 i know how to do it without that 19:48:58 * calamari thinks about it 19:57:29 aha.. if the number is negative then the high order bit is 1, otherwise it is 0 19:58:02 yes but that doesn't help if you use that algorithm you'd need infinity iterations 19:58:09 yep 19:58:31 any ideas 20:09:40 hmm the python << doesn't support bignums well ( i think) 20:09:44 linguine.py:291: FutureWarning: x< how can x< dunno.. but it seems to be messing up my lang hehe 20:11:06 perhaps we should remove > again 20:11:14 no! 20:11:23 i'm done with > fast div 20:11:46 but i can't test it with large numbers because of pythons stupid >> i'm searching a workaround atm 20:12:02 oh, is >> giving a problem too ? 20:12:16 no... 20:12:27 replace x << y with x*(2**y) 20:12:31 that should fix the problem 20:12:34 ok 20:12:38 because it works with bignums as it should 20:13:28 set_cell(x, get_cell(x) * (2**(-y))) 20:15:26 uploaded.. I think I may have accidentally put your collatz in the archive last time.. but it was removed this time 20:15:51 feel free to put my collatz (the latest version) in the archive 20:15:56 just add a not that it's written by me 20:15:59 +e 20:16:21 I'll have it separate so it is more visible 20:16:48 http://rafb.net/paste/results/igb2Op10.html 20:17:13 i used large numbers for lables and mem positions because you have to change them if you use the routine in your program 20:17:24 and it is fast... 20:18:08 user 0m0.324s for 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999/7 20:18:28 multiplication is somewhat trivial 20:18:33 can I use that in my pi program? 20:18:38 yes 20:18:41 thanks 20:18:51 all my linguine code snippets are public domain 20:19:43 you may want to remove the last line and do the 44>1 at some other position 20:19:50 because it returns the result *2 by default 20:21:31 perhaps I'm missing something but I think I can remove line 1001 20:21:45 and combine it with 1000 20:23:08 no.. take the case 55==66 20:24:21 and you have to re-init 77 to 0 if you call it a 2nd time 20:24:37 I mean this: 20:24:39 1000[55<*66:1002,66>-1,77+1]1000 20:24:39 1002[44>-1,99=*55,66>1,77-1,77<0:*-1,55<*66:1002,55-*66,44+1]1002 20:24:53 ohw.. yes 20:25:16 i missed the case 55==66 a long long time ago and had to use two lines 20:26:16 i really like linguine 20:26:25 yeah, it's very nice 20:27:05 oh and my LinC compiler executes lines=lines.sort_by{rand} after compiling ;) 20:27:38 but i still have to write the part between parsing and calling that... 20:32:02 hmm I think I messed it up.. lol 20:32:12 100[-5=*-2,-4=*-3,-6=0]101 20:32:12 101[-5<*-4:102,-4>-1,-6+1]101 20:32:12 102[-2>-1,99=*-5,-4>1,-6-1,-6<0:*-1,-5<*-4:102,-5-*-4,-2+1]102 20:32:22 12/4 gave me 102 20:32:46 102?! 20:32:48 '-1=return jump 20:32:48 '-2=a 20:32:48 '-3=b 20:32:48 '-4=copy of b 20:32:48 '-5=copy of a 20:32:49 '-6=temp 20:33:10 I just removed the remainder since I did not need it 20:33:26 then remove 99=*-15 20:33:30 yeah I did 20:33:33 oh 20:33:35 oops I thought I did 20:33:43 well it shouldn't matter in any case 20:34:50 this one is a=a/b 20:35:09 (trying to make it act like my original so I can plug it in) 20:36:00 12/4 = 120, 12/3 = 200 20:36:16 wait you can't switch between -2 and -4 in the code 20:36:32 wait.. i have to check my code 20:36:40 yeah I probably changed too much at once 20:37:48 * calamari tries the original 20:39:04 yeah I messed it up someplace.. I'll try again 20:39:15 remove the a>b condition 20:39:28 nothing to do with your problem 20:39:37 but it works without that restriction 20:39:47 cool 20:40:07 it seems that line 1003 is needed 20:40:17 the answer doesn't seem to be *2 20:41:17 but line 103 does nothing more than divide by 2 20:41:40 (with *2 i wasn't talking about the position 2 points to) 20:44:10 does it work now? 20:46:17 calamari: ping 20:51:36 got it.. it was my silly mistake (just finished :) 20:51:39 200[-5=*-2,-4=*-3,-2=0,-6=0]201 20:51:39 201[-5<*-4:202,-4>-1,-6+1]201 20:51:39 202[-2>-1,99=*-5,-4>1,-6-1,-6<0:203,-5<*-4:202,-5-*-4,-2+1]202 20:51:39 203[-2>1]*-1 20:51:52 remove 99=*-5 20:52:18 you can do *x as a jump target on the end of a line too? 20:52:24 yep 20:52:32 cool 20:53:14 my div routine is surprisingly compact... 20:53:26 i thought it would be a lot bigger 20:56:28 I'm not seeing a huge speed difference between the two 20:56:52 for two lines of pi it took 24 seconds with the new and 25 with the old 20:57:18 maybe the division wasn't the slow part in it 20:57:30 or the numbers are too small to see the difference 20:57:32 that time it was 24 secs 20:57:35 yeah maybe 20:57:51 it gets some huge numbers.. but the numbers it is dividing by are relatively small 20:58:04 wait if the dividend is about the same as the divider both are equivalent fast 20:58:23 a is large, b is small 20:58:38 in your pi thing? 20:58:40 yeah 20:58:42 -!- ihope has joined. 20:58:51 wait no 20:58:52 how does your divide work 20:58:56 that was multiply 20:59:01 result is small a and b are about the same size.. right? 20:59:07 jix: repeated subtractions 20:59:14 dunno I will check 20:59:16 yeah then a and b are about the same size 20:59:38 (it has to be so... if a is big and b is small repeated subtraction is very slow) 21:00:36 brb 21:00:56 yep 21:00:58 812972754127758592775274035577391041579186330552469296119363243600296019639208984375000318537578519104536384176423385561174750764872736614900378433832599380450864237060546875 21:01:17 hmm lost the division sign there 21:01:41 812972754127758592775274035577391041579186330552469296119363243600296019639208984375000 / 318537578519104536384176423385561174750764872736614900378433832599380450864237060546875 21:01:49 some weird char there 21:02:01 It's the A-in-a-box. 21:02:10 in what encoding? 21:02:14 hehe nothing here 21:02:32 but in my term it's a division symbol 21:02:38 Hmm. 21:02:56 I've been having problems with A's-in-the-boxes lately... 21:02:56 calamari: what encoding are you using? 21:03:21 dunno.. I should set it to utf 8 21:03:35 I think that's what I'm using. 21:03:40 calamari: no, just stick to ascii :) 21:04:04 I guess x-chat picks its own default 21:04:40 anyhow those numbers are quite large 21:04:56 wouldn't want to calculate that by hand :) 21:07:33 I'm trying to calculate ack 4 1 by hand. 21:07:58 lol 21:08:25 So far, I have ack 3 (ack 1 (ack 1 (ack 1 (ack 0 (ack 1 4))))). 21:09:14 why not ack 4 3 ? :) 21:09:21 Ack! 21:12:07 ack 3 (ack 1 (ack 1 (ack 1 7))) 21:13:35 I guess the answer is 65533 ? 21:13:40 Yep. 21:15:16 Lemme define an alternative ack function... 21:16:00 ack [n:0:xs] = ack [n+1:xs] 21:16:21 Uh, wait, no: 21:16:33 ack [n:0:xs] = n+1 21:17:21 Grr. ack n:0:xs = n+1 21:17:35 ack 0:m:xs = ack 1:m-1:xs 21:17:54 ack n:m:xs = ack n-1:m:m-1:xs 21:19:49 So I'm computing ack [1,4]. 21:20:34 hey, pgimeno contributed to he talk page :) 21:21:03 he suggested http://en.wikipedia.org/math/2/1/b/21b63e721296a61d600d6bbcce802029.png 21:21:42 yup :) 21:22:19 Aha 21:24:07 because of its interesting properties for understanding how the hierarchy is formed 21:24:29 ...So ack 4 1 = 2? 21:25:02 with this definition, yes; with the regular definition, no 21:25:07 i.e. they are not "compatible" 21:25:16 Ah. 21:28:26 ack 3 (ack 1 (ack 1 9)) 21:31:43 byenite 21:31:46 -!- Keymaker has quit ("Funkadelic!"). 21:33:15 ack 3 (ack 1 11) 21:37:56 ack 3 13 21:42:28 comp 0 x y = y 21:43:07 comp x y z = y (comp x-1 y z) 21:44:53 ack m n = comp n+2 (ack m-1) 0 21:46:21 ack m 0 = comp 3 (ack m-2) 0 21:46:36 ack 0 n = n+1 21:47:08 -!- ihope has quit ("Chatzilla 0.9.68.5 [Firefox 1.0.7/20050915]"). 21:58:38 back 23:19:28 -!- Sgep has joined.