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:01 | fowl | gradha: 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:52 | gradha | thanks, I will look into that |
20:03:01 | fowl | i have some examples here https://github.com/fowlmouth/nimlibs/tree/master/macros |
20:03:02 | fowl | it helps to think of macros as a functional environment for building syntax |
20:03:07 | fowl | helps me, at least |
20:03:55 | gradha | I did like importCizzle reading through them the other day |
20:06:01 | fowl | i usually put when defined(Debug): echo(repr(result)) in mine so it prints out the nimrod code it generates |
20:15:31 | gradha | oh dear, installing gtksourceview for aporia is recompiling half of the internet now... |
20:25:14 | gradha | yeah, installed version 1.0 instead of 2.0 <facepalm> |
20:52:00 | gradha | fowl: 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:34 | dom96 | gradha: Aporia doesn't provide any special macro features. I believe what fowl meant is simply creatinga |
20:56:47 | dom96 | ... creating a new file and com |
20:56:59 | dom96 | wow, pressing enter accidentally all over the place today |
20:57:20 | Araq | would be a nice feature to add to aporia though |
20:57:28 | dom96 | Creating a new file with "import macros; dumptree: ..." |
20:57:37 | dom96 | and compiling it inside of aporia |
20:58:32 | gradha | found some broken things on mac, want me to create github issues? |
20:58:49 | fowl | import macros |
20:58:51 | dom96 | of course |
20:58:51 | fowl | dumptree: |
20:59:05 | fowl | proc foo*(x: int): int = |
20:59:08 | fowl | return 42 |
20:59:38 | fowl | then you run it and you have the macro output in the output area to look at while you're working on it |
20:59:47 | fowl | er the tree output |
21:00:15 | dom96 | However I don't own a Mac, so I might not be able to fix it. |
21:01:12 | gradha | bummer, and here I was going to ask you to fix gtk sucking so much on mac... |
21:01:39 | gradha | stuff I know is mac related will tackle myself |
21:01:51 | dom96 | awesome |
21:02:17 | gradha | I just looked into compiling gtk natively on mac and it sent torrents of shivering through my spine |
21:03:10 | gradha | no wonder the native version of gimp for mac is so bad, I still use the older gtk version! |
21:03:48 | Araq | the real solution is to stop using a mac ... |
21:11:28 | gradha | has linux improved in non linear video editors? Still haven't seen a working one |
21:23:17 | Araq | dunno, use windows then :P |
21:24:57 | gradha | the world is a tile now, has anybody tried windows 8? Any good out of it? |
21:25:37 | fowl | nah, windows 7 is perfect |
21:25:42 | fowl | i hope i can use it for the next 10 years |
21:28:44 | Araq | in fact ... any question starting with "has linux improved ..." has to be negated ;-) |
21:29:22 | reactormonk | Araq, X supports pixel-wise scrolling by now.. |
21:29:30 | gradha | well, I haven't been to linux for 4 years and things might have improved |
21:31:26 | Araq | reactormonk: what? you mean it didn't before? o.O |
21:33:40 | gradha | scrolling as in virtual desktop size? |
21:44:14 | gradha | https://github.com/nimrod-code/Aporia/issues/21 |
21:48:04 | dom96 | gradha: Yeah, suggest is still in-development, so don't expect it to be working well. |
21:48:36 | gradha | the problem is more in the invocation than anything else I think |
21:49:07 | gradha | https://github.com/nimrod-code/Aporia/issues/22 |
21:50:28 | reactormonk | Araq, well, also known as smooth scrolling |
21:50:56 | dom96 | reactormonk: I'm hoping for wayland to be our saviour. |
21:51:09 | reactormonk | dom96, never checked |
21:51:57 | gradha | just 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:59 | gradha | (<unknown>:59301): Gtk-WARNING **: gtktextbtree.c:4096: char offset off the end of the line |
21:51:59 | gradha | (<unknown>:59301): Gtk-ERROR **: Char offset 15 is off the end of the line |
21:51:59 | gradha | Trace/BPT trap: 5 |
21:52:03 | fowl | wayland should be backward compatible with X |
21:52:04 | dom96 | IIRC #22 is a limitation of the compiler. |
21:52:15 | dom96 | It doesn't give me the full path to the file. |
21:53:07 | dom96 | gradha: yeah, I know why that happens. I need to test that feature more thoroughly. |
21:54:47 | dom96 | It 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:59 | gradha | https://github.com/nimrod-code/Aporia/issues/23 |
21:59:51 | dom96 | Now that's a nice find. |
22:03:09 | dom96 | I don't get why suggest's findExe call would not work, but for compilation it does |
22:03:30 | dom96 | They are both findExe("nimrod") essentially as far as I can tell. |
22:03:36 | dom96 | Unless you changed the config? |
22:03:52 | gradha | no idea, what config? |
22:05:06 | dom96 | Edit -> Preferences -> Tools |
22:05:42 | gradha | no changes there, I tried specifying a full path and the suggest option doesn't work anyway |
22:06:04 | dom96 | Did you start aporia by simply double clicking on it? |
22:06:13 | gradha | no, I always use the commandline |
22:06:37 | dom96 | Well then compilation and suggest should behave the same way with the default settings |
22:06:48 | gradha | tell me where aporia invokes the suggest feature and I might put some echos there |
22:07:20 | dom96 | suggest.nim:95 |
22:07:50 | gradha | echod logs to console? |
22:07:59 | Araq | I remember having similar problems once |
22:08:11 | dom96 | echod is simply echo but only in debug mode |
22:08:24 | dom96 | i.e. it won't echo in release mode |
22:08:54 | Araq | don't remember the fix though ;-) |
22:09:01 | Araq | was some PATH weirdness |
22:09:01 | dom96 | Araq: Can we please get a switch to make the compiler echo full file paths for warnings/errors? |
22:09:15 | Araq | we had that once |
22:09:48 | Araq | I found it incredibly annoying :P |
22:09:58 | dom96 | Araq: 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:12 | dom96 | Araq: That's why I'm asking for a switch. |
22:10:25 | Araq | ah yeah that was the reason |
22:10:34 | dom96 | Araq: In fact, a less ambiguous error echoing switch would be nice too. |
22:10:45 | Araq | what do you mean? |
22:11:02 | dom96 | type mismatch: did you mean? |
22:11:06 | dom96 | proc blah() |
22:11:08 | dom96 | proc foo() |
22:11:16 | Vladar | I 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:24 | gradha | hehe, somehow debugging aporia with vim seems like cheating |
22:11:31 | dom96 | How is aporia meant to know that 'proc blah()' and 'proc foo()' continue the error? |
22:11:41 | dom96 | gradha: Blasphemy. |
22:12:09 | Araq | hey, following lines don't start with a filename |
22:12:11 | gradha | so far findExe is returning the empty string, now will echo there |
22:12:16 | dom96 | Vladar: Awesome! |
22:12:32 | dom96 | Araq: I'm quite certain we discussed this before. |
22:12:43 | dom96 | I can't remember what the end of that discussion was though. |
22:12:58 | Araq | I told you to use a regex and call it a day |
22:13:05 | dom96 | Better if I find an example which shows what I mean |
22:13:05 | gradha | Vladar: do you know if http://xcomrl.blogspot.com.es uses that lib? |
22:13:33 | gradha | I like that project but the windows dependency threw me off, especially for a text based game |
22:14:00 | dom96 | Trix[a]r_za Might like this ^^ (Too bad he's away) |
22:14:22 | gradha | antialiased bitmap font support? heresy! |
22:15:29 | Vladar | granda, it seems they don't use libtcod |
22:16:14 | gradha | hopefully they have good reason to reinvent their wheel |
22:17:08 | Vladar | Also, you can see libtcod in action here: http://doryen.eptalys.net/games/ |
22:17:16 | dom96 | Araq: oh well. In either case, full filenames are a must. |
22:18:42 | gradha | yes, 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:01 | Vladar | gradha, probably |
22:20:02 | gradha | will have to investigate that |
22:20:41 | Araq | dom96: I think the compiler already has code for that |
22:20:48 | Araq | dunno what happened with this feature |
22:22:21 | Vladar | gradha, 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:01 | Araq | Vladar: did you use c2nim to create the wrapper? |
22:23:17 | gradha | it looks really sweet, didn't know it existed. Will ask the xcom author, maybe he doesn't either |
22:23:36 | Vladar | Araq, no, dit it manually |
22:23:58 | Araq | learn how to use it then ;-) |
22:25:44 | Araq | and about the bug on windows ... are you sure you got the calling conventions right? |
22:26:04 | Araq | I also changed the default for 'fastcall' for GCC on win32 ... |
22:26:11 | Araq | *to 'fastcall' |
22:26:22 | Vladar | Araq, I just wanted to examine library deeper this way =) Hm, I used cdecl |
22:33:03 | dom96 | Gdk-warning's are still present. Will need to investigate them. |
22:33:07 | gradha | aporia.nim(1844, 12) Error: invalid pragma: cdecl |
22:33:25 | dom96 | Latest compiler? |
22:33:32 | gradha | I guess not |
22:33:45 | dom96 | mmm |
22:34:46 | gradha | I seem to be two days off |
22:34:46 | gradha | compiling |
22:43:10 | gradha | last version compiles and runs, bug squashed |
22:45:40 | dom96 | great |
22:48:09 | gradha | as a quick debugging hack, can I call something abort() like to make nimrod crash at runtime and show the current stack trace? |
22:48:37 | gradha | I just want to know where a proc is being called from and have a use test case |
22:48:51 | gradha | oh, wait, nil strings, hehe |
22:49:29 | gradha | yay, nice |
22:51:41 | gradha | dom96: 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:03 | gradha | OTOH the suggestion feature uses the blank string, and that's why the idetools command starts with a blank space |
22:52:52 | Araq | gradha: assert(false) ? |
22:53:11 | gradha | oh, didn't think of that |
22:53:18 | gradha | just created a var string and tried to echo it |
22:53:45 | dom96 | gradha: I see, I didn't even notice that GetCmd does that, nice find. |
22:53:58 | Araq | we have a 'not nil' notation now :P |
22:54:15 | Araq | I guess the stdlib should use it ... |
22:54:30 | Araq | in fact 'not nil' should be the default |
22:54:44 | gradha | dom96: my current echos for compilation show |
22:54:45 | gradha | returning os.findExe '' |
22:54:45 | gradha | aporia GetCmd: will return 'nimrod c /Users/gradha/project/nimrod/Aporia/aporia.nim' |
22:54:54 | Araq | but there are some hurdles to overcome for that to work |
22:55:02 | gradha | so there you have it, if you replicate GetCmd for suggestions it should work |
22:55:16 | gradha | but the reason findExe doesn't work on my system is because it doesn't expand ~ |
22:55:33 | gradha | it checks for os.ExistsFile:'~/project/nimrod/root/bin/nimrod' |
22:55:35 | gradha | and fails |
22:55:45 | Araq | hrm, how to expand ~? |
22:56:04 | Araq | getenv("home")? |
22:56:13 | gradha | likely |
22:57:11 | gradha | actually I implemented expandTilde for D |
22:57:34 | gradha | see http://digitalmars.com/d/1.0/phobos/std_path.html it also checks for /etc/passwd |
22:57:51 | gradha | that may be Thomas Kuehne work, can't remember now |
22:58:08 | gradha | oh man, that was in 2006, how old |
22:58:52 | Araq | you contributed to D? heresy! |
22:59:00 | dom96 | Burn him! |
22:59:06 | gradha | hey, hey, was nimrod public in 2006? |
23:00:43 | Araq | can't remember and even if it was unusable |
23:01:13 | Araq | but what's worse! you didn't give "expandTilde" a range interface! |
23:01:25 | Araq | how silly of you |
23:01:32 | Araq | how can this code be re-usable? |
23:01:34 | gradha | I believe ranges didn't exist then |
23:01:37 | Araq | how can it compose? |
23:02:01 | Araq | :P |
23:02:22 | Araq | it should take an InputRange |
23:02:33 | Araq | but whether it is "transient" I don't know ... |
23:03:11 | gradha | found 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:07 | Araq | thanks but I can write a call 'getEnv"HOME" |
23:04:30 | gradha | but will THAT compose? |
23:04:52 | Araq | well I certainly won't support ~username |
23:05:24 | Araq | reading from /etc/passw is overkill and looks like a really stupid idea |
23:07:02 | gradha | does supporting ~ expansion mean you also support other $var expansion or is that a bash thing? |
23:07:16 | Araq | who knows |
23:07:36 | Araq | I guess we shouldn't support ~ and make you fix your PATH instead |
23:08:26 | gradha | the world is full of evil people |
23:08:29 | gradha | good night, good people |
23:08:37 | * | gradha quit (Quit: gradha) |
23:19:44 | Araq | good night |
23:35:41 | Vladar | bye |
23:36:01 | * | Vladar quit (Quit: Leaving) |