00:17:57 | * | Trixar_za is now known as Trix[a]r_za |
03:56:10 | * | XAMPP_ joined #nimrod |
03:58:10 | * | XAMPP_ quit (Read error: Connection reset by peer) |
03:59:03 | * | XAMPP quit (Ping timeout: 276 seconds) |
07:01:36 | * | Araq_ joined #nimrod |
07:02:11 | * | Araq_ quit (Client Quit) |
08:25:14 | * | zahary joined #nimrod |
10:04:21 | zahary | btw dom96, why isn't the manual part of the generated docs at nimbuild? |
11:34:24 | * | Araq_ joined #nimrod |
11:35:04 | Araq_ | zahary: nimbuild's entry point is stupid, but http://build.nimrod-code.org/docs/manual.html exists |
11:44:40 | * | q66 joined #nimrod |
12:56:00 | * | Araq_ quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]) |
15:03:07 | * | Trix[a]r_za is now known as Trixar_za |
15:04:33 | Trixar_za | That reminds me. Is it possible to build html documentation from the modules and txt files in /doc like on dom96's site? |
15:25:43 | * | adrianV joined #nimrod |
15:55:14 | * | adrianV quit (Quit: Konversation terminated!) |
15:57:07 | * | Trixar_za is now known as Trix[a]r_za |
15:57:10 | * | adrianV joined #nimrod |
15:59:12 | * | adrianV quit (Client Quit) |
16:23:09 | * | shevy quit (Ping timeout: 260 seconds) |
16:36:09 | * | shevy joined #nimrod |
16:50:37 | * | apriori_ joined #nimrod |
16:50:46 | apriori_ | Araq: I had an idea |
16:51:02 | apriori_ | what about anonymous tuples as function parameters.... |
16:51:28 | apriori_ | the compiler could allow others with matching type signature to be converted into that "anonymous" representation silently |
17:42:38 | * | apriori_ quit (Quit: Konversation terminated!) |
17:57:45 | reactormonk | looks like hashes in less-typed languages |
18:47:39 | * | zahary1 joined #nimrod |
18:48:10 | * | zahary quit (Read error: No route to host) |
18:57:34 | * | Reisen quit (*.net *.split) |
18:57:34 | * | mal`` quit (*.net *.split) |
18:57:34 | * | ccssnet quit (*.net *.split) |
18:58:45 | * | Reisen joined #nimrod |
18:58:46 | * | mal`` joined #nimrod |
18:58:46 | * | ccssnet joined #nimrod |
18:58:49 | * | mal`` quit (Ping timeout: 244 seconds) |
18:59:26 | * | ccssnet quit (Max SendQ exceeded) |
18:59:41 | * | mal`` joined #nimrod |
18:59:51 | Araq | dom96: I just found out that tests/compile/ results are not listed at all |
18:59:56 | Araq | since months |
19:00:04 | Araq | :-/ |
19:00:14 | Araq | I've fixed it in the tester |
19:00:27 | Araq | but I'm afraid how much I broke in the meantime |
19:00:35 | dom96 | :O |
19:01:04 | Araq | over 100 tests whose results have been missing for months |
19:01:11 | Araq | and nobody noticed |
19:01:11 | reactormonk | Araq: should the floatGuard raise by default? |
19:01:40 | reactormonk | I suppose subnormal == underflow? |
19:01:57 | Araq | reactormonk: no, introduce an ESubnormal exception |
19:02:08 | Araq | it's not an underflow |
19:02:25 | Araq | dunno what you mean "by default" |
19:02:35 | Araq | by default these checks are off |
19:04:12 | reactormonk | if you call FloatGuard, would you expect it to raise in case of a condition? |
19:04:52 | Araq | what's FloatGuard? a compilerproc? or an exported proc in system? |
19:06:53 | reactormonk | that's the question |
19:07:01 | reactormonk | as a compilerproc, it should raise. |
19:07:06 | Araq | yep |
19:07:08 | reactormonk | as an exported proc, should it raise as well? |
19:07:36 | Araq | well yeah |
19:07:41 | reactormonk | or add a floatCheck? |
19:07:46 | Araq | otherwise what's the point of calling it? |
19:07:53 | reactormonk | you get a return value |
19:08:33 | Araq | what? |
19:13:09 | reactormonk | one of the FP_* |
19:14:04 | reactormonk | you call proc floatCheck(x): FP_* where FP_* is an enum of FP_NAN, FP_INFINITE, ... |
19:17:04 | Araq | that's C's fpclassify |
19:17:19 | reactormonk | yep. do we need that in nimrod? |
19:17:26 | Araq | yeah |
19:17:28 | reactormonk | and is there a naming convention raise vs. return value? |
19:17:56 | Araq | well classify shouldn't raise obviously |
19:18:11 | Araq | don't name it "floatCheck" |
19:18:31 | Araq | and FloatGuard() should return void |
19:18:38 | Araq | so it's obvious it raises |
19:18:46 | reactormonk | rails uses "!" vs. "" - which is against ruby conventions |
19:19:02 | Araq | and no, there is no convention |
19:19:10 | Araq | there will be annotations for that though |
19:19:27 | reactormonk | basically, should I care? |
19:19:43 | reactormonk | return value overload? ^^ |
19:19:59 | reactormonk | overload void vs. something? |
19:23:47 | Araq | well ... I'd like you to implement: https://github.com/Araq/Nimrod/issues/189 |
19:24:07 | reactormonk | ah |
19:25:09 | reactormonk | we don't have return type overload, right? |
19:25:20 | reactormonk | even a weak one void vs. something |
19:25:43 | Araq | which requires at least a new compilerproc subnormalCheck() but you could also merge nanCheck, infCheck and subnormalCheck to some new floatCheck |
19:25:54 | reactormonk | sure, that I'll do |
19:25:58 | reactormonk | I'm at the API level atm |
19:26:03 | Araq | alright |
19:26:12 | Araq | and yeah we still lack return type overloading |
19:26:28 | Araq | but I don't care :P |
19:26:41 | reactormonk | I do, as you see |
19:27:15 | reactormonk | just push the result to the type information :-) |
19:27:24 | reactormonk | and have fun with the resulting confusion... |
19:27:42 | reactormonk | so floatGuard and floatCheck ? |
19:28:27 | Araq | proc floatGuard*(x: float) |
19:28:42 | Araq | proc floatCheck(x: float, flags) {.compilerproc.} |
19:29:01 | Araq | proc fpclassify*(x: float): enumtype |
19:29:19 | reactormonk | oke |
19:32:43 | reactormonk | how do I convert http://sprunge.us/EHZa |
19:33:26 | reactormonk | or, how the heck do I deal with that |
19:33:47 | reactormonk | oh, wait, I got it |
19:35:27 | reactormonk | Araq: should subnormal be a warning or an error? |
19:35:36 | reactormonk | do we have warnings btw? |
19:35:58 | Araq | error, we have no runtime warnings |
19:36:15 | Araq | though we'll soon have a condition system |
19:36:16 | Araq | :D |
19:36:17 | reactormonk | well, those are easy with conditions |
19:37:00 | Araq | raiseHook + closures -> Nimrod's condition system |
19:38:01 | reactormonk | how do I interface with C enums btw? |
19:38:26 | reactormonk | can I just assume numerical equivalence? |
19:38:55 | Araq | sometimes that works |
19:39:13 | Araq | for the gist you gave, it should work |
19:39:27 | Araq | where do you got that from btw? |
19:39:55 | reactormonk | copy/paste from math.h |
19:40:05 | reactormonk | proc fpclassify*(x: float64): FPStatus {.emit: "fpclassify"} |
19:40:08 | reactormonk | with FPStatus = enum NaN, Infinite, Zero, Subnormal, Normal |
19:41:07 | Araq | omg, don't use 'emit' here |
19:41:29 | reactormonk | but? |
19:41:32 | Araq | in fact, learn to ask c2nim :P |
19:41:40 | reactormonk | importc? |
19:41:45 | Araq | yeah |
19:41:49 | reactormonk | proc fpclassify*(x: float64): FPStatus {.importc: "fpclassify"} |
19:42:07 | reactormonk | math.h is really messy... |
19:42:12 | Araq | importc: "fpclassify", header: "<math.h>".} |
19:42:39 | reactormonk | # define fpclassify(x) \ |
19:42:41 | reactormonk | :-P |
19:42:52 | reactormonk | sure that works with importc? |
19:43:16 | Araq | yes |
19:43:18 | reactormonk | and it works both with floats and doubles |
19:43:36 | reactormonk | so proc fpclassify*(x: float): FPStatus {.importc: "fpclassify"} |
19:43:38 | reactormonk | should work |
19:45:27 | Araq | importc: "fpclassify", header: "<math.h>".} |
19:45:38 | reactormonk | is it evil to change error classes? |
19:45:57 | Araq | like? |
19:46:03 | reactormonk | EFloatOverflow* {.compilerproc.} = |
19:46:11 | reactormonk | to EFloatInfinitive |
19:46:26 | reactormonk | to the fpclassify names |
19:46:34 | Araq | don't do that |
19:46:39 | reactormonk | EFloatNaN EFloatSubnormal usw. |
19:46:48 | Araq | breaks code |
19:46:54 | reactormonk | thought so |
19:47:05 | Araq | introduce: |
19:47:20 | Araq | EFloat = object |
19:47:38 | Araq | reason: FPStatus |
19:48:49 | reactormonk | and how do I pass that reason to newException? |
19:49:16 | Araq | you don't, you really need more than 1 line of code sometimes |
19:49:25 | reactormonk | oke |
19:51:00 | * | ccssnet joined #nimrod |
19:51:04 | reactormonk | No proc for set intersection? |
19:51:21 | Araq | use * for set intersection |
19:51:30 | reactormonk | where is that documented? |
19:51:43 | Araq | in the manual I think |
19:52:11 | reactormonk | indeed |
19:53:54 | reactormonk | how do I get the first element of a set? |
19:54:54 | reactormonk | nothing on set |
19:55:09 | Araq | you can't |
19:55:18 | reactormonk | hum |
19:56:08 | Araq | if you need it for simple flags, you're doing it wrong :P |
19:56:30 | reactormonk | http://sprunge.us/DcTb sure? |
19:57:07 | Araq | if checks == {}: return |
19:57:18 | Araq | but you should *know* it's not empty |
19:57:29 | Araq | as the compiler should not invoke the compilerproc then |
19:57:54 | Araq | if checks * status != {}: |
19:58:25 | Araq | if checkNan in checks: ... |
19:58:30 | Araq | I see ;-) |
19:58:40 | Araq | it would be useful here |
19:59:00 | reactormonk | I can just use status |
19:59:09 | reactormonk | http://sprunge.us/fEDP |
21:06:58 | * | q66 quit (Quit: Quit) |
21:25:18 | reactormonk | Araq: I still fail to use new. |
21:25:46 | reactormonk | oh, no need |
21:26:41 | reactormonk | http://sprunge.us/QbSh gives me lib/system/arithm.nim(354, 11) Error: only objects can be raised |
23:41:21 | * | XAMPP joined #nimrod |
23:41:22 | * | XAMPP quit (Changing host) |
23:41:22 | * | XAMPP joined #nimrod |