00:04:33 | * | brson quit (Ping timeout: 240 seconds) |
00:05:31 | * | q66 quit (Quit: Leaving) |
00:14:10 | * | xenagi joined #nimrod |
00:15:23 | * | Jehan_ quit (Quit: Leaving) |
00:19:15 | reactormonk | imo you should add the object/functional syntax equivalence somewhere with the object programming. |
00:19:50 | flaviu | Actually, I think I'll mention that in procedures, since it applies there too. |
00:20:18 | flaviu | I had forgotten about it, thanks for the reminder |
00:30:38 | flaviu | reactormonk: I talked about it in procs, and also mentioned in OOP |
00:44:37 | * | flaviu quit (Remote host closed the connection) |
00:52:09 | * | kshlm quit (Remote host closed the connection) |
00:52:51 | * | kshlm joined #nimrod |
01:17:54 | * | goobles joined #nimrod |
01:27:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:35:48 | * | OrionPK quit (Ping timeout: 260 seconds) |
01:43:23 | * | Boscop quit (Read error: Connection reset by peer) |
01:43:24 | * | bjz joined #nimrod |
01:49:44 | * | OrionPK joined #nimrod |
02:03:16 | * | bjz quit (Read error: Connection reset by peer) |
02:40:26 | * | brson joined #nimrod |
02:40:41 | * | saml_ joined #nimrod |
02:45:38 | * | brson quit (Ping timeout: 240 seconds) |
02:46:45 | * | brson joined #nimrod |
02:55:30 | * | xtagon joined #nimrod |
03:03:05 | * | OrionPK quit (Remote host closed the connection) |
03:03:19 | * | OrionPK joined #nimrod |
03:07:20 | * | kshlm quit (Ping timeout: 250 seconds) |
03:09:35 | * | EXetoC quit (Quit: WeeChat 0.4.3) |
03:12:52 | * | Boscop joined #nimrod |
03:18:34 | * | kshlm joined #nimrod |
03:22:27 | * | kshlm quit (Client Quit) |
03:32:02 | * | brson quit (Quit: leaving) |
03:42:50 | * | pown5 joined #nimrod |
03:43:51 | pown5 | Araq, sorry i just missed your msg yesterday. You said don't use cast. Was it in regards to: |
03:43:52 | pown5 | let num_items = cast[cint](info.channels * info.frames) |
03:44:04 | pown5 | How would I do a type conversion? |
03:52:33 | * | Francisco quit (Ping timeout: 240 seconds) |
03:54:16 | * | kemet joined #nimrod |
03:57:18 | * | askatasuna quit (Quit: WeeChat 0.4.3) |
04:04:46 | * | Francisco joined #nimrod |
04:09:18 | * | pown5 quit (Ping timeout: 240 seconds) |
04:13:38 | * | goobles quit (Quit: Page closed) |
04:14:59 | * | saml_ quit (Ping timeout: 264 seconds) |
04:22:31 | * | kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com) |
04:39:52 | * | xenagi quit (Quit: Leaving) |
05:03:04 | * | bjz joined #nimrod |
05:47:03 | * | xtagon quit (Read error: Connection reset by peer) |
06:12:33 | * | kshlm joined #nimrod |
06:15:03 | * | BitPuffin quit (Ping timeout: 240 seconds) |
06:28:59 | * | noam_ joined #nimrod |
06:30:25 | * | vendethiel- joined #nimrod |
06:31:34 | * | clone1018_ joined #nimrod |
06:34:03 | * | Demos__ quit (Ping timeout: 240 seconds) |
06:34:04 | * | noam quit (Ping timeout: 240 seconds) |
06:34:08 | * | vendethiel quit (Ping timeout: 240 seconds) |
06:34:09 | * | rektide quit (Ping timeout: 240 seconds) |
06:34:09 | * | eigenlicht_ quit (Ping timeout: 240 seconds) |
06:34:12 | * | clone1018 quit (Ping timeout: 240 seconds) |
06:34:14 | * | rektide_ joined #nimrod |
06:37:29 | * | eigenlicht_ joined #nimrod |
06:58:44 | * | io2 joined #nimrod |
07:02:48 | * | dymk joined #nimrod |
07:05:54 | * | dymk left #nimrod (#nimrod) |
07:08:04 | * | kunev joined #nimrod |
07:19:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:05:39 | * | kemet joined #nimrod |
08:08:04 | * | kemet quit (Client Quit) |
08:08:33 | * | q66 joined #nimrod |
08:09:21 | * | adoniscik joined #nimrod |
08:22:11 | * | Francisco quit (Ping timeout: 264 seconds) |
08:31:57 | adoniscik | after importing, how do you call a module under a directory in your path, say foo/module.nim where foo is in the path? |
08:32:28 | Araq | import module # if foo is in the path |
08:32:37 | Araq | import foo.module # otherwise |
08:32:55 | Araq | module.bar # access a symbol from 'module' explicitly |
08:33:13 | Araq | there is no foo.module.bar notation |
08:33:18 | adoniscik | very good, it worked. Now I'm trying anon functions. I get an error "macro expects a node of kind: nnkIdent" |
08:33:50 | Araq | do you mean the new -> and => macros? |
08:33:55 | adoniscik | yes, future |
08:33:59 | adoniscik | do they work? |
08:34:07 | Araq | kind of |
08:34:20 | Araq | as good as everything that I didn't review myself :P |
08:38:23 | * | adoniscik left #nimrod ("Leaving") |
08:38:29 | * | adoniscik joined #nimrod |
09:05:18 | * | adoniscik quit (Ping timeout: 240 seconds) |
09:41:22 | * | Trustable joined #nimrod |
10:07:37 | * | Fr4n joined #nimrod |
10:18:30 | * | BitPuffin joined #nimrod |
11:22:11 | * | ARCADIVS joined #nimrod |
11:45:05 | * | xenagi joined #nimrod |
12:30:16 | * | xenagi quit (Read error: Connection reset by peer) |
12:31:32 | * | darkfusi1n quit (Ping timeout: 240 seconds) |
12:31:39 | * | untitaker quit (Ping timeout: 256 seconds) |
12:38:35 | * | untitaker joined #nimrod |
12:46:29 | * | flaviu joined #nimrod |
12:46:33 | * | BlameStross quit (Ping timeout: 240 seconds) |
12:48:04 | * | BlameStross joined #nimrod |
13:00:13 | * | Matthias247 joined #nimrod |
13:10:29 | * | kemet joined #nimrod |
13:15:08 | * | kemet quit (Read error: Connection reset by peer) |
13:15:22 | * | kemet joined #nimrod |
13:16:08 | * | darkfusion joined #nimrod |
13:42:02 | * | darkf quit (Quit: Leaving) |
13:57:02 | OrionPK | compile time ffi would be sweet huh |
13:57:54 | Araq | for what? |
13:59:07 | * | OrionPK quit (Remote host closed the connection) |
13:59:24 | * | OrionPK joined #nimrod |
13:59:30 | OrionPK | for one thing |
13:59:46 | OrionPK | adding a switch to the nimrod compiler to only evaluate compile time |
13:59:57 | OrionPK | and not produce any c files or binary |
14:00:03 | OrionPK | would make nake cooler |
14:00:10 | Araq | ah well |
14:00:15 | Araq | we'll get that |
14:00:35 | Araq | the VM will support os.nim and math.nim |
14:00:50 | Araq | and then we can run nake completely in the VM |
14:01:07 | OrionPK | ahh cool |
14:01:11 | * | kshlm quit (Ping timeout: 256 seconds) |
14:12:03 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:19:23 | * | bjz joined #nimrod |
14:22:32 | * | Matthias247 joined #nimrod |
14:29:35 | * | kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com) |
14:29:46 | * | kshlm joined #nimrod |
14:31:16 | * | OrionPK quit (*.net *.split) |
14:38:23 | * | Jesin quit (Ping timeout: 264 seconds) |
14:44:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:56:38 | * | q66 quit (Ping timeout: 240 seconds) |
15:02:38 | * | flaviu quit (*.net *.split) |
15:02:38 | * | ARCADIVS quit (*.net *.split) |
15:02:38 | * | rektide_ quit (*.net *.split) |
15:02:41 | * | kunev quit (*.net *.split) |
15:03:48 | * | rektide joined #nimrod |
15:05:25 | * | kunev joined #nimrod |
15:06:50 | * | ARCADIVS joined #nimrod |
15:07:42 | * | flaviu joined #nimrod |
15:07:46 | flaviu | http://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/ |
15:07:57 | flaviu | Upvote if you have a reddit account |
15:08:52 | def- | flaviu: What about HN?! |
15:09:05 | flaviu | I'm banned from there for some reason |
15:09:21 | flaviu | I literally have no idea why, feel free to post it though |
15:24:17 | def- | https://news.ycombinator.com/item?id=8048014 |
15:24:34 | * | icebattle quit (Quit: leaving) |
15:31:13 | * | Jesin joined #nimrod |
15:43:41 | * | q66 joined #nimrod |
15:45:07 | flaviu | I thought that there was a random function, seems not |
15:45:27 | * | Demos joined #nimrod |
15:49:39 | def- | flaviu: it's in the math module? |
15:49:55 | flaviu | I just found out, thanks for rosetta code btw |
15:53:21 | def- | flaviu: i think you should call randomize() at the start |
15:53:28 | def- | flaviu: otherwise i get the same "random" number everytime |
15:53:38 | def- | i mean, in the same order, the same numbers |
15:54:12 | flaviu | Still crappy randomness, but I'll add that |
15:57:21 | * | darkfusion quit (Ping timeout: 256 seconds) |
15:58:40 | * | kunev quit (Quit: е те) |
16:01:18 | * | superfunc quit (Read error: Connection reset by peer) |
16:01:30 | * | superfunc joined #nimrod |
16:07:53 | flaviu | Couldn't rust-style memory management be implemented as a program? Not really familiar with region pointers |
16:09:32 | * | darkfusion joined #nimrod |
16:21:40 | * | adoniscik joined #nimrod |
16:34:08 | * | askatasuna joined #nimrod |
16:37:51 | * | leru joined #nimrod |
16:48:54 | * | bjz joined #nimrod |
16:52:23 | Araq | flaviu: you need some inference rules in addition to regionized pointers |
16:53:42 | Araq | but this "Rust's type system is superior to Nimrod's" is already getting old |
16:54:12 | Araq | by the same reasoning Idris' type system is superior to Rust's and so is ATS's |
16:54:24 | flaviu | Well, the guy did have a point when he said that nimrod encourages automatic memory management |
16:54:38 | bjz | Araq: would definitely agree with the last statement |
16:55:18 | bjz | Araq: but they are good at different things |
16:55:48 | bjz | Araq: Idris doesn't have regions or linear types, but it has lots of other things Rust doesn't have |
16:56:25 | Araq | bjz: I think you can implement regions and linear types with dependent types |
16:56:34 | Araq | but I could be wrong |
16:56:38 | bjz | possibly - I don't know |
16:56:45 | bjz | you could be right |
16:57:07 | Matthias247 | flaviu: it does. But it's not necessarily a bad thing |
16:57:41 | flaviu | I don't know. I think that if non-gc is easy enough, it might be worth using |
16:57:49 | Matthias247 | As I hate C++ for having to write shared_ptr<T> I now hate Rust even more for Gc<RefMut<T>> :-) |
16:58:00 | bjz | Araq: it really depends on what you value |
16:58:52 | bjz | Araq: and adding features can have a profound impact on your language, so it is not always desirable |
16:58:54 | Demos | the way I see it you have stack memory, which can just be on the stack, you have stuff with a "global" lifetime which you can just malloc and forget about (or put in the data segment), and you have more complex stuff like trees and thread related stuff, where a GC is really nice to have |
16:59:29 | Araq | bjz: indeed. |
17:00:24 | Araq | Matthias247: I think you can use a macro in Rust to cut the boilerplate |
17:00:52 | Araq | MyRef!(T) |
17:00:57 | bjz | Araq: I dispute though the fact that you can't have some sort of subjective ordering of languages based on how advanced their type system is. but it is more of a multidimensional lanscape than a continueum |
17:00:58 | Araq | much better ... |
17:01:23 | bjz | Araq: but macros in rust are super ugly to import/export at the moment |
17:01:29 | bjz | :( |
17:01:29 | Matthias247 | still hides the important information in the brackets |
17:01:38 | Matthias247 | and I don't like macros :) |
17:02:07 | Demos | I almost think having types at all is a sacrifice, you want to deal with the type system as little as possible without sacrificeing (too much) safety or speed |
17:04:54 | Matthias247 | I like types for the errors on compilation but don't need too fancy stuff. Give me everything that c# can do and I'm happy ;) |
17:05:39 | Araq | meh C# can do way too much |
17:06:31 | Matthias247 | like what? |
17:06:42 | Araq | dynamic |
17:06:44 | Demos | it is /really/ easy to code yourself into a corner with the covarient/contravarient generics |
17:07:02 | Matthias247 | ok, I did never use dynamic |
17:07:09 | Demos | dynamic is useful for calling code written in like IronRuby or IronPython though |
17:07:39 | Araq | Matthias247: DLL loading happens *lazily* |
17:07:55 | Araq | you get all the deploy safety of Python |
17:08:15 | Araq | Demos: we can do the same without "dynamic" |
17:08:17 | Matthias247 | but that's also true for C |
17:08:29 | Araq | what? |
17:08:59 | Matthias247 | if the dll doesn't match you simply get an error/crash |
17:09:05 | * | vbtt joined #nimrod |
17:09:06 | Matthias247 | or do you mean something else? |
17:10:00 | vbtt | hello friends |
17:10:06 | Araq | nimrod/C: load the DLL at program startup |
17:10:23 | Araq | C#: load the DLL when the first routine in it is actually called |
17:10:24 | Araq | big difference |
17:10:35 | vbtt | #1 on HN right now - woohoo! |
17:10:35 | Araq | hi vbtt wb |
17:10:41 | Matthias247 | ah, ok |
17:12:04 | vbtt | hi araq, what's new? |
17:13:00 | Araq | vbtt: we're still busy with async and spawn |
17:13:13 | Araq | lots of bug fixes too |
17:13:21 | vbtt | nice. i thought the last release had that already. |
17:13:24 | vbtt | i guess i'm out of touch. |
17:13:29 | Araq | well |
17:13:42 | Demos | Araq, yeah c#'s "lets make everything a dll" thing is stupid |
17:14:01 | Araq | the last release had these, but they were unusable |
17:14:27 | vbtt | ah i see |
17:14:39 | flaviu | Araq: Isn't var effectively a borrowed pointer? |
17:14:44 | vbtt | btw, can nimrod do `a += b` |
17:15:09 | vbtt | I'm wondering why the main example here doesn't use that: http://nimrod-by-example.github.io/ |
17:15:27 | Demos | vbtt, yes. proc `+=`... |
17:15:32 | flaviu | vbtt: Because wordFrequencies[word] returns a T, not a var T |
17:16:21 | * | Jehan_ joined #nimrod |
17:16:21 | * | kunev joined #nimrod |
17:16:21 | Demos | it should return a var T though, I think |
17:16:29 | vbtt | i see, a bit confusing |
17:16:32 | flaviu | No, theres another function that returns a var T |
17:17:08 | vbtt | can += be overloaded for T to do `x = x + y`? |
17:17:21 | flaviu | No, you can't assign to a T |
17:17:21 | vbtt | or is that against the intended semantics of += |
17:17:32 | flaviu | T is a value, not a pointer to a value |
17:17:44 | flaviu | And a value is, well, a value |
17:17:45 | vbtt | ah ok i see. |
17:17:56 | vbtt | so I guess what I'm asking for is an operator []+= |
17:18:15 | Demos | I thought one of the reasons we even had vars was to make subscript indexing work correctly |
17:18:23 | vbtt | because a[x] = b works, even if a[x] returns a T |
17:18:26 | flaviu | []+= is impractical. |
17:18:37 | vbtt | i understand |
17:18:39 | flaviu | What you want is []: var |
17:18:49 | flaviu | *[]: var T |
17:18:55 | flaviu | forgot the T |
17:19:25 | vbtt | hm ok, so why doesn't a table[] return var T? |
17:19:30 | flaviu | But the problem is that nimrod doesn't do all the analysys needed to prove correctness there, so I guess the tables weren't implmented that way |
17:19:50 | flaviu | https://github.com/Araq/Nimrod/issues/124 |
17:20:20 | Araq | flaviu: yes 'var T' is a borrowed pointer but it also implies write access |
17:20:28 | Araq | otherwise you would simply use 'T' |
17:21:37 | flaviu | Ok, I didn't realize that borrowed pointers don't allow write |
17:22:15 | Araq | tab[i] produces a T, tab.mget(i) produces a 'var T'; ultimately we don't need this workaround |
17:22:35 | flaviu | Isn't the issue I linked to relevent here? |
17:22:42 | Araq | yes, it is |
17:22:58 | vbtt | will tab.mget(i) += 1 work? |
17:23:06 | vbtt | or is the result discarded? |
17:23:09 | flaviu | Yes, it should |
17:23:17 | vbtt | ok, nice. |
17:23:32 | Araq | vbtt: yes, but we have count tables in the language that support 'inc' |
17:23:42 | Araq | which is the proper solution anyway |
17:24:05 | vbtt | perhaps the example should use that, then :) |
17:24:14 | Araq | yeah |
17:24:47 | flaviu | Someone in the comments mentioned that, and I said that I want to keep things verbose. |
17:24:47 | flaviu | But if everyone agrees, I can change it |
17:26:02 | vbtt | The showcase example doesn't have to be too verbose. But the other examples can be verbose as they specifically show one particular feature each. |
17:26:47 | vbtt | Btw, http://nimrod-by-example.github.io/variables/ - Talks about types of variables but the first thing I see is a function that uses 'result' with no variable type defined. |
17:27:06 | vbtt | I understand the purpose of the function, but for the purpose of the example it should be really simple, like 'return "foo"' |
17:27:27 | vbtt | Note that you haven't talked about the 'result' magic variable yet. |
17:27:51 | flaviu | Ok, I can fix that |
17:28:36 | Araq | flaviu: don't keep things verbose omg |
17:28:46 | vbtt | OK. The general guideline I like is that each example should include what you're trying to show and only a bare essential of everything else. |
17:29:40 | vbtt | Btw, don't want to sound critical, I think it's great you put it together and it looks very nice. |
17:29:45 | vbtt | *too |
17:30:39 | vbtt | Hmm, why isn't 'var result' a compile time error? |
17:31:07 | Araq | because 'result' is not a keyword |
17:31:11 | def- | vbtt: because it just creates a new variable called result, shadowing the special result |
17:31:24 | Araq | and yes, we know 'result' is bug prone for newcomers |
17:32:04 | flaviu | vbtt: Don't worry about it, I deeply appreciate all the feedback |
17:32:10 | Araq | it's however a non-issue for experienced nimrod programmers and thus has a low priority |
17:32:32 | flaviu | I've made the front page use count tables, and fixed var to just do `var accm` |
17:32:38 | vbtt | result should be un-shadowable IMO. The only thing it achieves is the ability to confuse any reader with no particular gain afaict. Anyway, no big deal. |
17:33:25 | vbtt | Oh wow awesome - look at that example now - short! |
17:33:38 | vbtt | Not to mention it's just as fast (probably faster) |
17:33:42 | * | brson joined #nimrod |
17:34:25 | flaviu | speed is about the same |
17:34:35 | vbtt | ok |
17:34:47 | flaviu | CountTable seems to work in the same basic manner |
17:35:13 | vbtt | I guess since the example is small, the nimrod + c compilers can eliminate any additional allocations. |
17:35:54 | flaviu | Anyway, performance doesn't matter here too much anyway. The bottleneck is stdin.lines |
17:35:57 | vbtt | What do you call this construct: 'a'..'z' |
17:36:04 | def- | vbtt: slice |
17:36:14 | flaviu | set if its inside {} |
17:37:06 | vbtt | flaviu: I think the first time you show a slice (http://nimrod-by-example.github.io/variables/result/) it's understandable but it might be nice to include a very short note in the text. (Note the 'a'..'z' notation is *slice*, described later <link>) |
17:37:29 | vbtt | Do you describe slices in the tutorial? |
17:37:57 | flaviu | No, but I can link to the docs for now |
17:38:36 | * | enurlyx joined #nimrod |
17:39:11 | flaviu | I can actually do even better, I'll describe operators in iterators |
17:39:51 | Araq | def-: can you please make a PR that submits your much more efficient 'lines' |
17:39:59 | def- | Araq: it's broken |
17:40:10 | Araq | lol. how so? |
17:40:31 | def- | I don't handle \r, only \l |
17:40:52 | * | mwbrown joined #nimrod |
17:41:07 | def- | I'll try to fix it |
17:41:14 | Araq | should be trivial |
17:41:36 | def- | You want to fix it or should I try? |
17:41:51 | Araq | you, of course |
17:43:13 | vbtt | flaviu: I think the type cast example here can be simlified: http://nimrod-by-example.github.io/variables/type_casting_inference/ |
17:43:30 | vbtt | can a char be casted to an int or something simple like that? |
17:43:49 | Araq | you should use a type conversion for that |
17:44:11 | vbtt | I do that you need a section called low level access or something because showing the beautiful 'addr' operator and machine types is very useful. |
17:45:21 | flaviu | I can do that, the main issue I'm running into is organizing things |
17:45:44 | vbtt | Right, I think to contrast casting with conversion, using the same value/type will be useful to the reader. |
17:45:47 | def- | Araq: it's not trivial for me, because fgets(), which I'm using, only uses \l |
17:45:56 | vbtt | flaviu:what do you mean? |
17:46:31 | flaviu | There isn't a linear path that only uses features that have already been introduced. |
17:46:58 | vbtt | flaviu:I think the types secions belong before the control flow ones. |
17:47:38 | Araq | flaviu: the old tutorial had this linear path |
17:47:46 | def- | vbtt: i disagree |
17:48:01 | vbtt | something like let/const/var -> primitive types -> other types -> basic control flow -> oo programming |
17:48:08 | Araq | nobody cared and instead people complained that it's too slim |
17:48:14 | vbtt | def-:why? see the examples, most primitive types use no control flow statements |
17:48:26 | vbtt | however the reverse is not true. |
17:48:40 | def- | vbtt: but i want to start programming, not define types first |
17:48:44 | vbtt | Araq:there can always be multiple tutorials. |
17:48:54 | flaviu | But my goal is to make examples somewhat meaningful, so I need control flow throughout |
17:49:17 | flaviu | But control flow examples can't be meaingful without variables |
17:49:36 | Araq | vbtt: sure and "nimrod by example" is our second tutorial ... I think |
17:49:40 | vbtt | flaviu:ok, then don't worry too much about a linear path. assume people will skim over things they don't quite understand but make sure it's still understandable and exaplined later. |
17:49:44 | leru | I have a weird problem. I'm building my program with sublime and a batch. Everything is okay, but I receive an EOF message.https://gist.github.com/anonymous/11c402eefb500a76b33a |
17:50:30 | Araq | indeed. you should assume that people don't read the text, but only the program code. I know I do ;-) |
17:50:40 | flaviu | leru: Not an answer, but https://github.com/Varriount/NimLime |
17:51:04 | * | ARCADIVS quit (Quit: WeeChat 0.4.3) |
17:51:12 | leru | flaviu: oh, thank you! |
17:53:27 | vbtt | Where are variants described? |
17:55:08 | vbtt | Anyway, you can keep the types sections later but it just seems by the time I get to it I've seen many of those already. Maybe they should be just grouped into a 'Types' section. |
17:55:12 | Jehan_ | You mean http://nimrod-lang.org/manual.html#object-variants ? |
17:55:30 | flaviu | vbtt: I forgot about that, I'll have to write it |
17:55:35 | flaviu | Jehan_: nimrod by example |
17:55:41 | Jehan_ | Oh, I see. |
17:56:59 | Araq | bjz: btw how does Rust deal with closures and their lifetimes? |
17:57:31 | vbtt | flaviu:also a 'metaprogramming' section will be nice because it's one of the most powerful features. |
17:57:42 | vbtt | you could keep it to a very basic example. |
17:57:45 | flaviu | http://nimrod-by-example.github.io/oop_macro/ sort of covers it |
17:57:57 | flaviu | Might need a better name though |
17:59:01 | vbtt | flaviu: Ah right - just call it 'macros' :) |
17:59:37 | flaviu | I'm not sure I like that, its too focused for that name |
17:59:43 | leru | Sooo.. nobody knows how to remove this "Error: unhandled exception: EOF reached [EIO]" ? |
17:59:46 | flaviu | But regardless, I need to make it easier to find |
18:00:00 | def- | leru: do you get the error at compiletime? |
18:00:00 | flaviu | leru: Can we see your actual source code? |
18:00:16 | vbtt | ok guys, g2g later. |
18:00:22 | def- | bye vbtt |
18:00:26 | leru | It's all in here: https://gist.github.com/anonymous/11c402eefb500a76b33a |
18:00:37 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
18:00:43 | def- | leru: maybe it's the space in the last line |
18:01:01 | leru | def-: nope. |
18:01:31 | def- | leru: for me it compiles without any error |
18:01:42 | flaviu | The nimrod code works fine for me |
18:02:00 | bjz | Araq: I'm not sure of the exact semantics unfortunately - best person to ask is pcwalton on #rust. |
18:02:34 | def- | leru: maybe it's the nimcache setting? |
18:03:27 | bjz | Araq: they are being redone in prep for 1.0 - we really need unboxed closures |
18:03:43 | dom96 | hello |
18:03:52 | Araq | hi dom96 |
18:04:51 | dom96 | hi Araq |
18:04:55 | leru | Probably the batch is the problem. But I want to run the code after compilation, so this is the easiest way for me. |
18:05:07 | flaviu | leru: nimrod c -r ? |
18:05:53 | leru | collect2.exe: error: ld returned 1 exit status; |
18:06:33 | def- | leru: do you have write permissions for your directory? |
18:08:01 | leru | yes i do |
18:08:30 | flaviu | How about --parallelBuild:1 |
18:08:41 | flaviu | Does it turn up any more messages? |
18:08:49 | io2 | dom96: https://twitter.com/irrequietus/status/489833893953286144 I BEAT you to it :) |
18:08:52 | io2 | ha ha ha |
18:08:54 | io2 | :D |
18:08:55 | flaviu | dom96: http://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/ :D |
18:09:06 | io2 | flaviu: already tweeted it |
18:09:20 | def- | dom96: and on hacker news: https://news.ycombinator.com/item?id=8048014 |
18:10:20 | io2 | reddit is better :P~ |
18:10:42 | leru | OH! I GOT IT! The "var asd : string = readLine(stdin)" inside of sublimes console does not work and creates this error message! |
18:10:43 | io2 | I say we have all the major social networks covered |
18:10:48 | io2 | good work |
18:10:51 | def- | leru: ah, ok |
18:10:52 | flaviu | Facebook? |
18:10:59 | flaviu | :P |
18:11:02 | dom96 | io2: bah |
18:11:12 | dom96 | io2: I guess this our little competition now huh? |
18:11:15 | io2 | I am not there, if you have a twitter account I'll ad the @ tag for you in a reply as well |
18:11:29 | dom96 | def-: flaviu: Awesome. It's doing very well! |
18:11:34 | flaviu | Reddit discussion is pretty good too. There aren't any trolls bogging down the conversation |
18:11:34 | io2 | dom96: :P come on, I love your work man, just teasin ya! |
18:11:50 | dom96 | io2: Oh don't worry, I know. |
18:11:53 | * | X-Scale joined #nimrod |
18:12:07 | dom96 | io2: I shall retweet you as a reward using the nimrod twitter account :P |
18:12:22 | dom96 | what about lobste.rs? |
18:12:32 | dom96 | oh |
18:12:33 | dom96 | already there |
18:12:34 | flaviu | I'd like an invite there BTW |
18:12:35 | io2 | I monitor the language closely, but I haven't been much of a direct contributor; but it is getting way too interesting in its problem solving domain. A real python killer, unlike others. |
18:12:54 | dom96 | io2: :D |
18:13:47 | io2 | I'm always around; one of these days I should be popping around with a few goodies of my own :P |
18:14:39 | def- | Araq: python has its own fgets implementation to work around the missing \r handling |
18:15:17 | dom96 | We should totally write "A real python killer" somewhere on Nimrod's site. |
18:17:19 | flaviu | Get filwit to draw the scary honey badger eating a python :O |
18:18:18 | io2 | dom96: yes! |
18:19:55 | dom96 | flaviu: That's actually a great idea. |
18:21:04 | io2 | def-: that was a brilliant comment on reddit: https://twitter.com/irrequietus/status/489837060531175425 |
18:21:11 | io2 | so brilliant it was tweetable |
18:21:39 | io2 | I am a strong advocate for metaprogramming as the most powerful thing a language can have because it eases the burden of implementing nice to have features a priori. |
18:22:04 | def- | io2: thanks! |
18:22:10 | io2 | see something over(ab)used through metaprogramming? turning it to language feature level thing becomes quite straightforward |
18:22:15 | io2 | np, well earned. |
18:22:30 | def- | io2: metaprogramming is also what brought me to Nimrod |
18:22:53 | io2 | :) |
18:26:49 | Araq | Jehan_: interesting problem ahead: deepCopy for closures requires a vtable like indirection |
18:27:13 | Araq | as we don't know the environment's structure |
18:31:14 | Jehan_ | Araq: Yes, that's unavoidable, as far as I know. |
18:31:40 | Araq | ok, so I didn't miss anything |
18:31:45 | Jehan_ | Though I could dig through research papers to see if my intuition is wrong. |
18:31:59 | Jehan_ | There's been some work on that (Haskell for distributed systems and such). |
18:32:30 | dom96 | A lot of favourable comments. Seems a lot of HN loves us now. |
18:33:08 | * | enurlyx left #nimrod (#nimrod) |
18:35:34 | Araq | Jehan_: your intuition is good enough ;-) |
18:36:35 | * | kunev quit (Ping timeout: 264 seconds) |
18:37:56 | Jehan_ | Araq: Here's one talk I was thinking of: http://www.dcs.gla.ac.uk/~jsinger/mmnet11_talks/orczyk.pdf |
18:38:11 | Jehan_ | Haskell on a NUMA architecture with multiple heaps. |
18:38:18 | Jehan_ | Sadly, I've forgotten a lot of the details. |
18:45:35 | * | enurlyx joined #nimrod |
18:45:45 | def- | dom96: HN didn't like Nimrod before? It's how I discovered Nimrod |
18:51:04 | Jehan_ | I found Nimrod when I was looking for a Pascal dialect with a GC myself, for what it's worth. |
18:51:34 | Jehan_ | Stumbled on a reference on some Pascal site (forgotten which), and that was that ... |
18:54:55 | bstrie | Araq: what is it that you'd like to know about closure lifetimes in rust? |
18:55:18 | dom96 | def-: no, they just never loved it this much. I may be wrong, but I see a lot of positive comments, a lot more than there ever was. |
18:57:19 | Araq | bstrie: closures often create implicit cycles and afaict Rust's lifetimes only support tree-like structures |
18:57:28 | dom96 | def-: Your comments certainly make a huge difference so thank you for those! |
19:00:00 | bstrie | Araq: I'm having a hard time coming up with a closure that creates an implicit cycle, but perhaps that's just rust infecting my brain. can you give an example? |
19:00:39 | bstrie | Araq: conceptually, closures in rust are the equivalent of manually stuffing the upvars into a struct and then making that struct callable |
19:00:40 | Matthias247 | Araq: that's why rust has/had 2 closure typs. One which can only be used locally (lifetimes are ok) and the other one which can only capture by move and then can only be called once |
19:00:56 | bstrie | Matthias247: neither of those would allow cycles |
19:01:09 | bstrie | Matthias247: also, changes to closures will make the two different closure types obsolete |
19:01:33 | Jehan_ | bstrie: Environment has pointer to data structure, closure gets stored inside that data structure (typically, for a callback). |
19:01:39 | Matthias247 | look at the swift documentation, they have an example for cycles through closures ;) |
19:02:06 | bjz | Matthias247: closures are being updated to be more general |
19:03:36 | bstrie | Jehan_: let me think about how rust would handle that, unless bjz gets to it first :P |
19:03:41 | Matthias247 | that's why I hadded "had" |
19:03:51 | * | kunev joined #nimrod |
19:04:09 | Jehan_ | bstrie: Just wanted to give a quick example how you can get cycles via closures. |
19:04:22 | Matthias247 | it will happen most likely in all things that involve callbacks. Like UI and other evented programming. Rust hates that anyway ;) |
19:05:58 | Matthias247 | a widget that owns a button and a callback on the button which referers the button or the widget -> cycle |
19:08:27 | bstrie | Jehan_: it would be great if I could remember how to store a closure in a struct at all... hopefully closure reform will make this more straightforward :\ |
19:13:15 | * | jyc joined #nimrod |
19:13:40 | * | Jesin quit (Quit: Leaving) |
19:16:09 | * | Jesin joined #nimrod |
19:17:05 | dom96 | oh. pcwalton joined the convo |
19:17:58 | bstrie | dom96: which convo? |
19:18:07 | dom96 | https://news.ycombinator.com/item?id=8048014 |
19:20:19 | bstrie | Jehan_: so far the compiler obstructs my every effort to even use a closure to call a closure that is stored in a struct, let alone storing that closure itself in the struct |
19:20:53 | bstrie | Jehan_: the current issues I'm hitting will be solved by closure reform, but I'm sure there will be some other reason why this won't work... I'm just not sure what yet :) |
19:21:36 | Jehan_ | bstrie: Heh. :) |
19:22:56 | NimBot | nimrod-code/babel master 244a4b5 Grzegorz Adam Hankiewicz [+1 ±2 -0]: Adds compatibility for Nimrod's 0.9.4 compiler. |
19:22:56 | NimBot | nimrod-code/babel master 2958ecc Grzegorz Adam Hankiewicz [+0 ±1 -0]: Updates readme to degrade compiler requirement. |
19:22:56 | NimBot | nimrod-code/babel master 2f73377 Dominik Picheta [+1 ±3 -0]: Merge pull request #51 from gradha/pr_compile_with_stable_compiler... 2 more lines |
19:23:03 | dom96 | <3 gradha |
19:28:57 | * | Ven joined #nimrod |
19:30:52 | * | Ven quit (Client Quit) |
19:41:22 | adoniscik | how do you write an anon proc whose argument is an openarray? |
19:42:11 | Araq | proc (a: openArray[int]) = ... |
19:53:25 | * | enurlyx left #nimrod (#nimrod) |
19:55:27 | adoniscik | sorry I'm still stuck. I defined the function as fun: openarray[float] -> float then called it using x => something(x) but I got a "Incorrect type list in proc type declaration." |
19:55:43 | * | Ven joined #nimrod |
19:56:25 | adoniscik | I guess my confusion is in representing an openarray in the latter part |
19:57:51 | adoniscik | or maybe not, since the compiler doesn't make it clear which part is wrong. It attributes the error to future.nim rather than any of my files. |
19:59:18 | def- | adoniscik: can you post your whole code? |
20:06:05 | * | kshlm quit (Remote host closed the connection) |
20:08:14 | * | kshlm joined #nimrod |
20:09:41 | Araq | adoniscik: please don't use the future module. Use the old school syntax. |
20:13:16 | dom96 | adoniscik: please gist your code |
20:19:54 | flaviu | dom96: My understanding of how DNS works is fuzzy, how do you figure out the ip address in the networking modules? |
20:20:48 | dom96 | flaviu: define 'figure out' |
20:20:52 | * | leru quit (Ping timeout: 246 seconds) |
20:22:03 | * | Jesin quit (Ping timeout: 240 seconds) |
20:22:12 | flaviu | I have the string "google.com". How does the program get an address 72._._._? |
20:22:56 | flaviu | actually 173.194.37.67 |
20:23:14 | flaviu | but w/e |
20:23:37 | * | Jesin joined #nimrod |
20:24:17 | dom96 | http://build.nimrod-lang.org/docs/rawsockets.html#getHostByAddr,string |
20:25:19 | flaviu | Oh, getHostByName |
20:25:22 | adoniscik | araq: interesting. do you mean the do notation? |
20:25:56 | Araq | adoniscik: for instance. Or "proc" |
20:26:12 | flaviu | Very magical, but no need to deal with what isn't absolutly required. Thanks. |
20:28:28 | adoniscik | on an unrelated note, does anyone know how to make sublime correctly comment nimrod code, because I get "invalid indentation" errors |
20:28:36 | flaviu | Another question: Is TIpAddress big endian or little? |
20:29:40 | flaviu | adoniscik: Works for me. |
20:29:49 | adoniscik | which sublime package? |
20:29:55 | flaviu | Are you using NimLime? That might do something, IDK |
20:30:04 | adoniscik | that's the one to use or avoid? |
20:30:20 | flaviu | I'm using NimLime right now with no issue |
20:30:39 | flaviu | The one to use |
20:31:04 | adoniscik | comments are supposed to be at the beginning of the line. right now they're at the beginning of the block, indented. |
20:31:25 | flaviu | Yes, thats correct |
20:31:38 | flaviu | If you put the comments at the beginning of the line, it won't compile |
20:32:40 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:32:54 | adoniscik | i mean like this: http://pastebin.com/yZef4EZX |
20:33:48 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:33:49 | flaviu | I know, that is the correct way to do it. If it was `proc foo...\n# result = 1\n result=2`, it would fail to compile |
20:34:06 | flaviu | Unless something has changed very recently |
20:34:26 | Araq | ohh speaking of which |
20:34:32 | adoniscik | really? it does fail |
20:34:37 | adoniscik | i'm on 0.94 |
20:34:40 | Araq | I have "relaxed comment handling" in a branch |
20:34:49 | Araq | but it breaks code ... |
20:34:51 | * | bjz quit (Read error: Connection reset by peer) |
20:34:54 | Araq | do we want it? |
20:34:56 | * | ics joined #nimrod |
20:35:17 | * | bjz joined #nimrod |
20:35:45 | adoniscik | when you comment out that single line it puts the hash sign at the beginning of the block rather than the line. I guess something's changed since 0.94 and the sublime package reflects that? |
20:36:20 | adoniscik | It's all the same to me, I just want to know what the best practice is and how to get sublime to co-operate with the compiler |
20:39:21 | * | ics quit (Ping timeout: 250 seconds) |
20:41:33 | Matthias247 | flaviu: it's big endian. But as it is about single bytes it doesn't matter too much |
20:41:34 | * | Ven joined #nimrod |
20:42:16 | adoniscik | oh, interesting. I was mistaken: the problem wasn't indentation but the fact that I tried to define a float without any following the decimal point, like result = 1. apparently it does not like this |
20:42:37 | adoniscik | result = 1.0 worked |
20:42:59 | adoniscik | in that case the error message needs to be reworked |
20:43:27 | * | Ven quit (Client Quit) |
20:44:53 | dom96 | adoniscik: Could you paste what you're trying to do with anon procs, if it's a bug with the future module then I would like to know about it. |
20:45:22 | * | kshlm quit (Remote host closed the connection) |
20:46:28 | * | kshlm joined #nimrod |
20:46:29 | dom96 | flaviu: Seen this yet? http://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/cj08qcz |
20:46:32 | adoniscik | dom96, okay. I'm learning the ropes so I have several problems which I'm trying to overcome one at a time. I'll get round to the anon procs in a moment |
20:46:49 | flaviu | dom96: Yep, def- just pointed out to me in a pm |
20:47:01 | dom96 | adoniscik: Alright. No worries, there is no hurry. |
20:47:27 | flaviu | I'm not sure whats going on here: https://gist.github.com/flaviut/50fb28b859b97e17b901 |
20:48:06 | flaviu | I'm expecting for an unexpected token, but it says that it has to be discarded |
20:48:34 | dom96 | flaviu: You're expecting 'res' not to be in the global scope? |
20:48:46 | flaviu | yes |
20:49:08 | dom96 | hrm, that is interesting. The parens are unbalanced. |
20:49:19 | dom96 | I would expect what you're expecting too. |
20:50:10 | flaviu | I'm aware of the parans. I'm actually trying to figure out why the code that that comment is referencing isn't working, stumbled across this |
20:53:59 | NimBot | Araq/Nimrod devel 94e8e24 Rory O’Kane [+0 ±1 -0]: Fix link to roadmap on site home page... 2 more lines |
20:53:59 | NimBot | Araq/Nimrod devel 935bade Dominik Picheta [+0 ±1 -0]: Merge pull request #1370 from roryokane/patch-1... 2 more lines |
20:55:37 | flaviu | I'm hesitant to say bug, but it looks like a bug or at least error message implementation weirdness. |
20:56:22 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:58:44 | * | vendethiel- quit (Ping timeout: 260 seconds) |
21:10:32 | Araq | flaviu: so report it |
21:10:33 | * | Skrylar quit (Ping timeout: 240 seconds) |
21:11:08 | flaviu | So its a bug? Ok |
21:11:41 | Araq | not necessarily but I wanna look at it |
21:13:00 | * | tinAndi joined #nimrod |
21:13:16 | flaviu | Ok, submitted |
21:18:51 | * | reactormonk_ joined #nimrod |
21:19:13 | reactormonk_ | I like that nimrod by example. |
21:31:36 | flaviu | reactormonk_: Thanks, feel free to make suggestions if you'd like |
21:32:41 | reactormonk_ | I would mention the free syntax somewhere, I haven't seen that in any other language, so it's rather relevant. |
21:34:54 | def- | reactormonk_: free syntax? |
21:35:47 | flaviu | echo "a", "b", "c" |
21:35:48 | reactormonk_ | foo(x) vs. x.foo() |
21:36:12 | flaviu | reactormonk_: Oh, I did mention that |
21:36:16 | reactormonk_ | Seen that one in Ruby. |
21:36:32 | reactormonk_ | Where did I miss it? |
21:36:33 | flaviu | x.foo() is in D |
21:42:22 | * | ics joined #nimrod |
21:42:50 | * | woodgiraffe joined #nimrod |
21:43:04 | Araq | hi woodgiraffe welcome |
21:43:52 | reactormonk_ | What do you mean by D? |
21:43:57 | flaviu | Dlang |
21:44:09 | flaviu | http://ddili.org/ders/d.en/ufcs.html |
21:44:10 | mwbrown | Hm. Is there a quick command line option I can pass to link in a library if I have something declared using {. cimport: "foo" .} ? |
21:44:36 | woodgiraffe | Araq: howdy |
21:45:46 | Araq | what's .cimport? |
21:46:11 | mwbrown | importc I meant |
21:50:27 | Jehan_ | --passL:-lbar |
21:52:15 | flaviu | Linux is getting getrandom()! |
21:53:38 | Araq | wake me up when it gets a non brain dead retarded archaic file hierarchy |
21:54:02 | flaviu | I don't know, I like the everything is a file idea |
21:55:06 | reactormonk_ | Oh, yet another rant from Araq. |
21:56:11 | * | OrionPK joined #nimrod |
21:56:25 | flaviu | How would you prefer it be done, like in windows with its thousands of functions that each behave slightly inconsistent ways that you don't notice until everything crashes? |
21:56:59 | Demos | is it indended that you can index an array by an enum |
21:57:04 | flaviu | Yes |
21:57:22 | Demos | like array[low(enum)..high(enum), T] then you can ONLY use things of the Enum's type to index it |
21:57:30 | Demos | like I could not say foo[4] |
21:57:34 | mwbrown | I think C# might be the only language that bitches at you if you try indexing using an enum without casting it first |
21:57:38 | Demos | I would have to say foo[4.enum] |
21:58:10 | Demos | right, nimrod says you MUST cast /to/ the enum |
21:58:16 | Demos | at least that is what it looks like |
21:58:50 | flaviu | I don't see the problem, if your enum is "Colors", just do foo[red] |
21:58:50 | def- | Demos: btw, you can write array[enum, T] |
22:00:09 | Demos | neat, wanted to know if this was actually an intended feature, apperently it is |
22:00:17 | Demos | error message could be better but whatever |
22:01:55 | Araq | flaviu: "everything is a file" has never worked and never will, but this is a story for another time |
22:02:09 | Araq | and has nothing to do with this /usr/bin/banana bullshit |
22:02:25 | def- | flaviu: i think this is what araq refers to: http://linux.die.net/man/7/hier |
22:03:03 | flaviu | That looks outdated |
22:04:23 | * | askatasuna quit (Quit: WeeChat 0.4.3) |
22:12:08 | OrionPK | this nimrod by example project is great btw, kudos to whoever's heading that up |
22:14:45 | flaviu | OrionPK: Thanks, if there's anything you'd like changed, just tell me |
22:14:48 | Araq | reactormonk_: well I always enjoy good rants ... :P |
22:16:31 | OrionPK | flaviu any mention of using babel on there? |
22:16:52 | flaviu | No, I don't know anything about babel actually |
22:16:58 | OrionPK | maybe also a chapter on 'modules' |
22:17:06 | OrionPK | early on |
22:17:13 | OrionPK | you dont know anything about babel? |
22:18:01 | flaviu | Nope, I haven't ever used it. I mean I've done babel install once or twice, but I have no idea how to actually use the packages |
22:22:19 | adoniscik | is(n't) it good practice to declare all side-effect free procs as such using pragma? |
22:23:07 | flaviu | I'd say its good practice, since the func keyword is intended to do essentially that. Most don't do it because of verbosity |
22:25:22 | adoniscik | I don't see that keyword in the manual |
22:25:33 | def- | adoniscik: not implemented yet |
22:26:34 | flaviu | adoniscik: http://nimrod-lang.org/manual.html#nosideeffect-pragma |
22:27:57 | adoniscik | oh right, good one |
22:30:02 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:30:05 | * | darkf joined #nimrod |
22:33:34 | * | tinAndi left #nimrod (#nimrod) |
22:35:02 | Demos | ugh trackDirty broke again |
22:37:26 | * | keshav joined #nimrod |
22:37:34 | keshav | is any one hear |
22:37:39 | * | Skrylar joined #nimrod |
22:37:50 | keshav | hi |
22:38:07 | flaviu | keshav: I don't think anyone has gone to sleep yet |
22:38:42 | keshav | flaviu can u tell me wether nimrod is compiled or interpreted? |
22:38:46 | adoniscik | can anyone shorten sum(x.map do (t: float) -> float: pow(t, p)) using just map? |
22:38:59 | flaviu | Its compiled to C, but there is also a Javascript backend |
22:39:13 | keshav | awesome |
22:39:33 | * | reactormonk_ quit (Ping timeout: 240 seconds) |
22:39:35 | def- | adoniscik: usring just map and not sum? |
22:39:58 | adoniscik | I'm trying to get a feel for the language. with mapIt I can do x.mapIt(float, intpow(it, p)).sum, which is nice. |
22:40:15 | adoniscik | ah, pow not intpow, but you get the idea |
22:40:33 | adoniscik | I need the sum too |
22:40:46 | * | Trustable quit (Quit: Leaving) |
22:40:48 | def- | adoniscik: i don't quite understanad what you want |
22:42:03 | adoniscik | how would you find the sum of a map using anon procs? |
22:42:23 | def- | adoniscik: using foldl |
22:42:52 | adoniscik | sure but how to write the anon proc inside map, that's my question |
22:44:24 | Jehan_ | Do something like this: map(@[1,2,3], proc(x: int): int = x + 1) |
22:44:25 | def- | adoniscik: so you want x.map(anon_proc_here) and the result should be what? |
22:44:33 | Jehan_ | Adjust for whatever you actually need it to do. |
22:44:40 | adoniscik | thanks, Jehan_ |
22:44:56 | def- | ok, guess Jehan_ understood better |
22:45:11 | adoniscik | I wanted to do that using the concise anon proc defs in future |
22:45:32 | adoniscik | x => x+1 or something |
22:46:03 | dom96 | map(@[1,2,3], (x) => x+1) |
22:46:24 | dom96 | may work |
22:46:45 | def- | map(@[1,2,3], (x: int) => x+1) |
22:46:55 | adoniscik | bingo |
22:47:01 | adoniscik | def-, that worked! |
22:47:13 | adoniscik | sorry, I'm still stumbling over the syntax |
22:47:33 | * | keshav quit (Quit: Page closed) |
22:48:10 | Araq | good night |
22:49:18 | adoniscik | bye |
22:51:16 | * | nequitans quit (*.net *.split) |
22:52:33 | * | kunev quit (*.net *.split) |
22:52:33 | * | mwbrown quit (*.net *.split) |
22:52:33 | * | Jehan_ quit (*.net *.split) |
22:52:33 | * | darkfusion quit (*.net *.split) |
22:52:34 | * | woodgiraffe quit (*.net *.split) |
22:52:35 | * | JStoker quit (*.net *.split) |
22:53:04 | * | woodgiraffe joined #nimrod |
22:53:04 | * | kunev joined #nimrod |
22:53:04 | * | mwbrown joined #nimrod |
22:53:04 | * | Jehan_ joined #nimrod |
22:53:04 | * | darkfusion joined #nimrod |
22:53:04 | * | JStoker joined #nimrod |
22:53:32 | * | nequitans joined #nimrod |
22:54:00 | * | q66 quit (*.net *.split) |
22:54:01 | * | io2 quit (*.net *.split) |
22:54:01 | * | noam_ quit (*.net *.split) |
22:54:03 | * | nequitans quit (*.net *.split) |
22:54:04 | * | kunev quit (*.net *.split) |
22:54:04 | * | mwbrown quit (*.net *.split) |
22:54:04 | * | Jehan_ quit (*.net *.split) |
22:54:04 | * | darkfusion quit (*.net *.split) |
22:54:05 | * | woodgiraffe quit (*.net *.split) |
22:54:06 | * | JStoker quit (*.net *.split) |
22:54:07 | * | Skrylar quit (*.net *.split) |
22:54:07 | * | brson quit (*.net *.split) |
22:54:07 | * | Demos quit (*.net *.split) |
22:54:07 | * | OrionPK quit (*.net *.split) |
22:54:07 | * | ics quit (*.net *.split) |
22:54:07 | * | adoniscik quit (*.net *.split) |
22:54:08 | * | superfunc quit (*.net *.split) |
22:54:08 | * | darkf quit (*.net *.split) |
22:54:09 | * | Roin quit (*.net *.split) |
22:54:09 | * | Amrykid quit (*.net *.split) |
22:54:09 | * | Araq quit (*.net *.split) |
22:54:09 | * | jyc quit (*.net *.split) |
22:54:10 | * | TylerE quit (*.net *.split) |
22:54:10 | * | mal`` quit (*.net *.split) |
22:54:11 | * | flaviu quit (*.net *.split) |
22:54:11 | * | Fr4n quit (*.net *.split) |
22:54:11 | * | eigenlicht_ quit (*.net *.split) |
22:54:11 | * | clone1018_ quit (*.net *.split) |
22:54:11 | * | springbok quit (*.net *.split) |
22:54:11 | * | skroll quit (*.net *.split) |
22:54:12 | * | mko quit (*.net *.split) |
22:54:12 | * | Varriount quit (*.net *.split) |
22:54:12 | * | betawaffle quit (*.net *.split) |
22:54:12 | * | Jesin quit (*.net *.split) |
22:54:13 | * | rektide quit (*.net *.split) |
22:54:13 | * | untitaker quit (*.net *.split) |
22:54:13 | * | phI||Ip quit (*.net *.split) |
22:54:13 | * | mmatalka quit (*.net *.split) |
22:54:13 | * | reloc0 quit (*.net *.split) |
22:54:14 | * | comex quit (*.net *.split) |
22:54:14 | * | jez0990_ quit (*.net *.split) |
22:54:14 | * | oddmunds quit (*.net *.split) |
22:54:14 | * | bstrie quit (*.net *.split) |
22:54:14 | * | def- quit (*.net *.split) |
22:54:14 | * | X-Scale quit (*.net *.split) |
22:54:15 | * | Raynes quit (*.net *.split) |
22:54:15 | * | CARAM_ quit (*.net *.split) |
22:54:16 | * | dom96 quit (*.net *.split) |
22:54:16 | * | rixx quit (*.net *.split) |
22:54:16 | * | silven quit (*.net *.split) |
22:54:17 | * | kshlm quit (*.net *.split) |
22:54:18 | * | BitPuffin quit (*.net *.split) |
22:54:18 | * | reactormonk quit (*.net *.split) |
22:54:18 | * | Zuchto quit (*.net *.split) |
22:54:18 | * | btiffin quit (*.net *.split) |
22:54:18 | * | 5EXAAABOS quit (*.net *.split) |
22:54:19 | * | flyx quit (*.net *.split) |
22:54:19 | * | Boscop quit (*.net *.split) |
22:54:21 | * | BlameStross quit (*.net *.split) |
22:54:22 | * | fowl quit (*.net *.split) |
22:54:22 | * | milosn quit (*.net *.split) |
22:54:23 | * | tumak quit (*.net *.split) |
22:54:23 | * | dLog quit (*.net *.split) |
22:54:59 | * | nequitans joined #nimrod |
22:54:59 | * | JStoker joined #nimrod |
22:54:59 | * | darkfusion joined #nimrod |
22:54:59 | * | Jehan_ joined #nimrod |
22:54:59 | * | mwbrown joined #nimrod |
22:54:59 | * | kunev joined #nimrod |
22:54:59 | * | woodgiraffe joined #nimrod |
22:54:59 | * | Skrylar joined #nimrod |
22:54:59 | * | darkf joined #nimrod |
22:54:59 | * | OrionPK joined #nimrod |
22:54:59 | * | ics joined #nimrod |
22:54:59 | * | kshlm joined #nimrod |
22:54:59 | * | Jesin joined #nimrod |
22:54:59 | * | jyc joined #nimrod |
22:54:59 | * | X-Scale joined #nimrod |
22:54:59 | * | brson joined #nimrod |
22:54:59 | * | adoniscik joined #nimrod |
22:54:59 | * | superfunc joined #nimrod |
22:54:59 | * | Demos joined #nimrod |
22:54:59 | * | q66 joined #nimrod |
22:54:59 | * | flaviu joined #nimrod |
22:54:59 | * | rektide joined #nimrod |
22:54:59 | * | BlameStross joined #nimrod |
22:54:59 | * | untitaker joined #nimrod |
22:54:59 | * | BitPuffin joined #nimrod |
22:54:59 | * | Fr4n joined #nimrod |
22:54:59 | * | io2 joined #nimrod |
22:54:59 | * | eigenlicht_ joined #nimrod |
22:54:59 | * | clone1018_ joined #nimrod |
22:54:59 | * | noam_ joined #nimrod |
22:54:59 | * | Boscop joined #nimrod |
22:54:59 | * | springbok joined #nimrod |
22:54:59 | * | reactormonk joined #nimrod |
22:54:59 | * | Zuchto joined #nimrod |
22:54:59 | * | btiffin joined #nimrod |
22:54:59 | * | skroll joined #nimrod |
22:54:59 | * | betawaffle joined #nimrod |
22:54:59 | * | Varriount joined #nimrod |
22:54:59 | * | mko joined #nimrod |
22:54:59 | * | def- joined #nimrod |
22:54:59 | * | oddmunds joined #nimrod |
22:54:59 | * | jez0990_ joined #nimrod |
22:54:59 | * | comex joined #nimrod |
22:54:59 | * | bstrie joined #nimrod |
22:54:59 | * | reloc0 joined #nimrod |
22:54:59 | * | mmatalka joined #nimrod |
22:54:59 | * | phI||Ip joined #nimrod |
22:54:59 | * | mal`` joined #nimrod |
22:54:59 | * | TylerE joined #nimrod |
22:54:59 | * | Araq joined #nimrod |
22:54:59 | * | Amrykid joined #nimrod |
22:54:59 | * | Roin joined #nimrod |
22:54:59 | * | silven joined #nimrod |
22:54:59 | * | rixx joined #nimrod |
22:54:59 | * | dom96 joined #nimrod |
22:54:59 | * | CARAM_ joined #nimrod |
22:54:59 | * | Raynes joined #nimrod |
22:54:59 | * | fowl joined #nimrod |
22:54:59 | * | flyx joined #nimrod |
22:54:59 | * | 5EXAAABOS joined #nimrod |
22:54:59 | * | tumak joined #nimrod |
22:54:59 | * | dLog joined #nimrod |
22:54:59 | * | milosn joined #nimrod |
22:55:11 | * | Boscop quit (*.net *.split) |
22:55:15 | * | BlameStross quit (*.net *.split) |
22:55:16 | * | fowl quit (*.net *.split) |
22:55:16 | * | milosn quit (*.net *.split) |
22:55:17 | * | tumak quit (*.net *.split) |
22:55:17 | * | dLog quit (*.net *.split) |
22:55:18 | * | Boscop joined #nimrod |
22:56:20 | * | BlameStross joined #nimrod |
22:56:20 | * | fowl joined #nimrod |
22:56:20 | * | milosn joined #nimrod |
22:56:20 | * | tumak joined #nimrod |
22:56:20 | * | dLog joined #nimrod |
22:56:32 | * | Jehan_ quit (Quit: Leaving) |
22:59:10 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
23:00:20 | * | betawaffle quit (Excess Flood) |
23:00:24 | dom96 | 'night |
23:00:46 | * | betawaffle joined #nimrod |
23:01:08 | adoniscik | vector arithmetic, like addition or subtraction, on openarrays is not yet defined right? |
23:05:57 | def- | adoniscik: right |
23:13:22 | * | bjz joined #nimrod |
23:17:05 | * | mwbrown quit (Ping timeout: 256 seconds) |
23:19:08 | def- | Araq: I can't do fast readLines with CR and LF and without a buffer for each file. |
23:21:30 | adoniscik | is printing of (open)arrays or seqs with echo defined? |
23:22:20 | def- | seqs yes |
23:22:23 | def- | arrays no |
23:22:32 | adoniscik | that's what I thought, thanks def- |
23:22:40 | def- | and what you're looking for is the `$` proc, which turns everything into a string |
23:23:00 | def- | when you call echo, $ is applied on every argument |
23:23:11 | adoniscik | ah, good, so I can write my own |
23:23:20 | def- | sure |
23:31:51 | adoniscik | can you cast an array to a seq? |
23:32:19 | flaviu | No, a seq has additional cap and len fields |
23:32:48 | adoniscik | what cap? couldn't you simply infer the len from the array? |
23:33:12 | flaviu | I assume you mean O(1) by cast |
23:33:25 | flaviu | But if you just want to convert, do `@myArray` |
23:33:28 | adoniscik | I suppose. I want efficiency. |
23:33:39 | adoniscik | but you already know the len of th earray |
23:34:16 | flaviu | A seq is a like a struct of (len, cap: int, data), you can't convert (data) to that without copying |
23:34:29 | adoniscik | now I see what you mean |
23:38:35 | * | nande joined #nimrod |
23:39:14 | adoniscik | many procs, esp. those in sequtils, demand seqs. I have numerical data, in openarrays. Is it advisable for me to cast them to seqs so I can use sequtils, or should I be using seqs to begin with? |
23:39:51 | flaviu | From what I understand, openarrays are just a generic way of saying "either an array or a seq". |
23:39:56 | * | askatasuna joined #nimrod |
23:40:02 | flaviu | I |
23:40:08 | flaviu | 'm sure someone can correct me on that though |
23:40:20 | def- | flaviu: i have the same understanding |
23:40:46 | def- | adoniscik: if you want to use sequtils at any cost, use seqs |
23:40:58 | def- | but often non-functional-style code is much faster |
23:41:02 | adoniscik | suck |
23:41:44 | adoniscik | I didn't want to sacrifice elegance for performance |
23:41:59 | adoniscik | or I could stick with C |
23:42:39 | adoniscik | okay, I'll use seqs for now and postpone optimization |
23:46:54 | adoniscik | why does echo(@[1,2,3]) work but not echo @[1,2,3]? |
23:47:22 | def- | because of some precedence issue it will be bracketed as (echo @)([1,2,3]) i guess |
23:47:29 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:47:40 | flaviu | because echo @[1,2,3] is parsed as `@`(echo, [1,2,3]) |
23:47:47 | def- | aah |
23:47:51 | def- | right! |
23:48:14 | adoniscik | is that reasonable behavior? |
23:48:20 | flaviu | Not really |
23:48:47 | flaviu | Put `#! strongSpaces` at the beginning of the file, its an experimental feature that should fix it |
23:53:48 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:54:41 | adoniscik | I tried defining addition for openarrays but the compiler fails to convert arrays to openarrays so, for example, when I say [1,2,3] + [3,4,5] it doesn't match the signature of my function: proc `+` (x, y: openarray) : seq |
23:55:10 | def- | try proc `+`[T](x, y: openarray[T]): seq[T] |
23:55:14 | adoniscik | that's what I thought :) |
23:59:26 | * | xenagi joined #nimrod |