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:17 | desophos | BlueProtoman: 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:26 | desophos | so, no time like the present to start! |
00:08:54 | BlueProtoman | desophos: Wanna help me write the thing? I ain't spreading the good word for my own health |
00:09:25 | desophos | indeed i do, my only concern is that i might not be able to help very much |
00:09:44 | desophos | (limited by proficiency) |
00:10:02 | BlueProtoman | Well, that makes two of us; that's basically why I'm starting with a Box2D port |
00:10:19 | BlueProtoman | As 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:40 | jck | Why can't I specify --cpu and --os in config.nims ? |
00:32:50 | desophos | BlueProtoman: next up: port ReactiveX to Nim :p |
00:33:03 | desophos | now that takes some skill |
00:33:14 | BlueProtoman | desophos: I don't get it |
00:33:31 | desophos | http://reactivex.io/ |
00:33:40 | desophos | was just looking into FRP |
00:34:16 | desophos | after reading http://lambdor.net/?p=171 |
00:34:28 | desophos | trying to find some real examples now |
00:36:18 | desophos | it's complex enough that understanding the ideas isn't enough |
00:39:57 | gmpreussner|work | oh, reactivex looks interesting. thanks for the link |
00:41:02 | desophos | it seems like it would be quite difficult to implement FRP from scratch |
00:41:16 | gmpreussner|work | i've been fantasizing about a game engine with event stream processing :) |
00:43:43 | desophos | reactivex seems difficult enough to use, let alone write :p |
00:47:07 | BlueProtoman | gmpreussner|work: What is that, exactly? |
00:49:29 | desophos | idk if i'm smart enough to write a game using FRP :/ |
00:49:30 | gmpreussner|work | https://en.wikipedia.org/wiki/Event_stream_processing |
00:49:56 | * | yglukhov quit (Remote host closed the connection) |
00:51:00 | desophos | wow this looks good https://www.manning.com/books/functional-reactive-programming |
00:53:53 | desophos | WOW not a day too soon! "The book will be Deal of the Day November 19th." http://blog.reactiveprogramming.org/?p=183 |
00:54:01 | desophos | TOMORROW |
00:55:25 | BlueProtoman | Also, how do I wrap both a C type and a global instance of this C type? |
00:55:57 | gmpreussner|work | desophos: nice :) |
00:59:56 | desophos | seems like reactivex has been widely adopted to the point that the only books on safari books are reactivex tutorials -_- |
01:00:05 | desophos | or react.js |
01:00:29 | BlueProtoman | Wait, I thought react.js was a GUI framework? |
01:02:01 | desophos | reactive GUI :p |
01:02:20 | desophos | FRP is definitely something i don't want to reinvent the wheel on |
01:04:15 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:04:23 | desophos | bbl |
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:15 | BlueProtoman | Is 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:49 | onionhammer | BlueProtoman you could try https://github.com/onionhammer/clibpp |
02:13:11 | * | julian37 quit (Ping timeout: 276 seconds) |
02:13:27 | BlueProtoman | onionhammer: 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:53 | gunn | def-: 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:18 | def- | gunn: hi |
02:32:50 | gunn | def-: hey, I was wondering if the output here is a bigint bug: https://gist.github.com/gunn/9269eaf7ff001485ce5e#file-parallel_factorial-log |
02:33:21 | gunn | I'm creating a github issue |
02:34:39 | def- | the 0 in line 4 looks wrong indeed |
02:34:44 | * | lokulin joined #nim |
02:35:56 | def- | If you're interested and fast and non-buggy bigints, there are some gmp wrappers with nice nim interfaces around |
02:36:30 | def- | in* |
02:40:53 | gunn | def-: cool, do you have a recommendation? |
02:41:45 | gunn | issue created: https://github.com/def-/nim-bigints/issues/3 |
02:42:31 | def- | gunn: https://github.com/FedeOmoto/nim-gmp and https://gist.github.com/rbehrends/91d2b2dee8ebcac08e97 |
02:47:43 | gunn | thanks |
02:55:58 | * | onionhammer quit (Ping timeout: 260 seconds) |
03:16:39 | * | desophos_ joined #nim |
03:16:39 | * | onionhammer joined #nim |
03:17:27 | def- | gunn: good news for me, looks like a nim bug and not a nim-bigints bug |
03:21:01 | def- | or maybe i misunderstand the semantics of let |
03:21:15 | * | desophos_ quit (Ping timeout: 255 seconds) |
03:27:46 | def- | 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:25 | gunn | def-: can confirm the test case in the issue works now |
03:41:56 | gunn | still 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:05 | gunn | in fact still getting the same output as last time i.e. multiplying to zero |
03:51:44 | def- | oh yeah, "total = total * val" doesn't work right now |
03:51:56 | def- | total *= val should be fine |
03:52:18 | def- | need to make a copy of total for the first case |
03:53:05 | gunn | def-: confirmed |
03:53:14 | gunn | awesome thank you |
03:53:50 | gunn | damn there are some gotchas around though |
03:54:03 | gunn | the let stuff especially |
03:54:16 | def- | yes, i consider that a bug that should be fixed in nim |
03:54:21 | def- | but it's not easy from what i understand |
03:55:09 | gunn | yep |
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:59 | def- | gunn: ok, also fixed |
04:04:20 | def- | 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:01 | yglukhov | quick 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:28 | yglukhov | ok, thats lineinfo =) |
09:39:33 | Jehan_ | yglukhov: NimNode is in system.nim, but it's {.magic.} |
09:40:33 | yglukhov | yeah, i mean the ast referred by nimnode. |
09:41:25 | Jehan_ | Internally, the AST is PNode in ast.nim, line 1619+ or so. |
09:43:50 | coffeepot | hey 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:29 | coffeepot | just curious, not in need of it atm, but might use it if it were in the stdlib |
09:44:59 | Jehan_ | coffeepot: import options (lib/pure/options.nim) |
09:46:31 | coffeepot | Wheee! 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:20 | dngad | VSCode looks interesting. Hopefully gets intellisense and build support for various other languages. Especially Nim. |
12:22:26 | pigmej | dngad: what "interesting" is in it? |
12:22:41 | pigmej | yet another editor build with web technologies |
12:25:49 | dngad | @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:50 | dngad | " |
12:26:01 | coffeepot | VS 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:01 | coffeepot | product, right?) But it's a bit ambiguous in their privacy policy here https://www.visualstudio.com/en-us/dn948229 |
12:26:49 | coffeepot | depends if that bothers you or not of course |
12:27:31 | pigmej | coffeepot: well better read new windwos 10 eula :P |
12:27:32 | coffeepot | I 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:49 | coffeepot | yeah hence why I am still on windows 7 |
12:28:42 | pigmej | https://www.microsoft.com/en-us/servicesagreement/ point 2.b |
12:29:01 | coffeepot | I 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:04 | pigmej | "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:26 | coffeepot | well as I say, if it's free then you are the product seems like a good rule of thumb |
12:30:06 | pigmej | emacs doesn't do such things ;p |
12:30:09 | coffeepot | i would rather pay for an IDE and not have this (though can you ever really tell?) |
12:30:25 | coffeepot | just a principle thing really, for me |
12:31:01 | pigmej | nowadays everything is "in cloud" we're a product |
12:32:01 | coffeepot | yeah, 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:43 | coffeepot | having 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:52 | pigmej | coffeepot: 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:09 | dngad | Was wondering if the Nim Workshop held in Ukraine was uploaded on youtube? Anyone knows? Thanks. |
13:25:11 | def- | dngad: yes, i've seen a few videos |
13:26:08 | dngad | http://nim-lang.org/news.html#Z2015-10-16-first-nim-conference This one? |
13:27:22 | def- | http://forum.nim-lang.org/t/1792 |
13:28:50 | coffeepot | pigmej: 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:35 | dngad | @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:53 | yglukhov | quick 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:50 | yglukhov | or 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:42 | desophos | PSA: 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:59 | gmpreussner|work | desophos: bought it :) |
19:31:21 | * | pregressive joined #nim |
19:31:22 | desophos | cool gmpreussner|work! me too! |
19:33:53 | BlueProtoman | gmpreussner|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:16 | gmpreussner|work | hey 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:59 | BlueProtoman | gmpreussner|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:28 | gmpreussner|work | to 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:34 | gmpreussner|work | as 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:13 | gmpreussner|work | i 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:31 | gmpreussner|work | i 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:01 | gmpreussner|work | although 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:24 | BlueProtoman | gmpreussner|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:43 | BlueProtoman | gmpreussner|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:32 | gmpreussner|work | ok, i'll check out the odb version this weekend |
19:50:15 | BlueProtoman | https://github.com/junkdog/artemis-odb |
19:50:42 | Varriount-Laptop | Gr. 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:20 | mat4 | hello |
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:23 | ephja | mat4: hi |
22:11:45 | * | euantor joined #nim |
22:12:16 | mat4 | hi ephja |
22:15:34 | * | smodo quit (Quit: Leaving) |
22:18:43 | mat4 | if 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:59 | ephja | yes, by design |
22:20:43 | mat4 | I understand that behaviour as bug because referencing such variable without redeclaration causes a compiletime error |
22:22:46 | ephja | I don't know what you mean by that |
22:23:19 | gmpreussner|work | mat4: can't you just initialize it in the constructor? |
22:23:44 | * | theduke joined #nim |
22:24:08 | ephja | there's not much else you can do in that case I think |
22:24:37 | theduke | Is 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:46 | mat4 | of course. However better would be a correct initialisation (read with one instead of zero) |
22:27:38 | theduke | I 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:47 | gmpreussner|work | mat4: why would 1 be correct? |
22:32:49 | * | nande joined #nim |
22:32:50 | ephja | mat4: 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:09 | ephja | though 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:11 | mat4 | gmpreussner|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:14 | ephja | when disregarding 0 |
22:34:36 | gmpreussner|work | mat4: so why is 1 better than, say, 42? |
22:35:13 | gmpreussner|work | or 4 in your case |
22:35:17 | ephja | 0 or any of the bounds are less arbitrary though |
22:35:39 | gmpreussner|work | i feel like everything should be initialized to 42 |
22:35:43 | mat4 | surch ranges have some advantages as indexes (in my case a slot index into an operation-code bundle) |
22:36:14 | gmpreussner|work | i understand your motivation. i'm just trying to understand what the rule for initialization should be :) |
22:36:28 | mat4 | because a bit mask is needed for slot insertion it ease programming |
22:37:04 | gmpreussner|work | perhaps initialization should be controllable on a per-type basis, via a pragma? |
22:37:25 | mat4 | beside boolean values ranges should initialized with the lowest possible value |
22:37:46 | gmpreussner|work | i don't see why the lowest value is special |
22:37:59 | gmpreussner|work | why not the highest? |
22:38:01 | ephja | gmpreussner|work: keep in mind that constructor procs are very common |
22:38:58 | mat4 | gmpreussner|work: The highest value is commonly the last accessible element |
22:39:32 | mat4 | probably an index type would be a solution ? |
22:40:39 | ephja | perhaps, but it's not only for indexing |
22:41:38 | * | brson joined #nim |
22:43:57 | ephja | I'm not sure what any arguments have to do with indexing specifically |
22:46:16 | mat4 | look, 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:30 | mat4 | it is logical the same argumentation which lead to first initialisation of pointers with nil or boolean variables with false |
22:50:52 | mat4 | because 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:04 | ephja | those values are also zero |
22:51:34 | ephja | I doubt it will change, but feel free to discuss it on the forum |
22:52:02 | ephja | or 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:38 | BlueProtoman | I'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:29 | reactormonk | oh neat, branch protections againt force pushes >:) |
23:11:53 | * | jaco60 quit (Ping timeout: 246 seconds) |
23:13:35 | ephja | BlueProtoman: the library that has been wrapped? because dll's aren't used when linking statically |
23:14:20 | BlueProtoman | ephja: 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:32 | ephja | BlueProtoman: yes. here's an example https://github.com/ephja/nim-glfw/blob/master/src/glfw/wrapper.nim |
23:18:16 | ephja | it's tedious, but that's C for you |
23:18:37 | * | Matthias247 joined #nim |
23:19:14 | BlueProtoman | ephja: Wait wait. Does the wrapper need to have access to the wrapee's source code? |
23:19:28 | BlueProtoman | (Besides headers) |
23:20:57 | ephja | you need to get it from somewhere |
23:22:11 | ephja | sometimes from headers, but header-only libraries aren't that common |
23:23:03 | BlueProtoman | ephja: 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:30 | ephja | BlueProtoman: oh. no, just the source files |
23:28:12 | BlueProtoman | ephja: Wait, now I'm confused. |
23:28:33 | ephja | as you can see in that module |
23:28:57 | BlueProtoman | ephja: Ah, so my wrapper *does* need full access to the source code? |
23:28:58 | ephja | no headers are referenced there |
23:29:09 | BlueProtoman | Or are there multiple ways to interface with C/C++ code? |
23:30:33 | BlueProtoman | Oh, I see. I can pull in from a DLL OR from source code? |
23:35:06 | ephja | BlueProtoman: https://github.com/3dicc/Urhonimo/blob/master/modules/graphics/animatedmodel.nim https://github.com/Araq/wxnim/blob/master/wx.nim |
23:37:26 | BlueProtoman | I don't follow |
23:39:00 | ephja | that's another approach, but I've never done that |
23:39:03 | ephja | http://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma |
23:40:51 | BlueProtoman | ephja: 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:35 | dom96 | BlueProtoman: You should assume that the DLL is available. |
23:52:50 | BlueProtoman | dom96: Okay. Should I assume the source code (not just headers) is available, too? |
23:52:51 | ephja | it seems to me that importcpp is often necessary |
23:53:25 | dom96 | BlueProtoman: no, source code isn't necessary. |
23:55:36 | ephja | I dunno about headers though. could urhonimo for example omit that? it just simplifies things, right? |