00:00:17 * Sukoshi sure hopes SimonRC is joking. 00:01:58 I hope he's joking 00:02:05 Come on, windows? 00:02:39 :P 00:07:59 -!- Asztal has quit ("Chatzilla 0.9.75 [IceWeasel 1.0.1b2] (kidding!)"). 00:08:12 If you have a fd for a new file, and mmap memory of that fd to the desired length of the new file (bigger than the size of the file now, obviously) and write to the mmap'd memory, does it write correctly? 00:10:33 Never understood mmap 00:11:21 Maps a file's contents in virtual memory to a pointer, with the space occupying a desired length. 00:11:52 So writes to the memory change the file? 00:12:40 -!- wooby has joined. 00:12:46 -!- wooby has quit (Remote closed the connection). 00:15:58 Yup. 00:16:32 cool 00:16:43 portable? 00:16:50 POSIX compatible. 00:17:13 I mean windows 00:17:20 * bsmntbombdood hides 00:17:21 I have no idea. 00:17:47 Windows doesen't really have much to hook onto the lower portions of the OS, so I have no idea. 00:23:36 Windows is terrible 00:25:45 * SimonRC goes to bed. 00:25:52 Why would one use mmap? 00:52:45 -!- wooby has joined. 00:53:48 -!- GregorR-Grrr has joined. 00:53:55 Hi * 00:53:59 * GregorR-Grrr 's internet is down :( 00:54:10 I think I'll bring EgoBot back online when it's back up. 00:54:45 -!- GregorR-Grrr has quit (Client Quit). 01:02:13 HA HA NO INTERNETS FOR YOU 01:15:04 for the record, Windows also has its own memory mapping functions (I think that glibc for MinGW implements POSIX mmap) 01:23:26 -!- tgwizard has quit (Remote closed the connection). 01:35:35 -!- ShadowHntr has joined. 01:52:11 -!- ShadowHntr has quit (Client Quit). 03:13:00 -!- GreaseMonkey has joined. 03:17:30 bsmntbombdood: Because IO with mmap is faster than IO without. 03:18:00 Plus it's easier to follow pointer arithmetic than reading arithmetic, just IMO. 04:15:46 -!- thematrixeatsyou has joined. 04:16:57 -!- GreaseMonkey has quit (Nick collision from services.). 04:17:06 -!- GregorR-W has quit (Remote closed the connection). 04:17:22 -!- thematrixeatsyou has changed nick to GreaseMonkey. 04:27:53 -!- wooby has quit. 04:35:03 -!- anonfunc has quit (Read error: 110 (Connection timed out)). 05:22:09 -!- wooby has joined. 05:22:19 -!- wooby has quit (Client Quit). 05:32:13 -!- anonfunc has joined. 05:38:34 hmm... 05:38:45 I'm making classes in Python that emulate the various computational classes. 05:39:16 I've got finite state automata.... but I need to ponder how to implmenet cellular automato. 05:39:18 a 05:43:30 CakeProphet, use resizable array or dictionary 05:44:29 dictionary could be slow but it is easy for implementing such things 05:44:41 >.> 05:44:52 Python lists are resizable by default. 05:44:58 ...you don't even specify a size for them. 05:45:34 well, but if you need more speed... ;) 05:45:58 I know -how- to spatially organize it... 05:46:14 but how do I allow the programmer to specify -what- is considered to be a cells "neighborhood" 05:46:27 as not all CA use the "8 adjacent cells" thing. 05:46:33 aha 05:46:36 i see. 05:48:20 The states of each of a cells neighbors would be passed to a "transition function"... that determines what the state of the cell becomes based on that list. 05:50:22 the transition function is user-defined. 05:51:17 if both arbitrary transition function and infinite cells are allowed, it seems difficult to update the state of cells 05:53:45 -!- wooby has joined. 05:53:53 i think you may need additional functions, for example list of affected cells when a state of one cell is changed 05:56:32 -!- wooby has quit (Client Quit). 05:58:53 tokigun, The transition function would simply be called on the neighborhoods of the cells neighbors. 05:59:06 so you get a domino effect... like a CA 06:00:43 but I still don't have an easy way to define a cells neighborhood... other than the usualy 8-adjacent-cells. 06:01:10 hmm i thought transition function could be any computable function... right? 06:02:37 nope, nevermind. 06:03:35 it can be. 06:03:46 any function that accepts a list of cells. 06:16:09 -!- ivan`_ has joined. 06:16:24 -!- ivan`_ has left (?). 06:17:25 aha 06:17:42 A function that determines a cells neighborhood. 06:18:21 the return value of the function is a list of the positions of all the cells in that cell's neighborhood. 06:29:29 -!- thematrixeatsyou has joined. 06:29:38 -!- thematrixeatsyou has left (?). 06:59:46 gonna go now, cya 06:59:53 -!- GreaseMonkey has quit ("Connection error 130 (Monkey too greasy)"). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 10:21:07 -!- bd_ has joined. 10:37:02 -!- ShadowHntr has joined. 10:44:24 -!- ShadowHntr has quit (Read error: 104 (Connection reset by peer)). 11:43:50 -!- anonfunc has left (?). 11:56:41 -!- tgwizard has joined. 12:04:21 -!- jix_ has joined. 12:15:10 CakeProphet: assuming you're not aiming towards supporting a radius-2+ neighbourhood, my guess is that the transition function can be passed all 9 cells and decide by itself which ones to ignore 12:15:54 e.g. just ignore nw, ne, sw, se for a von-Neumann neighbourhood 12:56:11 -!- Asztal has joined. 13:53:27 -!- DRMacIver has left (?). 16:29:05 -!- Asztal has quit ("Chatzilla 0.9.75 [IceWeasel 1.0.1b2] (kidding!)"). 16:46:50 -!- jix_ has quit ("This computer has gone to sleep"). 17:37:22 -!- fizbin has joined. 19:16:10 -!- fizbin has quit (Read error: 104 (Connection reset by peer)). 19:16:19 -!- fizbin has joined. 19:33:03 Is it counterproductive to mmap a file, then munmap it, only to write to it later? 19:34:25 -!- CakeProphet has quit ("haaaaaaaaaa"). 19:49:29 -!- tgwizard has quit (Connection timed out). 19:49:57 -!- Asztal has joined. 20:20:23 -!- oerjan has joined. 20:24:27 -!- Asztal has quit (Read error: 113 (No route to host)). 20:25:32 Sukoshi: I saw your mmap question in the logs 20:26:14 the man page seems to indicate that extra memory is not written to the file 20:27:56 "For a file that is not a multiple of the page size, the remaining memory is zeroed when mapped, and writes to that region are not written out to the file. 20:38:18 -!- tgwizard has joined. 20:57:36 Oh. 20:57:38 Poop. 20:58:27 on the other hand, since you have to give the length in advance, why not just enlarge the file itself first? 20:58:41 Because I don't want to enlarge the file. 20:59:09 If the transfer interrupts, you'll just have a large zero-padded file, which I don't really want. 20:59:18 I'd rather have a file with no padding. 20:59:58 ic 21:18:08 -!- jix_ has joined. 21:21:31 -!- GreaseMonkey has joined. 21:29:13 -!- CakeProphet has joined. 21:46:08 -!- wooby has joined. 21:52:22 -!- jix_ has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 21:53:07 -!- ihope has joined. 21:56:13 -!- Rugxulo has joined. 22:00:18 -!- Asztal has joined. 22:08:07 -!- pikhq has joined. 22:24:53 -!- Rugxulo has quit ("Do fish get thirsty?"). 22:40:01 -!- Asztal has quit ("Chatzilla 0.9.75 [IceWeasel 1.0.1b2] (kidding!)"). 22:53:39 the downside to wikis: when you are reading something that is _not_ a wiki, see a spelling error, and start looking for the edit button... 22:57:12 -!- tgwizard has quit (Remote closed the connection). 22:58:10 (the downside to the internet: i am probably the 5190357th person to make that observation) 22:59:04 Heheh. 23:00:42 -!- ShadowHntr has joined. 23:18:07 * ihope uses the /edit command to capitalize everything oerjan said 23:18:08 :-P 23:18:59 hey, that's a derived work! i demand royalties :) 23:19:40 * bsmntbombdood uses /ctcp ihope STAB to stab ihope 23:19:43 * ihope gives oerjan a crown and robes and everything 23:19:47 * oerjan was stupid enough to actually try /help edit ... 23:20:45 bsmntbombdood: right! Off With His Head, We Say 23:24:07 Uh oh... 23:24:13 * ihope runs away 23:25:26 * oerjan realizes royalty can be dangerous to his surroundings, and removes the regalia 23:27:34 royalty: a Weapon of Mass Destruction 23:28:19 * oerjan hopes the king and queen of Norway are not Not Amused 23:30:03 * oerjan thus wishes to point out that presidency is also a WMD. 23:35:17 -!- maverickbna has joined. 23:35:54 -!- ShadowHntr has quit (Nick collision from services.). 23:36:23 -!- maverickbna has changed nick to ShadowHntr. 23:37:45 -!- GreaseMonkey has quit (Read error: 110 (Connection timed out)). 23:44:22 -!- maverickbna has joined. 23:45:28 -!- ShadowHntr has quit (Nick collision from services.). 23:45:38 -!- maverickbna has changed nick to ShadowHntr.