<< 07-12-2016 >>

00:01:27libman(Lions don't actually live in the jungle. Their real habitat is the open savanna.)
00:03:36*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
00:05:03*dmi0 joined #nim
00:06:04*Snircle joined #nim
00:11:05*dmi0 quit (Ping timeout: 246 seconds)
00:12:02*PMunch quit (Quit: leaving)
00:20:16*brson joined #nim
00:38:49*brson quit (Quit: leaving)
00:38:57*brson joined #nim
00:43:17*boopsies joined #nim
00:57:14*yglukhov quit (Remote host closed the connection)
01:10:35*brson quit (Ping timeout: 246 seconds)
01:10:51*dmi0 joined #nim
01:12:33*vlad1777d quit (Quit: Leaving)
01:15:57*brson joined #nim
01:22:50*brson quit (Quit: leaving)
01:25:36*chemist69 quit (Ping timeout: 250 seconds)
01:27:55*chemist69 joined #nim
01:51:01*libman quit (Remote host closed the connection)
01:51:46*dmi0 quit (Ping timeout: 256 seconds)
01:52:19*ftsf_ joined #nim
01:57:43*yglukhov joined #nim
02:02:12*yglukhov quit (Ping timeout: 260 seconds)
02:10:23*brechtm_ joined #nim
02:11:32*brechtm quit (Read error: Connection reset by peer)
02:35:19*saml_ joined #nim
02:39:03*dddddd quit (Remote host closed the connection)
02:55:04*chemist69 quit (Ping timeout: 258 seconds)
02:59:56*brechtm_ quit (Read error: Connection reset by peer)
03:04:16*brechtm joined #nim
03:08:38Varriount|MobileAraq: Do you know if you'll be at OSCON next year?
03:09:22*chemist69 joined #nim
03:38:40*cheatfate_ quit (Read error: Connection reset by peer)
03:38:47*cheatfate_ joined #nim
03:42:04*zaquest quit (Ping timeout: 260 seconds)
03:47:04*zaquest joined #nim
03:59:47*yglukhov joined #nim
04:01:00*Demos joined #nim
04:04:22*yglukhov quit (Ping timeout: 250 seconds)
04:18:27Xedoes the nim javascript backend support making HTTP requests?
04:28:25ftsf_Xe, I suspect if you run it in an environment that has those capabilities (eg. a browser) you could use whatever functionality it provides
04:40:03*saml_ quit (Quit: Leaving)
05:12:31FromGitter<tekjar> Is there anything such as tagged union in nim?
05:14:28*Snircle quit (Ping timeout: 260 seconds)
05:14:28*flyx quit (Ping timeout: 260 seconds)
05:15:00*Snircle joined #nim
05:15:53*NhanH quit (Ping timeout: 260 seconds)
05:23:27*NhanH joined #nim
06:00:13*nsf joined #nim
06:01:30*yglukhov joined #nim
06:01:51FromGitter<nigredo-tori> @tekjar, those can be emulated with object variants: http://nim-lang.org/docs/manual.html#types-object-variants . There is also a library that aims to make this pattern a bit more palatable: https://github.com/andreaferretti/patty
06:06:12*yglukhov quit (Ping timeout: 256 seconds)
06:15:59*boopsies quit (Ping timeout: 260 seconds)
06:16:22*boopsies joined #nim
07:00:09*bjz joined #nim
07:00:23*ftsf_ quit (Remote host closed the connection)
07:12:09FromGitter<tekjar> @nigredo-tori Oh Cool. Thank you :)
07:37:33*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:00:08*sarlalian_ joined #nim
08:00:15*sarlalian quit (Ping timeout: 244 seconds)
08:02:26*space-wi_ joined #nim
08:03:03*yglukhov joined #nim
08:03:52*space-wizard quit (Ping timeout: 244 seconds)
08:03:52*fold4 quit (Ping timeout: 244 seconds)
08:06:12*fold4 joined #nim
08:07:29*yglukhov quit (Ping timeout: 258 seconds)
08:15:16*bjz joined #nim
08:27:11*Andris_zbx joined #nim
08:32:42*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:33:40*flyx|znc joined #nim
08:34:04*flyx|znc is now known as flyx
08:51:35*bjz joined #nim
08:57:33*Demos quit (Ping timeout: 245 seconds)
08:59:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:03:17vktecHow do I force nimble to install from master when passing it a git URL?
09:04:03vktecThe current release on a package I'm using is broken, but master is (hopefully) not
09:09:18vktecAh, figured it out
09:13:31*bjz joined #nim
09:30:47*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:41:13*delian66 quit (Ping timeout: 260 seconds)
09:45:01*bjz joined #nim
09:48:00*yglukhov joined #nim
09:51:09*yglukhov quit (Remote host closed the connection)
09:53:07*yglukhov joined #nim
10:12:49*brechtm_ joined #nim
10:15:32*brechtm quit (Ping timeout: 246 seconds)
10:17:49*djellemah_ quit (Ping timeout: 258 seconds)
10:21:54*Matthias247 joined #nim
10:22:14*brechtm_ quit (Remote host closed the connection)
10:22:52*brechtm joined #nim
10:31:54*djellemah joined #nim
10:37:05*elrood joined #nim
11:45:08*couven92 joined #nim
11:48:44*chemist69 quit (Ping timeout: 250 seconds)
11:51:09*chemist69 joined #nim
11:55:38*mal`` quit (Ping timeout: 246 seconds)
11:56:11*mal`` joined #nim
11:56:41*SianaGearz quit (Ping timeout: 246 seconds)
11:56:48*SianaGearz joined #nim
11:56:48*SianaGearz quit (Changing host)
11:56:48*SianaGearz joined #nim
12:14:29*dmi0 joined #nim
12:14:41*bjz_ joined #nim
12:15:14*bjz quit (Ping timeout: 246 seconds)
12:28:28*byte512 joined #nim
12:58:27*brechtm_ joined #nim
13:01:25*brechtm quit (Ping timeout: 260 seconds)
13:03:05*PMunch joined #nim
13:17:15*branduardi joined #nim
13:17:26*branduardi quit (Client Quit)
13:29:48*brechtm_ quit (Remote host closed the connection)
13:34:55*brechtm joined #nim
13:34:56*brechtm quit (Remote host closed the connection)
13:35:14*brechtm joined #nim
14:08:08*PMunch quit (Quit: leaving)
14:08:45*PMunch joined #nim
14:16:40FromGitter<nigredo-tori> Is there a good way to find out whether two `NimSym`s refer to the same thing? Specifically, whether they refer to the same generic type (but, possibly, different instantiations). Simply put, I need some expression to make the following work without leaving the macro: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I'm aware in this example emitting something along the lines of `x is ySym` would probably work - keep in mind that this
14:16:40FromGitter... is simplified. The real thing recurses on provided NimNode, so emitting checks like this gets inconvenient. Is there a better way? [https://gitter.im/nim-lang/Nim?at=584819c8be9d43bc632d115e]
14:37:31*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:42:17flyxnigredo-tori: well you can use getTypeInst and compare the generic parameters
14:45:47FromGitter<nigredo-tori> @flyx, I'm trying to do the opposite: compare the top-level type constructors *without* checking type arguments. For example, this should return `true`: ⏎ ⏎ ```same(U[int], U[float])``` [https://gitter.im/nim-lang/Nim?at=5848209ab4ffd59e38f9e45b]
14:47:37flyxokay, then you can use getType and compare that?
15:11:07vktecWhat would be the best way of running a process inside a pty in Nim? forkpty doesn't appear to be supported, so should I hack up some C bindings or is there a library/other technique I can use?
15:21:53flyxvktec: looks like a good addition to posix.nim (or linux.nim ?)
15:22:06*brechtm quit (Remote host closed the connection)
15:22:19vktecPerhaps a wrapper in osproc?
15:22:29flyxthat would be the next step
15:22:58vktecSure
15:23:31vktecI'll take a peek on GitHub and see if there's an issue about it
15:23:36FromGitter<nigredo-tori> @flyx, seems like `xSym.sameType(ySym)` and `xSym.getType.sameType(ySym.getType)` compare type arguments too, just not in the obvious way: both work for the provided example, but if I add a field, say, `x: A` to `U`, both consider instantiations different. To make things more confusing, `sameType` is not symmetric (for example, for alias types). I have to admit, I don't entirely clear on what each of these does/is supposed to be
15:23:36FromGitter... doing: `getType`,`getTypeInst`,`getTypeImpl`,`sameType`. Documentation could be more clear here.
15:23:49vktecDoesn't seem to be one
15:27:44flyxnigredo-tori: well yeah, the types differ if you use the parameter for a field, obviously. You need to compare it yourself, I don't think you can get sameType to do what you want
15:30:29FromGitter<nigredo-tori> @flyx, yeah, I'm basically writing a simpler `sameType` clone with some custom logic here and there, but it gets ugly if you can't compare symbols without returning from the top macro.
15:31:06flyxwhat do you mean „without returning from the top macro“?
15:31:42FromGitter<nigredo-tori> Without returning from `same` in my example.
15:31:55flyxwhy would you need to return?
15:33:35flyxin your example, sameImpl is doing all the work, you can just call it anywhere within the macro
15:34:14FromGitter<nigredo-tori> Basically, since to check whether `x` is instantiation of `ySym`, I have to generate an AST for the expression `x is ySym`, return it from some macro so it gets evaluated, and only use it after this...
15:35:10FromGitter<nigredo-tori> @flyx, yes, but my example is not working ;) I can't write `sameImpl` like this without some way to compare symbols.
15:37:24flyxI do not really get where the problem lies. you could use typedesc in sameImpl and mark it as {.compileTime.}, afterwards you can directly use it in constant expressions.
15:37:35flyxwhy would you want to do the comparison at runtime?
15:42:04FromGitter<nigredo-tori> @flyx, because I need arbitrary depth comparison. Real `sameImpl` is recursive - and I can't destructure `typedesc` in runtime, hence `NimNode`s.
15:42:34flyxyou also can't handle NimNodes at runtime.
15:42:42FromGitter<nigredo-tori> It's not exactly *runtime* per se - it's macro runtime.
15:42:48flyxwhich is compiletime
15:42:53flyxergo same as typedesc
15:45:57*dmi00 joined #nim
15:46:56*brechtm joined #nim
15:47:29*dmi0 quit (Ping timeout: 258 seconds)
15:52:19FromGitter<nigredo-tori> Ok, I'm not expressing myself clear enough. Whether we use `sameImpl` with typedescs directly, or in a `same` macro wrapper is not the problem. The problem is implementing `sameImpl` in any way that allows it to (1) call itself recursively on children of the provided type trees, (2) compare type constructors for equality without taking type arguments into account, and (3) preferably do all this without trampolining.
15:55:51FromGitter<nigredo-tori> I can't see how we can get (1) if we use typedescs for `x` and `y`. This also doesn't solve (2) - we would have to drop down to `NimNode`s anyway, and I don't see a good way to do (2) here (which is the whole point of this discussion for me).
15:59:00flyxwasn't your point that you want not to do recursive calls because you only want to compare the generic types, not the instances?
15:59:29flyxthat would boil down to check whether the symbols for the generic instances are equal
15:59:41flyxI am not 100% sure how to properly do that though
16:00:27*fvs joined #nim
16:03:33FromGitter<nigredo-tori> @flyx, on the contrary, I *want* to do this recursively - but on each recursion level I need to only compare the topmost type constructor. And yes, that is exactly why I need a way to check symbol equality.
16:05:10flyxwell I cannot wrap my head around it, probably because I don't understand the use-case
16:05:17*Jesin joined #nim
16:09:06cheatfate_flyx, are you here?
16:09:20cheatfate_flyx, just want to ask you about times.nim
16:09:36flyxcheatfate_ I'm on my way to go. but just ask, I can read it later
16:09:48cheatfate_is it possible not to use c runtime library on windows for managing time?
16:11:29flyxsure, if you reimplement it properly. dom96 said it once and I will also say it: the best way to improve the times module is to reimplement it completely.
16:11:39*dddddd joined #nim
16:12:06Araqcheatfate_: windows API ftw :-)
16:12:52flyxbut there are so much funny edge cases that it will take a long time to do that.
16:13:55*nsf quit (Quit: WeeChat 1.6)
16:14:48*cheatfate_ is now known as cheatfate
16:15:35cheatfateflyx, i understand that times module is a very tough task. but one of my future plans is to remove msvcrt.dll dependency from nim binary
16:20:59flyxwell. I already dug a bit into it with a PR, I might have motivation to try and do a reimplementation, to see how much work it *really* is
16:22:23*PMunch quit (Quit: leaving)
16:29:55*vlad1777d joined #nim
16:30:06*couven92 quit (Ping timeout: 256 seconds)
16:30:13Araqagain, look into FPC's implementation
16:30:23Araqthey use the Win API directly for everything
16:31:23*couven92 joined #nim
16:32:17FromGitter<nigredo-tori> @flyx, here's the use case for you: type matching with wildcards. This is a simplified version of what I'm trying to implement: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58483991bb7d528222cada3c]
16:33:49FromGitter<nigredo-tori> @Araq, while you're here: is there a good way to check two `NimSym`s for equality? Specifically, two generic type constructors.
16:35:02Araq use == ?
16:36:44*arnetheduck quit (Ping timeout: 260 seconds)
16:37:49FromGitter<nigredo-tori> I'm not making myself clear again... @Araq, I want to know if they refer to the same thing. `==` doesn't quite do that, sadly.
16:38:06Araqit does for kind == nnkSym
16:38:37Araq of opcEqNimrodNode:
16:38:39Araq decodeBC(rkInt)
16:38:40Araq regs[ra].intVal =
16:38:42Araq ord(exprStructuralEquivalent(regs[rb].node, regs[rc].node,
16:38:43Araq strictSymEquality=true))
16:38:48Araqsee? it uses strictSymEquality
16:48:16FromGitter<nigredo-tori> @Araq, ok, then what am I doing wrong in this example? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58483d5028d755bf14d7aa27]
16:52:58cheatfateAraq, you so like abbreviations :) what is FPC?
16:55:02*Trustable joined #nim
17:02:39Araqcheatfate: freepascal
17:04:31Araqnigredo-tori: huh... looks like a bug
17:04:32*pregressive joined #nim
17:05:36Araqbbs
17:06:01*ofelas quit (Quit: shutdown -h now)
17:08:01*ofelas joined #nim
17:14:06*fvs left #nim ("ERC (IRC client for Emacs 25.1.1)")
17:22:56*corecode quit (Read error: Connection reset by peer)
17:36:43*couven92 quit (Ping timeout: 245 seconds)
17:39:16*Demos joined #nim
17:39:29*couven92 joined #nim
17:44:38Araqnigredo-tori: getType() retuns an AST copy losing the symbolic information :P
17:45:35Araqseems like a PITA to support though
17:55:01*libman joined #nim
17:55:25*fredrik92 joined #nim
17:57:11*Andris_zbx quit (Remote host closed the connection)
17:58:18*couven92 quit (Disconnected by services)
17:58:23*fredrik92 is now known as couven92
17:58:46*fredrik92 joined #nim
18:06:11*nsf joined #nim
18:06:30*shodan45 joined #nim
18:09:38*Demos quit (Ping timeout: 268 seconds)
18:14:42*corecode joined #nim
18:21:28*Demos joined #nim
18:23:39*Trustable quit (Remote host closed the connection)
18:28:24*Jesin quit (Quit: Leaving)
18:32:01*Demos quit (Quit: Konversation terminated!)
18:35:00*Jesin joined #nim
18:37:31*dmi00 quit (Quit: ~)
18:47:14*fredrik92 quit (Ping timeout: 256 seconds)
18:47:46*brechtm quit (Remote host closed the connection)
18:49:01*fredrik92 joined #nim
18:52:31*yglukhov_ joined #nim
18:55:43*yglukhov quit (Ping timeout: 260 seconds)
18:56:52*yglukhov_ quit (Ping timeout: 256 seconds)
18:57:41*Jesin quit (Quit: Leaving)
19:02:13*kulelu88 joined #nim
19:05:18*Jesin joined #nim
19:11:37*gangstacat quit (Quit: Ĝis)
19:30:23*bjz joined #nim
19:31:26*bjz_ quit (Ping timeout: 256 seconds)
19:33:55*corecode quit (Read error: Connection reset by peer)
19:44:37*Varriount|Mobile quit (Ping timeout: 248 seconds)
19:53:18*couven92 quit (Quit: Disconnecting)
19:54:08*yglukhov joined #nim
19:58:47*yglukhov quit (Ping timeout: 268 seconds)
19:59:33*byte512 quit (Ping timeout: 260 seconds)
20:01:27*couven92 joined #nim
20:19:42*gangstacat joined #nim
20:20:08*AckZ joined #nim
20:27:15*PMunch joined #nim
20:41:37*stefantalpalaru joined #nim
20:42:41stefantalpalaruIs there any workaround for the cases in which {.borrow.} doesn't work? Related issue: https://github.com/nim-lang/Nim/issues/4121
20:46:27Araqstefantalpalaru: most of these have been fixed, but the workaround is the obvious type conversion body
20:46:39stefantalpalaruOK
20:54:09*yglukhov joined #nim
20:58:54*brson joined #nim
21:03:28*kunev quit (Quit: е те!)
21:09:08*kunev joined #nim
21:12:33*brson quit (Ping timeout: 258 seconds)
21:14:22*Snircle joined #nim
21:15:29*brson joined #nim
21:19:48*Sergio965 joined #nim
21:26:32stefantalpalaruhow can I call an iterator outside a for loop?
21:28:22*brechtm joined #nim
21:30:24stefantalpalarunevermind, I used a for loop
21:38:44*chemist69 quit (Ping timeout: 246 seconds)
21:43:30*chemist69 joined #nim
21:47:49*Trustable joined #nim
21:50:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:57:05*brechtm_ joined #nim
22:00:21*brson quit (Ping timeout: 244 seconds)
22:00:26*brechtm quit (Ping timeout: 246 seconds)
22:01:37*brechtm_ quit (Ping timeout: 258 seconds)
22:09:00*bjz joined #nim
22:20:01*Trustable quit (Remote host closed the connection)
22:21:15*aziz joined #nim
22:22:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:28:01*elrood quit (Remote host closed the connection)
22:46:12*nsf quit (Quit: WeeChat 1.6)
23:06:02*brson joined #nim
23:08:48*fredrik92 quit (Ping timeout: 245 seconds)
23:09:37*fredrik92 joined #nim
23:11:08*brson quit (Ping timeout: 246 seconds)
23:21:21*ftsf_ joined #nim
23:26:24*brson joined #nim
23:28:53*Jesin quit (Quit: Leaving)
23:30:44*brson quit (Ping timeout: 250 seconds)
23:31:25*brson joined #nim
23:35:55*Matthias247 quit (Read error: Connection reset by peer)
23:36:04*kier quit (Remote host closed the connection)
23:42:10*Jesin joined #nim
23:47:45*chemist69 quit (Ping timeout: 260 seconds)
23:49:10*pregressive quit (Remote host closed the connection)
23:49:28*pregressive joined #nim
23:49:58*pregressive quit (Remote host closed the connection)
23:50:16*pregressive joined #nim
23:50:46*pregressive quit (Remote host closed the connection)
23:51:04*pregressive joined #nim
23:51:34*pregressive quit (Remote host closed the connection)
23:51:50*pregressive joined #nim
23:52:22*pregressive quit (Remote host closed the connection)
23:52:31*chemist69 joined #nim
23:52:38*pregressive joined #nim
23:53:10*pregressive quit (Remote host closed the connection)
23:53:25*pregressive joined #nim
23:53:58*pregressive quit (Remote host closed the connection)
23:54:39*Jesin quit (Quit: Leaving)
23:56:51*Jesin joined #nim
23:59:02subsetparkCan anyone provide some pointers on using unittest? I have some old code from .14 that no longer works