Re: text based file formats
On 12/20/2022 1:51 PM, Adrian Matoga wrote: 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. Yes, sometimes I think this might be the right answer.
Re: text based file formats
On 12/21/2022 6:27 AM, Adam D Ruppe wrote: 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 What this all means is Phobos could use a better one!
Re: text based file formats
On 12/20/2022 8:19 PM, 9il wrote: It has already been replaced with [mir.csv](https://github.com/libmir/mir-ion/blob/master/source/mir/csv.d). Mir is faster, SIMD accelerated, and supports numbers and timestamp recognition. Propose this for Phobos?
Re: text based file formats
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!
Re: text based file formats
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](https://github.com/libmir/mir-ion/blob/master/source/mir/csv.d). 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 :)
Re: text based file formats
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
Re: text based file formats
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](https://github.com/libmir/mir-ion/blob/master/source/mir/csv.d). 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!!! # 朗
Re: Why am I writing a THIRD text component class?!?
On Tuesday, 20 December 2022 at 03:05:05 UTC, Adam D Ruppe wrote: Take the bait. Click the link. The answer may surprise you. (ok let's be real, it probably won't surprise you, but you might enjoy the read anyway. then tell me if you guessed the reason correctly or not!!) http://dpldocs.info/this-week-in-d/Blog.Posted_2022_12_19.html I find funny in how my current solution for viewport styles (such as Stretch or Fit) seems like your 3rd attempt. Some times letting the definition outside your thing is the best to do. This was a real lesson I got from when I started doing my API interface for my engine. My text class is a little similar in that it does not draw itself, it is just an object to be drawn from the text renderer. So, it holds the string to draw and its vertices information, but the reason was only for not tying it to the renderer itself, so I could increase compilation speed. I find it amazing into how we code our solutions to problems based on which aspect of the problem we wish to tackle it more.