| 00:02:16 | * | Demon_Fox joined #nim |
| 00:08:33 | * | yglukhov joined #nim |
| 00:13:37 | * | yglukhov quit (Ping timeout: 246 seconds) |
| 00:22:17 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 00:25:52 | * | imapiekindaguy joined #nim |
| 00:30:24 | * | avsej quit (Ping timeout: 264 seconds) |
| 01:02:32 | * | CryptoToad quit (Quit: Leaving) |
| 01:41:29 | * | imapiekindaguy quit (Quit: WeeChat 1.4-dev) |
| 02:09:52 | * | pregressive quit (Remote host closed the connection) |
| 02:14:24 | * | avsej joined #nim |
| 02:14:24 | * | avsej quit (Changing host) |
| 02:14:24 | * | avsej joined #nim |
| 02:23:35 | * | bendiken quit (Ping timeout: 264 seconds) |
| 02:30:19 | * | BitPuffin|osx quit (Ping timeout: 244 seconds) |
| 02:58:19 | * | yglukhov joined #nim |
| 03:02:36 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 03:10:00 | * | enquora quit (Quit: enquora) |
| 03:13:05 | * | bendiken joined #nim |
| 03:18:50 | * | darkf joined #nim |
| 03:24:40 | * | strcmp1 quit (Quit: Leaving) |
| 03:29:43 | * | NimBot joined #nim |
| 03:44:48 | * | pregressive joined #nim |
| 03:51:47 | * | NimBot joined #nim |
| 04:13:13 | * | NimBot joined #nim |
| 04:27:03 | * | strcmp1 joined #nim |
| 04:28:21 | * | endragor joined #nim |
| 04:31:30 | * | gokr1 joined #nim |
| 05:04:37 | * | NimBot joined #nim |
| 05:13:01 | * | NimBot joined #nim |
| 05:14:57 | * | pregressive quit (Remote host closed the connection) |
| 05:26:12 | * | NimBot joined #nim |
| 05:34:44 | * | NimBot joined #nim |
| 05:46:24 | * | strcmp1 quit (Quit: Leaving) |
| 05:53:04 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 06:01:16 | * | jszymanski joined #nim |
| 06:06:13 | * | NimBot joined #nim |
| 06:06:42 | * | yglukhov joined #nim |
| 06:11:50 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 06:22:00 | * | bendiken joined #nim |
| 06:22:15 | * | Kingsqueee joined #nim |
| 06:22:42 | * | Kingsquee quit (Read error: Connection reset by peer) |
| 06:26:06 | * | bendiken quit (Ping timeout: 240 seconds) |
| 06:27:07 | * | NimBot joined #nim |
| 06:48:04 | * | kilon quit (Read error: Connection reset by peer) |
| 06:56:45 | gokr1 | Good morning! |
| 06:57:44 | Demon_Fox | Mornin |
| 06:58:08 | Demon_Fox | Morning* |
| 06:58:45 | gokr1 | federico3: About to post to the forum and also personally email those 48 that got unsubbed. |
| 06:59:04 | gokr1 | I can email the list to you |
| 07:01:02 | * | NimBot joined #nim |
| 07:05:44 | * | filcuc joined #nim |
| 07:10:18 | * | kilon quit () |
| 07:19:50 | * | ^aurora^ joined #nim |
| 07:35:58 | * | Trustable joined #nim |
| 07:48:54 | * | keyle joined #nim |
| 07:51:31 | * | Sembei joined #nim |
| 07:56:50 | * | Demon_Fox quit (Ping timeout: 250 seconds) |
| 07:57:40 | * | Demon_Fox joined #nim |
| 08:00:32 | OnO | Araq: what kind of videos, of your screen screen, or edit video cam footage? |
| 08:09:25 | * | irrequietus joined #nim |
| 08:10:45 | * | Sembei quit (Max SendQ exceeded) |
| 08:11:59 | * | Sembei joined #nim |
| 08:13:12 | * | darkf_ joined #nim |
| 08:16:29 | * | darkf quit (Ping timeout: 244 seconds) |
| 08:21:01 | * | xet7_ quit (Remote host closed the connection) |
| 08:21:30 | * | xet7_ joined #nim |
| 08:26:16 | * | jszymanski quit (Ping timeout: 246 seconds) |
| 08:27:19 | * | jszymanski joined #nim |
| 08:28:56 | * | Ven joined #nim |
| 08:30:06 | * | darkf_ is now known as darkf |
| 08:42:38 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 08:44:07 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:44:38 | * | Demon_Fox quit (Quit: Leaving) |
| 08:51:39 | * | yglukhov joined #nim |
| 08:51:46 | * | Ven joined #nim |
| 08:51:55 | * | yglukhov quit (Remote host closed the connection) |
| 08:52:11 | * | yglukhov joined #nim |
| 08:52:15 | * | yglukhov quit (Remote host closed the connection) |
| 08:56:53 | * | yglukhov joined #nim |
| 08:59:01 | OnO | Araq: anyways I recommend Camtasia |
| 09:02:45 | * | durm joined #nim |
| 09:31:36 | * | Ven quit (Ping timeout: 264 seconds) |
| 09:36:44 | * | jszymanski quit (Quit: computer sleeps...) |
| 09:39:54 | * | jaco60 joined #nim |
| 09:42:10 | * | Sembei quit (Ping timeout: 272 seconds) |
| 09:48:16 | * | bendiken joined #nim |
| 09:49:47 | * | kilon joined #nim |
| 09:52:24 | * | Sembei joined #nim |
| 09:59:18 | * | huonw quit (Ping timeout: 244 seconds) |
| 10:01:12 | * | huonw joined #nim |
| 10:05:32 | * | Miruya quit (Quit: Page closed) |
| 10:08:06 | * | Ven joined #nim |
| 10:16:31 | * | xcombelle joined #nim |
| 10:32:45 | * | Ven quit (Read error: Connection reset by peer) |
| 10:53:53 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 10:54:54 | * | bendiken joined #nim |
| 11:05:17 | * | NimBot joined #nim |
| 11:05:35 | * | bendiken joined #nim |
| 11:12:08 | * | golak joined #nim |
| 11:15:18 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 11:16:22 | * | bendiken joined #nim |
| 11:26:50 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 11:27:35 | * | bendiken joined #nim |
| 11:34:38 | * | BitPuffin joined #nim |
| 11:36:10 | * | Ven joined #nim |
| 11:37:24 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 11:38:19 | * | bendiken joined #nim |
| 11:43:35 | * | Ven quit (Ping timeout: 250 seconds) |
| 11:48:49 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 11:48:49 | * | dashed joined #nim |
| 11:49:43 | * | bendiken joined #nim |
| 11:50:22 | * | Sembei quit (Ping timeout: 244 seconds) |
| 12:00:14 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:01:06 | * | bendiken joined #nim |
| 12:06:08 | * | Ven joined #nim |
| 12:08:27 | * | Sembei joined #nim |
| 12:11:27 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:11:49 | * | NimBot joined #nim |
| 12:12:19 | * | bendiken joined #nim |
| 12:23:24 | * | bendiken quit (Read error: Connection reset by peer) |
| 12:23:40 | * | bendiken joined #nim |
| 12:24:14 | * | NimBot joined #nim |
| 12:24:57 | * | Sembei quit (Max SendQ exceeded) |
| 12:24:58 | * | matkuki joined #nim |
| 12:26:07 | * | Sembei joined #nim |
| 12:29:35 | * | infinity0 quit (Ping timeout: 264 seconds) |
| 12:31:31 | * | chemist69 joined #nim |
| 12:33:41 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:34:33 | * | bendiken joined #nim |
| 12:35:37 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
| 12:40:01 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:42:17 | * | infinity0 joined #nim |
| 12:44:38 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:45:32 | * | bendiken joined #nim |
| 12:52:44 | * | repax joined #nim |
| 12:56:01 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 12:56:53 | * | bendiken joined #nim |
| 12:57:35 | * | vendethiel joined #nim |
| 13:02:47 | * | raza joined #nim |
| 13:06:50 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 13:07:37 | * | jszymanski joined #nim |
| 13:07:41 | * | bendiken joined #nim |
| 13:09:04 | * | golak quit (Quit: leaving) |
| 13:09:24 | * | golak joined #nim |
| 13:12:58 | * | endragor_ joined #nim |
| 13:13:56 | * | kilon quit () |
| 13:16:36 | * | endragor quit (Ping timeout: 255 seconds) |
| 13:17:11 | * | endragor_ quit (Ping timeout: 250 seconds) |
| 13:19:43 | * | NimBot joined #nim |
| 13:35:39 | * | joelmo quit (Quit: Connection closed for inactivity) |
| 13:36:24 | * | lokulin quit (Ping timeout: 264 seconds) |
| 13:36:58 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 13:38:00 | * | bendiken joined #nim |
| 13:38:56 | * | endragor joined #nim |
| 13:45:24 | * | enquora joined #nim |
| 13:47:42 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 13:48:52 | * | bendiken joined #nim |
| 13:49:08 | * | keks__ joined #nim |
| 13:49:26 | * | lokulin joined #nim |
| 13:49:31 | keks__ | hi |
| 13:51:19 | keks__ | little question, what is the prefered way to make ed25519 crypto with nim? Is there a usable binding to NaCl? |
| 13:52:06 | federico3 | keks__: https://github.com/nim-lang/packages/blob/master/packages.json for a package list |
| 13:59:07 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 13:59:59 | * | bendiken joined #nim |
| 14:00:28 | keks__ | federico3: thanks, i've searched the net/the package list already, it seems that the only thing that could work is the openssl binding... Or do i not see the wood for the trees? :) |
| 14:06:17 | * | golak quit (Ping timeout: 268 seconds) |
| 14:10:05 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:10:56 | * | bendiken joined #nim |
| 14:11:01 | * | pregressive joined #nim |
| 14:18:41 | * | zemm quit (Remote host closed the connection) |
| 14:18:49 | * | zemm joined #nim |
| 14:21:02 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:21:58 | * | bendiken joined #nim |
| 14:23:12 | * | Sembei quit (Ping timeout: 264 seconds) |
| 14:29:15 | * | ^aurora^ joined #nim |
| 14:29:55 | * | Kingsqueee quit (Quit: http://i.imgur.com/EsXzoum.png) |
| 14:32:00 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:32:56 | * | bendiken joined #nim |
| 14:33:43 | federico3 | keks__: nacl or libsodium? |
| 14:36:08 | * | keyle quit (Quit: http://twitter.com/keyle/) |
| 14:40:50 | * | infinity0 quit (Remote host closed the connection) |
| 14:41:19 | * | infinity0 joined #nim |
| 14:43:21 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:44:14 | * | bendiken joined #nim |
| 14:44:25 | keks__ | federico3: libsodium looks nice, though. I was not aware of an NaCl fork. |
| 14:49:09 | keks__ | Something to play with after work :) |
| 14:50:34 | keks__ | federico3: Very nice! ( https://github.com/judofyr/sodium.nim ) thanks again for the hint!! |
| 14:51:46 | * | thotypous quit (Ping timeout: 240 seconds) |
| 14:54:13 | * | brson joined #nim |
| 14:54:18 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:55:10 | * | bendiken joined #nim |
| 14:56:29 | * | endragor quit (Remote host closed the connection) |
| 15:05:15 | federico3 | keks__: and it seems to be quite popular |
| 15:05:17 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:05:22 | * | pregressive quit (Remote host closed the connection) |
| 15:06:10 | * | bendiken joined #nim |
| 15:06:38 | * | pregressive joined #nim |
| 15:07:05 | * | NimBot joined #nim |
| 15:09:05 | * | filcuc quit (Ping timeout: 240 seconds) |
| 15:14:07 | * | thotypous joined #nim |
| 15:15:56 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:17:19 | * | NimBot joined #nim |
| 15:22:07 | * | dashed quit (Quit: Connection closed for inactivity) |
| 15:26:12 | * | drewsrem joined #nim |
| 15:26:41 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:27:32 | * | bendiken joined #nim |
| 15:27:58 | * | boopsiesisaway is now known as boopsies |
| 15:30:21 | drewsrem | Is it possible to construct an object "inplace" and cast into a "byte array"? - i.e. I have: "var data: array[32, char]" and an object-type (e.g. foo) which sizeof is 32, now I want to construct an instance of that type into that data var, I tried simply casting it by "data = cast[array[32, char]](foo(params))" but it doesn't work, atm I create a tempoprary var, construct foo there and movemem it into data. - Any pointers? |
| 15:30:46 | * | pregressive quit () |
| 15:31:31 | * | pregressive joined #nim |
| 15:35:17 | * | jszymanski quit (Quit: computer sleeps...) |
| 15:37:38 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:38:31 | * | bendiken joined #nim |
| 15:39:26 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:41:18 | * | ChrisMAN quit (Remote host closed the connection) |
| 15:45:12 | * | ChrisMAN joined #nim |
| 15:48:09 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 15:49:03 | * | bendiken joined #nim |
| 15:59:06 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 16:00:05 | * | bendiken joined #nim |
| 16:09:39 | * | keks__ quit (Ping timeout: 246 seconds) |
| 16:09:54 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 16:10:55 | * | bendiken joined #nim |
| 16:16:10 | * | enquora quit (Quit: enquora) |
| 16:26:26 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
| 16:27:48 | * | raza joined #nim |
| 16:28:42 | * | Jesin quit (Quit: Leaving) |
| 16:29:09 | * | Jesin joined #nim |
| 16:31:56 | * | strcmp1 joined #nim |
| 16:36:54 | * | icebattle joined #nim |
| 16:39:47 | * | yglukhov quit (Ping timeout: 265 seconds) |
| 16:46:57 | * | X67r joined #nim |
| 16:55:40 | * | brson quit (Quit: leaving) |
| 16:57:23 | * | keks__ joined #nim |
| 16:57:48 | * | endragor joined #nim |
| 17:01:16 | * | icebattle quit (Quit: Page closed) |
| 17:09:16 | * | yglukhov joined #nim |
| 17:11:23 | * | yglukhov quit (Remote host closed the connection) |
| 17:11:40 | * | yglukhov joined #nim |
| 17:12:40 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
| 17:12:47 | * | icebattle joined #nim |
| 17:14:18 | * | raza joined #nim |
| 17:20:03 | * | xcombelle quit (Ping timeout: 255 seconds) |
| 17:25:54 | * | gokr_ joined #nim |
| 17:26:09 | * | Demon_Fox joined #nim |
| 17:27:43 | * | Matthias247 joined #nim |
| 17:34:43 | * | darkf quit (Ping timeout: 246 seconds) |
| 17:35:16 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 17:36:18 | * | bendiken joined #nim |
| 17:42:26 | * | unclechu joined #nim |
| 17:42:32 | * | unclechu quit (Max SendQ exceeded) |
| 17:43:33 | * | unclechu joined #nim |
| 17:46:33 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 17:47:40 | * | bendiken joined #nim |
| 17:52:26 | * | golak joined #nim |
| 17:54:14 | * | matkuki joined #nim |
| 17:56:03 | * | keks__ quit (Ping timeout: 246 seconds) |
| 17:57:55 | * | matkuki quit (Client Quit) |
| 17:58:01 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 17:59:03 | * | bendiken joined #nim |
| 18:03:02 | * | ^aurora^ joined #nim |
| 18:08:48 | * | xcombelle joined #nim |
| 18:09:08 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:09:52 | * | bendiken joined #nim |
| 18:10:58 | yglukhov | drewsrem, have you tried through pointers? |
| 18:11:37 | * | irrequietus quit (Ping timeout: 265 seconds) |
| 18:11:54 | drewsrem | yglukhov, isn't that what I'm doing now? - create a temporary var and copymem it over |
| 18:11:58 | yglukhov | e.g. var myArray : array[32, char]; cast[ptr MyObj](addr myArray[0])[] = MyObj(myField:0) |
| 18:12:31 | drewsrem | yglukhov, ah thanks, I'll try this |
| 18:13:22 | yglukhov | np |
| 18:13:25 | * | xcombelle quit (Remote host closed the connection) |
| 18:20:05 | * | kilon joined #nim |
| 18:20:06 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:20:10 | drewsrem | On a different note: any idea how I could achieve the following: http://ix.io/kAL ? |
| 18:21:10 | * | bendiken joined #nim |
| 18:21:26 | drewsrem | i.e. store a closure with a single typed-parameter in a "generic/untyped proc-type" variable and then retrieve it again |
| 18:23:48 | * | BitPuffin quit (Ping timeout: 264 seconds) |
| 18:24:23 | * | irrequietus joined #nim |
| 18:26:45 | drewsrem | i.e. function pointers |
| 18:31:01 | * | endragor quit (Remote host closed the connection) |
| 18:31:28 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:32:26 | * | bendiken joined #nim |
| 18:33:15 | * | NimBot joined #nim |
| 18:42:20 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:43:14 | * | bendiken joined #nim |
| 18:48:51 | * | NimBot joined #nim |
| 18:50:56 | * | jszymanski joined #nim |
| 18:52:32 | * | NimBot joined #nim |
| 18:52:57 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:53:47 | * | bendiken joined #nim |
| 18:56:58 | yglukhov | i think you should store func ptr and ctx ptr separately. |
| 18:57:13 | yglukhov | but your code looks arguably valid |
| 18:57:36 | yglukhov | maybe that's a bug. why not report it! =) |
| 19:00:13 | yglukhov | oh, maybe you're doing the wrong cast. try adding {.closuse.} in your casts |
| 19:00:42 | yglukhov | your gist works for me in any case |
| 19:03:55 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:04:08 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
| 19:04:51 | * | bendiken joined #nim |
| 19:14:54 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:15:54 | * | bendiken joined #nim |
| 19:20:39 | * | jefus is now known as jefus_ |
| 19:25:59 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:26:53 | * | bendiken joined #nim |
| 19:37:13 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:37:47 | * | victor-rene joined #nim |
| 19:38:10 | * | NimBot joined #nim |
| 19:38:12 | * | bendiken joined #nim |
| 19:47:43 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:49:02 | * | bendiken joined #nim |
| 19:52:12 | * | jefus_ is now known as jefus |
| 19:58:14 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 19:59:16 | * | bendiken joined #nim |
| 20:02:10 | drewsrem | yglukhov, oh I wasn't on HEAD, my bad, thanks a lot for testing |
| 20:02:32 | yglukhov | anytime ;) |
| 20:09:19 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 20:10:15 | * | bendiken joined #nim |
| 20:20:12 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 20:21:04 | * | bendiken joined #nim |
| 20:21:05 | * | jefus is now known as jefus_ |
| 20:21:15 | * | jefus_ is now known as jefus |
| 20:25:10 | * | brson joined #nim |
| 20:30:19 | * | jszymanski quit (Quit: computer sleeps...) |
| 20:31:31 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 20:32:19 | drewsrem | yglukhov, oh I'm silly, the last line in my snippet is wrong, I cast "foobar" again, I should cast anyproc tho, if you swap that it stops working again |
| 20:32:30 | * | bendiken joined #nim |
| 20:34:33 | Araq | drewsrem: what are you doing? |
| 20:41:23 | yglukhov | drewsrem. Now that's definitely Nim bug, because the C code is invalid. PLease submit it. |
| 20:43:14 | drewsrem | Araq, essentially a replacement for unions I have an object type that holds the type/kind and a payload as an untyped byte-array that holds the actualy event object, I then send this around in an event system, the id is supposed to encode an event hierarchy, maybe, anyway, eventually I need to look at the type/payload tuple, cast the payload to some object-type and send it to a callback the object-type specifies, so every |
| 20:43:14 | drewsrem | object should basically has a field where it adds (kind, callback) tuples, for what kind of event it listens to and some closure that gets executed, the signature/prototype/functionhead/whatever of the callback has to be generic tho because the callbacks should already take the event object as a parameter but there's no generics for proc-types for fields? - ... something along those lines |
| 20:43:25 | drewsrem | yglukhov, sure |
| 20:44:01 | drewsrem | Grammar much, it's late |
| 20:59:50 | * | renesac quit (Ping timeout: 272 seconds) |
| 21:04:06 | jck | why does this proc not work? proc bit_length(T: typedesc): int = sizeof(T)*8 |
| 21:04:35 | * | renesac joined #nim |
| 21:12:00 | * | NimBot joined #nim |
| 21:21:58 | * | Jehan_ joined #nim |
| 21:23:03 | Araq | jck: dunno but you can just use a template instead |
| 21:23:17 | * | Mat4 joined #nim |
| 21:27:32 | * | NimBot joined #nim |
| 21:28:08 | * | Mat4 quit (Quit: Konversation terminated!) |
| 21:28:38 | * | Mat4 joined #nim |
| 21:28:46 | Jehan_ | jck: It works for me (at least on devel)? |
| 21:29:52 | jck | I have this error: Error: cannot evalutate 'sizeof' because type is not defined completely |
| 21:31:49 | jck | This is what I'm trying to do: http://ix.io/kAW |
| 21:33:29 | Jehan_ | jck: The problem seems to be that T is a generic parameter, i.e. unknown. |
| 21:33:58 | Jehan_ | So the compiler can't infer the range type. |
| 21:37:36 | * | victor-rene quit (Ping timeout: 246 seconds) |
| 21:38:26 | * | golak quit (Quit: leaving) |
| 21:39:36 | * | boopsies is now known as boopsiesisaway |
| 21:40:17 | jck | Given that in my case, Reg s would only be declared at compile time, is there any way i could work around this? |
| 21:44:51 | * | Mat4 left #nim ("Konversation terminated!") |
| 21:52:19 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 21:52:32 | * | pregressive quit (Remote host closed the connection) |
| 21:55:29 | * | gokr quit (Quit: Page closed) |
| 21:55:52 | * | gokr_ quit (Remote host closed the connection) |
| 22:00:04 | * | BitPuffin|osx joined #nim |
| 22:03:38 | * | drewsrem quit (Quit: Leaving) |
| 22:04:16 | * | Trustable quit (Remote host closed the connection) |
| 22:14:17 | * | NimBot joined #nim |
| 22:15:31 | Araq | r-ku: are you looking into the coroutine crashes? I suspect your version of setjmp is not yet good enough? |
| 22:16:35 | * | jaco60 quit (Ping timeout: 244 seconds) |
| 22:18:40 | * | bendiken quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 22:19:50 | * | bendiken joined #nim |
| 22:22:33 | * | NimBot joined #nim |
| 22:25:45 | Jehan_ | jck: You can use a template with the type as a typedesc parameter to generate the procedure. |
| 22:27:54 | federico3 | Any way to put objects of different types in the same container and then call a method on each of them? |
| 22:29:54 | Jehan_ | jck: Simplified example here: https://gist.github.com/rbehrends/7a69285a917a306c0660 |
| 22:30:27 | Jehan_ | federico3: If they all inherit from the same type, yes. Just make it a container of the inherited type. |
| 22:31:15 | federico3 | Jehan_: that's what I've done. Unfortunately Nim runs the proc in the ancestor type |
| 22:31:16 | Jehan_ | If some of the objects aren't like that (i.e. ints or strings), wrap them in an inheritable type or a variant type and make it a container with elements of that type. |
| 22:31:53 | Jehan_ | federico3: There's currently a bug in method dispatch where if you have the ancestor method after the others, it'll intercept them. |
| 22:32:03 | Jehan_ | The ancestor method must come first in the file. |
| 22:32:28 | Jehan_ | I ran in that bug today because I was moving methods around and suddenly my code blew up. :) |
| 22:32:55 | federico3 | urgh, huge bug. But anyhow, only the ancestor method is being executed (and it was at the top |
| 22:33:29 | Jehan_ | federico3: Huh. That's weird. |
| 22:33:49 | Jehan_ | Are you using `ref object` or `object` types? |
| 22:34:09 | federico3 | ref object of RootObj |
| 22:34:24 | Jehan_ | Hmm. Then that can't be it. |
| 22:34:25 | federico3 | for the ancestor - and then ref of <ancestor> |
| 22:34:38 | Jehan_ | For what it's worth, I can't seem to reproduce it. |
| 22:34:56 | federico3 | 1 minute |
| 22:35:10 | gokr1 | Araq: Did you hear Mike Pall is leaving LuaJIT? |
| 22:35:12 | * | renesac quit (Ping timeout: 250 seconds) |
| 22:35:52 | * | renesac joined #nim |
| 22:36:30 | Araq | gokr1: yep |
| 22:36:47 | Araq | Jehan_: it's actually a really nasty bug to fix ... |
| 22:36:55 | Jehan_ | Araq: I'm not surprised. :) |
| 22:37:44 | Jehan_ | Araq: It's nothing that affects me personally, since (1) I know about it and (2) can avoid it. But it can create some really difficult to discover bugs if you are unaware. |
| 22:38:03 | Araq | I want some .dispatcher pragma annotation |
| 22:38:17 | Araq | so that at least I can report an error |
| 22:38:34 | Araq | plus it's really weird without it and Nim's effect system |
| 22:38:48 | Jehan_ | federico3: I have this here (and it works for me): https://gist.github.com/rbehrends/35cf5bf5ffc824a556d8 |
| 22:38:58 | federico3 | Jehan_: https://paste.debian.net/310165/ |
| 22:39:20 | Araq | actually I want to remove 'method' from the language but I know too much code now depends on it ... |
| 22:39:52 | * | brson quit (Quit: leaving) |
| 22:39:59 | Jehan_ | federico3: You're using procs, not methods. |
| 22:40:12 | * | brson joined #nim |
| 22:40:27 | Jehan_ | Araq: Any particular reason? |
| 22:40:53 | Araq | I never ever use them, when I need dynamic dispatch, I just use closures |
| 22:40:59 | * | wuehlmaus quit (Quit: Lost terminal) |
| 22:41:02 | Jehan_ | Well … I use them. |
| 22:41:12 | Jehan_ | Closures are just too much memory overhead for small objects. |
| 22:41:50 | Jehan_ | And variant types take up as much memory as the largest branch, so they don't always work, either. |
| 22:42:06 | federico3 | is there a solution that does not require methods? |
| 22:42:10 | Araq | you can always put the closures into your own vtable |
| 22:43:37 | Araq | as Demos said, x.vtbl.f(x, y) is not sexy, but overloading of '.' should work for that, or perhaps it needs some other form of sugar |
| 22:43:57 | Jehan_ | Araq: Not really. Closures have their environment. |
| 22:44:29 | * | NimBot joined #nim |
| 22:44:31 | Jehan_ | I could use procvars, but that means I'd essentially writing a lot of extra machinery. |
| 22:44:49 | Araq | yeah but that's what we have macros for |
| 22:44:57 | Jehan_ | For starters, I need a separate call operator like Lua in order to not explicitly pass the self argument again. |
| 22:45:22 | Jehan_ | Araq: Well, I don't always want to write my own sublanguage for every little thing. |
| 22:45:51 | Jehan_ | If it were a standard library, maybe, though I'm not sure how good compile times would be with macros everywhere. |
| 22:47:42 | Araq | for me it's just cruft that I need to support and test for 3 different backends |
| 22:48:00 | * | yglukhov quit (Remote host closed the connection) |
| 22:48:12 | Araq | so a macro based solution is far superior ;-) |
| 22:48:22 | Araq | cause then I can simply not care |
| 22:49:30 | Jehan_ | Araq: I'd be happy with a simpler OO system, to be honest, but then it also shouldn't be hard to support it in the compiler. |
| 22:49:33 | * | yglukhov joined #nim |
| 22:49:51 | Jehan_ | That said, extensible polymorphism is a fairly important feature IMO. |
| 22:53:40 | Araq | there are lots of problems with the current design |
| 22:53:58 | Jehan_ | Araq: I think it's unnecessarily ambitious. |
| 22:54:46 | Jehan_ | For example, multiple dispatch in particular is nice in theory, but has only so many practical applications over single dispatch. |
| 22:55:01 | Araq | for example: for true multiple dispatching, I can use lookup[x.id + y.id*col](x, y) |
| 22:55:28 | * | X67r quit (Quit: leaving) |
| 22:55:41 | Araq | and that's far more efficient than what Nim currently does |
| 22:56:01 | Araq | also the explicit Type IDs can be very handy for other serialization purposes |
| 22:56:18 | Jehan_ | if you know the ids beforehand. I thought we had discussed this earlier and there were problems with DLLs? |
| 22:57:12 | Araq | yeah but a homegrown manual solution can come up with better workarounds for DLLs as well |
| 22:57:45 | Araq | my point is: the homegrown solution beats the builtin solution. |
| 22:58:10 | Araq | and that's sad. |
| 22:59:25 | Araq | it's also what often happens in C++ frameworks, many roll their own object system, their own RTTI system, etc. |
| 22:59:37 | Jehan_ | By homegrown you mean what? Macros? |
| 23:00:15 | Araq | macros, qt's moc, going back to C |
| 23:01:06 | Jehan_ | Hmm. Is abandoning the current approach even an option, given that a fair amount of code is already using it? |
| 23:02:01 | Araq | no, but at least I can make people annotation the .dispatcher so that's clear "this is the guy which needs all the effect annotations" |
| 23:02:10 | Araq | *people annotate |
| 23:02:32 | Jehan_ | *nod* |
| 23:04:53 | federico3 | ehm, should I switch to methods for my simple use case? |
| 23:05:48 | Araq | federico3: yes |
| 23:06:04 | Araq | seems to be the solution you're most comfortable with |
| 23:06:35 | federico3 | and suggest using methods in https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers ? |
| 23:08:28 | federico3 | I mean, as long as they are not going to be deprecated |
| 23:10:45 | Araq | Jehan_: different topic: I made the threadpool aware of its limitations, meaning a thread doesn't spawn when all workers are busy, and instead the task is run on the thread that tried to spawn |
| 23:11:25 | Araq | but for the quicksort example it just stack overflows, because spawn directly calls 'f', f calls spawn and so on |
| 23:11:34 | Jehan_ | Araq: Hmm, not sure if it helps. The problem is generally waiting within a task. |
| 23:11:59 | Araq | well that's the obvious solution that C# also uses iirc |
| 23:12:03 | Jehan_ | And there's really no fix for it (other than coroutines, and then you have to explicitly yield when you wait). |
| 23:12:17 | Jehan_ | *nod* |
| 23:13:11 | Araq | if I manually use 'spawnX' instead of 'spawn' in the quicksort example, things work |
| 23:13:41 | Araq | template spawnX(f) = if allBusy(): f() else: spawn f() |
| 23:13:47 | Araq | so this works |
| 23:14:04 | Araq | but as soon as I move the f into the spawn I get an endless recursion |
| 23:14:10 | * | Kingsquee joined #nim |
| 23:14:15 | Araq | hrm difficult to explain |
| 23:14:48 | Jehan_ | federico3: Methods are the best solution for a number of circumstances. |
| 23:15:59 | * | irrequietus quit () |
| 23:16:05 | federico3 | oh, there is contains(string, string) but not contains(seq, string) |
| 23:16:26 | Jehan_ | Araq: Hmm. Not sure I'm following, but that maybe because I'm tired. |
| 23:17:42 | * | yglukhov quit (Remote host closed the connection) |
| 23:18:05 | Jehan_ | Anyhow, I'm off for the night. Take care. :) |
| 23:18:07 | * | Jehan_ quit (Quit: Leaving) |
| 23:28:03 | * | keyle joined #nim |
| 23:28:13 | Araq | federico3: pretty sure there is |
| 23:33:31 | * | vendethiel quit (Ping timeout: 265 seconds) |
| 23:37:24 | federico3 | actually there's contains on a slice or set or openarray |
| 23:38:24 | federico3 | I also really like: if <A> in <B> |
| 23:40:36 | Sornaensis | can I use nim to replace C++ |
| 23:40:53 | federico3 | Sornaensis: you are authorized to do so. |
| 23:40:59 | Sornaensis | thanks |
| 23:52:45 | * | unclechu quit (Quit: Leaving.) |