DDT 0.10.4 release - fixed critical performance bug

2014-12-12 Thread Bruno Medeiros via Digitalmars-d-announce
A new DDT version is out. Even though it's a minor release, I'm announcing this one here, because it fixes a critical performance bug, introduced in 0.10.0 (DUB support), but only discovered recently: https://github.com/bruno-medeiros/DDT/releases/tag/v0.10.4 The bug is #88, it would cause

Re: DDT 0.10.4 release - fixed critical performance bug

2014-12-12 Thread Bruno Medeiros via Digitalmars-d-announce
On 12/12/2014 17:06, Bruno Medeiros wrote: A new DDT version is out. Even though it's a minor release, I'm announcing this one here, because it fixes a critical performance bug, introduced in 0.10.0 (DUB support), but only discovered recently:

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Dicebot via Digitalmars-d
On Friday, 12 December 2014 at 06:57:54 UTC, deadalnix wrote: On Friday, 12 December 2014 at 06:06:40 UTC, Dicebot wrote: On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: Consider a ref counted type, RC!T. If scope were transitive, then you could not have, say, a tree where

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: Are you suggesting two kinds of scope - transitive and non-transitive? Non transitive scope can be added without any language extension. There is no point doing much with the scope keyword if indirection aren't in the loop.

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 11 December 2014 at 23:22, ixid via Digitalmars-d digitalmars-d@puremagic.com wrote: Manu have you shown Walter some of the code where ref is problematic? He seems to have asked to see examples repeatedly as he's not convinced there is a problem. I have discussed issues here in the past,

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 11 December 2014 at 23:55, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/7/2014 6:12 AM, Dicebot wrote:

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/11/2014 11:55 PM, Dicebot wrote: On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: I don't see how this is related. It would be perfectly ok to declare root of such tree scope if it was transitive (as long as it only controls access and does not attempt early destruction).

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 12:16 AM, deadalnix wrote: On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: Are you suggesting two kinds of scope - transitive and non-transitive? Non transitive scope can be added without any language extension. In order for it to work, the holes in the

Re: D3

2014-12-12 Thread Russel Winder via Digitalmars-d
On Fri, 2014-12-12 at 07:40 +, thedeemon via Digitalmars-d wrote: On Tuesday, 9 December 2014 at 08:15:02 UTC, Puming wrote: For Chinese it would be 帝 which pronounces the same as 'D' and means Emperor. In Thai language ดี pronounces dee and means good. That just has to get into

Re: Jonathan Blow demo #2

2014-12-12 Thread bearophile via Digitalmars-d
Walter Bright: On 12/11/2014 1:49 PM, bearophile wrote: Walter Bright: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); auto av = new Vec[10] = void; auto av2 = new Vec[10] = Vec(0, 0, 0); D already does this. D doesn't do that, not even one of those three :-) I beg

Re: Jonathan Blow demo #2

2014-12-12 Thread bearophile via Digitalmars-d
Walter Bright: I don't see support for the notion of a ushort index. A ushort index is not useful, I agree. That's why I have said my proposal is a little different from Jonathan Blow idea. My point was to optionally define built-in arrays with a strongly typed indexing (where the

Re: Jonathan Blow demo #2

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 10:54 AM, bearophile wrote: This code: struct Vec { float x = 1, y = 5, z = 9; } auto v = new Vec(void); Means having defined a struct with explicitly statically defined fields, and then allocate one of it on the heap without initializing its fields. It's equivalent to: auto v =

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 08:44:56 UTC, Walter Bright wrote: On 12/12/2014 12:16 AM, deadalnix wrote: On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: Are you suggesting two kinds of scope - transitive and non-transitive? Non transitive scope can be added without any

Re: Jonathan Blow demo #2

2014-12-12 Thread bearophile via Digitalmars-d
Martin Nowak: OK, I think that it will be enough to add a Phobos function like this (what's the right Phobos module to put it?) (why isn't this @trusted?) (why isn't this returning a T*?): ref T uninitializedAlloc(T)() @system pure nothrow { return *cast(T*)GC.malloc(T.sizeof); }

Re: Jonathan Blow demo #2

2014-12-12 Thread bearophile via Digitalmars-d
OK, I think that it will be enough to add a Phobos function like this (what's the right Phobos module to put it?) (why isn't this @trusted?) (why isn't this returning a T*?): ref T uninitializedAlloc(T)() @system pure nothrow { return *cast(T*)GC.malloc(T.sizeof); }

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread via Digitalmars-d
On Friday, 12 December 2014 at 00:13:10 UTC, deadalnix wrote: On Thursday, 11 December 2014 at 13:55:55 UTC, Marc Schütz wrote: This is a point that most people don't seem to understand yet, and which wasn't obvious for me either, at the beginning: * A `ref` parameter means that it cannot

Re: Jonathan Blow demo #2

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 11:42 AM, bearophile wrote: Martin Nowak: OK, I think that it will be enough to add a Phobos function like this (what's the right Phobos module to put it?) Did you just volunteer to make a pull :)? As usual, having a problem to find the right place myself. Would put it close to

Re: Jonathan Blow demo #2

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/11/2014 10:34 PM, Walter Bright wrote: D already does this. It's been said before, Jonathan is reinventing D, piece by piece :-) What does that mean, it's been said? Didn't anyone actually try to tell him about D?

Re: Jonathan Blow demo #2

2014-12-12 Thread Tobias Pankrath via Digitalmars-d
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote: On 12/11/2014 10:34 PM, Walter Bright wrote: D already does this. It's been said before, Jonathan is reinventing D, piece by piece :-) What does that mean, it's been said? Didn't anyone actually try to tell him about D?

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread via Digitalmars-d
On Friday, 12 December 2014 at 08:42:22 UTC, Manu via Digitalmars-d wrote: On 11 December 2014 at 23:55, via Digitalmars-d digitalmars-d@puremagic.com wrote: This is a point that most people don't seem to understand yet, and which wasn't obvious for me either, at the beginning: * A `ref`

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 12 December 2014 at 07:41, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/11/2014 4:47 AM, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/7/2014 6:12 AM, Dicebot wrote: But

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 12 December 2014 at 08:53, John Colvin via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thursday, 11 December 2014 at 21:41:11 UTC, Walter Bright wrote: On 12/11/2014 4:47 AM, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 12 December 2014 at 22:18, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 12 December 2014 at 08:42:22 UTC, Manu via Digitalmars-d wrote: How can a member be marked scope? Apparently it's a storage class, not a type constructor... we can only attribute storage classes to

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread via Digitalmars-d
On Friday, 12 December 2014 at 12:34:40 UTC, Manu via Digitalmars-d wrote: On 12 December 2014 at 22:18, via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 12 December 2014 at 08:42:22 UTC, Manu via Digitalmars-d wrote: How can a member be marked scope? Apparently it's a storage

Re: Jonathan Blow demo #2

2014-12-12 Thread Chris via Digitalmars-d
On Thursday, 11 December 2014 at 16:57:35 UTC, bearophile wrote: Jonathan Blow, Programming Language Demo #2: https://www.youtube.com/watch?v=-UPFH0eWHEI https://www.reddit.com/r/programming/comments/2oyg5e/jonathan_blow_dec_10_programming_language_demo_2/ -- He shows a way

Re: Jonathan Blow demo #2

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 01:15 PM, Tobias Pankrath wrote: Actually he dismisses D in his first video for being too much like C++. What do you usually do when learning a new programming language? Right, write a small program. Apparently he ruled out all 3 candidates by looking at the front page of their

Re: Comparing Parallelization in HPC with D, Chapel, and Go

2014-12-12 Thread Sparsh Mittal via Digitalmars-d
Thanks for your interest. The users are welcome to make improvements to the code and use in their research. Chapel, D and Go are all relatively new languages and certainly many optimizations are possible with them. As shown in the paper, I ran the D code with -inline -O -release. I ran the

unnecessary OS redundancy in druntime

2014-12-12 Thread Joakim via Digitalmars-d
I asked about this on github but didn't get a good answer, so I'm asking here. What's with all the repeated OS blocks in druntime? https://github.com/D-Programming-Language/druntime/blob/master/src/core/sys/posix/unistd.d#L945

Re: Jonathan Blow demo #2

2014-12-12 Thread Joakim via Digitalmars-d
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote: On 12/11/2014 10:34 PM, Walter Bright wrote: D already does this. It's been said before, Jonathan is reinventing D, piece by piece :-) What does that mean, it's been said? He means he said it before: :)

Re: struct default constructor, unions and bizaro behavior.

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d
On 12/11/14 6:15 PM, deadalnix wrote: I ran into this issue because of another bug that prevent the default constructor to be found in some template mixin madness piece of code :) Ah, template-mixin madness! Sounds contagious... Anyway, I think this is reasonable to have one element for

ICU D Wrapper

2014-12-12 Thread Jake via Digitalmars-d
I'm not sure if anyone has noticed, but the D wrapper for C's ICU library is far from working it seems. mango.icu is its technical name. I've read articles on the forum about how excited people were to get ICU usable in D, but whoever made mango.icu hasn't made any updates on it or even

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 04:47 PM, Joakim wrote: I asked about this on github but didn't get a good answer, so I'm asking here. What's with all the repeated OS blocks in druntime? No, you don't want to accept the answer. That's slightly different than not getting none.

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 06:13 PM, Martin Nowak wrote: On 12/12/2014 04:47 PM, Joakim wrote: I asked about this on github but didn't get a good answer, so I'm asking here. What's with all the repeated OS blocks in druntime? No, you don't want to accept the answer. That's slightly different than not

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Martin Nowak via Digitalmars-d
On 12/12/2014 06:13 PM, Martin Nowak wrote: No, you don't want to accept the answer. That's slightly different than not getting none. Let me amend that I'm glad you didn't run away and are still working on separating kernel specific from libc specific stuff. That will help us to mitigate the

Re: ICU D Wrapper

2014-12-12 Thread Trent Forkert via Digitalmars-d
On Friday, 12 December 2014 at 16:51:43 UTC, Jake wrote: I'm not sure if anyone has noticed, but the D wrapper for C's ICU library is far from working it seems. mango.icu is its technical name. I've read articles on the forum about how excited people were to get ICU usable in D, but whoever

Re: Jonathan Blow demo #2

2014-12-12 Thread ponce via Digitalmars-d
On Friday, 12 December 2014 at 11:58:04 UTC, Martin Nowak wrote: On 12/11/2014 10:34 PM, Walter Bright wrote: D already does this. It's been said before, Jonathan is reinventing D, piece by piece :-) What does that mean, it's been said? Didn't anyone actually try to tell him about D? I

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Iain Buclaw via Digitalmars-d
On 12 Dec 2014 17:15, Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/12/2014 04:47 PM, Joakim wrote: I asked about this on github but didn't get a good answer, so I'm asking here. What's with all the repeated OS blocks in druntime? No, you don't want to accept

Re: Julia vs. D?

2014-12-12 Thread bachmeier via Digitalmars-d
On Friday, 12 December 2014 at 06:57:24 UTC, Laeeth Isharc wrote: I guess you can call D from Julia very easily via the C API and would just need to declare C calling convention in your D code. It may be that with a combination of Julia and D one has the best of both worlds - no compromise

Re: ICU D Wrapper

2014-12-12 Thread Dmitry Olshansky via Digitalmars-d
12-Dec-2014 19:51, Jake пишет: I'm not sure if anyone has noticed, but the D wrapper for C's ICU library is far from working it seems. mango.icu is its technical name. I've read articles on the forum about how excited people were to get ICU usable in D, but whoever made mango.icu hasn't made any

Re: struct default constructor, unions and bizaro behavior.

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 16:23:48 UTC, Steven Schveighoffer wrote: Anyway, I think this is reasonable to have one element for the union in the tupleof as well. Which one then? :) One, having an union type.

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 12:34:40 UTC, Manu via Digitalmars-d wrote: deadalnix also brought up the problem of transitivity. This, too, would simply go away if it's a type modifier. Just for clarity, does type modifier mean the same thing as type constructor? It appears to me that

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 13:38:10 UTC, Marc Schütz wrote: Yes. Type modifier = const, shared, immutable, etc.; type constructor = the syntactical construct by which a type is constructed/modified. Andrei suggested this differentiation some time ago (sorry, don't have a reference at

Re: Jonathan Blow demo #2

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 1:58 AM, bearophile wrote: My point was to optionally define built-in arrays with a strongly typed indexing (where the strongly typed index can be defined with a better version of Typedef!()), as I've tried to explain in that post. All you have to do is define your own array type

Re: Jonathan Blow demo #2

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 3:57 AM, Martin Nowak wrote: On 12/11/2014 10:34 PM, Walter Bright wrote: D already does this. It's been said before, Jonathan is reinventing D, piece by piece :-) What does that mean, it's been said? Didn't anyone actually try to tell him about D? I've emailed him about it.

Re: ICU D Wrapper

2014-12-12 Thread Jacob Carlborg via Digitalmars-d
On 2014-12-12 17:51, Jake wrote: I'm not sure if anyone has noticed, but the D wrapper for C's ICU library is far from working it seems. mango.icu is its technical name. That library is very old, for the days of D1, and not maintained anymore. There's also this version, that might be more up

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Sean Kelly via Digitalmars-d
On Friday, 12 December 2014 at 15:47:09 UTC, Joakim wrote: It seems like pointless repetition and there are many more examples of this, as I keep running into it when adding bionic/Android support. Martin suggested that it would be useful to have a default case that asserts for an

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 22:05:21 UTC, Walter Bright wrote: forms can work, too. No, unless we wrap every single indirection (pointer, slice, classes, delegates) into a wrapper. That is not going to fly very far. The beauty of GC is that you don't have to do any of this. To have safe

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 2:28 AM, deadalnix wrote: On Friday, 12 December 2014 at 08:44:56 UTC, Walter Bright wrote: On 12/12/2014 12:16 AM, deadalnix wrote: On Friday, 12 December 2014 at 07:48:21 UTC, Walter Bright wrote: Are you suggesting two kinds of scope - transitive and non-transitive? Non

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 4:19 AM, Manu via Digitalmars-d wrote: I simply do not understand why distinguishing beteen ref and not-ref is a cornerstone of everything you do. I've said so many times, it's the single greatest regular frustration I encounter, by far. That is of course a relative measure. It's

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 4:20 AM, Manu via Digitalmars-d wrote: On 12 December 2014 at 08:53, John Colvin via Digitalmars-d Because he requires control over function ABIs for both inter-language communication and performance. In binding D to IDL (Interactive Data, not Interface Description) I found ref

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 2:09 PM, deadalnix wrote: On Friday, 12 December 2014 at 22:05:21 UTC, Walter Bright wrote: forms can work, too. No, unless we wrap every single indirection (pointer, slice, classes, delegates) into a wrapper. That is not going to fly very far. The beauty of GC is that you

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Friday, 12 December 2014 at 22:34:27 UTC, Walter Bright wrote: On 12/12/2014 2:09 PM, deadalnix wrote: Yes, I do understand that :-) but currently doing a safe refcounted type is impossible in D. This proposal fixes that. Actually, no it doesn't. It allow to ensure that this is safe,

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright wrote: How not? scope a = new Stuff(); scope b = a; auto rc1 = RC(a); auto rc2 = RC(b); // Enjoy the free when it comes !

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 2:48 PM, deadalnix wrote: On Friday, 12 December 2014 at 22:34:27 UTC, Walter Bright wrote: On 12/12/2014 2:09 PM, deadalnix wrote: Yes, I do understand that :-) but currently doing a safe refcounted type is impossible in D. This proposal fixes that. Actually, no it doesn't. It

Re: unnecessary OS redundancy in druntime

2014-12-12 Thread Iain Buclaw via Digitalmars-d
On 12 Dec 2014 21:50, Sean Kelly via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 12 December 2014 at 15:47:09 UTC, Joakim wrote: It seems like pointless repetition and there are many more examples of this, as I keep running into it when adding bionic/Android support. Martin

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/11/2014 10:10 PM, Dicebot wrote: So far I tend to agree, unfortunately. Considering all provided answers and explanations suggested semantics are simply not powerful enough to be useful even for relatively simple idiomatic D code and with no clear way of backward compatible improvements

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/11/2014 4:13 PM, deadalnix wrote: On Thursday, 11 December 2014 at 13:55:55 UTC, Marc Schütz wrote: On Thursday, 11 December 2014 at 12:48:05 UTC, Manu via Digitalmars-d wrote: On 8 December 2014 at 07:29, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/7/2014

Posix dynamic library initialization and finalization

2014-12-12 Thread Adam D. Ruppe via Digitalmars-d
I was just talking on IRC with someone about a dynamic library on linux in D being called from a C program. The runtime wasn't initialized and he couldn't modify the C program to add an extra call. I kidna thought rt_init would be done automatically in a constructor segment in the library,

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 4:07 PM, deadalnix wrote: On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright wrote: How not? scope a = new Stuff(); scope b = a; auto rc1 = RC(a); auto rc2 = RC(b); // Enjoy the free when it comes ! RC needs to take a type as a parameter, not a symbol.

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 4:07 PM, deadalnix wrote: On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright wrote: How not? scope a = new Stuff(); scope b = a; auto rc1 = RC(a); auto rc2 = RC(b); // Enjoy the free when it comes ! What's the type signature of RC ?

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread deadalnix via Digitalmars-d
On Saturday, 13 December 2014 at 00:52:46 UTC, Walter Bright wrote: On 12/12/2014 4:07 PM, deadalnix wrote: On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright wrote: How not? scope a = new Stuff(); scope b = a; auto rc1 = RC(a); auto rc2 = RC(b); // Enjoy the free when it comes !

Adding DMDScript to dub

2014-12-12 Thread Walter Bright via Digitalmars-d
Dmitry Olshansky has graciously ported DMDScript (a Javascript engine written in D) to D2. https://github.com/DigitalMars/DMDScript I have been trying to get it into dub, but have been stalled by the following when I attempt to register: Repository owner: DigitalMars Repository name:

Re: Adding DMDScript to dub

2014-12-12 Thread Rikki Cattermole via Digitalmars-d
On 13/12/2014 2:53 p.m., Walter Bright wrote: Dmitry Olshansky has graciously ported DMDScript (a Javascript engine written in D) to D2. https://github.com/DigitalMars/DMDScript I have been trying to get it into dub, but have been stalled by the following when I attempt to register:

Re: Posix dynamic library initialization and finalization

2014-12-12 Thread Paul O'Neil via Digitalmars-d
On 12/12/2014 07:38 PM, Adam D. Ruppe wrote: I was just talking on IRC with someone about a dynamic library on linux in D being called from a C program. The runtime wasn't initialized and he couldn't modify the C program to add an extra call. I kidna thought rt_init would be done

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 4:59 PM, deadalnix wrote: On Saturday, 13 December 2014 at 00:52:46 UTC, Walter Bright wrote: On 12/12/2014 4:07 PM, deadalnix wrote: On Saturday, 13 December 2014 at 00:06:18 UTC, Walter Bright wrote: How not? scope a = new Stuff(); scope b = a; auto rc1 = RC(a); auto rc2 =

Cheap Kitchen Units

2014-12-12 Thread metoodunk via Digitalmars-d
Cheap Kitchen Units. Thirty Ex Display Kitchens To Clear. www.exdisplaykitchens1.co.uk £ 595 Each with appliances.Tel 01616-694785 _ [url=http://www.cheapcutpricekitchens.co.uk/]Cheap Kitchen Units[/url]

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Manu via Digitalmars-d
On 13 December 2014 at 08:14, Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: On 12/12/2014 4:19 AM, Manu via Digitalmars-d wrote: I simply do not understand why distinguishing beteen ref and not-ref is a cornerstone of everything you do. I've said so many times, it's the

Re: Adding DMDScript to dub

2014-12-12 Thread Rikki Cattermole via Digitalmars-d
On 13/12/2014 2:58 p.m., Rikki Cattermole wrote: On 13/12/2014 2:53 p.m., Walter Bright wrote: Dmitry Olshansky has graciously ported DMDScript (a Javascript engine written in D) to D2. https://github.com/DigitalMars/DMDScript I have been trying to get it into dub, but have been stalled by

Re: Adding DMDScript to dub

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 5:58 PM, Rikki Cattermole wrote: On 13/12/2014 2:53 p.m., Walter Bright wrote: What does that mean? There is no package name field in the dub.json file. dependencies: { :engine : *, :ds : *, :ds-ext: * }, I wasn't aware that not having the

Re: DIP69 - Implement scope for escape proof references

2014-12-12 Thread Walter Bright via Digitalmars-d
On 12/12/2014 6:55 PM, Manu via Digitalmars-d wrote: I did just give some examples, I'll repeat; auto ref fails when the function is extern. Don't make it extern, then. It is also wrong that when I pass an int or float, it is passed by ref instead of by value... that is never what I want!

Re: Garbage collector collects live objects

2014-12-12 Thread Ruslan Mullakhmetov via Digitalmars-d-learn
On Thursday, 11 December 2014 at 18:36:59 UTC, Steven Schveighoffer wrote: My analysis so far: 2. In the array append code, the block attributes are obtained via GC.query, which has this code for getting the attributes:

Re: Garbage collector collects live objects

2014-12-12 Thread Ruslan Mullakhmetov via Digitalmars-d-learn
On Friday, 12 December 2014 at 12:53:00 UTC, Ruslan Mullakhmetov wrote: On Thursday, 11 December 2014 at 18:36:59 UTC, Steven Schveighoffer wrote: My analysis so far: 4. If your code is multi-threaded, but using __gshared, it can make the cache incorrect. Are you doing this? the app is

std.bitmanip - bitshift?

2014-12-12 Thread Trollgeir via Digitalmars-d-learn
http://dlang.org/phobos/std_bitmanip.html Does anyone know how to bit-shift a BitArray? I'm trying to make spikes in a neural network travel along the bits as they have various lengths.

Re: Global array

2014-12-12 Thread Paul via Digitalmars-d-learn
On Thursday, 11 December 2014 at 21:35:43 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Thu, Dec 11, 2014 at 08:56:00PM +, Paul via Digitalmars-d-learn wrote: Is there any merit (or folly!) in storing a large array, that frequently needs to be accessed globally, within a class like so:

Re: Global array

2014-12-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 12, 2014 at 03:04:21PM +, Paul via Digitalmars-d-learn wrote: On Thursday, 11 December 2014 at 21:35:43 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Thu, Dec 11, 2014 at 08:56:00PM +, Paul via Digitalmars-d-learn wrote: Is there any merit (or folly!) in storing a

Re: Garbage collector collects live objects

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/12/14 7:52 AM, Ruslan Mullakhmetov wrote: On Thursday, 11 December 2014 at 18:36:59 UTC, Steven Schveighoffer wrote: My analysis so far: 2. In the array append code, the block attributes are obtained via GC.query, which has this code for getting the attributes:

Re: std.bitmanip - bitshift?

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/12/14 8:39 AM, Trollgeir wrote: http://dlang.org/phobos/std_bitmanip.html Does anyone know how to bit-shift a BitArray? I'm trying to make spikes in a neural network travel along the bits as they have various lengths. That is a surprising omission from a bit-oriented type... You also

Re: Allocating aligned memory blocks?

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/12/14 2:02 AM, safety0ff wrote: On Friday, 12 December 2014 at 06:17:56 UTC, H. S. Teoh via Digitalmars-d-learn wrote: Is there a way to allocate GC memory blocks in D that are guaranteed to fall on OS page boundaries? I don't know about guarantees, I think that in practice, if your OS

Re: Garbage collector collects live objects

2014-12-12 Thread Ruslan Mullakhmetov via Digitalmars-d-learn
On Friday, 12 December 2014 at 15:50:26 UTC, Steven Schveighoffer wrote: Can I email you at this address? If not, email me at the address from my post to let me know your contact, no reason to work through building issues on the public forum :) -Steve reach me at theambient [] me__com

Re: std.bitmanip - bitshift?

2014-12-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Dec 12, 2014 at 11:13:38AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: On 12/12/14 8:39 AM, Trollgeir wrote: http://dlang.org/phobos/std_bitmanip.html Does anyone know how to bit-shift a BitArray? I'm trying to make spikes in a neural network travel along the bits

Re: std.bitmanip - bitshift?

2014-12-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/12/14 2:17 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Dec 12, 2014 at 11:13:38AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: On 12/12/14 8:39 AM, Trollgeir wrote: http://dlang.org/phobos/std_bitmanip.html Does anyone know how to bit-shift a BitArray? I'm

Re: std.bitmanip - bitshift?

2014-12-12 Thread H. S. Teoh via Digitalmars-d-learn
Here's my implementation of = and = for BitArray: https://github.com/D-Programming-Language/phobos/pull/2797 While working with the code, I found that there are a lot of areas that need improvement. If I have some time I'll file separate PR's for them. T -- VI = Visual Irritation

The package feature is ignored when the file name is package.di

2014-12-12 Thread Jeremy DeHaan via Digitalmars-d-learn
Is this on purpose? Granted, I almost never use interface files, but I had a whim to use them for what I was working on today. Everything worked fine when I renamed the file to package.d, but apparently package.di is not acceptible.

std.array oddness

2014-12-12 Thread earthfront via Digitalmars-d-learn
Hello! I was attempting project euler problem 22 and seeing something weird going on with the array function in std.array. I made the following code to demonstrate. Given names.txt: -- MARY,PATRICIA,LINDA,BARBARA,ELIZABETH -- and code: -- import

Re: std.array oddness

2014-12-12 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Dec 2014 05:15:08 + earthfront via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Am I using array incorrectly? no, you are using `.byLine` incorrectly. ;-) `.byLine` reuses it's internal buffer for each line, so you have to copy that buffer. like this: import

Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-12 Thread Andrey Derzhavin via Digitalmars-d-learn
Hello! We have object, for example, objA. ObjectAType objA = new ObjectAType(...); // we have a many references to objA void someFunction1(...) { // destroying the objA destroy(one_of_the_refToObjA); // } void someFunction2() { // segmentation fault if the objA is

Re: Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-12 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Dec 2014 07:03:22 + Andrey Derzhavin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hello! We have object, for example, objA. ObjectAType objA = new ObjectAType(...); // we have a many references to objA void someFunction1(...) { // destroying

Re: Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-12 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Dec 2014 07:03:22 + Andrey Derzhavin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: p.s. you can emulate weak links if this is what you want to have. i.e. references to object that will not stop GC to collect that object and which will be auto-nullified if the

Re: Are there any methods like isDestroyed or isDisposed to detect whether some object is destroyed or not?

2014-12-12 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Dec 2014 07:03:22 + Andrey Derzhavin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: p.p.s. please-please-please don't invent other hacks with `rt_attachDisposeEvent()`! such hackery will not do you good in the long term. signature.asc Description: PGP signature

[Issue 13858] Wrong warning about unreachable code with break/goto case

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13858 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Hardware|x86_64 |All

[Issue 13858] Wrong warning about unreachable code with break/goto case

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13858 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Severity|enhancement |normal --

[Issue 13858] New: Wrong warning about unreachable code with break/goto case

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13858 Issue ID: 13858 Summary: Wrong warning about unreachable code with break/goto case Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

[Issue 13858] Wrong warning about unreachable code with break/goto case

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13858 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com --- Also, the same thing happens with 'goto', although I'm not sure whether there's a semantic difference between the two (I assume so). --

[Issue 13747] Linux CMSG_NXTHDR is private, since alias doesn't change protection level

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13747 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 13856] std.stdio.readln stomps arrays

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13856 --- Comment #1 from Rainer Schuetze r.sagita...@gmx.de --- This shows that the current implementation also adds an unnecesary allocation when supplying stack allocated arrays as an initial buffer. void main() { std.file.write(testread, abcd\n);

[Issue 13859] New: Phobos uninitializedAlloc

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13859 Issue ID: 13859 Summary: Phobos uninitializedAlloc Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

[Issue 13856] std.stdio.readln stomps arrays

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13856 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added Keywords||pull --- Comment #2

[Issue 13036] Cherry-picks for v2.065.1-b1

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13036 Martin Krejcirik m...@krej.cz changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 11216] Make synchronized statement `nothrow`

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11216 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/05b15ab05279a70b30f4a580c705526e70e09155 fix Issue 11216 -

[Issue 12634] [D1] Wrong code with string literal concatenation

2014-12-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12634 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com --- Update w.r.t. a reproducible test-case: - class C { // uncomment char[] to fix bug private static const /*char[]*/ PATH = asdf; private static const PATH2 = PATH ~

  1   2   >