00:32:41 | * | HakanD____ joined #nim |
00:37:45 | * | HakanD____ quit (Ping timeout: 260 seconds) |
01:19:20 | * | yglukhov joined #nim |
01:22:40 | * | chemist69 quit (Disconnected by services) |
01:22:45 | * | chemist69_ joined #nim |
01:23:34 | * | yglukhov quit (Ping timeout: 250 seconds) |
01:28:56 | * | Jesin joined #nim |
01:29:41 | * | Jesin quit (Remote host closed the connection) |
01:34:41 | * | HakanD____ joined #nim |
01:39:12 | * | HakanD____ quit (Ping timeout: 252 seconds) |
01:40:01 | * | Jesin joined #nim |
01:54:41 | * | fredrik92 quit (Quit: Client disconnecting) |
02:37:08 | * | desophos joined #nim |
03:05:56 | * | dmi0 joined #nim |
03:21:08 | * | sarlalian quit (Quit: ZNC 1.6.1 - http://znc.in) |
03:30:59 | * | kulelu88 quit (Quit: Leaving) |
03:36:29 | * | HakanD____ joined #nim |
03:38:32 | * | pregressive quit (Remote host closed the connection) |
03:39:17 | * | pregressive joined #nim |
03:40:53 | * | HakanD____ quit (Ping timeout: 252 seconds) |
03:43:23 | * | pregressive quit (Ping timeout: 245 seconds) |
03:47:44 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
03:56:01 | * | yglukhov joined #nim |
04:00:33 | * | yglukhov quit (Ping timeout: 252 seconds) |
04:06:00 | * | dmi0 quit (Ping timeout: 260 seconds) |
04:37:15 | * | HakanD____ joined #nim |
04:41:26 | * | HakanD____ quit (Ping timeout: 250 seconds) |
04:55:28 | * | Demos quit (Read error: Connection reset by peer) |
06:39:02 | * | HakanD____ joined #nim |
06:39:15 | * | chemist69_ is now known as chemist69 |
06:41:38 | * | Sembei quit (Ping timeout: 244 seconds) |
06:42:31 | * | chemist69 quit (Quit: WeeChat 1.5) |
06:43:48 | * | HakanD____ quit (Ping timeout: 260 seconds) |
06:51:31 | * | bjz joined #nim |
06:52:50 | * | MonsterA- is now known as MonsterAbyss |
07:02:15 | * | chemist69 joined #nim |
07:09:12 | * | Arrrr joined #nim |
07:09:28 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:13:04 | * | Trustable joined #nim |
07:14:33 | * | HakanD____ joined #nim |
07:16:21 | * | nsf joined #nim |
07:22:30 | * | bjz joined #nim |
07:25:57 | * | bjz quit (Client Quit) |
07:26:42 | * | bjz joined #nim |
07:41:28 | * | Andris_zbx joined #nim |
07:59:29 | * | brechtm joined #nim |
08:08:48 | * | ftsf_ quit (Quit: :q!) |
08:38:19 | * | Sembei joined #nim |
08:45:11 | * | fredrik92 joined #nim |
09:46:07 | euantor | AM I being blind, or is there no way to set headers for AsyncHttpClient? |
09:46:36 | euantor | Hm, I could set the property on the `AsyncHttpClient` object |
10:01:43 | cheatfate | euantor, i think you can add headers but some of them you can't modify |
10:02:37 | euantor | Just a quick note: The htmlparser module loads either from files or streams, but AsyncHttpClient returns response bodies as strings. In order to retrieve a HTML response and parse it, you have to make the request, create a StringStream from the response body, then parse. This seems a bit cumbersome to me - when it comes to @dom96's great stdlib cleanup this |
10:02:37 | euantor | might be something to look at |
10:03:13 | euantor | cheatfate: Yep, I managed to get that part working, it just works differently to all of the other types of request (getContent(), get(), etc.) |
10:08:24 | FromGitter | <x86128> hi, is there any variant of "echo(typeof a)" ? |
10:11:28 | FromGitter | <endragor> import typetraits ⏎ echo type(a).name |
10:12:09 | FromGitter | <x86128> @endragor thnx |
10:12:57 | flyx | I wonder what the logical distinction is between procs in typeinfo and typetraits. why are they not in the same module? |
10:13:24 | Arrrr | haha, i was thinking the same, and everytime i look to both modules, that question comes to my mind |
10:26:38 | * | gokr joined #nim |
10:42:57 | * | HakanD____ quit (Quit: Be back later ...) |
10:43:30 | * | HakanD____ joined #nim |
10:47:52 | * | HakanD____ quit (Ping timeout: 260 seconds) |
10:50:01 | * | brechtm quit (Ping timeout: 260 seconds) |
10:56:00 | * | desophos quit (Read error: Connection reset by peer) |
10:58:31 | * | brechtm joined #nim |
11:01:14 | Araq | one is about RTTI, the other about type traits which are useful in generics |
11:02:15 | * | Snircle joined #nim |
11:03:45 | * | dmi0 joined #nim |
11:07:54 | * | brechtm quit (Ping timeout: 252 seconds) |
11:10:15 | * | brechtm joined #nim |
11:16:44 | * | dmi0 quit (Ping timeout: 256 seconds) |
11:22:01 | * | Arrrr quit (Quit: WeeChat 1.5) |
11:28:50 | * | dmi0 joined #nim |
11:32:31 | * | HakanD____ joined #nim |
11:35:35 | euantor | Are there any known issues with making async HTTP requests within a loop? I've got a fairly simple program that's never finishing when I have it make several requests. With 4 HTTP requests it's fine, with 5 it never finishes. |
11:35:54 | euantor | I'm making requests to a set of Apache directory index pages, the code looks like this: |
11:36:49 | euantor | https://gist.github.com/euantorano/9eccac4be403cbe675c6f1cf23d3e909 |
11:37:03 | euantor | I also tried using `asyncdispatch.all` and had the same issue |
11:37:24 | * | brechtm quit (Remote host closed the connection) |
11:37:56 | euantor | Also, whilst it's processing the CPU is pegged at about 32% on my laptop, so it's obviously doing some work somewhere |
11:38:02 | * | brechtm joined #nim |
11:45:57 | * | lucus16 joined #nim |
11:46:13 | cheatfate | euantor, and what you get while pressing Ctrl+C where it stopped most often? |
11:46:35 | euantor | `SIGINT: Interrupted by Ctrl-C.` |
11:46:38 | euantor | This is on windows |
11:46:50 | * | lucus16 left #nim (#nim) |
11:46:52 | euantor | The output looks like this: |
11:47:51 | euantor | https://www.irccloud.com/pastebin/8tZXmWoW/ |
11:48:13 | euantor | So it makes the first 2/5 requests, and gets no further - even after being left for a couple of minutes |
11:49:14 | cheatfate | euantor, yep, its hard to understand what happening while you on windows... but looks like a `showstopper` problem |
11:49:58 | euantor | If I only do 4 requests though, I get this: |
11:50:02 | euantor | https://www.irccloud.com/pastebin/O5zPxeww/ |
11:50:30 | euantor | The same thing also happens on a Linux machine running Fedora 24 (fully updated) |
11:51:03 | euantor | (note I've changed URLs and stuff to not leak internal IPs) |
11:54:10 | euantor | I was previously using the htmlparser module but thought it might be that causing the problem, which is why it now uses nre |
11:55:30 | cheatfate | euantor, you need to understand that to make an issue we need at least reproducible source |
11:55:51 | euantor | The source code I included above has this behaviour |
11:56:23 | euantor | The only changes I've made are the HTTP authentication (don't want to give out username/password) and the URL examples |
11:57:22 | * | confundus joined #nim |
12:00:21 | * | confundus quit (Client Quit) |
12:01:29 | cheatfate | euantor, but looks i need to know some kind of command line arguments which you are omit... |
12:01:47 | euantor | The command line arguments are at the top of those two outputs |
12:02:09 | euantor | The first line starting with `PS C:\Users\euant\Desktop\fetch_app_files>` is the command line call |
12:02:16 | euantor | All it takes is a list of URLs |
12:02:33 | * | brechtm quit (Read error: No route to host) |
12:02:45 | euantor | as an example: https://www.irccloud.com/pastebin/6CoRMIda/ |
12:02:50 | * | brechtm joined #nim |
12:03:31 | cheatfate | euantor, so to run your example i need to run webserver with appropriate structure? this not helps... |
12:03:59 | euantor | Yes, sorry. I'm at work and the webserver I am using is not on the internet so I cannot help there |
12:04:17 | * | confundus joined #nim |
12:05:54 | cheatfate | Error: unhandled exception: isPowerOfTwo(initialSize) |
12:06:43 | cheatfate | euantor, works for me only for 1 or 2 links |
12:06:51 | euantor | Hm |
12:06:53 | cheatfate | euantor, if i pass 3 links i got some problems in your code |
12:07:13 | euantor | Strange. It works for 4 for me, 5 is the magic number for my laptop |
12:07:25 | euantor | The `isPowerOfTwo` one is any easy fix |
12:08:01 | euantor | The problem is in the `initTable` call in `processDirectories` - I'll fix that now |
12:08:23 | cheatfate | ready? |
12:11:06 | euantor | Ok, the tables problem is fixed and I removed the nre: https://gist.github.com/euantorano/9eccac4be403cbe675c6f1cf23d3e909 |
12:12:40 | euantor | It now seems to work with 5 URLs |
12:13:10 | euantor | I've now added the nre code back in and it works still, so the problem is related to not using initTable propery... |
12:18:12 | cheatfate | euantor, but how did not catch this assertion? |
12:18:56 | euantor | cheatfate: I have no idea. THat exception doesn't get thrown for me at all, using the version I checked out from GitHub this morning |
12:21:23 | cheatfate | euantor, i have tested latest devel on windows and linux and got this assertion on 3 links |
12:21:41 | cheatfate | euantor, but maybe because i have no directories at all |
12:21:59 | cheatfate | i have tested it on simple "hello world webpage" |
12:22:08 | euantor | dirs is just the URLs passed as arguments |
12:22:16 | euantor | So if you have 3 links, it'll be 3 |
12:22:51 | euantor | https://www.irccloud.com/pastebin/vUWBMudF/ |
12:22:59 | euantor | That's what I get, with the fix removed |
12:23:35 | euantor | Ah, would the assertion be rmoved because it's a release build? |
12:23:50 | cheatfate | euantor, ^^^ yep |
12:23:58 | euantor | Yep! |
12:24:01 | euantor | Mystery solved! |
12:24:15 | cheatfate | Nim has two types of asserts |
12:24:28 | cheatfate | First one `assert` will be removed in release version |
12:24:31 | euantor | That's a very easy way to shoot yourself in the foot then. Because when combined with a Future it just never returns |
12:24:36 | cheatfate | Second one `doAssert` will not be removed |
12:24:51 | euantor | Maybe it should be changed to a `doAssert` then? |
12:26:54 | cheatfate | euantor, this is complex and tough question... |
12:27:08 | euantor | Yes, it definitely is |
12:27:43 | euantor | I've just managed to waste your time for 30 minutes though because the error was hidden |
12:28:00 | euantor | I'm not sure what the best fix is, but it's obviously aproblem |
12:28:29 | * | elrood joined #nim |
12:30:21 | cheatfate | euantor, but error was not so `hidden`, this behavior was documented in tables.nim ## `initialSize` needs to be a power of two. If you need to accept runtime |
12:30:21 | cheatfate | ## values for this you could use the ``nextPowerOfTwo`` proc from the |
12:30:21 | cheatfate | ## `math <math.html>`_ module or the ``rightSize`` proc from this module. |
12:31:26 | euantor | Yeah, but I wasn't looking at the documentation unfortunately. If it causes a hard fail, it should exit out with a proper error in my opinion |
12:33:38 | FromGitter | <endragor> I’m not sure why it couldn’t be friendlier and call nextPowerOfTwo itself rather than requiring it from user. nextPowerOfTwo is that slow. |
12:34:01 | euantor | Yes, that would work too endragor |
12:34:05 | FromGitter | <endragor> *isn't |
12:41:12 | * | bjz_ joined #nim |
12:41:18 | * | bjz quit (Ping timeout: 245 seconds) |
12:46:49 | FromGitter | <Araq> compiling a program in -d:release, detecting a problem, not compiling in debug mode ... what were you thinking? |
12:47:32 | euantor | Araq: I'd compiled in debug mode and tested it with 2 URLs, it worked. I then did it in release, deployed it and tried it with 5 and it broke |
12:47:59 | euantor | I didn't then think to recompile in debug, just tweaked the program, pressed up in my terminal to go to the last command (-d:release) and ran it again |
12:48:32 | FromGitter | <Araq> if you setup the initial size for performance (and there is no other reason to do that), you might as well pass a size that works? Not sure I wanna "fix" this, but I suppose "I already lost time because of this behaviour" is non negotiable |
12:49:41 | euantor | So long as you know off the top of your head it has to be a "working" size or take the time to consult the documentation every time (if your memory is anywhere near as bad as mine) |
12:51:18 | * | gokr quit (Ping timeout: 252 seconds) |
13:16:48 | * | gokr joined #nim |
13:31:23 | * | mitai joined #nim |
13:37:03 | * | zielmicha[m] quit (Ping timeout: 250 seconds) |
13:37:04 | * | TheManiac quit (Ping timeout: 250 seconds) |
13:37:31 | * | zielmicha[m] joined #nim |
13:37:46 | * | TheManiac joined #nim |
13:38:01 | * | UNIcodeX joined #nim |
13:49:09 | * | fredrik92 quit (Quit: Client disconnecting) |
13:57:45 | cheatfate | stupid noob question about js backend, can i make client only javascript with ajax requests in nim? and if so do we have some examples? |
14:07:00 | * | HakanD____ quit (Quit: Be back later ...) |
14:17:37 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:17:41 | * | pregressive joined #nim |
14:19:14 | * | HakanD____ joined #nim |
14:21:19 | Araq | cheatfate: surely you can |
14:21:41 | Araq | dunno about examples, but 'dochack' uses some ajax related hacks |
14:22:04 | cheatfate | dochack? |
14:22:33 | cheatfate | i have found dochack |
14:24:05 | cheatfate | argh, looks like dirty hacks with emits, i thought we have something like async/await for js backend :) |
14:24:33 | Araq | the .emits are only because I was very lazy |
14:30:04 | * | confundus quit (Quit: leaving) |
14:37:33 | cheatfate | i think we need something like https://github.com/yortus/asyncawait#1-introduction |
14:37:38 | cheatfate | it would be very nice :) |
14:42:41 | * | pafmaf joined #nim |
14:49:57 | * | UNIcodeX quit (Quit: Leaving) |
14:51:31 | * | krux02 joined #nim |
14:58:05 | * | pie_ joined #nim |
15:23:07 | * | HakanD____ quit (Quit: Be back later ...) |
15:26:38 | * | nsf quit (Quit: WeeChat 1.5) |
15:27:43 | * | HakanD____ joined #nim |
15:28:01 | * | HakanD____ quit (Client Quit) |
15:34:18 | * | chemist69 quit (Quit: WeeChat 1.6) |
15:34:56 | * | chemist69 joined #nim |
15:37:57 | * | Sembei quit (Ping timeout: 252 seconds) |
15:51:40 | * | irrequietus joined #nim |
15:57:45 | * | Andris_zbx quit (Remote host closed the connection) |
16:04:25 | * | HakanD____ joined #nim |
16:10:05 | FromGitter | <jfhs> hi guys, I tried to find in docs, but couldn't find: is it possible to return proc from proc? something like proc x(): proc(a, b: int): string ? |
16:11:03 | dom96 | yeah, that's pretty much exactly how |
16:13:02 | FromGitter | <jfhs> I'm sure I'm doing something wrong, because I have error ⏎ >Error: cannot instantiate: 'result:type' ⏎ On line ⏎ >proc compileNimbars(tmpl: string): proc(vars: tuple):string = [https://gitter.im/nim-lang/Nim?at=5804f88eb827179842cd2c86] |
16:15:27 | * | HakanD____ quit (Quit: Be back later ...) |
16:15:36 | dom96 | `tuple` is a type class |
16:15:48 | dom96 | Make it more concrete, for example: tuple[x, y: int] |
16:16:01 | * | HakanD____ joined #nim |
16:16:48 | FromGitter | <jfhs> ok, this way it works, thanks :) |
16:20:28 | * | HakanD____ quit (Ping timeout: 256 seconds) |
16:22:17 | * | krux02 quit (Quit: Leaving) |
16:22:45 | * | sarlalian joined #nim |
16:23:52 | * | HakanD____ joined #nim |
16:39:50 | * | fredrik92 joined #nim |
16:43:39 | * | Sembei joined #nim |
17:04:31 | * | sarlalian quit (Quit: ZNC 1.6.1 - http://znc.in) |
17:15:36 | * | PMunch joined #nim |
17:24:39 | * | Sembei quit (Ping timeout: 252 seconds) |
17:35:01 | * | Matthias247 joined #nim |
17:35:25 | * | yglukhov joined #nim |
17:42:11 | * | TheManiac quit (Ping timeout: 256 seconds) |
17:42:43 | * | hohlerde quit (Ping timeout: 258 seconds) |
17:42:43 | * | jivank[m] quit (Ping timeout: 258 seconds) |
17:42:43 | * | ehmry quit (Ping timeout: 258 seconds) |
17:42:43 | * | M-Quora quit (Ping timeout: 258 seconds) |
17:43:19 | * | zielmicha[m] quit (Ping timeout: 256 seconds) |
17:49:43 | * | brson joined #nim |
17:54:56 | * | zielmicha[m] joined #nim |
17:56:41 | * | HakanD____ quit (Quit: Be back later ...) |
17:57:11 | * | ehmry joined #nim |
17:57:11 | * | jivank[m] joined #nim |
17:57:17 | * | HakanD____ joined #nim |
17:57:18 | * | TheManiac joined #nim |
17:57:18 | * | hohlerde joined #nim |
17:57:20 | * | M-Quora joined #nim |
17:58:53 | * | kulelu88 joined #nim |
18:01:27 | * | HakanD____ quit (Ping timeout: 252 seconds) |
18:17:00 | * | pregressive quit (Read error: Connection reset by peer) |
18:17:00 | * | pregress_ joined #nim |
18:26:23 | * | djellemah joined #nim |
18:26:33 | * | brechtm_ joined #nim |
18:29:58 | * | brechtm quit (Ping timeout: 250 seconds) |
18:38:59 | * | yglukhov quit (Remote host closed the connection) |
18:47:25 | * | libman joined #nim |
18:51:41 | * | pie_ quit (Ping timeout: 252 seconds) |
19:05:10 | * | fredrik92 quit (Read error: Connection reset by peer) |
19:20:09 | * | dmi0 quit (Ping timeout: 252 seconds) |
19:35:15 | * | bdew joined #nim |
19:35:46 | * | bdew left #nim ("Leaving") |
19:39:26 | * | yglukhov joined #nim |
19:39:44 | * | yglukhov quit (Remote host closed the connection) |
19:39:59 | * | yglukhov joined #nim |
19:40:00 | * | yglukhov quit (Remote host closed the connection) |
19:40:15 | * | yglukhov joined #nim |
19:40:47 | * | yglukhov quit (Remote host closed the connection) |
19:41:03 | * | yglukhov joined #nim |
19:41:34 | * | yglukhov quit (Remote host closed the connection) |
20:01:51 | * | vendethiel- joined #nim |
20:02:05 | * | chemist69 quit (Ping timeout: 260 seconds) |
20:02:20 | * | Ven_ joined #nim |
20:02:33 | * | vendethiel quit (Ping timeout: 258 seconds) |
20:16:36 | * | Ven_ quit (Read error: Connection reset by peer) |
20:16:50 | * | Ven_ joined #nim |
20:25:43 | * | dddddd joined #nim |
20:28:54 | * | brechtm_ quit (Remote host closed the connection) |
20:29:03 | * | chemist69 joined #nim |
20:33:25 | * | Ven__ joined #nim |
20:33:28 | * | Ven_ quit (Ping timeout: 260 seconds) |
20:34:42 | * | dmi0 joined #nim |
20:39:42 | * | brechtm joined #nim |
20:42:25 | * | yglukhov joined #nim |
20:44:25 | * | tinAndi joined #nim |
20:46:54 | * | yglukhov quit (Ping timeout: 250 seconds) |
20:49:41 | * | Sembei joined #nim |
21:02:41 | * | Ven_ joined #nim |
21:02:58 | * | Ven__ quit (Read error: Connection reset by peer) |
21:04:40 | * | pafmaf quit (Ping timeout: 250 seconds) |
21:05:12 | * | Ven_ quit (Client Quit) |
21:05:22 | * | fredrik92 joined #nim |
21:11:00 | * | ARCADIVS joined #nim |
21:12:50 | * | nsf joined #nim |
21:26:16 | * | dmi0 quit (Ping timeout: 260 seconds) |
21:31:22 | * | bjz joined #nim |
21:36:20 | * | HakanD____ joined #nim |
21:43:40 | * | brechtm quit (Remote host closed the connection) |
21:44:02 | * | mitai___ joined #nim |
21:44:06 | * | mitai quit (Ping timeout: 250 seconds) |
21:45:32 | * | brechtm joined #nim |
21:47:43 | * | HakanD____ quit (Quit: Be back later ...) |
21:48:20 | * | HakanD____ joined #nim |
21:51:00 | * | Trustable quit (Remote host closed the connection) |
21:51:24 | * | brechtm quit (Remote host closed the connection) |
21:51:40 | * | pie_ joined #nim |
21:52:49 | * | HakanD____ quit (Ping timeout: 252 seconds) |
21:54:59 | * | pie_ quit (Read error: Connection reset by peer) |
21:59:22 | * | bjz_ joined #nim |
22:00:12 | * | bjz quit (Ping timeout: 252 seconds) |
22:03:18 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
22:05:47 | * | Snircle joined #nim |
22:06:15 | * | chemist69 quit (Ping timeout: 256 seconds) |
22:07:32 | * | Jesin quit (Quit: Leaving) |
22:08:40 | * | chemist69 joined #nim |
22:09:28 | * | pregress_ quit (Remote host closed the connection) |
22:12:47 | * | PMunch quit (Quit: leaving) |
22:15:36 | * | pie_ joined #nim |
22:18:36 | * | brechtm joined #nim |
22:18:59 | * | brechtm quit (Remote host closed the connection) |
22:19:33 | * | brechtm joined #nim |
22:29:13 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:32:52 | * | brechtm quit (Remote host closed the connection) |
22:35:17 | * | irrequietus quit () |
22:43:23 | * | saml_ joined #nim |
22:44:08 | * | yglukhov joined #nim |
22:45:58 | * | elrood quit (Quit: Leaving) |
22:48:23 | * | yglukhov quit (Ping timeout: 245 seconds) |
22:54:28 | * | mitai___ quit (Ping timeout: 260 seconds) |
22:55:15 | * | ubuntu1504 joined #nim |
22:55:59 | * | ubuntu1504 quit (Client Quit) |
22:57:15 | * | tstm1 is now known as tstm |
23:00:26 | * | nsf quit (Quit: WeeChat 1.5) |
23:10:11 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:40:00 | * | mitai___ joined #nim |
23:48:13 | * | tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]) |
23:52:21 | * | mitai___ quit (Ping timeout: 252 seconds) |