<<30-05-2012>>

22:41:47*NimBot joined #nimrod
22:41:57dom96!ping
22:41:57NimBotpong
22:42:08dom96Alright, everything works now :)
22:44:10filwitAraq: I kinda agree with you that 'else' should be indented after 'case' statements
22:44:32Araqgood
22:44:38Araq!lag
22:44:38NimBot51ms between me and the server.
22:54:43filwitso a variant object is like a union with runtime checks?
22:57:16Araqyes
22:57:31Araqor like a 'sum' type if you're into FP
22:58:17Araqin fact FP languages tend to "prove" the correct usage but this doesn't work well with nimrod's mutability of objects
22:58:21filwitare these runtime checks removed with release builds btw?
22:58:29Araqyes
22:58:33filwitgreat
22:58:40Araqno ... ;-)
22:58:51filwitdamn... ;0
22:59:02Araqbut good enough for now
22:59:35Araqfilwit: you will always be able to turn them off don't worry
23:00:00Araqbut I'd prefer more efficient checks instead of none
23:00:54Araqit depends on your use case, but I feel a bit uneasy to deploy server software without all these safety checks
23:01:12filwitwell I'd love effecient checks as well. But I like the idea of checks-at-debug, fast-as-possible at release
23:01:22Araqsure
23:01:55filwitso I'm totally find if the checks are there with -d:release, as long as I can pass another flag that turns them off
23:02:26AraqI'll see how clang's hot/cold code distinction helps
23:02:29filwitbut all that's not so pressing right now
23:02:33Araqfor the runtime checks
23:03:02Araqin general it's hard because we don't control the backend
23:03:45Araqotherwise we could easily keep the overhead of these checks to a minimum
23:05:07filwitI see, well you know a whole lot more about that stuff than I do, so I'm sure you'll make the right choices :)
23:12:46Araqin fact, the situation is already very good as you can turn the checks on and off for specific sections of code :-)
23:13:07Araqso turn them on, profile and turn off for the bottlenecks :D
23:13:09filwit{.push checks.} you mean?
23:13:14Araqyes
23:13:30filwitya I liked that {.push.} when I saw it
23:14:18filwitis there a syntax to pass procs around cleanly?
23:14:20filwitmeaning:
23:14:40filwitproc foo(callback:proc()):
23:14:44filwit callback()
23:14:48filwitthen...
23:15:02filwitfoo((){
23:15:06Araqfoo(proc () = echo "hi")
23:15:07filwit doSomethign()
23:15:10filwit})
23:15:31filwitright, great
23:15:34filwitlet me try
23:17:27filwitthat's awesome, and very clean
23:17:45Araqthanks
23:17:49filwitare proc var's subject to inlining at all?
23:17:56filwiti'm asuming no
23:18:00filwitassuming*
23:18:00Araqnot yet
23:18:07filwitso it's possible?
23:18:09Araqbut it's simple to implement
23:18:18filwitnice
23:19:00filwitI was telling you before about my jQuery-style game engine idea, being able to supply functions to procedures like this may be a key component
23:19:20filwitalso, I noticed that there's JSON style syntax somewhere...
23:19:25filwitwhich is another
23:19:35Araqthere is a json module yes
23:19:40Araqheavily used in fact
23:20:09filwiti mean the: var data = {"name":"Philip", "age":24} thing
23:20:32filwitthat's also very good for MongoDB support I'm sure
23:20:46Araqit's just sugar for an array of tuples
23:21:13Araq[("name", "Philip"), ("age", "24")]
23:21:21filwityes, but the syntax is clean enough to use for things like MongoDB in the same way you use it with Javascript
23:21:29Araqnote the need for consistent types
23:21:31Araqhowever
23:21:39Araqyou can pass it to a macro :-)
23:21:43filwitah, I see
23:22:03filwityes, macros make that very useful
23:23:07Araqyou can also do:
23:23:24Araqtemplate `<=` (a, b: expr): expr = (a, b)
23:23:24filwitdamn, man. Isn't it like 1:30 over there?
23:23:45Araq["key" <= "value", "key2" <= "value3"]
23:23:48Araqetc.
23:23:52Araqugh
23:23:55Araqyou're right
23:24:25filwitya, I always end up staying up to late and paying for it in the morning :)
23:24:56Araqyeah good night
23:25:01filwitnight