Re: A Refcounted Array Type

2015-02-27 Thread weaselcat via Digitalmars-d
On Saturday, 28 February 2015 at 04:18:38 UTC, ketmar wrote: On Fri, 27 Feb 2015 20:51:54 +, deadalnix wrote: On Friday, 27 February 2015 at 04:13:03 UTC, Steven Schveighoffer wrote: In that case, you shouldn't be subject to any kind of race conditions. But we can't make the

[Issue 14230] New: [REG2.067b2] std.array.join misses the first element which is empty string

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14230 Issue ID: 14230 Summary: [REG2.067b2] std.array.join misses the first element which is empty string Product: D Version: D2 Hardware: x86_64 OS: Windows

[Issue 14229] RAII ordering is wrong

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14229 Etienne etci...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread ketmar via Digitalmars-d
On Fri, 27 Feb 2015 20:13:31 +, weaselcat wrote: Are op* considered reserved member names? no. that's just the we can break your code, and you can't break ours! it's funny how the argument we will not break user's code pops up even for breaking invalid code, but completely ignored for

[Issue 13729] [REG2.067a] One not detected case of not purity

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13729 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 13729] [REG2.067a] One not detected case of not purity

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13729 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3a9a56bce0d595fbe538946321e2fb8692711386 fix Issue 13729 - One not

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Michel Fortin via Digitalmars-d
On 2015-02-27 23:11:55 +, deadalnix said: On Friday, 27 February 2015 at 23:06:26 UTC, Andrei Alexandrescu wrote: OK, so at least in theory autorelease pools are not necessary for getting ARC to work? -- Andrei ARC need them, this is part of the spec. You can have good RC without them

Re: A Refcounted Array Type

2015-02-27 Thread ketmar via Digitalmars-d
On Fri, 27 Feb 2015 20:51:54 +, deadalnix wrote: On Friday, 27 February 2015 at 04:13:03 UTC, Steven Schveighoffer wrote: In that case, you shouldn't be subject to any kind of race conditions. But we can't make the library/language based on this assumption. Your case is the exceptional

Re: GC deadlocks on linux

2015-02-27 Thread ketmar via Digitalmars-d-learn
On Sat, 28 Feb 2015 06:09:16 +0100, Martin Nowak wrote: Meanwhile the author of daemonized came up with another idea, using exec instead of fork. https://github.com/NCrashed/daemonize/issues/2 ahem. http://forum.dlang.org/post/mc35ap$2dvo$5...@digitalmars.com signature.asc Description: PGP

Re: Last week for DConf 2015 submissions

2015-02-27 Thread Walter Bright via Digitalmars-d
On 2/27/2015 5:30 AM, Joseph Rushton Wakeling via Digitalmars-d wrote: You should have one from me now. Sorry it took this long to get it to you. Yes, got it. Thanks!

Re: GC deadlocks on linux

2015-02-27 Thread Martin Nowak via Digitalmars-d-learn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2015 09:27 PM, Byron Heads wrote: I have a medium size daemon application that uses several threads, libasync, and daemonize. On windows it runs correctly with GC enabled, but on linux the GC causes a deadlock while allocating memory.

Re: My Reference Safety System (DIP???)

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Friday, 27 February 2015 at 23:18:24 UTC, Marc Schütz wrote: I think I have an inference algorithm that works. It can infer the required scope levels for local variables given the constraints of function parameters, and it can even infer the annotations for the parameters (in template

Re: Does static ctor/dtor of struct behave differently in 2.067-b2?

2015-02-27 Thread ketmar via Digitalmars-d-learn
On Fri, 27 Feb 2015 23:58:16 +, amber wrote: On Friday, 27 February 2015 at 23:50:51 UTC, amber wrote: Hi All, [snip] Thanks, amber [edited subject] Sorry I should add that I'm talking about static ctor/dtor of struct. The bug I see with 2.067-b2 is this: 1. static this() {}

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread deadalnix via Digitalmars-d
On Saturday, 28 February 2015 at 03:49:04 UTC, ketmar wrote: On Fri, 27 Feb 2015 20:13:31 +, weaselcat wrote: Are op* considered reserved member names? no. that's just the we can break your code, and you can't break ours! it's funny how the argument we will not break user's code pops

DMD Zip for Mac OS X

2015-02-27 Thread Mike Parker via Digitalmars-d-learn
I'm not a Mac user and I'm fairly clueless about it. The DMD zip for OS X contains one executable. I assume it's a 64-bit binary. Is that true?

Re: Last week for DConf 2015 submissions

2015-02-27 Thread Joseph Rushton Wakeling via Digitalmars-d
On 23/02/15 01:03, Andrei Alexandrescu via Digitalmars-d wrote: At this point we don't have enough submissions to make DConf 2015 viable. Those we have are of good quality, but simply put more are needed. We're counting on our core community (i.e. frequent contributors to this forum) to both

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 12:53 AM, Kagamin wrote: On Thursday, 26 February 2015 at 22:02:51 UTC, Andrei Alexandrescu wrote: So is the end game of dip25 and dip74 to not have to wrap types you intend to manage with RC like C++ but just design the classes/structs themselves around being RCed from the start?

Re: Contradictory justification for status quo

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 1:09 AM, John Colvin wrote: On Friday, 27 February 2015 at 02:58:31 UTC, Andrei Alexandrescu wrote: I should add, however, that effort in and by itself does not warrant approval per se. Labor is a prerequisite of any good accomplishment, but is not all that's needed. Everyone's a

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread via Digitalmars-d
On Friday, 27 February 2015 at 13:36:33 UTC, Marc Schütz wrote: AddRef/Release is established COM terminology. Which is from 1993, a period of time where MS was completely ignorant of everything outside MS. Common resource-access terminology is: acquire/release retain/release

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread via Digitalmars-d
On Friday, 27 February 2015 at 08:26:14 UTC, Ola Fosheim Grøstad wrote: On Thursday, 26 February 2015 at 22:04:09 UTC, Andrei Alexandrescu wrote: On 2/26/15 2:03 PM, Brian Schott wrote: One of the first things that stood out to me is that add ref is two words and release is one. For the sake

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 1:09 AM, ted wrote: Andrei Alexandrescu wrote: http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and discuss. Thanks, Andrei Trivial typos: struct, class, and closure types that have RCO members accommodate calls to Release during their destruction.

Re: @trusted and return ref

2015-02-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/27/15 3:29 AM, Kagamin wrote: On Thursday, 26 February 2015 at 16:25:59 UTC, Steven Schveighoffer wrote: However, we have an issue here. At any point inside the code, you could do: oldcount = count; And now, there is still potentially a dangling pointer somewhere. This means every place

Re: @trusted and return ref

2015-02-27 Thread via Digitalmars-d-learn
On Friday, 27 February 2015 at 10:49:25 UTC, Ola Fosheim Grøstad wrote: 2. You construct a transform T(x) that can transform language D into x. = D is proven safe. Eh: 2. You construct a transform T(x) that can transform programs in language D into P...

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 27, 2015 at 08:00:20AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 2/27/15 7:42 AM, H. S. Teoh via Digitalmars-d wrote: S.foo() should have been annotated with 'return', but the programmer forgot and the compiler still accepts the code without any warnings, thereby

[Issue 6586] feqrel for const values too

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6586 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Contradictory justification for status quo

2015-02-27 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: Safety is good to have, and the simple litmus test is if you slap @safe: at the top of all modules and you use no @trusted (or of course use it correctly), you should have memory safety, guaranteed. I have suggested to switch to @safe by default:

Re: std.allocator ready for some abuse

2015-02-27 Thread Piotrek via Digitalmars-d
On Friday, 27 February 2015 at 08:18:53 UTC, ANtlord wrote: I think, that if use this project https://github.com/andralex/std_allocator/, than you can post the issue to related issue tracker. Oh, I must be blind. I thought the issue tracker was disables on the repository in the same way as

[Issue 6586] feqrel for const values too

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6586 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/09ebc581ec022d0e1091d47887aab26366df79e0 rework and try to fix

Re: [OT] HTML: div/iframe hybrid?

2015-02-27 Thread Nick Sabalausky via Digitalmars-d
On 02/26/2015 02:59 PM, Nick Sabalausky wrote: On 02/26/2015 03:30 AM, Kagamin wrote: AFAIK, div src=... syntax was proposed for this purpose (with fallback) in early editions of html5, don't know if it made it into the standard. Hmm, just looked that up, but all I found on that was one page

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 9:24 AM, Nick Treleaven wrote: On 26/02/2015 22:04, Andrei Alexandrescu wrote: On 2/26/15 2:03 PM, Brian Schott wrote: The DIP states that Any attributes are allowed on these methods., but later states The complexity of this code underlies the importance of making opAddRef and

[Issue 14212] frexp for const and immutable fails to compile

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14212 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14212] frexp for const and immutable fails to compile

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14212 --- Comment #6 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/62acd72cec052169e7eb56d1c63c860ae92f9ef9 Merge pull request

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Nick Treleaven via Digitalmars-d
On 26/02/2015 22:04, Andrei Alexandrescu wrote: On 2/26/15 2:03 PM, Brian Schott wrote: The DIP states that Any attributes are allowed on these methods., but later states The complexity of this code underlies the importance of making opAddRef and especially opRelease nothrow. Should the DIP

Re: Contradictory justification for status quo

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/26/15 8:21 PM, Zach the Mystic wrote: Can I ask you a general question about safety: If you became convinced that really great safety would *require* more function attributes, what would be the threshold for including them? I'm trying to go the whole hog with safety, but I'm paying what

Re: Berlin D Meetup Feb 2015

2015-02-27 Thread Ben Palmer via Digitalmars-d-announce
I thought I would give a brief summary of the last meetup. Joseph Wakeling gave a presentation entitled “Random number generation in Phobos and beyond”. It was a great talk and we had some interesting discussions afterwards. The talk began by mentioning some naive ways of generating random

Re: 3 dimension arrays

2015-02-27 Thread Andrey via Digitalmars-d-learn
On Thursday, 26 February 2015 at 23:25:22 UTC, Ali Çehreli wrote: On 02/26/2015 12:01 PM, Andrey wrote: HI guys!!! Have a problem with 3d array memory allocation in next code: // class NeuronNet(T, const uint layersNum) { T[]

Re: Berlin D Meetup Feb 2015

2015-02-27 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Thursday, 12 February 2015 at 01:58:04 UTC, Walter Bright wrote: I see you're doing the presentation! I note that you haven't submitted a presentation proposal for Dconf 2015 yet. Please submit this one! Why not get the most mileage out of it? Submitted :-)

[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #3 from Kenji Hara k.hara...@gmail.com --- Reduced test case: extern(C) int printf(const char*, ...); void main() { auto a = toString(14); printf(a.ptr = %p, a.length = %d\n, a.ptr, cast(int)a.length); return; } auto

Re: Last week for DConf 2015 submissions

2015-02-27 Thread Joseph Rushton Wakeling via Digitalmars-d
On 23/02/15 12:30, Iain Buclaw via Digitalmars-d wrote: On 23 February 2015 at 01:30, Adam D. Ruppe via Digitalmars-d digitalmars-d@puremagic.com wrote: I could prolly do two talks... especially if someone else wants to suggest a topic. Heck, I could improvise in a round table or something too.

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread via Digitalmars-d
On Friday, 27 February 2015 at 07:44:18 UTC, anonymous wrote: On Friday, 27 February 2015 at 00:10:00 UTC, deadalnix wrote: On Thursday, 26 February 2015 at 21:50:56 UTC, Andrei Alexandrescu wrote: http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and discuss. Thanks,

[Issue 13729] [REG2.067a] One not detected case of not purity

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13729 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #1 from

Re: On opCmp

2015-02-27 Thread anonymous via Digitalmars-d-learn
On Friday, 27 February 2015 at 11:04:51 UTC, Nordlöw wrote: Is there a more compact way to describe the opCmp function in the following struct struct Hit { size_t count; // number of walkers that found this node NWeight rank; // rank (either minimum distance or maximum strength)

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Thursday, 26 February 2015 at 21:50:56 UTC, Andrei Alexandrescu wrote: http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and discuss. Thanks, Andrei It's kind of funny that you were looking for an edge to my safety system -- I'll admit I don't know whether it really has

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Steven Schveighoffer via Digitalmars-d
On 2/27/15 9:09 AM, Andrei Alexandrescu wrote: On 2/27/15 1:09 AM, ted wrote: Probably another silly question: How would the examples work with const/immutable (using examples in howtos)? e.g. const Widget a = new Widget; auto b = a;-- mutable method Widget.opAddRef is not callable

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread David Gileadi via Digitalmars-d
On 2/27/15 6:36 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Friday, 27 February 2015 at 08:26:14 UTC, Ola Fosheim Grøstad wrote: On Thursday, 26 February 2015 at 22:04:09 UTC, Andrei Alexandrescu wrote: On 2/26/15 2:03 PM, Brian Schott wrote: One of the first things that

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 10:34 AM, David Gileadi wrote: On 2/27/15 6:36 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Friday, 27 February 2015 at 08:26:14 UTC, Ola Fosheim Grøstad wrote: On Thursday, 26 February 2015 at 22:04:09 UTC, Andrei Alexandrescu wrote: On 2/26/15 2:03 PM, Brian

Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
DIP74's function call protocol for RCOs has the caller insert opAddRef for each RCO passed by value. Then the callee has the responsibility to call opRelease (or defer that to another entity). This choice of protocol mimics the constructor/destructor protocol and probably shows our C++ bias.

Re: Will D have a serious dedicated well supported IDE like Visual Studio or Eclipse?

2015-02-27 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2015-02-27 at 04:12 +, AJ via Digitalmars-d-learn wrote: […] I am in the same boat and totally agree. It's tough going from the user-experience of IntelliJ IDEA or Visual Studio back to vi on OS X with D. There seems to be a large hole in support for D debugging outside of

Re: [OT] HTML: div/iframe hybrid?

2015-02-27 Thread Nick Sabalausky via Digitalmars-d
On 02/27/2015 02:17 AM, H. S. Teoh via Digitalmars-d wrote: but in the webdev world, sometimes it's all about unreasonable deadlines and shipping it as fast as possible. Well, that's not just webdev, that's true in just about any commercial software development. Hey, the sales guys just sold

Re: Will D have a serious dedicated well supported IDE like Visual Studio or Eclipse?

2015-02-27 Thread Martin Krejcirik via Digitalmars-d-learn
On Friday, 27 February 2015 at 07:08:26 UTC, Ali Çehreli wrote: What version of gdb is needed and is that version easy to install? Something from late 2014 or newer is the best (7.8.50-cvs or 7.9.50-cvs) as it has got Ian's patches merged, but even an old stock Debian gdb (7.4.1) works

Re: Contradictory justification for status quo

2015-02-27 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 27, 2015 at 06:02:57AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: [...] Safety is good to have, and the simple litmus test is if you slap @safe: at the top of all modules and you use no @trusted (or of course use it correctly), you should have memory safety, guaranteed.

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 6:46 AM, Steven Schveighoffer wrote: On 2/27/15 9:09 AM, Andrei Alexandrescu wrote: On 2/27/15 1:09 AM, ted wrote: Probably another silly question: How would the examples work with const/immutable (using examples in howtos)? e.g. const Widget a = new Widget; auto b = a;

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 7:52 AM, Manu via Digitalmars-d wrote: Can I call opAddRef/opRelease from within the postblit/destructor manually and expect the compiler to elide calls correctly? That doesn't seem foolproof though, and you also said manual calls are not @safe. Why not specify a call sequence? Ah,

Re: On opCmp

2015-02-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/27/15 6:04 AM, Nordlöw wrote: Is there a more compact way to describe the opCmp function in the following struct struct Hit { size_t count; // number of walkers that found this node NWeight rank; // rank (either minimum distance or maximum strength) auto opCmp(const Hit

Re: On opCmp

2015-02-27 Thread Ali Çehreli via Digitalmars-d-learn
On 02/27/2015 03:04 AM, Nordlöw wrote: Is there a more compact way to describe the opCmp function in the following struct Please see: http://forum.dlang.org/thread/lnr99a$vvd$1...@digitalmars.com#post-lnr99a:24vvd:241:40digitalmars.com Ali

Re: Contradictory justification for status quo

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Friday, 27 February 2015 at 14:02:58 UTC, Andrei Alexandrescu wrote: Safety is good to have, and the simple litmus test is if you slap @safe: at the top of all modules and you use no @trusted (or of course use it correctly), you should have memory safety, guaranteed. A feature that is

Re: Contradictory justification for status quo

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 7:33 AM, H. S. Teoh via Digitalmars-d wrote: On Fri, Feb 27, 2015 at 06:02:57AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: [...] Safety is good to have, and the simple litmus test is if you slap @safe: at the top of all modules and you use no @trusted (or of course use it

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Manu via Digitalmars-d
On 28 February 2015 at 01:43, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 2/27/15 7:17 AM, Manu via Digitalmars-d wrote: I'm not clear on structs. What is the order for calls; postblit, opInc, opDec, destructor? 75% of my use cases today are thin structs that

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 7:52 AM, Manu via Digitalmars-d wrote: Well this is the case of the highest value to me, and DIP74 offers nothing? For structs you use postblit and destructors. -- Andrei

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 7:42 AM, H. S. Teoh via Digitalmars-d wrote: S.foo() should have been annotated with 'return', but the programmer forgot and the compiler still accepts the code without any warnings, thereby violating @safe. That is correct. However, the user is on the hook because her use of

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Manu via Digitalmars-d
On 27 February 2015 at 07:50, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: http://wiki.dlang.org/DIP74 got to reviewable form. Please destroy and discuss. Thanks, Andrei I'm excited for this. I'm very happy with the approach. I'm particularly happy that it is

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

2015-02-27 Thread ponce via Digitalmars-d
On Thursday, 26 February 2015 at 14:22:01 UTC, Ola Fosheim Grøstad wrote: No. If I can't open a file I'd better not create a File object in an invalid state. Invalid states defeats RAII. This is the attitude I don't like, because it means that you have to use pointers when you could just

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 7:17 AM, Manu via Digitalmars-d wrote: There's no mention of const/immutable...? Surely we can have RC immutable things right? I can't see how that works here... but it's very important. Yah. I've added a TODO. I'm not clear on structs. What is the order for calls; postblit,

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread H. S. Teoh via Digitalmars-d
On Thu, Feb 26, 2015 at 11:35:55PM -0800, Walter Bright via Digitalmars-d wrote: On 2/26/2015 5:37 PM, H. S. Teoh via Digitalmars-d wrote: Wait, are you saying that forgetting the 'return' annotation will still compile without any warning?? Wow, that's ... not nice. :-( Indeed, and the

Re: Is there such a thing?

2015-02-27 Thread Taylor Hillegeist via Digitalmars-d
On Friday, 27 February 2015 at 07:26:06 UTC, Jacob Carlborg wrote: On 2015-02-26 20:53, Taylor Hillegeist wrote: So, In languages like .net they have dll's that contain not only bytecode but also the necessary headers to make them usable in any .net language. I was curious if this kind of

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Friday, 27 February 2015 at 18:24:27 UTC, Andrei Alexandrescu wrote: DIP74's function call protocol for RCOs has the caller insert opAddRef for each RCO passed by value. Then the callee has the responsibility to call opRelease (or defer that to another entity). This choice of protocol

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

2015-02-27 Thread deadalnix via Digitalmars-d
On Friday, 27 February 2015 at 07:09:20 UTC, Benjamin Thaut wrote: Am 27.02.2015 um 00:05 schrieb deadalnix: Note that in D, you have union and all kind of crap like that, so what is writing a pointer is non obvious and so the tradeof is very different than it is in other languages. To

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-27 19:38, Andrei Alexandrescu wrote: I explicitly avoided the COM names in order to avoid potential confusion and code breakage. People can easily add IUnknownAuto that does the forwarding. -- Andrei It's still a breaking change. See one of my other replies [1] for a possible

[Issue 14225] [REG2.067a] GDB: error reading variable (string + dup)

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14225 --- Comment #2 from Martin Krejcirik m...@krej.cz --- Small correction: -gc doesn't make it work. Also the problem is not limited to recent gdb version, 7.4.1-debian is affected too for example. --

D support in syntax highlighters

2015-02-27 Thread Martin Nowak via Digitalmars-d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It would be nice to get up-to-date syntax highlighting support for D in the commonly used libraries. Those libraries are used by many other tools and it's important for D's visibility that it's present in any list of programming languages. - -

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

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

LLVM 3.6 released - LDC master branch/0.15.1 is ready to use it!

2015-02-27 Thread Kai Nacke via Digitalmars-d-announce
Hi all! Finally, LLVM 3.6 has been released! See the release notes here: http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html Downloads: http://llvm.org/releases/download.html#3.6.0 Also note that LDC is mentioned in the release notes as one of the projects who are already supporting LLVM

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 27, 2015 at 10:24:26AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: DIP74's function call protocol for RCOs has the caller insert opAddRef for each RCO passed by value. Then the callee has the responsibility to call opRelease (or defer that to another entity). This choice of

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Steven Schveighoffer via Digitalmars-d
On 2/27/15 3:30 PM, Steven Schveighoffer wrote: void main() { C c = new C; // ref counted class C2 c2 = new C2; // another ref counted class c2.c = c; foo(c, c2); } Bleh, that was dumb. void main() { C2 c2 = new C2; c2.c = new C; foo(c2.c, c2); } Still same question. The issue here

Re: Contradictory justification for status quo

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Friday, 27 February 2015 at 15:35:46 UTC, H. S. Teoh wrote: @safe has some pretty nasty holes right now... like: https://issues.dlang.org/show_bug.cgi?id=5270 https://issues.dlang.org/show_bug.cgi?id=8838 My new reference safety system:

Re: What am I doing wrong here - canFind with iota is not working

2015-02-27 Thread bearophile via Digitalmars-d
immutable float item = 0.174531f; r.canFind!q{ feqrel(cast()a, cast()b) = 21 }(item).writeln; } With a recent Phobos bug fix you can now write: r.canFind!q{ feqrel(a, b) = 21 }(item).writeln; Bye, bearophile

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 11:58 AM, Jacob Carlborg wrote: On 2015-02-27 19:38, Andrei Alexandrescu wrote: I explicitly avoided the COM names in order to avoid potential confusion and code breakage. People can easily add IUnknownAuto that does the forwarding. -- Andrei It's still a breaking change. See one

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Steven Schveighoffer via Digitalmars-d
On 2/27/15 1:24 PM, Andrei Alexandrescu wrote: DIP74's function call protocol for RCOs has the caller insert opAddRef for each RCO passed by value. Then the callee has the responsibility to call opRelease (or defer that to another entity). This choice of protocol mimics the

[Issue 14212] frexp for const and immutable fails to compile

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14212 --- Comment #7 from github-bugzi...@puremagic.com --- Commit pushed to 2.067 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/cf57c7529a63ac970167c65cb659d5249a3a1ab9 Merge pull request

Re: Is there such a thing?

2015-02-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-27 20:49, Taylor Hillegeist wrote: I just think its a shame that all over the place people are compiling code in different programming languages, and although all the .o files are compatible with each other there isn't a standard cross language way of defining a binding. But that

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread weaselcat via Digitalmars-d
On Friday, 27 February 2015 at 20:04:27 UTC, Andrei Alexandrescu wrote: On 2/27/15 11:58 AM, Jacob Carlborg wrote: On 2015-02-27 19:38, Andrei Alexandrescu wrote: I explicitly avoided the COM names in order to avoid potential confusion and code breakage. People can easily add IUnknownAuto

[Issue 6586] feqrel for const values too

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6586 --- Comment #5 from github-bugzi...@puremagic.com --- Commit pushed to 2.067 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/cf57c7529a63ac970167c65cb659d5249a3a1ab9 Merge pull request #3017

[Issue 14229] New: RAII ordering is wrong

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14229 Issue ID: 14229 Summary: RAII ordering is wrong Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1

[Issue 12983] overload not recognized depending on order of declaration

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12983 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 12983] overload not recognized depending on order of declaration

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12983 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ac443bd294103807f047ed9d74a05755f4e08f35 fix Issue 12983 - overload

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 12:13 PM, weaselcat wrote: On Friday, 27 February 2015 at 20:04:27 UTC, Andrei Alexandrescu wrote: On 2/27/15 11:58 AM, Jacob Carlborg wrote: On 2015-02-27 19:38, Andrei Alexandrescu wrote: I explicitly avoided the COM names in order to avoid potential confusion and code breakage.

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread Matthias Bentrup via Digitalmars-d
When a function makes/destroys multiple references to an object it should always be safe to coalesce all AddRefs into the first AddRef and all Releases to into the last Release call. This could be a small performance win, but opAddRef/opRelease would need the count as argument or maybe as

Typo in DIP25 ?

2015-02-27 Thread Parke via Digitalmars-d
Hi, In DIP25, what is the meaning of pairing an open parenthesis with a closing curly brace? Is this a typo? From Dec 28, 2014: http://wiki.dlang.org/?title=DIP25oldid=5279#In_a_nutshell ref int fun(ref int a} { return a; } // ERROR ref int fun(ref inout int a} { return a; } // FINE From

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

2015-02-27 Thread Martin Nowak via Digitalmars-d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/2015 03:23 AM, Walter Bright wrote: - RC is slower overall This claim isn't true for almost all applications when using a conservative GC, except for programs that produce a lot of garbage and have very few long-lived objects. The memory

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 1:02 PM, Michel Fortin wrote: On 2015-02-27 20:34:08 +, Steven Schveighoffer said: On 2/27/15 3:30 PM, Steven Schveighoffer wrote: void main() { C c = new C; // ref counted class C2 c2 = new C2; // another ref counted class c2.c = c; foo(c, c2); } Bleh, that was dumb. void

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Michel Fortin via Digitalmars-d
On 2015-02-27 20:34:08 +, Steven Schveighoffer said: On 2/27/15 3:30 PM, Steven Schveighoffer wrote: void main() { C c = new C; // ref counted class C2 c2 = new C2; // another ref counted class c2.c = c; foo(c, c2); } Bleh, that was dumb. void main() { C2 c2 = new C2; c2.c =

[Issue 14229] RAII ordering is wrong

2015-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14229 Etienne etci...@gmail.com changed: What|Removed |Added Severity|enhancement |major --

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 12:34 PM, Steven Schveighoffer wrote: On 2/27/15 3:30 PM, Steven Schveighoffer wrote: void main() { C c = new C; // ref counted class C2 c2 = new C2; // another ref counted class c2.c = c; foo(c, c2); } Bleh, that was dumb. void main() { C2 c2 = new C2; c2.c = new C;

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread deadalnix via Digitalmars-d
On Friday, 27 February 2015 at 07:44:18 UTC, anonymous wrote: We all pray you become less of a gaping asshole before youre in charge of anything. Thank you for the compliment :)

Re: A Refcounted Array Type

2015-02-27 Thread deadalnix via Digitalmars-d
On Friday, 27 February 2015 at 04:13:03 UTC, Steven Schveighoffer wrote: In that case, you shouldn't be subject to any kind of race conditions. But we can't make the library/language based on this assumption. Your case is the exceptional case. His case is not @safe, so we can ignore that

Re: Typo in DIP25 ?

2015-02-27 Thread Andrei Alexandrescu via Digitalmars-d
On 2/27/15 12:22 PM, Parke via Digitalmars-d wrote: Hi, In DIP25, what is the meaning of pairing an open parenthesis with a closing curly brace? Is this a typo? From Dec 28, 2014: http://wiki.dlang.org/?title=DIP25oldid=5279#In_a_nutshell ref int fun(ref int a} { return a; } // ERROR ref

Re: Improving DIP74: functions borrow by default, retain only if needed

2015-02-27 Thread Zach the Mystic via Digitalmars-d
On Friday, 27 February 2015 at 20:30:20 UTC, Steven Schveighoffer wrote: OK, I found the offending issue. It's when you pass a parameter, the only reference holding onto it may be also passed as well. Something like: void foo(C c, C2 c2) { c2.c = null; // this destroys 'c' unless you

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

2015-02-27 Thread Martin Nowak via Digitalmars-d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/2015 01:43 AM, Manu via Digitalmars-d wrote: D's GC is terrible, and after 6 years hanging out in this place, I have seen precisely zero development on the GC front. Nobody can even imagine, let alone successfully implement a GC that

Re: Contradictory justification for status quo

2015-02-27 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 27, 2015 at 07:57:22AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 2/27/15 7:33 AM, H. S. Teoh via Digitalmars-d wrote: On Fri, Feb 27, 2015 at 06:02:57AM -0800, Andrei Alexandrescu via Digitalmars-d wrote: [...] Safety is good to have, and the simple litmus test is

Re: DIP74: Reference Counted Class Objects

2015-02-27 Thread deadalnix via Digitalmars-d
Yup, it sound like the destruction should be delegated to the destructor. Maybe the release method could return the refcount ?

  1   2   >