[00:09] MSG: Ping timeout: 252 seconds [01:05] Join: brx- joined #corewars [01:07] MSG: Ping timeout: 252 seconds [01:12] MSG: Ping timeout: 252 seconds [01:14] okay i have to go now [01:14] bye all [01:14] MSG: [01:27] Join: brx- joined #corewars [02:11] Nick Change: brx- changed nick to brx [03:24] Join: brx- joined #corewars [03:27] MSG: Ping timeout: 252 seconds [06:32] Join: fiveop joined #corewars [11:18] Join: DrewHK joined #corewars [11:39] MSG: Quit: gone irl [14:58] Join: DrewHK joined #corewars [16:41] * bvowk casts a spell of summon regulars... [17:00] hrm. [17:00] hehe [17:00] * pak21 waves, although not a regular [17:00] * bvowk checks the best before date on his virgins blood.. [17:00] heh. [17:01] I guess I should have just hrm'd [17:01] I regularly idle here :P [17:01] you could have annihilated something [17:01] or summoned the irregulars :) [17:01] I'm almost always idle here... [17:01] anyone done anything cool since I asked yesterday? [17:02] I read a third of abook [17:02] what book? [17:02] It's a thick book! [17:03] historical novel [17:03] not published in english unfortunatly [17:07] I wrote a small hill scoring system in python yesterday afternoon for a future evolver [17:32] Join: sf joined #corewars [17:32] Hello [17:32] heya sf [17:32] how goes? [17:32] you never emailed me. [17:32] *BAD* sf. [17:32] Working all weekend [17:33] Sorry [17:33] :) [17:33] I haven't seen Neo yet [17:34] I would have arrived when summon, but I was still working :( [17:35] No-one ever answers my email anyway [17:36] heh [17:36] ok, I'll have to remember that in case you do email me :) [17:36] :) [17:38] There's a new player on the beginner hill [17:39] thats good. [17:46] MSG: Read error: Operation timed out [18:00] MSG: Quit: Wow! What a great client! Bersirc 2.2 [ http://www.bersirc.org/ - Open Source IRC ] [18:51] Join: Metcalf joined #corewars [18:51] Hi [18:56] hey met. [18:56] how'd it go with sts? [19:04] Hi [19:05] No problems [19:05] But I always have to specify a b-field [19:05] sts.a #32, 0 [19:05] it should behave exactly like STP [19:05] hrm. [19:06] It's no problem though [19:06] if you don't specify a b field what happens? [19:07] Error in line 1: 'sts.a #32' [19:07] Incomplete operand at instruction 'STS' [19:07] hrm. [19:07] I'll look at that.. [19:08] can you specify b-field less stp's to exmars and pmars? (I'm wondering if there is parser difference) [19:09] Shouldn't be able to [19:09] ok [19:10] Also, do you have any idea how many rounds exmars -r 0 runs? [19:10] its -P [19:10] Aha :-) [19:10] I suppose I could fix that too :) [19:10] No need to make any more work, I'm happy with what you've done already thanks [19:10] :-) [19:11] specifying -r should flag an error with -P, and -P shouldn't be turned on unless its specified :) [19:11] I'd forgotten you could specify -r 0:) [19:11] I can't specify -c 0 [19:11] I have an invicible warrior with settings -c 0 [19:11] not on exmars.. no. [19:12] so its just the str op then eh? [19:12] Or a char data type [19:12] so I can do sts.a #"A", 0 [19:12] :-) [19:12] hrm. [19:13] that might be possible without too much pain [19:13] My first utility is nearly finished [19:14] hey ASW? [19:14] Though it would be handy if dat "You are in a maze of twisty tunnels" would expand to: [19:14] dat "Y" [19:14] dat "o" [19:14] maybe you should email me and we'll talk about some thoughts I've had about your project [19:14] etc :-) [19:14] yeah.. that would be nice :) [19:15] It's trick [19:15] trick EQU tricky [19:15] getting redcode to output sane messages? :) [19:15] yeah.. [19:16] I keep thinking I can fit a djn-stream here, or I could run a d-clear from the stack ;-) [19:16] lol! [19:17] I'm going to look how you know who implemented call / ret because my implementation isn't very good [19:18] yeah.. you need to make libr so we can have redcode unix [19:18] (posix compliant of course) [19:19] Join: joonas joined #corewars [19:19] Hi! [19:19] hi [19:19] Can I mention your name now? [19:19] :) [19:19] how goes it? [19:19] I'm just playing with sts which bvowk has implemented in exmars :-) [19:20] bbiaw.. feeding time [19:20] Did you see I was talking about you? [19:20] apparently you've got zork in redcode! ;) [19:20] Not just yet [19:20] no, bvowk shouted at me [19:20] Oh :-) [19:20] hang on, i'll recap the logs [19:20] But I will attempt to write a text adventure [19:21] If I can write one in 4K, I'm sure I can do it in 8000 cells ;-) [19:21] never did finish disasming it. sure you won't share source? :) [19:21] if you can do it in 8000 cells I'm going to dump core. [19:21] (really bbiaw) [19:21] I'm not sure if I have the source [19:22] phone [19:24] back [19:25] so you wanted call/ret? [19:25] the way redforth does it goes something like this: [19:26] you have two kinds of functions: leaf functions (primitives in redforth) and non-leaf functions. [19:26] leaf functions don't call any other functions, while non-leaves do. [19:27] in fact, in non-leaf functions, the majority of all code is just calls calls calls, so it makes sense to squeeze a call into as small a space as possible. [19:28] so to make a call to a leaf function you just do this: [19:28] jmp primitive_label [19:29] there's a global variable called "ip" that points to the call instruction, so when the leaf function returns, all it has to do is jmp >ip [19:30] How do you get ip to point to the call [19:31] you initialise it in the beginning, and all the calls/rets maintain the condition that ip always points to the right place. [19:31] I was going to do this: [19:32] call - mov #2-fixedlocation, return - mov>stack, fixedlocation / jmp @fixedlocation [19:33] Or something similar [19:33] yeah. [19:33] but that's 2 cells per call & ret. [19:33] But it's 2 instructions each [19:33] I wondered if I could do better [19:34] well in redforth you have two special primitives ENTER and EXIT [19:34] a call to a non-leaf function has the form "jmp ENTER, #subroutine - ip" [19:35] the ENTER code pushes the contents of ip to a stack, fetches "subrouting - ip" from the "jmp ENTER,#..." instruction, and then jumps to the subroutine. [19:36] the EXIT code does the reverse: pop ip from stack and jmp there. [19:36] bvowk - ping [19:37] * asw waves to joonas and Metcalf [19:37] Hi asw :-) [19:37] hi asw! [19:38] I'm just trying to improve my code to output a decimal value [19:38] split mov.b dout, mod #10, @stack [19:38] div #10, dout [19:38] add #1, count [19:38] jmn split, dout [19:38] ploop add #48, @stack [19:38] sts.b >stack, 0 [19:38] count djn ploop, #0 [19:39] This should output the value in dout [19:39] If I could remove the add #1, count I would be very happy! [19:45] Have you implemented semaphores in redcode Joonas? [19:46] for multiple warriors? [19:46] Or single warrior, multiple processes. [19:46] i think single warrior was doable [19:46] I'm not sure how to make an indivisible test and set in redcode [19:47] Maybe: [19:47] mov.a #0, 1 [19:47] mov.x #0, 0 [19:47] jmn -2, -1 [19:48] Hmmm... [19:48] mov.a #1, 1 [19:48] mov.x #0, #0 [19:48] jmn.a -2, -1 [19:48] that should do it [19:48] a mutex would be just "djn 0, #1" right? [19:49] As long as a process wasn't in the code for too long! [19:52] hm. in redforth your code to print a number would look like [19:52] : printit ( num --) [19:52] 10 /mod ?dup if [19:52] recurse [19:52] then [19:52] emit; [19:52] but that's 9 cells. :/ [19:53] erh.. "emit;" -> "48 + emit ;" [19:57] At last, my program works! [19:57] :) [19:57] what does it do? [19:57] Here's the output of the first program written in redcode with sts: [19:57] 3 2667 [19:57] 7 1143 [19:57] 9 889 [19:57] 11 5091 [19:57] 13 3077 [19:57] heh [19:58] Not very exciting, but call/ret and printdec are implemented [19:58] It too me a while to figure why I have "1 0" at then end of the list [19:59] then EQU the [19:59] why was that? [20:01] Join: OoS joined #corewars [20:01] It was the results of the battle [20:03] But I was busy checking through my code! [20:03] MSG: Ping timeout: 252 seconds [20:03] Nick Change: OoS changed nick to Metcalf [20:04] http://www.ociw.edu/~birk/COREWAR/ODD/HILL/optima1.red [20:04] there's the idea for the redforth subroutines. [20:06] the NEXT macro is used to return from leaf functions and EXIT from non-leaves. [20:06] oh, except EXIT is a 2-line macro there where it could be 1, but anyway. [20:08] Join: OoS joined #corewars [20:08] It's the time of the evening when I get a bad connection [20:08] MSG: Ping timeout: 252 seconds [20:08] I think all the neighbours are using their microwaves or something [20:10] I should have figured I could have a 1 line return for leaf subroutines :-( [20:11] My code is extremely slow [20:11] It takes 80000 cycles to calculate the impsteps up to 13 points [20:11] eek [20:12] It takes 80000 cycles to calculate the impsteps up to 13 points [20:12] well now you have subroutines, you can do euclid's. [20:12] Sorry, didn't mean to repeat myself :-) [20:12] Must be getting old and forgetful! [20:13] hm. [20:14] points dat 0, 2 [20:14] temp mov points, #0 [20:14] mov.a #2, points [20:14] loop add.b points, temp [20:14] slt temp, #2 [20:14] jmp loop, }points [20:14] jmz next, temp [20:14] ; output results [20:14] next add #1, points [20:14] slt #30, points [20:14] jmp temp [20:14] Very slow [20:16] Join: Metcalf joined #corewars [20:16] Okay, implementing gcd next :-) [20:16] you could try powering by the inversion number. [20:18] 3199? [20:18] erh.. 3199 [20:18] yes [20:18] But my code works for any coresize at the moment [20:18] I suppose I could calculate the number first [20:18] MSG: Ping timeout: 252 seconds [20:18] using the gcd. :) [20:19] :-) [20:19] I am going to make a webpage for proper programming in redcode [20:19] However, I'll think of a better title for the page [20:20] yeah, core war artistas might not appreciate "Proper Programming in Redcode" [20:20] Well there are several bits on my page people don't like, so I don't care! [20:21] heh. [20:21] double wide arithmetic in redcode would be interesting to do [20:22] :-( [20:22] Sounds like hard work [20:22] but surely satisfying if you get it right. [20:23] ok, maybe not. [20:24] I could implement IEEE floating point [20:24] *ew* [20:24] ieee floats are hard! [20:25] hm. how would you do the bitwise stuff? [20:28] MSG: Ping timeout: 252 seconds [20:33] hm. best be off too. [20:33] night [20:33] MSG: Quit: Leaving. [20:48] Join: sascha joined #corewars [20:48] Join: Metcalf joined #corewars [20:48] Hmmm... he who must not be named has left :-( [20:48] Just coding gcd and powers [20:49] one of the fab four ? [20:49] Yes, I think someone called him that :-) [20:50] I'm just doing some proper programming in redcode! [20:51] i think it is cooller to think about some new opcodes, modifiers to create a new standart.. ICWS 06....some of the instructions you have collected sounds kind of good ! [20:55] MSG: Ping timeout: 252 seconds [20:58] Join: Metcalf joined #corewars [20:58] Some of the instructions are too powerful [20:58] yes, but some are a nice toys..and im thinking about a stack and sub's [20:59] I think I can implement gcd in 4 lines [20:59] I've implemented call/ret [20:59] 2 lines for a call, 2 lines for a ret [21:00] He who must not be named beat me to it however [21:00] I'm fed up of typing "he who must not be named" [21:01] hwmnbn [21:01] I think I'll stick to a single j [21:02] soon people will be googling for hwmnbn instead of for his actual name [21:02] okay, j is best choice [21:03] mod.x #13, #8 [21:03] jmz.b 2, -1 [21:04] jmn.a -2, -2 [21:04] add.x -3, -3 [21:04] That should work for gcd, but I need to test it [21:07] can't help testing...no cdb on this maschine.. :-( [21:09] MSG: Ping timeout: 252 seconds [21:14] Join: Fizmo joined #corewars [21:14] hi [21:14] heya fizzer... [21:14] :) [21:15] what does gcd stand for? [21:16] greatest common divisior [21:16] hm [21:16] in 4 redcode lines? [21:16] hi fiveop [21:16] you're abusing redcode for 'other' things ;) [21:17] shame on john [21:17] http://www.fiveop.de/trash/red_circle.jpg [21:17] I've drawn circles! :P [21:18] hahaha, coool [21:18] and did it enters the 94b hill ;-) [21:18] hey, take some hours and create the corewarrior logo for fizmo.. [21:18] hehe, no the comic hill [21:18] heheheee [22:11] MSG: [22:20] * sascha waves to the logreader all over the world [22:21] * Fizmo waves [22:21] Part: sascha left #corewars [22:21] MSG: