A well behaved CSV is easy to parse. However, if there are quotes,
delimiters or line terminators involved, it gets complicated quickly.
TSV solves that problem. Now, what does it require to get supported in 4tH?
A well behaved CSV is easy to parse. However, if there are quotes,
delimiters or line terminators involved, it gets complicated quickly.
TSV solves that problem. Now, what does it require to get supported in 4tH?
https://youtu.be/2lZ72SD-eXg
Hans Bezemer--
A well behaved CSV is easy to parse. However, if there are quotes, delimiters or line terminators involved, it gets complicated quickly.
...
If there is a generally accepted standard, one has no choice to abide by that standard.Oh, I agree completely. And as I state in the intro "I don't hate CSV".
I can download my bank data in CSV but TSV is not an option.
So TSV is of limited use.
Problems handling strings is more to be blamed on the lack ofAs I demonstrated - there are more ways to skin a cat. I did it with a
sensible wordsets. With my
$@ $! $+! $C+ $/ $\ $^
wordset, I experience few problems.
E.g. I consume a bank data file and generate a postscript fileAnd that's exactly why I made this video. All that extra code takes time
with exactly the fields that I want, in the correct order.
(In a fraction of the time struggling with spreadsheets would cost.)
On 16/11/2025 1:12 am, Hans Bezemer wrote:
A well behaved CSV is easy to parse. However, if there are quotes, delimiters or line terminators involved, it gets complicated quickly.
...
Can't say I've had the need - but then I recently found myself having to parse an assembler include file which I never expected. Never say never? Prompted by your video I've ported your csv parser grateful at not having
to reinvent this particular wheel! Thanks. TSV? That was new to me too.
On 16/11/2025 1:12 am, Hans Bezemer wrote:
A well behaved CSV is easy to parse. However, if there are quotes, delimiters or line terminators involved, it gets complicated quickly.
...
Can't say I've had the need - but then I recently found myself having to parse an assembler include file which I never expected. Never say never? Prompted by your video I've ported your csv parser grateful at not having
to reinvent this particular wheel! Thanks. TSV? That was new to me too.
TSV has the same problem I'd expect.
Maybe you want NSV, netstring values.
Hans Bezemer <the.beez.speaks@gmail.com> writes:
A well behaved CSV is easy to parse. However, if there are quotes,
delimiters or line terminators involved, it gets complicated quickly.
TSV solves that problem. Now, what does it require to get supported in 4tH?
http://cr.yp.to/proto/netstrings.txt
https://en.wikipedia.org/wiki/Netstring
Hans Bezemer <the.beez.speaks@gmail.com> writes:
A well behaved CSV is easy to parse. However, if there are quotes,
delimiters or line terminators involved, it gets complicated quickly.
TSV solves that problem. Now, what does it require to get supported in 4tH?
TSV has the same problem I'd expect. Maybe you want NSV, netstring values.
http://cr.yp.to/proto/netstrings.txt
https://en.wikipedia.org/wiki/Netstring
On 15-11-2025 23:28, Paul Rubin wrote:
TSV has the same problem I'd expect.
Not really. Watch the video.
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:
TSV has the same problem I'd expect.
Not really. Watch the video.
Absolutely not! If this was a topic where a video made things really
more obvious than a written explanation (say, the performance of a
gymnastic artist), I would find a pointer to a video acceptable,
although it would still be unlikely that I would watch the video.
But CSV/TSV is not one of these topics. If you want to convince me
that TSVs, whatever they are, have an advantage over CSVs, provide the argument in writing. I can read.
- anton
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:Maybe you can write.
TSV has the same problem I'd expect.
- I also wrote one of the most popular tutorials on Forth: https://www.linuxlinks.com/excellent-free-books-learn-forth/
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
On 11/18/2025 8:22 AM, Hans Bezemer wrote:
- I also wrote one of the most popular tutorials on Forth:
https://www.linuxlinks.com/excellent-free-books-learn-forth/
I looked for https://ficl.sourceforge.net/pdf/Forth_Primer.pdf out on archive.org (where I've saved a number of other Forth books under my favorites list) but couldn't find it.
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
Dr. Strangelove I presume.
BTW, who is J. L. Bezmer?
On 18-11-2025 16:03, Anton Ertl wrote:
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:Maybe you can write.
TSV has the same problem I'd expect.
Gee, I forgot:
- I also wrote one of the most popular tutorials on Forth: >https://www.linuxlinks.com/excellent-free-books-learn-forth/
- I was a columnist for fifteen years in three Dutch paper magazines: >https://www.agconnect.nl/auteurs/hans-bezemer?page=1
I must have written over 150 columns.
And that's not counting the thousands of pages I've written professionally..
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
Hans Bezemer
A well behaved CSV is easy to parse. However, if there are quotes,
delimiters or line terminators involved, it gets complicated quickly.
TSV solves that problem. Now, what does it require to get supported in 4tH?
https://youtu.be/2lZ72SD-eXg
Hans Bezemer
In article <nnd$03c928fa$6ca4ab00@183c17b0b12e73e2>,
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
On 18-11-2025 16:03, Anton Ertl wrote:
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:Maybe you can write.
TSV has the same problem I'd expect.
Gee, I forgot:
- I also wrote one of the most popular tutorials on Forth:
https://www.linuxlinks.com/excellent-free-books-learn-forth/
- I was a columnist for fifteen years in three Dutch paper magazines:
https://www.agconnect.nl/auteurs/hans-bezemer?page=1
I must have written over 150 columns.
And that's not counting the thousands of pages I've written professionally.. >>
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
So you can write. Do it. Write me a nice 10 line summary why TSC is
better than CSV. Like Anton I can't be bothered to view a video that
promise to take 10 minutes of my remaining life.
On 19-11-2025 11:29, albert@spenarnc.xs4all.nl wrote:
In article <nnd$03c928fa$6ca4ab00@183c17b0b12e73e2>,
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
On 18-11-2025 16:03, Anton Ertl wrote:
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:Maybe you can write.
TSV has the same problem I'd expect.
Gee, I forgot:
- I also wrote one of the most popular tutorials on Forth:
https://www.linuxlinks.com/excellent-free-books-learn-forth/
- I was a columnist for fifteen years in three Dutch paper magazines:
https://www.agconnect.nl/auteurs/hans-bezemer?page=1
I must have written over 150 columns.
And that's not counting the thousands of pages I've written professionally..
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
So you can write. Do it. Write me a nice 10 line summary why TSC is
better than CSV. Like Anton I can't be bothered to view a video that
promise to take 10 minutes of my remaining life.
Last thing. I'm not "gekke Henkie":
TSV avoids most issues because tabs rarely appear naturally in data fields. Shit, it is based on tabs? That damns it in my view. Wish I knew thatearlier. And you commented that newlines are present in CSV fields?
Overall, TSV offers a simpler, safer, and more reliable alternative to CSV. Agree to disagree. Newlines are invisible, but at least you know they are there. tabs are the silent killers.Groetjes Albert
Hans Bezemer
<SNIP>
TSV avoids most issues because tabs rarely appear naturally in data fields.Shit, it is based on tabs? That damns it in my view. Wish I knew that earlier. And you commented that newlines are present in CSV fields?
<SNIP>
Overall, TSV offers a simpler, safer, and more reliable alternative to CSV.Agree to disagree. Newlines are invisible, but at least you know they are there. tabs are the silent killers.
In article <nnd$44f7c84d$7e431930@4e0d5b1886fec755>,
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
On 19-11-2025 11:29, albert@spenarnc.xs4all.nl wrote:
In article <nnd$03c928fa$6ca4ab00@183c17b0b12e73e2>,
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
On 18-11-2025 16:03, Anton Ertl wrote:
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On 15-11-2025 23:28, Paul Rubin wrote:Maybe you can write.
TSV has the same problem I'd expect.
Gee, I forgot:
- I also wrote one of the most popular tutorials on Forth:
https://www.linuxlinks.com/excellent-free-books-learn-forth/
- I was a columnist for fifteen years in three Dutch paper magazines:
https://www.agconnect.nl/auteurs/hans-bezemer?page=1
I must have written over 150 columns.
And that's not counting the thousands of pages I've written professionally..
"MEIN FÜHRER, I CAN WRITE!" (bonus question: which movie is this?)
So you can write. Do it. Write me a nice 10 line summary why TSC is
better than CSV. Like Anton I can't be bothered to view a video that
promise to take 10 minutes of my remaining life.
Last thing. I'm not "gekke Henkie":
I admit that my comment is crude. Your efforts to publish video's
is commendable and its content are worthwhile. However there is
a communication overload going on, and most people appreciate
an overview before engaging to view it.
I recently looked into revaforth. It took a terrible amount of time
to arrive at information that it was a kind of Forth. That much I
guessed from the name.
<SNIP>
TSV avoids most issues because tabs rarely appear naturally in data fields.Shit, it is based on tabs? That damns it in my view. Wish I knew that earlier. And you commented that newlines are present in CSV fields?
<SNIP>
Overall, TSV offers a simpler, safer, and more reliable alternative to CSV.Agree to disagree. Newlines are invisible, but at least you know they are there. tabs are the silent killers.
Am 20.11.2025 um 11:48 schrieb albert@spenarnc.xs4all.nl:
<SNIP>
TSV avoids most issues because tabs rarely appear naturally in dataShit, it is based on tabs? That damns it in my view. Wish I knew that
fields.
earlier. And you commented that newlines are present in CSV fields?
<SNIP>
Overall, TSV offers a simpler, safer, and more reliable alternativeAgree to disagree. Newlines are invisible, but at least you know they are
to CSV.
there. tabs are the silent killers.
FWIW Excel can export tables directly in TSV format. This can sometimes
be very useful, especially when you get number series with commas as
decimal points.
Libreoffice
only offers what are technically "CSV with tabs".
Hans Bezemer <the.beez.speaks@gmail.com> writes:
Libreoffice
only offers what are technically "CSV with tabs".
I just opened libreoffice calc, typed in a few cells, then told it to
"save as", then selected "Text CSV (.csv)", and by default it gave me
',' as field separator and '"' as quote. The output looks as follows:
123,abc
So Libreoffice also offers CSVs in their original meaning, and offers
to use other separators and quotes. The character encoding can
apparently be chosen, too.
On 20-11-2025 12:18, minforth wrote:
Am 20.11.2025 um 11:48 schrieb albert@spenarnc.xs4all.nl:
<SNIP>
TSV avoids most issues because tabs rarely appear naturally in data fields.Shit, it is based on tabs? That damns it in my view. Wish I knew that
earlier. And you commented that newlines are present in CSV fields?
<SNIP>
Overall, TSV offers a simpler, safer, and more reliable alternative to CSV.Agree to disagree. Newlines are invisible, but at least you know they are >>> there. tabs are the silent killers.
FWIW Excel can export tables directly in TSV format. This can sometimes
be very useful, especially when you get number series with commas as
decimal points.
You're completely right. IIRC, they call it "*.txt" files. Libreoffice only offers what are technically "CSV with tabs".
But true, it can be considered a IANA TSV - provided it doesn't double quotes. It's late, I haven't tested this yet. But I'll report back in
the morning.
On 21/11/2025 1:20 am, Hans Bezemer wrote:
On 20-11-2025 12:18, minforth wrote:
Am 20.11.2025 um 11:48 schrieb albert@spenarnc.xs4all.nl:
<SNIP>
TSV avoids most issues because tabs rarely appear naturally in data fields.Shit, it is based on tabs? That damns it in my view. Wish I knew that
earlier. And you commented that newlines are present in CSV fields?
<SNIP>
Overall, TSV offers a simpler, safer, and more reliable alternative to CSV.Agree to disagree. Newlines are invisible, but at least you know they are >>>> there. tabs are the silent killers.
FWIW Excel can export tables directly in TSV format. This can sometimes
be very useful, especially when you get number series with commas as
decimal points.
You're completely right. IIRC, they call it "*.txt" files. Libreoffice only offers what are technically "CSV with tabs".
PlanMaker (SoftMaker Office) offers a 'txt' format in which field and text separators default to tab and none respectively. Whether it precisely duplicates Excel's 'txt', I don't know.
On 20-11-2025 23:26, Hans Bezemer wrote:
But true, it can be considered a IANA TSV - provided it doesn't double
quotes. It's late, I haven't tested this yet. But I'll report back in
the morning.
I tested it. {Tab} denotes a [CHAR] 9:
Brand{Tab}Model{Tab}Size
HP{Tab}Series 3 Pro{Tab}"23,8"""
Dell{Tab}P2425H{Tab}"23,8"""
Lenovo{Tab}L15{Tab}"15,6"""
Verbatim{Tab}Portable Screentouch{Tab}"15,6"""
Verbatim{Tab}Portable Ultra{Tab}"17,3"""
Acer{Tab}EK2510Gbi{Tab}"24,5"""
Iiyama{Tab}XUB2493HS-B6{Tab}"23,8"""
ASUS{Tab}ZenScreen MB166C{Tab}"15,6"""
Dell{Tab}P2425{Tab}"24,1"""
Since it uses not only double quotes, but also doubles the native
quotes, it does *not* comply to either IANA mime type, nor RFC 4180 (LOC
is a superset of IANA):
Now, let's assume we use "comma" as a delimiter and save the *entire raw records* from above as single fields (AKA this thing has just ONE field
- and forget about the quotes), this would have been written in TSV LOC format:
Brand\tModel\tSize
HP\tSeries 3 Pro\t"23,8"""
Dell\tP2425H\t"23,8"""
Lenovo\tL15\t"15,6"""
Verbatim\tPortable Screentouch\t"15,6"""
Verbatim\tPortable Ultra\t"17,3"""
Acer\tEK2510Gbi\t"24,5"""
Iiyama\tXUB2493HS-B6\t"23,8"""
ASUS\tZenScreen MB166C\t"15,6"""
Dell\tP2425\t"24,1"""
Where "\t" denotes [CHAR] \ + [CHAR] t. Hence, since LOC requires *all* fields to have certain (control) characters escaped (like [CHAR] 9)
there can *never* be a conflict between a delimiter and an embedded TAB
in a field.
If one would have done their research instead of just assuming things,
they would have saved me to explain their misgivings. Or one could just
have watched the video where I summarize all this, having done the
research for you. ;-)
Hans Bezemer
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 153:54:24 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,760 files (944M bytes) |
| Messages: | 2,457,163 |