<< 10-11-2017 >>

00:02:09*gokr quit (Ping timeout: 248 seconds)
00:06:43*tefter joined #nim
00:11:15*yglukhov quit (Remote host closed the connection)
00:25:15*SenasOzys_ quit (Remote host closed the connection)
00:39:21*jsgrant joined #nim
00:41:44*yglukhov joined #nim
00:41:52*vlad1777d quit (Ping timeout: 260 seconds)
00:46:05*yglukhov quit (Ping timeout: 240 seconds)
01:06:51*onionhammer1 is now known as onionhammer
01:07:24*onionhammer quit (Quit: WeeChat 1.9.1)
01:08:17*onionhammer joined #nim
01:10:48*def-pri-pub joined #nim
01:28:12*yglukhov joined #nim
01:32:49*yglukhov quit (Ping timeout: 248 seconds)
01:33:19*guest5081 quit (Ping timeout: 248 seconds)
01:40:25*vivus quit (Quit: Leaving)
01:49:09*kalkin--- joined #nim
01:52:31*kalkin-- quit (Ping timeout: 240 seconds)
02:09:09*def-pri-pub quit (Quit: Leaving.)
02:21:21*astronavt joined #nim
02:25:21*astronavt quit (Remote host closed the connection)
02:28:47GitDisc<treeform> yes it does.
02:29:08GitDisc<treeform> But your code continues to look the same. Everything continues to work.
02:35:34*def-pri-pub joined #nim
02:37:08FromGitter<Varriount> treeform: This kind of premise only works so long as you have something that can embed/patch the async/await calls in.
02:37:31FromGitter<Varriount> Technically possible in Nim, I guess, but seems like too much magic.
02:41:10*chemist69 quit (Ping timeout: 258 seconds)
02:44:45*def-pri-pub quit (Quit: Leaving.)
02:49:53GitDisc<treeform> Technically anything is possible in Nim?
02:53:10*endragor joined #nim
02:54:33*chemist69 joined #nim
03:00:05*JappleAck quit (Quit: Leaving)
03:00:25FromGitter<Varriount> treeform: Well, one could implement a compiler plugin to inject the calls, or use term-rewriting macros
03:00:44GitDisc<treeform> Yeah you can rewrite whole AST with macros.
03:00:48*ipjk quit (Quit: Leaving)
03:00:58GitDisc<treeform> I have good news all my timezone unit tests pass!
03:01:11FromGitter<Varriount> You're writing a time library?
03:01:16GitDisc<treeform> Yes.
03:05:58*marenz__ joined #nim
03:09:48*marenz_ quit (Ping timeout: 268 seconds)
03:34:39*sz0 quit (Quit: Connection closed for inactivity)
03:53:27*dddddd quit (Remote host closed the connection)
04:01:39*jinshil joined #nim
04:39:42*vlad1777d joined #nim
04:40:20*skrylar joined #nim
04:40:29skrylaryardanico: were you one of the peeps asking about nfltk?
04:46:30*endragor quit (Remote host closed the connection)
04:46:57*endragor joined #nim
04:52:32GitDisc<treeform> Does any one know how to include binary data into a nim exe? Like timezone tables. I can include it as source, but it really increases compile times.
04:53:05GitDisc<treeform> Other options is including this tz file as a seperate file.
05:02:02*marenz__ quit (Ping timeout: 268 seconds)
05:31:10*endragor quit (Remote host closed the connection)
05:44:32*def-pri-pub joined #nim
05:51:37*endragor joined #nim
05:56:11*endragor quit (Ping timeout: 240 seconds)
05:56:27*rauss quit (Quit: WeeChat 1.9.1)
06:00:22*vlad1777d quit (Ping timeout: 260 seconds)
06:19:05*def-pri-pub quit (Quit: Leaving.)
06:37:33*SenasOzys joined #nim
06:42:29skrylartreeform: well.. of course embedding data makes compiling take longer? it has to copy the data in to the binary...
06:43:22*endragor joined #nim
06:43:41skrylarin this scenario you would probably use a debug switch so it just loads from a file when using debug builds and embeds on a release build, assuming you are in an environment where the release build needs to be self contained
06:46:25*SenasOzys quit (Ping timeout: 248 seconds)
06:50:13*SenasOzys joined #nim
06:52:30*nsf joined #nim
07:09:11*jsgrant quit (Remote host closed the connection)
07:10:57*jsgrant joined #nim
07:10:58*Vladar joined #nim
07:25:05FromGitter<Varriount> treeform: There's staticRead
07:29:10*jjido joined #nim
07:33:31*jjido quit (Read error: Connection reset by peer)
07:50:21*gokr joined #nim
08:06:18*Ven joined #nim
08:06:42*Ven is now known as Guest25031
08:10:57*Guest25031 quit (Ping timeout: 240 seconds)
08:19:45*claudiuinberlin joined #nim
08:30:36*floppydh joined #nim
08:52:42*Arrrr joined #nim
08:54:42*yglukhov joined #nim
09:03:37*jinshil quit (Quit: Good-bye!)
09:12:01*tefter quit (Ping timeout: 248 seconds)
09:21:37*SenasOzys quit (Ping timeout: 248 seconds)
09:22:00*SenasOzys joined #nim
09:45:53*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
09:49:53*ShalokShalom joined #nim
10:23:17*ShalokShalom_ joined #nim
10:27:01*ShalokShalom quit (Ping timeout: 268 seconds)
10:28:27*xkapastel quit (Quit: Connection closed for inactivity)
10:31:55FromGitter<vegansk> Does `koch temp c` should produce stack trace?
10:32:03FromGitter<vegansk> (https://files.gitter.im/nim-lang/Nim/FmwP/image.png)
10:38:37*couven92 joined #nim
10:40:58Araqno, only with 'koch temp -d:debug c' iirc
10:41:42Araqbut I doubt the stack trace that points you into the compiler/vm.nim is of any use
10:41:58dom96'temp' is -d:release by default?
10:42:28FromGitter<vegansk> Thanks.
10:43:33dom96that seems counterintuitive
10:50:53Araqdom96: no, but it doesn't produce a stack trace for non-crashes
10:51:16dom96oh
10:51:18*PMunch joined #nim
10:58:36*Elronnd joined #nim
10:59:13*macsek1911[m] joined #nim
11:00:54*Ven joined #nim
11:01:17*Ven is now known as Guest32862
11:05:03*Guest32862 quit (Ping timeout: 250 seconds)
11:17:31*SenasOzys quit (Ping timeout: 240 seconds)
11:22:18*Zevv joined #nim
11:22:55ZevvHi #nim. My code uses a bunch of async HTTP clients, after some time I get incrementally more errors saying "Connection was closed before full request
11:22:58Zevv> has been made"
11:24:19ZevvI'm not sure why and where this is coming from, I have not seen this earlier with 0.17.0, but it seems to happen since I switched to 0.17.2
11:26:09*SenasOzys joined #nim
11:30:46*dddddd joined #nim
11:38:39dom96weird, sadly all I can suggest is to try to reproduce it
11:43:00*endragor quit (Remote host closed the connection)
11:53:52Zevvok, so there is not a known issue in nim
11:53:56Zevvthat's all I need to know for now
11:57:52*marenz__ joined #nim
12:19:47*nsf quit (Quit: WeeChat 1.9.1)
12:25:48*arnetheduck joined #nim
12:30:27*elrood joined #nim
12:37:20*SenasOzys quit (Ping timeout: 248 seconds)
12:44:15*SenasOzys joined #nim
12:47:36*endragor joined #nim
12:50:03*Ven joined #nim
12:50:26*Ven is now known as Guest3192
12:53:48federico3Zevv: any "shutdown while in init"?
12:54:25*Guest3192 quit (Ping timeout: 248 seconds)
13:06:37*vivus joined #nim
13:20:35*endragor quit (Remote host closed the connection)
13:21:06*endragor joined #nim
13:25:28*endragor quit (Ping timeout: 240 seconds)
13:31:59Zevvnope
13:32:20ZevvIt's actually a colluege having problems with my code
13:32:36ZevvWe'll do some more debugging before bothering you here again, thanks
13:42:11*Jesin quit (Quit: Leaving)
13:52:44federico3Zevv: can you share an example?
13:57:09*Arrrr quit (Read error: Connection reset by peer)
14:01:57*Arrrr joined #nim
14:11:22FromGitter<alehander42> echo always flushes ?
14:12:59PMunchThink so
14:13:18PMunchhttps://nim-lang.org/docs/system.html#echo,varargs[typed,]
14:13:41PMunchYup "Writes and flushes the parameters to the standard output."
14:14:20PMunch"It is roughly equivalent to writeLine(stdout, x); flushFile(stdout)"
14:15:40Zevvfederico3: not simple I'm afraid, the code is part of system involving other components. Basically, it simulates phone call events (hundreds/thousands a second), and for every call sends the a HTTP request to a server
14:16:16*jjido joined #nim
14:16:50ZevvI reuse AsyncHTTPClients clients whenever possible
14:17:13federico3Zevv: as a test, try not reusing them and create new ones
14:17:46*dddddd_ joined #nim
14:18:21Zevvthat doesn't scale at all I'm afraid
14:18:26Zevvthere's a reason for pooling :)
14:19:45*dddddd quit (Ping timeout: 248 seconds)
14:20:04dom96Zevv: Are you using devel or 0.17.2?
14:20:33Zevv0.17.2
14:20:44dom96Then try devel, there was a relatively recent change that might help
14:20:46federico3Zevv: of course, that's why I wrote "as a test"
14:20:57Zevvhttp://paste.debian.net/995007/
14:21:03Zevv:)
14:21:39ZevvI don't have the test setup here at this moment and my colluege left, but we'll try this next monday
14:21:40*dddddd_ is now known as dddddd
14:21:49Zevvthe issue we now see only happens after 'some time'
14:24:57*marenz__ quit (Ping timeout: 240 seconds)
14:25:39dom96Could also be to do with `withTimeout`
14:25:46dom96The requests aren't cancelled yet
14:26:26ZevvOh so I need to explicitly cancel a request when a timeout kicks in
14:26:39dom96yes, but there is no way to do that right now :\
14:26:55dom96I'd try devel anyway, it might help
14:26:59ZevvNo problemen, I'm glad we found the cause
14:27:20dom96well, it's not 100% found :)
14:27:26Zevv*likely* cause :)
14:28:05dom96but definitely try devel, there have been some connection management changes
14:28:22ZevvOk, will do!
14:36:33Zevvdom96: reading the diff for httpclient from 0.17.2 to devel
14:37:07ZevvI'm not sure if any of these changes address this issue. Do you happen to know what book keeping is required to 'clean' a HTtpclient for reuse?
14:38:00*SenasOzys quit (Ping timeout: 268 seconds)
14:38:06ZevvWhat I do see (and did not know) what the httpclient lib can decide do close connection on error anway - I'm not sure if it would be safe to reuse these connections of they are closed, and I don't check for this at this moment
14:38:40dom96httpclient should automatically reconnect if the socket has been closed
14:38:46Zevvok, that makes sense
14:38:48dom96before this patch the sockets weren't being closed though
14:39:01dom96which is what I think could have caused your bug
14:39:18Zevvok, all clear. I hope to learn more next week, thanks once more
14:39:40Zevvbtw, you're always here, and always helping.
14:39:47ZevvIs that your day time job?
14:39:55dom96hah, nope
14:40:23Zevvwel, much kudos to you then!
14:40:24dom96Wouldn't mind if it was, but I'm just a mere student :)
14:40:36Zevvwho just published a book
14:40:40Zevvthat's nice on your resume :)
14:47:15*SenasOzys joined #nim
14:56:02FromGitter<Varriount> Pfft, just a mere student. I can count on one hand the number of students who have published their own book.
14:58:36dom96:)
15:00:35FromGitter<couven92> dom96, how far along are you with your degree?
15:05:45*PMunch quit (Quit: Leaving)
15:05:50FromGitter<mratsim> I just stumbled on this: library of primitives for embedded devices multithreaded programming by Siemens: https://github.com/siemens/embb/blob/master/README.md
15:10:00FromGitter<krux02> when I pass a function declaration to a typed macro, the symbols in the ident def section are just identifiers, not symbols, is this intentional, or is it a bug I can report?
15:10:57*jjido quit (Ping timeout: 240 seconds)
15:11:43*Jesin joined #nim
15:12:24FromGitter<krux02> http://ix.io/C8J
15:16:59*endragor joined #nim
15:21:11*endragor quit (Ping timeout: 240 seconds)
15:29:48*gokr quit (Ping timeout: 268 seconds)
15:33:54GitDisc<treeform> Will this code pack the char array inside the struct as 8 bytes? https://gist.github.com/treeform/36396e84ac5a8ecdd587709adb7eef43 Is there a better FixedString or PackedString I could use?
15:34:29GitDisc<treeform> Varriount thank you about staticRead, I will try that next
15:35:10*floppydh quit (Quit: WeeChat 1.9.1)
15:35:45FromGitter<krux02> yes
15:37:01FromGitter<krux02> a way to confirm this yourself is to check the generated C code, and when you don't know C that well, you can still check the pointer values to the members of the struct
15:38:19FromGitter<krux02> assert(myDstChange.name[0].addr - castint (myDstChange.addr) == 2)
15:45:08*rauss joined #nim
15:47:54dom96couven92: last year of BSc
15:49:19couven92Oh, that's even fewer students who have published a book BEFORE they get their BSc. :P
15:49:35couven92(I certainly haven't! :P )
15:49:52couven92And don't know anyone else either
16:00:20dom96:D
16:02:12*Vladar quit (Remote host closed the connection)
16:06:33GitDisc<treeform> thanks krux02!
16:13:56*gokr joined #nim
16:17:34*Snircle joined #nim
16:19:03*yglukhov quit (Remote host closed the connection)
16:19:45*arnetheduck quit (Ping timeout: 248 seconds)
16:22:19*nsf joined #nim
16:25:39FromGitter<brentp> in an iterator, is there a way to accomplish in nim what `raise StopIteration` does in python?
16:25:55*gokr quit (Ping timeout: 268 seconds)
16:25:58FromGitter<krux02> In a macro I have the symbol of an enum value, how can I get the enum value?
16:26:30*Zevv left #nim ("until we meet again!")
16:26:34FromGitter<krux02> @prentp what does ``rause StopIteration`` do?
16:26:51FromGitter<krux02> when you iterate, you can break
16:27:33FromGitter<krux02> and when you have nested loops you can assign names to blocks of code and use that name to specify what you want to break out from
16:28:04FromGitter<krux02> and in the implementaton of the iterator you can always just stop emitting numbers
16:30:12FromGitter<brentp> ok. before the loop, I have some setup and in many cases that results in not yielding any values. It looks like using blocks and break as you suggest will be sufficient.
16:52:28*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:00:21*xkapastel joined #nim
17:16:47*zolk3ri joined #nim
17:21:21*Vladar joined #nim
17:25:57*yglukhov joined #nim
17:30:09*yglukhov quit (Ping timeout: 248 seconds)
17:31:30FromGitter<Varriount> @dom96 Have you ever given any thought to adding multi-threading capability to the async framework via a threadpool+channels, like what Go does?
17:31:49*couven92 quit (Quit: Client disconnecting)
17:32:10*smt joined #nim
17:32:45dom96yes
17:33:11dom96You can't just bolt on what Go does. That's a completely different way of achieving concurrency with parallelism
17:33:27dom96I'm working on a fast parallel HTTP server right now
17:41:27FromGitter<alehander42> which languages are you typically benchmarking against ? I want to compare my library with other lang equivalents and I've noticed many people here benchmark a lot :D
17:46:14dom96Rust and Go mainly
17:46:22*claudiuinberlin joined #nim
17:46:57federico3and C
17:48:12FromGitter<alehander42> hm C would be hard, because I want to compare with languages with functional methods (map fold filter etc) or good libraries for that
17:48:36FromGitter<alehander42> and I doubt that's typical for C , but in C++ I guess there are boost lib-s for that?
17:50:01*yglukhov joined #nim
17:51:50FromGitter<Varriount> dom96: Does it use async?
17:52:07dom96Varriount: yes
17:52:24*zolk3ri left #nim (#nim)
17:52:40*xet7 quit (Quit: Leaving)
17:53:32*yglukhov quit (Read error: Connection reset by peer)
17:54:07*yglukhov joined #nim
17:58:18*xet7 joined #nim
17:59:32*yglukhov quit (Remote host closed the connection)
18:00:07*yglukhov joined #nim
18:04:21*yglukhov quit (Ping timeout: 240 seconds)
18:10:51*elrood quit (Quit: Leaving)
18:12:27*xet7 quit (Quit: Leaving)
18:28:21*yglukhov joined #nim
18:46:52*endragor joined #nim
18:47:54*beatmox quit (Remote host closed the connection)
18:48:25*beatmox joined #nim
18:51:11*endragor quit (Ping timeout: 248 seconds)
18:54:19*smt` joined #nim
18:54:21*smt quit (Ping timeout: 250 seconds)
19:10:54FromGitter<alehander42> Ok I am 1:1 vs rust :D must find the slow part
19:14:44*vrc joined #nim
19:16:00*vrc quit (Client Quit)
19:28:19dom96alehander42: what are you working on?
19:41:40FromGitter<alehander42> Nothing special, benchmarking my zero_functional vs other language stdlib / libs
19:45:06shashlickhow efficient is strtabs vs tables?
19:52:14FromGitter<data-man> @alehander42: maybe D?
19:54:57*arecaceae quit (Remote host closed the connection)
19:55:17*arecaceae joined #nim
20:02:36*PMunch joined #nim
20:08:04*vlad1777d joined #nim
20:08:48GitDisc<GooRoo> @alehander42, what is your library for?
20:09:03GitDisc<GooRoo> probably I skipped it
20:10:00GitDisc<GooRoo> or rather missed
20:19:18FromGitter<data-man> @GooRoo: https://github.com/alehander42/zero-functional
20:24:49FromGitter<alehander42> There are some problem domains for which I use a lot of transformations on iterators and functional style is perfect for it, so I just tried to optimize maximally this case
20:25:18*Arrrr quit (Read error: Connection reset by peer)
20:25:18GitDisc<GooRoo> nice
20:25:20FromGitter<alehander42> There is still some work but I wanted to get a feel how other lang are solving this
20:26:05GitDisc<GooRoo> what about benchmarks versus Haskell?
20:28:05GitDisc<GooRoo> with C++ it's a bit tricky because fully functional way is not always the most optimal, even though there are some libs made in functional style
20:32:23FromGitter<alehander42> Yep I'll do some tomorrow with more functional langs
20:33:29FromGitter<alehander42> Yep still there are some very heavy macro based libs in c++
20:33:48FromGitter<alehander42> So I assumed there might be some competition
20:45:22*Trustable joined #nim
20:49:05FromGitter<mratsim> @alehander42 Haskell with deforestation, D and probably D with ndslice, Rust if possible with Rayon for parallel map/fold, you can benchmark against Arraymancer as well (with or without OpenMP) ;). Maybe Lua as well, and Julia with their @parallel macro.
20:49:47FromGitter<mratsim> Maybe OCAML aussi, apparently it often compiles into quite optimized C code.
20:52:18FromGitter<mratsim> And ASM.js ?
20:53:00FromGitter<mratsim> Or Python + Puppy
20:57:43FromGitter<mratsim> Oh and Crystal !
20:57:54FromGitter<mratsim> Python + Pypy*
21:03:03FromGitter<alehander42> Yep Crystal was pretty fast, but still slower than my lib for my examples
21:03:32FromGitter<alehander42> And it compiles release mode so so slowly
21:03:49FromGitter<alehander42> Julia is in my list
21:05:04FromGitter<alehander42> Rayon is a good idea( but I'll have to create a separate suite parallel benchmark)
21:05:33FromGitter<alehander42> I'll ask you tomorrow when I get back to it thanks :D
21:07:25*Vladar quit (Quit: Leaving)
21:13:59arecaceaeos.getEnv is still here no?
21:14:14arecaceaecan't seem to find it in docs: https://nim-lang.org/docs/os.html
21:14:18arecaceaebut it compiles
21:16:28*PMunch quit (Quit: leaving)
21:23:39*xet7 joined #nim
21:31:45FromGitter<mratsim> I think it's quite hard to beat optimized Nim code, you can go much farther than most languages with templates and metaprogramming, inline iterators, etc. However you can also explode your library size, in Arraymancer each call to the parallel map2 functions to iterate on 2 Tensors generates about 700 lines of C code :/ (imagine that for +, -, *, /, etc ....)
21:34:59FromGitter<Piripant> The last time I visited this IRC (~4/5 months ago) there was some discussion/thoughts about switching from the GC to a system similar to Rust
21:35:06FromGitter<Piripant> Did that go anywhere?
21:36:19*elrood joined #nim
21:43:52*gokr joined #nim
21:48:04FromGitter<Varriount> @Piripant https://forum.nim-lang.org/t/3254/2
21:48:55FromGitter<Varriount> I don't imagine the GC will go anywhere, but the general direction seems to be to make using objects (rather than references) more appealing.
22:00:09*kunev quit (Ping timeout: 268 seconds)
22:01:10*kunev joined #nim
22:04:49*Trustable quit (Remote host closed the connection)
22:22:35FromGitter<Varriount> @mratsim You can't decrease that with --opt:size ?
22:24:13FromGitter<mratsim> Once compiled it's not big actually so I think it's fine.
22:25:59FromGitter<mratsim> @Piripant you should read that on destructors/move https://nim-lang.org/araq/destructors.html
22:26:52FromGitter<mratsim> Personally I like mixing manual memory management + GC.
22:35:13*Mat4 joined #nim
22:42:52*Mat4 quit (Quit: leaving)
22:50:44*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:25:58*skrylar quit (Remote host closed the connection)
23:42:36*enthus1ast- joined #nim