<< 27-03-2016 >>

00:00:19*nicktick quit (Ping timeout: 268 seconds)
00:02:02*gokr joined #nim
00:02:36onionhammer1Araq 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:44EulerWilesGreetings
01:03:40EulerWilesDoes anyone know anything
01:03:52EulerWilesabout information theory?
01:04:17EulerWilesor Computational Complexity theory?
01:08:43EulerWilesVery well.
01:09:03EulerWilesGaveUp:
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:12dom96hello EulerWiles
01:22:31dom96I don't think you're asking in the correct channel
01:23:02dom96Anybody with a Mac want to test something for me?
01:23:10EulerWilesOk, 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:38VarriountAraq: 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:02cheatfatemorning/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:00cheatfateAraq, i found in crazy_concurrency branch links to SharedList, but i didnt find declaration
07:57:26Araqhmm did I forget to git add it?
07:58:01Araqyes indeed
07:59:13*gokr joined #nim
08:04:07cheatfateI'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:36Araqcheatfate: 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:55cheatfateAraq, 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:33Araqoh 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:54wuehlmausHappy 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:10flyxdom96: I have a Mac, what do you want to have tested?
10:19:50dom96See 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:28cncloh wow
10:49:41cncl-flto and -fuse-linker-plugin hugely reduces executable sizes
10:50:18cncl700kb -> 350kb on the nim project i'm working on right now
10:50:26cncli 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:09cheatfateAraq, could you please take a look, what i'm doing wrong https://gist.github.com/cheatfate/b33839b2d666656cfb5f
12:36:20Araqwhen MultiThreaded:
12:36:20Araq type
12:36:20Araq ListNode[T] = ref object
12:36:48Araqdon't use 'ref'.
12:37:04Araqand for ptr tehre is no 'new'
12:38:40Araqyou have to use allocShared
12:39:04Araqalso: don't write your own queue, use system.Channel
12:40:06cheatfatebut you commented in channel code that it slow
12:40:12cheatfateouch i found errors
12:42:03cheatfateand 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:00Araqmake a PR and remove that comment.
12:43:12Araqit's only slow compared to lockfree stuff
12:43:42Araqnot slow compared to some newbie code struggling with ptrs :P
12:44:32cheatfatei just misplace this ref/ptr
12:46:06cheatfateAraq, 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:48Araqjust 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:45Araqand 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:21cheatfateAraq, i dont think it become default in near future
12:56:55Araqit's a bit strange to argue with me about that.
12:57:00Araqbut 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:07cheatfatethere too much work must be done to adopt current state of standart library for MT
13:11:17*fredrik92 joined #nim
13:15:32cheatfateand 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:05Araqnah.
13:21:17Araqyou don't have to do anything like that, that would be crazy
13:21:44Araq--threads:on only needs to affect async and perhaps algorithm.sort
13:22:16Araqyou cannot make everything use threads under the hood, it's way too expensive.
13:22:29Araqeverything would run slower rather than faster.
13:22:30Araqbbl
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:19Varriountcheatfate: Don't fall into the trap of thinking threads are a magical way of speeding things up.
16:10:38Varriountcheatfate: Threads (at least, user space threads) have overhead.
16:10:53cheatfateVarriount, please dont think i'm stupid please
16:11:15Varriountcheatfate: I don't. Ignorant maybe, but we all were at one point.
16:11:55VarriountAnyway, you usually don't want a standard library to use threads, as that can interfere with the threading model of other programs.
16:12:26VarriountAraq: Ever seen this - http://www.stroustrup.com/lock-free-vector.pdf
16:12:42*arnetheduck quit (Ping timeout: 276 seconds)
16:20:38cheatfateVarriount, why do you think i'm ignorant?
16:21:58Varriountcheatfate: 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:33VarriountWhich is understandable, since it's one of those things you don't really need to know about until you hit certain situations.
16:25:07Varriountcheatfate: 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:51VarriountFor 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:30cheatfateVarriount, 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:15Varriountcheatfate: Well, you did ask me. I'm sorry if I offended you.
16:42:18Varriountcheatfate: 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:25cheatfateVarriount, how much time you are working with nim?
16:45:04Varriountcheatfate: 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:17VarriountI'm on the IRC a great deal of the time.
16:45:35VarriountI've been part of the community for about 3 years now.
16:46:23cheatfateVarriount, 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:01cheatfateVarriount, 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:21cheatfateVarriount, 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:14Araqcheatfate: if you need a faster shared hash table, I would implement "lock striping" for the hash table.
17:43:02Araqatomic ops only work when the keys and values are word-sized which is generally not the case for Nim.
17:44:28Araqplus lock striping is MUCH easier to implement.
17:45:16AraqVarriount: yeah, I have seen that paper. don't see the benefits, doesn't deal with ABA, assumes a shared memory heap.
17:49:30cheatfateAraq, 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:30AraqI don't understand.
17:50:49cheatfateAraq, wait i will try to gist my minds
17:51:48cheatfateTo be sure about "lock striping" you want to use not one lock but like N locks and use lock(HASH mod NLOCKSCOUNT)?
17:54:20Araqyup
18:10:08cheatfateAraq, https://gist.github.com/cheatfate/1aab2a68f42aac2e6423
18:11:16*brson joined #nim
18:14:22Araqcheatfate: you don't exec a callback holding a lock for this reason.
18:14:47Araqyou release the lock before running the callback.
18:15:23Araqthat's what I do in crazy_concurrency. (I hope! ;-) )
18:20:38cheatfateAraq, hmm
18:27:53cheatfateAraq, 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:28cheatfatebecause he thinking that he already deleted this descriptor from queue, and now he receiving callback...
18:29:37*mahasamoot joined #nim
18:31:38cheatfatewe just move problem from our stack to user stack
18:32:02cheatfateso i think key must be locked until user callback is finished
18:35:42dom96Araq: Should string.h be included with --os:standalone? https://github.com/dom96/nimkernel/issues/5
18:42:56Varriountcheatfate: Again, I'm sorry.
18:52:54*Trustable quit (Remote host closed the connection)
18:55:00Araqdom96: dunno, string.h usually is CPU specific, not OS specific
18:55:28Araqbut then some idiot will tell you --os:standalone should not require any headers whatsoever
18:56:30*Trustable joined #nim
18:56:57Araqcheatfate: when you pass the fd to the callback you have to ensure exclusive access to the descriptor.
18:57:14Araqso you have to delete it from the table anyway.
18:57:43Araqand the callbacks shouldn't be concerned with the queue at all
18:58:35*enthus1ast quit (Quit: Leaving.)
18:59:17dom96Araq: 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:10Araqproc useStringh(m: BModule) =
19:03:10Araq if not m.includesStringh:
19:03:10Araq m.includesStringh = true
19:03:12Araq discard lists.includeStr(m.headerFiles, "<string.h>")
19:03:29Araq...
19:03:31*brson quit (Ping timeout: 248 seconds)
19:03:33Araq useStringh(p.module)
19:03:33Araq linefmt(p, cpsStmts, "memset((void*)$1, 0, sizeof($2));$n",
19:03:33Araq addrLoc(loc), rdLoc(loc))
19:03:57Araqwe still generate code that relies on string.h.
19:04:08Araqand have no --os specific logic for these parts.
19:04:15Araqthat's all I can say about it.
19:08:15AraqVarriount: I fixed the sigmatch bug but I'm still fixing the regressions my fix causes.
19:08:35Araqso relax, it's hard for the best of us.
19:09:30cheatfateAraq, 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:30Araqno, 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:19Araqhmm this might be the point of dom96's register stuff that I never really groked
19:12:24VarriountAraq: 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:06AraqVarriount: failing tests about type classes
19:41:37VarriountAraq: Odd. Aren't type classes handled in another case?
19:41:51Araqha, that's what I thought too.
19:42:03Araqzahary's code is weird :P
19:44:27Varriount:\
19:45:18*filwit joined #nim
19:53:12Araqah a tyCompositeTypeClass has a tyGenericInst child that isn't actually any fully resolved instantiation
19:53:39Araqhow nice.
19:55:42Araq # This almost exactly replicates the steps taken by the compiler during
19:55:42Araq # param matching. It performs an embarrassing amount of back-and-forth
19:55:42Araq # type jugling, but it's the price to pay for consistency and correctness
19:55:57Araqha, joke of the week. it's neither consistent nor correct.
19:59:57*irrequietus joined #nim
20:10:54*enthus1ast joined #nim
20:14:00dom96Araq: 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:52VarriountAraq: Why would it have that? Type classes and generics are similar, yes, but there's some important differences.
20:20:21VarriountI wouldn't go around just trying to re-use the generic type structure.
20:20:42*boopsiesisaway is now known as boopsies
20:27:49AraqVarriount: http://dilbert.com/strip/1996-01-31
20:41:06cheatfateVarriount, https://gist.github.com/cheatfate/15b6856f6d0a0a33c599, so my code is still ignorant?
20:47:25Varriountcheatfate: I'd use the 'defer' statement instead of 'the try...finally'. 'try' blocks have an inherent speed penalty under most circumstances.
20:48:29VarriountAlso, 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:29dom96Varriount: Pretty sure `defer` is simply syntax sugar for `try..finally`
20:51:04Varriountdom96: Huh, so it is. (I just looked at the generated code).
20:51:22VarriountI 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:19cheatfateVarriount, about nil at lines 40 and 51 if omit it you will get [XDeclaredButNotUsed]
21:59:43cheatfatei hate this warning
22:01:13*fredrik92 quit (Quit: Shutting down . . .)
22:02:58cheatfateVarriount, 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:45cheatfateVarriount, 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:51Varriountcheatfate: Hm?
23:51:58Varriountcheatfate: Uh, why are you using an instance of a type? Why not just use the type itself?