<< 31-07-2014 >>

00:06:52OrionPKcool
00:11:11*Demos quit (Read error: Connection reset by peer)
00:15:11OrionPKoh cool. http://ideone.com/zAs2Zn
00:43:34*brson quit (Ping timeout: 240 seconds)
00:48:26*Raynes quit (Ping timeout: 260 seconds)
00:52:25*Raynes joined #nimrod
00:52:49*Raynes is now known as Guest20118
00:54:07*Guest20118 quit (Excess Flood)
00:54:44*xenagi joined #nimrod
00:58:29*Raynes_ joined #nimrod
01:01:40*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:29:31*q66 quit (Quit: Leaving)
01:33:59*darkf quit (Read error: Connection reset by peer)
01:35:01*darkf joined #nimrod
01:35:46*darkf quit (Read error: Connection reset by peer)
01:36:07*Raynes_ is now known as Raynes
01:36:07*Raynes quit (Changing host)
01:36:07*Raynes joined #nimrod
01:57:19*EXetoC quit (Quit: WeeChat 0.4.3)
02:04:25*Fx00F joined #nimrod
02:17:24*jpoirier joined #nimrod
02:17:35*jpoirier quit (Client Quit)
02:18:33*ics joined #nimrod
02:25:14*superfunc joined #nimrod
02:29:35*superfunc quit (Ping timeout: 256 seconds)
02:41:50*linkmonitor joined #nimrod
02:43:19linkmonitorAnyone know if it's possible to define a constructor syntax similar to the array constructor syntax with [ ... ]? Like <<1,2>> as an alias for creating some TVector type?
02:49:09*darkf joined #nimrod
02:52:57flaviulinkmonitor: Not unless you want to do some seriously hackish things
02:53:19flaviuHow about `vec[1,2]`?
02:54:08linkmonitorThank you. vec[1,2], 1<>2, and vec(1,2) all work well. It was a speculative type question to find out how built in the array constructor syntax is
02:55:17flaviunight
02:55:25linkmonitornight
02:59:58*flaviu quit (Ping timeout: 272 seconds)
03:05:41*linkmonitor quit (Quit: Page closed)
03:47:15adoniscikspeaking of arrays, is there any reason not to use column-major order since nimrod doesn't have a native preference?
04:10:28*mwbrown quit (Ping timeout: 250 seconds)
04:34:27*ics quit (Ping timeout: 245 seconds)
04:35:14*ics joined #nimrod
04:54:28*xenagi quit (Quit: Leaving)
04:58:29*ARCADIVS joined #nimrod
05:19:42*nande quit (Remote host closed the connection)
06:26:50*superfunc joined #nimrod
06:31:02*superfunc quit (Ping timeout: 245 seconds)
06:42:00Araqadoniscik: intiutive is row-major though, when you think about array of strings, for instance
06:43:36adoniscikI'm interfacing with a FORTRAN library, so I have to decide whether it's worth the conversions rather than sticking with column-major order. I wish there were some guidelines or reference libraries for numerical work. I'm just winging it.
06:45:19Araqwell you're the first, you should write the guidelines
06:52:33Fx00FAraq: in mathematics vectors are column vectors
06:53:24adoniscikthere's that too, but the deciding factor is reducing impedance between the libraries
06:57:41Fx00Fand as nimrod compiles to c, it makes some sense to use c's default order
06:58:02adoniscikdecisions, decisions :)
06:59:46Fx00Fany really good reason to have those ':' after if/for ?
07:07:15Skrylarbecause <...>: is a block
07:07:19*kunev joined #nimrod
07:07:56Skrylarthere's also the "blah do:" notation and you can have macros with "customname: <...>"
07:07:58Fx00Fis that used for macros/templates/metaprogramming?
07:08:06Skrylaryes
07:08:12Skrylarfull consistency between built-in and macros
07:08:14Skrylaror such
07:08:16Fx00Fok, that's a good reason
07:08:30Fx00Fthx
07:08:32Skrylar:)
07:08:41*ARCADIVS quit (Quit: WeeChat 0.4.3)
07:17:44*gsingh93 joined #nimrod
07:20:20*zahary joined #nimrod
07:22:33Araqhey zahary
07:29:19*Boscop_ is now known as Boscop
07:29:37*Boscop quit (Changing host)
07:29:37*Boscop joined #nimrod
08:02:32*Fr4n quit (Quit: Leaving)
08:49:22Skrylarhmm
08:49:30Skrylari need to think of some exercizes for unrestraining programmer brains
08:50:13SkrylarI was just thinking about how growing up in the C world heavily shackles your way of thinking, case in point how a C person will have a "buffer, bufferLen, bufferPos" variable; a lisp/forther will just abstract it once and recycle, the C community will repeat it ad infinitum
09:18:36*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:20:54*Fr4n joined #nimrod
09:30:00*Fx00F quit (Quit: leaving)
09:31:11*adoniscik quit (Ping timeout: 264 seconds)
10:09:39*gsingh93 quit (Quit: Connection closed for inactivity)
10:13:35*woodgiraffe quit (Ping timeout: 260 seconds)
10:28:27*superfunc joined #nimrod
10:32:57*superfunc quit (Ping timeout: 256 seconds)
11:48:29*saml_ joined #nimrod
12:03:53Skrylarreactormonk: ping
12:18:17*mwbrown joined #nimrod
12:23:04*flaviu joined #nimrod
12:35:05*untitaker quit (Ping timeout: 255 seconds)
12:41:02*untitaker joined #nimrod
12:51:25*darkf quit (Quit: Leaving)
13:03:30*Demos joined #nimrod
13:03:54*saml_ quit (Ping timeout: 250 seconds)
13:09:06*mwbrown quit (Ping timeout: 250 seconds)
13:12:25*zahary1 joined #nimrod
13:12:46*Boscop_ joined #nimrod
13:14:44*clone1018_ joined #nimrod
13:15:06*flaviu quit (Ping timeout: 245 seconds)
13:15:06*zahary quit (Ping timeout: 245 seconds)
13:15:10*bstrie_ quit (Ping timeout: 240 seconds)
13:15:10*krusipo quit (Ping timeout: 240 seconds)
13:15:11*Boscop quit (Read error: Connection reset by peer)
13:15:18*def- quit (Ping timeout: 245 seconds)
13:15:18*clone1018 quit (Ping timeout: 245 seconds)
13:15:23*betawaffle quit (Ping timeout: 240 seconds)
13:15:29*def- joined #nimrod
13:15:51*bstrie joined #nimrod
13:15:54*krusipo joined #nimrod
13:16:10*betawaffle joined #nimrod
13:16:52*flaviu joined #nimrod
13:29:13flaviu<span>foo</span>
14:30:01*superfunc joined #nimrod
14:34:20*superfunc quit (Ping timeout: 255 seconds)
14:37:33SkrylarAraq: why are doc comments for enums so derpy?
14:38:24Skrylar(e.g. in doxygen i would put the comment prior to the definition, nimrod doesn't recognize this. a doc comment underneath the = enum <newline> is considered an error, while its ok for = object <newline>; instead, enums take the comment for the first member as the type comment while leaving the first member undocumented
15:14:56*kunev quit (Quit: leaving)
15:17:42*ics joined #nimrod
15:20:51DemosI just got a stack overflow when running nimrod serve in "debug mode" (with --lineDir and --debugInfo)
15:27:43OrionPKjust submitted another bug, probably related
15:29:21Demosdid you update with my fix for those out of range errors>
15:34:27OrionPKI got latest
15:34:31OrionPKyes
15:35:27Demoshm I could not reproduce an error
15:35:32Demosdid you do this in a new file?
15:41:53Demoswell i can not get it to happen... lets see
15:46:11Demosah I got the error
15:48:54DemosWTAF
15:50:11Demoswhen you have a class with a getLength() method and then some getFoo methods that take an integer index you dont really expect -1!
15:56:24DemosOK it should be fixed now
16:03:52OrionPKcoo
16:03:55OrionPKi'll retest
16:05:10OrionPKworked
16:11:04*flaviu quit (Remote host closed the connection)
16:12:20*flaviu joined #nimrod
16:15:55Demosyeah, I also made the completions work if you have spaces in your project path :D
16:16:12Demosalthough that may have broken completions for stuff in subfolders
16:22:25*Boscop_ is now known as Boscop
16:22:26*Boscop quit (Changing host)
16:22:26*Boscop joined #nimrod
16:24:53*io2 joined #nimrod
16:31:11*superfunc joined #nimrod
16:35:50*superfunc quit (Ping timeout: 255 seconds)
16:39:00Demosdoes nimrod have something like offsetof or do I need to do like cast[pointer](addr cast[Object](nil).field)?
17:03:18dom96it doesn't
17:03:36dom96the particle benchmarks has a template which implements it
17:06:29*flaviu quit (Remote host closed the connection)
17:06:47*flaviu joined #nimrod
17:08:28*q66 joined #nimrod
17:14:53*Ven joined #nimrod
17:31:09*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
17:34:00Demosyeah I made one
17:55:24*Fx00F joined #nimrod
18:00:21*adoniscik joined #nimrod
18:04:37*Kelet joined #nimrod
18:06:46*kunev joined #nimrod
18:08:24*enurlyx joined #nimrod
18:10:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:16:22*io2 joined #nimrod
18:31:57*superfunc joined #nimrod
18:35:09*Ven joined #nimrod
18:35:50*Guest98548 joined #nimrod
18:36:22*superfunc quit (Ping timeout: 250 seconds)
18:36:49*mwbrown joined #nimrod
18:52:01*Guest98548 quit (Read error: Connection reset by peer)
19:03:41NimBotnimrod-code/packages master 5b66a9c def [+0 ±1 -0]: Add nim-nanomsg
19:03:41NimBotnimrod-code/packages master a299434 Dominik Picheta [+0 ±1 -0]: Merge pull request #75 from def-/master... 2 more lines
19:25:06*Demos quit (Quit: Leaving)
19:40:57enurlyxHow can I pass a PNimrodNode from one macro into another, without the PNimrodNode beeing converted to an new PNimrodNode of kind nnkIdent?
19:43:19Araqenurlyx: you can use getAst(macroCall(x, y, z)), I think
19:43:46Araqthe usual way of doing it is to pass it to a .compileTime proc though
19:44:10enurlyxproc works, but i will lose the n[] shortcut
19:44:28Araqer ... why?
19:44:52enurlyxbecause that access is only for macros?
19:45:15Araqnah
19:46:15enurlyxcomcallwrapper.nim(25, 14) Error: cannot generate code for '[]'
19:46:39enurlyxbut as macro works
19:47:22Araq.compileTime
19:47:33Araqadd this to your proc
19:48:35*Ven quit (Read error: Connection reset by peer)
19:49:36enurlyxcool thanks. now it works like i wanted it to work.
19:49:45*Ven joined #nimrod
20:07:32*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:08:03*Demos joined #nimrod
20:08:34*Matthias247 joined #nimrod
20:15:36*flaviu quit (Ping timeout: 250 seconds)
20:19:14*flaviu joined #nimrod
20:20:15*Trustable joined #nimrod
20:25:20*gsingh93 joined #nimrod
20:29:04*flaviu quit (Ping timeout: 240 seconds)
20:32:33*kunev quit (Ping timeout: 240 seconds)
20:36:09*Ven joined #nimrod
20:38:13*flaviu joined #nimrod
20:40:24*brson joined #nimrod
20:53:53*brson quit (Ping timeout: 240 seconds)
20:58:49*flaviu quit (Remote host closed the connection)
21:05:18*brson joined #nimrod
21:09:22*Trustable quit (Quit: Leaving)
21:14:43*flaviu joined #nimrod
21:29:57*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:50:04*brson quit (Ping timeout: 240 seconds)
21:54:38Demosquestion: why do some warnings/errors display [XErrorNameInTheCompiler] after them and some just display the error?
21:55:16Araqhints and warnings to that
21:55:22Araqso that you know how to disable them
21:55:24*brson joined #nimrod
21:57:22Demosobjections to adding that to errors as well?
21:57:44def-but you can't disable errors?
21:58:25Demos it is really handy for parsing them though
22:03:04Fx00Fproc f(a, b :int) : auto = var (c, d) = f(a - 1, b - 1) if a == 0 or b == 0: return (a,b) else: return (3,3)
22:03:07Fx00Fecho f(2, 3)
22:03:33Fx00Findentation.. well, tuple expected
22:04:58def-Fx00F: s/auto/tuple[x,y: int]/
22:05:39Fx00Fthanks
22:06:16def-Fx00F: difficult to automatically infer that the return type will be tuple while still inside the function which recursively calls itself
22:06:21def-(i guess)
22:06:47Fx00Fundecidable i guess
22:07:33Fx00Fwell, udecidable for sure
22:16:16*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:17:52Araqso .. who wants to fix the most recent JS codegen bug?
22:18:10Araqdef-?
22:19:45*Matthias247 quit (Read error: Connection reset by peer)
22:21:57Araqreactormonk?
22:23:19def-Araq: i can take a look
22:23:45*io2 joined #nimrod
22:24:19Araqthanks
22:29:20Demosit is annoying that you can not say table[key].field = value
22:29:47Araqtable.mget(key).field = value is not too bad
22:30:17Araqand we'll get that once somebody rewrote overloading resolution
22:30:33Araqdidn't you volunteer for that?
22:33:14*superfunc joined #nimrod
22:37:43*superfunc quit (Ping timeout: 256 seconds)
22:37:44*mwbrown quit (Ping timeout: 250 seconds)
22:38:18Demosyeah I did, but I did not know where to start, and I figured that finishing the VS plugin would be something I could... well.. finish
22:39:17Demosand that would require overloading on return type would it not?
22:39:24Demosor maybe just on the type of the argument
22:39:30Araqwhere to start? replace the module with your own implementation
22:39:37Araqand no, it would not
22:40:03Araqcall a special a[i] if a is an lvalue
22:40:14Araqin fact, that's already possible with AST based overloading
22:40:28Demoscan we not currently overload on "varness"?
22:40:39Araqyes we can
22:40:51Demosso why not do that?
22:40:58Araqdunno lol
22:41:10Araq'var T' still scares me as a return type
22:42:02Demoswell you are going to either get its address with addr, which is unsave in the first place, or it is going to turn into a T when you assign it to something
22:42:29Araqthe thing is that is supposed to be memory safe
22:42:44Araqbut we are missing some checks for that to work
22:42:55Demosand for sigmatch there is no documented interface for the module and a bunch of exported functions
22:43:17Araqwell you should only change the implementation
22:43:37Demoswell then why even rewrite it in the first place
22:44:02Araqbecause it's not spec'able
22:44:19AraqI guess we should start with a spec though
22:44:32Demosyeah little bit
22:44:38Araqand then implement it, fix it, fix the spec
22:46:14DemosI sorta like the idea of converting everything to typeclasses then doing the subset analysis, but I don't understand all of the code there
22:47:17Araqthe code is also performance critical for obvious reasons
22:47:30Demosyeah that is one problem with that plan
22:50:02Araqalso auto deref for pointers needs to be implemented
22:50:40Demosdoes that have anything to do with overload resolution (aside from allowing pointers to be used for some params)
22:51:24Araqwell yes, that's where it has to be implemented
22:52:04Demosoh. Right.
22:52:11Demosdo we have auto deref for refs?
22:56:18Araqwe have it for dots, foo.bar instead of foo[].bar
23:14:41*flaviu quit (Read error: Connection reset by peer)
23:16:04*bjz quit (Ping timeout: 240 seconds)
23:17:10*flaviu joined #nimrod
23:17:13*darkf joined #nimrod
23:24:22*enurlyx left #nimrod (#nimrod)
23:26:39def-Araq: https://github.com/Araq/Nimrod/blob/devel/compiler/jsgen.nim#L758
23:27:14Araqdef-: pong
23:27:16def-i want to write r.res = stmt here, but can't figure out how to do that
23:27:27def-I thought I could use genAsgn
23:28:21Araqwhy? it puts it into 'stmt' instead which is then moveInto(p, stmt, r)
23:28:34Araqwhich is what you want to accomplish?
23:29:22def-oh right, but somehow that doesn't appear in the resulting JS
23:29:45Araqmaybe you need to move var cond, stmt: TCompres into the loop body
23:29:58Araqthen they will get resetted
23:30:06Araqwhich might be the problem
23:30:41def-no difference
23:31:26Araqyeah, gen sets it to nil anyway
23:31:44Araqwell in what way is the generated code wrong?
23:31:58def-inside the if{} and else{} there is nothing
23:32:12def-while there should be an assignment Tmp1 = 1/2
23:33:04def-Ah, stmt.kind is resNone
23:34:42def-I see why
23:34:46Araqbtw I consider the jsgen a good starting point when hacking the compiler
23:34:51def-for int literals the res type is not set
23:35:49Araqthere are only 2 tricks here iirc
23:36:31def-ok, fixed
23:36:42def-2 tricks?
23:36:46Araqtrick 1: we perform some analysis if we need goto based code or if expression based code for 'and' and 'or' suffices
23:37:20Araqtrick 2: sometimes we introduce fat pointers, for instance for 'var int'
23:37:39Araqa fat pointer is a [base, idx] as a JS array iirc
23:38:03Araqthat's it, the rest is boring
23:38:42def-i can imagine why trick 1 is necessary, what about the fat pointers? (I don't know JS actually)
23:39:07Araqproc foo(x: var int) = inc x
23:39:22AraqJS is like Java in this regard, only pass by value is supported
23:39:27*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
23:40:04Araqso we pass [a, 0] to foo and foo does a[0] += 1
23:40:19Araqand then we need to ensure we can do that
23:40:32Araqso if you do foo(local_int)
23:41:10Araqthe compiler translates local_int into local_int[0] everywhere and lifts it into a single element array
23:41:54Araqit's crazy :P
23:42:47OrionPKwhy [a, 0]
23:42:50Araqto compensate for this, we translate 'ref object' into a JS object, so no additional indirection is produced
23:42:53OrionPKand not just [a]
23:43:08AraqOrionPK: addr(a) becomes [a, 0]
23:43:17OrionPKi know
23:43:24OrionPKbut why not just addr(a) become [a]
23:43:56Araqand how do you do addr(a[8]) then?
23:44:03def-OrionPK: so it also works for arrays?
23:44:06OrionPKah
23:44:16OrionPKmakes sense thanks
23:46:43def-Tested around a bit and made a pull request
23:48:19Araqexcellent
23:48:37Araqwhat about the other JS bug? the high vs len bug?
23:48:42Araqor has that been fixed?
23:49:06def-still open
23:49:12def-I'll take a look too