[Issue 15633] New: -profile and -cov produce bogus output [2.070]

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15633 Issue ID: 15633 Summary: -profile and -cov produce bogus output [2.070] Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major

Re: Ownership semantics

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:10:03 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:07:26 UTC, Steven Schveighoffer wrote: What is likely happening is that ptr is already collected, and you are invalidly attempting to re-free it. The GC can collect this memory even though there is

Re: Ownership semantics

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:07:26 UTC, Steven Schveighoffer wrote: What is likely happening is that ptr is already collected, and you are invalidly attempting to re-free it. The GC can collect this memory even though there is still an outstanding root-reachable pointer to it?

Re: Ownership semantics

2016-01-31 Thread maik klein via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:20:52 UTC, Steven Schveighoffer wrote: On 1/31/16 3:15 PM, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:11:07 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:10:03 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:07:26 UTC, Steven

Re: Ownership semantics

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:20:52 UTC, Steven Schveighoffer wrote: Oh, nevermind. This is actually simpler. You can't do memory operations inside a destructor during collection. I forgot about that. But the rule I stated is still in force. -Steve So this implies that the UniquePtr

Re: how do I tell if something is lvalue?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/31/16 4:48 PM, Meta wrote: This seems to do the trick, although I haven't extensively tested it. There's probably a simpler way but this is the first thing I could come up with that works. Thanks! I was surprised this is not straightforward. -Steve

Re: how do I tell if something is lvalue?

2016-01-31 Thread Meta via Digitalmars-d-learn
On Sunday, 31 January 2016 at 22:11:45 UTC, Steven Schveighoffer wrote: On 1/31/16 4:48 PM, Meta wrote: This seems to do the trick, although I haven't extensively tested it. There's probably a simpler way but this is the first thing I could come up with that works. Thanks! I was

Re: Unterminated format specifier exception keeps occuring and I don't know why.

2016-01-31 Thread Enjoys Math via Digitalmars-d-learn
On Sunday, 31 January 2016 at 19:51:34 UTC, Enjoys Math wrote: On Sunday, 31 January 2016 at 19:40:15 UTC, Enjoys Math wrote: This weird exception keeps occuring and visual D is not bringing me to the place in my code that might be calling it. [...] The exception is not listed in the

How to implement to!T(JSONValue)?

2016-01-31 Thread crimaniak via Digitalmars-d-learn
Hi! I need to read bad-formed json files in type-tolerant mode, and my idea is to make JSONValue-specific 'to' method which will convert it to target type if applicable, else throw exception. Like this: import std.json; unittest { JSONValue s="123"; JSONValue i=123; JSONValue

Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
I know I can mark an argument ref to require lvalues, so I'm wondering whether there is an equivalent for rvalues; that is, is there a way to specify that an argument to a function MUST be an rvalue? For example, in C++ I can do this: [code] void foo(int && x) {...} foo(5); // Works fine int

Re: Declaring rvalue function arguments

2016-01-31 Thread maik klein via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:42:19 UTC, anonymous wrote: On 31.01.2016 18:21, Matt Elkins wrote: I know I can mark an argument ref to require lvalues, so I'm wondering whether there is an equivalent for rvalues; that is, is there a way to specify that an argument to a function MUST be an

Re: Regex in ctfe?

2016-01-31 Thread tsbockman via Digitalmars-d
On Wednesday, 27 January 2016 at 21:09:19 UTC, Era Scarecrow wrote: On Wednesday, 27 January 2016 at 20:25:33 UTC, H. S. Teoh wrote: Currently, AFAIK, (d)dmd does not use anything from Phobos. I'm not sure if this is a temporary situation, or there's a strong reason for it. Probably since

Re: Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
Errr, ignore the makeFoo() line. Left that in by accident, has no bearing on the issue.

Re: Ownership semantics

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 19:34:43 UTC, maik klein wrote: I recently asked a question about ownership semantics in D https://stackoverflow.com/questions/35115702/how-do-i-express-ownership-semantics-in-d But a few minutes ago I found an answer on SO that could potentially explain a lot.

Re: Vision for the first semester of 2016

2016-01-31 Thread Iain Buclaw via Digitalmars-d-announce
On 29 January 2016 at 22:29, Tofu Ninja via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On Friday, 29 January 2016 at 20:30:35 UTC, Iain Buclaw wrote: > >> How much of it actually depends on the compiler though? I'd be a little >> surprised if we couldn't backport at

Re: Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 18:02:19 UTC, Matt Elkins wrote: Here is the one I am using right now: Actually, here is the whole module in case you are interested in the unittests/usage: [code] import std.algorithm; import std.traits; struct ResourceHandle(T, alias Deleter, T Default =

casting & templates

2016-01-31 Thread Robert M. Münch via Digitalmars-d-learn
I have: class OperatorV(T) : Value { T impl; this(T impl) { this.impl = impl; } ... and use it like this: makeOperator((IntV a, IntV b) => new IntV(a.num + b.num)); Now I want to do: opWord.get() returns a Value OperatorV *op = cast(OperatorV*)(opWord.get()); and get: Error: class

Re: Better docs for D (WIP)

2016-01-31 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 31 January 2016 at 17:54:41 UTC, Chris Wright wrote: It's not a division. It's a documentation mirror with a different layout. Well, there are a few content changes too. You can see my diff as it develops here: https://github.com/D-Programming-Language/phobos/pull/3895 (I'll

Re: Better docs for D (WIP)

2016-01-31 Thread Nick Sabalausky via Digitalmars-d-announce
On 12/30/2015 08:32 PM, Adam D. Ruppe wrote: It was rejected. Walter didn't see what the problem was and I was told to just write $(LT)span$(GT)foo$(LT)/span$(GT). Seriously. [...] The idea (and working program) was rejected because the team felt a post-processor was the wrong way to do it.

Unterminated format specifier exception keeps occuring and I don't know why.

2016-01-31 Thread Enjoys Math via Digitalmars-d-learn
This weird exception keeps occuring and visual D is not bringing me to the place in my code that might be calling it. Message: First-chance exception: std.format.FormatException Unterminated format specifier: "%" at C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(830) I've gotten rid

Re: Ownership semantics

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/31/16 2:34 PM, maik klein wrote: I recently asked a question about ownership semantics in D https://stackoverflow.com/questions/35115702/how-do-i-express-ownership-semantics-in-d But a few minutes ago I found an answer on SO that could potentially explain a lot.

how do I tell if something is lvalue?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d-learn
struct S { int x; ref int y() { return x; } int z() { return 1; } } What can I use, given S, to determine that x and y yield lvalues, while z yields an rvalue? I was expecting something like isLvalue somewhere, but cannot find it. __traits(isRef, ...) doesn't work. -Steve

Re: D vs Rust

2016-01-31 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 31 January 2016 at 18:32:12 UTC, Xinok wrote: He likely means that, in general, D code has fewer bugs than C++11 code. Which is a questionable claim. If we are going to compare we have to compare performance vs proficiency vs risk of making mistake vs tooling vs X factors. You

Re: Better docs for D (WIP)

2016-01-31 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 31 January 2016 at 11:14:08 UTC, Rory McGuire wrote: If you don't get a cease and desist letter from the D Foundation soon I'd be surprised. http://forum.dlang.org/post/n5sf7o$mu1$2...@digitalmars.com Andrei isn't exactly enthusiastic (though later on, he softens a bit), but I'm

Re: D vs Rust

2016-01-31 Thread Chris Wright via Digitalmars-d
On Sun, 31 Jan 2016 15:44:37 +, Laeeth Isharc wrote: > bearophile: > "I am sometimes able to write working D code almost as quickly as Python > code" > > Yes, indeed - that's my experience too. I wonder what we could do to > make this most of the time, if not almost always, and for less >

Re: Unterminated format specifier exception keeps occuring and I don't know why.

2016-01-31 Thread Enjoys Math via Digitalmars-d-learn
On Sunday, 31 January 2016 at 19:40:15 UTC, Enjoys Math wrote: This weird exception keeps occuring and visual D is not bringing me to the place in my code that might be calling it. [...] The exception is not listed in the Exception Settings checkable list. I will try commenting out the D

Re: GCAllocator goodAllocSize?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d
On 1/31/16 1:52 PM, Steven Schveighoffer wrote: OK, I'm making a PR for this. https://github.com/D-Programming-Language/phobos/pull/3962 -Steve

Re: Ownership semantics

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/31/16 3:15 PM, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:11:07 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:10:03 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:07:26 UTC, Steven Schveighoffer wrote: What is likely happening is that ptr is already

Problem when calling toJSON()

2016-01-31 Thread Alex Herrmann via Digitalmars-d-learn
Hello all, I'm having a *really* weird problem (at least I think so). I have a function on a struct that converts it into JSON. Everything works, no big deal. But when I try to turn that JSONValue into a string, I get a UTF-8 Error. What makes it even weirder, is that if I call toJSON

Re: D vs Rust

2016-01-31 Thread Laeeth Isharc via Digitalmars-d
Thanks, bearophile.

Re: CTFE thoughts & functional approach

2016-01-31 Thread Era Scarecrow via Digitalmars-d
On Sunday, 31 January 2016 at 13:59:06 UTC, Robert M. Münch wrote: However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty different and doing CTFE, code-generation etc. needs some other

Re: Declaring rvalue function arguments

2016-01-31 Thread maik klein via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:21:54 UTC, Matt Elkins wrote: I know I can mark an argument ref to require lvalues, so I'm wondering whether there is an equivalent for rvalues; that is, is there a way to specify that an argument to a function MUST be an rvalue? For example, in C++ I can do

Re: Ownership semantics

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:11:07 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:10:03 UTC, Matt Elkins wrote: On Sunday, 31 January 2016 at 20:07:26 UTC, Steven Schveighoffer wrote: What is likely happening is that ptr is already collected, and you are invalidly attempting to

Re: C Macro deeper meaning?

2016-01-31 Thread Alex Parrill via Digitalmars-d-learn
On Sunday, 31 January 2016 at 02:58:28 UTC, Andrew Edwards wrote: If I understand correctly, this piece of code: enum NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0) can be converted to the following in D: void notUsed(T)(T v) { return cast(void)0; }; since it

Re: GCAllocator goodAllocSize?

2016-01-31 Thread Steven Schveighoffer via Digitalmars-d
On 1/30/16 12:41 PM, Andrei Alexandrescu wrote: On 1/29/16 9:52 PM, Steven Schveighoffer wrote: import std.experimental.allocator.gc_allocator; void main() { //GCAllocator.instance.goodAllocSize(3000); // error writeln(theAllocator.goodAllocSize(3000)); // 3008, should be 4096 } This

chain(const(array of class)) fails

2016-01-31 Thread SimonN via Digitalmars-d-learn
Hi, we start with the following code snippet, which works. import std.algorithm; import std.range; import std.stdio; class A { int val; } class B : A { this() { val = 3; } } class C : A { this() { val = 4; } } B[] b = [new B(), new B()]; C[] c = [new C(),

Re: Declaring rvalue function arguments

2016-01-31 Thread anonymous via Digitalmars-d-learn
On 31.01.2016 18:21, Matt Elkins wrote: I know I can mark an argument ref to require lvalues, so I'm wondering whether there is an equivalent for rvalues; that is, is there a way to specify that an argument to a function MUST be an rvalue? For example, in C++ I can do this: [code] void foo(int

Re: Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:42:19 UTC, anonymous wrote: I don't know if this works in all cases, but it passes that simple test: @disable void foo(ref int x); void foo(int x) {} void main() { foo(5); /* works */ int y = 5; foo(y); /* error */ } My fault, I should

Memory profiling D applications

2016-01-31 Thread Griffon26 via Digitalmars-d-learn
I would like to get a view of the amount of memory that my application requires over time, but this does not seem to be trivial in D. 1) I assume the garbage collector could keep around memory that my application is no longer using. If this is the case then no external memory profiler is

Re: Declaring rvalue function arguments

2016-01-31 Thread maik klein via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:55:53 UTC, Matt Elkins wrote: Errr, ignore the makeFoo() line. Left that in by accident, has no bearing on the issue. I have found an interesting SO answer http://stackoverflow.com/a/35114945/944430 This would explain everything that we would need. I am just

Re: Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:48:53 UTC, maik klein wrote: The problem is that x will be copied afaik which is not what you want if you want to deal with ownership. I think that can be solved by wrapping the resource in a struct that deals with passing the ownership. Here is the one I am

Re: Declaring rvalue function arguments

2016-01-31 Thread Matt Elkins via Digitalmars-d-learn
On Sunday, 31 January 2016 at 17:55:53 UTC, Matt Elkins wrote: Errr, ignore the makeFoo() line. Left that in by accident, has no bearing on the issue. Ok, I think I understand why this doesn't work, at least. The Foo passed into bar() is, of course, an lvalue itself. So I can achieve this

Re: D vs Rust

2016-01-31 Thread Xinok via Digitalmars-d
On Sunday, 31 January 2016 at 16:30:47 UTC, Ola Fosheim Grøstad wrote: On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote: Regarding the code reliability, D is better than C++11 That's a bold claim. What do you mean by "code reliability"? You get as strong typing as you want with

Ownership semantics

2016-01-31 Thread maik klein via Digitalmars-d-learn
I recently asked a question about ownership semantics in D https://stackoverflow.com/questions/35115702/how-do-i-express-ownership-semantics-in-d But a few minutes ago I found an answer on SO that could potentially explain a lot. http://stackoverflow.com/a/35114945/944430 Sadly it has some

Re: casting & templates

2016-01-31 Thread Chris Wright via Digitalmars-d-learn
On Sun, 31 Jan 2016 19:59:01 +0100, Robert M. Münch wrote: > I have: > > class OperatorV(T) : Value { > T impl; > > this(T impl) { > this.impl = impl; > } > ... This expands to: template OperatorV(T) { class OperatorV { ... } } If you're just typing `OperatorV` with no

Re: how do I tell if something is lvalue?

2016-01-31 Thread Meta via Digitalmars-d-learn
On Sunday, 31 January 2016 at 20:49:43 UTC, Steven Schveighoffer wrote: struct S { int x; ref int y() { return x; } int z() { return 1; } } What can I use, given S, to determine that x and y yield lvalues, while z yields an rvalue? I was expecting something like isLvalue somewhere, but

Re: Problem when calling toJSON()

2016-01-31 Thread Ali Çehreli via Digitalmars-d-learn
On 01/31/2016 02:52 PM, Alex Herrmann wrote: > Note that I am running 2.070.0. Then it's probably a bug related to this change: http://dlang.org/changelog/2.070.0.html#json-encode-control-characters Ali

Beginning D: Unittesting, IntelliJ, & Dub

2016-01-31 Thread Ali Çehreli via Digitalmars-d-announce
Found on Reddit: https://www.reddit.com/r/programming/comments/43m0ld/begining_d_unittesting_intellij_dub/ rharriso, I haven't read the article yet but you have a typo in the title: Begining -> Beginning Ali

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread Charles via Digitalmars-d
On Sunday, 31 January 2016 at 06:34:26 UTC, Walter Bright wrote: Well, here's a ripe plum for anyone wanting valuable compiler street cred! Make the Dwarf EH support work on OSX 32 and 64. Are there any future plans for Win64 since it won't ever support dwarf exceptions from how I

Re: D vs Rust

2016-01-31 Thread xenon325 via Digitalmars-d
On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote: And currently it's dead-easy to write unsafe code even in @safe D functions: int[] foo() pure @safe { int[2] a = [10, 20]; auto b = a[]; return b; } void main() {} Doesn't http://wiki.dlang.org/DIP25 fix this ?

Re: How to set array length for multidimensional static arrays

2016-01-31 Thread Namal via Digitalmars-d-learn
On Monday, 1 February 2016 at 07:41:33 UTC, Namal wrote: I understand that I cannot pass a variable to the static array like in C++, and have to use dynamic arrays. But how can I set the length for them without using a loop? I mean std::vector in C++, not array.

Re: Release D 2.070.0

2016-01-31 Thread thedeemon via Digitalmars-d-announce
On Sunday, 31 January 2016 at 00:13:46 UTC, Dicebot wrote: NB: tagged commit has 2.069 in VERSION file resulting in built compiler reporting wrong version. I have added a workaround in packaging script for now but would be nice to fix that in 2.070.1 Btw, dmd.exe 2.070.0 when run says

Re: How to set array length for multidimensional static arrays

2016-01-31 Thread cym13 via Digitalmars-d-learn
On Monday, 1 February 2016 at 07:42:56 UTC, Namal wrote: On Monday, 1 February 2016 at 07:41:33 UTC, Namal wrote: I understand that I cannot pass a variable to the static array like in C++, and have to use dynamic arrays. But how can I set the length for them without using a loop? I mean

Re: CTFE thoughts & functional approach

2016-01-31 Thread cym13 via Digitalmars-d
On Monday, 1 February 2016 at 00:02:55 UTC, Era Scarecrow wrote: On Sunday, 31 January 2016 at 13:59:06 UTC, Robert M. Münch wrote: However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty

Octree implementation?

2016-01-31 Thread Tofu Ninja via Digitalmars-d-learn
Just out of curiosity, does anyone have an octree implementation for D laying around? Just looking to save some time.

Re: Declaring rvalue function arguments

2016-01-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, January 31, 2016 17:48:53 maik klein via Digitalmars-d-learn wrote: > On Sunday, 31 January 2016 at 17:42:19 UTC, anonymous wrote: > > On 31.01.2016 18:21, Matt Elkins wrote: > > I don't know if this works in all cases, but it passes that > > simple test: > > > > > > @disable void

[Issue 15618] [REG-master] Class member layout has been changed, ABI needs to be updated?

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15618 Walter Bright changed: What|Removed |Added CC|

Re: Problem when calling toJSON()

2016-01-31 Thread Alex Herrmann via Digitalmars-d-learn
On Monday, 1 February 2016 at 00:24:06 UTC, Ali Çehreli wrote: On 01/31/2016 02:52 PM, Alex Herrmann wrote: > Note that I am running 2.070.0. Then it's probably a bug related to this change: http://dlang.org/changelog/2.070.0.html#json-encode-control-characters Ali This problem is

Re: Beginning D: Unittesting, IntelliJ, & Dub

2016-01-31 Thread Walter Bright via Digitalmars-d-announce
On 1/31/2016 5:12 PM, Ali Çehreli wrote: Found on Reddit: https://www.reddit.com/r/programming/comments/43m0ld/begining_d_unittesting_intellij_dub/ rharriso, I haven't read the article yet but you have a typo in the title: Begining -> Beginning Ali Another post of the same article:

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread Rikki Cattermole via Digitalmars-d
On 01/02/16 4:01 PM, Walter Bright wrote: On 1/31/2016 6:32 PM, Charles wrote: Are there any future plans for Win64 since it won't ever support dwarf exceptions from how I understand it? Or does it, and I'm strongly mistaken? VC++'s Win64 exception handling scheme is not at all the Win32

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread Walter Bright via Digitalmars-d
On 1/31/2016 6:32 PM, Charles wrote: Are there any future plans for Win64 since it won't ever support dwarf exceptions from how I understand it? Or does it, and I'm strongly mistaken? VC++'s Win64 exception handling scheme is not at all the Win32 scheme and definitely not Dwarf EH. Supporting

[Issue 15626] extern(C++) calling crash

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15626 --- Comment #3 from Walter Bright --- As a workaround, if you create a base class for 'Base' that contains a virtual function, in both the D and C++ code, it will work. --

Re: D vs Rust

2016-01-31 Thread Joakim via Digitalmars-d
On Sunday, 31 January 2016 at 15:44:37 UTC, Laeeth Isharc wrote: Walter - sorry about that. I need to get someone to help on that front as I have so little time. Should work now. Still happening, had three email replies returned this weekend.

[Issue 15618] [REG-master] Class member layout has been changed, ABI needs to be updated?

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15618 --- Comment #2 from Walter Bright --- https://github.com/D-Programming-Language/dmd/pull/5387 --

Re: chain(const(array of class)) fails

2016-01-31 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 31 January 2016 at 21:22:06 UTC, SimonN wrote: Hi, we start with the following code snippet, which works. import std.algorithm; import std.range; import std.stdio; class A { int val; } class B : A { this() { val = 3; } } class C : A { this() { val = 4; }

Re: how do I tell if something is lvalue?

2016-01-31 Thread Ali Çehreli via Digitalmars-d-learn
On 01/31/2016 01:48 PM, Meta wrote: This seems to do the trick, although I haven't extensively tested it. There is hasLvalueElements() as well. Its implementation my be similar or give other ideas: https://dlang.org/phobos/std_range_primitives.html#hasLvalueElements Ali

Re: Problem when calling toJSON()

2016-01-31 Thread anonymous via Digitalmars-d-learn
On 01.02.2016 01:29, Alex Herrmann wrote: This problem is solved! Sorry for not updating the question. It was actually a problem with me not iduping it, and the memory being reclaimed or something similar. I did also change to stdx.data.json (std_data_json on dub). You don't seem to be clear

Re: Sublime Text 3 Gets Better D Support

2016-01-31 Thread sigod via Digitalmars-d-announce
This package might be of some help to those who doesn't want to use dev version: https://packagecontrol.io/packages/D%20Programming%20Language

Re: how do I tell if something is lvalue?

2016-01-31 Thread Meta via Digitalmars-d-learn
On Monday, 1 February 2016 at 00:20:00 UTC, Ali Çehreli wrote: On 01/31/2016 01:48 PM, Meta wrote: This seems to do the trick, although I haven't extensively tested it. There is hasLvalueElements() as well. Its implementation my be similar or give other ideas:

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread Walter Bright via Digitalmars-d
On 1/31/2016 7:04 PM, Rikki Cattermole wrote: On 01/02/16 4:01 PM, Walter Bright wrote: On 1/31/2016 6:32 PM, Charles wrote: Are there any future plans for Win64 since it won't ever support dwarf exceptions from how I understand it? Or does it, and I'm strongly mistaken? VC++'s Win64

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread Rikki Cattermole via Digitalmars-d
On 01/02/16 4:23 PM, Walter Bright wrote: On 1/31/2016 7:04 PM, Rikki Cattermole wrote: On 01/02/16 4:01 PM, Walter Bright wrote: On 1/31/2016 6:32 PM, Charles wrote: Are there any future plans for Win64 since it won't ever support dwarf exceptions from how I understand it? Or does it, and

Re: Dwarf Exception Handling now on FreeBSD!

2016-01-31 Thread ZombineDev via Digitalmars-d
On Sunday, 31 January 2016 at 06:34:26 UTC, Walter Bright wrote: 32/64 support now on Linux and FreeBSD. https://github.com/D-Programming-Language/dmd/pull/5376 Turns out that FreeBSD is close enough to Linux that it "just worked". Recently, there was a long thread entitled "C++17" where

[Issue 12829] Wrong error line number for closure allocation in @nogc function

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12829 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a457c8b627123fdb5e6ccf2b130e4d54c1329a56 fix Issue 12829 - Wrong

[Issue 12829] Wrong error line number for closure allocation in @nogc function

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12829 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Error: no property 'select' for type 'ddbc.core.Statement'

2016-01-31 Thread Suliman via Digitalmars-d-learn
I hope that here I will get answer faster then on https://github.com/buggins/ddbc/issues/18 I am using ddbc diver for access to mysql. I need to return result of request to struct. My code is next: import std.stdio; import ddbc.all; import std.stdio; import std.conv; void main() {

[Issue 15418] Warning 178: .LIB pagesize exceeds 512

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15418 teddybear12...@gmail.com changed: What|Removed |Added CC||teddybear12...@gmail.com ---

Re: Release D 2.070.0

2016-01-31 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Sunday, 31 January 2016 at 00:13:46 UTC, Dicebot wrote: NB: tagged commit has 2.069 in VERSION file resulting in built compiler reporting wrong version. I have added a workaround in packaging script for now but would be nice to fix that in 2.070.1 It's already fixed in master, but no one

Re: New D book available for pre-order: D Web Development

2016-01-31 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-01-30 19:09, barberian wrote: I don't know what you're seeing there, but here: Ebook = 25,18 (pounds) Ebook + Physical = 25,99 (pounds) So for what I understand if you by the Physical copy you win the ebook. Ebook = €36.23 Ebook + physical = €35.99 -- /Jacob Carlborg

Re: Regex in ctfe?

2016-01-31 Thread Philippe Sigaud via Digitalmars-d
On Tuesday, 26 January 2016 at 01:34:09 UTC, Manu wrote: Possible to std.regex in ctfe? (...) I have a string import destined for a mixin, and I want to parse it with regex, but I haven't been able to make it work. The docs mention nothing about this possibility. Hi Manu, a possible

Re: Better docs for D (WIP)

2016-01-31 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-01-30 21:58, Adam D. Ruppe wrote: If you go into a thing: http://dpldocs.info/experimental-docs/std.stdio.write.html "extern (C) nothrow" is repeated a couple of times. -- /Jacob Carlborg

Re: Better docs for D (WIP)

2016-01-31 Thread Rory McGuire via Digitalmars-d-announce
On Sat, Jan 30, 2016 at 10:58 PM, Adam D. Ruppe via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > Just want to update y'all that my better docs continue to improve with > each passing week. > > I just did a style facelift on the members section: > >

[Issue 15407] Assert hit in toElem e2ir.c:1962

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15407 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/49febeb29ef9aad6ef301fb5e14a896d2aba3a59 fix Issue 15407 - Assert

Re: D vs Rust

2016-01-31 Thread Laeeth Isharc via Digitalmars-d
Guillaume Piolat "- D is a large language, not sure how much relatively to Rust. I've heard Rust is complicated too." and yet, it's easy to get started if you know C. one can be quite quickly productive without having any experience of template metaprogramming, CTFE, and the like, and

[Issue 6907] ice(interpret.d) delete expressions crash interpreter

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6907 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bf995651b5a32592081ec1af70218e2a0427f862 fix Issue 6907 -

[Issue 6907] ice(interpret.d) delete expressions crash interpreter

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6907 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: D vs Rust

2016-01-31 Thread bearophile via Digitalmars-d
On Sunday, 31 January 2016 at 15:44:37 UTC, Laeeth Isharc wrote: Guillaume Piolat "- D is a large language, not sure how much relatively to Rust. I've heard Rust is complicated too." and yet, it's easy to get started if you know C. one can be quite quickly productive without having any

Re: D vs Rust

2016-01-31 Thread Ola Fosheim Grøstad via Digitalmars-d
On Sunday, 31 January 2016 at 16:18:21 UTC, bearophile wrote: Regarding the code reliability, D is better than C++11 That's a bold claim. What do you mean by "code reliability"? You get as strong typing as you want with C++. (And no, Laeeth, the fact that Manu has a nice boss that allows

[Issue 14686] Postblit isn't sometimes called on concatenation

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14686 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14686] Postblit isn't sometimes called on concatenation

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14686 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/795a828fb8d4fff09530ba49c6124e2cf4ff939f fix Issue 14686 - Postblit

Re: Better docs for D (WIP)

2016-01-31 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 31 January 2016 at 07:40:49 UTC, Ola Fosheim Grøstad wrote: One trick is to set the width and clipping on "dt > *" instead of "dt", and use "calc(...)" for dynamic sizes. I considered that too, but since I wanted the dt to float, the width had to be set there.

Region allocator strage error

2016-01-31 Thread ref2401 via Digitalmars-d-learn
I am getting runtime error: core.exception.AssertError@std\experimental\allocator\building_blocks\region.d(235): Assertion failure if LEN equals to 3, 5, 7, 9, ... void main(string[] args) { ubyte[1024] memory; auto stackAlloc = Region!NullAllocator(memory); IAllocator

[Issue 15632] New: Calling delete on scope class should be an error?

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15632 Issue ID: 15632 Summary: Calling delete on scope class should be an error? Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: CTFE thoughts & functional approach

2016-01-31 Thread anonymous via Digitalmars-d
On Sunday, 31 January 2016 at 13:59:06 UTC, Robert M. Münch wrote: I like CTFE and the meta programming idea for languages like D. However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty

CTFE thoughts & functional approach

2016-01-31 Thread Robert M. Münch via Digitalmars-d
I like CTFE and the meta programming idea for languages like D. However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty different and doing CTFE, code-generation etc. needs some other

[Issue 13967] More precise non-@nogc error messages

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13967 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED

Re: Better docs for D (WIP)

2016-01-31 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 31 January 2016 at 13:11:54 UTC, Jacob Carlborg wrote: "extern (C) nothrow" is repeated a couple of times. Yeah, those shouldn't be there at all on this function. I probably bugged the removal of attributes when moving up a scope or something.

[Issue 13764] std.getopt: throw an UnknownOptionException rather than Exception

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

[Issue 14921] getopt throws preventing printing of options

2016-01-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14921 John Colvin changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14525] Cannot access help information from getopt if a required parameter is not given

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

Re: CTFE thoughts & functional approach

2016-01-31 Thread cym13 via Digitalmars-d
On Sunday, 31 January 2016 at 13:59:06 UTC, Robert M. Münch wrote: I like CTFE and the meta programming idea for languages like D. However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty

  1   2   >