<< 28-09-2013 >>

00:00:46*DAddYE quit (Remote host closed the connection)
00:13:24*Associat0r quit (Read error: Connection reset by peer)
00:28:51*gsp quit (Ping timeout: 260 seconds)
00:34:47*shodan45 quit (Read error: Connection reset by peer)
01:00:07*filwit joined #nimrod
01:00:35filwitanyone know how to use a varargs[expr]?
01:01:15filwittemplate new[T](desc:typedesc, args:varargs[expr]) T = new(args)
01:01:54*DAddYE joined #nimrod
01:05:24filwitdom96: hey man, you around?
01:08:03*DAddYE quit (Ping timeout: 245 seconds)
01:11:49*DAddYE joined #nimrod
01:16:16*DAddYE quit (Ping timeout: 245 seconds)
01:29:15*q66 quit (Quit: Leaving)
01:54:13*brson quit (Ping timeout: 248 seconds)
01:55:53*brson joined #nimrod
02:00:04*filwit quit (Quit: Leaving)
02:04:58*DAddYE joined #nimrod
02:11:03*DAddYE quit (Ping timeout: 240 seconds)
03:08:08*DAddYE joined #nimrod
03:13:29*MFlamer_ joined #nimrod
03:15:14*DAddYE quit (Ping timeout: 264 seconds)
03:29:55*brson quit (Ping timeout: 260 seconds)
03:31:35*brson joined #nimrod
03:59:48*zhtx joined #nimrod
04:03:37*OrionPK quit (Read error: Connection reset by peer)
04:11:21*DAddYE joined #nimrod
04:17:38*DAddYE quit (Ping timeout: 245 seconds)
04:53:30*dyu joined #nimrod
04:53:53*dyu quit (Client Quit)
04:54:12*dyu joined #nimrod
04:55:01*dyu quit (Client Quit)
04:55:18*dyu joined #nimrod
05:00:38*DAddYE joined #nimrod
05:08:07*MFlamer_ quit (Ping timeout: 250 seconds)
05:09:07*DAddYE quit (Remote host closed the connection)
05:13:34*DAddYE_ joined #nimrod
05:26:20*DAddYE_ quit (Remote host closed the connection)
05:26:46*DAddYE joined #nimrod
05:31:15*DAddYE quit (Ping timeout: 245 seconds)
05:37:18*brson quit (Ping timeout: 264 seconds)
05:38:47*brson joined #nimrod
05:46:47*xilo joined #nimrod
05:49:03*dyu quit (Quit: Leaving)
05:55:35*brson quit (Quit: leaving)
06:01:19*zhtx left #nimrod (#nimrod)
06:12:06*xilo quit (Ping timeout: 264 seconds)
06:23:52*MFlamer_ joined #nimrod
06:24:21MFlamer_Hi Nimrods
06:24:48MFlamer_How do you build release?
06:27:36*DAddYE joined #nimrod
06:28:25Araqkoch csource -d:release
06:28:50Araqkoch zip
06:28:56Araqkoch inno -d:release
06:32:37MFlamer_ok, got it. Building the compile in release only makes it compile faster, correct? Its not gonna make my code faster
06:32:53MFlamer_compiler
06:34:16MFlamer_Fixed several problems in my table! No more crashing. Now I can get back to cleaning it up and doing some testing
06:34:18*DAddYE quit (Ping timeout: 264 seconds)
06:38:20Araqright, it won't make your code faster
06:39:00MFlamer_As it is now the table can store any object type. The objects are copied to shared memory and the table stores pointers. When you ask the table for a value it passes the object back by value. This way multiple threads are not stepping on the object at the same time.
06:40:28MFlamer_But, theres the ovehead with copying and also.....I cant guarantee that each threads view of an object is consistant. I'm not clear on weather or not this is a problem
06:41:31MFlamer_If we did guarantee this, I guess we would basicly be implementing STM?
06:41:55Araqkind of, yeah
06:42:32Araqwell you compare an atomic 'get' to a more general 'atomic' block
06:42:42Araqso yeah, you can't do better here
06:47:30Araqhow do you implement the versioning btw? atomicInc on a version counter?
06:48:21MFlamer_there is none
06:49:53MFlamer_I've implemented it almost identically to Click's
06:56:41Araqhmmm ok
06:57:02Araqbut we need one for composing with other lock free data structures
06:59:03MFlamer_I remember you mentioning that.....I'll need to think about what that means in this context
07:00:49MFlamer_I know one way its done is to use a larger atomic word and keep a counter with the key
07:04:03MFlamer_actually, with the pointer to the value probably. This is one way around the "ABA" problem also
07:07:52AraqI am not sure but the last time I thought about it, CAS suffices if you use it on the version, no double word CAS is necessary because the 'version' encodes the whole state of the data structure already
07:08:19Araqreaders need to be aware of it and check against it of course
07:15:38*DAddYE joined #nimrod
07:36:45*MFlamer_ quit (Ping timeout: 250 seconds)
08:20:31*DAddYE quit (Remote host closed the connection)
08:20:57*DAddYE joined #nimrod
08:25:11*DAddYE quit (Ping timeout: 245 seconds)
08:25:58*dyu joined #nimrod
08:43:03*io2 joined #nimrod
08:55:39*dyu quit (Quit: Leaving)
09:01:46*io2 quit (Ping timeout: 256 seconds)
09:21:37*DAddYE joined #nimrod
09:28:20*DAddYE quit (Ping timeout: 245 seconds)
09:55:14*shodan45 joined #nimrod
10:15:48*zhtx joined #nimrod
10:25:35*DAddYE joined #nimrod
10:31:16*DAddYE quit (Ping timeout: 260 seconds)
10:48:11*zahary1 joined #nimrod
10:48:27*zahary quit (Read error: Connection reset by peer)
10:56:24*EXetoC quit (Quit: WeeChat 0.4.1)
11:09:22*Boscop joined #nimrod
11:13:31*q66 joined #nimrod
11:27:56*DAddYE joined #nimrod
11:34:35*DAddYE quit (Ping timeout: 245 seconds)
11:54:29*q66 quit (Quit: Leaving)
11:58:06*EXetoC joined #nimrod
11:59:14*q66 joined #nimrod
12:25:59*q66 quit (Quit: Leaving)
12:27:31*zhtx left #nimrod (#nimrod)
12:31:01*DAddYE joined #nimrod
12:37:47*DAddYE quit (Ping timeout: 248 seconds)
12:41:30*q66 joined #nimrod
12:48:51*q66 quit (Quit: Leaving)
12:53:51*q66 joined #nimrod
13:34:09*DAddYE joined #nimrod
13:40:51*DAddYE quit (Ping timeout: 252 seconds)
13:46:16*XAMPP quit (Ping timeout: 245 seconds)
13:47:21*XAMPP joined #nimrod
13:47:21*XAMPP quit (Changing host)
13:47:21*XAMPP joined #nimrod
13:48:46*OrionPK joined #nimrod
14:08:39*wlhlm joined #nimrod
14:37:17*DAddYE joined #nimrod
14:43:39*DAddYE quit (Ping timeout: 248 seconds)
14:58:17*ltbarcly joined #nimrod
15:02:56*ltbarcly quit (Ping timeout: 245 seconds)
15:40:34*DAddYE joined #nimrod
15:46:48*DAddYE quit (Ping timeout: 245 seconds)
16:43:29*DAddYE joined #nimrod
16:43:55Araqhi wlhlm welcome
16:50:02*DAddYE quit (Ping timeout: 264 seconds)
17:06:01wlhlmAraq: thanks! (sorry for late response, was afk)
17:09:19*ltbarcly joined #nimrod
17:14:03*ltbarcly quit (Ping timeout: 260 seconds)
17:42:08Araqping zahary1, zahary_
17:46:41*DAddYE joined #nimrod
17:47:30Araqhi DAddYE
17:52:55*DAddYE quit (Ping timeout: 245 seconds)
17:55:46*q66_ joined #nimrod
17:59:33*q66 quit (Ping timeout: 248 seconds)
18:54:16*sdw left #nimrod (#nimrod)
19:30:10*io2 joined #nimrod
19:31:37*jdp_ is now known as jdp
20:16:41*MFlamer_ joined #nimrod
20:17:29Araqhe ho MFlamer_
20:17:55MFlamer_howdy
20:33:08Araqwell I'm thinking a bit about the STM
20:33:17*MFlamer_ quit (Ping timeout: 250 seconds)
20:33:21Araqgah
20:33:28Araqnow that's useful
20:37:17*MFlamer_ joined #nimrod
20:37:44AraqMFlamer_: here is my idea
20:37:49Araqtransaction:
20:37:52Araq read x, y
20:37:57Araq write z, op(x, y)
20:38:12Araqis a macro that does something like:
20:38:17Araqwhile true:
20:38:32Araq let ver1 = a.getVersion
20:38:40Araq let ver2 = b.getVersion
20:39:18Araq let ver3 = z.getVersion
20:39:32Araq z.set(op(x, y))
20:40:04Araq if ver1 == a.getVersion and ver2 == b.getVersion and ver3 == z.getVersion: break
20:41:24Araqer ... well the point is since the getValue and setValue are lock free and thus atomic and the version is ABA free, this suffices to compose them into transactions
20:46:56MFlamer_but do we need to synchronize setting a value and version at the same time?
20:47:23MFlamer_like double word CAS? or do you not see that as necassary?
20:47:55Araqwell ok my example is stupid as 'z.set' obviously modifies z's version
20:48:03Araqbut you get the idea
20:48:11*DAddYE joined #nimrod
20:48:14MFlamer_I'm reading some papers on different ways to do this. If you have any other resources, let me know
20:48:34*DAddYE quit (Remote host closed the connection)
20:48:41Araqnope, I read a couple of papers months/years ago
20:49:44Araqand it's likely that I miss something, but imo the above pseudo-code should work.
20:50:28Araqit checks and re-tries if not every version is the same as before. what could possibly be wrong about it? :P
20:52:39Araqah well 'setValue' could overwrite without a way to rollback
20:53:07MFlamer_I agree, as long as setting value and version are atomic
20:53:12*p0nce left #nimrod (#nimrod)
20:54:57Araqso hmm we need to rollback if the check fails
20:55:34Araqwhich would be another u = z.getValue(...)
20:56:25Araqpretty nasty, locks are much easier and optimized away with Intel's new architecture
20:59:43*MFlamer_ quit (Ping timeout: 250 seconds)
21:10:26*io2 quit (Ping timeout: 245 seconds)
21:10:36*MFlamer_ joined #nimrod
21:12:40*io2 joined #nimrod
21:14:01MFlamer_I lost my connection for a min
21:15:21Araqno problem read the logs then please
21:22:59*test432789 joined #nimrod
21:23:06*test432789 quit (Client Quit)
21:24:20EXetoCthat was easy. maybe I should use nc instead of weechat
21:34:40*brson joined #nimrod
21:40:36*cookies joined #nimrod
21:40:41EXetoCa
21:40:46*cookies quit (Remote host closed the connection)
22:12:48wlhlmis there a nimrod mailing list?
22:13:08Araqno, there is this channel and the forum
22:13:52*q66_ is now known as q66
22:14:24wlhlmok…
22:16:03MFlamer_Araq: Do you see a use case for a table like Click's (un-versioned) in addition to some sort of transaction based system like we are discussing?
22:17:03Araqyeah I told you. nimrod's profiler could use one
22:17:58MFlamer_That's right
22:19:12*Associ8or joined #nimrod
22:19:12*Associ8or quit (Changing host)
22:19:12*Associ8or joined #nimrod
22:20:17Araqand in fact ... I think you can cram everything into a single key/value pair and misuse it as a general shared safe memory
22:20:40MFlamer_I just want to get something useful completed before too long....
22:20:43Araqmuch like an in memory database
22:20:52Araqso yeah, it surely is useful
22:21:31MFlamer_Yes, just store word sized (-2 bits for flags though) as values
22:21:58Araqwell that's too bad it should be generic
22:22:10Araqbut maybe I'm misunderstanding you
22:22:54Araqbtw you should depend on hashes.nim
22:22:54MFlamer_Just that the table logic needs 2 bits for some state in each key and value
22:23:29Araqhmm well tables.min uses a triple for these reasons
22:23:34Araqinstead of a pair
22:23:52MFlamer_use hashes.nim for the hashing of key types, yes
22:26:25AraqMFlamer_ just in case you don't know: http://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions
22:27:58Araqanyway apart from a lockfree hash table, a lock free work queue is pretty common
22:28:39Araqor just go with the "disruptor" that I'd like to make the base for nimrod's message passing implementation
22:28:56MFlamer_nice, gotta get me some haswell hardware to play with
22:30:29Araqwell that's the future anyway, locks are here to stay and will get much faster
22:31:00Araqand we'll make them safe ;-)
22:31:13MFlamer_disruptor?
22:31:17Araqthe effect system makes deadlock detection at compile time pretty easy
22:32:18MFlamer_ah ha
22:40:30MFlamer_ well, I can offer some options. I can provide some restricted types (based on ranges etc..) that can be efficently stored in a single word table. Or, the user can store any type in the table, passed and returned by value, un-versioned.
22:41:23Araqwell if you use pointers and shareAlloc the keys anyway, it's easy to allocate 2 objects to get the sentinel values
22:41:49MFlamer_good point.......
22:42:39Araqwhich is what java does I guess? cliff's implementation can't 'cast', can it?
22:42:58MFlamer_Cliff wraps the types
22:43:17MFlamer_which must be equivalent to an inderection
22:44:06Araqdunno, need to check the code
22:44:30Araqanyway, this disruptor thing is a modulo power of 2 based ring buffer
22:44:37MFlamer_but, he does say in his talk that if he were in C, he would steal a bit. I'm sure its faster
22:44:54Araqand there are lots of papers about it
22:45:27MFlamer_ok, i'll add that to my reading list.
22:45:30Araqbut I don't understand them because they go on and treat this power of 2 thing as if it's some magical new trick these java guys encountered
22:45:45Araqand then miss core aspects
22:46:15MFlamer_btw, i read you had interest in dependent types for nimrod. Is this still true?
22:46:42Araqyeah but after 1.0 is out
22:46:51Araqin the meantime we got flow dependent typing
22:47:07MFlamer_I spent a little time with Idris, and have read up a bit on type theory.
22:47:15Araqexcellent
22:47:32MFlamer_but, just enough to get excited and a headache
22:47:50MFlamer_I am here to help though
22:48:03Araqgreat; there was a talk about Idris on strange loop
22:49:03Araqbut this "list of length N statically typed" is not that useful, talked with a guy who has experience with ATS
22:49:19MFlamer_David Christianson, or Edwin Brady...I think those are the main proponents of Idris.
22:49:38AraqI think they were both there.
22:50:18MFlamer_It get incredibally complicated. Therom proving to do simple operations with those vectors
22:52:04MFlamer_I'm less concerned with proveability and correctness and more interested in new types of abstractions and expressiveness offered by dependent typing
22:53:04MFlamer_Also, seems macros can get you some distance down that road...
22:54:31MFlamer_is this it? http://lmax-exchange.github.io/disruptor/
22:55:04Araqyes
22:58:03*brson quit (Ping timeout: 245 seconds)
23:00:15*brson joined #nimrod
23:12:14*wlhlm quit (Ping timeout: 264 seconds)
23:27:41*Amrykid quit (Changing host)
23:27:41*Amrykid joined #nimrod
23:38:32*EXetoC1 joined #nimrod
23:38:35*EXetoC1 quit (Client Quit)
23:42:33*EXetoC quit (Ping timeout: 245 seconds)
23:42:35*EXetoC1 joined #nimrod
23:42:38*EXetoC1 is now known as EXetoC
23:54:06*EXetoC quit (Quit: WeeChat 0.4.1)
23:55:48*brson quit (Quit: leaving)