Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
On Sunday, 5 September 2021 at 21:25:06 UTC, jfondren wrote: On Sunday, 5 September 2021 at 20:49:08 UTC, james.p.leblanc wrote: Here's a reduction of your myArray.d that works with your unchanged usage code: ```d module myArray; import std.stdio; void opOpAssign(string op)(myArray rhs)

Re: Documentation generator is not working

2021-09-05 Thread Ali Çehreli via Digitalmars-d-learn
On 9/5/21 3:22 PM, Vinod K Chandran wrote: On Friday, 3 September 2021 at 20:21:43 UTC, Ali Çehreli wrote: So, change your program to respond to -D and generate the documentation potentially by spawning a dmd instance. :o) I am not sure i get the point correctly. You mean, starting dmd as a

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread Ali Çehreli via Digitalmars-d-learn
On 9/5/21 4:24 PM, someone wrote: > > For example; IIRC Ali's posts are always no-markdown. > That's because I've been using Thunderbird for mail and news for a long time now and unfortunately it is impossible to convince Thunderbird to add the necessary header field. (Vladimir has a recommenda

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 5 September 2021 at 23:24:16 UTC, someone wrote: Slightly off-topic but ... while-we-are-the-subject: I usually post with markdown enabled and enclose code within ```d Sometimes, I notice that replies to my posts came without markdown, and until now, I assumed not everyone likes

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread someone via Digitalmars-d-learn
On Sunday, 5 September 2021 at 17:55:09 UTC, Steven Schveighoffer wrote: -Steve Slightly off-topic but ... while-we-are-the-subject: I usually post with markdown enabled and enclose code within ```d Sometimes, I notice that replies to my posts came without markdown, and until now, I assume

Re: Documentation generator is not working

2021-09-05 Thread Vinod K Chandran via Digitalmars-d-learn
On Friday, 3 September 2021 at 20:21:43 UTC, Ali Çehreli wrote: So, change your program to respond to -D and generate the documentation potentially by spawning a dmd instance. :o) I am not sure i get the point correctly. You mean, starting dmd as a new process from my program and pass the f

Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread jfondren via Digitalmars-d-learn
On Sunday, 5 September 2021 at 20:49:08 UTC, james.p.leblanc wrote: On Sunday, 5 September 2021 at 20:38:29 UTC, Paul Backus wrote: Please post the source code for `myarray_mod` so that we can reproduce the errors you're seeing. Hello Paul, Thanks for having a look ... James Here's a reduc

Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
On Sunday, 5 September 2021 at 21:06:49 UTC, Ali Çehreli wrote: On 9/5/21 12:43 PM, james.p.leblanc wrote: m[4 .. $] -= 100; writeln(m); m[] *= 2; writeln(m); } Ali Ali, Thanks for your example code ... I have much to learn from this and will need to study it tomorrow when I am

Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread Ali Çehreli via Digitalmars-d-learn
On 9/5/21 12:43 PM, james.p.leblanc wrote: > I have constructed a custom array type that works, but is missing > correct functioning on some operator overloads. With its old, new, and newest styles; and support for multi-dimensional use cases; operator overloading can be difficult to get right.

Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
On Sunday, 5 September 2021 at 20:38:29 UTC, Paul Backus wrote: On Sunday, 5 September 2021 at 19:43:20 UTC, james.p.leblanc wrote: Dear D-ers, I have constructed a custom array type that works, but is missing correct functioning on some operator overloads. [...] ```d import std.stdio; im

Re: "+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 5 September 2021 at 19:43:20 UTC, james.p.leblanc wrote: Dear D-ers, I have constructed a custom array type that works, but is missing correct functioning on some operator overloads. [...] ```d import std.stdio; import myarray_mod; ``` Please post the source code for `myarray_

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/5/21 2:07 PM, james.p.leblanc wrote: But, my eyes had been looking for the beautiful green and blue text as an example ...  So, I completely missed the fact that the "highlight syntax" in the box was exactly what I was looking for. Actually, it may not be a bad idea to make that example m

"+=" (overloads) with custom array slices on both lhs, and rhs ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
Dear D-ers, I have constructed a custom array type that works, but is missing correct functioning on some operator overloads. The stripped down minimum example (module) was over 100 lines (due overloading opAssign, etc.) Probably too long to be a good forum post. However, a short main may exp

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
On Sunday, 5 September 2021 at 17:55:09 UTC, Steven Schveighoffer wrote: On 9/5/21 1:48 PM, james.p.leblanc wrote: Dear All, In case you can't find it, the info is [here](https://forum.dlang.org/help#markdown) -Steve THANKS! (Also ... sigh ... I swear I have looked at the markdon page t

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/5/21 1:48 PM, james.p.leblanc wrote: Dear All, I have noticed that quite a few posts and responses on this forum include d snippets made with **nicely colored syntax highlighting.** (I do not mean just the bold markdown text.) This increases post clarity significantly. How is this being d

Re: Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread jfondren via Digitalmars-d-learn
On Sunday, 5 September 2021 at 17:48:51 UTC, james.p.leblanc wrote: Dear All, I have noticed that quite a few posts and responses on this forum include d snippets made with **nicely colored syntax highlighting.** (I do not mean just the bold markdown text.) This increases post clarity signifi

Forum posting question ... how post a thread question with color syntax highlighting ??

2021-09-05 Thread james.p.leblanc via Digitalmars-d-learn
Dear All, I have noticed that quite a few posts and responses on this forum include d snippets made with **nicely colored syntax highlighting.** (I do not mean just the bold markdown text.) This increases post clarity significantly. How is this being done? (I hope that this is not considered

Re: Phobos Unittest

2021-09-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/4/21 4:05 PM, Per Nordlöw wrote: On Saturday, 4 September 2021 at 13:12:49 UTC, Steven Schveighoffer wrote: Note that lexing and parsing is extremely quick, and I wouldn't focus on trying to trim this out, you won't get much performance out of that. -Steve For the record, a D file conta

Re: Vibe.d

2021-09-05 Thread HuskyNator via Digitalmars-d-learn
On Sunday, 5 September 2021 at 12:12:20 UTC, HuskyNator wrote: On Saturday, 19 September 2020 at 17:57:09 UTC, Andre Pany wrote: In case you have an older version of dub, dmd will build an x86 executable by default with OMF (Windows). Never versions of dub defaults to architecture x86_64 with C

Re: Vibe.d

2021-09-05 Thread HuskyNator via Digitalmars-d-learn
On Saturday, 19 September 2020 at 17:57:09 UTC, Andre Pany wrote: In case you have an older version of dub, dmd will build an x86 executable by default with OMF (Windows). Never versions of dub defaults to architecture x86_64 with COFF. LDC builds only COFF for x86 and x86_64. Kind regards And

Re: Piping from terminal into D program

2021-09-05 Thread Виталий Фадеев via Digitalmars-d-learn
On Saturday, 4 September 2021 at 15:41:51 UTC, eXodiquas wrote: My question is now, can someone explain what I am doing wrong? Maybe I misunderstood the pipe in Linux systems and it is obvious for someone who knows how this works exactly, or maybe D works differently with pipes and I havn't f