[Issue 15849] New: change in std.ui test leads to magic linking error for d_do_test

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15849 Issue ID: 15849 Summary: change in std.ui test leads to magic linking error for d_do_test Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: char array weirdness

2016-03-29 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 29, 2016 at 08:05:29PM -0400, Steven Schveighoffer via Digitalmars-d-learn wrote: [...] > Phobos treats narrow strings (wchar[], char[]) as ranges of dchar. It > was discovered that auto decoding strings isn't always the smartest > thing to do, especially for performance. > > So you

Re: char array weirdness

2016-03-29 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Mar 30, 2016 at 03:22:48AM +, Jack Stouffer via Digitalmars-d-learn wrote: > On Tuesday, 29 March 2016 at 23:42:07 UTC, H. S. Teoh wrote: > >Believe it or not, it was only last year (IIRC, maybe the year > >before) that Walter "discovered" that Phobos does autodecoding, and > >got

[Issue 15179] Local imports cause outer imports to be excluded from overload set

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15179 --- Comment #8 from Jesse Phillips --- (In reply to Steven Schveighoffer from comment #7) > (In reply to Jesse Phillips from comment #6) > > That doesn't solve the highjacking, Walter has made a big point about D's > >

Re: char array weirdness

2016-03-29 Thread Jack Stouffer via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 23:42:07 UTC, H. S. Teoh wrote: Believe it or not, it was only last year (IIRC, maybe the year before) that Walter "discovered" that Phobos does autodecoding, and got pretty upset over it. If even Walter wasn't aware of this for that long... The link (I think

Re: Blog article on new import changes

2016-03-29 Thread xenon325 via Digitalmars-d-announce
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first ever) on this, let me know what

Re: Part of D available to run at compile time

2016-03-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/03/2016 11:29 AM, Carl Sturtivant wrote: is there documentation on which parts of D are available to compile time execution? Rule of thumb, if it can be pure and @safe, you're good to go.

Re: I need some help benchmarking SoA vs AoS

2016-03-29 Thread maik klein via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 21:27:15 UTC, ZombineDev wrote: On Saturday, 26 March 2016 at 17:43:48 UTC, maik klein wrote: On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote: On 26.03.2016 18:04, ag0aep6g wrote: https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions PS:

Re: key in aa.keys, but aa[key] give range violation?

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2016 05:29 PM, Yuxuan Shui wrote: On Wednesday, 30 March 2016 at 00:26:49 UTC, Yuxuan Shui wrote: My code looks something like this: bool[ulong][ulong] edge; foreach(u; from) foreach(v; to_) edge[u][v] = true; foreach(u; edge.keys) { auto adj = edge[u]; // }

Re: key in aa.keys, but aa[key] give range violation?

2016-03-29 Thread Yuxuan Shui via Digitalmars-d-learn
On Wednesday, 30 March 2016 at 00:26:49 UTC, Yuxuan Shui wrote: My code looks something like this: bool[ulong][ulong] edge; foreach(u; from) foreach(v; to_) edge[u][v] = true; foreach(u; edge.keys) { auto adj = edge[u]; // } And sometimes edge[u] would give Range

Re: char array weirdness

2016-03-29 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 30 March 2016 at 00:05:29 UTC, Steven Schveighoffer wrote: On 3/29/16 7:42 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via Digitalmars-d-learn wrote: On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote: void main ()

key in aa.keys, but aa[key] give range violation?

2016-03-29 Thread Yuxuan Shui via Digitalmars-d-learn
My code looks something like this: bool[ulong][ulong] edge; foreach(u; from) foreach(v; to_) edge[u][v] = true; foreach(u; edge.keys) { auto adj = edge[u]; // } And sometimes edge[u] would give Range violation error.

Re: char array weirdness

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/29/16 7:42 PM, H. S. Teoh via Digitalmars-d-learn wrote: On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via Digitalmars-d-learn wrote: On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote: void main () { import std.range.primitives; char[] val = ['1', '0', 'h', '3',

Re: Categorization of warnings

2016-03-29 Thread tsbockman via Digitalmars-d
On Monday, 28 March 2016 at 16:21:15 UTC, Johan Engelen wrote: I just submitted a PR [1] that catagorizes warnings, such that you can do something like this: dmd -w -Wno-not-reachable which would error on any warning except the "statement not reachable" warnings (it completely disables that

Re: debugger blues

2016-03-29 Thread Marco Leise via Digitalmars-d
Am Mon, 28 Mar 2016 19:29:38 + schrieb cy : > On Sunday, 27 March 2016 at 15:40:47 UTC, Marco Leise wrote: > > Is it just me? I've never heard of a programming environment, > > let alone a system programming language providing that > > information. > > Well, not by

Re: char array weirdness

2016-03-29 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Mar 29, 2016 at 11:15:26PM +, Basile B. via Digitalmars-d-learn wrote: > On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote: > >void main () { > >import std.range.primitives; > >char[] val = ['1', '0', 'h', '3', '6', 'm', '2', '8', 's']; > >pragma(msg,

Debugging D DLL from C# app with C linkage for native Unity 5 plugin

2016-03-29 Thread Thalamus via Digitalmars-d-learn
Apologies if this has been discussed before, but I wasn't able to find anything similar on the forums or web. I can't seem to figure out how to debug a D DLL from a C# EXE. (My actual purpose here is to use D to build native plugins for Unity 5, but Unity and Mono aren't necessary to repro the

Re: char array weirdness

2016-03-29 Thread Jack Stouffer via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 23:15:26 UTC, Basile B. wrote: I've seen you so many time as a reviewer on dlang that I belive this Q is a joke. Even if obviously nobody can know everything... https://www.youtube.com/watch?v=l97MxTx0nzs seriously you didn't know that auto decoding is on and that

Re: char array weirdness

2016-03-29 Thread Basile B. via Digitalmars-d-learn
On Monday, 28 March 2016 at 22:34:31 UTC, Jack Stouffer wrote: void main () { import std.range.primitives; char[] val = ['1', '0', 'h', '3', '6', 'm', '2', '8', 's']; pragma(msg, ElementEncodingType!(typeof(val))); pragma(msg, typeof(val.front)); } prints char dchar

Re: How to be more careful about null pointers?

2016-03-29 Thread QAston via Digitalmars-d-learn
On Monday, 28 March 2016 at 21:01:19 UTC, cy wrote: I finally found the null pointer. It took a week. I was assigning "db = db" when I should have been assigning "this.db = db". Terrible, I know. But... I invoked db.find_chapter.bindAll(8,4), when db was a null pointer. There was no null

Re: Part of D available to run at compile time

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2016 03:29 PM, Carl Sturtivant wrote: is there documentation on which parts of D are available to compile time execution? This seems to be the official spec: https://dlang.org/spec/function.html#interpretation See you at DConf! ;) Ali

Part of D available to run at compile time

2016-03-29 Thread Carl Sturtivant via Digitalmars-d-learn
is there documentation on which parts of D are available to compile time execution?

Re: char array weirdness

2016-03-29 Thread Marco Leise via Digitalmars-d-learn
Am Mon, 28 Mar 2016 16:29:50 -0700 schrieb "H. S. Teoh via Digitalmars-d-learn" : > […] your diacritics may get randomly reattached to > stuff they weren't originally attached to, or you may end up with wrong > sequences of Unicode code points (e.g. diacritics

[Issue 15839] this.outer is of wrong type

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15839 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #6

[Issue 15500] default construction disabled for struct constructor with default arguments

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15500 Martin Nowak changed: What|Removed |Added CC||wiko...@gmail.com --- Comment

[Issue 15551] default construction disabled with default arguments

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15551 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 15845] Windows console cannot read properly UTF-8 lines

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15845 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #2 from

Re: Joining AliasSeq/TypeTuple s

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2016 02:33 AM, Voitech wrote: Hi, i want to join two or more tupples in to one, with mixing the indexes like roundRobin but in compile time. unittest{ import std.meta; alias first=AliasSeq!(int, string,bool); alias second=AliasSeq!("abc","def","ghi"); alias third=... static

Re: I need some help benchmarking SoA vs AoS

2016-03-29 Thread ZombineDev via Digitalmars-d-learn
On Saturday, 26 March 2016 at 17:43:48 UTC, maik klein wrote: On Saturday, 26 March 2016 at 17:06:39 UTC, ag0aep6g wrote: On 26.03.2016 18:04, ag0aep6g wrote: https://gist.github.com/aG0aep6G/a1b87df1ac5930870ffe/revisions PS: Those enforces are for a size of 100_000 not 1_000_000, because

Re: How to be more careful about null pointers?

2016-03-29 Thread Marco Leise via Digitalmars-d-learn
Am Tue, 29 Mar 2016 06:00:32 + schrieb cy : > struct Database { >string derp; >Statement prepare(string s) { > return Statement(1234); >} > } > > struct Statement { >int member; >void bind(int column, int value) { > import std.stdio; >

Re: Code coverage in Phobos

2016-03-29 Thread Seb via Digitalmars-d
On Monday, 28 March 2016 at 11:29:55 UTC, Vladimir Panteleev wrote: On Monday, 28 March 2016 at 01:30:34 UTC, Seb wrote: AFAIK dmd supports the `-cov` flag since quite some time, so I would be interested why there's no code coverage bot. There also seems to exist at least two external

Re: Code coverage in Phobos

2016-03-29 Thread Walter Bright via Digitalmars-d
On 3/29/2016 3:33 AM, Basile B. wrote: Couldn't the coverage be done at compile time ? The implementation for that would be utterly different.

Re: How to be more careful about null pointers?

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2016 11:57 AM, cy wrote: > On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote: >> parent.prep.bind is translated to the following by the compiler: >> >> "Call bind() for the object at address... let's calculate... Wherever >> parent is, we should add the offset of prep inside

Re: How to be more careful about null pointers?

2016-03-29 Thread cy via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 06:21:49 UTC, Ali Çehreli wrote: parent.prep.bind is translated to the following by the compiler: "Call bind() for the object at address... let's calculate... Wherever parent is, we should add the offset of prep inside that object." Okay, that's helpful

[Issue 15848] out doesn't call opAssign()

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15848 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #2 from

[Issue 15847] It is not an error to call opAssign on an uninitialized object

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15847 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #3 from

Re: Error: template instance does not match template declaration

2016-03-29 Thread ref2401 via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 18:29:27 UTC, Ali Çehreli wrote: On 03/29/2016 11:21 AM, ref2401 wrote: So, dict is a template value parameter of type T[string]. I don't think you can use an associative array as a template value parameter. (Can we?) However, it is possible to use anything as

Re: Error: template instance does not match template declaration

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/29/2016 11:21 AM, ref2401 wrote: > private void impl(S, T, T[string] dict)(S arg) { > writeln("S: ", S.stringof); > writeln("T: ", T.stringof); > writeln("dict: ", dict); So, dict is a template value parameter of type T[string]. I don't think you can use an associative

Re: Blog article on new import changes

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/29/16 2:02 PM, Sebastiaan Koppe wrote: On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually

Error: template instance does not match template declaration

2016-03-29 Thread ref2401 via Digitalmars-d-learn
OS: Win 8.1 Pro DMD: v2.070.0 cmd: dmd main.d -ofconsole-app.exe -debug -unittest -wi Code is successfully compiled until I uncomment test1 function call in the main. If it's uncommented I get the following compile-time error: main.d(58): Error: template instance impl!(string, bool,

Re: the most D-ish GUI library

2016-03-29 Thread Gerald via Digitalmars-d
On Tuesday, 29 March 2016 at 17:37:15 UTC, Nick Sabalausky wrote: Linux/GNOME (and any other Linux DE based on GTK): Use the QGtkStyle theme: It's a theme for Qt that *uses* GTK to render, therefore

[Issue 15848] out doesn't call opAssign()

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15848 lasssa...@gmail.com changed: What|Removed |Added CC||lasssa...@gmail.com --- Comment #1

Re: Blog article on new import changes

2016-03-29 Thread Sebastiaan Koppe via Digitalmars-d-announce
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first ever) on this, let me know what

Re: Oh, my GoD! Goroutines on D

2016-03-29 Thread H. S. Teoh via Digitalmars-d
On Tuesday, 29 March 2016 at 17:10:02 UTC, Jin wrote: On Tuesday, 29 March 2016 at 12:30:24 UTC, Dejan Lekic wrote: +1 Wiki is absolutely the best solution to this, I agree. Plus, we already have a wiki so he should just go there and start writing. The community will incorrect grammar/syntax

Re: Pre-alpha D language online tour

2016-03-29 Thread Bubbasaur via Digitalmars-d
On Tuesday, 29 March 2016 at 16:26:27 UTC, André wrote: ... I would appreciate if people could do some proof reading and just create pull requests for the content: Nice work but I really think that the left content should be expandable. Some button like Try it or whatever should do the

Re: Blog article on new import changes

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/29/16 1:01 PM, Dicebot wrote: On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first

Re: the most D-ish GUI library

2016-03-29 Thread Nick Sabalausky via Digitalmars-d
On 03/28/2016 01:21 PM, WebFreak001 wrote: You are right, i forgot Qt/KDE guys. KDE uses Qt for their programs and stuff but GNOME and the Ubuntu team and most desktop environments do use GTK instead of Qt. Qt is more common on OS X and Windows than on linux. I guess there will never be an

[Issue 15217] overloaded extern(C) function declarations are allowed

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15217 Johan Engelen changed: What|Removed |Added CC||jbc.enge...@gmail.com

Re: Pre-alpha D language online tour

2016-03-29 Thread jmh530 via Digitalmars-d
On Tuesday, 29 March 2016 at 16:26:27 UTC, André wrote: Or just drop me a message where you find a bug and I'll have it fixed. Looks good. A few suggestions, some content, some typo. D Basics (fix capitalization?): Page 3, code example at the bottom right does not compile with @system.

Re: Oh, my GoD! Goroutines on D

2016-03-29 Thread Jin via Digitalmars-d
On Tuesday, 29 March 2016 at 12:30:24 UTC, Dejan Lekic wrote: +1 Wiki is absolutely the best solution to this, I agree. Plus, we already have a wiki so he should just go there and start writing. The community will incorrect grammar/syntax and typos. http://wiki.dlang.org/Go_to_D

Re: Blog article on new import changes

2016-03-29 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first ever) on this, let me know what

Re: Pre-alpha D language online tour

2016-03-29 Thread André via Digitalmars-d
On Monday, 25 January 2016 at 18:17:09 UTC, André wrote: Hi, Inspired by the Go online language tour (https://tour.golang.org/) and the great experience it gave me learning the language I started a similar project for D some weeks ago. It's currently in a very pre-alpha state but I wanted

Re: Blog article on new import changes

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/29/16 11:49 AM, Jack Stouffer wrote: Here are some notes I jotted down when reading it Thanks, all fixed. Note, the "upcoming" note was added hastily before publishing because I realized 2.071 hasn't been released. Now reads: "In the upcoming version of D, several changes have been

Re: Blog article on new import changes

2016-03-29 Thread Jack Stouffer via Digitalmars-d-announce
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote: I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first ever) on this, let me know what

Blog article on new import changes

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d-announce
I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs. I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):

Re: Oh, no UFCS for member functions

2016-03-29 Thread Luís Marques via Digitalmars-d
On Tuesday, 29 March 2016 at 15:08:05 UTC, Anonymouse wrote: The ugly workaround if you really don't want to reorganise things (and/or use the tile function directly) is to make a top-level alias tile = Player.tile; Cool, I was not aware of that workaround. Also, I wonder if this workaround

Re: Oh, no UFCS for member functions

2016-03-29 Thread Anonymouse via Digitalmars-d
On Tuesday, 29 March 2016 at 14:56:53 UTC, Luís Marques wrote: Too bad this doesn't work: struct Player { MapTile[] playerMap; // partial private knowledge of map Location destination; auto tile(Location loc) { return playerMap[loc]; } void foo() {

Re: mir.combinatorics: reviewers and ideas are wanted

2016-03-29 Thread Seb via Digitalmars-d-announce
On Monday, 28 March 2016 at 15:30:56 UTC, Timon Gehr wrote: Regarding ideas: For each range, there should probably be a numeric function computing the length of that range. (e.g. here, binomial corresponds to combinations, there should be factorial corresponding to permutations etc.) This

Oh, no UFCS for member functions

2016-03-29 Thread Luís Marques via Digitalmars-d
Too bad this doesn't work: struct Player { MapTile[] playerMap; // partial private knowledge of map Location destination; auto tile(Location loc) { return playerMap[loc]; } void foo() { if(destination.tile.hasMonster) ... } }

[Issue 15847] It is not an error to call opAssign on an uninitialized object

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15847 Marc Schütz changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15848] New: out doesn't call opAssign()

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15848 Issue ID: 15848 Summary: out doesn't call opAssign() Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

[Issue 15847] New: It is not an error to call opAssign on an uninitialized object

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15847 Issue ID: 15847 Summary: It is not an error to call opAssign on an uninitialized object Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: the most D-ish GUI library

2016-03-29 Thread Luis via Digitalmars-d
On Friday, 25 March 2016 at 14:45:05 UTC, Nick Sabalausky wrote: On 03/13/2016 06:33 PM, WebFreak001 wrote: I prefer GtkD, its the most system native one on linux I dispute that. Many people, like myself, use KDE rather than GNOME or Unity, and GTK programs are just as horrible to put up

Re: Why is separating class ind struct is bad?

2016-03-29 Thread Danni Coy via Digitalmars-d
> Could anybody explain what this mean and why this way is not modern? This is in the context of users migrating from C++, and it is bad in so far as it is not what a C++ programmer who hasn't read all the documentation would expect. The easiest path of migration would be if the programmer can

Re: Categorization of warnings

2016-03-29 Thread Johan Engelen via Digitalmars-d
On Tuesday, 29 March 2016 at 04:29:52 UTC, Dicebot wrote: On 03/28/2016 08:05 PM, Steven Schveighoffer wrote: Warnings can be an important part of the deprecation process. The next release of the compiler will illustrate that. No. Deciding that warnings have any relation with deprecation

Re: parsing fastq files with D

2016-03-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/03/2016 1:46 AM, eastanon wrote: On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote: void popFront() { import std.string : indexOf; if (source is null) { isEmpty = true; return;

Re: Categorization of warnings

2016-03-29 Thread Dicebot via Digitalmars-d
On 03/29/2016 03:34 PM, Steven Schveighoffer wrote: > I think it might be simply deprecation. I can't remember. > > Tested: > > Yes, it is a deprecation, not a warning (compilation succeeds on -w). I > stand corrected! Thanks, no need for me to panic in that case :) > This is in essence, still

Re: infer type argument in classe constructor?

2016-03-29 Thread Puming via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 10:29:46 UTC, Simen Kjaeraas wrote: On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote: Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main()

Re: RFC: Units of measurement for D (Phobos?)

2016-03-29 Thread Seb via Digitalmars-d
On Tuesday, 22 March 2016 at 09:55:28 UTC, Zardoz wrote: Impressive! I like the idea, in special when you can handled derived units and doing conversions like this : convert!(kilo(newton))(200 * gram * meter / pow!2(second))); Wow that's pretty sweet! So @nordlow how about pushing this

Re: parsing fastq files with D

2016-03-29 Thread eastanon via Digitalmars-d-learn
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote: void popFront() { import std.string : indexOf; if (source is null) {

Re: Categorization of warnings

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d
On 3/29/16 8:24 AM, Dicebot wrote: On Tuesday, 29 March 2016 at 12:21:59 UTC, Steven Schveighoffer wrote: The next release will have a deprecation warning about selective imports that mistakenly allow usage of FQN. You will see most likely. Phobos had thousands of them. Deprecation or a

Re: Oh, my GoD! Goroutines on D

2016-03-29 Thread Dejan Lekic via Digitalmars-d
On Monday, 28 March 2016 at 10:49:28 UTC, Jacob Carlborg wrote: It would be useful with a wiki page, or similar, that describes and compares different ways of doing concurrency in D, both built-in and third party libraries like this and vibe.d. Also compare against other languages like Go,

Re: Better Phobos contribution guide

2016-03-29 Thread Seb via Digitalmars-d
On Friday, 25 March 2016 at 17:56:05 UTC, Xinok wrote: - check: did you add enough tests? I would extend this to emphasize "complete code coverage" in unit tests. Yeah it would be great if we can check this automatically - see the other discussion:

Re: Categorization of warnings

2016-03-29 Thread Dicebot via Digitalmars-d
On Tuesday, 29 March 2016 at 12:21:59 UTC, Steven Schveighoffer wrote: The next release will have a deprecation warning about selective imports that mistakenly allow usage of FQN. You will see most likely. Phobos had thousands of them. -Steve Deprecation or a warning? It must be deprecation

Re: Categorization of warnings

2016-03-29 Thread Steven Schveighoffer via Digitalmars-d
On 3/29/16 12:29 AM, Dicebot wrote: On 03/28/2016 08:05 PM, Steven Schveighoffer wrote: Warnings can be an important part of the deprecation process. The next release of the compiler will illustrate that. No. Deciding that warnings have any relation with deprecation process was huge mistake

Re: Article on Introspective programming

2016-03-29 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 28 March 2016 at 12:47:02 UTC, Nicholas Wilson wrote: http://thewilsonator.github.io/update/2016/03/28/better-vulkan-bindings.html I would like some feedback before this is posted to reddit. Come to think of it, putting the project on github would be a good idea, but unfortunately

Re: infer type argument in classe constructor?

2016-03-29 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote: Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main() { Message[] src = ...; auto decoder = new

Re: Code coverage in Phobos

2016-03-29 Thread Basile B. via Digitalmars-d
On Tuesday, 29 March 2016 at 09:39:49 UTC, Walter Bright wrote: On 3/28/2016 9:38 PM, Vladimir Panteleev wrote: Ah, OK. Though, this is something that could be improved in the implementation without changing the language. DMD should not emit code that's not called in the module, and not

Re: infer type argument in classe constructor?

2016-03-29 Thread Simen Kjaeraas via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 10:13:28 UTC, Puming wrote: Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main() { Message[] src = ...; auto decoder = new

infer type argument in classe constructor?

2016-03-29 Thread Puming via Digitalmars-d-learn
Hi, I'm writing a generic class: ```d struct Message { ... } class Decoder(MsgSrc) { } ``` When using it, I'd have to include the type of its argument: ``` void main() { Message[] src = ...; auto decoder = new Decoder!(Message[])(src); ... } ``` Can it be inferred so that I only

Re: Joining AliasSeq/TypeTuple s

2016-03-29 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 09:33:40 UTC, Voitech wrote: Hi, i want to join two or more tupples in to one, with mixing the indexes like roundRobin but in compile time. unittest{ import std.meta; alias first=AliasSeq!(int, string,bool); alias second=AliasSeq!("abc","def","ghi"); alias

Re: string and char[] in Phobos

2016-03-29 Thread Puming via Digitalmars-d-learn
On Friday, 18 March 2016 at 20:06:27 UTC, Jonathan M Davis wrote: When a function accepts const(char)[] than it can accept char[], const(char)[], const(char[]), immutable(char)[], and immutable(char[]), which, whereas if it accepts string, then all it accepts are immutable(char)[] and

Re: Code coverage in Phobos

2016-03-29 Thread Walter Bright via Digitalmars-d
On 3/28/2016 9:38 PM, Vladimir Panteleev wrote: Ah, OK. Though, this is something that could be improved in the implementation without changing the language. DMD should not emit code that's not called in the module, and not callable from outside the module due to e.g. being private. Probably

Joining AliasSeq/TypeTuple s

2016-03-29 Thread Voitech via Digitalmars-d-learn
Hi, i want to join two or more tupples in to one, with mixing the indexes like roundRobin but in compile time. unittest{ import std.meta; alias first=AliasSeq!(int, string,bool); alias second=AliasSeq!("abc","def","ghi"); alias third=... static assert(third==AliasSeq!(int, "abc", string,

Re: char array weirdness

2016-03-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, March 28, 2016 16:29:50 H. S. Teoh via Digitalmars-d-learn wrote: > On Mon, Mar 28, 2016 at 04:07:22PM -0700, Jonathan M Davis via > Digitalmars-d-learn wrote: [...] > > > The range API considers all strings to have an element type of dchar. > > char, wchar, and dchar are UTF code units

Re: Oh, my GoD! Goroutines on D

2016-03-29 Thread sigod via Digitalmars-d
On Monday, 28 March 2016 at 22:35:12 UTC, Jin wrote: On Monday, 28 March 2016 at 19:29:55 UTC, Walter Bright wrote: On 3/28/2016 6:10 AM, Jin wrote: My english is too bad to write articles, sorry :-( Baloney, your english is very good. Besides, I'm sure there will be many volunteers here to

Re: Categorization of warnings

2016-03-29 Thread Dicebot via Digitalmars-d
On Tuesday, 29 March 2016 at 08:13:59 UTC, Johan Engelen wrote: On Tuesday, 29 March 2016 at 04:35:11 UTC, Dicebot wrote: Sadly, this isn't very useful. If there is one legitimate use of code warned about one wants to disable that specific place and not all warning of that kind in whole

Re: dlang.org makefile pains

2016-03-29 Thread Atila Neves via Digitalmars-d
On Thursday, 24 March 2016 at 18:56:00 UTC, H. S. Teoh wrote: On Thu, Mar 24, 2016 at 06:51:32PM +, Piotrek via Digitalmars-d wrote: On Tuesday, 22 March 2016 at 23:23:56 UTC, Jakob Ovrum wrote: >Bump. Please help. If Martin is the only one who understands >the makefile then we have a

Re: Categorization of warnings

2016-03-29 Thread Johan Engelen via Digitalmars-d
On Tuesday, 29 March 2016 at 04:35:11 UTC, Dicebot wrote: Sadly, this isn't very useful. If there is one legitimate use of code warned about one wants to disable that specific place and not all warning of that kind in whole program. Which means it has to be controlled by some sort of pragma.

Re: Why is separating class ind struct is bad?

2016-03-29 Thread Walter Bright via Digitalmars-d
On 3/28/2016 9:56 PM, Dicebot wrote: It is hard to argue that but I have never encountered any issues from actual confusion between struct and class in C++ (because there isn't any real difference), only from misusage of virtual types. Misusage of virtual types is the confusion. 1. Want to

Re: debugger blues

2016-03-29 Thread Iain Buclaw via Digitalmars-d
On 28 March 2016 at 21:29, cy via Digitalmars-d wrote: > On Sunday, 27 March 2016 at 15:40:47 UTC, Marco Leise wrote: > >> Is it just me? I've never heard of a programming environment, let alone a >> system programming language providing that information. >> > >

Re: libotr native D port

2016-03-29 Thread Robert M. Münch via Digitalmars-d-announce
On 2016-03-28 08:53:24 +, ketmar said: subj. here[1]. not heavily tested, but it doesn't really matter, as nobody will use it anyway. 1. http://repo.or.cz/libotrd.git Off-the-Record (OTR) Messaging is a cryptographic protocol used in well-known instant messaging clients such as

Re: Oh, my GoD! Goroutines on D

2016-03-29 Thread Jacob Carlborg via Digitalmars-d
On 2016-03-29 01:53, Ali Çehreli wrote: Seriously, I appreciate any documentation links that you can give to complete my "homework" before DConf. :) I was hoping someone could give _me_ the links, that's why I wrote the post ;) -- /Jacob Carlborg

Re: How to be more careful about null pointers?

2016-03-29 Thread Ali Çehreli via Digitalmars-d-learn
On 03/28/2016 11:00 PM, cy wrote: > struct Database { >string derp; >Statement prepare(string s) { > return Statement(1234); >} > } > > struct Statement { >int member; >void bind(int column, int value) { > import std.stdio; > writeln("derp",member); Change

[Issue 15840] std.typecons.RefCounted segfaults when checking isInitialized, then segfaults GDB

2016-03-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15840 cy changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: How to be more careful about null pointers?

2016-03-29 Thread cy via Digitalmars-d-learn
On Monday, 28 March 2016 at 21:24:48 UTC, Adam D. Ruppe wrote: If it didn't give the error, either you swallowed it or you didn't actually dereference null. Okay, so it's not actually supposed to happen. Hopefully it's something I did wrong... What is the db library you are using? Did you