#nuvie@irc.freenode.net logs for 12 Jun 2004 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[02:19:12] --> Kirben has joined #nuvie
[02:27:17] --- EsBee-Eks is now known as sbx|afk
[04:28:29] --> Yuv422 has joined #nuvie
[05:14:35] <Yuv422> do you guys now of a good ttf programming font?
[05:14:37] <Yuv422> know
[09:39:13] <wjp> hi Yuv422
[10:42:58] <Yuv422> hi wjp
[12:47:08] --- sbx|afk is now known as sbx
[12:47:34] <sbx> hi
[12:47:53] <sbx> Yuv422: you still there? I'm apparantly just using nedit's default adobe-courier
[12:50:34] <Yuv422> hi
[12:51:18] <Yuv422> I've just added load from latest save
[12:51:31] <wjp> hi sbx
[12:51:42] <Yuv422> and list by date modified to my local copy
[12:52:23] <Yuv422> nuvie now tries to load the latest save
[12:52:33] <Yuv422> if that fails it tries to load the savegame/
[12:52:44] <Yuv422> if that fails it loads a new game
[12:59:11] <Yuv422> is there any way to sort a list in decending order?
[12:59:21] <Yuv422> or do you just sort then reverse?
[12:59:52] <sbx> heh, i wondered where you were
[12:59:56] <wjp> use a different comparison operator
[13:00:02] <sbx> cant you use different comparison?
[13:00:09] <sbx> oops
[13:00:19] <Yuv422> how do you set the comparison operator?
[13:00:25] <Yuv422> I just overloaded <
[13:00:51] <wjp> it's a parameter to std::sort
[13:01:11] <Yuv422> sbx: for some strange reason I got stuck watching blast from the past" on TV.
[13:01:21] <sbx> but if your not using that... just overload > ? :)
[13:01:40] <sbx> i assume thats about old tv shows
[13:01:49] <wjp> I think the object 'std::greater' is the comparator you want
[13:01:52] <Yuv422> I thought that std::list needed to use its own sort method
[13:01:55] <wjp> (it uses >)
[13:02:08] <wjp> hm, oh, that's possible
[13:02:10] <Yuv422> sbx: the movie
[13:02:24] <sbx> ive never heard of it
[13:02:47] <wjp> but the list sort takes a comparator argument as well
[13:03:33] <Yuv422> ah k
[13:04:04] <Yuv422> I'll have to look up the sort definition
[13:04:54] <Yuv422> sbx: http://imdb.com/title/tt0124298/
[13:06:19] <wjp> Yuv422: http://www.math.leidenuniv.nl/~wpalenst/sort.cc
[13:07:27] <Yuv422> how would I use a custom comparator?
[13:08:39] <wjp> a comparator is a class with an operator()
[13:09:15] <Yuv422> a method called operator()?
[13:09:55] <wjp> yes
[13:10:48] <sbx> haha, Yuv422 enjoy the movie?
[13:10:49] <Yuv422> and operator takes one argument and returns bool?
[13:11:24] <sbx> I know of those actors but not the movie
[13:11:25] <Yuv422> hehe yeah it was a pretty lame movie
[13:11:28] <wjp> two arguments
[13:11:38] <Yuv422> ah k
[13:11:47] <wjp> reload that URL I gave you
[13:12:49] <Yuv422> thanks wjp
[13:13:28] <wjp> when comparing objects you probably want to pass them by reference to operator()
[13:14:42] <Yuv422> yeah pass by value could be quite ineffient in a sort. :)
[13:15:18] <sbx> I'm just learning OpenGL
[13:15:27] <Yuv422> cool
[13:16:12] <Yuv422> sbx: you can implement 3d dungeons in nuvie! ;-)
[13:17:24] <sbx> hmm, or I can make the vortex cube bounce around
[13:17:29] <sbx> because that's about all I can do so far :)
[13:17:48] <sbx> besides a few lighting/blending effects
[13:23:22] <Yuv422> wjp: can I use pass by reference if I'm using pass by value for my list contents?
[13:23:58] <wjp> hm?
[13:24:27] <Yuv422> this works
[13:24:29] <Yuv422> bool operator()(const NuvieFileDesc &lhs, const NuvieFileDesc &rhs) { return (lhs.m_time > rhs.m_time); };
[13:25:36] <wjp> yes, that's what I meant
[13:29:18] <Yuv422> :)
[13:34:51] <Yuv422> ok my changes are in cvs now
[13:35:41] <wjp> st_mtimespec?
[13:36:13] <Yuv422> yes
[13:36:19] <Yuv422> is that not portable?
[13:36:38] <wjp> I don't have it, anyway :-)
[13:37:12] <Yuv422> hmm
[13:37:14] <wjp> there's a 'time_t st_mtime' in my struct stat
[13:37:23] <Yuv422> ah k
[13:37:37] <Yuv422> let me check mine
[13:38:22] <Yuv422> interesting
[13:38:41] <Yuv422> mine has st_mtime ifndef _POSIX_SOURCE
[13:39:05] <Yuv422> sorry that should be ifef
[13:39:07] <Yuv422> ifdef
[13:40:07] <Yuv422> it seems to work with st_mtime
[13:40:11] <Yuv422> I'll change it now
[13:40:57] <Yuv422> do you think we should use access time for modification time?
[13:41:07] <Yuv422> for/or
[13:41:44] <wjp> I'd say mtime
[13:42:14] <wjp> atime is also changed when reading a file
[13:42:33] <wjp> and it's not guaranteed to be set on linux
[13:43:45] <Yuv422> ok I've changed to st_mtime
[13:43:48] <Yuv422> in cvs
[13:44:29] <wjp> ok, it compiles fine now
[13:44:36] <Yuv422> :)
[14:07:27] <-- Kirben has left IRC ("System Meltdown")
[14:15:19] <sbx> hmm segfault?
[14:16:00] <Yuv422> where?
[14:16:09] <sbx> Warning: savedir config variable not found. Using current directory for saves!
[14:16:12] <sbx> Error: Couldn't stat() file ./.#Game.cpp.1.29
[14:16:12] <sbx> Loading Game: ./nuvie
[14:16:17] <sbx> #0 iAVLCloseSearchNode (avltree=0x0, key=154415) at misc/iAVLTree.cpp:273
[14:16:20] <sbx> #1 0x806529e in iAVLSearch (avltree=0x0, key=154415) at misc/iAVLTree.cpp:162
[14:16:20] <sbx> #2 0x80a7562 in ObjManager::add_obj (this=0x8178100, obj=0x81e5c50,
[14:16:20] <sbx> addOnTop=false) at ObjManager.cpp:988
[14:16:20] <sbx> #3 0x80a615f in ObjManager::load_super_chunk (this=0x8178100,
[14:16:20] <sbx> chunk_buf=0x81e5188, level=0, chunk_offset=0) at ObjManager.cpp:181
[14:16:21] <sbx> #4 0x8069d08 in SaveGame::load (this=0x81428d8, filename=0x81e4538 "./nuvie")
[14:16:23] <sbx> at save/SaveGame.cpp:297
[14:17:18] <Yuv422> hmm
[14:17:39] <Yuv422> why is it trying to load a file called nuvie
[14:19:00] <sbx> filelist.get_latest() must be returning it from the local dir
[14:19:08] <sbx> brb
[14:30:17] <sbx> back
[14:30:33] <Yuv422> I'm looking at that issue now
[14:31:32] <sbx> if I set savedir in nuvie.cfg it doesnt happen
[14:31:40] <sbx> event if savedir points to the local dir
[14:31:47] <Yuv422> yeah I think I've found the issue
[14:36:24] <Yuv422> the problem is in Savemanager::init()
[14:40:02] <sbx> oh?
[14:40:22] <Yuv422> I was returning before setting the search_prefix
[14:40:33] <Yuv422> so it was trying to load nonsave files
[14:40:50] <sbx> oh
[14:40:56] <sbx> just returning .
[14:41:37] <sbx> forgot the saves start with "nuvie"
[14:41:48] <Yuv422> nuvieU6
[14:41:57] <Yuv422> ok that fix is in cvs nw
[14:41:58] <Yuv422> now
[14:51:15] <sbx> works fine, thanks
[14:51:16] <sbx> bbl
[14:51:20] --- sbx is now known as sbx|afk
[14:52:44] <Yuv422> I'm off to bed now
[14:52:45] <Yuv422> cya
[14:52:47] <-- Yuv422 has left IRC ("BitchX: it makes bathtime lots of fun!")
[20:01:28] --- sbx|afk is now known as sbx
[23:38:53] --> Captain_Anonymou has joined #nuvie
[23:39:07] <Captain_Anonymou> hello hello there laddies
[23:42:01] --- Captain_Anonymou is now known as curiousis
[23:42:52] <curiousis> My you Nuvie chaps sure are foppish gentlemen! The ole hiphip hurray and all that for your dapper effort!
[23:44:45] <curiousis> Mental note for future pretentious messages... replace "hip hip hurray" with "pip pip cheerio"