[Issue 12420] [AA] Can't set associative array with array as key value using key type

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12420 --- Comment #12 from Steven Schveighoffer schvei...@yahoo.com --- (In reply to Denis Shelomovskij from comment #11) But htis issue even not about this. AA's key type is `const char[]` and `char[]` is implicitly convertible to `const char[]`

Re: expand variadic template parameters

2015-03-10 Thread André
too many trees in front of my eyes. Thanks for the answers. Kind regards André On Tuesday, 10 March 2015 at 19:16:23 UTC, Adam D. Ruppe wrote: On Tuesday, 10 March 2015 at 19:11:22 UTC, André wrote: Is there a simple way to get it working? The simplest: just write `bar(args);` - the

[Issue 14268] New: Win64: debug info for associative arrays have no type information

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14268 Issue ID: 14268 Summary: Win64: debug info for associative arrays have no type information Product: D Version: D2 Hardware: x86_64 OS: Windows

[Issue 14268] Win64: debug info for associative arrays have no type information

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14268 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added Keywords||pull --- Comment #1

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Tobias Pankrath via Digitalmars-d-learn
.array .sort buildin arrays have a .sort-property that is called.

2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Andre via Digitalmars-d-learn
Hi, following coding raises a compiler error with the beta of 2.067. Is this error intended or not? It is working if I change first line of main to: ulong bits; enum Bits: ulong { none = 0 } bool hasBit(ref ulong rBits, ulong rBit) { return cast(bool)(rBits rBit); } void

How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Andre via Digitalmars-d-learn
Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought the std.algorithm.sort method is used in this example? void main() { import std.algorithm: sort, uniq, map; import std.array: array; string[]

Re: Parallelization of a large array

2015-03-10 Thread safety0ff via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 20:41:14 UTC, Dennis Ritchie wrote: Hi. How to parallelize a large array to check for the presence of an element matching the value with the data? Here's a simple method (warning: has pitfalls): import std.stdio; import std.parallelism; void main() { int[] a

Re: Parallelization of a large array

2015-03-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 21:15:17 UTC, safety0ff wrote: On Tuesday, 10 March 2015 at 20:41:14 UTC, Dennis Ritchie wrote: Hi. How to parallelize a large array to check for the presence of an element matching the value with the data? Here's a simple method (warning: has pitfalls): import

[Issue 14273] New: Predicates for static assert pass depending on order of asserts

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14273 Issue ID: 14273 Summary: Predicates for static assert pass depending on order of asserts Product: D Version: D2 Hardware: All OS: All Status: NEW

Purity not enforced for default arguments?

2015-03-10 Thread Xinok via Digitalmars-d-learn
The following code fails to compile because unpredictableSeed is impure: void main() { foreach(i; 0..10) writeln(pureRandom); } pure uint pureRandom() { auto r = Random(unpredictableSeed); return r.front; } However, make unpredictableSeed a

Re: GtkD 3.0-beta

2015-03-10 Thread Mike Wey via Digitalmars-d-announce
On 03/10/2015 09:41 PM, captaindet wrote: GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed Gdk-CRITICAL **: gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)'

Re: Purity not enforced for default arguments?

2015-03-10 Thread safety0ff via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 21:56:39 UTC, Xinok wrote: I'm inclined to believe this is a bug. https://issues.dlang.org/show_bug.cgi?id=11048

Re: Parallelization of a large array

2015-03-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 22:11:57 UTC, Dennis Ritchie wrote: No, it does not suit me, because of the parallel array in a foreach loop there is no break. I already understood everything: found = true;

Re: Parallelization of a large array

2015-03-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 21:27:42 UTC, Dennis Ritchie wrote: Thanks. No, it does not suit me, because of the parallel array in a foreach loop there is no break. import std.stdio; import std.algorithm; import std.parallelism; void main() { int b = 2; auto a = [1, 2, 2,

Re: Parallelization of a large array

2015-03-10 Thread anonymous via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 20:41:14 UTC, Dennis Ritchie wrote: Hi. How to parallelize a large array to check for the presence of an element matching the value with the data? std.stdio; std.algorithm; std.parallelism; You forgot a couple imports here. void main() { int[] a =

Re: Standard GUI framework inspired by Qt

2015-03-10 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 10 March 2015 at 20:24:04 UTC, karl wrote: Good for you then. Sucks to be _everyone_ else using this planned toolkit which is riding on the GL-is-vital-for GUI hypetrain, eh? Google just dropped X11 from ChromeOS and replaced it with EGL/OpenGL.

Re: expand variadic template parameters

2015-03-10 Thread Meta via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 19:11:22 UTC, André wrote: Hi, in this minified example I try to expand the variadic parmaters of foo to bar: import std.typecons; void foo(T ...)(T args) { bar(args.expand); } void bar(int i, string s){} void main() { foo(1, a); } I got the

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 --- Comment #17 from Dicebot pub...@dicebot.lv --- Also, please, can we discuss the final switch / enum operation issue somewhere else? It is unrelated and only makes more difficult to follow relevant discussion. --

[Issue 13681] @safe empty writeln

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13681 --- Comment #1 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/e601077b8618c595fa51807a85c54f8c4e32ca9a make 0-arg writeln

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 --- Comment #16 from Dicebot pub...@dicebot.lv --- (In reply to Kenji Hara from comment #8) (In reply to Dicebot from comment #7) unless it compromises program correctness (memory corruption, wrong codegen etc). In 2.066 and earlier, the

Re: Purity not enforced for default arguments?

2015-03-10 Thread Xinok via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 22:00:29 UTC, safety0ff wrote: On Tuesday, 10 March 2015 at 21:56:39 UTC, Xinok wrote: I'm inclined to believe this is a bug. https://issues.dlang.org/show_bug.cgi?id=11048 Thanks for the link, and I didn't mean to post this in D.learn. .

Re: Parallelization of a large array

2015-03-10 Thread Meta via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 22:11:57 UTC, Dennis Ritchie wrote: On Tuesday, 10 March 2015 at 21:27:42 UTC, Dennis Ritchie wrote: Thanks. No, it does not suit me, because of the parallel array in a foreach loop there is no break. import std.stdio; import std.algorithm; import

Re: Parallelization of a large array

2015-03-10 Thread Ali Çehreli via Digitalmars-d-learn
On 03/10/2015 01:41 PM, Dennis Ritchie wrote: Hi. How to parallelize a large array to check for the presence of an element matching the value with the data? std.stdio; std.algorithm; std.parallelism; void main() { int[] a = new int[100]; foreach (i, ref elem; a) elem =

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 --- Comment #18 from Ali Cehreli acehr...@yahoo.com --- I think this boils down to whether an enum's conversion to its base type is an implicit cast (an rvalue), versus the enum itself (an lvalue). (Steven says it's the latter.) Also, does anyone

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 --- Comment #19 from Dicebot pub...@dicebot.lv --- (In reply to Ali Cehreli from comment #18) I think this boils down to whether an enum's conversion to its base type is an implicit cast (an rvalue), versus the enum itself (an lvalue). (Steven

Re: Proposal : aggregated dlang git repository

2015-03-10 Thread Dicebot via Digitalmars-d
On Tuesday, 10 March 2015 at 20:28:10 UTC, Andrei Alexandrescu wrote: So what happened with this? Ping @ Dicebot -- Andrei Discussion mostly stalled with me and Vladimir having different estimate of trafe-off between keeping submodules on latest HEAD as opposed to only bumping those for

Re: Parallelization of a large array

2015-03-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 22:43:08 UTC, Ali Çehreli wrote: The following is the program that does NOT use taskPool.map. I am also changing the name of a variable because the local 'chunks' looked like std.range.chunks. import std.stdio; import std.algorithm; import std.parallelism; import

Re: GtkD 3.0-beta

2015-03-10 Thread jollie via Digitalmars-d-announce
On Tue, 10 Mar 2015 15:41:54 -0500, captaindet wrote: thanks a lot, jollie, for the detailed description. i tried as advised, the shell output was a bit different than in your example, i guess because i installed the 32 bit version and your example was probably for 64bit. I have been using

New package behaviour in 2.067

2015-03-10 Thread Namespace via Digitalmars-d-learn
I'm unsure, but I think this code should work: module A.B.Foo; import core.stdc.stdio : printf; struct Foo { package(A) void foo() { printf(Hallo\n); } } package(A) void bar() { printf(Hallo\n); } and module A.C.Bar; import A.B.Foo; void main() { Foo f;

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

2015-03-10 Thread via Digitalmars-d
On Monday, 9 March 2015 at 19:23:10 UTC, Nick Sabalausky wrote: Well, the problem with polyfill is that it defeats the whole point. Pretty much anything can *already* be done via cross-browser JS libs. But some things have no justification for requiring ANY of the bloat or bother of JS - hence

Re: Parallelization of a large array

2015-03-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 22:34:34 UTC, Ali Çehreli wrote: It is possible by accessing the actual range by chunks: import std.stdio; import std.algorithm; import std.parallelism; import std.range; import std.conv; void main() { const size_t elementCount = 895640; int[] a =

Re: Parallelization of a large array

2015-03-10 Thread Ali Çehreli via Digitalmars-d-learn
On 03/10/2015 03:16 PM, Meta wrote: Just add a condition variable. import std.stdio; import std.algorithm; import std.parallelism; void main() { int b = 2; auto a = [1, 2, 2, 3]; if (find(a, b).length != 0) writeln(Yes_); auto found = false;

Re: DIP75 - Release Process

2015-03-10 Thread Andrei Alexandrescu via Digitalmars-d
On 3/6/15 8:54 PM, David Soria Parra wrote: Hi, I've been working with Martin Nowak and Andrei in the last few weeks to get ideas and write up a DIP on D's release process. With D maturing more and more I believe it is time to formalize the release process and do a time based release process in

Re: Parallelization of a large array

2015-03-10 Thread Ali Çehreli via Digitalmars-d-learn
On 03/10/2015 03:34 PM, Ali Çehreli wrote: It is possible by accessing the actual range by chunks: Sorry, I posted a jumbled program that does not compile. The following is the program that does NOT use taskPool.map. I am also changing the name of a variable because the local 'chunks' looked

Re: Standard GUI framework inspired by Qt

2015-03-10 Thread via Digitalmars-d
On Tuesday, 10 March 2015 at 21:17:02 UTC, Paulo Pinto wrote: On Tuesday, 10 March 2015 at 20:24:04 UTC, karl wrote: Good for you then. Sucks to be _everyone_ else using this planned toolkit which is riding on the GL-is-vital-for GUI hypetrain, eh? Google just dropped X11 from ChromeOS and

Re: Standard GUI framework inspired by Qt

2015-03-10 Thread via Digitalmars-d
On Tuesday, 10 March 2015 at 20:24:04 UTC, karl wrote: Good for you then. Sucks to be _everyone_ else using this planned toolkit which is riding on the GL-is-vital-for GUI hypetrain, eh? You are the one that suggested distance fields ;-)... Which actually is what I want to, but not only for

[Issue 14274] New: tools/update.sh must install and use dmd 2.066.1 if not present

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14274 Issue ID: 14274 Summary: tools/update.sh must install and use dmd 2.066.1 if not present Product: D Version: D2 Hardware: x86 OS: Mac OS X Status:

Re: How does laziness and UFCS interact?

2015-03-10 Thread via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 17:42:37 UTC, Ali Çehreli wrote: You are right again. :) However, putting the lazy-taking function outside the whole expression makes it visible right away, making easy for me to realize that the execution order may be different from common chains. lazy aka named

Re: What Features Should A GUI toolkit have?

2015-03-10 Thread Kagamin via Digitalmars-d
On Monday, 9 March 2015 at 08:13:47 UTC, Ola Fosheim Grøstad wrote: Flexibility is also important for creating good UIs. Complex applications never reuse much from existing GUIs, they create their own for all the critical tasks. They still mostly rely on existing functionality, and I wouldn't

Re: 2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 10, 2015 08:19:27 Meta via Digitalmars-d-learn wrote: On Tuesday, 10 March 2015 at 07:04:48 UTC, Andre wrote: Hi, following coding raises a compiler error with the beta of 2.067. Is this error intended or not? It is working if I change first line of main to: ulong

Re: This Week in D #8: ddmd progressing, moving toward release.

2015-03-10 Thread ponce via Digitalmars-d-announce
On Monday, 9 March 2015 at 22:29:42 UTC, amber wrote: On Monday, 9 March 2015 at 13:33:16 UTC, Adam D. Ruppe wrote: On Monday, 9 March 2015 at 07:08:42 UTC, Dominikus Dittes Scherkl wrote: Nice, but I'm missing the tip of the week (also with issue #7). Already out of ideas? I ran out of my

Re: 2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Meta via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 07:04:48 UTC, Andre wrote: Hi, following coding raises a compiler error with the beta of 2.067. Is this error intended or not? It is working if I change first line of main to: ulong bits; enum Bits: ulong { none = 0 } bool hasBit(ref ulong rBits, ulong

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

2015-03-10 Thread Kagamin via Digitalmars-d
On Tuesday, 10 March 2015 at 05:08:53 UTC, Dicebot wrote: Hate when websites do things like that. I will take JS any time over it. It has become slightly better with same origin policy but generally if website has iframe most likely it either looks horribly out of style or is abused for

[Issue 14269] New: Enum is not implicitly converted to base type

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 Issue ID: 14269 Summary: Enum is not implicitly converted to base type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: std.stdio.writeln

2015-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, March 09, 2015 22:29:23 Meta via Digitalmars-d-learn wrote: On Monday, 9 March 2015 at 22:00:46 UTC, ketmar wrote: i remember that deprecation was rejected. maybe this is false memory, though. btw, there are legit uses of comma, in c-style `for`, for example. this should

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 10, 2015 07:24:52 Andre via Digitalmars-d-learn wrote: Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought the std.algorithm.sort method is used in this example? void main() { import std.algorithm: sort, uniq,

Re: string-int[] array

2015-03-10 Thread Kagamin via Digitalmars-d-learn
On Sunday, 8 March 2015 at 21:41:44 UTC, FG wrote: Except that with this solution you will confuse empty strings with ints. The idea was to only make it memory-safe without union.

Re: std.stdio.writeln

2015-03-10 Thread ketmar via Digitalmars-d-learn
On Tue, 10 Mar 2015 01:31:39 -0700, Jonathan M Davis via Digitalmars-d-learn wrote: it's the sort of thing that could easily be decided and then not actually happen for ages (e.g. it was decided years ago that delete would be deprecated, but it still isn't). sometimes i'm irritated by this,

[Issue 14269] Enum is not implicitly converted to base type

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 Orvid King blah38...@gmail.com changed: What|Removed |Added CC||blah38...@gmail.com ---

Re: 2.067 Beta: Behavior of enum and ref changed

2015-03-10 Thread Meta via Digitalmars-d-learn
On Tuesday, 10 March 2015 at 08:37:46 UTC, Jonathan M Davis wrote: It's the base type that isn't implicitly convertible to the enum type. Err, yes. I had that the wrong way around. Anyway, I filed an issue. https://issues.dlang.org/show_bug.cgi?id=14269

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 monkeywork...@hotmail.com changed: What|Removed |Added Summary|Enum is not implicitly |Enum is not implicitly

[Issue 14269] Enum is not implicitly converted to base type when using ref

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14269 --- Comment #2 from monkeywork...@hotmail.com --- According to Jonathan Davis it should not compile, as there are no implicit conversions with ref. It *is* a regression in behaviour, though. --

Re: This Week in D #8: ddmd progressing, moving toward release.

2015-03-10 Thread wobbles via Digitalmars-d-announce
On Tuesday, 10 March 2015 at 08:06:18 UTC, ponce wrote: On Monday, 9 March 2015 at 22:29:42 UTC, amber wrote: On Monday, 9 March 2015 at 13:33:16 UTC, Adam D. Ruppe wrote: On Monday, 9 March 2015 at 07:08:42 UTC, Dominikus Dittes Scherkl wrote: Nice, but I'm missing the tip of the week (also

Re: [dmd-internals] DMD now requires a working D compiler to be build

2015-03-10 Thread Andrei Alexandrescu via Digitalmars-d
On 3/8/15 7:49 AM, Vladimir Panteleev wrote: ( Replying to http://forum.dlang.org/post/54fb47b8.5060...@dawg.eu - sorry, can't post to the ML right now ) First step towards self-hosting DDMD compiler. Please update your builds scripts and setups.

Re: New package behaviour in 2.067

2015-03-10 Thread ketmar via Digitalmars-d-learn
On Tue, 10 Mar 2015 23:17:01 +, Namespace wrote: Is this intended? i doubt so. `struct Foo` is definitely `public`, so there shouldn't be any problems with access rights. signature.asc Description: PGP signature

Re: Standard GUI framework inspired by Qt

2015-03-10 Thread ketmar via Digitalmars-d
On Tue, 10 Mar 2015 21:17:01 +, Paulo Pinto wrote: Google just dropped X11 from ChromeOS and replaced it with EGL/OpenGL. that's 'cause they don't need the whole power of X11. most of the tasks there are done by html rendering engine (and done badly, 'cause using HTML for GUIs sux), so

Re: Proposal : aggregated dlang git repository

2015-03-10 Thread Andrei Alexandrescu via Digitalmars-d
On 3/10/15 3:59 PM, Dicebot wrote: On Tuesday, 10 March 2015 at 20:28:10 UTC, Andrei Alexandrescu wrote: So what happened with this? Ping @ Dicebot -- Andrei Discussion mostly stalled with me and Vladimir having different estimate of trafe-off between keeping submodules on latest HEAD as

chaining splitters

2015-03-10 Thread dnoob via Digitalmars-d-learn
Hello, I am parsing some text and I have the following; string text = some very long text; foreach(line; splitter(text, [13, 10])) { foreach(record; splitter(line, '*')) { foreach(field; splitter(record, '=')) {

Re: [dmd-internals] DMD now requires a working D compiler to be build

2015-03-10 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:mdnvct$1avc$1...@digitalmars.com... I think that's 2.066.1, right? 2.066.1 is enough to build idgen.d, but it can't build ddmd on all platforms. Among other things, the varargs fixes are missing.

[Issue 11530] need gdb test suite

2015-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11530 Martin Nowak c...@dawg.eu changed: What|Removed |Added Summary|need gdb dwarf test suite |need gdb test suite --

<    1   2