<<26-11-2012>>

18:35:28*NimBot joined #nimrod
19:24:09*FreeArtMan joined #nimrod
19:40:04*gradha joined #nimrod
19:51:05*FreeArtMan quit (Read error: Operation timed out)
20:01:01fowlgradha: hey, IRT macros, the easiest way to do them is to open a new file in aporia, import macros then use dumptree: to see what the syntax tree looks like for a piece of code, then reproduce that in your macro
20:01:52gradhathanks, I will look into that
20:03:01fowli have some examples here https://github.com/fowlmouth/nimlibs/tree/master/macros
20:03:02fowlit helps to think of macros as a functional environment for building syntax
20:03:07fowlhelps me, at least
20:03:55gradhaI did like importCizzle reading through them the other day
20:06:01fowli usually put when defined(Debug): echo(repr(result)) in mine so it prints out the nimrod code it generates
20:15:31gradhaoh dear, installing gtksourceview for aporia is recompiling half of the internet now...
20:25:14gradhayeah, installed version 1.0 instead of 2.0 <facepalm>
20:52:00gradhafowl: I have aporia running, but I don't see how I'm meant to import macros and use this dumptree. I see no way to import anything for the editor, nor a dumptree menu option.
20:56:34dom96gradha: Aporia doesn't provide any special macro features. I believe what fowl meant is simply creatinga
20:56:47dom96... creating a new file and com
20:56:59dom96wow, pressing enter accidentally all over the place today
20:57:20Araqwould be a nice feature to add to aporia though
20:57:28dom96Creating a new file with "import macros; dumptree: ..."
20:57:37dom96and compiling it inside of aporia
20:58:32gradhafound some broken things on mac, want me to create github issues?
20:58:49fowlimport macros
20:58:51dom96of course
20:58:51fowldumptree:
20:59:05fowl proc foo*(x: int): int =
20:59:08fowl return 42
20:59:38fowlthen you run it and you have the macro output in the output area to look at while you're working on it
20:59:47fowler the tree output
21:00:15dom96However I don't own a Mac, so I might not be able to fix it.
21:01:12gradhabummer, and here I was going to ask you to fix gtk sucking so much on mac...
21:01:39gradhastuff I know is mac related will tackle myself
21:01:51dom96awesome
21:02:17gradhaI just looked into compiling gtk natively on mac and it sent torrents of shivering through my spine
21:03:10gradhano wonder the native version of gimp for mac is so bad, I still use the older gtk version!
21:03:48Araqthe real solution is to stop using a mac ...
21:11:28gradhahas linux improved in non linear video editors? Still haven't seen a working one
21:23:17Araqdunno, use windows then :P
21:24:57gradhathe world is a tile now, has anybody tried windows 8? Any good out of it?
21:25:37fowlnah, windows 7 is perfect
21:25:42fowli hope i can use it for the next 10 years
21:28:44Araqin fact ... any question starting with "has linux improved ..." has to be negated ;-)
21:29:22reactormonkAraq, X supports pixel-wise scrolling by now..
21:29:30gradhawell, I haven't been to linux for 4 years and things might have improved
21:31:26Araqreactormonk: what? you mean it didn't before? o.O
21:33:40gradhascrolling as in virtual desktop size?
21:44:14gradhahttps://github.com/nimrod-code/Aporia/issues/21
21:48:04dom96gradha: Yeah, suggest is still in-development, so don't expect it to be working well.
21:48:36gradhathe problem is more in the invocation than anything else I think
21:49:07gradhahttps://github.com/nimrod-code/Aporia/issues/22
21:50:28reactormonkAraq, well, also known as smooth scrolling
21:50:56dom96reactormonk: I'm hoping for wayland to be our saviour.
21:51:09reactormonkdom96, never checked
21:51:57gradhajust a while ago clicking on the error list I crashed Aporia through a gtk error, but I can't reproduce it and the only thing I got is:
21:51:59gradha(<unknown>:59301): Gtk-WARNING **: gtktextbtree.c:4096: char offset off the end of the line
21:51:59gradha(<unknown>:59301): Gtk-ERROR **: Char offset 15 is off the end of the line
21:51:59gradhaTrace/BPT trap: 5
21:52:03fowlwayland should be backward compatible with X
21:52:04dom96IIRC #22 is a limitation of the compiler.
21:52:15dom96It doesn't give me the full path to the file.
21:53:07dom96gradha: yeah, I know why that happens. I need to test that feature more thoroughly.
21:54:47dom96It tries to place the cursor at a position which doesn't exist it seems
21:57:27*comex` is now known as comex
21:57:59gradhahttps://github.com/nimrod-code/Aporia/issues/23
21:59:51dom96Now that's a nice find.
22:03:09dom96I don't get why suggest's findExe call would not work, but for compilation it does
22:03:30dom96They are both findExe("nimrod") essentially as far as I can tell.
22:03:36dom96Unless you changed the config?
22:03:52gradhano idea, what config?
22:05:06dom96Edit -> Preferences -> Tools
22:05:42gradhano changes there, I tried specifying a full path and the suggest option doesn't work anyway
22:06:04dom96Did you start aporia by simply double clicking on it?
22:06:13gradhano, I always use the commandline
22:06:37dom96Well then compilation and suggest should behave the same way with the default settings
22:06:48gradhatell me where aporia invokes the suggest feature and I might put some echos there
22:07:20dom96suggest.nim:95
22:07:50gradhaechod logs to console?
22:07:59AraqI remember having similar problems once
22:08:11dom96echod is simply echo but only in debug mode
22:08:24dom96i.e. it won't echo in release mode
22:08:54Araqdon't remember the fix though ;-)
22:09:01Araqwas some PATH weirdness
22:09:01dom96Araq: Can we please get a switch to make the compiler echo full file paths for warnings/errors?
22:09:15Araqwe had that once
22:09:48AraqI found it incredibly annoying :P
22:09:58dom96Araq: Yeah, that's why I asked about launching it by double clicking. If you launch it from the terminal, and you add Nimrod to your PATH through your .bashrc it will only have an effect through the terminal
22:10:12dom96Araq: That's why I'm asking for a switch.
22:10:25Araqah yeah that was the reason
22:10:34dom96Araq: In fact, a less ambiguous error echoing switch would be nice too.
22:10:45Araqwhat do you mean?
22:11:02dom96type mismatch: did you mean?
22:11:06dom96proc blah()
22:11:08dom96proc foo()
22:11:16VladarI wrote a nimrod-wrapper for libtcod (roguelike-games library), current version 0.9 beta: http://forum.nimrod-code.org/t/111 Maybe someone will find it useful someday =)
22:11:24gradhahehe, somehow debugging aporia with vim seems like cheating
22:11:31dom96How is aporia meant to know that 'proc blah()' and 'proc foo()' continue the error?
22:11:41dom96gradha: Blasphemy.
22:12:09Araqhey, following lines don't start with a filename
22:12:11gradhaso far findExe is returning the empty string, now will echo there
22:12:16dom96Vladar: Awesome!
22:12:32dom96Araq: I'm quite certain we discussed this before.
22:12:43dom96I can't remember what the end of that discussion was though.
22:12:58AraqI told you to use a regex and call it a day
22:13:05dom96Better if I find an example which shows what I mean
22:13:05gradhaVladar: do you know if http://xcomrl.blogspot.com.es uses that lib?
22:13:33gradhaI like that project but the windows dependency threw me off, especially for a text based game
22:14:00dom96Trix[a]r_za Might like this ^^ (Too bad he's away)
22:14:22gradhaantialiased bitmap font support? heresy!
22:15:29Vladargranda, it seems they don't use libtcod
22:16:14gradhahopefully they have good reason to reinvent their wheel
22:17:08VladarAlso, you can see libtcod in action here: http://doryen.eptalys.net/games/
22:17:16dom96Araq: oh well. In either case, full filenames are a must.
22:18:42gradhayes, some of that seems cheating, http://doryen.eptalys.net/data/libtcod-projects/thecave_002-full.jpg seems to be using graphics, maybe as an addon or special feature?
22:20:01Vladargradha, probably
22:20:02gradhawill have to investigate that
22:20:41Araqdom96: I think the compiler already has code for that
22:20:48Araqdunno what happened with this feature
22:22:21Vladargradha, Also, you can write pure old-school roguelikes with it. It has tons of must-have features, like FoV, pathfinding, config-parsing (need to be tested in my wrapper yet =]), etc.
22:23:01AraqVladar: did you use c2nim to create the wrapper?
22:23:17gradhait looks really sweet, didn't know it existed. Will ask the xcom author, maybe he doesn't either
22:23:36VladarAraq, no, dit it manually
22:23:58Araqlearn how to use it then ;-)
22:25:44Araqand about the bug on windows ... are you sure you got the calling conventions right?
22:26:04AraqI also changed the default for 'fastcall' for GCC on win32 ...
22:26:11Araq*to 'fastcall'
22:26:22VladarAraq, I just wanted to examine library deeper this way =) Hm, I used cdecl
22:33:03dom96Gdk-warning's are still present. Will need to investigate them.
22:33:07gradhaaporia.nim(1844, 12) Error: invalid pragma: cdecl
22:33:25dom96Latest compiler?
22:33:32gradhaI guess not
22:33:45dom96mmm
22:34:46gradhaI seem to be two days off
22:34:46gradhacompiling
22:43:10gradhalast version compiles and runs, bug squashed
22:45:40dom96great
22:48:09gradhaas a quick debugging hack, can I call something abort() like to make nimrod crash at runtime and show the current stack trace?
22:48:37gradhaI just want to know where a proc is being called from and have a use test case
22:48:51gradhaoh, wait, nil strings, hehe
22:49:29gradhayay, nice
22:51:41gradhadom96: in all cases findExe returns the empty string for my system, however, compilation is done through aporia:GetCmd, which does additional trickery and seems to put a default "nimrod" command even though none is found
22:52:03gradhaOTOH the suggestion feature uses the blank string, and that's why the idetools command starts with a blank space
22:52:52Araqgradha: assert(false) ?
22:53:11gradhaoh, didn't think of that
22:53:18gradhajust created a var string and tried to echo it
22:53:45dom96gradha: I see, I didn't even notice that GetCmd does that, nice find.
22:53:58Araqwe have a 'not nil' notation now :P
22:54:15AraqI guess the stdlib should use it ...
22:54:30Araqin fact 'not nil' should be the default
22:54:44gradhadom96: my current echos for compilation show
22:54:45gradha returning os.findExe ''
22:54:45gradhaaporia GetCmd: will return 'nimrod c /Users/gradha/project/nimrod/Aporia/aporia.nim'
22:54:54Araqbut there are some hurdles to overcome for that to work
22:55:02gradhaso there you have it, if you replicate GetCmd for suggestions it should work
22:55:16gradhabut the reason findExe doesn't work on my system is because it doesn't expand ~
22:55:33gradhait checks for os.ExistsFile:'~/project/nimrod/root/bin/nimrod'
22:55:35gradhaand fails
22:55:45Araqhrm, how to expand ~?
22:56:04Araqgetenv("home")?
22:56:13gradhalikely
22:57:11gradhaactually I implemented expandTilde for D
22:57:34gradhasee http://digitalmars.com/d/1.0/phobos/std_path.html it also checks for /etc/passwd
22:57:51gradhathat may be Thomas Kuehne work, can't remember now
22:58:08gradhaoh man, that was in 2006, how old
22:58:52Araqyou contributed to D? heresy!
22:59:00dom96Burn him!
22:59:06gradhahey, hey, was nimrod public in 2006?
23:00:43Araqcan't remember and even if it was unusable
23:01:13Araqbut what's worse! you didn't give "expandTilde" a range interface!
23:01:25Araqhow silly of you
23:01:32Araqhow can this code be re-usable?
23:01:34gradhaI believe ranges didn't exist then
23:01:37Araqhow can it compose?
23:02:01Araq:P
23:02:22Araqit should take an InputRange
23:02:33Araqbut whether it is "transient" I don't know ...
23:03:11gradhafound a snippet on http://www.digitalmars.com/d/archives/digitalmars/D/learn/2373.html by Thomas, which I used to contribute the final diff, maybe it helps
23:04:07Araqthanks but I can write a call 'getEnv"HOME"
23:04:30gradhabut will THAT compose?
23:04:52Araqwell I certainly won't support ~username
23:05:24Araqreading from /etc/passw is overkill and looks like a really stupid idea
23:07:02gradhadoes supporting ~ expansion mean you also support other $var expansion or is that a bash thing?
23:07:16Araqwho knows
23:07:36AraqI guess we shouldn't support ~ and make you fix your PATH instead
23:08:26gradhathe world is full of evil people
23:08:29gradhagood night, good people
23:08:37*gradha quit (Quit: gradha)
23:19:44Araqgood night
23:35:41Vladarbye
23:36:01*Vladar quit (Quit: Leaving)