<< 12-06-2013 >>

00:34:41*ARCADIVS joined #nimrod
00:58:06*DAddYE quit (Remote host closed the connection)
02:19:44*q66 quit (Remote host closed the connection)
02:22:25*DAddYE joined #nimrod
02:23:54*DAddYE_ joined #nimrod
02:23:54*DAddYE quit (Read error: Connection reset by peer)
03:26:10*DAddYE_ quit (Remote host closed the connection)
03:39:25*DAddYE joined #nimrod
03:56:23*OrionPK quit (Quit: Leaving)
04:07:48*DAddYE quit (Remote host closed the connection)
04:08:19*DAddYE joined #nimrod
04:10:09*fowl joined #nimrod
04:12:49*DAddYE quit (Ping timeout: 248 seconds)
05:08:49*DAddYE joined #nimrod
05:15:09*DAddYE quit (Ping timeout: 252 seconds)
05:36:17*DAddYE joined #nimrod
06:24:12*DAddYE quit (Remote host closed the connection)
06:30:29*gsp joined #nimrod
06:56:20*tangentstorm quit (Ping timeout: 256 seconds)
07:05:11*tangentstorm joined #nimrod
08:17:58*Araq_ joined #nimrod
08:28:07*zahary_ quit (Ping timeout: 260 seconds)
08:36:11*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
09:25:28NimBotAraq/Nimrod master 39a6253 Grzegorz Adam Hankiewicz [+0 ±2 -0]: Adds skMethod example to idetools api test.
09:25:28NimBotAraq/Nimrod master 7dbb187 Grzegorz Adam Hankiewicz [+4 ±1 -4]: Renames test cases to be more human friendly.
09:25:28NimBotAraq/Nimrod master 4bee6d3 Grzegorz Adam Hankiewicz [+2 ±1 -0]: Adds idetools testcase for dynamic dispatch. Refs #477.
09:25:28NimBotAraq/Nimrod master 1955e1b Grzegorz Adam Hankiewicz [+0 ±9 -0]: Adds $TESTNIM and $MODULE as variables to test cases.
09:25:28NimBot4 more commits.
09:30:16*ARCADIVS quit (Quit: WeeChat 0.3.8)
10:25:46*q66 joined #nimrod
10:35:42*Araq_ joined #nimrod
10:44:31*ElectronicRU joined #nimrod
10:57:04Araq_hi ElectronicRU, welcome
11:10:13ElectronicRUAraq_: hi!
11:11:03ElectronicRUI am currently reading docs and it semms very interesting. Yet I cannot fully understands how generics behave.
11:11:26ElectronicRU*understand
11:12:20ElectronicRUIf type A is implicitly convertible into type B, how are (for some abstract generic T) T[A] and T[B] relate?
11:12:27ElectronicRU*related
11:16:27Araq_in general there is no relation between T[A] and T[B] then
11:16:33Araq_they're still incompatible
11:16:35Araq_bbl
11:18:42*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
11:21:10ElectronicRUwwell
11:21:28ElectronicRUthen what's diffrence between T[A] and T[of A]?
11:57:05*JStoker_ joined #nimrod
11:59:28*JStoker quit (Read error: Connection reset by peer)
11:59:28*JStoker_ is now known as JStoker
13:44:55*draginx joined #nimrod
14:16:03*XAMPP_ quit (Read error: Connection reset by peer)
14:44:02*draginx quit (Quit: draginx)
15:14:51*draginx joined #nimrod
15:22:03*draginx is now known as durango
15:27:22*tetsu joined #nimrod
15:28:11*zahary_ joined #nimrod
15:40:16durangois there a way to allow multiple variable types in a function's argument?
15:40:54durangolooking at the docs it says proc (name: string) proc (name: int) is not the same (despite them having the same name) which is an awesome feature (im not quoting the docs btw just the gists of it)
15:41:10durangobut the problem with this is.. this goes against a lot of DRY principles
15:42:04durangoso for instance, let's say I want to check if the first argument can be an int or an "array" based off of that my function will change only *slightly* (SELECT * FROM table WHERE id=.. VS ..WHERE id IN ().. etc)
15:42:11durangoIm sure u can do this, I was just curious
15:42:12dom96hello ElectronicRU and durango
15:42:18durangohey dom96 :)
15:42:22durangosee you a lot on the forums
15:42:34dom96ElectronicRU: I don't think T[of A] is valid syntax?
15:42:34durangoi havent started coding in nimrod yet, but it's peaked my interest
15:42:40durangoespecially as a valid alternative to go
15:43:00dom96It's interesting to see new people almost daily now, I wonder how are you guys finding out about Nimrod?
15:43:47durangoi knew about it from hacker news a LONG time ago, ive just been watching the project on github
15:43:54durangoand noticed A LOT of activity >..
15:44:06durangoso im thinking "Well this isnt a dead project after all let's take a better look" :P
15:44:11dom96durango: perhaps this is what you want: proc (name: string | int)
15:44:16durangooh wow
15:44:23durangoso it can do that, and is there a "typeof" equivalent?
15:44:32reactormonkdurango, what does typeof do exactly?
15:44:48durangoAnd I think it was you that submitted this issue, but there was one about integrating async into nimrod.. I know theres an async for sockets but I was wondering for other things exactly
15:45:08durangoreactormonk: sorry, I meant to type more after that :P uhm, basically in JavaScript typeof <variable> will tell you the variable's type
15:45:12durangoif its an integer, object, etc.
15:45:19durangostring, function, etc. :)
15:45:19zahary_durango, what you are talking about is a generic function (function accepting multiple compatible types)
15:45:35durangoah ok so it's definitely possible :) very cool thanks
15:45:38reactormonkdurango, yeah, static typing doesn't really have a typeof, you could do it
15:45:57reactormonkzahary_, I suppose you can query the type of a variable at compiletime?
15:46:03reactormonkwith a template/macro
15:46:24zahary_what do you want to query about the type?
15:46:54dom96durango: http://build.nimrod-code.org/docs/manual.html#type-operator :P
15:47:20durangodom96: veerrrryy nice thanks :)
15:47:35reactormonkzahary_, availability of procs?
15:48:24dom96durango: As for async, currently asyncio only supports sockets, I should have more time soon to continue my work on implementing C#'s await-like functionality and of course adding async support for other things like file reading.
15:48:47zahary_reactormonk, availability of procs can be checked using the "compiles" magic
15:48:58zahary_when compiles(x.foo): ...
15:49:02durangoah very cool :) yeah im just coming from a NodeJS background, and having NodeJS operate on V8 has always kind of bugged me so im shopping around for languages :D
15:49:05reactormonkzahary_, sweet
15:49:12reactormonkdurango, nimrod compiles to JS
15:49:20reactormonkbut I assume you know that
15:49:23durangoi thought it compiled to C?
15:49:29reactormonkyou can have both
15:49:41reactormonknimrod c and nimrod js
15:49:43dom96It can compile to JS, C, C++, ObjC and soon lua as well.
15:50:03durangoahhh yeah yeah but it doesnt use a JS engine to run :P its just aconversion
15:50:20reactormonkdurango, yes, it does
15:50:31durangouses v8?
15:50:39reactormonkmore or less
15:50:44durangooh wow ur right
15:50:48durango(I mena obviously u r)
15:51:07durangothats pretty interesting O_o
15:51:07dom96it can run in any JS engine, not just V8
15:51:14dom96It was designed for the browser.
15:51:17dom96Not for node.js
15:51:46reactormonkI recommend not using abbreviations for 'you' or 'are' on freenode - people tend to look down on you. Just saying, no offense.
15:51:53dom96We were planning to get the tester to run some tests through node.js to verify that the JS backend works though.
15:52:52reactormonkdurango, in any case, nimrod -r js test.nim runs the resulting code on node
15:53:04reactormonkand the JS output is in nimcache/test.js
15:53:48reactormonkoh wait, you have to tell it about node...
15:53:56dom96-d:nodejs iirc
15:53:59dom96:P
15:54:04reactormonkyup
15:54:07reactormonkwasn't -d:node
15:55:14reactormonkdurango, http://sprunge.us/UJYF little demonstration
15:57:55durangovery cool! :)
15:58:10durangoVery interesting about the ObjC
15:58:21durangoare there any iOS frameworks like ProMotion for RubyMotion?
15:58:41reactormonkdurango, we're not big enough
15:58:47durangoI see
16:01:00reactormonkdurango, any editor preference?
16:01:12durangoreactormonk: sublime but im trying to migrate to vim
16:01:21reactormonkdurango, why? I think sublime is fune
16:01:22durangoverrrrryyy slowly, i basically need to remap all the keys to what I want essentially :P
16:01:37reactormonkI'd recommend emacs in that case >;)
16:01:51durangoreactormonk: granted subl has vim like capibilities, I still think vim can make u a "faster" programmer
16:02:04durangomay be im just not wielding sublime correctly either though
16:02:10reactormonkdurango, I used vim, now I'm at emacs
16:02:10durangowhat about u? Im presuming subl?
16:02:16durangooh, why the switch?
16:02:19reactormonkorg-mode
16:02:25reactormonkand elisp > vimscript
16:02:44dom96I tried learning vim once, used it for 2 months, still irritated me after those 2 months so I wrote my own editor :P
16:03:22durangolol dom :P I saw your editor, it looks decent but yeah im trying to get away from GUIs as much as possible
16:03:30dom96why?
16:03:32durangoare u guys happy with the speeds and memory performances from nimrod?
16:03:50dom96I know I am.
16:03:54reactormonkdurango, it's slow, then you use -d:release, then it's fast.
16:04:02durangodom96: because i want to live in some region with crappy internet service, live cheap, live well, and still be able to hack away at code if i need to across seas on a remote server :P
16:04:07dom96it's faster than Python even with no -d:release :P
16:04:15durangolol id hope so! :P
16:06:38reactormonkdurango, btw, there's c2nim for header files
16:06:41reactormonkor even source.
16:06:46dom96Soon we will see how my web framework compares to others, including Go's. Thanks to that web frameworks benchmark thingy.
16:07:55durango:P
16:22:36tetsuHi. Is there a way to use format like "%02d" in strutils.`%` ?
16:23:32dom96no. All arguments to `%` must be of type 'string'
16:28:21tetsuThank you for answering. I want to do like '%d:%02d' % (hour, minute) in python. Could you tell me how to do that in nimrod's way ?
16:29:54*DAddYE joined #nimrod
16:30:12dom96hrm, what does the '02' actually mean?
16:32:20*amarsahinovic joined #nimrod
16:33:48dom96for times you would usually use the times module's format proc.
16:35:47dom96if you have to integers you want to format using`%` then this should suffice: "$1:$2" % [$hour, $minute]
16:36:29tetsuI want to calculate system's uptime from /proc/uptime, and format it like 'hh:mm' in times.`format`.
16:39:40*DAddYE_ joined #nimrod
16:39:40*DAddYE quit (Read error: Connection reset by peer)
16:40:26tetsuyeah, I do like "$#:$#" % [$hour, $minute] now, but I'm happier if I can prepend zero when the minutes is one digit :P
16:40:54dom96then write a proc that does it :P
16:42:01tetsuOK. Thanks!
16:45:10tetsudom96, by the way, I found nimrod at https://github.com/languages last week.
16:45:28dom96cool
17:17:24Araqthere is a proc which prepends zeros but I forgot the name ... strutils.intToStr?
17:23:01AraqElectronicRU: if you speak of co/contravariance, Nimrod doesn't have it and won't get it anytime soon, it cannot work with value types anyway
17:29:43*Trix[a]r_za is now known as Trixar_za
17:34:54tetsuAraq: Oh, I missed it. strutils.intToStr prepends zero. Thank you very much!
17:45:18ElectronicRUAraq: ah, sorry, must've confused it with something else
17:46:33ElectronicRUwhat exactly do you mean by value types? it's a vague term
17:46:51ElectronicRUcopy on assign?
17:47:49Araqcopy on assign, no boxing
17:48:28reactormonkhow does that interfere with covariance?
17:49:12Araqyou can't store A into array[B] if A's size is bigger than B's
17:49:33Araq*greater
17:49:43reactormonkyou can't have covariance with mutable collections anyway
17:50:17AraqI know but immutability doesn't help when the underlying sizes don't fit
17:52:46reactormonkso you have type tags instead of classes O.o
17:53:13Araqer ... what?
17:53:40reactormonkoh well, so you have two orthogonal things that define a type - the hierarchy and the size?
17:54:04ElectronicRUreactormonk: why can't you have covariance with mutable collections?
17:54:11*tangentstorm left #nimrod ("WeeChat 0.3.2")
17:54:24ElectronicRUreactormonk: I think the thing about size is more about integer types and such
17:55:20reactormonkElectronicRU, http://twitter.github.io/effectivescala/#Types and Generics-Variance
17:55:31Araqno it's about nimrod's objects too, you can extend an object with additional fields and then it uses more storage
17:56:27Araqit's not an issue in C#/Java because all they have is pointers to objects and pointers are always the same size (ignoring some weird archs)
18:04:45ElectronicRUreactormonk: makes sense, didn't think of explicit cast
18:07:43*Endeg quit (Ping timeout: 260 seconds)
18:41:34*tetsu quit (Quit: Page closed)
19:48:19*Trixar_za is now known as Trix[a]r_za
20:02:00*zahary joined #nimrod
20:06:46*zahary quit (Ping timeout: 276 seconds)
20:07:22reactormonkAraq, what about function convariance?
20:21:14*gradha joined #nimrod
20:23:37gradhaAraq: since you remember implementing idetools --context could you explain its purpose and use case?
20:23:54reactormonkgradha, I suppose locals and so on
20:24:22gradhaso it helps you find restaurants, interesting
20:29:37*XAMPP joined #nimrod
20:50:54*gradha quit (Quit: bbl, have youtube videos to watch)
20:54:25ElectronicRUmanual says "in fact n[].data is highly discouraged!", why?
20:54:51Araqgradha: it's supposed to output the headers when you type '(': myproc( # lists parameters of all myprocs
20:55:09reactormonkAraq, isn't that somewhere in --suggest ?
20:56:08AraqElectronicRU: because it's ugly and unhelpful for refactoring when you transform a 'ref T' to 'T'
20:57:04Araqreactormonk: --suggest is for '.' --context is for '(' iirc
21:02:31reactormonkAraq, can't you join them?
21:08:18AraqI can't even get --suggest to work reliably :P
21:08:23reactormonkhmm
21:08:27reactormonkwhere does it fail?
21:08:30Araq(ok, ok, I'm not working on it either)
21:08:40reactormonkisn't that more zahary's stuff?
21:53:00*gsp quit (Quit: Leaving.)
22:22:32*OrionPK joined #nimrod
23:02:03*durango quit (Quit: durango)
23:18:12*durango joined #nimrod
23:41:48NimBotAraq/Nimrod master 7371d25 Araq [+0 ±9 -0]: improvements for 'not nil' checking
23:41:48NimBotAraq/Nimrod master 7221550 Araq [+6 ±9 -4]: Merge branch 'master' of github.com:Araq/Nimrod