Re: Overflows in Phobos

2016-07-27 Thread BLM768 via Digitalmars-d
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote: "The expression assert(0) is a special case; it signifies code that should be unreachable. If it is reached at runtime, either AssertError is thrown or execution is terminated in an implementation-defined manner. Any code after th

Re: New __FILE_DIR__ trait?

2016-07-27 Thread Jonathan Marler via Digitalmars-d
On Thursday, 28 July 2016 at 00:42:11 UTC, crimaniak wrote: On Wednesday, 27 July 2016 at 13:59:23 UTC, Jonathan Marler wrote: For others who may see this thread, the __FULL_FILE_PATH__ special trait was added to the dmd compiler with this PR: https://github.com/dlang/dmd/pull/5959 __DIR__

Re: New __FILE_DIR__ trait?

2016-07-27 Thread crimaniak via Digitalmars-d
On Wednesday, 27 July 2016 at 13:59:23 UTC, Jonathan Marler wrote: For others who may see this thread, the __FULL_FILE_PATH__ special trait was added to the dmd compiler with this PR: https://github.com/dlang/dmd/pull/5959 __DIR__ will be useful, I think. Just directory name, without file na

Re: @gc attribute for bypassign @nogc

2016-07-27 Thread bitwise via Digitalmars-d
On Wednesday, 27 July 2016 at 20:42:01 UTC, Guillaume Piolat wrote: On Sunday, 24 July 2016 at 22:13:02 UTC, bitwise wrote: There is the following, which is clever. But if it came down to having to do this to bypass @nogc, I simply wouldn't use @nogc. https://p0nce.github.io/d-idioms/#Bypas

Re: Overflows in Phobos

2016-07-27 Thread Walter Bright via Digitalmars-d
On 7/27/2016 3:47 PM, qznc wrote: On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote: "The expression assert(0) is a special case; it signifies code that should be unreachable. If it is reached at runtime, either AssertError is thrown or execution is terminated in an implementation-

Re: Overflows in Phobos

2016-07-27 Thread qznc via Digitalmars-d
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote: "The expression assert(0) is a special case; it signifies code that should be unreachable. If it is reached at runtime, either AssertError is thrown or execution is terminated in an implementation-defined manner. Any code after th

Re: @gc attribute for bypassign @nogc

2016-07-27 Thread Guillaume Piolat via Digitalmars-d
On Sunday, 24 July 2016 at 22:13:02 UTC, bitwise wrote: There is the following, which is clever. But if it came down to having to do this to bypass @nogc, I simply wouldn't use @nogc. https://p0nce.github.io/d-idioms/#Bypassing-@nogc When you have to do it thousands of times throughout your

Re: Docs: Links to source code

2016-07-27 Thread Walter Bright via Digitalmars-d
On 7/27/2016 6:31 AM, Adam D. Ruppe wrote: My thing is still slightly buggy but I have somewhat bigger plans for it, making my own source viewer instead of using Github's slow, generic, slow thing that is really slow. (Seriously, it is unusably slow on my laptop on anything more than like 100 lin

Re: std.traits.Fields(T), FieldNameTuple(T) - order guaranteed?

2016-07-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, July 27, 2016 13:09:07 Liam McSherry via Digitalmars-d wrote: > Since it isn't mentioned in the documentation, do > `std.traits.Fields(T)` and `std.traits.FieldNameTuple(T)` return > the fields and field names in a deterministic order? > > Further, will they return the fields/field na

Re: New __FILE_DIR__ trait?

2016-07-27 Thread Jonathan Marler via Digitalmars-d
On Wednesday, 27 July 2016 at 14:07:23 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 13:59:23 UTC, Jonathan Marler wrote: On Friday, 22 July 2016 at 02:08:44 UTC, Jonathan Marler wrote: [...] For others who may see this thread, the __FULL_FILE_PATH__ special trait was added to the dmd com

Re: [OT] Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 15:19:15 UTC, Chris wrote: On Wednesday, 27 July 2016 at 14:53:59 UTC, lkfsdg wrote: https://en.wikipedia.org/wiki/Exception_that_proves_the_rule I should use "prove" instead of "confirm". So now you get what i meant. I for my part knew what you meant, but it

Re: Make D language as Apache foundation project

2016-07-27 Thread Seb via Digitalmars-d
On Wednesday, 27 July 2016 at 13:20:50 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 13:08:17 UTC, eugene wrote: Hello everyone, why not to make a D language as a project of Apache foundation as it happened to groovy? stupid, D has its own organization. @eugene, please see these pages fo

Re: [OT] Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 14:53:59 UTC, lkfsdg wrote: https://en.wikipedia.org/wiki/Exception_that_proves_the_rule I should use "prove" instead of "confirm". So now you get what i meant. I for my part knew what you meant, but it was wrong. There are loads of people in the D community t

Re: Make D language as Apache foundation project

2016-07-27 Thread Chris Wright via Digitalmars-d
On Wed, 27 Jul 2016 13:36:55 +, eugene wrote: > On Wednesday, 27 July 2016 at 13:28:04 UTC, Adam D. Ruppe wrote: >> On Wednesday, 27 July 2016 at 13:08:17 UTC, eugene wrote: >>> Hello everyone, >>> why not to make a D language as a project of Apache foundation as it >>> happened to groovy? >>

[OT] Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 14:30:45 UTC, Timon Gehr wrote: On 27.07.2016 16:27, lkfsdg wrote: On Wednesday, 27 July 2016 at 14:22:18 UTC, Timon Gehr wrote: On 27.07.2016 14:21, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UT

Re: An IO Streams Library

2016-07-27 Thread ikod via Digitalmars-d
On Wednesday, 27 July 2016 at 06:18:07 UTC, Sönke Ludwig wrote: Am 26.07.2016 um 16:50 schrieb Johannes Pfau: Am Mon, 25 Jul 2016 13:10:42 + Hello, I don't know if it is good practice or not, but sometimes it make life easier if you can put part of the data back into the input stream.

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 14:27:06 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 14:22:18 UTC, Timon Gehr wrote: On 27.07.2016 14:21, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with

Re: Docs: Links to source code

2016-07-27 Thread Timon Gehr via Digitalmars-d
On 27.07.2016 16:27, lkfsdg wrote: On Wednesday, 27 July 2016 at 14:22:18 UTC, Timon Gehr wrote: On 27.07.2016 14:21, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 14:22:18 UTC, Timon Gehr wrote: On 27.07.2016 14:21, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not. p

Re: Docs: Links to source code

2016-07-27 Thread Timon Gehr via Digitalmars-d
On 27.07.2016 14:21, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not. perfect, so your the exception that confirm the rule. Exceptio

Re: New __FILE_DIR__ trait?

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 13:59:23 UTC, Jonathan Marler wrote: On Friday, 22 July 2016 at 02:08:44 UTC, Jonathan Marler wrote: [...] For others who may see this thread, the __FULL_FILE_PATH__ special trait was added to the dmd compiler with this PR: https://github.com/dlang/dmd/pull/5959

Re: New __FILE_DIR__ trait?

2016-07-27 Thread Jonathan Marler via Digitalmars-d
On Friday, 22 July 2016 at 02:08:44 UTC, Jonathan Marler wrote: I've got some batch scripts I wanted to convert to D. I'd like users to run them using rdmd, so it's obvious where the source code lives and easy to modify. The problem is that the batch scripts I want to convert rely on the %~dp

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 13:24:33 UTC, Chris wrote: On Wednesday, 27 July 2016 at 13:10:11 UTC, lkfsdg wrote: Mmmh i see, but you will have to use one when the time to remove the prefixes such as "fast", "precise" will come. For small test programs it's hardly worth to use an IDE, even

Re: Make D language as Apache foundation project

2016-07-27 Thread eugene via Digitalmars-d
On Wednesday, 27 July 2016 at 13:28:04 UTC, Adam D. Ruppe wrote: On Wednesday, 27 July 2016 at 13:08:17 UTC, eugene wrote: Hello everyone, why not to make a D language as a project of Apache foundation as it happened to groovy? My impression of Apache foundation stuff is it is a graveyard of

Re: Docs: Links to source code

2016-07-27 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 27 July 2016 at 09:43:45 UTC, Chris wrote: Wouldn't it be nice to have a direct link from the documentation of the function to the source code? Is that feasible at all? http://dpldocs.info/std.algorithm.searching.any go to the bottom for annotated source http://dpldocs.info/exp

Re: Make D language as Apache foundation project

2016-07-27 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 27 July 2016 at 13:08:17 UTC, eugene wrote: Hello everyone, why not to make a D language as a project of Apache foundation as it happened to groovy? My impression of Apache foundation stuff is it is a graveyard of other people's abandoned stuff not the message I'd want to s

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 13:24:33 UTC, Chris wrote: On Wednesday, 27 July 2016 at 13:10:11 UTC, lkfsdg wrote: Mmmh i see, but you will have to use one when the time to remove the prefixes such as "fast", "precise" will come. For small test programs it's hardly worth to use an IDE, even

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 13:10:11 UTC, lkfsdg wrote: Mmmh i see, but you will have to use one when the time to remove the prefixes such as "fast", "precise" will come. For small test programs it's hardly worth to use an IDE, even if you use one for big projects. But this is a pointle

Re: Make D language as Apache foundation project

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 13:08:17 UTC, eugene wrote: Hello everyone, why not to make a D language as a project of Apache foundation as it happened to groovy? stupid, D has its own organization.

Re: std.traits.Fields(T), FieldNameTuple(T) - order guaranteed?

2016-07-27 Thread Meta via Digitalmars-d
On Wednesday, 27 July 2016 at 13:09:07 UTC, Liam McSherry wrote: Since it isn't mentioned in the documentation, do `std.traits.Fields(T)` and `std.traits.FieldNameTuple(T)` return the fields and field names in a deterministic order? Further, will they return the fields/field names in the same

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 12:32:28 UTC, Lodovico Giaretta wrote: On Wednesday, 27 July 2016 at 12:21:27 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, ever

Make D language as Apache foundation project

2016-07-27 Thread eugene via Digitalmars-d
Hello everyone, why not to make a D language as a project of Apache foundation as it happened to groovy?

std.traits.Fields(T), FieldNameTuple(T) - order guaranteed?

2016-07-27 Thread Liam McSherry via Digitalmars-d
Since it isn't mentioned in the documentation, do `std.traits.Fields(T)` and `std.traits.FieldNameTuple(T)` return the fields and field names in a deterministic order? Further, will they return the fields/field names in the same order? That is, will `fields[0]` be the type of `field_names[0]`?

Re: Docs: Links to source code

2016-07-27 Thread Lodovico Giaretta via Digitalmars-d
On Wednesday, 27 July 2016 at 12:21:27 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not. perfect, so your the exception that confi

Re: Docs: Links to source code

2016-07-27 Thread drug via Digitalmars-d
27.07.2016 15:21, lkfsdg пишет: On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not. perfect, so your the exception that confirm the rule. no, he isn'

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 12:19:34 UTC, ketmar wrote: On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not. perfect, so your the exception that confirm the rule.

Re: Docs: Links to source code

2016-07-27 Thread ketmar via Digitalmars-d
On Wednesday, 27 July 2016 at 12:14:39 UTC, lkfsdg wrote: IDE or text editor with special features for D, everytbody uses one me not.

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 11:09:59 UTC, Chris wrote: On Wednesday, 27 July 2016 at 11:01:14 UTC, lkfsdg wrote: [...] Sorry, your argument was fallacious, because it was based on the assumption that everybody uses an IDE, the same as you do at that. Also, with your argumentation ("it can

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 11:01:14 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 10:54:37 UTC, Chris wrote: Out of interest, why was it fallacious? I always use the online docs. You argueed that it would be nice to have this feature because you often have to browse on GH. That's fall

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 10:54:37 UTC, Chris wrote: On Wednesday, 27 July 2016 at 10:47:57 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 10:34:10 UTC, Chris wrote: On Wednesday, 27 July 2016 at 10:29:12 UTC, lkfsdg wrote: for this kind of stuff I use the IDE code navigation facilitie

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 10:47:57 UTC, lkfsdg wrote: On Wednesday, 27 July 2016 at 10:34:10 UTC, Chris wrote: On Wednesday, 27 July 2016 at 10:29:12 UTC, lkfsdg wrote: for this kind of stuff I use the IDE code navigation facilities. import std.stuff; stu|ff CTRL+SHIFT+UP or Ctrl+Clic

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 10:34:10 UTC, Chris wrote: On Wednesday, 27 July 2016 at 10:29:12 UTC, lkfsdg wrote: for this kind of stuff I use the IDE code navigation facilities. import std.stuff; stu|ff CTRL+SHIFT+UP or Ctrl+Click The web is a source of distraction. You open the browser

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 10:29:12 UTC, lkfsdg wrote: for this kind of stuff I use the IDE code navigation facilities. import std.stuff; stu|ff CTRL+SHIFT+UP or Ctrl+Click The web is a source of distraction. You open the browser and you have already 250 new RSS items that are here to pu

Re: Docs: Links to source code

2016-07-27 Thread lkfsdg via Digitalmars-d
On Wednesday, 27 July 2016 at 09:43:45 UTC, Chris wrote: For one reason or another I sometimes find myself checking out the implementation of functions in Phobos. For this I have to go to the module file on Github for this kind of stuff I use the IDE code navigation facilities. import std.stu

Re: Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
On Wednesday, 27 July 2016 at 09:56:44 UTC, Sönke Ludwig wrote: Am 27.07.2016 um 11:43 schrieb Chris: For one reason or another I sometimes find myself checking out the implementation of functions in Phobos. For this I have to go to the module file on Github, e.g. this one [1], and look for the

Re: Docs: Links to source code

2016-07-27 Thread Sönke Ludwig via Digitalmars-d
Am 27.07.2016 um 11:43 schrieb Chris: For one reason or another I sometimes find myself checking out the implementation of functions in Phobos. For this I have to go to the module file on Github, e.g. this one [1], and look for the function (that often has more than one implementation). Wouldn't

Docs: Links to source code

2016-07-27 Thread Chris via Digitalmars-d
For one reason or another I sometimes find myself checking out the implementation of functions in Phobos. For this I have to go to the module file on Github, e.g. this one [1], and look for the function (that often has more than one implementation). Wouldn't it be nice to have a direct link fro

Re: Overflows in Phobos

2016-07-27 Thread Walter Bright via Digitalmars-d
On 7/27/2016 12:28 AM, Shachar Shemesh wrote: On 27/07/16 10:14, Walter Bright wrote: Thank you. I'd prefer it to say something along the lines that it stops execution at the assert(0) in an implementation-defined manner. This leaves whether messages are printed or not, etc., up to the implement

Re: @gc attribute for bypassign @nogc

2016-07-27 Thread Danni Coy via Digitalmars-d
I am not convinced this is the best way to go although it would be a relatively easy solution. What I would personally prefer was if there was a language mechanism to mark theAllocator, processAllocator (iAllocator) to be @nogc as long as the allocator in question is not the GCAllocator. I am thi

Re: Overflows in Phobos

2016-07-27 Thread Shachar Shemesh via Digitalmars-d
On 27/07/16 10:14, Walter Bright wrote: Thank you. I'd prefer it to say something along the lines that it stops execution at the assert(0) in an implementation-defined manner. This leaves whether messages are printed or not, etc., up to the implementation. I don't think the spec should require mo

Re: Overflows in Phobos

2016-07-27 Thread Walter Bright via Digitalmars-d
On 7/26/2016 11:49 PM, Shachar Shemesh wrote: Current text (after the strange copying corruption): The expression assert(0) is a special case; it signies that it is unreachable code. Either AssertError is thrown at runtime if it is reachable, or the execution is halted (on the x86 processor, a