Re: A very interesting slide deck comparing sync and async IO

2016-03-04 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 4 March 2016 at 23:26:02 UTC, Chris Wright wrote: You can get that control by interacting with the scheduler. Thread schedulers tend to be in the kernel and fiber schedulers tend to be in userspace, so as a practical matter, it should be easier to get that control with fibers. But

Re: Unable to instantiate template with same name as function

2016-03-04 Thread Shriramana Sharma via Digitalmars-d-learn
@AliCehreli: you may consider including Jonathan's trick in your book in the para above this heading: http://ddili.org/ders/d.en/const_and_immutable.html#ix_const_and_immutable.variable, %20immutable Jonathan M Davis via Digitalmars-d-learn wrote: > yes, having > > enum s = ta("s)"; > > and

Re: Unable to instantiate template with same name as function

2016-03-04 Thread Shriramana Sharma via Digitalmars-d-learn
ag0aep6g wrote: > On 03.03.2016 07:12, Shriramana Sharma wrote: >> string ta(string s) { return s ~ "1"; } >> template ta(string s) { enum ta = ta(s); } > > In `ta(s)` here, `ta` is the enum itself again. It's similar to `int x = > x;`. Can't do that, of course. > > Add a leading dot to refer

Re: Good project: stride() with constant stride value

2016-03-04 Thread Jonathan M Davis via Digitalmars-d
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu wrote: Currently we have a very useful stride() function that allows spanning a random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3. I've run some measurements recently and it turns out a compile-time-known

Re: efficient and safe way to iterate on associative array?

2016-03-04 Thread aki via Digitalmars-d-learn
On Friday, 4 March 2016 at 16:46:35 UTC, Steven Schveighoffer wrote: You cannot add or remove keys. You can modify values for existing keys. Note, in your code, this would not cause a problem, since setting hash to null just removes the reference from the local variable 'hash', it does not

Re: Good project: stride() with constant stride value

2016-03-04 Thread John Colvin via Digitalmars-d
On Friday, 4 March 2016 at 23:33:40 UTC, Andrei Alexandrescu wrote: On 03/04/2016 04:19 PM, H. S. Teoh via Digitalmars-d wrote: Why not rather improve dmd optimization, so that such manual optimizations are no longer necessary? As I mentioned, optimizing the use of stride in large

Re: Unable to instantiate template with same name as function

2016-03-04 Thread Shriramana Sharma via Digitalmars-d-learn
cym13 wrote: > Note that parentheses are optional when no argument is provided. Yes I know that but the point is I expected the compiler to identify ta!"string" to refer to a different symbol than ta("string") where the one is obviously a template and the other is obviously a function call.

[Issue 15764] Name lookup within (eponymous?) template doesn't check outside the template

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15764 Shriramana Sharma changed: What|Removed |Added Summary|Name of template cannot |Name lookup within

[Issue 15764] New: Name of template cannot

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15764 Issue ID: 15764 Summary: Name of template cannot Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1

[Issue 15761] Windows wide character console output broken with MS runtime

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15761 --- Comment #1 from Martin Krejcirik --- OK, after some experimenting, at looks like even UTF8 has serious problems (ErrnoException from Phobos), is it really so much broken on Windows ? --

Re: Waste of computing resources in pull requests that only change the ddoc

2016-03-04 Thread Brad Roberts via Digitalmars-d
It wouldn't be very difficult to add an "ignore me please" sort of flag on pull requests, but ignoring the ddoc only change subset of pulls would only have a minor overall impact on tester coverage. By _far_, the bigger issue is the number of open pull requests as a whole. There's currently

Re: D thinks it is OK to mess around with TypeInfo

2016-03-04 Thread Rikki Cattermole via Digitalmars-d-learn
On 05/03/16 10:35 AM, Yuxuan Shui wrote: For example struct A{} @safe void main(){ import std.stdio; A a, b; auto y = typeid(a); y.name = "Nope, I'm not A"; auto x = typeid(b); writeln(x); } Make changes to TypeInfo will affect all the future typeid() results! And

[Issue 15763] New: std.math.approxEqual is not symmetric

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15763 Issue ID: 15763 Summary: std.math.approxEqual is not symmetric Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1

Re: I guess this is good GSOC 2016 news?

2016-03-04 Thread Craig Dillabaugh via Digitalmars-d
On Monday, 29 February 2016 at 21:33:47 UTC, Wyatt wrote: On Monday, 29 February 2016 at 21:22:44 UTC, Jonas Drewsen wrote: https://summerofcode.withgoogle.com/organizations/?sp-category=languages Yes, that IS great news! Though it doesn't seem to say how many slots were given? Craig, any

[Issue 15762] New: Array casts involving const enums can be made @safe

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15762 Issue ID: 15762 Summary: Array casts involving const enums can be made @safe Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor

Re: std.database

2016-03-04 Thread Erik Smith via Digitalmars-d
On Friday, 4 March 2016 at 22:44:24 UTC, Sebastiaan Koppe wrote: On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote: auto db = createDatabase("file:///testdb"); auto rowSet = db.connection().statement("select name,score from score").execute; foreach (r; rowSet)

Re: Good project: stride() with constant stride value

2016-03-04 Thread Andrei Alexandrescu via Digitalmars-d
On 03/04/2016 04:19 PM, Meta wrote: On Friday, 4 March 2016 at 20:14:41 UTC, Andrei Alexandrescu wrote: This is just speculation. When the stride is passed to larger functions the value of the stride is long lost. I understand the desire for nice and simple code but sadly the stdlib is not a

Re: Good project: stride() with constant stride value

2016-03-04 Thread Andrei Alexandrescu via Digitalmars-d
On 03/04/2016 04:19 PM, H. S. Teoh via Digitalmars-d wrote: Why not rather improve dmd optimization, so that such manual optimizations are no longer necessary? As I mentioned, optimizing the use of stride in large (non-inlined) functions is a tall order. -- Andrei

Re: Good project: stride() with constant stride value

2016-03-04 Thread Andrei Alexandrescu via Digitalmars-d
On 03/04/2016 04:32 PM, Jonathan M Davis wrote: IMHO, it would be cleaner to make them separate templates so that we don't have to give some special meaning to step == 0. And if it made sense for them to share their implementation, we could still have a helper template that did the step == 0 so

Re: A very interesting slide deck comparing sync and async IO

2016-03-04 Thread Chris Wright via Digitalmars-d
On Fri, 04 Mar 2016 22:22:48 +, Ola Fosheim Grøstad wrote: > On Friday, 4 March 2016 at 03:14:01 UTC, Ali Çehreli wrote:. >> And that's exactly one of the benefits of fibers: two workers ping pong >> back and forth, without much risk of losing their cached data. >> >> Is my assumption

Re: A very interesting slide deck comparing sync and async IO

2016-03-04 Thread deadalnix via Digitalmars-d
On Friday, 4 March 2016 at 22:22:48 UTC, Ola Fosheim Grøstad wrote: On Friday, 4 March 2016 at 03:14:01 UTC, Ali Çehreli wrote:. And that's exactly one of the benefits of fibers: two workers ping pong back and forth, without much risk of losing their cached data. Is my assumption correct?

[Issue 15639] std.experimental.allocator enables abstract class instantiation

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15639 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 15639] std.experimental.allocator enables abstract class instantiation

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15639 --- 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/175b9129a0293667371027fa68b85d9e7c78754e fixed issue 15639

Re: std.database

2016-03-04 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote: auto db = createDatabase("file:///testdb"); auto rowSet = db.connection().statement("select name,score from score").execute; foreach (r; rowSet) writeln(r[0].as!string,",",r[1].as!int); You'll want to have some types in

Re: A very interesting slide deck comparing sync and async IO

2016-03-04 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 4 March 2016 at 03:14:01 UTC, Ali Çehreli wrote:. And that's exactly one of the benefits of fibers: two workers ping pong back and forth, without much risk of losing their cached data. Is my assumption correct? Not if it is hyper-threaded, as pairs of threads are sharing

[Issue 15761] New: Windows wide character console output broken with MS runtime

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15761 Issue ID: 15761 Summary: Windows wide character console output broken with MS runtime Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW

D thinks it is OK to mess around with TypeInfo

2016-03-04 Thread Yuxuan Shui via Digitalmars-d-learn
For example struct A{} @safe void main(){ import std.stdio; A a, b; auto y = typeid(a); y.name = "Nope, I'm not A"; auto x = typeid(b); writeln(x); } Make changes to TypeInfo will affect all the future typeid() results! And D is OK with that?

Re: Is it safe to use 'is' to compare types?

2016-03-04 Thread Yuxuan Shui via Digitalmars-d-learn
On Friday, 4 March 2016 at 15:18:55 UTC, Steven Schveighoffer wrote: On 3/3/16 6:58 PM, Yuxuan Shui wrote: On Thursday, 3 March 2016 at 23:51:16 UTC, Adam D. Ruppe wrote: On Thursday, 3 March 2016 at 23:46:50 UTC, Yuxuan Shui wrote: Will typeid(a) is typeid(b) yield different results than

Re: Good project: stride() with constant stride value

2016-03-04 Thread Jonathan M Davis via Digitalmars-d
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu wrote: Currently we have a very useful stride() function that allows spanning a random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3. I've run some measurements recently and it turns out a compile-time-known

Re: Good project: stride() with constant stride value

2016-03-04 Thread H. S. Teoh via Digitalmars-d
On Fri, Mar 04, 2016 at 08:14:41PM +, Andrei Alexandrescu via Digitalmars-d wrote: > kinke wrote: > > On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote: > >> Surely after inlining (I mean real inlining, not dmd) it makes no > >> difference, a constant is a

Re: Good project: stride() with constant stride value

2016-03-04 Thread Meta via Digitalmars-d
On Friday, 4 March 2016 at 20:14:41 UTC, Andrei Alexandrescu wrote: This is just speculation. When the stride is passed to larger functions the value of the stride is long lost. I understand the desire for nice and simple code but sadly the stdlib is not a good place for it - everything must

Re: std.database

2016-03-04 Thread Piotrek via Digitalmars-d
On Friday, 4 March 2016 at 16:41:35 UTC, Chris Wright wrote: With embedded databases, there's a lot of variety out there, probably a decent selection of tradeoffs, so I'm not sure any one would be appropriate to phobos. The one written from scratch specially for D (I'm talking in general,

Re: std.database

2016-03-04 Thread Erik Smith via Digitalmars-d
On Friday, 4 March 2016 at 16:54:33 UTC, Kagamin wrote: On Thursday, 3 March 2016 at 17:46:02 UTC, Erik Smith wrote: BTW in the oracle driver you use that ODBC idiom of passing strings as pointer+length pairs. Why don't you use it in ODBC driver? That will be fixed in the next push. erik

Re: std.database

2016-03-04 Thread Erik Smith via Digitalmars-d
On Friday, 4 March 2016 at 19:27:47 UTC, Bubbasaur wrote: On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote: auto db = createDatabase("file:///testdb"); auto rowSet = db.connection().statement("select name,score from score").execute; foreach (r; rowSet)

Re: Good project: stride() with constant stride value

2016-03-04 Thread Andrei Alexandrescu via Digitalmars-d
kinke wrote: > On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote: >> Surely after inlining (I mean real inlining, not dmd) it makes >> no difference, a constant is a constant? >> >> I remember doing tests of things like that and finding that not >> only did it not

Re: Good project: stride() with constant stride value

2016-03-04 Thread jmh530 via Digitalmars-d
On Friday, 4 March 2016 at 18:40:58 UTC, kinke wrote: Then let's not complicate Phobos please. I'm really no friend of special semantics for `step == 0` and stuff like that. Let's keep code as readable and simple as possible, especially in the standard libraries, and let the compilers do

[Issue 15760] Segfault when compiling when using __gshared and selective import.

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15760 --- Comment #1 from Christian D --- *bar instead of boo --

[Issue 15760] New: Segfault when compiling when using __gshared and selective import.

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15760 Issue ID: 15760 Summary: Segfault when compiling when using __gshared and selective import. Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: std.database

2016-03-04 Thread Bubbasaur via Digitalmars-d
On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote: auto db = createDatabase("file:///testdb"); auto rowSet = db.connection().statement("select name,score from score").execute; foreach (r; rowSet) writeln(r[0].as!string,",",r[1].as!int); I'll track query as an alternative

Re: std.range: Lockstep vs. Zip

2016-03-04 Thread Seb via Digitalmars-d-learn
On Thursday, 3 March 2016 at 15:00:10 UTC, Alex Parrill wrote: On Wednesday, 2 March 2016 at 08:51:07 UTC, Manuel Maier wrote: Hi there, I was wondering why I should ever prefer std.range.lockstep over std.range.zip. In my (very limited) tests std.range.zip offered the same functionality as

Re: std.database

2016-03-04 Thread Erik Smith via Digitalmars-d
On Friday, 4 March 2016 at 16:43:00 UTC, Kagamin wrote: On Friday, 4 March 2016 at 14:44:48 UTC, Erik Smith wrote: Actually I like this and I think it can work. I'm trying to keep a single execute function name for both row/no-row queries. I can still return the range proxy for no-row queries

Re: Good project: stride() with constant stride value

2016-03-04 Thread kinke via Digitalmars-d
On Friday, 4 March 2016 at 17:49:09 UTC, John Colvin wrote: Surely after inlining (I mean real inlining, not dmd) it makes no difference, a constant is a constant? I remember doing tests of things like that and finding that not only did it not make a difference to performance, ldc produced

std.range.chunks with only an InputRange

2016-03-04 Thread Seb via Digitalmars-d
tl;dr: It would be nice if `chunks` would accept only an InputRange too. Let me show you a common pattern that I often use: We want to iterate over two lines in a pair and compute the difference between them, e.g. ``` 1 2 2 3 ``` => 2 stdin.byLine.map!(x => x.split('

Re: A very interesting slide deck comparing sync and async IO

2016-03-04 Thread deadalnix via Digitalmars-d
On Friday, 4 March 2016 at 03:14:01 UTC, Ali Çehreli wrote: I imagine that lost cache is one of the biggest costs in thread switching. It would be great if a thread could select a thread with something like "I'm done, now please switch to my reader". And that's exactly one of the benefits of

[Issue 6621] Superimposition amount for std.range.chunks

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6621 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 15759] New: chunks should work with only an input range

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15759 Issue ID: 15759 Summary: chunks should work with only an input range Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

[Issue 15758] New: .deb not installing on Ubuntu 15.10 since 2.7x was released.

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15758 Issue ID: 15758 Summary: .deb not installing on Ubuntu 15.10 since 2.7x was released. Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

[Issue 15755] DMD segfault upon alias on alias on __trait(getAttributes, ...)

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15755 ag0ae...@gmail.com changed: What|Removed |Added Keywords||ice CC|

Re: In language tooling

2016-03-04 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 02:36:50 UTC, Charles wrote: is this something that could be accomplished in D with CTFE? I think I've heard him say that tools should be part of the language. However, I haven't watched that video and anyway am not sure how important CTFE would be to this

Re: Good project: stride() with constant stride value

2016-03-04 Thread John Colvin via Digitalmars-d
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu wrote: Currently we have a very useful stride() function that allows spanning a random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3. I've run some measurements recently and it turns out a compile-time-known

Re: Argon: an alternative parser for command-line arguments

2016-03-04 Thread Markus Laker via Digitalmars-d-announce
On Friday, 4 March 2016 at 12:21:25 UTC, Jacob Carlborg wrote: No, I mean a longer description, more like documentation. Look at the help for git when using --help, it has different behavior than -h. The first one is more like a man page. Ah, I see. Sorry for the misunderstanding. An app

[Issue 15757] New: D main is a nested function and cannot be accessed

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15757 Issue ID: 15757 Summary: D main is a nested function and cannot be accessed Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity:

[Issue 12318] Nested structs with only templated methods do not capture context

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12318 John Colvin changed: What|Removed |Added CC|

Re: Good project: stride() with constant stride value

2016-03-04 Thread Seb via Digitalmars-d
On Friday, 4 March 2016 at 16:45:42 UTC, Andrei Alexandrescu wrote: Currently we have a very useful stride() function that allows spanning a random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3. I've run some measurements recently and it turns out a compile-time-known

Re: std.database

2016-03-04 Thread Kagamin via Digitalmars-d
On Thursday, 3 March 2016 at 17:46:02 UTC, Erik Smith wrote: The only leverage I might have is a lot of familiarity working with many of the native C client interfaces and experience implementing higher level interfaces on top. That and is also a lot of existing work to draw on that can

Re: efficient and safe way to iterate on associative array?

2016-03-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/4/16 8:53 AM, aki wrote: Is it okay to modify associative array while iterating it? import std.stdio; void main() { string[string] hash = [ "k1":"v1", "k2":"v2" ]; auto r = hash.byKeyValue(); while(!r.empty) { auto key = r.front.key; auto value =

Good project: stride() with constant stride value

2016-03-04 Thread Andrei Alexandrescu via Digitalmars-d
Currently we have a very useful stride() function that allows spanning a random access range with a specified step, e.g. 0, 3, 6, 9, ... for step 3. I've run some measurements recently and it turns out a compile-time-known stride is a lot faster than a variable. So I was thinking to improve

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 --- Comment #4 from Steven Schveighoffer --- OK, thanks. As I said, 2.071 will have this feature. Sorry the documentation was released too early. --

Re: std.database

2016-03-04 Thread Kagamin via Digitalmars-d
On Friday, 4 March 2016 at 14:44:48 UTC, Erik Smith wrote: Actually I like this and I think it can work. I'm trying to keep a single execute function name for both row/no-row queries. I can still return the range proxy for no-row queries that is either empty or throws on access. Yes, that's

Re: std.database

2016-03-04 Thread Chris Wright via Digitalmars-d
On Fri, 04 Mar 2016 06:16:59 +, Piotrek wrote: > For client-server approach I agree with the above. For embedded design > (as in my project) this is not a case. Which is all I'm saying. Something in std.database sounds like it should allow you to interact with databases, like JDBC. With

Re: State of the Compiler

2016-03-04 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 1 March 2016 at 16:23:37 UTC, Jack Stouffer wrote: If you have more pressure not to not change anything, I think this will have negative consequences. Bad ideas must be removed, and removed as soon as possible, if the language is to thrive. You cannot delete things from a

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 --- Comment #3 from yosik...@altalk.com --- (In reply to Steven Schveighoffer from comment #1) > This is a recent addition. What compiler/version are you using? >dmd --version DMD32 D Compiler v2.070.2 Copyright (c) 1999-2015 by Digital Mars written

Re: efficient and safe way to iterate on associative array?

2016-03-04 Thread Mike Parker via Digitalmars-d-learn
On Friday, 4 March 2016 at 13:53:22 UTC, aki wrote: Is it okay to modify associative array while iterating it? import std.stdio; void main() { string[string] hash = [ "k1":"v1", "k2":"v2" ]; auto r = hash.byKeyValue(); while(!r.empty) { auto key =

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 Steven Schveighoffer changed: What|Removed |Added CC|

[Issue 15285] Range-ified functions for std.string

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15285 --- Comment #5 from Jonathan M Davis --- > So you mean we could add to isSomeString a RangeString? I mean something like if(isInputRange!Range && isSomeChar!(ElementEncodingType!Range) &&

Re: Is it safe to use 'is' to compare types?

2016-03-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/3/16 6:58 PM, Yuxuan Shui wrote: On Thursday, 3 March 2016 at 23:51:16 UTC, Adam D. Ruppe wrote: On Thursday, 3 March 2016 at 23:46:50 UTC, Yuxuan Shui wrote: Will typeid(a) is typeid(b) yield different results than typeid(a) == typeid(b)? No. Indeed, opEquals on TypeInfo just calls is

Re: efficient and safe way to iterate on associative array?

2016-03-04 Thread JR via Digitalmars-d-learn
On Friday, 4 March 2016 at 14:16:55 UTC, Minas Mina wrote: On Friday, 4 March 2016 at 13:53:22 UTC, aki wrote: I think what you can do is extract its contents to an array, iterate it and modify it as you like, and then insert back to another associative array. I don't think it's efficient but

Re: Why don't you use the Github issue system?

2016-03-04 Thread Dejan Lekic via Digitalmars-d
On Wednesday, 2 March 2016 at 23:59:49 UTC, Seb wrote: Hey, I am just curious whether you have already considered moving from Bugzilla to the Github issue system and where your current opinion is. GitHub issues is okay for one-man projects or small teams that do not want to bother much

Re: std.database

2016-03-04 Thread Erik Smith via Digitalmars-d
On Friday, 4 March 2016 at 11:57:49 UTC, Kagamin wrote: On Thursday, 3 March 2016 at 18:08:26 UTC, Erik Smith wrote: db.execute("select from t").reader; //row range db.execute("select from t").get!long; //scalar db.execute("select from t"); //non-query More good options (the 3rd one is

Re: efficient and safe way to iterate on associative array?

2016-03-04 Thread Minas Mina via Digitalmars-d-learn
On Friday, 4 March 2016 at 13:53:22 UTC, aki wrote: Is it okay to modify associative array while iterating it? import std.stdio; void main() { string[string] hash = [ "k1":"v1", "k2":"v2" ]; auto r = hash.byKeyValue(); while(!r.empty) { auto key =

[Issue 15756] New: reading wrong address for alias in nested struct instance

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15756 Issue ID: 15756 Summary: reading wrong address for alias in nested struct instance Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 6974] [AA] Associative array with enum array keys is slow

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6974 Cédric Picard changed: What|Removed |Added CC|

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 Cédric Picard changed: What|Removed |Added CC|

efficient and safe way to iterate on associative array?

2016-03-04 Thread aki via Digitalmars-d-learn
Is it okay to modify associative array while iterating it? import std.stdio; void main() { string[string] hash = [ "k1":"v1", "k2":"v2" ]; auto r = hash.byKeyValue(); while(!r.empty) { auto key = r.front.key; auto value = r.front.value;

[Issue 15755] DMD segfault upon alias on alias on __trait(getAttributes, ...)

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15755 Ketmar Dark changed: What|Removed |Added CC|

[Issue 15285] Range-ified functions for std.string

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15285 --- Comment #4 from greenify --- Hey I had a look at what types does functions allow: abbrev string[] capitalize isSomeString isNumeric isSomeString inPattern isSomeString munch isSomeString

[Issue 15742] parseJSON does not work at compile time for JSON input with object of object or array of array

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15742 Tomoya Tanjo changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15755] New: DMD segfault upon alias on alias on __trait(getAttributes, ...)

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15755 Issue ID: 15755 Summary: DMD segfault upon alias on alias on __trait(getAttributes, ...) Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: Great new website

2016-03-04 Thread BBasile via Digitalmars-d
On Friday, 4 March 2016 at 10:43:27 UTC, Joakim wrote: The redesign got a decent amount of votes on reddit, makes sense: https://www.reddit.com/domain/dlang.org/top/?sort=top=year I wonder when they'll get around to adding tags to reddit, maybe by 2030? :D Oh well, at least they have that

[Issue 15726] [REG2.068.0] forward reference error for circular classes, RefCounted

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15726 Kenji Hara changed: What|Removed |Added Hardware|x86 |All

[Issue 15754] New: can access alias from instance but not from type

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15754 Issue ID: 15754 Summary: can access alias from instance but not from type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major

Re: Great new website

2016-03-04 Thread Charles via Digitalmars-d
On Friday, 4 March 2016 at 10:43:27 UTC, Joakim wrote: I wonder what percentage of traffic is now mobile? I know I only use mobile these days, ie I haven't used a "desktop" browser since late last year (though my 8.4" tablet that I use most of the time has 4 million pixels, more than most

[Issue 15753] clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 yosik...@altalk.com changed: What|Removed |Added CC||yosik...@altalk.com --

[Issue 15753] New: clear method for AA not work

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15753 Issue ID: 15753 Summary: clear method for AA not work Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor Priority: P1

[Issue 14660] std.range.choose() is not CTFE'able

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14660 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

Re: In language tooling

2016-03-04 Thread Charles via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 03:41:57 UTC, sigod wrote: Very interesting. I wonder what Walter would say about it. Yeah, I'm curious what others' thoughts on it are for sure.

[Issue 6400] opDispatch with WithStatement

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6400 John Colvin changed: What|Removed |Added CC|

[Issue 15285] Range-ified functions for std.string

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15285 Jonathan M Davis changed: What|Removed |Added CC|

[Issue 15285] Range-ified functions for std.string

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15285 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

Re: Argon: an alternative parser for command-line arguments

2016-03-04 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-03-03 21:55, Markus Laker wrote: Yes. You can give an option a description, like this: // ... uint nr_doors; // ... Named("doors", nr_doors, 0) ("number of doors").AddRange(1, 4); If you do this, the user has a nice, short name to type: --doors 2 But the description will be used in

[Issue 10777] std.algorithm.multiSort to return a std.range.SortedRange

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10777 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 12562] std.algorithm.mul

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12562 greenify changed: What|Removed |Added CC||greeen...@gmail.com --

Re: State of the Compiler

2016-03-04 Thread Kagamin via Digitalmars-d
On Friday, 4 March 2016 at 10:56:47 UTC, Seb wrote: I __really like___ Mozilla's Contributing guide, especially because they have three categories (Good first bugs [7], mentored bugs [8], student projects [9]). SDC and LDC do something like that:

Re: std.database

2016-03-04 Thread Kagamin via Digitalmars-d
On Thursday, 3 March 2016 at 18:08:26 UTC, Erik Smith wrote: db.execute("select from t").reader; //row range db.execute("select from t").get!long; //scalar db.execute("select from t"); //non-query More good options (the 3rd one is there). Also at the value access level there are several

[Issue 12141] std.algorithm: implement deterministic topN

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12141 greenify changed: What|Removed |Added CC||greeen...@gmail.com --

[Issue 15520] Phobos Pull Requests Should Have Automatic Coverage Statistics

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15520 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 6192] std.algorithm.sort performance

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6192 greenify changed: What|Removed |Added CC||greeen...@gmail.com --

[Issue 12062] std.range.flatten

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12062 greenify changed: What|Removed |Added CC||greeen...@gmail.com --

[Issue 14478] isInputRange failed to recognize some ranges

2016-03-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14478 greenify changed: What|Removed |Added CC||greeen...@gmail.com --

  1   2   >