Re: DIP60: @nogc attribute

2014-04-17 Thread Orvid King via Digitalmars-d
I'm just going to put my 2-cents into this discussion, it's my personal opinion that while _allocations_ should be removed from phobos wherever possible, replacing GC usage with manual calls to malloc/free has no place in the standard library, as it's quite simply a mess that is really not needed,

Re: Knowledge of managed memory pointers

2014-04-17 Thread Orvid King via Digitalmars-d
I think the biggest advantage to this distinction would really be the cross-language API's, the GC can determine which pointers it owns, although I don't believe it currently exposes this capability. On 4/17/14, Manu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 17 April 2014 18:20,

Re: DIP60: @nogc attribute

2014-04-17 Thread Orvid King via Digitalmars-d
compacting GC, I would be able to use a bump-the-pointer allocation strategy, which would be significantly faster than manual calls to malloc/free. On 4/17/14, Regan Heath via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thu, 17 Apr 2014 14:08:29 +0100, Orvid King via Digitalmars-d digitalmars-d

Discusssion on the Discussion of the Design for a new GC

2014-04-23 Thread Orvid King via Digitalmars-d
So, in order to get the ball rolling on the new GC I intend to implement for D, I want to facilitate a lively discussion of the design of it, so that it can be designed to be both robust and free of design flaws. To keep the discussion from getting derailed, I want to lay out a few guidelines,

Re: Discusssion on the Discussion of the Design for a new GC

2014-04-24 Thread Orvid King via Digitalmars-d
On Wednesday, 23 April 2014 at 18:35:26 UTC, Messenger wrote: On Wednesday, 23 April 2014 at 15:33:36 UTC, Orvid King wrote: After all of that, I intend to include a base draft of the design of the GC, along with opening the PRs and committing the starting API. So, is there something I’m

Re: Discusssion on the Discussion of the Design for a new GC

2014-04-24 Thread Orvid King via Digitalmars-d
On Thursday, 24 April 2014 at 10:14:07 UTC, Kagamin wrote: On Wednesday, 23 April 2014 at 18:35:26 UTC, Messenger wrote: On Wednesday, 23 April 2014 at 15:33:36 UTC, Orvid King wrote: After all of that, I intend to include a base draft of the design of the GC, along with opening the PRs and

Re: Discusssion on the Discussion of the Design for a new GC

2014-04-24 Thread Orvid King via Digitalmars-d
On Thursday, 24 April 2014 at 07:09:27 UTC, Mike wrote: On Wednesday, 23 April 2014 at 15:33:36 UTC, Orvid King wrote: After all of that, I intend to include a base draft of the design of the GC, along with opening the PRs and committing the starting API. So, is there something I’m missing? Am

Re: Discusssion on the Discussion of the Design for a new GC

2014-04-24 Thread Orvid King via Digitalmars-d
On Thursday, 24 April 2014 at 14:22:17 UTC, Dicebot wrote: On Thursday, 24 April 2014 at 14:15:45 UTC, Orvid King wrote: Ah, I hadn't realized he had actually implemented the concurrent GC he gave a talk on, I will make sure to look over the code before writing out the design. I was also

Re: A few considerations on garbage collection

2014-04-30 Thread Orvid King via Digitalmars-d
On Wednesday, 30 April 2014 at 15:33:29 UTC, Andrei Alexandrescu wrote: 4. Currently, struct objects created with new do NOT have their destructors called during collection. I think this may continue, meaning that structs created with new are somewhat low-level and are meant to be destroyed

Re: Parallel execution of unittests

2014-04-30 Thread Orvid King via Digitalmars-d
As a note, I'm one of those that have used the main function in addition to unittests. I use it in the unittest build mode of my JSON serialization library, using the unittests to ensure I didn't break anything, and then using the main to run a performance test that my changes actually did make it

Re: Discusssion on the Discussion of the Design for a new GC

2014-04-30 Thread Orvid King via Digitalmars-d
Just thought of a minor addition to the guidelines. While discussion of the naming of the public API should occur on the newsgroup, discussion of the names of locals, or non-public APIs should occur on Github. Any objections/concerns/improvements to this?

Re: std.allocator: primitives for helping GC

2014-05-01 Thread Orvid King via Digitalmars-d
On 4/30/14, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: So far allocators have been quite GC-agnostic; deallocation would be needed for each allocation, and there was little structure to help tracing. The primitive resolveInternalPointer has made a step toward more

Re: std.allocator: false pointers

2014-05-02 Thread Orvid King via Digitalmars-d
Well, in a 64-bit address space, the false pointer issue is almost mute, the issue comes in when you try to apply this design to 32-bit, where the false pointer issue is more prevelent. Is the volume of memory saved by this really worth it? Another thing to consider is that this makes it

Re: Enforced @nogc for dtors?

2014-05-05 Thread Orvid King via Digitalmars-d
Also, the @nogc for destructors is specific to the current GC, and is a limitation that isn't really needed were destructors implemented properly in the current GC. On 5/5/14, monarch_dodra via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 4 May 2014 at 20:49:57 UTC, bearophile

Re: std.typed_allocator: very very very primitive tracing example

2014-05-05 Thread Orvid King via Digitalmars-d
The only thing I could see being an issue is the size of resulting scanning code, which could probably be mitigated by using a `bitmap`-ish representation as a key, so that types that have the same bitmap use the same scanning function. Also, I see a *very* large number of indirect branching

Re: A few considerations on garbage collection

2014-05-05 Thread Orvid King via Digitalmars-d
On 5/4/14, Marco Leise via Digitalmars-d digitalmars-d@puremagic.com wrote: Would that affect all arrays, only arrays containing structs or only affect arrays containing structs with dtors? printf(hello\n.ptr); should still work after all. That should work independent of what the GC

Re: Enforced @nogc for dtors?

2014-05-05 Thread Orvid King via Digitalmars-d
digitalmars-d@puremagic.com wrote: On Monday, 5 May 2014 at 14:17:04 UTC, Orvid King via Digitalmars-d wrote: Also, the @nogc for destructors is specific to the current GC, and is a limitation that isn't really needed were destructors implemented properly in the current GC. How does one

Re: Running Phobos unit tests in threads: I have data

2014-05-05 Thread Orvid King via Digitalmars-d
Going to take a wild guess, but as core.atomic.casImpl will never be inlined anywhere with DMD, due to it's inline assembly, you have the cost of building and destroying a stack frame, the cost of passing the args in, moving them into registers, saving potentially trashed registers, etc. every

Re: Enforced @nogc for dtors?

2014-05-06 Thread Orvid King via Digitalmars-d
the best we can. On 5/6/14, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 5 May 2014 at 18:32:30 UTC, Brian Rogoff wrote: On Monday, 5 May 2014 at 17:46:35 UTC, Orvid King via Digitalmars-d wrote: Destructors and finalizers are the same thing. That is exactly the point

Re: API

2014-05-06 Thread Orvid King via Digitalmars-d
On 5/5/14, Adam D. Ruppe via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 6 May 2014 at 00:10:36 UTC, Andrei Alexandrescu wrote: 1. Follow the new int[n] convention: 2. Follow the [ literal ] convention: We could combine these pretty easily: struct Length { size_t length; }

Re: A Briefer Syntax for Using Concepts

2014-05-07 Thread Orvid King via Digitalmars-d
On 5/7/14, w0rp via Digitalmars-d digitalmars-d@puremagic.com wrote: void foo(InputRange range); How to make it accept multiple types? Simple, we already have template constraints, so this would be how to do it, where T is the element type of the input range: void foo(T)(InputRange!T range);

Re: No VisualStudio project for phobos?

2014-05-08 Thread Orvid King via Digitalmars-d
It would mean that a VisualD project for druntime, as well as a VisualC++ project for zlib, would be required. The issue I see is that while I know that Mono-D can open VisualD project files, as well as dub projects, and mono-d project files, I don't know if it can open VisualC++ project files,

Re: GC removeRange/removeRoot API issue

2014-05-08 Thread Orvid King via Digitalmars-d
What's the reasoning for the current behavior of add/remove range? This is actually something that I had almost forgotten about in my GC design, so I thank you for reminding me of it :D After a preliminary think-through of the design, I would end up going with the first possibility, so that

Re: Performance

2014-05-30 Thread Orvid King via Digitalmars-d
On 5/30/2014 9:30 AM, bearophile wrote: double plus(in uint nSteps) pure nothrow @safe /*@nogc*/ { enum double p0 = 0.0045; enum double p1 = 1.00045452-p0; double tot = 1.346346; auto b = true; foreach (immutable i; 0 .. nSteps) { final switch (b) { case

Re: Few recent dmd pull requests

2014-06-26 Thread Orvid King via Digitalmars-d
On 6/26/2014 5:38 AM, bearophile wrote: For people that are not following closely what's happening in GitHub, there are some nice or very nice patches waiting to be fixed and/or accepted, among the last ones: While we're on the subject, I've been meaning to make a post about it, but just

Re: What's blocking DDMD?

2014-07-22 Thread Orvid King via Digitalmars-d
On 7/22/2014 9:34 AM, Daniel Murphy wrote: Tourist wrote in message news:cmeqwpzglxjksmiek...@forum.dlang.org... Just curious. I remember that there was some kind of a roadmap, but I cannot find it now. Nice timing, I was about to post a DDMD status message. As of a few hours ago DDMD

Re: Conversion of the NPAPI

2014-07-28 Thread Orvid King via Digitalmars-d
On 7/28/2014 6:01 AM, Joakim wrote: On Monday, 28 July 2014 at 05:16:51 UTC, Sean Campbell wrote: Is there anywhere where there is a D version of the NPAPI. I tried using htod with and without the cpp flag with no sucess Why would you want to use NPAPI at this point? IE hasn't supported it

Re: New Github Issues

2014-07-28 Thread Orvid King via Digitalmars-d
On 7/28/2014 12:31 PM, Brad Anderson wrote: Github updated their Issues system (which includes Pull Requests). You can read about it here: https://github.com/blog/1866-the-new-github-issues Bugzilla is here to stay but the newly added Labels feature could probably help organize Pull Requests.

Re: Guide for dmd development @ Win64?

2014-08-02 Thread Orvid King via Digitalmars-d
On 8/2/2014 11:10 AM, Dicebot wrote: I have an awkward problem - recently installed an extra Win8 (x64) OS to test some of weird failures I can't reproduce on Linux and after half a day still can't configure basic development setup for dmd/druntime/phobos _ This was quite helpful

Re: std.jgrandson

2014-08-03 Thread Orvid King via Digitalmars-d
On 8/3/2014 2:16 AM, Andrei Alexandrescu wrote: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state and hence ready for destruction:

Re: Guide for dmd development @ Win64?

2014-08-04 Thread Orvid King via Digitalmars-d
On 8/3/2014 6:58 PM, Dicebot wrote: On Saturday, 2 August 2014 at 20:49:12 UTC, Orvid King wrote: I actually use a shell script which I run from git's bash shell. It updates, builds, and installs DMD, druntime, and phobos. It currently is setup to build a 64-bit DMD with MSVC, and will build

Re: Guide for dmd development @ Win64?

2014-08-05 Thread Orvid King via Digitalmars-d
On 8/4/2014 9:43 PM, Dicebot wrote: On Monday, 4 August 2014 at 22:48:51 UTC, Orvid King wrote: Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0) I had to change much more

Re: Guide for dmd development @ Win64?

2014-08-05 Thread Orvid King via Digitalmars-d
On 8/4/2014 10:17 PM, Kapps wrote: 3) Edit the tools win32.mak to use -m64 and thus actually be 64-bit. The makefiles don't use a different folder for x86 and x64, so you can't have a 32-bit version of phobos and 64-bit version of phobos at same time, so tools needs to be built for 64-bit. Then

Re: Guide for dmd development @ Win64?

2014-08-06 Thread Orvid King via Digitalmars-d
On 8/5/2014 10:20 PM, Dicebot wrote: On Tuesday, 5 August 2014 at 21:48:40 UTC, Johannes Blume wrote: Normally, you just execute vcvars32.bat/vcvars64.bat before doing anything from the command line and you are set. Even make scripts I created five years ago for VS2008 still work without a

Re: Guide for dmd development @ Win64?

2014-08-06 Thread Orvid King via Digitalmars-d
On 8/6/2014 3:56 PM, Dicebot wrote: On Wednesday, 6 August 2014 at 14:09:43 UTC, Orvid King wrote: I call into a batch file that runs that batch file from my shell script, which then calls msbuild to actually build DMD. It is also needed for druntime / phobos builds. Ah, yes, for those I do

Re: Bounty increased to $445 for dmd issue

2014-08-08 Thread Orvid King via Digitalmars-d
On 8/8/2014 3:14 PM, Andrei Alexandrescu wrote: https://www.bountysource.com/issues/1325901-64-bit-c-abi-not-followed-for-passing-structs-and-complex-numbers-as-function-parameters Andrei Any idea when they changed to a delay-loaded page? Their new pages won't load for me in Opera (I still

Re: Spam attack on the Wiki

2014-08-11 Thread Orvid King via Digitalmars-d
On 8/11/2014 9:17 AM, H. S. Teoh via Digitalmars-d wrote: On Mon, Aug 11, 2014 at 08:23:13AM +, via Digitalmars-d wrote: Could one of the Wiki admins have a look, please? There is a spam attack ongoing on wiki.dlang.org. Nothing massive, just a handful of pages so far, but better to stop

Re: Destroying structs (literally)

2014-08-28 Thread Orvid King via Digitalmars-d
On 8/28/2014 9:21 PM, Andrei Alexandrescu wrote: Dear community, are you ready for this? https://issues.dlang.org/show_bug.cgi?id=2834 https://github.com/D-Programming-Language/druntime/pull/864 We must do it, and the way I see it the earlier the better. Shall we do it in 2.067? This is a

Re: Destroying structs (literally)

2014-08-29 Thread Orvid King via Digitalmars-d
On 8/29/2014 12:41 AM, monarch_dodra wrote: Questions: - Can and will this work for arrays of structs? - When doing manual GC allocations (for whatever reason), how can we later tell the GC what destructor to call? Yes, this does work for arrays of structs. Provided that you've passed in the

Re: Destroying structs (literally)

2014-08-29 Thread Orvid King via Digitalmars-d
On 8/29/2014 2:52 PM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Friday, 29 August 2014 at 19:01:51 UTC, Andrei Alexandrescu wrote: On 8/29/14, 3:53 AM, Marc Schütz schue...@gmx.net wrote: Jacob Carlborg just recently brought this up in another thread. Isn't it kind of consensus

Re: Destroying structs (literally)

2014-08-30 Thread Orvid King via Digitalmars-d
On 8/30/2014 4:22 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Saturday, 30 August 2014 at 03:54:41 UTC, Orvid King wrote: On 8/29/2014 2:52 PM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Friday, 29 August 2014 at 19:01:51 UTC, Andrei Alexandrescu wrote: On

Re: Destroying structs (literally)

2014-08-30 Thread Orvid King via Digitalmars-d
On 8/30/2014 10:35 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: The problem is not only dereferencing those pointers (though depending on how the GC works even this might be racy, i.e. the memory location could have been reused already), but that a destructor/finalizer already ran

Fixing Issue 1829

2014-08-31 Thread Orvid King via Digitalmars-d
A little over 4 months ago, I submitted a PR (https://github.com/D-Programming-Language/dmd/pull/3483) to DMD to fix this very old issue, which did at first have minor issues with it that were promptly fixed. The PR itself has never actually been reviewed, even though I've tried on a couple of

Re: UDA for module declaration.

2014-09-16 Thread Orvid King via Digitalmars-d
On Wednesday, 17 September 2014 at 00:46:07 UTC, IgorStepanov wrote: Why not subj? D allows annotate with UDA the most of named symbols. There are three category of named symbols, which cannot be annotated: module declarations, function arguments and enum members. Enum members are trivial

Re: On heap segregation, GC optimization and @nogc relaxing

2014-11-11 Thread Orvid King via Digitalmars-d
On Wednesday, 12 November 2014 at 02:34:55 UTC, deadalnix wrote: Hi all, I want to get back on the subject of ownership, lifetime and propose some solution, but before, propose to state the problem in a way that haven't seen before (even if I have no doubt some have came to the same

Re: dlang.org redesign -- general thoughts and issues [part 1]

2015-01-23 Thread Orvid King via Digitalmars-d
On Friday, 23 January 2015 at 19:20:11 UTC, aldanor wrote: On Friday, 23 January 2015 at 19:18:34 UTC, Chris wrote: On Friday, 23 January 2015 at 13:39:23 UTC, Christof Schardt wrote: aldanor i.s.smir...@gmail.com schrieb im Newsbeitrag news:didzczqdggjchqgtg...@forum.dlang.org... Hi all,

Re: DIP56 - inlining

2015-02-03 Thread Orvid King via Digitalmars-d
On Wednesday, 4 February 2015 at 05:17:11 UTC, ketmar wrote: On Tue, 03 Feb 2015 22:47:30 +, Orvid King wrote: On Tuesday, 3 February 2015 at 22:30:22 UTC, Walter Bright wrote: http://wiki.dlang.org/DIP56 There's been enough discussion, time to make a decision and move on. I changed

Re: GCs are complicated beasts: .NET Core, 35000 lines

2015-02-03 Thread Orvid King via Digitalmars-d
On Tuesday, 3 February 2015 at 22:19:08 UTC, Tourist wrote: Source code: https://raw.githubusercontent.com/dotnet/coreclr/master/src/gc/gc.cpp Origin: http://www.reddit.com/r/programming/comments/2unrll/net_core_is_on_github/coa2uot The thing to realize about the .net GC is that it is

Re: Suggestion: array slice through arr[base, size]

2015-02-08 Thread Orvid King via Digitalmars-d
On Sunday, 8 February 2015 at 15:20:17 UTC, karl wrote: Hi, it's a bit unwieldy to write/read this: result = src[base .. base+size]; instead of: result = src[base, size]; Maybe such syntax would be a welcome addition to D? I don't see it conflicting with the existing grammar, and only the 2

Re: DIP56 - inlining

2015-02-03 Thread Orvid King via Digitalmars-d
On Tuesday, 3 February 2015 at 22:30:22 UTC, Walter Bright wrote: http://wiki.dlang.org/DIP56 There's been enough discussion, time to make a decision and move on. I changed the description to: If a pragma specifies always inline, and the compiler cannot inline it, a warning will be

Re: Discussion on groupBy

2015-01-10 Thread Orvid King via Digitalmars-d
On Saturday, 10 January 2015 at 20:19:14 UTC, Andrei Alexandrescu wrote: groupBy is an important primitive for relational algebra queries on data. Soon to follow are operators such as aggregate() which is a sort of reduce() but operating on ranges of ranges. With those in tow, a query such as

Re: const as default for variables

2015-03-14 Thread Orvid King via Digitalmars-d
On Saturday, 14 March 2015 at 20:15:30 UTC, Walter Bright wrote: I've often thought, as do many others here, that immutability should be the default for variables. [This is a long term issue. Just thought maybe it's time for a conversation about it.] Because immutable is transitive,

Re: dfmt options

2015-03-14 Thread Orvid King via Digitalmars-d
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote: On 3/14/2015 4:15 PM, Brian Schott wrote: What am I missing? I suggest defining The One True Way and have no configuration options. At which point you realize that The One True Way is wrong, ask for it to be changed, and are

Re: Order of evaluation of a += a++;

2015-03-31 Thread Orvid King via Digitalmars-d
On Tuesday, 31 March 2015 at 06:50:16 UTC, Andrei Alexandrescu wrote: On 3/30/15 11:34 PM, deadalnix wrote: On Tuesday, 31 March 2015 at 06:20:22 UTC, Andrei Alexandrescu wrote: On 3/30/15 8:49 PM, deadalnix wrote: On Tuesday, 31 March 2015 at 01:01:24 UTC, Andrei Alexandrescu wrote: On

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Orvid King via Digitalmars-d
From the perspective of someone mostly indifferent to the support for it: Why does DIP74 require the references to be counted on assignment? Shouldn't it be defined such that reference counting operations only need to occur when an unbalanced or escapable reference is created? This would

Re: Livestreaming DConf?

2014-05-09 Thread Orvid King via Digitalmars-d-announce
On Friday, 9 May 2014 at 19:48:20 UTC, Andrei Alexandrescu wrote: Hi folks, We at Facebook are very excited about the upcoming DConf 2014. In fact, so excited we're considering livestreaming the event for the benefit of the many of us who can't make it to Menlo Park, CA. Livestreaming

Re: DConf 2013 to be livestreamed, I'll take questions during my keynote at 9 AM PST

2014-05-20 Thread Orvid King via Digitalmars-d-announce
On 5/20/2014 2:34 PM, Andrei Alexandrescu via Digitalmars-d-announce wrote: https://hn.algolia.com/#!/all/last_24h/prefix/0/dconf%202014 Andrei Also, if you prefer your IRC client over the chat client that ustream has, you can connect to it as IRC via the server chat1.ustream.tv then join

Re: DConf 2013 to be livestreamed, I'll take questions during my keynote at 9 AM PST

2014-05-20 Thread Orvid King via Digitalmars-d-announce
On 5/20/2014 2:51 PM, Orvid King via Digitalmars-d-announce wrote: Also, if you prefer your IRC client over the chat client that ustream has, you can connect to it as IRC via the server chat1.ustream.tv then join the #dconf-2014 channel. To register your nick, register on ustream, then connect

Re: [Mono-D] v2.1.18 Parser/Completion/General fixesimprovements

2014-08-13 Thread Orvid King via Digitalmars-d-announce
On 8/13/2014 1:32 PM, Dicebot wrote: On Wednesday, 13 August 2014 at 18:13:22 UTC, simendsjo wrote: On 08/13/2014 04:16 PM, Alex wrote: (...) You should've noticed that the installation instruction stuff has been moved to the D wiki - http://wiki.dlang.org/Mono-D (...) Is it just me, or is

Re: Down the VisualD0.3.38-1.exe ,found virus!

2014-05-09 Thread Orvid King via Digitalmars-d-learn
Trend Micro and Comodo have (from my limited experience) been pretty good about dealing with false positives, so does anyone want to inform them and the others as well? On 5/8/14, sigod via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Friday, 9 May 2014 at 01:02:39 UTC,

Re: Why is rehash not @safe?

2014-08-30 Thread Orvid King via Digitalmars-d-learn
On 8/30/2014 9:27 AM, Nordlöw wrote: I just noticed that AA rehash is @system. Is there a reason for this? Is it system because bad things can happen or simply because it's a low level function? Should I always tag functions calling rehash as @trusted? Rehash itself would have to be marked

Re: GC has a barbaric destroyng model, I think

2015-02-11 Thread Orvid King via Digitalmars-d-learn
On Wednesday, 11 February 2015 at 21:34:00 UTC, Andrey Derzhavin wrote: If we are using a DMD realization of destroying of objects, happens the following: at the calling the «destroy» method the calling of dtor takes place always, and then the object which is being destroyed is