Re: What's the status of old-style operator overloads in D2?

2014-04-22 Thread bearophile via Digitalmars-d
Brian Schott: We have alias a = b; and alias b a;, so there's precedent for having two ways of doing exactly the same thing. I've just filed a bug report: https://issues.dlang.org/show_bug.cgi?id=12615 Bye, bearophile

Re: assumeSafeAppend on slice of static array?

2014-04-22 Thread bearophile via Digitalmars-d
H. S. Teoh: The question is, is there a way to take a slice of the static array, set the length to zero, and append to it with ~= such that when it runs out of space in the static buffer, it will reallocate a longer array on the GC heap? Or is this a bad idea? I suggested to add this to

Re: Redesign of dlang.org

2014-04-22 Thread Andrei Alexandrescu via Digitalmars-d
On 4/22/14, 3:32 AM, Kagamin wrote: On Monday, 21 April 2014 at 15:05:57 UTC, Andrei Alexandrescu wrote: Wait, are you advocating for text occupying the entire page width, like a telex band? Aren't text lines difficult to follow from the right side to the continuing left side? -- Andrei

Re: Digital Mars FTP mirror

2014-04-22 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 25 October 2013 at 17:41:41 UTC, Temtaime wrote: Hi ! I've made a mirror to ftp.digitalmars.com, sometimes download speed from DM's ftp is too poor(about 100 kb/s). It syncs with original ftp every 10 mins just checks for modified/new files(simply asks for the file list, there is

Re: Redesign of dlang.org

2014-04-22 Thread via Digitalmars-d
On Tuesday, 22 April 2014 at 20:01:27 UTC, Andrei Alexandrescu wrote: On 4/22/14, 3:32 AM, Kagamin wrote: What's problem with entire page width? I don't remember difficulty reading w3c docs or gcc docs or linux man pages even when they occupy the entire page width.

Re: assumeSafeAppend on slice of static array?

2014-04-22 Thread Ali Çehreli via Digitalmars-d
On 04/22/2014 11:10 AM, H. S. Teoh via Digitalmars-d wrote: is there a way to take a slice of the static array, set the length to zero, Currently, instead of setting the length to zero, you should start with the whole slice. and append to it with ~= Instead, you can use the output range

Re: Compile-time memory footprint of std.algorithm

2014-04-22 Thread Peter Alexander via Digitalmars-d
On Tuesday, 22 April 2014 at 18:09:12 UTC, Iain Buclaw wrote: Testing a 2.065 pre-release snapshot against GDC. I see that std.algorithm now surpasses 2.1GBs of memory consumption when compiling unittests. This is bringing my laptop down to its knees for a painful 2/3 minutes. My (ancient)

Re: CT info about class' children

2014-04-22 Thread Yuriy via Digitalmars-d
Any way to do it without patching druntime?

Re: Compile-time memory footprint of std.algorithm

2014-04-22 Thread Iain Buclaw via Digitalmars-d
On 22 April 2014 21:43, Peter Alexander via Digitalmars-d digitalmars-d@puremagic.com wrote: On Tuesday, 22 April 2014 at 18:09:12 UTC, Iain Buclaw wrote: Testing a 2.065 pre-release snapshot against GDC. I see that std.algorithm now surpasses 2.1GBs of memory consumption when compiling

Re: Redesign of dlang.org

2014-04-22 Thread Nick Sabalausky via Digitalmars-d
On 4/22/2014 4:39 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: This is the proper link: http://www.w3.org/TR/WCAG20-TECHS/ Man do I REALLY wish movie makers and game devs would at least TRY to follow this one: http://www.w3.org/TR/WCAG20-TECHS/G56.html In just the

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 12:27:23 UTC, Dicebot wrote: On Tuesday, 22 April 2014 at 06:53:41 UTC, Jacob Carlborg wrote: On 21/04/14 23:33, Dicebot wrote: I think it is very important to dogfood here and add any currently missing dependencies as dub packages instead. Unless we can use

Re: What's the status of old-style operator overloads in D2?

2014-04-22 Thread Meta via Digitalmars-d
On Tuesday, 22 April 2014 at 15:50:21 UTC, Daniel Murphy wrote: Andrej Mitrovic wrote in message news:ifghzjafvfqrqkhlp...@forum.dlang.org... Old-style operator overloads (such as opCom, opAnd, etc) have largely been superseded by new-style templated operator overloads (opUnary, opBinary,

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 16:38:04 UTC, Andrei Alexandrescu wrote: On 4/21/14, 11:51 PM, Jacob Carlborg wrote: On 21/04/14 23:23, Andrei Alexandrescu wrote: I confess getting a bit uncomfortable about adding new dependencies at this point. We depend on dpl-docs already, and the tool was

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 19:34:08 UTC, Jacob Carlborg wrote: On 2014-04-22 18:38, Andrei Alexandrescu wrote: I'm clearly outta my depth here, basing myself off of giving http://sass-lang.com/guide a couple minutes. From what I can tell here's how ddoc matches up sass features:

Re: Redesign of dlang.org

2014-04-22 Thread Martin Nowak via Digitalmars-d
I have also tried to design something myself (although I'm not a designer) and this is what I came up with: http://krcko.net/dlang.org/dlang-home-draft1.png I'm not entirely satisfied with it but I believe that it looks better (or at least more modern) than the current design. This looks

Re: Redesign of dlang.org

2014-04-22 Thread Martin Nowak via Digitalmars-d
On 04/21/2014 05:48 PM, Aleksandar Ruzicic wrote: Just one question, would it be okay to depend on node.js/npm to manage dependencies (i.e. CSS/JS frameworks) and build CSS/JS files? As I'd use Sass for styling, which must be translated to CSS (I'd use node-sass package witch doesn't require

ContractAssertErrors?

2014-04-22 Thread bearophile via Digitalmars-d
In most languages (even in D) there are testing tools based QuickCheck, that is a important alternative (or an extra tool to use) to the normal unittesting: http://en.wikipedia.org/wiki/QuickCheck The programmer writes assertions about logical properties that a function should fulfill, then

Re: What's the status of old-style operator overloads in D2?

2014-04-22 Thread Meta via Digitalmars-d
On Tuesday, 22 April 2014 at 21:35:31 UTC, Meta wrote: Does this work if test is in a different module from main? struct test { private int opBinary(string op: *)(test other) { return 3; } public alias opMul = opBinary!*; } void main() { test t1 = test(); test

Re: Redesign of dlang.org

2014-04-22 Thread Nick Sabalausky via Digitalmars-d
On 4/22/2014 6:26 PM, Martin Nowak wrote: On 04/21/2014 05:48 PM, Aleksandar Ruzicic wrote: Just one question, would it be okay to depend on node.js/npm to manage dependencies (i.e. CSS/JS frameworks) and build CSS/JS files? As I'd use Sass for styling, which must be translated to CSS (I'd use

Re: Redesign of dlang.org

2014-04-22 Thread Nick Sabalausky via Digitalmars-d
On 4/22/2014 5:47 PM, Aleksandar Ruzicic wrote: and would need a tool to concat those later to the target CSS (this can be done with cat but it's non-standard on windows) FWIW, on windows: type input1.txt output.txt type input2.txt output.txt type input3.txt output.txt

Re: Redesign of dlang.org

2014-04-22 Thread Adam D. Ruppe via Digitalmars-d
I wrote a css expander that has a little bit of SASS features. Previously it was hidden in my html.d on my misc. github, but I just now made it a standalone program in a separate repo: https://github.com/adamdruppe/cssexpand Check out the demo input file

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 22:26:39 UTC, Martin Nowak wrote: On 04/21/2014 05:48 PM, Aleksandar Ruzicic wrote: Just one question, would it be okay to depend on node.js/npm to manage dependencies (i.e. CSS/JS frameworks) and build CSS/JS files? As I'd use Sass for styling, which must be

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 22:24:25 UTC, Martin Nowak wrote: I have also tried to design something myself (although I'm not a designer) and this is what I came up with: http://krcko.net/dlang.org/dlang-home-draft1.png I'm not entirely satisfied with it but I believe that it looks better

Re: Redesign of dlang.org

2014-04-22 Thread Aleksandar Ruzicic via Digitalmars-d
On Tuesday, 22 April 2014 at 23:08:45 UTC, Adam D. Ruppe wrote: I wrote a css expander that has a little bit of SASS features. Previously it was hidden in my html.d on my misc. github, but I just now made it a standalone program in a separate repo: https://github.com/adamdruppe/cssexpand

-nofloat flag = should we destroy it?

2014-04-22 Thread Andrej Mitrovic via Digitalmars-d
See: https://issues.dlang.org/show_bug.cgi?id=8196 Are there any D platforms where -nofloat is useful? If we're not getting rid of it then it needs to be documented (the above issue).

Re: -nofloat flag = should we destroy it?

2014-04-22 Thread Mike via Digitalmars-d
On Tuesday, 22 April 2014 at 23:57:49 UTC, Andrej Mitrovic wrote: See: https://issues.dlang.org/show_bug.cgi?id=8196 Are there any D platforms where -nofloat is useful? If we're not getting rid of it then it needs to be documented (the above issue). Well, I couldn't find any documentation

Re: Redesign of dlang.org

2014-04-22 Thread Nick Sabalausky via Digitalmars-d
On 4/22/2014 7:29 PM, Aleksandar Ruzicic wrote: On Tuesday, 22 April 2014 at 22:26:39 UTC, Martin Nowak wrote: Why do you want to write the whole CSS yourself? Isn't something like bootstrap more appropriate for the task? I would use Foundation[1] instead of Bootstrap. [1]

Re: Redesign of dlang.org

2014-04-22 Thread Andrei Alexandrescu via Digitalmars-d
On 4/22/14, 1:39 PM, Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com wrote: On Tuesday, 22 April 2014 at 20:01:27 UTC, Andrei Alexandrescu wrote: On 4/22/14, 3:32 AM, Kagamin wrote: What's problem with entire page width? I don't remember difficulty reading w3c docs or gcc docs or

Re: Redesign of dlang.org

2014-04-22 Thread Rikki Cattermole via Digitalmars-d
On Tuesday, 22 April 2014 at 23:08:45 UTC, Adam D. Ruppe wrote: I wrote a css expander that has a little bit of SASS features. Previously it was hidden in my html.d on my misc. github, but I just now made it a standalone program in a separate repo: https://github.com/adamdruppe/cssexpand

Re: DIP60: @nogc attribute

2014-04-22 Thread Walter Bright via Digitalmars-d
On 4/22/2014 12:42 PM, Michel Fortin wrote: On 2014-04-22 19:02:05 +, Walter Bright newshou...@digitalmars.com said: Memory safety is not a strawman. It's a critical feature for a modern language, and will become ever more important. What you don't seem to get is that ARC, by itself, is

Re: DIP60: @nogc attribute

2014-04-22 Thread Walter Bright via Digitalmars-d
On 4/22/2014 4:00 AM, Don wrote: It turns out to have enormous value. I will explain this in my DConf talk. A little preview: Almost all of our code at Sociomantic obeys this behaviour, and it's probably the most striking feature of our codebase. By almost all I mean probably 90% of our code,

Auto return type inference issue?

2014-04-22 Thread Matthew Dudley via Digitalmars-d-learn
Here's the gist of what I'm trying to do. https://gist.github.com/pontifechs/11169069 I'm getting an error I don't understand: tinker.d(42): Error: mismatched function return type inference of tinker.B and tinker.A tinker.d(55): Error: template instance tinker.DynamicTuple!(A,

Re: Auto return type inference issue?

2014-04-22 Thread bearophile via Digitalmars-d-learn
Matthew Dudley: Also, as an aside, why can't tuples be indexed dynamically? Most of my problems with this have been because you apparently can't. Think about how D tuples are implemented, they are essentially structs. Every tuple element can have a different type and to be represented in

Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread ilya-stromberg via Digitalmars-d-learn
What should I add in the D program in GNU/Linux to throw exception if I have segmentation fault error? I read somewhere that it's possible, but I don't know how to do it.

Re: Function to print a diamond shape

2014-04-22 Thread Jay Norwood via Digitalmars-d-learn
Wow, joiner is much slower than join. Such a small choice can make this big of a difference. Not at all expected, since the lazy calls, I thought, were considered to be more efficient. This is with ldc2 -O2. jay@jay-ubuntu:~/ec_ddt/workspace/diamond/source$ ./main 1/dev/null brad: time:

Re: Best way to check for an element in an array?

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Mon, 21 Apr 2014 23:25:39 -0400, Taylor Hillegeist taylorh...@gmail.com wrote: So I find myself Doing this kind of thing very frequently. I have a Array of Somethings and i want to see if something specific is inside the array. I wrote a template for it. but is this the best way to do

Named template constraints

2014-04-22 Thread Tim Holzschuh via Digitalmars-d-learn
Hi there, I recently read the 'More Templates' chapter of Ali's book (-- thanks for that ;) ). At the section 'Named constraints', there were a definition like this: template isUsable(T) { enum isUsable = is ( typeof( { T obj; obj.call(); obj.otherCall(1);

Re: Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread Kagamin via Digitalmars-d-learn
You should write and register a signal handler. Implementation for x86-32 was posted here.

Re: Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread Dicebot via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 09:58:45 UTC, ilya-stromberg wrote: What should I add in the D program in GNU/Linux to throw exception if I have segmentation fault error? I read somewhere that it's possible, but I don't know how to do it. etc.linux.memoryerror Just remember that it is more of

Re: Named template constraints

2014-04-22 Thread Andrej Mitrovic via Digitalmars-d-learn
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What does (inout int = 0) mean/affect here? This was asked recently, see my reponse here: http://forum.dlang.org/post/mailman.102.1396007039.25518.digitalmars-d-le...@puremagic.com

Re: Named template constraints

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 10:58:41 -0400, Andrej Mitrovic via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On 4/22/14, Tim Holzschuh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What does (inout int = 0) mean/affect here? This was asked recently, see my

Re: Named template constraints

2014-04-22 Thread Hannes Steffenhagen via Digitalmars-d-learn
Not sure what InputRange is defined as atm, but I don't think anything should have to define init to be a valid inputrange.

Array of interface only with cast()?

2014-04-22 Thread Andre via Digitalmars-d-learn
Hi, I just stumbled about this issue with array of interface. I want to pass several objects (C and D) which shares the same interface A. It seems somehow cumbersome that it only works if there is a cast on the first element of the array. interface A{} class B: A{} class C: B{}; class D: B{};

Re: Named template constraints

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven Schveighoffer wrote: Note, is the r2 = R.init needed? Not sure. Yes: It R2 has no default init, or is an immutable, then that line will fail to compile.

Re: Array of interface only with cast()?

2014-04-22 Thread Andrej Mitrovic via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 15:19:55 UTC, Andre wrote: Is the cast really needed? It's a known issue and a filed bug report. I don't have the Issue number at hand though, someone else will likely provide it.

Re: Function to print a diamond shape

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 05:05:30 UTC, Jay Norwood wrote: On Monday, 21 April 2014 at 08:26:49 UTC, monarch_dodra wrote: The two key points here, first, is to avoid using appender. Second, instead of having two buffer: and **\n, and two do two slice copies, to only have 1 buffer

Re: Array of interface only with cast()?

2014-04-22 Thread Andre via Digitalmars-d-learn
Am 22.04.2014 17:23, schrieb Andrej Mitrovic: On Tuesday, 22 April 2014 at 15:19:55 UTC, Andre wrote: Is the cast really needed? It's a known issue and a filed bug report. I don't have the Issue number at hand though, someone else will likely provide it. Nice to hear that it is not by

Re: Function to print a diamond shape

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 11:41:41 UTC, Jay Norwood wrote: Wow, joiner is much slower than join. Such a small choice can make this big of a difference. Not at all expected, since the lazy calls, I thought, were considered to be more efficient. This is with ldc2 -O2. Yeah, that's

Re: Named template constraints

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 11:15:14 -0400, monarch_dodra monarchdo...@gmail.com wrote: On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven Schveighoffer wrote: Note, is the r2 = R.init needed? Not sure. Yes: It R2 has no default init, or is an immutable, then that line will fail to compile. I

Re: Array of interface only with cast()?

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 11:19:57 -0400, Andre an...@s-e-a-p.de wrote: Hi, I just stumbled about this issue with array of interface. I want to pass several objects (C and D) which shares the same interface A. It seems somehow cumbersome that it only works if there is a cast on the first element of

Re: Named template constraints

2014-04-22 Thread Andrej Mitrovic via Digitalmars-d-learn
On 4/22/14, Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com I think this can be fixed a different way. Feel free to file a bug / make a pull. :

Re: Named template constraints

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven Schveighoffer wrote: On Tue, 22 Apr 2014 11:15:14 -0400, monarch_dodra monarchdo...@gmail.com wrote: On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven Schveighoffer wrote: Note, is the r2 = R.init needed? Not sure. Yes: It R2 has no default

Re: Array of interface only with cast()?

2014-04-22 Thread bearophile via Digitalmars-d-learn
Andre: Nice to hear that it is not by design but will be fixed. See: https://issues.dlang.org/show_bug.cgi?id=3543 Bye, bearophile

Re: Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread ilya-stromberg via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 14:49:58 UTC, Dicebot wrote: On Tuesday, 22 April 2014 at 09:58:45 UTC, ilya-stromberg wrote: What should I add in the D program in GNU/Linux to throw exception if I have segmentation fault error? I read somewhere that it's possible, but I don't know how to do it.

Re: Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread Dicebot via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 15:47:37 UTC, ilya-stromberg wrote: On Tuesday, 22 April 2014 at 14:49:58 UTC, Dicebot wrote: On Tuesday, 22 April 2014 at 09:58:45 UTC, ilya-stromberg wrote: What should I add in the D program in GNU/Linux to throw exception if I have segmentation fault error? I

The lifetime of reduce's internal seed

2014-04-22 Thread Ali Çehreli via Digitalmars-d-learn
I opened the following bug before reading reduce's documentation carefully: https://issues.dlang.org/show_bug.cgi?id=12610 import std.stdio; import std.algorithm; void main() { int[] arr = [ 0 ]; int[1] seed; int[] result = reduce!((sum, _) = sum[])(seed, arr); writefln(%s,

Re: The lifetime of reduce's internal seed

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 17:31:22 UTC, Ali Çehreli wrote: I opened the following bug before reading reduce's documentation carefully: https://issues.dlang.org/show_bug.cgi?id=12610 import std.stdio; import std.algorithm; void main() { int[] arr = [ 0 ]; int[1] seed; int[]

Re: Named template constraints

2014-04-22 Thread Ali Çehreli via Digitalmars-d-learn
On 04/22/2014 07:07 AM, Tim Holzschuh via Digitalmars-d-learn wrote: read the 'More Templates' chapter of Ali's book (-- thanks for that ;) ). Yay! :) At the section 'Named constraints', there were a definition like this: template isUsable(T) { enum isUsable = is ( typeof( {

Re: Named template constraints

2014-04-22 Thread Tim Holzschuh via Digitalmars-d-learn
Am 22.04.2014 16:58, schrieb Andrej Mitrovic via Digitalmars-d-learn: On 4/22/14, Tim Holzschuh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What does (inout int = 0) mean/affect here? This was asked recently, see my reponse here:

Re: The lifetime of reduce's internal seed

2014-04-22 Thread Ali Çehreli via Digitalmars-d-learn
On 04/22/2014 11:03 AM, monarch_dodra wrote: On Tuesday, 22 April 2014 at 17:31:22 UTC, Ali Çehreli wrote: I opened the following bug before reading reduce's documentation carefully: https://issues.dlang.org/show_bug.cgi?id=12610 import std.stdio; import std.algorithm; void main() {

Re: The lifetime of reduce's internal seed

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 14:17:57 -0400, Ali Çehreli acehr...@yahoo.com wrote: I don't think there is slicing an rvalue though. (?) reduce() is taking a copy of the seed and then returning a slice to it because the user slices it in their lambda. It effectively does the following, which

Re: Named template constraints

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 11:36:07 -0400, monarch_dodra monarchdo...@gmail.com wrote: On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven Schveighoffer wrote: Also, an immutable can be initialized that way: immutable int[] = int[].init; Isn't that exactly R.init ? Yes, you said if it's an

Re: The lifetime of reduce's internal seed

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 14:47:19 -0400, monarch_dodra monarchdo...@gmail.com wrote: In this case no, but; // int[1] foo(); int[] a = foo(); // *is* slicing an rvalue, and it *does* compile. I don't think there needs to be escape analysis to catch this. Oh yeah, that's bad. -Steve

Re: The lifetime of reduce's internal seed

2014-04-22 Thread monarch_dodra via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 18:34:47 UTC, Steven Schveighoffer wrote: On Tue, 22 Apr 2014 14:17:57 -0400, Ali Çehreli acehr...@yahoo.com wrote: I don't think there is slicing an rvalue though. (?) reduce() is taking a copy of the seed and then returning a slice to it because the user slices

Re: Named template constraints

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 14:50:44 -0400, monarch_dodra monarchdo...@gmail.com wrote: On Tuesday, 22 April 2014 at 18:35:58 UTC, Steven Schveighoffer wrote: On Tue, 22 Apr 2014 11:36:07 -0400, monarch_dodra monarchdo...@gmail.com wrote: On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven

Variable Naming Issue (Conflicts?)

2014-04-22 Thread Casey via Digitalmars-d-learn
Hello, I'm working on some code where I'm trying to generate structs that map to JSON documents via a mixin. That part works except when specific variable gets created. Below is the error that I'm getting: source/objects.d-mixin-70(75): Error: no identifier for declarator string

Re: Variable Naming Issue (Conflicts?)

2014-04-22 Thread bearophile via Digitalmars-d-learn
Casey: My question is, is there a way I can prevent this conflict from occurring without affecting what the struct will look like? The usual strategy is to append an underscore. (I think C# uses a @ prefix). Bye, bearophile

Re: Variable Naming Issue (Conflicts?)

2014-04-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 22 Apr 2014 15:35:33 -0400, Casey sybra...@gmail.com wrote: If I prefix all of the generated variables with an underscore, it works fine. It looks like the variable delete is the issue. To me, it looks like it's expecting some sort of delete method. delete is a keyword, it cannot

Re: Variable Naming Issue (Conflicts?)

2014-04-22 Thread Casey via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 19:38:09 UTC, bearophile wrote: Casey: My question is, is there a way I can prevent this conflict from occurring without affecting what the struct will look like? The usual strategy is to append an underscore. (I think C# uses a @ prefix). Bye, bearophile

Re: Variable Naming Issue (Conflicts?)

2014-04-22 Thread bearophile via Digitalmars-d-learn
Casey: I've done that, but then it changes the name which, from what I've read in the documentation, means the JSON - object conversion won't work since it won't see a variable named delete. Perhaps we need a built-in syntax solution as in C#, like a $delete. Bye, bearophile

Re: Variable Naming Issue (Conflicts?)

2014-04-22 Thread Casey via Digitalmars-d-learn
Perhaps we need a built-in syntax solution as in C#, like a $delete. So, two things: 1. I guess my current approach is screwed. I figured as much. 2. Seeing $delete makes me miss Perl/PHP variable naming. It is one extra character, but it did make them stand out more. Anyway, thanks.

Re: Auto return type inference issue?

2014-04-22 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 22 April 2014 at 07:54:34 UTC, Matthew Dudley wrote: Here's the gist of what I'm trying to do. https://gist.github.com/pontifechs/11169069 I'm getting an error I don't understand: tinker.d(42): Error: mismatched function return type inference of tinker.B and tinker.A

[Issue 12612] Case-sensitivity issue in Windows

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12612 Manu turkey...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 12394] Regression: std.regex unittests take agonizingly long to run - like hours on OSX

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

[Issue 12394] Regression: std.regex unittests take agonizingly long to run - like hours on OSX

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12394 --- Comment #3 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/a6cb0315a5e0188a60796453fc2bcfdecf8a2c75 fix Issue 12394 -

[Issue 12535] The language introduction page is not linked from index

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12535 j...@red.email.ne.jp changed: What|Removed |Added Keywords||pull --- Comment #1 from

[Issue 11171] Text relocations in Phobos shared library

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11171 --- Comment #10 from Martin Nowak c...@dawg.eu --- This is fixed for x86_64, but there are still text relocations on x86_32. The bug is also related to making ModuleInfo const, see bug 11543. --

[Issue 12535] The language introduction page is not linked from index

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12535 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/47999c96d9a084f5e484d00ac64031d64bcc7bea Merge pull

[Issue 12535] The language introduction page is not linked from index

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12535 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 12536] Improve the documentation about preprocessing the files has Ddoc file header

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12536 Issue 12536 depends on issue 12535, which changed state. Issue 12535 Summary: The language introduction page is not linked from index https://issues.dlang.org/show_bug.cgi?id=12535 What|Removed |Added

[Issue 12608] Dead assignment in UUIDParsingException

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

[Issue 12613] New: Diagnostic for calling convention mismatch when implementing/overriding methods should improve

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12613 Issue ID: 12613 Summary: Diagnostic for calling convention mismatch when implementing/overriding methods should improve Product: D Version: D2 Hardware: All OS:

[Issue 12613] Diagnostic for calling convention mismatch when implementing/overriding methods should improve

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12613 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com --- Ok so this is a bit weird, in 'InterfaceDeclaration::semantic' COM interfaces are handled like so: if (com) sc-linkage = LINKwindows; else if (cpp) sc-linkage

[Issue 12538] ZeroBUGS links are broken

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12538 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 12614] New: D Interface Files: package.di does not work

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12614 Issue ID: 12614 Summary: D Interface Files: package.di does not work Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: minor

[Issue 12456] Regression: Direct downloads are no longer available from the changelog

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12456 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 12614] D Interface Files: package.di does not work

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12614 Andre an...@s-e-a-p.de changed: What|Removed |Added CC||an...@s-e-a-p.de --

[Issue 12383] dlang.org operator overloading text with DDoc macro.

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12383 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 12293] std.algorithm.forward documentation

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12293 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 12006] dlang.org/index.html leads to It works! page

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12006 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 12005] DDoc example refers to a dead project, yet a more recent one exists that is not mentioned.

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12005 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 3543] [tdpl] ternary operator can't find common type for classes/interfaces

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3543 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC||schvei...@yahoo.com

[Issue 9054] std.net.curl byLineAsync and byChunkAsync broken.

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9054 --- Comment #2 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/039a237cbadf681d1d66436bde67af6a389d8920 fixes Issue 9054 -

[Issue 12005] DDoc example refers to a dead project, yet a more recent one exists that is not mentioned.

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

[Issue 12005] DDoc example refers to a dead project, yet a more recent one exists that is not mentioned.

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12005 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/7d44c76018b5123db90342c970443ca8140d24c7 Fix Issue 12005

[Issue 12538] ZeroBUGS links are broken

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12538 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 12538] ZeroBUGS links are broken

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12538 --- Comment #2 from Martin Nowak c...@dawg.eu --- https://github.com/D-Programming-Language/dlang.org/commit/9520e19218eb921b1dc0a7eb6f40be42fcdf9684 --

[Issue 12615] New: Warn against, and then deprecate old alias syntax

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12615 Issue ID: 12615 Summary: Warn against, and then deprecate old alias syntax Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

[Issue 12616] New: AssertError in std.utf.decode

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12616 Issue ID: 12616 Summary: AssertError in std.utf.decode Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

[Issue 12617] New: Add old-style operator overloading to the Deprecated Features page

2014-04-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12617 Issue ID: 12617 Summary: Add old-style operator overloading to the Deprecated Features page Product: D Version: D2 Hardware: All OS: All Status: NEW

<    1   2   3   >