| 01:43:43 | fowl | system.clamp() is weird |
| 01:46:20 | * | q66 quit (Quit: Quit) |
| 03:07:30 | * | mal`` quit (Ping timeout: 276 seconds) |
| 03:08:41 | * | mal`` joined #nimrod |
| 03:26:22 | * | VarriountDroid joined #nimrod |
| 03:26:44 | * | mal`` quit (Ping timeout: 260 seconds) |
| 03:28:53 | * | mal`` joined #nimrod |
| 04:23:19 | * | mal`` quit (Ping timeout: 260 seconds) |
| 04:25:08 | * | mal`` joined #nimrod |
| 04:41:06 | * | VarriountDroid left #nimrod ("Click that button and everything will be an uninitialized object, including the compiler, the interpreter, the error messaging system and your little dog Toto") |
| 06:15:31 | * | Trix[a]r_za is now known as Trixar_za |
| 06:16:47 | * | Trixar_za is now known as Trix[a]r_za |
| 09:55:08 | * | Boscop quit (Disconnected by services) |
| 09:55:09 | * | Boscop joined #nimrod |
| 09:56:19 | * | zahary joined #nimrod |
| 10:28:18 | * | q66 joined #nimrod |
| 10:41:39 | * | zahary quit (Read error: Operation timed out) |
| 10:44:22 | * | zahary joined #nimrod |
| 11:58:15 | dom96 | hello |
| 14:22:56 | Araq | ping zahary |
| 14:23:42 | zahary | pong |
| 14:24:44 | Araq | I got what you meant with the symbol binding in macros |
| 14:25:14 | Araq | and I have a simple solution: we should simply support 'bind' in a macro |
| 14:25:39 | zahary | elaborate .. |
| 14:25:48 | Araq | macro m() = |
| 14:26:19 | Araq | bind x, y, z # compiler looks up the symbols and stores it, for instance in the macro symbol |
| 14:26:59 | zahary | then return newCall(!"x", …) will be bound? |
| 14:27:00 | Araq | and then !"x" in the macro gets resolved not to an identifier, but to the captured symbol |
| 14:27:23 | zahary | I see - works indeed |
| 14:27:39 | Araq | I figured we can't really support it with just an API |
| 14:27:51 | Araq | it needs to be declared upfront which symbols to capture |
| 14:31:09 | * | zahary quit (Read error: Connection reset by peer) |
| 14:31:37 | * | zahary joined #nimrod |
| 14:31:52 | zahary | sorry, I lost connection |
| 14:32:46 | zahary | my proposed solution was something along the lines of: |
| 14:32:46 | zahary | newCall(!!"x", … ) # !! being an arbitrary operator that returns nkIdent node with special flag raised |
| 14:33:36 | Araq | and then? what's done with this flag? |
| 14:34:43 | zahary | after you get the AST in evalMacro, you traverse it and lookup such identifiers by also considering the scope of the macro's symbol owner |
| 14:35:23 | Araq | but we don't keep the scope of the macro's symbol owner |
| 14:35:39 | Araq | oh I see |
| 14:35:59 | Araq | well that works for public symbols |
| 14:36:17 | Araq | if the owner is a module |
| 14:36:54 | zahary | private symbols are not kept anywhere? how do internal lookups within the module work? |
| 14:37:43 | Araq | within the module we have the symbol table in PContext |
| 14:38:00 | Araq | could be wrong though ;-) |
| 14:38:05 | Araq | let me check |
| 14:39:17 | Araq | if m == c.module: |
| 14:39:19 | Araq | result = StrTableGet(c.tab.stack[ModuleTablePos], ident) |
| 14:39:20 | Araq | else: |
| 14:39:22 | Araq | result = StrTableGet(m.tab, ident) |
| 14:39:23 | Araq | yep ;-) |
| 14:39:35 | Araq | private symbols are not kept |
| 14:43:49 | zahary | well, that's easy to change :) I don't mind the bind solution tho. but will it be easy to capture all the various ways that ident nodes can be created? |
| 14:44:57 | Araq | I think so, there is only the newNimrodNode magic, right? |
| 14:49:11 | zahary | looking at macros.nim, StrToIdent seems to be the only way to create idents actually |
| 14:49:41 | zahary | there are more procs concerning nodes, but they don't need to be captured |
| 14:51:39 | Araq | 'bind' may also help readability as you then roughly see what's the macro gonna create |
| 14:52:49 | zahary | yep |
| 15:12:26 | Araq | I have to go, see you later |
| 15:25:21 | * | zahary quit (Read error: Operation timed out) |
| 16:11:07 | * | shevy quit (Ping timeout: 252 seconds) |
| 16:23:43 | * | shevy joined #nimrod |
| 17:27:05 | Araq | fowl: system.clamp is completely wrong :-) |
| 17:27:21 | Araq | it has 2 typos |
| 17:27:39 | fowl | yeah i figure that out when clamp(0, 0, 9) returned 9 |
| 17:27:43 | fowl | :p |
| 17:29:01 | Araq | I still think it should be an operator \/ |
| 17:29:11 | Araq | x \/ 1..3 |
| 17:34:53 | * | mal``` joined #nimrod |
| 17:37:54 | * | comex quit (*.net *.split) |
| 17:37:54 | * | ccssnet quit (*.net *.split) |
| 17:37:55 | * | Boscop quit (*.net *.split) |
| 17:37:55 | * | Reisen quit (*.net *.split) |
| 17:37:56 | * | CodeBlock quit (*.net *.split) |
| 17:37:57 | * | reactormonk quit (*.net *.split) |
| 17:37:58 | * | mal`` quit (*.net *.split) |
| 17:37:58 | * | q66 quit (*.net *.split) |
| 17:38:47 | * | Boscop joined #nimrod |
| 17:39:00 | * | comex joined #nimrod |
| 17:39:00 | * | q66 joined #nimrod |
| 17:39:58 | * | reactormonk joined #nimrod |
| 17:40:04 | * | ccssnet joined #nimrod |
| 17:40:06 | * | CodeBlock joined #nimrod |
| 17:40:48 | * | Reisen joined #nimrod |
| 18:26:19 | fowl | yea i like that \/ |
| 18:27:00 | fowl | although, if i ever wrote a program language it would probably turn out to be 99% operators |
| 18:27:16 | fowl | hmm the whole language could be operators .. >:) |
| 18:27:31 | Araq | too weird |
| 18:27:36 | Araq | believe me, I tried it once :P |
| 18:28:02 | fowl | lol |
| 18:28:29 | Araq | @ for instance was 'while' cause it looks sort of like a loop |
| 18:28:40 | Araq | ? was 'if' |
| 18:29:26 | fowl | sounds beautiful |
| 18:32:57 | dom96 | I think you're thinking of Brainfuck :P |
| 19:10:42 | Araq | hrm I wonder if I'm really improving things with all my template changes |
| 19:10:55 | Araq | the original design was *simple* |
| 19:11:15 | Araq | and now we have 4 pragmas already affecting the substitution |
| 19:13:26 | dom96 | True. |
| 19:13:43 | dom96 | What are those pragmas again? |
| 19:13:56 | Araq | immediate, dirty, gensym and inject :P |
| 19:14:05 | dom96 | And what do they do? |
| 19:14:17 | Araq | look it up in the manual |
| 19:14:35 | Araq | they are not documented yet though :P |
| 19:14:55 | dom96 | well then why do you want me to look them up in the manual? |
| 19:17:02 | Araq | sorry |
| 19:17:12 | Araq | thought I already pushed the new docs |
| 20:54:19 | Araq | c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot open output file c:\nimrod\tests\tester.exe: Permission denied |
| 20:54:20 | Araq | collect2: ld returned 1 exit status |
| 20:54:27 | Araq | dom96: can you fix that somehow? |
| 20:54:37 | Araq | I want the windows builder to work for my next push |
| 20:54:56 | dom96 | yeah |
| 20:55:00 | dom96 | Push first. |
| 20:57:38 | reactormonk | Araq: gensym <-> inject are opposites? |
| 20:57:54 | dom96 | Araq: And before I go to sleep please ;) |
| 20:58:03 | reactormonk | Araq: and immediate is "resolve before doc generation"? |
| 20:58:13 | Araq | reactormonk: er, quite |
| 20:58:34 | Araq | immediate is: don't resolve arguments before instantiation |
| 20:58:49 | Araq | so they can contain undeclared identifiers for instance |
| 21:15:20 | reactormonk | how do I get set uniqueness for my own tuples btw? |
| 21:18:35 | Araq | what? |
| 21:19:03 | Araq | use an 'object' instead of a tuple if you want nominal typing |
| 21:23:31 | reactormonk | oke |
| 21:32:32 | reactormonk | Araq: excl and incl for sets? where did you take those names from? |
| 21:33:14 | Araq | well "include" is already a keyword for file inclusion |
| 21:33:20 | Araq | so I used an abbrev |
| 21:33:31 | reactormonk | I'd come up with 'add' and 'remove' |
| 21:33:35 | Araq | include/exclude come from Delphi |
| 21:33:48 | reactormonk | oh |
| 21:34:03 | Araq | yeah, I'd probably use 'add' and 'del' now ;-) |
| 21:34:27 | Araq | though 'add' is already heavily overloaded |
| 21:34:33 | reactormonk | so what? |
| 21:39:29 | reactormonk | no alias&deprecate template yet? |
| 21:39:52 | Araq | there is a deprecated pragma |
| 21:40:01 | Araq | since like forever |
| 21:40:46 | Araq | 'alias' is indeed missing |
| 21:42:13 | reactormonk | may I change the names to 'add' and 'del' and add a deprecated pragma to the other two? |
| 21:42:23 | Araq | no |
| 21:42:39 | Araq | I don't feel like changing thousands of lines of code |
| 21:42:48 | reactormonk | search n replace? |
| 21:42:51 | Araq | and I kind of like incl/excl |
| 21:43:23 | Araq | we have 'card' btw, not 'len' for sets |
| 21:43:47 | Araq | sets simply don't adhere to the rules ;-) |
| 21:44:39 | reactormonk | there is only one import sets btw |
| 21:44:47 | reactormonk | in prelude.nim |
| 21:47:33 | Araq | well for bitsets its in system.nim and thus everywhere |
| 21:48:11 | * | zahary joined #nimrod |
| 21:55:54 | * | reactormonk quit (Ping timeout: 276 seconds) |
| 21:58:54 | Araq | good night |
| 22:07:47 | * | reactormonk joined #nimrod |
| 23:06:57 | reactormonk | proc card*[A](s: TSet[A]): int = |
| 23:06:59 | reactormonk | ## alias for `len`. |
| 23:07:15 | reactormonk | Araq: I still think an alias of any kind would be appreciated... |