02:06:40 | * | q66 quit (Quit: Quit) |
02:27:24 | * | Boscop quit (Quit: Boscop) |
03:47:17 | * | reactormonk_ joined #nimrod |
03:47:51 | * | reactormonk_ is now known as reactormonk |
04:07:09 | * | reactormonk quit (Ping timeout: 276 seconds) |
04:31:42 | * | reactormonk joined #nimrod |
04:50:42 | * | reactormonk quit (Ping timeout: 276 seconds) |
05:02:22 | * | reactormonk joined #nimrod |
05:28:17 | * | reactormonk quit (Read error: Operation timed out) |
05:35:59 | * | freak1 joined #nimrod |
05:36:29 | * | freak1 is now known as reactormonk |
06:35:48 | * | Boscop joined #nimrod |
09:06:17 | fowl | macro `?`(a: expr): expr = result = newNimNode(nnkCharLit) result.intval= ($a[1].ident)[0].ord |
09:06:25 | fowl | :p |
10:27:22 | * | q66 joined #nimrod |
12:34:58 | * | Trix[a]r_za is now known as Trixar_za |
12:43:57 | * | Araq_ joined #nimrod |
12:46:03 | * | Araq_ quit (Client Quit) |
14:22:51 | * | Trixar_za is now known as Trix[a]r_za |
15:19:21 | fowl | dom96: i put an output on recvFrom() to dump the port incoming, RECVFROM: 127.0.0.1 (58042) thats the port i need to save so i can write to it |
15:30:38 | * | dom96_and joined #nimrod |
15:30:57 | dom96_and | fowl: how did you get the port? |
15:35:02 | fowl | dom96_and: the tsockaddr_in that the address came from |
15:35:04 | * | dom96_and quit (Ping timeout: 240 seconds) |
15:35:20 | fowl | sockaddress.sin_port |
16:00:16 | * | dom96_and joined #nimrod |
16:00:41 | dom96_and | fowl: so sending to that port works? |
16:02:06 | dom96_and | If it's useful then recvFrom should return it. |
16:06:07 | * | dom96_and quit (Ping timeout: 240 seconds) |
16:09:47 | * | shevy quit (Ping timeout: 240 seconds) |
16:10:29 | * | dom96_and joined #nimrod |
16:13:40 | fowl | to be honest i didnt try it that much but i know thats how recvfrom works in python/ruby |
16:14:44 | * | dom96_and quit (Ping timeout: 252 seconds) |
16:21:48 | * | shevy joined #nimrod |
16:30:08 | * | reactormonk quit (Ping timeout: 245 seconds) |
16:41:46 | fowl | i need either htons or ntohs for the |
16:41:47 | fowl | port |
16:42:30 | * | reactormonk joined #nimrod |
16:42:35 | Araq | fowl: these exist in sockets.nim afaik, but maybe they're not exported |
16:43:02 | fowl | they're in posix.nim im just not sure which one i need |
17:14:02 | dom96 | hello |
17:15:10 | fowl | hello |
17:15:35 | dom96 | htons and ntohs is in sockets.nim |
17:18:40 | fowl | dom96: this is working for me https://gist.github.com/3405921 |
17:19:29 | fowl | possible conflict with the flags var though |
17:19:55 | dom96 | fowl: Make a pull request :D |
17:20:08 | dom96 | huh? I don't see a conflict? |
17:22:23 | * | Trix[a]r_za is now known as Trixar_za |
17:22:51 | fowl | well its not a problem with the original func gone |
17:24:52 | dom96 | yeah, just get rid of the original. |
17:25:44 | dom96 | This is only useful with UDP, and in most cases you want the address and port anyway |
17:28:14 | Araq | it's inefficient |
17:28:28 | Araq | data = newString(length) --> setLen(data, length) |
17:28:39 | Araq | reuse the buffer if it's passed as 'var' |
17:29:03 | Trixar_za | Anybody here like addictive books with obscure gaming/film references with a weird cyberpunk feel to them? |
17:29:27 | Trixar_za | And who may want to win a DeLorean modeled to look like the one in Back from the Future |
17:29:52 | dom96 | Trixar_za: tell me more :P |
17:30:02 | Araq | Trixar_za: tell me you're not misusing this channel to sell stuff |
17:30:20 | Araq | ccssnet was that desperate too once |
17:30:28 | Trixar_za | No |
17:30:36 | Araq | and now look what we did to him |
17:30:45 | Araq | he barely speaks anymore :P |
17:30:52 | Trixar_za | I just want to find that damn easter egg in a book about finding an easter egg |
17:31:00 | Trixar_za | It's completely geek |
17:31:51 | Trixar_za | http://en.wikipedia.org/wiki/Ernest_Cline#Fiction |
17:32:09 | Trixar_za | And yes, I actually finished the book :/ |
17:32:17 | dom96 | Araq: I take full responsibility for that inefficiency |
17:32:20 | Trixar_za | Didn't see any reference to a meta-egg inside it |
17:32:50 | fowl | Araq: the buffer isnt passed in |
17:33:03 | fowl | o wait yes it is *dur* |
17:33:18 | dom96 | So... who's going to participate in the upcoming Ludum Dare? |
17:33:32 | fowl | i dont like working under pressure :p |
17:33:33 | Trixar_za | I figured it's something Araq would like considering how he uses obscure music and gaming references |
17:33:51 | dom96 | fowl: hehe. But Notch does it! That's why it's cool! |
17:34:00 | Araq | System Shock 2 is not obscure! |
17:34:04 | Araq | it's a classic |
17:34:07 | Araq | best game ever |
17:34:15 | dom96 | Araq: Portal 2 is way better |
17:34:38 | Araq | nope |
17:34:47 | Araq | nothing can beat nostalgia |
17:34:52 | dom96 | true. |
17:34:55 | Trixar_za | You referred to a line from System Shock 1 |
17:35:01 | dom96 | In that case for me: GTA Vice City is the best |
17:35:13 | Trixar_za | And Have you tried running SS2 these days? (I actually have a copy) |
17:35:13 | Trixar_za | :P |
17:35:34 | Araq | I got the original :P |
17:35:43 | Trixar_za | Best game ever |
17:35:45 | Araq | and the quote is from SS2 too |
17:36:01 | Trixar_za | But It keeps killing me with my own damn bomb |
17:36:16 | fowl | hmm should i change to address.add($inet_ntoa(sockAddress..))? |
17:36:42 | fowl | instead of address = .. |
17:37:16 | Araq | Trixar_za: be glad I don't try to run SS2 these days |
17:37:24 | Araq | would be very bad for my productivity |
17:37:43 | Trixar_za | I couldn't get it to run on my XP system |
17:37:45 | Trixar_za | :( |
17:38:44 | Araq | it doesn't like multicore at all |
17:38:52 | fowl | wine probably outperforms xp now |
17:39:36 | Trixar_za | Mind you, I couldn't get SS1 to run either. It runs BADLY in DosBox |
17:39:39 | Trixar_za | Which is a known issue |
17:40:03 | Trixar_za | I should fix up the old PII and load up Windows 98 on it or something |
17:41:01 | Araq | so, dom96, I'm working on changing the default binding rules for templates |
17:41:48 | dom96 | ok |
17:41:57 | dom96 | You want my input on something? |
17:42:08 | Araq | which means old style templates need to become: |
17:42:26 | Araq | template t() {.dirty, mixin, immediate.} |
17:42:28 | Araq | :D |
17:42:40 | ccssnet | eh what? |
17:43:04 | Araq | ccssnet: I was kidding |
17:43:31 | ccssnet | o i got it now |
17:43:42 | ccssnet | speaking of which you should go look at my listings :) |
17:44:21 | Araq | do you still sell the shakira porn? |
17:44:22 | dom96 | lol |
17:44:51 | dom96 | Araq: wait what? |
17:45:06 | dom96 | Well I suppose I will just adjust my templates to be new-styled |
17:45:57 | Araq | well dom96 I think jester won't need many changes anyway |
17:46:03 | Araq | it'll simply work better ;-) |
17:46:09 | dom96 | great |
17:46:23 | dom96 | This reminds me. |
17:46:32 | dom96 | I need to document jester more before I forget how to use it myself haha |
17:46:39 | Araq | indeed |
17:46:50 | Araq | you don't even have copyright headers |
17:46:55 | dom96 | pff. |
17:47:14 | dom96 | I should come up with some cool license. |
17:47:19 | ccssnet | eh what? |
17:47:54 | dom96 | "If you want to use this software you must send me 5 beers per week to sustain my thirst." |
17:48:00 | Araq | ccssnet: too bad :P |
17:48:07 | ccssnet | Araq: my listings have never contained porn... |
17:48:20 | * | ccssnet googles shakira |
17:48:21 | Araq | too bad |
17:48:35 | dom96 | ccssnet: You got any Graphics cards? |
17:52:28 | ccssnet | dom96: ya |
17:52:37 | dom96 | ccssnet: show me |
17:52:54 | ccssnet | pm |
17:54:16 | ccssnet | http://atccss.net/pc/new-pc.jpg |
17:54:16 | dom96 | k |
17:54:19 | ccssnet | those ^ |
17:55:00 | dom96 | crossfire hrm |
17:55:43 | shevy | hmm |
17:56:17 | shevy | gtk is useable in nimrod right? i.e. I can make commandline tools in nimrod for bio-science related things, and then build a GUI on top of that right? |
17:56:32 | dom96 | shevy: Of course |
17:56:38 | dom96 | shevy: Aporia is written in Nimrod |
17:56:45 | Araq | but it may be easier with IUP ;-) |
17:59:18 | dom96 | Real men use GTK :P |
17:59:52 | Trixar_za | bbl |
18:00:24 | * | Trixar_za is now known as Trix[a]r_za |
18:03:18 | shevy | IUP? |
18:04:11 | Araq | shevy: http://www.tecgraf.puc-rio.br/iup/ |
18:04:18 | Araq | but I never used it ;-) |
18:09:53 | shevy | http://www.tecgraf.puc-rio.br/iup/en/screenshots.html |
18:10:09 | shevy | well with gtk I don't aim for beauty |
18:10:12 | shevy | I only aim for BUTTONS. |
18:10:30 | Araq | iup runs on the big 3 oses |
18:10:37 | Araq | natively |
18:12:07 | shevy | hmm, |
18:12:35 | Araq | er |
18:12:51 | Araq | still no native macosx support |
18:12:54 | Araq | hm |
18:14:36 | fowl | shevy: check it out :> https://gist.github.com/3342882 now it also generates constructor funcs, you can even supply default parameters in the type def :D |
18:15:09 | shevy | this looks very alien to me |
18:15:28 | shevy | question |
18:15:28 | shevy | PNimrodNode {.compileTime.} = |
18:15:33 | shevy | what means the part with the {} |
18:16:58 | fowl | pragma, compiletime says that proc is only useful at compiletime (because it deals with the ast) |
18:18:45 | dom96 | shevy: It's extra information about types/functions/etc for the compiler. |
18:19:14 | dom96 | I think we might need some nicer syntax for creating PNimrodNodes |
18:19:15 | Araq | er, fowl, does that code work? |
18:19:27 | shevy | hehe |
18:20:00 | fowl | Araq: yes, the default params are only used in the constructor, for the type i filter them out |
18:20:05 | dom96 | Araq: I still have that dsl module I made. |
18:20:10 | dom96 | Araq: Do we want that in the stdlib? |
18:20:23 | Araq | never heard of it |
18:20:26 | fowl | dom96: how does it compare to mine |
18:20:52 | dom96 | Araq: Remember my crazy dynamic function macro? :P |
18:20:56 | dom96 | (Which I never got working) |
18:21:14 | dom96 | fowl: The dsl module just provides some convenience functions, like newProcNode etc. |
18:21:30 | Araq | of course we want something like that |
18:21:56 | fowl | i want to see it |
18:21:59 | Araq | I always wondered why nobody does a pull request |
18:22:15 | dom96 | https://gist.github.com/cf86763b154cc3bdb673 |
18:23:23 | dom96 | It's not much hehe |
18:23:33 | fowl | mine's better |
18:24:55 | dom96 | oh you made a dsl module too |
18:25:09 | fowl | infix(10.lit, "*", 6.lit) ## way more readable than infixnode(newidentnode("*"), newintlitnode(10), newintlitnode(6)) |
18:25:17 | Araq | dom96's name is better ;-) |
18:25:51 | Araq | fowl: try the new varargs[t, converterHere] ;-) |
18:26:07 | Araq | infix(10, "*", 6) # should be possible |
18:26:30 | dom96 | Araq: So why does: https://gist.github.com/194e8e2d719e6c8f482d |
18:26:37 | dom96 | Fail with: dynamic.nim(6, 5) Error: macro requires one parameter |
18:26:47 | dom96 | ? |
18:26:52 | fowl | Araq: "*" has to be an identnode not a literal |
18:27:10 | Araq | because I haven't unified templates and macros yet, dom96 |
18:27:26 | Araq | a macro always gets only 1 param which is the invokation AST |
18:27:32 | dom96 | I see. |
18:27:38 | Araq | it's planned they'll behave like templates though |
18:27:59 | Araq | and there will be a magic "callsite" proc to get the invokation AST |
18:28:15 | * | dom96 wants a cool dynamic macro like that just to show off what Nimrod can do |
18:28:27 | Araq | fowl: think again, it all ends up being a PNimrodNode |
18:28:52 | Araq | but yeah |
18:29:06 | fowl | yes but if its a strlit when it should be an identnode thats bad sauce |
18:29:08 | Araq | you'd have !"*" then |
18:29:08 | fowl | right? |
18:29:37 | Araq | right, the code would become: infix(10, !"*", 6) |
18:30:36 | Araq | dom96: TDynamic doesn't need macros, it only needs converters |
18:31:01 | Araq | except for your 'def' macro |
18:31:11 | Araq | which was your point I guess, he he |
18:31:16 | dom96 | indeed |
18:32:43 | Araq | shevy: don't learn about macros before you got the type system ;-) |
18:37:22 | fowl | that was easier than i expected |
18:42:13 | * | Araq loves the varargs feature |
18:42:38 | * | dom96 loves the comment toggling feature |
18:42:54 | Araq | oh right |
18:43:07 | Araq | I should try to compile aporia with the new compiler |
18:43:41 | dom96 | yep |
18:47:59 | Araq | fowl: do the templates you write rely on the definition scope or the instantiation scope? |
18:48:42 | fowl | instantiation |
18:49:45 | Araq | well would they work with definition scope as well? |
18:50:23 | Araq | because I'm about to change it ;-) |
18:54:08 | dom96 | brb |
18:55:08 | fowl | ill adapt |
18:55:14 | fowl | those are simple templates |
19:19:44 | dom96 | back |
19:31:07 | * | JStoker quit (Excess Flood) |
19:50:19 | Araq | ok, beware |
19:50:25 | Araq | I'm gonna break lots of tests :P |
19:51:34 | dom96 | Don't, there is a bomb! And it will blow up if test success percentages go below 90%. |
19:51:54 | * | dom96 is very silly today |
19:55:07 | * | JStoker joined #nimrod |
20:01:54 | Araq | fowl: port should be of type TPort |
20:02:19 | Araq | otherwise the patch is fine if dom96 agrees |
20:02:50 | Araq | I have to go, see you later or tomorrow |
20:02:59 | fowl | ok |
20:03:02 | fowl | peace |
20:06:07 | dom96 | hrm, I just got an idea. |
20:06:14 | dom96 | optional var params? |
20:06:34 | dom96 | Araq: Let me know what you think when you come back :) |
20:06:58 | fowl | optional var params? what does that mean |
20:07:28 | Araq | hrm sounds fishy |
20:07:34 | Araq | but I know what you mean |
20:07:42 | dom96 | In the case of recvFrom, if you made 'port' optional, you pass `nil` or maybe `_` and then the proc wouldn't set it |
20:08:01 | dom96 | Araq: Why does it sound fishy? |
20:08:23 | dom96 | I suppose the same could be achieved with an overload |
20:08:32 | dom96 | This would be a nice convenience though |
20:08:34 | Araq | not 'nil' and not '_', instead you declare it to be optional and the compiler inserts a dummy var for ya |
20:08:49 | dom96 | yeah, sure. |
20:09:04 | Araq | sounds indeed like a nice feature but I'm already overwhelmed with work |
20:09:43 | dom96 | Well... I could try implementing it. But you know how that goes for me :P |
20:10:56 | dom96 | fowl: Your changes look fine to me. But yeah, do what Araq says. |
20:12:10 | Araq | dom96: I don't feel like rewriting your compiler changes :P |
20:13:43 | dom96 | Now that's just mean :( |
20:14:22 | dom96 | But hey, if you don't want my help... :P |
20:16:07 | fowl | ok, i didnt have to have to update the pull request o_O i just pushed and it updated |
20:16:08 | Araq | implement that branch support for nimbuild please |
20:16:23 | Araq | github's awesome |
20:16:28 | Araq | bye |
20:40:00 | fowl | dom96: where is babel? Im not seeing it on github |
20:40:19 | dom96 | The nimrod-code organization |
20:42:25 | fowl | cool |
20:43:12 | * | JStoker quit (Excess Flood) |
20:58:51 | dom96 | fowl: You should change your git real name heh |
21:00:46 | fowl | is that a github setting |
21:02:58 | dom96 | git config --global user.name "Your Name Here" |
21:03:03 | dom96 | https://help.github.com/articles/set-up-git |
21:05:07 | * | JStoker joined #nimrod |
21:05:09 | fowl | alright. I am now fowlmouth AKA Billingsly Wetherfordshire |
21:07:29 | dom96 | :) |
21:43:32 | Araq | ugh |
21:43:49 | Araq | jogging at 24degrees sucks |
22:25:44 | * | zahary joined #nimrod |
22:26:24 | Araq | hey zahary! |
22:26:30 | zahary | hi |
22:26:44 | Araq | I've implemented hygienic templates :-) |
22:27:08 | zahary | kudos |
22:27:28 | zahary | did you finish varargs too? nimrod 0.9 is getting pretty close |
22:27:52 | zahary | I have a new PC that boots the compiler in 1.1 second :) |
22:28:04 | Araq | afaict varargs are done, yes |
22:28:12 | Araq | wtf? 1.1s? o.O |
22:28:20 | Araq | what CPU? |
22:28:36 | zahary | core [email protected] |
22:28:52 | fowl | ooo |
22:29:04 | dom96 | wow, that is impressive |
22:29:21 | dom96 | And now I need to sleep. Good night :) |
22:29:29 | fowl | g'night |
22:29:36 | Araq | I have holidays next week and then 0.9 will be released |
22:29:39 | zahary | good night |
22:29:52 | Araq | bye, dom96 |
22:34:10 | Araq | so zahary we need to talk about symbol capturing in templates again |
22:34:46 | Araq | I think 'mixin' is the wrong default |
22:34:58 | Araq | and 'bind' should be the default instead |
22:35:03 | zahary | mixin being the old "inject" here? |
22:35:10 | Araq | (mixin = instantation scope) |
22:35:17 | Araq | (bind = definition scope) |
22:35:40 | Araq | 'inject' vs. 'gensym' is a different matter which I solved as follows: |
22:36:06 | Araq | 'inject' is default for vars, lets, consts and types, 'gensym' for routines |
22:36:35 | zahary | isn't it the other way around? |
22:36:37 | Araq | but it can be done explicitely via the 'inject' and 'gensym' pragmas |
22:36:43 | Araq | er, yeah |
22:36:49 | Araq | the other way round :D |
22:37:03 | Araq | brb |
22:37:09 | zahary | ok, I remember, I was just about to remind you about this idea |
22:39:36 | * | zahary left #nimrod (#nimrod) |
22:39:37 | * | zahary joined #nimrod |
22:42:28 | * | XAMPP quit (Quit: Leaving) |
22:46:40 | Araq | back |
22:46:50 | Araq | well the inject/gensym stuff is implemented |
22:47:01 | Araq | 'bind' is still the same |
22:47:21 | Araq | you can get unhygienic templates back with a 'dirty' pragma |
22:47:43 | Araq | so to get 0.8.14 styled templates that would be: |
22:48:02 | Araq | template t() {.immediate, dirty, mixin.} |
22:48:35 | Araq | I'm flirting with the idea to conflate 'mixin' and 'dirty' ... |
22:51:25 | Araq | fyi, http://existentialtype.wordpress.com/2012/08/11/extensionality-intensionality-and-brouwers-dictum/ |
22:51:41 | Araq | but I don't understand it ;-) |
22:55:23 | zahary | so what's this second axis? mixin vs bind? |
22:55:31 | Araq | yes |
22:56:14 | zahary | ah, you can now say that you want all names to be locally bind |
22:56:21 | zahary | * bound * |
22:56:25 | Araq | yep |
22:56:30 | zahary | I see |
22:57:23 | Araq | tbh part of the reason 'bind' ended up the way it is now is because I lacked a word for 'mixin' :-) |
22:57:43 | zahary | if you remember there was also the minor macro problem where you want to return locally bound identifier |
22:58:13 | Araq | yeah but this can be solved with a better API |
22:59:03 | Araq | and it's not a minor problem, I think it's quite severe |
23:01:40 | Araq | if you look at tables.nim there is some interesting code: |
23:02:00 | Araq | proc put[T](....) = putImpl() |
23:02:23 | Araq | which I consider common |
23:02:37 | Araq | now if we have a mixin lookup like: |
23:03:06 | Araq | if (mixin `==`)(key, t.key): # only this == is "open" |
23:03:27 | Araq | as opposed to say some == for an integer count |
23:03:37 | Araq | in the same putImpl() |
23:03:54 | Araq | well ugh |
23:03:57 | zahary | hmm, I guess this only applies for generic procs? |
23:04:30 | Araq | true but it's often the same for templates, isn't it? |
23:04:51 | Araq | well my point is: if we have 'mixin' for both templates and generics for consistency |
23:04:57 | zahary | I would expect it for templates and anything that's inlined |
23:05:24 | zahary | for generic procs it's less clear what the user will expect |
23:05:41 | Araq | well I'm thinking about making symbol lookup rules consistent between templates and generics |
23:06:17 | zahary | inlining is the defining criteria for me |
23:06:34 | zahary | generics are cached between modules so they are a bit different |
23:06:48 | Araq | yes sure |
23:06:58 | Araq | I don't want to get rid of one of them |
23:07:11 | Araq | but symbol lookup rules could be the same |
23:07:11 | zahary | yes, they are both nice |
23:08:08 | Araq | well my point is: |
23:08:09 | zahary | sure, but you probably should produce the conflicting definitions errors for generics |
23:08:33 | zahary | when 2 scopes use different "mixed-in" symbols |
23:08:54 | Araq | hrm I haven't though of that |
23:09:02 | Araq | but let me go on please ;-) |
23:09:24 | Araq | so, if the lookup rules are the same and we have that 'mixin' feature |
23:09:46 | zahary | I also like the controversial idea of allowing redefinition of inlined symbols in the same scope - my assertion_failed example if you remember |
23:10:04 | Araq | argh, yes |
23:10:04 | zahary | … I am listening |
23:10:07 | Araq | I broke it :P |
23:10:12 | Araq | I think |
23:10:32 | Araq | well the point is you can't copy&paste the generics implementation into a template then anymore |
23:10:46 | Araq | because 'mixin' changes its meaning in a subtle way |
23:11:04 | Araq | because it then refers to the template context |
23:11:16 | Araq | and not to the generic's |
23:11:26 | * | XAMPP joined #nimrod |
23:12:26 | zahary | you mean you can't copy/paste because the generic is bind by default and the template is mixin by default? |
23:12:47 | Araq | no |
23:13:25 | Araq | well it's a general problem |
23:13:33 | Araq | so I'll come up with a different example: |
23:13:48 | Araq | 'bind x' has a meaning in a generic |
23:13:55 | Araq | and in a template |
23:14:33 | Araq | you can't cut&paste it into a template without changing its semantics subtly |
23:14:44 | Araq | or consider nested templates |
23:15:11 | Araq | template outer = |
23:15:15 | Araq | template inner = |
23:15:30 | Araq | bind x # obviously refers to 'inner' |
23:16:19 | Araq | which means you can't put 'bind' in a template to abstract it |
23:16:31 | zahary | hmm, that would just say that there is a symbol named x somewhere up the scopes? |
23:16:43 | Araq | template mybind(x: expr) = bind x |
23:16:49 | Araq | template t = |
23:16:58 | Araq | mybind abc # can't work |
23:17:21 | Araq | 'bind' is not "first class" |
23:17:53 | Araq | 'mixin' has the same problems |
23:18:13 | zahary | well, sure, but I wouldn't expect it as it just controls lexical scoping (something that's statically determined in the structure of the program text) |
23:18:45 | Araq | well sorry if it was obvious but I wonder if this can cause problems |
23:19:28 | Araq | the hygienic macro papers all consider the problem: what happens if 'let' is redefined? |
23:19:50 | Araq | in nimrod you can't do that |
23:19:52 | zahary | the let keyword itself? |
23:20:03 | Araq | yes |
23:20:42 | Araq | and we have the same issue: |
23:21:11 | zahary | well, I got thinking about this user_defined_bind - in the end, it's related to the macro problem I mentioned earlier |
23:21:25 | Araq | template declare(x: expr) {.dirty, immediate.} = var x: int |
23:21:30 | Araq | template t = |
23:21:41 | zahary | there must be a way to return a bound identifier as a node - either as a flag attached to nkIdent or as another node |
23:21:43 | Araq | declare(y) # no gensym magic |
23:22:06 | Araq | a bound identifier is called "nkSym" |
23:22:10 | zahary | so custom_bind is then also possible - it will just return such "bound" identifiers |
23:22:27 | Araq | use "nkSymChoice" for a "mixin" |
23:23:46 | Araq | btw I noticed nkSymChoice is broken |
23:24:04 | Araq | we need "nkSymChoice" which is a fixed set of overloaded symbols |
23:24:30 | Araq | and some "nkMixin" which consists of a set of overloaded symbols which are however |
23:24:36 | Araq | enriched by the current scope |
23:24:55 | Araq | open vs. closed nkSymChoice |
23:25:06 | zahary | I see |
23:25:40 | Araq | currently we sometimes treat it as open and sometimes as closed |
23:26:25 | zahary | well, for symChoice itself (what I called superposition) I expect the closed behavior |
23:26:48 | zahary | but I see what you mean by the mixin (open) symbol set |
23:27:15 | zahary | I'm still wondering isn't this just a flag for nkIdent |
23:27:31 | zahary | the lookup is always through an identifier? |
23:28:00 | Araq | no, it can also be `x`, or x.y |
23:28:33 | Araq | the `` allow weirder stuff like `x % y` |
23:28:55 | Araq | but it's only a concatenation so it ends up being an nkIdent |
23:30:37 | Araq | oh and we really need that symbol "snooping" that you mention for immediate templates |
23:30:50 | zahary | what's the rule right now? if symchoice's children are all nkSym, then it's closed set. if there is other types of nodes such as nkIdent, nkAccent, nkDot then it might be either mixin or bind (with a lookup through the owner)? |
23:31:07 | Araq | oh sorry, I misread |
23:31:18 | Araq | nkSymChoice is a list of nkSym only |
23:31:31 | Araq | but in lookups.nim we also consider the "open" set |
23:32:10 | Araq | however in sigmatch.nim we treat it as a closed set (which makes sense though) |
23:55:58 | Araq | good night |
23:57:17 | * | reactormonk quit (Ping timeout: 265 seconds) |
23:58:36 | zahary | good night |
23:59:48 | * | reactormonk joined #nimrod |