<< 31-12-2015 >>

00:11:50krux02Araq_: what is the future of the getType proc?
00:12:11Araq_we fix it?
00:12:28Araq_would be nice if somebody could do it that is not me.
00:13:03krux02Ok I can understand that
00:13:11krux02but how is the desired behavior
00:14:54krux02getType sometimes returs a symbol, sometimes the implementation of the type, and sometimes in case of the builtin Seq actually useful information
00:15:32Araq_read my latest remark about this?
00:16:09krux02do you mean the optional parameter?
00:16:14Araq_yeah.
00:16:26Araq_maybe it shouldn't even be optional at all.
00:16:47Araq_code breaks at compile-time then, but that's fine for this feature.
00:17:00krux02do you know the reflection api from go?
00:17:32Araq_no.
00:18:10krux02I like it's simplicity.
00:19:05krux02but 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:22krux02so the underlying concept is similar
00:23:13Araq_the point of getType is to map *types* to *ASTs* to leverage the existing AST features.
00:23:30Araq_Go does nothing like that.
00:23:38krux02yes that's true
00:25:39krux02what do you think about the idea, that get type returns a symbol, where getImpl returns the actual implementation?
00:27:16krux02I 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:30Araq_there is a huge difference between breaking clearly the existing getType() at compile-time and to subtly alter its behaviour.
00:28:50Araq_and getImpl() was not designed for types at all.
00:29:33Araq_we can also make getType() return a tuple (name, impl).
00:30:11Araq_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:35Araq_the enum solution has the advantage though that we can do: type GetTypeMode = enum legacy, name, impl
00:32:03Araq_proc getType(n: NimNode; mode = legacy) and break nothing at all.
00:32:37Araq_and since getType is already used quite a bit afaict that might be the best solution.
00:32:58krux02I am not convinced of default legacy (deprecated) behavior, but otherwise I do agree
00:34:33krux02how do you think about generic types, neither the name, nor the impl contain the value of T
00:34:51Araq_the impl does?
00:35:03Araq_ok, sometimes not.
00:35:17Araq_so that's another enum value then.
00:35:58Araq_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:18krux02I wrote a comment in the pull request
00:38:27krux02I don't know if you read it
00:40:31Araq_" # MyType generic type is gone, it's just a symbol"
00:40:45Araq_I think you misunderstand the "just a symbol" thing.
00:41:04Araq_if you have a symbol, you can go 1 level deeper with another 'getType' call on it.
00:41:19krux02ok?
00:42:26Araq_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:49Araq_think about it. We map a cyclic structure to a tree.
00:43:07Araq_we better don't return an infinite tree.
00:45:07Araq_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:46krux02ok, I tested the .getType.getType thing
00:46:26krux02seems to be interesting
00:48:39krux02but I really would like if own generic types and seq behave the same
00:49:28Araq_in your example you give the seq no name at all but you do introduce an alias for your generic.
00:49:46Araq_how can getType possibly yield the same for that?
00:51:44krux02what do you mean I give no name to seq?
00:53:26krux02the 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:19Araq_no?
01:00:08krux02en 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:20krux02I pudated the comment in the pull request again
01:01:30krux02i 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:41krux02build 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:21dom96Nimble 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:02krux02good 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:52M-maxQq on nim 0.12.0. I've written a proc that claims to raise only MyError
09:42:26M-maxwhich looks like it's the out of memory exception. Surely anything could throw out of memory?
09:42:39M-maxbut 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:26M-max(apologies for out-of-orderness)
09:45:43*fedons joined #nim
09:57:42Araq_Out of memory is not exception in Nim.
09:57:55Araq_it always makes the program die.
10:00:27M-maxThen why is it telling me that an exception is thrown?
10:01:35Araq_do you call raiseOutOfMem() ?
10:01:48M-maxNo
10:02:09M-max(Though obviously I do allocate stuff)
10:03:19Araq_do you allocate with alloc()?
10:03:54Araq_(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:04federico3WTF "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:35M-maxAraq: 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:09bbl_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:29Araq_bbl_: doSomething(2.3, `+`) where doSomething is a template ?
15:07:50Araq_M-max: report it properly then please.
15:08:33M-maxWill do - thanks!
15:12:17bbl_Araq_: can I store template to a dynamically changing variable?
15:12:47Araq_you can pass templates around too.
15:12:48bbl_but then again that's out of that scope...
15:12:54bbl_ah nice
15:13:14Araq_is your C++ actually valid?
15:13:23bbl_Araq_: yes
15:13:26bbl_for c++17
15:13:51bbl_works with older c++ when auto function arguments are replaced with template typenames T and G
15:13:54Araq_the constexpr that refers to an implicit generic struct seems a pita to support. ;-)
15:14:14bbl_;D
15:14:23bbl_c++ is a wonderful language
15:14:46bbl_some parts of it at least
15:14:48Araq_I agree in theory.
15:15:13Araq_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:16bbl_Araq_: header only template libs then :D
15:16:37bbl_hopefully the modules come some day
15:17:10bbl_I would prefer that Nim 1.0 is out before that
15:17:24bbl_How about that for a hard deadline? :D
15:17:40Araq_my hard deadline was today -.-
15:18:27bbl_for 1.0?
15:19:49Araq_yeah.
15:27:21*yglukhov joined #nim
15:34:26*polde joined #nim
15:41:52bbl_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:35Araq_bbl_: well, IMO we should remove 'method' from the language.
16:22:34Araq_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:22bbl_I remember reading about that on the forums
16:26:51bprSpeaking of removing method, any progress on that invalid C generated from my weird Nim?
16:26:51bbl_attaching as having functions as member variables
16:35:30*bpr quit (Ping timeout: 252 seconds)
16:41:46Araq_bbl_: also how construction and 'not nil' should work is only becoming obvious now.
16:44:33bbl_Araq_: will not nil be default?
16:44:41Araq_yes
16:44:45bbl_<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:22Araq_happy new year!
23:00:38yglukhovdom96: 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:49yglukhovand happy new year! =))
23:03:23*polde quit (Ping timeout: 250 seconds)
23:06:38*polde joined #nim
23:16:06flyxyeah, 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)