Re: vibe.d Subdirectory?

2015-01-15 Thread Adam D. Ruppe via Digitalmars-d-learn
If your php stores sessions in files, you can just read those files from D. Though that's horribly slow and I don't think php does that by default any more. But it really depends on how the PHP is configured to see how easy it will be. It might just be a cookie to read then index into a

Re: Cross compiler for embedded microcontrollers ?

2015-01-15 Thread Jens Bauer via Digitalmars-d
It seems I've found it... http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler -It also seems I have to use gcc-4.9, as the gcc-4.8 branch does not seem to exist in the git repository ?

[Issue 13183] C++ namespace should not conflict with import root package

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 Paul O'Neil redballoo...@gmail.com changed: What|Removed |Added CC||redballoo...@gmail.com

Re: What is the D plan's to become a used language?

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 18:00:38 UTC, Adam D. Ruppe wrote: We're kinda going off topic here, but.. Getting dependency free cook-book stuff on the web, that you just cut'n'paste into your editor could have a huge influence on D becoming more used. Encouraging people to write small

Re: Common makefile (gasp) stuff

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 04:08:14PM +, Dicebot via Digitalmars-d wrote: Important thing here is that starting with git 1.8.2 it is possible to set submodule to track head of remote branch instead of fixed commit hash - which fixes the maintenance issue and is exactly the thing needed for

Re: What is the D plan's to become a used language?

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 1:42 AM, weaselcat wrote: On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei Alexandrescu wrote: On 1/14/15 7:19 PM, brian wrote: My point was that there are fewer examples of *how* to do things in D. This will discourage the new user, which will prevent it becoming a more popular

Re: Shared and GC

2015-01-15 Thread via Digitalmars-d-learn
On Thursday, 15 January 2015 at 15:31:17 UTC, Peter Alexander wrote: On Thursday, 15 January 2015 at 15:24:55 UTC, Ola Fosheim Grøstad wrote: That would be nice, because then a precise garbage collector could choose between local collection scans and global collection scans. I think

[WORK] Please help eliminate undefined macros on dlang.org

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
I've just created https://github.com/D-Programming-Language/dlang.org/pull/767 and built the entire dlang.org with it in tow. Please review and pull. Now looking through the source of the generate html sources it's easy to see where the undefined macros are being used, and clean up and debug

Re: Shared and GC

2015-01-15 Thread Peter Alexander via Digitalmars-d-learn
On Thursday, 15 January 2015 at 17:05:32 UTC, Ola Fosheim Grøstad wrote: On Thursday, 15 January 2015 at 15:31:17 UTC, Peter Alexander wrote: On Thursday, 15 January 2015 at 15:24:55 UTC, Ola Fosheim Grøstad wrote: That would be nice, because then a precise garbage collector could choose

Re: Common makefile (gasp) stuff

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 10:27 AM, H. S. Teoh via Digitalmars-d wrote: On Thu, Jan 15, 2015 at 04:08:14PM +, Dicebot via Digitalmars-d wrote: Important thing here is that starting with git 1.8.2 it is possible to set submodule to track head of remote branch instead of fixed commit hash - which fixes the

Re: More recent work on GC

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Wed, Jan 14, 2015 at 08:07:37PM +, deadalnix via Digitalmars-d wrote: On Wednesday, 14 January 2015 at 18:01:22 UTC, H. S. Teoh via Digitalmars-d wrote: Recently in one of my projects I found that I can gain a huge performance improvement just by calling GC.disable() at the beginning

Re: Cross compiler for embedded microcontrollers ?

2015-01-15 Thread Iain Buclaw via Digitalmars-d
On 15 January 2015 at 16:49, Jens Bauer via Digitalmars-d digitalmars-d@puremagic.com wrote: It seems I've found it... http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler -It also seems I have to use gcc-4.9, as the gcc-4.8 branch does not seem to exist in the git repository ?

Re: What is the D plan's to become a used language?

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 12:49 AM, Szymon Gatner wrote: On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei Alexandrescu wrote: On 1/14/15 7:19 PM, brian wrote: My point was that there are fewer examples of *how* to do things in D. This will discourage the new user, which will prevent it becoming a more

Re: no size yet for forward reference for nested structures

2015-01-15 Thread Ali Çehreli via Digitalmars-d
On 01/15/2015 06:56 AM, zeljkog wrote: This compiles: import std.container; class Node { DList!Node children; } So does using an 'interface', which may be more desirable in some cases: import std.container; interface Iface {} class Node : Iface { SList!Iface children; } void

Re: What is the D plan's to become a used language?

2015-01-15 Thread Adam D. Ruppe via Digitalmars-d
We're kinda going off topic here, but.. (BTW, I just hit escape AGAIN after typing that. my vim habits are going overgrown!) On Thursday, 15 January 2015 at 16:31:56 UTC, Ola Fosheim Grøstad wrote: Right, and it is more fun if you get response on reddit etc, so something short and useful

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 18:16:36 UTC, Nordlöw wrote: On Thursday, 15 January 2015 at 13:59:04 UTC, Tobias Pankrath wrote: StoppingPolicy is not a template parameter, it is this one: http://dlang.org/phobos/std_range.html#.StoppingPolicy Ok, great! However, none of the variants of

Re: What is the D plan's to become a used language?

2015-01-15 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 15 January 2015 at 17:32:11 UTC, CraigDillabaugh wrote: On Thursday, 15 January 2015 at 16:53:14 UTC, Andrei Alexandrescu wrote: On 1/15/15 1:42 AM, weaselcat wrote: On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei Alexandrescu wrote: On 1/14/15 7:19 PM, brian wrote: My point

Re: What is the D plan's to become a used language?

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 06:00:36PM +, Adam D. Ruppe via Digitalmars-d wrote: We're kinda going off topic here, but.. (BTW, I just hit escape AGAIN after typing that. my vim habits are going overgrown!) [...] Only just??! For years now I've had this uncontrollable twitch in my left hand,

Re: What is the D plan's to become a used language?

2015-01-15 Thread CraigDillabaugh via Digitalmars-d
On Thursday, 15 January 2015 at 16:53:14 UTC, Andrei Alexandrescu wrote: On 1/15/15 1:42 AM, weaselcat wrote: On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei Alexandrescu wrote: On 1/14/15 7:19 PM, brian wrote: My point was that there are fewer examples of *how* to do things in D. This

[Issue 13976] Value range propagation to disable some slice bound tests

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13976 Per Nordlöw per.nord...@gmail.com changed: What|Removed |Added CC||per.nord...@gmail.com

[Issue 13986] New: auto return for some recursive functions

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13986 Issue ID: 13986 Summary: auto return for some recursive functions Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 13:59:04 UTC, Tobias Pankrath wrote: StoppingPolicy is not a template parameter, it is this one: http://dlang.org/phobos/std_range.html#.StoppingPolicy Ok, great! However, none of the variants of zip, including all the three policies, fulfills my needs in

Re: Cross compiler for embedded microcontrollers ?

2015-01-15 Thread Jens Bauer via Digitalmars-d
On Thursday, 15 January 2015 at 16:58:34 UTC, Iain Buclaw via Digitalmars-d wrote: On 15 January 2015 at 16:49, Jens Bauer via Digitalmars-d -It also seems I have to use gcc-4.9, as the gcc-4.8 branch does not seem to exist in the git repository ? That should be gdc-4.8, gdc-4.9 I just

[Issue 13987] New: Invalid struct segfaults

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13987 Issue ID: 13987 Summary: Invalid struct segfaults Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1

Re: The ANSI character set is very important for operating MSSQL, if no conversion,will attract more C# users

2015-01-15 Thread FrankLike via Digitalmars-d
On Wednesday, 14 January 2015 at 17:19:42 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 14 January 2015 at 16:44:35 UTC, FrankLike wrote: Not a good idea. What is not a good idea? The default collation differs based on the OS settings AFAIK. In western countries it probably is ISO8859-1

Shared and GC

2015-01-15 Thread via Digitalmars-d-learn
I am trying to understand the idea behind shared typing fully. If I am only allowed to share objects with another thread if it is typed shared, doesn't that imply that it should be allocated as shared too and only be allowed to contain pointers to shared? That would be nice, because then a

[Issue 519] Invariant not called from autogenerated class/struct constructor/destructor

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=519 --- Comment #18 from Andrei Alexandrescu and...@erdani.com --- (In reply to Martin Nowak from comment #17) (In reply to Andrei Alexandrescu from comment #16) I stated this elsewhere, just making sure I don't forget: probably we don't want to

Re: Common makefile (gasp) stuff

2015-01-15 Thread Dicebot via Digitalmars-d
Important thing here is that starting with git 1.8.2 it is possible to set submodule to track head of remote branch instead of fixed commit hash - which fixes the maintenance issue and is exactly the thing needed for meta-dlang repo.

Re: vibe.d Subdirectory?

2015-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/14/15 11:31 AM, Laeeth Isharc wrote: To be very clear: in the simple case when you compile your vibe application from multiple source files and diet templates etc, and you will end up with an executable. This can act as a server directly, or you can make it an internal server on localhost

Re: Druntime and phobos with dub

2015-01-15 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-15 07:34, NVolcz wrote: Nice work! Central searchable documentation for third party libraries registered on code.dlang.org could be a killer :-). Yeah, I asked Sönke about that [1]. [1] http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/3528/ -- /Jacob

Re: vibe.d Subdirectory?

2015-01-15 Thread Dicebot via Digitalmars-d-learn
On Thursday, 15 January 2015 at 14:38:16 UTC, Steven Schveighoffer wrote: Pardon me for asking kind of a side question, but is there any online information on how to do this? I am contemplating migrating my in-house php-based application to vibe.d, but I wondered if I have to do it whole-sale

Re: What is the D plan's to become a used language?

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 15:38:05 UTC, Adam D. Ruppe wrote: I could totally fill in the project spotlight with stuff from that repo for at least a year, not even kidding. But I don't want it to be all about me! Right, and it is more fun if you get response on reddit etc, so something

Re: Druntime and phobos with dub

2015-01-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 January 2015 at 06:34:59 UTC, NVolcz wrote: Central searchable documentation for third party libraries registered on code.dlang.org could be a killer :-). My dpldocs.info predates code.dlang.org... but it actually does that, in its own kinda quirky way:

Re: What is the D plan's to become a used language?

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 14:53:23 UTC, Adam D. Ruppe wrote: On Wednesday, 14 January 2015 at 10:45:17 UTC, Ola Fosheim Grøstad wrote: «twitcurl is a pure C++ library for twitter APIs. twitcurl uses cURL for handling HTTP requests and responses.» I feel like I say this all the time

Re: What is the D plan's to become a used language?

2015-01-15 Thread FrankLike via Digitalmars-d
On Thursday, 15 January 2015 at 15:38:05 UTC, Adam D. Ruppe wrote: mssql.d - drivers for database.d (wrapping C libraries) minigui.d - small, dependency-free (except for simpledisplay.d and color.d but doesn't even need Phobos) widget set, using Win32 native widgets where possible, custom

Re: What is the D plan's to become a used language?

2015-01-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 January 2015 at 14:57:48 UTC, Ola Fosheim Grøstad wrote: Sounds like perfect topic for your newsletter? :) I could totally fill in the project spotlight with stuff from that repo for at least a year, not even kidding. But I don't want it to be all about me! (and oauth.d isn't

Re: Common makefile (gasp) stuff

2015-01-15 Thread Dicebot via Digitalmars-d
On Thursday, 15 January 2015 at 07:33:38 UTC, Jacob Carlborg wrote: On 2015-01-14 21:54, Andrei Alexandrescu wrote: I hear you but The Internet says submodules are a kind of a bummer. Most issues I have read about is because they don't know how submodules work. It's the same thing with most

Cross compiler for embedded microcontrollers ?

2015-01-15 Thread Jens Bauer via Digitalmars-d
Hi, Today is my first D-day. I haven't even written any d-code yet, but I've got the compiler for my PPC-based Mac (yes, it's old). I'm familiar with compiling toolchains for ARM Cortex-M0, M3 and M4. Is there any information on how to build a cross-gdc targetting these architectures ? Eg. the

Re: vibe.d Subdirectory?

2015-01-15 Thread via Digitalmars-d-learn
On Thursday, 15 January 2015 at 14:38:16 UTC, Steven Schveighoffer wrote: vibe.d and php can share session data. But I also have no idea which server should be in front, and how to call one another ;) If you are going to replace php then you probably want to have the d-server in front and

Re: What is the D plan's to become a used language?

2015-01-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 14 January 2015 at 10:45:17 UTC, Ola Fosheim Grøstad wrote: «twitcurl is a pure C++ library for twitter APIs. twitcurl uses cURL for handling HTTP requests and responses.» I feel like I say this all the time but there's a twitter bit hidden in my misc. D modules, in oauth.d

Re: no size yet for forward reference for nested structures

2015-01-15 Thread zeljkog via Digitalmars-d
This compiles: import std.container; class Node { DList!Node children; }

Re: Shared and GC

2015-01-15 Thread Peter Alexander via Digitalmars-d-learn
On Thursday, 15 January 2015 at 15:24:55 UTC, Ola Fosheim Grøstad wrote: I am trying to understand the idea behind shared typing fully. If I am only allowed to share objects with another thread if it is typed shared, doesn't that imply that it should be allocated as shared too and only be

Re: The ANSI character set is very important for operating MSSQL, if no conversion,will attract more C# users

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 14:50:29 UTC, FrankLike wrote: The wstring displayed ok in cmd,but not ok in gui(must use the fromMBS fuction),so I want to test change the gui'control.d ,set text property is Tstring ,by verstion(ANSI),set text is wstring ,else ,set text is string. Ah, ok.

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 13:13:57 UTC, Nordlöw wrote: I just discovered that zip has StoppingPolicy so why does auto commonPrefixLength(R...)(R ranges) if (ranges.length == 2) { import std.range: zip; return zip!((a, b) = a[0] != b[1])(ranges); } I did a silly mistake. The

Re: commonLength

2015-01-15 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 15 January 2015 at 19:24:16 UTC, Nordlöw wrote: On Thursday, 15 January 2015 at 13:13:57 UTC, Nordlöw wrote: I just discovered that zip has StoppingPolicy so why does auto commonPrefixLength(R...)(R ranges) if (ranges.length == 2) { import std.range: zip; return zip!((a, b)

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 19:19:22 UTC, Marc Schütz wrote: When you say copy, I expect that to mean do a bitwise copy and call the postblit. Postblit is obviously not desired here, but merely doing the bitwise copy is enough. That's a move, because afterwards the original location isn't

Re: More tricky range semantics

2015-01-15 Thread Joseph Rushton Wakeling via Digitalmars-d
On 15/01/15 21:53, H. S. Teoh via Digitalmars-d wrote: a) At least as things currently stand, passing (wrapper) ranges around may exhibit undefined behaviour, like the above. Passing a range to a function may invalidate it unless you use .save. Therefore, one should *always* use .save. (If we

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 19:30:21 UTC, Tobias Pankrath wrote: What's wrong with commonPrefix(..).length? Ahh, sorry that works too. I'm surprised :) DMD/Phobos has become really clever at avoiding allocation. Seems there may be need for both commonPrefixCount and

[Issue 13988] New: simplify/cleanup rt.lifetime

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13988 Issue ID: 13988 Summary: simplify/cleanup rt.lifetime Product: D Version: unspecified Hardware: Other OS: Linux Status: NEW Severity: normal

Re: Is anyone working on a D source code formatting tool?

2015-01-15 Thread HaraldZealot via Digitalmars-d
On Saturday, 10 January 2015 at 20:18:03 UTC, Walter Bright wrote: Has someone made a dfmt, like http://gofmt.com/ ? I with one my good student have started project coDewife 1,5 month ago. It based on some interesting theoretical approach (something like FSM, but with essential differences).

Re: auto return for some recursive functions in C++11

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 00:05:32 UTC, Xinok wrote: I played with it a bit and it seems to deduce a common type from all the return statements, which would be more in the style of D anyways (take type deduction for arrays). Yes, this has changed some time ago, the specs are already

Re: vibe.d Subdirectory?

2015-01-15 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 15 January 2015 at 14:38:16 UTC, Steven Schveighoffer wrote: On 1/14/15 11:31 AM, Laeeth Isharc wrote: To be very clear: in the simple case when you compile your vibe application from multiple source files and diet templates etc, and you will end up with an executable. This can

Re: commonLength

2015-01-15 Thread Ali Çehreli via Digitalmars-d-learn
On 01/15/2015 11:24 AM, Nordlöw wrote: On Thursday, 15 January 2015 at 13:13:57 UTC, Nordlöw wrote: I just discovered that zip has StoppingPolicy so why does auto commonPrefixLength(R...)(R ranges) if (ranges.length == 2) { import std.range: zip; return zip!((a, b) = a[0] !=

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 19:49:14 UTC, Ali Çehreli wrote: auto commonPrefixLength(S, T)(S a, T b) { import std.range: zip; import std.algorithm: count; return zip(a, b).count!(ab = ab[0] == ab[1]); } unittest { assert(commonPrefixLength(açde, ) == 0);

Re: commonLength

2015-01-15 Thread Nordlöw
On Thursday, 15 January 2015 at 19:30:21 UTC, Tobias Pankrath wrote: On Thursday, 15 January 2015 at 19:24:16 UTC, Nordlöw wrote: On Thursday, 15 January 2015 at 13:13:57 UTC, Nordlöw wrote: I just discovered that zip has StoppingPolicy so why does auto commonPrefixLength(R...)(R ranges) if

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Wednesday, 14 January 2015 at 17:45:28 UTC, deadalnix wrote: On Wednesday, 14 January 2015 at 11:17:52 UTC, Marc Schütz wrote: Your claims: - Exceptions are for I have no idea what to do about this situations. - exceptions for control flow [...] makes for very unreadable/unmaintainable

Re: Map Lambda with Side-Effects

2015-01-15 Thread Nordlöw
On Wednesday, 14 January 2015 at 01:15:57 UTC, Tobias Pankrath wrote: Is it possible to - detect that a lambda is has-side-effects and that - the map hasn't been used? Thing is: I'm regularly doing that on purpose. Could you show me a code example? I'm curious. Actually, isn't your

Re: Why exceptions for error handling is so important

2015-01-15 Thread Tobias M via Digitalmars-d
On Thursday, 15 January 2015 at 21:28:59 UTC, H. S. Teoh via Digitalmars-d wrote: Unless, of course, the *purpose* of the program is specifically to deal with problem situations -- in which case, you wouldn't be using exceptions to indicate those situations, you'd treat them as normal input

Re: vibe.d Subdirectory?

2015-01-15 Thread Steven Schveighoffer via Digitalmars-d-learn
Thanks everyone for the tips. -Steve

Re: More tricky range semantics

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 12:53 PM, H. S. Teoh via Digitalmars-d wrote: This issue is already latent in almost*all* Phobos algorithms. We only haven't discovered it yet because most people just use arrays for ranges. But all it takes is for somebody to start using std.range.inputRangeObject (and there are

Re: What is the D plan's to become a used language?

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 12:41 PM, Mengu wrote: bearophile did an awesome job. hats off. Yes, fantastic. i've noticed there are some code that are not working such as the anonymous recursion example. [0] the first example there doesn't work but the second one works with DMD64 D Compiler v2.066. let's

Re: What is the D plan's to become a used language?

2015-01-15 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: I wonder how to feature Rosetta Code more prominently on dlang.org. I don't know. One option is to create a kind of FAQ page in the D wiki, that associates problems and questions with links to specific entries in the Rosettacode site. Bye, bearophile

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Thursday, 15 January 2015 at 21:48:25 UTC, Tobias M wrote: But for almost every environmental error, there's a use case where it is normal or at least expected. That means, you have to have two versions of every function, one that throws and one that uses normal flow control. Exactly.

Re: What is the D plan's to become a used language?

2015-01-15 Thread bearophile via Digitalmars-d
Mengu: i've noticed there are some code that are not working such as the anonymous recursion example. [0] the first example there doesn't work I have fixed the bug. If you find other problems please list them in a single thread in D.learn (but keep in mind that Rosettacode D code is meant

Re: no size yet for forward reference for nested structures

2015-01-15 Thread Steven Schveighoffer via Digitalmars-d
On 1/15/15 9:56 AM, zeljkog wrote: This compiles: import std.container; class Node { DList!Node children; } Then use DList? DList is not SList, they were written by different people. -Steve

Re: More tricky range semantics

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 12:53 PM, H. S. Teoh via Digitalmars-d wrote: Passing a range to a function may invalidate it unless you use .save. Therefore, one should *always* use .save. That's right. To simplify the problem space we might decree that forward (or better) ranges with reference semantics are

10 Tips for Better Pull Requests

2015-01-15 Thread Walter Bright via Digitalmars-d
http://blog.ploeh.dk/2015/01/15/10-tips-for-better-pull-requests/ I agree with pretty much everything in this article. tl,dr: The more you make your reviewer work, the greater the risk is that your Pull Request will be rejected.

Re: What is the D plan's to become a used language?

2015-01-15 Thread Vlad Levenfeld via Digitalmars-d
On Friday, 16 January 2015 at 01:16:26 UTC, weaselcat wrote: On Thursday, 15 January 2015 at 20:54:05 UTC, bearophile wrote: Mengu: i've noticed there are some code that are not working such as the anonymous recursion example. [0] the first example there doesn't work but the second one works

Re: [WORK] Please help eliminate undefined macros on dlang.org

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 9:48 AM, Andrei Alexandrescu wrote: I've just created https://github.com/D-Programming-Language/dlang.org/pull/767 and built the entire dlang.org with it in tow. Please review and pull. Now looking through the source of the generate html sources it's easy to see where the undefined

Re: More tricky range semantics

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 05:52:45PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/15/15 4:58 PM, Joseph Rushton Wakeling via Digitalmars-d wrote: On 16/01/15 00:24, Andrei Alexandrescu via Digitalmars-d wrote: That's right. To simplify the problem space we might decree that forward

Re: no size yet for forward reference for nested structures

2015-01-15 Thread zeljkog via Digitalmars-d
On 15.01.15 23:30, Steven Schveighoffer wrote: On 1/15/15 9:56 AM, zeljkog wrote: This compiles: import std.container; class Node { DList!Node children; } Then use DList? DList is not SList, they were written by different people. -Steve SList.Range has moveFront, DList.Range does

Re: no size yet for forward reference for nested structures

2015-01-15 Thread zeljkog via Digitalmars-d
On 16.01.15 08:04, zeljkog wrote: On 15.01.15 23:30, Steven Schveighoffer wrote: On 1/15/15 9:56 AM, zeljkog wrote: This compiles: import std.container; class Node { DList!Node children; } Then use DList? DList is not SList, they were written by different people. -Steve

Re: More recent work on GC

2015-01-15 Thread safety0ff via Digitalmars-d
On Wednesday, 14 January 2015 at 06:15:09 UTC, Andrei Alexandrescu wrote: On my reading list: http://research.microsoft.com/pubs/230708/conservative-gc-oopsla-2014.pdf http://users.cecs.anu.edu.au/~steveb/downloads/pdf/immix-pldi-2008.pdf (this has been mentioned before) Andrei These are

[Issue 13989] New: add system-specific ext to -of parameter if ext is invalid

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13989 Issue ID: 13989 Summary: add system-specific ext to -of parameter if ext is invalid Product: D Version: D2 Hardware: x86 OS: All Status: NEW

[Issue 13989] add system-specific ext to -of parameter if ext is invalid

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13989 Orvid King blah38...@gmail.com changed: What|Removed |Added CC||blah38...@gmail.com ---

[Issue 13989] add system-specific ext to -of parameter if ext is invalid

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13989 Orvid King blah38...@gmail.com changed: What|Removed |Added Hardware|x86 |All --

[Issue 12943] Duplicated error message for out of bound array index

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12943 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 10910] Duplicate error messages for array bounds errors

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10910 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||bearophile_h...@eml.cc ---

Re: Heady House Hunting with D

2015-01-15 Thread Mike via Digitalmars-d-announce
On Wednesday, 14 January 2015 at 03:46:39 UTC, Philpax wrote: Hey everyone, I recently wrote a blog post about how I used D/vibe.d to help find a new house. I haven't publicized it anywhere else yet, so I'm looking forward to what the D community has to say! You can check it out here:

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Wednesday, 14 January 2015 at 12:15:03 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 14 January 2015 at 11:20:49 UTC, Marc Schütz wrote: Without addressing anything else: You want moving here, not copying. How can you move a value, it has no identity? When you say copy, I expect that to

Re: Why exceptions for error handling is so important

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 09:01:35PM +, via Digitalmars-d wrote: On Monday, 12 January 2015 at 20:53:04 UTC, Walter Bright wrote: On 1/12/2015 10:06 AM, Tobias Müller wrote: On Mon, Jan 12, 2015 at 05:22:26PM +, Adam D. Ruppe via Digitalmars-d wrote: Yeah, exceptions are supposed to be

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Monday, 12 January 2015 at 00:51:25 UTC, Walter Bright wrote: Perhaps I misunderstand, but given A calls B calls C, A = B = C and C detects an error, and A knows what to do with the error. B then becomes burdened with checking for the error, invoking some sort of cleanup code, and then

Re: More tricky range semantics

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 15, 2015 at 03:24:29PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: On 1/15/15 12:53 PM, H. S. Teoh via Digitalmars-d wrote: Passing a range to a function may invalidate it unless you use .save. Therefore, one should *always* use .save. That's right. To simplify the

Re: Why exceptions for error handling is so important

2015-01-15 Thread deadalnix via Digitalmars-d
On Thursday, 15 January 2015 at 21:29:28 UTC, Tobias Müller wrote: In a well-designed interface, every function specifies all the errors that might happen. BWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA !

Re: Is anyone working on a D source code formatting tool?

2015-01-15 Thread deadalnix via Digitalmars-d
On Tuesday, 13 January 2015 at 12:43:05 UTC, ketmar via Digitalmars-d wrote: On Tue, 13 Jan 2015 12:37:22 + Bruno Medeiros via Digitalmars-d digitalmars-d@puremagic.com wrote: On 10/01/2015 22:11, Walter Bright wrote: On 1/10/2015 12:17 PM, Walter Bright wrote: 2. it tends to end

Re: Why exceptions for error handling is so important

2015-01-15 Thread deadalnix via Digitalmars-d
On Thursday, 15 January 2015 at 21:48:25 UTC, Tobias M wrote: Example: Creating a file: Throws if already exists. Creating a unique filename: Create file.1.exp Create file.2.exp Create file.3.exp ... until it succeeds. Here failure is expected and normal, still trial/error is the only option

Re: More tricky range semantics

2015-01-15 Thread Joseph Rushton Wakeling via Digitalmars-d
On 16/01/15 00:24, Andrei Alexandrescu via Digitalmars-d wrote: That's right. To simplify the problem space we might decree that forward (or better) ranges with reference semantics are not allowed. -- Andrei That would seem to place significant restrictions on the ability to define effective

Re: What is the D plan's to become a used language?

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/15/15 4:26 PM, bearophile wrote: Andrei Alexandrescu: I wonder how to feature Rosetta Code more prominently on dlang.org. I don't know. One option is to create a kind of FAQ page in the D wiki, that associates problems and questions with links to specific entries in the Rosettacode

Re: What is the D plan's to become a used language?

2015-01-15 Thread weaselcat via Digitalmars-d
On Thursday, 15 January 2015 at 20:54:05 UTC, bearophile wrote: Mengu: i've noticed there are some code that are not working such as the anonymous recursion example. [0] the first example there doesn't work but the second one works with DMD64 D Compiler v2.066. The code used to work... I

Re: Why exceptions for error handling is so important

2015-01-15 Thread via Digitalmars-d
On Friday, 16 January 2015 at 00:48:57 UTC, deadalnix wrote: On Thursday, 15 January 2015 at 21:29:28 UTC, Tobias Müller wrote: In a well-designed interface, every function specifies all the errors that might happen. BWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA ! 'tis true,

Re: More tricky range semantics

2015-01-15 Thread H. S. Teoh via Digitalmars-d
On Fri, Jan 16, 2015 at 01:58:15AM +0100, Joseph Rushton Wakeling via Digitalmars-d wrote: On 16/01/15 00:24, Andrei Alexandrescu via Digitalmars-d wrote: That's right. To simplify the problem space we might decree that forward (or better) ranges with reference semantics are not allowed. --

Re: Common makefile (gasp) stuff

2015-01-15 Thread Rikki Cattermole via Digitalmars-d
On 15/01/2015 8:35 p.m., Jacob Carlborg wrote: On 2015-01-15 02:48, Rikki Cattermole wrote: Dub can run external processes but its best to leave it up to the end dev to run the c/assembly generation. When they want it regenerated. I think its best we commit most of the binary outputs. Mostly

Re: What is the D plan's to become a used language?

2015-01-15 Thread Andrei Alexandrescu via Digitalmars-d
On 1/14/15 7:19 PM, brian wrote: My point was that there are fewer examples of *how* to do things in D. This will discourage the new user, which will prevent it becoming a more popular language. Yes, it would be great if we could crowdsource a cornucopia of how to topics in D. -- Andrei

Re: What is the D plan's to become a used language?

2015-01-15 Thread ponce via Digitalmars-d
On Thursday, 15 January 2015 at 03:19:10 UTC, brian wrote: My point wasn't that there aren't ways to do things in D. My point was that there are fewer examples of *how* to do things in D. This will discourage the new user, which will prevent it becoming a more popular language. So if I'm

[Issue 7514] [e2ir] Error in e2ir at dynamic array to static array cast

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7514 --- Comment #11 from bearophile_h...@eml.cc --- (In reply to Kenji Hara from comment #10) I think the cast from int[] to int[2][1] should not be accepted. Can you please explain why? Currently this is accepted: int[2] m = cast(int[2])[1, 2]; --

[Issue 519] Invariant not called from autogenerated class/struct constructor/destructor

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=519 --- Comment #17 from Martin Nowak c...@dawg.eu --- (In reply to Andrei Alexandrescu from comment #16) I stated this elsewhere, just making sure I don't forget: probably we don't want to invoke invariants during the GC cycle. Walter has a different

[Issue 2834] Struct Destructors are not called by the GC, but called on explicit delete.

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2834 --- Comment #30 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/dbbea7c5bd4d8936dc8cb523b65f771842f2a487 Merge pull request

building a simple json tree

2015-01-15 Thread anonymous via Digitalmars-d-learn
what's the right syntax for building a JSON tree ? I try to do like in an AA but the program throw because the Key doesn't exist: --- import std.stdio, std.json; void main(string[] args) { struct Foo{ string a, b; void writeToJson(ref JSONValue target) {

[Issue 5570] 64 bit C ABI not followed for passing structs and complex numbers as function parameters

2015-01-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5570 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment

Re: What is the D plan's to become a used language?

2015-01-15 Thread ponce via Digitalmars-d
On Thursday, 15 January 2015 at 10:19:36 UTC, Joakim wrote: On Thursday, 15 January 2015 at 08:54:34 UTC, ponce wrote: On Thursday, 15 January 2015 at 03:19:10 UTC, brian wrote: My point wasn't that there aren't ways to do things in D. My point was that there are fewer examples of *how* to do

  1   2   >