Re: coreutils with D trials, wc, binary vs well formed utf

2021-05-25 Thread btiffin via Digitalmars-d-learn
On Tuesday, 25 May 2021 at 18:03:29 UTC, Imperatorn wrote: Nice that you're also hopeful about the future for D ☀️ I also think slow steady growth is the best. We just need to focus and D will be great  D is already great. It just needs to take over (a larger chunk of) the world. ;-)

Re: coreutils with D trials, wc, binary vs well formed utf

2021-05-25 Thread Imperatorn via Digitalmars-d-learn
On Monday, 24 May 2021 at 16:58:33 UTC, btiffin wrote: Hello, New here. A little background. Old guy, program for both work and recreation, GNU maintainer for the GnuCOBOL package; written in C, compiles COBOL via C intermediates. Fell into the role of maintainer mainly due to being a

Re: coreutils with D trials, wc, binary vs well formed utf

2021-05-24 Thread btiffin via Digitalmars-d-learn
Thanks for these hints. I'm new here, but not so much to programming. Been following D since, well 2007 or 8. Awaiting the GCCing to gel. Nice. Still a little rough on Ubuntu 18.04, dub package seems to want ldc and dmd from dlang borks with a segfault in start (which is probably a my

Re: coreutils with D trials, wc, binary vs well formed utf

2021-05-24 Thread Bastiaan Veelo via Digitalmars-d-learn
On Monday, 24 May 2021 at 16:58:33 UTC, btiffin wrote: [...] Just bumped into https://dlang.org/blog/2020/01/28/wc-in-d-712-characters-without-a-single-branch/ [...] Is there a(n easy-ish) way to fix up that wc.d source in the blog to fallback to byte stream mode when a utf-8 reader fails

Re: coreutils with D trials, wc, binary vs well formed utf

2021-05-24 Thread Dukc via Digitalmars-d-learn
Is there a(n easy-ish) way to fix up that wc.d source in the blog to fallback to byte stream mode when a utf-8 reader fails an encoding? Rewrite `toLine`: ``` Line toLine(char[] l) pure { import std.array : array; import std.algorithm : filter; import std.utf : byDchar, replacementDchar;

coreutils with D trials, wc, binary vs well formed utf

2021-05-24 Thread btiffin via Digitalmars-d-learn
Hello, New here. A little background. Old guy, program for both work and recreation, GNU maintainer for the GnuCOBOL package; written in C, compiles COBOL via C intermediates. Fell into the role of maintainer mainly due to being a documentation writer and early on cheerleader. Experienced