Re: array to string functional?

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 14 September 2018 at 20:43:45 UTC, SrMordred wrote: On Friday, 14 September 2018 at 19:44:37 UTC, berni wrote: a) I've got an int[] which contains only 0 und 1. And I want to end with a string, containing 0 and 1. So [1,1,0,1,0,1] should become "110101". Of course I can do this with

Re: array to string functional?

2018-09-15 Thread berni via Digitalmars-d-learn
Can you post a complete, runnable example that illustrates your problem? Strange as it is, now it works here too... - I don't know, what went wrong yesterday. Thanks anyway. :-)

Re: x64 Privileged instruction

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 15 September 2018 at 18:05:58 UTC, Josphe Brigmo wrote: I have always gotten these types of errors on x64 and, it may be my machine, it has happened with many dmd versions, visual D and visual studio... Oh, you mean the message that appears in Visual Studio, not stderr. Excepti

Getting started with separate compilation

2018-09-15 Thread Anonymouse via Digitalmars-d-learn
My project [1] has enough language coverage to expose two issues that break compilation. 1. Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen(); https://issues.dlang.org/show_bug.cgi?id=18026 2. -allinst gives undefined reference linker errors; https://issues.dlang.org/s

Re: array to string functional?

2018-09-15 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 15 September 2018 at 20:04:36 UTC, berni wrote: Anotherone I'm not getting to work: From some output with newlines I want to discard all lines, that start with a # and select part of the other lines with a regex. (I know the regex r".*" is quite useless, but it will be replaced by

Re: Pass 'this' as reference

2018-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, September 15, 2018 11:44:05 AM MDT Jan via Digitalmars-d-learn wrote: > On Thursday, 13 September 2018 at 11:08:30 UTC, Jonathan M Davis > > wrote: > > [...] > > Thanks for clarifying Jonathan :) > But aren't the variables considered rvalues then? No. variables are _always_ lvalues.

Re: array to string functional?

2018-09-15 Thread berni via Digitalmars-d-learn
Anotherone I'm not getting to work: From some output with newlines I want to discard all lines, that start with a # and select part of the other lines with a regex. (I know the regex r".*" is quite useless, but it will be replaced by something more usefull.) I tried the following, but non wor

Re: dealing with very long paths and names

2018-09-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, September 15, 2018 8:45:55 AM MDT Vladimir Panteleev via Digitalmars-d-learn wrote: > On Friday, 14 September 2018 at 21:16:31 UTC, Jonathan M Davis > > wrote: > > Yeah, though if you write cross-platform applications or > > libraries (and ideally, most applications and libraries woul

Re: x64 Privileged instruction

2018-09-15 Thread Josphe Brigmo via Digitalmars-d-learn
On Saturday, 15 September 2018 at 14:57:20 UTC, Vladimir Panteleev wrote: On Thursday, 13 September 2018 at 05:50:53 UTC, Josphe Brigmo wrote: Privileged instruction Lots of code. I pretty much always get this error. Something must have gone really wrong to get this error. Most likely, the

Re: Pass 'this' as reference

2018-09-15 Thread Jan via Digitalmars-d-learn
On Thursday, 13 September 2018 at 11:08:30 UTC, Jonathan M Davis wrote: [...] Thanks for clarifying Jonathan :) But aren't the variables considered rvalues then?

Re: array to string functional?

2018-09-15 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 15 September 2018 at 05:39:48 UTC, berni wrote: Oh, thanks. What I didn't know about was join. Now I wonder how I could have found out about it, without asking here? Even yet I know it's name I cannot find it, nighter in the language documentation nor in the library documentation.

Re: x64 Privileged instruction

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d-learn
On Thursday, 13 September 2018 at 05:50:53 UTC, Josphe Brigmo wrote: Privileged instruction Lots of code. I pretty much always get this error. Something must have gone really wrong to get this error. Most likely, the CPU instruction pointer ended up in a memory area without any code in it.

Re: dealing with very long paths and names

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 14 September 2018 at 21:16:31 UTC, Jonathan M Davis wrote: Yeah, though if you write cross-platform applications or libraries (and ideally, most applications and libraries would be platform-agnostic), you can't necessarily avoid all of the Windows insanity, even if you yourself use a

Re: Variadic template with template arguments in pairs

2018-09-15 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 12 September 2018 at 21:33:17 UTC, Paul Backus wrote: Another alternative is to write the function recursively: void doByPair(T, Rest...)(string desc, T* valuePtr, Rest rest) { writefln("%s %s: %s", T.stringof, desc, *valuePtr); if (rest.length) doByPair(rest); } Rest...

Re: Why do some attributes have an @ symbol and others don't?

2018-09-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 15 September 2018 at 12:40:07 UTC, Gary Willoughby wrote: Is it just a legacy thing? Yeah, basically the ones that date back to before the @ thing don't have it, and the ones after it do.

Why do some attributes have an @ symbol and others don't?

2018-09-15 Thread Gary Willoughby via Digitalmars-d-learn
Why do some attributes have an @ symbol and others don't? I thought it might be because some are used as keywords for other things but then 'pure' doesn't follow that rule. Any ideas? Is it just a legacy thing?

Re: remove file access denied(remove broke)

2018-09-15 Thread Josphe Brigmo via Digitalmars-d-learn
On Saturday, 15 September 2018 at 06:13:29 UTC, bauss wrote: On Friday, 14 September 2018 at 16:55:21 UTC, Josphe Brigmo wrote: On Friday, 14 September 2018 at 15:21:21 UTC, H. S. Teoh wrote: [...] It woudln't help. I'm dealing with over a million files and you'd need those files too. But