<<03-02-2013>>

00:00:38*Zerathul quit (Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211])
01:56:42*XAMPP_8 quit (Ping timeout: 252 seconds)
02:04:37*FreeArtMan quit (Ping timeout: 248 seconds)
02:33:18*fowl quit (Quit: Leaving)
07:35:09*zahary1 quit (Read error: No route to host)
07:35:21*zahary joined #nimrod
08:59:07zaharyhi Araq
09:37:34*q66[bru] joined #nimrod
09:55:29Araqhi zahary
09:56:14*q66[bru] quit (Quit: Computer has gone to sleep.)
09:57:46zaharyso, did you figure out all the details about the new GC already?
09:58:33zaharyshall I explain where the memory increase comes from?
10:01:01zaharyI'm getting 1.9s (old) vs 1.8s (new) for bootstrapping btw
10:04:11Araqisn't it obviously from the new cycle roots handling?
10:04:29Araqand the cycle collector is deactivated for the compiler
10:04:44Araqso the array needs to grow for every allocated PSym, PType
10:06:07Araqambition caught me and so I'm trying hard to fix my cycle collector and not looking at your solution too much ... ;-)
10:07:04zaharywell, I should add 2 more leaks test cases then
10:08:01zaharyotherwise, it's not just about TCellSet vs arrays. I think the bigger contribution is something that's related to the "cycle roots trimming" that I added in one of the commits
10:09:56AraqI wanted to talk you about this too:
10:09:59zaharyunder the new GC, when a cycle root object is freed through the ZCT, it's not pulled out from the cycle roots immediately. instead, it's just marked dead and collected in the next CollectCycles
10:10:30zaharythis "trimming" is the process of collecting only a small portion of the more recently dead cycle roots
10:11:35zaharyI can add another threshold that will trigger a "full trimming" over the cycle roots and the new GC will have exactly the same behavior as the old (given that mark and sweep is disabled)
10:12:08Araqinteresting; it seemed to try to re-invent a generational GC
10:12:37Araqbut if you keep the the 'cycleRoots.incl' in incRef it should be possible to avoid this
10:13:14zaharyit's a workaround for a problematic behavior manifesting when mark and sweep is disabled\
10:14:04Araqthe idea being that we accurately know which parts of the graph changed
10:14:07zaharythere is no much difference if you add cycleRoots in incRef vs newObject
10:14:15Araqand we don't have to re-trace unchanged graphs
10:14:24zaharyI tried both, but the numbers were only slightly off\
10:14:34Araqit's a big difference
10:14:54Araqyou can throw away all cycle roots if you have keep the incl in incRef
10:15:20zaharywhat do you mean by "throw away". I'm throwing them away after collection
10:15:23Araq(except the stack roots)
10:16:00Araqdo you throw away the live roots too?
10:16:17zaharyyou mean the stack roots?
10:16:55Araqno stack roots, are another case
10:16:58AraqI have to keep those too
10:17:55Araqoh I see it now
10:18:01Araqyou throw them away too
10:18:05Araqinteresting
10:18:54Araqdoes your cycle collector work for bootstrapping?
10:19:13zaharywhat do you mean?
10:19:29zaharywhat happens if you enable it?
10:19:34Araqwell it's disabled for the compiler itself
10:19:46Araqhaven't tried to activate it
10:19:49zaharyfor speed, try turning it on and then claim it uses more memory :)
10:21:09zaharyI need the new GC for the caas btw, it's a bit less cool that it's not the default now
10:22:54Araqhey, I thought it's fair yours isn't the default yet but has the cooler name ;-)
10:23:18zahary:) I can live with the v2 switch
10:24:53zaharyHint: operation successful (60245 lines compiled; 2.137 sec total; 139.143MB) [SuccessX]
10:29:02Araqso how can you throw away all cycle roots if you perform 'incl' in newObj?
10:32:23zaharywell, why do you consider it a problem? the candidates are non-zero decrefs, new objects and previously stack referenced objects
10:33:12Araqnew(x); fullCollect(); x.child = x;
10:33:33zaharyx is a stack ref here?
10:33:44Araqno a global var
10:34:11zaharyso, it we get RC1 treatment
10:34:14zaharyit will get
10:34:28Araqah yeah
10:34:30Araqhrm
10:35:13Araqok, this may indeed be correct :P
10:36:36zaharyand I have a switch for this "new objects are cycle candidates vs addCycle in incRef"
10:37:56zaharyit's a very small factor. as I said before, the big cost of the new GC comes from the size of the whole cyclic graph
10:38:45zaharyeven 1 candidate is likely to reference the whole graph (just imagine how symbols point to their owner module, which points to its symbols, etc, etc)
10:39:26Araqwe could make 'ower' a weak reference
10:39:29Araq*owner
10:39:53Araq(I hope)
10:40:49zaharyyeah, we could try tweaking the types in the compiler
10:43:42Araqok, next point: in the new GC you only use waPush
10:44:25Araqbut is that really faster?
10:44:43AraqwaZctDecRef should be better for the zct handling
10:45:47Araqbecause the temporary stack is not used then
10:45:59Araqfor the common case of ZCT collection
10:47:19zaharyhmm, alright, I'll try to measure this before fully moving on to waPush only markers
10:47:45zaharywaZctDecRef has a bug in the old GC btw. you need the full write barrier there too
10:48:24Araqwhy?
10:48:49Araqoh hrm
10:48:52zaharyit's the common orphaning problem.
10:49:02Araqyeah
10:51:59Araqnext point:
10:52:05Araqfor c in cycleRoots: decRefGraph(c)
10:52:25Araqfor c in cycleRoots: if c.rc > 0: incRefGraph(c) # mark alive
10:52:54Araqfor c in cycleRoots: if c.rc == 0: freeGraph(c)
10:53:13Araqis the pseudo code for the simple non-concurrent case right?
10:55:39zaharythat's the python's article algorithm
10:56:07zaharyit can work, but you need all cyclic object to be inside the cycleRoots (cycleRoots should be just named cyclicObjects)
10:56:23zaharyand you should keep all survivors there
10:56:26*q66[bru] joined #nimrod
10:57:38Araqhuh? I thought bacon03's algorithm ("syncronous cycle collection") is the same
10:59:37Araqhttp://www.google.de/url?sa=t&rct=j&q=bacon+et+al+reference+counting+garbage+collection&source=web&cd=1&ved=0CDAQFjAA&url=http%3A%2F%2Fresearcher.ibm.com%2Ffiles%2Fus-bacon%2FBacon03Pure.pdf&ei=XDsOUdK2L43jtQazg4GQBg&usg=AFQjCNELErgZBRbzBdOeZEvFeVyPOQL8IQ&bvm=bv.41867550,d.Yms&cad=rja
11:00:28zaharyit's not. its contribution is the fact that only a subset of the cyclic objects can be considered candidates (and you need the proposed coloring scheme to achieve that)
11:02:22zaharyhmm, this is not the paper I expected
11:02:28*FreeArtMan joined #nimrod
11:02:38*q66[bru] quit (Quit: Computer has gone to sleep.)
11:02:51AraqI'm referring to figure 7
11:02:51zaharyI'm talking about their "synchronous cycle collector'
11:03:32Araqbut yeah
11:03:39Araqit's indeed not the same
11:03:48Araqwhich explains quite a lot ...
11:03:53zaharyah, yeah. fig 7 is right
11:04:25*FreeArtMan quit (Client Quit)
11:10:05*q66[bru] joined #nimrod
11:16:19*q66[bru]_ joined #nimrod
11:17:00*q66[bru] quit (Read error: Connection reset by peer)
11:17:00*q66[bru]_ is now known as q66[bru]
11:21:12Araqok, now I know why my attempts fail ... :D
11:23:00Araqpity that you can't incl/excl while iterating over the TCellSet
11:23:11Araqkeep that in mind when you play with it
11:23:58Araqtook me a while to figure out why this has a slight chance of failing
11:51:19*q66[bru] quit (Quit: Computer has gone to sleep.)
12:02:07*FreeArtMan joined #nimrod
12:02:49*q66[bru] joined #nimrod
12:02:51Araqzahary do we really need 6 bits for all the flags?
12:04:53*FreeArtMan quit (Client Quit)
12:49:32*q66[bru] quit (Quit: Computer has gone to sleep.)
12:52:51zaharyI'm not using one of them yet (so, they could be 5), but here is a one way of thinking about it:
12:52:51zaharyif we worry that the counter may overflow on a 32-bit system, I calculated that just the space required for enough inbound pointers is more than 700MB and if you have such a widely shared object, then the advice "make it a global" will instantly save you that much memory :)
12:54:02Araqindeed that's my worry
12:54:17Araq6 might be the tolerable upper bound
12:55:56*q66[bru] joined #nimrod
12:56:11Araqdepending on the program it may not be easy to use a global instead
12:56:41Araqplus currently we don't even assert it didn't overflow
12:57:01zaharyyes, but still 700MB for just the pointers on a machine that's capped to 3 or 4 GB
12:57:09Araqyeah
12:57:22Araqit shouldn't occur in practice
12:57:45Araqit's possible to construct programs that trigger it
12:58:20zaharyI also considered the other scheme where the flags are the most significant bits
12:58:32zaharythen overflowing just messes up with them in a safe way
12:58:59zaharybut the though experiment was only for amusement and curiosity :)
13:00:09Araqlets just insert a sysAssert in incRef and it's fine with me
13:00:19zaharysure
13:00:57Araqyou don't need even more bits for the concurrent collector, right?
13:02:04Araqso ... I guess I should live with your GC and abandon mine ... getting the cycle collector to work is more work than I expected
13:02:57AraqI still think we should use TCellSet for the cycle roots though
13:03:23zaharyyes, but it may require an additional word in the TCells, although I have some ideas how to reduce the impact
13:04:36zaharyit should be easy to try TCellSet and compare the memory use and the execution time
13:05:02Araqan additional word in the TCell is a show stopper
13:05:10zaharymy previous message (about the additional word) was referring to the incremental collector
13:05:14Araqyou may as well keep the cell seq then
13:05:23Araqoh I see
13:08:19AraqI have implemented a data structure to attach temporary RCs to a cell
13:09:03Araqso that no pass is necessary to restore the RCs in the cycle collection
13:09:53Araqbut it doesn't work, because if you have a <-> b -> c <- d
13:10:01Araqwhere a and b are cycle roots
13:10:29Araqyou can collect a, b but must keep c due to the live d
13:10:52Araqhowever, then you need to decref c
13:11:02Araqso you can't simply restore c's old RC
13:12:04zaharythe additional word holds a pointer to the snapshot of the refs in the previous collection (under the sliding views algorithm). this pointer can be written in the rc fields if you also write the rc in the snapshot when it's taken. under this scheme, you pay a bit more only for the modified objects between collections
13:14:07AraqI dunno if the sliding view algorithm its worth its complexity
13:14:43zaharyit's not that complex
13:15:34zaharywe should try it (it uses the same coloring algorithm and the rest of CollectCycles will work with minor modifications)
13:15:42Araqwell I fear debugging it ;-)
13:16:04Araqespecially since the papers too used to have bugs
13:17:48Araqbut sure, go ahead
13:18:04Araqbut introduce --gc:v3 for the concurrent mode please
13:21:27zaharysure, after reading all these papers I got even more excited about implementing all kinds of GC within nimrod switchable at compile-time.
13:22:00zahary it seems that most of the GC researches are working with projects such as Jikes RVM, which is actually quite more complicated to develop for than nimrod
13:22:26Araqyeah we have a pretty nice foundation
13:22:31zaharyI'd love to pitch nimrod as a GC research platfrom
13:23:50Araqwe need more benchmark programs and tests though
13:24:04Araqthe compiler itself is a good stress test
13:24:18Araqbut I can't imagine making it concurrent
13:24:35Araqwhich is why with 8 cores at least, boehm's should win again
13:24:41Araqif it doesn't already
13:25:17AraqGC is pretty nice component that takes advantages of multicore even if the mutator doesn't
13:26:02*q66[bru] quit (Quit: Computer has gone to sleep.)
13:26:39Araqand the compiler also uses lots of cyclic datastructures and doesn't require responsiveness but only throughput
13:29:37zaharyyes, there are some standard benchmarks that seem to be popular among the papers
14:17:13*q66[bru] joined #nimrod
14:21:53*q66[bru] quit (Client Quit)
14:28:48*q66[bru] joined #nimrod
14:33:21Araqdom96: the highlighter doesn't know about unsigned literals
14:33:30Araq3'u8
14:33:44Araqthese are relatively new though
14:35:46dom96ok
14:51:51*q66[bru] quit (Quit: Computer has gone to sleep.)
14:55:50Araqzahary: fyi http://www.google.de/url?sa=t&rct=j&q=bacon+et+al+reference+counting+garbage+collection&source=web&cd=21&ved=0CDAQFjAAOBQ&url=http%3A%2F%2Fwww.cis.nctu.edu.tw%2F~wuuyang%2Fpapers%2FICSOFT-31-WUUYANG-4PAGES.pdf&ei=HHoOUdupPMeitAbXyYHACA&usg=AFQjCNGmIdC_V7nP5X3PPdBxZNeU5ZlnLw&bvm=bv.41867550,d.Yms&cad=rja
15:22:00*XAMPP_8 joined #nimrod
15:52:33*Zerathul joined #nimrod
15:55:11*Zerathul quit (Client Quit)
16:07:47*gradha joined #nimrod
16:25:36gradhazahary: do you know how to redirect the contents of g:nim_log to a buffer/file?
16:26:33*q66[bru] joined #nimrod
16:28:37gradhaI only know of redir and dumping through let, but that doesn't convert line feeds, you get everything in a single line
16:32:12*q66[bru] quit (Quit: Computer has gone to sleep.)
18:13:44dom96wow. "compilation artifact(-14792, 3642) Error: internal error: genStmts(nkNone)" is certainly an interesting error.
18:19:34shevyartifacts!!!
18:19:37shevydig them out, then sell them!
18:20:07gradhaare you playing some trading game?
18:20:51Araq"compilation artifact" must be something zahary created :-)
18:22:12gradhaoh, the stacktrace was so long I didn't even bother to read it all
18:37:49*gradha quit (Quit: bbl, have youtube videos to watch)
19:15:14*shevy quit (Ping timeout: 252 seconds)
19:27:52*shevy joined #nimrod
19:48:06*Boscop joined #nimrod
20:12:09*gradha joined #nimrod
21:31:04Araqgradha: is #326 really tied to macosx?
21:31:37gradhano idea, I don't have other platforms to test it on
21:31:44Araqah ok
21:48:13gradhadom96: does gtk run on android?
21:49:31gradhayay for crazy http://code.google.com/p/android-xserver/
21:52:52gradhahmm... slashdot has an article from 2011 stating gtk 3.2 will allow running apps in the browser, and the gtk guys are on 3.6.2, where's my browser gimp?
21:54:51Araqit helps to read fragments of your statement:
21:55:02Araq"slashdot has an article from 2011 stating ..."
21:55:19Araq:P
21:58:38gradhadon't understand, they even had demos two years ago http://www.webupd8.org/2011/03/gtk-32-will-let-you-run-any-application.html
21:58:45gradhamaybe they decided it was crap and ditched it?
21:59:23dom96gradha: http://developer.gnome.org/gtk3/3.6/gtk-broadway.html
21:59:49dom96There was a video somewhere showing it off...
22:00:30gradhaI guess the gimp can't run just on that or requires other stuff not easily ported to the browser
22:01:21gradhait looks like gtk3 is the same as python3: everybody is still using 2?
22:01:44gradhawow, not even a single tutorial for gtk3
22:02:17gradhaawesome, the 2.x tutorial points to http://help.gnome.orgdevel/gtk-tutorial/stable/
22:03:01dom96Yes. And they decided to break themes in gtk3.6 or something like that. So I probably won't be porting to aporia to gtk3 anytime soon
22:03:19dom96*porting aporia
22:04:18gradhaAraq: docstrings for objects really don't work, want me to put a few cases as github issues?
22:04:39dom96GTK3 apps still fail to display checkboxes properly for me.
22:05:01dom96But my theme is apparently gtk3.6 compatible.
22:05:23Araqwhat do you mean, gradha ? docstrings for idetools?
22:05:25gradhawhat is this theme thing? like changing background colors or making windows with rounded corners?
22:05:43gradhaAraq: I have an object and using docstrings for its description or the fields just doesn't cut it
22:06:00dom96gradha: It's the way all widgets look.
22:06:07Araqtype o = object # \
22:06:11Araq # long text
22:06:14Araq # here
22:06:23Araqer, make that ## \
22:07:01gradhathat looks awesomely crap in the final html
22:07:17Araqhow so?
22:07:35gradhait is copied verbatim
22:07:45dom96what a positive way to say 'crap' :P
22:07:57Araqfor the fields, yes
22:08:06Araqfor the docs that go to the type itself, no
22:08:22gradhathen I must be doing something wrong, I'll make a test case
22:12:02gradhauff... can't even imagine myself how to fix the output without rewriting it all
22:13:17gradhathe use of verbatim text prevents anything sane due to flow issues
22:13:57Araqchanging that is some effort
22:14:14Araqthink of 'case' objects
22:14:34gradhathat's precisely what I'm trying to document
22:14:58gradhacan you have variants of variants?
22:15:28AraqI don't think so
22:15:34Araqbut it's a good question
22:15:49gradhait would be problematic, since that would leave you with a half initialised object
22:15:53Araqmaybe the compiler doesn't prevent that
22:23:53NimBotnimrod-code/Aporia 3d359a6 Dominik Picheta [+0 ±2 -0]: Fixed problems with Comment toggling messing up the undo manager.
22:23:53NimBotnimrod-code/Aporia 68d7526 Dominik Picheta [+0 ±3 -0]: Selecting further now clears any previous highlighted matches.
22:39:44*gradha quit (Quit: bbl, have youtube videos to watch)
23:30:58*XAMPP_8 quit (Ping timeout: 245 seconds)