<< 24-07-2013 >>

00:31:09*EXetoC quit (Quit: WeeChat 0.4.1)
01:16:48xilotoow toow
01:56:58*OrionPK quit (Read error: Connection reset by peer)
01:58:30*DAddYE quit (Remote host closed the connection)
01:59:06*DAddYE joined #nimrod
02:03:19*DAddYE quit (Ping timeout: 246 seconds)
02:07:34*q66 quit (Quit: Leaving)
02:23:42*zahary joined #nimrod
02:24:45*zahary1 quit (Read error: Connection reset by peer)
02:59:36*DAddYE joined #nimrod
03:05:50*DAddYE quit (Ping timeout: 256 seconds)
04:11:04*xilo quit (Ping timeout: 246 seconds)
04:41:42*DAddYE joined #nimrod
05:28:16*DAddYE quit (Remote host closed the connection)
06:38:31*DAddYE joined #nimrod
06:38:47DAddYEhi there!
06:39:12DAddYEany advice how to improve performance: https://github.com/daddye/node.nim ?
06:39:38DAddYEaka I need some general tips to improve performance, since you guys are much more experienced than me ;)
07:09:26*Araq_ joined #nimrod
07:50:42*Araq_ quit (Read error: Connection timed out)
07:52:41*Araq_ joined #nimrod
08:26:37*DAddYE quit (Ping timeout: 276 seconds)
08:45:39*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212])
09:19:22*EXetoC joined #nimrod
09:21:41EXetoCThe ubuntu forums were hacked, and I had an account there? -.-
09:57:32*Araq_ joined #nimrod
10:08:14*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212])
10:52:02*Araq_ joined #nimrod
11:00:57*q66 joined #nimrod
11:18:15*Araq_ quit (Read error: Connection timed out)
11:19:18*Araq_ joined #nimrod
11:54:32*Araq_ quit (Read error: Connection timed out)
11:55:18*Araq_ joined #nimrod
12:12:31*Araq_ quit (Read error: Connection timed out)
12:13:18*Araq_ joined #nimrod
12:43:55*Araq_ quit (Read error: Connection timed out)
12:45:16*Araq_ joined #nimrod
13:09:44*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212])
13:12:33*Trixar_za joined #nimrod
13:41:09*Araq_ joined #nimrod
13:48:38*xilo joined #nimrod
13:48:53*Trixar_za quit (Ping timeout: 245 seconds)
13:55:15*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212])
14:01:47*Trixar_za joined #nimrod
14:22:56*Trixar_za quit (Ping timeout: 268 seconds)
16:33:22*DAddYE joined #nimrod
16:51:41dom96hi
16:51:50dom96EXetoC: Yeah, I had an account there...
16:52:00dom96can't remember which password I used
16:52:06dom96so yeah...
17:12:53EXetoC:>
17:22:41*jbe_ joined #nimrod
17:23:12Araqping zahary
17:24:09dom96hi jbe_
17:24:12dom96hi Araq
17:24:22Araqhi dom96
17:24:54jbe_greetings noble wizards
17:25:02Araqhi jbe_
17:25:27jbe_:)
17:37:46*Mat2 joined #nimrod
17:37:48Mat2hello
17:43:15Araqhi Mat2
17:47:12Mat2hi Araq and hello @ all
18:09:26Mat2DAddYE: You can use sets and let the compiler optimizate the bit-shiftings out because for some Intel cpu's these are slow operations
18:11:40Mat2otherwise the TCP protocol is known not to be the best-one performance wise dependent of usage
18:12:25Mat2(I do not know what server application you have in mind)
18:40:47DAddYEthanks Mat2!
18:41:42DAddYEMat2: do you mean the bitshifting of http_parser?
18:44:33Mat2yes
18:45:04AraqI can't imagine bitshifting is in any way measurable
18:45:35Araqit's 5 cycles vs 1 or something on some old cpus, a single cache miss is much worse
18:46:31Mat2on these older cpu's bit-shifting are so called vector operations which block the pipelines
18:47:44Araqon old pentiums only the u-pipe can process them and not the v-pipe (or the other way round)
18:48:04Araqbut again, I can't imagine it's measurable today
18:48:47Mat2your right, except for my i3 core which is affected from this
18:48:56Mat2also Intel Atom
18:49:20Mat2and Pentium 4
18:50:22Araqinteresting
18:51:11Mat2the clock cycles are a bad orientation for these kind of problems because pipline-stalls affect also prefetching and this can cost much more clock cycles
18:51:51Araqwell I didn't know it causes pipeline stalls
18:52:25Mat2http://www.agner.org/optimize/
18:53:14Araqyeah I know this
18:56:43Mat2I'm not sure about the exact source for this behaviour but I can measure it on some processors. Also the GNU C compiler specially include a code-optimization for this so it must be relevant
18:58:12Mat2another pitfall can be the use of lea and xchg
19:00:12Mat2I think these instructions result in some sort of internal code-serialisation (specially xchg seem to generate problems for register remapping on some CPU's)
19:01:30Mat2all of this isn't handled in the official optimization guides
19:02:12Araqxchg is implicitly atomic iirc
19:02:21Araqso yeah I wouldn't use it
19:17:13Mat2ok, I found the reasom. Some Intel cpu's do not have a barrel-shifter unit anymore, this means shift and rotate instructions must be emulated though integer operations. Because the Out-Of-Order engines archive high "thoughports" there is no unit left free for insertions (dependent on the instuction mix) generating pipeline stalls
19:17:20Mat2^reason
19:17:34Mat2^thoughputs
19:33:01DAddYEquick info, can we use passc in the nimfile.cfg ?
19:33:10Araqsure
19:33:31Araqgah, why can't aporia render 24'u32 properly?
19:33:56DAddYEAraq: sure -> for me?
19:34:09AraqDAddYE: yes
19:35:13DAddYEAraq: cool! Thanks!
19:40:47NimBotAraq/Nimrod master 9051a01 Araq [+4 ±0 -0]: first steps to a new evaluation engine
19:40:47NimBotAraq/Nimrod master a7aa473 Araq [+0 ±1 -0]: Merge branch 'master' of github.com:Araq/Nimrod
19:43:36EXetoCyay, bits!
19:48:16*reactormonk quit (Ping timeout: 240 seconds)
19:58:30NimBotAraq/Nimrod master 2dd9357 Araq [+0 ±5 -0]: added macros.genSym
19:58:40Araqdom96: here you go
20:01:56dom96thx
20:30:46*Associat0r joined #nimrod
20:30:46*Associat0r quit (Changing host)
20:30:46*Associat0r joined #nimrod
20:35:22NimBotAraq/Nimrod master 950597b jbe [+0 ±1 -0]: export pointer types for SDL event objects
20:35:22NimBotAraq/Nimrod master 29edd4a Araq [+0 ±1 -0]: Merge pull request #527 from jbe/master... 2 more lines
20:46:50EXetoCemulating field access with procs sure is trivial. sometimes you might accidentaly assign something to a field returned by the getter though, rather than calling `x=`, if both are defined
20:47:32EXetoCIt's just a matter of renaming one of them though
20:47:40AraqI can't follow
20:47:52Araqif you don't return 'var T' you can't assign to the getter
20:48:05Araqbtw just fixed your named argument bug
20:48:17Araqtook longer to download your code than to fix it
20:49:12EXetoCthat's great
20:54:29EXetoCAraq: no not directly, but if you have "proc x(o: T): U =..." and "proc `x=`(o: T, val: U) =..." then it's very easy to do "o.x.foo = 42" by mistake. it's quite subtle
20:55:38EXetoCI've been thinking of some possible solutions which I think would involve compiler magic, but maybe it's best to rename one of the symbols except maybe when the type in question is simple
20:56:31Mat2ciao
20:56:47*Mat2 quit (Quit: Verlassend)
20:56:55Araqo.x.foo works exactly how it should work
20:57:56Araqo.x = (o.x.foo = 42) ? how else should it work?
21:08:04NimBotAraq/Nimrod master ffaa0b2 Araq [+0 ±4 -0]: fixes #544
21:08:04NimBotAraq/Nimrod master 14158fc Araq [+13 ±1 -0]: fixes #531
21:08:04NimBotAraq/Nimrod master d0078b1 Araq [+0 ±1 -0]: Merge branch 'master' of github.com:Araq/Nimrod
21:15:57EXetoCI'm just saying that it might be confusing to give them the same name, and it wasn't a problem for me until recently
21:18:40EXetoCsince it's very different from direct field access in this case, but the user might not always notice. it's just an observation, and I might try to avoid naming getter and setter pairs like that
21:19:50Araqwell please give your example
21:20:08Araqit might also be a bug that the compiler doesn't complain
21:20:29Araqas o.x() is not an l-value in general
21:20:53dom96huh? o.x = 42 is the same as o.x.foo = 42 in that case?
21:21:22Araqdom96: no ...
21:21:36dom96oh good.
21:28:24EXetoC'foo' might be a reference though, but yeah
21:28:58Araqwell if it's a reference you get the right semantics
21:34:07Associat0rhttp://www.reddit.com/r/programming/comments/1iyp6v/is_there_a_really_an_empirical_difference_between
21:36:23EXetoCyes, but the original will still exist at that point, just that it won't be as common. anyway, I'll create an example soon
21:36:37AraqAssociat0r: and now you know why nimrod is style insensitive
21:36:41EXetoCtests/manyloc/named_argument_bug. oh man :p
21:36:46Araqbut that doesn't end the wars unfortunately either
21:36:55Araqnow it becomes TTime vs Time
21:37:49Associat0rAraq: .NET Framework guidelines had some good guidelines for those cases
21:38:25Araq.NET framework's guidelines are broken
21:38:46Araqpublic MyEnum MyEnum { get; } // gah, kill it already
21:39:42EXetoCsilly
21:40:02EXetoCnot that I know anything about .NET, but still
21:40:30Associat0rwell that's because they use PascalCase for public methods there
21:41:29Araqwell _privateFields are ugly too
21:41:59Associat0rtrue but better than m_privateFields
21:42:00dom96hrm, does Ada also use the 'T' prefix?
21:42:16Araqdom96: nope
21:42:25dom96how does it work then?
21:42:32Associat0rbtw I wouldn't use T prefix for types
21:42:48dom96do people just avoid clashes by not naming their variables the same thing as their types?
21:42:58Araqdom96: yeah
21:43:18AraqAssociat0r: actually T/P is about value vs reference types a convention coming from Delphi
21:43:32EXetoCwould've been less of an issue had underscores been significant
21:43:47Araqso yeah the T stands for "value type" -.-
21:44:17EXetoCor maybe you could just do "var vrect: TRect"
21:44:43Araqyou can do 'var rect: Rect' already, EXetoC btw
21:45:00EXetoCoops, not TRect
21:45:02EXetoCright
21:45:35Araqbut not many people know that and it causes problems anyway
21:47:05EXetoCvar int = 0. oh yeah look at that
22:05:26*OrionPK joined #nimrod
22:10:51OrionPKanyone going in for an Ubuntu Edge?
22:11:16dom96$600 no way.
22:11:33OrionPKwell, for an unlocked phone that doubles as a desktop computer
22:11:43OrionPK$600 is (sickeningly) not that much for an unlocked smartphone
22:13:11EXetoChow do I dereference a 'ref' type? the dot operator has taken care of that before
22:13:20Araqr[]
22:13:32EXetoCok
22:20:05EXetoCAraq: https://gist.github.com/EXetoC/6075116
22:20:24EXetoCit might make more sense when the "getter" and "setter" doesn't even correspond to an actual field
22:21:08Araqhow is this confusing?
22:21:23Araqwhat should bar.thing.x mean instead?
22:31:10EXetoCit's easy to lose track of what's an actual field access and what isn't, that's all I've been saying
22:32:35Araqoh alright
22:48:19EXetoCand even primitives can be made to look like aggregates, so "getThing/`thing=`" seems like a good compromise
22:49:12AraqI'd go with thing/setThing
22:54:59EXetoCyeah, no need to overuse `x=`