Re: Beta D 2.069.0-b1

2015-10-10 Thread Iain Buclaw via Digitalmars-d-announce
On 10 October 2015 at 14:51, Jacob Carlborg via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On 2015-10-10 03:52, Martin Nowak wrote: > > Scala and Ruby seem to do well with sloppy parens. >> > > A few notes about why Ruby doesn't have the same problems as D has: > > 1.

[Issue 15181] SYSCONFDIR is broken

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15181 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d9ba17e95c7ed1aca32f0ee6a1360684ca42f16c fix Issue 15181 -

[Issue 15181] SYSCONFDIR is broken

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

Re: Marketing for D: Making D an official Cloud Foundry built-in language

2015-10-10 Thread Andre via Digitalmars-d
On Saturday, 10 October 2015 at 02:49:23 UTC, Rikki Cattermole wrote: [...] Wrong way round. Bundle dub with dmd is already planned. I hoped 2.069 already contains dub, maybe with 2.070 [...] I am sure Walter will have no problem with you creating a custom archive, perhaps with tar?

LDC 0.16.0 beta2 is out! Try out before we create the final release!

2015-10-10 Thread Kai Nacke via Digitalmars-d-announce
Hi everyone, LDC 0.16.0 beta2, the LLVM-based D compiler, is available for download! This release is based on the 2.067.1 frontend and standard library and supports LLVM 3.1-3.7 (OS X: no support for 3.3). Don't miss to check if your preferred system is supported by this release. We also

Re: How to check whether an empty array variable is null?

2015-10-10 Thread rumbu via Digitalmars-d-learn
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote: [code] int[] list; list = new int[0]; std.stdio.writeln("Is Null ? ", (list is null)); [/code] Result is "Is Null? true". Is this the correct behaviour? I would expect compiler to point to an address in the

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread H. S. Teoh via Digitalmars-d
On Sat, Oct 10, 2015 at 06:06:59PM +, Eric Niebler via Digitalmars-d wrote: > On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu wrote: [...] > >Anyhow, it's best for us all to focus on doing good work instead of > >pettily fighting for irrelevant credit. > > I only jumped in

How to check whether an empty array variable is null?

2015-10-10 Thread tcak via Digitalmars-d-learn
[code] int[] list; list = new int[0]; std.stdio.writeln("Is Null ? ", (list is null)); [/code] Result is "Is Null? true". Is this the correct behaviour? I would expect compiler to point to an address in the heap, but set the length as 0. So, it wouldn't return null,

Re: Hash-Table-Based Multiple Arguments Replacement

2015-10-10 Thread Nordlöw via Digitalmars-d-learn
On Saturday, 10 October 2015 at 16:19:53 UTC, Nordlöw wrote: Is there an algorithm somewhere in Phobos which performs when possible a replacement/substitution based on a variadic definition of replacements using hash-table search similar to Found it:

Hash-Table-Based Multiple Arguments Replacement

2015-10-10 Thread Nordlöw via Digitalmars-d-learn
Is there an algorithm somewhere in Phobos which performs when possible a replacement/substitution based on a variadic definition of replacements using hash-table search similar to string replaceWhole(string a) { switch (x) { case "a": return "1"; case "b": return "2";

Re: Beta D 2.069.0-b1

2015-10-10 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Saturday, 10 October 2015 at 12:51:43 UTC, Jacob Carlborg wrote: In Ruby, no one will ever use empty parentheses for calling a method. That's actually the same as Simula. Functions/procedures with no parameters is called without parentheses.

[Issue 15177] [REG2.069.0-b1] mixin + traits issue with 2.069 beta 1

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15177 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f26ae0052ec82c61d63247096c78503caab8ce9d fix Issue 15177 - mixin +

[Issue 15177] [REG2.069.0-b1] mixin + traits issue with 2.069 beta 1

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

[Issue 15177] [REG2.069.0-b1] mixin + traits issue with 2.069 beta 1

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15177 --- Comment #3 from Martin Nowak --- This was about __traits(allMembers, mymod) listing generated TypeInfoStructDeclaration members. --

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread H. S. Teoh via Digitalmars-d
On Sat, Oct 10, 2015 at 09:52:22AM +0300, Andrei Alexandrescu via Digitalmars-d wrote: > On 10/10/15 12:58 AM, Eric Niebler wrote: > >Trying to express algorithms without any clear abstraction of > >"position within range" (independent of ranges) is hard and awkward, > >and occasionally causes

Re: How to check whether an empty array variable is null?

2015-10-10 Thread Meta via Digitalmars-d-learn
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote: [code] int[] list; list = new int[0]; std.stdio.writeln("Is Null ? ", (list is null)); [/code] Result is "Is Null? true". Is this the correct behaviour? I would expect compiler to point to an address in the

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread Eric Niebler via Digitalmars-d
On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu wrote: On 10/10/15 12:58 AM, Eric Niebler wrote: To be honest, this whole conversation is kind of funny to me. It reminds me of the Bugs Bunny cartoon where Marvin the Martian plants his flag on Earth and says, "I claim this

Re: Beta D 2.069.0-b1

2015-10-10 Thread Jonathan M Davis via Digitalmars-d-announce
On Saturday, October 10, 2015 02:57:01 Meta via Digitalmars-d-announce wrote: > On Saturday, 10 October 2015 at 02:31:51 UTC, Martin Nowak wrote: > > That's what I meant, weird use-case, at best it's a callback > > better/setter. > > I've never written such code, but even if you would, the 2 > >

Re: AWS API Dlang, hmac sha256 function.

2015-10-10 Thread holo via Digitalmars-d-learn
On Friday, 9 October 2015 at 16:30:26 UTC, holo wrote: OK i find out error, in addRequestHeader i was using ":" after header name what casing problem. I removed it and now im getting "unauthorized". Here is how it looks right now: HTTP/1.1 401 Unauthorized\r\n [Expert Info

[Issue 12624] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 --- Comment #2 from Jonathan M Davis --- Well, this is a finicky one. I'd tried to reduce the failing code to something more manageable in the past and failed, but I thought that I'd take another stab at it, and simply

Re: Hash-Table-Based Multiple Arguments Replacement

2015-10-10 Thread Nordlöw via Digitalmars-d-learn
On Saturday, 10 October 2015 at 16:42:52 UTC, Nordlöw wrote: Found it: http://dlang.org/phobos/std_algorithm_comparison.html#predSwitch An alias would be perhaps be motivated to make newcomers easier grap that this can be used for whole replacements. Ahh, but this doesn't use a hash-table

Compile time and runtime grammars

2015-10-10 Thread DLangLearner via Digitalmars-d-learn
Only now I found that most of my confusions are with D's compile time grammar or features. As an excuse, my confusions can be partially attributed to the way D is presented: 1. There are confusing keywords: For example, there is a "if", there is also a "static if", there is a "if", and there

Re: Compile time and runtime grammars

2015-10-10 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Oct 10, 2015 at 06:52:29PM +, DLangLearner via Digitalmars-d-learn wrote: > Only now I found that most of my confusions are with D's compile time > grammar or features. As an excuse, my confusions can be partially > attributed to the way D is presented: > > 1. There are confusing

Re: How to check whether an empty array variable is null?

2015-10-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, October 10, 2015 15:20:02 tcak via Digitalmars-d-learn wrote: > [code] > int[] list; > > list = new int[0]; > > std.stdio.writeln("Is Null ? ", (list is null)); > [/code] > > Result is "Is Null? true". > > Is this the correct behaviour? I would expect compiler to point > to an

DIP74 - where is at?

2015-10-10 Thread Manu via Digitalmars-d
So I have another upcoming opportunity to introduce D in my workplace, this time as a front-end/plugin language to our C++ infrastructure, which is promising since I already have considerable experience in this area (my work at Remedy with Quantum Break), and there is a lot of recent work to

Re: -> and :: operators

2015-10-10 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 10 October 2015 at 22:54:15 UTC, Warwick wrote: On Friday, 9 October 2015 at 19:48:39 UTC, Dmitry Olshansky wrote: On 09-Oct-2015 21:44, Freddy wrote: Stole from D? You mean java right? There is no value type objects in Java so no. More likely C#. Delphi / Object Pascal had

Re: DIP74 - where is at?

2015-10-10 Thread Manu via Digitalmars-d
I'm rather in favour of DIP74... what's unprincipled about it? What would you do instead? On 11 October 2015 at 10:20, deadalnix via Digitalmars-d wrote: > On Saturday, 10 October 2015 at 23:25:49 UTC, Manu wrote: >> >> So I have another upcoming opportunity to

Re: DIP74 - where is at?

2015-10-10 Thread deadalnix via Digitalmars-d
On Sunday, 11 October 2015 at 04:35:03 UTC, Jonathan M Davis wrote: On Sunday, 11 October 2015 at 04:16:11 UTC, deadalnix wrote: If we go these DIP road, there is no coming back and this will get in the way of a principled approach. Then come up with an alternative DIP which shows a better

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 --- Comment #2 from Martin Nowak --- This is as annoying as go's stupid "unused variable" warning, at least during development. > I'm not sure how we can "fix" this and issue 14835. I guess the fix would be to mark those returns as

Re: Hash-Table-Based Multiple Arguments Replacement

2015-10-10 Thread Meta via Digitalmars-d-learn
On Saturday, 10 October 2015 at 16:19:53 UTC, Nordlöw wrote: Is there an algorithm somewhere in Phobos which performs when possible a replacement/substitution based on a variadic definition of replacements using hash-table search similar to string replaceWhole(string a) { switch (x) {

Re: How to check whether an empty array variable is null?

2015-10-10 Thread Meta via Digitalmars-d-learn
On Sunday, 11 October 2015 at 00:18:54 UTC, Meta wrote: On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis wrote: It basically didn't bother to allocate an array on the heap, because you asked for one with a length of zero. Efficiency-wise, it makes no sense to allocate anything.

Re: How to check whether an empty array variable is null?

2015-10-10 Thread Meta via Digitalmars-d-learn
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis wrote: It basically didn't bother to allocate an array on the heap, because you asked for one with a length of zero. Efficiency-wise, it makes no sense to allocate anything. You wouldn't be doing anything with the memory anyway.

Re: DIP74 - where is at?

2015-10-10 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 11 October 2015 at 04:16:11 UTC, deadalnix wrote: If we go these DIP road, there is no coming back and this will get in the way of a principled approach. Then come up with an alternative DIP which shows a better way to solve this. As it stands, it looks likely that we'll end up

Re: DIP74 - where is at?

2015-10-10 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 11 October 2015 at 00:20:08 UTC, deadalnix wrote: It doesn't looks like it is getting implemented. And, to be honest, I'd rather go a principle approach + library support rather than a pie of hacks. The pile of hacks approach is what made C++ C++. AFAIK, Walter and Andrei are

Re: Hash-Table-Based Multiple Arguments Replacement

2015-10-10 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 11 October 2015 at 00:16:44 UTC, Meta wrote: There was something like this proposed quite awhile ago (can't remember what it was, might've been extending unary/binaryFun to accept an AA), but it was rejected. With static foreach in a switch we can do better. I'll put together a

Re: DIP74 - where is at?

2015-10-10 Thread deadalnix via Digitalmars-d
On Sunday, 11 October 2015 at 05:18:26 UTC, Jonathan M Davis wrote: Well, if they won't listen, they won't listen. And if they're wrong, we'll be worse off for it. Unfortunately, I wasn't involved in those discussions and haven't looked into DIP 25 much (I was too busy at the time of the major

Re: DIP74 - where is at?

2015-10-10 Thread Freddy via Digitalmars-d
On Saturday, 10 October 2015 at 23:25:49 UTC, Manu wrote: [...] Speaking of DIP74 can't we just wrap a class in a struct with use reference counting with and use alias this?

Re: -> and :: operators

2015-10-10 Thread Warwick via Digitalmars-d
On Friday, 9 October 2015 at 19:48:39 UTC, Dmitry Olshansky wrote: On 09-Oct-2015 21:44, Freddy wrote: Stole from D? You mean java right? There is no value type objects in Java so no. More likely C#. Delphi / Object Pascal had it in the mid 90s IIRC. Long before C#, and possibly before

Re: Run D on AWS Lambda

2015-10-10 Thread Laeeth Isharc via Digitalmars-d-announce
On Sunday, 26 July 2015 at 03:55:17 UTC, Laeeth Isharc wrote: https://aws.amazon.com/lambda/ https://github.com/Laeeth/awslambda_d http://blog.0x82.com/2014/11/24/aws-lambda-functions-in-go/ No proper docs yet, but you can figure it out from the go example.

Re: Beta D 2.069.0-b1

2015-10-10 Thread deadalnix via Digitalmars-d-announce
On Saturday, 10 October 2015 at 02:57:03 UTC, Meta wrote: On Saturday, 10 October 2015 at 02:31:51 UTC, Martin Nowak wrote: That's what I meant, weird use-case, at best it's a callback better/setter. I've never written such code, but even if you would, the 2 pairs of parens are only a tiny

Re: Beta D 2.069.0-b1

2015-10-10 Thread deadalnix via Digitalmars-d-announce
On Saturday, 10 October 2015 at 16:31:27 UTC, Ola Fosheim Grøstad wrote: On Saturday, 10 October 2015 at 12:51:43 UTC, Jacob Carlborg wrote: In Ruby, no one will ever use empty parentheses for calling a method. That's actually the same as Simula. Functions/procedures with no parameters is

Re: DIP74 - where is at?

2015-10-10 Thread Freddy via Digitalmars-d
On Sunday, 11 October 2015 at 04:16:11 UTC, deadalnix wrote: The problem at hand is fairly well know at this stage: it is ownership. Everything else can be done as library. This.

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread Andrei Alexandrescu via Digitalmars-d
On 10/10/15 9:06 PM, Eric Niebler wrote: On Saturday, 10 October 2015 at 06:15:10 UTC, Andrei Alexandrescu wrote: On 10/10/15 12:58 AM, Eric Niebler wrote: To be honest, this whole conversation is kind of funny to me. It reminds me of the Bugs Bunny cartoon where Marvin the Martian plants his

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread deadalnix via Digitalmars-d
On Saturday, 10 October 2015 at 18:07:02 UTC, Eric Niebler wrote: If I implied that I believe that D ranges were based on Boost.Range, then I apologize. I don't believe that. I suspect (but don't know) that ranges in D were independently invented without knowledge of the long history of them

Re: Beta D 2.069.0-b1

2015-10-10 Thread deadalnix via Digitalmars-d-announce
On Saturday, 10 October 2015 at 01:52:36 UTC, Martin Nowak wrote: Right, ideally a @proptery function can perfectly replace a variable, but practically calling the return value seems far fetched. What would you use that for, a handwritten interface struct with function pointers made read-only

Re: DIP74 - where is at?

2015-10-10 Thread deadalnix via Digitalmars-d
On Sunday, 11 October 2015 at 01:48:05 UTC, Manu wrote: I'm rather in favour of DIP74... what's unprincipled about it? What would you do instead? Well, DIP25 and DIP74 are ad hoc adding to the language to support specific use cases. I think the whole thing is wrong headed. Ideally when

Re: How to check whether an empty array variable is null?

2015-10-10 Thread tcak via Digitalmars-d-learn
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis wrote: On Saturday, October 10, 2015 15:20:02 tcak via Digitalmars-d-learn wrote: [code] int[] list; list = new int[0]; std.stdio.writeln("Is Null ? ", (list is null)); [/code] Result is "Is Null? true". Is this the

Re: Compile time and runtime grammars

2015-10-10 Thread Ali Çehreli via Digitalmars-d-learn
On 10/10/2015 12:43 PM, H. S. Teoh via Digitalmars-d-learn wrote: > On Sat, Oct 10, 2015 at 06:52:29PM +, DLangLearner via Digitalmars-d-learn wrote: >> 1. There are confusing keywords: To OP: I am glad that you are not bothered with compile-time foreach. ;) > The "static" in "static if"

Re: DIP74 - where is at?

2015-10-10 Thread deadalnix via Digitalmars-d
On Saturday, 10 October 2015 at 23:25:49 UTC, Manu wrote: So I have another upcoming opportunity to introduce D in my workplace, this time as a front-end/plugin language to our C++ infrastructure, which is promising since I already have considerable experience in this area (my work at Remedy

Re: DIP74 - where is at?

2015-10-10 Thread deadalnix via Digitalmars-d
On Sunday, 11 October 2015 at 02:01:09 UTC, Jonathan M Davis wrote: AFAIK, Walter and Andrei are still in favor of something that's at least similar to DIP 74. Andrei made a comment in a thread just the other day that indicated that he was in favor of having a way to build reference counting

Re: -> and :: operators

2015-10-10 Thread Walter Bright via Digitalmars-d
On 10/9/2015 12:48 PM, Dmitry Olshansky wrote: On 09-Oct-2015 21:44, Freddy wrote: Stole from D? You mean java right? There is no value type objects in Java so no. More likely C#. Since C# was an internal Microsoft project at the time this was developed for D, no.

Re: DIP74 - where is at?

2015-10-10 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 11 October 2015 at 04:56:25 UTC, deadalnix wrote: On Sunday, 11 October 2015 at 04:35:03 UTC, Jonathan M Davis wrote: On Sunday, 11 October 2015 at 04:16:11 UTC, deadalnix wrote: If we go these DIP road, there is no coming back and this will get in the way of a principled approach.

Re: Categorizing Ranges

2015-10-10 Thread Joseph Rushton Wakeling via Digitalmars-d
On Wednesday, 7 October 2015 at 15:39:03 UTC, Jonathan M Davis wrote: Eager is far more general. Also, while the drop* functions are eager, the take* functions are not. I don't recall the precise details of these particular ranges off the top of my head (away from computer so can't easily

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread Andrei Alexandrescu via Digitalmars-d
On 10/10/15 12:58 AM, Eric Niebler wrote: To be honest, this whole conversation is kind of funny to me. It reminds me of the Bugs Bunny cartoon where Marvin the Martian plants his flag on Earth and says, "I claim this planet in the name of [Digital] Mars!" We Earthlings respectfully disagree.

Re: Shout out to D at cppcon, when talkign about ranges.

2015-10-10 Thread Andrei Alexandrescu via Digitalmars-d
On 10/10/15 12:58 AM, Eric Niebler wrote: Trying to express algorithms without any clear abstraction of "position within range" (independent of ranges) is hard and awkward, and occasionally causes algorithms to be less efficient. I agree that ranges are a weaker basis than iterators. But it's

[Issue 9800] Numerous issues with DWARF debug output

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9800 --- Comment #12 from Iain Buclaw --- (In reply to Iain Buclaw from comment #2) > > 7. DW_TAG_module is only valid for Fortran/Modula-2, but I'd argue that this > is a bug. It would be nice to represent statics as being part

[Issue 9800] Numerous issues with DWARF debug output

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9800 --- Comment #13 from Iain Buclaw --- (In reply to Iain Buclaw from comment #1) > I'll post this in a few parts for ease of taking in, starting with the TL;DR. > > It is evident that dmd needs some loving on it's side, but

[Issue 15180] [REG2.069.0-b1] Segfault with empty struct used as UDA

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15180 --- Comment #5 from Jacob Carlborg --- https://github.com/D-Programming-Language/dmd/pull/5181 --

Re: Beta D 2.069.0-b1

2015-10-10 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-10-10 03:52, Martin Nowak wrote: Scala and Ruby seem to do well with sloppy parens. A few notes about why Ruby doesn't have the same problems as D has: 1. Ruby has optional parentheses for all method calls, regardless if they accept arguments or not 2. Ruby has a different syntax