<<22-08-2012>>

01:43:43fowlsystem.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:15dom96hello
14:22:56Araqping zahary
14:23:42zaharypong
14:24:44AraqI got what you meant with the symbol binding in macros
14:25:14Araqand I have a simple solution: we should simply support 'bind' in a macro
14:25:39zaharyelaborate ..
14:25:48Araqmacro m() =
14:26:19Araq bind x, y, z # compiler looks up the symbols and stores it, for instance in the macro symbol
14:26:59zaharythen return newCall(!"x", …) will be bound?
14:27:00Araqand then !"x" in the macro gets resolved not to an identifier, but to the captured symbol
14:27:23zaharyI see - works indeed
14:27:39AraqI figured we can't really support it with just an API
14:27:51Araqit 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:52zaharysorry, I lost connection
14:32:46zaharymy proposed solution was something along the lines of:
14:32:46zaharynewCall(!!"x", … ) # !! being an arbitrary operator that returns nkIdent node with special flag raised
14:33:36Araqand then? what's done with this flag?
14:34:43zaharyafter 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:23Araqbut we don't keep the scope of the macro's symbol owner
14:35:39Araqoh I see
14:35:59Araqwell that works for public symbols
14:36:17Araqif the owner is a module
14:36:54zaharyprivate symbols are not kept anywhere? how do internal lookups within the module work?
14:37:43Araqwithin the module we have the symbol table in PContext
14:38:00Araqcould be wrong though ;-)
14:38:05Araqlet me check
14:39:17Araq if m == c.module:
14:39:19Araq result = StrTableGet(c.tab.stack[ModuleTablePos], ident)
14:39:20Araq else:
14:39:22Araq result = StrTableGet(m.tab, ident)
14:39:23Araqyep ;-)
14:39:35Araqprivate symbols are not kept
14:43:49zaharywell, 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:57AraqI think so, there is only the newNimrodNode magic, right?
14:49:11zaharylooking at macros.nim, StrToIdent seems to be the only way to create idents actually
14:49:41zaharythere are more procs concerning nodes, but they don't need to be captured
14:51:39Araq'bind' may also help readability as you then roughly see what's the macro gonna create
14:52:49zaharyyep
15:12:26AraqI 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:05Araqfowl: system.clamp is completely wrong :-)
17:27:21Araqit has 2 typos
17:27:39fowlyeah i figure that out when clamp(0, 0, 9) returned 9
17:27:43fowl:p
17:29:01AraqI still think it should be an operator \/
17:29:11Araqx \/ 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:19fowlyea i like that \/
18:27:00fowlalthough, if i ever wrote a program language it would probably turn out to be 99% operators
18:27:16fowlhmm the whole language could be operators .. >:)
18:27:31Araqtoo weird
18:27:36Araqbelieve me, I tried it once :P
18:28:02fowllol
18:28:29Araq@ for instance was 'while' cause it looks sort of like a loop
18:28:40Araq? was 'if'
18:29:26fowlsounds beautiful
18:32:57dom96I think you're thinking of Brainfuck :P
19:10:42Araqhrm I wonder if I'm really improving things with all my template changes
19:10:55Araqthe original design was *simple*
19:11:15Araqand now we have 4 pragmas already affecting the substitution
19:13:26dom96True.
19:13:43dom96What are those pragmas again?
19:13:56Araqimmediate, dirty, gensym and inject :P
19:14:05dom96And what do they do?
19:14:17Araqlook it up in the manual
19:14:35Araqthey are not documented yet though :P
19:14:55dom96well then why do you want me to look them up in the manual?
19:17:02Araqsorry
19:17:12Araqthought I already pushed the new docs
20:54:19Araqc:/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:20Araqcollect2: ld returned 1 exit status
20:54:27Araqdom96: can you fix that somehow?
20:54:37AraqI want the windows builder to work for my next push
20:54:56dom96yeah
20:55:00dom96Push first.
20:57:38reactormonkAraq: gensym <-> inject are opposites?
20:57:54dom96Araq: And before I go to sleep please ;)
20:58:03reactormonkAraq: and immediate is "resolve before doc generation"?
20:58:13Araqreactormonk: er, quite
20:58:34Araqimmediate is: don't resolve arguments before instantiation
20:58:49Araqso they can contain undeclared identifiers for instance
21:15:20reactormonkhow do I get set uniqueness for my own tuples btw?
21:18:35Araqwhat?
21:19:03Araquse an 'object' instead of a tuple if you want nominal typing
21:23:31reactormonkoke
21:32:32reactormonkAraq: excl and incl for sets? where did you take those names from?
21:33:14Araqwell "include" is already a keyword for file inclusion
21:33:20Araqso I used an abbrev
21:33:31reactormonkI'd come up with 'add' and 'remove'
21:33:35Araqinclude/exclude come from Delphi
21:33:48reactormonkoh
21:34:03Araqyeah, I'd probably use 'add' and 'del' now ;-)
21:34:27Araqthough 'add' is already heavily overloaded
21:34:33reactormonkso what?
21:39:29reactormonkno alias&deprecate template yet?
21:39:52Araqthere is a deprecated pragma
21:40:01Araqsince like forever
21:40:46Araq'alias' is indeed missing
21:42:13reactormonkmay I change the names to 'add' and 'del' and add a deprecated pragma to the other two?
21:42:23Araqno
21:42:39AraqI don't feel like changing thousands of lines of code
21:42:48reactormonksearch n replace?
21:42:51Araqand I kind of like incl/excl
21:43:23Araqwe have 'card' btw, not 'len' for sets
21:43:47Araqsets simply don't adhere to the rules ;-)
21:44:39reactormonkthere is only one import sets btw
21:44:47reactormonkin prelude.nim
21:47:33Araqwell 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:54Araqgood night
22:07:47*reactormonk joined #nimrod
23:06:57reactormonkproc card*[A](s: TSet[A]): int =
23:06:59reactormonk ## alias for `len`.
23:07:15reactormonkAraq: I still think an alias of any kind would be appreciated...