00:11:50 | krux02 | Araq_: what is the future of the getType proc? |
00:12:11 | Araq_ | we fix it? |
00:12:28 | Araq_ | would be nice if somebody could do it that is not me. |
00:13:03 | krux02 | Ok I can understand that |
00:13:11 | krux02 | but how is the desired behavior |
00:14:54 | krux02 | getType sometimes returs a symbol, sometimes the implementation of the type, and sometimes in case of the builtin Seq actually useful information |
00:15:32 | Araq_ | read my latest remark about this? |
00:16:09 | krux02 | do you mean the optional parameter? |
00:16:14 | Araq_ | yeah. |
00:16:26 | Araq_ | maybe it shouldn't even be optional at all. |
00:16:47 | Araq_ | code breaks at compile-time then, but that's fine for this feature. |
00:17:00 | krux02 | do you know the reflection api from go? |
00:17:32 | Araq_ | no. |
00:18:10 | krux02 | I like it's simplicity. |
00:19:05 | krux02 | but the type system of go is very similar to nim, because a type can be a struct, or just a distinct int or float etc |
00:19:22 | krux02 | so the underlying concept is similar |
00:23:13 | Araq_ | the point of getType is to map *types* to *ASTs* to leverage the existing AST features. |
00:23:30 | Araq_ | Go does nothing like that. |
00:23:38 | krux02 | yes that's true |
00:25:39 | krux02 | what do you think about the idea, that get type returns a symbol, where getImpl returns the actual implementation? |
00:27:16 | krux02 | I am also thinking of generic types, because on generic types, getType actually does return a symbol, but completely drops the generic part of the type |
00:28:30 | Araq_ | there is a huge difference between breaking clearly the existing getType() at compile-time and to subtly alter its behaviour. |
00:28:50 | Araq_ | and getImpl() was not designed for types at all. |
00:29:33 | Araq_ | we can also make getType() return a tuple (name, impl). |
00:30:11 | Araq_ | that is also a clear breaking change where existing macros do not suddenly start to produce weird results that you then have to debug |
00:31:35 | Araq_ | the enum solution has the advantage though that we can do: type GetTypeMode = enum legacy, name, impl |
00:32:03 | Araq_ | proc getType(n: NimNode; mode = legacy) and break nothing at all. |
00:32:37 | Araq_ | and since getType is already used quite a bit afaict that might be the best solution. |
00:32:58 | krux02 | I am not convinced of default legacy (deprecated) behavior, but otherwise I do agree |
00:34:33 | krux02 | how do you think about generic types, neither the name, nor the impl contain the value of T |
00:34:51 | Araq_ | the impl does? |
00:35:03 | Araq_ | ok, sometimes not. |
00:35:17 | Araq_ | so that's another enum value then. |
00:35:58 | Araq_ | and now make it happen, we can discuss the details in the PR. The existing PRs were rejected because the code breakage was not well thought out. |
00:38:18 | krux02 | I wrote a comment in the pull request |
00:38:27 | krux02 | I don't know if you read it |
00:40:31 | Araq_ | " # MyType generic type is gone, it's just a symbol" |
00:40:45 | Araq_ | I think you misunderstand the "just a symbol" thing. |
00:41:04 | Araq_ | if you have a symbol, you can go 1 level deeper with another 'getType' call on it. |
00:41:19 | krux02 | ok? |
00:42:26 | Araq_ | and that's not a bad hack. It's perhaps subtle to understand granted. But it ensures the trees getType are "lazy" in the sense that you never get an infinite tree. |
00:42:49 | Araq_ | think about it. We map a cyclic structure to a tree. |
00:43:07 | Araq_ | we better don't return an infinite tree. |
00:45:07 | Araq_ | this means you can in general work with types without having to care about infinite recursions everywhere. Well that was the intention anyway. Maybe it doesn't work out in practice. |
00:45:46 | krux02 | ok, I tested the .getType.getType thing |
00:46:26 | krux02 | seems to be interesting |
00:48:39 | krux02 | but I really would like if own generic types and seq behave the same |
00:49:28 | Araq_ | in your example you give the seq no name at all but you do introduce an alias for your generic. |
00:49:46 | Araq_ | how can getType possibly yield the same for that? |
00:51:44 | krux02 | what do you mean I give no name to seq? |
00:53:26 | krux02 | the problem I have is, that seq looks like a type with one generic parameter, like std::vector<int> in c++, but it doesn't behave like that |
00:54:19 | Araq_ | no? |
01:00:08 | krux02 | en expression with the type seq[int] actually returns with getType the bracket expression including the int, but in generic types, the bracket expression is gone, it's only the symbol |
01:00:20 | krux02 | I pudated the comment in the pull request again |
01:01:30 | krux02 | i wrote what I think is a consistent behavior, when getType returns two values, the name including the generic parameters, and the implementation on the right |
01:01:41 | krux02 | build in types do not return an implementation |
01:07:11 | * | shodan45 quit (Quit: Konversation terminated!) |
01:07:30 | * | Trustable quit (Remote host closed the connection) |
01:09:25 | * | fedons quit (Quit: This computer has gone to sleep) |
01:14:55 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:22:21 | dom96 | Nimble 0.7.0! http://forum.nim-lang.org/t/1912 |
01:41:16 | * | CaptainBland joined #nim |
01:44:21 | * | bamorim joined #nim |
01:49:37 | * | filius joined #nim |
01:52:02 | krux02 | good night people |
01:52:07 | * | krux02 quit (Quit: Verlassend) |
02:00:32 | * | pregressive quit (Remote host closed the connection) |
02:38:29 | * | def- quit (Ping timeout: 245 seconds) |
03:06:32 | * | vendethiel quit (Ping timeout: 256 seconds) |
03:11:52 | * | vendethiel joined #nim |
03:32:26 | * | vendethiel quit (Ping timeout: 240 seconds) |
03:34:18 | * | bigfondue quit (Remote host closed the connection) |
03:34:32 | * | bigfondue joined #nim |
04:16:23 | * | bamorim quit (Ping timeout: 264 seconds) |
05:20:50 | * | vikaton quit () |
05:24:47 | * | filius quit (Quit: Leaving) |
05:44:34 | * | zepolen joined #nim |
05:49:12 | * | darkf joined #nim |
05:53:37 | * | Demon_Fox quit (Quit: Leaving) |
07:04:36 | * | CaptainBland quit (Ping timeout: 252 seconds) |
07:40:53 | * | desophos quit (Read error: Connection reset by peer) |
07:47:47 | * | yglukhov joined #nim |
08:23:14 | * | yglukhov quit (Remote host closed the connection) |
08:53:36 | * | yglukhov joined #nim |
09:41:52 | M-max | Qq on nim 0.12.0. I've written a proc that claims to raise only MyError |
09:42:26 | M-max | which looks like it's the out of memory exception. Surely anything could throw out of memory? |
09:42:39 | M-max | but when I try to compile it, I get: c:\nim\lib\system\mmdisp.nim(64, 6) Error: can raise an unlisted exception: Exception |
09:43:26 | M-max | (apologies for out-of-orderness) |
09:45:43 | * | fedons joined #nim |
09:57:42 | Araq_ | Out of memory is not exception in Nim. |
09:57:55 | Araq_ | it always makes the program die. |
10:00:27 | M-max | Then why is it telling me that an exception is thrown? |
10:01:35 | Araq_ | do you call raiseOutOfMem() ? |
10:01:48 | M-max | No |
10:02:09 | M-max | (Though obviously I do allocate stuff) |
10:03:19 | Araq_ | do you allocate with alloc()? |
10:03:54 | Araq_ | (or alloc0 or one of its siblings) |
10:04:32 | * | fedons quit (Quit: This computer has gone to sleep) |
10:06:35 | * | vendethiel joined #nim |
10:21:54 | * | HakanD joined #nim |
10:25:25 | * | fedons joined #nim |
10:44:42 | * | jaco60 joined #nim |
10:47:17 | * | federico3 joined #nim |
10:50:04 | federico3 | WTF "This release does not support Nim 0.12.0" |
10:52:06 | * | yglukhov quit (Remote host closed the connection) |
10:52:53 | * | yglukhov joined #nim |
10:54:06 | * | Gonzih quit (Quit: WeeChat 1.3) |
10:55:18 | * | fedons_ joined #nim |
10:57:35 | * | yglukhov quit (Ping timeout: 255 seconds) |
10:58:29 | * | fedons quit (Ping timeout: 245 seconds) |
11:11:46 | * | deavmi_mobile quit (Ping timeout: 250 seconds) |
11:24:35 | M-max | Araq: no, I'm not ready for special tricks. There are no ptrs, just refs |
11:28:49 | * | yglukhov joined #nim |
11:43:49 | * | gokr joined #nim |
11:45:26 | * | vendethiel quit (Quit: q+) |
11:48:18 | * | def- joined #nim |
11:55:51 | * | deavmi_mobile joined #nim |
12:07:19 | * | fedons_ quit (Quit: This computer has gone to sleep) |
12:11:39 | * | fedons_ joined #nim |
12:18:46 | * | fedons_ quit (Quit: This computer has gone to sleep) |
12:21:29 | * | deavmi_mobile quit (Ping timeout: 276 seconds) |
12:31:46 | * | JStoker quit (Ping timeout: 240 seconds) |
12:32:07 | * | deavmi_mobile joined #nim |
12:32:16 | * | filcuc joined #nim |
12:37:46 | * | JStoker joined #nim |
12:39:29 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
12:44:41 | * | Trustable joined #nim |
13:05:19 | * | zepolen quit (Remote host closed the connection) |
13:11:53 | * | fedons joined #nim |
13:17:59 | * | bamorim joined #nim |
13:22:14 | * | Trustable quit (Remote host closed the connection) |
13:34:14 | * | HakanD quit (Quit: Be back later ...) |
13:34:47 | * | HakanD joined #nim |
13:39:58 | * | HakanD quit (Ping timeout: 250 seconds) |
13:46:09 | bbl_ | https://gist.github.com/baabelfish/0481747919e2d15ad7fc I'm still clueless how to pass this kind of generic functionality around in nim. How can I wrap generics in Nim or should I do something different? |
13:47:51 | * | JStoker quit (Excess Flood) |
13:52:23 | * | JStoker joined #nim |
13:55:15 | * | JStoker quit (Excess Flood) |
13:56:04 | * | yglukhov quit (Remote host closed the connection) |
13:56:35 | * | def- quit (Ping timeout: 240 seconds) |
14:01:55 | * | def- joined #nim |
14:11:10 | * | JStoker joined #nim |
14:16:42 | * | JStoker quit (Ping timeout: 250 seconds) |
14:17:55 | * | def- quit (Ping timeout: 240 seconds) |
14:21:55 | * | def- joined #nim |
14:22:55 | * | JStoker joined #nim |
14:24:57 | * | JStoker quit (Excess Flood) |
14:25:56 | * | JStoker joined #nim |
14:28:06 | * | JStoker quit (Excess Flood) |
14:32:57 | * | JStoker joined #nim |
14:34:04 | * | def- quit (Ping timeout: 276 seconds) |
14:36:36 | * | HakanD joined #nim |
14:39:26 | * | def- joined #nim |
14:41:14 | * | HakanD quit (Ping timeout: 255 seconds) |
14:42:01 | * | yglukhov joined #nim |
14:46:43 | * | JStoker quit (Excess Flood) |
14:50:28 | * | JStoker joined #nim |
14:53:34 | * | JStoker quit (Excess Flood) |
14:53:59 | * | JStoker joined #nim |
14:59:04 | * | JStoker quit (Excess Flood) |
15:03:04 | * | bamorim quit (Ping timeout: 245 seconds) |
15:03:23 | * | yglukhov quit (Remote host closed the connection) |
15:06:29 | Araq_ | bbl_: doSomething(2.3, `+`) where doSomething is a template ? |
15:07:50 | Araq_ | M-max: report it properly then please. |
15:08:33 | M-max | Will do - thanks! |
15:12:17 | bbl_ | Araq_: can I store template to a dynamically changing variable? |
15:12:47 | Araq_ | you can pass templates around too. |
15:12:48 | bbl_ | but then again that's out of that scope... |
15:12:54 | bbl_ | ah nice |
15:13:14 | Araq_ | is your C++ actually valid? |
15:13:23 | bbl_ | Araq_: yes |
15:13:26 | bbl_ | for c++17 |
15:13:51 | bbl_ | works with older c++ when auto function arguments are replaced with template typenames T and G |
15:13:54 | Araq_ | the constexpr that refers to an implicit generic struct seems a pita to support. ;-) |
15:14:14 | bbl_ | ;D |
15:14:23 | bbl_ | c++ is a wonderful language |
15:14:46 | bbl_ | some parts of it at least |
15:14:48 | Araq_ | I agree in theory. |
15:15:13 | Araq_ | In practice header files and -> alone make me want to commit suicide. |
15:15:17 | * | fedons quit (Quit: This computer has gone to sleep) |
15:15:30 | * | bamorim joined #nim |
15:16:16 | bbl_ | Araq_: header only template libs then :D |
15:16:37 | bbl_ | hopefully the modules come some day |
15:17:10 | bbl_ | I would prefer that Nim 1.0 is out before that |
15:17:24 | bbl_ | How about that for a hard deadline? :D |
15:17:40 | Araq_ | my hard deadline was today -.- |
15:18:27 | bbl_ | for 1.0? |
15:19:49 | Araq_ | yeah. |
15:27:21 | * | yglukhov joined #nim |
15:34:26 | * | polde joined #nim |
15:41:52 | bbl_ | Araq_: What opinions you have of the language? Do you have thoughts that you should have done something differently? |
15:47:25 | * | HakanD joined #nim |
15:53:08 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
15:53:15 | * | deavmi_mobile2 joined #nim |
15:55:42 | * | HakanD quit (Quit: Be back later ...) |
15:56:14 | * | HakanD joined #nim |
16:00:53 | * | HakanD quit (Ping timeout: 255 seconds) |
16:21:35 | Araq_ | bbl_: well, IMO we should remove 'method' from the language. |
16:22:34 | Araq_ | and we might eventually attach more procs to types, but that's an unknown tradeoff and not too hard to retrofit into the language after 1.0, so I'm not concerned too much about it |
16:25:14 | * | bpr joined #nim |
16:25:22 | bbl_ | I remember reading about that on the forums |
16:26:51 | bpr | Speaking of removing method, any progress on that invalid C generated from my weird Nim? |
16:26:51 | bbl_ | attaching as having functions as member variables |
16:35:30 | * | bpr quit (Ping timeout: 252 seconds) |
16:41:46 | Araq_ | bbl_: also how construction and 'not nil' should work is only becoming obvious now. |
16:44:33 | bbl_ | Araq_: will not nil be default? |
16:44:41 | Araq_ | yes |
16:44:45 | bbl_ | <3 |
16:50:36 | * | jakesyl joined #nim |
16:57:07 | * | HakanD joined #nim |
17:10:51 | * | pregressive joined #nim |
17:18:26 | * | zepolen joined #nim |
17:19:23 | * | deavmi_mobile2 quit (Ping timeout: 264 seconds) |
17:32:41 | * | Demon_Fox joined #nim |
17:35:09 | * | HakanD quit (Quit: Be back later ...) |
17:35:41 | * | HakanD joined #nim |
17:39:39 | * | boopisaway is now known as boop |
17:40:10 | * | HakanD quit (Ping timeout: 260 seconds) |
17:51:22 | * | fedons joined #nim |
17:55:13 | * | fedons quit (Client Quit) |
17:56:16 | * | fedons joined #nim |
17:57:59 | * | fedons quit (Client Quit) |
17:58:54 | * | fedons joined #nim |
18:04:05 | * | BitPuffin|osx joined #nim |
18:08:29 | * | yglukhov quit (Remote host closed the connection) |
18:13:34 | * | yglukhov joined #nim |
18:16:31 | * | fedons quit (Quit: This computer has gone to sleep) |
18:21:49 | * | fedons joined #nim |
18:26:55 | * | bamorim quit (Ping timeout: 240 seconds) |
18:28:27 | * | HakanD joined #nim |
18:31:53 | * | yglukhov quit (Remote host closed the connection) |
18:36:42 | * | fedons quit (Read error: Connection reset by peer) |
18:37:05 | * | fedons joined #nim |
18:39:16 | * | fedons quit (Client Quit) |
18:49:30 | * | darkf quit (Quit: Leaving) |
18:51:50 | * | bigfondue quit (Ping timeout: 272 seconds) |
18:52:59 | * | bigfondue joined #nim |
18:54:43 | * | fedons joined #nim |
19:21:43 | * | filcuc quit (Quit: Konversation terminated!) |
19:24:06 | * | fedons quit (Quit: This computer has gone to sleep) |
19:24:21 | * | zepolen quit (Remote host closed the connection) |
19:33:12 | * | vikaton joined #nim |
19:48:55 | * | nsf joined #nim |
19:49:29 | * | nsf quit (Quit: WeeChat 1.3) |
19:49:42 | * | nsf joined #nim |
19:51:25 | * | Jesin quit (Remote host closed the connection) |
19:55:12 | * | Jesin joined #nim |
19:55:22 | * | desophos joined #nim |
20:24:11 | * | yglukhov joined #nim |
20:40:02 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
20:41:56 | * | yglukhov quit (Remote host closed the connection) |
20:53:17 | * | yglukhov joined #nim |
21:36:14 | * | zepolen joined #nim |
21:40:58 | * | zepolen quit (Ping timeout: 250 seconds) |
21:57:42 | * | BitPuffin|osx joined #nim |
22:26:42 | * | JStoker joined #nim |
23:00:22 | Araq_ | happy new year! |
23:00:38 | yglukhov | dom96: There seems to be some problem with nimble search path. Could you please have a look? https://travis-ci.org/yglukhov/nimx/builds/99660730#L720 |
23:00:49 | yglukhov | and happy new year! =)) |
23:03:23 | * | polde quit (Ping timeout: 250 seconds) |
23:06:38 | * | polde joined #nim |
23:16:06 | flyx | yeah, happy new year! |
23:18:05 | * | vikaton quit (Quit: Connection closed for inactivity) |
23:51:44 | * | pregressive quit () |
23:52:36 | * | pregressive joined #nim |
23:59:36 | * | yglukhov quit (Remote host closed the connection) |