<< 24-06-2017 >>

00:02:04Nobabs27how do I test string length?
00:05:07FromGitter<zacharycarter> string.len?
00:09:27Nobabs27zacharycarter: No mention of it in the Nim manual?
00:13:54Nobabs27however is does indeed work, thank you
00:15:00*user0_ quit (Read error: Connection reset by peer)
00:17:26FromGitter<zacharycarter> no problem
00:18:09FromGitter<zacharycarter> Nobabs27: It's mentioned here - https://nim-lang.org/docs/tut1.html
00:24:48FromGitter<Varriount> Hi @zacharycarter
00:29:59FromGitter<zacharycarter> Hi @Varriount
00:30:05FromGitter<zacharycarter> How's it going?
00:30:38FromGitter<Varriount> Just had 3 wisdom teeth removed
00:30:43FromGitter<zacharycarter> ouch :/
00:30:59FromGitter<Varriount> At least I was put under for the operation
00:31:01FromGitter<zacharycarter> my condolences
00:31:06FromGitter<zacharycarter> yeah really
00:32:00FromGitter<Varriount> How are things going?
00:32:26FromGitter<zacharycarter> Mmm alright I suppose, kind of stumbling on this next project, trying to figure out exactly what I want to do
00:32:40*Jesin quit (Quit: Leaving)
00:37:26*Jesin joined #nim
01:06:28Nobabs27Can I have Ctrl+C to exit the program and not IOError? Or is my best bet to handle/try IOError?
01:09:06*NotSpooky joined #nim
01:10:23FromGitter<ephja> Nobabs27: https://nim-lang.org/docs/system.html#setControlCHook,
01:10:43subsetparkSee for examples https://rosettacode.org/wiki/Handle_a_signal#Nim
01:11:13Nobabs27Cool thanks, non of that turned up in a search engineing...
01:11:44*rain1 left #nim ("Leaving")
01:22:49*NotSpooky_ joined #nim
01:24:26*NotSpooky__ joined #nim
01:26:13*NotSpooky quit (Ping timeout: 255 seconds)
01:27:27*NotSpooky_ quit (Ping timeout: 240 seconds)
01:38:48*chemist69 quit (Ping timeout: 240 seconds)
01:49:18*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:52:40*chemist69 joined #nim
01:53:54*def-pri-pub joined #nim
01:54:35Nobabs27Error: type expected
01:54:36Nobabs27https://gist.github.com/Nobabs27/b19dc3603263770b621dc386cac12dfe#file-gistfile1-txt
01:57:02Nobabs27nvm
02:01:11*arnetheduck joined #nim
02:07:12Nobabs27https://gist.github.com/Nobabs27/21856a1ffd1bf921e32e876ad469aa80
02:07:23Nobabs27this gets an IOError
02:07:29Nobabs27when I do Ctrl+C
02:11:27FromGitter<ephja> it might be more of an rdstdin limitation
02:15:02FromGitter<ephja> I didn't really pay attention to your second question. yes, it might be best to catch IOError
02:17:06FromGitter<ephja> or use the overload that returns a bool
02:29:13Nobabs27ok
02:53:12*Nobabs27 quit (Quit: Leaving)
03:32:11*yglukhov joined #nim
03:36:35*yglukhov quit (Ping timeout: 240 seconds)
03:39:49*chemist69 quit (Ping timeout: 255 seconds)
03:40:14*chemist69 joined #nim
04:00:12*bahtiyar joined #nim
04:04:58*bahtiyar quit (Ping timeout: 240 seconds)
04:08:07*bahtiyar joined #nim
04:14:11*def-pri-pub quit (Quit: leaving)
04:35:26*NotSpooky__ quit (Quit: Leaving)
05:17:56*pilne quit (Quit: Quitting!)
05:34:23*bahtiyar quit (Ping timeout: 260 seconds)
05:34:24*yglukhov joined #nim
05:39:12*yglukhov quit (Ping timeout: 268 seconds)
05:41:16*ofelas joined #nim
06:07:26*aerx quit (Quit: WeeChat 1.8)
06:14:48*gangstacat joined #nim
06:28:17*NimBot joined #nim
06:28:18*tankfeeder joined #nim
06:41:48*arecacea1 quit (Read error: Connection reset by peer)
06:42:22*arecacea1 joined #nim
06:44:15*yglukhov joined #nim
07:01:51*yglukhov quit ()
07:08:50*Matthias247 joined #nim
07:09:14*user0_ joined #nim
07:20:26*nsf joined #nim
07:24:55*rauss quit (Quit: WeeChat 1.8)
07:26:56*ehmry quit (Ping timeout: 276 seconds)
07:29:06*ehmry joined #nim
07:41:10*tankfeeder quit (Ping timeout: 246 seconds)
07:44:30*chemist69 quit (Ping timeout: 240 seconds)
07:48:58*Vi- joined #nim
08:11:41*chemist69 joined #nim
08:44:03*Vladar joined #nim
08:48:47*xet7 joined #nim
09:01:19*couven92 joined #nim
09:19:58couven92Uhm, why is (-8 shr 1) 9_223_372_036_854_775_804? According to my understanding of shifting it should be -4?
09:21:03couven92Ah, because shifting automatically implies uint conversion?
09:23:35*bahtiyar joined #nim
09:27:01*bahtiyar_ joined #nim
09:34:30*yglukhov joined #nim
09:36:10user0_I really wish there was a tutorial/wiki on nim-gtk3
09:53:06*tankfeeder joined #nim
09:57:30couven92btw, Araq, with PR https://github.com/nim-lang/Nim/pull/5772 I am now combing through the failing tests, and I'll make a series of Issues for that. I think it might be useful in the future to introce an Andoird GitHub label?
09:57:54couven92s/introce/introduce
09:58:10*user0__ joined #nim
09:59:25*user0_ quit (Ping timeout: 246 seconds)
10:12:38*bahtiyar_ quit (Ping timeout: 260 seconds)
10:13:00*bahtiyar quit (Ping timeout: 268 seconds)
10:13:41*bahtiyar joined #nim
10:22:56*Matthias247 quit (Read error: Connection reset by peer)
10:34:51arecacea1Hey, I'm trying, within a macro, to add a bunch of statements to the beginning and at the end of a proc that I pass to the macro and change it (macro as pragma), can someone give me pointers what I can use within a macro to do achieve this? (prepend, append)
10:40:39arecacea1I can see that when I get the proc in the macro, it becomes a procdeff when I echo its treeRepr, I could access the procdef now by numeric index, as I suspect e.g. prc[3] is FormalParams in the treeRepr, is this common to do so? Accessing a NimNodes tree structure by numeric indexes? Are they not suseptible to changes atm?
11:05:01*nhywyll joined #nim
11:05:31*nhywyll quit (Client Quit)
11:17:18*nhywyll joined #nim
11:17:54*nhywyll quit (Client Quit)
11:19:18*yglukhov_ joined #nim
11:20:18*yglukhov quit (Ping timeout: 260 seconds)
11:22:41*tankfeeder quit (Quit: Leaving)
11:22:41*salewski joined #nim
11:23:33salewskiuser0_, yes it would be great if you can create one.
11:25:31salewskiAraq, do you have already an idea why type(x) in a proc works as expected by me,
11:25:46*yglukhov_ quit (Ping timeout: 268 seconds)
11:26:01*yglukhov joined #nim
11:26:03salewskibut getType() in the macro does not work as expected by me.
11:26:54*Trustable joined #nim
11:26:56salewskiAnd why can I not pass the typedesc creted by type(x) to the macro, but have
11:27:24salewskito use name(type(x)) to pass it as a string.
11:27:59*nhywyll joined #nim
11:28:15*nhywyll quit (Client Quit)
11:35:13*yglukhov_ joined #nim
11:35:23*yglukhov quit (Ping timeout: 255 seconds)
11:38:20*salewski quit (Quit: WeeChat 1.4)
11:41:09*nhywyll joined #nim
11:41:40*nhywyll quit (Client Quit)
11:45:24*yglukhov joined #nim
11:45:27*yglukhov_ quit (Ping timeout: 240 seconds)
11:48:18FromGitter<zacharycarter> Could anyone help me with the following errors? - https://gist.github.com/zacharycarter/d32890da4ad4539a15c6e282eacbb143
11:49:37*yglukhov_ joined #nim
11:49:48*yglukhov quit (Ping timeout: 260 seconds)
11:58:52*bahtiyar quit (Ping timeout: 255 seconds)
12:02:56*Snircle joined #nim
12:13:49FromGitter<zacharycarter> @krux02 you around?
12:14:08FromGitter<zacharycarter> wondering if I can add a helper method to your fork of glm
12:18:41couven92I get a file descriptor (an int) from a native API. How do I close that fd in Nim?
12:19:23couven92And how do I make a `File` out of a file descriptor?
12:33:26arecacea1Aren't there ternaries for let's? e.g. $ let foo = 1 if true else 2
12:34:04FromGitter<zacharycarter> no
12:34:09FromGitter<zacharycarter> but you can use if else as an expression
12:34:17FromGitter<zacharycarter> so if foo == 1: true else: 2
12:38:17arecacea1zacharycarter thanks
12:38:29euantorcoven92: Is it a posix file descriptor? if so, use `posix.close` (with `import posix`)
12:38:51FromGitter<zacharycarter> np
12:39:05euantorAs for making a `File` out of it, why do you need to? As far as I know there's no easy way
12:39:25euantor*couven92, sorry
12:48:12*yglukhov joined #nim
12:51:27*yglukhov_ quit (Ping timeout: 240 seconds)
13:02:14*couven92 quit (Ping timeout: 246 seconds)
13:11:42*user0__ quit (Quit: user0__)
13:13:04FromGitter<konqoro> Hey sup
13:13:14FromGitter<konqoro> check this out: https://github.com/nikitavoloboev/learn-anything/issues/531
13:16:51*bahtiyar joined #nim
13:20:37*jszymanski joined #nim
13:27:39*pilne joined #nim
13:29:01*yglukhov quit (Remote host closed the connection)
14:10:01*bahtiyar quit (Ping timeout: 246 seconds)
14:13:06*user0_ joined #nim
14:41:59*chemist69 quit (Ping timeout: 246 seconds)
14:46:35*chemist69 joined #nim
14:46:49*Ven joined #nim
14:47:12*Ven is now known as Guest80266
14:48:02*Guest80266 quit (Client Quit)
14:51:26*nhywyll joined #nim
15:07:33*aerx joined #nim
15:29:33*yglukhov joined #nim
15:34:16*yglukhov quit (Ping timeout: 260 seconds)
15:41:41*Vladar quit (Ping timeout: 268 seconds)
15:44:45*PMunch joined #nim
15:48:10*smt quit (Read error: Connection reset by peer)
15:48:57*Ven joined #nim
15:49:21*Ven is now known as Guest44526
15:52:07*nhywyll quit (Quit: nhywyll)
15:53:57*Sentreen quit (Ping timeout: 240 seconds)
16:01:31PMunchHmm, in this years Nim survey: Approximately how large are all the Nim projects that you work on?
16:02:23PMunchI do everything from simple scripts to frameworks and games in Nim. Maybe it would've been better to split that in two and ask: what is your largest project, what is your smallest project.
16:06:56*Sentreen joined #nim
16:11:28PMunchThe question: "Do you feel well informed in the direction that the Nim project is heading?" would probably also be better as a 1-5 kind of thing
16:19:32shmupdo you think this approach in nim would be "nimonic" or is there a different pattern you'd use? https://stackoverflow.com/a/34518260 (finding all combination of sums in a seq[int])
16:25:45PMunchYeah, a recursive function is pretty standard
16:27:48*nsf quit (Quit: WeeChat 1.7.1)
16:32:58PMunchHmm, how does Nim handle tail-end recursion?
16:37:35*Vi- quit (Ping timeout: 240 seconds)
16:40:53*Vi- joined #nim
16:44:14PMunchWould be interesting to have something like Clojures recur
16:45:20PMunchTo reuse the stack frame of your call if the last thing you're doing in your recursion is calling the procedure again and returning the return value of that call.
16:47:45*PMunch quit (Quit: leaving)
16:49:59*bahtiyar joined #nim
16:53:33*Vi- quit (Ping timeout: 276 seconds)
16:58:28*chemist69 quit (Ping timeout: 240 seconds)
17:00:58euantorI've been thinking about testing a fair bit recently, specifically testing on BSD systems. It looks like Circle CI might be a good approach with Circle CI 2.0: https://circleci.com/docs/2.0/custom-images/
17:01:18*chemist69 joined #nim
17:01:27euantorYou can run tests inside custom Docker containers, which would be useful for testing libraries - you can run against a docker image with Nim pre-installed and ready to go
17:05:29*Matthias247 joined #nim
17:07:57*Guest44526 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:20:27*tankfeeder joined #nim
17:39:28*bahtiyar quit (Ping timeout: 260 seconds)
17:40:16*Ven joined #nim
17:40:40*Ven is now known as Guest99479
17:44:51*nhywyll joined #nim
17:54:16*enthus1ast quit (Ping timeout: 268 seconds)
17:58:55*Vi- joined #nim
18:00:05*Sentreen quit (Ping timeout: 240 seconds)
18:05:45*Guest99479 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:09:07FromGitter<TiberiumN> also this would result in slightly faster testing
18:09:17FromGitter<TiberiumN> because you wouldn't need to compile csources every time
18:11:31euantorUnfortunately it doesn't solve the BSD issues, but still might be nice for people wanting CI for Nim apps
18:12:26FromGitter<TiberiumN> thankfully nim compilation time is very quick :)
18:13:08*Sentreen joined #nim
18:13:09FromGitter<TiberiumN> https://travis-ci.org/TiberiumN/nim-osureplay/builds/244155430
18:13:12FromGitter<TiberiumN> exampl
18:13:26*Ven_ joined #nim
18:13:42FromGitter<TiberiumN> Takes 1 minute 47 seconds to download csources, compile them, compile devel compiler and test my library (it's very small)
18:17:13*Ven_ quit (Client Quit)
18:19:47euantorhttps://circleci.com/gh/euantorano/dotenv.nim/11
18:20:07euantorLess than a minute since the container is already checked out and up to date
18:20:25euantorQuite simple config too: https://github.com/euantorano/dotenv.nim/blob/master/.circleci/config.yml
18:20:48FromGitter<TiberiumN> Is this docker image - nimlang devel or stable?
18:21:21euantorThat's stable
18:21:39euantorThe workflow should run on both stable and level, but that doesn't seem to be working right now. Trying to work out why
18:24:18*smt joined #nim
18:27:09*Sentreen quit (Ping timeout: 276 seconds)
18:33:19ehmryis there a convient way to catch exceptions and print traces when C++ is calling Nim?
18:39:16*Sentreen joined #nim
18:51:20*bahtiyar joined #nim
19:15:47*jszymanski quit (Quit: computer sleeps...)
19:38:19*bahtiyar quit (Ping timeout: 255 seconds)
19:42:04*couven92 joined #nim
19:42:48FromGitter<raydf> Hello everyone
19:43:03FromGitter<raydf> any help with this error compiling xmltools project:
19:43:33FromGitter<raydf> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=594ec0e511755ab0561b3b8f]
19:46:10*gokr joined #nim
19:57:09*yglukhov joined #nim
19:58:16*NotSpooky joined #nim
20:01:31*yglukhov quit (Remote host closed the connection)
20:05:02*tankfeeder quit (Ping timeout: 246 seconds)
20:05:44*tankfeeder joined #nim
20:05:45TrustableHi all, where can I get Aporia binaries for Windows?
20:11:36*NotSpooky_ joined #nim
20:14:15*NotSpooky quit (Ping timeout: 268 seconds)
20:16:20*SusWombat quit (Read error: Connection reset by peer)
20:16:25*SusWombat_ joined #nim
20:31:34FromGitter<ephja> @raydf are you using a recent build of nim?
20:31:52FromGitter<raydf> yeah i'm using choosenim
20:32:06FromGitter<raydf> 1) 17.0
20:32:27FromGitter<raydf> it works in my mac with an old version of nim
20:32:38FromGitter<ephja> it was fixed not too long ago, but I dunno if it was before or after 0.17.0
20:33:02*xet7 quit (Quit: Leaving)
20:33:23FromGitter<raydf> maybe i can use #head?
20:33:25FromGitter<raydf> let me try it
20:36:13FromGitter<raydf> in my mac with nim v0.16 and nimble v0.8.2 works
20:36:39FromGitter<raydf> but when i try to compile in linux with choosenim (0.17 and 0.8.6) it doesn't work
20:38:46*adeohluwa joined #nim
20:38:58FromGitter<ephja> ===head didn't work?===
20:40:32FromGitter<ephja> it does seem to work for me with a recent version. I know there was a similar bug that worked, and then it broke and then it worked again not long ago :-)
20:40:45FromGitter<raydf> it's building, i have a crappy vm
20:41:05*yglukhov joined #nim
20:41:21*tankfeeder quit (Ping timeout: 255 seconds)
20:43:10*Vi- quit (Ping timeout: 255 seconds)
20:44:31euantorAny ideas why I get the error `ambiguous call; both ospaths.getTempDir() and os.getTempDir() match for: ()` when using `nim doc2` (but not `nim doc`) for this line: https://github.com/euantorano/tempdir.nim/blob/master/src/tempdir.nim#L45
20:44:46euantorI'm using the fully qualified `os.getTempDir()`
20:45:47*tankfeeder joined #nim
20:47:16yglukhoveuantor: os includes ospaths, which is wrong imo
20:47:43*ipjk joined #nim
20:47:54euantorYeah, but why does it only fail with `doc2`, but not `doc` or when ran on its own? That seems completely unexpected to me
20:48:19euantorUnittestes work, it works when imported via Nimble, works with `doc`. The only time it fails is `doc2`
20:48:44yglukhovah, ok, no idea =)
20:49:14euantorYeah, it's a weird one :)
20:51:17couven92euantor, sorry for disappearing on you earlier today... Thanks for pointing me to the POSIX module, I had completely forgotten about that... :)
20:51:36FromGitter<raydf> @ephja, #head doesn't work
20:51:40euantorNot a problem, I was at work anyway so have been popping in and out
20:52:19FromGitter<raydf> how can i freeze a version of a require in nim?
20:52:53FromGitter<raydf> ```requires @["nim = 0.16.0", "rosencrantz == 0.3.0", "xmltools >= 0.0.3", "yaml >= 0.9.0"]```
20:54:57shmupwhere can I learn more about an outType such as a seq[Thing] passed into a proc and me wanting to assign it to a new seq
20:55:15shmupre: seq cannot be assigned to seq[outtype]
20:58:01*ofelas quit (Quit: shutdown -h now)
21:04:25*Trustable quit (Remote host closed the connection)
21:04:37*yglukhov quit (Remote host closed the connection)
21:05:03*nhywyll quit (Quit: nhywyll)
21:06:13shmupwell really i want to combine a newSeq with the passed in function's seq[outtype], now that I think about it
21:10:31FromGitter<ephja> @raydf huh. ok
21:14:57FromGitter<ephja> you're right. I never actually instantiated it
21:17:42FromGitter<ephja> oh well
21:22:41FromGitter<raydf> thanks anyway, let me see how can i compile the project anyways
21:32:27FromGitter<raydf> @ephja i had to fork a project and simulate a new release from the offending lib. Again, thanks for testing on your side.
21:34:25*tankfeeder quit (Ping timeout: 268 seconds)
21:46:40*SusWombat joined #nim
21:47:27*SusWombat_ quit (Ping timeout: 240 seconds)
21:47:58*gokr quit (Ping timeout: 260 seconds)
21:51:50*Trioxin quit (Ping timeout: 240 seconds)
22:00:07*nsf joined #nim
22:16:14*gokr joined #nim
22:24:57*gokr quit (Ping timeout: 240 seconds)
22:28:29FromGitter<ephja> it might be because the type is recursive
22:28:38*handlex joined #nim
22:35:28*vld quit (Remote host closed the connection)
22:37:50*v17d joined #nim
22:43:04*nsf quit (Quit: WeeChat 1.7.1)
22:56:47*ipjk quit (Read error: Connection reset by peer)
23:05:09*yglukhov joined #nim
23:08:21*adeohluwa quit (Quit: Connection closed for inactivity)
23:09:27*yglukhov quit (Ping timeout: 240 seconds)
23:15:26*handlex quit (Quit: handlex)
23:45:36*Matthias247 quit (Read error: Connection reset by peer)