[Issue 8682] Can't install DMD 2.060 on OS X 10.6.8

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8682



--- Comment #5 from Jacob Carlborg  2012-10-23 23:29:21 PDT ---
(In reply to comment #4)
> Jacob, I tried the installer and it seemed to work fine. I was able to compile
> and run a D program. It seemed to put the dmd compiler in my /usr/bin
> directory. It did not put rdmd there. Running "dmd" or "/usr/bin/dmd" worked
> fine but "rdmd" and "/usr/bin/rdmd" did not work.

I guess that rdmd wasn't available when the installer was created.

> Thank you. I am glad to have something that works. Out of curiosity, what did
> you do?

I just built the installer on Mac OS X 10.6. I would guess that means the
installers created on Mac OS X 10.7 or later aren't backwards compatible, or 
there's a missing flag or similar.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8883] New: -H and non-object object handled incorrectly

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8883

   Summary: -H and non-object object handled incorrectly
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: ellery-newco...@utulsa.edu


--- Comment #0 from Ellery Newcomer  2012-10-23 
19:45:04 PDT ---
$ cat a/object.d

module a.object;
int objectystuff = 1;

$ cat a/other.d

module a.other;
import a.object;
public import a.object;

dmd -Hdd a/*.d -c -o-

cat d/object.di

// D import file generated from 'a/object.d'
module a.object;
int objectystuff = 1;

cat d/other.di

// D import file generated from 'a/other.d'
module a.other;
public/// <-- where'd my imports
go?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8143] Safe std.conv.to enum conversion

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8143



--- Comment #2 from bearophile_h...@eml.cc 2012-10-23 18:59:14 PDT ---
(In reply to comment #1)

> This will fail internally if conv.to compares members via "==", because of
> floating point comparison semantics.
> 
> So the question is, is this going to be a problem? If yes, should we use
> approxEqual for floating point comparisons?

By far the main purpose of enums is with integral values (ints, uint, chars,
etc), to be used to enumerate something or as bitfields. Using
float/double/real enums is supported in D, but it's not common.

Using approxEqual is suboptimal, using std.math.feqrel is better. but all
approximate floating point comparisons have their quirks and limits. Backing-in
one solution is not a good idea.


> Or maybe we should simply ban using
> std.conv on enums that have a floating point base type?

What about user-defined floating point types, or a double wrapped in a struct
with an alias this?

I think refusing conv on built-in floating point types is an acceptable
solution to avoid most troubles. Other cases like wrapped doubles are left at
the care of the programmer.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4563] [module system] Error messages for missing package or missing name

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4563



--- Comment #6 from Andrej Mitrovic  2012-10-23 
18:53:44 PDT ---
(In reply to comment #0)
> import std.bitmanips;
> void main() {}
> 
> test.d(1): Error: module bitmanips is in file 'std\bitmanips.d' which cannot  
>be read

This is the only test-case left to fix in this Issue (the others seem to be
fixed).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8682] Can't install DMD 2.060 on OS X 10.6.8

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8682



--- Comment #4 from Elias Zamaria  2012-10-23 18:33:52 PDT 
---
Jacob, I tried the installer and it seemed to work fine. I was able to compile
and run a D program. It seemed to put the dmd compiler in my /usr/bin
directory. It did not put rdmd there. Running "dmd" or "/usr/bin/dmd" worked
fine but "rdmd" and "/usr/bin/rdmd" did not work.

Thank you. I am glad to have something that works. Out of curiosity, what did
you do?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8881] Add EnumBaseType template into traits

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8881



--- Comment #3 from Andrej Mitrovic  2012-10-23 
17:36:34 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Doesn't std.traits.OriginalType already do this?
> 
> It appears it does. But it couldn't have a more un-original name. There's no
> way I would have found that..

See my comment in Pull request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8881] Add EnumBaseType template into traits

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8881



--- Comment #2 from Andrej Mitrovic  2012-10-23 
17:28:18 PDT ---
(In reply to comment #1)
> Doesn't std.traits.OriginalType already do this?

It appears it does. But it couldn't have a more un-original name. There's no
way I would have found that..

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8881] Add EnumBaseType template into traits

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8881


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #1 from Jonathan M Davis  2012-10-23 17:26:38 
PDT ---
Doesn't std.traits.OriginalType already do this?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8143] Safe std.conv.to enum conversion

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8143


Andrej Mitrovic  changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic  2012-10-23 
16:44:27 PDT ---
One problem with this is:

enum EF : float { C = 4.9 }
float f = 4.9;
EF en2 = to!EF(f);

This will fail internally if conv.to compares members via "==", because of
floating point comparison semantics.

So the question is, is this going to be a problem? If yes, should we use
approxEqual for floating point comparisons? Or maybe we should simply ban using
std.conv on enums that have a floating point base type?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878


bearophile_h...@eml.cc changed:

   What|Removed |Added

  Component|Phobos  |Optlink


--- Comment #5 from bearophile_h...@eml.cc 2012-10-23 16:44:32 PDT ---
(In reply to comment #4)
> It would probably be cleaner to just create a new bug report,

Thank you for the answer. I have opened Issue 8882

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8882] New: map, filter, iota and zip in pure (and nothrow) functions

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8882

   Summary: map, filter, iota and zip in pure (and nothrow)
functions
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-10-23 16:43:44 PDT ---
This is not an enhancement request, I think of it as a bug report. This is a
spinoff of Issue 8878

To make functional programming in D a better experience, the following
functions should be usable in a pure (and possibly nothrow) context:


import std.algorithm: map, filter;
import std.range: iota, zip;
void main() pure nothrow {
auto m = map!q{a * a}([1, 2, 3]);
auto f = filter!q{ a > 1 }([1, 2, 3]);
auto i = iota(1, 10, 2);
auto z = zip([1, 2, 3], [10, 20, 30]);
}


DMD 2.061alpha gives:

test.d(4): Error: pure function 'main' cannot call impure function 'map'
test.d(5): Error: pure function 'main' cannot call impure function 'filter'
test.d(6): Error: pure function 'main' cannot call impure function 'iota'
test.d(7): Error: pure function 'main' cannot call impure function 'zip'
test.d(4): Error: map is not nothrow
test.d(5): Error: filter is not nothrow
test.d(6): Error: iota is not nothrow
test.d(7): Error: zip is not nothrow
test.d(3): Error: function D main 'main' is nothrow yet may throw


Note: zip() accepts a StoppingPolicy, so this can't be nothrow:

import std.range: zip, StoppingPolicy;
void main() pure {
auto z = zip(StoppingPolicy.requireSameLength, [1,2,3], [10,20]);
foreach (t; z) {} // throws
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8881] New: Add EnumBaseType template into traits

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8881

   Summary: Add EnumBaseType template into traits
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Phobos
AssignedTo: andrej.mitrov...@gmail.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2012-10-23 
16:20:24 PDT ---
This will be useful to have for the upcoming fix to Issue 8143 (std.conv.toImpl
will need it). And it will be generally useful to have in the standard library.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8880] Feature Request into both std.ascii std.uni isNewline

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8880



--- Comment #1 from bioinfornatics  2012-10-23 
15:57:46 PDT ---
unittest

import std.stdio;
import std.ascii;

bool isNewline(dchar c) @safe pure nothrow {
return ( c == 0x0A || c == 0x0D )? isWhite( c ) : false;
}

void main(){
string test1 = "test\n";
string test2 = "test\r\n";
string test3 = "test\r";
foreach( letter; test1 ) writeln( letter, isNewline( letter ) );
foreach( letter; test2 ) writeln( letter, isNewline( letter ) );
foreach( letter; test3 ) writeln( letter, isNewline( letter ) );
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8880] New: Feature Request into both std.ascii std.uni isNewline

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8880

   Summary: Feature Request into both std.ascii std.uni isNewline
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bioinfornat...@gmail.com


--- Comment #0 from bioinfornatics  2012-10-23 
15:47:13 PDT ---
both std.ascii std.uni provides isWhite but any provides isNewline
maybe something like 


bool isNewline(dchar c) @safe pure nothrow
{
return ( c == 0x0A || c == 0x0D )? isWhite( c ) : false;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8879] New: std.range function should to be usable in a pure (and sometimes nothrow) situations

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8879

   Summary: std.range function should to be usable in a pure (and
sometimes nothrow) situations
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bioinfornat...@gmail.com


--- Comment #0 from bioinfornatics  2012-10-23 
15:32:40 PDT ---
Code below fail when using pure with both dmd/ldc  dmdfe 2.060

___
This gives:
/home/c135/c554.d(6): Error: pure function 'square' cannot call impure function
'zip'
/home/c135/c554.d(6): Error: pure function 'square' cannot call impure function
'empty'
/home/c135/c554.d(6): Error: pure function 'square' cannot call impure function
'popFront'
/home/c135/c554.d(6): Error: pure function 'square' cannot call impure function
'front'
-
import std.range;
import std.stdio;

pure uint square( in int[] x, in int[] y ){
uint result = 0;
foreach( item; zip( x, y ) )
result += item[0] * item[1];
return result;
}

int main(){
int[3] a = [0,1,2];
int[3] b = [1,2,3];
writefln( "Square of %s with %s give %u", a, b, square( a, b ) );
return 0;
}
___


Bearophile code
___
This gives:
test.d(3): Error: pure function 'main' cannot call impure function 'iota'
-
import std.range: iota;
void main() pure {
iota(10);
}
___

This gives:
test.d(4): Error: pure function 'main' cannot call impure function 'map'
test.d(4): Error: map is not nothrow
test.d(2): Error: function D main 'main' is nothrow yet may throw
-
import std.algorithm: map;
void main() pure nothrow {
int[] data = [1, 2, 3];
auto r = map!q{a * a}(data);
}
___

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878


Jonathan M Davis  changed:

   What|Removed |Added

  Component|Optlink |Phobos


--- Comment #4 from Jonathan M Davis  2012-10-23 15:25:37 
PDT ---
It would probably be cleaner to just create a new bug report, but you can
reopen this one if you want to. Regardless, the bug as initially reported is
incorrect.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #3 from bearophile_h...@eml.cc 2012-10-23 14:13:32 PDT ---
(In reply to comment #1)

> If you have an issue with a specific function with a specific type which does
> have pure member functions and the templated function is not being inferred as
> pure, then please report it with an appropriate code sample, but it would be
> wrong to specifically provide pure versions of functions like iota or zip.

This gives:
test.d(3): Error: pure function 'main' cannot call impure function 'iota'

import std.range: iota;
void main() pure {
iota(10);
}




This gives:
test.d(4): Error: pure function 'main' cannot call impure function 'map'
test.d(4): Error: map is not nothrow
test.d(2): Error: function D main 'main' is nothrow yet may throw

import std.algorithm: map;
void main() pure nothrow {
int[] data = [1, 2, 3];
auto r = map!q{a * a}(data);
}


I propose to reopen this bug report, and change its meaning and title: instead
of asking for such functions to be marked as pure, to ask them to be usable in
a pure (and sometimes nothrow) situations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8544] Expose "cArgs" in druntime

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8544


Alex R�nne Petersen  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8544] Expose "cArgs" in druntime

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8544



--- Comment #4 from github-bugzi...@puremagic.com 2012-10-23 13:56:59 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/2e73c0fd3139af781f3afe926c4485b20f88a16d
Fixes Issue 8544 - Expose cArgs in Druntime struct for easier interfacing with
C libraries.

https://github.com/D-Programming-Language/druntime/commit/84beb9786e11b419cfa5eb4792d7fbdc8e1a
Merge pull request #336 from AndrejMitrovic/Fix8544

Fix Issue 8544 - Expose cArgs in Druntime struct for C interfacing

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


Re: [Issue 3850] Signed/unsigned bytes type name

2012-10-23 Thread Daniel Kozak

On Tuesday, 23 October 2012 at 20:04:08 UTC, Daniel Kozak wrote:
On Tuesday, 23 October 2012 at 16:32:38 UTC, 
bearophile_h...@eml.cc wrote:

And to represent those indexes I used a
sbyte instead of a ubyte because I have used -1 to represent 
"missing value").


You still have to use 0xFF :-). But yes, I understand, that 
sbyte and ubyte is better way, how to solve this issue.


s/have to/can/


Re: [Issue 3850] Signed/unsigned bytes type name

2012-10-23 Thread Daniel Kozak
On Tuesday, 23 October 2012 at 16:32:38 UTC, 
bearophile_h...@eml.cc wrote:

And to represent those indexes I used a
sbyte instead of a ubyte because I have used -1 to represent 
"missing value").


You still have to use 0xFF :-). But yes, I understand, that sbyte 
and ubyte is better way, how to solve this issue.




[Issue 8839] MmFile do not use Range

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8839



--- Comment #6 from bioinfornatics  2012-10-23 
12:19:39 PDT ---
i totally agree with you now :-)

but one day it will good to switch Mmfile to struct that is not huge break

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878



--- Comment #2 from bioinfornatics  2012-10-23 
12:13:51 PDT ---
In first thanks jonathan to your answer.
Code below fail both when using pure with dmd/ldc  dmdfe 2.060 =>
http://dpaste.dzfl.pl/65efd36e

___
import std.range;
import std.stdio;

pure uint square( in int[] x, in int[] y ){
uint result = 0;
foreach( item; zip( x, y ) )
result += item[0] * item[1];
return result;
}

int main(){
int[3] a = [0,1,2];
int[3] b = [1,2,3];
writefln( "Square of %s with %s give %u", a, b, square( a, b ) );
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878


Jonathan M Davis  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jmdavisp...@gmx.com
 Resolution||WONTFIX


--- Comment #1 from Jonathan M Davis  2012-10-23 11:22:28 
PDT ---
pure is inferred for templated functions. As long as the functions for the
range used are pure, then the functions in std.range and std.algorithm will
generally be pure. There may be some compiler bugs which make it so that that
doesn't always work like it's supposed to, but pretty much zero functions in
std.range and std.algorithm should be marked as pure, since whether they can be
pure or not really depends on the types used with them, which is why attribute
inferrence for templates was introduced in the first place.

If you have an issue with a specific function with a specific type which does
have pure member functions and the templated function is not being inferred as
pure, then please report it with an appropriate code sample, but it would be
wrong to specifically provide pure versions of functions like iota or zip.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3850] Signed/unsigned bytes type name

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3850



--- Comment #8 from bearophile_h...@eml.cc 2012-10-23 09:32:37 PDT ---
(In reply to comment #7)

> I think byte should be unsigned by default. So I am for sbyte(signed byte - Is
> there really anyone who need it?) and byte (unsigned byte)

Ideally I agree with you. In practice D built-in types are prefixed by "u" when
unsigned, so a more practical solution is the C# one, that is using the "ubyte"
and "sbyte" names pair.

Regarding the usefulness of signed bytes: small data types like ubyte, sbyte,
short, ushort and even float are mostly useful in aggregates, like arrays and
arrays of structs. They are not so useful if you need only one of them.

Recently I have used an array of sbyte values to represent indexes in a short
array (statically known to be shorter than 127 items). Using 1 byte instad of
an int/uint/size_t saves space if you have many of such indexes. And saving
space means reducing cache misses. And to represent those indexes I used a
sbyte instead of a ubyte because I have used -1 to represent "missing value").

sbyte values are not used often, but it's right to have them too in a system
language.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2659] Remove the comma operator

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2659



--- Comment #2 from Don  2012-10-23 07:45:53 PDT ---
Just encountered another newbie reason for removing comma.

writeln( 6, mixin("7,8"), 9 );

doesn't print the expected 6 7 8 9. Instead it prints 6 8 9.

If comma was removed, this wouldn't compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3850] Signed/unsigned bytes type name

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3850


Daniel Kozak  changed:

   What|Removed |Added

 CC||kozz...@gmail.com


--- Comment #7 from Daniel Kozak  2012-10-23 07:02:09 PDT ---
(In reply to comment #0)
> While programming in D I have seen that you can forget that the "byte" is
> signed. (Because normally I think of bytes as unsigned entities. Other people
> share the same idea). (It's similar but not equal to the situation of signed
> and unsigned chars in C).
> 
> There are several ways to solve this small problem. One of the simpler ways I
> can think of is to deprecate the "byte" type name and introduce a "sbyte" type
> name (that replaces the "byte" type name). Using a sbyte it's probably quite
> more easy to not forget that it's a signed value.
> 
> This introduces an inconstancy in the naming scheme of D integral values (they
> are now symmetric, ubyte, byte, int, uint, etc), but it can help avoid some
> bugs, especially from D newbies.

I think byte should be unsigned by default. So I am for sbyte(signed byte - Is
there really anyone who need it?) and byte (unsigned byte)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8878] New: std.range is not pure

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8878

   Summary: std.range is not pure
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Optlink
AssignedTo: nob...@puremagic.com
ReportedBy: bioinfornat...@gmail.com


--- Comment #0 from bioinfornatics  2012-10-23 
05:27:40 PDT ---
Dear,

std.range should provide some pure function as;
iota -> 0 to to should give evey time the same result
zip  -> when it is an array (not an associative array) should be always the
same result

and other …

this missing feature allowed developers to use the pure in many case

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3850] Signed/unsigned bytes type name

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3850



--- Comment #6 from Don  2012-10-23 03:15:33 PDT ---
>> I wish we could change this. (I would do it by changing the type to "sbyte"
>> and then adding "alias byte = sbyte;" to object.d).

> That still won't prevent you from making the mistake of typing 'byte' instead
> of 'ubyte' though. :)

By itself, no, but anybody can modify their local copy of object.d to remove
the alias...
A very slow deprecation path is possible.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8682] Can't install DMD 2.060 on OS X 10.6.8

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8682



--- Comment #3 from Jacob Carlborg  2012-10-23 02:14:17 PDT ---
Could you try this installer:

https://dl.dropbox.com/u/18386187/dmd-2.060-osx-installer.zip

I built it on Mac OS X 10.6.3.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8877] New: std.encoding.transcode is extremely slow

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8877

   Summary: std.encoding.transcode is extremely slow
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: kozz...@gmail.com


--- Comment #0 from Daniel Kozak  2012-10-23 00:44:39 PDT ---
Created an attachment (id=1152)
benchmark code

When I compare std.encoding.transcode vs. std.utf.toUTF*.

std.utf.toUTF* has been almost 100x faster.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 8876] New: bitfields template generate wrong code

2012-10-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8876

   Summary: bitfields template generate wrong code
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: kozz...@gmail.com


--- Comment #0 from Daniel Kozak  2012-10-23 00:11:22 PDT ---
Created an attachment (id=1151)
Problematic use case

mixin(bitfields!(
uint, "machine", 24,
ushort, "pid", 16,
uint, "inc", 24
));

generate for machine field this code:

@property @safe void machine(uint v) pure nothrow {
assert(v >= machine_min);
assert(v <= machine_max); 
_machine_pid_inc = cast(typeof(_machine_pid_inc)) ((_machine_pid_inc &
~16777215U) | ((cast(typeof(_machine_pid_inc)) v << 0U) & 16777215U));
}

but this is wrong because _machine_pid_inc & ~16777215U clear some other bits;
it should generate code like this:

@property @safe void machine(uint v) pure nothrow {
assert(v >= machine_min);
assert(v <= machine_max); 
_machine_pid_inc = cast(typeof(_machine_pid_inc)) ((_machine_pid_inc &
~16777215UL) | ((cast(typeof(_machine_pid_inc)) v << 0U) & 16777215U));
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---