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