<<27-03-2013>>

00:03:53*fowl quit (Ping timeout: 245 seconds)
00:21:22*q66 quit (Remote host closed the connection)
04:37:21*fowl joined #nimrod
08:10:42*XAMPP quit (Read error: Connection reset by peer)
08:27:42*Trix[a]r_za is now known as Trixar_za
09:01:54*reactormonk quit (Ping timeout: 272 seconds)
09:14:16*reactormonk joined #nimrod
09:47:48*zahary joined #nimrod
10:01:07*Trixar_za is now known as Trix[a]r_za
10:15:45*Trix[a]r_za is now known as Trixar_za
10:27:55*Trixar_za is now known as Trix[a]r_za
12:47:07Araqping Z
12:47:10Araqping zahary
12:48:50zaharyhi Araq
12:50:02AraqI'm working on the lazy semchecking of operands but your changes with nkDo make me puzzled
12:50:58zaharylet me take a look to remind myself of the code
12:51:03zaharywhere was it?
12:51:09Araqwell I've implemented lazy semchecking and it works
12:51:23Araqbut I wonder if sigmatch:710 is still necessary
12:55:27zaharyI'm looking at the nkDo commit. My first note about fixImmediateParams was about a problem with templates when you pass an invalid code block that was sem checked like a closure and produced errors
12:56:49Araqyeah but that's due to your nkDo/nkStmtList merge
12:57:03zaharythe change in sigmatch seems to be related to this. it just detects the effect of fixImmediateParams
12:58:03zaharyso basically, if the closure body is sem-checked lazily now only when used as a real closure and not as a template argument, then it's OK to remove the code
12:58:40zahary"closure body" = "the passed block"
13:00:41Araqwell but you also do:
13:00:50Araq elif f.kind == tyTypeDesc:
13:00:52Araq result = arg
13:00:53Araq else:
13:00:55Araq result = argOrig
13:03:05zaharyare you opposed to this? I find it more convenient to work this way. basically, the user has specified that he wants a typedesc paramenter, so I give him a typedesc instead of AST tree
13:05:38zaharyI was going to argue about this in some other cases too. Static params(expr[strinng]) should not be passed as AST as well.
13:06:11zaharythe compile-time rope formatting code needed this badly
13:06:29Araqwell if we remove all these special cases it'll get 'copyTree(arg)'
13:06:56Araq(I think the copyTree is unnecessary now)
13:07:09Araqso I can't really follow
13:07:26Araqyeah you requested a typeDesc but you'll get a typeDesc
13:07:37zaharylet me describe the problem
13:07:57Araq result = argOrig # this is what's questionable
13:08:01zaharysay you call a macro with an expression that returns a type, but is more complex than just a name
13:08:19zaharydo_something_with_type(choose_type(foo, bar))
13:09:09zaharyit's very inconvenient to get the AST tree of "choose_type(foo, bar)", instead of the actual type
13:09:17Araqyep
13:10:15zaharywell, result = argOrig is there to avoid "dirtifying" of the AST in the regular case
13:11:13Araqbut why do we need this?
13:11:18*Trix[a]r_za is now known as Trixar_za
13:11:33Araqyou can always use callsite() to get the original ast
13:11:37zaharywhen you say that you accept "expr" or "stmt", you don't want identifiers to be converted to nkSym for example (it used to be like this for a while and I had problems related to it while developing the unittest lib)
13:12:00zaharycallsite may be a good work-around, but I'm not sure what is the better default
13:13:08Araqwell have a look at prepareOperand please
13:13:20zaharyin sem.nim ?
13:13:25Araqsigmatch.nim
13:14:53Araqit doesn't deal with tyStmt yet
13:15:19Araqbut the semantics are quite clear: if the formal is a tyExpr we don't want any semchecking
13:15:50Araqotherwise if it hasn't been sem'checked (a.typ.isNil), it is
13:17:15Araqhowever, expr[string] is very different
13:17:26Araqit means the opposite of 'expr'
13:17:45Araqnot only semcheck it, but in fact evaluate it at compile-time
13:18:17zaharythat's why I call them static params to eliminate any confusion. expr[string] is just a matter of encoding it somehow in the code and the compiler
13:18:51Araqalright well I'm against these hacks now :-)
13:19:17Araqso I may add tyStatic instead
13:20:03zaharyone way to define it in an alternative way is to say "expr" is compile time value. if it's not given a type, it will be matched and represented by any AST tree that you pass
13:21:36Araqspeaking of which, I also plan to introduce quite some type flags like 'hasDestructor' that are lifted up the type graph
13:21:41zaharythere was some other argument for tyExpr related to generic params, but I can't quite recall it
13:22:35Araqso there is no need for the deep checking everywhere in the compiler
13:22:56zaharythere is hasDestructor already
13:23:12Araqyeah but it's hackish
13:23:23Araqwith a global dummy symbol
13:23:35zaharydestructor can be either a pointer to symbol, nil for "no destructor" and a special value for ...
13:23:41zahary... not checked yet
13:23:55Araqalso ccgtypes.containsCompileTimeOnly() seems to be wrong ;-)
13:24:08Araqas it has no recursion check
13:24:14zaharywell, it's hackish, but also efficient. why waste memory
13:25:13zaharyalright (about compileTimeOnly)
13:25:23Araqwarning: nil here may not necessary
13:25:24Araq mean that there is no destructor.
13:25:34Araq--> that's the problem
13:25:51zaharywhere was this
13:25:53zahary?
13:26:04Araqit's your comment in ast.nim
13:26:46zaharyalright, so nil means "not checked yet"
13:26:56zaharyand the special value is for "no destructor"
13:27:52Araqwell I want to check for p(q()) where q yields a type with a destructor
13:28:07Araqand forbid it for now
13:29:00Araqand it's confusing if 'nil' doesn't mean what is natural ;-)
13:29:04zaharythe way it's supposed to work is that you call instantiateDestructor and it returns "hard" true or false whether the type has a destructor
13:29:26zaharyif necessary, it performs the analysis, otherwise it returns the cached result
13:30:48zaharyagain, it was a bit more efficient to work this way, it's easy to initialize the type with the special value to mean "not checked yet"
13:32:12Araqwell I need these flags for other things like "hasGCedMemory", "hasGenericType"
13:32:46Araqand I don't think they use any additional space in PType
13:33:01Araqwe already use a full word for the flags iirc
13:33:30zaharythere are free bits in the type flags, but still for destructors in particular you don't need them
13:33:43Araqalso instantiateDestructor doesn't work as nicely as it takes a PContext
13:34:07zaharybut any solution that performs the analysis lazily is likely to need it
13:34:32zaharywhat would be different if you used flags?
13:34:57AraqI'd simply query the type if it contains any destructor
13:35:36Araqand as you said, the flag doesn't mean the destructor symbol is set
13:36:29Araqbecause for arrays for instance we don't need an explicit destructor
13:37:02Araqbut alright, it's not that important
13:37:35Araqhow do you think the p(q()) problem should be tackled?
13:39:06zaharyone easy way is turn the call into a stament block, where the params the turned into variables
13:39:06Araqif we transform it to: let tmp = q(); p(tmp) this has consequences for macros
13:39:41Araqin particular it has consequences for TR macros
13:40:39zaharyhmm, you can do it late in the codegen and evals, but it will be more work
13:41:45zaharyI had an idea once about "post-call statements" in the expr templates
13:42:24zaharyif this existed, its mechanisms would have been sufficient for destructors as well
13:43:01*fowl quit (Ping timeout: 248 seconds)
13:47:13Araqwell we have the fields iterator now for objects; if only '=' would be overloadable, we'd have a perfect user definable '='
13:47:46Araqhowever destructors are harder as they're invoked implicitly at scope exit
14:03:58Araqzahary: if we ensure that calling a destructor twice has no effect, we can also simply invoke it for every *parameter* at the end of a function, right?
14:04:52Araqso p(q()) # p calls the destructor
14:08:09Araqah never mind, cant work
14:08:21zaharycome on, it's not that hard to implement it properly :)
14:09:55zaharybtw, I wanted to add a node flag to the try blocks inserted for destructors that will allow me to use C++ destructors in the codegen after all (as an option/policy)
14:11:01Araqno node flag, it should be nkHiddenTryStmt instead I think
14:12:12zaharysounded easier to do with a flag, but I don't mind
14:13:16AraqnkHiddenTryStmt could be hidden in renderer.nim though I don't know whether it's a good idea
14:57:58*fowl joined #nimrod
15:05:49*q66 joined #nimrod
17:20:55*avarus joined #nimrod
17:20:57avarushi
17:22:56*xcombelle joined #nimrod
17:23:21Araqhi avarus
17:24:21avarushey Araq
17:24:30avaruseverything allright?
17:24:50Araqsure :-)
17:25:24avarusnimrod evolving :)?
17:25:59avarusI've given up ada btw. :P
17:26:24avarusit's a good language but too few people are using it so I have to reinvent every wheel I need
17:26:33Araqnimrod's always evolving
17:26:43avarusguessed that
17:26:54avarusthe language is still changing, I guess?
17:27:19Araqnot that much
17:27:47Araqwe're mostly fixing bugs and adding features
17:27:57avarusah cool
17:28:20Araqwhat wheels do you need?
17:29:14avaruse.g. amazon s3 "bindings" :)
17:29:49Araqnever heard of that
17:29:57Araqwhat's "amazon s3"?
17:30:49avarusit's the "cloud" of amazon; you can store your files there and request them via simple http
17:31:56avarusyou probably encountered a file that was served by amazon servers :)
17:32:07avarusthey often have the url "amazonaws"
17:32:16avarusbut you can cname that as well
17:32:26Araqsounds like some protocol on top of http
17:32:33avarusno it's not
17:32:37avarusit's just http
17:32:42Araqwe have an httpclient in the stdlib ;-)
17:33:02avarusya, I know but it's also oauth stuff which makes it ugly :P
17:33:29avaruss3 was just an example :)
17:33:36avarusthere's more in ada I am missing
17:33:47avarusthe language is fine but the eco system is too small
17:33:58avarusand it's not going to grow :)
17:34:08avarusthat's important to notice
17:34:48avarusnimrod is young and if people like it they will write libs for it
17:34:50avaruscomponents
17:34:55avarushowever it's called for nimrod
17:42:00Araqit's called "module" or "package" I guess
17:43:59avarusk
17:45:14Araqactually we're still trying to figure out how to do package management ;-)
17:45:39avarusmake it simple :)
17:46:38AraqI'd like to copy Go's approach but that doesn't deal with versioning afaik
17:46:48*fowl quit (Ping timeout: 245 seconds)
18:07:33*Trixar_za is now known as Trix[a]r_za
18:23:36Araqping zahary
18:23:42reactormonkwhee zahary \o/
18:48:13*avarus quit (Remote host closed the connection)
19:05:07*q66 quit (Remote host closed the connection)
19:07:19*q66 joined #nimrod
19:57:11*xcombelle quit (Remote host closed the connection)
20:15:16dom96hello
21:09:04Araqhi dom96
21:09:11dom96hey Araq
21:09:19dom96what's up?
21:10:17Araqnot much
21:24:37*gradha joined #nimrod
21:25:33*Trix[a]r_za is now known as Trixar_za
22:09:09dom96gradha: Any reason you decided to make the rss link /threadActivity.xml and not for example /rss?
22:09:39gradhaI'm going to add also /postActivity.xml
22:09:54dom96alright
22:10:30gradhaI don't know anything about fancy webs, maybe the cannonical way would be /rss/threadActivity and /rss/postActivity without extensions?
22:11:15dom96Also I think the links in the atom feed should actually be linking directly to the post. Since they mention what was actually said for a specific post.
22:11:18*dom96 can add that
22:11:32dom96threadActivity.xml is fine I guess
22:11:54gradhaI'm adding the link to direct post now, creating local tests for paged threads
22:12:27dom96alright, I won't add it then.
22:12:38dom96An anchor is already in place for each post btw.
22:12:52dom96Just need to append #postID
22:12:54gradhayes, I'm looking at that, will create a common function to use by both rss
22:13:19dom96github uses username.atom for atom feeds of a user's activity feed.
22:13:58dom96same for their blogs
22:14:44gradhathat's wrong from a file type perspective, .atom doesn't mean anything, xml does
22:15:03gradhaI thought mime types were precisely for that distinction: file extension vs content type
22:15:03dom96sure, i'm fine with how it is now.
22:17:12gradhainteresting stack trace http://pastebin.com/sxZZc7gs
22:17:32gradhathis is creating a reply with the text "8"
22:17:52gradha" 8" fails too, " 8 " works
22:17:59dom96lol
22:18:08dom96That's not good.
22:18:52gradhainteresting, " -8" renders with a square
22:18:54dom96I suppose I can try to fix it, I bet Araq is busy with hardcore compiler work.
22:19:44gradhamaybe the forum could have a "disable syntax" option, or something, at least I'm willing to implement mardown
22:20:47dom96Would require a new db field, but can be done.
22:21:25dom96perhaps we should make a 'syntaxType' field and have 'rst' and 'none', so that we can extend it in the future easily.
22:21:50dom96Implementing markdown may not be trivial, and the rst parser supports some markdown I think.
22:21:59gradhaan int to a hardcoded table would be enough
22:22:24gradhaI'm thinking of stealing stackoverflow's real time javascript markdown preview. if it's js
22:22:27dom96yeah, wasn't really thinking about what data types will be used in SQL.
22:22:35Araqomg not again
22:22:58Araqthe rst parser does support markdown
22:23:12Araqheck, markdown is not even defined properly
22:23:24dom96IMO proper quoting would be better.
22:23:32gradhaI know, I'm going to write my own version, with black jack and hookers
22:23:56dom96Araq: I don't get why you dislike markdown.
22:23:58gradhaactually I'm going to write gradhadown, for the ladies
22:24:23Araqit's not that I dislike markdown ...
22:24:36Araqit's just that markdown is a subset of RST, mostly
22:24:50Araqand our RST parser supports markdown afaict
22:25:17gradhaI happen to suffer from NIH and dislike both mardown and rst, so... it's inevitable I'll make my own failure, eventually
22:25:46Araqgradha: that's actually a serious bug
22:25:54Araqthe rst parser should never fail
22:26:18Araqthat might be used as a DOS attack
22:26:27gradhait was likely implemented for small values of the word never
22:27:00Araqhowever, the rst.nim(607) doesn't contain any array index expression ... :-/
22:28:01gradhamaybe its one of those strange mac only bugs, can you try with a local version of nimforum? just answer with an 8 to a thread
22:29:59Araqno I think it's quite clear what's wrong here
22:30:32dom96fails here.
22:30:40dom96Forum doesn't crash thanks to jester though :P
22:31:04*dom96 hugs jester
22:31:33gradhait's awkward touching night again?
22:32:05dom96sure, why not.
22:32:36gradhabtw, electronic sleep inducing butterfly lovers may like http://www.youtube.com/watch?v=epvFaBeqii8 too
22:33:00gradhaI think there's a better song in that album, but it's so rare it's not on youtube
22:35:12Araqdom96: add ' and result < p.tok.len' in line rst:605 and see if that fixes it please
22:35:24dom96will do
22:35:32dom96gimme a couple of minutes
23:08:31*gradha quit (Quit: bbl, have youtube videos to watch)
23:29:34*Trixar_za is now known as Trix[a]r_za
23:29:44dom96!repos
23:29:44NimBotAnnounced repos: Araq/Nimrod, nimrod-code/nimbuild, nimrod-code/aporia
23:29:54dom96!addrepo nimrod-code nimforum
23:29:54NimBotDone.
23:30:20NimBotnimrod-code/nimforum 4c2b5d1 Grzegorz Adam Hankiewicz [+1 ±0 -0]: Creates a .gitignore to avoid generated files.
23:30:20NimBotnimrod-code/nimforum 01f480a Grzegorz Adam Hankiewicz [+0 ±2 -0]: Adds hyperlinks to profile pages.
23:30:20NimBotnimrod-code/nimforum 9d9772e Grzegorz Adam Hankiewicz [+0 ±1 -0]: Changes forum's header links.... 4 more lines
23:30:20NimBotnimrod-code/nimforum eab0673 Grzegorz Adam Hankiewicz [+0 ±2 -0]: Implements rss for thread activity.
23:30:20NimBotnimrod-code/nimforum b5d190e Dominik Picheta [+1 ±2 -0]: Merge branch 'pr_hyperlinks_user_profiles' of git://github.com/gradha/nimforum into gradha-pr_hyperlinks_user_profiles
23:37:40dom96Araq: Doesn't help.
23:39:58Araqbut you added it before the 'continuesWith' condition, right?
23:41:24dom96nope :P
23:41:57Araqwell you have to use your brain
23:42:24dom96well I found it puzzling that the line with the exception points to 'inc result'...
23:43:07dom96ok, that fixed it
23:43:25Araqgood
23:45:17NimBotnimrod-code/nimforum f9fa9b4 Dominik Picheta [+0 ±2 -0]: Reverted back some risky changes.
23:58:14NimBotAraq/Nimrod 6f3452d Dominik Picheta [+0 ±1 -0]: Fixed issue with rst parser failing to parse a specific character.
23:58:14NimBotAraq/Nimrod c7a6a87 Dominik Picheta [+0 ±1 -0]: Fixed some recvLine deprecation warnings in httpserver module.