Re: Mac Apps That Use Garbage Collection Must Move to ARC

2015-02-23 Thread deadalnix via Digitalmars-d
On Monday, 23 February 2015 at 09:51:07 UTC, Manu wrote: This is going to sound really stupid... but do people actually use exceptions regularly? I'd say exception are exceptional in most code. That being said, unless the compiler can PROVE that no exception is gonna be thrown, you are

Re: Memory safety depends entirely on GC ?

2015-02-23 Thread deadalnix via Digitalmars-d
On Monday, 23 February 2015 at 15:35:52 UTC, Ola Fosheim Grøstad wrote: If you do excessive refcounting (ARC) and care about performance you actually need to let the implementor of C decide where the RC_counter is embedded... C providing facility to be refcountable do not equate with C's

Re: Dgame revived

2015-02-23 Thread Mike Parker via Digitalmars-d-announce
On 2/24/2015 8:18 AM, Gan wrote: Doesn't work. Still gives the same OpenGL too low error. I think you need to place the lines SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);

Re: Memory safety depends entirely on GC ?

2015-02-23 Thread deadalnix via Digitalmars-d
On Monday, 23 February 2015 at 18:16:38 UTC, Andrei Alexandrescu wrote: That's not feasible. Code that assumes the class object will live forever can simply do things that are not allowed to code that must assume the object will go away at some determined point. Consider this which I just

Re: Stackless resumable functions

2015-02-23 Thread bitwise via Digitalmars-d
ahem. seems that you are right, and i outsmarted myself yet again. seems that my head is too small to keep three different task unmessed (forum discussion, plus two of my projects). sorry. If it's any consolation, I did accidentally use a C++ constructor in my first example.. I better

Re: const member function

2015-02-23 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 23, 2015 09:12:33 rumbu via Digitalmars-d-learn wrote: On Saturday, 21 February 2015 at 15:26:28 UTC, ketmar wrote: On Sat, 21 Feb 2015 08:27:13 +, rumbu wrote: My question was not how I do this, I know already. My question was if there is another way to safely

Re: Mac Apps That Use Garbage Collection Must Move to ARC

2015-02-23 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-23 21:30, Walter Bright wrote: Count me among those. In Java, write barriers make sense because Java uses the GC for everything. Pretty much every indirection is a GC reference. This is not at all true with D code. But since the compiler can't know that, it has to insert write

Deprecation process documented?

2015-02-23 Thread Jacob Carlborg via Digitalmars-d-learn
Is the deprecation process used for Phobos and druntime code documented somewhere? I.e. how long after a deprecation is a symbols removed and so on. -- /Jacob Carlborg

Re: Stackless resumable functions

2015-02-23 Thread ketmar via Digitalmars-d
On Tue, 24 Feb 2015 03:22:10 +, bitwise wrote: I think you're getting confused between stackless and stackful resumable functions. ahem. seems that you are right, and i outsmarted myself yet again. seems that my head is too small to keep three different task unmessed (forum discussion,

Re: Is this a bug in dmd 2.067 for struct initializers?

2015-02-23 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 22, 2015 17:45:48 Ali Çehreli via Digitalmars-d-learn wrote: On 02/22/2015 03:17 PM, Martin Nowak wrote: On Thursday, 19 February 2015 at 22:07:55 UTC, stewarth wrote: I've gone with static this() approach and it works. You should use shared static this to initialize

Re: A Refcounted Array Type

2015-02-23 Thread Jonathan M Davis via Digitalmars-d
On Monday, February 23, 2015 15:28:21 Andrei Alexandrescu via Digitalmars-d wrote: On 2/23/15 2:15 PM, Walter Bright wrote: This is pretty straightforward. [snip] The code builds if you slap a @safe: at the top. There is one bug in the compiler: delete must not be allowed in @safe code.

Re: Stackless resumable functions

2015-02-23 Thread bitwise via Digitalmars-d
you don't need to. if you really need to do that, you're doing something This makes no sense to me. A usage example may be helpful. resumable functions are not iterators. it's a slightly perversed flow control method. iteration/generation is one of the use cases. So how do you explain

Re: Let's Play Code Golf

2015-02-23 Thread anonymous via Digitalmars-d
On Monday, 23 February 2015 at 20:21:20 UTC, Charles wrote: My solution (150 characters, 15 points): void main(){import std.stdio;int t,n;readf( %d,t);while(t--){readf( %d,n);real a=0,i=0;for(;in;i++)a+=(i%2?-1:1)/(i+i+1);writefln(%.15f,a);}} Link to problem site:

[Issue 4650] Static data that must be scanned by the GC should be grouped

2015-02-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4650 --- Comment #8 from Rainer Schuetze r.sagita...@gmx.de --- Nice, so this is just moving strings/floats to a section that is not scanned at all? Or is it really grouping all the static data too? It's currently just strings and floats. I hope other

Re: Dgame revived

2015-02-23 Thread Gan via Digitalmars-d-announce
On Monday, 23 February 2015 at 16:03:47 UTC, Namespace wrote: load will pull in 1.1 functions only, nothing more. reload will load in whatever is supported by the current context. So if your context only supports 2.1, only functions up to 2.1 will be loaded. One of the earlier posts showed

[Issue 14201] fatal error LNK1235: corrupt or invalid COFF symbol table

2015-02-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14201 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a1347b8ee62597ffe8714fef379d05334f6a4c70 Merge pull request #4443

Re: Dgame revived

2015-02-23 Thread Namespace via Digitalmars-d-announce
Doesn't work. Still gives the same OpenGL too low error. I think you need to place the lines SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK,

Re: A Refcounted Array Type

2015-02-23 Thread Andrei Alexandrescu via Digitalmars-d
On 2/23/15 2:15 PM, Walter Bright wrote: This is pretty straightforward. [snip] The code builds if you slap a @safe: at the top. There is one bug in the compiler: delete must not be allowed in @safe code. The destructor must be @trusted. Understanding that this code (sans delete) is @safe

[Issue 14199] [REG2.067a] Dwarf Error: mangled line number section

2015-02-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14199 Martin Nowak c...@dawg.eu changed: What|Removed |Added Keywords||pull CC|

<    1   2