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:39 | EXetoC | meep meep |
10:01:44 | * | DAddYE joined #nimrod |
10:06:10 | * | DAddYE quit (Ping timeout: 252 seconds) |
10:30:49 | * | Araq_ joined #nimrod |
10:31:32 | Araq_ | EXetoC: newSeq(); setLen(0) is newSeqOfCap(), you're right it's missing in system.nim |
10:31:58 | EXetoC | ok |
10:41:19 | * | Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]) |
11:03:28 | * | DAddYE joined #nimrod |
11:53:12 | EXetoC | zz_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:04 | EXetoC | can only the compiler process pragmas? |
13:33:17 | EXetoC | and is {.foo} supposed to be syntactically valid? |
13:34:06 | dom96 | what else should be able to process the pragmas? |
13:34:09 | dom96 | and yes, that is valid. |
13:36:17 | EXetoC | ok so only one dot is needed |
13:36:59 | dom96 | the second dot is optional, yes. |
13:37:08 | dom96 | I prefer to include both though. |
13:38:01 | EXetoC | yeah, might as well |
13:39:06 | EXetoC | dom96: 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:29 | dom96 | Ahh, well macros can process them. |
13:40:45 | EXetoC | oh yeah, classimpl is a macro even |
13:41:54 | dom96 | And {.someMacro.} is syntax sugar for someMacro: |
13:43:04 | EXetoC | ok |
13:49:19 | EXetoC | dom96: and multiple macros are often used, so I guess it isn't a big problem |
13:51:30 | EXetoC | I 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:05 | EXetoC | " |
13:54:12 | EXetoC | classimpl might be doing that too. zz_fowl, does it? |
13:54:17 | EXetoC | I'm assuming that you are fowlmouth |
13:58:01 | dom96 | It is possible, yes. |
13:59:07 | EXetoC | cool. 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:28 | EXetoC | I 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:48 | EXetoC | and both seems to have devs that actually use the language on a daily basis :> |
16:53:41 | dom96 | Great :D |
16:54:29 | EXetoC | Nimrod seems to be a slightly better language though, if only for its syntax |
16:54:44 | EXetoC | dom96: I just have to convince this other guy to convert :> |
16:55:33 | dom96 | I'm sure you can do it with ease :) |
16:56:33 | dom96 | I am almost done with my school exams, so soon there will be even more activity btw. |
16:58:33 | EXetoC | great |
17:02:47 | * | zz_fowl is now known as fowl |
17:04:19 | fowl | EXetoC: yes it sees if there is a self parameter and if not adds it in the first slot |
17:05:24 | fowl | Also a constructor is generated |
17:10:59 | EXetoC | right |
17:14:30 | fowl | What are u working on |
17:24:03 | EXetoC | fowl: an invariant macro (for enforcing contracts before and after (public?) "member" functions |
17:25:28 | EXetoC | well, the visibility of the function won't matter if I make it per-function |
17:26:17 | fowl | Oh ok |
17:40:22 | Araq | reactormonk: which new repo? link? |
17:42:23 | EXetoC | it 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:12 | fowl | EXetoC: bug araq for macros in typedefs I want it too |
17:43:45 | Araq | depending on your coding style even a simple macro is problematic due to bug #413 |
17:45:44 | EXetoC | fowl: oh. your macro takes an expr and a stmt, which is slightly different in that regard I assume |
17:46:32 | fowl | EXetoC: idle which macro ur referring to and I'd have to look I wrote most of them long ago |
17:46:40 | fowl | Idk * |
17:47:35 | reactormonk | Araq, the new repo style of github |
17:48:24 | EXetoC | fowl: I meant something like invariant: classimpl... |
17:48:46 | EXetoC | anyway, I'll start off with per-function macros |
17:51:37 | Araq | fowl: if your macro ends up generating a simple identifier for the type it should work already |
17:52:08 | Araq | and you can easily implement it yourself I think |
17:52:37 | Araq | edit semtypes.nim:820 and make it: result = n.typ |
17:53:43 | EXetoC | time to exercise |
17:53:47 | EXetoC | so boring :-) |
17:56:22 | fowl | Araq: I mean type foo {somemacro} = object |
17:57:47 | Araq | fowl: oh ... |
17:59:12 | Araq | ping zahary_ |
18:21:37 | * | gradha joined #nimrod |
18:29:56 | gradha | highlite.tokenClassToStr exists because $TTokenClass has a significant impact on performance? |
18:33:32 | Araq | nah, because it's been translated from pascal I think |
18:34:19 | gradha | hmmm lib/packages/docutils/highlite.nim(47, 43) Error: cannot open 'doc/keywords.txt' |
18:36:17 | gradha | oh, 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:06 | fowl | Approach uses gtksourceview |
18:37:09 | fowl | Aporia |
18:37:24 | gradha | luckily cp can save the day |
18:38:44 | gradha | maybe highlite.nim should be generated from a highlite.nim.template instead during distribution or some koch phase to avoid the relative include? |
18:40:38 | Araq | hmm why not include doc/keywords.txt in the docutils package? |
18:41:52 | gradha | maybe doc/keywords.txt is used somewhere else and hence the slurping to avoid duplicating the contents? |
18:42:18 | Araq | yes it's included by the manual too |
18:42:50 | Araq | I don't mind duplication for that too much |
18:43:03 | Araq | keywords change rarely enough so that it's a nonissue |
18:44:42 | gradha | gorge? funny name |
18:45:54 | Araq | people prefer staticExec and staticRead |
18:46:03 | Araq | I prefer slurp and gorge :D |
18:46:30 | Araq | a language designer needs to have fun sometimes ... |
18:47:06 | gradha | humor-less people, the world is filled with them |
18:47:21 | gradha | talking about humor, invented something for precondition/postcondition? |
18:50:16 | Araq | in/out is it |
18:52:35 | gradha | predictably in is going to have all the fun while out will languish requesting attention |
18:53:28 | Araq | 'out' is actually very hard to prove ... I'm not sure what the compiler will do |
18:53:36 | Araq | perhaps it will trust the programmer :P |
18:54:30 | * | zahary joined #nimrod |
18:54:38 | gradha | oh, reminds me of discard and return problems |
18:55:16 | Araq | what problems are there with discard and return? |
18:55:33 | Araq | I solved them months ago :P |
18:55:55 | gradha | just happened to remember them vaguely |
18:56:04 | Araq | see? |
18:56:58 | Araq | hi 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:42 | fowl | No |
19:22:05 | fowl | I dunno where to change that lol |
19:37:14 | gradha | found a possible parser misbehaviour |
19:37:32 | gradha | let's say I want to write "doAssert not something.isNil" |
19:37:45 | gradha | doesn't work, so I write "doAssert (not something.isNil)" |
19:37:53 | * | EXetoC joined #nimrod |
19:38:07 | gradha | now I add a message string like "doAssert (not something.isNil), "Bad var"" |
19:38:37 | gradha | this doesn't compile, instead I should have written "doAssert (not something.isNil, "Bad var")" |
19:39:06 | gradha | not sure if anything can be done to avoid all the head scratching |
19:45:41 | fowl | Yea gradha 'not' is being read as a binary open |
19:46:02 | fowl | Same reason u have to use parens for echo $foo |
19:46:18 | * | EXetoC quit (Ping timeout: 264 seconds) |
19:46:19 | fowl | Binary op * |
19:46:24 | Araq | that's no parser misbehaviour, it's a grammar glitch |
19:47:03 | gradha | parser, grammar, it's all high tech stuff over my head anyway |
19:47:23 | gradha | I knew about the binary op due to echo $foo, but the second parameter for doAssert surprised me |
19:47:38 | gradha | I guess I just have to get used |
19:47:41 | * | fowl is now known as zz_fowl |
19:47:50 | Araq | the horizontal parsing for operators would help |
19:48:23 | Araq | it's on my todo but it breaks code, so you'll have to use #! alt_syntax or something |
19:48:53 | gradha | didn't expect 2013 to be the year of nimrod 3000 |
19:49:05 | Araq | it's also sweet because it solve the "unicode operators" problem |
19:49:21 | gradha | unicode operators? sweet! |
19:49:27 | Araq | we can allow for unicode operators and the precedence is still obvious as it's based on whitespace |
19:49:43 | Araq | no need to lookup the precedence in a huge table |
19:50:35 | gradha | nimrod obfuscation contests will get pretty |
19:51:59 | Araq | *shrug* nothing stops you from naming your stuff OP12, OP11, OP77 in Java either |
19:52:41 | gradha | but that's ugly, never wanted to have the snowman operator? or the heart operator? |
19:53:27 | gradha | unicode emoji, you so tasty |
19:54:40 | gradha | the ? operator is going to be awesome |
19:54:50 | Araq | You 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:21 | gradha | this reminds me of us using the ? some time ago |
19:55:42 | gradha | Araq: do you read the ? correctly? it doesn't show up on the irc logs |
19:55:59 | gradha | but it does when you write it. However, when you write it I can't see it in the irc client |
19:56:07 | gradha | maybe x-chat has some weird character encoding issue |
19:56:27 | Araq | all I see is a question mark |
19:56:37 | gradha | ok, 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:58 | gradha | I want a |
19:58:14 | gradha | maybe with ß |
19:58:15 | * | EXetoC joined #nimrod |
19:58:29 | gradha | nice, got it right now, thanks |
19:59:07 | EXetoC | what'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:10 | gradha | I 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:26 | Araq | gradha: anything particular important that I should merge? |
21:00:53 | * | Trix[a]r_za is now known as Trixar_za |
21:00:55 | Araq | I'm pretty busy these days sorry, so not much maintainance from my part |
21:01:11 | Araq | EXetoC: your gist doesn't work. again. :P |
21:02:36 | EXetoC | wth :E |
21:04:26 | EXetoC | I tried to log out and everything. still works. weird |
21:04:52 | Araq | hmm weird now it works |
21:07:15 | Araq | EXetoC: use dumpTree to see the AST, don't echo s[i] |
21:08:29 | EXetoC | so I guess there's some runtime typing going on, if not a bug. it prints the function name at least |
21:09:19 | Araq | look, 'echo' uses $ implicitly |
21:09:43 | Araq | $ for PNimrodNode which is what s[i] is does: |
21:09:53 | Araq | "Get the string of an identifier node" |
21:10:17 | Araq | macros.nim:542 |
21:10:37 | Araq | you don't care and give it a general AST which it doesn't handle |
21:11:05 | EXetoC | will try |
21:11:19 | Araq | no dynamic typing, nothing weird going on, it's only a bit subtle |
21:11:56 | EXetoC | I'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:38 | Araq | yeah it sucks, use 'treerepr' instead or dumpTree |
21:18:31 | gradha | Araq: don't worry about merging my stuff |
21:31:42 | gradha | yay, new superman film! http://www.youtube.com/watch?v=QWNqbqcV4dU&feature=youtube_gdata |
21:50:11 | gradha | highlite 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:47 | Araq | yeah but you pass it to getTok every single time iirc |
21:51:02 | Araq | so you can easily switch languages during lexing |
21:52:18 | Araq | these things are incredibly easy once you ditched OOP :P |
21:52:28 | gradha | that's what I don't understand, if I start with tokenizer.getNextToken(langWhatever), how do I know how to change? |
21:52:55 | Araq | well that's your problem :P |
21:53:05 | Araq | you could look at the parsed token ... |
21:53:24 | Araq | eg. <script> |
21:53:36 | Araq | and then JS will likely follow |
21:54:38 | gradha | that's really confusing |
21:54:52 | * | EXetoC joined #nimrod |
21:55:20 | gradha | well, so start with I don't see how you can have nested language anyways |
21:56:55 | Araq | *shrug* well I never really tried it, but it can easily be made to work at least |
21:57:14 | Araq | but it's not an important feature, is it? |
21:57:34 | gradha | no, it's just confusing being the only visible documentation for the module |
21:57:43 | Araq | ah I see :P |
21:57:59 | Araq | that's because it is not documentation but a thought I had when writing it |
22:01:08 | gradha | oooh, it actually works |
22:01:34 | gradha | nice gtPunctation |
22:05:41 | gradha | looks like only highlite uses gtPunctation, want me to push a rename? |
22:06:27 | Araq | what do you want it to rename to? |
22:06:50 | gradha | I was hoping to add a 'u' somewhere |
22:06:59 | gradha | gtPunctuation maybe? |
22:07:24 | Araq | that's crazy talk |
22:07:47 | Araq | punctation fits the pronounciation better |
22:08:08 | * | gradha wonders how cool it would be to have all enums renamed with emojis |
22:08:14 | Araq | but sure make it gtPunct then |
22:08:26 | * | EXetoC quit (Ping timeout: 268 seconds) |
22:08:38 | Araq | or something else that disrespects English's absurd spelling rules |
22:09:02 | gradha | could also rename gtIdentifier to gtId |
22:09:17 | Araq | our guidelines say it should be gtIdent |
22:09:40 | gradha | true, there is a guidelines, let's check what else can be mangled |
22:10:56 | gradha | huh, would have expected gtEscSeq |
22:11:52 | * | OrionPK joined #nimrod |
22:11:53 | gradha | s/gtCommand/gtCmd/ |
22:19:29 | gradha | wouldn'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:03 | gradha | the example you give seems more for documentation parsing, but you tend to have delimiters for source too |
22:21:24 | OrionPK | so can someone explain this (use small words): https://gist.github.com/onionhammer/5809996 |
22:23:59 | dom96 | OrionPK: Every time you call a closure iterator you resume its execution until the next 'yield' in its body. |
22:24:32 | Araq | OrionPK: nice bug you found there |
22:24:44 | Araq | dom96: yeah but it's special in a 'for' loop so it should work |
22:24:53 | OrionPK | yay |
22:24:57 | OrionPK | not my own stupidity for once :) |
22:24:59 | dom96 | Araq: oh lol |
22:25:20 | Araq | hmm strange I thought I covered that with a test |
22:25:52 | OrionPK | is that a regression? |
22:26:01 | Araq | maybe |
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:22 | EXetoC | I'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 |