00:02:07 | Varriount | BitPuffin, I've found the best way to point people in the right direction is to comment everything |
00:02:31 | Varriount | And/or write up an explanation of how everything works together. |
00:03:50 | Varriount | dom96, any idea why the mac and linux x86 builds aren't being updated on the Nimbuild page? |
00:04:12 | dom96 | the builders are down |
00:04:49 | Varriount | Lack of hosts? |
00:05:40 | dom96 | no |
00:07:31 | BitPuffin | Varriount: sure, but in this case it was really just, what might be a relevant file |
00:07:38 | fowl | OrionPK, https://gist.github.com/fowlmouth/6943947 |
00:12:35 | OrionPK | short but sweet |
00:15:14 | Varriount | Hm, is it ok to document some of the wrapper libs? |
00:15:34 | Varriount | Or at least reformat them to look better? |
00:22:26 | * | ltbarcly joined #nimrod |
00:22:30 | fowl | yes |
00:22:47 | fowl | i wouldnt bother documenting them, most know to look at the c documentation/examples and its the same thing |
00:27:07 | * | ltbarcly quit (Ping timeout: 246 seconds) |
00:27:12 | * | q66 quit (Quit: Leaving) |
00:32:00 | Varriount | dom96, any specific reason the builder code tries to find actual executables for git, 7zip, etc, instead of just assuming that they're on the path? |
00:32:33 | dom96 | findExe looks in the path |
00:33:21 | Varriount | Yes, but running a process from the command line also assumes that they're on the path. |
00:34:04 | Varriount | eg, "git pull" runs the git executable, if it's in the path. |
00:47:24 | * | dyu joined #nimrod |
00:54:34 | Varriount | dom96, see -> https://gist.github.com/Varriount/6944308 |
00:55:04 | Varriount | You might have to change "7z" to "7za" |
00:55:46 | fowl | works for me |
00:56:05 | fowl | Varriount, i think you want var (output, exitcode) though |
00:56:29 | Varriount | What's the difference? |
00:56:49 | fowl | your version sets output and exitcode to the same result of execCmdEx() |
00:57:04 | Varriount | Oh, didn't know that. |
00:57:14 | Varriount | Just shows how new I am to nimrod. :p |
00:57:26 | fowl | tuple unpacking is pretty new, probably not in the docs |
00:58:06 | Varriount | Right now, since I'm working mostly with trying to get the builder's working correctly, I figure I might as well try to improve/simplify them. |
00:58:37 | Varriount | Although I did briefly entertain the thought of using the python-written buildbot framework. |
01:00:40 | * | Associat0r joined #nimrod |
01:00:40 | * | Associat0r quit (Changing host) |
01:00:40 | * | Associat0r joined #nimrod |
01:06:08 | fowl | improve/simplify something thats not working?? |
01:10:52 | Varriount | And fix. |
01:11:18 | Varriount | For example, add paths to look for the git, 7z, etc executables in the config |
01:15:23 | fowl | what does "add paths" mean |
01:15:56 | Varriount | Specify specific executable paths. |
01:16:18 | fowl | does os.findExe not work for you? |
01:16:21 | Varriount | ./c/64/mingw/bin/git.exe |
01:16:56 | Varriount | fowl, it duplicates functionality already done by the operating system/terminal |
01:17:15 | fowl | k |
01:17:25 | fowl | i dont know what your doing |
01:17:27 | fowl | so, carry on |
01:18:30 | Varriount | You might use findExe if you need to physically know where the executable is, and where it's secondary files are stored. |
01:19:14 | Varriount | But if you want to simply run it, just use osproc.execCmdEx |
01:21:40 | fowl | Varriount, http://i.imgur.com/E9yNH3k.gif |
01:22:44 | Varriount | O_o |
01:25:58 | EXetoC | :O |
01:26:00 | * | DAddYE quit (Remote host closed the connection) |
01:26:35 | * | DAddYE joined #nimrod |
01:27:16 | fowl | gn everyone |
01:27:23 | * | fowl quit (Quit: Leaving) |
01:27:31 | Varriount | Araq, what did you change for sizeof(culong)? |
01:31:01 | * | DAddYE quit (Ping timeout: 245 seconds) |
01:39:34 | dom96 | Varriount: The reason I don't use execCmdEx is because I want to get output as it comes from the process. |
01:40:05 | Varriount | Ah, and you don't want to block so you can maintain a connection with the server? |
01:40:25 | dom96 | That was one of the old reasons, but now I just use a separate thread. |
01:41:37 | dom96 | There are some strange bugs with it which I didn't get a chance to track down though |
01:41:49 | dom96 | For example if you look at the output from your builder: http://build.nimrod-code.org/commits/windows-x86/f2cbc92f572f/logs.txt |
01:42:02 | dom96 | It's missing the first letter from some of the lines. |
01:42:24 | dom96 | Sometimes the lines seem to be out of order too. |
01:42:40 | dom96 | So you can try tracking that down if you're bored :) |
01:42:44 | Varriount | What's really needed is iocp support. |
01:43:06 | dom96 | indeed |
01:43:17 | dom96 | that will come with async await |
01:43:31 | Varriount | "async await"? |
01:44:44 | dom96 | I am implementing an async thing ala C#'s await. |
01:44:56 | OrionPK | yay |
01:46:49 | dom96 | anyway, good night |
01:46:57 | Varriount | Good night! |
01:47:53 | * | gurug33k quit (Remote host closed the connection) |
01:54:52 | * | cablehead quit (Remote host closed the connection) |
01:55:27 | * | cablehead joined #nimrod |
01:57:07 | BitPuffin | https://www.destroyallsoftware.com/talks/wat |
01:59:46 | * | cablehead quit (Ping timeout: 245 seconds) |
02:08:07 | * | BitPuffin quit (Ping timeout: 272 seconds) |
02:36:33 | Varriount | Anyone know if there's a way to have C2Nim handle just header files? |
02:40:29 | reactormonk | Varriount, you run them only on the header files? |
02:40:50 | Varriount | Well, it's not like I have a copy of the window's source code. |
02:41:02 | Varriount | I'm trying to translate WinCrypt.h |
02:41:11 | * | Associ8or joined #nimrod |
02:41:11 | * | Associ8or quit (Changing host) |
02:41:11 | * | Associ8or joined #nimrod |
02:41:24 | Varriount | Or figure out how a Byte pointer translates to nimrod's types |
02:42:38 | * | Associat0r quit (Ping timeout: 240 seconds) |
03:13:50 | EXetoC | var p: ptr T = ...; var pArr = cast[ptr array[len_or_range, T]](p); |
03:14:17 | EXetoC | the latter simply allows you to access by index |
03:15:41 | EXetoC | fowl has a lib that defines related operations on pointers directly |
03:22:18 | Varriount | EXetoC, I'm trying to implement math.random functionality for windows. |
03:22:36 | Varriount | The hard part is knowing which types I need to pass. |
03:25:39 | EXetoC | ptr i8? or maybe u8 |
03:26:03 | OrionPK | char is unsigned 8 bits |
03:26:14 | Varriount | Well, windows.nim suggests that it's a pointer to an int8 |
03:26:40 | Varriount | Unfortunately, c2nim chokes on the wincrypt header file. |
03:26:53 | Varriount | So I'm not sure... |
03:26:57 | OrionPK | you might need to massage it a bit before c2nim will work |
03:26:58 | EXetoC | OrionPK: on windows specifically? |
03:27:00 | OrionPK | massage the header I mean |
03:27:12 | EXetoC | because it's not defined in the standard IIRC |
03:27:22 | * | brson quit (Ping timeout: 246 seconds) |
03:27:28 | Varriount | Its complaining of not finding a * in a return keyword. |
03:27:31 | * | DAddYE joined #nimrod |
03:27:35 | OrionPK | http://nimrod-code.org/system.html#115 |
03:27:41 | Varriount | And when I add the *, it keeps complaining. |
03:27:55 | EXetoC | ok a char in nimrod |
03:28:38 | EXetoC | I thought c2nim only handled prototypes |
03:29:24 | * | brson joined #nimrod |
03:29:30 | EXetoC | anyway, happy coding. cya |
03:29:43 | EXetoC | brson: hello there, rival! |
03:30:29 | brson | EXetoC: hey, friend! |
03:30:35 | EXetoC | c(:) |
03:31:20 | Varriount | To anyone who wants to help, heres a gist of what I have so far -> https://gist.github.com/Varriount/6945468 |
03:32:19 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
03:34:03 | * | DAddYE quit (Ping timeout: 260 seconds) |
03:59:02 | * | brson quit (Ping timeout: 240 seconds) |
04:01:02 | * | brson joined #nimrod |
04:09:59 | * | brson quit (Ping timeout: 272 seconds) |
04:11:19 | * | brson joined #nimrod |
04:15:52 | * | OrionPK quit (Quit: Leaving) |
04:30:33 | * | DAddYE joined #nimrod |
04:35:11 | * | DAddYE quit (Ping timeout: 260 seconds) |
04:39:31 | * | brson quit (Quit: leaving) |
04:46:05 | * | ltbarcly joined #nimrod |
04:50:40 | * | ltbarcly quit (Ping timeout: 246 seconds) |
05:31:12 | * | DAddYE joined #nimrod |
05:37:41 | * | DAddYE quit (Ping timeout: 245 seconds) |
05:54:51 | * | cablehead joined #nimrod |
06:08:52 | * | cablehead quit (Remote host closed the connection) |
06:10:49 | * | dyu quit (Quit: Leaving) |
06:34:02 | * | DAddYE joined #nimrod |
06:38:23 | * | DAddYE quit (Ping timeout: 260 seconds) |
06:41:16 | Varriount | Hm, using the Python 3.3 source code as a guide for implementing windows features is suprisingly effective. |
07:34:37 | * | DAddYE joined #nimrod |
07:41:23 | * | DAddYE quit (Ping timeout: 260 seconds) |
08:06:09 | * | zanoni quit (Quit: No Ping reply in 180 seconds.) |
08:06:37 | * | zanoni joined #nimrod |
08:13:11 | * | wlhlm joined #nimrod |
08:37:33 | * | DAddYE joined #nimrod |
08:42:14 | * | DAddYE quit (Ping timeout: 264 seconds) |
08:53:52 | * | zahary quit (Ping timeout: 264 seconds) |
09:05:48 | * | q66 joined #nimrod |
09:09:52 | * | ltbarcly joined #nimrod |
09:25:42 | * | zahary joined #nimrod |
09:26:19 | * | ltbarcly quit (Quit: Computer has gone to sleep.) |
09:26:40 | * | Associ8or quit (Quit: Associ8or) |
09:38:04 | * | DAddYE joined #nimrod |
09:43:42 | Araq | hi DAddYE |
09:45:01 | * | DAddYE quit (Ping timeout: 272 seconds) |
10:36:37 | * | gurug33k joined #nimrod |
10:41:06 | * | DAddYE joined #nimrod |
10:43:47 | * | BitPuffin joined #nimrod |
10:45:26 | * | DAddYE quit (Ping timeout: 240 seconds) |
11:25:43 | * | io2 joined #nimrod |
11:38:21 | * | ltbarcly joined #nimrod |
11:41:36 | * | DAddYE joined #nimrod |
11:43:17 | * | ltbarcly quit (Ping timeout: 265 seconds) |
11:48:53 | * | DAddYE quit (Ping timeout: 272 seconds) |
12:10:31 | Araq | ping zahary |
12:11:14 | Araq | well you'll read this anyway: any idea why the frontend inlines .compileTime procs? |
12:11:30 | Araq | I'm not aware of any optimization that inlines ... |
12:14:11 | zahary | this is news to me too |
12:15:25 | Araq | must be caused by my new vm |
12:16:26 | Araq | compiler llvmGcc: |
12:16:27 | Araq | result = gcc() |
12:16:35 | Araq | # gcc() inlined here apparently |
12:17:39 | Araq | ah never mind |
12:17:46 | Araq | got it |
12:18:01 | Araq | it's not inlined it's evaluated XD |
12:18:11 | Araq | which happens to produce the same result |
12:26:44 | * | EXetoC joined #nimrod |
12:32:39 | Araq | btw in sem.nim there is: |
12:32:42 | Araq | result.getType = proc (n: PNode): PNode = |
12:32:43 | Araq | var e = tryExpr(c, n) |
12:32:45 | Araq | if e == nil: |
12:32:46 | Araq | result = symNodeFromType(c, errorType(c), n.info) |
12:32:48 | Araq | elif e.typ == nil: |
12:32:49 | Araq | result = newSymNode(getSysSym"void") |
12:32:51 | Araq | else: |
12:32:52 | Araq | result = symNodeFromType(c, e.typ, n.info) |
12:33:10 | Araq | effectively producing a dependency of evals.nim to the sem context c |
12:33:42 | Araq | now the new evaluation engine supports 'getType' but not via 'tryExpr' ... is that essential? |
12:34:21 | Araq | 'handleIsOperator' is my next pain |
12:37:57 | Araq | and fyi I mapped the debug GC to --gc:generational but it doesn't find the nkYieldStmt bug that causes Aporia to not compile on macosx which means either the debug gc is wrong or it's related yet again to stack marking |
12:38:36 | Araq | if we miss a root on the stack --gc:generational can't help as both GCs use the conservative stack marking |
12:44:37 | * | DAddYE joined #nimrod |
12:48:12 | * | io2 quit () |
12:51:01 | * | DAddYE quit (Ping timeout: 245 seconds) |
13:11:30 | * | Endy joined #nimrod |
13:23:02 | * | gurug33k quit (Remote host closed the connection) |
13:32:08 | dom96 | hello |
13:34:30 | * | BitPuffin quit (Ping timeout: 252 seconds) |
13:34:56 | * | Endy quit (Ping timeout: 265 seconds) |
13:37:46 | * | gurug33k joined #nimrod |
13:38:48 | * | io2 joined #nimrod |
13:47:38 | * | DAddYE joined #nimrod |
13:50:04 | * | BitPuffin joined #nimrod |
13:54:21 | * | DAddYE quit (Ping timeout: 245 seconds) |
14:14:56 | * | OrionPK joined #nimrod |
14:43:16 | * | Associat0r joined #nimrod |
14:43:16 | * | Associat0r quit (Changing host) |
14:43:16 | * | Associat0r joined #nimrod |
14:49:57 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
14:50:39 | * | DAddYE joined #nimrod |
14:57:15 | * | DAddYE quit (Ping timeout: 260 seconds) |
15:01:25 | dom96 | Araq: So now that we have babel, which modules do you think should stay in the stdlib and which should be moved away to be installable through babel? |
15:02:15 | Araq | Babel: pretty much everything that's a wrapper which is not used by anything in impure |
15:02:36 | Araq | so pcre is an exception because we need it for 're' |
15:02:50 | Araq | and 're' not part of the stdlib would be embarrassing these days |
15:03:11 | Araq | gtk2 is a babel package of course |
15:04:40 | Araq | windows.nim should be babel package too |
15:04:54 | Araq | posix.nim should stay in the stdlib |
15:05:24 | Araq | everything that "prelude" imports is stdlib |
15:05:45 | Araq | sockets and asyncio is stdlib |
15:06:13 | dom96 | makes sense, but i'm not sure it would be wise to depend on windows.nim as a babel package. Better to just take out the stuff you need and put it in your package. |
15:06:28 | Araq | unknown stuff like subexes is a babel package |
15:07:51 | Araq | romans.nim is a babel package |
15:08:03 | dom96 | Also if we're going to do that I should get nimbuild to build docs for the babel packages. |
15:08:27 | Araq | now that's a good idea |
15:08:36 | Araq | indeed we need that |
15:08:51 | Araq | or maybe under a different page |
15:08:58 | Araq | hmm |
15:09:48 | Araq | xmldom and xmldomparser should be a babel package |
15:10:04 | Araq | and wow the library is pretty large now |
15:10:33 | Araq | no idea what to do with cookies.nim for instance |
15:11:25 | Araq | I guess the web stuff is too common now so it should be in the stdlib |
15:12:48 | dom96 | I think we need the basics, so httpserver/client, scgi and related things should stay |
15:12:57 | Araq | yes |
15:13:08 | Araq | not sure what to do with our db_* stuff |
15:13:19 | dom96 | I'm going to create an issue and list what stays, what doesn't and what we're not sure about yet. |
15:13:23 | Araq | but I guess as long as I maintain it, it should be in the stdlib |
15:15:58 | Araq | dialogs.nim is clearly a babel package |
15:16:28 | Araq | so is the osinfo* stuff? (does that use anybody?) |
15:16:37 | Araq | :P |
15:16:48 | dom96 | lol |
15:17:01 | Araq | I think quite some modules are unused because nobody ever finds them |
15:17:16 | dom96 | yeah |
15:17:48 | * | gdos joined #nimrod |
15:18:40 | Araq | x11, opengl, sdl, cairo, lua -- all babel packages |
15:19:13 | Araq | btw can we mark packages as "C only" or "JS only"? |
15:20:19 | dom96 | yes |
15:20:28 | dom96 | well |
15:20:30 | Araq | via the 'tags' mechanism? |
15:20:48 | dom96 | Yeah. If the package is not a library and is to be compiled then you can specify the backend. |
15:21:00 | Araq | hmmm |
15:21:04 | dom96 | But 'tags' is the general mechanism |
15:21:05 | dom96 | I guess |
15:21:16 | Araq | just document some standard tags then ;-) |
15:21:57 | Araq | and make sure the tags are case sensitive so that JS and js mean different things. Very useful, that is. Sorry couldn't resist :P |
15:24:39 | dom96 | lol |
15:24:45 | dom96 | Yeah. I agree. |
15:25:50 | dom96 | https://github.com/Araq/Nimrod/issues/623 |
15:25:51 | dom96 | Good? |
15:26:28 | dom96 | Araq: have you tested babel on Mac OS X? |
15:26:38 | Araq | not yet, sorry |
15:26:54 | Araq | however the vm stuff might be done until monday |
15:27:03 | Araq | and then I'll have some resource to spare |
15:27:10 | dom96 | ok |
15:27:28 | Araq | see you later |
15:27:36 | dom96 | alright bye |
15:53:40 | * | DAddYE joined #nimrod |
16:00:11 | * | DAddYE quit (Ping timeout: 245 seconds) |
16:01:55 | * | ltbarcly joined #nimrod |
16:02:00 | * | ltbarcly quit (Client Quit) |
16:21:20 | * | peter9477 joined #nimrod |
16:22:08 | peter9477 | Hi guys. I just asked this in the 0.9.2 reddit thread but then thought of IRC: http://www.reddit.com/r/programming/comments/1epf5s/nimrod_092_released/ccq88i3 |
16:23:05 | peter9477 | basically: could even 8-bit micros be supported as cross-compilation targets for nimrod code? i understand with standalone it compiles to C, so i was trying to think why it might be restricted to 16-bit as the limited docs on "nimrod for embedded" suggest |
16:24:12 | * | Endy joined #nimrod |
16:26:15 | dom96 | hello peter9477. I would bet that it is supported. Can't guarantee it though. |
16:31:59 | peter9477 | dom96: thanks, that's a start :-) |
16:36:20 | dom96 | Here is a barebones OS I created which may help you: https://github.com/dom96/nimkernel |
16:36:44 | * | dom96 just noticed that the screenshot is gone |
16:37:08 | * | [1]Endy joined #nimrod |
16:41:02 | * | Endy quit (Ping timeout: 264 seconds) |
16:41:03 | * | [1]Endy is now known as Endy |
16:48:15 | peter9477 | not off to a good start... using Windows (mistake?): |
16:48:16 | peter9477 | Error: system module needs 'addChar' |
16:48:32 | peter9477 | that's with a simple echo "hello, world" and this command: |
16:48:34 | peter9477 | nimrod c --os:standalone --gc:none -d:useMalloc --genScript test1.nim |
16:49:49 | peter9477 | trying just a native build it looks like it tries calling gcc.exe then complains that's not installed: Error: unhandled exception: No such file or directory [EOS] |
16:50:07 | peter9477 | I thought the windows build included MinGW. |
16:50:28 | peter9477 | probably missing some path stuff |
16:51:43 | peter9477 | yup |
16:54:34 | peter9477 | apriori had this a year ago: http://build.nimrod-code.org/irclogs/12-010-2012.html |
16:56:40 | * | DAddYE joined #nimrod |
16:57:37 | dom96 | try Araq's suggestions then |
16:57:52 | dom96 | I think echo may use parts of system which are unavailable in standalone mode |
16:58:08 | peter9477 | comes from line 1746 in system.nim |
16:58:24 | peter9477 | in a "when not defined(JS):" block |
17:01:27 | peter9477 | removing the proc add* definition there, I get farther but then: Error: system module needs 'copyString' |
17:01:31 | peter9477 | from line 2149 |
17:01:59 | peter9477 | i get the impression there are blocks of code being included that shouldn't be with os:standalone |
17:03:39 | * | DAddYE quit (Ping timeout: 272 seconds) |
17:04:15 | peter9477 | and that was with the hello world changed to a mere var x = "test" program |
17:05:47 | dom96 | you are including those pieces by using 'echo' |
17:06:18 | peter9477 | no |
17:06:23 | peter9477 | i removed echo |
17:06:36 | peter9477 | test1.nim was now only: var x = 3 |
17:06:52 | peter9477 | and a .hints on thing but i assume that's irrelevant |
17:07:01 | dom96 | ahh, well then perhaps standalone mode is broken |
17:07:10 | peter9477 | my suspicion as well |
17:07:23 | peter9477 | thanks for the help... i'll come back to this another time when i have more time to learn |
17:08:35 | dom96 | sure. Stick around, maybe someone will fix it for you |
17:10:32 | peter9477 | sure thing :) |
17:26:29 | Araq | hi peter9477, welcome |
17:26:51 | Araq | --os:standalone works with the github version but not with 0.9.2 afaict |
17:27:12 | Araq | and 'var x = "string"' can't work with --os:standalone |
17:27:30 | Araq | use 'cstring' instead then |
17:29:05 | Araq | as for the 8bit targets. it's possible and in fact people are working on it |
17:30:10 | Araq | though personally I consider 8bit processors an abomination ;-) |
17:57:40 | Varriount | Good morning everyone! |
17:59:16 | Araq | it's night here |
17:59:20 | Varriount | Araq, what would you consider the best equivalent of a char array in nimrod? cstring? seq[char]()? or what? |
17:59:32 | Araq | cstring |
17:59:40 | Araq | especially if it's 0-terminated |
17:59:41 | * | DAddYE joined #nimrod |
17:59:59 | Varriount | It's for the byte buffer that CryptGenRandom uses. |
18:00:15 | Varriount | the functions calls for a char pointer and a length (in bytes) |
18:00:46 | Araq | sounds like (pointer, int) |
18:01:17 | Araq | arrghh |
18:01:21 | Araq | omg |
18:01:26 | Araq | what a stupid bug |
18:01:32 | Araq | -.- |
18:01:43 | Araq | good that it took me hours to figure it out ... |
18:01:44 | Varriount | ? |
18:01:52 | * | Araq is debugging his new VM |
18:02:05 | * | Varriount pats Araq on the back. |
18:02:22 | Varriount | Don't worry, it'll get better eventually. |
18:02:51 | Araq | yeah eventually I'll stop replacing subsystems of thousands of lines in the compiler ... |
18:03:05 | Varriount | Now I'm off to try and implement python's mersenne twister random number generator in nimrod. |
18:04:15 | Araq | I think we that already somewhere |
18:04:24 | Araq | searched github for it? |
18:04:28 | * | Endy quit (Ping timeout: 246 seconds) |
18:06:02 | Varriount | Found it. |
18:06:21 | * | DAddYE quit (Ping timeout: 272 seconds) |
18:06:28 | Varriount | Araq, Why don't we use that, instead of the standard C random functions? |
18:06:53 | Araq | because the standard C stuff is good enough for games at least |
18:06:55 | Varriount | From what I've heard, the standard rand functions aren't very good. |
18:06:58 | Araq | and produces smaller code |
18:07:13 | Araq | indeed they are not but they are good enough for C :P |
18:07:26 | Varriount | Hm.. |
18:07:40 | Varriount | Well then, anything windows-related that I can help fix/implement? |
18:08:04 | Araq | of course |
18:08:16 | Araq | I guess debugging a memory manager is still over your head? |
18:08:26 | Varriount | Yeah. |
18:08:43 | Varriount | Try something on the level of "wrapping a library" |
18:08:51 | Varriount | Or "formatting code" |
18:09:00 | Araq | too bad |
18:09:19 | Araq | I wanted to suggest "debug the code generation for closure iterators" ... |
18:09:19 | Varriount | Araq, A large amount of my knowledge is theoretical. |
18:09:42 | dom96 | Varriount: A wrapper for libcef would be cool. |
18:09:56 | Varriount | I know, in theory, how thing's like memory managers work. But I would need a teacher to actually help me understand the details. |
18:10:21 | dom96 | Varriount: You can also help with Aporia if you want: https://github.com/nimrod-code/Aporia/blob/master/todo.markdown |
18:10:40 | Varriount | dom96, this? -> https://code.google.com/p/chromiumembedded/ |
18:10:55 | dom96 | Varriount: yeah |
18:11:02 | Varriount | dom96, remember, I can't get gtk to compile. |
18:11:23 | dom96 | Varriount: Why are you trying to? Grab pre-compiled dlls. |
18:12:27 | Varriount | dom96, What does libcef actually do? |
18:13:08 | dom96 | Allows you to display a web page. |
18:13:19 | Varriount | Ah |
18:13:44 | * | ltbarcly joined #nimrod |
18:13:52 | * | ltbarcly quit (Client Quit) |
18:14:03 | dom96 | I've never used it though heh |
18:15:36 | Varriount | To be frank, my feelings on Aporia are mixed. I feel that, instead of creating a specific IDE for one language, it might be better to simple integrate nimrod support into other IDE's |
18:15:54 | Varriount | Sublime Text, for example, has very good support for adding other languages. |
18:17:11 | dom96 | Perhaps, but none of the IDEs satisfy me. |
18:17:32 | Araq | *shrug* I don't use any other editor anymore ... |
18:17:50 | Araq | the other editors can't get basic search&replace right for a start |
18:18:11 | Araq | yeah open a window for it hiding the text I want to look at |
18:18:14 | Araq | brilliant idea |
18:18:53 | OrionPK | ok, what am I missing here; "Error: arguments can only be given if the '--run' option is selected" |
18:19:03 | OrionPK | when I run "nimrod c primary/library.nim --out:../primary.dll" |
18:19:54 | Araq | OrionPK: try "nimrod c --out:../primary.dll primary/library.nim" instead |
18:20:05 | Araq | and yeah ... I guess I should change that |
18:20:32 | Araq | the thing is when you use '-r' everything that comes after the project.nim is passed as command line args to the program |
18:20:40 | OrionPK | ah yeah, that works |
18:20:44 | OrionPK | thanks |
18:22:02 | * | Endy joined #nimrod |
18:22:51 | Varriount | Araq, have you tried sublime text? |
18:22:53 | peter9477 | Araq: thanks for that info. I'll give the latest code a try some time. |
18:23:23 | peter9477 | when you say it's possible and others "are working on it", do you mean they're working towards getting it to work some day, or they are actively making use of it for 8-bit micros already? |
18:23:47 | peter9477 | also 8-bit micros may be an abomination, but they're necessary for some things, and better for many where e.g. cost is a big concern |
18:24:17 | peter9477 | and in some cases, if you were to use a 32-bit micro for the same thing you'd just need to add in some 8-bit micros as co-processors to get the full functionality you needed anyway ;-) |
18:24:59 | Araq | Varriount: I wasn't aware a win version exists now. hmm need to try it |
18:25:40 | Varriount | Join usss.... Join ussss..... |
18:26:53 | Araq | peter9477: it should work already and might be used in production already |
18:27:43 | Araq | it's always hard to say because people rarely come back and say "it works", all you ever get back is "gah doesn't work" ;-) |
18:28:39 | dom96 | Araq: Varriount: If only Sublime wasn't proprietary and didn't cost $70... :P |
18:29:00 | Varriount | Well, technically you can download the 'trial' version |
18:29:09 | Varriount | But it doesn't expire, and isn't limited. |
18:29:22 | dom96 | But it bugs you to buy it right? |
18:29:29 | OrionPK | $70 for sublime is money well spent |
18:29:30 | Varriount | Every once in a while. |
18:29:44 | * | OrionPK paid for it |
18:29:53 | Varriount | I would pay for it, if I had the money. |
18:30:15 | OrionPK | we do need a better nim plugin for it |
18:30:23 | OrionPK | more up-to-date |
18:30:29 | Varriount | Which I am working on. |
18:30:30 | OrionPK | with build system for it |
18:30:32 | OrionPK | cool |
18:30:52 | OrionPK | dom96 are you aware of an aporia bug which prevents scrollwheel working? |
18:31:06 | dom96 | And then the guy releases a new version and asks you to pay $30 for it? :P |
18:31:44 | OrionPK | I'm on windows, every so often, intermittently, suddenly the cursor goes wonky (turns into a | cursor no matter what, or arrow cursor even over text), and then scrollwheel on my mouse no longer works. |
18:31:45 | dom96 | OrionPK: Nope. More details would be nice. |
18:31:51 | peter9477 | Araq: cool, thanks. If *I* get it working, you can be sure I'll be back to let you know. :) |
18:32:24 | peter9477 | I paid for Sublime Text 2 but I'm still on the fence about it versus Scite. |
18:32:29 | peter9477 | on Windows |
18:32:37 | OrionPK | dom96 program continues to work, not frozen or anything, just have to scroll by dragging the scrollbar |
18:32:51 | dom96 | OrionPK: That's weird. |
18:33:13 | peter9477 | Also was annoyed that in some ways it was a step down (much slower loading, for example), and then in less than a year there was an update that supposedly fixes the speed issue, but I'll have to pay for the upgrade. |
18:34:04 | dom96 | OrionPK: If you could get a set of steps to reproduce it, that would be great. |
18:34:18 | OrionPK | dom96 if I can figure out how to reproduce it consistently, I'll let u know |
18:34:35 | Araq | OrionPK, dom96 I use Aporia on windows all the time and have no scrolling bug |
18:34:43 | dom96 | But that sounds more like a gtksourceview bug |
18:34:43 | OrionPK | dom96 but it happens to me almost every time I use aporia for more than 5 minutes |
18:34:50 | Araq | just sayin' |
18:35:16 | dom96 | Yeah. I used it successfully on Windows too. |
18:35:28 | OrionPK | what versions of windows? |
18:35:42 | dom96 | The only bug with scrolling I notice is when I scroll really fast, there is some source view update issues. |
18:35:53 | dom96 | 7 32bit |
18:37:15 | dom96 | OrionPK: What version of gtk and gtksourceview are you using? |
18:37:46 | OrionPK | 2.0 for both |
18:38:08 | dom96 | I need a more specific version |
18:38:26 | OrionPK | 2.24.10 for gtk |
18:39:16 | OrionPK | 2.10.0 for sourceview |
18:39:39 | dom96 | hrm, well you could try using Araq's GTK dlls |
18:41:32 | dom96 | http://forum.nimrod-code.org/t/131/2#642 |
18:45:08 | OrionPK | will do |
18:58:26 | Araq | OrionPK: I'm using these DLLs but a most recent build of Aporia |
18:58:42 | OrionPK | Araq yeah,thats what I figured |
19:02:43 | * | DAddYE joined #nimrod |
19:07:26 | * | DAddYE quit (Ping timeout: 264 seconds) |
19:08:54 | * | gdos quit (Ping timeout: 252 seconds) |
19:14:09 | Varriount | Araq, is there a list of regex expressions I can use to match nimrod syntax? |
19:15:54 | Araq | the gedit syntax highlighter is mostly regex based |
19:17:29 | dom96 | The pygments highlighter is also worth taking a look at. |
19:17:45 | * | gdos joined #nimrod |
19:24:50 | * | Endy quit (Ping timeout: 264 seconds) |
19:30:01 | Araq | Varriount: if you are still looking for a simple nimrod-related project |
19:30:22 | Araq | try to wrap http://disphelper.sourceforge.net/ with c2nim and translate a few examples |
19:30:26 | Araq | and put it on babel |
19:30:31 | Varriount | Ok. |
19:30:44 | Araq | I gave this task "seeker" too but he disappeared |
19:37:18 | Varriount | Araq, how does c2nim handle defines? |
19:37:42 | Varriount | Or in other words, any tips on what to do when it throws syntax errors at me? |
19:37:57 | Araq | replace #define with #def |
19:40:40 | Araq | but read the docs about the difference |
19:47:34 | * | gdos quit (Remote host closed the connection) |
19:53:46 | Varriount | c2nim does not like complex macros. >_< |
19:54:31 | Araq | depends on the macro |
19:55:58 | Varriount | Araq, -> https://gist.github.com/Varriount/6954172 |
19:58:36 | Araq | ok these look nasty, you need to comment them out and translate them by hand |
19:59:59 | dom96 | heyyy, what about libcef? |
20:00:18 | Araq | dom96: disphelper is a simpler project to start with |
20:01:01 | Araq | Varriount: try to close the open { with } in these #defines |
20:01:08 | Araq | then it might translate |
20:01:28 | Varriount | 'might' being the operative word |
20:01:41 | Araq | 'might' is a mighty word |
20:03:16 | * | DAddYE joined #nimrod |
20:03:18 | Araq | dom96: and a useful project for everybody who likes his nimrod program to send emails via outlook |
20:04:14 | Araq | or who has to transform thousands of .docx files to .rtf files |
20:07:54 | * | DAddYE quit (Ping timeout: 265 seconds) |
20:13:25 | OrionPK | is there a way to extract a kind of nim header file for a module that's meant to be a shared lib, with just the exported procs/types etc? |
20:14:30 | Araq | --headerFile produces a C header file iirc |
20:14:45 | Araq | "nimrod doc2" extracts the docs from a module |
20:14:54 | OrionPK | dont want a C header file, want a nim file |
20:15:03 | OrionPK | to be used in another nimrod project, for instance |
20:15:16 | Araq | ok that's done differently |
20:16:14 | Araq | you need to *include* a modfied system/incrtl.nim |
20:16:55 | OrionPK | hm |
20:17:13 | Araq | well you need to define your own pragma |
20:17:30 | Araq | that either ends up being 'exportc, dynlib' |
20:17:36 | Araq | or 'importc, dynlib' |
20:17:52 | Araq | then you can use the same module that provides the DLL as the "header" module |
20:18:26 | OrionPK | right, but if you do that then you might as well not even use the DLL |
20:18:40 | Araq | yeah ok |
20:18:54 | Araq | then you need copy&paste the proc headers on your own |
20:19:01 | OrionPK | ha, ok |
20:19:12 | Araq | or perhaps produce a --headerFile and c2nim it back XD |
20:19:15 | OrionPK | how feasible would it be to create a tool or compiler switch that does that? |
20:19:49 | Araq | it would be a pass over the sem'checked AST |
20:20:06 | Araq | in other words |
20:20:23 | Araq | looks quite easy to implement |
20:20:31 | OrionPK | worthwhile? |
20:20:47 | Araq | it's an evening of work for me |
20:21:07 | Araq | but I don't have any evenings left |
20:21:10 | OrionPK | seems like it'd be worthwhile for big projects.. being able to have that kind of easy separation of dlls |
20:21:22 | OrionPK | or for babel libraries |
20:22:23 | Araq | I hope Babel packages don't start with a DLL hell |
20:22:56 | OrionPK | it already supports 'binary' packages |
20:23:32 | Araq | DLLs are evil |
20:24:46 | OrionPK | you could write a nim module and compile with C++ (say if it used like..irrlicht), and then anyone could include it without having to switch their whole project to C++ |
20:25:21 | Araq | yeah C++ is famous for its awesome DLL support |
20:25:26 | * | ltbarcly joined #nimrod |
20:25:30 | * | ltbarcly quit (Client Quit) |
20:26:07 | OrionPK | if you're using a C++ library written in C++, you write a wrapper in nim and compile it with cpp, then export the 'header' |
20:27:42 | Araq | why would one do that? |
20:27:49 | Araq | oh I see |
20:28:03 | Araq | hmm yeah looks like a very good use case |
20:28:52 | Araq | but then it's not much work to copy,paste,modify the wrapper to be a header file for now |
20:29:23 | OrionPK | depending on the size of the header, no |
20:29:43 | OrionPK | but I thnk ultimatey it'd be a pretty cool switch to have |
20:30:10 | OrionPK | nimrod c -exportSymbols myLibraryWrapper.nim or whatever |
20:30:27 | OrionPK | or nimrod cpp |
20:30:42 | OrionPK | food for thought, anyway |
20:30:43 | OrionPK | afk |
20:32:35 | dom96 | Araq: What is the status with destructors? |
20:32:59 | Araq | generic destructors are broken, ordinary ones work afaict |
20:34:07 | * | EXetoC joined #nimrod |
20:37:18 | dom96 | Araq: My OpenCV wrapper has lots of createX and releaseX would it make sense to add the destructor pragma to the releaseX procs? |
20:38:03 | Varriount | Araq, this wrapper might take me a couple of days. |
20:38:04 | Araq | yes |
20:38:20 | Araq | Varriount: how many lines of code is the header file? |
20:38:44 | Varriount | The main one is 740 |
20:38:57 | Varriount | But there are lots of macros. |
20:39:06 | Araq | that shouldn't take longer then half a day |
20:39:22 | Varriount | Yes, but I have an exam in half an hour. |
20:39:26 | Araq | lol |
20:39:52 | Araq | well I don't want you to spend days on it |
20:40:41 | Araq | doesn't it work with my }}} suggestion? |
20:41:49 | Varriount | Oh, that part worked |
20:42:02 | Varriount | I just did some inlining by hand and it was fixed. |
20:42:27 | Varriount | THe problem is that I run into invalid syntax errors every 20 lines or so |
20:42:37 | Araq | what syntax errors? |
20:43:25 | Varriount | '(' expected, ';' expected, '{' expected, identifier expected, but found '#' |
20:43:33 | Varriount | etc |
20:44:51 | Araq | ok so there a lots of macro definitions that produce partial C code |
20:45:10 | Araq | there is a trick to deal with it ... |
20:45:29 | Araq | but you should concentrate on your exam |
20:45:38 | Araq | good luck |
20:45:58 | Varriount | Whats the trick? |
20:48:54 | Araq | replace #define with #def and invoke the #def in a new clean #define |
20:50:11 | Araq | thought that can be as much work, unfortunately |
20:56:45 | Araq | dom96: "Error: Content not long enough" ? |
20:56:50 | Araq | is that new? |
20:57:20 | Araq | (input on the forum) |
20:57:31 | dom96 | huh? |
20:57:42 | dom96 | What do you mean "input on the forum"? |
20:57:54 | Araq | I'm trying to answer "Yes." |
20:58:05 | Araq | but nimforum complains that ain't long enough |
20:58:36 | dom96 | I see. |
20:58:44 | dom96 | I think gradha submitted a pull request which did that. |
20:58:51 | Araq | -.- |
20:59:07 | dom96 | yeah, needs to be at least 10 |
21:00:03 | Araq | ok |
21:00:14 | Varriount | Araq, do you want me to and wrap the C++ functionality? |
21:00:25 | Varriount | (Is it even possible?) |
21:01:42 | Araq | it's possible but please stick to the C stuff for now |
21:03:44 | * | DAddYE joined #nimrod |
21:08:38 | * | DAddYE quit (Ping timeout: 264 seconds) |
21:23:40 | * | io2 quit () |
22:03:49 | Varriount | Araq, I'm back from my exam, and I also have the generated wrapper for disphelper. |
22:04:13 | Varriount | Right now I'm formatting it. :p |
22:04:15 | * | DAddYE joined #nimrod |
22:04:38 | Araq | used my trick? |
22:05:24 | Varriount | Sorta |
22:05:31 | Araq | yay |
22:05:42 | Araq | that's cool because I invented a few hours ago |
22:05:49 | Araq | *invented it |
22:06:03 | Araq | and so never used it on my own |
22:08:13 | Varriount | Looking at that file, I'm acutely aware of C's lack of function overloading. |
22:08:19 | Varriount | *I'm now |
22:08:44 | * | DAddYE quit (Ping timeout: 265 seconds) |
22:09:46 | Varriount | Araq, I was looking through the library documentation, and noticed that the fsmonitor.nim module has no windows support. |
22:09:59 | Araq | true |
22:10:11 | Varriount | I'm confident that I can implement windows functionality for fsmonitor. |
22:10:36 | Varriount | The only tricky part will be individual file monitoring - Windows only supports directory monitoring. |
22:10:43 | Araq | good. I'm confident too. |
22:11:40 | dom96 | The reason I haven't implemented Windows support for fsmonitor is because I wanted to implement I/O completion ports first for asyncio. |
22:15:14 | Varriount | Ah. |
22:15:55 | Varriount | Why is that? I thought that the directory monitoring functions had no overlap with iocp? |
22:17:19 | dom96 | Select certainly won't work with them on Windows. |
22:18:03 | dom96 | IOCP is how you do async IO on Windows, I'm not sure if there is a different way except the waitForMultipleObjects stuff. |
22:37:19 | * | ltbarcly joined #nimrod |
22:37:24 | * | ltbarcly quit (Client Quit) |
22:48:47 | Varriount | Araq, any idea how to overcome c2nim's issues with unions? |
22:49:32 | * | brson joined #nimrod |
22:49:46 | Araq | c2nim has no problems with unions. Nimrod has. |
22:50:05 | Araq | I guess I need to bite the bullet and implement a 'union' pragma for 'object' |
22:50:25 | dom96 | I was thinking about creating a union macro. |
22:50:44 | Araq | that's a cool idea |
22:53:02 | Varriount | Araq, c:\common\winbase.h(245, 16) Error: identifier expected, but found '{' |
22:53:23 | Varriount | Line 245 is in a struct, with a union in it. |
22:53:40 | Araq | anon unions are not C89 |
22:54:33 | Araq | just give a name like 'u' |
23:04:46 | * | DAddYE joined #nimrod |
23:05:06 | Araq | hi DAddYE |
23:11:38 | * | DAddYE quit (Ping timeout: 264 seconds) |
23:19:51 | * | wlhlm quit (Ping timeout: 260 seconds) |
23:22:24 | Varriount | Gah, I think it would probably just be easier for me to hand write the wrapper than use c2nim. >_< |
23:25:07 | Araq | it's always pity to hear that |
23:25:49 | Varriount | Araq, It's a combination of my limited knowledge of C, and nim2c's lack of support for C99 |
23:26:27 | Varriount | It refuses to comprehend a typedef defining a function call type. |
23:26:45 | Araq | it supports function call types |
23:27:10 | Araq | but only 17 out of the 23 ways to do them |
23:27:17 | Varriount | typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)( |
23:27:17 | Varriount | LPVOID lpThreadParameter |
23:27:18 | Varriount | ); |
23:27:29 | Araq | #def WINAPI |
23:29:12 | Araq | add that to the top of the file |
23:29:32 | Araq | or rather |
23:29:40 | Araq | #def WINAPI __stdcall |
23:34:08 | Araq | Varriount: in the long run c2nim will save you tons of time |
23:40:41 | NimBot | Araq/Nimrod master 5fb7ab0 Dominik Picheta [+0 ±1 -0]: Add compressBound proc to zlib wrapper. |
23:43:00 | Varriount | Araq, for structs with bitfields, would removing the bitfields be ok? |
23:43:20 | Araq | depends |
23:43:24 | Araq | in general no |
23:43:45 | Araq | if you decide to use the #header approach then that's feasible |
23:44:28 | Varriount | Araq, it's just that c2nim is choking on them |
23:44:59 | Araq | yeah guess why |
23:45:08 | Araq | nimrod doesn't support bitfields |
23:45:23 | Araq | so it makes no sense for c2nim to support them |