[Issue 10233] [Tracker] Grammar issues

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10233

briancsch...@gmail.com changed:

   What|Removed |Added

 Depends on||15556

--


[Issue 15556] New: Script line missing from lexical specification

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15556

  Issue ID: 15556
   Summary: Script line missing from lexical specification
   Product: D
   Version: D2
  Hardware: All
   URL: http://dlang.org/spec/lex.html#special-token-sequence
OS: All
Status: NEW
  Keywords: spec
  Severity: normal
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: briancsch...@gmail.com
Blocks: 10233

The following is valid at the beginning of D files:

#!/usr/bin/rdmd

but this is missing from the lexcical specification, thus Any IDE plugin that
follows the specification will reject this line as an error.

Example: https://github.com/kingsleyh/DLanguage/issues/69

--


[Issue 15551] New: default construction disabled with default arguments

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15551

  Issue ID: 15551
   Summary: default construction disabled with default arguments
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: wiko...@gmail.com

Working with dmd.2.069.2
Fail with nightly build 2016-01-11.


cat > bug.d << EOF
struct S {
this(string r = ".") {
}
}

void test() {
S ok();
S err;
}
EOF

dmd -c bug.d

./bug.d(41): Error: variable bug.test.err default construction is disabled for
type S


--


[Issue 15552] New: broken link http://dlang.org/library/std/algorithm/std_algorithm.html inside http://dlang.org/library/std/algorithm/sorting.html

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15552

  Issue ID: 15552
   Summary: broken link
http://dlang.org/library/std/algorithm/std_algorithm.h
tml inside
http://dlang.org/library/std/algorithm/sorting.html
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dlang.org
  Assignee: nob...@puremagic.com
  Reporter: timothee.co...@gmail.com

This is a submodule of std.algorithm => points to broken link
http://dlang.org/library/std/algorithm/std_algorithm.html

--


[Issue 15222] std.experimental omitted from phobos zip file

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15222

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15222] std.experimental omitted from phobos zip file

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15222

--- Comment #2 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/2a049caff111655feae4ff49d7c3ff9f8205f510
recursively create zip file

- fix Issue 15222 - std.experimental omitted from phobos zip file
- avoids outdated manifest lists

--


[Issue 6192] std.algorithm.sort performance

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6192

--- Comment #6 from Andrei Alexandrescu  ---
https://github.com/D-Programming-Language/phobos/pull/3922

--


[Issue 6192] std.algorithm.sort performance

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6192

--- Comment #7 from Andrei Alexandrescu  ---
(In reply to Andrei Alexandrescu from comment #6)
> https://github.com/D-Programming-Language/phobos/pull/3922

With this PR and the command line:

dmd -O -inline -release -run sort-benchmark.d 600

the output is:

sort-sort2 benchmarks (milliseconds), N=600:
  Random distribution:
sort: 696
sort2:680
  Already sorted arrays:
sort: 122
sort2:113
  Inverted order arrays:
sort: 132
sort2:224
  Few random doubles appended to the sorted arrays:
sort: 244
sort2:234

--


[Issue 15557] New: Common type of void* and const(int)* should be const(void)*, not const(int)*

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15557

  Issue ID: 15557
   Summary: Common type of void* and const(int)* should be
const(void)*, not const(int)*
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: jakobov...@gmail.com

---
void main()
{
const(int)* a;
void* b;
auto c = true ? a : b;
pragma(msg, typeof(c)); // const(int)*
}
---

typeof(c) should be const(void)*. This affects std.traits.CommonType.

--


[Issue 15276] Allow specification of shell for spawnShell/executeShell/pipeShell

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15276

Mark Isaacson  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 15440] std.uni outputs \u0069\u0307 as the lower case of \u0130

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15440

--- Comment #4 from Jack Stouffer  ---
(In reply to Ali Cehreli from comment #3)
> Should std.uni be locale-aware?

Yes, though in what way it would achieve this is an interesting question.

I think you should make a seperate bug report for this.

--


[Issue 15549] [ndslice] byElement is broken for packed slices

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15549

--- Comment #3 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/fe09ee540cb002b8c1016b399b1c3dde71ee024d
fix Issue 15549

https://github.com/D-Programming-Language/phobos/commit/2ea33ce0f6bf41b1731c54920e2cc300c1d6f584
Merge pull request #3920 from 9il/patch-6

fix Issue 15549

--


[Issue 15549] [ndslice] byElement is broken for packed slices

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15549

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15385] Apply Andersson91 idea to SortedRange.contains

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15385

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15555] New: [Reg 2.070.0-b1] Hidden error cause by Throwable.message

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1

  Issue ID: 1
   Summary: [Reg 2.070.0-b1] Hidden error cause by
Throwable.message
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: regression
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: d...@me.com

Compiling Tango with DMD 2.070.0-b1 causes the following error:

tango/text/xml/SaxParser.d(808,8): Error: class
tango.text.xml.SaxParser.SAXException use of object.Throwable.message() is
hidden by SAXException; use 'alias message = Throwable.message;' to introduce
base class overload set

The error is due to the new method "message" in Throwable, which is causing a
conflict with an already existing method in a subclass [1]. PR that added the
new method [2].

[1]
https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/text/xml/SaxParser.d#L861
[2]
https://github.com/D-Programming-Language/druntime/pull/1445#issuecomment-170530377

--


[Issue 15554] New: typedef standard type can't be used with to! properly

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15554

  Issue ID: 15554
   Summary: typedef standard type can't be used with to! properly
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: gruen_tob...@web.de

Casting from a string to a custom Typedef type is more complicated than it
should be. To should actually care about the underlying typedef-type, and
recognize that it has to parse a string to a long value:

alias QuestionId = Typedef!(long, long.init, "QuestionId");

QuestionId q = to!(TypedefType!QuestionId)("43"); // Compiles
QuestionId q2 = to!QuestionId("43");  // Error..

Forum:
http://forum.dlang.org/thread/otcbczxfxzannjcok...@forum.dlang.org


togrue

--


[Issue 15553] New: topN very inefficient [slower than sort, even for topN(0)] but should be O(n)

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15553

  Issue ID: 15553
   Summary: topN very inefficient [slower than sort, even for
topN(0)] but should be O(n)
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: blocker
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: timothee.co...@gmail.com

It's a serious bug because people are either generating slow code with topN or
are using sort instead of topN (as in
http://jackstouffer.com/blog/nd_slice.html)



module tests.bench_topn;

/+
testing:
test_sort, test_topn, test_topn_zeroth, test_max

$ldc_X -O3 -inline -release -boundscheck=off -mcpu=native -L=-L$dmd_build_D
-I=$phobos_D -of=/tmp/benchmark_ndslice $code/tests/bench_topn.d
/tmp/benchmark_ndslice
[640, 1248, 731, 146]

$dmd_069_X -O -inline -release -noboundscheck $code/tests/bench_topn.d
-of/tmp/benchmark_ndslice
/benchmark_ndslice
[746, 2357, 1440, 281]

=> topN slower than sort, and even topN(0) is slower than sort (but should be
same speed as max)
+/

import std.algorithm;
import std.random;

void test_sort(T)(T a) {
  a.sort();
}

void test_topn(T)(T a) {
  a.topN(a.length / 2);
}

// should be roughly as fast as test_max
void test_topn_zeroth(T)(T a) {
  a.topN(0);
}

void test_max(T)(T a) {
  static int counter;
  counter = a.reduce!max;
}

void fun() {
  alias T = ubyte;

  int n = 100;
  auto a = new T[n];
  foreach (ref ai; a)
ai = cast(T)(uniform(0, T.max));

  auto iter = 100;
  import std.datetime;
  import std.stdio;
  import std.conv : to;
  import std.array;

  iter.benchmark!({ test_sort(a.dup); }, { test_topn(a.dup); }, {
test_topn_zeroth(a.dup); }, { test_max(a.dup); })[].map!(a =>
a.to!Duration.total!`msecs`).array.writeln;
}

void main() {
  fun;
}


--


[Issue 15553] topN very inefficient [slower than sort, even for topN(0)] but should be O(n)

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15553

--- Comment #1 from Timothee Cour  ---
haven't profiled, but:
could uniform be slow
https://github.com/D-Programming-Language/phobos/commit/7291d2e47d4a7fb17565a7d7cd04ba8f893c1a27

not sure if those could help: #5514 

Maybe this is most relevant: [std.algorithm: implement deterministic topN]
https://issues.dlang.org/show_bug.cgi?id=12141


At the very least, it shouldn't be slower than sort

--


[Issue 15553] topN very inefficient [slower than sort, even for topN(0)] but should be O(n)

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15553

Timothee Cour  changed:

   What|Removed |Added

 CC||ilyayaroshe...@gmail.com,
   ||timothee.co...@gmail.com
   Assignee|nob...@puremagic.com|and...@erdani.com
 OS|Mac OS X|All

--


[Issue 15549] [ndslice] byElement is broken for packed slices

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15549

Илья Ярошенко  changed:

   What|Removed |Added

   Assignee|nob...@puremagic.com|ilyayaroshe...@gmail.com

--


[Issue 15430] amdMmx hangs up

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15430

--- Comment #2 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/97d3999a4f3ab3c8409060bc6bb381fcc2a43c54
fix Issue 15430 - amdMmx hangs up

https://github.com/D-Programming-Language/druntime/commit/d0e4dc96a265ae562e98ad81d0a7d56b752b48ef
Merge pull request #1463 from MartinNowak/fix15430

fix Issue 15430 - amdMmx hangs up

--


[Issue 15553] topN very inefficient [slower than sort, even for topN(0)] but should be O(n)

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15553

--- Comment #2 from Andrei Alexandrescu  ---
https://github.com/D-Programming-Language/phobos/pull/3921

--


[Issue 15553] topN very inefficient [slower than sort, even for topN(0)] but should be O(n)

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15553

--- Comment #3 from Andrei Alexandrescu  ---
BTW uniform() isn't the problem; replacing it with r.length / 2 keeps things
slow.

--


[Issue 15440] std.uni outputs \u0069\u0307 as the lower case of \u0130

2016-01-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15440

Ali Cehreli  changed:

   What|Removed |Added

 CC||acehr...@yahoo.com

--- Comment #3 from Ali Cehreli  ---
It looks like I am outdated on this issue because I had never heard of the 0069
0307 sequence before H. S. Teoh brought the following change to my attention:

  https://github.com/D-Programming-Language/phobos/pull/3848

I've learned since then that the two-character sequence should be the default
but TR locale should still use just 0069. According to the following quote,
Java 7 behaves differently depending on locale:

  http://grepalex.com/2013/02/14/java-7-and-the-dotted--and-dotless-i/


CODE   LOWER   TITLE   UPPER  LANGUAGE
0130;  0069 0307;   0130;   0130;
0130;  0069;0130;   0130;   tr;
0130;  0069;0130;   0130;   az;

Entries with a language take precedence over those without, so in my JVM where
the default locale is English, the first row of the mapping is used, which
lines-up with the codepoints that we saw outputted in our Java 7 example.
Therefore to make Java do the right thing here for Turkish, we need to
explicitly specify the Turkish locale (“tr” is the ISO 639 alpha-2 language
code for Turkish) to the toLowerCase method


Should std.uni be locale-aware?

--