<< 27-06-2016 >>

00:13:03*chemist69_ quit (Ping timeout: 264 seconds)
00:16:58*chemist69_ joined #nim
00:23:25*freezerburnV joined #nim
00:54:11*yglukhov joined #nim
00:58:45*yglukhov quit (Ping timeout: 244 seconds)
01:37:24*edub4rt quit (Quit: Leaving)
01:42:28*chemist69_ quit (Ping timeout: 264 seconds)
01:55:37*chemist69_ joined #nim
02:18:15*tautologico joined #nim
02:22:01*kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…)
02:32:52*Demon_Fox joined #nim
02:33:01*hendi_ joined #nim
02:36:58*hendi quit (Ping timeout: 252 seconds)
02:38:52*freezerburnV quit (Ping timeout: 250 seconds)
02:56:03*yglukhov joined #nim
03:00:15*yglukhov quit (Ping timeout: 246 seconds)
03:11:00*veganskaway is now known as vegansk
03:27:52*NimBot joined #nim
04:17:12*endragor joined #nim
04:32:06*arnetheduck quit (Remote host closed the connection)
04:34:10*kssreeram joined #nim
04:37:02*arnetheduck joined #nim
04:40:51*Swend quit (Quit: Page closed)
04:52:24*endragor quit (Remote host closed the connection)
04:54:05*endragor joined #nim
04:58:08*yglukhov joined #nim
05:02:51*yglukhov quit (Ping timeout: 264 seconds)
05:04:57*arnetheduck quit (Remote host closed the connection)
05:30:02*chemist69_ quit (Ping timeout: 250 seconds)
05:30:23*chemist69_ joined #nim
05:57:06*arnetheduck joined #nim
06:06:44*mcc quit (Quit: Connection closed for inactivity)
06:15:20*endragor_ joined #nim
06:18:34*endragor quit (Ping timeout: 250 seconds)
06:18:37*yglukhov joined #nim
06:22:54*yglukhov quit (Ping timeout: 246 seconds)
06:22:54*kssreeram quit (Read error: Connection reset by peer)
06:35:39*endragor_ quit (Remote host closed the connection)
06:36:09*endragor joined #nim
06:43:14*filcuc joined #nim
06:48:45*endragor quit (Remote host closed the connection)
06:50:19*Demon_Fox quit (Quit: Leaving)
06:59:32*pafmaf joined #nim
07:02:18*Gonzih quit (Read error: Connection reset by peer)
07:06:03*Gonzih joined #nim
07:10:25*Arrrr joined #nim
07:19:20*gokr joined #nim
07:24:42cheatfateAraq, are you slept?
07:24:58Araqhey
07:26:04cheatfateJust want to ask what with my ioselectors.nim pr?
07:33:53*PMunch joined #nim
07:35:28*yglukhov joined #nim
07:37:48*ftsf_ joined #nim
07:37:52Araqcheatfate: looks good
07:37:59Araqhi ftsf_ welcome
07:38:02ftsf_o/ just looking at nim, looks great! =)
07:38:22ftsf_might try my next game in nim
07:40:37Araqtry Nim's Unreal Engine 4 wrapper ;-)
07:41:22*tautologico quit (Quit: Connection closed for inactivity)
07:42:20ftsf_Araq, hmm looking at the SDL2 wrapper
07:42:53PMunchftsf_, the SDL2 wrapper also have this little thing: github.com/brechtm/nim-sdl-template
07:43:05PMunchI'm trying it out right now to see how well/if it works
07:43:16ftsf_thanks
07:44:13cheatfateAraq, it looks good, but not accepted yet :(
07:46:34*filcuc quit (Ping timeout: 260 seconds)
07:46:53*filcuc joined #nim
07:47:58PMunchAraq the UE4 wrapper looks interesting
07:49:22veganskAraq, hi! You was definitly right about penalty in typeRel. I changed assignment to +=. Was it the last obstacle to merge the PR?
07:49:28*endragor joined #nim
07:54:38Araqvegansk: I guess.
07:54:57*endragor quit (Ping timeout: 258 seconds)
07:56:18veganskCool! :-)
08:09:29brechtmPMunch: it builds for OS X and iOS (well, back on nim 0.12), but the codebase seems a bit chaotic. But I think it's a great starting point for a multi-platform (desktop/iOS/Android) game.
08:09:57PMunchYour SDL repo?
08:10:07PMunchI'm trying to get it to work right now actually
08:10:19brechtmPMunch: you're on OS X?
08:10:26PMunchNo, Linux
08:11:05brechtmI haven't tried that.
08:11:12PMunchYou might want to move the android-20 part of the android build thing up to a configuration variable and call it androidTarget or something :)
08:11:37PMunchI'm getting this issue: make: *** No rule to make target 'jni/SDL/src/atomic/SDL_atomic.c', needed by 'obj/local/armeabi/objs/SDL2/src/atomic/SDL_atomic.o'. Stop.
08:11:59PMunchWhich is weird. Is that an extra package I need on top of SDL2?
08:12:21brechtmPMunch: I have no idea.
08:12:48brechtmJNI rings a bell though...
08:13:08brechtmPMunch: you've got the Android SDK installed?
08:14:05brechtmPMunch: you need to set some paths in nakefile.nim
08:14:32PMunchYes I've got it installed and set up correctly
08:14:59PMunchlet androidSdk = "~/Libraries/android-sdk-linux"
08:15:27brechtmI gotta start working, so I can't look into it ATM. I should have some time for it this week though.
08:17:04PMunchNice :)
08:17:25PMunchMight have it sorted by then. I should probably get back to work as well :P
08:18:32*desophos quit (Read error: Connection reset by peer)
08:20:10veganskcheatfate, congratulations :-) nice api
08:20:55cheatfatevegansk, thanks :)
08:39:58ftsf_do you find the case/underscore insensitivity causes any issues when working with nim? it scares me a little
08:40:04ftsf_especially the underscore thing
08:43:45*Trustable joined #nim
08:44:31veganskftsf_, no. It just kills the holy wars about naming style :-)
08:45:09ftsf_hmm is it possible to make it throw an error if you use the same identifier with a different case/underscoreness?
08:45:17ftsf_I can see myself getting very confused
08:46:00PMunchWait, Nim treats SomeVariable the same as some_variable?
08:47:39veganskPMunch, no!
08:47:40ftsf_https://github.com/nim-lang/Nim/wiki/unofficial-faq#why-is-it-caseunderscore-insensitive
08:47:50ftsf_vegansk, no?
08:47:53veganskFirst character is case sensitive
08:47:57ftsf_oh
08:48:18veganskSo you can have type Data and variable data
08:48:29PMunchOh, that makes sense :)
08:48:41ftsf_but DATA is the same as Data, and DaTa and different to data and dATA etc
08:49:47veganskftsf_, yes
08:50:36PMunchAnd Da_ta is also the same?
08:50:51ftsf_same as Data by the sounds of it
08:51:12veganskBut it's better to use the different names then the different cases for identifiers
08:51:20PMunchsomeVariable == some_variable
08:51:29ftsf_yeah...
08:51:29*endragor joined #nim
08:51:32veganskPMunch, yes
08:52:02ftsf_would prefer if it threw an error rather than silently treating them the same. but i'll see how it goes
08:55:13*brechtm_ joined #nim
08:55:16PMunchThe wiki page actually has some good reasoning as to why it's a good choice
08:55:37*endragor quit (Ping timeout: 244 seconds)
08:55:54PMunchAnd it also makes it easier to use other libraries from someone who subscribes to a different style without having a mix in your own project, which is nice
08:55:57veganskftsf_, it was a pain in the ... when I needed to use libraries with different styles in c/c++. If you want to save your style in your code, you need to write wrappers. It's not a problem with Nim
08:56:15PMunch^ exactly
08:56:50PMunchJust out of curiosity, what style does people here subscribe to?
08:58:19*brechtm quit (Ping timeout: 260 seconds)
09:00:41ftsf_vegansk, okay, cool
09:00:46ftsf_i'll keep an open mind
09:01:37ftsf_can i pass nil as a null pointer?
09:03:27EastByteI'm pretty sure you can
09:03:34PMunchYes
09:03:46PMunchI did it recently when working with xlib
09:04:55ftsf_there's a function that takes `center: ptr Point` and I'm passing nil and it's getting a type mismatch
09:06:00PMunchHmm, that's strange
09:06:08ftsf_https://gist.github.com/ftsf/4aa7676d4ddb261a70b357cae309eb14
09:06:09PMunchYou ould always try to cast it
09:06:47EastByteso nil doesn't implicitly cast to any pointer?
09:06:56ftsf_ohh
09:07:00ftsf_the nil was fine
09:07:06ftsf_it was a problem with the Rect being a let, not a var
09:07:19EastBytehaha, that happens to me all the time
09:07:38PMunchAaah
09:07:47PMunchIt's a bit annoying the way Nim reports those errors
09:07:54ftsf_*nods*
09:08:15PMunchEven if you write a converter function it doesnt' do the conversion before it prints out the error..
09:08:53PMunchAraq, would it be possible to improve this error message?
09:10:25*coffeepot joined #nim
09:15:15ftsf_hurrah, I have an SDL canvas that I can draw to and scale up to screen \o/
09:16:09PMunchWooo!
09:16:31PMunchftsf_, you might want to have a look at hookrace.net where he builds a little game in SDL
09:16:48PMunchhttps://hookrace.net/blog/writing-a-2d-platform-game-in-nim-with-sdl2/
09:17:00ftsf_thanks
09:17:13ftsf_i think i should be pretty good from here on
09:17:26ftsf_just need to figure out how to adapt the stuff from c/c++ to nim
09:19:54ftsf_what's the difference between int and cint?
09:21:02EastBytecint represents an int in C
09:21:18EastByteint and cint might not have the same size
09:21:21ftsf_ahh
09:25:56PMunchhttps://github.com/nim-lang/Nim/issues/4416
09:26:14gokrSpry ended up on HN again :)
09:26:23PMunchI created an issue for the error message :)
09:30:29coffeepotPMunch that and also does anyone mind that var params aren't listed as such in type mismatches?
09:31:07PMunchHmm, haven't really used vars. Care to show an example?
09:31:44coffeepotok, just a sec
09:32:07*kssreeram joined #nim
09:33:47coffeepotha!
09:34:11coffeepotwell it appears it HAS been changed and I haven't had that error since the update
09:34:18coffeepotbecause it does mention vars now :D
09:35:34coffeepoti meant as in if you have a proc foo(a: var int) for example and you pass it a const or literal, I'm sure it used to not mention that the param was var
09:35:38coffeepotso it could get confusing
09:36:13coffeepotespecially with a lot of params. It lists var now so I have no complaints now :)
09:36:35*endragor joined #nim
09:37:36coffeepotwhile I'm here though, I'm learning how to do macros
09:37:50coffeepotis it possible to use macros to make a type?
09:38:30coffeepotI tried it but I just get undeclared identifier when I try to use it :/
09:39:02PMunchHmm, I think that should be possible. If my understanding of macros are correct.
09:39:22PMunchYou must make sure the macro is run before your code needs the type obviously
09:39:25coffeepotI was hoping I could do a macro to create the "type X = object" and 'copy' the field definitions from another object
09:39:34coffeepotyeah, i think thats my problem :/
09:39:57coffeepotis there a way to display the output from a macro, like dumptree?
09:40:33coffeepotall I can tell is that the compiler is 'ok' with the macro, but not what it's actually ending up with
09:41:48coffeepotis it only possible to do compiletime macros if you don't pass it typed parameters?
09:42:58*ftsf_ quit (Quit: :q!)
09:43:01PMunchYes I think all macros are compiletime
09:43:04flyxcoffeepot: you can echo result.repr at the end of the macro
09:43:18coffeepotflyx cheers, will try that :)
09:44:54flyxcoffeepot: typed parameters will be resolved before they pass into the macro, i.e. if you pass `foo` to the macro, `foo` must resolve to a symbol in the context where the macro is called. It will be a Sym in the macro. if it is untyped, it does not need to be resolved and will be an Ident in the macro.
09:45:19flyxbut the macro will always be executed at compile time
09:46:01coffeepotflyx: ok that makes sense :)
09:46:35*endragor quit (Remote host closed the connection)
09:46:45flyxresult.repr outputs Nim source for easier reading. there's also result.treeRepr which displays the generated AST
09:47:47coffeepotthat's awesome. I was trying to pass the macro to astToStr or repr but it wasn't working, didn't think to try outputting inside the macro :)
09:49:33*Gonzih quit (Quit: WeeChat 1.5)
09:50:22*Gonzih joined #nim
09:53:24*endragor joined #nim
09:57:14*gokr quit (Ping timeout: 260 seconds)
10:01:30coffeepotsilly question, you can do let assignment in a loop, right?
10:10:44*pancake__ joined #nim
10:10:59pancake__how can i use a type from a different .nim file=
10:12:00pancake__https://gist.github.com/trufae/b67656d8ede650b88343a8039cdc5b67
10:12:07veganskpancake_, http://nim-lang.org/docs/manual.html#modules-import-statement
10:12:27veganskR2PipeHttp* = object
10:12:32pancake__import -> include ?
10:12:44pancake__yeah seems to work
10:16:07coffeepotinclude stuffs the code you import into your source, only really useful for splitting up large modules
10:16:26pancake__well it works for my use case
10:16:54coffeepotinclude is like a text copy
10:17:30coffeepotgood you got it working tho :)
10:17:50PMunchcoffeepot, let is compiletime. So not too sure about loops
10:18:08pancake__but its clearly not the way to go for the final implementation
10:18:11*pafmaf quit (Read error: Connection reset by peer)
10:18:11*pafmaf joined #nim
10:18:12PMunchI guess if the loop is run on compiletime it should work
10:19:08coffeepotPMunch it *seems* to work in a loop! Compiler doesn't complain anyway
10:19:08*kssreeram quit (Read error: Connection reset by peer)
10:19:11flyxcoffeepot, PMunch: let is not compiletime and can be used in a loop. const is compiletime
10:19:31PMunchOh right, my bad
10:19:37PMunchI was thinking of const
10:20:03*pancake__ quit (Quit: leaving)
10:20:07coffeepotflyx cheers. I'm just using it to save some typing with all the 'newNimNode's :)
10:21:43flyxcoffeepot: be aware that there are some helper functions in macros.nim to generate NimNodes more easily. also, for larger portions of code, you can use the `do` notation.
10:23:20coffeepotyes though interestingly there only seems to be helpers for some node types
10:23:52coffeepotdebugging them is kinda difficult. I got a message about child missing but hard to work out where without line numbers!
10:24:11coffeepotthis is my first try though to be fair
10:24:41flyxyeah, it's definitely not easy
10:25:16coffeepothas anyone made a DSL for macros? Or is that too meta-meta
10:26:02flyxthat would indeed be very meta
10:26:11coffeepot:)
10:26:35flyxbut `quote do:` seems to come close to it
10:28:15*pafmaf quit (Read error: Connection reset by peer)
10:28:15*pafmaf joined #nim
10:32:08*fredrik92 joined #nim
10:36:20coffeepotnot quite sure I understand what the do notation is doing
10:36:29coffeepotor how to use it
10:37:04coffeepotis it just taking a list of statements and passing it in as a macro param?
10:37:24*bjz joined #nim
10:39:27*arnetheduck quit (Ping timeout: 264 seconds)
10:40:49*kssreeram joined #nim
10:44:49*brechtm_ quit (Remote host closed the connection)
10:48:08*bjz_ joined #nim
10:49:46*bjz quit (Ping timeout: 252 seconds)
10:50:51*abruanese quit (Ping timeout: 240 seconds)
10:53:27*abruanese joined #nim
10:54:51*pafmaf quit (Quit: Leaving)
10:57:09*euantor joined #nim
11:06:39*kssreeram quit (Ping timeout: 260 seconds)
11:09:23*kssreeram joined #nim
11:19:17Arrrrit is passed as 'untyped'
11:19:56*ftsf joined #nim
11:31:09*abruanese quit (Ping timeout: 260 seconds)
11:32:19*abruanese joined #nim
11:37:34*filcuc quit (Ping timeout: 260 seconds)
11:39:02*Arrrr_ joined #nim
11:42:03*Arrrr quit (Ping timeout: 276 seconds)
11:42:58*brechtm joined #nim
11:49:39*bjz joined #nim
11:51:12*bjz_ quit (Ping timeout: 260 seconds)
11:57:56*filcuc joined #nim
12:11:15*Arrrr_ quit (Read error: Connection reset by peer)
12:11:31*yglukhov quit (Ping timeout: 240 seconds)
12:18:12PMunchbrechtm, I figured out the SDL errors I was getting
12:18:35PMunchI had installed the dynamic runtime version from my package manager and not the source files
12:19:04brechtmPMunch: ah... and the Android build works now? Because I haven't tried that yet.
12:19:13PMunchWell, not quite
12:19:17PMunchI'm getting some other errors
12:19:32brechtmoh well, computers, eh? :-)
12:19:37PMunchjni/SDL/src/dynapi/SDL_dynapi_procs.h:222: error: undefined reference to 'SDL_GetBasePath_REAL
12:19:39PMunchYeah
12:19:49PMunchI'll see if I can sort them out though
12:34:03*kssreeram quit (Ping timeout: 264 seconds)
12:40:18PMunchbrechtm, which SDL version are you using?
12:42:45brechtmPMunch: SDL2-2.0.4
12:44:19brechtmPMunch: can you get it building for Linux (as in not Android)?
12:50:21PMunchIs that the default target?
12:51:38PMunchSDL2-2.0.4 complained about the SDL_GetBasePath_REAL thing I mentioned earlier when building for Android. Going back to 2.0.3 seems to have "fixed" that but I'm still having issues..
12:51:47PMunchSpecifically the logging functions complains
12:54:06PMunchbrechtm, the nakefile doesn't appear to have a buildtarget for Linux. Only Mac, iOS and Linux
12:54:21PMunchI'll add one and PR it to you when I get off work
13:05:21PMunchI'm getting a strange error:
13:05:38PMuncherror: format not a string literal and no format arguments [-Werror=format-security]
13:05:38PMunch __android_log_print(ANDROID_LOG_INFO, "NIM_APP", a0);
13:05:58PMunchAnd that is from Nim code which is compiled down to this C code:
13:06:01*yglukhov joined #nim
13:06:20PMunchN_NIMCALL(void, droidlogimported_741003_2231592625)(NCSTRING a0) { __android_log_print(ANDROID_LOG_INFO, "NIM_APP", a0);}
13:06:35PMunchIs NCSTRING not a string literal?
13:10:55*kssreeram joined #nim
13:13:49*yglukhov quit (Remote host closed the connection)
13:14:22*yglukhov joined #nim
13:19:39*kssreeram quit (Read error: Connection reset by peer)
13:24:43PMunchIt seems like that's the only thing that holds back the wrapper from working for Android. It spits out a bunch of warnings but it compiles fine.
13:33:23PMunchbrechtm, I was able to build the app for Linux by simply running "nim c --noMain main.nim"
13:34:59PMunchBut that's probably using the shared version of SDL
13:43:01*kssreeram joined #nim
13:44:15*kssreeram quit (Client Quit)
13:54:32*rolha joined #nim
13:54:41rolhahi everyone
13:55:36rolhaI'm using this html5 canvas code, and whilst everything works fine, the fillStyle is not changed (it's always black) is there anything obviously wrong with this snippet? https://github.com/ruivieira/nim-canvas/blob/master/canvas.nim#L20
13:56:07*saml joined #nim
13:57:05rolhaI'm calling it with an hex RBG, e.g. ctx.fillStyle("#FF0000")
14:14:39*pregressive joined #nim
14:22:19*kssreeram joined #nim
14:29:21*nsf quit (Quit: WeeChat 1.5)
14:35:56*namnguyen joined #nim
14:36:10*kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:40:20*GangstaCat quit (Quit: Leaving)
14:44:02*kssreeram joined #nim
14:44:46*kssreeram quit (Client Quit)
14:46:50zdsWhat is the current best practice for calling a nim function from within a Python 2 module?
14:49:40PMunchBest practice is probably not to do it.. But if you must I think using some kind of C FFI would be your best bet
14:50:44*gokr joined #nim
14:51:09zdsHm, ok. Why is best practice not to do it? It seems like a relatively sensible way to implement optimized inner loops in a Python codebase.
14:52:04PMunchHmm, that's true I guess.
14:52:32PMunchBut it's still a bit hacky
14:52:42PMunchI don't think there's anything wrong with it apart from that
14:54:55PMunchdocs.python.org/2/extending/extending.html
14:54:56PMunchThat would probably be of interest
14:55:07PMunchgithub.com/nim-lang/python/tree/master/examples
14:55:07PMunchgithub.com/nim-lang/python
14:55:07PMunchAnd that would be what you need to create the bindings as seen in the Python wiki in Nim
14:55:46zdsYes I saw that... But that seems to be going in the opposite direction, calling Python from Nim.
14:56:26zdsThese look like calling Nim from Python: http://akehrer.github.io/posts/connecting-nim-to-python/, https://github.com/jboy/nim-pymod
14:57:12PMunchWell the examples there might do
14:57:32PMunchBut the wrapper is around python.h I think. But I might be wrong
14:59:28PMunchSo by installing that wrapper and following the Python guide on integrating with C you should be able to use Nim instead of C
15:01:57PMunchzds, looking at the first link you supplied. What he's doing there is creating a .dll (or .so on Linux (maybe OSX as well)) and then calling that from Python
15:02:48zdsYes... Seems relatively straightforward
15:02:57PMunchWhich certainly works, but it could be that doing it the way the python guide explains is faster.
15:03:38zdsOk, I'll read that too. Thanks
15:05:02PMunchBasically what that does is to convert Python types to C types and doing a DLL call. The other method passes the Python types directly and in Nim you import a header explaining these types. Doing it the latter way will probably save a little time by not having to convert types, something which might matter if it's performance you're aiming for (and I'm guessing it is since you wanted to optimize an inner loop).
15:07:18PMunchYou should probably run the entire loop in Nim by the way
15:08:26PMunchNot sure how "pricey" calls to C from Python is but you'd probably get better performance if Nim/C was able to handle the loop itself. Just pass in the loop conditions along with data and expect a result, then implement the entire loop in Nim.
15:16:26*xet7 quit (Quit: Leaving)
15:21:00*yglukhov_ joined #nim
15:21:35*ics joined #nim
15:25:04*yglukhov quit (Ping timeout: 260 seconds)
15:25:22*yglukhov_ quit (Ping timeout: 258 seconds)
15:34:37coffeepothow can I iterated through the fields of an object passed to a macro?
15:34:46coffeepotiterate
15:37:02*PMunch quit (Quit: leaving)
15:38:07*PMunch joined #nim
15:39:01*PMunch quit (Client Quit)
15:45:36*yglukhov joined #nim
15:47:51*brson joined #nim
15:49:50*yglukhov quit (Ping timeout: 244 seconds)
15:50:59*pafmaf joined #nim
15:53:58*yglukhov joined #nim
16:02:45*Jesin quit (Ping timeout: 244 seconds)
16:04:03*yglukhov quit (Remote host closed the connection)
16:04:03*Jesin joined #nim
16:05:31*Jesin quit (Remote host closed the connection)
16:08:50*Jesin joined #nim
16:09:51*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:14:48*euantor quit (Read error: Connection reset by peer)
16:18:31*yglukhov joined #nim
16:18:40*Demon_Fox joined #nim
16:22:20*filcuc quit (Read error: Connection reset by peer)
16:25:57*PMunch joined #nim
16:40:16*elrood joined #nim
16:44:19*euantor joined #nim
16:48:05*nsf joined #nim
16:53:55*euantor quit (Remote host closed the connection)
16:55:45*euantor joined #nim
17:02:30*euantor quit (Remote host closed the connection)
17:14:15*fredrik92 quit (Ping timeout: 246 seconds)
17:14:51*fredrik92 joined #nim
17:25:07*ics quit (Quit: Connection closed for inactivity)
17:28:49*brechtm quit (Remote host closed the connection)
17:29:40*euantor joined #nim
17:36:10*endragor quit ()
17:37:46*kssreeram joined #nim
17:39:02*kssreeram quit (Client Quit)
17:51:02*euantor quit ()
17:55:57*yglukhov quit (Remote host closed the connection)
17:57:27*yglukhov joined #nim
17:58:59*KaiXBerg joined #nim
18:04:19*yglukhov quit (Remote host closed the connection)
18:05:16*rolha quit (Read error: Connection reset by peer)
18:08:03*algoban joined #nim
18:10:28*rolha joined #nim
18:11:01*Matthias247 joined #nim
18:15:03*TheLemonMan joined #nim
18:18:44*yglukhov joined #nim
18:19:16*benwbooth joined #nim
18:24:53chrishellerzds: take a look at https://github.com/jboy/nim-pymod
18:25:26chrishellerThat does most of the work for wrapping Nim code into a Python module for you.
18:25:49zdsYup - I linked it up there. Seems like the least painful way through. Is the overhead very bad?
18:26:27chrishellerAh sorry. Missed that.
18:28:02*kssreeram joined #nim
18:28:47*yglukhov quit (Remote host closed the connection)
18:31:21chrishellerIt doesn't seem to be, although we haven't used it for anything that required lots of hops back and forth.
18:32:08chrishellerLike PMunch said, you probably don't want to have a tight loop that is performance critical that is jumping back and forth between Python and Nim
18:32:26*shodan45 joined #nim
18:32:55chrishellerBut that is just good general advice for mixing most languages; nothing specific to Nim and Python
18:41:13zdssure, that makes a lot of sense
18:41:23zdsi think the barriers would be pretty simple in my case
18:45:20shodan45I just filled out the survey.... and realized I've been at least "following" Nim for a fairly long time, about 2 years
18:45:36shodan45stupid time going by too fast
18:47:01*brechtm joined #nim
18:55:45*rolha quit (Ping timeout: 246 seconds)
18:58:05*fredrik92 quit (Quit: Shutting down...)
18:58:26*desophos joined #nim
18:59:41*kssreeram quit (Max SendQ exceeded)
19:03:16*fredrik92 joined #nim
19:05:33*kssreeram joined #nim
19:07:27*couven92 joined #nim
19:09:14*fredrik92 quit (Disconnected by services)
19:09:37*fredrik92 joined #nim
19:10:44*fredrik92 quit (Client Quit)
19:11:06*couven92 is now known as fredrik92
19:18:39*yglukhov joined #nim
19:20:24*PMunch quit (Quit: leaving)
19:21:32*rolha joined #nim
19:21:32*PMunch joined #nim
19:22:42*yglukhov quit (Ping timeout: 244 seconds)
19:28:17*fredrik92 quit (Read error: Connection reset by peer)
19:29:59*fredrik92 joined #nim
19:30:18*yglukhov joined #nim
19:30:46*fredrik92 quit (Read error: Connection reset by peer)
19:34:45*fredrik92 joined #nim
19:37:51*abruanese quit (Ping timeout: 276 seconds)
19:41:01*brechtm_ joined #nim
19:44:51*brechtm quit (Ping timeout: 264 seconds)
19:45:35*brechtm_ quit (Ping timeout: 244 seconds)
19:46:25*brechtm joined #nim
19:48:32*brechtm quit (Read error: Connection reset by peer)
19:48:37*brechtm_ joined #nim
19:53:28*brechtm joined #nim
19:53:51*chrisheller quit (Remote host closed the connection)
19:57:21*brechtm_ quit (Ping timeout: 276 seconds)
20:06:30*kssreeram quit (Read error: Connection reset by peer)
20:12:54*benwboot_ joined #nim
20:12:58*yglukhov quit (Remote host closed the connection)
20:15:02*kssreeram joined #nim
20:16:04*benwbooth quit (Ping timeout: 264 seconds)
20:16:48*edub4rt joined #nim
20:18:03*pafmaf quit (Quit: Leaving)
20:18:52*yglukhov joined #nim
20:19:29*benwbooth joined #nim
20:22:18*benwboot_ quit (Ping timeout: 272 seconds)
20:25:51*kssreeram quit (Read error: No route to host)
20:31:11PMunchHi everyone!
20:31:34PMunchStill having some trouble with compiling this Android/SDL thing
20:32:08PMunchGot some help over in #SDL (shoutout to slvn), so those errors are sorted out
20:33:29PMunchBut I'm having some trouble with this file: github.com/PMunch/nim-sdl-template/blob/master/src/nimx/logging.nim
20:33:57PMunchThe C compiler is complaining:
20:33:59PMuncherror: format not a string literal and no format arguments [-Werror=format-security]
20:33:59PMunch __android_log_print(ANDROID_LOG_INFO, "NIM_APP", a0);
20:34:09PMunchMaybe you have any hints yglukhov?
20:34:42PMunchbrechtm, hi I've fixed the SDL issues I was having with the template project :)
20:36:31yglukhovPMunch: are you building with naketools?
20:36:43yglukhovnimx.naketools?
20:37:02PMunchI'm running "nake droid"
20:37:08PMunchFrom the base of that repo
20:37:19yglukhovok, that should work... give me a second
20:37:49PMunchyglukhov, keep in mind that this is your older "nim-sdl-template"
20:38:11yglukhovah.. have you tried nimx one?
20:38:28brechtmPMunch: good to hear that
20:38:32PMunchNot yet
20:38:41brechtmyglukhov: hi... i've played with num-sdl-template before
20:38:50PMunchI tried to copy in just the android part of the nimx logger
20:39:50*J3RN left #nim ("WeeChat 1.5")
20:40:42yglukhovPMunch: well, that probably should be fixed by adding format in from of a0
20:41:00brechtmyglukhov: I didn't move to the new nimx, since that seems to be GUI framework instead of a game framework
20:41:10yglukhovnot sure why it happens though. i guess you have some different cc options
20:41:13brechtmyglukhov: is that a correct?
20:42:20brechtmyglukhov: and thanks for nim-sdl-template... it saved me a lot of time figuring things out.
20:42:43PMunchyglukhov, I think it might be some new cc options for SDL
20:43:13yglukhovbrechtm: well... since it's a hardware accelerated gui framework (is it really a framework? =)), you can definitely use it for games ;) moreover, we're currently working on a commercial game based on nimx (ui/events/porting layer) and rod (2d/3d scene-graph engine)
20:43:37yglukhovPMunch: ok, just try add "%s" before a0
20:43:50PMunchI replaced the function with this: hastebin.com/mafiyadeli.py
20:44:00PMunchNow it appears to work
20:45:13yglukhovPMunch what was it before then? =)
20:45:46PMunchhastebin.com/vuxifoliri.py
20:46:15yglukhovPMunch: you forgot to backtick a
20:46:18yglukhov`a`
20:47:10PMunchRight you are
20:47:16PMunchStill worked with the backticks though
20:50:24yglukhovPMunch, fyi, nimx is getting a lot further with everything, and it is actively maintained. I would suggest switching to it. There's already a lot of useful features there. Like cross render-to-image, subpixel antialiased fonts, etc. Also its as crossplatform as it can get. android, ios, macos, linux, windows, js, asm.js, you name it =)
20:50:24*brechtm_ joined #nim
20:50:53PMunchAnd it's game friendly?
20:51:02gokroh my. Iceland just shot England out of the Euro!
20:51:03PMunchBecause that's what I'm planning on using it for
20:51:10gokrSorry for the offtopic, but ... damn.
20:51:13PMunchgokr, what? Really?
20:51:17gokrYup! 2-1
20:51:30yglukhovPMunch, it is much more friendly to games than sdl =))
20:51:36gokrI read somewhere that 8% of the Iceland population is in France to watch the games ;)
20:52:09PMunchgokr, yeah I read that as well :P
20:52:11yglukhovjust, subclass a View, and override draw method, and you can use gl there just fine
20:52:19PMunchyglukhov, I think I'll give it a try then
20:52:29gokrPMunch: Gaming? I presume you are aware of Urhonimo too.
20:52:34namnguyenyglukhov, how is it compared to, say, cocos2d-x?
20:52:59yglukhovPMunch: if you use currentContext().gl (defined in portable_gl) you're getting js compatibility for free
20:53:51*brechtm quit (Ping timeout: 264 seconds)
20:53:58PMunchgokr, I haven't heard of it no. But I think SDL/OpenGL combo would be better
20:54:44PMunchBut I'll definitely check it out
20:55:36gokrhttps://github.com/3dicc/Urhonimo
20:55:41yglukhovnamnguyen: nimx can not be compared to cocos, because it's not a game engine. it is more of a porting layer that also happens to offer views system and some basic primitives for drawing. for a game engine there's rod, which is based on nimx, and offers scene-graph model to work with.
20:56:23yglukhovPMunch: Urchonimo is a full-blown engine, which can not seriously be compared to sdl/opengl. the downside of it - it is c++ =))
20:56:48PMunchWell, since I'm going to use Nim that's not much of a problem for me :)
20:57:19*kssreeram joined #nim
20:57:48PMunchI have no problem with doing some low level stuff. Used LibGDX for a while but writing something in Nim seems like fun :)
20:58:03yglukhovgokr: do you happen to be an Urchonimo contributor by any chance? since it's not the first time you're advirtising it =)
20:58:26gokrSorry, I just want people to know about it.
20:58:34gokrIt was me and Araq who made it
20:58:50yglukhovyou mean the bindings, right?
20:58:57*rolha quit (Ping timeout: 244 seconds)
20:59:11gokrYeah, no I haven't contributed to Urho3D itself.
20:59:48*brechtm_ quit (Remote host closed the connection)
20:59:49gokrWe used Urhonimo at 3DICC and it worked great - but for other reasons that project is on hold.
21:00:00yglukhovok. if anyone involved with game engines here, please note, that we're looking for help (read: hiring) =)
21:00:29gokrDrop over to #urho3d and talk to some people there.
21:01:10yglukhovyou think they would be excited with a chance to use nim? =)
21:01:38PMunchyglukhov, give me a year to finish my masters and I'm interested :P
21:01:39gokrCould be
21:02:03gokryglukhov: What kind of stuff are you doing? Games?
21:02:28yglukhovGame. without 's'. yet
21:02:52yglukhovbackend stuff is also there. based on jester
21:03:01*desophos quit (Remote host closed the connection)
21:03:07gokrIMHO Urho3D is ... a very good engine. And I am not sure all of that is ... practical to reimplement.
21:03:22gokrI mean things like Bullet, etc etc.
21:03:27yglukhovi know, you already told that to me ;)
21:03:36gokrSorry :)
21:03:53yglukhovbut you can't argue thats a lot of fun
21:04:03gokrBut I am all for it of course - I just would hesitate myself.
21:04:26*rolha joined #nim
21:04:53gokrExact! And I am all for fun stuff.
21:04:53yglukhovgokr: there's an autobuilt live demo of the editor: http://yglukhov.github.io/rod/livedemo/main.html
21:05:01yglukhovupdated with every push to master =)
21:05:19*KaiXBerg quit (Quit: Page closed)
21:05:46*desophos joined #nim
21:05:48yglukhovso, as you (hopefully) may see, we're making some progress...
21:06:02*chrisheller joined #nim
21:06:06*chrisheller quit (Remote host closed the connection)
21:06:06gokryglukhov: Fun!
21:06:22*chrisheller joined #nim
21:06:43namnguyenyglukhov, what am i seeing on that page?
21:09:16yglukhovnamnguyen: it is rod editor. you can add nodes to the graph and put some components on them. unfortunately we did not yet care to implement file loading in the editor in js version. you can load sprites and collada meshes and animations (including skeletal) from collada or after-effects, but only in the native version for now.
21:09:43yglukhovthe engine itself of course supports loading all this stuff in a cross-platform manner includeing js and asm.js
21:10:05namnguyenoh cool
21:10:14*elrood quit (Quit: Leaving)
21:10:24namnguyeni'm not sure if it is my browser, or something, but the click doesn't seem to be very accurate
21:10:38namnguyenlike, i clicked on the small arrows, but nothing happened
21:10:50*desophos quit (Remote host closed the connection)
21:10:55yglukhovoh right, they don't work yet, sorry =)
21:11:25namnguyenthat is way cool though.
21:11:30namnguyenone code base for all platforms.
21:11:31yglukhovyou can try drag the values on non-focused numeric fields
21:11:41yglukhovindeed
21:12:39yglukhovthose numeric fields i just reimplemented a couple of days ago, and the still need some tuning =)
21:14:45*GangstaCat joined #nim
21:18:24*yglukhov quit (Remote host closed the connection)
21:21:40*yglukhov joined #nim
21:34:30PMunchHmm, in the nimx readme it explains how to compile on Unix and Windows. But how do you compile for other targets than the working machine?
21:34:45PMunch(Note I haven't actually downloaded it, just looking around on GitHub)
21:34:49PMunchyglukhov, ^
21:35:05*pregressive quit (Remote host closed the connection)
21:35:39yglukhovpmunch: nake js, nake ios, nake ios-sim, nake droid
21:36:09yglukhovalso nake -d:emscripten
21:36:15PMunchOh, I looked in the nakefile and it have non of those targets :S
21:36:22yglukhovif you've got emcc in yout PATH
21:36:30yglukhovit import nimx.naketools
21:36:36yglukhov*imports
21:36:46PMunchAah, silly me
21:41:01*desophos joined #nim
22:03:26*arnetheduck joined #nim
22:04:50*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
22:10:48*desophos quit (Remote host closed the connection)
22:13:54*algoban quit (Remote host closed the connection)
22:18:08*desophos joined #nim
22:24:00*fredrik92 quit (Ping timeout: 246 seconds)
22:25:20*fredrik92 joined #nim
22:31:42*desophos quit (Remote host closed the connection)
22:33:02*desophos joined #nim
22:41:31*rolha quit (Ping timeout: 240 seconds)
22:48:14*Trustable quit (Remote host closed the connection)
22:58:40*gokr quit (Ping timeout: 250 seconds)
23:00:55*Matthias247 quit (Read error: Connection reset by peer)
23:13:11*benwbooth quit (Ping timeout: 240 seconds)
23:14:39*benwbooth joined #nim
23:20:12Araqhey guys, anything that needs my attention?
23:24:35*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:27:30yglukhovAraq: nothing serious but mind looking at https://github.com/nim-lang/Nim/pull/4420
23:27:31yglukhov?
23:28:55*PMunch quit (Quit: leaving)
23:29:41Araqneeds tests and docs
23:41:21*pregressive joined #nim