00:07:28 | * | brson joined #nim |
00:09:52 | Araq_ | tautologico: use a concept |
00:18:51 | tautologico | I was looking into concepts a few minutes ago. the manual says they're still in development, how usable are they in practice? |
00:22:13 | libman | I asked on LLVM official IRC channel (irc.oftc.net/#llvm): "Is there still a possibility of LLVM switching licenses, as someone suggested in October, or did that madness finally pass?" |
00:42:37 | libman | Log: http://libman.org/tmp/20160510-llvm-irc.log - they don't understand the difference between BSD and Apache license :( |
00:45:49 | libman | Suggestion: nim-lang.org could use a more noticeable favicon. I recommend putting http://libman.org/tmp/nim.png through http://www.favicon-generator.org/ and using the code it gives you. |
00:48:40 | * | yglukhov joined #nim |
00:53:24 | * | yglukhov quit (Ping timeout: 276 seconds) |
00:54:20 | * | lubos_cz joined #nim |
00:55:39 | * | libman quit (Remote host closed the connection) |
01:01:41 | Araq_ | tautologico: most pressing bug is that "generic concepts" with [T] don't work, but usually that's not required |
01:02:04 | Araq_ | that said, I still want to rewrite the implementation, it's goofy |
01:07:40 | tautologico | good to know |
01:08:58 | tautologico | I imagine there are future plans to use concepts in the stdlib? |
01:33:53 | * | brson quit (Ping timeout: 276 seconds) |
01:57:56 | * | chemist69 quit (Ping timeout: 276 seconds) |
02:09:44 | * | kseg joined #nim |
02:11:12 | * | chemist69 joined #nim |
02:20:08 | kseg | New user, so maybe this is silly, and I know it’s trivial to write, but I feel that there should be a SeqRef type. |
02:31:33 | * | lubos_cz quit (Ping timeout: 240 seconds) |
02:59:24 | * | fastrom joined #nim |
03:51:31 | * | yglukhov joined #nim |
03:55:42 | * | yglukhov quit (Ping timeout: 246 seconds) |
04:59:59 | * | bozaloshtsh quit (Changing host) |
04:59:59 | * | bozaloshtsh joined #nim |
05:16:58 | * | kseg quit (Ping timeout: 250 seconds) |
05:36:02 | * | endragor joined #nim |
05:40:17 | * | gokr joined #nim |
05:53:34 | * | yglukhov joined #nim |
05:58:26 | * | yglukhov quit (Ping timeout: 276 seconds) |
06:12:13 | * | irrequietus joined #nim |
06:35:31 | * | endragor_ joined #nim |
06:38:27 | * | endragor quit (Ping timeout: 260 seconds) |
07:01:41 | * | yglukhov joined #nim |
07:03:06 | * | endragor_ quit (Remote host closed the connection) |
07:03:34 | * | endragor joined #nim |
07:19:52 | * | Trustable joined #nim |
07:27:45 | * | arnetheduck joined #nim |
08:14:03 | * | irrequietus quit () |
08:51:37 | * | Arrrr joined #nim |
08:51:37 | * | Arrrr quit (Changing host) |
08:51:37 | * | Arrrr joined #nim |
08:53:55 | * | Demon_Fox quit (Quit: Leaving) |
08:56:37 | * | PMunch joined #nim |
09:02:05 | * | r4vi joined #nim |
09:09:09 | * | gokr quit (Remote host closed the connection) |
09:12:36 | Arrrr | This now works http://pastebin.com/znvjgSCg, i think this will benefit object variants. |
09:12:50 | Arrrr | Will import follow the same road? |
09:28:49 | * | kulelu88 joined #nim |
09:28:49 | * | kulelu88 quit (Changing host) |
09:28:49 | * | kulelu88 joined #nim |
09:36:45 | * | fastrom quit (Quit: Leaving.) |
09:47:36 | * | ozra_ joined #nim |
09:47:44 | * | ozra_ left #nim (#nim) |
09:54:01 | Araq_ | Arrrr: no. |
09:54:21 | Araq_ | import is fundamentally different and local imports caused very big problems in D |
09:55:20 | Araq_ | with local imports you can either have (a) inconsistent scoping rules or (b) error prone scoping rules |
09:55:50 | Araq_ | neither of which is desirable. |
10:00:35 | Arrrr | I see |
10:03:18 | * | Senketsu quit (Ping timeout: 276 seconds) |
10:27:42 | * | zipR4ND joined #nim |
10:34:23 | cheatfate | Araq_, is while() is faster than for...yield mechanism? |
10:35:47 | Araq_ | no |
10:36:10 | * | Senketsu joined #nim |
10:36:18 | cheatfate | thanks |
10:55:10 | * | lubos_cz joined #nim |
11:17:03 | * | kulelu88 quit (Quit: Leaving) |
11:35:42 | * | enthus1ast joined #nim |
11:35:46 | enthus1ast | hoi |
11:36:53 | * | lubos_cz quit (Ping timeout: 265 seconds) |
11:42:13 | * | fastrom joined #nim |
11:45:58 | * | AnonCat joined #nim |
11:46:14 | * | GangstaCat quit (Ping timeout: 260 seconds) |
11:51:16 | * | elrood joined #nim |
12:01:08 | * | zipR4ND quit (Ping timeout: 276 seconds) |
12:13:07 | * | yglukhov quit (Ping timeout: 252 seconds) |
12:26:53 | * | BitPuffin joined #nim |
12:36:18 | * | yglukhov joined #nim |
12:55:05 | kier | is there any way to get the filename of the source file currently being compiled at compile time? |
12:55:16 | kier | I've looked at instantiationInfo, but that seems to only work at runtime |
12:55:56 | kier | nvm, i've just seen currentSourcePath |
12:56:31 | * | gokr joined #nim |
13:01:27 | * | yglukhov_ joined #nim |
13:04:30 | * | yglukhov quit (Ping timeout: 246 seconds) |
13:50:26 | cheatfate | Araq_, looks like nim got a problem with your latest debuginfo patches https://github.com/nim-lang/Nim/issues/4144 |
13:50:46 | cheatfate | but i have made same thing on archlinux and got no error |
13:50:55 | cheatfate | maybe because my compiler was fresh enough |
13:52:18 | Araq_ | 0.13 cannot build devel. |
14:01:42 | * | saml_ joined #nim |
14:01:56 | * | AnonCat is now known as GangstaCat |
14:03:50 | Araq_ | cheatfate: fixed. |
14:05:33 | cheatfate | Araq_, very fast :) nice |
14:06:24 | cheatfate | Araq_, i'm looking for advice/suggestion |
14:06:55 | cheatfate | do you have some time to spare? |
14:08:42 | Araq_ | kind of, go ahead |
14:12:21 | cheatfate | let assign situation for asynchttpserver.nim where it already accepted socket and start waiting for request headers from client |
14:12:48 | cheatfate | first of all it registers with selectors.nim socket for reading data |
14:13:41 | cheatfate | and after that it registers same socket with selectors for writing data |
14:14:28 | cheatfate | for linux epoll it results to calls to epoll_ctl() one with registering socket for reading and another for modification socket for read and write |
14:15:04 | cheatfate | so there 2 calls to kernel but it can be done with only one |
14:15:52 | cheatfate | in such case we need to maintain data structure in selectors.nim to cache modifications to sockets and pass it to kernel in select() method |
14:16:18 | cheatfate | this will reduce kernel/user mode switches by 2x times |
14:17:00 | cheatfate | and now problem i'm looking data structure for caching this information which can work as hashtable and can iterate like array :) |
14:17:46 | cheatfate | currently i have only one method is to maintain hashtable and also queue or linked list |
14:18:12 | * | zipR4ND joined #nim |
14:18:13 | cheatfate | hashtable and queue will hold same data |
14:18:59 | cheatfate | but in select() i will use only queue to update kernel structures |
14:19:37 | Araq_ | I know it's unlikely to be a productive remark |
14:19:47 | Araq_ | but when I need a table/seq hybrid |
14:20:10 | Araq_ | I use a seq and slowish O(N) access |
14:20:35 | Araq_ | my N is usually tiny anyway. |
14:22:19 | cheatfate | i can't use seq just because currently asyncdispatch can process 100,000 connections per second |
14:22:45 | cheatfate | O(100,000) will destroy all my improvements |
14:23:37 | cheatfate | and also i want to make selectors.nim threadsafe... |
14:23:52 | cheatfate | ^^^^ the biggest and complex task |
14:24:45 | * | pregressive joined #nim |
14:27:35 | Araq_ | there is also OrderedTable which keeps insertion order |
14:30:02 | gokr | Or perhaps a critbit tree |
14:30:18 | gokr | Just read a bit about that thing earlier today. |
14:33:25 | cheatfate | Araq_, i think you must make a rule, if somebody proposes data structure to stdlib he must introduce not only singlethreaded variant but sharedmemory variant too |
14:34:27 | Araq_ | that rule would be counterproductive and totally weird |
14:36:31 | * | libman joined #nim |
14:36:31 | Araq_ | most of the time the shared variant can only support a subset of the available operations. |
14:37:23 | cheatfate | Araq_, there not so many structures in stdlib which are threadsafe... or can be used in multithreaded environment |
14:37:40 | Araq_ | if not contains(x, key): x.incl key # single threaded variant: 2 operations are fine. |
14:38:02 | Araq_ | if not containsOrIncl(x, key) # Multi threaded variant: ops need to be fused for sane semantics |
14:38:31 | Araq_ | they require vastly different API designs |
14:39:03 | Araq_ | and 'len' for example is often just a race condition waiting to happen in an MT design |
14:39:58 | Araq_ | also: Every stdlib collection can be used in a MT environment already. It just cannot be used as a global variable sharing data between threads. |
14:40:25 | cheatfate | but singlethreaded API design can be subset of multithreaded API |
14:40:41 | cheatfate | you can easily use containsOrIncl(x, key) in singlethreaded design |
14:42:01 | cheatfate | we are trying to make stdlib to be OS independent/arch independent and to make it thread independent i need to make very complex sources... |
14:42:59 | * | PMunch quit (Ping timeout: 276 seconds) |
14:47:10 | Araq_ | cheatfate: as I said before, a version that requires --threads:on is fine with me, we need to enable locks and shared allocs and the like for --threads:off anyway |
14:47:38 | Araq_ | the current design where --threads:off means lots of stuff is missing from system.nim is not acceptable |
14:48:29 | cheatfate | https://gist.github.com/cheatfate/dd0b0ece334634be164fd6750ac63a52 |
14:49:42 | cheatfate | its how selectors.nim can be look |
14:49:59 | cheatfate | or must look |
14:50:05 | cheatfate | to be threadsafe |
14:50:27 | cheatfate | and this will be complex source |
14:51:13 | cheatfate | and in every block i need to use different data structures... |
14:51:27 | cheatfate | just because most of them not threadsafe |
14:52:27 | cheatfate | but this is not dispute... i'm just looking for data structure which will be most suitable for enumeration and fast searches |
14:56:27 | cheatfate | Araq_, or you want me to make just singlethreaded variant of selectors.nim which support timers/signals/processes and all other staff? |
14:56:44 | Araq_ | no, just multithreaded variant. |
14:57:42 | Araq_ | and if it helps you further, just the 64 bit variant. |
14:58:08 | Araq_ | heavily efficient servers can run in 64 bits |
15:01:54 | * | endragor quit (Read error: Connection reset by peer) |
15:02:06 | * | Salewski joined #nim |
15:02:36 | * | endragor joined #nim |
15:03:06 | cheatfate | Araq_, just to remember do you know about problem with 'union'? |
15:03:36 | Araq_ | there is no problem. |
15:03:46 | Araq_ | it's an unaligned pointer access. |
15:04:11 | Araq_ | you need to use 'ptr' to begin with and cast the ref under GC_ref or something. |
15:04:47 | Salewski | main.nim(123, 12) Error: ambiguous identifier: 'File' -- use a qualifier # var f: File # Would be great to get a hint which modules provide type File. compiling with -- verbosity:3 seems not to give more info. |
15:14:31 | Araq_ | Salewski: indeed and is reported |
15:14:56 | Salewski | Great! |
15:15:49 | Salewski | usage: sug|con|def|use|dus|chk|highlight|outline # is there some info about new commands like dus, chk... |
15:17:24 | Salewski | when activating terse mode nimsuggest seems to crash always, but that is not a big problem for me currently. Socked use seems to work. |
15:18:54 | Araq_ | hu? |
15:19:16 | Araq_ | dus is 'def or use' |
15:19:35 | Araq_ | chk is the same that 'nim check' does |
15:20:06 | Araq_ | highlight outputs semantic highlighting information, like 'this identifier over there is a type/proc/const' |
15:20:22 | Araq_ | outline # no idea, cannot remember lol. |
15:21:52 | Salewski | Ah. And what is these new --v2 mode? Yesterday I tried nimsuggest in terminal, and there terse mode always crashed. No idea why. Something like illegal storage access. |
15:23:22 | Araq_ | the v2 mode adds more information and should always be used for new developments |
15:28:04 | Salewski | OK, thanks. Will use v2. |
15:30:41 | Salewski | terse crashes only with sug command, no problem |
15:30:48 | Salewski | nimsuggest --v2 --stdin main.nim |
15:31:05 | Salewski | sug main.nim:14:5 SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
15:31:37 | Araq_ | Salewski: oh btw checkout the new strscans module as yet another alternative to pegs and regexes |
15:32:11 | Salewski | OK, will do. |
15:33:01 | Araq_ | if scanp(input, +({'a'..'z'} -> ident.add($_))): |
15:33:06 | Araq_ | echo "identifier ", ident |
15:33:18 | Araq_ | somebody needs to document 'scanp'. :-) |
15:33:28 | Araq_ | it's really sweet. |
15:33:48 | Araq_ | and you can write real parsers with it |
15:40:56 | Salewski | >new strscans module # not easy to find its location. Is it a nimble package? |
15:41:48 | yglukhov_ | dom96: I can remember some PR that fixed something with windows sockets, and you argued a lot against it. could you please point me to it? was it merged? |
15:43:28 | Araq_ | Salewski: it's in the devel branch under lib/pure |
15:44:38 | Salewski | Yes, I just found it, thanks. |
15:44:42 | Salewski | Bye. |
15:44:45 | * | Salewski quit () |
15:46:06 | dom96 | yglukhov_: this one maybe? https://github.com/nim-lang/Nim/pull/4098 |
15:46:44 | yglukhov_ | exactly! thanks. |
15:49:28 | * | yglukhov_ quit (Remote host closed the connection) |
15:52:06 | * | fastrom quit (Quit: Leaving.) |
15:54:48 | * | brson joined #nim |
15:56:27 | * | fastrom joined #nim |
16:05:19 | * | pregressive quit (Read error: Connection reset by peer) |
16:05:26 | * | saml_ quit (Quit: Leaving) |
16:05:35 | * | pregressive joined #nim |
16:08:10 | * | yglukhov joined #nim |
16:09:18 | * | enthus1ast quit (Ping timeout: 246 seconds) |
16:13:22 | * | Jesin quit (Quit: Leaving) |
16:14:39 | * | yglukhov quit (Remote host closed the connection) |
16:16:15 | * | yglukhov joined #nim |
16:18:48 | * | Jesin joined #nim |
16:21:33 | * | chrisheller joined #nim |
16:32:35 | cheatfate | yglukhov, it was not a good idea to remove this because after some tests i have found that some immediate completion routines are useful and cannot be removed |
16:33:20 | cheatfate | yglukhov, we found another way to avoid this deep recursion problems |
16:33:30 | yglukhov | cheatfate, no problem, just got some strange bug on windows and thought it might be related to this pr, but as i see, it was never merged, so the bug is elsewhere... |
16:33:53 | cheatfate | yglukhov, not this one? https://github.com/nim-lang/Nim/issues/3919 |
16:34:22 | yglukhov | nope |
16:35:01 | cheatfate | yglukhov, interesting, what you found |
16:36:52 | * | Arrrr quit (Ping timeout: 250 seconds) |
16:37:49 | yglukhov | well, theres an issue with nimongo. under heavy load in async mode it hangs because it thinks that mongo msg len is huge, and tries to read it out. reproduces only on windows. macos and linux are ok. |
16:38:25 | yglukhov | looks like it's reading some garbage from the socket. |
16:40:52 | dom96 | yglukhov: have you tried using `--gc:markandsweep`? |
16:41:18 | dom96 | might be a memory corruption which will disappear with a different GC |
16:42:42 | yglukhov | ok, i'll try, thanks |
16:43:45 | * | saml_ joined #nim |
16:43:59 | * | pregressive quit (Read error: Connection reset by peer) |
16:44:12 | cheatfate | yglukhov, do you know why nimongo using locks? |
16:44:32 | * | pregressive joined #nim |
16:45:15 | yglukhov | cheatfate, yes. just by accident. they should not really be there =) |
16:45:45 | * | saml_ quit (Client Quit) |
16:49:06 | cheatfate | yglukhov, nimongo looks very strange... https://github.com/SSPkrolik/nimongo/blob/master/nimongo/mongo.nim#L294 |
16:49:18 | cheatfate | yglukhov, this procedure uses try: except: and await... |
16:50:43 | cheatfate | but asyncdispatch do not support such construction |
16:53:46 | * | Arrrr joined #nim |
16:53:58 | * | Arrrr quit (Changing host) |
16:53:58 | * | Arrrr joined #nim |
16:55:02 | cheatfate | yglukhov, does it receive totally wrong data or maybe it was a part of data? |
16:55:52 | yglukhov | cheatfate: can't tell yet. bot dom96, gc suggestion `--gc:markandsweep` seems to work |
16:56:00 | yglukhov | * but |
16:56:39 | dom96 | yglukhov: cool |
16:56:50 | dom96 | cheatfate: asyncdispatch does support it, just not very well. |
16:57:52 | yglukhov | dom96, argh, sorry, your suggestion doesn't help :( |
16:58:14 | dom96 | D: |
16:58:38 | dom96 | yglukhov: best thing to do is to start removing as much out of nimongo as you can while preserving the bug |
16:58:52 | dom96 | but yeah, that is very time consuming :\ |
16:59:44 | yglukhov | no worries, working on it. |
17:09:32 | cheatfate | dom96, its maybe a problem i have tried to message you some days ago |
17:14:06 | cheatfate | but i think it looks like nimongo problem because of pool usage maybe there is a little bug happens when data receiving from wrong socket... |
17:16:02 | * | fastrom quit (Quit: Leaving.) |
17:18:26 | cheatfate | dom96, does 'await' macro support this construction? https://github.com/SSPkrolik/nimongo/blob/master/nimongo/mongo.nim#L450 |
17:19:03 | dom96 | what construction? |
17:19:55 | cheatfate | i know await expands to yield future. future.read() |
17:21:14 | * | zahary joined #nim |
17:21:18 | cheatfate | ok i will check expanded variant |
17:23:53 | * | PMunch joined #nim |
17:28:48 | cheatfate | dom96, nm 'await' expands properly |
17:29:27 | dom96 | Remember that 'await' isn't a macro |
17:29:29 | dom96 | 'async' is |
17:29:45 | dom96 | It analyses the context in which 'await' is invoked and transforms it appropriately |
17:30:58 | cheatfate | dom96, yeah i know just missed names |
17:31:56 | cheatfate | dom96, no, i'm not wrong, not me called 'await' macro but somebody https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1245 |
17:32:41 | cheatfate | dom96, but this is just joke... |
17:33:54 | dom96 | Guess it's my bad. |
17:34:53 | * | zahary quit (Quit: Leaving.) |
17:39:58 | * | ephja joined #nim |
17:42:06 | * | pregressive quit (Remote host closed the connection) |
17:55:29 | cheatfate | dom96, i always time thinking about https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L955 why you are used seqs |
17:56:46 | cheatfate | dom96, maybe i'm wrong but i think at one moment of time there can be only one future waiting for reading on particular socket |
17:57:25 | * | chemist69 quit (Quit: WeeChat 1.5) |
18:01:41 | * | pregressive joined #nim |
18:06:33 | * | yglukhov quit (Remote host closed the connection) |
18:11:21 | dom96 | cheatfate: Even if that is the case it isn't a problem as long as we're single threaded. |
18:11:52 | cheatfate | dom96, i'm just looking a reason why you made this... |
18:12:01 | cheatfate | why you used sequence |
18:12:18 | cheatfate | not just one callback holder for ready and one callback holder for write |
18:13:07 | dom96 | cheatfate: because it was the easiest at the time, I don't have a specific reason. |
18:13:53 | cheatfate | dom96, i dont think you will use sequence if you need only one callback to hold... there must be a reason for this situation |
18:15:16 | * | enthus1ast joined #nim |
18:15:19 | dom96 | cheatfate: There likely is, but I can't remember it right now. |
18:39:13 | * | fastrom joined #nim |
18:44:10 | * | zipR4ND quit (Ping timeout: 252 seconds) |
18:46:26 | * | bozaloshtsh quit (Ping timeout: 250 seconds) |
18:57:41 | * | silven quit (Ping timeout: 265 seconds) |
18:58:09 | * | silven joined #nim |
19:09:04 | * | chrisheller quit () |
19:10:57 | * | tautologico quit (Quit: Connection closed for inactivity) |
19:33:35 | * | vendethiel joined #nim |
19:36:09 | * | fastrom1 joined #nim |
19:37:12 | * | fastrom quit (Ping timeout: 246 seconds) |
19:41:02 | * | enthus1ast quit (Ping timeout: 250 seconds) |
19:43:23 | * | Arrrr quit (Quit: WeeChat 1.4) |
19:43:34 | * | enthus1ast joined #nim |
19:44:36 | * | BitPuffin quit (Read error: Connection reset by peer) |
20:17:54 | * | yglukhov joined #nim |
20:19:10 | ldleworker | #machine-learning has recently started up, come join if that's a thing to you. |
20:22:00 | * | yglukhov quit (Ping timeout: 246 seconds) |
20:24:16 | Araq_ | ldleworker: ha, you are not there either |
20:24:48 | * | bozaloshtsh joined #nim |
20:25:41 | * | fastrom1 quit (Quit: Leaving.) |
20:26:20 | ldleworker | Araq_: we realized that #ai exists and we abandoned ship |
20:26:24 | ldleworker | sorry |
20:26:33 | Araq_ | lol, that was quick |
20:31:24 | * | tautologico joined #nim |
20:37:24 | * | kier quit (Quit: leaving) |
21:12:22 | * | kier joined #nim |
21:13:03 | * | devn_ is now known as devn |
21:21:42 | * | yglukhov joined #nim |
21:26:17 | * | yglukhov quit (Ping timeout: 260 seconds) |
21:46:12 | * | yglukhov joined #nim |
21:48:10 | * | Demon_Fox joined #nim |
22:04:26 | * | endragor quit (Remote host closed the connection) |
22:04:34 | * | yglukhov quit (Ping timeout: 260 seconds) |
22:07:40 | * | enthus1ast quit (Ping timeout: 252 seconds) |
22:12:06 | * | arnetheduck quit (Ping timeout: 244 seconds) |
22:12:24 | * | elrood quit (Quit: Leaving) |
22:13:26 | * | yglukhov joined #nim |
22:16:51 | * | Matthias247 joined #nim |
22:17:54 | * | yglukhov quit (Ping timeout: 250 seconds) |
22:18:41 | * | enthus1ast joined #nim |
22:22:51 | * | Demon_Fox quit (Quit: Leaving) |
22:25:58 | * | PMunch quit (Quit: leaving) |
22:26:26 | * | gokr quit (Ping timeout: 276 seconds) |
22:27:46 | * | Demon_Fox joined #nim |
22:41:40 | * | yglukhov joined #nim |
22:46:35 | * | yglukhov quit (Ping timeout: 276 seconds) |
22:46:38 | * | pregressive quit (Remote host closed the connection) |
23:03:18 | * | Trustable quit (Remote host closed the connection) |
23:14:14 | * | fold4 quit (Ping timeout: 260 seconds) |
23:14:16 | * | cyraxjoe quit (Read error: Connection reset by peer) |
23:14:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:15:25 | * | cyraxjoe joined #nim |
23:17:22 | * | fold4 joined #nim |
23:18:00 | * | yglukhov joined #nim |
23:22:22 | * | yglukhov quit (Ping timeout: 244 seconds) |
23:26:03 | * | ephja quit (Ping timeout: 276 seconds) |
23:42:22 | * | yglukhov joined #nim |
23:46:40 | * | yglukhov quit (Ping timeout: 252 seconds) |
23:47:30 | * | kingofoz quit (Ping timeout: 276 seconds) |
23:48:44 | * | kingofoz joined #nim |