00:00:19 | * | nicktick quit (Ping timeout: 268 seconds) |
00:02:02 | * | gokr joined #nim |
00:02:36 | onionhammer1 | Araq i assume it does.. it's OSX |
00:15:22 | * | Trustable_2 joined #nim |
00:15:37 | * | nicktick2 quit (Ping timeout: 260 seconds) |
00:15:59 | * | nicktick joined #nim |
00:16:19 | * | Trustable quit (Ping timeout: 244 seconds) |
00:20:33 | * | desophos quit (Ping timeout: 240 seconds) |
00:40:04 | * | onionhammer1 quit (Read error: Connection reset by peer) |
00:40:36 | * | onionhammer1 joined #nim |
00:58:07 | * | gokr quit (Read error: Connection reset by peer) |
00:58:18 | * | gokr joined #nim |
01:01:28 | * | EulerWiles joined #nim |
01:01:44 | EulerWiles | Greetings |
01:03:40 | EulerWiles | Does anyone know anything |
01:03:52 | EulerWiles | about information theory? |
01:04:17 | EulerWiles | or Computational Complexity theory? |
01:08:43 | EulerWiles | Very well. |
01:09:03 | EulerWiles | GaveUp: |
01:12:48 | * | yglukhov quit (Remote host closed the connection) |
01:15:17 | * | vendethiel joined #nim |
01:17:04 | * | bbl quit (Ping timeout: 252 seconds) |
01:22:12 | dom96 | hello EulerWiles |
01:22:31 | dom96 | I don't think you're asking in the correct channel |
01:23:02 | dom96 | Anybody with a Mac want to test something for me? |
01:23:10 | EulerWiles | Ok, thank you. |
01:23:16 | * | EulerWiles left #nim (#nim) |
01:25:43 | * | bbl joined #nim |
01:30:05 | * | gokr quit (Ping timeout: 248 seconds) |
01:31:18 | * | bbl quit (Ping timeout: 276 seconds) |
01:34:22 | * | enthus1ast quit (Ping timeout: 260 seconds) |
01:36:22 | * | bbl joined #nim |
01:37:25 | * | vendethiel quit (Ping timeout: 252 seconds) |
01:38:42 | * | enthus1ast joined #nim |
01:40:38 | Varriount | Araq: You still there? |
01:51:25 | * | Trustable_3 joined #nim |
01:54:23 | * | Trustable_2 quit (Ping timeout: 250 seconds) |
02:27:17 | * | yglukhov joined #nim |
02:31:25 | * | yglukhov quit (Ping timeout: 248 seconds) |
02:40:11 | * | Trustable_3 quit (Remote host closed the connection) |
02:41:29 | * | brson quit (Ping timeout: 244 seconds) |
03:22:26 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:24:45 | * | bjz joined #nim |
03:26:45 | * | nsf quit (Quit: WeeChat 1.4) |
03:47:42 | * | arnetheduck joined #nim |
03:48:07 | * | pregressive quit (Remote host closed the connection) |
04:09:44 | * | brson joined #nim |
05:14:14 | * | Guest71084 is now known as pandada8 |
05:19:09 | * | Demon_Fox quit (Quit: Leaving) |
05:40:19 | * | Demos quit (Ping timeout: 248 seconds) |
05:40:30 | * | desophos joined #nim |
05:57:49 | * | desophos quit (Read error: Connection reset by peer) |
06:04:16 | * | ozra joined #nim |
06:10:28 | * | Varriount quit (Disconnected by services) |
06:10:28 | * | Varriount_ joined #nim |
06:25:09 | * | lucidlobster joined #nim |
06:27:32 | * | lucidlobster quit (Client Quit) |
07:04:02 | cheatfate | morning/evening |
07:30:57 | * | gokr joined #nim |
07:35:58 | * | gokr quit (Read error: Connection reset by peer) |
07:49:32 | * | gokr joined #nim |
07:50:04 | * | yglukhov joined #nim |
07:54:37 | * | yglukhov quit (Ping timeout: 244 seconds) |
07:55:26 | * | gokr quit (Read error: Connection reset by peer) |
07:57:00 | cheatfate | Araq, i found in crazy_concurrency branch links to SharedList, but i didnt find declaration |
07:57:26 | Araq | hmm did I forget to git add it? |
07:58:01 | Araq | yes indeed |
07:59:13 | * | gokr joined #nim |
08:04:07 | cheatfate | I'm just trying to understand how to properly make containers for shared memory, because Varriount yesterday frightened me, that i need to handle referenced objects manually, so i'm looking how to do this properly |
08:09:36 | Araq | cheatfate: pushed. |
08:18:19 | * | gokr1 joined #nim |
08:20:51 | * | gokr quit (Ping timeout: 248 seconds) |
08:21:07 | * | brson quit (Ping timeout: 252 seconds) |
08:38:55 | cheatfate | Araq, thanks |
08:39:09 | * | chrisheller quit (Remote host closed the connection) |
09:03:48 | * | yglukhov joined #nim |
09:26:56 | * | yglukhov quit (Remote host closed the connection) |
09:27:29 | * | Demos joined #nim |
09:28:34 | * | yglukhov joined #nim |
09:28:36 | * | yglukhov quit (Remote host closed the connection) |
09:33:51 | * | yglukhov joined #nim |
09:34:31 | * | yglukhov quit (Remote host closed the connection) |
09:47:33 | Araq | oh btw Happy Easter! |
09:48:35 | * | nsf joined #nim |
09:48:37 | * | bjz_ joined #nim |
09:49:00 | * | vendethiel joined #nim |
09:50:26 | * | Ven joined #nim |
09:50:27 | * | bjz quit (Ping timeout: 246 seconds) |
09:57:39 | * | yglukhov joined #nim |
10:00:54 | wuehlmaus | Happy Easter! may you relax and have a good time! |
10:05:09 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:12:51 | * | vendethiel quit (Ping timeout: 248 seconds) |
10:19:10 | flyx | dom96: I have a Mac, what do you want to have tested? |
10:19:50 | dom96 | See PM |
10:20:54 | * | gokr1 quit (Ping timeout: 246 seconds) |
10:22:20 | * | Ven joined #nim |
10:24:13 | * | gokr joined #nim |
10:27:52 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:39:18 | * | yglukhov quit (Remote host closed the connection) |
10:41:15 | * | vendethiel joined #nim |
10:49:28 | cncl | oh wow |
10:49:41 | cncl | -flto and -fuse-linker-plugin hugely reduces executable sizes |
10:50:18 | cncl | 700kb -> 350kb on the nim project i'm working on right now |
10:50:26 | cncl | i wonder if something is going wrong, or if that's really what it does |
10:51:48 | * | yglukhov joined #nim |
11:04:17 | * | vendethiel quit (Ping timeout: 260 seconds) |
11:50:35 | * | Ven joined #nim |
11:52:28 | * | vendethiel joined #nim |
11:56:58 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:57:43 | * | darkf quit (Quit: Leaving) |
12:30:20 | * | toaoMgeorge joined #nim |
12:35:09 | cheatfate | Araq, could you please take a look, what i'm doing wrong https://gist.github.com/cheatfate/b33839b2d666656cfb5f |
12:36:20 | Araq | when MultiThreaded: |
12:36:20 | Araq | type |
12:36:20 | Araq | ListNode[T] = ref object |
12:36:48 | Araq | don't use 'ref'. |
12:37:04 | Araq | and for ptr tehre is no 'new' |
12:38:40 | Araq | you have to use allocShared |
12:39:04 | Araq | also: don't write your own queue, use system.Channel |
12:40:06 | cheatfate | but you commented in channel code that it slow |
12:40:12 | cheatfate | ouch i found errors |
12:42:03 | cheatfate | and also i'm looking for structure which i can use for both singlethreaded/multithreaded environment |
12:42:45 | * | ozra quit (Ping timeout: 276 seconds) |
12:43:00 | Araq | make a PR and remove that comment. |
12:43:12 | Araq | it's only slow compared to lockfree stuff |
12:43:42 | Araq | not slow compared to some newbie code struggling with ptrs :P |
12:44:32 | cheatfate | i just misplace this ref/ptr |
12:46:06 | cheatfate | Araq, and you propose me to use one structure for MT and other structure for ST... so how big my code will be in such situation? |
12:46:44 | * | Ven joined #nim |
12:46:48 | Araq | just write the code that it works for MT. |
12:47:03 | * | bjz_ quit (Ping timeout: 244 seconds) |
12:47:44 | * | yglukhov_ joined #nim |
12:47:45 | Araq | and require people to use --threads:on which will become the default anyway |
12:48:03 | * | yglukhov quit (Ping timeout: 248 seconds) |
12:50:13 | * | bjz joined #nim |
12:51:24 | * | Ven quit (Client Quit) |
12:52:14 | * | yglukhov_ quit (Remote host closed the connection) |
12:54:21 | cheatfate | Araq, i dont think it become default in near future |
12:56:55 | Araq | it's a bit strange to argue with me about that. |
12:57:00 | Araq | but why do you think so? |
12:59:58 | * | Ven joined #nim |
13:01:03 | * | Ven quit (Client Quit) |
13:01:16 | * | sora joined #nim |
13:01:56 | * | yglukhov joined #nim |
13:03:07 | cheatfate | there too much work must be done to adopt current state of standart library for MT |
13:11:17 | * | fredrik92 joined #nim |
13:15:32 | cheatfate | and a biggest problem imho, that for using tables in MT you need sharedtables, for using strings in MT you need sharedstrings, so all strings, tables must be modified when you make "--threads:on" |
13:21:05 | Araq | nah. |
13:21:17 | Araq | you don't have to do anything like that, that would be crazy |
13:21:44 | Araq | --threads:on only needs to affect async and perhaps algorithm.sort |
13:22:16 | Araq | you cannot make everything use threads under the hood, it's way too expensive. |
13:22:29 | Araq | everything would run slower rather than faster. |
13:22:30 | Araq | bbl |
13:24:17 | * | bjz_ joined #nim |
13:24:17 | * | bjz quit (Ping timeout: 260 seconds) |
13:25:46 | * | Gonzih quit (Read error: Connection reset by peer) |
13:56:11 | * | Ven joined #nim |
14:09:12 | * | bjz_ quit (Ping timeout: 244 seconds) |
14:09:51 | * | bjz joined #nim |
14:18:03 | * | fredrik92 quit (Ping timeout: 240 seconds) |
14:36:49 | * | enthus1ast quit (Quit: Leaving.) |
14:50:02 | * | Varriount joined #nim |
14:50:39 | * | yglukhov quit (Remote host closed the connection) |
14:51:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:53:02 | * | boopsiesisaway is now known as boopsies |
14:53:07 | * | Varriount_ quit (Ping timeout: 244 seconds) |
15:00:32 | * | bjz joined #nim |
15:16:53 | * | toaoMgeorge quit (Ping timeout: 244 seconds) |
15:28:46 | * | bjz_ joined #nim |
15:29:01 | * | bjz quit (Ping timeout: 252 seconds) |
15:32:52 | * | enthus1ast joined #nim |
15:41:46 | * | nicktick quit (Quit: Leaving.) |
15:52:42 | * | sora quit (Remote host closed the connection) |
16:08:57 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:10:19 | Varriount | cheatfate: Don't fall into the trap of thinking threads are a magical way of speeding things up. |
16:10:38 | Varriount | cheatfate: Threads (at least, user space threads) have overhead. |
16:10:53 | cheatfate | Varriount, please dont think i'm stupid please |
16:11:15 | Varriount | cheatfate: I don't. Ignorant maybe, but we all were at one point. |
16:11:55 | Varriount | Anyway, you usually don't want a standard library to use threads, as that can interfere with the threading model of other programs. |
16:12:26 | Varriount | Araq: Ever seen this - http://www.stroustrup.com/lock-free-vector.pdf |
16:12:42 | * | arnetheduck quit (Ping timeout: 276 seconds) |
16:20:38 | cheatfate | Varriount, why do you think i'm ignorant? |
16:21:58 | Varriount | cheatfate: Well, reading some of your code the other day for a queue to be used in a multi-threaded situation gave the impression that you didn't know too much about how Nim's memory model works. |
16:22:33 | Varriount | Which is understandable, since it's one of those things you don't really need to know about until you hit certain situations. |
16:25:07 | Varriount | cheatfate: Please understand, I mean 'ignorant' in the sense of not knowing certain things. And in the end, everyone is ignorant of something. |
16:25:50 | * | yglukhov joined #nim |
16:25:51 | Varriount | For example, I only understand a small fraction of Nim's compiler code, and haven't a clue on how you or araq plan to make the async modules concurrent. |
16:26:57 | * | ozra joined #nim |
16:30:41 | * | yglukhov quit (Ping timeout: 268 seconds) |
16:31:31 | * | vendethiel quit (Ping timeout: 248 seconds) |
16:36:46 | * | vendethiel joined #nim |
16:37:30 | cheatfate | Varriount, when somebody shows you draft privately and after that you call him ignorant publicly (just because you saw draft), how do you think is somebody still wants to speak with you? |
16:38:15 | Varriount | cheatfate: Well, you did ask me. I'm sorry if I offended you. |
16:42:18 | Varriount | cheatfate: It wasn't my intention to hurt you and I can see that what I said was lacking in tact, however I was trying to assuage your concern over what seems to be other's perceptions of you. |
16:43:25 | cheatfate | Varriount, how much time you are working with nim? |
16:45:04 | Varriount | cheatfate: By what measure? I work on the Nim language plugin for Sublime Text when I have free time, although that's written in Python. |
16:45:17 | Varriount | I'm on the IRC a great deal of the time. |
16:45:35 | Varriount | I've been part of the community for about 3 years now. |
16:46:23 | cheatfate | Varriount, i'm working/learning nim only 1 month |
16:54:16 | * | chrisheller joined #nim |
16:54:32 | * | bjz_ quit (Ping timeout: 244 seconds) |
16:56:16 | * | bjz joined #nim |
16:57:29 | * | Trustable joined #nim |
16:59:03 | * | vendethiel quit (Ping timeout: 268 seconds) |
16:59:55 | * | zahary joined #nim |
17:03:01 | cheatfate | Varriount, of course i dont know many things about nim memory model, or nim compiler internals, or nim 'macro magic' (i'm not ashamed to admit it), thats why i asked for your help. but after that i got "don't fall into the trap" and "ignorant" |
17:03:23 | * | zahary quit (Client Quit) |
17:05:15 | * | mahasamoot quit (Ping timeout: 264 seconds) |
17:05:21 | * | chrisheller quit (Remote host closed the connection) |
17:07:21 | cheatfate | Varriount, i'm disappointed |
17:13:00 | * | desophos joined #nim |
17:27:29 | * | yglukhov joined #nim |
17:29:26 | * | vendethiel joined #nim |
17:31:24 | * | chrisheller joined #nim |
17:32:46 | * | yglukhov quit (Ping timeout: 244 seconds) |
17:42:14 | Araq | cheatfate: if you need a faster shared hash table, I would implement "lock striping" for the hash table. |
17:43:02 | Araq | atomic ops only work when the keys and values are word-sized which is generally not the case for Nim. |
17:44:28 | Araq | plus lock striping is MUCH easier to implement. |
17:45:16 | Araq | Varriount: yeah, I have seen that paper. don't see the benefits, doesn't deal with ABA, assumes a shared memory heap. |
17:49:30 | cheatfate | Araq, its a problem with "lock striping" hash table too, i'm using hash table to store all notifies with key -> file descriptor, and value -> callback/events/flags etc |
17:50:17 | * | vendethiel quit (Ping timeout: 260 seconds) |
17:50:24 | * | boopsies is now known as boopsiesisaway |
17:50:30 | Araq | I don't understand. |
17:50:49 | cheatfate | Araq, wait i will try to gist my minds |
17:51:48 | cheatfate | To be sure about "lock striping" you want to use not one lock but like N locks and use lock(HASH mod NLOCKSCOUNT)? |
17:54:20 | Araq | yup |
18:10:08 | cheatfate | Araq, https://gist.github.com/cheatfate/1aab2a68f42aac2e6423 |
18:11:16 | * | brson joined #nim |
18:14:22 | Araq | cheatfate: you don't exec a callback holding a lock for this reason. |
18:14:47 | Araq | you release the lock before running the callback. |
18:15:23 | Araq | that's what I do in crazy_concurrency. (I hope! ;-) ) |
18:20:38 | cheatfate | Araq, hmm |
18:27:53 | cheatfate | Araq, but there is a problem if i release lock my fd data can be deleted/emptied from my hashtable, but its ok i can create copy of this data before releasing lock, but what if user not ready to receive this callback |
18:28:28 | cheatfate | because he thinking that he already deleted this descriptor from queue, and now he receiving callback... |
18:29:37 | * | mahasamoot joined #nim |
18:31:38 | cheatfate | we just move problem from our stack to user stack |
18:32:02 | cheatfate | so i think key must be locked until user callback is finished |
18:35:42 | dom96 | Araq: Should string.h be included with --os:standalone? https://github.com/dom96/nimkernel/issues/5 |
18:42:56 | Varriount | cheatfate: Again, I'm sorry. |
18:52:54 | * | Trustable quit (Remote host closed the connection) |
18:55:00 | Araq | dom96: dunno, string.h usually is CPU specific, not OS specific |
18:55:28 | Araq | but then some idiot will tell you --os:standalone should not require any headers whatsoever |
18:56:30 | * | Trustable joined #nim |
18:56:57 | Araq | cheatfate: when you pass the fd to the callback you have to ensure exclusive access to the descriptor. |
18:57:14 | Araq | so you have to delete it from the table anyway. |
18:57:43 | Araq | and the callbacks shouldn't be concerned with the queue at all |
18:58:35 | * | enthus1ast quit (Quit: Leaving.) |
18:59:17 | dom96 | Araq: Well I can't remember. But something must have changed regarding that header, because according to that issue nimkernel doesn't compile anymore. |
19:01:35 | * | fredrik92 joined #nim |
19:03:10 | Araq | proc useStringh(m: BModule) = |
19:03:10 | Araq | if not m.includesStringh: |
19:03:10 | Araq | m.includesStringh = true |
19:03:12 | Araq | discard lists.includeStr(m.headerFiles, "<string.h>") |
19:03:29 | Araq | ... |
19:03:31 | * | brson quit (Ping timeout: 248 seconds) |
19:03:33 | Araq | useStringh(p.module) |
19:03:33 | Araq | linefmt(p, cpsStmts, "memset((void*)$1, 0, sizeof($2));$n", |
19:03:33 | Araq | addrLoc(loc), rdLoc(loc)) |
19:03:57 | Araq | we still generate code that relies on string.h. |
19:04:08 | Araq | and have no --os specific logic for these parts. |
19:04:15 | Araq | that's all I can say about it. |
19:08:15 | Araq | Varriount: I fixed the sigmatch bug but I'm still fixing the regressions my fix causes. |
19:08:35 | Araq | so relax, it's hard for the best of us. |
19:09:30 | cheatfate | Araq, i dont think its a good way to remove descriptor from queue every time it becomes signaled... because removing descriptor is not only removal from hashtable, there also must be done removal from kqueue/epoll (so at least one userspace/kernelspace switch would be done) |
19:10:30 | Araq | no, you can leave it in the queue but remove it from the hash table. or you mark it as "in use" via some other mechanism |
19:11:19 | Araq | hmm this might be the point of dom96's register stuff that I never really groked |
19:12:24 | Varriount | Araq: What regressions did it cause? |
19:13:10 | * | brson joined #nim |
19:29:56 | * | yglukhov joined #nim |
19:34:51 | * | yglukhov quit (Ping timeout: 276 seconds) |
19:41:06 | Araq | Varriount: failing tests about type classes |
19:41:37 | Varriount | Araq: Odd. Aren't type classes handled in another case? |
19:41:51 | Araq | ha, that's what I thought too. |
19:42:03 | Araq | zahary's code is weird :P |
19:44:27 | Varriount | :\ |
19:45:18 | * | filwit joined #nim |
19:53:12 | Araq | ah a tyCompositeTypeClass has a tyGenericInst child that isn't actually any fully resolved instantiation |
19:53:39 | Araq | how nice. |
19:55:42 | Araq | # This almost exactly replicates the steps taken by the compiler during |
19:55:42 | Araq | # param matching. It performs an embarrassing amount of back-and-forth |
19:55:42 | Araq | # type jugling, but it's the price to pay for consistency and correctness |
19:55:57 | Araq | ha, joke of the week. it's neither consistent nor correct. |
19:59:57 | * | irrequietus joined #nim |
20:10:54 | * | enthus1ast joined #nim |
20:14:00 | dom96 | Araq: hrm. I'm guessing that some logic in the compiler changed, so that now it generates code which uses string.h for code which didn't used to use it. |
20:17:09 | * | baff1e joined #nim |
20:19:52 | Varriount | Araq: Why would it have that? Type classes and generics are similar, yes, but there's some important differences. |
20:20:21 | Varriount | I wouldn't go around just trying to re-use the generic type structure. |
20:20:42 | * | boopsiesisaway is now known as boopsies |
20:27:49 | Araq | Varriount: http://dilbert.com/strip/1996-01-31 |
20:41:06 | cheatfate | Varriount, https://gist.github.com/cheatfate/15b6856f6d0a0a33c599, so my code is still ignorant? |
20:47:25 | Varriount | cheatfate: I'd use the 'defer' statement instead of 'the try...finally'. 'try' blocks have an inherent speed penalty under most circumstances. |
20:48:29 | Varriount | Also, you don't need to assign the 'nil' value to pointers - variables and allocated memory is automatically zeroed, unless certain pragmas or procedures are used. |
20:48:29 | dom96 | Varriount: Pretty sure `defer` is simply syntax sugar for `try..finally` |
20:51:04 | Varriount | dom96: Huh, so it is. (I just looked at the generated code). |
20:51:22 | Varriount | I was expecting something a bit more optimized. |
21:00:27 | * | brson quit (Ping timeout: 244 seconds) |
21:12:28 | * | autumnl joined #nim |
21:13:49 | * | Jesin quit (Quit: Leaving) |
21:15:07 | * | Demon_Fox joined #nim |
21:17:46 | * | Jesin joined #nim |
21:18:10 | * | autumnl quit (Quit: Textual IRC Client: www.textualapp.com) |
21:18:21 | * | autumnl joined #nim |
21:28:29 | * | brson joined #nim |
21:28:55 | * | boopsies is now known as boopsiesisaway |
21:29:02 | * | boopsiesisaway is now known as boopsies |
21:29:05 | * | darkf joined #nim |
21:31:26 | * | yglukhov joined #nim |
21:36:03 | * | yglukhov quit (Ping timeout: 248 seconds) |
21:56:00 | * | BitPuffin|osx joined #nim |
21:59:19 | cheatfate | Varriount, about nil at lines 40 and 51 if omit it you will get [XDeclaredButNotUsed] |
21:59:43 | cheatfate | i hate this warning |
22:01:13 | * | fredrik92 quit (Quit: Shutting down . . .) |
22:02:58 | cheatfate | Varriount, do you have better variant for this lines? |
22:20:46 | * | memoryfoam joined #nim |
22:23:18 | * | ozra quit (Ping timeout: 246 seconds) |
22:24:36 | * | memoryfoam left #nim (#nim) |
22:28:51 | * | irrequietus quit () |
22:45:18 | * | wuehlmaus quit (Quit: Lost terminal) |
22:48:45 | cheatfate | Varriount, ping? |
22:50:47 | * | chrisheller quit (Remote host closed the connection) |
22:54:53 | * | nicktick joined #nim |
22:55:27 | * | chrisheller joined #nim |
23:00:01 | * | chrisheller quit (Ping timeout: 252 seconds) |
23:20:45 | * | vendethiel joined #nim |
23:21:26 | * | chrisheller joined #nim |
23:27:48 | * | brson quit (Quit: leaving) |
23:28:55 | * | Trustable quit (Remote host closed the connection) |
23:32:54 | * | yglukhov joined #nim |
23:37:44 | * | yglukhov quit (Ping timeout: 260 seconds) |
23:44:51 | * | vendethiel quit (Ping timeout: 264 seconds) |
23:50:51 | Varriount | cheatfate: Hm? |
23:51:58 | Varriount | cheatfate: Uh, why are you using an instance of a type? Why not just use the type itself? |