<<11-09-2012>>

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:21zaharybtw dom96, why isn't the manual part of the generated docs at nimbuild?
11:34:24*Araq_ joined #nimrod
11:35:04Araq_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:33Trixar_zaThat 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:46apriori_Araq: I had an idea
16:51:02apriori_what about anonymous tuples as function parameters....
16:51:28apriori_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:45reactormonklooks 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:51Araqdom96: I just found out that tests/compile/ results are not listed at all
18:59:56Araqsince months
19:00:04Araq:-/
19:00:14AraqI've fixed it in the tester
19:00:27Araqbut I'm afraid how much I broke in the meantime
19:00:35dom96:O
19:01:04Araqover 100 tests whose results have been missing for months
19:01:11Araqand nobody noticed
19:01:11reactormonkAraq: should the floatGuard raise by default?
19:01:40reactormonkI suppose subnormal == underflow?
19:01:57Araqreactormonk: no, introduce an ESubnormal exception
19:02:08Araqit's not an underflow
19:02:25Araqdunno what you mean "by default"
19:02:35Araqby default these checks are off
19:04:12reactormonkif you call FloatGuard, would you expect it to raise in case of a condition?
19:04:52Araqwhat's FloatGuard? a compilerproc? or an exported proc in system?
19:06:53reactormonkthat's the question
19:07:01reactormonkas a compilerproc, it should raise.
19:07:06Araqyep
19:07:08reactormonkas an exported proc, should it raise as well?
19:07:36Araqwell yeah
19:07:41reactormonkor add a floatCheck?
19:07:46Araqotherwise what's the point of calling it?
19:07:53reactormonkyou get a return value
19:08:33Araqwhat?
19:13:09reactormonkone of the FP_*
19:14:04reactormonkyou call proc floatCheck(x): FP_* where FP_* is an enum of FP_NAN, FP_INFINITE, ...
19:17:04Araqthat's C's fpclassify
19:17:19reactormonkyep. do we need that in nimrod?
19:17:26Araqyeah
19:17:28reactormonkand is there a naming convention raise vs. return value?
19:17:56Araqwell classify shouldn't raise obviously
19:18:11Araqdon't name it "floatCheck"
19:18:31Araqand FloatGuard() should return void
19:18:38Araqso it's obvious it raises
19:18:46reactormonkrails uses "!" vs. "" - which is against ruby conventions
19:19:02Araqand no, there is no convention
19:19:10Araqthere will be annotations for that though
19:19:27reactormonkbasically, should I care?
19:19:43reactormonkreturn value overload? ^^
19:19:59reactormonkoverload void vs. something?
19:23:47Araqwell ... I'd like you to implement: https://github.com/Araq/Nimrod/issues/189
19:24:07reactormonkah
19:25:09reactormonkwe don't have return type overload, right?
19:25:20reactormonkeven a weak one void vs. something
19:25:43Araqwhich requires at least a new compilerproc subnormalCheck() but you could also merge nanCheck, infCheck and subnormalCheck to some new floatCheck
19:25:54reactormonksure, that I'll do
19:25:58reactormonkI'm at the API level atm
19:26:03Araqalright
19:26:12Araqand yeah we still lack return type overloading
19:26:28Araqbut I don't care :P
19:26:41reactormonkI do, as you see
19:27:15reactormonkjust push the result to the type information :-)
19:27:24reactormonkand have fun with the resulting confusion...
19:27:42reactormonkso floatGuard and floatCheck ?
19:28:27Araqproc floatGuard*(x: float)
19:28:42Araqproc floatCheck(x: float, flags) {.compilerproc.}
19:29:01Araqproc fpclassify*(x: float): enumtype
19:29:19reactormonkoke
19:32:43reactormonkhow do I convert http://sprunge.us/EHZa
19:33:26reactormonkor, how the heck do I deal with that
19:33:47reactormonkoh, wait, I got it
19:35:27reactormonkAraq: should subnormal be a warning or an error?
19:35:36reactormonkdo we have warnings btw?
19:35:58Araqerror, we have no runtime warnings
19:36:15Araqthough we'll soon have a condition system
19:36:16Araq:D
19:36:17reactormonkwell, those are easy with conditions
19:37:00AraqraiseHook + closures -> Nimrod's condition system
19:38:01reactormonkhow do I interface with C enums btw?
19:38:26reactormonkcan I just assume numerical equivalence?
19:38:55Araqsometimes that works
19:39:13Araqfor the gist you gave, it should work
19:39:27Araqwhere do you got that from btw?
19:39:55reactormonkcopy/paste from math.h
19:40:05reactormonk proc fpclassify*(x: float64): FPStatus {.emit: "fpclassify"}
19:40:08reactormonkwith FPStatus = enum NaN, Infinite, Zero, Subnormal, Normal
19:41:07Araqomg, don't use 'emit' here
19:41:29reactormonkbut?
19:41:32Araqin fact, learn to ask c2nim :P
19:41:40reactormonkimportc?
19:41:45Araqyeah
19:41:49reactormonk proc fpclassify*(x: float64): FPStatus {.importc: "fpclassify"}
19:42:07reactormonkmath.h is really messy...
19:42:12Araqimportc: "fpclassify", header: "<math.h>".}
19:42:39reactormonk# define fpclassify(x) \
19:42:41reactormonk:-P
19:42:52reactormonksure that works with importc?
19:43:16Araqyes
19:43:18reactormonkand it works both with floats and doubles
19:43:36reactormonkso proc fpclassify*(x: float): FPStatus {.importc: "fpclassify"}
19:43:38reactormonkshould work
19:45:27Araqimportc: "fpclassify", header: "<math.h>".}
19:45:38reactormonkis it evil to change error classes?
19:45:57Araqlike?
19:46:03reactormonk EFloatOverflow* {.compilerproc.} =
19:46:11reactormonkto EFloatInfinitive
19:46:26reactormonkto the fpclassify names
19:46:34Araqdon't do that
19:46:39reactormonkEFloatNaN EFloatSubnormal usw.
19:46:48Araqbreaks code
19:46:54reactormonkthought so
19:47:05Araqintroduce:
19:47:20Araq EFloat = object
19:47:38Araq reason: FPStatus
19:48:49reactormonkand how do I pass that reason to newException?
19:49:16Araqyou don't, you really need more than 1 line of code sometimes
19:49:25reactormonkoke
19:51:00*ccssnet joined #nimrod
19:51:04reactormonkNo proc for set intersection?
19:51:21Araquse * for set intersection
19:51:30reactormonkwhere is that documented?
19:51:43Araqin the manual I think
19:52:11reactormonkindeed
19:53:54reactormonkhow do I get the first element of a set?
19:54:54reactormonknothing on set
19:55:09Araqyou can't
19:55:18reactormonkhum
19:56:08Araqif you need it for simple flags, you're doing it wrong :P
19:56:30reactormonk http://sprunge.us/DcTb sure?
19:57:07Araq if checks == {}: return
19:57:18Araqbut you should *know* it's not empty
19:57:29Araqas the compiler should not invoke the compilerproc then
19:57:54Araq if checks * status != {}:
19:58:25Araq if checkNan in checks: ...
19:58:30AraqI see ;-)
19:58:40Araqit would be useful here
19:59:00reactormonkI can just use status
19:59:09reactormonk http://sprunge.us/fEDP
21:06:58*q66 quit (Quit: Quit)
21:25:18reactormonkAraq: I still fail to use new.
21:25:46reactormonkoh, no need
21:26:41reactormonk 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