<< 29-10-2015 >>

00:02:14*aziz joined #nim
00:02:42*desophos quit (Remote host closed the connection)
00:14:37*yglukhov quit (Remote host closed the connection)
00:15:42*Matthias247 quit (Read error: Connection reset by peer)
00:19:10*Varriount quit (Ping timeout: 260 seconds)
00:23:32*boopsies is now known as boopsiesisaway
00:37:47*desophos joined #nim
00:54:47*aziz quit (Remote host closed the connection)
00:57:24*brson quit (Quit: leaving)
01:22:12*CryptoToad quit (Quit: Leaving)
01:25:52desophoshttps://github.com/nim-lang/Nim/issues/2172 :(
01:32:56*irrequietus quit ()
01:33:23desophosomg my game finally compiled and ran
01:33:30desophosafter many days of not running
01:48:17*ephja quit (Ping timeout: 252 seconds)
02:00:59*jakesyl quit (Ping timeout: 240 seconds)
02:05:02desophosOMG IT ACTUALLY RUNS
02:14:34*desophos_ joined #nim
02:19:28*desophos_ quit (Ping timeout: 272 seconds)
02:37:37*vendethiel joined #nim
02:39:21desophosis there any downside to just using ref objects everywhere?
02:52:23*strcmp1 quit (Ping timeout: 264 seconds)
02:55:43*strcmp1 joined #nim
03:06:17*nande quit (Quit: No Ping reply in 180 seconds.)
03:07:41*nande joined #nim
03:18:56*darkf joined #nim
03:28:43desophosi miss python's simple comprehensions :(
03:32:25*vendethiel quit (Ping timeout: 246 seconds)
03:39:20desophoscan someone tell me wtf is wrong with http://ideone.com/3sczFF please?
03:39:30desophos"undeclared identifier"? huh?
04:09:35*bigfondue quit (Ping timeout: 268 seconds)
04:11:01*bigfondue joined #nim
04:13:14*benaiah left #nim ("WeeChat 0.4.2")
04:17:31desophosthe lc macro uses an nnkPar node, which was broken in 0.12.0; could that be the problem?
04:35:37*nande quit (Remote host closed the connection)
04:37:20*desophos quit (Read error: Connection reset by peer)
05:43:23*skalpin quit (Ping timeout: 264 seconds)
06:37:12*yglukhov joined #nim
07:05:06*barosl quit (Read error: Connection reset by peer)
07:37:53*Trustable joined #nim
07:48:53*bjz joined #nim
07:57:09*desophos joined #nim
08:01:36*desophos quit (Ping timeout: 255 seconds)
08:07:15*gokr_ joined #nim
08:15:06*gokr_ quit (Read error: Connection reset by peer)
08:16:57*gokr_ joined #nim
08:31:04*Arrrr joined #nim
08:55:48*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
09:02:49*coffeepot joined #nim
09:03:28*Demon_Fox quit (Quit: Leaving)
09:13:15*xificurC quit (Ping timeout: 256 seconds)
09:54:17*barosl joined #nim
10:10:59*silven quit (Ping timeout: 252 seconds)
10:11:31*silven joined #nim
10:15:15*makoLine quit (Ping timeout: 255 seconds)
10:20:09*strcmp1 quit (Ping timeout: 252 seconds)
10:20:37*zepolen joined #nim
10:25:47*zepolen quit (Remote host closed the connection)
10:27:18*strcmp1 joined #nim
11:06:58*boopsiesisaway is now known as boopsies
11:07:02*boopsies is now known as boopsiesisaway
11:08:08*boopsiesisaway is now known as boopsies
11:12:42yglukhovis "when T is SomeOrdinal" supposed to work?
11:12:51*ephja joined #nim
11:36:07*zepolen joined #nim
11:44:46*elrood joined #nim
11:51:25*zepolen quit (Remote host closed the connection)
11:51:36*desophos joined #nim
11:53:17*zepolen joined #nim
11:58:08*aziz joined #nim
12:11:46desophosis it possible to define a constructor for a subtype in a different module from the base type without exporting the base type's fields?
12:13:10*silven quit (Ping timeout: 240 seconds)
12:13:31*silven joined #nim
12:16:42*vqrs quit (Ping timeout: 272 seconds)
12:18:14*vqrs joined #nim
12:20:25Araqdesophos: kind of if the subtype's constructor calls the base constructor rather than accessing the hidden fields
12:21:24desophosthat's what i was hoping to do; do i need to cast the object returned from the base type constructor to the subtype?
12:21:47desophosso that i can set the subtype fields
12:22:08desophosi guess that wouldn't work
12:22:11desophosnot sure how to do that
12:23:05Araqconvert it to the base type via base(foo)
12:25:20desophossorry, can you explain please? i don't understand how to handle the object returned from the base constructor
12:26:17desophosnot explain typecasting, i get that
12:27:07*xificurC joined #nim
12:29:00desophoscan i pass the base object to the subtype constructor somehow?
12:29:16desophoser, the actual subtype creation proc
12:32:34*zepolen quit (Remote host closed the connection)
12:33:35*zepolen joined #nim
12:35:39*gokr joined #nim
12:37:47*gokr_ quit (Ping timeout: 265 seconds)
12:40:23*CcxCZ quit (Ping timeout: 264 seconds)
12:41:37*CcxCZ joined #nim
12:43:11*gokr quit (Remote host closed the connection)
12:43:23*gokr joined #nim
12:45:24Araqdesophos: these questions are all answered in gokr's excellent blog posts about OO in Nim
12:45:59desophosi actually have that open right now
12:47:11desophoswell, i had http://goran.krampe.se/2014/10/29/nim-and-oo/ open, now looking for others
12:47:16desophoshttp://goran.krampe.se/2015/05/06/nim-and-super/?
12:48:53desophosoh wow, he has a lot
12:55:09*Arrrrr joined #nim
12:55:13*Arrrr quit (Ping timeout: 246 seconds)
12:57:20desophosahhhh i see, i need to pass an already-initialized base object to the subtype constructor?
12:58:30*gokr quit (Read error: Connection reset by peer)
12:59:10ArrrrrYep, as far as i know, there is no constructors as in java, only field initializer (Person(name: "Arr"))
12:59:15OnOwhazzup
12:59:38OnOAraq: made "borrow all" working in this PR https://github.com/nim-lang/Nim/pull/3494
13:00:09OnOthis can be used to make some generics eg. Defaulting[T], Tainted[T] etc. etc.
13:00:13Araqhi OnO
13:00:35Araqthat's cool, but I think it should be under {.experimental.}
13:01:02Araqalso some people complained our build.sh uses CR-LF but afaict that's not the case. any ideas?
13:01:21Araq(and yeah, we actually tested these scripts on macosx)
13:01:37desophosweird, it must have been my git settings i guess? sorry
13:03:09OnOyup, I checked everything is LF here, maybe checked out on Windows, then copied to Linux
13:03:56desophosi cloned on Mac, so idk what went wrong
13:04:19OnOAraq: regarding experimental, this is natural extension to borrow which isn't experimental, we could indeed make it experimental, but I was about to propose Defaulting[T] and DefaultingTo[T, Def] which relies on that
13:04:29OnOif it is experimental, then effectively it couldn't be really sued
13:04:54OnOAraq: just have a look, I think this borrow all is pretty simple, just check if HiddenStdConv on 1st arg is the way to go
13:05:18reactormonkAraq, I ran dos2unix over build.sh, no changes.
13:05:33OnOdesophos: but what is exactly happening there? what error msg?
13:05:40AraqOnO: yeah, I reviewed it already
13:06:03Araqstill not really happy with this thing, will sleep over it
13:06:22OnOdesophos: maybe we got some 'git config core.eol' set to crlf?
13:06:25AraqI can see it's kinda redundant to require .borrow to use .experimental
13:06:42desophosOnO, yeah, it's probably something wrong with my git settings
13:08:03Arrrrri think this message has one 'or' more than needed https://github.com/nanoant/Nim/blob/patch/distinct-type-borrow-all/compiler/pragmas.nim#L558
13:09:53OnOoops, you're right
13:10:30OnObtw. can literal be part of the template? eg. "" literal in: DefaultingTo[Table[string, string], ""]
13:10:41OnOso far I can't make it work
13:11:46OnO(btw. typo in PR fixed)
13:12:11Araqyeah once the staticT rewritings arrive, I will look at why this doesn't work.
13:16:34OnOyeah, that's a little shortcoming comparing to C++ templates
13:18:38OnOalso 'type DefaultingTo*[T, D] = distinct T' emits 'Hint: 'D' is declared but not used [XDeclaredButNotUsed]', is it right?
13:19:17OnOmaybe I want to use D on some other places and just stick it to the type
13:20:06desophosAraq, i got it to work by taking an initialized base object, casting it to the subtype, and setting subtype fields on it
13:20:07*BitPuffin joined #nim
13:20:35desophosthus avoiding calling the constructor in the subtype module at all
13:23:04Arrrrrwut
13:23:11desophosnever mind, it didn't work :)
13:24:05desophosError: unhandled exception: invalid object conversion [ObjectConversionError]
13:25:26OnOtemplate default[T]: expr = (var t: T; t) <NL> echo (default[int]) <- crashes with SIGSEGV: Illegal storage access. (Attempt to read from nil?)
13:26:03OnObut 'echo ((var t: int; t))' works fine showing '0', WTF?
13:26:28Araqdefault[int]()
13:26:56OnOno effect, echo(default[int]()) still crashes
13:27:38Araqfix it
13:27:44Arrrrrdesophos: http://ideone.com/39ufJ8
13:28:51desophosthis is what i tried: http://ideone.com/lik2V7
13:29:31Arrrrrof course it cant work
13:30:09desophoswhy not?
13:30:34ArrrrrFor many reasons, one of them is that you first create A, which takes less space than B
13:31:03ArrrrrBut anyway, nim wont allow you to convert parent type to child type
13:31:33ArrrrrYou have to do it the other way, first create B and then init props from A
13:31:40desophoshmm
13:33:19OnOAraq: evalTemplateArgs crashes in let default = s.typ.n.sons[i].sym.ast, apparently expectedRegularParams is counted wrong comehow
13:33:27desophosyou know what, inheritance probably isn't the best for this anyway
13:33:52desophosoh btw, did anyone see my messages from last night?
13:34:09desophoshttp://ideone.com/3sczFF
13:34:29desophosare listcomps broken or am i doing something wrong?
13:34:41desophos<desophos> the lc macro uses an nnkPar node, which was broken in 0.12.0; could that be the problem?
13:35:10OnOaha... better givenRegularParams is -1 :))
13:37:00Araqdesophos: yes.
13:37:18Araqcould be the problem
13:37:27Arrrrrthe example from the future docs is working
13:39:11OnOokay, looks like serious bug, given: template pass[TT](t: TT): expr = t
13:39:13desophoshmm, indeed it is
13:39:22OnOpass[int](1) crashes, but pass(1) not
13:44:54OnOokay I don't get this... evalTemplateArgs n.kind is nkIdent !? what?
13:49:56*gokr joined #nim
13:54:13OnOhow do I dump PNode tree in compiler?
13:56:58reactormonkOnO, debug maybe?
14:00:13*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:07:17*pregressive joined #nim
14:07:55*elrood quit (Remote host closed the connection)
14:14:50*silven quit (Ping timeout: 240 seconds)
14:15:19*silven joined #nim
14:15:50OnOthanks. is there a way to set some "magic" variable so my compiler debug works only in the scope?
14:16:39OnOjust want to skip all the "system" libraries and emit debug only for specific code
14:18:17federico3
14:22:30*aziz quit (Remote host closed the connection)
14:24:47*elrood joined #nim
14:26:41AraqOnO: http://nim-lang.org/docs/intern.html#debugging-the-compiler
14:26:52Araqif n.info ?? "temp.nim":
14:26:53Araq # only output when it comes from "temp.nim"
14:26:55Araq echo renderTree(n)
14:27:14OnOgreat thanks!
14:27:42Araqit's depressing that you don't already know this -.-
14:28:54AraqI don't even want to know how much time is lost by people thinking GDB or Visual Studio is an acceptable debugging solution ...
14:30:01ArrrrrTalking of which, how can i benchmark procs from executables produced in nim?
14:30:54Arrrrr(i mean tools, not using epochTime)
14:35:40OnOnah, I forgot somehow about ?? trick I am working on quite a few projects
14:37:15AraqArrrrr: http://forum.nim-lang.org/t/1730/1
14:37:40Araq"I usually just run code through Instruments on OS X (with the "Invert Call Tree" option checked). If you're familiar with Nim's name-mangling mechanism, it's generally pretty easy to tell where the performance hotspots are. On Linux, Google performance tools should give you similar functionality."
14:38:00ArrrrrThank you Araq
14:47:51*gokr quit (Read error: Connection reset by peer)
15:02:51*gokr joined #nim
15:25:42*zepolen quit (Remote host closed the connection)
15:42:14*coffeepot joined #nim
15:54:18Arrrrri got sleepy www.codersnotes.com/sleepy/ but even with --debugInfo i cant see the names of the procs (win xP compiled using mingw)
16:15:37*desophos quit (Read error: Connection reset by peer)
16:21:59*pregressive quit (Remote host closed the connection)
16:24:42*boopsies quit (Ping timeout: 255 seconds)
16:31:14*darkf quit (Quit: Leaving)
16:32:30*strcmp1 quit (Ping timeout: 240 seconds)
16:33:34ArrrrrOk, i had to put --passC: "-gdwarf-2"
16:36:26*pregressive joined #nim
16:40:23*EastByte_ joined #nim
16:40:24*EastByte quit (Read error: Connection reset by peer)
17:01:52*brson joined #nim
17:03:10*strcmp1 joined #nim
17:03:59ArrrrrIs nimscript broken in windows? i get the "Error: cannot 'importc' variable at compile time" for winlean
17:05:28*iamd3vil joined #nim
17:05:37*iamd3vil quit (Client Quit)
17:06:20*iamd3vil joined #nim
17:09:06*jonasac joined #nim
17:10:31*pregressive quit (Remote host closed the connection)
17:11:42*pregressive joined #nim
17:13:38*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:21:58*aziz joined #nim
17:23:33*gokr_ joined #nim
17:31:12AraqArrrrr: well the docs of nimscript mention what can be imported...
17:32:20*Matthias247 joined #nim
17:34:59*zepolen joined #nim
17:37:39*jonasac quit (Remote host closed the connection)
17:39:34*ochkoffein joined #nim
17:42:25*yglukhov quit (Ping timeout: 240 seconds)
17:42:50OnOAraq: I need you help about explicit template template instantation, just to recall if we have: template ttmpl[T](t: T) = echo t, then doing ttmpl(1) works, where ttmpl[int](1) crashes compiler
17:43:29OnOthe problem is that semSubscript tries to turn 'ttmpl' expr into value
17:43:39OnOwith proc it will just turn it to proc symbol
17:43:52OnOwith template it tries to evaluate template with no arguments at all
17:43:57OnOthis is all wrong there
17:44:44*jonasac joined #nim
17:47:03Araqdoesn't seem hard to fix?
17:48:05OnOI tried, eg disabling evaluation, and making ttmpl[T] turn nkIdent into symbol like for proc
17:48:49OnOand passing to explicitGenericInstantiation like proc, but it crashes somehwere else
17:50:37OnOmaybe it isn't hard to fix for you when you wrote all this stuff :>
17:55:23*strcmp1 quit (Ping timeout: 244 seconds)
17:56:50*ochkoffein quit (Ping timeout: 250 seconds)
17:57:02*strcmp1 joined #nim
18:09:12*gokr_ quit (Read error: Connection reset by peer)
18:12:13*ochkoffein joined #nim
18:12:45Araqwell if it crashes somewhere else then, it means progress
18:13:51*desophos joined #nim
18:21:46*jonasac quit (Remote host closed the connection)
18:26:44*brson quit (Quit: leaving)
18:29:39*gokr_ joined #nim
18:30:41*brson joined #nim
18:34:59*ochkoffein quit (Ping timeout: 240 seconds)
18:36:20*aziz quit (Remote host closed the connection)
18:40:24*yglukhov joined #nim
18:41:44*zepolen quit (Remote host closed the connection)
18:42:48*vendethiel joined #nim
18:48:10*iamd3vil left #nim ("Leaving")
18:50:29*ochkoffein joined #nim
18:52:32*desophos quit (Remote host closed the connection)
19:04:51*ochkoffein quit (Ping timeout: 256 seconds)
19:20:11*ochkoffein joined #nim
19:22:36*jonasac joined #nim
19:24:33*jonasac quit (Read error: Connection reset by peer)
19:24:39*lazypenguin quit (Ping timeout: 240 seconds)
19:25:09*jonasac joined #nim
19:27:16*zepolen joined #nim
19:43:32*zepolen quit (Remote host closed the connection)
19:46:28*gokr quit (Ping timeout: 244 seconds)
19:50:19*BitPuffin quit (Ping timeout: 246 seconds)
20:01:11*xificurC quit (Quit: WeeChat 1.3)
20:02:39*yglukhov quit (Remote host closed the connection)
20:06:51*gokr joined #nim
20:09:39*gokr_ quit (Ping timeout: 240 seconds)
20:13:48*Jesin quit (Quit: Leaving)
20:16:30*yglukhov joined #nim
20:19:36*silven quit (Ping timeout: 255 seconds)
20:20:00*silven joined #nim
20:21:48*yglukhov quit (Remote host closed the connection)
20:29:04*Demon_Fox joined #nim
20:37:13*jonasac quit ()
20:37:46*yglukhov joined #nim
20:37:51*desophos joined #nim
20:38:45*benaiah joined #nim
20:42:03*desophos quit (Remote host closed the connection)
20:42:51*desophos joined #nim
20:44:53*gokr quit (Read error: Connection reset by peer)
20:49:22*nande joined #nim
20:51:33*jakesyl joined #nim
20:52:25*brson quit (Ping timeout: 240 seconds)
20:53:44*makoLine joined #nim
20:54:39*brson joined #nim
20:55:14*ochkoffein quit (Ping timeout: 260 seconds)
20:59:00*gokr joined #nim
21:05:03OnOoh well, I think I have a solution, I am going to file a bug report then make a PR for it
21:09:22*joebo joined #nim
21:12:05*avsej quit (Ping timeout: 240 seconds)
21:13:23*avsej joined #nim
21:13:23*avsej quit (Changing host)
21:13:23*avsej joined #nim
21:17:41*desophos quit (Remote host closed the connection)
21:18:35*brson quit (Ping timeout: 256 seconds)
21:23:58OnOAraq: done, that was quite a exhausting task spend almost all day on it, I hope I get some good insights from you on the problem and my solution
21:24:44OnOagain I learnt a lot as well, so the time was not lost
21:25:13Araqhrm ... insights.
21:29:21OnObtw. found one (single) place where tmpl[0], where [] was NOT generic arguments
21:30:13OnOmy PR makes tmpl[...] to be a template call with generic arguments and no normal arguments
21:30:37OnOso [] means always generic arguments, not an array access on template result
21:30:47OnOthis is more inline with procs
21:31:15OnObut since you cannot "instantiate
21:31:32OnOtemplate from generic one it does not need empty ()
21:31:54Araqthat sucks
21:32:23Araqtemplates for aliasing stuff and using array indexing on it is an important feature of Nim
21:32:44*kulelu88 joined #nim
21:32:44*kulelu88 quit (Changing host)
21:32:44*kulelu88 joined #nim
21:32:47*brson joined #nim
21:33:07Araqhow about we finally make [. .] stand for unambiguous generic instantiations?
21:33:45Araqthe overloading of [] really caused lots of hacks and workarounds
21:33:56OnOyeah I know, but now tmpl()[...] is array access on tmpl result, but tmpl[...] is generic call
21:34:16Araqyes, I understood you, but that sucks
21:34:29OnOI know, but otherwise you can't have both :)
21:34:42OnOunless you have [. .] but that's kind of huuuuge change
21:34:43Araqwith [. .] you can.
21:35:19Araqwell actually, it's no big deal. If ambiguous, use [. .] otherwise [] continues to work for good.
21:36:19Araqwe can also introduce some nice Unicode aliases for [. .]
21:36:52OnOoh well... () makes this unambigious too
21:37:14Araqbut foo()[] is ugly.
21:37:33Araqand foo[int]() so uncommon that it shouldn't eat up a nice syntax
21:37:39OnOas I said, I found just one place in whole compiler I had to fix
21:38:07OnObut foo[int] may be very common
21:38:16Araqthat means there are "just" 10 places in jester and it goes downhill from there :P
21:38:29OnOhehe... ok ok
21:38:35Araqthe compiler doesn't even use templates that heavily
21:39:06*zepolen joined #nim
21:39:19OnOanyway shouldn't it be defined in grammar
21:39:27OnOrather than dependent on context?
21:39:54Araqnot many languages do that.
21:41:16Araqand how do you think it would look like?
21:42:10OnOxxx[...](...) template call, always
21:42:40OnOand no other notation for template calls
21:43:24OnOof you wanted different meaning use parenthesis eg. (xxx[...])()
21:43:51Araqthe grammar has no notion of what a "template call" is.
21:44:32Araqand we don't want to have IDENT | TEMPLATE_IDENT pseudo-tokens that depend on the symbol table
21:45:13OnOI think that's the problem
21:45:21Araqyou would just introduce some hand waving into the "grammar".
21:45:42OnOand remove lot of ambiguity and hacks from sema
21:46:13Araqmoving the sem hacks to lexer hacks makes everything worse.
21:47:12Araqand since I implemented a C++ parser I think I can judge the tradeoffs very well.
21:47:15OnOwhy lexer hacks, there would be no hacks since there is single rule: ident[expr,...](expr,...) -> templCallExpr
21:48:08Araqthis rule has no meaning if you don't define what 'templCallExpr' means.
21:48:23OnOanyway, if templates, macros are kind of inline or compile-time procs, why you want tmpl[...] to have different meaning to proc[...] !?
21:49:21OnOeg. I turn some generic procs into templates (eg. optimizing stuff) and poof my program doesn't compile anymore, or worse have different logic
21:49:55Araqtemplates are close to generic inline procs, but they are NOT generic inline procs.
21:50:08Araqthey are used for all sort of different things.
21:50:22Araqtemplate foo = x.field.a.y
21:50:33Araqfoo[i] = y
21:50:41Araqis an important use case.
21:51:04Araqyou could differentiate between
21:51:08Araqtemplate foo() = ...
21:51:10Araqand
21:51:12Araqtemplate foo = ...
21:51:31Araqbut this is subtle and no code out there cares about it
21:51:34*lazypenguin joined #nim
21:52:01OnOokay, I may differentiate checking if tmpl sym in tmpl[] is generic template or not too
21:52:23Araqyeah that is much better
21:52:32Araqbut still I want my [. .]
21:52:40Araqbecause it makes sense.
21:53:15OnOyeah a "square tits" operator
21:53:29Arrrrrlol
21:53:41Araq._.
21:54:45*Araq wonders if we could use foo(T)(x, y) instead
21:55:13Araqor maybe foo(T; x, y)
21:56:10Arrrrror foo(x, y) {.muhPragma: T.}
21:56:43Araqwell how are "curly tits" better?
21:57:22Araq(except that we have them everywhere already and nobody noticed their sexual connotations)
21:57:32*jonasac joined #nim
21:57:54makoLineIMO, get rid of [] for array indexing (or, if that is not possible, magically go back in time and undo your decision to include it ;] )
21:57:54makoLineI like scala's way, indexing uses the apply operator, (eg array(i)), and I've never seen an entity where you wanted both indexing and application at the same time (a mapping, that is also a function, but the function is not the mapping? Sounds awful.)
21:58:07Arrrrrusually pragma names are long, so you dont notice it
21:58:11makoLineSo that doesn't introduce any conflicts.
21:58:31AraqI dislike Scala's solution in this case.
21:59:03Araqarray indexing with square brackets is just too sexy and would sorely be missed.
22:00:15Araqexplicit generic instantiations at callsite are very rare, don't optimize the language for it.
22:00:35jonasacthis function signature says it returns a string right ? http://nim-lang.org/docs/httpclient.html#getContent,string,string,int,SSLContext,Proxy
22:01:01Araqyes
22:02:02jonasacgiving nim a spin, i basically have a proc that returns the result of a call to that function, but the compiler is saying the type is a (string, string)
22:02:12Arrrrrtalking about apply, can you do proc `()` ?
22:02:58AraqArrrrr: yes
22:03:30Arrrrrbut not for 'a () b'
22:03:45Arrrrra question
22:05:23Arrrrrujj, it actually works http://ideone.com/NdtXNu
22:05:37ArrrrrI'll keep that in mind, good night
22:05:38*Arrrrr quit (Quit: WeeChat 1.2)
22:08:53OnOAraq: okay updated my PR to only apply to generic macros/templates, non-generic ones work as before
22:09:46Araqjonasac: well there is little I can do to help you without more code snippets
22:10:27jonasacbeing assured that i read the return type correctly was all i needed :)
22:11:34OnOuse case: https://github.com/nanoant/Nim/blob/47e45dee7e9157212995c5769b93713f5a4dd14b/tests/generics/tgenerictmpl2.nim
22:15:45*Matthias247 quit (Read error: Connection reset by peer)
22:17:39*jonasac quit ()
22:19:33OnOehm... I think I found another bug :~( generic arguments cannot be used in generic templates, getting Error: undeclared identifier: 'T'
22:20:27Araqyeah I thought Zahary had fixed that.
22:25:30*xet7_ quit (Ping timeout: 240 seconds)
22:25:49*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:28:15*Trustable quit (Remote host closed the connection)
22:28:41OnOwell indeed there is a commit 02f97489 that is suppose to fix that, but it doesn't fix the case here: https://github.com/nim-lang/Nim/issues/3498
22:32:20Araqwell I dunno. seems hard to implement and the workaround is trivial anyway
22:32:35Araq(var d: type(t); d)
22:33:25*vendethiel quit (Ping timeout: 246 seconds)
22:34:18*elrood quit (Quit: Leaving)
22:36:07OnOyeah, but what if I have argless template?
22:36:50Araqwhat if you don't?
22:36:59Araqseriously.
22:37:06OnOand btw. I checked, Zahary change works only with statics
22:37:28OnOso if T is static[int], then T gets int value
22:37:29Araqthat we don't support generic parameters fully for templates was a concious implementation choice
22:37:49OnOif T is type, then T stays and undeclared T
22:38:10AraqIMO we can simply write that in the manual and call it good enough for version 1.
22:38:23Araq(I mean this part of the language)
22:38:50Araqthere is nothing wrong with prunning a combinatorial explosion of features
22:41:04Araqproc default[T](): T {.inline.} = discard "cannot be a template, boohoo, deal with it, we have 30 high priority bugs open and you're concerned with this fringe case"
22:47:40OnOto be honest, my main interest in Nim is the meta programming capabilities, that don't work completely as advertised, the difference from other users is that I am trying to fix the bugs I encounter using Nim for some little projects, rather than creating new issue report and waiting for someone else to fix it
22:49:29OnOalso I think the things that make Nim special comparing to other languages should have top prio, because this is what is Nim advertised for
22:56:23Araqfair enough and I love your work.
22:57:51Araqit's just that I think your effort would better be spent a little differently, but I'm not telling you what to do, go ahead and make generic templates work 100%
23:00:42*desophos joined #nim
23:02:48*Kingsquee joined #nim
23:22:59OnOoh yeah... got it :))
23:32:31Araqyou mean you got it to work?
23:34:02*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
23:34:37*Kingsquee joined #nim
23:34:48*pregressive quit (Remote host closed the connection)
23:37:00*boopsies joined #nim
23:38:10OnOyes, the fix was very easy
23:38:22OnOPR incoming in one 1min, just running tests here
23:38:38OnOthere was some old 2 year strange mistake in the code != instead ==
23:39:33OnOhttps://github.com/nim-lang/Nim/pull/3500
23:58:07*boopsies is now known as boopsiesisaway