<< 06-06-2014 >>

00:03:06*Jehan_ quit (Quit: Leaving)
00:05:31NimBotAraq/Nimrod new_spawn a4323b0 Araq [+0 ±1 -0]: barrier more efficient
00:05:31NimBotAraq/Nimrod new_spawn 2de9965 Araq [+0 ±8 -0]: Promises are now refs
00:05:31NimBotAraq/Nimrod new_spawn b7cbb08 Araq [+0 ±3 -0]: added 'fence' instructions to the barrier
00:10:18*Demos quit (Ping timeout: 245 seconds)
00:14:20Araqgood night
00:21:33*springbok quit (Ping timeout: 245 seconds)
00:29:36*brson quit (Quit: leaving)
00:30:41*springbok joined #nimrod
00:41:46*saml_ joined #nimrod
00:50:31*saml_ quit (Ping timeout: 252 seconds)
00:57:50*shevy joined #nimrod
01:02:29*saml_ joined #nimrod
01:06:33*hoverbear joined #nimrod
01:30:49*q66 quit (Quit: Leaving)
01:47:55*xenagi joined #nimrod
01:55:32*brson joined #nimrod
02:06:19*brson quit (Ping timeout: 260 seconds)
02:19:57*brson joined #nimrod
02:51:11flaviu1EXetoC: Still awake? I was reading the logs, the bug you found is a known bug
02:53:46flaviu1https://github.com/Araq/Nimrod/issues/1166
03:14:35*def-_ joined #nimrod
03:17:38*def- quit (Ping timeout: 252 seconds)
03:35:55*freezerburnv quit (Quit: freezerburnv)
03:48:35*bjz joined #nimrod
03:57:51*brson quit (Quit: leaving)
04:02:44*Demos joined #nimrod
04:09:59*flaviu1 quit (Ping timeout: 252 seconds)
04:25:51*flaviu1 joined #nimrod
04:26:32*BitPuffin quit (Ping timeout: 240 seconds)
04:32:55*Mooneye joined #nimrod
04:35:12MooneyeHello!
04:39:22*freezerburnv joined #nimrod
04:39:51*freezerburnv quit (Client Quit)
04:51:54*Demos quit (Ping timeout: 240 seconds)
05:01:12*saml_ quit (Quit: Leaving)
05:01:52*xenagi quit (Quit: Leaving)
05:15:18*vendethiel quit (*.net *.split)
05:15:19*krusipo quit (*.net *.split)
05:15:20*fowl quit (*.net *.split)
05:15:22*reloc0 quit (*.net *.split)
05:15:25*betawaffle quit (*.net *.split)
05:15:25*Klaufir quit (*.net *.split)
05:15:25*Mooneye quit (*.net *.split)
05:15:26*darkf quit (*.net *.split)
05:15:26*mal`` quit (*.net *.split)
05:15:26*dymk quit (*.net *.split)
05:15:32*Amrykid quit (*.net *.split)
05:15:35*Varriount quit (*.net *.split)
05:15:37*Roin quit (*.net *.split)
05:15:39*ehaliewicz quit (*.net *.split)
05:15:40*Xuerian quit (*.net *.split)
05:26:35*Mooneye joined #nimrod
05:26:35*ehaliewicz joined #nimrod
05:26:35*mal`` joined #nimrod
05:26:35*Klaufir joined #nimrod
05:26:35*dymk joined #nimrod
05:26:35*Xuerian joined #nimrod
05:26:35*Amrykid joined #nimrod
05:26:35*betawaffle joined #nimrod
05:26:35*reloc0 joined #nimrod
05:26:35*Roin joined #nimrod
05:26:35*fowl joined #nimrod
05:26:35*krusipo joined #nimrod
05:26:35*vendethiel joined #nimrod
05:26:35*Varriount joined #nimrod
05:28:34*vendethiel quit (*.net *.split)
05:28:35*krusipo quit (*.net *.split)
05:28:36*fowl quit (*.net *.split)
05:28:38*reloc0 quit (*.net *.split)
05:28:40*betawaffle quit (*.net *.split)
05:28:41*Klaufir quit (*.net *.split)
05:28:42*Mooneye quit (*.net *.split)
05:28:42*mal`` quit (*.net *.split)
05:28:43*dymk quit (*.net *.split)
05:28:48*Amrykid quit (*.net *.split)
05:28:51*Varriount quit (*.net *.split)
05:28:52*Roin quit (*.net *.split)
05:28:54*ehaliewicz quit (*.net *.split)
05:28:55*Xuerian quit (*.net *.split)
05:28:58*darkf joined #nimrod
05:28:58*darkf quit (Changing host)
05:28:58*darkf joined #nimrod
05:30:15*flaviu1 quit (Ping timeout: 260 seconds)
05:33:32*milieu joined #nimrod
05:33:32*Mooneye joined #nimrod
05:33:32*ehaliewicz joined #nimrod
05:33:32*mal`` joined #nimrod
05:33:32*Klaufir joined #nimrod
05:33:32*dymk joined #nimrod
05:33:32*Xuerian joined #nimrod
05:33:32*Varriount joined #nimrod
05:33:32*vendethiel joined #nimrod
05:33:32*krusipo joined #nimrod
05:33:32*fowl joined #nimrod
05:33:32*Roin joined #nimrod
05:33:32*reloc0 joined #nimrod
05:33:32*Amrykid joined #nimrod
05:33:32*betawaffle joined #nimrod
06:07:15*hoverbear quit ()
06:25:46*Mooneye quit (Quit: Leaving)
06:28:36*bjz quit (Read error: Connection reset by peer)
06:34:14*bjz joined #nimrod
06:43:07*OrionPK quit (Remote host closed the connection)
06:52:21*bjz_ joined #nimrod
06:52:38*bjz quit (Ping timeout: 240 seconds)
07:06:02*bjz_ quit (Ping timeout: 245 seconds)
07:07:01NimBotAraq/Nimrod new_spawn 59c18eb Araq [+0 ±3 -0]: big rename: Promise -> FlowVar
07:07:01NimBotAraq/Nimrod new_spawn c8b5d6a Araq [+1 ±0 -0]: begin of spawn documentation
07:07:01*bjz joined #nimrod
07:20:39*bjz_ joined #nimrod
07:22:56*bjz quit (Ping timeout: 240 seconds)
07:26:19*dymk quit (Ping timeout: 240 seconds)
07:48:14*noam_ joined #nimrod
07:48:56*noam quit (Ping timeout: 240 seconds)
08:02:43*milieu quit (Ping timeout: 240 seconds)
08:05:00*io2 joined #nimrod
08:09:25*darkf quit (Ping timeout: 252 seconds)
08:19:38*milieu joined #nimrod
08:20:13*milieu quit (Client Quit)
08:31:34*kunev joined #nimrod
08:46:18*darkf joined #nimrod
09:21:11*Changaco joined #nimrod
09:35:06*dymk joined #nimrod
09:35:19def-_Does anyone have ideas about how to improve this? I'm especially wondering about the cmp function: https://gist.github.com/def-/8187448ea7a5c8da8265
10:00:21Araqwhy do you pass fs: var seq[vector] via a 'var?
10:01:35Araqoh I see
10:01:42Araqif result.len == 0:
10:01:44Araq result = @[]
10:01:45Araq fs = fs2
10:01:56Araqif result.len == 0 why do you allocate a new sequence?
10:03:00def-_Oops, that allocation is unnecessary
10:03:16Araqusually one uses result = a-b; if result == 0: result = c-d in a 'cmp'
10:04:08def-_Thanks, that's a lot nicer
10:04:21Araqalso we should add a 'sort' that doesn't perform dynamic lookups
10:05:42Araqfor x in [f[0], f[1], f[2]]: # could be slow, check the generated C/asm code
10:06:31Araq if newest == last: fs2.delete(i) # use 'del' if possible
10:07:27def-_del is not possible, need to keep the list sorted
10:07:48Araqusually you don't
10:07:51Araqbut bbl
10:23:57*bjz_ quit (Ping timeout: 245 seconds)
10:33:25*ehaliewicz quit (Ping timeout: 240 seconds)
10:36:16*brson joined #nimrod
10:36:58reactormonkhow do I shift stuff a few bytes backwards in an array?
10:43:21EXetoCI replied with "slice assignment" before, and that seems relevant now too
10:43:48EXetoCI guess you need two operations though, if you also want to remove the elements that have been shifted
10:45:54EXetoCx[a .. b] = x[a + offset .. b + offset]; x.setLen... ?
11:24:18EXetoC'float32 is float64' is true apparently
11:43:20*kemet joined #nimrod
11:45:29*Boscop joined #nimrod
11:53:31*silven_ joined #nimrod
11:56:55*silven joined #nimrod
11:58:16*silven_ quit (Remote host closed the connection)
12:18:05*untitaker quit (Ping timeout: 276 seconds)
12:18:58*brson quit (Ping timeout: 240 seconds)
12:19:21*flaviu1 joined #nimrod
12:22:23*untitaker joined #nimrod
12:28:12EXetoCflaviu1: yeah that's the literal issue I was thinking of
12:49:05*OrionPK joined #nimrod
13:05:55*darkf quit (Quit: Leaving)
13:07:57*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
13:15:39*lesshaste joined #nimrod
13:15:40lesshastehi
13:15:45dom96hey lesshaste
13:16:16lesshasteI am trying to remember but did someone integrate lapack into nimrod recently?
13:16:31lesshasteor basically any library for efficient linear algebra
13:16:46lesshastei remember some conversation about using c2nim :)
13:17:52lesshasteand more generally, what is the situation with scientific libraries and nimrod?
13:19:49lesshasteI only see libsvm on the website
13:23:38reactormonkEXetoC, does that work well on the same array?
13:24:43dom96lesshaste: sorry, no idea
13:25:20lesshastenp
13:30:19EXetoCreactormonk: I think so
13:30:41EXetoCit just puts one chunk of data onto another
13:33:04*bjz joined #nimrod
13:35:26EXetoCreactormonk: var x = [1, 2, 3, 4, 5]; x[1 .. 2] = x[2 .. 3] -> [1, 3, 4, 4, 5]
13:37:43*lesshaste left #nimrod ("Leaving")
13:40:40*noam_ quit (Read error: Connection reset by peer)
13:48:44*noam joined #nimrod
14:11:11reactormonkEXetoC, let's see
14:12:33reactormonkEXetoC, would you know where []= for arrays is defined? I'm in the system module and it gives me an undefined error on it
14:13:34EXetoCit's in there. that code compiles for me
14:13:49EXetoCproc `[]=`*[Idx, T](a: var array[Idx, T], x: TSlice[int], b: openArray[T])
14:16:18reactormonkwell
14:16:23reactormonklib/system/sysstr.nim(261, 7) Error: undeclared identifier: '[]='
14:17:54EXetoCit's an order issue, because that module is included before the definition of that proc
14:18:05reactormonkyeah, figured :-/
14:20:41*Jesin quit (Quit: Leaving)
14:36:00*BitPuffin joined #nimrod
14:36:40reactormonkany reason why buf[breaking+1] = '.' doesn't change the output of $buf ?
14:37:04reactormonkhttp://pastie.org/9264630
14:51:04EXetoCreactormonk: passing '1' to it generates this: [49, 0, 46, 48, 0, 0, 0.... 1]
14:51:25EXetoC46 being '.'
14:52:19EXetoCand echo stops at the first null value
14:54:20EXetoCbreaking+0 and breaking+1 does the correct thing for 1.0 at least
14:55:21EXetoCand all the other values that I've tested with
14:55:58EXetoC10000000000000000.0 generates 1.0e+16
14:59:38EXetoCso, will this format be the default once this is sorted out?
15:05:20EXetoCbuf is an array so invoking repr on it seems to do the right thing in that case. not so much for strings though
15:12:09*kunev quit (Quit: leaving)
15:15:17reactormonkEXetoC, uh-oh. off-by-one.
15:15:55*dymk quit (Ping timeout: 240 seconds)
15:22:09*dymk joined #nimrod
15:22:12NimBotAraq/Nimrod float_$ 6d3fbf9 flaviut [+0 ±1 -0]: Allow for nil chaining in JSON
15:22:12NimBotAraq/Nimrod float_$ 4ff5112 flaviut [+0 ±1 -0]: Add a couple words to docs
15:22:12NimBotAraq/Nimrod float_$ db7fee6 flaviut [+0 ±1 -0]: Add tests for the nil passthrough
15:22:12NimBotAraq/Nimrod float_$ 64d3b9a flaviut [+0 ±1 -0]: Fix subtle mistake in docs and formatting
15:22:12NimBot165 more commits.
15:22:26reactormonkthere ya go, merged devel in and new `$` for floats
15:47:23*Matthias247 joined #nimrod
16:00:29*Changaco quit (Quit: Changaco)
16:00:43*bjz quit (Ping timeout: 260 seconds)
16:07:56flaviu1What do people think of scoped imports?
16:08:38flaviu1ex: `import myfancydsl: veryAmbigiousIdentifeirFromMyFancyDSL`
16:09:09reactormonkflaviu1, overwriting imports?
16:11:07*dymk quit (Ping timeout: 240 seconds)
16:12:12flaviu1No, using the things myfancydsl provides inside that scope, and not outside it. So that the things available in that module are only available in that scope. Poor wording, I know
16:12:41flaviu1equivalent to `block: import myfancydsl; dostuff`, if it worked
16:12:49reactormonkuh-oh
16:13:01reactormonkwhy not force the DSL into its own file?
16:13:14reactormonkI don't think layered scope is possible with nimrod
16:13:27reactormonklayered imports that is.
16:13:40*dymk joined #nimrod
16:13:45reactormonkwell, you can have procs in blocks IIRC, so it should be possible... but not sure about imports.
16:13:57reactormonkflaviu1, put it up as feature request.
16:14:01flaviu1You can't have imports in blocks iirc
16:14:03flaviu1Ok
16:15:24reactormonkJust make sure to word everything and also include a few examples of scoping
16:17:20*hoverbear joined #nimrod
16:18:19*dymk quit (Ping timeout: 240 seconds)
16:18:53flaviu1https://github.com/Araq/Nimrod/issues/1248
16:19:01flaviu1Should I lengthen it a bit more?
16:20:16reactormonknah, I think it captures the gist of it
16:20:44reactormonktagged it as Low Priority for now.
16:21:41flaviu1Ok, looks good, thanks
16:28:13*kunev joined #nimrod
16:29:08reactormonkflaviu1, you can certainly figure out how to do it yourself and mess with the compiler, that will most likely increase the chances it actually will get realized.
16:35:37*Jesin joined #nimrod
16:47:49*brson joined #nimrod
16:48:09*brson quit (Client Quit)
16:48:21EXetoCreactormonk: eeeexcellent!
16:49:21*kunev quit (Ping timeout: 252 seconds)
16:49:29reactormonkEXetoC, got any other values in mind that might break it?
16:51:04EXetoCI don't know
16:51:27EXetoCAraq: did you say that modifying $ for floats would break some things?
16:52:20*brson joined #nimrod
16:52:28reactormonkEXetoC, I fixed all the tests I could find
16:58:53*brson quit (Ping timeout: 255 seconds)
17:18:29*brson joined #nimrod
17:27:31Araqguys, don't merge #1249 ... I don't really like it
17:29:05*vendethiel quit (Ping timeout: 264 seconds)
17:48:47*q66 joined #nimrod
17:48:47*q66 quit (Changing host)
17:48:47*q66 joined #nimrod
17:50:35*Matthias247 quit (Read error: Connection reset by peer)
17:50:47*dymk joined #nimrod
17:57:42flaviu1IEEE 754 is getting decimals
17:58:01flaviu1Well, it got decimals
17:58:23flaviu1But I guess not all hardware has it
18:00:11*dymk quit (Ping timeout: 265 seconds)
18:11:48*freezerburnv joined #nimrod
18:11:48*flaviu1 quit (Read error: Connection reset by peer)
18:13:56*flaviu1 joined #nimrod
18:18:21*vendethiel joined #nimrod
18:25:48*dymk joined #nimrod
18:36:19*dymk quit (Ping timeout: 240 seconds)
18:41:50*dymk joined #nimrod
18:42:21bstrieAraq: is it possible for a library to export macros? I don't see it discussed in the language manual, nor is there any general discussion of visibility
18:43:45flaviu1bstrie: I may be missing something, but just add the asterisk to the macro
18:44:24bstriewhere is the section of the manual on public vs private symbols?
18:45:16flaviu1http://build.nimrod-lang.org/docs/manual.html#modules
18:45:29flaviu1Not much though, just "Only top-level symbols that are marked with an asterisk (*) are exported"
18:45:35*Johz joined #nimrod
18:45:56bstriethanks
18:47:05bstrieI ask because I know in rust that importing/exporting macros is a huge pain, and nimrod has much nicer macros than we do so I was curious how you handled it :)
18:50:02*vendethiel quit (Ping timeout: 276 seconds)
19:07:10*kunev joined #nimrod
19:07:17*kunev quit (Remote host closed the connection)
19:08:18*kunev joined #nimrod
19:17:31*dymk quit (Ping timeout: 240 seconds)
19:19:19flaviu1Can dot operators be macros?
19:19:35Araqsure. try it
19:23:23*dymk joined #nimrod
19:25:06*Jesin quit (Remote host closed the connection)
19:27:31*dymk quit (Ping timeout: 240 seconds)
19:28:18flaviu1Nice, it works
19:28:28*dymk joined #nimrod
19:28:55flaviu1Can we get operator operators? :P
19:29:19Araqlet's ask Larry Wall about it
19:30:39EXetoClöl
19:31:29flaviu1I have good reasons for it, but yeah it'll probably be used to make horrible DSLs
19:32:28Araqreally? good reasons? I thought it's more important to care about average joe programmer, cause he will leave Java for Nimrod :P
19:34:09Araqplease tell me anyway, what's your use case?
19:34:31flaviu1I want to make option monads so that Some(3) + 4 = Some(7)
19:34:47EXetoCconverter?
19:34:50flaviu1But None + 4 = None
19:35:02Araqoverload + then?
19:35:16flaviu1But with Option being Option[T]
19:35:24flaviu1not just Option[int]
19:35:43Araqproc `+`[T] (a: Option[T], b: T): Option[T] = ...
19:36:30flaviu1Ok, what about the rest of the infinitely long list of possible operators?
19:36:54Araqtemplate defineOp(opr) =
19:37:03Araq proc opr[T] (a: Option[T], b: T): Option[T] = ...
19:37:15AraqdefineOp(`+`)
19:37:17AraqdefineOp(`+`)
19:37:19AraqdefineOp(`*`)
19:37:31*dymk quit (Ping timeout: 240 seconds)
19:37:57Araqyou seem to want that for *every* operator though
19:38:19Araqwhich doesn't make sense, why would 'add' not be included in your list then?
19:38:40Araqso you want a general lifting mechanism
19:38:48Araqwhich is what converter can provide
19:39:49flaviu1Is there any information on converters?
19:40:12EXetoCthe manual
19:40:26EXetoCno wait
19:40:30*dymk joined #nimrod
19:40:42EXetoCyes but it doesn't even have its own section
19:40:51EXetoChttp://build.nimrod-lang.org/docs/manual.html#convertible-relation
19:41:11Araqstrange
19:41:22AraqI recall merging a patch that documents them
19:41:27EXetoCit doesn't say much, but it's pretty straightforward
19:41:32EXetoCoh
19:43:37flaviu1I don't think a converter would work. It needs to return something, and when the option is None, there is nothing to return
19:44:50Araqshouldn't the converter convert from T to Option[T] instead?
19:45:05flaviu1You're right, I overlooked that
19:45:22flaviu1Yeah, I had it turned around in my head
19:46:05Araqwhat's the obsession with Option though? we have exceptions done right (TM)
19:46:12Araqaka tracked exceptions
19:46:28Araqthey are more convenient and often faster
19:47:27Araqthey already give you the monad you're after
19:47:33flaviu1Maybe so, but I'm a fan of functional programming. My goal here is to make Option[T] be just as convenient as exceptions
19:47:52flaviu1I know, but it also does some weird stuff like unrolling the stack
19:47:59*Jehan_ joined #nimrod
19:48:10Araqwhich is exactly what you're trying to emulate, flaviu1
19:49:04Jehan_The rationale behind Option[T] is not to replace exceptions (per se), but to be explicit about how null pointers are being treated.
19:49:31*dymk quit (Ping timeout: 240 seconds)
19:50:05AraqJehan_: that is not what flaviu1 is attempting as far as I can tell
19:50:19*ehaliewicz joined #nimrod
19:50:31*dymk joined #nimrod
19:50:38Jehan_Haven't looked at it, but that's why it exists.
19:51:08flaviu1Araq is right about what I'm attempting
19:52:45Jehan_Well … I think it's not a good way to do exceptions, because then it's being used in too many different ways.
19:53:18Araqwell ok, exceptions are more similar to Either than to Option
19:53:25Araqif that's what you're after
19:57:07*dymk quit (Ping timeout: 240 seconds)
19:57:42*Joe_knock joined #nimrod
19:59:58*dymk joined #nimrod
20:01:15Jehan_Araq: The problem is that once you start using Option[T] for all kinds of different things, then None can mean both (1) an error occurred or (2) the result is defined, but just not a part of T.
20:01:21flaviu1I'm eventually going to do either for that reason, but I'm going to try to get something working with option first
20:01:21flaviu1Is there some magic I need to do to get my converter working?
20:01:23flaviu1err wait
20:01:31*Varriount quit (Excess Flood)
20:02:02*Varriount joined #nimrod
20:02:14Jehan_Hmm. Checking the forums and wondering whether it's worth trying to fix the linear search for method lookup.
20:02:29*vendethiel joined #nimrod
20:05:51flaviu1I doubt there's a way to get all the methods in scope
20:07:15Jehan_flaviu1: That's not the issue that I'm talking about.
20:07:42Jehan_The problem is that the dispatch code does a series of isObj() tests.
20:08:04Jehan_Each of which is pretty expensive, and it also means dispatch is O(number of subtypes).
20:08:08flaviu1I wasn't referring you what you were saying, that was just a roundabout way of saying I want a method that gives me all the stuff in scope
20:08:21Jehan_Oh, sorry.
20:09:07AraqJehan_: it's easy to make the codegen produce an optimized solution
20:09:38Jehan_Araq: I figure a switch on the type number should work?
20:11:03AraqJehan_: that works; my plan was to generate a polymorphic cache instead
20:11:33Araqwhich is then easily compatible with DLL support
20:12:14Jehan_Caches are also trouble, since you need a per-thread instance, and TLS may be slow.
20:12:27Jehan_But yeah, DLLs are an issue.
20:12:59Jehan_I had thought about a cache as a quick and dirty solution, too, but worried about the TLS issues.
20:13:45Araqwhy is this a problem? make it global, not thread local and accept that hardware word stores are atomic
20:14:08Jehan_Hmm. How do you resolve conflicts then?
20:14:18AraqI don't
20:14:21Jehan_A cache entry would have more than one word in it.
20:14:27Araqah no
20:14:33Araqit's a 1 entry cache
20:14:45Araqoh wait ...
20:14:58Araqyou maybe you're right hmm
20:15:12Jehan_Yeah, I considered several caching options.
20:15:57Araqwell I did make some notes when I thought about it
20:16:10AraqI guess I won't find them again ...
20:16:29Jehan_Let me think about it if it's possible.
20:19:25Araqwell you have to compress the (key,val)-pair into a single word
20:19:47Araqthis pretty much destroys the simplicity of it though
20:24:28*kunev quit (Quit: Lost terminal)
20:26:54Jehan_Well, if it were single dispatch, that wouldn't be a big problem.
20:27:14Jehan_The real problem is that with multiple dispatch, the keys can be arbitrarily large.
20:28:57Araqyou can always only cache 1 dimension
20:29:40Jehan_And just pay the price if you do use multiple dispatch? Well, it'd be better than nothing. Still ...
20:29:51Jehan_Hmm, let me think about it.
20:37:23Joe_knockis dom96 here?
20:37:46Jehan_I can't really think of a solution that doesn't require either a read barrier or TLS.
20:39:11*dom96_and joined #nimrod
20:39:36flaviu1Joe_knock: No, but he'll be joining soon
20:39:50flaviu1Oh, he is
20:40:05flaviu1Jehan_: What are you trying to do?
20:40:23Joe_knockdom96_and
20:41:10Jehan_flaviu1: Speeding up method dispatch.
20:41:23Jehan_As in, making it faster than excruciatingly slow.
20:41:25flaviu1Oh, I see the fourm post
20:41:54Jehan_flaviu1: I had already known from experiments that method dispatch wasn't exactly fast. I hadn't realized how bad it was.
20:41:58dom96_andWhats up?
20:43:20flaviu1Yeah, that's pretty embarrassing
20:44:29Jehan_flaviu1: I think it's just because hardly anybody uses them, so there hasn't been any pressure to optimize it.
20:44:40Araqyup
20:45:01flaviu1Yeah, I know, but it still doesn't reflect too well.
20:45:05*Jesin joined #nimrod
20:45:29Jehan_Araq: I think I'll look at doing a thread-local cache.
20:45:44Jehan_In the long term, there needs to be an alternative for faster TLS, anyway.
20:46:01Jehan_Eh, architecture-independent fast TLS.
20:46:13flaviu1A big hashtable that gets populated at thread start?
20:46:31Araqwhy? __thread is C++11 or something
20:46:34Jehan_flaviu1: A flat cache is probably going to be good enough.
20:46:39dom96_andSo, why was I asked to join?
20:46:53Jehan_Araq: Yes, it's a standard, doesn't mean that the standard implementation is fast.
20:47:12Jehan_On some architectures it's still simply a wrapper around pthread_getspecific().
20:47:24Jehan_Cygwin and OS X in particular, as I recall.
20:50:47Araqwe can simply inline 'isObj', Jehan_
20:51:08Jehan_Araq: That's still a linear search.
20:51:31Jehan_Try that with a couple dozen subtypes. :)
20:52:12*Matthias247 joined #nimrod
20:53:05AraqJehan_: not really, you can cut off a good amount of the search list then iirc
20:53:33Araqyou need to use more context to do that though
20:53:56Jehan_Yeah. My initial thought was just to do a switch on a type id.
20:54:12Jehan_But you're right, that creates problems with DLLs.
20:57:03*Changaco joined #nimrod
20:57:22AraqJehan_: I don't consider it our business to provide architecture-independent fast TLS
20:57:56Araqif the architecture sucks then that's its problem, not ours
20:58:08Jehan_Araq: Well, it honestly wouldn't be that difficult (at least as an option).
20:58:15Araqwe already have enough platform specific hacks
20:58:18Jehan_But I may have spoken too rashly.
20:58:32Araqand I know how to do it
21:01:56Joe_knockHave any of you built a rest-api with jester?
21:02:30Araqwhat's that? generating JSON with jester? surely we did that
21:05:19Jehan_And no, I was correct, TLS is still slow on these platforms.
21:06:47Araqyes
21:07:03Araqpunishing bad platforms is a good thing
21:07:09Joe_knockAraq: yes, kind of like exposing a data endpoint to be consumed by any service.
21:07:39Jehan_Araq: Well, the problem is that Nimrod's performance will then be subpar on these platforms.
21:07:56fowlJoe_knock, im sure nimbuild or the forum does it
21:09:46Jehan_Hmm, there's a useStackMaskHack already now that I'm looking at it.
21:10:22Araqwell I told you I know how to do it :P
21:10:40Joe_knockfowl: possibly. It depends how sinatra-ish Jester is.
21:11:25AraqJehan_: you need to wrap 'main' in another thread to gain control over its stack and that is a pretty bad thing
21:11:55Jehan_Araq: There's a semi-portable way around that.
21:12:19Jehan_And of course processor-specific ones.
21:13:15Jehan_What you need to do is to adjust the stackpointer, which alloca() with the right parameter can do.
21:13:46Jehan_There's some extra trickery required on Linux, which really, really doesn't like large stackframes.
21:14:45Jehan_Meaning that you have to touch every page in order (or at least a sufficiently big subset of stack pages).
21:14:51Jehan_Or you'll get a segmentation fault.
21:15:14Jehan_A really big local array can also cause that.
21:16:21Jehan_And of course, there's always the portable solution of passing the TLS pointer as an extra argument.
21:16:37Jehan_Not too bad on processors with lots of registers, kinda horrible on an x86. :)
21:24:45*freezerburnv quit (Quit: freezerburnv)
21:27:44AraqJehan_: you can also store the TLS pointer into where it should go for the main thread
21:28:06Araqyou'll likely overwrite argc or some other irrelevant shit
21:28:23Araqor an environment var :-)
21:30:10Araqbut you can store these somewhere before doing the overwrite. In fact, we already do such things.
21:37:58Jehan_Ouch. :)
21:38:19Araqwell I mean we store argc in a global
21:38:31Araqnot that we already overwrite random memory locations
21:38:53Jehan_No, my point is that there's no guarantee that when you use the stack like that that the memory will actually be accessible.
21:39:03Jehan_Ah.
21:42:01*Johz quit (Quit: Leaving)
21:48:12*vendethiel quit (Read error: Connection reset by peer)
21:52:24*vendethiel joined #nimrod
22:02:49*brson quit (Ping timeout: 265 seconds)
22:13:36*vendethiel quit (Read error: Connection timed out)
22:14:24*vendethiel joined #nimrod
22:22:16*Vclone joined #nimrod
22:22:41Araqhi Vclone welcome
22:22:52Araqoh lol
22:22:57Araqit's Varriount
22:23:20*Varriount quit (Ping timeout: 255 seconds)
22:31:44*vendethiel quit (Ping timeout: 240 seconds)
22:32:17*vendethiel joined #nimrod
22:32:19*Matthias247 quit (Read error: Connection reset by peer)
22:46:38*Jehan_ quit (Quit: Leaving)
22:51:21*hoverbea_ joined #nimrod
22:54:39*hoverbear quit (Read error: Connection reset by peer)
22:54:47*hoverbe__ joined #nimrod
22:58:20*hoverbea_ quit (Ping timeout: 260 seconds)
23:02:39*shodan45 joined #nimrod
23:22:56reactormonkWhat's the difference between tracked exceptions and default exceptions?
23:25:19Araqwhat are default exceptions?
23:28:35*hoverbe__ quit ()
23:35:59*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
23:42:33shevyhehe
23:42:46shevyand what are unusual exceptions