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:35 | filwit | anyone know how to use a varargs[expr]? |
01:01:15 | filwit | template new[T](desc:typedesc, args:varargs[expr]) T = new(args) |
01:01:54 | * | DAddYE joined #nimrod |
01:05:24 | filwit | dom96: 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:21 | MFlamer_ | Hi Nimrods |
06:24:48 | MFlamer_ | How do you build release? |
06:27:36 | * | DAddYE joined #nimrod |
06:28:25 | Araq | koch csource -d:release |
06:28:50 | Araq | koch zip |
06:28:56 | Araq | koch inno -d:release |
06:32:37 | MFlamer_ | ok, got it. Building the compile in release only makes it compile faster, correct? Its not gonna make my code faster |
06:32:53 | MFlamer_ | compiler |
06:34:16 | MFlamer_ | 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:20 | Araq | right, it won't make your code faster |
06:39:00 | MFlamer_ | 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:28 | MFlamer_ | 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:31 | MFlamer_ | If we did guarantee this, I guess we would basicly be implementing STM? |
06:41:55 | Araq | kind of, yeah |
06:42:32 | Araq | well you compare an atomic 'get' to a more general 'atomic' block |
06:42:42 | Araq | so yeah, you can't do better here |
06:47:30 | Araq | how do you implement the versioning btw? atomicInc on a version counter? |
06:48:21 | MFlamer_ | there is none |
06:49:53 | MFlamer_ | I've implemented it almost identically to Click's |
06:56:41 | Araq | hmmm ok |
06:57:02 | Araq | but we need one for composing with other lock free data structures |
06:59:03 | MFlamer_ | I remember you mentioning that.....I'll need to think about what that means in this context |
07:00:49 | MFlamer_ | I know one way its done is to use a larger atomic word and keep a counter with the key |
07:04:03 | MFlamer_ | actually, with the pointer to the value probably. This is one way around the "ABA" problem also |
07:07:52 | Araq | I 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:19 | Araq | readers 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:55 | Araq | hi wlhlm welcome |
16:50:02 | * | DAddYE quit (Ping timeout: 264 seconds) |
17:06:01 | wlhlm | Araq: thanks! (sorry for late response, was afk) |
17:09:19 | * | ltbarcly joined #nimrod |
17:14:03 | * | ltbarcly quit (Ping timeout: 260 seconds) |
17:42:08 | Araq | ping zahary1, zahary_ |
17:46:41 | * | DAddYE joined #nimrod |
17:47:30 | Araq | hi 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:29 | Araq | he ho MFlamer_ |
20:17:55 | MFlamer_ | howdy |
20:33:08 | Araq | well I'm thinking a bit about the STM |
20:33:17 | * | MFlamer_ quit (Ping timeout: 250 seconds) |
20:33:21 | Araq | gah |
20:33:28 | Araq | now that's useful |
20:37:17 | * | MFlamer_ joined #nimrod |
20:37:44 | Araq | MFlamer_: here is my idea |
20:37:49 | Araq | transaction: |
20:37:52 | Araq | read x, y |
20:37:57 | Araq | write z, op(x, y) |
20:38:12 | Araq | is a macro that does something like: |
20:38:17 | Araq | while true: |
20:38:32 | Araq | let ver1 = a.getVersion |
20:38:40 | Araq | let ver2 = b.getVersion |
20:39:18 | Araq | let ver3 = z.getVersion |
20:39:32 | Araq | z.set(op(x, y)) |
20:40:04 | Araq | if ver1 == a.getVersion and ver2 == b.getVersion and ver3 == z.getVersion: break |
20:41:24 | Araq | er ... 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:56 | MFlamer_ | but do we need to synchronize setting a value and version at the same time? |
20:47:23 | MFlamer_ | like double word CAS? or do you not see that as necassary? |
20:47:55 | Araq | well ok my example is stupid as 'z.set' obviously modifies z's version |
20:48:03 | Araq | but you get the idea |
20:48:11 | * | DAddYE joined #nimrod |
20:48:14 | MFlamer_ | 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:41 | Araq | nope, I read a couple of papers months/years ago |
20:49:44 | Araq | and it's likely that I miss something, but imo the above pseudo-code should work. |
20:50:28 | Araq | it checks and re-tries if not every version is the same as before. what could possibly be wrong about it? :P |
20:52:39 | Araq | ah well 'setValue' could overwrite without a way to rollback |
20:53:07 | MFlamer_ | I agree, as long as setting value and version are atomic |
20:53:12 | * | p0nce left #nimrod (#nimrod) |
20:54:57 | Araq | so hmm we need to rollback if the check fails |
20:55:34 | Araq | which would be another u = z.getValue(...) |
20:56:25 | Araq | pretty 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:01 | MFlamer_ | I lost my connection for a min |
21:15:21 | Araq | no problem read the logs then please |
21:22:59 | * | test432789 joined #nimrod |
21:23:06 | * | test432789 quit (Client Quit) |
21:24:20 | EXetoC | that was easy. maybe I should use nc instead of weechat |
21:34:40 | * | brson joined #nimrod |
21:40:36 | * | cookies joined #nimrod |
21:40:41 | EXetoC | a |
21:40:46 | * | cookies quit (Remote host closed the connection) |
22:12:48 | wlhlm | is there a nimrod mailing list? |
22:13:08 | Araq | no, there is this channel and the forum |
22:13:52 | * | q66_ is now known as q66 |
22:14:24 | wlhlm | ok… |
22:16:03 | MFlamer_ | 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:03 | Araq | yeah I told you. nimrod's profiler could use one |
22:17:58 | MFlamer_ | That's right |
22:19:12 | * | Associ8or joined #nimrod |
22:19:12 | * | Associ8or quit (Changing host) |
22:19:12 | * | Associ8or joined #nimrod |
22:20:17 | Araq | and 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:40 | MFlamer_ | I just want to get something useful completed before too long.... |
22:20:43 | Araq | much like an in memory database |
22:20:52 | Araq | so yeah, it surely is useful |
22:21:31 | MFlamer_ | Yes, just store word sized (-2 bits for flags though) as values |
22:21:58 | Araq | well that's too bad it should be generic |
22:22:10 | Araq | but maybe I'm misunderstanding you |
22:22:54 | Araq | btw you should depend on hashes.nim |
22:22:54 | MFlamer_ | Just that the table logic needs 2 bits for some state in each key and value |
22:23:29 | Araq | hmm well tables.min uses a triple for these reasons |
22:23:34 | Araq | instead of a pair |
22:23:52 | MFlamer_ | use hashes.nim for the hashing of key types, yes |
22:26:25 | Araq | MFlamer_ just in case you don't know: http://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions |
22:27:58 | Araq | anyway apart from a lockfree hash table, a lock free work queue is pretty common |
22:28:39 | Araq | or just go with the "disruptor" that I'd like to make the base for nimrod's message passing implementation |
22:28:56 | MFlamer_ | nice, gotta get me some haswell hardware to play with |
22:30:29 | Araq | well that's the future anyway, locks are here to stay and will get much faster |
22:31:00 | Araq | and we'll make them safe ;-) |
22:31:13 | MFlamer_ | disruptor? |
22:31:17 | Araq | the effect system makes deadlock detection at compile time pretty easy |
22:32:18 | MFlamer_ | ah ha |
22:40:30 | MFlamer_ | 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:23 | Araq | well if you use pointers and shareAlloc the keys anyway, it's easy to allocate 2 objects to get the sentinel values |
22:41:49 | MFlamer_ | good point....... |
22:42:39 | Araq | which is what java does I guess? cliff's implementation can't 'cast', can it? |
22:42:58 | MFlamer_ | Cliff wraps the types |
22:43:17 | MFlamer_ | which must be equivalent to an inderection |
22:44:06 | Araq | dunno, need to check the code |
22:44:30 | Araq | anyway, this disruptor thing is a modulo power of 2 based ring buffer |
22:44:37 | MFlamer_ | 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:54 | Araq | and there are lots of papers about it |
22:45:27 | MFlamer_ | ok, i'll add that to my reading list. |
22:45:30 | Araq | but 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:45 | Araq | and then miss core aspects |
22:46:15 | MFlamer_ | btw, i read you had interest in dependent types for nimrod. Is this still true? |
22:46:42 | Araq | yeah but after 1.0 is out |
22:46:51 | Araq | in the meantime we got flow dependent typing |
22:47:07 | MFlamer_ | I spent a little time with Idris, and have read up a bit on type theory. |
22:47:15 | Araq | excellent |
22:47:32 | MFlamer_ | but, just enough to get excited and a headache |
22:47:50 | MFlamer_ | I am here to help though |
22:48:03 | Araq | great; there was a talk about Idris on strange loop |
22:49:03 | Araq | but this "list of length N statically typed" is not that useful, talked with a guy who has experience with ATS |
22:49:19 | MFlamer_ | David Christianson, or Edwin Brady...I think those are the main proponents of Idris. |
22:49:38 | Araq | I think they were both there. |
22:50:18 | MFlamer_ | It get incredibally complicated. Therom proving to do simple operations with those vectors |
22:52:04 | MFlamer_ | I'm less concerned with proveability and correctness and more interested in new types of abstractions and expressiveness offered by dependent typing |
22:53:04 | MFlamer_ | Also, seems macros can get you some distance down that road... |
22:54:31 | MFlamer_ | is this it? http://lmax-exchange.github.io/disruptor/ |
22:55:04 | Araq | yes |
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) |