<<08-04-2013>>

00:02:19*XAMPP joined #nimrod
02:42:54*Trixar_za is now known as Trix[a]r_za
09:55:41Araqping zahary
09:55:50zaharypong Araq
09:56:07Araqmy latest change broke the rodfile reader ;-)
09:56:29zaharythe [ symbols?
09:56:37NimBotAraq/Nimrod bf40a7f Araq [+0 ±1 -0]: rodfile viewer works again
09:56:52zaharywhat about the rod files in general? do they work too?
09:57:15Araqno, the 'return' in decodeSym
09:57:33Araqthey don't work yet but I'm quite sure it's because of this:
09:57:47Araq compileSystemModule()
09:57:48Araq discard CompileModule(projectFile, {sfMainModule})
09:57:54Araqin main.CompileProject
09:58:19Araqwhen symbol files are active the dependency resolution "compiles" the system module
09:58:35Araqso we end up with 2 system modules
09:58:39zaharyI see
09:59:21AraqI'm not sure how to fix this though, the control flow is confusing
10:00:19Araqit should be done in compileModule if sfMainModule in flags perhaps
10:01:11Araqbtw the [ is necessary for easy disambiguation in the rodfile viewer
10:01:26zaharyyes, sure
10:03:22Araqanyway what's this "pinning" that we need for generics support?
10:04:41zaharybinning. to avoid unnecessary excessive recompilation, I want to compile the generics in their own module and potentially split that one in parts as it grows big
10:05:45zaharythat is, public generics in module foo get compiled in foo.generics.c
10:06:33Araqwe also need to support importing 2 modules of the same name btw
10:06:56Araqso soon I may add some hash/id to the C file name
10:07:40Araqand the file directory handling in the compiler needs to change to support packages too, that's gonna be ugly
10:08:02Araqas it means the search path is dependent from the current module's path
10:08:09Araq*on
10:08:21zaharyI've thought about packages too in the context of reusable rod files
10:08:59Araqoh yeah and I'd like to support closed source redistribution via rod files
10:09:58Araqit's very easy to generated source back from a rod file but nevertheless people think it's a good idea ... ;-)
10:10:56zaharywell, you can combine it with obfuscation of variable names and private function names
10:12:40Araqbetter bite the bullet and encrypt it preoperly then
10:13:02Araqbut I dunno, it's not important for now
10:14:45zaharyencrypt? if it's decrypted before use what's the security? people are concerned about "protecting" their IP. not about protecting the rod file in transit
10:15:27zaharyIP = intellectual property
10:16:08Araqbut it's decrypted on the fly in rodread.nim via some key that you gave in the configuration
10:16:58Araqnot sure if it helps anything though
10:17:22zaharyI want protection from my customers (which I gave the key to), not from someone who has obtain the rodfile, but doesn't have the key
10:17:46Araqyeah that's a problem :-)
10:18:22AraqDLLs are much better for this
10:18:38zaharydepending on the problem domain, obfuscation puts enough barriers for most people to consider reverse-engineering and forking the codebase
10:19:20zaharyin some problem domains, it's the use of external APIs that reveal easily the algorithms, but that's more rare
10:20:27*fowl quit (Ping timeout: 245 seconds)
10:22:59Araqthinking about it, obfuscation seems rather easy to implement
10:23:16Araqthe public symbol names are stored in a separate index already
10:23:24zaharyyes, it's also the same algorithm used for javascript minification
10:23:36Araqno it's far easier
10:23:53Araqyou can simply write TMP$ID as the symbol name I think
10:25:04Araqcould work even for public symbols
10:25:24Araqbecause of the index
10:25:51zaharywell, you want a stable public API too
10:25:52*fowl joined #nimrod
10:26:17Araqit's stable
10:26:25Araqthe import mechanism uses the index
10:27:14Araqok, ok, it means you can reconstruct public names but not private ones
10:27:19zaharyI see what you mean, but if it's reconstructable from the index it's not really an added layer of security.
10:27:28Araqtrue
10:27:58*q66 joined #nimrod
10:30:20Araqstrack traces for CTFE will suffer from obfuscation though
10:30:40Araqso we can't turn on this feature unconditionally
10:31:12zaharyyou mean stack traces within a package provided by third party?
10:31:22Araqyeah
10:31:59zaharythat's already pretty narrow window and similar to how things work with DLLs
10:32:43Araqalso a much bigger problem is that we strive right now for perfection when it comes to dependency tracking
10:33:01Araqso change 1 global --define and everything will be recompiled
10:33:21AraqI suppose the rule has to be "if source not available, pick the rod file no matter what"
10:34:29zaharyI guess we need to introduce a deeper idea of package.
10:34:30zaharythis rod package doesn't support defines
10:34:45zaharyor, this rod packages support exactly these defines, but the when statements are part of the rod code
10:35:01Araquh oh
10:35:22Araqyou need a notion of "applied passes" in the rod file then
10:35:59Araqin fact ... you may as well serialize the raw AST that comes after parsing instead
10:36:59Araqthis way it also stays platform agnostic
10:37:39zaharydunno, it's at odds with the optimization goal of rod files
10:37:44Araqindeed
10:38:02Araqcaching the parsing step is worthless
10:38:11zaharyalso, renames at least seem a bit more dangerous if they are not done after symbol resolution
10:39:51Araqyep, check out bug #382
10:40:30Araqsymbol resolution is a constant pita in the compiler as the requirements changed and the symbol table implementation is not up to the new needs
10:41:42zaharyI'm personally for more wide-spread use of symChoice (so just like types, allow module names and other symbol names to overlap)
10:42:39Araqthat's not the most pressing problem though
10:42:55Araqcurrently the scopes are left open for a generic instantation
10:43:43Araqcausing all sorts of problems but I'm sure the instantiation process now relies on it
10:45:12Araqanyway back to the rod fiel bug: apparently there always was a line like 'discard CompileModule(systemFile, {sfSystemModule})' in compileProject
10:45:54Araqyou merely added a check 'if magicsys.SystemModule == nil:'
10:47:08zaharythe goal of this check is to avoid recompilation in caas mode
10:47:19zaharyshould always be nil in normal runs
10:50:12Araqyes indeed, but symbol files stopped working due to a patch of yours iirc
10:50:25Araqand I'm figuring out what changed
10:51:42*fowl quit (Ping timeout: 264 seconds)
10:51:44zaharyI could try to hunt down the problem some more tonight btw. I'm currently at work and I don't even have a nimrod checkout here yet
10:51:56zaharyI don't need to spend time hunting my bugs
10:52:13zaharyyou dont*
10:52:35AraqI'm not so sure anymore it's your bug though
10:59:24*xcombelle joined #nimrod
11:59:25Araqargh
11:59:45Araq2 calls of 'handleSymbolFile' in 'compileModule'? that can't be right ...
12:28:09NimBotAraq/Nimrod 32b12bf Araq [+0 ±2 -0]: next steps to make symbol files work again
12:28:52Araqzahary: now it forgets to link to link .o files that have not been changed again; I leave it to you to fix that
12:29:26zaharyok, I think I know what's the problem
12:29:37Araqno idea what change broke that
12:30:00zaharythere are some lists in extcomp that work a bit differently now
12:44:38*Trix[a]r_za is now known as Trixar_za
14:39:07NimBotAraq/Nimrod 8cd4e1a Araq [+0 ±2 -0]: documented restricted destructors
14:39:07NimBotAraq/Nimrod 94becd0 Araq [+0 ±6 -0]: implemented --dynlibOverride option for static linking of 'dynlib'
16:58:01*Trixar_za is now known as Trix[a]r_za
17:40:56*fowl joined #nimrod
18:18:57NimBotAraq/Nimrod 51e40bf Araq [+1 ±1 -0]: fixes #368
18:18:57NimBotAraq/Nimrod b7c26a1 Araq [+1 ±1 -0]: fixes #321
18:20:38*zahary1 joined #nimrod
18:41:29Araqping reactormonk
18:43:59NimBotAraq/Nimrod 9f16f66 Araq [+0 ±1 -0]: fixes #378
19:06:04NimBotAraq/Nimrod ea255aa Araq [+0 ±1 -0]: bugfix: varargs min/max procs; fixes #373
19:08:24*q66 quit (Read error: Connection reset by peer)
19:08:34*q66 joined #nimrod
19:15:06*xcombelle quit (Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.)
19:18:56*silven quit (Quit: No Ping reply in 180 seconds.)
19:19:20*silven joined #nimrod
19:54:49reactormonkpong Araq
19:54:53reactormonknice bugfixing
20:23:33NimBotAraq/Nimrod 7a4fe13 Zahary Karadjov [+0 ±5 -0]: bugfix: fix linking when symbol files are used
20:44:02*apotheon quit (Ping timeout: 256 seconds)
20:50:10*apotheon joined #nimrod
20:50:11*apotheon quit (Changing host)
20:50:11*apotheon joined #nimrod
21:16:03NimBotAraq/Nimrod 7b3d9b7 Zahary Karadjov [+0 ±2 -0]: experimental support for outputting code snippets in error messages; implements #301... 4 more lines
21:20:18reactormonkzahary, cool
21:34:10*fowl quit (Quit: Leaving)
21:58:29*Trix[a]r_za is now known as Trixar_za
22:36:13*Trixar_za is now known as Trix[a]r_za