<<28-08-2012>>

00:51:02fowldom96: i ended up just using readdata/writedata..i overlooked them somehow >_>
01:39:38*q66 quit (Quit: Quit)
09:07:41*XAMPP_ joined #nimrod
09:16:48*XAMPP quit (*.net *.split)
09:50:21*q66 joined #nimrod
09:54:05*Trix[a]r_za is now known as Trixar_za
10:47:56*Trixar_za is now known as Trix[a]r_za
11:52:36dom96fowl: Yeah, that makes more sense.
13:08:18shevydom96, are there simple nimrod examples with gtk somewhere?
13:08:54dom96shevy: Take a look at these: https://github.com/Araq/Nimrod/tree/master/examples/gtk
13:10:57shevycool
13:12:51shevyoh this is odd
13:12:57shevyhttps://github.com/Araq/Nimrod/blob/master/examples/gtk/ex1.nim
13:13:08shevythis has hardcoded SIGNAL_FUNC(ex1.destroy)
13:13:19shevyI named the file demo1.nim and it no longer worked
13:13:29shevyis there a way to find out the filename in use reliably?
13:13:45dom96no, it has to be hardcoded.
13:13:52dom96However, you don't actually need that.
13:13:58dom96You can just write "destroy" instead
13:14:39shevydemo1.nim(13, 35) Error: type mismatch: got (None) but expected one of:
13:15:34shevywell, I'll leave it hardcoded then
13:16:48dom96perhaps you need it.
13:16:58dom96the gtk modules might define a 'destroy'
13:17:05dom96so it may be ambiguous
13:18:14shevyis there a way to get the filename? in ruby it is stored in __FILE__ constant
13:18:50dom96of the current module? I doubt it.
13:19:57dom96might be able to do something with macros
13:20:20dom96but come on, it's not like you'll be changing the module name many times
15:20:14shevyno, not of the module - of the filename
15:20:29dom96why do you want them filename?
15:20:33shevyok see
15:20:39shevythe simple answer would be it is not possible
15:40:46fowluse control H
15:40:51fowlfind&replace
15:42:08dom96yeah
15:58:48shevyyeah, use workarounds
16:02:49shevyhmm interesting that python uses just ARGV[0]
16:03:40dom96argv[0] is the name of the executable that is being executed
16:03:47dom96in the case of python:
16:03:52dom96python testscript.py
16:04:04fowlshevy: you only hit this problem if you're renaming a module so i dont see it as a big problem
16:04:05dom96argv[0] will be 'testscript.py' I believe.
16:04:16fowlit would be nice to have a magic `thisModule` or something similar though
16:04:58dom96Renaming modules is really rare, so this really is not a problem.
16:05:02shevyI find it inelegant to need hardcoded entries
16:05:39dom96They're hardly hardcoded entries.
16:05:44fowlshevy: then you could name your procs so that they dont clash and there wouldnt be a prob
16:06:16dom96Python for example requires you prefix all function names with the name of the module.
16:06:20shevydom96 you say they are not hardcoded
16:06:22shevyhttps://gist.github.com/3499537
16:06:37shevythe part SIGNAL_FUNC(demo3.destroy) has the filename demo3.nim
16:07:33dom96fine ok. I think fowl's advice is good.
16:08:28shevyit's interesting to see that python and ruby solve this differently, for some reason ruby's ARGV does not contain the name of the program, whereas python's sys.argv does
16:10:28shevyhmmm
16:10:31shevyruby stole perl's way
16:10:43shevyprint $0
16:11:04fowlshevy: i dont see a destroy() that matches that one in glib2 or gtk2 so you could probably just use signal_func(destroy)
16:12:03fowlnvm i was wrong
16:12:13shevydowncased? SIGNAL_FUNC is as signal_func yes?
16:12:21shevyor is there a convention
16:12:35shevyit's a bit confusing
16:12:36shevyset_border_width(PCONTAINER(Window), 5)
16:12:36shevyadd(PContainer(window), totalbox)
16:12:37fowlshevy: i renamed it to mydestroy and it works without the module prefix
16:30:21*Trix[a]r_za is now known as Trixar_za
16:32:50*shevy quit (Ping timeout: 246 seconds)
16:45:34*shevy joined #nimrod
17:27:31fowlshevy: also you should stop pondering so hard and just try to write something
17:32:33shevyyeah
17:32:39shevyit's a good idea to not fight against the language
19:10:21*fowl quit (Remote host closed the connection)
19:32:45*fowl joined #nimrod
19:32:55fowlhas anybody used zlib
19:35:40shevynot me. I only compile it sometimes... I think it uses just a Makefile, no configure.in script
19:39:11fowlhow come some of the libraries dont show up in the index (md5, zlib)
19:48:20dom96shevy: Nimrod is case and underscore insensitive.
19:48:40dom96set_border_width is the same as setBorderWidth and setborderwidth
19:49:05shevyyeah
19:49:15shevyI was confused why it is PCONTAINER in one line, the PContainer right in the next
19:50:19dom96The convention is to use camelCase for functions
19:50:36dom96And for types it is well: TType
19:50:42dom96like in Pascal
19:51:07shevyaha
19:53:30fowli hope this is right https://gist.github.com/3503440
19:56:55dom96fowl: http://build.nimrod-code.org/docs/zipfiles.html
19:56:56dom96:P
19:57:13dom96Adds a dependency on libzip however
20:14:49fowli dint want zips, gzips!
20:15:10dom96i see
20:15:30dom96Make a module out of this and make it stdlib worthy :P
20:15:34dom96please :D
20:15:49fowlsure
20:16:03fowli just updated the gist
20:16:25fowlim not sure how to guess at the uncompressed length
20:25:37dom96I don't know either
20:32:33*Trixar_za is now known as Trix[a]r_za
20:34:14shevywhat's with Araq, sleepy man these days?
20:49:45dom96He's on holidays somewhere.
21:06:04dom96He doesn't have internet access but is working on Nimrod I think :P
23:36:15dom96good night