Re: __traits(parent) borken on templates

2017-12-12 Thread Shachar Shemesh via Digitalmars-d
On 12/12/17 17:20, Stefan Koch wrote: On Tuesday, 12 December 2017 at 14:49:04 UTC, Shachar Shemesh wrote: module foo; import std.traits; [...] A template is not a symbol as is. And eponymous templates alias them-selfs to the symbol they define on instancing And yet, "bar", which is a

AssocArray to string is ok, but how to get the AssocArray from string? Thanks

2017-12-12 Thread Frank Like via Digitalmars-d-learn
Hi,everyone, who can help me,about the "AssocArray to string is ok,but how to get the AssocArray from string? ". For example: SysTime[][string] AATimes; AATimes["a1"] =[SysTime(DateTime(2017, 1, 1, 12, 33, 33)),SysTime(DateTime(2017, 1, 2, 12, 33, 33))]; AATimes["a2"]

Re: Adding Markdown to Ddoc

2017-12-12 Thread Biotronic via Digitalmars-d
On Tuesday, 12 December 2017 at 16:12:50 UTC, Adam D. Ruppe wrote: Ugh. Or why is _this_ italic? I know! /This should be italic./ _This should be underlined._ How anyone could manage to mess those up is way beyond me. Some digging indicates it's a decision based on the fact that both are

Re: operator overload

2017-12-12 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 16:54:17 UTC, Biotronic wrote: There is no way in C++ to set the format the way you want it. If you want binary output, you need to call a function like your binario function. Of course this is not entirely true - there is a way, but it's ugly and probably not

Re: operator overload

2017-12-12 Thread Biotronic via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 15:52:09 UTC, dark777 wrote: I know that this community is not of c ++, but some time I have been studying how to do overload of ostream operators in c ++ and I even managed to get to this result but the same is not converting to binary only presents zeros as

Re: Date Formating

2017-12-12 Thread Vino via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 16:01:49 UTC, Adam D. Ruppe wrote: On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote: Request out help on date formatting, I have code which output the date and time as below , i we need it without the last few numbers.,ie "-MMM-DD HH:MM:SI" Just

Re: Adding Markdown to Ddoc

2017-12-12 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis wrote: Personally, I would _very_ much like to see the magic formatting in ddoc kept to a minimum. You know what drives me nuts? This* is weird. * it is rendered as a list item! And I know, you can do \*. But ugh. Ugh. Or why

Re: Adding Markdown to Ddoc

2017-12-12 Thread John Gabriele via Digitalmars-d
On Tuesday, 12 December 2017 at 15:59:42 UTC, John Gabriele wrote: On Monday, 11 December 2017 at 00:54:00 UTC, Walter Bright wrote: I have a more pragmatic definition of a standard: 1. Products that implement it say they adhere to it and defer to it as the authority on correct behavior.

Re: Date Formating

2017-12-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 15:56:59 UTC, Vino wrote: Request out help on date formatting, I have code which output the date and time as below , i we need it without the last few numbers.,ie "-MMM-DD HH:MM:SI" Just slice it off. x[0 .. x.lastIndexOf("."];

Date Formating

2017-12-12 Thread Vino via Digitalmars-d-learn
Hi All, Request out help on date formatting, I have code which output the date and time as below , i we need it without the last few numbers.,ie "-MMM-DD HH:MM:SI" Output : 2017-Sep-06 16:06:42.7223837 Required Output : 2017-Sep-06 16:06:42 From, Vino.B

Re: Adding Markdown to Ddoc

2017-12-12 Thread John Gabriele via Digitalmars-d
On Monday, 11 December 2017 at 00:54:00 UTC, Walter Bright wrote: I have a more pragmatic definition of a standard: 1. Products that implement it say they adhere to it and defer to it as the authority on correct behavior. 2. There's more than one such product. 3. There's more products

operator overload

2017-12-12 Thread dark777 via Digitalmars-d-learn
I know that this community is not of c ++, but some time I have been studying how to do overload of ostream operators in c ++ and I even managed to get to this result but the same is not converting to binary only presents zeros as output to any number already tried to pass parameter of

Re: toChars Bug?

2017-12-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 December 2017 at 15:19:48 UTC, ketmar wrote: p.s.: but no, i am wrong. foo(-42); this is perfectly valid for `foo (uint n)`, as D converts negative ints to uints without any warnings. so no, overloads won't fit. hmm yes, it seems it is not possible.

[Issue 18068] No file names and line numbers in stack trace

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 Jacob Carlborg changed: What|Removed |Added CC||d...@me.com --- Comment #2

Re: Processing Function of return type(Real and SysTime)

2017-12-12 Thread Vino via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 14:25:22 UTC, Vino wrote: Hi All, Request your help on the below code, as i ma getting the below error message [...] Hi All, Was able to resolve this issue, it was my mistake, sorry. From, Vino.B

[Issue 18069] New: Exponentiation operator ^^ not evaluable at compile time

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18069 Issue ID: 18069 Summary: Exponentiation operator ^^ not evaluable at compile time Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW

Re: Static array as immutable

2017-12-12 Thread Nathan S. via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 11:37:40 UTC, Jonathan M Davis wrote: On Tuesday, December 12, 2017 10:35:15 Ivan Trombley via Digitalmars-d-learn wrote: On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis wrote: > On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via > >

Re: __traits(parent) borken on templates

2017-12-12 Thread Stefan Koch via Digitalmars-d
On Tuesday, 12 December 2017 at 14:49:04 UTC, Shachar Shemesh wrote: module foo; import std.traits; [...] A template is not a symbol as is. And eponymous templates alias them-selfs to the symbol they define on instancing

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
John Colvin wrote: On Tuesday, 12 December 2017 at 12:49:32 UTC, ketmar wrote: see documentation: http://dpldocs.info/experimental-docs/std.conv.toChars.html "...Can be uint or ulong. If radix is 10, can also be int or long." 45 is int, not uint. so no radices except `10` will work. I

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
p.s.: but no, i am wrong. foo(-42); this is perfectly valid for `foo (uint n)`, as D converts negative ints to uints without any warnings. so no, overloads won't fit.

Re: Tuple Array Sorting

2017-12-12 Thread Vino via Digitalmars-d-learn
On Monday, 11 December 2017 at 20:58:31 UTC, Biotronic wrote: On Monday, 11 December 2017 at 19:46:04 UTC, Vino wrote: import std.algorithm; import std.container.array; import std.file: SpanMode, dirEntries, isDir ; import std.stdio: writefln, writeln; import std.typecons: Tuple, tuple; import

Re: toChars Bug?

2017-12-12 Thread John Colvin via Digitalmars-d
On Tuesday, 12 December 2017 at 12:49:32 UTC, ketmar wrote: see documentation: http://dpldocs.info/experimental-docs/std.conv.toChars.html "...Can be uint or ulong. If radix is 10, can also be int or long." 45 is int, not uint. so no radices except `10` will work. I think it would be

__traits(parent) borken on templates

2017-12-12 Thread Shachar Shemesh via Digitalmars-d
module foo; import std.traits; void bar(T)() { } pragma(msg, "id: ", fullyQualifiedName!(bar)); pragma(msg, "parent: ", fullyQualifiedName!(__traits(parent, bar))); pragma(msg, "id: ", fullyQualifiedName!(bar!int)); pragma(msg, "parent: ",

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
On Sunday, 10 December 2017 at 06:20:43 UTC, Walter Bright wrote: Besides, commonmark has a lot of stuff we don't need, like multiple ways of doing the same thing. We would have to come with style guidelines to avoid a mix of say: *italic* and _italic_ # Heading 1 and Heading 1 ==

Processing Function of return type(Real and SysTime)

2017-12-12 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code, as i ma getting the below error message Error: C:\D\dmd2\windows\bin\..\..\src\phobos\std\container\array.d(739): Error: template std.container.array.Array!(Tuple!(string, real)).Array.insertBack cannot dedu ce function from argument types

[Issue 18068] No file names and line numbers in stack trace

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: Adding Markdown to Ddoc

2017-12-12 Thread meppl via Digitalmars-d
On Tuesday, 12 December 2017 at 13:50:42 UTC, Bastiaan Veelo wrote: On Tuesday, 12 December 2017 at 11:48:24 UTC, Chris wrote: On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis wrote: And then you have to worry about something like int* screwing with things, because the compiler

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
On Tuesday, 12 December 2017 at 13:50:42 UTC, Bastiaan Veelo wrote: On Tuesday, 12 December 2017 at 11:48:24 UTC, Chris wrote: On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis wrote: And then you have to worry about something like int* screwing with things, because the compiler

Re: D IDE Coedit - version 3.5.1 released

2017-12-12 Thread Basile B. via Digitalmars-d-announce
On Thursday, 7 December 2017 at 14:27:39 UTC, Basile B. wrote: This is a highly recommended update for Windows users. See the regression section in the changelog [1]. If by any chance the FreeBSD packager or the AUR's one (aka Wild) read this, please note that i've switched to SemVer, so

[Issue 15289] VRP not working as expected on division

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

[Issue 15289] VRP not working as expected on division

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15289 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/2f5ba437c6b584bbaf4d15fc451f239bb6122967 Refactor VRP + fix issue 15289

Re: Adding Markdown to Ddoc

2017-12-12 Thread Bastiaan Veelo via Digitalmars-d
On Tuesday, 12 December 2017 at 11:48:24 UTC, Chris wrote: On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis wrote: And then you have to worry about something like int* screwing with things, because the compiler decides that you wanted italics. Honestly, I don't think that

[Issue 18068] No file names and line numbers in stack trace

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --

Re: toChars Bug?

2017-12-12 Thread ketmar via Digitalmars-d
see documentation: http://dpldocs.info/experimental-docs/std.conv.toChars.html "...Can be uint or ulong. If radix is 10, can also be int or long." 45 is int, not uint. so no radices except `10` will work.

toChars Bug?

2017-12-12 Thread Bottled Gin via Digitalmars-d
Greetings This small code snippet works: // import std.conv; import std.stdio; void main() { writeln(toChars!10(45)); } But if I change toChars!10 with toChars!2, I get: /tmp/test.d(6): Error: template std.conv.toChars cannot deduce function from argument types !(2)(int), candidates are:

Re: No line numbers in stack trace (again)

2017-12-12 Thread Mike Franklin via Digitalmars-d-learn
On Tuesday, 5 December 2017 at 13:43:38 UTC, Nordlöw wrote: If I get the following stack trace ___without line numbers___ (instead ??:?) what's missing? and using DMD 2.077.1 https://issues.dlang.org/show_bug.cgi?id=18068

[Issue 18058] @nogc and forwarding lazy argument, particularly with scope

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18058 --- Comment #9 from Shachar Shemesh --- (In reply to Maksim Fomin from comment #8) > I mean dmd works as intended and according to the spec. What you want is > outside of current compiler optimization. This does not prevent you from

[Issue 18068] New: No file names and line numbers in stack trace

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18068 Issue ID: 18068 Summary: No file names and line numbers in stack trace Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

[Issue 18058] @nogc and forwarding lazy argument, particularly with scope

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18058 Maksim Fomin changed: What|Removed |Added Severity|major |normal --- Comment #8

[Issue 18067] Benchmark example is broken on the frontpage

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

[Issue 18067] Benchmark example is broken on the frontpage

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18067 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/93b97d25036f51d45d0160b72f8fed477aa70395 Fix Issue 18067 - Benchmark example is broken on

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
On Tuesday, 12 December 2017 at 11:48:24 UTC, Chris wrote: Try this one (paste it into http://spec.commonmark.org/dingus/): # CommonMark ``` int* ptr; ``` `int*` is a pointer to an integer. int* is a pointer to an integer. The output is CommonMark int* ptr; int* is a pointer to

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis wrote: And then you have to worry about something like int* screwing with things, because the compiler decides that you wanted italics. Honestly, I don't think that something like $(I foo) is very onerous - it's not all that

Re: Static array as immutable

2017-12-12 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, December 12, 2017 10:35:15 Ivan Trombley via Digitalmars-d-learn wrote: > On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis > > wrote: > > On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via > > > > Digitalmars-d-learn wrote: > >> Is there some way that I can make

Re: Adding Markdown to Ddoc

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 12, 2017 10:22:24 meppl via Digitalmars-d wrote: > On Tuesday, 12 December 2017 at 06:55:45 UTC, Jonathan M Davis > > wrote: > > On Tuesday, December 05, 2017 20:11:33 Walter Bright via > > > > Digitalmars-d wrote: > >>

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
Compare: Output: https://github.com/vibe-d/vibe.d/blob/master/README.md Input: https://raw.githubusercontent.com/vibe-d/vibe.d/master/README.md Most programmers who use GitHub will be familiar with this and can write docs, tutorials etc. with very little effort. The set of Markdown used for

[Issue 18067] Benchmark example is broken on the frontpage

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18067 Seb changed: What|Removed |Added Keywords||pull --- Comment #1 from Seb

[Issue 18067] New: Benchmark example is broken on the frontpage

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18067 Issue ID: 18067 Summary: Benchmark example is broken on the frontpage Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: enhancement

Re: Adding Markdown to Ddoc

2017-12-12 Thread Chris via Digitalmars-d
On Monday, 11 December 2017 at 00:54:00 UTC, Walter Bright wrote: I have a more pragmatic definition of a standard: 1. Products that implement it say they adhere to it and defer to it as the authority on correct behavior. 2. There's more than one such product. You have to start somewhere.

[Issue 18057] [ICE] Segmentation fault (stack overflow) in Expression::ctfeInterpret()

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18057 --- Comment #1 from anonymous4 --- What should happen? CTFE should detect and guard against stack overflow? --

Re: Static array as immutable

2017-12-12 Thread Ivan Trombley via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 09:48:09 UTC, Jonathan M Davis wrote: On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via Digitalmars-d-learn wrote: Is there some way that I can make this array immutable? static float[256] ga = void; static foreach (i; 0 .. 256) ga[i] = (i /

[Issue 18066] duplicate symbol error when symbol is in a ".o" and a ".a" ; linker should accept it to allow partial recompilation

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18066 --- Comment #4 from anonymous4 --- Try to compile main_aux separately? --- dmd -of=./build//app.o -c -g fun1.d fun2.d dmd -of=./build//main.o -c -g main_aux.d libtool -static ./build//app.o ./build//main.o -o

Re: Adding Markdown to Ddoc

2017-12-12 Thread meppl via Digitalmars-d
On Tuesday, 12 December 2017 at 06:55:45 UTC, Jonathan M Davis wrote: On Tuesday, December 05, 2017 20:11:33 Walter Bright via Digitalmars-d wrote: https://help.github.com/articles/basic-writing-and-formatting-syntax/ Anyone interested in picking up the flag? (I know this has come up before,

Re: Static array as immutable

2017-12-12 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, December 12, 2017 07:33:47 Ivan Trombley via Digitalmars-d-learn wrote: > Is there some way that I can make this array immutable? > >static float[256] ga = void; >static foreach (i; 0 .. 256) >ga[i] = (i / 255.0f) ^^ (1 / 2.2f); If you want anything to be immutable,

Re: Suggestion: needleless findSplit* methods

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 12, 2017 09:25:57 Seb via Digitalmars-d wrote: > On Tuesday, 12 December 2017 at 08:19:39 UTC, Piotr Mitana wrote: > > Hello, > > > > I'd like to make a little suggestion for phobos: enrich > > findSplit* method family with the "needleless" predicate option. > > > > [...] > >

Re: Suggestion: needleless findSplit* methods

2017-12-12 Thread Seb via Digitalmars-d
On Tuesday, 12 December 2017 at 08:19:39 UTC, Piotr Mitana wrote: Hello, I'd like to make a little suggestion for phobos: enrich findSplit* method family with the "needleless" predicate option. [...] ... or you simply use `until`: auto r = ["23", "42", "14.3", "-323", "}"]; r.until!(x

Re: Suggestion: needleless findSplit* methods

2017-12-12 Thread bauss via Digitalmars-d
On Tuesday, 12 December 2017 at 09:17:21 UTC, bauss wrote: On Tuesday, 12 December 2017 at 08:19:39 UTC, Piotr Mitana wrote: Hello, I'd like to make a little suggestion for phobos: enrich findSplit* method family with the "needleless" predicate option. [...] Either do it yourself and

Re: Suggestion: needleless findSplit* methods

2017-12-12 Thread bauss via Digitalmars-d
On Tuesday, 12 December 2017 at 08:19:39 UTC, Piotr Mitana wrote: Hello, I'd like to make a little suggestion for phobos: enrich findSplit* method family with the "needleless" predicate option. [...] Either do it yourself and create a pull-request or go here instead of posting in the

[Issue 18058] @nogc and forwarding lazy argument, particularly with scope

2017-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18058 --- Comment #7 from Shachar Shemesh --- (In reply to Maksim Fomin from comment #6) > As mentioned previously, this is how D works. Quite so. That's why the label on this page reads "bug". --

Re: No line numbers in stack trace (again)

2017-12-12 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 12/05/2017 08:43 AM, Nordlöw wrote: If I get the following stack trace ___without line numbers___ (instead ??:?) what's missing? Linux stack trace line numbers have disappeard for me, too. Used to work. Very frustrating, and a royal PITA when dealing with unittests. Help would be

Suggestion: needleless findSplit* methods

2017-12-12 Thread Piotr Mitana via Digitalmars-d
Hello, I'd like to make a little suggestion for phobos: enrich findSplit* method family with the "needleless" predicate option. Motivation: Let's have a range of string tokens that - after cutting of the initial brace - looks like this: auto range = ["23", "42", "14.3", "-323", "}"]

Re: Static array as immutable

2017-12-12 Thread Ivan Trombley via Digitalmars-d-learn
On Tuesday, 12 December 2017 at 07:44:55 UTC, Radu wrote: On Tuesday, 12 December 2017 at 07:33:47 UTC, Ivan Trombley wrote: Is there some way that I can make this array immutable? static float[256] ga = void; static foreach (i; 0 .. 256) ga[i] = (i / 255.0f) ^^ (1 / 2.2f); Check

Re: Debugging a druntime issue found by AutoTester

2017-12-12 Thread Daniel Kozak via Digitalmars-d-learn
I would go with some VM and install 32bit system on it. Dne 12. 12. 2017 8:55 dop. napsal uživatel "Ali Çehreli via Digitalmars-d-learn" : > The automatic tests for a PR failed for a target that I could not test > myself: 32-bit build on Darwin_64_32. > > >

Re: Druntime and non-D threads

2017-12-12 Thread Ali Çehreli via Digitalmars-d
On 12/11/2017 07:18 PM, Joakim wrote: > On Friday, 8 December 2017 at 09:33:03 UTC, Ali Çehreli wrote: >> I failed to find a way for Druntime to be resilient when such threads >> disappear. For example, the registered cleanup handler in thread.d is >> called only for cancelled threads, not the

<    1   2