Re: [dev] ASCII Delimited Text

2018-05-22 Thread Raphaël Proust
Hi, On 2018-05-22 21:21, Adrian Grigore wrote: >> Maybe a nice thing to have would be to get the terminal emulator to > treat the field and record separator in a special way. So the programs > all output fs and rs, and the terminal emulator uses these characters to > layout the data in a tabular

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Connor Lane Smith
On 22 May 2018 at 17:03, Silvan Jegen wrote: > This sounds like 'column'[0]. It's similar to column -t, except that it handles varying field counts in a similar way to gofmt, and it can use ANSI escapes to rewrite the output so it can stream without buffering all (or any)

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Silvan Jegen
On Tue, May 22, 2018 at 3:44 PM Connor Lane Smith wrote: > On 22 May 2018 at 01:24, Raphaël Proust wrote: > > I sent the copy. I use usul regularly so I still have the whole repo > > locally. > [...] > Elastic tabbing, on the other hand, tabulates lines, so if

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Connor Lane Smith
On 22 May 2018 at 01:24, Raphaël Proust wrote: > I sent the copy. I use usul regularly so I still have the whole repo > locally. Could you send me a copy as well? I'd also be interested to know what sort of things you tend to use it for, in case it could be made better. > In what

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Peter Nagy
Smells like an st patch -- Peter Nagy - To reach a goal one has to enjoy the journey On May 22, 2018 1:21:13 PM UTC, Adrian Grigore wrote: >> Maybe a nice thing to have would be to get the terminal emulator to >treat the field and record separator in a special

Re: [dev] ASCII Delimited Text

2018-05-22 Thread Adrian Grigore
> Maybe a nice thing to have would be to get the terminal emulator to treat the field and record separator in a special way. So the programs all output fs and rs, and the terminal emulator uses these characters to layout the data in a tabular way. There's no terminal that does this, right? On

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Raphaël Proust
Hello, On 2018-05-22 00:38, Connor Lane Smith wrote: > On 21 May 2018 at 17:12, Adrian Grigore wrote: >> I'm having problems compiling usul: > > This is a surprise. Where did you get usul from? I sent the copy. I use usul regularly so I still have the whole repo

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
> Try putting the library at the end. Some linkers display rather... classic behavior when linking statically (i.e. only linking in the files that are needed, but if you name a library as first thing, then no file is needed at that point). Works! On Mon, May 21, 2018 at 9:30 PM, Markus Wichmann

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Markus Wichmann
On Mon, May 21, 2018 at 07:12:46PM +0300, Adrian Grigore wrote: > cc -lutf -o cat cat.o util.o > cat.o: In function `main': > cat.c:(.text+0x179): undefined reference to `chartorune' > cat.c:(.text+0x1dd): undefined reference to `runetochar' > cc: error: linker command failed with exit code 1 (use

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
> This is a surprise. Where did you get usul from? I'm not sure even I have a copy any more! The only reason I can think of, though, is that you need to specify the -L libdir. Attachment above. :) cc -lutf -L. -o cat cat.o util.o gives: cat.o: In function `main': cat.c:(.text+0x179): undefined

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Connor Lane Smith
Hi, On 21 May 2018 at 17:12, Adrian Grigore wrote: > I'm having problems compiling usul: This is a surprise. Where did you get usul from? I'm not sure even I have a copy any more! The only reason I can think of, though, is that you need to specify the -L libdir.

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Adrian Grigore
> Maybe a nice thing to have would be to get the terminal emulator to treat the field and record separator in a special way. So the programs all output fs and rs, and the terminal emulator uses these characters to layout the data in a tabular way But would it still be plain text? I'm having

Re: [dev] ASCII Delimited Text

2018-05-21 Thread Truls Becken
As an anecdote, I actually wanted to use US/RS delimited text at work a while ago to consume XML downloaded from some service. The idea was to use XSLT to convert the data to a sane format that I could easily ingest. As it turns out, that was a no-can-do because XSL transforms are defined in an

Re: [dev] ASCII Delimited Text

2018-05-17 Thread Raphaël Proust
On 2018-05-17 22:50, Adrian Grigore wrote: > How would you have other tools like cat(1) or ls(1) handle them? Through the $FS and $RS environment variables. So you can do `FS=\xHH ls` (where HH is the hex code for the ASCII field separator). The ls in usul handles that. -- Raphaël

Re: [dev] ASCII Delimited Text

2018-05-17 Thread Greg Reagle
On Thu, May 17, 2018, at 10:50, Adrian Grigore wrote: > How would you have other tools like cat(1) or ls(1) handle them? I don't know. The way it currently handles them perhaps.

Re: [dev] ASCII Delimited Text

2018-05-17 Thread Adrian Grigore
How would you have other tools like cat(1) or ls(1) handle them? On Thu, May 17, 2018 at 6:16 AM, Greg Reagle wrote: > On Wed, May 16, 2018, at 10:05, Adrian Grigore wrote: >> What do you guys think of this: >> >>

Re: [dev] ASCII Delimited Text

2018-05-17 Thread Greg Reagle
On Wed, May 16, 2018, at 10:05, Adrian Grigore wrote: > What do you guys think of this: > > https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/ Seems reasonable to me. For the purpose of transferring data between two different

Re: [dev] ASCII Delimited Text

2018-05-16 Thread Silvan Jegen
On Wed, May 16, 2018 at 04:22:37PM +0100, Martin Tournoij wrote: > On Wed, May 16, 2018, at 16:19, Patrick Bucher wrote: > > On Wed, May 16, 2018 at 03:46:52PM +0100, Martin Tournoij wrote: > > > On Wed, May 16, 2018, at 15:05, Adrian Grigore wrote: In a perfect > > > world it would deal well with

Re: [dev] ASCII Delimited Text

2018-05-16 Thread Martin Tournoij
On Wed, May 16, 2018, at 16:19, Patrick Bucher wrote: > On Wed, May 16, 2018 at 03:46:52PM +0100, Martin Tournoij wrote: > > On Wed, May 16, 2018, at 15:05, Adrian Grigore wrote: In a perfect > > world it would deal well with it, but Notepad still can't handle Unix > > newlines... > > It actually

Re: [dev] ASCII Delimited Text

2018-05-16 Thread Patrick Bucher
On Wed, May 16, 2018 at 03:46:52PM +0100, Martin Tournoij wrote: > On Wed, May 16, 2018, at 15:05, Adrian Grigore wrote: In a perfect > world it would deal well with it, but Notepad still can't handle Unix > newlines... It actually does:

Re: [dev] ASCII Delimited Text

2018-05-16 Thread Martin Tournoij
On Wed, May 16, 2018, at 15:05, Adrian Grigore wrote: > What do you guys think of this: > > https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/ I think it's a reasonable alternative to CSV or TSV. I actually used it for the file

[dev] ASCII Delimited Text

2018-05-16 Thread Adrian Grigore
What do you guys think of this: https://ronaldduncan.wordpress.com/2009/10/31/text-file-formats-ascii-delimited-text-not-csv-or-tab-delimited-text/ -- Thanks, Adi