<< 17-07-2014 >>

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:15reactormonkimo you should add the object/functional syntax equivalence somewhere with the object programming.
00:19:50flaviuActually, I think I'll mention that in procedures, since it applies there too.
00:20:18flaviuI had forgotten about it, thanks for the reminder
00:30:38flaviureactormonk: 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:51pown5Araq, sorry i just missed your msg yesterday. You said don't use cast. Was it in regards to:
03:43:52pown5let num_items = cast[cint](info.channels * info.frames)
03:44:04pown5How 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:57adoniscikafter 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:28Araqimport module # if foo is in the path
08:32:37Araqimport foo.module # otherwise
08:32:55Araqmodule.bar # access a symbol from 'module' explicitly
08:33:13Araqthere is no foo.module.bar notation
08:33:18adoniscikvery good, it worked. Now I'm trying anon functions. I get an error "macro expects a node of kind: nnkIdent"
08:33:50Araqdo you mean the new -> and => macros?
08:33:55adoniscikyes, future
08:33:59adoniscikdo they work?
08:34:07Araqkind of
08:34:20Araqas 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:02OrionPKcompile time ffi would be sweet huh
13:57:54Araqfor what?
13:59:07*OrionPK quit (Remote host closed the connection)
13:59:24*OrionPK joined #nimrod
13:59:30OrionPKfor one thing
13:59:46OrionPKadding a switch to the nimrod compiler to only evaluate compile time
13:59:57OrionPKand not produce any c files or binary
14:00:03OrionPKwould make nake cooler
14:00:10Araqah well
14:00:15Araqwe'll get that
14:00:35Araqthe VM will support os.nim and math.nim
14:00:50Araqand then we can run nake completely in the VM
14:01:07OrionPKahh 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:46flaviuhttp://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/
15:07:57flaviuUpvote if you have a reddit account
15:08:52def-flaviu: What about HN?!
15:09:05flaviuI'm banned from there for some reason
15:09:21flaviuI literally have no idea why, feel free to post it though
15:24:17def-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:07flaviuI thought that there was a random function, seems not
15:45:27*Demos joined #nimrod
15:49:39def-flaviu: it's in the math module?
15:49:55flaviuI just found out, thanks for rosetta code btw
15:53:21def-flaviu: i think you should call randomize() at the start
15:53:28def-flaviu: otherwise i get the same "random" number everytime
15:53:38def-i mean, in the same order, the same numbers
15:54:12flaviuStill 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:53flaviuCouldn'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:23Araqflaviu: you need some inference rules in addition to regionized pointers
16:53:42Araqbut this "Rust's type system is superior to Nimrod's" is already getting old
16:54:12Araqby the same reasoning Idris' type system is superior to Rust's and so is ATS's
16:54:24flaviuWell, the guy did have a point when he said that nimrod encourages automatic memory management
16:54:38bjzAraq: would definitely agree with the last statement
16:55:18bjzAraq: but they are good at different things
16:55:48bjzAraq: Idris doesn't have regions or linear types, but it has lots of other things Rust doesn't have
16:56:25Araqbjz: I think you can implement regions and linear types with dependent types
16:56:34Araqbut I could be wrong
16:56:38bjzpossibly - I don't know
16:56:45bjzyou could be right
16:57:07Matthias247flaviu: it does. But it's not necessarily a bad thing
16:57:41flaviuI don't know. I think that if non-gc is easy enough, it might be worth using
16:57:49Matthias247As I hate C++ for having to write shared_ptr<T> I now hate Rust even more for Gc<RefMut<T>> :-)
16:58:00bjzAraq: it really depends on what you value
16:58:52bjzAraq: and adding features can have a profound impact on your language, so it is not always desirable
16:58:54Demosthe 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:29Araqbjz: indeed.
17:00:24AraqMatthias247: I think you can use a macro in Rust to cut the boilerplate
17:00:52AraqMyRef!(T)
17:00:57bjzAraq: 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:58Araqmuch better ...
17:01:23bjzAraq: but macros in rust are super ugly to import/export at the moment
17:01:29bjz:(
17:01:29Matthias247still hides the important information in the brackets
17:01:38Matthias247and I don't like macros :)
17:02:07DemosI 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:54Matthias247I 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:39Araqmeh C# can do way too much
17:06:31Matthias247like what?
17:06:42Araqdynamic
17:06:44Demosit is /really/ easy to code yourself into a corner with the covarient/contravarient generics
17:07:02Matthias247ok, I did never use dynamic
17:07:09Demosdynamic is useful for calling code written in like IronRuby or IronPython though
17:07:39AraqMatthias247: DLL loading happens *lazily*
17:07:55Araqyou get all the deploy safety of Python
17:08:15AraqDemos: we can do the same without "dynamic"
17:08:17Matthias247but that's also true for C
17:08:29Araqwhat?
17:08:59Matthias247if the dll doesn't match you simply get an error/crash
17:09:05*vbtt joined #nimrod
17:09:06Matthias247or do you mean something else?
17:10:00vbtthello friends
17:10:06Araqnimrod/C: load the DLL at program startup
17:10:23AraqC#: load the DLL when the first routine in it is actually called
17:10:24Araqbig difference
17:10:35vbtt#1 on HN right now - woohoo!
17:10:35Araqhi vbtt wb
17:10:41Matthias247ah, ok
17:12:04vbtthi araq, what's new?
17:13:00Araqvbtt: we're still busy with async and spawn
17:13:13Araqlots of bug fixes too
17:13:21vbttnice. i thought the last release had that already.
17:13:24vbtti guess i'm out of touch.
17:13:29Araqwell
17:13:42DemosAraq, yeah c#'s "lets make everything a dll" thing is stupid
17:14:01Araqthe last release had these, but they were unusable
17:14:27vbttah i see
17:14:39flaviuAraq: Isn't var effectively a borrowed pointer?
17:14:44vbttbtw, can nimrod do `a += b`
17:15:09vbttI'm wondering why the main example here doesn't use that: http://nimrod-by-example.github.io/
17:15:27Demosvbtt, yes. proc `+=`...
17:15:32flaviuvbtt: Because wordFrequencies[word] returns a T, not a var T
17:16:21*Jehan_ joined #nimrod
17:16:21*kunev joined #nimrod
17:16:21Demosit should return a var T though, I think
17:16:29vbtti see, a bit confusing
17:16:32flaviuNo, theres another function that returns a var T
17:17:08vbttcan += be overloaded for T to do `x = x + y`?
17:17:21flaviuNo, you can't assign to a T
17:17:21vbttor is that against the intended semantics of +=
17:17:32flaviuT is a value, not a pointer to a value
17:17:44flaviuAnd a value is, well, a value
17:17:45vbttah ok i see.
17:17:56vbttso I guess what I'm asking for is an operator []+=
17:18:15DemosI thought one of the reasons we even had vars was to make subscript indexing work correctly
17:18:23vbttbecause a[x] = b works, even if a[x] returns a T
17:18:26flaviu[]+= is impractical.
17:18:37vbtti understand
17:18:39flaviuWhat you want is []: var
17:18:49flaviu*[]: var T
17:18:55flaviuforgot the T
17:19:25vbtthm ok, so why doesn't a table[] return var T?
17:19:30flaviuBut 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:50flaviuhttps://github.com/Araq/Nimrod/issues/124
17:20:20Araqflaviu: yes 'var T' is a borrowed pointer but it also implies write access
17:20:28Araqotherwise you would simply use 'T'
17:21:37flaviuOk, I didn't realize that borrowed pointers don't allow write
17:22:15Araqtab[i] produces a T, tab.mget(i) produces a 'var T'; ultimately we don't need this workaround
17:22:35flaviuIsn't the issue I linked to relevent here?
17:22:42Araqyes, it is
17:22:58vbttwill tab.mget(i) += 1 work?
17:23:06vbttor is the result discarded?
17:23:09flaviuYes, it should
17:23:17vbttok, nice.
17:23:32Araqvbtt: yes, but we have count tables in the language that support 'inc'
17:23:42Araqwhich is the proper solution anyway
17:24:05vbttperhaps the example should use that, then :)
17:24:14Araqyeah
17:24:47flaviuSomeone in the comments mentioned that, and I said that I want to keep things verbose.
17:24:47flaviuBut if everyone agrees, I can change it
17:26:02vbttThe 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:47vbttBtw, 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:06vbttI understand the purpose of the function, but for the purpose of the example it should be really simple, like 'return "foo"'
17:27:27vbttNote that you haven't talked about the 'result' magic variable yet.
17:27:51flaviuOk, I can fix that
17:28:36Araqflaviu: don't keep things verbose omg
17:28:46vbttOK. 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:40vbttBtw, don't want to sound critical, I think it's great you put it together and it looks very nice.
17:29:45vbtt*too
17:30:39vbttHmm, why isn't 'var result' a compile time error?
17:31:07Araqbecause 'result' is not a keyword
17:31:11def-vbtt: because it just creates a new variable called result, shadowing the special result
17:31:24Araqand yes, we know 'result' is bug prone for newcomers
17:32:04flaviuvbtt: Don't worry about it, I deeply appreciate all the feedback
17:32:10Araqit's however a non-issue for experienced nimrod programmers and thus has a low priority
17:32:32flaviuI've made the front page use count tables, and fixed var to just do `var accm`
17:32:38vbttresult 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:25vbttOh wow awesome - look at that example now - short!
17:33:38vbttNot to mention it's just as fast (probably faster)
17:33:42*brson joined #nimrod
17:34:25flaviuspeed is about the same
17:34:35vbttok
17:34:47flaviuCountTable seems to work in the same basic manner
17:35:13vbttI guess since the example is small, the nimrod + c compilers can eliminate any additional allocations.
17:35:54flaviuAnyway, performance doesn't matter here too much anyway. The bottleneck is stdin.lines
17:35:57vbttWhat do you call this construct: 'a'..'z'
17:36:04def-vbtt: slice
17:36:14flaviuset if its inside {}
17:37:06vbttflaviu: 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:29vbttDo you describe slices in the tutorial?
17:37:57flaviuNo, but I can link to the docs for now
17:38:36*enurlyx joined #nimrod
17:39:11flaviuI can actually do even better, I'll describe operators in iterators
17:39:51Araqdef-: can you please make a PR that submits your much more efficient 'lines'
17:39:59def-Araq: it's broken
17:40:10Araqlol. how so?
17:40:31def-I don't handle \r, only \l
17:40:52*mwbrown joined #nimrod
17:41:07def-I'll try to fix it
17:41:14Araqshould be trivial
17:41:36def-You want to fix it or should I try?
17:41:51Araqyou, of course
17:43:13vbttflaviu: I think the type cast example here can be simlified: http://nimrod-by-example.github.io/variables/type_casting_inference/
17:43:30vbttcan a char be casted to an int or something simple like that?
17:43:49Araqyou should use a type conversion for that
17:44:11vbttI 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:21flaviuI can do that, the main issue I'm running into is organizing things
17:45:44vbttRight, I think to contrast casting with conversion, using the same value/type will be useful to the reader.
17:45:47def-Araq: it's not trivial for me, because fgets(), which I'm using, only uses \l
17:45:56vbttflaviu:what do you mean?
17:46:31flaviuThere isn't a linear path that only uses features that have already been introduced.
17:46:58vbttflaviu:I think the types secions belong before the control flow ones.
17:47:38Araqflaviu: the old tutorial had this linear path
17:47:46def-vbtt: i disagree
17:48:01vbttsomething like let/const/var -> primitive types -> other types -> basic control flow -> oo programming
17:48:08Araqnobody cared and instead people complained that it's too slim
17:48:14vbttdef-:why? see the examples, most primitive types use no control flow statements
17:48:26vbtthowever the reverse is not true.
17:48:40def-vbtt: but i want to start programming, not define types first
17:48:44vbttAraq:there can always be multiple tutorials.
17:48:54flaviuBut my goal is to make examples somewhat meaningful, so I need control flow throughout
17:49:17flaviuBut control flow examples can't be meaingful without variables
17:49:36Araqvbtt: sure and "nimrod by example" is our second tutorial ... I think
17:49:40vbttflaviu: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:44leruI 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:30Araqindeed. you should assume that people don't read the text, but only the program code. I know I do ;-)
17:50:40flaviuleru: Not an answer, but https://github.com/Varriount/NimLime
17:51:04*ARCADIVS quit (Quit: WeeChat 0.4.3)
17:51:12leruflaviu: oh, thank you!
17:53:27vbttWhere are variants described?
17:55:08vbttAnyway, 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:12Jehan_You mean http://nimrod-lang.org/manual.html#object-variants ?
17:55:30flaviuvbtt: I forgot about that, I'll have to write it
17:55:35flaviuJehan_: nimrod by example
17:55:41Jehan_Oh, I see.
17:56:59Araqbjz: btw how does Rust deal with closures and their lifetimes?
17:57:31vbttflaviu:also a 'metaprogramming' section will be nice because it's one of the most powerful features.
17:57:42vbttyou could keep it to a very basic example.
17:57:45flaviuhttp://nimrod-by-example.github.io/oop_macro/ sort of covers it
17:57:57flaviuMight need a better name though
17:59:01vbttflaviu: Ah right - just call it 'macros' :)
17:59:37flaviuI'm not sure I like that, its too focused for that name
17:59:43leruSooo.. nobody knows how to remove this "Error: unhandled exception: EOF reached [EIO]" ?
17:59:46flaviuBut regardless, I need to make it easier to find
18:00:00def-leru: do you get the error at compiletime?
18:00:00flaviuleru: Can we see your actual source code?
18:00:16vbttok guys, g2g later.
18:00:22def-bye vbtt
18:00:26leruIt'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:43def-leru: maybe it's the space in the last line
18:01:01lerudef-: nope.
18:01:31def-leru: for me it compiles without any error
18:01:42flaviuThe nimrod code works fine for me
18:02:00bjzAraq: I'm not sure of the exact semantics unfortunately - best person to ask is pcwalton on #rust.
18:02:34def-leru: maybe it's the nimcache setting?
18:03:27bjzAraq: they are being redone in prep for 1.0 - we really need unboxed closures
18:03:43dom96hello
18:03:52Araqhi dom96
18:04:51dom96hi Araq
18:04:55leruProbably the batch is the problem. But I want to run the code after compilation, so this is the easiest way for me.
18:05:07flaviuleru: nimrod c -r ?
18:05:53lerucollect2.exe: error: ld returned 1 exit status;
18:06:33def-leru: do you have write permissions for your directory?
18:08:01leruyes i do
18:08:30flaviuHow about --parallelBuild:1
18:08:41flaviuDoes it turn up any more messages?
18:08:49io2dom96: https://twitter.com/irrequietus/status/489833893953286144 I BEAT you to it :)
18:08:52io2ha ha ha
18:08:54io2:D
18:08:55flaviudom96: http://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/ :D
18:09:06io2flaviu: already tweeted it
18:09:20def-dom96: and on hacker news: https://news.ycombinator.com/item?id=8048014
18:10:20io2reddit is better :P~
18:10:42leruOH! I GOT IT! The "var asd : string = readLine(stdin)" inside of sublimes console does not work and creates this error message!
18:10:43io2I say we have all the major social networks covered
18:10:48io2good work
18:10:51def-leru: ah, ok
18:10:52flaviuFacebook?
18:10:59flaviu:P
18:11:02dom96io2: bah
18:11:12dom96io2: I guess this our little competition now huh?
18:11:15io2I am not there, if you have a twitter account I'll ad the @ tag for you in a reply as well
18:11:29dom96def-: flaviu: Awesome. It's doing very well!
18:11:34flaviuReddit discussion is pretty good too. There aren't any trolls bogging down the conversation
18:11:34io2dom96: :P come on, I love your work man, just teasin ya!
18:11:50dom96io2: Oh don't worry, I know.
18:11:53*X-Scale joined #nimrod
18:12:07dom96io2: I shall retweet you as a reward using the nimrod twitter account :P
18:12:22dom96what about lobste.rs?
18:12:32dom96oh
18:12:33dom96already there
18:12:34flaviuI'd like an invite there BTW
18:12:35io2I 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:54dom96io2: :D
18:13:47io2I'm always around; one of these days I should be popping around with a few goodies of my own :P
18:14:39def-Araq: python has its own fgets implementation to work around the missing \r handling
18:15:17dom96We should totally write "A real python killer" somewhere on Nimrod's site.
18:17:19flaviuGet filwit to draw the scary honey badger eating a python :O
18:18:18io2dom96: yes!
18:19:55dom96flaviu: That's actually a great idea.
18:21:04io2def-: that was a brilliant comment on reddit: https://twitter.com/irrequietus/status/489837060531175425
18:21:11io2so brilliant it was tweetable
18:21:39io2I 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:04def-io2: thanks!
18:22:10io2see something over(ab)used through metaprogramming? turning it to language feature level thing becomes quite straightforward
18:22:15io2np, well earned.
18:22:30def-io2: metaprogramming is also what brought me to Nimrod
18:22:53io2:)
18:26:49AraqJehan_: interesting problem ahead: deepCopy for closures requires a vtable like indirection
18:27:13Araqas we don't know the environment's structure
18:31:14Jehan_Araq: Yes, that's unavoidable, as far as I know.
18:31:40Araqok, so I didn't miss anything
18:31:45Jehan_Though I could dig through research papers to see if my intuition is wrong.
18:31:59Jehan_There's been some work on that (Haskell for distributed systems and such).
18:32:30dom96A lot of favourable comments. Seems a lot of HN loves us now.
18:33:08*enurlyx left #nimrod (#nimrod)
18:35:34AraqJehan_: your intuition is good enough ;-)
18:36:35*kunev quit (Ping timeout: 264 seconds)
18:37:56Jehan_Araq: Here's one talk I was thinking of: http://www.dcs.gla.ac.uk/~jsinger/mmnet11_talks/orczyk.pdf
18:38:11Jehan_Haskell on a NUMA architecture with multiple heaps.
18:38:18Jehan_Sadly, I've forgotten a lot of the details.
18:45:35*enurlyx joined #nimrod
18:45:45def-dom96: HN didn't like Nimrod before? It's how I discovered Nimrod
18:51:04Jehan_I found Nimrod when I was looking for a Pascal dialect with a GC myself, for what it's worth.
18:51:34Jehan_Stumbled on a reference on some Pascal site (forgotten which), and that was that ...
18:54:55bstrieAraq: what is it that you'd like to know about closure lifetimes in rust?
18:55:18dom96def-: 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:19Araqbstrie: closures often create implicit cycles and afaict Rust's lifetimes only support tree-like structures
18:57:28dom96def-: Your comments certainly make a huge difference so thank you for those!
19:00:00bstrieAraq: 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:39bstrieAraq: conceptually, closures in rust are the equivalent of manually stuffing the upvars into a struct and then making that struct callable
19:00:40Matthias247Araq: 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:56bstrieMatthias247: neither of those would allow cycles
19:01:09bstrieMatthias247: also, changes to closures will make the two different closure types obsolete
19:01:33Jehan_bstrie: Environment has pointer to data structure, closure gets stored inside that data structure (typically, for a callback).
19:01:39Matthias247look at the swift documentation, they have an example for cycles through closures ;)
19:02:06bjzMatthias247: closures are being updated to be more general
19:03:36bstrieJehan_: let me think about how rust would handle that, unless bjz gets to it first :P
19:03:41Matthias247that's why I hadded "had"
19:03:51*kunev joined #nimrod
19:04:09Jehan_bstrie: Just wanted to give a quick example how you can get cycles via closures.
19:04:22Matthias247it will happen most likely in all things that involve callbacks. Like UI and other evented programming. Rust hates that anyway ;)
19:05:58Matthias247a widget that owns a button and a callback on the button which referers the button or the widget -> cycle
19:08:27bstrieJehan_: 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:05dom96oh. pcwalton joined the convo
19:17:58bstriedom96: which convo?
19:18:07dom96https://news.ycombinator.com/item?id=8048014
19:20:19bstrieJehan_: 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:53bstrieJehan_: 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:36Jehan_bstrie: Heh. :)
19:22:56NimBotnimrod-code/babel master 244a4b5 Grzegorz Adam Hankiewicz [+1 ±2 -0]: Adds compatibility for Nimrod's 0.9.4 compiler.
19:22:56NimBotnimrod-code/babel master 2958ecc Grzegorz Adam Hankiewicz [+0 ±1 -0]: Updates readme to degrade compiler requirement.
19:22:56NimBotnimrod-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:03dom96<3 gradha
19:28:57*Ven joined #nimrod
19:30:52*Ven quit (Client Quit)
19:41:22adoniscikhow do you write an anon proc whose argument is an openarray?
19:42:11Araqproc (a: openArray[int]) = ...
19:53:25*enurlyx left #nimrod (#nimrod)
19:55:27adonisciksorry 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:25adoniscikI guess my confusion is in representing an openarray in the latter part
19:57:51adoniscikor 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:18def-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:41Araqadoniscik: please don't use the future module. Use the old school syntax.
20:13:16dom96adoniscik: please gist your code
20:19:54flaviudom96: My understanding of how DNS works is fuzzy, how do you figure out the ip address in the networking modules?
20:20:48dom96flaviu: define 'figure out'
20:20:52*leru quit (Ping timeout: 246 seconds)
20:22:03*Jesin quit (Ping timeout: 240 seconds)
20:22:12flaviuI have the string "google.com". How does the program get an address 72._._._?
20:22:56flaviuactually 173.194.37.67
20:23:14flaviubut w/e
20:23:37*Jesin joined #nimrod
20:24:17dom96http://build.nimrod-lang.org/docs/rawsockets.html#getHostByAddr,string
20:25:19flaviuOh, getHostByName
20:25:22adoniscikaraq: interesting. do you mean the do notation?
20:25:56Araqadoniscik: for instance. Or "proc"
20:26:12flaviuVery magical, but no need to deal with what isn't absolutly required. Thanks.
20:28:28adoniscikon an unrelated note, does anyone know how to make sublime correctly comment nimrod code, because I get "invalid indentation" errors
20:28:36flaviuAnother question: Is TIpAddress big endian or little?
20:29:40flaviuadoniscik: Works for me.
20:29:49adoniscikwhich sublime package?
20:29:55flaviuAre you using NimLime? That might do something, IDK
20:30:04adoniscikthat's the one to use or avoid?
20:30:20flaviuI'm using NimLime right now with no issue
20:30:39flaviuThe one to use
20:31:04adoniscikcomments are supposed to be at the beginning of the line. right now they're at the beginning of the block, indented.
20:31:25flaviuYes, thats correct
20:31:38flaviuIf 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:54adonisciki mean like this: http://pastebin.com/yZef4EZX
20:33:48*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:33:49flaviuI 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:06flaviuUnless something has changed very recently
20:34:26Araqohh speaking of which
20:34:32adoniscikreally? it does fail
20:34:37adonisciki'm on 0.94
20:34:40AraqI have "relaxed comment handling" in a branch
20:34:49Araqbut it breaks code ...
20:34:51*bjz quit (Read error: Connection reset by peer)
20:34:54Araqdo we want it?
20:34:56*ics joined #nimrod
20:35:17*bjz joined #nimrod
20:35:45adoniscikwhen 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:20adoniscikIt'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:33Matthias247flaviu: 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:16adoniscikoh, 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:37adoniscikresult = 1.0 worked
20:42:59adoniscikin that case the error message needs to be reworked
20:43:27*Ven quit (Client Quit)
20:44:53dom96adoniscik: 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:29dom96flaviu: Seen this yet? http://www.reddit.com/r/programming/comments/2ayhvu/learn_nimrod_by_example_feedback_appreciated/cj08qcz
20:46:32adoniscikdom96, 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:49flaviudom96: Yep, def- just pointed out to me in a pm
20:47:01dom96adoniscik: Alright. No worries, there is no hurry.
20:47:27flaviuI'm not sure whats going on here: https://gist.github.com/flaviut/50fb28b859b97e17b901
20:48:06flaviuI'm expecting for an unexpected token, but it says that it has to be discarded
20:48:34dom96flaviu: You're expecting 'res' not to be in the global scope?
20:48:46flaviuyes
20:49:08dom96hrm, that is interesting. The parens are unbalanced.
20:49:19dom96I would expect what you're expecting too.
20:50:10flaviuI'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:59NimBotAraq/Nimrod devel 94e8e24 Rory O’Kane [+0 ±1 -0]: Fix link to roadmap on site home page... 2 more lines
20:53:59NimBotAraq/Nimrod devel 935bade Dominik Picheta [+0 ±1 -0]: Merge pull request #1370 from roryokane/patch-1... 2 more lines
20:55:37flaviuI'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:32Araqflaviu: so report it
21:10:33*Skrylar quit (Ping timeout: 240 seconds)
21:11:08flaviuSo its a bug? Ok
21:11:41Araqnot necessarily but I wanna look at it
21:13:00*tinAndi joined #nimrod
21:13:16flaviuOk, submitted
21:18:51*reactormonk_ joined #nimrod
21:19:13reactormonk_I like that nimrod by example.
21:31:36flaviureactormonk_: Thanks, feel free to make suggestions if you'd like
21:32:41reactormonk_I would mention the free syntax somewhere, I haven't seen that in any other language, so it's rather relevant.
21:34:54def-reactormonk_: free syntax?
21:35:47flaviuecho "a", "b", "c"
21:35:48reactormonk_foo(x) vs. x.foo()
21:36:12flaviureactormonk_: Oh, I did mention that
21:36:16reactormonk_Seen that one in Ruby.
21:36:32reactormonk_Where did I miss it?
21:36:33flaviux.foo() is in D
21:42:22*ics joined #nimrod
21:42:50*woodgiraffe joined #nimrod
21:43:04Araqhi woodgiraffe welcome
21:43:52reactormonk_What do you mean by D?
21:43:57flaviuDlang
21:44:09flaviuhttp://ddili.org/ders/d.en/ufcs.html
21:44:10mwbrownHm. 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:36woodgiraffeAraq: howdy
21:45:46Araqwhat's .cimport?
21:46:11mwbrownimportc I meant
21:50:27Jehan_--passL:-lbar
21:52:15flaviuLinux is getting getrandom()!
21:53:38Araqwake me up when it gets a non brain dead retarded archaic file hierarchy
21:54:02flaviuI don't know, I like the everything is a file idea
21:55:06reactormonk_Oh, yet another rant from Araq.
21:56:11*OrionPK joined #nimrod
21:56:25flaviuHow 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:59Demosis it indended that you can index an array by an enum
21:57:04flaviuYes
21:57:22Demoslike array[low(enum)..high(enum), T] then you can ONLY use things of the Enum's type to index it
21:57:30Demoslike I could not say foo[4]
21:57:34mwbrownI think C# might be the only language that bitches at you if you try indexing using an enum without casting it first
21:57:38DemosI would have to say foo[4.enum]
21:58:10Demosright, nimrod says you MUST cast /to/ the enum
21:58:16Demosat least that is what it looks like
21:58:50flaviuI don't see the problem, if your enum is "Colors", just do foo[red]
21:58:50def-Demos: btw, you can write array[enum, T]
22:00:09Demosneat, wanted to know if this was actually an intended feature, apperently it is
22:00:17Demoserror message could be better but whatever
22:01:55Araqflaviu: "everything is a file" has never worked and never will, but this is a story for another time
22:02:09Araqand has nothing to do with this /usr/bin/banana bullshit
22:02:25def-flaviu: i think this is what araq refers to: http://linux.die.net/man/7/hier
22:03:03flaviuThat looks outdated
22:04:23*askatasuna quit (Quit: WeeChat 0.4.3)
22:12:08OrionPKthis nimrod by example project is great btw, kudos to whoever's heading that up
22:14:45flaviuOrionPK: Thanks, if there's anything you'd like changed, just tell me
22:14:48Araqreactormonk_: well I always enjoy good rants ... :P
22:16:31OrionPKflaviu any mention of using babel on there?
22:16:52flaviuNo, I don't know anything about babel actually
22:16:58OrionPKmaybe also a chapter on 'modules'
22:17:06OrionPKearly on
22:17:13OrionPKyou dont know anything about babel?
22:18:01flaviuNope, 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:19adoniscikis(n't) it good practice to declare all side-effect free procs as such using pragma?
22:23:07flaviuI'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:22adoniscikI don't see that keyword in the manual
22:25:33def-adoniscik: not implemented yet
22:26:34flaviuadoniscik: http://nimrod-lang.org/manual.html#nosideeffect-pragma
22:27:57adoniscikoh 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:02Demosugh trackDirty broke again
22:37:26*keshav joined #nimrod
22:37:34keshavis any one hear
22:37:39*Skrylar joined #nimrod
22:37:50keshavhi
22:38:07flaviukeshav: I don't think anyone has gone to sleep yet
22:38:42keshavflaviu can u tell me wether nimrod is compiled or interpreted?
22:38:46adoniscikcan anyone shorten sum(x.map do (t: float) -> float: pow(t, p)) using just map?
22:38:59flaviuIts compiled to C, but there is also a Javascript backend
22:39:13keshavawesome
22:39:33*reactormonk_ quit (Ping timeout: 240 seconds)
22:39:35def-adoniscik: usring just map and not sum?
22:39:58adoniscikI'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:15adoniscikah, pow not intpow, but you get the idea
22:40:33adoniscikI need the sum too
22:40:46*Trustable quit (Quit: Leaving)
22:40:48def-adoniscik: i don't quite understanad what you want
22:42:03adoniscikhow would you find the sum of a map using anon procs?
22:42:23def-adoniscik: using foldl
22:42:52adonisciksure but how to write the anon proc inside map, that's my question
22:44:24Jehan_Do something like this: map(@[1,2,3], proc(x: int): int = x + 1)
22:44:25def-adoniscik: so you want x.map(anon_proc_here) and the result should be what?
22:44:33Jehan_Adjust for whatever you actually need it to do.
22:44:40adoniscikthanks, Jehan_
22:44:56def-ok, guess Jehan_ understood better
22:45:11adoniscikI wanted to do that using the concise anon proc defs in future
22:45:32adoniscikx => x+1 or something
22:46:03dom96map(@[1,2,3], (x) => x+1)
22:46:24dom96may work
22:46:45def-map(@[1,2,3], (x: int) => x+1)
22:46:55adoniscikbingo
22:47:01adoniscikdef-, that worked!
22:47:13adonisciksorry, I'm still stumbling over the syntax
22:47:33*keshav quit (Quit: Page closed)
22:48:10Araqgood night
22:49:18adoniscikbye
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:24dom96'night
23:00:46*betawaffle joined #nimrod
23:01:08adoniscikvector arithmetic, like addition or subtraction, on openarrays is not yet defined right?
23:05:57def-adoniscik: right
23:13:22*bjz joined #nimrod
23:17:05*mwbrown quit (Ping timeout: 256 seconds)
23:19:08def-Araq: I can't do fast readLines with CR and LF and without a buffer for each file.
23:21:30adoniscikis printing of (open)arrays or seqs with echo defined?
23:22:20def-seqs yes
23:22:23def-arrays no
23:22:32adoniscikthat's what I thought, thanks def-
23:22:40def-and what you're looking for is the `$` proc, which turns everything into a string
23:23:00def-when you call echo, $ is applied on every argument
23:23:11adoniscikah, good, so I can write my own
23:23:20def-sure
23:31:51adoniscikcan you cast an array to a seq?
23:32:19flaviuNo, a seq has additional cap and len fields
23:32:48adoniscikwhat cap? couldn't you simply infer the len from the array?
23:33:12flaviuI assume you mean O(1) by cast
23:33:25flaviuBut if you just want to convert, do `@myArray`
23:33:28adoniscikI suppose. I want efficiency.
23:33:39adoniscikbut you already know the len of th earray
23:34:16flaviuA seq is a like a struct of (len, cap: int, data), you can't convert (data) to that without copying
23:34:29adonisciknow I see what you mean
23:38:35*nande joined #nimrod
23:39:14adoniscikmany 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:51flaviuFrom 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:02flaviuI
23:40:08flaviu'm sure someone can correct me on that though
23:40:20def-flaviu: i have the same understanding
23:40:46def-adoniscik: if you want to use sequtils at any cost, use seqs
23:40:58def-but often non-functional-style code is much faster
23:41:02adonisciksuck
23:41:44adoniscikI didn't want to sacrifice elegance for performance
23:41:59adoniscikor I could stick with C
23:42:39adoniscikokay, I'll use seqs for now and postpone optimization
23:46:54adoniscikwhy does echo(@[1,2,3]) work but not echo @[1,2,3]?
23:47:22def-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:40flaviubecause echo @[1,2,3] is parsed as `@`(echo, [1,2,3])
23:47:47def-aah
23:47:51def-right!
23:48:14adoniscikis that reasonable behavior?
23:48:20flaviuNot really
23:48:47flaviuPut `#! 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:41adoniscikI 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:10def-try proc `+`[T](x, y: openarray[T]): seq[T]
23:55:14adoniscikthat's what I thought :)
23:59:26*xenagi joined #nimrod