<< 12-10-2013 >>

00:02:07VarriountBitPuffin, I've found the best way to point people in the right direction is to comment everything
00:02:31VarriountAnd/or write up an explanation of how everything works together.
00:03:50Varriountdom96, any idea why the mac and linux x86 builds aren't being updated on the Nimbuild page?
00:04:12dom96the builders are down
00:04:49VarriountLack of hosts?
00:05:40dom96no
00:07:31BitPuffinVarriount: sure, but in this case it was really just, what might be a relevant file
00:07:38fowlOrionPK, https://gist.github.com/fowlmouth/6943947
00:12:35OrionPKshort but sweet
00:15:14VarriountHm, is it ok to document some of the wrapper libs?
00:15:34VarriountOr at least reformat them to look better?
00:22:26*ltbarcly joined #nimrod
00:22:30fowlyes
00:22:47fowli 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:00Varriountdom96, 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:33dom96findExe looks in the path
00:33:21VarriountYes, but running a process from the command line also assumes that they're on the path.
00:34:04Varriounteg, "git pull" runs the git executable, if it's in the path.
00:47:24*dyu joined #nimrod
00:54:34Varriountdom96, see -> https://gist.github.com/Varriount/6944308
00:55:04VarriountYou might have to change "7z" to "7za"
00:55:46fowlworks for me
00:56:05fowlVarriount, i think you want var (output, exitcode) though
00:56:29VarriountWhat's the difference?
00:56:49fowlyour version sets output and exitcode to the same result of execCmdEx()
00:57:04VarriountOh, didn't know that.
00:57:14VarriountJust shows how new I am to nimrod. :p
00:57:26fowltuple unpacking is pretty new, probably not in the docs
00:58:06VarriountRight 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:37VarriountAlthough 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:08fowlimprove/simplify something thats not working??
01:10:52VarriountAnd fix.
01:11:18VarriountFor example, add paths to look for the git, 7z, etc executables in the config
01:15:23fowlwhat does "add paths" mean
01:15:56VarriountSpecify specific executable paths.
01:16:18fowldoes os.findExe not work for you?
01:16:21Varriount./c/64/mingw/bin/git.exe
01:16:56Varriountfowl, it duplicates functionality already done by the operating system/terminal
01:17:15fowlk
01:17:25fowli dont know what your doing
01:17:27fowlso, carry on
01:18:30VarriountYou might use findExe if you need to physically know where the executable is, and where it's secondary files are stored.
01:19:14VarriountBut if you want to simply run it, just use osproc.execCmdEx
01:21:40fowlVarriount, http://i.imgur.com/E9yNH3k.gif
01:22:44VarriountO_o
01:25:58EXetoC:O
01:26:00*DAddYE quit (Remote host closed the connection)
01:26:35*DAddYE joined #nimrod
01:27:16fowlgn everyone
01:27:23*fowl quit (Quit: Leaving)
01:27:31VarriountAraq, what did you change for sizeof(culong)?
01:31:01*DAddYE quit (Ping timeout: 245 seconds)
01:39:34dom96Varriount: The reason I don't use execCmdEx is because I want to get output as it comes from the process.
01:40:05VarriountAh, and you don't want to block so you can maintain a connection with the server?
01:40:25dom96That was one of the old reasons, but now I just use a separate thread.
01:41:37dom96There are some strange bugs with it which I didn't get a chance to track down though
01:41:49dom96For example if you look at the output from your builder: http://build.nimrod-code.org/commits/windows-x86/f2cbc92f572f/logs.txt
01:42:02dom96It's missing the first letter from some of the lines.
01:42:24dom96Sometimes the lines seem to be out of order too.
01:42:40dom96So you can try tracking that down if you're bored :)
01:42:44VarriountWhat's really needed is iocp support.
01:43:06dom96indeed
01:43:17dom96that will come with async await
01:43:31Varriount"async await"?
01:44:44dom96I am implementing an async thing ala C#'s await.
01:44:56OrionPKyay
01:46:49dom96anyway, good night
01:46:57VarriountGood 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:07BitPuffinhttps://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:33VarriountAnyone know if there's a way to have C2Nim handle just header files?
02:40:29reactormonkVarriount, you run them only on the header files?
02:40:50VarriountWell, it's not like I have a copy of the window's source code.
02:41:02VarriountI'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:24VarriountOr figure out how a Byte pointer translates to nimrod's types
02:42:38*Associat0r quit (Ping timeout: 240 seconds)
03:13:50EXetoCvar p: ptr T = ...; var pArr = cast[ptr array[len_or_range, T]](p);
03:14:17EXetoCthe latter simply allows you to access by index
03:15:41EXetoCfowl has a lib that defines related operations on pointers directly
03:22:18VarriountEXetoC, I'm trying to implement math.random functionality for windows.
03:22:36VarriountThe hard part is knowing which types I need to pass.
03:25:39EXetoCptr i8? or maybe u8
03:26:03OrionPKchar is unsigned 8 bits
03:26:14VarriountWell, windows.nim suggests that it's a pointer to an int8
03:26:40VarriountUnfortunately, c2nim chokes on the wincrypt header file.
03:26:53VarriountSo I'm not sure...
03:26:57OrionPKyou might need to massage it a bit before c2nim will work
03:26:58EXetoCOrionPK: on windows specifically?
03:27:00OrionPKmassage the header I mean
03:27:12EXetoCbecause it's not defined in the standard IIRC
03:27:22*brson quit (Ping timeout: 246 seconds)
03:27:28VarriountIts complaining of not finding a * in a return keyword.
03:27:31*DAddYE joined #nimrod
03:27:35OrionPKhttp://nimrod-code.org/system.html#115
03:27:41VarriountAnd when I add the *, it keeps complaining.
03:27:55EXetoCok a char in nimrod
03:28:38EXetoCI thought c2nim only handled prototypes
03:29:24*brson joined #nimrod
03:29:30EXetoCanyway, happy coding. cya
03:29:43EXetoCbrson: hello there, rival!
03:30:29brsonEXetoC: hey, friend!
03:30:35EXetoCc(:)
03:31:20VarriountTo 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:16VarriountHm, 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:42Araqhi 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:31Araqping zahary
12:11:14Araqwell you'll read this anyway: any idea why the frontend inlines .compileTime procs?
12:11:30AraqI'm not aware of any optimization that inlines ...
12:14:11zaharythis is news to me too
12:15:25Araqmust be caused by my new vm
12:16:26Araqcompiler llvmGcc:
12:16:27Araq result = gcc()
12:16:35Araq# gcc() inlined here apparently
12:17:39Araqah never mind
12:17:46Araqgot it
12:18:01Araqit's not inlined it's evaluated XD
12:18:11Araqwhich happens to produce the same result
12:26:44*EXetoC joined #nimrod
12:32:39Araqbtw in sem.nim there is:
12:32:42Araq result.getType = proc (n: PNode): PNode =
12:32:43Araq var e = tryExpr(c, n)
12:32:45Araq if e == nil:
12:32:46Araq result = symNodeFromType(c, errorType(c), n.info)
12:32:48Araq elif e.typ == nil:
12:32:49Araq result = newSymNode(getSysSym"void")
12:32:51Araq else:
12:32:52Araq result = symNodeFromType(c, e.typ, n.info)
12:33:10Araqeffectively producing a dependency of evals.nim to the sem context c
12:33:42Araqnow the new evaluation engine supports 'getType' but not via 'tryExpr' ... is that essential?
12:34:21Araq'handleIsOperator' is my next pain
12:37:57Araqand 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:36Araqif 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:08dom96hello
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:25dom96Araq: 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:15AraqBabel: pretty much everything that's a wrapper which is not used by anything in impure
15:02:36Araqso pcre is an exception because we need it for 're'
15:02:50Araqand 're' not part of the stdlib would be embarrassing these days
15:03:11Araqgtk2 is a babel package of course
15:04:40Araqwindows.nim should be babel package too
15:04:54Araqposix.nim should stay in the stdlib
15:05:24Araqeverything that "prelude" imports is stdlib
15:05:45Araqsockets and asyncio is stdlib
15:06:13dom96makes 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:28Araqunknown stuff like subexes is a babel package
15:07:51Araqromans.nim is a babel package
15:08:03dom96Also if we're going to do that I should get nimbuild to build docs for the babel packages.
15:08:27Araqnow that's a good idea
15:08:36Araqindeed we need that
15:08:51Araqor maybe under a different page
15:08:58Araqhmm
15:09:48Araqxmldom and xmldomparser should be a babel package
15:10:04Araqand wow the library is pretty large now
15:10:33Araqno idea what to do with cookies.nim for instance
15:11:25AraqI guess the web stuff is too common now so it should be in the stdlib
15:12:48dom96I think we need the basics, so httpserver/client, scgi and related things should stay
15:12:57Araqyes
15:13:08Araqnot sure what to do with our db_* stuff
15:13:19dom96I'm going to create an issue and list what stays, what doesn't and what we're not sure about yet.
15:13:23Araqbut I guess as long as I maintain it, it should be in the stdlib
15:15:58Araqdialogs.nim is clearly a babel package
15:16:28Araqso is the osinfo* stuff? (does that use anybody?)
15:16:37Araq:P
15:16:48dom96lol
15:17:01AraqI think quite some modules are unused because nobody ever finds them
15:17:16dom96yeah
15:17:48*gdos joined #nimrod
15:18:40Araqx11, opengl, sdl, cairo, lua -- all babel packages
15:19:13Araqbtw can we mark packages as "C only" or "JS only"?
15:20:19dom96yes
15:20:28dom96well
15:20:30Araqvia the 'tags' mechanism?
15:20:48dom96Yeah. If the package is not a library and is to be compiled then you can specify the backend.
15:21:00Araqhmmm
15:21:04dom96But 'tags' is the general mechanism
15:21:05dom96I guess
15:21:16Araqjust document some standard tags then ;-)
15:21:57Araqand 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:39dom96lol
15:24:45dom96Yeah. I agree.
15:25:50dom96https://github.com/Araq/Nimrod/issues/623
15:25:51dom96Good?
15:26:28dom96Araq: have you tested babel on Mac OS X?
15:26:38Araqnot yet, sorry
15:26:54Araqhowever the vm stuff might be done until monday
15:27:03Araqand then I'll have some resource to spare
15:27:10dom96ok
15:27:28Araqsee you later
15:27:36dom96alright 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:08peter9477Hi 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:05peter9477basically: 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:15dom96hello peter9477. I would bet that it is supported. Can't guarantee it though.
16:31:59peter9477dom96: thanks, that's a start :-)
16:36:20dom96Here 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:15peter9477not off to a good start... using Windows (mistake?):
16:48:16peter9477Error: system module needs 'addChar'
16:48:32peter9477that's with a simple echo "hello, world" and this command:
16:48:34peter9477nimrod c --os:standalone --gc:none -d:useMalloc --genScript test1.nim
16:49:49peter9477trying 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:07peter9477I thought the windows build included MinGW.
16:50:28peter9477probably missing some path stuff
16:51:43peter9477yup
16:54:34peter9477apriori had this a year ago: http://build.nimrod-code.org/irclogs/12-010-2012.html
16:56:40*DAddYE joined #nimrod
16:57:37dom96try Araq's suggestions then
16:57:52dom96I think echo may use parts of system which are unavailable in standalone mode
16:58:08peter9477comes from line 1746 in system.nim
16:58:24peter9477in a "when not defined(JS):" block
17:01:27peter9477removing the proc add* definition there, I get farther but then: Error: system module needs 'copyString'
17:01:31peter9477from line 2149
17:01:59peter9477i 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:15peter9477and that was with the hello world changed to a mere var x = "test" program
17:05:47dom96you are including those pieces by using 'echo'
17:06:18peter9477no
17:06:23peter9477i removed echo
17:06:36peter9477test1.nim was now only: var x = 3
17:06:52peter9477and a .hints on thing but i assume that's irrelevant
17:07:01dom96ahh, well then perhaps standalone mode is broken
17:07:10peter9477my suspicion as well
17:07:23peter9477thanks for the help... i'll come back to this another time when i have more time to learn
17:08:35dom96sure. Stick around, maybe someone will fix it for you
17:10:32peter9477sure thing :)
17:26:29Araqhi peter9477, welcome
17:26:51Araq--os:standalone works with the github version but not with 0.9.2 afaict
17:27:12Araqand 'var x = "string"' can't work with --os:standalone
17:27:30Araquse 'cstring' instead then
17:29:05Araqas for the 8bit targets. it's possible and in fact people are working on it
17:30:10Araqthough personally I consider 8bit processors an abomination ;-)
17:57:40VarriountGood morning everyone!
17:59:16Araqit's night here
17:59:20VarriountAraq, what would you consider the best equivalent of a char array in nimrod? cstring? seq[char]()? or what?
17:59:32Araqcstring
17:59:40Araqespecially if it's 0-terminated
17:59:41*DAddYE joined #nimrod
17:59:59VarriountIt's for the byte buffer that CryptGenRandom uses.
18:00:15Varriountthe functions calls for a char pointer and a length (in bytes)
18:00:46Araqsounds like (pointer, int)
18:01:17Araqarrghh
18:01:21Araqomg
18:01:26Araqwhat a stupid bug
18:01:32Araq-.-
18:01:43Araqgood that it took me hours to figure it out ...
18:01:44Varriount?
18:01:52*Araq is debugging his new VM
18:02:05*Varriount pats Araq on the back.
18:02:22VarriountDon't worry, it'll get better eventually.
18:02:51Araqyeah eventually I'll stop replacing subsystems of thousands of lines in the compiler ...
18:03:05VarriountNow I'm off to try and implement python's mersenne twister random number generator in nimrod.
18:04:15AraqI think we that already somewhere
18:04:24Araqsearched github for it?
18:04:28*Endy quit (Ping timeout: 246 seconds)
18:06:02VarriountFound it.
18:06:21*DAddYE quit (Ping timeout: 272 seconds)
18:06:28VarriountAraq, Why don't we use that, instead of the standard C random functions?
18:06:53Araqbecause the standard C stuff is good enough for games at least
18:06:55VarriountFrom what I've heard, the standard rand functions aren't very good.
18:06:58Araqand produces smaller code
18:07:13Araqindeed they are not but they are good enough for C :P
18:07:26VarriountHm..
18:07:40VarriountWell then, anything windows-related that I can help fix/implement?
18:08:04Araqof course
18:08:16AraqI guess debugging a memory manager is still over your head?
18:08:26VarriountYeah.
18:08:43VarriountTry something on the level of "wrapping a library"
18:08:51VarriountOr "formatting code"
18:09:00Araqtoo bad
18:09:19AraqI wanted to suggest "debug the code generation for closure iterators" ...
18:09:19VarriountAraq, A large amount of my knowledge is theoretical.
18:09:42dom96Varriount: A wrapper for libcef would be cool.
18:09:56VarriountI 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:21dom96Varriount: You can also help with Aporia if you want: https://github.com/nimrod-code/Aporia/blob/master/todo.markdown
18:10:40Varriountdom96, this? -> https://code.google.com/p/chromiumembedded/
18:10:55dom96Varriount: yeah
18:11:02Varriountdom96, remember, I can't get gtk to compile.
18:11:23dom96Varriount: Why are you trying to? Grab pre-compiled dlls.
18:12:27Varriountdom96, What does libcef actually do?
18:13:08dom96Allows you to display a web page.
18:13:19VarriountAh
18:13:44*ltbarcly joined #nimrod
18:13:52*ltbarcly quit (Client Quit)
18:14:03dom96I've never used it though heh
18:15:36VarriountTo 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:54VarriountSublime Text, for example, has very good support for adding other languages.
18:17:11dom96Perhaps, but none of the IDEs satisfy me.
18:17:32Araq*shrug* I don't use any other editor anymore ...
18:17:50Araqthe other editors can't get basic search&replace right for a start
18:18:11Araqyeah open a window for it hiding the text I want to look at
18:18:14Araqbrilliant idea
18:18:53OrionPK ok, what am I missing here; "Error: arguments can only be given if the '--run' option is selected"
18:19:03OrionPKwhen I run "nimrod c primary/library.nim --out:../primary.dll"
18:19:54AraqOrionPK: try "nimrod c --out:../primary.dll primary/library.nim" instead
18:20:05Araqand yeah ... I guess I should change that
18:20:32Araqthe thing is when you use '-r' everything that comes after the project.nim is passed as command line args to the program
18:20:40OrionPKah yeah, that works
18:20:44OrionPKthanks
18:22:02*Endy joined #nimrod
18:22:51VarriountAraq, have you tried sublime text?
18:22:53peter9477Araq: thanks for that info. I'll give the latest code a try some time.
18:23:23peter9477when 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:47peter9477also 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:17peter9477and 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:59AraqVarriount: I wasn't aware a win version exists now. hmm need to try it
18:25:40VarriountJoin usss.... Join ussss.....
18:26:53Araqpeter9477: it should work already and might be used in production already
18:27:43Araqit'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:39dom96Araq: Varriount: If only Sublime wasn't proprietary and didn't cost $70... :P
18:29:00VarriountWell, technically you can download the 'trial' version
18:29:09VarriountBut it doesn't expire, and isn't limited.
18:29:22dom96But it bugs you to buy it right?
18:29:29OrionPK$70 for sublime is money well spent
18:29:30VarriountEvery once in a while.
18:29:44*OrionPK paid for it
18:29:53VarriountI would pay for it, if I had the money.
18:30:15OrionPKwe do need a better nim plugin for it
18:30:23OrionPKmore up-to-date
18:30:29VarriountWhich I am working on.
18:30:30OrionPKwith build system for it
18:30:32OrionPKcool
18:30:52OrionPKdom96 are you aware of an aporia bug which prevents scrollwheel working?
18:31:06dom96And then the guy releases a new version and asks you to pay $30 for it? :P
18:31:44OrionPKI'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:45dom96OrionPK: Nope. More details would be nice.
18:31:51peter9477Araq: cool, thanks. If *I* get it working, you can be sure I'll be back to let you know. :)
18:32:24peter9477I paid for Sublime Text 2 but I'm still on the fence about it versus Scite.
18:32:29peter9477on Windows
18:32:37OrionPKdom96 program continues to work, not frozen or anything, just have to scroll by dragging the scrollbar
18:32:51dom96OrionPK: That's weird.
18:33:13peter9477Also 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:04dom96OrionPK: If you could get a set of steps to reproduce it, that would be great.
18:34:18OrionPKdom96 if I can figure out how to reproduce it consistently, I'll let u know
18:34:35AraqOrionPK, dom96 I use Aporia on windows all the time and have no scrolling bug
18:34:43dom96But that sounds more like a gtksourceview bug
18:34:43OrionPKdom96 but it happens to me almost every time I use aporia for more than 5 minutes
18:34:50Araqjust sayin'
18:35:16dom96Yeah. I used it successfully on Windows too.
18:35:28OrionPKwhat versions of windows?
18:35:42dom96The only bug with scrolling I notice is when I scroll really fast, there is some source view update issues.
18:35:53dom967 32bit
18:37:15dom96OrionPK: What version of gtk and gtksourceview are you using?
18:37:46OrionPK2.0 for both
18:38:08dom96I need a more specific version
18:38:26OrionPK2.24.10 for gtk
18:39:16OrionPK2.10.0 for sourceview
18:39:39dom96hrm, well you could try using Araq's GTK dlls
18:41:32dom96http://forum.nimrod-code.org/t/131/2#642
18:45:08OrionPKwill do
18:58:26AraqOrionPK: I'm using these DLLs but a most recent build of Aporia
18:58:42OrionPKAraq 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:09VarriountAraq, is there a list of regex expressions I can use to match nimrod syntax?
19:15:54Araqthe gedit syntax highlighter is mostly regex based
19:17:29dom96The 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:01AraqVarriount: if you are still looking for a simple nimrod-related project
19:30:22Araqtry to wrap http://disphelper.sourceforge.net/ with c2nim and translate a few examples
19:30:26Araqand put it on babel
19:30:31VarriountOk.
19:30:44AraqI gave this task "seeker" too but he disappeared
19:37:18VarriountAraq, how does c2nim handle defines?
19:37:42VarriountOr in other words, any tips on what to do when it throws syntax errors at me?
19:37:57Araqreplace #define with #def
19:40:40Araqbut read the docs about the difference
19:47:34*gdos quit (Remote host closed the connection)
19:53:46Varriountc2nim does not like complex macros. >_<
19:54:31Araqdepends on the macro
19:55:58VarriountAraq, -> https://gist.github.com/Varriount/6954172
19:58:36Araqok these look nasty, you need to comment them out and translate them by hand
19:59:59dom96heyyy, what about libcef?
20:00:18Araqdom96: disphelper is a simpler project to start with
20:01:01AraqVarriount: try to close the open { with } in these #defines
20:01:08Araqthen it might translate
20:01:28Varriount'might' being the operative word
20:01:41Araq'might' is a mighty word
20:03:16*DAddYE joined #nimrod
20:03:18Araqdom96: and a useful project for everybody who likes his nimrod program to send emails via outlook
20:04:14Araqor who has to transform thousands of .docx files to .rtf files
20:07:54*DAddYE quit (Ping timeout: 265 seconds)
20:13:25OrionPKis 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:30Araq--headerFile produces a C header file iirc
20:14:45Araq"nimrod doc2" extracts the docs from a module
20:14:54OrionPKdont want a C header file, want a nim file
20:15:03OrionPKto be used in another nimrod project, for instance
20:15:16Araqok that's done differently
20:16:14Araqyou need to *include* a modfied system/incrtl.nim
20:16:55OrionPKhm
20:17:13Araqwell you need to define your own pragma
20:17:30Araqthat either ends up being 'exportc, dynlib'
20:17:36Araqor 'importc, dynlib'
20:17:52Araqthen you can use the same module that provides the DLL as the "header" module
20:18:26OrionPKright, but if you do that then you might as well not even use the DLL
20:18:40Araqyeah ok
20:18:54Araqthen you need copy&paste the proc headers on your own
20:19:01OrionPKha, ok
20:19:12Araqor perhaps produce a --headerFile and c2nim it back XD
20:19:15OrionPKhow feasible would it be to create a tool or compiler switch that does that?
20:19:49Araqit would be a pass over the sem'checked AST
20:20:06Araqin other words
20:20:23Araqlooks quite easy to implement
20:20:31OrionPKworthwhile?
20:20:47Araqit's an evening of work for me
20:21:07Araqbut I don't have any evenings left
20:21:10OrionPKseems like it'd be worthwhile for big projects.. being able to have that kind of easy separation of dlls
20:21:22OrionPKor for babel libraries
20:22:23AraqI hope Babel packages don't start with a DLL hell
20:22:56OrionPKit already supports 'binary' packages
20:23:32AraqDLLs are evil
20:24:46OrionPKyou 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:21Araqyeah C++ is famous for its awesome DLL support
20:25:26*ltbarcly joined #nimrod
20:25:30*ltbarcly quit (Client Quit)
20:26:07OrionPKif 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:42Araqwhy would one do that?
20:27:49Araqoh I see
20:28:03Araqhmm yeah looks like a very good use case
20:28:52Araqbut then it's not much work to copy,paste,modify the wrapper to be a header file for now
20:29:23OrionPKdepending on the size of the header, no
20:29:43OrionPKbut I thnk ultimatey it'd be a pretty cool switch to have
20:30:10OrionPKnimrod c -exportSymbols myLibraryWrapper.nim or whatever
20:30:27OrionPKor nimrod cpp
20:30:42OrionPKfood for thought, anyway
20:30:43OrionPKafk
20:32:35dom96Araq: What is the status with destructors?
20:32:59Araqgeneric destructors are broken, ordinary ones work afaict
20:34:07*EXetoC joined #nimrod
20:37:18dom96Araq: My OpenCV wrapper has lots of createX and releaseX would it make sense to add the destructor pragma to the releaseX procs?
20:38:03VarriountAraq, this wrapper might take me a couple of days.
20:38:04Araqyes
20:38:20AraqVarriount: how many lines of code is the header file?
20:38:44VarriountThe main one is 740
20:38:57VarriountBut there are lots of macros.
20:39:06Araqthat shouldn't take longer then half a day
20:39:22VarriountYes, but I have an exam in half an hour.
20:39:26Araqlol
20:39:52Araqwell I don't want you to spend days on it
20:40:41Araqdoesn't it work with my }}} suggestion?
20:41:49VarriountOh, that part worked
20:42:02VarriountI just did some inlining by hand and it was fixed.
20:42:27VarriountTHe problem is that I run into invalid syntax errors every 20 lines or so
20:42:37Araqwhat syntax errors?
20:43:25Varriount'(' expected, ';' expected, '{' expected, identifier expected, but found '#'
20:43:33Varriountetc
20:44:51Araqok so there a lots of macro definitions that produce partial C code
20:45:10Araqthere is a trick to deal with it ...
20:45:29Araqbut you should concentrate on your exam
20:45:38Araqgood luck
20:45:58VarriountWhats the trick?
20:48:54Araqreplace #define with #def and invoke the #def in a new clean #define
20:50:11Araqthought that can be as much work, unfortunately
20:56:45Araqdom96: "Error: Content not long enough" ?
20:56:50Araqis that new?
20:57:20Araq(input on the forum)
20:57:31dom96huh?
20:57:42dom96What do you mean "input on the forum"?
20:57:54AraqI'm trying to answer "Yes."
20:58:05Araqbut nimforum complains that ain't long enough
20:58:36dom96I see.
20:58:44dom96I think gradha submitted a pull request which did that.
20:58:51Araq-.-
20:59:07dom96yeah, needs to be at least 10
21:00:03Araqok
21:00:14VarriountAraq, do you want me to and wrap the C++ functionality?
21:00:25Varriount(Is it even possible?)
21:01:42Araqit'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:49VarriountAraq, I'm back from my exam, and I also have the generated wrapper for disphelper.
22:04:13VarriountRight now I'm formatting it. :p
22:04:15*DAddYE joined #nimrod
22:04:38Araqused my trick?
22:05:24VarriountSorta
22:05:31Araqyay
22:05:42Araqthat's cool because I invented a few hours ago
22:05:49Araq*invented it
22:06:03Araqand so never used it on my own
22:08:13VarriountLooking at that file, I'm acutely aware of C's lack of function overloading.
22:08:19Varriount*I'm now
22:08:44*DAddYE quit (Ping timeout: 265 seconds)
22:09:46VarriountAraq, I was looking through the library documentation, and noticed that the fsmonitor.nim module has no windows support.
22:09:59Araqtrue
22:10:11VarriountI'm confident that I can implement windows functionality for fsmonitor.
22:10:36VarriountThe only tricky part will be individual file monitoring - Windows only supports directory monitoring.
22:10:43Araqgood. I'm confident too.
22:11:40dom96The reason I haven't implemented Windows support for fsmonitor is because I wanted to implement I/O completion ports first for asyncio.
22:15:14VarriountAh.
22:15:55VarriountWhy is that? I thought that the directory monitoring functions had no overlap with iocp?
22:17:19dom96Select certainly won't work with them on Windows.
22:18:03dom96IOCP 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:47VarriountAraq, any idea how to overcome c2nim's issues with unions?
22:49:32*brson joined #nimrod
22:49:46Araqc2nim has no problems with unions. Nimrod has.
22:50:05AraqI guess I need to bite the bullet and implement a 'union' pragma for 'object'
22:50:25dom96I was thinking about creating a union macro.
22:50:44Araqthat's a cool idea
22:53:02VarriountAraq, c:\common\winbase.h(245, 16) Error: identifier expected, but found '{'
22:53:23VarriountLine 245 is in a struct, with a union in it.
22:53:40Araqanon unions are not C89
22:54:33Araqjust give a name like 'u'
23:04:46*DAddYE joined #nimrod
23:05:06Araqhi DAddYE
23:11:38*DAddYE quit (Ping timeout: 264 seconds)
23:19:51*wlhlm quit (Ping timeout: 260 seconds)
23:22:24VarriountGah, I think it would probably just be easier for me to hand write the wrapper than use c2nim. >_<
23:25:07Araqit's always pity to hear that
23:25:49VarriountAraq, It's a combination of my limited knowledge of C, and nim2c's lack of support for C99
23:26:27VarriountIt refuses to comprehend a typedef defining a function call type.
23:26:45Araqit supports function call types
23:27:10Araqbut only 17 out of the 23 ways to do them
23:27:17Varriounttypedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
23:27:17Varriount LPVOID lpThreadParameter
23:27:18Varriount );
23:27:29Araq#def WINAPI
23:29:12Araqadd that to the top of the file
23:29:32Araqor rather
23:29:40Araq#def WINAPI __stdcall
23:34:08AraqVarriount: in the long run c2nim will save you tons of time
23:40:41NimBotAraq/Nimrod master 5fb7ab0 Dominik Picheta [+0 ±1 -0]: Add compressBound proc to zlib wrapper.
23:43:00VarriountAraq, for structs with bitfields, would removing the bitfields be ok?
23:43:20Araqdepends
23:43:24Araqin general no
23:43:45Araqif you decide to use the #header approach then that's feasible
23:44:28VarriountAraq, it's just that c2nim is choking on them
23:44:59Araqyeah guess why
23:45:08Araqnimrod doesn't support bitfields
23:45:23Araqso it makes no sense for c2nim to support them