00:03:06 | * | Jehan_ quit (Quit: Leaving) |
00:05:31 | NimBot | Araq/Nimrod new_spawn a4323b0 Araq [+0 ±1 -0]: barrier more efficient |
00:05:31 | NimBot | Araq/Nimrod new_spawn 2de9965 Araq [+0 ±8 -0]: Promises are now refs |
00:05:31 | NimBot | Araq/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:20 | Araq | good 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:11 | flaviu1 | EXetoC: Still awake? I was reading the logs, the bug you found is a known bug |
02:53:46 | flaviu1 | https://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:12 | Mooneye | Hello! |
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:01 | NimBot | Araq/Nimrod new_spawn 59c18eb Araq [+0 ±3 -0]: big rename: Promise -> FlowVar |
07:07:01 | NimBot | Araq/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:19 | def-_ | 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:21 | Araq | why do you pass fs: var seq[vector] via a 'var? |
10:01:35 | Araq | oh I see |
10:01:42 | Araq | if result.len == 0: |
10:01:44 | Araq | result = @[] |
10:01:45 | Araq | fs = fs2 |
10:01:56 | Araq | if result.len == 0 why do you allocate a new sequence? |
10:03:00 | def-_ | Oops, that allocation is unnecessary |
10:03:16 | Araq | usually one uses result = a-b; if result == 0: result = c-d in a 'cmp' |
10:04:08 | def-_ | Thanks, that's a lot nicer |
10:04:21 | Araq | also we should add a 'sort' that doesn't perform dynamic lookups |
10:05:42 | Araq | for x in [f[0], f[1], f[2]]: # could be slow, check the generated C/asm code |
10:06:31 | Araq | if newest == last: fs2.delete(i) # use 'del' if possible |
10:07:27 | def-_ | del is not possible, need to keep the list sorted |
10:07:48 | Araq | usually you don't |
10:07:51 | Araq | but 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:58 | reactormonk | how do I shift stuff a few bytes backwards in an array? |
10:43:21 | EXetoC | I replied with "slice assignment" before, and that seems relevant now too |
10:43:48 | EXetoC | I guess you need two operations though, if you also want to remove the elements that have been shifted |
10:45:54 | EXetoC | x[a .. b] = x[a + offset .. b + offset]; x.setLen... ? |
11:24:18 | EXetoC | '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:12 | EXetoC | flaviu1: 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:40 | lesshaste | hi |
13:15:45 | dom96 | hey lesshaste |
13:16:16 | lesshaste | I am trying to remember but did someone integrate lapack into nimrod recently? |
13:16:31 | lesshaste | or basically any library for efficient linear algebra |
13:16:46 | lesshaste | i remember some conversation about using c2nim :) |
13:17:52 | lesshaste | and more generally, what is the situation with scientific libraries and nimrod? |
13:19:49 | lesshaste | I only see libsvm on the website |
13:23:38 | reactormonk | EXetoC, does that work well on the same array? |
13:24:43 | dom96 | lesshaste: sorry, no idea |
13:25:20 | lesshaste | np |
13:30:19 | EXetoC | reactormonk: I think so |
13:30:41 | EXetoC | it just puts one chunk of data onto another |
13:33:04 | * | bjz joined #nimrod |
13:35:26 | EXetoC | reactormonk: 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:11 | reactormonk | EXetoC, let's see |
14:12:33 | reactormonk | EXetoC, 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:34 | EXetoC | it's in there. that code compiles for me |
14:13:49 | EXetoC | proc `[]=`*[Idx, T](a: var array[Idx, T], x: TSlice[int], b: openArray[T]) |
14:16:18 | reactormonk | well |
14:16:23 | reactormonk | lib/system/sysstr.nim(261, 7) Error: undeclared identifier: '[]=' |
14:17:54 | EXetoC | it's an order issue, because that module is included before the definition of that proc |
14:18:05 | reactormonk | yeah, figured :-/ |
14:20:41 | * | Jesin quit (Quit: Leaving) |
14:36:00 | * | BitPuffin joined #nimrod |
14:36:40 | reactormonk | any reason why buf[breaking+1] = '.' doesn't change the output of $buf ? |
14:37:04 | reactormonk | http://pastie.org/9264630 |
14:51:04 | EXetoC | reactormonk: passing '1' to it generates this: [49, 0, 46, 48, 0, 0, 0.... 1] |
14:51:25 | EXetoC | 46 being '.' |
14:52:19 | EXetoC | and echo stops at the first null value |
14:54:20 | EXetoC | breaking+0 and breaking+1 does the correct thing for 1.0 at least |
14:55:21 | EXetoC | and all the other values that I've tested with |
14:55:58 | EXetoC | 10000000000000000.0 generates 1.0e+16 |
14:59:38 | EXetoC | so, will this format be the default once this is sorted out? |
15:05:20 | EXetoC | buf 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:17 | reactormonk | EXetoC, uh-oh. off-by-one. |
15:15:55 | * | dymk quit (Ping timeout: 240 seconds) |
15:22:09 | * | dymk joined #nimrod |
15:22:12 | NimBot | Araq/Nimrod float_$ 6d3fbf9 flaviut [+0 ±1 -0]: Allow for nil chaining in JSON |
15:22:12 | NimBot | Araq/Nimrod float_$ 4ff5112 flaviut [+0 ±1 -0]: Add a couple words to docs |
15:22:12 | NimBot | Araq/Nimrod float_$ db7fee6 flaviut [+0 ±1 -0]: Add tests for the nil passthrough |
15:22:12 | NimBot | Araq/Nimrod float_$ 64d3b9a flaviut [+0 ±1 -0]: Fix subtle mistake in docs and formatting |
15:22:12 | NimBot | 165 more commits. |
15:22:26 | reactormonk | there 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:56 | flaviu1 | What do people think of scoped imports? |
16:08:38 | flaviu1 | ex: `import myfancydsl: veryAmbigiousIdentifeirFromMyFancyDSL` |
16:09:09 | reactormonk | flaviu1, overwriting imports? |
16:11:07 | * | dymk quit (Ping timeout: 240 seconds) |
16:12:12 | flaviu1 | No, 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:41 | flaviu1 | equivalent to `block: import myfancydsl; dostuff`, if it worked |
16:12:49 | reactormonk | uh-oh |
16:13:01 | reactormonk | why not force the DSL into its own file? |
16:13:14 | reactormonk | I don't think layered scope is possible with nimrod |
16:13:27 | reactormonk | layered imports that is. |
16:13:40 | * | dymk joined #nimrod |
16:13:45 | reactormonk | well, you can have procs in blocks IIRC, so it should be possible... but not sure about imports. |
16:13:57 | reactormonk | flaviu1, put it up as feature request. |
16:14:01 | flaviu1 | You can't have imports in blocks iirc |
16:14:03 | flaviu1 | Ok |
16:15:24 | reactormonk | Just 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:53 | flaviu1 | https://github.com/Araq/Nimrod/issues/1248 |
16:19:01 | flaviu1 | Should I lengthen it a bit more? |
16:20:16 | reactormonk | nah, I think it captures the gist of it |
16:20:44 | reactormonk | tagged it as Low Priority for now. |
16:21:41 | flaviu1 | Ok, looks good, thanks |
16:28:13 | * | kunev joined #nimrod |
16:29:08 | reactormonk | flaviu1, 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:21 | EXetoC | reactormonk: eeeexcellent! |
16:49:21 | * | kunev quit (Ping timeout: 252 seconds) |
16:49:29 | reactormonk | EXetoC, got any other values in mind that might break it? |
16:51:04 | EXetoC | I don't know |
16:51:27 | EXetoC | Araq: did you say that modifying $ for floats would break some things? |
16:52:20 | * | brson joined #nimrod |
16:52:28 | reactormonk | EXetoC, 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:31 | Araq | guys, 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:42 | flaviu1 | IEEE 754 is getting decimals |
17:58:01 | flaviu1 | Well, it got decimals |
17:58:23 | flaviu1 | But 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:21 | bstrie | Araq: 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:45 | flaviu1 | bstrie: I may be missing something, but just add the asterisk to the macro |
18:44:24 | bstrie | where is the section of the manual on public vs private symbols? |
18:45:16 | flaviu1 | http://build.nimrod-lang.org/docs/manual.html#modules |
18:45:29 | flaviu1 | Not much though, just "Only top-level symbols that are marked with an asterisk (*) are exported" |
18:45:35 | * | Johz joined #nimrod |
18:45:56 | bstrie | thanks |
18:47:05 | bstrie | I 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:19 | flaviu1 | Can dot operators be macros? |
19:19:35 | Araq | sure. 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:18 | flaviu1 | Nice, it works |
19:28:28 | * | dymk joined #nimrod |
19:28:55 | flaviu1 | Can we get operator operators? :P |
19:29:19 | Araq | let's ask Larry Wall about it |
19:30:39 | EXetoC | löl |
19:31:29 | flaviu1 | I have good reasons for it, but yeah it'll probably be used to make horrible DSLs |
19:32:28 | Araq | really? good reasons? I thought it's more important to care about average joe programmer, cause he will leave Java for Nimrod :P |
19:34:09 | Araq | please tell me anyway, what's your use case? |
19:34:31 | flaviu1 | I want to make option monads so that Some(3) + 4 = Some(7) |
19:34:47 | EXetoC | converter? |
19:34:50 | flaviu1 | But None + 4 = None |
19:35:02 | Araq | overload + then? |
19:35:16 | flaviu1 | But with Option being Option[T] |
19:35:24 | flaviu1 | not just Option[int] |
19:35:43 | Araq | proc `+`[T] (a: Option[T], b: T): Option[T] = ... |
19:36:30 | flaviu1 | Ok, what about the rest of the infinitely long list of possible operators? |
19:36:54 | Araq | template defineOp(opr) = |
19:37:03 | Araq | proc opr[T] (a: Option[T], b: T): Option[T] = ... |
19:37:15 | Araq | defineOp(`+`) |
19:37:17 | Araq | defineOp(`+`) |
19:37:19 | Araq | defineOp(`*`) |
19:37:31 | * | dymk quit (Ping timeout: 240 seconds) |
19:37:57 | Araq | you seem to want that for *every* operator though |
19:38:19 | Araq | which doesn't make sense, why would 'add' not be included in your list then? |
19:38:40 | Araq | so you want a general lifting mechanism |
19:38:48 | Araq | which is what converter can provide |
19:39:49 | flaviu1 | Is there any information on converters? |
19:40:12 | EXetoC | the manual |
19:40:26 | EXetoC | no wait |
19:40:30 | * | dymk joined #nimrod |
19:40:42 | EXetoC | yes but it doesn't even have its own section |
19:40:51 | EXetoC | http://build.nimrod-lang.org/docs/manual.html#convertible-relation |
19:41:11 | Araq | strange |
19:41:22 | Araq | I recall merging a patch that documents them |
19:41:27 | EXetoC | it doesn't say much, but it's pretty straightforward |
19:41:32 | EXetoC | oh |
19:43:37 | flaviu1 | I 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:50 | Araq | shouldn't the converter convert from T to Option[T] instead? |
19:45:05 | flaviu1 | You're right, I overlooked that |
19:45:22 | flaviu1 | Yeah, I had it turned around in my head |
19:46:05 | Araq | what's the obsession with Option though? we have exceptions done right (TM) |
19:46:12 | Araq | aka tracked exceptions |
19:46:28 | Araq | they are more convenient and often faster |
19:47:27 | Araq | they already give you the monad you're after |
19:47:33 | flaviu1 | Maybe 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:52 | flaviu1 | I know, but it also does some weird stuff like unrolling the stack |
19:47:59 | * | Jehan_ joined #nimrod |
19:48:10 | Araq | which is exactly what you're trying to emulate, flaviu1 |
19:49:04 | Jehan_ | 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:05 | Araq | Jehan_: 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:38 | Jehan_ | Haven't looked at it, but that's why it exists. |
19:51:08 | flaviu1 | Araq is right about what I'm attempting |
19:52:45 | Jehan_ | 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:18 | Araq | well ok, exceptions are more similar to Either than to Option |
19:53:25 | Araq | if 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:15 | Jehan_ | 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:21 | flaviu1 | I'm eventually going to do either for that reason, but I'm going to try to get something working with option first |
20:01:21 | flaviu1 | Is there some magic I need to do to get my converter working? |
20:01:23 | flaviu1 | err wait |
20:01:31 | * | Varriount quit (Excess Flood) |
20:02:02 | * | Varriount joined #nimrod |
20:02:14 | Jehan_ | 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:51 | flaviu1 | I doubt there's a way to get all the methods in scope |
20:07:15 | Jehan_ | flaviu1: That's not the issue that I'm talking about. |
20:07:42 | Jehan_ | The problem is that the dispatch code does a series of isObj() tests. |
20:08:04 | Jehan_ | Each of which is pretty expensive, and it also means dispatch is O(number of subtypes). |
20:08:08 | flaviu1 | I 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:21 | Jehan_ | Oh, sorry. |
20:09:07 | Araq | Jehan_: it's easy to make the codegen produce an optimized solution |
20:09:38 | Jehan_ | Araq: I figure a switch on the type number should work? |
20:11:03 | Araq | Jehan_: that works; my plan was to generate a polymorphic cache instead |
20:11:33 | Araq | which is then easily compatible with DLL support |
20:12:14 | Jehan_ | Caches are also trouble, since you need a per-thread instance, and TLS may be slow. |
20:12:27 | Jehan_ | But yeah, DLLs are an issue. |
20:12:59 | Jehan_ | I had thought about a cache as a quick and dirty solution, too, but worried about the TLS issues. |
20:13:45 | Araq | why is this a problem? make it global, not thread local and accept that hardware word stores are atomic |
20:14:08 | Jehan_ | Hmm. How do you resolve conflicts then? |
20:14:18 | Araq | I don't |
20:14:21 | Jehan_ | A cache entry would have more than one word in it. |
20:14:27 | Araq | ah no |
20:14:33 | Araq | it's a 1 entry cache |
20:14:45 | Araq | oh wait ... |
20:14:58 | Araq | you maybe you're right hmm |
20:15:12 | Jehan_ | Yeah, I considered several caching options. |
20:15:57 | Araq | well I did make some notes when I thought about it |
20:16:10 | Araq | I guess I won't find them again ... |
20:16:29 | Jehan_ | Let me think about it if it's possible. |
20:19:25 | Araq | well you have to compress the (key,val)-pair into a single word |
20:19:47 | Araq | this pretty much destroys the simplicity of it though |
20:24:28 | * | kunev quit (Quit: Lost terminal) |
20:26:54 | Jehan_ | Well, if it were single dispatch, that wouldn't be a big problem. |
20:27:14 | Jehan_ | The real problem is that with multiple dispatch, the keys can be arbitrarily large. |
20:28:57 | Araq | you can always only cache 1 dimension |
20:29:40 | Jehan_ | And just pay the price if you do use multiple dispatch? Well, it'd be better than nothing. Still ... |
20:29:51 | Jehan_ | Hmm, let me think about it. |
20:37:23 | Joe_knock | is dom96 here? |
20:37:46 | Jehan_ | 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:36 | flaviu1 | Joe_knock: No, but he'll be joining soon |
20:39:50 | flaviu1 | Oh, he is |
20:40:05 | flaviu1 | Jehan_: What are you trying to do? |
20:40:23 | Joe_knock | dom96_and |
20:41:10 | Jehan_ | flaviu1: Speeding up method dispatch. |
20:41:23 | Jehan_ | As in, making it faster than excruciatingly slow. |
20:41:25 | flaviu1 | Oh, I see the fourm post |
20:41:54 | Jehan_ | flaviu1: I had already known from experiments that method dispatch wasn't exactly fast. I hadn't realized how bad it was. |
20:41:58 | dom96_and | Whats up? |
20:43:20 | flaviu1 | Yeah, that's pretty embarrassing |
20:44:29 | Jehan_ | flaviu1: I think it's just because hardly anybody uses them, so there hasn't been any pressure to optimize it. |
20:44:40 | Araq | yup |
20:45:01 | flaviu1 | Yeah, I know, but it still doesn't reflect too well. |
20:45:05 | * | Jesin joined #nimrod |
20:45:29 | Jehan_ | Araq: I think I'll look at doing a thread-local cache. |
20:45:44 | Jehan_ | In the long term, there needs to be an alternative for faster TLS, anyway. |
20:46:01 | Jehan_ | Eh, architecture-independent fast TLS. |
20:46:13 | flaviu1 | A big hashtable that gets populated at thread start? |
20:46:31 | Araq | why? __thread is C++11 or something |
20:46:34 | Jehan_ | flaviu1: A flat cache is probably going to be good enough. |
20:46:39 | dom96_and | So, why was I asked to join? |
20:46:53 | Jehan_ | Araq: Yes, it's a standard, doesn't mean that the standard implementation is fast. |
20:47:12 | Jehan_ | On some architectures it's still simply a wrapper around pthread_getspecific(). |
20:47:24 | Jehan_ | Cygwin and OS X in particular, as I recall. |
20:50:47 | Araq | we can simply inline 'isObj', Jehan_ |
20:51:08 | Jehan_ | Araq: That's still a linear search. |
20:51:31 | Jehan_ | Try that with a couple dozen subtypes. :) |
20:52:12 | * | Matthias247 joined #nimrod |
20:53:05 | Araq | Jehan_: not really, you can cut off a good amount of the search list then iirc |
20:53:33 | Araq | you need to use more context to do that though |
20:53:56 | Jehan_ | Yeah. My initial thought was just to do a switch on a type id. |
20:54:12 | Jehan_ | But you're right, that creates problems with DLLs. |
20:57:03 | * | Changaco joined #nimrod |
20:57:22 | Araq | Jehan_: I don't consider it our business to provide architecture-independent fast TLS |
20:57:56 | Araq | if the architecture sucks then that's its problem, not ours |
20:58:08 | Jehan_ | Araq: Well, it honestly wouldn't be that difficult (at least as an option). |
20:58:15 | Araq | we already have enough platform specific hacks |
20:58:18 | Jehan_ | But I may have spoken too rashly. |
20:58:32 | Araq | and I know how to do it |
21:01:56 | Joe_knock | Have any of you built a rest-api with jester? |
21:02:30 | Araq | what's that? generating JSON with jester? surely we did that |
21:05:19 | Jehan_ | And no, I was correct, TLS is still slow on these platforms. |
21:06:47 | Araq | yes |
21:07:03 | Araq | punishing bad platforms is a good thing |
21:07:09 | Joe_knock | Araq: yes, kind of like exposing a data endpoint to be consumed by any service. |
21:07:39 | Jehan_ | Araq: Well, the problem is that Nimrod's performance will then be subpar on these platforms. |
21:07:56 | fowl | Joe_knock, im sure nimbuild or the forum does it |
21:09:46 | Jehan_ | Hmm, there's a useStackMaskHack already now that I'm looking at it. |
21:10:22 | Araq | well I told you I know how to do it :P |
21:10:40 | Joe_knock | fowl: possibly. It depends how sinatra-ish Jester is. |
21:11:25 | Araq | Jehan_: you need to wrap 'main' in another thread to gain control over its stack and that is a pretty bad thing |
21:11:55 | Jehan_ | Araq: There's a semi-portable way around that. |
21:12:19 | Jehan_ | And of course processor-specific ones. |
21:13:15 | Jehan_ | What you need to do is to adjust the stackpointer, which alloca() with the right parameter can do. |
21:13:46 | Jehan_ | There's some extra trickery required on Linux, which really, really doesn't like large stackframes. |
21:14:45 | Jehan_ | Meaning that you have to touch every page in order (or at least a sufficiently big subset of stack pages). |
21:14:51 | Jehan_ | Or you'll get a segmentation fault. |
21:15:14 | Jehan_ | A really big local array can also cause that. |
21:16:21 | Jehan_ | And of course, there's always the portable solution of passing the TLS pointer as an extra argument. |
21:16:37 | Jehan_ | Not too bad on processors with lots of registers, kinda horrible on an x86. :) |
21:24:45 | * | freezerburnv quit (Quit: freezerburnv) |
21:27:44 | Araq | Jehan_: you can also store the TLS pointer into where it should go for the main thread |
21:28:06 | Araq | you'll likely overwrite argc or some other irrelevant shit |
21:28:23 | Araq | or an environment var :-) |
21:30:10 | Araq | but you can store these somewhere before doing the overwrite. In fact, we already do such things. |
21:37:58 | Jehan_ | Ouch. :) |
21:38:19 | Araq | well I mean we store argc in a global |
21:38:31 | Araq | not that we already overwrite random memory locations |
21:38:53 | Jehan_ | 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:03 | Jehan_ | 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:41 | Araq | hi Vclone welcome |
22:22:52 | Araq | oh lol |
22:22:57 | Araq | it'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:56 | reactormonk | What's the difference between tracked exceptions and default exceptions? |
23:25:19 | Araq | what 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:33 | shevy | hehe |
23:42:46 | shevy | and what are unusual exceptions |