December 19, 2022
On 12/19/2022 4:35 AM, Adam D Ruppe wrote:
> On Monday, 19 December 2022 at 09:55:47 UTC, Walter Bright wrote:
>> Curious why CSV isn't in the list.
> 
> Maybe std.csv is already good enough?

LOL, learn something every day! I've even written my own, but it isn't very good.
December 19, 2022
On Mon, Dec 19, 2022 at 04:16:57PM -0800, Walter Bright via Digitalmars-d-announce wrote:
> On 12/19/2022 4:35 AM, Adam D Ruppe wrote:
> > On Monday, 19 December 2022 at 09:55:47 UTC, Walter Bright wrote:
> > > Curious why CSV isn't in the list.
> > 
> > Maybe std.csv is already good enough?
> 
> LOL, learn something every day! I've even written my own, but it isn't very good.

There's also my little experimental csv parser that was designed to be as fast as possible:

	https://github.com/quickfur/fastcsv

However it can only handle input that fits in memory (using std.mmfile is one possible workaround), has a static limit on field sizes, and does not do validation.


T

-- 
Debian GNU/Linux: Cray on your desktop.
December 20, 2022
On Tuesday, 20 December 2022 at 00:40:07 UTC, H. S. Teoh wrote:
> On Mon, Dec 19, 2022 at 04:16:57PM -0800, Walter Bright via Digitalmars-d-announce wrote:
>> On 12/19/2022 4:35 AM, Adam D Ruppe wrote:
>> > On Monday, 19 December 2022 at 09:55:47 UTC, Walter Bright wrote:
>> > > Curious why CSV isn't in the list.
>> > 
>> > Maybe std.csv is already good enough?
>> 
>> LOL, learn something every day! I've even written my own, but it isn't very good.
>
> There's also my little experimental csv parser that was designed to be as fast as possible:
>
> 	https://github.com/quickfur/fastcsv
>
> However it can only handle input that fits in memory (using std.mmfile is one possible workaround), has a static limit on field sizes, and does not do validation.
>
>
> T

We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚
December 20, 2022
On Tue, Dec 20, 2022 at 07:46:36PM +0000, John Colvin via Digitalmars-d-announce wrote: [...]
> > There's also my little experimental csv parser that was designed to be as fast as possible:
> > 
> > 	https://github.com/quickfur/fastcsv
> > 
> > However it can only handle input that fits in memory (using std.mmfile is one possible workaround), has a static limit on field sizes, and does not do validation.
[...]
> We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚

Wow, I never expected it to be actually useful. :-P  Good to know it's worth something!


T

-- 
They say that "guns don't kill people, people kill people." Well I think the gun helps. If you just stood there and yelled BANG, I don't think you'd kill too many people. -- Eddie Izzard, Dressed to Kill
December 20, 2022
On Sunday, 18 December 2022 at 16:12:35 UTC, rikki cattermole wrote:
> > * make it @safe and pure if possible (and its likely possible)
>
> pure is always a worry for me, but yeah @safe and ideally nothrow (if they are forgiving which they absolutely should be, there is no reason to throw an exception until its time to inspect it).

I frequently find it useful for a text data file parser to call a diagnostic callback instead of assuming some default behavior (whether that's forgiving, printing warnings, throwing or something else). With template callback parameters the parser can throw if the user wants it or stay pure nothrow if no action is required.
December 21, 2022

On Tuesday, 20 December 2022 at 19:46:36 UTC, John Colvin wrote:

>

On Tuesday, 20 December 2022 at 00:40:07 UTC, H. S. Teoh wrote:

>

On Mon, Dec 19, 2022 at 04:16:57PM -0800, Walter Bright via Digitalmars-d-announce wrote:

>

On 12/19/2022 4:35 AM, Adam D Ruppe wrote:

>

On Monday, 19 December 2022 at 09:55:47 UTC, Walter Bright wrote:

>

Curious why CSV isn't in the list.

Maybe std.csv is already good enough?

LOL, learn something every day! I've even written my own, but it isn't very good.

There's also my little experimental csv parser that was designed to be as fast as possible:

https://github.com/quickfur/fastcsv

However, it can only handle input that fits in memory (using std.mmfile is one possible workaround), has a static limit on field sizes, and does not do validation.

T

We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚

It has already been replaced with mir.csv. Mir is faster, SIMD accelerated, and supports numbers and timestamp recognition.

December 21, 2022

On Wednesday, 21 December 2022 at 04:19:46 UTC, 9il wrote:

>

On Tuesday, 20 December 2022 at 19:46:36 UTC, John Colvin wrote:

>

On Tuesday, 20 December 2022 at 00:40:07 UTC, H. S. Teoh wrote:

>

[...]

We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚

It has already been replaced with mir.csv. Mir is faster, SIMD accelerated, and supports numbers and timestamp recognition.

Wow, I didn't even know mir.csv was a thing

Thank you very much!!!

๐Ÿคฉ

December 21, 2022
On Tuesday, 20 December 2022 at 00:16:57 UTC, Walter Bright wrote:
> LOL, learn something every day! I've even written my own, but it isn't very good.

Yeah, I wrote a csv module too back in... I think 2010, before Phobos had one.

It is about 90 lines, still works. Nothing special but I actually kinda like it.

https://github.com/adamdruppe/arsd/blob/master/csv.d
December 21, 2022

On Wednesday, 21 December 2022 at 04:19:46 UTC, 9il wrote:

>

On Tuesday, 20 December 2022 at 19:46:36 UTC, John Colvin wrote:

>

On Tuesday, 20 December 2022 at 00:40:07 UTC, H. S. Teoh wrote:

>

[...]

We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚

It has already been replaced with mir.csv. Mir is faster, SIMD accelerated, and supports numbers and timestamp recognition.

Hah, so it has! Well anyway, it did do a lot of hard work for us for a long time, so thanks :)

December 21, 2022
On 12/20/2022 11:46 AM, John Colvin wrote:
> We use this at work with some light tweaks, itโ€™s done a lot work ๐Ÿ™‚

Sweet!