Re: Error: variable i cannot be read at compile time

2018-01-07 Thread Vino via Digitalmars-d-learn
On Monday, 8 January 2018 at 05:38:44 UTC, thedeemon wrote: On Sunday, 7 January 2018 at 17:30:26 UTC, Vino wrote: I tried to manipulate the writeln's as below but the output is not as expected as it prints the data in row wise, where as we need it in column wise. You've said before you nee

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread thedeemon via Digitalmars-d-learn
On Sunday, 7 January 2018 at 17:30:26 UTC, Vino wrote: I tried to manipulate the writeln's as below but the output is not as expected as it prints the data in row wise, where as we need it in column wise. You've said before you need 6 different files, not some tables. Also, after the "compre

Re: Is old style compile-time foreach redundant?

2018-01-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/6/18 6:25 PM, Ali Çehreli wrote: Is 'static foreach' sufficient for all needs or is there any value for regular foreach over compile-time sequences? If you use continues or breaks, then you need to switch to gotos if using static foreach, as it does not support them directly. -Steve

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread Vino via Digitalmars-d-learn
On Sunday, 7 January 2018 at 17:23:20 UTC, thedeemon wrote: On Sunday, 7 January 2018 at 12:59:10 UTC, Vino wrote: Just noticed that the output writes the data and key as 2 values , but the requirnment is to write to six files, e.g That's the part you can implement yourself. Just replace thos

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread thedeemon via Digitalmars-d-learn
On Sunday, 7 January 2018 at 12:59:10 UTC, Vino wrote: Just noticed that the output writes the data and key as 2 values , but the requirnment is to write to six files, e.g That's the part you can implement yourself. Just replace those writelns with writing to corresponding files.

Column wise output

2018-01-07 Thread Vino via Digitalmars-d-learn
HI All, Request your help, in the below code the output from main (writeln(columns[0][])) function is like ["Miller", "John", "Millman", "Zsuwalski"] where as the writeln(col[0]) from the function master is as below, so how do i get the output same as in main from the function master. CSV

Re: Finding ElementType

2018-01-07 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 7 January 2018 at 13:50:23 UTC, Adam D. Ruppe wrote: On Sunday, 7 January 2018 at 12:40:22 UTC, Bastiaan Veelo wrote: 1) Should we have a reference in the docs for std.traits to std.range.primitive : ElementType? wouldn't hurt i guess 2) Should phobos contain a version without the

Re: Finding ElementType

2018-01-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 7 January 2018 at 12:40:22 UTC, Bastiaan Veelo wrote: 1) Should we have a reference in the docs for std.traits to std.range.primitive : ElementType? wouldn't hurt i guess 2) Should phobos contain a version without the special narrow string behavior? see ElementEncodingType http:/

Re: Help optimizing UnCompress for gzipped files

2018-01-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/6/18 11:14 AM, Christian Köstlin wrote: On 05.01.18 23:04, Steven Schveighoffer wrote: One thing to try, you preallocate the ENTIRE buffer. This only works if you know how many bytes it will decompress to (not always possible), but it will take the allocator out of the equation completely.

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread Vino via Digitalmars-d-learn
On Sunday, 7 January 2018 at 12:09:32 UTC, Vino wrote: On Saturday, 6 January 2018 at 15:32:14 UTC, thedeemon wrote: On Saturday, 6 January 2018 at 06:47:33 UTC, Vino wrote: [...] Here's a version with Array, it's very similar: import std.algorithm: countUntil, joiner, sort, uniq, map; impor

Finding ElementType

2018-01-07 Thread Bastiaan Veelo via Digitalmars-d-learn
The learn forum is great not only for asking questions, but also for learning from the questions by others: I just learned about the existence of std.range.primitives: ElementType, a function that I have looked for in phobos before, without finding it. I had expected this to be in std.traits or

Re: Passing Template to Function

2018-01-07 Thread Vino via Digitalmars-d-learn
On Saturday, 6 January 2018 at 15:26:30 UTC, Vino wrote: Hi All, Request you help on the below program as it error out with the below error [...] Hi All, Thank you was able to resolve the issue. From, Vino.B

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread Vino via Digitalmars-d-learn
On Saturday, 6 January 2018 at 15:32:14 UTC, thedeemon wrote: On Saturday, 6 January 2018 at 06:47:33 UTC, Vino wrote: [...] Here's a version with Array, it's very similar: import std.algorithm: countUntil, joiner, sort, uniq, map; import std.csv: csvReader; import std.stdio: File, writeln; i

Re: C++ Interop

2018-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 6 January 2018 at 11:17:56 UTC, Seb wrote: On Friday, 5 January 2018 at 13:02:12 UTC, qznc wrote: I'm exploring [0] C++ interop after watching Walter's presentation [1]. [...] I know about this: https://github.com/Remedy-Entertainment/binderoo https://github.com/dlang/druntime

Re: -L--demangle=dlang doesn't work

2018-01-07 Thread Venkat via Digitalmars-d-learn
Yes, thanks Mike. I have 2.24 installed. Now I have to figure out how I can upgrade binutils without a distro upgrade. :)