On Monday, 10 April 2023 at 01:01:59 UTC, Steven Schveighoffer
wrote:
On 4/9/23 9:16 AM, Ali Çehreli wrote:
On 4/8/23 21:38, ikelaiah wrote:
> I will modify the code to construct it twice.
Multiple iterations of dirEntries can produce different
results, which may or may not be what your
On Sunday, 9 April 2023 at 13:16:51 UTC, Ali Çehreli wrote:
On 4/8/23 21:38, ikelaiah wrote:
> I will modify the code to construct it twice.
Multiple iterations of dirEntries can produce different
results, which may or may not be what your program will be
happy with.
Sticking an .array at
On Sunday, 9 April 2023 at 03:39:52 UTC, Steven Schveighoffer
wrote:
On 4/8/23 9:38 PM, ikelaiah wrote:
// Get files in specified inputPath variable with a specific
extension
auto rmdFiles = file.dirEntries(inputPath,
file.SpanMode.shallow)
.filter!(f => f.isFile)
Hi,
I've written a file that converts Rmd (R Markdown file), to a
MarkDown file.
All works well if and only if line 73 is commented out.
I marked line 72 in the code below.
If line 73 is not commented out, `foreach` does not execute as
the `rmdFiles.walklength` in line 82 becomes `0`.
On Monday, 7 November 2022 at 00:55:33 UTC, zjh wrote:
Is there a second edition? After all, it has been many years.
Hi zjh,
I'm aware of the publication date. However, I find the content
still highly relevant to many day-to-day tasks (my use case).
No doubt, there will be new features in
Hi,
I got a new programming book yesterday, authored by Adam D. Rupee.
![new-book](https://www.linkpicture.com/q/20221106_142031_1.jpg).
I'm still in **Chapter 1**, on the matter of `Immutable`
variables.
Can't wait to read **Chapter 7** on **Corectness and
Documentation**.
So far, I
On Monday, 8 August 2022 at 02:45:54 UTC, Steven Schveighoffer
wrote:
And now, you tried to read it again! Which means you are trying
to read more data from an empty stream.
You need to either a) reopen the file, or b) do both in the
same loop.
-Steve
Steve! You are Legend!
**Thank
Hi,
I'm writing a program that reads a text file and launch my work
URLs in it.
It worked fine, and very happy.
Then I added another `foreach` loop to count total number of
lines.
After this, the main `foreach` won't work.
Does anyone know as to why this happens?
I might have missed
On Monday, 1 August 2022 at 17:02:10 UTC, Salih Dincer wrote:
When printing the steps `import std.stdio : writeln;` use it.
Thus, it does not conflict with `std.file`.
SDB@79
Will do and thank you for this.
On Monday, 1 August 2022 at 16:11:52 UTC, frame wrote:
... because loading all in memory while not necessary is wasted
memory if you have large files to process.
Noted with thanks. Actually, some JSON input files are pretty
large (>1Mb).
I would just process each file and write it to the
On Monday, 1 August 2022 at 05:52:36 UTC, frame wrote:
If the JSON files are already parsed, why you stringify and
reparse it?
Because of ...
1. mental block and
2. I didn't know `jsonResult.array = [];`
Many thanks for pointing this out. I tried the following, and
didn't work, and
On Monday, 1 August 2022 at 07:35:34 UTC, Christian Köstlin wrote:
An arguably shorter solution (that drops some of your logging)
could be:
```d
import std;
void main() {
dirEntries(".", "*.json", SpanMode.shallow)
.filter!(f => !f.name.canFind("output"))
.map!(readText)
Hi,
I've written a cli tool to merge JSON files (containing JSON
array) in the current folder as a single JSON file.
My algorithm:
1. Create a string to store the output JSON array as a string,
2. read each file
3. read each object in JSON array from input file
4. append the string
13 matches
Mail list logo