00:01:14 | Araq | geography? ok, how about this: http://www.iflscience.com/environment/africas-size-perspective |
00:01:17 | * | Enamex joined #nim |
00:05:32 | softinio | @dom96 @ekarlso How far along is nim-playpen ? |
00:06:05 | ekarlso | softinio: except what's been noted ^ it works.. |
00:09:44 | softinio | @ekarlso I missed what was noted :-) |
00:09:54 | ekarlso | softinio: read up ) |
00:10:59 | softinio | issues on github or earlier here ? |
00:11:31 | ekarlso | softinio: it crashes atm (the server componennt) with concurrency |
00:11:44 | softinio | ok |
00:19:00 | * | jaco60 quit (Quit: Leaving) |
00:31:22 | * | elrood quit (Quit: Leaving) |
00:55:45 | * | joelmo quit (Quit: Connection closed for inactivity) |
01:01:16 | * | enamex_ joined #nim |
01:02:49 | * | Enamex quit (Disconnected by services) |
01:02:56 | * | enamex_ is now known as Enamex |
01:10:05 | * | Enamex quit (Ping timeout: 265 seconds) |
01:10:34 | * | Enamex joined #nim |
01:14:16 | * | jakesyl joined #nim |
01:23:07 | * | indiagreen quit (Ping timeout: 256 seconds) |
01:31:08 | * | Enamex quit (Ping timeout: 246 seconds) |
01:31:48 | * | chemist69_ joined #nim |
01:34:39 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:41:59 | * | yglukhov joined #nim |
01:46:22 | * | yglukhov quit (Ping timeout: 246 seconds) |
01:51:05 | * | pregressive quit (Remote host closed the connection) |
02:14:35 | * | vendethiel joined #nim |
02:24:48 | * | jakesyl quit (Ping timeout: 240 seconds) |
02:37:37 | * | jakesyl joined #nim |
02:39:11 | tmm1 | i'm hitting this issue on mac osx 10.11 (el capitan) with openssl 1.0.2d_1 installed via homebrew: https://github.com/nim-lang/nimble/issues/142 |
02:47:04 | * | mal`` quit (K-Lined) |
02:51:31 | * | AndroUser quit (Ping timeout: 256 seconds) |
02:54:59 | * | mal`` joined #nim |
02:55:19 | * | Demon_Fox quit (Ping timeout: 240 seconds) |
02:56:00 | * | Demon_Fox joined #nim |
03:01:09 | * | Demon_Fox quit (Ping timeout: 256 seconds) |
03:01:38 | * | Demon_Fox joined #nim |
03:05:30 | * | vendethiel quit (Ping timeout: 240 seconds) |
03:06:12 | tmm1 | is there a compile time way to see if a symbol is defined in a dylib |
03:12:00 | * | jakesyl quit (Ping timeout: 240 seconds) |
03:13:27 | * | darkf joined #nim |
03:24:42 | * | jakesyl joined #nim |
03:32:47 | * | Demos quit (Read error: Connection reset by peer) |
03:53:37 | * | pregressive joined #nim |
04:09:56 | * | Raimondi left #nim ("WeeChat 1.3") |
04:12:50 | * | SirCmpwn quit (Ping timeout: 240 seconds) |
04:17:42 | * | strcmp2 joined #nim |
04:18:34 | * | SirCmpwn joined #nim |
04:20:01 | * | strcmp1 quit (Ping timeout: 240 seconds) |
05:00:13 | ryu0 | tmm1: manually or automatically? |
05:00:45 | ryu0 | tmm1: there's always the manual way of examining the ELF data of the shared library. |
05:04:51 | * | strcmp2 quit (Remote host closed the connection) |
05:05:58 | tmm1 | i'm on a mac, but nm would show it in either case. i'm more wondering if the nim compiler has a way to do it for ffi purposes |
05:09:18 | * | BitPuffin|osx quit (Ping timeout: 250 seconds) |
05:39:47 | * | MyMind joined #nim |
05:42:05 | * | Sembei quit (Ping timeout: 256 seconds) |
05:43:01 | tmm1 | nimsuggest vs nim idetools --suggest, is one better than the other? |
05:48:06 | * | smodo joined #nim |
05:49:58 | * | pregressive quit (Remote host closed the connection) |
05:51:03 | * | Demon_Fox quit (Ping timeout: 268 seconds) |
05:52:38 | * | Demon_Fox joined #nim |
06:05:30 | * | strcmp1 joined #nim |
06:10:25 | * | strcmp1 quit (Ping timeout: 256 seconds) |
06:19:47 | * | gokr joined #nim |
06:34:45 | gokr | tmm1: Ehm, I may be wrong, but isnt nimsuggest the "new" idetools? |
06:34:53 | gokr | Araq knows |
06:38:27 | * | Ven joined #nim |
06:56:14 | tmm1 | ok i wasn't sure which one was newer |
06:59:49 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:04:43 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:09:22 | * | Enamex joined #nim |
07:10:52 | * | Ven joined #nim |
07:11:25 | * | yglukhov joined #nim |
07:15:33 | * | tmm1 joined #nim |
07:16:01 | * | yglukhov quit (Ping timeout: 252 seconds) |
07:23:09 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:24:23 | * | yglukhov joined #nim |
07:24:48 | * | Ven joined #nim |
07:31:56 | * | Trustable joined #nim |
07:41:13 | * | jakesyl quit (Ping timeout: 240 seconds) |
07:53:11 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:56:04 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:02:45 | * | Ven joined #nim |
08:03:51 | * | Enamex quit (Ping timeout: 255 seconds) |
08:04:03 | * | Ven quit (Client Quit) |
08:07:25 | * | joelmo joined #nim |
08:08:53 | * | vasher_ joined #nim |
08:13:36 | * | coffeepot joined #nim |
08:21:39 | * | indiagreen joined #nim |
08:24:40 | * | bjz joined #nim |
08:27:09 | * | bjz quit (Client Quit) |
08:42:26 | * | indiagreen quit (Remote host closed the connection) |
08:42:39 | * | indiagreen joined #nim |
08:45:34 | coffeepot | Hey nimsters, just curious: why does Nim require a compiler flag to enable thread support? Is this to keep the exe lean (I thought Nim excluded stuff that wasn't used)? |
08:47:09 | coffeepot | or does threads: on change how the GC operates? |
09:06:40 | * | Ven joined #nim |
09:13:20 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
09:13:29 | * | coffeepot joined #nim |
09:13:50 | * | coffeepot quit (Client Quit) |
09:14:10 | * | coffeepot joined #nim |
09:15:52 | * | coffeepot quit (Client Quit) |
09:17:43 | * | coffeepot joined #nim |
09:19:42 | Araq | coffeepot: it mostly means that .thread vars are mapped to thread vars |
09:19:56 | Araq | with --threads:off they are just global variables |
09:20:20 | Araq | and yeah, the GC also does some special things then, but I don't remember the details |
09:21:15 | coffeepot | ok thanks Araq :) |
09:32:42 | tymat | osproc.kill(p: Process) doesn't seem to work on OS X |
09:42:46 | * | bjz joined #nim |
09:43:34 | dom96 | tymat: bug report please |
09:50:29 | * | bjz quit (Ping timeout: 244 seconds) |
09:51:37 | dom96 | Araq: Think it might be a good idea to warn people when they begin the names of their procs/methods with an uppercase letter? |
09:57:18 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:01:08 | * | Demon_Fox quit (Quit: Leaving) |
10:02:56 | * | iamd3vil joined #nim |
10:11:39 | * | zaquest quit (Quit: Leaving) |
10:13:00 | * | vasher_ quit (Quit: Connection closed for inactivity) |
10:15:47 | * | iamd3vil quit (Ping timeout: 264 seconds) |
10:18:16 | * | bjz joined #nim |
10:24:03 | * | Enamex joined #nim |
10:25:45 | * | joelmo quit (Quit: Connection closed for inactivity) |
10:41:02 | * | zaquest joined #nim |
10:45:49 | * | xet7_ quit (Ping timeout: 268 seconds) |
10:46:10 | * | xet7_ joined #nim |
10:48:52 | * | elrood joined #nim |
10:51:07 | * | strcmp1 joined #nim |
10:51:24 | * | xet7_ quit (Ping timeout: 264 seconds) |
10:51:46 | * | xet7_ joined #nim |
10:53:13 | * | Enamex quit (Ping timeout: 240 seconds) |
10:55:40 | vegansk | Can somebody point me, where is the rope for the symbol generated in c/c++ codegen? |
10:55:50 | * | vasher_ joined #nim |
10:57:30 | * | Enamex joined #nim |
10:57:32 | softinio | @dom96 what happens when proc names have uppercase first letter |
10:58:02 | dom96 | softinio: nothing, but convention is for types to have uppercase first letter |
10:58:22 | * | strcmp1 quit () |
11:02:59 | * | indiagreen quit (Ping timeout: 252 seconds) |
11:06:22 | * | indiagreen joined #nim |
11:07:46 | * | aziz joined #nim |
11:13:39 | * | Ven joined #nim |
11:15:58 | * | vegansk quit (Quit: Ухожу я от вас (xchat 2.4.5 или старше)) |
11:29:22 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:31:09 | * | razaaa joined #nim |
11:33:29 | * | Enamex quit (Ping timeout: 246 seconds) |
11:33:40 | * | indiagreen quit (Read error: Connection reset by peer) |
11:46:25 | * | jaco60 joined #nim |
11:46:26 | * | Ven joined #nim |
11:48:39 | * | Enamex joined #nim |
11:55:04 | * | iamd3vil joined #nim |
12:05:42 | softinio | something I am bit confused about |
12:07:14 | softinio | If my proc returns an object ref, will the object continue to exist after the proc finishes as long as I assign it to a var ? |
12:16:22 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:22:58 | * | Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png) |
12:32:53 | gokr | softinio: For refs its all about holding onto it. As long as you do so, somewhere, its not garbage collected. |
12:33:32 | softinio | @gokr Got it. Thats quite pleasant compared to C :-) |
12:33:41 | softinio | THX |
12:33:50 | softinio | meant thx |
12:37:25 | * | Ven joined #nim |
12:40:43 | * | aziz quit (Remote host closed the connection) |
12:42:25 | * | UberLambda joined #nim |
12:50:48 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:02:11 | * | Ven joined #nim |
13:03:00 | * | vasher_ quit (Quit: Connection closed for inactivity) |
13:03:26 | * | iamd3vil quit (Ping timeout: 246 seconds) |
13:05:14 | softinio | am I able to append two strtabs together using & or no ? Maybe I need to create & ? |
13:05:50 | dom96 | You need to create that. |
13:05:57 | dom96 | Would be nice to have in the stdlib so make a PR |
13:06:06 | softinio | ok got it thanks |
13:06:22 | softinio | Good Idea will make a PR, my first contribution to nim yay |
13:06:46 | * | BitPuffin joined #nim |
13:08:23 | softinio | @dom96 btw I love nim very impressed. Want to contribute to nim as much as possible. Will exclusively use nim from now on on all projects outside of work (which I have no choice over) going forward and advocate for it @Araq so count me in for anything I can help with |
13:09:37 | softinio | meant at work I have no choice what tech I use, but everything I have the choice I will use nim :-) |
13:10:19 | softinio | super excited |
13:12:28 | async_prince | hello |
13:12:33 | async_prince | i'm new to nim |
13:12:42 | async_prince | but what the plans about 1.0? |
13:28:05 | tymat | are there examples on how to setup a project with multiple .nim source files? |
13:31:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:32:38 | dom96 | softinio: awesome :D |
13:32:40 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:34:15 | dom96 | async_prince: We're trying to get it out asap, but resources are limited and the speed of development is not as fast as we would like. |
13:34:22 | dom96 | async_prince: Good news is that you can help :) |
13:35:00 | ryu0 | -crickets- |
13:35:01 | ryu0 | =p |
13:37:38 | * | bjz joined #nim |
13:38:17 | dom96 | ryu0: hrm? |
13:38:45 | dom96 | tymat: I think http://howistart.org/posts/nim/1 might have something |
13:39:09 | dom96 | tymat: but i'm curious what you would like to know? The directory layout or something else? |
13:44:05 | gokr | async_prince: One thing though, IMHO the version number of Nim shouldn't be discouraging. I have managed to reach perhaps 3000 loc on my own and we use it in our product etc, and ... well, IMHO when stuff compiles it *works*. |
13:50:28 | * | Ven joined #nim |
13:52:16 | * | pregressive joined #nim |
13:52:51 | softinio | @tymat why don't you look at nim projects on github? https://github.com/trending?l=nimrod |
13:52:58 | * | irrequietus joined #nim |
13:53:10 | softinio | ahhh github still knoes nim as nimrod |
13:56:54 | * | pregressive quit (Remote host closed the connection) |
13:57:53 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:01:44 | * | Sembei joined #nim |
14:13:45 | * | iamd3vil joined #nim |
14:15:56 | * | pregressive joined #nim |
14:17:24 | dom96 | softinio: yeah, github can't change it because of some issue |
14:19:46 | * | Ven joined #nim |
14:21:06 | * | Ven quit (Client Quit) |
14:25:27 | * | BitPuffin quit (Ping timeout: 255 seconds) |
14:26:26 | coffeepot | I'm having a problem using createThread. I'm getting this error message https://gist.github.com/coffeepots/9484fb3204971fa1ea46 |
14:26:36 | * | BitPuffin joined #nim |
14:26:52 | coffeepot | Is this telling me that this will only compile if my thread is GC safe and doesn't use locks? |
14:27:54 | * | Sornaensis quit (Excess Flood) |
14:28:00 | coffeepot | I'm using {.guard.} and {.locks.} for this thread, and I don't know how this would work with threads otherwise |
14:28:42 | * | Sornaensis joined #nim |
14:28:51 | dom96 | coffeepot: can you gist your code? |
14:28:57 | coffeepot | sure just a sec |
14:29:57 | coffeepot | https://gist.github.com/coffeepots/8b8c23332eae6a75005f |
14:30:12 | coffeepot | just wanted to try out a threaded logging module |
14:31:19 | dom96 | you need to mark your thread with the {.thread.} pragma |
14:31:23 | coffeepot | I might have got something wrong, my first real attempt at threading. I just got worried when I saw that the compiler *seems* to expect the thread to be gc safe - though perhaps I just misunderstand what gc safe means in this context? |
14:32:08 | * | BitPuffin quit (Ping timeout: 268 seconds) |
14:32:09 | coffeepot | dom96: where's that, on line 28 at the def of loggerThread? |
14:32:33 | dom96 | loggerWriteThread |
14:33:14 | coffeepot | ah right! now it says it's not GC safe, which is fair |
14:33:16 | * | Sembei quit (Ping timeout: 272 seconds) |
14:34:36 | coffeepot | ok thanks dom96, I guess I need to refactor this a bit to not use globals |
14:34:45 | * | rogercloud joined #nim |
14:35:06 | dom96 | yeah |
14:35:30 | coffeepot | :) silly me! |
14:38:06 | * | iamd3vil quit (Ping timeout: 240 seconds) |
14:39:33 | * | iamd3vil joined #nim |
14:40:14 | * | irrequietus quit () |
14:40:15 | tymat | I'm trying to find how to setup an AF_UNIX (socket IPC) connection but I don't see it in http://nim-lang.org/docs/net.html or http://nim-lang.org/docs/rawsockets.html |
14:43:14 | def- | tymat: i see AF_UNIX in rawsockets |
14:45:48 | tymat | yes, the enum for Domain exists but no way to pass a socket file |
14:48:30 | def- | might have to use the posix module or add functionality to rawsockets that does that |
14:51:23 | * | iamd3vil quit (Ping timeout: 250 seconds) |
14:51:56 | tymat | seems like that's the case |
14:54:26 | coffeepot | What's the work around for this: "withLock( logger.lock ):" -> Error: identifier expected, but found 'logger.lock' |
14:55:06 | coffeepot | I can't use a var 'alias' because IIRC that will copy, and the log needs to be modified. Can't use let for obvious reasons. |
14:56:32 | coffeepot | is this a catch with template parameters? How do I pass <object>.<variable> in this case? |
14:57:46 | coffeepot | the template is defined as "template withLock(lock: var Lock, actions: stmt): stmt {.immediate.} =" |
15:04:16 | dom96 | tymat: This PR implements them: https://github.com/nim-lang/Nim/pull/3326 |
15:04:31 | dom96 | Would be cool if you could polish that PR. |
15:04:42 | rogercloud | coffeepot: a pointer? |
15:05:34 | coffeepot | cheers rogercloud, yeah I guess so. I was trying to avoid them but I suppose with multithreading there's no other way. Kinda surprised by the template param thing though |
15:06:00 | dom96 | what is logger.lock? |
15:06:03 | dom96 | where is it defined? |
15:06:34 | coffeepot | it's passed to the thread as the argument |
15:07:26 | coffeepot | it's of type Logger and contains lock: Lock; filename: string; and queue: Queue[LogData] |
15:08:18 | rogercloud | the same as the pass channel to thread problem, a pointer is always a walk-around in this scenario |
15:08:42 | coffeepot | to be honest, I think I need to rethink this whole exercise. I was hoping to just chuck something out quickly but threading isn't straightforward here |
15:10:54 | * | darkf quit (Quit: Leaving) |
15:11:34 | * | Ven joined #nim |
15:13:33 | rogercloud | related to coffeepot's question, what's the shortcoming when using pointer instead of var parameter? |
15:19:18 | * | Enamex quit (Ping timeout: 265 seconds) |
15:26:20 | Araq | coffeepot: try template withLock(L, actions) = ... |
15:28:13 | coffeepot | Araq: Cheers, that worked :D |
15:36:47 | * | razaaa quit (Ping timeout: 264 seconds) |
15:41:31 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:41:59 | * | razaaa joined #nim |
15:42:23 | * | rogercloud quit (Ping timeout: 252 seconds) |
15:43:30 | * | rogercloud joined #nim |
15:44:10 | * | rogercloud quit (Client Quit) |
15:48:55 | * | Ven joined #nim |
15:50:05 | * | Ven quit (Client Quit) |
15:50:57 | federico3 | dom96: the forum is down |
15:51:56 | dom96 | shit. Fixed |
15:52:15 | coffeepot | wow that was quick! |
15:54:33 | * | FedeOmoto joined #nim |
15:54:42 | dom96 | well, I restarted it |
15:54:46 | dom96 | Haven't fixed the root cause yet |
15:55:54 | coffeepot | fwiw, I got the threading logger running https://gist.github.com/coffeepots/04f049e24066de0be09f |
15:56:06 | coffeepot | thanks everyone for the help :) |
15:56:34 | coffeepot | probably gonna expand it out so it's useful and pop it on github |
15:56:52 | * | vasher_ joined #nim |
16:01:03 | coffeepot | I note that it's not really doing what it should be (only logs one msg per cycle lol) but hey, it runs! |
16:04:27 | * | strcmp1 joined #nim |
16:09:30 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:10:50 | * | BitPuffin joined #nim |
16:11:24 | * | jakesyl joined #nim |
16:11:24 | * | smodo quit (Quit: Leaving) |
16:12:19 | * | yglukhov_ joined #nim |
16:15:19 | * | razaaa quit (Ping timeout: 240 seconds) |
16:15:52 | * | yglukhov quit (Ping timeout: 272 seconds) |
16:16:26 | * | yglukhov_ quit (Ping timeout: 240 seconds) |
16:28:50 | * | jakesyl quit (Ping timeout: 240 seconds) |
16:30:54 | * | razaaa joined #nim |
16:33:40 | * | Ven joined #nim |
16:41:05 | * | jakesyl joined #nim |
16:41:43 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:42:36 | * | Enamex joined #nim |
16:47:59 | * | irrequietus joined #nim |
16:54:02 | * | jakesyl quit (Ping timeout: 240 seconds) |
16:58:41 | * | Matthias247 joined #nim |
16:59:44 | * | enamex_ joined #nim |
17:01:54 | * | Enamex quit (Ping timeout: 244 seconds) |
17:06:00 | * | Guest20403isaway is now known as Guest20403 |
17:11:38 | * | enamex_ quit (Ping timeout: 240 seconds) |
17:16:49 | * | umurgdk joined #nim |
17:17:27 | * | yglukhov joined #nim |
17:21:34 | * | yglukhov quit (Ping timeout: 246 seconds) |
17:24:48 | * | jakesyl joined #nim |
17:28:29 | * | elrood quit (Remote host closed the connection) |
17:33:04 | * | elrood joined #nim |
17:34:25 | * | Enamex joined #nim |
17:46:26 | * | irrequietus quit () |
17:48:58 | * | vendethiel joined #nim |
17:49:34 | * | temp201509232049 joined #nim |
17:52:31 | * | strcmp2 joined #nim |
17:56:34 | * | strcmp1 quit (Ping timeout: 272 seconds) |
17:58:47 | * | strcmp2 quit (Ping timeout: 252 seconds) |
17:58:48 | * | smodo joined #nim |
18:02:32 | * | yglukhov joined #nim |
18:05:00 | * | strcmp1 joined #nim |
18:06:24 | * | strcmp2 joined #nim |
18:09:25 | * | strcmp1 quit (Ping timeout: 252 seconds) |
18:09:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
18:22:25 | * | strcmp2 quit () |
18:33:00 | * | vasher_ quit (Quit: Connection closed for inactivity) |
18:34:02 | * | smodo quit (Quit: Leaving) |
18:36:50 | NimBot | nim-lang/Nim devel c738648 The Gitter Badger [+0 ±1 -0]: Add Gitter badge |
18:36:50 | NimBot | nim-lang/Nim devel d12d81a Dominik Picheta [+0 ±1 -0]: Merge pull request #3366 from gitter-badger/gitter-badge... 2 more lines |
18:37:23 | NimBot | nim-lang/Nim devel ac3cc14 Dominik Picheta [+0 ±1 -0]: Add newline after Gitter image |
18:42:35 | * | BitPuffin quit (Ping timeout: 246 seconds) |
18:55:54 | * | UberLambda quit (Quit: GTG) |
19:02:44 | * | tmm1 joined #nim |
19:03:20 | Araq | dom96: does your async macro do anything with nnkBracketExpr? |
19:03:43 | dom96 | Araq: Probably. What is nnkBracketExpr? |
19:03:58 | Araq | a[i] # array access |
19:04:25 | Araq | but of course it can also be HashSet[T] |
19:04:57 | * | irrequietus joined #nim |
19:05:53 | Araq | # Verify that the return type is a Future[T] |
19:05:55 | Araq | -.- |
19:06:28 | dom96 | yep |
19:06:35 | Araq | what the fuck? |
19:06:36 | dom96 | I use it a lot it looks like. |
19:06:50 | Araq | if returnType.kind == nnkIdent: |
19:06:51 | Araq | error("Expected return type of 'Future' got '" & $returnType & "'") |
19:06:53 | Araq | elif returnType.kind == nnkBracketExpr: |
19:07:08 | Araq | so if it's any kind of ident it's not "Future"? |
19:07:22 | dom96 | ? |
19:07:28 | Araq | and if it's not a bracketexpr, you don't check anything? |
19:07:37 | Araq | type Foo = Future[string] |
19:07:41 | dom96 | That makes sure the proc's return type if a Future[T] |
19:07:42 | dom96 | *is |
19:07:50 | Araq | proc p(): Foo {.async.} |
19:07:55 | Araq | # fails?! |
19:07:57 | dom96 | yes |
19:08:21 | Araq | well it's wrong |
19:08:31 | dom96 | Sure, but it's not a big deal. |
19:08:49 | dom96 | Now we can use the type API to check this I guess? |
19:08:55 | Araq | you need at least an 'else' for kind == bracketexpr |
19:09:25 | Araq | otherwise it's just some arbitrary logic ... |
19:10:11 | Araq | oh well, let me fix it |
19:10:39 | dom96 | Don't get why you're getting so worked up over it? |
19:10:45 | dom96 | it's simple to fix |
19:11:06 | Araq | it's bug #3356 |
19:11:27 | Araq | and it annoys me cause I like to do something else |
19:12:44 | dom96 | why did it suddenly start failing for dhertz? |
19:13:26 | dom96 | if the fix is that simple then I can do it, but the error seems very cryptic |
19:14:16 | Araq | don't worry, I'm fixing it |
19:14:22 | Araq | the AST changed |
19:14:37 | Araq | a[i] is rewritten to `[]`(a, i) in templates |
19:14:52 | Araq | causing your async macro to not detect the return type properly |
19:17:02 | Araq | if prc[0].getName == "hubConnectionLoop": |
19:17:03 | Araq | echo(toStrLit(result)) # debug leftover? |
19:17:17 | dom96 | yes |
19:17:26 | dom96 | you can comment it out |
19:17:27 | Araq | remove or comment out? |
19:18:15 | * | xet7_ quit (Read error: Connection reset by peer) |
19:18:33 | * | xet7_ joined #nim |
19:19:20 | Araq | so ... what should the macro do with 'type(int)' for example? |
19:19:35 | Araq | proc foo(): type(int) {.async.} |
19:19:42 | Araq | error? |
19:19:51 | Araq | error("Expected return type of 'Future' got '" & $returnType & "'") |
19:21:33 | dom96 | yes |
19:21:44 | dom96 | Future needs to be explicit |
19:22:02 | dom96 | you don't need Future[void] though |
19:22:11 | dom96 | so no type means Future[void] |
19:22:53 | reactormonk | dom96, Future[void] may be relevant when you're waiting for a side effect? |
19:23:00 | Araq | is it too late to make macros.`$` sane? |
19:23:21 | dom96 | reactormonk: what do you mean? |
19:23:27 | dom96 | You can have Future[void] |
19:23:57 | dom96 | Araq: what's insane about it? |
19:24:18 | Araq | it's fragile and stupid |
19:24:36 | Araq | instead of turning the AST into a string it only works on identifier-like ASTs |
19:25:07 | dom96 | then perhaps it should be renamed |
19:25:50 | dom96 | I would rather get an error than get some strange string in my macro |
19:26:01 | * | ozra joined #nim |
19:27:16 | Araq | well yeah |
19:27:25 | Araq | I'm deprecating it for now |
19:27:33 | Araq | new name: identAsStr |
19:29:44 | dom96 | I think getIdentStr would be better |
19:30:13 | Araq | er ... we don't have a good $ for NimNode at all? |
19:30:25 | dom96 | I think `$` is new enough not to have been in a release |
19:30:34 | dom96 | hrm, or maybe not |
19:30:38 | Araq | no, it's old. |
19:32:43 | Araq | ah I mapped 'repr' to Nim's pretty printer. smart... |
19:32:50 | * | yglukhov quit (Remote host closed the connection) |
19:33:05 | Araq | who knows that repr is overloaded for NimNode to mean something else? |
19:38:40 | Araq | yay. Fixed it. |
19:41:14 | * | aziz joined #nim |
19:43:30 | * | yglukhov joined #nim |
19:50:29 | NimBot | nim-lang/Nim devel 90d1ad4 Araq [+0 ±3 -0]: made disjoint checker smarter; fixes regressions |
19:50:29 | NimBot | nim-lang/Nim devel f937637 Araq [+1 ±1 -0]: fixes #3357 |
19:50:29 | NimBot | nim-lang/Nim devel 000c413 Araq [+1 ±2 -0]: disjoint checker is smarter (and slower) |
19:50:29 | NimBot | nim-lang/Nim devel ec357a3 Araq [+0 ±0 -1]: deleted graphics module; it's a Nimble package now |
19:50:29 | NimBot | 1 more commits. |
20:11:15 | dom96 | Araq: nice |
20:12:41 | Araq | fortunately I knew where to look ;-) |
20:12:57 | Araq | could have been a hard bug |
20:13:38 | reactormonk | headshot? |
20:17:14 | * | jakesyl joined #nim |
20:17:35 | * | FedeOmoto_ joined #nim |
20:19:07 | NimBot | nim-lang/Nim devel 6fa01e3 Nycto [+0 ±1 -0]: Extend option functionality |
20:19:07 | NimBot | nim-lang/Nim devel 0906bf5 Dominik Picheta [+0 ±1 -0]: Merge pull request #3321 from Nycto/devel... 2 more lines |
20:19:56 | * | FedeOmoto quit (Ping timeout: 265 seconds) |
20:21:56 | * | elrood quit (Remote host closed the connection) |
20:27:48 | dom96 | So yeah, we have a gitter chat room now too https://gitter.im/nim-lang/Nim |
20:43:40 | * | elrood joined #nim |
20:48:24 | * | pregressive quit (Remote host closed the connection) |
20:48:39 | * | pregressive joined #nim |
20:50:01 | NimBot | nim-lang/Nim devel 2210060 Araq [+0 ±2 -0]: fixes #3359 |
20:56:07 | * | FedeOmoto_ is now known as FedeOmoto |
20:57:36 | * | indiagreen joined #nim |
21:00:54 | indiagreen | I have a huge global array and a function that reads from that array (but doesn't write into any global variable) and produces a value. I want to run this function several times in parallel, so I'm trying to use spawn, but I'm told “Warning: 'score' is not GC-safe as it accesses 'user_reached' which is a global using GC'ed memory”. What can I do about it? |
21:01:58 | Araq | indiagreen: depends on your problem |
21:02:44 | * | enamex_ joined #nim |
21:05:14 | * | Enamex quit (Ping timeout: 240 seconds) |
21:05:54 | Araq | indiagreen: you can cast your proc to a proc (<signature_here) {.nimcall, gcsafe.} to make the compiler shut up |
21:06:22 | indiagreen | would it cause subtle and devious bugs? |
21:07:01 | indiagreen | I don't like circumventing restrictions when I've no idea whatsoever what the consequences could be |
21:07:09 | Araq | readonly doesn't mean it's safe. |
21:07:28 | Araq | otherwise the compiler would only check for write accesses to globals |
21:08:50 | Araq | if you use something like let someStr = global[i] it's safe due to the copying semantics of strings. |
21:09:13 | Araq | if you read a 'ref' however, it's pretty much unsafe. |
21:09:40 | * | razaaa quit (Quit: Leaving) |
21:09:59 | * | Trustable quit (Quit: Leaving) |
21:11:53 | indiagreen | okay, so int would be safe as well? (I mean, the array is seq[int] and so the accessed value is an int and if strings are copied then I'd expect ints to be copied as well) |
21:12:18 | Araq | yeah, that's perfectly fine |
21:13:03 | Araq | in fact, it's something the compiler could allow out of the box |
21:14:18 | indiagreen | thanks! Is there some place where I could read about the no heap sharing restriction (if this is the culprit here) in greater detail? I only found 1 sentence about it in the manual (“it is invalid to construct a data structure that consists of memory allocated from different (thread local) heaps”) and it wasn't enlightening to me, probably because I haven't used concurrency that much before |
21:14:57 | * | enamex_ quit (Ping timeout: 255 seconds) |
21:15:53 | Araq | well it used to be worse. Now the compiler's checking is sound. (Some warning need to become errors though.) |
21:16:31 | Araq | so if the compiler doesn't complain (and you do not use unsafe constructs), it's fine. |
21:17:08 | Araq | sorry, the docs are still sparse. |
21:18:33 | * | aziz quit (Remote host closed the connection) |
21:24:15 | * | elrood quit (Quit: Leaving) |
21:27:46 | indiagreen | Araq: {.nimcall, gcsafe.} didn't make it shut up :( |
21:28:31 | indiagreen | same warning (well, okay, an error already but the same error message) |
21:29:37 | indiagreen | hm, wait, no |
21:29:38 | indiagreen | “cast” |
21:29:50 | Araq | yup |
21:29:55 | indiagreen | and I just added an annotation to the original proc |
21:30:03 | Araq | yeah I figured |
21:30:21 | indiagreen | okay, right, sorry for not reading carefully |
21:30:44 | NimBot | nim-lang/Nim devel 10a4bb6 Araq [+0 ±1 -0]: fixes 3354 |
21:35:49 | * | Kingsquee joined #nim |
21:37:22 | * | Guest20403 is now known as Guest20403isaway |
21:54:13 | * | tinAndi joined #nim |
22:06:22 | * | indiagreen quit (Read error: Connection reset by peer) |
22:11:22 | * | yglukhov quit (Remote host closed the connection) |
22:20:48 | * | FedeOmoto quit (Quit: Leaving) |
22:32:11 | * | tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
22:34:15 | * | BitPuffin|osx joined #nim |
22:34:31 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:37:20 | * | slyy joined #nim |
22:37:26 | * | strcmp1 joined #nim |
22:37:56 | * | slyy left #nim (#nim) |
22:39:33 | * | vendethiel quit (Ping timeout: 255 seconds) |
22:45:08 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:46:14 | * | jakesyl_mac quit (Quit: Leaving) |
22:46:33 | * | jakesyl quit (Read error: Connection reset by peer) |
22:47:04 | * | jakesyl_mac joined #nim |
22:47:05 | * | jakesyl joined #nim |
22:51:19 | * | jaco60 quit (Ping timeout: 240 seconds) |
22:56:22 | * | jaco60 joined #nim |
23:02:25 | * | bjz joined #nim |
23:03:51 | * | strcmp1 quit (Ping timeout: 252 seconds) |
23:05:10 | * | pregressive quit (Remote host closed the connection) |
23:08:48 | * | jakesyl quit (Ping timeout: 264 seconds) |
23:10:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:19:10 | * | keyle joined #nim |
23:19:40 | * | jakesyl joined #nim |
23:22:00 | * | irrequietus quit () |
23:25:36 | * | Demon_Fox joined #nim |
23:30:11 | * | Demos joined #nim |
23:39:32 | * | gokr quit (Quit: Leaving.) |
23:42:54 | * | ozra quit (Ping timeout: 246 seconds) |
23:44:01 | * | wan joined #nim |
23:58:23 | * | Demon_Fox quit (Quit: Leaving) |
23:58:43 | * | Demon_Fox joined #nim |