<< 19-11-2015 >>

00:01:09*desophos quit (Remote host closed the connection)
00:04:27*desophos joined #nim
00:05:03*pregressive quit (Remote host closed the connection)
00:05:30*andrewvos quit (Ping timeout: 260 seconds)
00:08:17desophosBlueProtoman: reading more about Ash now; i feel like progressing on my game now (writing an ECS for it) is pretty useless if Nim is going to have an ECS like Ash soon :P
00:08:26desophosso, no time like the present to start!
00:08:54BlueProtomandesophos: Wanna help me write the thing? I ain't spreading the good word for my own health
00:09:25desophosindeed i do, my only concern is that i might not be able to help very much
00:09:44desophos(limited by proficiency)
00:10:02BlueProtomanWell, that makes two of us; that's basically why I'm starting with a Box2D port
00:10:19BlueProtomanAs for ECS, it's not that hard. Just play around with some framework in another language a bit, you'll see its benefits
00:14:35*kniteli joined #nim
00:28:40jckWhy can't I specify --cpu and --os in config.nims ?
00:32:50desophosBlueProtoman: next up: port ReactiveX to Nim :p
00:33:03desophosnow that takes some skill
00:33:14BlueProtomandesophos: I don't get it
00:33:31desophoshttp://reactivex.io/
00:33:40desophoswas just looking into FRP
00:34:16desophosafter reading http://lambdor.net/?p=171
00:34:28desophostrying to find some real examples now
00:36:18desophosit's complex enough that understanding the ideas isn't enough
00:39:57gmpreussner|workoh, reactivex looks interesting. thanks for the link
00:41:02desophosit seems like it would be quite difficult to implement FRP from scratch
00:41:16gmpreussner|worki've been fantasizing about a game engine with event stream processing :)
00:43:43desophosreactivex seems difficult enough to use, let alone write :p
00:47:07BlueProtomangmpreussner|work: What is that, exactly?
00:49:29desophosidk if i'm smart enough to write a game using FRP :/
00:49:30gmpreussner|workhttps://en.wikipedia.org/wiki/Event_stream_processing
00:49:56*yglukhov quit (Remote host closed the connection)
00:51:00desophoswow this looks good https://www.manning.com/books/functional-reactive-programming
00:53:53desophosWOW not a day too soon! "The book will be Deal of the Day November 19th." http://blog.reactiveprogramming.org/?p=183
00:54:01desophosTOMORROW
00:55:25BlueProtomanAlso, how do I wrap both a C type and a global instance of this C type?
00:55:57gmpreussner|workdesophos: nice :)
00:59:56desophosseems like reactivex has been widely adopted to the point that the only books on safari books are reactivex tutorials -_-
01:00:05desophosor react.js
01:00:29BlueProtomanWait, I thought react.js was a GUI framework?
01:02:01desophosreactive GUI :p
01:02:20desophosFRP is definitely something i don't want to reinvent the wheel on
01:04:15*jaco60 quit (Ping timeout: 240 seconds)
01:04:23desophosbbl
01:04:45*desophos quit (Remote host closed the connection)
01:23:46*julian37 quit (Ping timeout: 265 seconds)
01:44:48*desophos joined #nim
01:50:27*yglukhov joined #nim
01:59:15BlueProtomanIs there a good tutorial somewhere on creating bindings for a C++ library?
02:00:25*Demon_Fox joined #nim
02:04:10*brson quit (Quit: leaving)
02:08:02*julian37 joined #nim
02:12:49onionhammerBlueProtoman you could try https://github.com/onionhammer/clibpp
02:13:11*julian37 quit (Ping timeout: 276 seconds)
02:13:27BlueProtomanonionhammer: Doesn't seem to be what I'm looking for. I don't want a tool, I want a tutorial
02:20:53*btbytes joined #nim
02:21:53gunndef-: here?
02:22:13*btbytes quit (Client Quit)
02:23:24*cyraxjoe_ joined #nim
02:23:41*lokulin quit (Ping timeout: 250 seconds)
02:23:42*tymat quit (Ping timeout: 250 seconds)
02:23:44*cyraxjoe quit (Ping timeout: 250 seconds)
02:23:45*rektide_ quit (Ping timeout: 250 seconds)
02:23:47*Amun_Ra quit (Ping timeout: 250 seconds)
02:24:33*Amun_Ra joined #nim
02:24:59*cyraxjoe_ is now known as cyraxjoe
02:25:11*rektide joined #nim
02:25:41*tymat joined #nim
02:29:23*Jehan_ quit (Quit: Leaving)
02:31:18def-gunn: hi
02:32:50gunndef-: hey, I was wondering if the output here is a bigint bug: https://gist.github.com/gunn/9269eaf7ff001485ce5e#file-parallel_factorial-log
02:33:21gunnI'm creating a github issue
02:34:39def-the 0 in line 4 looks wrong indeed
02:34:44*lokulin joined #nim
02:35:56def-If you're interested and fast and non-buggy bigints, there are some gmp wrappers with nice nim interfaces around
02:36:30def-in*
02:40:53gunndef-: cool, do you have a recommendation?
02:41:45gunnissue created: https://github.com/def-/nim-bigints/issues/3
02:42:31def-gunn: https://github.com/FedeOmoto/nim-gmp and https://gist.github.com/rbehrends/91d2b2dee8ebcac08e97
02:47:43gunnthanks
02:55:58*onionhammer quit (Ping timeout: 260 seconds)
03:16:39*desophos_ joined #nim
03:16:39*onionhammer joined #nim
03:17:27def-gunn: good news for me, looks like a nim bug and not a nim-bigints bug
03:21:01def-or maybe i misunderstand the semantics of let
03:21:15*desophos_ quit (Ping timeout: 255 seconds)
03:27:46def-gunn: there we go, should be fixed
03:33:04*julian37 joined #nim
03:38:08*julian37 quit (Ping timeout: 265 seconds)
03:39:23*ephja quit (Ping timeout: 246 seconds)
03:39:35*vendethiel joined #nim
03:39:58*nande quit (Read error: Connection reset by peer)
03:41:25gunndef-: can confirm the test case in the issue works now
03:41:56gunnstill getting very odd results with my factorial code
03:45:00*strcmp2 joined #nim
03:47:48*strcmp1 quit (Ping timeout: 265 seconds)
03:48:05gunnin fact still getting the same output as last time i.e. multiplying to zero
03:51:44def-oh yeah, "total = total * val" doesn't work right now
03:51:56def-total *= val should be fine
03:52:18def-need to make a copy of total for the first case
03:53:05gunndef-: confirmed
03:53:14gunnawesome thank you
03:53:50gunndamn there are some gotchas around though
03:54:03gunnthe let stuff especially
03:54:16def-yes, i consider that a bug that should be fixed in nim
03:54:21def-but it's not easy from what i understand
03:55:09gunnyep
03:59:07*strcmp1 joined #nim
04:02:42*strcmp2 quit (Ping timeout: 260 seconds)
04:03:02*vendethiel quit (Ping timeout: 276 seconds)
04:03:59def-gunn: ok, also fixed
04:04:20def-thanks for testing nim-bigints, as you see not many have used them before
04:07:54*strcmp2 joined #nim
04:09:28*strcmp2 quit (Read error: Connection reset by peer)
04:09:33*strcmp3 joined #nim
04:11:02*strcmp1 quit (Ping timeout: 244 seconds)
04:30:23*strcmp3 quit (Changing host)
04:30:23*strcmp3 joined #nim
04:30:23*strcmp3 quit (Changing host)
04:30:23*strcmp3 joined #nim
04:50:10*darkf joined #nim
04:50:53*strcmp3 quit (Quit: return 0;)
04:51:19*strcmp1 joined #nim
04:57:10*makoLine quit (Ping timeout: 260 seconds)
05:00:01*BlueProtoman quit (Remote host closed the connection)
05:33:58*julian37 joined #nim
05:38:22*julian37 quit (Ping timeout: 260 seconds)
06:10:50*yglukhov quit (Ping timeout: 240 seconds)
06:17:05*desophos_ joined #nim
06:19:56*xtagon joined #nim
06:21:14*desophos_ quit (Ping timeout: 244 seconds)
06:58:48*Matthias247 joined #nim
07:01:43*sunnyawake joined #nim
07:24:01*Matthias247 quit (Read error: Connection reset by peer)
07:28:01*desophos quit (Read error: Connection reset by peer)
07:29:02*yglukhov joined #nim
07:32:23*sunnyawake quit (Quit: Page closed)
07:34:36*julian37 joined #nim
07:36:06*gokr joined #nim
07:39:17*julian37 quit (Ping timeout: 252 seconds)
07:43:11*xtagon quit (Quit: Goodnight)
08:14:14*gokr quit (Ping timeout: 260 seconds)
08:16:14*ibeex joined #nim
08:31:13*Jehan_ joined #nim
08:35:32*gour joined #nim
08:36:03*gokr joined #nim
08:51:23*julian37 joined #nim
08:53:48*Jehan_ quit (Quit: Leaving)
08:56:11*Jehan_ joined #nim
09:15:26*Jehan_ quit (Quit: Leaving)
09:16:33*Jehan_ joined #nim
09:19:22*Jehan_ quit (Client Quit)
09:20:30*Jehan_ joined #nim
09:24:16*Jehan_ quit (Client Quit)
09:29:09*Jehan_ joined #nim
09:33:16*Jehan_ quit (Client Quit)
09:35:44*Jehan_ joined #nim
09:35:58*coffeepot joined #nim
09:37:01yglukhovquick question. i need the name of file where NimNode resides. i need it in a macro. i'm sure, i've already done that a while ago, but can't find it :(
09:38:28yglukhovok, thats lineinfo =)
09:39:33Jehan_yglukhov: NimNode is in system.nim, but it's {.magic.}
09:40:33yglukhovyeah, i mean the ast referred by nimnode.
09:41:25Jehan_Internally, the AST is PNode in ast.nim, line 1619+ or so.
09:43:50coffeepothey guys, do we have a standardised option[T] type yet in the stdlib? I know there was some talk of it a while back.
09:44:29coffeepotjust curious, not in need of it atm, but might use it if it were in the stdlib
09:44:59Jehan_coffeepot: import options (lib/pure/options.nim)
09:46:31coffeepotWheee! Awesome, thanks Jehan_ :)
09:57:28*makoLine joined #nim
10:03:39*Trustable joined #nim
10:13:56*Jehan_ quit (Quit: Leaving)
10:16:25*andrewvos joined #nim
10:24:00*so joined #nim
10:35:15*mindriot101 joined #nim
10:47:52*Demon_Fox quit (Quit: Leaving)
10:55:20*exebook joined #nim
11:01:45*exebook quit (Remote host closed the connection)
11:03:17*makoLine quit (Ping timeout: 250 seconds)
11:11:26*vqrs quit (Ping timeout: 260 seconds)
11:12:47*vqrs joined #nim
11:25:03*kulelu88 joined #nim
11:31:23*strcmp2 joined #nim
11:32:45*strcmp1 quit (Ping timeout: 250 seconds)
11:40:35*ephja joined #nim
11:46:51*strcmp3 joined #nim
11:46:51*strcmp3 quit (Client Quit)
11:47:31*strcmp2 quit (Ping timeout: 252 seconds)
11:47:46*Guest48911isaway is now known as Guest48911
11:53:49*elrood joined #nim
11:59:51*tomes quit (Write error: Broken pipe)
12:00:06*julian37 quit (Remote host closed the connection)
12:00:09*tomes joined #nim
12:00:20*julian37 joined #nim
12:02:49*dngad joined #nim
12:11:41*exebook joined #nim
12:17:05*exebook quit (Remote host closed the connection)
12:17:34*exebook joined #nim
12:18:20dngadVSCode looks interesting. Hopefully gets intellisense and build support for various other languages. Especially Nim.
12:22:26pigmejdngad: what "interesting" is in it?
12:22:41pigmejyet another editor build with web technologies
12:25:49dngad@pigmej to quote Matthias247 "but with the added debugger support for some languages it a little bit ahead of the competition in the IDE department
12:25:50dngad"
12:26:01coffeepotVS is a good ide, but I question things like this in their privacy policy "We collect... your name (for registering)... the web pages you visit, and the search terms you enter". I sincerely hope they mean the pages you visit inside the application, and not monitoring your browser web habits, I mean that would just be wtf (It's free, so you are the
12:26:01coffeepotproduct, right?) But it's a bit ambiguous in their privacy policy here https://www.visualstudio.com/en-us/dn948229
12:26:49coffeepotdepends if that bothers you or not of course
12:27:31pigmejcoffeepot: well better read new windwos 10 eula :P
12:27:32coffeepotI mean "It includes information about the device you use with the services, including IP address, device identifiers, regional and language settings, and information about the network, operating system, browser or other software you use to connect to the services."
12:27:49coffeepotyeah hence why I am still on windows 7
12:28:42pigmejhttps://www.microsoft.com/en-us/servicesagreement/ point 2.b
12:29:01coffeepotI understand telemetry is good, but seems a bit over the top to include device IDs like this without any mention of anonymising them.
12:29:04pigmej"you grant to Microsoft a worldwide and royalty-free intellectual property license to use Your Content, for example, to make copies of, retain, transmit, reformat, display, and distribute via communication tools Your Content on the Services."
12:29:26coffeepotwell as I say, if it's free then you are the product seems like a good rule of thumb
12:30:06pigmejemacs doesn't do such things ;p
12:30:09coffeepoti would rather pay for an IDE and not have this (though can you ever really tell?)
12:30:25coffeepotjust a principle thing really, for me
12:31:01pigmejnowadays everything is "in cloud" we're a product
12:32:01coffeepotyeah, cloud-to-butt extension is the only thing stopping my eyes from releasing from their sockets from rolling whilst browsing the web
12:33:27*BitPuffin joined #nim
12:43:43coffeepothaving mentioned my concerns about the above, I would love to see intellisense support for Nim in there, because it is otherwise a fantastic IDE and have a great reach
12:50:50*gokr quit (Ping timeout: 276 seconds)
12:53:10*xet7 joined #nim
12:53:32*gokr joined #nim
12:56:52pigmejcoffeepot: but vscode is not visualstudio
13:02:10*kniteli quit (Ping timeout: 260 seconds)
13:06:22*ibeex quit (Quit: Textual IRC Client: www.textualapp.com)
13:10:24*Guest48911 is now known as Guest48911isaway
13:17:41*strcmp1 joined #nim
13:21:09*exebook_ joined #nim
13:21:15*exebook_ quit (Remote host closed the connection)
13:23:09dngadWas wondering if the Nim Workshop held in Ukraine was uploaded on youtube? Anyone knows? Thanks.
13:25:11def-dngad: yes, i've seen a few videos
13:26:08dngadhttp://nim-lang.org/news.html#Z2015-10-16-first-nim-conference This one?
13:27:22def-http://forum.nim-lang.org/t/1792
13:28:50coffeepotpigmej: you're right that privacy statement is for VS not VSCode!
14:02:28*kulelu88 left #nim ("Leaving")
14:12:08*Varriount-Laptop joined #nim
14:31:03*Varriount-Laptop quit (Ping timeout: 252 seconds)
14:50:35dngad@def thanks!
15:09:10*andrewvos quit (Ping timeout: 240 seconds)
15:10:07*Varriount-Laptop joined #nim
15:10:10*yglukhov quit (Ping timeout: 240 seconds)
15:15:06*Varriount-Laptop quit (Ping timeout: 265 seconds)
15:18:00*pregressive joined #nim
15:19:19*andrewvos joined #nim
15:30:34*yglukhov joined #nim
15:30:53yglukhovquick question. i want to define a type vecBase[I: static[int], T] = distinct array[I, T]. I want it to support [] operator. however "proc `[]`*(v: vecBase, i: int): auto {.borrow.} " produces an error: no symbol to borrow from found
15:33:50yglukhovor maybe not so quick %)
15:34:10*pregressive quit (Remote host closed the connection)
15:45:51*pregressive joined #nim
16:01:10*jaco60 joined #nim
16:03:28*Varriount-Laptop joined #nim
16:04:15*yglukhov quit (Remote host closed the connection)
16:04:49*yglukhov joined #nim
16:06:42*gokr quit (Quit: Leaving.)
16:06:55*gokr joined #nim
16:08:09*UberLambda joined #nim
16:14:55*Demon_Fox joined #nim
16:20:12*dngad quit (Quit: Leaving)
16:30:16*brson joined #nim
16:53:13*julian37 quit (Ping timeout: 265 seconds)
16:59:50*Varriount-Laptop quit (Ping timeout: 244 seconds)
17:00:05*BitPuffin quit (Read error: Connection reset by peer)
17:00:35*BitPuffin joined #nim
17:07:45*buMPnet quit (Quit: No Ping reply in 180 seconds.)
17:09:00*buMPnet joined #nim
17:09:28*julian37 joined #nim
17:09:31*julian37 left #nim (#nim)
17:18:56*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:21:11*yglukhov quit (Ping timeout: 264 seconds)
17:35:17*Matthias247 joined #nim
17:47:27*BlueProtoman joined #nim
17:49:26*Guest48911isaway is now known as Guest48911
17:55:37*kniteli joined #nim
17:59:31*antoniomo joined #nim
18:21:39*yglukhov joined #nim
18:25:56*yglukhov quit (Ping timeout: 246 seconds)
18:32:52*juanfra quit (Quit: juanfra)
18:33:44*yglukhov joined #nim
18:40:42*desophos joined #nim
18:41:55*smodo joined #nim
18:41:57*juanfra joined #nim
18:41:58*gokr quit (Ping timeout: 265 seconds)
18:46:32*Sembei joined #nim
18:46:50*xet7 quit (Quit: Leaving)
19:01:26*mindriot101 quit ()
19:08:42desophosPSA: Manning deal of the day is https://www.manning.com/books/functional-reactive-programming
19:09:48*makoLine joined #nim
19:13:08*smodo quit (Remote host closed the connection)
19:16:07*vendethiel joined #nim
19:19:31*pregressive quit (Read error: Connection reset by peer)
19:21:46*BitPuffin is now known as kcinnay
19:24:01*kcinnay is now known as BitPuffin
19:26:11*darkf quit (Quit: Leaving)
19:30:21*Varriount-Laptop joined #nim
19:30:59gmpreussner|workdesophos: bought it :)
19:31:21*pregressive joined #nim
19:31:22desophoscool gmpreussner|work! me too!
19:33:53BlueProtomangmpreussner|work: JesseTG from that ECS thread on the boards here. Mind if I ask what your thoughts on Artemis are, since you didn't seem to fancy it very much?
19:38:12*gokr joined #nim
19:42:16gmpreussner|workhey BlueProtoman, yeah, i'll try to respond to the thread at some point. i don't have much time right now, and I feel that it deserves a more detailed explanation.
19:42:59BlueProtomangmpreussner|work: No problem. Also, do you know of any good tutorials for wrapping a C++ library in Nim? I'm trying to put together a wrapper for Box2D to get practice with the language
19:43:26*Varriount-Laptop quit (Quit: Leaving)
19:43:28gmpreussner|workto make it short: i think that (as far as i can tell) nobody has really quite discovered yet how to implement ECS 'correctly'. there are a lot of good ideas, and even more shitty implementations. in fact, most implementations i have seen have terrible performance and scalability characteristics.
19:43:57*Varriount-Laptop joined #nim
19:44:34gmpreussner|workas for C++ wrappers, you should read the documentation for c2nim. it has pretty good C++ support. some manual surgery on the C++ files might be needed though, especially if there are lots of macros
19:45:13gmpreussner|worki usually 'fix up' the C++ files for use with c2nim, then generate a nim file, then use that as a starting point to make a hand-weaked wrapper
19:45:31gmpreussner|worki have written quite a few wrappers for http://nimio.us - you could take a look at those
19:45:33*vendethiel quit (Read error: Connection reset by peer)
19:46:01gmpreussner|workalthough they're all C wrappers for the time being. I have a DX12 wrapper in the works that uses COM interfaces, but it's not checked in yet
19:46:11*BitPuffin quit (Ping timeout: 276 seconds)
19:47:24BlueProtomangmpreussner|work: Box2D has very few macros, and none are really relevant to Nim users (mostly wrappers for things like assert, or some constants). I generated most of the relevant .nim files already, but now I'm unsure of what to do with them, i.e. how to make the procs call the original C++ code.
19:48:43BlueProtomangmpreussner|work: As for "correct" ECS, it seems like artemis-odb (*not* classic Artemis) is one of the best-performing ECSes out there. Probably scales pretty well, too. It'd be a lot to port for Nim, though
19:49:32gmpreussner|workok, i'll check out the odb version this weekend
19:50:15BlueProtomanhttps://github.com/junkdog/artemis-odb
19:50:42Varriount-LaptopGr. Nim isn't doing 'not nil' checking on my immutable string type.
19:59:02*gour quit (Quit: WeeChat 1.3)
20:01:08*vendethiel joined #nim
20:01:24*gokr quit (Quit: Leaving.)
20:06:51*brson quit (Ping timeout: 272 seconds)
20:08:00*Varriount-Laptop quit (Ping timeout: 265 seconds)
20:08:29*Varriount-Laptop joined #nim
20:21:51*andrewvos quit (Ping timeout: 244 seconds)
20:26:31*antoniomo quit (Quit: WeeChat 1.3)
20:29:38*irrequietus joined #nim
20:42:06*kniteli quit (Ping timeout: 255 seconds)
21:01:30*pregressive quit (Read error: Connection reset by peer)
21:08:31*UberLambda quit (Quit: GTG)
21:13:23*pregressive joined #nim
21:20:46*irrequietus quit ()
21:24:05*jaco60 quit (Ping timeout: 246 seconds)
21:25:02*jaco60 joined #nim
21:35:07*desophos quit (Remote host closed the connection)
21:37:24*desophos joined #nim
21:39:08*Varriount-Laptop quit (Ping timeout: 246 seconds)
21:53:09*desophos quit (Remote host closed the connection)
21:54:12*desophos joined #nim
21:56:16*mat4 joined #nim
21:56:20mat4hello
21:58:10*smodo joined #nim
21:59:47*AckZ quit ()
22:04:59*BlaXpirit quit (Quit: Bye)
22:05:15*BlaXpirit joined #nim
22:10:09*BitPuffin|osx joined #nim
22:11:23ephjamat4: hi
22:11:45*euantor joined #nim
22:12:16mat4hi ephja
22:15:34*smodo quit (Quit: Leaving)
22:18:43mat4if I define a type range like type RangeType = range[1..8] and declare an object with a member of that type, its value is initiated as zero
22:19:59ephjayes, by design
22:20:43mat4I understand that behaviour as bug because referencing such variable without redeclaration causes a compiletime error
22:22:46ephjaI don't know what you mean by that
22:23:19gmpreussner|workmat4: can't you just initialize it in the constructor?
22:23:44*theduke joined #nim
22:24:08ephjathere's not much else you can do in that case I think
22:24:37thedukeIs there any way to call "super" methods? casting to the base type and calling the method with the casted var does not work
22:24:46mat4of course. However better would be a correct initialisation (read with one instead of zero)
22:27:38thedukeI can of course work around it by creating an extra proc to call, but it would be nice if that wasn't neccessary
22:31:14*Guest48911 is now known as Guest48911isaway
22:32:47gmpreussner|workmat4: why would 1 be correct?
22:32:49*nande joined #nim
22:32:50ephjamat4: I don't mind the current behavior. initializing with the lower bound is less obvious than the much more common default of 0
22:34:09ephjathough it does seem fairly natural to me, but I dunno how many people will disagree with that
22:34:10*BitPuffin|osx quit (Ping timeout: 240 seconds)
22:34:11mat4gmpreussner|work: because the range is defined as 1..n in my example. Accessing the variable with its initial value zero causes an error
22:34:14ephjawhen disregarding 0
22:34:36gmpreussner|workmat4: so why is 1 better than, say, 42?
22:35:13gmpreussner|workor 4 in your case
22:35:17ephja0 or any of the bounds are less arbitrary though
22:35:39gmpreussner|worki feel like everything should be initialized to 42
22:35:43mat4surch ranges have some advantages as indexes (in my case a slot index into an operation-code bundle)
22:36:14gmpreussner|worki understand your motivation. i'm just trying to understand what the rule for initialization should be :)
22:36:28mat4because a bit mask is needed for slot insertion it ease programming
22:37:04gmpreussner|workperhaps initialization should be controllable on a per-type basis, via a pragma?
22:37:25mat4beside boolean values ranges should initialized with the lowest possible value
22:37:46gmpreussner|worki don't see why the lowest value is special
22:37:59gmpreussner|workwhy not the highest?
22:38:01ephjagmpreussner|work: keep in mind that constructor procs are very common
22:38:58mat4gmpreussner|work: The highest value is commonly the last accessible element
22:39:32mat4probably an index type would be a solution ?
22:40:39ephjaperhaps, but it's not only for indexing
22:41:38*brson joined #nim
22:43:57ephjaI'm not sure what any arguments have to do with indexing specifically
22:46:16mat4look, variables which need to be explicit initialized can lead to errors if there initial value is out of range. Initialisation is likewise forgotten, specially in case of larger structures with many members
22:47:30mat4it is logical the same argumentation which lead to first initialisation of pointers with nil or boolean variables with false
22:50:52mat4because the compiler is unable to detect the common initial value for ranges of different lower limit, it ease programming in common cases if the initial value is set to the lower limit
22:51:04ephjathose values are also zero
22:51:34ephjaI doubt it will change, but feel free to discuss it on the forum
22:52:02ephjaor github
22:55:23*vendethiel quit (Ping timeout: 264 seconds)
22:56:06*desophos quit (Remote host closed the connection)
22:56:59*desophos joined #nim
22:59:06*Trustable quit (Ping timeout: 265 seconds)
22:59:34*mat4 quit (Quit: Leaving)
23:02:22*euantor quit (Remote host closed the connection)
23:03:21*pregressive quit ()
23:09:38BlueProtomanI'm trying to put together a Nim wrapper for Box2D. Should I assume that the user will have the Box2D library (libBox2D.so, dll, etc.) available? If so, will I have to do anything differently based on whether said library is static or dynamic?
23:10:29reactormonkoh neat, branch protections againt force pushes >:)
23:11:53*jaco60 quit (Ping timeout: 246 seconds)
23:13:35ephjaBlueProtoman: the library that has been wrapped? because dll's aren't used when linking statically
23:14:20BlueProtomanephja: Let me try again. Should my wrapper care whether or not the user's copy of Box2D is statically or dynamically linked?
23:14:39*Matthias247 quit (Quit: Matthias247)
23:17:32ephjaBlueProtoman: yes. here's an example https://github.com/ephja/nim-glfw/blob/master/src/glfw/wrapper.nim
23:18:16ephjait's tedious, but that's C for you
23:18:37*Matthias247 joined #nim
23:19:14BlueProtomanephja: Wait wait. Does the wrapper need to have access to the wrapee's source code?
23:19:28BlueProtoman(Besides headers)
23:20:57ephjayou need to get it from somewhere
23:22:11ephjasometimes from headers, but header-only libraries aren't that common
23:23:03BlueProtomanephja: Wait. Let me get this one step at a time. First, no matter what, I *need* access to Box2D's headers, and must specify them inside the wrapper itself. Is that correct?
23:27:30ephjaBlueProtoman: oh. no, just the source files
23:28:12BlueProtomanephja: Wait, now I'm confused.
23:28:33ephjaas you can see in that module
23:28:57BlueProtomanephja: Ah, so my wrapper *does* need full access to the source code?
23:28:58ephjano headers are referenced there
23:29:09BlueProtomanOr are there multiple ways to interface with C/C++ code?
23:30:33BlueProtomanOh, I see. I can pull in from a DLL OR from source code?
23:35:06ephjaBlueProtoman: https://github.com/3dicc/Urhonimo/blob/master/modules/graphics/animatedmodel.nim https://github.com/Araq/wxnim/blob/master/wx.nim
23:37:26BlueProtomanI don't follow
23:39:00ephjathat's another approach, but I've never done that
23:39:03ephjahttp://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
23:40:51BlueProtomanephja: So, let me see if I get this right; include the source code for Box2D (or at least a git submodule thereof), and build that *alongside* my wrapper? Or should I only distribute the wrapper and assume a DLL is available? Or should I allow both?
23:48:04*elrood quit (Quit: Leaving)
23:49:35dom96BlueProtoman: You should assume that the DLL is available.
23:52:50BlueProtomandom96: Okay. Should I assume the source code (not just headers) is available, too?
23:52:51ephjait seems to me that importcpp is often necessary
23:53:25dom96BlueProtoman: no, source code isn't necessary.
23:55:36ephjaI dunno about headers though. could urhonimo for example omit that? it just simplifies things, right?