Re: D2 port of Sociomantic CDGC available for early experiments
On 09.10.2014 08:29, Jacob Carlborg wrote: On 08/10/14 22:47, Rainer Schuetze wrote: C main is no longer under user control, because it is auto-generated with D main. I never liked that change, we've just discovered another reason. All platforms have API's to access the command line arguments passed to "main". On OS X that would be "_NSGetArgv" and "_NSGetArgc". Yes, but the problem is not to access command line arguments, but to run code before the GC initialization i.e. before _d_run_main is executed. If we can assume a C++ backend, using static initialization of a C++ global could work: static bool initGC = configureGC(); because the C++ runtime runs configureGC before calling C main. I'd rather like to see a solution using D, though.
Re: D2 port of Sociomantic CDGC available for early experiments
On 08/10/14 22:47, Rainer Schuetze wrote: C main is no longer under user control, because it is auto-generated with D main. I never liked that change, we've just discovered another reason. All platforms have API's to access the command line arguments passed to "main". On OS X that would be "_NSGetArgv" and "_NSGetArgc". -- /Jacob Carlborg
Re: D on TV - FLOSS Weekly 311
On 10/08/2014 10:41 PM, Walter Bright wrote: On 10/8/2014 6:25 PM, John wrote: I wish you had some lighting on you. You are hardly visible! It's to hide the scars where my head was sewed back on. "Getting the brain out was the easy part. The hard part was getting the brain out!" - Hubert Farnsworth
Re: D on TV - FLOSS Weekly 311
On 10/8/2014 6:25 PM, John wrote: Interesting talk! Thanks! I wish you had some lighting on you. You are hardly visible! It's to hide the scars where my head was sewed back on.
Re: D on TV - FLOSS Weekly 311
On Wednesday, 8 October 2014 at 22:26:36 UTC, Walter Bright wrote: alias the Walter & Andrei show! http://twit.tv/show/floss-weekly/311 Interesting talk! I wish you had some lighting on you. You are hardly visible!
Re: Walter and I are on at FLOSS weekly
On Wednesday, 8 October 2014 at 21:01:27 UTC, Andrei Alexandrescu wrote: Recorded this morning. Enjoy! http://twit.tv/show/floss-weekly/311 Andrei I'm currently up to the part where its mentioned about TAP testing protocol [0]. Based upon my quick glance over at druntime [1]. I think we could implement it fairly easily. This should be a fairly easy win for anyone who wants to give it a go. [0] http://testanything.org/tap-specification.html [1] https://github.com/D-Programming-Language/druntime/blob/master/src/test_runner.d
Re: D on TV - FLOSS Weekly 311
On 10/8/2014 3:25 PM, Walter Bright wrote: alias the Walter & Andrei show! http://twit.tv/show/floss-weekly/311 On reddit! https://www.reddit.com/r/programming/comments/2ipdpa/floss_weekly_311_the_d_language/ and on https://news.ycombinator.com/newest
Re: D on TV - FLOSS Weekly 311
On 10/8/2014 3:25 PM, Walter Bright wrote: alias the Walter & Andrei show! http://twit.tv/show/floss-weekly/311 Looks like we overloaded their server! Yee-haw!
Re: Walter and I are on at FLOSS weekly
On 10/8/2014 2:01 PM, Andrei Alexandrescu wrote: Recorded this morning. Enjoy! http://twit.tv/show/floss-weekly/311 Andrei Ya beat me to it. G!!! :-)
D on TV - FLOSS Weekly 311
alias the Walter & Andrei show! http://twit.tv/show/floss-weekly/311
Re: D on TV - FLOSS Weekly 311
On 10/8/2014 3:25 PM, Walter Bright wrote: alias the Walter & Andrei show! http://twit.tv/show/floss-weekly/311 And thanks to our hosts Randal Schwartz and Dan Lynch for hosting us!
Walter and I are on at FLOSS weekly
Recorded this morning. Enjoy! http://twit.tv/show/floss-weekly/311 Andrei
Re: D2 port of Sociomantic CDGC available for early experiments
On 08.10.2014 22:10, Walter Bright wrote: On 10/8/2014 11:19 AM, Rainer Schuetze wrote: There is no perfect plan how an application can change the default options that are used without arguments, though. Doing this in main() is too late for some parameters (e.g. "precise"), because the GC will have to be setup to execute "static this" and other library initialization before reaching main. I meant look for the argument in the C main() which is part of druntime and is the first to get control. You're right that the D main() is too late. C main is no longer under user control, because it is auto-generated with D main. I never liked that change, we've just discovered another reason.
Re: D2 port of Sociomantic CDGC available for early experiments
On 10/8/2014 11:19 AM, Rainer Schuetze wrote: There is no perfect plan how an application can change the default options that are used without arguments, though. Doing this in main() is too late for some parameters (e.g. "precise"), because the GC will have to be setup to execute "static this" and other library initialization before reaching main. I meant look for the argument in the C main() which is part of druntime and is the first to get control. You're right that the D main() is too late.
Re: D2 port of Sociomantic CDGC available for early experiments
On 06.10.2014 19:29, Dicebot wrote: On Monday, 6 October 2014 at 17:23:55 UTC, Andrei Alexandrescu wrote: On 10/6/14, 9:51 AM, Dicebot wrote: https://github.com/D-Programming-Language/druntime/pull/985 This is awesome. I recall Don had some solid performance numbers for it in his talk, do you have any in the context of D2? -- Andrei No, I didn't get to running any perf test so far. Did PR as soon as test suite passes and commits looked sane. Will do eventually. Any specific project you are interested in? I'd love to see the impact on vibe.d but it is subject to threading/malloc issue right now. druntime has a small benchmark suite in druntime/benchmark. I'd be very interested to see how it performs against this. (Some files are from Leandros tests.) Just compile and run "runbench.d". I'm benchmarking my Windows version of a concurrent GC with it. It does quite a lot of allocations, and this is causing some serious trouble because marking cannot compete with the rate of allocation, causing some tests to allocate a lot of memory, slowing down marking even more. I'm still looking for a solution...
Re: D2 port of Sociomantic CDGC available for early experiments
On Wednesday, 8 October 2014 at 17:39:46 UTC, Walter Bright wrote: Being on the front lines of tech support for 30 years, it is not an unjustified fear nor a hypothetical problem. What you could do is propose a "secret" switch to all dmd generated programs that the druntime switch checks before main() gets control, such as: app --druntimeSet=usexxx ...the regular app args ... I don't think this would work (without introducing extra hacks) when druntime is used as a shared library. Plus, when writing plugins in D, there might not even be a host D application to handle the command line flags. I'm not saying that command line arguments can't be made to work in these cases too, just that doing it will likely introduce quite a bit of extra complexity. David
Re: D2 port of Sociomantic CDGC available for early experiments
On 08.10.2014 19:39, Walter Bright wrote: On 10/8/2014 12:43 AM, Leandro Lucarella wrote: I think this is an unjustified fear, there are already many environment variables that can affect your program. That's why they are called... environment variables :) Being on the front lines of tech support for 30 years, it is not an unjustified fear nor a hypothetical problem. What you could do is propose a "secret" switch to all dmd generated programs that the druntime switch checks before main() gets control, such as: app --druntimeSet=usexxx ...the regular app args ... We have app --DRT-gcopt=concurrent in gc.config now. There is no perfect plan how an application can change the default options that are used without arguments, though. Doing this in main() is too late for some parameters (e.g. "precise"), because the GC will have to be setup to execute "static this" and other library initialization before reaching main.
Re: D2 port of Sociomantic CDGC available for early experiments
On Wed, 8 Oct 2014 20:47:09 +0300 ketmar via Digitalmars-d-announce wrote: p.s. i believe that there shouldn't be any flags that turns off range checking. if someone wants to do it "fast", he can use pointer arithmetics (this is exactly the same as using arrays with range checks off). that's what i'm doing in my code: writing everything using arrays, which are range-checked. then profiling and rewriting bottlenecks using pointer arithmetics. and i found that i rarely ever need to go pointers, 'cause optimizing algorithms has much bigger impact on performance. signature.asc Description: PGP signature
Re: D2 port of Sociomantic CDGC available for early experiments
On Wed, 08 Oct 2014 10:33:46 -0700 Walter Bright via Digitalmars-d-announce wrote: > On 10/7/2014 11:58 PM, ketmar via Digitalmars-d-announce wrote: > > maybe enable envvar-control in alphas/betas and disable in releases? > I thought you were opposed to -release builds? i'm opposed to "-release" flag which turns off assertions and range checking, not to the builds which can be titled "official releases". we have official DMD releases, alphas, betas and RCs. it's logical to turn on some experimental features in alphas/betas for people to play, but turn such features off for safety reasons in RC/release. turning off assertions and range checks decreases safety. turning off experimental features and features with very unexpected side effects increases safety. it's ok to make alphas/betas less safe. it's not ok to make RCs/releases less safe. signature.asc Description: PGP signature
Re: D2 port of Sociomantic CDGC available for early experiments
On 10/8/2014 12:43 AM, Leandro Lucarella wrote: I think this is an unjustified fear, there are already many environment variables that can affect your program. That's why they are called... environment variables :) Being on the front lines of tech support for 30 years, it is not an unjustified fear nor a hypothetical problem. What you could do is propose a "secret" switch to all dmd generated programs that the druntime switch checks before main() gets control, such as: app --druntimeSet=usexxx ...the regular app args ...
Re: D2 port of Sociomantic CDGC available for early experiments
On 10/8/2014 2:55 AM, Vladimir Panteleev wrote: On Wednesday, 8 October 2014 at 00:18:16 UTC, Walter Bright wrote: Sort of like: user: "need to fix this on the website" n.g.: "thanks! fixed now!" user: "no it isn't" n.g.: "looks good to me" [lots of fruitless back and forth] n.g.: "did you refresh your browser's cache?" user: "oops, sorry!" OT: I know this is just an example to illustrate a point, but I think this particular story is about the web developer not understanding HTTP caching, or not being aware that their caching headers may cause the fix to not propagate to users indefinitely. :) There are similar recurring discussions about the path to where the D libraries are, such as "I deleted all the old versions of dmd from my system, but it is still using them!" Using environment variables is a recurring support problem, even for people who understand them.
Re: D2 port of Sociomantic CDGC available for early experiments
On 10/7/2014 11:58 PM, ketmar via Digitalmars-d-announce wrote: maybe enable envvar-control in alphas/betas and disable in releases? I thought you were opposed to -release builds?
Re: D2 port of Sociomantic CDGC available for early experiments
On Wednesday, 8 October 2014 at 07:14:30 UTC, Paolo Invernizzi wrote: On Wednesday, 8 October 2014 at 06:58:36 UTC, ketmar via Digitalmars-d-announce wrote: On Tue, 07 Oct 2014 17:18:18 -0700 Walter Bright via Digitalmars-d-announce wrote: i assume that not everyone are ready to build dmd from sources, Digger? What can be easier? Yes, this is a perfect use case for Digger. Just scroll down the pull request list, check the GC pull's checkbox, and click "build". What could be easier?
Re: D2 port of Sociomantic CDGC available for early experiments
On Wednesday, 8 October 2014 at 00:18:16 UTC, Walter Bright wrote: Sort of like: user: "need to fix this on the website" n.g.: "thanks! fixed now!" user: "no it isn't" n.g.: "looks good to me" [lots of fruitless back and forth] n.g.: "did you refresh your browser's cache?" user: "oops, sorry!" OT: I know this is just an example to illustrate a point, but I think this particular story is about the web developer not understanding HTTP caching, or not being aware that their caching headers may cause the fix to not propagate to users indefinitely. :)
Re: D2 port of Sociomantic CDGC available for early experiments
Walter Bright, el 7 de October a las 17:18 me escribiste: > On 10/7/2014 3:27 PM, Leandro Lucarella wrote: > >Walter Bright, el 7 de October a las 13:06 me escribiste: > >>On 10/6/2014 9:51 AM, Dicebot wrote: > >>>https://github.com/D-Programming-Language/druntime/pull/985 > >> > >>Thank you. This is great progress! > >> > >>I understand the caveats, but can this be put into a shape where it > >>can be pulled despite being a work in progress? I.e. have the code > >>be disabled by default? That will help encourage the community to > >>help out with the gaps. > > > >Yes, I think that's the best approach too. Ideally this should be > >configurable at runtime as Marting suggested, so ANYONE can try it with > >their applications by just running it like this: > >D_GC=concurrent=1 ./myapp > > > >Then bugs can be filled more easily and people can work on fixing them > >more easily too. At some point I'd like to see the current GC and the > >concurrent GC merged, the concurrent GC already support disabling the > >concurrency. Both GCs diverged with time and both have (different) > >improvements over the common parent, and it will be a shame to lose any > >of them. > > > > That's a good idea, but I hate environment variables affecting all D > executables. They always wind up being inadvertently being left on, > or off, or set for some unrelated purpose. It also would affect all > D executables on the system, potentially making a big mess. I think this is an unjustified fear, there are already many environment variables that can affect your program. That's why they are called... environment variables :) -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ -- - Mire, don Inodoro! Una paloma con un anillo en la pata! Debe ser mensajera y cayó aquí! - Y... si no es mensajera es coqueta... o casada. -- Mendieta e Inodoro Pereyra
Re: D2 port of Sociomantic CDGC available for early experiments
On Wed, 08 Oct 2014 07:14:29 + Paolo Invernizzi via Digitalmars-d-announce wrote: > > i assume that not everyone are ready to build dmd from sources, > Digger? What can be easier? p.s. i mean that it will be good to have Digger mentioned somewhere at the front page, with some usage samples, so people will know that we have such good tool. signature.asc Description: PGP signature
Re: D2 port of Sociomantic CDGC available for early experiments
On Wed, 08 Oct 2014 07:14:29 + Paolo Invernizzi via Digitalmars-d-announce wrote: > > i assume that not everyone are ready to build dmd from sources, > Digger? What can be easier? i've never used Digger, so i can't tell anything about it. ;-) signature.asc Description: PGP signature
Re: D2 port of Sociomantic CDGC available for early experiments
On Wednesday, 8 October 2014 at 06:58:36 UTC, ketmar via Digitalmars-d-announce wrote: On Tue, 07 Oct 2014 17:18:18 -0700 Walter Bright via Digitalmars-d-announce wrote: i assume that not everyone are ready to build dmd from sources, Digger? What can be easier? -- /P