01:50:14: -!- glogbot has joined #corewars.
02:01:24: -!- Doxin has quit (Remote host closed the connection).
08:57:17: -!- impomatic has joined #corewars.
08:57:41: <impomatic> Hi :-)
10:33:19: -!- gb_master has joined #corewars.
10:53:47: -!- gb_master has parted #corewars ("Leaving").
12:00:19: -!- Payhn has quit (Quit: ZNC - http://znc.in).
12:02:28: -!- Payhn has joined #corewars.
13:54:58: -!- Doxin has joined #corewars.
14:11:11: -!- impomatic_ has joined #corewars.
18:14:33: <Doxin> hot damn this preprocessor stuff makes redcode hard to parse.
18:17:48: <Doxin> impomatic / impomatic_: am I correct in assuming that equ-replacements only have effect *after* the line the equ is on?
18:26:14: <impomatic> Yes.
18:26:58: <Doxin> pfew
18:27:04: <Doxin> that saves a lot of effort :P
18:27:12: <impomatic> label EQU something replaces all instances of label with something before parsing.
18:27:16: <Doxin> impomatic: can a second EQU override the furst?
18:28:00: <Doxin> *first
18:28:12: <impomatic> I don't know. I think that would give an error.
18:28:35: <Doxin> good.
18:28:54: <Doxin> right, it'd probably complain about a duplicate label :P
18:29:04: <impomatic> The parameter isn't enclosed in brackets
18:29:23: <Doxin> hm?
18:29:29: <impomatic> STEP EQU 20+4
18:29:44: <impomatic> FIRST EQU 10*STEP
18:29:53: <Doxin> yeah I knew about that. same as C macros.
18:29:59: <impomatic> Gives first = 10*20+4 = 204
19:08:51: <Doxin> impomatic: okay so given the following, what happens?
19:08:51: <Doxin> A equ X
19:08:51: <Doxin> B equ Y
19:08:51: <Doxin> XY equ Z
19:08:51: <Doxin> DAT AB
19:09:56: <impomatic> I think the tokens need white space around them, but you might be able to use & to concatenate them.
19:10:00: <Doxin> right
19:10:04: <impomatic> It's not something I've ever tried.
19:10:07: <Doxin> fancy.
19:10:25: <Doxin> lets just hope no one relies on that :P
19:10:39: <impomatic> I assume you already know single character labels might also be a variable
19:10:51: <Doxin> what's the difference?
19:11:03: <impomatic> You can redefine a variable. Like this I think:
19:11:07: <impomatic> DAT a=1
19:11:12: <impomatic> DAT a=a+1
19:11:18: <Doxin> oh lord
19:11:34: <Doxin> I'll worry about those later :P
19:11:53: <impomatic> I don't think many people use them.
19:11:59: <impomatic> Although you can do:
19:12:10: <impomatic> a for 10
19:12:12: <impomatic> dat a
19:12:13: <impomatic> rof
19:12:18: <Doxin> right
19:12:20: <Doxin> I've seen that
19:12:37: <Doxin> any specific reason multi-character labels aren't allowed as variable?
19:15:02: <impomatic> I don't think there's a reason. Probably about 2 minutes quicker to implement with single characters.
19:15:08: <Doxin> right
19:15:35: <Doxin> well I can imagine sometimes you want to write something like foo for 3
19:15:35: <Doxin> DAT #0
19:15:35: <Doxin> rof
19:15:42: <Doxin> and have foo refer to the address of the first dat
19:15:56: <Doxin> but then you could still do that by doing foo i for 3
19:16:45: -!- K38 has joined #corewars.
19:19:32: <K38> Hi! Where can I download the game ? / Где я могу скачать эту игру?
19:19:44: <impomatic> Hi K38
19:20:09: <impomatic> http://corewar.co.uk/wendell/ CoreWin for Windows
19:20:38: <K38> Thank you
19:21:04: <impomatic> http://corewar.co.uk/pmars/ pMARS if you prefer using the command line (or use Linux)
19:29:23: <K38> http://corewar.co.uk/pihlaja/pmars-sdl/index.htm ?
19:29:44: <impomatic> Yes, that's the one I'm using :-)
19:30:50: <K38> I download "Win32 executable" and "required DLL" After opening it closes
19:31:41: <impomatic> You need to run it from the command line with a warrior name.
19:32:03: <impomatic> E.g. PMARSV RYOOKI.RED
19:32:07: <K38> Ok.
19:34:36: <K38> Please, write a simple program
19:34:44: <impomatic> MOV 0,1
19:34:54: <impomatic> It's the simplest, an imp.
19:35:41: <K38> oo.work, ty
19:48:53: <K38> Why MOV 0,1 fills in all the memory , but the MOV 0.2 only 2
19:50:19: <impomatic> MOV 0,1 copies the current instruction (0) to the next instruction (1). After the instruction has run, the next instruction will run (1) which is where the imp got copied.
19:50:48: <impomatic> With MOV 0,2 this happens:
19:50:56: <impomatic> At the start:
19:51:00: <impomatic> MOV 0,2
19:51:01: <impomatic> DAT 0,0
19:51:03: <impomatic> DAT 0,0
19:51:37: <impomatic> Then the MOV runs and copies itself ahead by two instructions:
19:51:40: <impomatic> MOV 0,2 --+
19:51:41: <impomatic> DAT 0,0 |
19:51:43: <impomatic> DAT 0,0 <-+
19:52:05: <impomatic> Giving:
19:52:17: <impomatic> MOV 0,2 --+
19:52:18: <impomatic> DAT 0,0 |
19:52:20: <impomatic> MOV 0,2 <-+
19:55:22: <impomatic> Then the next instruction executes. But it's still a DAT 0,0. Processes die when they execute a DAT
20:05:10: <K38> Can I copy programs on the even of the cell ? Sorry if you've already talked about it . I bad understand English = )
20:05:46: <impomatic> You'd need to have a two line program
20:05:48: <impomatic> MOV 0,2
20:05:51: <impomatic> MOV 0,2
20:06:21: <impomatic> pmars had a debugger if you want to see what's happening.
20:06:28: <impomatic> PMARS IMP.RED -e
20:06:40: <impomatic> Then you can single step the code.
20:07:17: <K38> i use .exe , now
20:24:54: -!- K38 has quit (Quit: Page closed).
22:37:23: -!- impomatic_ has quit (Ping timeout: 264 seconds).
22:39:12: -!- impomatic has quit (Ping timeout: 272 seconds).