00:00:53 -!- valrus has quit [Remote host closed the connection] 00:02:55 doy: crosstraining bonus 00:09:33 would be nice if the screen actually mentioned that 00:10:38 i seem to remember it did once, might be wrong 00:22:15 Windows builds of 0.8 branch on crawl.develz.org updated to: 0.8.0-a1-148-ga206725 00:24:10 -!- effo has joined ##crawl-dev 00:24:32 I have a c++ related text file parsing question if anybody has a moment 00:24:43 I am trying to extract relevant data from character dumps using ifstream 00:25:48 http://pastebin.com/c2vFfkdY <-- here is what I have so far. The main issue I'm having is converting the strings I pull from the character dump into integers representing the various stats a player can have. 00:26:07 I am very sure the way I did it is extremely kludgy so I'd like some advice 00:27:43 anyway what it does so far is find the location of a character's AC, which is on line 5 at characters 21 and 22, and copies them from a string into a char array, and then uses atoi() to get an int, which it stores. 00:30:04 why are you using c++ for text parsing 00:30:50 I'm using this as a way to be interested in learning the language 00:31:24 once I can fully store all relevant information about a player into variables, I'm going to use that to display certain things to a front end 00:31:36 like spellpower, spell damage, spell hunger, weapon damage, melee speed 00:31:36 etc 00:32:10 so the idea is that it will read a character's full dump, which gives you everything you need to know about how well a character can do any given thing 00:32:29 and I am about to start a computer science degree so I just chose c++ since it's something a lot of people use 00:32:59 just saying, starting out with c++ by doing text parsing is a good way to make you stop being interested in learning the language d: 00:33:16 that's ok I am very determined to make this work 00:33:27 as I said above, the code I wrote compiles and runs as intended 00:33:39 however you can see that I take the same data and handle it three times to get my intended result 00:34:00 I am literally total novice so I'm not super disappointed since it works and all, but I'd like to know if I could do it better 00:34:11 atoi takes null terminated strings, for one thing 00:34:29 you need to make that array have a size of 3 00:34:38 and stick a '\0' in temp[2] 00:34:49 ok 00:35:03 so is the method I'm using efficient enough that I can just replicated it for every stat? 00:35:09 or rather make a function which will do that 00:35:34 most of it is just "find where this stat is by looking for its marker (hp, ac, ev) and moving 2 indices rightward" 00:35:55 and then copy all the numbers until the next whitespace into an array 00:36:06 which I convert to an int for use in equations later in development 00:37:26 so for stats that could vary in length (hp), could I set the size of the array with string.size(), assuming I made a string isolating the value I want to "int"-ify? 00:38:19 also you said that atoi takes null-terminated strings, could I actually feed it a string such as "123\0" even though the definition says that it takes a const char* 00:38:21 you probably really want to be using more ifstream features than just getline 00:38:29 haha you are right! 00:38:36 "123\0" is a const char* 00:38:41 so not sure what you mean 00:38:49 ok that makes sense 00:39:01 but in any case, ifstream has ways to do things like "read in an int" 00:39:04 so if I get a line, trim the line to just the numbers I want the stat to be equal to 00:39:07 you should read about them 00:39:18 moin 00:39:19 Zaba: You have 1 message. Use !messages to read it. 00:39:23 !messsages 00:39:29 !messages 00:39:30 (1/1) due said (5h 11m 52s ago): Can you sanity-check 6da8dc81e50375633b768? I'm not entirely certain that the placement of the two vaults is done properly, but tests show that it works. 00:39:33 so if I used that I could just read in one int at a time and then just assign it based on the order of its appearance in the dump 00:39:46 you're right that sounds far easier than by-character manipulation 00:40:44 due, what the hell 00:43:06 due, no, it's not correct, it randomly hardcodes a case of vault placement 00:43:41 Zaba: didn't think so :) 00:43:58 Zaba: what is the best way to do it then? 00:45:45 I'm not sure yet, let me wake up 00:45:54 but definitely not stuffing more crap into the dungeon code than there should be 00:46:35 that's not a good way to do _anything_ 00:46:46 sure it is! :S 00:46:52 no it's not 00:47:18 actually, my issue was finding where to hook it in while still achieving the same effect of PLACE: Lair:$ 00:47:46 do you care much about that effect? 00:47:51 actually, what effect is that 00:48:54 hm 00:49:00 true point 00:49:07 what part of the effect of having PLACE : Lair:$ do you care about? 00:49:12 the fact it builds a rooms layout? 00:49:19 not really. 00:49:22 "meh rooms" 00:49:30 or the fact it's guaranteed 00:49:35 oh, the guarantee 00:49:41 let me do some testing with all lair endings being placed as secondaries from lua 00:49:44 but surely stuff can be guaranteed otherwise? 00:50:00 it seems to generally work 00:50:26 (it still enforces a rooms layout, just both endings are fit into it later) 00:50:37 yeah, hm. 00:50:45 Is there no way to avoid a rooms layout? 00:50:57 Not that I mind so much but... 00:51:23 due, there is, but it can get even uglier 00:52:06 oh jeez 00:52:42 hm? 00:54:01 the amount of vetoing this whole affair introduces to lair:8 generation is disturbing 00:55:27 due, are you entirely positive that there's no better way to balance lair endings? 00:55:48 because this deal with make their distribution unbalanced, in addition to loot 00:56:31 at least of the second secondary vault 00:57:54 hm 00:57:54 -!- Pseudonut has quit [Read error: Connection reset by peer] 00:58:01 it seemed the simplest option but it certainly can be reverted 00:58:44 uh.. 00:58:45 they're probably too large to place with serial vaults without vetoing -- which is probably the current issue. gah. 00:58:56 does that really seem like the simplest option to you? 00:59:00 oh well 00:59:11 the concept seemed like a simple one 00:59:14 rather than the execution 00:59:58 -!- Pseudonut has joined ##crawl-dev 01:00:01 in theory you could place a second vault from a lua function called from vault definitions in the small ending vaults 01:00:13 the only "little" problem then is preventing recursion 01:02:18 yeah 01:02:29 sigh; loot dichotomy is the biggest problem with the endings. 01:02:32 could temporarily set some flag in dgn.persist or wherever it is 01:02:53 probably a worse hack than just making a special case in dungeon.cc, but hey 01:03:02 at least it's neatly isolated 01:05:25 true 01:06:35 we could alternately make a new "place branch ends" function and split everything into their. 01:07:25 okay, will look at it later 01:07:39 Zaba: feel free to revert now if it caquses too many issues, though as CDO/etc are running 0.8 it shouldn't 01:08:05 -!- Zaba has quit [Ping timeout: 276 seconds] 01:09:34 Quick question regarding the 10 Rune Challenge Sprint level: Is there a large experience point modifier there? I think I got over 10K experience for killing Harold. Is that right? I remember him being worth much less than that. 01:13:14 -!- Zaba has joined ##crawl-dev 01:13:30 all sprint levels have an experience multiplier of... 9 i think? 01:14:38 due, okay to revert your commit and try some uglier hacking? 01:14:52 actually my uglier hacking seems to work 01:18:39 it seems to build the same vault twice occasionally, though 01:19:34 which looks kinda ugly 01:22:17 -!- elliptic has joined ##crawl-dev 01:27:09 oh I know what I'm doing wrong 01:34:12 due, look, this works as well as it can work: http://sprunge.us/VFRj 01:34:29 due, and in my testing, it ends up with a failure to place a second "small" vault pretty often 01:34:43 due, is it really worth it? 01:34:57 (and it requires no changes in dungeon.cc at all.) 01:57:46 -!- ortoslon has quit [Read error: Connection reset by peer] 01:58:17 03zaba * r2f49588f2f7f 10/crawl-ref/source/dat/des/builder/layout.des: Restrict treasure rooms on layout_roguey to Lair and D, and make them even rarer. 01:58:24 03zaba * ra57b219dc3b7 10/crawl-ref/source/dat/des/builder/rooms.des: rooms.des: Correctly check whether we're running in level validation. 01:58:27 03zaba * r22a44be3ae4a 10/crawl-ref/source/dat/des/builder/rooms.des: Condense special room definitions using per-range weights. 01:58:27 03zaba * rb297e4973c8b 10/crawl-ref/source/dat/des/branches/lair.des: Place two small Lair ending vaults using a post-place hook. 01:58:39 03zaba * rfd369df9f39e 10/crawl-ref/source/ (dat/des/branches/lair.des dungeon.cc): Revert "Resolve Lair ending loot issues by placing one or multiple vaults." 02:08:17 03galehar * ra7b389d34fb4 10/crawl-ref/source/invent.cc: Fix melded rod being evokable (#3821). 02:26:24 whichever you choose 02:26:34 ... Zaba, rather. 02:26:40 Zaba: Did you revert the whol commit including the loot changes? 02:27:39 no 02:27:48 awesome 02:27:50 only the tag/place changes 02:28:00 and I forgot to mention that in the short commit message.. 02:28:34 that's oky 02:45:28 so after some digging I couldn't find a simpler way to read in the dump file than using getline(). HOWEVER I made good progress in being able to put all the code that converts the string into an int, into a function, which is called by one other function 02:46:10 and said function parses out all major stats on a given line with the parameters of a string to search for and the string containing the current line 02:46:47 so now my code will look like getline, get hp, get ac, get str getline, get mp, get ev, get int 02:47:24 step in the right direction? could I optimize this futher by reading the entire file into a vector of strings right off the bat? 02:47:24 effo: what does the database parsing code use? 02:47:41 it is a small file, care if I pastebin for your perusal? 02:49:04 Sure. 02:51:00 http://pastebin.com/FWVwGgA8 02:51:16 sorry if that's a weird way to answer your question, as I'm not entirely sure what you meant 02:51:27 I think the answer is a combination of getline() and find() 02:51:33 What exactly are you trying to do? 02:52:17 so far it fills variables with a character's AC, Str, EV, and hp. Gonna finish it up to include all stats, resistances, spell school levels 02:52:24 What's this for, though? 02:52:29 my intent will be to use it to power damage reduction calculations, spell damage 02:52:32 spell success rate 02:52:36 actual spell hunger cost 02:52:42 Then why use C++? :) 02:52:54 Perl or Python or something else would certainly seem like a better tool for text processing. 02:53:01 I know of literally no programming basically 02:53:07 and I was thinking of the front end 02:53:15 since all of this is to make it so that the program can exist 02:53:21 this is the dirty work I guess you'd say 02:53:22 * due votes for Python. 02:53:33 C++ for text file parsing is ... painful. 02:54:04 what is my solution for using the data I've parsed in an end-user application? 02:54:35 "anything"? 02:54:35 my ideal is that you click a button on the finished application and it reads from a dump file, initializes variables based on your character's attributes, then has tests you can run 02:55:21 I'm not familiar with some concepts, like parsing with one language and using the results in another language 02:57:59 do my goals even make sense I'm not entirely sure I'm communicating myself 02:58:22 i imagine you could do everything in python 02:58:26 the ideal case is that I'm chugging along on my HEWz and decide to see how much damage I can do to something with firestorm 02:59:10 I open this application, use it to load my dump, it stores my SK_ values in the appropriate skills, plugs them into the spellpower formula, and converts that to average damage 02:59:11 answer: "a lot" 02:59:26 I'd actually use it more on stuff like bolt of iron 02:59:38 "do I need 1 bolt of iron or am I better off with 3 stone arrows" 03:00:13 "should I use 2x IMB or would 4x stone arrow give me higher average damage" 03:00:24 stuff that you can kinda guess at but would be great to know exactly 03:00:56 upsy: being unfamiliar with python how do you go about creating a window object 03:01:15 effo: Python doesn't come with an in-built, usable graphics system; however, there's wxPython, which is an excellent, cross-platform GUI toolkit. 03:01:19 I don't really know how to in any language yet so I'm not biased against figuring it out in either 03:01:44 bothering with GUI is more trouble than it's worth imo 03:01:51 i'm not very familiar with it myself, but there are various toolkits 03:01:56 unless you want to make it extremely easily accessible 03:02:01 monqy how would you implement this concept without a UI 03:02:03 yeah, why not just make it command-line? 03:02:04 and yeah I kinda do 03:02:09 command line interface yes 03:02:14 I want to upload it somewhere and distribute it for others 03:02:43 so for command line you could just type the spell you want info on and it'll tell you how well you can cast it 03:02:45 that could work 03:03:06 give stats like hunger, success, and spellpower/damage based on your enhancers/worn wizardry 03:04:10 this will be good opportunity to get used to the feeling of spending hours on code and finding out there is a way I should have been doing it instead 03:04:50 another reason I was doing it in C++ was because I downloaded VS10 and it seemed like the thing to do 03:05:15 I'm not familiar 03:05:33 I wanted to get familiar with what's used at businesses 03:05:50 I'm going to try to get an internship or job as a code monkey anywhere possible as soon as I can 03:05:58 aha 03:06:02 (I know nothing about businesses) 03:06:05 same 03:06:16 I just know they tend to license MS products haha 03:07:37 looks like there is a python plugin for vs10, i'll swap the c++ book I was reading for a python book 03:07:40 and here we go! 03:10:43 since I've been blabbing about what I'm trying to do, is there anywhere I should look first in python references to speed up this process? 03:11:03 basically, open a file, search for certain keywords in file -> grab the values after those keywords, assign them to variables 03:15:23 there's a #python right? I imagine they'd have a good solution 03:15:53 thought you were my bros ;_; 03:15:58 i'll figure it out 03:16:32 I'm not good with pythonisms 03:20:46 effo: regular expressions 03:20:54 effo: google "parsing text files with python" would help, I imagine. 03:24:39 -!- elliptic has quit [Ping timeout: 264 seconds] 03:34:58 yeah I'm in the middle of this right now and it's not looking any easier :/ 03:35:41 I've figured out basically the same functionality in readline() but now I have to find the right string within it, move a couple characters over, and snip a figure out and assign it to a variable 03:35:57 seems like the actual legwork of getting the data out requires as many commands 03:36:50 you could use a parser generator 03:37:02 I want to know what henzell uses 03:37:07 and what parts of the logs it looks at 03:37:14 henzell doesn't parse logs 03:37:18 it looks at milestones 03:37:30 sequell then 03:37:39 you can use !lg to sort by like anything 03:37:43 highest skill, etc 03:37:51 so it has access to just about anything you'd find in the dump 03:38:08 no matter what I use I realize I'm duplicating work 03:38:31 https://github.com/greensnark/dcss_henzell 03:39:46 unholy mixture of ruby and perl? 03:39:53 quite so, yeah 03:41:23 just to make sure which file is parsing the logs 03:41:33 it doesn't parse logs! 03:41:39 blargele 03:41:58 oh hey it has c++ in it too 03:42:00 it parses highscore and milestone files 03:43:25 is the !lg command defined in here 03:43:41 yes 03:44:03 lg uses a sql database, as far as I know 03:44:21 and the database gets its data from highscore files, I think 03:44:24 so game_parser.pl is the one I'm looking through then 03:44:41 I don't know what exactly is what and where in that code 03:44:53 but the name seems relevant 03:45:08 well I guess if my intent is to pull out every attribute of a character at any given time 03:45:12 I'm not exactly duplicating work 03:45:16 because nobody has bothered 03:45:26 -!- MarvinPA has quit [Ping timeout: 252 seconds] 03:45:27 which is good! 03:45:38 and I think I'm going to finish in C++ because I already have it doing what I want it to 03:46:27 but for now I'm gonna play some video games because I spent 8 hours today learning c++ from nothing :/ 03:47:58 effo, you have no programming experience at all, or just no C++ experience? 03:48:04 none 03:48:14 just a lot of google 03:48:18 ouch 03:48:47 it's not so bad. So far I can read a character dump and it stores all the relevant info from the first 7 lines 03:48:50 I just have to finish it 03:48:56 maybe you should start with a less pain-inducing language and/or a simpler problem. 03:49:14 well the thing is that the problem is an actual problem for me and also interesting 03:49:19 which ensures I will finish 03:49:29 -!- syllogism has joined ##crawl-dev 03:49:32 I mean for any professional developer this would probably be a 1-day project 03:49:36 in any language they felt like 03:49:39 well, okay, I have no intention to stop you or anything 03:50:11 hehe I appreciate the tip though. I did give python a shot just now but the syntax didn't seem easier to grasp and like I said I've made headway in C++ 03:50:26 I will give a trip report in a few days or when I give up ;) 03:52:12 -!- effo has quit [Read error: Connection reset by peer] 03:53:49 -!- casmith789 has quit [Ping timeout: 246 seconds] 04:03:41 -!- Zaba has quit [Ping timeout: 240 seconds] 04:08:49 -!- Zaba has joined ##crawl-dev 04:37:19 -!- Mu_ has joined ##crawl-dev 04:40:25 -!- monqy has quit [Quit: hello] 05:01:36 Windows development builds on crawl.develz.org updated to: 0.9.0-a0-196-ga7b389d 05:06:19 Unstable branch on crawl.develz.org updated to: 0.9.0-a0-196-ga7b389d (32) 05:25:36 -!- eith has joined ##crawl-dev 05:39:25 -!- Ashenzari has quit [Ping timeout: 276 seconds] 05:40:03 -!- Ashenzari has joined ##crawl-dev 05:40:03 -!- The topic of ##crawl-dev is: Stone Soup Development | Logs: http://tozt.net/crawl | People with +v have commit access. | Please keep general crawl-related chit-chat to ##crawl. | Dev wiki: http://crawl.develz.org/wiki | Long stuff to pastebin.ca please | Immortal Warwalrus and Crazy Yiuf forever. | Tentative 0.8 release date April 24th 05:42:07 -!- casmith789 has joined ##crawl-dev 06:07:45 -!- Zaba has quit [Ping timeout: 252 seconds] 06:14:18 -!- Zaba has joined ##crawl-dev 06:14:22 -!- Zaba has quit [Changing host] 06:14:22 -!- Zaba has joined ##crawl-dev 06:18:11 -!- MarvinPA has joined ##crawl-dev 06:29:37 re 06:30:16 kilobyte, _builder_normal is not called if _builder_by_type takes care of the level generation 06:32:30 -!- Pseudonut has quit [Remote host closed the connection] 06:39:09 kilobyte, do you simply want small lair ends to have a smaller weight than large ones? 06:43:34 -!- MarvinPA_ has joined ##crawl-dev 06:54:55 -!- frogfrog has joined ##crawl-dev 06:58:02 -!- edlothiol has joined ##crawl-dev 06:59:00 -!- MarvinPA_ has quit [Ping timeout: 252 seconds] 06:59:17 -!- frogfrog has quit [Client Quit] 07:03:15 -!- MarvinPA_ has joined ##crawl-dev 07:12:19 03zaba * r971706a25cbd 10/crawl-ref/source/dat/des/branches/lair.des: lair.des: Clean up small ending definitions a bit, and make them have a smaller weight. 07:29:14 -!- ais523 has quit [Remote host closed the connection] 07:32:01 -!- MarvinPA_ has quit [Ping timeout: 252 seconds] 07:38:22 -!- MarvinPA_ has joined ##crawl-dev 07:52:12 -!- edlothiol has quit [Remote host closed the connection] 07:55:44 -!- edlothiol has joined ##crawl-dev 08:00:30 03j-p-e-g * r8e11c5fbe19b 10/crawl-ref/source/rltiles/ (dc-item.txt item/armour/crystal_plate_mail2.png): Add Curio's crystal plate tile as ego/randart variant. 08:00:36 Zaba: yeah, having a second chance of being placed effectively doubled their weight 08:03:28 -!- MarvinPA_ has quit [Quit: Page closed] 08:06:20 03dolorous 07stone_soup-0.8 * r854c9eb6b94d 10/crawl-ref/source/mon-act.cc: Fix Mantis 3816: Silenced monsters shouldn't be able to read scrolls. 08:06:28 03galehar 07stone_soup-0.8 * r1a13cb92cd57 10/crawl-ref/source/invent.cc: Fix melded rod being evokable (#3821). 08:06:29 03j-p-e-g 07stone_soup-0.8 * r28360a7e19d4 10/crawl-ref/source/rltiles/ (dc-item.txt item/armour/crystal_plate_mail2.png): Add Curio's crystal plate tile as ego/randart variant. 08:06:32 03zaba 07stone_soup-0.8 * r088f0cb364e4 10/crawl-ref/source/dat/des/builder/layout.des: Restrict treasure rooms on layout_roguey to Lair and D, and make them even rarer. 08:10:19 03kilobyte 07stone_soup-0.8 * rd1ad95c95d1d 10/crawl-ref/source/ (enum.h mon-data.h): Show a "removed monster" for holy swine, instead of crashing. 08:10:30 03galehar 07stone_soup-0.8 * r30401ac6d980 10/crawl-ref/source/ (7 files): Ashenzari detect monsters distinguish friendly ones. 08:10:31 03j-p-e-g 07stone_soup-0.8 * r0f7c0918317e 10/crawl-ref/source/rltiles/ (dc-misc.txt dc-misc/sensed_monster_friendly.png): Add a tile for sensed allies. 08:13:43 -!- valrus has joined ##crawl-dev 08:16:27 -!- MadCoyote has quit [Quit: Don't talk to me, I'm on my popcorn break] 08:30:25 -!- ZorbaTHut has quit [Read error: Connection reset by peer] 08:30:40 -!- ZorbaTHut has joined ##crawl-dev 08:42:25 -!- valrus has quit [Remote host closed the connection] 09:04:20 03j-p-e-g 07stone_soup-0.8 * rb48264784fcc 10/crawl-ref/source/ (6 files): Fix #781: handle throwing nets correctly in the Shoals tides. 09:04:31 03j-p-e-g 07stone_soup-0.8 * r17ceae4012e6 10/crawl-ref/source/ (mon-act.cc monster.cc monster.h show.cc): Mantis #3790: Keep monster trails if monsters swap on the edge of LOS. 09:04:32 03MarvinPA 07stone_soup-0.8 * ra2daf62c648a 10/crawl-ref/source/ng-setup.cc: Start Enchanters with some stabbing skill 09:04:33 03kilobyte 07stone_soup-0.8 * r2f3f11299269 10/crawl-ref/source/fontwrapper-ft.cc: Show FreeType errors on Windows, make them fatal. 09:04:34 03MarvinPA 07stone_soup-0.8 * r396def3ced8c 10/crawl-ref/source/acquire.cc: Acquire cursed items with Ashenzari 09:04:35 03kilobyte 07stone_soup-0.8 * ra2b2d26dfd99 10/crawl-ref/source/dbg-asrt.cc: Show non-ASCII in fatal errors on Windows. 09:04:36 03kilobyte 07stone_soup-0.8 * r113c1e330018 10/crawl-ref/source/ (chardump.cc files.cc files.h fontwrapper-ft.cc): Work around FreeType having problems opening files on Windows. 09:04:38 03j-p-e-g 07stone_soup-0.8 * r942a50c9b0ac 10/crawl-ref/source/show.cc: Fix #3800: console Abyss map being all black. 09:11:39 -!- MarvinPA_ has joined ##crawl-dev 09:13:45 Pre-release branch 0.8 on crawl.develz.org updated to: 0.8.0-a1-163-g113c1e3 (32) 09:28:37 Windows builds of 0.8 branch on crawl.develz.org updated to: 0.8.0-a1-163-g113c1e3 09:36:31 -!- edlothiol has quit [Read error: Connection reset by peer] 09:40:18 -!- edlothiol has joined ##crawl-dev 09:42:23 Napking, I have for you these questions three 09:42:35 hey greensnark :) 09:42:36 Er, I mean: I have fer ye these questions three 09:43:01 Actually, it's just one question: those enigmatic !tells involving morgue locations :P 09:43:21 ;-P 09:43:23 Yes? 09:43:25 So you've created a 0.8 morgue dir for 0.8 prerelease, and that'll also be used for 0.8.0 once it's released? 09:43:41 yeah - didn't see any harm in that 09:44:01 do you? 09:44:08 Ok, it just creates for me a little problem: how does Sequell know, given a 0.8a game whether to look for the morgue under trunk or 0.8 09:44:14 since stats/score page parses the version tag 09:44:26 ahhh, riiight 09:44:42 well, 0.8 is >= 0.8.0-a1 09:45:01 So there were no 0.8.0-a1 games in the trunk playground? :) 09:45:03 while trunk is only 0.8.0-a0 & 0.9.0-a0 - maybe? 09:45:14 It still makes things more complicated :( 09:45:23 I'm of course not entirely sure 09:45:30 moin greensnark 09:45:46 Hey Zaba 09:45:51 mmh 09:45:57 so complicated? 09:46:00 Napkin: Can you remind me of the 0.8 logfile/milestone urls 09:46:21 Napkin: Well, not really if all the games in the new 0.8 sandbox logfile are in the new morgue dir 09:46:29 greensnark, why do people keep complaining about roguey_level's treasure rooms? They are in the code since literally forever. 09:46:38 Zaba: They complain? 09:46:38 plus it's free loot, I really don't see what's not to like! 09:46:42 yes, they are 09:46:56 Napkin: Oh, cool, I just misunderstood then 09:47:07 "Could you please include http://crawl.develz.org/milestones-{,spr,zd}-0.8.txt and http://crawl.develz.org/allgames-{,spr,zd}-0.8.txt in the stats? Thanks!" 09:47:13 greensnark, well, there was recently a bug report about them appearing in hells (which is bad, I agree), which also mentioned that they perhaps should be removed entirely 09:47:14 I initially got the impression that you'd moved the old 0.8 morgues too 09:47:23 greensnark, if that's not loud complaining, I don't know what is :P 09:47:28 no, greensnark 09:47:29 Napkin: Oh, cool, that's easy then 09:47:33 even 4.1 has roguey level with treasure rooms! 09:47:49 I created 0.8 branch when completely additionally 09:48:11 Zaba: Just make the roguey treasure vault a subvault and add a bunch of nasty subvaults in addition to the loot rooms to shut the haters up :P 09:48:28 Napkin: Awesome, will do 09:48:40 0.8.0-a1 was tagged after 0.9.0-a0, right? and only in the stone_soup-0.8 branch, right? 09:48:51 greensnark, I keep meaning to do that 09:49:15 greensnark: love the ctrl+r line-history search in irssi! :D 09:49:19 Maybe I'd have done it this morning if due hadn't messed lair:8 generation up in such a way that made me spill my tea :P 09:49:43 Let this be a stern lesson to you on the dangers of tea 09:50:03 what would've been safer? :P 09:51:21 Coffee would, in addition to making a really spectacular spill, have wired your brain so awesomely that you would have invented such inspired new profanity to suit the occasion that your name would have gone down in legend. 09:52:05 Whereas with tea you say "Oh, snap" and you've shot your bolt 09:52:09 oh, damn, i'm wrong, greensnark 09:52:15 -!- elliptic has joined ##crawl-dev 09:52:25 hm, yes, I believe I have avoided profanity altogether 09:52:28 there are games with v=0.8.0-a1 in the logfile of trunk/master 09:52:33 Napkin: As long as all the games in one logfile have morgues in one directory, we're good 09:52:44 yes, that they do 09:52:45 I've just said, "what the hell" and the rest has been pretty civil 09:52:51 The problem only creeps in when one logfile's morgues are scattered across different directories 09:53:07 no, fresh logfile for 0.8 09:53:16 and nothing from master/trunk moved to 0.8 09:53:38 :) 09:53:46 I should have drunk coffee instead 09:55:19 greensnark, although I confess that the hacky usage of dgn.persist that I have invented might be worth some original profanity, too 09:55:49 greensnark, the whole idea of placing two ending vaults on lair:$ is still mind-boggling to me, I have merely tried to beat it into a technically acceptable shape 09:55:58 dgn.persist is actually what profanity looks like in Lua 09:56:09 Two ending vaults? 09:56:17 I'm afraid so 09:56:28 A serial vault kind of thing? 09:56:35 yes... quite. 09:56:42 I set a variable in dgn.persist to prevent recursion :P 09:57:24 it's probably a wrong place for that, but it's pretty isolated so it should be easy to fix. 09:57:41 As penance you shall use Emacs for three days 09:57:45 Running in GNU screen 09:58:11 administering minecraft servers using gnu screen is enough for me, but thanks for the tip 09:58:14 !lg * cdo cv=0.8-a 09:58:18 91419. Whitewater the Ducker (L1 FeBe), worshipper of Trog, quit the game on D:1 on 2011-04-13, with 47 points after 337 turns and 0:03:02. 09:58:26 gnu screen and solaris, actually 09:58:57 So you administer minecraft servers, do you 09:59:09 in short, sorta... 10:01:19 cdo server doesn't update the screen immediately on load anymore, so it shows a blank screen until you press a key 10:01:47 well a relevant key, like w 10:02:41 -!- ghallber1 has joined ##crawl-dev 10:04:22 -!- Sequell has quit [Remote host closed the connection] 10:06:38 Seriously, this waepon_swap code is crazy... 10:07:01 -!- Sequell has joined ##crawl-dev 10:07:04 I'd reall like to simplify it a bit while I'm changing the buthcering mechanics, but I don't dare. 10:07:19 !lg * cdo cv=0.8-a 10:07:20 91783. glau the Skirmisher (L3 DrBe), worshipper of Trog, blown up by Ijyb on D:2 on 2011-04-17, with 121 points after 1368 turns and 0:03:16. 10:07:25 !lg * cdo cv=0.8-a -log 10:07:25 91783. glau, XL3 DrBe, T:1368: http://crawl.develz.org/morgues/0.8/glau/morgue-glau-20110417-150533.txt 10:12:36 I've seen that too, when connecting from my desktop, casmith789 - space is enough. but when telnetting in from an OS with an older telnet, the screen shows immediately 10:12:53 I have no idea what causes it 10:13:01 well it used to work instantly 10:13:02 thanks, greensnark :) 10:13:15 indeed 10:13:17 then I played on cao for a while because of erocrawl and recently went back 10:13:34 must be the dgl updates? 10:16:10 i would like to know that too 10:25:52 and, since I have no idea when this started, I cannot even guess what causes it 10:26:45 it doesn't happen when you do ssh, right, casmith789? 10:26:56 sorry I never ssh cdo 10:27:08 I also have no wish to use ssh keys 10:27:13 could you try, please? 10:27:24 using the public key is simple 10:27:43 wget http://crawl.akrasiac.org/cao_key 10:27:43 chmod 400 cao_key 10:27:45 ssh -C -i cao_key -l crawl crawl.develz.org 10:27:58 I don't have the cao key 10:28:07 oh right 10:28:08 -C? 10:28:09 in case you run *nix OS? 10:28:15 Eronarn: enable compression 10:28:18 compression, Eronarn 10:28:26 ah, didn't know that had to be set manually 10:29:19 okay it works like it used to 10:29:25 -!- stabwound has quit [Read error: Operation timed out] 10:29:40 hmm.. something is weird with telnet then 10:34:18 I really hate, how telnet to dgl can screw up your terminal afterwards 10:34:41 Napkin: it is updating the screen on connect, but then it's just sending a clear screen command immediately afterwards 10:34:51 is there any reason, the cursor keys suddenly produce ^[OD instead of ^[[D? 10:35:31 which code is that, doy? 10:35:46 \e[H\e[J 10:36:02 thanks 10:36:19 still, i wonder why ssh doesn't have this problem 10:40:36 telnet and ssh send the same data on connect, except telnet then also sends this afterwards: <1b>[24;1H<1b>[?1049l<0d><1b>[?1l<1b>><1b>[2J<1b>[?1h<1b>=<1b>%G<1b>[?1h<1b>=<1b>[?1049h<1b>[1;24r<1b>[39;49m<1b>[m<1b>[4l<1b>[H<1b>[J 10:40:49 where "<1b>" is escape 10:40:59 i'm not sure why it would do that 10:49:54 well, the telnetd from another package has the same problem 10:53:27 it's the "application" cursor mode 10:54:15 I'd say it's strictly better since it lets programs uniquely distinguish between keypad and "gray" arrow keys, but some programs fail to recognize it 10:55:03 Crawl for one uses it... it is possible that a crash that fails to let it clean up will leave your terminal in that mode 10:57:19 it doesn't happen for putty 10:57:57 the extra blanking of the screen, i mean 10:58:07 kilobyte: could it be connected to http://git.develz.org/?p=dgamelaunch.git;a=commitdiff;h=573fb22eba21e66afffb2980166f69d777417aea ? 10:58:37 and, the cursor keys are also changed when just running dgl without starting crawl 10:59:23 Napkin: yeah, i think \e[?1049l might be the application cursor mode bit, if i remember correctly 11:00:16 so guys, how do I fix this? 11:00:57 figure out what's making it send that extra data i guess? 11:01:36 greensnark? what version of dgl did you install on CAO? 11:02:03 greensnark: do you have all of kilobyte's commits, which are listed here: http://git.develz.org/?p=dgamelaunch.git;a=summary ? 11:02:19 -!- MadCoyote has joined ##crawl-dev 11:02:55 i don't have an idea how you debugged it, doy - no chance for me to figure anything out about this, I'm afraid 11:02:59 ;) 11:04:13 i just did "telnet crawl.develz.org 345 > out" 11:04:14 (: 11:04:19 Napkin: I have all of kilobyte's commits, yes 11:04:40 wtf.. so how can it happen on CDO and not CAO? :-O 11:04:43 I haven't got the last two commits you made 11:05:02 nah, that's just filepermissions and banner-stuff 11:05:24 I bet it's you echoing ancient gaelic curses in your crawl launcher script 11:05:49 CAO/CDO crawl launcher scripts have diverged a bit. I removed the gaelic :P 11:05:59 nooo 11:06:03 it happens before that 11:06:11 when DGL starts up 11:06:20 when the DGL menu is supposed to show right after login 11:06:41 You mean you get the gaelic curse right after login? 11:07:03 I'm not seeing the problem 11:07:08 Oh, this is telnet only? 11:07:11 yes 11:07:30 you do "telnet crawl.develz.org 345" and you don't see anything 11:07:35 because it spits out weird extra stuff 11:07:41 that involves clearing the screen 11:08:04 this, btw, doesn't happen when i do "telnet crawl.develz.org 345" from CDO itself :D 11:08:14 I am at a complete loss what might cause it 11:08:26 I submitted the patch to set application mode ages ago and it was incorporated into Crawl itself in 0.4 11:08:39 This is interesting, and while it is obvious that this is all Napkin's fault, I'm not sure quite how he managed it 11:08:39 so it shouldn't be anything in DGL 11:09:00 Napkin: So what did you do :P 11:09:18 I suspect Napking's banner changes 11:09:25 He probably put in the ancient gaelic in the banner text files 11:09:31 i tried "undo" to those laready 11:09:52 kilobyte: it's not about crawl ;) 11:10:38 removed the $INCLUDE() that is.. no change 11:11:59 Napkin: Is it just that your menu file is too long 11:12:08 Can you try dropping some extraneous items from the menu 11:12:14 Oh wait, it's not too long 11:12:24 Yeah, this is weird :) 11:12:33 hehe ;-P 11:14:00 $> echo "123" > main_anon.txt 11:14:13 Does that work? 11:14:19 no :( 11:14:22 same shit 11:14:32 need to press a key before it shows up 11:15:41 My telnet whines about your ipv6 address before connecting using ipv4 because I don't have ipv6 :P 11:16:07 I wonder what'll happen to all the folks with weirdly broken ipv6 11:16:13 Not that that has anything to do with this 11:16:45 oh, telnet is not listening to ipv6 11:16:52 seems to be a bug of the inetd 11:16:55 my telnet tries ipv4 before ipv6 11:18:38 upgrading openbsd-inetd package.. maybe that helps 11:18:51 So the telnet problem appeared after moving to the new server? 11:19:06 i don't know 11:22:00 Antimagic brand fails to reduce mp after switching for butchering (https://crawl.develz.org/mantis/view.php?id=3822) by Hushed 11:22:14 Oh nice, APNIC is almost out of IPv4 addresses <3 11:22:24 And RIPE probably by end of year, go Europe 11:23:09 ok, at least telnet is listening on ipv6 too now ;) 11:23:18 well, they predicted APNIC won't run out in half a year, and it already did (the last trickle pool not included) 11:24:22 but don't worry, ISPs in backward countries like US or Poland won't start thinking about adding IPv6 until, say, 2016... 11:24:38 Well, ARIN is in a pretty good position, so yeah 11:24:53 Naturally the US is sitting on the biggest stockpile :P 11:26:16 after all, running out of unused addresses doesn't mean that the already allocated ones stop working! 11:26:24 who needs the damn ipv6 anyway. 11:26:31 ipv6 is awesome 11:26:41 let's just put every country behind its own NAT! 11:26:45 hehehe 11:26:48 I mean every ISP. 11:29:13 ooookey.. so what else can I do? 11:30:39 Zaba: I hear it works well for North Korea. 11:31:06 bound to be a good idea for everybody else, then! 11:31:42 http://codepeek.com/paste/4dab15e75a26e8f86c3d4d00 11:31:50 this is what those extra control sequences do 11:31:55 if that helps any 11:32:04 "Are you sure you want to leave the dungeon?" takes turn (https://crawl.develz.org/mantis/view.php?id=3823) by minmay 11:32:35 doy: That's neat, how do you do that? :) 11:32:50 greensnark: i have this reference document, that i look things up in 11:32:51 (: 11:32:57 So did you script that? :P 11:33:05 not yet! 11:33:15 FR: script it :) 11:33:20 i think paxed might have a script for it, actually 11:33:41 doy - is there anywhere else the "switch to utf-8"? 11:33:59 in the control sequences before those? 11:34:59 yes 11:35:45 hmmmmrrrpfff 11:36:01 %G is the switch to utf-8, right? 11:36:04 yes 11:36:13 heh, at least I can stil count ;) 11:36:16 Napkin: does your banner include the switch to utf8 right at the start? 11:36:23 no 11:36:47 the banner is only text 11:36:59 i just had the banner reduced to "123" and it still happened 11:37:12 so i'm looking at the actual stuff sent 11:37:22 and that block of extra escapes actually occurs previously as well 11:37:42 at the very beginning, huh? 11:37:51 not at the very beginning 11:38:00 the very beginning sends some other stuff 11:38:03 then it sends that string 11:38:20 then it sends "enable utf8, move the cursor to the top left, clear the screen" 11:38:22 so.. it's repeating that sequence for some reason.. 11:38:24 then it prints the banner 11:38:30 then it resends that string 11:38:41 you mean, it actually enabled utf8 3 times? 11:38:45 *enables 11:38:55 4 times, actually 11:39:00 lol 11:39:07 a lot of codes are repeated multiple times 11:39:36 that extra string enables keypad application mode and cursor key mode twice, for instance 11:42:54 CAO dgl says exactly nothing after printing the menu 11:43:17 greensnark? 11:43:33 I mean there's no extraneous output after CAO prints the menu 11:43:43 Whereas CDO emits that welter of extra codes 11:43:50 could you add master from git.develz.org/dgamelaunch.git as remote and do a cherry between yours and mine? 11:44:13 Are you using HEAD from your repo? I'll just peek at the diff and see if there's anything of interest 11:44:21 master from your repo, I mean 11:44:27 yes 11:45:06 Stupid Mac insists on trying ipv6 first for everything 11:45:15 that's git 11:45:25 i get the warning too 11:45:35 No, what does git care about the network plumbing 11:45:53 This is the OS returning ipv6 addresses first despite knowing I have no ipv6 connectivity 11:45:57 git seems to try ipv6 first and then fall back to ipv4 11:46:02 ah, true 11:46:07 http://codepeek.com/paste/4dab1943fda5c8f76c4d4c00 11:46:17 the entire sequence sent 11:46:19 stupid linux os does the same ;) 11:46:30 i think a lot of the weirdness is generated by curses 11:47:09 hence the name :P 11:49:47 well, anything that is not hard-coded to IPv4 is supposed to try all protocols in order 11:50:12 "in order"? 11:50:14 ok.. so.. dgl calles initcurses, which does the first big part (init, cbreak, keypad, color, utf8) 11:50:32 next it calls term_resize_check, which calls initcurses() again 11:50:45 you can configure your name resolver to return IPX/SPX addresses, or even whatever fancy interplanetary protocol with hour-long halftrips you want 11:51:37 doy: glibc's default is ipv6 (if your machine has any addresses),ipv4(same) 11:51:38 hmmm... perhaps dgl is getting the telnet code for "here's my terminal size" after it already draws the screen 11:51:52 loopback addresses don't count 11:52:04 dinner o/ 11:52:11 kilobyte: my machine does ipv4 first, falling back to ipv6, apparently 11:52:15 which i'm pretty okay with 11:52:39 so I guess greensnark has a router which does radvd but can't route that further 11:53:17 which is perfectly fine -- you lose a small fraction of a milisecond, and will be ready when your ISP gets up to scratch 11:53:29 greensnark: yeah, i wonder if this is just a lag issue 11:53:52 cao gets the telnet term size command before drawing the screen, cdo gets it afterward? 11:54:10 would explain why it doesn't happen when napkin telnets locally too 11:54:28 -!- Textmode has joined ##crawl-dev 11:54:40 although i'd expect that to redraw the screen entirely though 11:54:41 shrug 12:24:57 -!- stabwound has joined ##crawl-dev 12:32:10 -!- MarvinPA has quit [Quit: Page closed] 12:46:14 -!- MarvinPA_ has quit [Quit: Page closed] 12:47:49 -!- Twilight13 has joined ##crawl-dev 12:50:11 -!- edlothiol1562 has joined ##crawl-dev 12:50:47 -!- Twilight-1 has quit [Ping timeout: 250 seconds] 12:51:25 -!- edlothiol has quit [Ping timeout: 246 seconds] 12:51:54 ok, it's definitely the "clear()" from initcurses() 12:52:17 I commented it out temporarily and it worked 12:53:12 Napkin: did you put it back in? 12:53:16 i'm testing something 12:53:54 (if you didn't put it back in, could you?) 12:53:55 (: 12:54:17 try telnet on port 346 12:54:56 346 is without clear() in initcurses(), while 345 is the previous dgl binary 12:55:09 undersol the Carver (L9 MiPa) (D:8) 12:57:12 so, maybe I could create a initcurses-resize() for testing? which contains the normal initcurses() without the clear() and is called by the resize function 12:58:28 -!- monqy has joined ##crawl-dev 12:58:45 03j-p-e-g * ra93de5562b24 10/crawl-ref/docs/changelog.txt: Update the change log to 8e11c5f. 13:00:10 alright, yes, it definitely is the telnet "here's my terminal size" command 13:00:22 and i think the better option would be to have it actually redraw the whole screen on resize 13:00:26 rather than just clear it 13:00:47 03j-p-e-g 07stone_soup-0.8 * re41dd81c3215 10/crawl-ref/docs/changelog.txt: Update the change log to 8e11c5f. 13:01:45 so, since the clear is in initcurses() which is called by term_resize_check() i will create a new function for term_resize_check() to call 13:01:49 agreed? 13:02:06 sounds good 13:04:00 any advice what I can leave out of this reinitcurses()? 13:04:47 http://codepeek.com/paste/4dab2bb7847c98f86c5b4d00 13:05:09 initscr and refresh should be enough, right? 13:05:38 not actually sure 13:05:49 hmmm, is it actually difficult to redraw the screen at that point? 13:06:02 no clue 13:06:21 i think doing it this way might make things not work as well if someone resizes the terminal to be smaller 13:06:30 i don't really understand, what it is needed for. probably when resizing the watching screen? but that's not ncurses, just ttyplay 13:06:59 making the terminal smaller while a dgl menu is shown closes the connection anyways, doy 13:07:15 has that always been the case? 13:07:25 i think so, yeah 13:07:35 i don't remember that it ever worked 13:07:48 and why does it do that? 13:08:28 probably segfault.. as always with c & ncurses, when something it not 100% done in the right order? 13:09:36 no, on cao it seems to resize properly 13:09:43 i don't get disconnected at all 13:09:50 i do get the screen clear without a refresh though 13:10:09 during a game or in a dgl menu? 13:10:14 in the dgl menu 13:10:28 there's no reason for it to disconnect 13:10:41 that's the entire purpose of that term_resize_check() thing 13:10:49 i just resized 3 times 13:10:59 and "Connection closed" after the 3. 13:11:25 on cao or cdo? 13:11:29 cao 13:11:36 it's working fine for me 13:11:37 pressing space to redraw the screen in between 13:11:59 start wide, then resize small, then resize wide again -> crash 13:12:24 reproducable for me 13:12:31 pressing space twice in between 13:12:51 oh, needs 3 resizes 13:12:54 well, anyways 13:13:18 i remember i had fun with ncurses in that matter once too 13:14:00 ah, i was just resizing vertically 13:14:07 i do see that when resizing horizontally 13:14:16 in any case, even more evidence that it's actually just a bug 13:14:18 (: 13:17:17 :) 13:19:00 hmm, thinking about it.. i think the multiple initscr() was the problem for me 13:19:43 it was just a small excersice, because i got annoyed about centericq/im dying of that all the time 13:20:17 maybe i can find it again 13:22:40 hrm 13:22:59 the WINCH signal handler actually calls term_resize_check directly 13:23:22 this is a bad idea first of all because it's not really clear that it's safe to call curses functions from inside there 13:23:38 and second of all because it makes the existence of term_resize_check as a separate function unnecessary 13:23:58 that's possibly what's causing the segfaults though 13:24:15 doing complicated things inside signal handlers is a bad idea 13:24:55 So I've uploaded a patch for the butchering stuff to Mantis, anyone care too look at it? 13:27:59 casmith789: try again :) 13:28:09 Napkin: try this? http://codepeek.com/paste/4dab312fc5a418f76c5f4c00 13:28:13 instead of what you were doing 13:28:23 Napkin: :) 13:28:59 this way it should clear and redraw the screen properly 13:29:10 rather than just keeping the screen in place and hoping it's still correct 13:29:21 only after keypress though, right? 13:29:30 no 13:29:43 the while(1) is caught in a getch() 13:29:56 oh, right - resize is a keypress, huh? 13:30:03 sort of 13:30:09 it's a signal, which interrupts read calls 13:30:34 ah ok 13:30:38 so getch should just return "i didn't get anything because i was interrupted by a signal" 13:30:50 well, for the moment i can't, since i already have the new version in 13:31:03 -!- paxed has quit [Ping timeout: 260 seconds] 13:31:06 need to wait until one of the dgamelaunch binaries is "free" ;) 13:32:37 how about checking for curses_resize = 1 before calling term_resize_check() at the proposed position, doy? 13:32:54 oh, nevermind.. term_resize_check() does that 13:32:57 * Napkin shuts up * 13:32:59 right 13:33:00 (: 13:33:46 :) 13:35:09 should also test to see if the disconnects still happen when you apply that patch 13:35:21 because it's quite possible that that's what was causing them 13:36:59 okok, you convinced me 13:37:05 creating a third binary ;) 13:39:46 -!- paxed has joined ##crawl-dev 13:39:53 I still manage to crash it though - you try, doy 13:40:08 fixes the blank-screen bug, too, though :) 13:41:01 on port 345? 13:42:48 346 13:43:49 is this with your patch applied too? 13:43:55 no, only yours 13:44:00 hmmm 13:44:03 mine is at 345, yours at 346 13:45:08 no, it's not quite working 13:53:21 but it's better now 13:53:38 I committed it to our repository 13:53:45 thanks, doy :) 13:54:57 hmmm 13:55:00 oh, hah, i think i see 13:55:42 curses handles signals to avoid them interrupting read calls, but then handles resize by installing a SIGWINCH handler to return it as an actual keypress 13:55:48 but dgl installs its own WINCH handler 13:55:57 which means that the getch will continue to block 13:56:23 let me see if i can fix that 14:00:09 :) 14:05:04 Napkin: http://codepeek.com/paste/4dab39d91ecd85f86c6c4d00 14:05:09 see if that helps 14:05:28 not sure if it's correct, been a while since i did complicated things with signal handlers 14:05:32 but maybe! 14:05:33 (: 14:07:54 oh.. 14:07:54 Patch format detection failed. 14:08:05 sec 14:08:29 http://tozt.net/0001-try-to-not-stomp-all-over-ncurses-WINCH-handler.patch 14:14:53 port 346 again 14:15:18 hey 14:15:25 now it closes the connection immediately ;D 14:15:37 heh 14:15:41 no need for pressing space ;) 14:16:09 well, honestly? i prefer that compared to the random crashes 14:16:21 seemingly random 14:19:45 want me to run it through gdb? 14:19:58 oh.. not sure i can.. SUID binary 14:20:07 oh, heh 14:20:14 no, was me being dumb 14:20:14 sec 14:20:17 well, at least it's a bit more complicated 14:20:18 -!- edlothiol1562 has quit [Read error: Connection reset by peer] 14:21:07 no hurry, I have a date now anyways 14:21:47 http://tozt.net/0001-try-to-not-stomp-all-over-ncurses-WINCH-handler.patch 14:21:52 updated 14:22:28 alright, let me know when you want to test it then(: 14:23:07 you were fast enough ;) 14:23:20 (: 14:23:21 try 14:24:15 doesn't crash, but doesn't seem to fix it 14:24:16 oh well 14:24:18 heh, with pressing space twice after resize i can still kill it 14:24:37 but, pressing "qw" instead of space, i see no crash :-O 14:24:41 how does it crash for you? 14:24:46 -!- edlothiol has joined ##crawl-dev 14:25:33 oh.. it does crash with "qw" too 14:25:39 *wq 14:25:39 yeah, i can get it to crash when doing that too 14:26:55 actually, i wonder if that's just the flood protection kicking in or something 14:27:12 is there something like that? 14:27:25 yeah 14:27:41 if you send too many keypresses in a short amount of time, it disconnects you 14:27:49 the limit is surprisingly low 14:28:35 but yeah... shrug, not sure 14:28:36 doy? 14:28:40 look at this: http://ipxserver.dyndns.org/files/pandora_old_readline.tar.bz2 14:29:03 unpack and make (needs ncurses & readline) 14:29:15 run it and resize your window 14:30:26 it does appear to segfault after a while 14:30:32 of resizing it 14:30:35 oh? 14:30:53 does it not for you? 14:30:58 no 14:31:00 what were you intending for me to see? 14:31:00 (: 14:31:08 i just did extreme resizing for 15 seconds 14:31:19 to look at the SIGWINCH 14:31:27 because I thought it's stable 14:32:08 hmm - i can't get it to crash 14:33:04 yeah, it takes some effort 14:33:24 lol 14:33:34 http://codepeek.com/paste/4dab408a8e50d1f76c794c00 14:34:13 oh.. it's 6 years ago that I wrote that 14:34:35 (: 14:34:54 just thought it might help in this damn resizing matter now ;) 14:36:00 oh, i see what you do there 14:36:05 and that might help a bit 14:36:29 instead of just calling getch(), you do a select beforehand, and let the select call be the thing to block 14:36:49 heh, I even put credtis in :D 14:38:17 making readling work inside ncurses was the real challenge 14:38:47 which I failed at in the end.. cursor position and line-breaking was too difficult in the end 14:38:50 *readline 14:38:57 -!- ais523 has joined ##crawl-dev 14:41:26 hmmm, no actually, i'm not sure what you were doing with that select call there 14:41:34 it would have made sense if you had also done nodelay() somewhere 14:41:41 but it doesn't look like you do 14:42:39 i think the resize is recognized as key 14:42:54 case KEY_RESIZE: 14:43:55 maybe I will take a look at it from at work tomorrow and get some idea from it 14:44:13 might be worthwhile to see if KEY_RESIZE is ever being returned in dgl 14:44:30 because it seems like things should be working if it was 14:45:37 oh, wait, i wanted to check the online tiles tomorrow :D 14:45:42 well, let's see :) 14:46:08 well, this isn't really that urgent 14:46:09 (: 14:48:58 indeed - at least we worked around the bug :) 15:12:19 -!- galehar has joined ##crawl-dev 15:26:28 -!- elly has quit [Ping timeout: 246 seconds] 15:26:49 -!- Ashenzari has quit [Ping timeout: 246 seconds] 15:28:53 -!- Ashenzari has joined ##crawl-dev 15:28:53 -!- The topic of ##crawl-dev is: Stone Soup Development | Logs: http://tozt.net/crawl | People with +v have commit access. | Please keep general crawl-related chit-chat to ##crawl. | Dev wiki: http://crawl.develz.org/wiki | Long stuff to pastebin.ca please | Immortal Warwalrus and Crazy Yiuf forever. | Tentative 0.8 release date April 24th 15:29:01 -!- casmith789 has quit [Read error: Connection reset by peer] 15:29:03 -!- Finn has joined ##crawl-dev 15:29:27 -!- casmith789 has joined ##crawl-dev 15:29:28 -!- ais523 has joined ##crawl-dev 15:29:29 -!- the_glow has joined ##crawl-dev 15:58:10 -!- ais523 has quit [Remote host closed the connection] 15:58:15 -!- syllogism has quit [] 16:40:03 -!- edlothiol has quit [Read error: Connection reset by peer] 16:43:14 -!- edlothiol has joined ##crawl-dev 17:04:32 03galehar * r31238ac0f2cd 10/crawl-ref/source/ (main.cc stairs.cc): Fix leaving the dungeon prompt taking a turn (#3823). 17:59:16 -!- galehar has quit [Remote host closed the connection] 18:09:47 'R-Click exits'... doesn't (https://crawl.develz.org/mantis/view.php?id=3824) by Trobe 18:11:06 hi 18:12:26 due is it safe to make feature mimic vaults 18:12:38 yeah 18:12:45 Well, doors, portals and branch stairs 18:13:12 noooo, i want fountains too :( 18:13:27 so why are there no feature mimics for walls? 18:13:28 (: 18:13:55 oh fountains should be fine 18:32:40 -!- edlothiol has quit [Ping timeout: 246 seconds] 18:42:47 fountains would be fine if placed in vaults, for randomly spawned, no way 18:44:24 -!- Textmode has quit [Ping timeout: 250 seconds] 18:54:56 -!- valrus_ has quit [Remote host closed the connection] 18:55:24 -!- ortoslon has joined ##crawl-dev 18:57:05 -!- valrus has joined ##crawl-dev 19:10:43 -!- edlothiol has joined ##crawl-dev 19:30:37 -!- Mu_ has quit [Quit: Defecator, may everything turn out okay so that you can leave this place.] 19:58:04 -!- casmith789 has quit [Ping timeout: 250 seconds] 19:59:44 -!- casmith789 has joined ##crawl-dev 20:07:31 -!- edlothiol has quit [Ping timeout: 246 seconds] 20:23:17 kilobyte: ping 20:24:58 so you expect me to be awake at 3:24? 20:25:03 yes 20:25:09 :D 20:28:11 ok, what do you want me to break then? 20:28:22 03kilobyte * r749b47f76a42 10/crawl-ref/source/util/gen-apt.pl: Fix aptitude generation with truly ancient versions of Perl, like those on BSD. 20:28:34 03kilobyte * ra9586bca0807 10/crawl-ref/source/monster.cc: Fix mute spellcasters being able to speak. 20:28:35 03kilobyte * r373b9bef18df 10/crawl-ref/source/dat/database/randbook.txt: Don't use simple "Book" in randart spellbook names. 20:29:59 kilobyte: on second thoughts, it's somethign to do with my ATI proprietary libGL. 20:30:02 so no worries! 20:31:36 ok, bed then. So hold the fort and think how to murder those pesky players. 20:43:22 ciao 20:49:12 -!- Twilight-1 has joined ##crawl-dev 20:53:00 -!- Twilight-1 has quit [Read error: Connection reset by peer] 20:53:05 -!- Twilight13 has quit [Ping timeout: 250 seconds] 20:53:17 -!- Twilight has joined ##crawl-dev 20:53:42 -!- Twilight is now known as Guest34177 20:55:51 -!- valrus_ has joined ##crawl-dev 21:02:48 -!- effo has joined ##crawl-dev 21:03:09 hey I wanted to thank doy, due, etc. for telling me not to use c++ to parse character dumps for the app I'm making 21:03:20 :) 21:03:26 I just realized that with 1 command I can fill a variable with the entire char dump 21:03:28 from the url 21:03:37 in python 21:03:43 f = urllib.urlopen("http://crawl.develz.org/morgues/trunk/effo/effo.txt") 21:03:51 if you're going to be fetching it multiple times may I recommend downloading and caching them instead? 21:03:52 pretty much 21:04:06 c++ is lovely for some things but for parsing text files "oh fuck oh god no" 21:04:16 every time someone would want to fetch the dump, it will be different 21:04:22 Hm. 21:04:51 I'm not making something that'll spam dump fetches 21:05:10 I'd suggest urllib2 btw 21:05:19 ok 21:05:25 I don't know much about any of it 21:05:27 what's better about it 21:05:32 docs.python.org/library 21:05:48 erm 21:05:51 yeah I'm there now as a result of a google search for "open file from url" 21:05:54 which brought me to urllib 21:06:07 urllib is deprecated in faovur of urllib2.urlopen :) 21:06:15 haha ok 21:06:16 http://docs.python.org/library/urllib2.html#module-urllib2 21:06:50 anyway feel fre to PM me with questions 21:06:55 i work with python extensively 21:07:05 so now the question is what is the best method for seperating the wheat from the chaff in this file 21:07:30 I know for most stats I can find the string preceding it, then call a function that gets the next block of text, snipping whitespace 21:07:33 that's how I did it in c 21:07:45 regular expressions most likely 21:08:27 the thing I'm wondering about is should I try to be clever and make a loop that fills an array with all the relevant stats 21:08:39 or have a line of code to figure out what each stat is and fill a variable 21:09:06 str = , ac = and so on 21:09:51 'try to be clever': never do this 21:10:12 yeah I suppose that if I write the code out the long way 21:10:16 I will notice optimizations I can make 21:10:19 what eronarn said 21:10:28 but arrays really shouldn't be clever 21:10:29 (: 21:10:33 as opposed to trying to crap out something optimized from the start 21:10:41 that said, a dictionary is probably more appropriate than an array here 21:10:54 regexp is optimized in terms of coding time 21:11:08 my question is should I store each stat as a separate variable, for easy use later in the program 21:11:17 or should I store them in an array and just remember which index is what stat 21:11:21 for when I use it later 21:11:21 regexp, named groups and a Character object. 21:11:32 effo: you certainly shouldn't do anything involving "just remember" 21:11:35 effo: oh god no; at the very least have char = {"ac": x, ...} etc 21:11:38 that's the entire point of programming 21:11:45 haha 21:11:47 is to not have to remember things 21:12:05 like i said, a dictionary is what you actually want 21:12:07 Res.Fire : + + . <-- ^(\S)\s*:(.*)$ 21:12:10 (and like due said) 21:12:21 would get you: $1 = "Res.Fire" $2 = " + + . " 21:12:28 The format is standard and seriously simple to parse though 21:12:29 assuming you've already split out by whitespace 21:12:39 haha eronarn I have no idea how that'd get me that 21:13:01 effo: google regular expression 21:13:07 what I did in my c implementation was find "res.fire", get a string containing the "+ + ." then iterate through each character 21:13:16 effo: ^ = start of line, () = capture the stuff in between these, \S = non-whitespace, \s = whitespace, * = grab as many as you can, : is just the colon, . = anything 21:13:16 adding 1 to "fireres" for each + 21:13:17 haha 21:13:23 (HP\s*([0-9]+)/([0-9]+)) 21:13:34 oh ok 21:13:38 so, "start of line, any amount of non-whitespace (save these), any amount of whitespace, colon, everything until end of line (save this) 21:13:45 (and oops, i forgot a *) 21:13:50 that neatly solves the problem of grabbing the second part of the current/max hp 21:13:57 since the "/" is not always in the same spot in the file 21:14:01 learning regexes by example is not incredibly helpful i think(: 21:14:05 should find an actual tutorial 21:14:07 doy: no, it's not 21:14:10 regexp neatly solves a lot of problems... and also neatly creates a lot of problems 21:14:13 yeah I am familiar with the concept of regexp 21:14:16 effo: buy* "mastering regular expressions" 21:14:25 (*for some values of "buy" -- steal, sell your mother, etc) 21:14:28 I just don't "see" them yet 21:14:34 when I look at data I need parsed 21:14:42 i like the one that's free online that hasn't been updated for five years 21:14:43 I'll grab that due thanks for the recc 21:14:59 it's a nice, all-on-one-page reference of the basics 21:15:04 Python allows you to name groups as well... 21:15:07 so 21:15:18 also, that reminds me, http://txt2re.com/ 21:15:26 (HP\s*(?P[0-9]+)/(?P[0-9]+)) 21:15:32 which allows you to do m.group("curhp")! 21:15:51 which makes the world a better, nicer, saner, place. 21:15:54 that looks handy! 21:16:09 where is m.group coming from in this case 21:16:22 I'm guessing I should just read up on making common data structures in python 21:16:32 m is the match object returned by doing the match 21:16:35 these regexps look like they will trivialise the parsing part of this 21:16:42 that is what they do 21:16:44 (: 21:16:44 ah 21:16:48 and this is the "re" lib? 21:16:56 m = re.compile("expression").match(text) 21:17:27 ok so if I have opened a file using f = urllib2.urlopen(url); 21:17:31 forget that ; lol 21:17:47 then in order to use re to match how would I call the function 21:18:03 you'll need to get the contents of the file out first 21:18:17 so just f.read() into some other container? 21:18:26 data = f.read() 21:18:28 f.close(), etc 21:18:32 i get to learn python next month :) 21:18:37 then you pass data into your Ye Bigge Regular Expressione 21:18:40 Eronarn: ooh fun 21:18:50 Eronarn: I've been learning Cython! it is fun. 21:19:02 i don't know enough c for that to be valuable to learn :P 21:19:19 so I would m = re.compile("expression").match(data)? 21:19:28 Eronarn: the whole point is that you don't need to know much C to get improvements 21:19:46 effo: yes -- kinda. I'd pre-compile the regexp at the top of the file though -- "DATA_MATCHER = re.compile(blah)" 21:20:16 ok so I'd have HP_MATCHER = re.compile(thatexpupthere) 21:20:21 and so on for every stat I need 21:20:25 which is a ton 21:20:41 you can have a regexp capture multiple things 21:20:58 You could probabvly chain them together with |s 21:21:04 just note that they can get really icky and unreadable if you let them grow too big/weird/etc. 21:21:04 yeah since I know that it will be reading line by line I will probably match all the resistances at once 21:21:05 and etc 21:21:19 all the basic stats, ac, sh, ev, hp, mp, int, str, dex 21:21:23 Eronarn: hence why the "ignore whitespace" option is good: you can use it to tabulate, etc, your expressions. 21:21:24 can be one regexp likely 21:22:38 YAY I <3 ldconfig 21:22:42 effo: all of them can be matched by the same (\S*)\s*: regexp, fwiw 21:22:55 oh wait, the AC/EV/etc. don't have colons, oops 21:22:57 Eronarn: but then you have to do per-match parsing 21:24:32 due: not sure what you mean by that 21:25:25 Eronarn: if you have (\S*) etc you have to go over each match to determine if you've got HP or whatever. 21:25:27 you know, since you can use that ?P syntax to make the match a member of m 21:25:39 I can just make one huge regexp and use the interpreter to check each value 21:25:39 Eronarn: Whereas if you embed the logic in the expression itself you can use .group("curhp") and tada. 21:25:45 and make sure I don't mess it up while I go along 21:26:20 yeah due's syntax really got me thinking 21:26:34 I want each match to fit exactly into .group("something") 21:26:47 so that I can make a "player" object which I immediately assign everything to 21:27:42 due: oh, the way i would've done it is something like ($1):($2) and then array[$1] = $2; this is assuming he's reading in all of the stats each time anyways, rather than going in looking for one specific stat 21:28:13 i would prefer something really general in that case, rather than explicitly naming each group 21:29:14 but you can use Black Magic(tm) 21:29:42 now I'm confused 21:30:26 class Player (object): def __init__ (self, matchobj): self.__dict__.update(matchobj.groupdict()) 21:30:37 a = Player(DATA_MATCHER.match(data) 21:30:43 despite missing parenthesis 21:30:55 You now have a.curhp, a.maxhp, etc. 21:31:04 >:) 21:31:06 nice 21:31:13 and I can use a for the rest of my implementation? 21:31:14 that's kinda gross though 21:31:19 can you do (whatever)(?P<$1>\S*) or the like? adding stuff to m based on matches found? 21:31:39 doy: it is kinda but it's still accepted. 21:32:00 doy: my favourite is class Struct (object): def __init__ (**kwargs): self.__dict__.update(kwargs) 21:32:05 >:) 21:32:15 due: and now you're writing perl! 21:32:16 (: 21:32:19 (don't tell the #python people, they'll kill me) 21:32:23 so this txt2re site 21:32:33 (not that that's a bad thing! more people should write perl!) 21:32:35 is probably better for simpler formats than this 21:32:40 if I paste in the dump line by line and select exactly which parts I want, the regex it generates is likely to work, yeah? 21:33:07 well, it might be hard to actually use their UI, it's not so good 21:33:14 but dumps are quite regular, yeah 21:33:17 I'm interested in the output code 21:33:23 doy: http://pastebin.ca/2047605 21:33:35 so it shouldn't have any problems getting a sense of what you're looking for 21:33:39 basically I'm selecting the ints I want to pull from the first line, I'll give the regexp I come up with 21:34:08 due: i only said that it was gross, not that i thought it wouldn't work d: 21:34:41 it'd be less gross if it took a dict directly, and you passed in m.groupdict() i guess 21:35:00 well, sure 21:35:10 You could make it a classmethod and call it frommatch as well 21:35:17 yeah 21:36:10 the code that site generates doesn't run 21:36:16 is it missing includes or something 21:36:32 oh lmfao 21:36:34 I had perl selected 21:36:35 oops 21:37:06 you could do it in perl too if you wanted! 21:37:07 (: 21:37:11 what is the diff between search() and match() 21:37:23 yeah I could, too many choices! 21:37:25 read the documentation 21:37:27 ok 21:48:58 what is the difference between all these python versions I see 21:49:01 iron python and etc 21:49:11 getting one to work in VS with intellisense is being irritating 21:49:26 fuck visual studio 21:49:33 :D 21:49:36 :D 21:49:41 IronPython is Python implemented for .NET, AFAIK. 21:50:02 you can still make a standard .py file that can be run on someone webhost right? 21:50:12 I want this to be accessed via a form on a webpage 21:50:30 kind of a knowledge tool like crawl.develz.org/wordpress/knowledgebots 21:50:48 the cgi module is in the stdlib yes 21:51:17 I remember first hearing about cgi in early 90s 21:51:22 is that still how basic stuff is done 21:51:26 yes 21:51:31 -!- upsy has quit [Quit: Leaving] 21:58:29 .*?\\d+.*?(?P\\d+).*?(?P\\d+).*?(?P\\d+).*?(?P\\d+) 21:58:32 hooray! 21:58:52 that gets all the stuff I want from the first line 21:59:07 that website is handy as hell for just getting easily parsable data 21:59:21 you don't need that bit at the front if you use search 21:59:31 I do need to skip the first int I see 21:59:38 oh 21:59:41 right 21:59:57 that's current hp which is useful when you're playing but not so much from the perspective of what I'm writing 22:01:00 so my next question, if I built one gigantic RE, could I use it to search the entire file with one command? 22:01:20 yes 22:01:24 hot dog 22:02:54 whitespace in python code is really important right? or can I throw in carriage returns for readability 22:04:26 what're you writing this for anyways, effo 22:04:56 program that will calculate attack damage, chance to-hit, damage reduction from armour, evp, spell damage, spell hunger, spell duration 22:05:47 reads all relevant bits about your character from your cdo dump and uses the formulas I'll get from sourcediving the game 22:05:56 to output information that is always hidden from you while playing 22:06:10 you do realise that a) formulae are randomised and b) there is a reason *why* stuff is hidden, reah? 22:06:37 yep 22:07:03 okay 22:07:30 dumpscumming? 22:07:45 some stuff, like the current value of your best possible to-hit roll, is really nice to know 22:08:03 i.e if I can't break 25 I'm not going to try to smack down a spriggan ghost 22:08:42 reducing the game to pure mathematics ruins most of the fun 22:08:44 but each to their own 22:08:54 haha trust me, even with optimal information I die 22:08:55 frequently 22:08:58 due to just dumb mistakes 22:09:26 the information obscurity can be beneficial to gameplay sometimes, but I'm aware of most of the mechanics anyway, this will just make it easier for me to quantify certain things 22:09:31 and in the end, I'm my own greatest enemy 22:09:45 I'm the guy that had to acquire food in the abyss and got cerebov's rune while sporting rf- 22:22:23 yeah i can see how that would be neat to have around 22:22:40 i'm working on a crawl related script, but it's for much stupider purposes 22:51:44 ok here is the first regexp potential issue I've come into 22:51:56 for race and kit, both have the possibility of being either one or two words 22:52:21 so in the dump, after your name+title, (race combo) could be 2-4 words 22:53:11 I guess I could just have it be race_kit as one variable so i don't have to worry about splitting them while parsing 22:56:48 yeah, those you'll have to know what things are valid races and whatnot to figure it out 22:57:22 luckily a lot of this stuff is just for display 22:57:33 I just realized I don't have to care what the player's combo is 22:57:42 I can display it though, good enough 22:58:47 the race will matter for at least some of the calculations 22:59:07 oh right dwarven/elven/orcish/troll/ghoul/spriggan 22:59:08 blast 23:06:18 what is a good regexp that will match every char until the end of the current line? 23:06:26 I guess .* 23:07:01 er wait I have to have DOTALL flag set because txt2re script outputs RE that only work that way 23:07:15 and I've tried to change the regexps so that I can not use that flag but it breaks my program 23:07:38 I guess I'll just specifically match but not keep numbers that I'm not using so that I don't accidentally capture them 23:20:53 -!- valrus_ has quit [Remote host closed the connection] 23:23:52 Windows development builds on crawl.develz.org updated to: 0.9.0-a0-203-g749b47f 23:27:50 so now that i stopped using placeholder text copied from a chardump and had it actually try to parse a dump from a url, the program is taking absolutely forever to do anything. Could that be as a result of trying to use re.search() on the entire dump? 23:28:02 -!- Pseudonut has joined ##crawl-dev 23:28:17 -!- eith has quit [Ping timeout: 240 seconds] 23:28:26 the regexp I made returns all the relevant info from the first 7 lines of the dump but the program hasn't output anything at all now that I've had it open the file 23:34:21 ... 23:34:48 due: why isn't the ely altar with a neutral fish using a corona-generating "angelfish"? 23:39:00 I think the issue I was having was the fact that I was trying to apply a regexp to a file with a lot to search for 23:39:11 although 26Kb doesn't seem like a lot 23:39:21 is f.read() inefficient or something 23:41:41 effo: why not have it stop reading after however many lines in? 23:41:53 you don't care about most of the stuff in the dump, right? 23:42:01 I will once I figure out what the latest line possible for skills is 23:42:10 after skill levels I don't care about the rest 23:42:12 link to a dump? 23:42:19 http://crawl.develz.org/morgues/trunk/effo/effo.txt 23:42:35 skills comes after some stuff that can vary hugely like your inventory for example 23:43:00 You cannot memorise any spells. 23:43:32 before your regexp, you can have one that tries to match either this, or the text for you having empty spell slots, or possibly the text if you don't have any spellcasting skill 23:43:43 if it matches, quit out of the read loop 23:44:01 haha my read call is so basic that it goes like 23:44:06 f = open(file) 23:44:12 data = f.read() 23:44:36 not sure how the methods you're using work but in a lot of languages you have something like while (f.read()) {stuff} 23:44:57 ah ok 23:45:26 so I can have all the output of f.read stuffed into a variable while also cutting off the read action once I've read enough? 23:47:13 if I'm using \d in a regexp, do I have to input it as \\d? 23:47:21 txt2re does this for everything, ie \\s 23:47:25 dunno if it's necessary 23:50:36 Unstable branch on crawl.develz.org updated to: 0.9.0-a0-203-g749b47f (32)