<< 18-06-2013 >>

01:01:24*Trixar_za is now known as Trix[a]r_za
01:17:49*Araq_ quit (Read error: Connection timed out)
01:18:25*Araq_ joined #nimrod
01:43:34*ARCADIVS joined #nimrod
01:45:08*DAddYE quit (Remote host closed the connection)
01:52:42*EXetoC quit (Quit: WeeChat 0.4.1)
02:36:59*DAddYE joined #nimrod
04:03:00*zz_fowl is now known as fowl
04:16:09*OrionPK quit (Read error: Connection reset by peer)
04:24:15*Endeg joined #nimrod
04:25:42*DAddYE quit (Remote host closed the connection)
05:02:40*XAMPP quit (Read error: Connection reset by peer)
05:03:06*XAMPP joined #nimrod
05:03:06*XAMPP quit (Changing host)
05:03:06*XAMPP joined #nimrod
05:08:08*DAddYE joined #nimrod
05:39:03*ARCADIVS quit (Ping timeout: 260 seconds)
05:43:45*ARCADIVS joined #nimrod
05:55:24*Araq_ quit (Read error: Connection timed out)
05:56:23*Araq_ joined #nimrod
06:09:38*fowl is now known as zz_fowl
06:18:12*q66 joined #nimrod
06:23:19*ARCADIVS quit (Quit: WeeChat 0.3.8)
07:18:48*Araq_ quit (Read error: Connection timed out)
07:20:25*Araq_ joined #nimrod
07:45:15*Araq_ quit (Read error: Connection timed out)
07:46:25*Araq_ joined #nimrod
08:00:41*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803])
09:02:24*DAddYE quit (Remote host closed the connection)
09:08:36*EXetoC joined #nimrod
09:45:39EXetoCmeep meep
10:01:44*DAddYE joined #nimrod
10:06:10*DAddYE quit (Ping timeout: 252 seconds)
10:30:49*Araq_ joined #nimrod
10:31:32Araq_EXetoC: newSeq(); setLen(0) is newSeqOfCap(), you're right it's missing in system.nim
10:31:58EXetoCok
10:41:19*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803])
11:03:28*DAddYE joined #nimrod
11:53:12EXetoCzz_fowl: is classimpl mostly a way of getting a hierarchical syntax?
12:52:06*zahary_ quit (Read error: Connection reset by peer)
12:52:43*zahary_ joined #nimrod
13:02:32*XAMPP-8 joined #nimrod
13:12:09*XAMPP-8 quit (Read error: Connection reset by peer)
13:33:04EXetoCcan only the compiler process pragmas?
13:33:17EXetoCand is {.foo} supposed to be syntactically valid?
13:34:06dom96what else should be able to process the pragmas?
13:34:09dom96and yes, that is valid.
13:36:17EXetoCok so only one dot is needed
13:36:59dom96the second dot is optional, yes.
13:37:08dom96I prefer to include both though.
13:38:01EXetoCyeah, might as well
13:39:06EXetoCdom96: users maybe. I was just trying to figure out if it'd be easy to implement an invariant construct in user code, without making it obtrusive
13:39:29dom96Ahh, well macros can process them.
13:40:45EXetoCoh yeah, classimpl is a macro even
13:41:54dom96And {.someMacro.} is syntax sugar for someMacro:
13:43:04EXetoCok
13:49:19EXetoCdom96: and multiple macros are often used, so I guess it isn't a big problem
13:51:30EXetoCI think classimpl for example adds function parameters programmatically, so maybe it's even possible to add additional code to the function body as well
13:52:05EXetoC"
13:54:12EXetoCclassimpl might be doing that too. zz_fowl, does it?
13:54:17EXetoCI'm assuming that you are fowlmouth
13:58:01dom96It is possible, yes.
13:59:07EXetoCcool. I'll try to implement this construct then
16:06:27*DAddYE quit (Ping timeout: 268 seconds)
16:51:12*DAddYE joined #nimrod
16:52:28EXetoCI don't want to go back to D now. the two languages I've learnt recently (Rust and Nimrod) are much more interesting
16:52:48EXetoCand both seems to have devs that actually use the language on a daily basis :>
16:53:41dom96Great :D
16:54:29EXetoCNimrod seems to be a slightly better language though, if only for its syntax
16:54:44EXetoCdom96: I just have to convince this other guy to convert :>
16:55:33dom96I'm sure you can do it with ease :)
16:56:33dom96I am almost done with my school exams, so soon there will be even more activity btw.
16:58:33EXetoCgreat
17:02:47*zz_fowl is now known as fowl
17:04:19fowlEXetoC: yes it sees if there is a self parameter and if not adds it in the first slot
17:05:24fowlAlso a constructor is generated
17:10:59EXetoCright
17:14:30fowlWhat are u working on
17:24:03EXetoCfowl: an invariant macro (for enforcing contracts before and after (public?) "member" functions
17:25:28EXetoCwell, the visibility of the function won't matter if I make it per-function
17:26:17fowlOh ok
17:40:22Araqreactormonk: which new repo? link?
17:42:23EXetoCit seems like macro nesting isn't really an issue, so I guess a macro that acts on whole types isn't going to be problematic
17:43:12fowlEXetoC: bug araq for macros in typedefs I want it too
17:43:45Araqdepending on your coding style even a simple macro is problematic due to bug #413
17:45:44EXetoCfowl: oh. your macro takes an expr and a stmt, which is slightly different in that regard I assume
17:46:32fowlEXetoC: idle which macro ur referring to and I'd have to look I wrote most of them long ago
17:46:40fowlIdk *
17:47:35reactormonkAraq, the new repo style of github
17:48:24EXetoCfowl: I meant something like invariant: classimpl...
17:48:46EXetoCanyway, I'll start off with per-function macros
17:51:37Araqfowl: if your macro ends up generating a simple identifier for the type it should work already
17:52:08Araqand you can easily implement it yourself I think
17:52:37Araqedit semtypes.nim:820 and make it: result = n.typ
17:53:43EXetoCtime to exercise
17:53:47EXetoCso boring :-)
17:56:22fowlAraq: I mean type foo {somemacro} = object
17:57:47Araqfowl: oh ...
17:59:12Araqping zahary_
18:21:37*gradha joined #nimrod
18:29:56gradhahighlite.tokenClassToStr exists because $TTokenClass has a significant impact on performance?
18:33:32Araqnah, because it's been translated from pascal I think
18:34:19gradhahmmm lib/packages/docutils/highlite.nim(47, 43) Error: cannot open 'doc/keywords.txt'
18:36:17gradhaoh, I expected aporia to use that module, but maybe nobody has used it yet? the local relative file slurping seems to be a problem
18:37:06fowlApproach uses gtksourceview
18:37:09fowlAporia
18:37:24gradhaluckily cp can save the day
18:38:44gradhamaybe highlite.nim should be generated from a highlite.nim.template instead during distribution or some koch phase to avoid the relative include?
18:40:38Araqhmm why not include doc/keywords.txt in the docutils package?
18:41:52gradhamaybe doc/keywords.txt is used somewhere else and hence the slurping to avoid duplicating the contents?
18:42:18Araqyes it's included by the manual too
18:42:50AraqI don't mind duplication for that too much
18:43:03Araqkeywords change rarely enough so that it's a nonissue
18:44:42gradhagorge? funny name
18:45:54Araqpeople prefer staticExec and staticRead
18:46:03AraqI prefer slurp and gorge :D
18:46:30Araqa language designer needs to have fun sometimes ...
18:47:06gradhahumor-less people, the world is filled with them
18:47:21gradhatalking about humor, invented something for precondition/postcondition?
18:50:16Araqin/out is it
18:52:35gradhapredictably in is going to have all the fun while out will languish requesting attention
18:53:28Araq'out' is actually very hard to prove ... I'm not sure what the compiler will do
18:53:36Araqperhaps it will trust the programmer :P
18:54:30*zahary joined #nimrod
18:54:38gradhaoh, reminds me of discard and return problems
18:55:16Araqwhat problems are there with discard and return?
18:55:33AraqI solved them months ago :P
18:55:55gradhajust happened to remember them vaguely
18:56:04Araqsee?
18:56:58Araqhi zahary
18:57:15*fowl is now known as zz_fowl
18:57:43*gradha wonders if fowl listens to zztop
19:16:56*EXetoC quit (Read error: Operation timed out)
19:17:08*zz_fowl is now known as fowl
19:18:49*zahary quit (Quit: Leaving.)
19:21:42fowlNo
19:22:05fowlI dunno where to change that lol
19:37:14gradhafound a possible parser misbehaviour
19:37:32gradhalet's say I want to write "doAssert not something.isNil"
19:37:45gradhadoesn't work, so I write "doAssert (not something.isNil)"
19:37:53*EXetoC joined #nimrod
19:38:07gradhanow I add a message string like "doAssert (not something.isNil), "Bad var""
19:38:37gradhathis doesn't compile, instead I should have written "doAssert (not something.isNil, "Bad var")"
19:39:06gradhanot sure if anything can be done to avoid all the head scratching
19:45:41fowlYea gradha 'not' is being read as a binary open
19:46:02fowlSame reason u have to use parens for echo $foo
19:46:18*EXetoC quit (Ping timeout: 264 seconds)
19:46:19fowlBinary op *
19:46:24Araqthat's no parser misbehaviour, it's a grammar glitch
19:47:03gradhaparser, grammar, it's all high tech stuff over my head anyway
19:47:23gradhaI knew about the binary op due to echo $foo, but the second parameter for doAssert surprised me
19:47:38gradhaI guess I just have to get used
19:47:41*fowl is now known as zz_fowl
19:47:50Araqthe horizontal parsing for operators would help
19:48:23Araqit's on my todo but it breaks code, so you'll have to use #! alt_syntax or something
19:48:53gradhadidn't expect 2013 to be the year of nimrod 3000
19:49:05Araqit's also sweet because it solve the "unicode operators" problem
19:49:21gradhaunicode operators? sweet!
19:49:27Araqwe can allow for unicode operators and the precedence is still obvious as it's based on whitespace
19:49:43Araqno need to lookup the precedence in a huge table
19:50:35gradhanimrod obfuscation contests will get pretty
19:51:59Araq*shrug* nothing stops you from naming your stuff OP12, OP11, OP77 in Java either
19:52:41gradhabut that's ugly, never wanted to have the snowman operator? or the heart operator?
19:53:27gradhaunicode emoji, you so tasty
19:54:40gradhathe ? operator is going to be awesome
19:54:50AraqYou can either treat programmers like idiots or like smart people. The "idiots" approach has been tried again and again and only produced subpar languages.
19:55:21gradhathis reminds me of us using the ? some time ago
19:55:42gradhaAraq: do you read the ? correctly? it doesn't show up on the irc logs
19:55:59gradhabut it does when you write it. However, when you write it I can't see it in the irc client
19:56:07gradhamaybe x-chat has some weird character encoding issue
19:56:27Araqall I see is a question mark
19:56:37gradhaok, my problem then
19:57:23*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again)
19:57:54*gradha joined #nimrod
19:57:58gradhaI want a 
19:58:14gradhamaybe with ß
19:58:15*EXetoC joined #nimrod
19:58:29gradhanice, got it right now, thanks
19:59:07EXetoCwhat's going on here https://gist.github.com/EXetoC/5808487 ? this isn't printed: template badnodekind(k; f): stmt{.immediate.} = assert false, "Invalid node kind $# for macros.`$2`".format(k, f)
20:05:57*EXetoC quit (Ping timeout: 248 seconds)
20:24:10gradhaI like how the new github pull request screen coalesces all changes into one in the default view tab, but it might be a pain for big changes unless they filter by diff size
21:00:20*EXetoC joined #nimrod
21:00:26Araqgradha: anything particular important that I should merge?
21:00:53*Trix[a]r_za is now known as Trixar_za
21:00:55AraqI'm pretty busy these days sorry, so not much maintainance from my part
21:01:11AraqEXetoC: your gist doesn't work. again. :P
21:02:36EXetoCwth :E
21:04:26EXetoCI tried to log out and everything. still works. weird
21:04:52Araqhmm weird now it works
21:07:15AraqEXetoC: use dumpTree to see the AST, don't echo s[i]
21:08:29EXetoCso I guess there's some runtime typing going on, if not a bug. it prints the function name at least
21:09:19Araqlook, 'echo' uses $ implicitly
21:09:43Araq$ for PNimrodNode which is what s[i] is does:
21:09:53Araq"Get the string of an identifier node"
21:10:17Araqmacros.nim:542
21:10:37Araqyou don't care and give it a general AST which it doesn't handle
21:11:05EXetoCwill try
21:11:19Araqno dynamic typing, nothing weird going on, it's only a bit subtle
21:11:56EXetoCI'm not sure how to use it since it basically just stringifies the argument name
21:16:29*EXetoC quit (Ping timeout: 252 seconds)
21:16:38Araqyeah it sucks, use 'treerepr' instead or dumpTree
21:18:31gradhaAraq: don't worry about merging my stuff
21:31:42gradhayay, new superman film! http://www.youtube.com/watch?v=QWNqbqcV4dU&feature=youtube_gdata
21:50:11gradhahighlite mentions the tokenizer supports language nesting, but how does that information get passed to the user of the TGeneralTokenizer? there is no .lang field
21:50:47Araqyeah but you pass it to getTok every single time iirc
21:51:02Araqso you can easily switch languages during lexing
21:52:18Araqthese things are incredibly easy once you ditched OOP :P
21:52:28gradhathat's what I don't understand, if I start with tokenizer.getNextToken(langWhatever), how do I know how to change?
21:52:55Araqwell that's your problem :P
21:53:05Araqyou could look at the parsed token ...
21:53:24Araqeg. <script>
21:53:36Araqand then JS will likely follow
21:54:38gradhathat's really confusing
21:54:52*EXetoC joined #nimrod
21:55:20gradhawell, so start with I don't see how you can have nested language anyways
21:56:55Araq*shrug* well I never really tried it, but it can easily be made to work at least
21:57:14Araqbut it's not an important feature, is it?
21:57:34gradhano, it's just confusing being the only visible documentation for the module
21:57:43Araqah I see :P
21:57:59Araqthat's because it is not documentation but a thought I had when writing it
22:01:08gradhaoooh, it actually works
22:01:34gradhanice gtPunctation
22:05:41gradhalooks like only highlite uses gtPunctation, want me to push a rename?
22:06:27Araqwhat do you want it to rename to?
22:06:50gradhaI was hoping to add a 'u' somewhere
22:06:59gradhagtPunctuation maybe?
22:07:24Araqthat's crazy talk
22:07:47Araqpunctation fits the pronounciation better
22:08:08*gradha wonders how cool it would be to have all enums renamed with emojis
22:08:14Araqbut sure make it gtPunct then
22:08:26*EXetoC quit (Ping timeout: 268 seconds)
22:08:38Araqor something else that disrespects English's absurd spelling rules
22:09:02gradhacould also rename gtIdentifier to gtId
22:09:17Araqour guidelines say it should be gtIdent
22:09:40gradhatrue, there is a guidelines, let's check what else can be mangled
22:10:56gradhahuh, would have expected gtEscSeq
22:11:52*OrionPK joined #nimrod
22:11:53gradhas/gtCommand/gtCmd/
22:19:29gradhawouldn't the nested parsing be more realistic in a recursive fashion? as in I find a string literal and may want to parse its contents as C#, so I need to create a recursive parser with the contents of the literal
22:20:03gradhathe example you give seems more for documentation parsing, but you tend to have delimiters for source too
22:21:24OrionPKso can someone explain this (use small words): https://gist.github.com/onionhammer/5809996
22:23:59dom96OrionPK: Every time you call a closure iterator you resume its execution until the next 'yield' in its body.
22:24:32AraqOrionPK: nice bug you found there
22:24:44Araqdom96: yeah but it's special in a 'for' loop so it should work
22:24:53OrionPKyay
22:24:57OrionPKnot my own stupidity for once :)
22:24:59dom96Araq: oh lol
22:25:20Araqhmm strange I thought I covered that with a test
22:25:52OrionPKis that a regression?
22:26:01Araqmaybe
22:32:31*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again)
22:45:28*EXetoC joined #nimrod
22:54:22EXetoCI'll be able to take over the world with this meta stuff once I learn it properly
23:20:43*q66 quit (Remote host closed the connection)
23:59:15*zz_fowl is now known as fowl