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:28 | NimBot | Araq/Nimrod master 39a6253 Grzegorz Adam Hankiewicz [+0 ±2 -0]: Adds skMethod example to idetools api test. |
09:25:28 | NimBot | Araq/Nimrod master 7dbb187 Grzegorz Adam Hankiewicz [+4 ±1 -4]: Renames test cases to be more human friendly. |
09:25:28 | NimBot | Araq/Nimrod master 4bee6d3 Grzegorz Adam Hankiewicz [+2 ±1 -0]: Adds idetools testcase for dynamic dispatch. Refs #477. |
09:25:28 | NimBot | Araq/Nimrod master 1955e1b Grzegorz Adam Hankiewicz [+0 ±9 -0]: Adds $TESTNIM and $MODULE as variables to test cases. |
09:25:28 | NimBot | 4 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:04 | Araq_ | hi ElectronicRU, welcome |
11:10:13 | ElectronicRU | Araq_: hi! |
11:11:03 | ElectronicRU | I am currently reading docs and it semms very interesting. Yet I cannot fully understands how generics behave. |
11:11:26 | ElectronicRU | *understand |
11:12:20 | ElectronicRU | If type A is implicitly convertible into type B, how are (for some abstract generic T) T[A] and T[B] relate? |
11:12:27 | ElectronicRU | *related |
11:16:27 | Araq_ | in general there is no relation between T[A] and T[B] then |
11:16:33 | Araq_ | they're still incompatible |
11:16:35 | Araq_ | bbl |
11:18:42 | * | Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]) |
11:21:10 | ElectronicRU | wwell |
11:21:28 | ElectronicRU | then 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:16 | durango | is there a way to allow multiple variable types in a function's argument? |
15:40:54 | durango | looking 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:10 | durango | but the problem with this is.. this goes against a lot of DRY principles |
15:42:04 | durango | so 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:11 | durango | Im sure u can do this, I was just curious |
15:42:12 | dom96 | hello ElectronicRU and durango |
15:42:18 | durango | hey dom96 :) |
15:42:22 | durango | see you a lot on the forums |
15:42:34 | dom96 | ElectronicRU: I don't think T[of A] is valid syntax? |
15:42:34 | durango | i havent started coding in nimrod yet, but it's peaked my interest |
15:42:40 | durango | especially as a valid alternative to go |
15:43:00 | dom96 | It's interesting to see new people almost daily now, I wonder how are you guys finding out about Nimrod? |
15:43:47 | durango | i knew about it from hacker news a LONG time ago, ive just been watching the project on github |
15:43:54 | durango | and noticed A LOT of activity >.. |
15:44:06 | durango | so im thinking "Well this isnt a dead project after all let's take a better look" :P |
15:44:11 | dom96 | durango: perhaps this is what you want: proc (name: string | int) |
15:44:16 | durango | oh wow |
15:44:23 | durango | so it can do that, and is there a "typeof" equivalent? |
15:44:32 | reactormonk | durango, what does typeof do exactly? |
15:44:48 | durango | And 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:08 | durango | reactormonk: sorry, I meant to type more after that :P uhm, basically in JavaScript typeof <variable> will tell you the variable's type |
15:45:12 | durango | if its an integer, object, etc. |
15:45:19 | durango | string, function, etc. :) |
15:45:19 | zahary_ | durango, what you are talking about is a generic function (function accepting multiple compatible types) |
15:45:35 | durango | ah ok so it's definitely possible :) very cool thanks |
15:45:38 | reactormonk | durango, yeah, static typing doesn't really have a typeof, you could do it |
15:45:57 | reactormonk | zahary_, I suppose you can query the type of a variable at compiletime? |
15:46:03 | reactormonk | with a template/macro |
15:46:24 | zahary_ | what do you want to query about the type? |
15:46:54 | dom96 | durango: http://build.nimrod-code.org/docs/manual.html#type-operator :P |
15:47:20 | durango | dom96: veerrrryy nice thanks :) |
15:47:35 | reactormonk | zahary_, availability of procs? |
15:48:24 | dom96 | durango: 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:47 | zahary_ | reactormonk, availability of procs can be checked using the "compiles" magic |
15:48:58 | zahary_ | when compiles(x.foo): ... |
15:49:02 | durango | ah 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:05 | reactormonk | zahary_, sweet |
15:49:12 | reactormonk | durango, nimrod compiles to JS |
15:49:20 | reactormonk | but I assume you know that |
15:49:23 | durango | i thought it compiled to C? |
15:49:29 | reactormonk | you can have both |
15:49:41 | reactormonk | nimrod c and nimrod js |
15:49:43 | dom96 | It can compile to JS, C, C++, ObjC and soon lua as well. |
15:50:03 | durango | ahhh yeah yeah but it doesnt use a JS engine to run :P its just aconversion |
15:50:20 | reactormonk | durango, yes, it does |
15:50:31 | durango | uses v8? |
15:50:39 | reactormonk | more or less |
15:50:44 | durango | oh wow ur right |
15:50:48 | durango | (I mena obviously u r) |
15:51:07 | durango | thats pretty interesting O_o |
15:51:07 | dom96 | it can run in any JS engine, not just V8 |
15:51:14 | dom96 | It was designed for the browser. |
15:51:17 | dom96 | Not for node.js |
15:51:46 | reactormonk | I recommend not using abbreviations for 'you' or 'are' on freenode - people tend to look down on you. Just saying, no offense. |
15:51:53 | dom96 | We were planning to get the tester to run some tests through node.js to verify that the JS backend works though. |
15:52:52 | reactormonk | durango, in any case, nimrod -r js test.nim runs the resulting code on node |
15:53:04 | reactormonk | and the JS output is in nimcache/test.js |
15:53:48 | reactormonk | oh wait, you have to tell it about node... |
15:53:56 | dom96 | -d:nodejs iirc |
15:53:59 | dom96 | :P |
15:54:04 | reactormonk | yup |
15:54:07 | reactormonk | wasn't -d:node |
15:55:14 | reactormonk | durango, http://sprunge.us/UJYF little demonstration |
15:57:55 | durango | very cool! :) |
15:58:10 | durango | Very interesting about the ObjC |
15:58:21 | durango | are there any iOS frameworks like ProMotion for RubyMotion? |
15:58:41 | reactormonk | durango, we're not big enough |
15:58:47 | durango | I see |
16:01:00 | reactormonk | durango, any editor preference? |
16:01:12 | durango | reactormonk: sublime but im trying to migrate to vim |
16:01:21 | reactormonk | durango, why? I think sublime is fune |
16:01:22 | durango | verrrrryyy slowly, i basically need to remap all the keys to what I want essentially :P |
16:01:37 | reactormonk | I'd recommend emacs in that case >;) |
16:01:51 | durango | reactormonk: granted subl has vim like capibilities, I still think vim can make u a "faster" programmer |
16:02:04 | durango | may be im just not wielding sublime correctly either though |
16:02:10 | reactormonk | durango, I used vim, now I'm at emacs |
16:02:10 | durango | what about u? Im presuming subl? |
16:02:16 | durango | oh, why the switch? |
16:02:19 | reactormonk | org-mode |
16:02:25 | reactormonk | and elisp > vimscript |
16:02:44 | dom96 | I 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:22 | durango | lol dom :P I saw your editor, it looks decent but yeah im trying to get away from GUIs as much as possible |
16:03:30 | dom96 | why? |
16:03:32 | durango | are u guys happy with the speeds and memory performances from nimrod? |
16:03:50 | dom96 | I know I am. |
16:03:54 | reactormonk | durango, it's slow, then you use -d:release, then it's fast. |
16:04:02 | durango | dom96: 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:07 | dom96 | it's faster than Python even with no -d:release :P |
16:04:15 | durango | lol id hope so! :P |
16:06:38 | reactormonk | durango, btw, there's c2nim for header files |
16:06:41 | reactormonk | or even source. |
16:06:46 | dom96 | Soon we will see how my web framework compares to others, including Go's. Thanks to that web frameworks benchmark thingy. |
16:07:55 | durango | :P |
16:22:36 | tetsu | Hi. Is there a way to use format like "%02d" in strutils.`%` ? |
16:23:32 | dom96 | no. All arguments to `%` must be of type 'string' |
16:28:21 | tetsu | Thank 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:12 | dom96 | hrm, what does the '02' actually mean? |
16:32:20 | * | amarsahinovic joined #nimrod |
16:33:48 | dom96 | for times you would usually use the times module's format proc. |
16:35:47 | dom96 | if you have to integers you want to format using`%` then this should suffice: "$1:$2" % [$hour, $minute] |
16:36:29 | tetsu | I 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:26 | tetsu | yeah, I do like "$#:$#" % [$hour, $minute] now, but I'm happier if I can prepend zero when the minutes is one digit :P |
16:40:54 | dom96 | then write a proc that does it :P |
16:42:01 | tetsu | OK. Thanks! |
16:45:10 | tetsu | dom96, by the way, I found nimrod at https://github.com/languages last week. |
16:45:28 | dom96 | cool |
17:17:24 | Araq | there is a proc which prepends zeros but I forgot the name ... strutils.intToStr? |
17:23:01 | Araq | ElectronicRU: 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:54 | tetsu | Araq: Oh, I missed it. strutils.intToStr prepends zero. Thank you very much! |
17:45:18 | ElectronicRU | Araq: ah, sorry, must've confused it with something else |
17:46:33 | ElectronicRU | what exactly do you mean by value types? it's a vague term |
17:46:51 | ElectronicRU | copy on assign? |
17:47:49 | Araq | copy on assign, no boxing |
17:48:28 | reactormonk | how does that interfere with covariance? |
17:49:12 | Araq | you can't store A into array[B] if A's size is bigger than B's |
17:49:33 | Araq | *greater |
17:49:43 | reactormonk | you can't have covariance with mutable collections anyway |
17:50:17 | Araq | I know but immutability doesn't help when the underlying sizes don't fit |
17:52:46 | reactormonk | so you have type tags instead of classes O.o |
17:53:13 | Araq | er ... what? |
17:53:40 | reactormonk | oh well, so you have two orthogonal things that define a type - the hierarchy and the size? |
17:54:04 | ElectronicRU | reactormonk: why can't you have covariance with mutable collections? |
17:54:11 | * | tangentstorm left #nimrod ("WeeChat 0.3.2") |
17:54:24 | ElectronicRU | reactormonk: I think the thing about size is more about integer types and such |
17:55:20 | reactormonk | ElectronicRU, http://twitter.github.io/effectivescala/#Types and Generics-Variance |
17:55:31 | Araq | no it's about nimrod's objects too, you can extend an object with additional fields and then it uses more storage |
17:56:27 | Araq | it'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:45 | ElectronicRU | reactormonk: 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:22 | reactormonk | Araq, what about function convariance? |
20:21:14 | * | gradha joined #nimrod |
20:23:37 | gradha | Araq: since you remember implementing idetools --context could you explain its purpose and use case? |
20:23:54 | reactormonk | gradha, I suppose locals and so on |
20:24:22 | gradha | so 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:25 | ElectronicRU | manual says "in fact n[].data is highly discouraged!", why? |
20:54:51 | Araq | gradha: it's supposed to output the headers when you type '(': myproc( # lists parameters of all myprocs |
20:55:09 | reactormonk | Araq, isn't that somewhere in --suggest ? |
20:56:08 | Araq | ElectronicRU: because it's ugly and unhelpful for refactoring when you transform a 'ref T' to 'T' |
20:57:04 | Araq | reactormonk: --suggest is for '.' --context is for '(' iirc |
21:02:31 | reactormonk | Araq, can't you join them? |
21:08:18 | Araq | I can't even get --suggest to work reliably :P |
21:08:23 | reactormonk | hmm |
21:08:27 | reactormonk | where does it fail? |
21:08:30 | Araq | (ok, ok, I'm not working on it either) |
21:08:40 | reactormonk | isn'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:48 | NimBot | Araq/Nimrod master 7371d25 Araq [+0 ±9 -0]: improvements for 'not nil' checking |
23:41:48 | NimBot | Araq/Nimrod master 7221550 Araq [+6 ±9 -4]: Merge branch 'master' of github.com:Araq/Nimrod |