<<05-09-2012>>

04:10:01*XAMPP quit (Ping timeout: 246 seconds)
06:09:42*XAMPP joined #nimrod
06:09:42*XAMPP quit (Changing host)
06:09:42*XAMPP joined #nimrod
06:41:11*Boscop quit (Disconnected by services)
06:41:13*Boscop joined #nimrod
07:07:44*Boscop is now known as Boscop_
07:35:47*zahary joined #nimrod
07:40:05*Araq_ joined #nimrod
07:41:25*Boscop joined #nimrod
07:47:30*Araq_ quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347])
07:55:56*zahary quit (Quit: Leaving.)
08:12:24*zahary joined #nimrod
08:41:20*zahary1 joined #nimrod
08:41:58*zahary quit (Ping timeout: 240 seconds)
09:20:45*zahary1 quit (Quit: Leaving.)
09:50:40*Araq_ joined #nimrod
09:50:58*Araq_ quit (Client Quit)
10:46:24*Araq_ joined #nimrod
10:46:55*Araq_ quit (Client Quit)
10:58:04*Boscop_ quit (Ping timeout: 244 seconds)
11:10:43*Trix[a]r_za is now known as Trixar_za
11:23:33*zahary joined #nimrod
11:51:06*Boscop quit (Disconnected by services)
11:51:07*Boscop joined #nimrod
12:31:07*Araq_ joined #nimrod
12:42:06*XAMPP quit (Ping timeout: 264 seconds)
12:53:03*Boscop quit (Disconnected by services)
12:53:05*Boscop joined #nimrod
12:54:08*Boscop quit (Disconnected by services)
12:54:12*Boscop joined #nimrod
13:00:40*Araq_ quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347])
13:07:55*Boscop quit (Ping timeout: 246 seconds)
13:11:49*XAMPP joined #nimrod
13:14:31*q66 joined #nimrod
13:38:16*Trixar_za is now known as Trix[a]r_za
13:54:24*Boscop joined #nimrod
14:31:56*Boscop quit (Disconnected by services)
14:31:58*Boscop joined #nimrod
15:32:20*Boscop quit (Disconnected by services)
15:32:29*Boscop joined #nimrod
16:52:32*shevy quit (Ping timeout: 244 seconds)
17:05:32*shevy joined #nimrod
17:27:13Araqping q66
17:27:53q66pong Araq
17:28:11Araqcan you help this guy: http://forum.nimrod-code.org/t/69 ?
17:28:44q66Araq, i'll try when i'll have time to get to my vm
17:28:45dom96whoa, I just noticed I missed like 4 forum threads.
17:29:26Araqbecause nimbot doesn't notify you :P
17:29:51reactormonkthere's a forum? ... >:)
17:29:54reactormonkdoes it have rss?
17:31:01dom96not yet :P
17:31:45Araqreactormonk: yep and it's written in Nimrod ;-)
17:32:17reactormonkAraq: thought so
17:32:57reactormonkI suppose nimrod has an XML builder?
17:33:12Araqsey
17:33:17Araq*yes
17:33:22Araq(strange typo ...)
17:33:28Araqq66: thanks
17:37:37*Boscop quit (Disconnected by services)
17:37:39*Boscop joined #nimrod
17:43:17*Boscop quit (Ping timeout: 248 seconds)
17:49:44*Boscop joined #nimrod
17:56:27shevyit's a good typo
17:56:32shevy'y' is close to 's'
17:56:40shevyI once typoed "YOU SHOULD ALL DIE!!!"
17:56:44shevythat was harder to explain...
17:56:54shevy... but my cat is creative
18:10:54reactormonkAraq: how the heck do you test a random number generator...
18:11:51reactormonkAraq: btw, what about .importnative. instead of .importc. ?
18:13:01Araqwhy importnative? you mean because it's been reused for the JS backend? :-)
18:13:15Araqthere is also importcpp btw
18:13:28reactormonkindeed ^^
18:13:32reactormonkwhat's the difference?
18:14:48reactormonkbtw, is there a converter from TSlice to int,int ?
18:14:51reactormonkis that even possible
18:15:25AraqI think I disallowed generic converters for now :P
18:15:37reactormonkwhy so?
18:15:56Araqnever tested if they would work ;-)
18:16:14Araqgeneric methods are also missing for now
18:16:39Araqbut hey, templates and macros can now be generic, so there's hope ... ;-)
18:19:27reactormonkdoes return type overloading work?
18:19:34Araqnope
18:20:09Araqvar x: int = parse(...) # oh why?
18:20:25Araqvar x = parse(int, ...) # can easily be made to work :P
18:22:13Araqthere is also marshal.to[int]("123")
18:59:19reactormonkexcept var int ?
19:05:26reactormonkAraq: http://sprunge.us/EeCV
19:05:43reactormonkbut how do I test that?
19:06:11reactormonkoh, a " missing
19:06:17Araqyeah ...
19:06:34Araqwell *compiling* it as a first test would be nice :P
19:08:06reactormonk:D
19:12:15Araqand there are ways to test random number generators
19:12:42Araqfor a start you could call it 100x and check you got 50 different results or something
19:13:07reactormonkthere's drand48 which returns a double - what's a float in nimrod again?
19:13:30Araqa double
19:14:02Araqwell actually it's platform defined
19:14:25Araquse float32 or float64
19:14:46Araqthough I don't think there is a platform where I map 'float' to 'float32' ...
19:15:12Araqbut I heard GPUs love float32 ...
19:20:00reactormonklooks like I need two calls to rand() if I want a 64bit float
19:20:05reactormonkor a double, taht is
19:21:39reactormonkcan I mash two cints into a nimrod float?
19:22:38Araqyeah with 'cast' magic
19:22:44Araqsomehow
19:23:40reactormonkuh-oh
19:26:04*Boscop quit (Disconnected by services)
19:26:06*Boscop joined #nimrod
19:26:23reactormonkmeans you don't know how?
19:27:52Araqmeans I'm too lazy to think for you
19:28:22Araqvar x: array[0..1, cint]
19:28:24reactormonkcasting is easy, joining isn't - my solution would be to cast the int to a string
19:28:29reactormonkoh, right
19:28:34Araqx[0] = random()
19:28:38Araqx[1] = random()
19:28:57Araqresult = cast[ptr float64](addr(x))[]
19:30:54reactormonkand how do I distinct between a random that returns a 32 and a 64 float?
19:32:48reactormonkand welcome to NaN... :-/
19:35:45Araqoh yeah, lol
19:35:50Araqforgot about Nan
19:36:52reactormonk proc randomfloat(): float32 =
19:36:55reactormonk result = cast[float32](rand())/cast[float32]RAND_MAX
19:38:05Araqreactormonk: don't just hack around, ask the internet about random float
19:38:15reactormonkhttp://stackoverflow.com/questions/686353/c-random-float
19:42:27*Boscop quit (Disconnected by services)
19:42:29*Boscop joined #nimrod
19:42:50reactormonka) implement using rand() and some mashup b) grab a lib
19:43:18reactormonkAraq: I suppose you favor a)
19:43:57*Boscop quit (Disconnected by services)
19:43:59*Boscop joined #nimrod
19:44:18Araqtrue
19:46:40*Boscop quit (Disconnected by services)
19:46:41*Boscop joined #nimrod
19:47:53reactormonk proc random(max: float): float32 =
19:47:56reactormonk result = cast[float32]random(max)
19:48:00reactormonkmight have the same problem with NaN
19:48:10Araqdon't 'cast'
19:48:15Araquse toFloat()
19:48:28reactormonkoh, ups
19:48:38reactormonkand the code sucks anyway, but I assume you get that part...
19:50:33*Boscop quit (Disconnected by services)
19:50:36*Boscop joined #nimrod
19:50:55*Boscop quit (Client Quit)
19:51:15*Boscop joined #nimrod
19:51:20*Boscop quit (Remote host closed the connection)
19:52:32*Boscop joined #nimrod
20:25:29*XAMPP quit (Ping timeout: 246 seconds)
20:51:48fowltrying to move some of my code out of the main file
20:51:51fowlfailing -__
20:51:52fowl-
20:52:10fowli think i'll just use include instead of import
20:52:28reactormonkfowl: nope, fail.
20:57:26reactormonklet's see, http://stackoverflow.com/questions/12289646/how-do-i-create-a-random-double-with-rand
20:59:03Araqfowl: in languages that punish recursive deps like nimrod (and delphi, haskell, ...) it often leads to moving the types into its own module
21:04:31reactormonkMacro: int RAND_MAX
21:04:33reactormonkThe value of this macro is an integer constant representing the largest value the rand function can return. In the GNU library, it is 2147483647, which is the largest signed integer representable in 32 bits. In other libraries, it may be as low as 32767.
21:04:40reactormonkwhat to do about that?
21:04:53fowlreactormonk: high(int32)
21:09:06reactormonkfowl: doesn't need to correspond to that
21:11:29fowlo
21:12:05reactormonkAraq: http://stackoverflow.com/questions/12289646/how-do-i-create-a-random-double-with-rand/12289830 enough consulting? ;-)
21:16:32fowlim only able to move certain functions and the type defs out of the main file
21:16:58fowlbecause i have too many globals and constants :(
21:20:29*XAMPP joined #nimrod
21:25:51reactormonkAraq: hmm, erand48 requires the caller to provide an array of three unsigned shorts - how should I handle them?
21:30:50Araqdunno ... I'm too tired to think
21:39:27reactormonka) per thread. do we have thread-local storage?
21:39:52reactormonkb) globally. it's just about 6 bytes
21:40:01reactormonkc) globally, but lazy
21:40:29reactormonkb and c might lead to less-random sequences and the good old global variable shit
21:44:39Araqvar x {.threadvar.}: array[0..2, uint16]
21:44:48reactormonknice
21:46:31reactormonknice
21:46:35reactormonkerr
21:51:14reactormonkor not. http://sprunge.us/PjIj
21:53:05reactormonkhow do I use this threadvar?
21:54:49reactormonk http://sprunge.us/NdUV now that's better
22:24:42Araqgood night
22:38:41*Boscop quit (Ping timeout: 246 seconds)
23:08:31*q66 quit (Quit: Quit)