Re: [racket-users] tabular text display

2017-09-23 Thread Laurent
> > Awesome! You’ve saved me hours.
>
> One simple thing: could you add the tags “tabular” and maybe also “format”
> or “text”? I’m afraid that in its current form, I wouldn’t have found this
> package when searching for it.
>

Done!
Any other comments or suggestions welcome of course.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-23 Thread 'John Clements' via users-redirect

> On Sep 23, 2017, at 12:24, 'John Clements' via users-redirect 
>  wrote:
> 
>> 
>> On Sep 23, 2017, at 12:02, Laurent  wrote:
>> 
>> Okay, I made a stand-alone package called 'text-table', uploaded on the pkg 
>> server.
>> 
>> Readme here: https://github.com/Metaxal/text-table/blob/master/README.md
>> 
>> Needs more doc, but it should be rather self-explanatory, in particular if 
>> you try 'racket -l text-table' to see the output of the main example.
> 
> Awesome! You’ve saved me hours.

One simple thing: could you add the tags “tabular” and maybe also “format” or 
“text”? I’m afraid that in its current form, I wouldn’t have found this package 
when searching for it.

John

> 
> (Translation: Darn! Now I have to get real work done rather than yak-shaving 
> on this sub-project…)
> 
> Thanks again!
> 
> John
> 
>> 
>> On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:
>> There's something like that buried in my bazaar package, maybe it's 
>> sufficient for your needs:
>> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
>> 
>> The main submodule prints the examples.
>> 
>> It provides two ways to output tables. The first one 'table->string' is the 
>> simplest one and the example outputs:
>> 
>>  a │   b │c │  d │ e │  f │  g │h
>> ——
>> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
>> ——
>> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
>> 
>> The second one is more tweakable but more complicated and the example 
>> produces:
>> ╔╦╦╦╗
>> ║i   ║║f1  ║f2  ║
>> ╠╬╬╬╣
>> ╠╬╬╬╣
>> ║a   ║║b   ║c   ║
>> ╠╬╬╬╣
>> ║x   ║║y   ║z   ║
>> ╚╩╩╩╝
>> 
>> If I had time I would merge the two and make it both simple and tweakable...
>> 
>> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect 
>>  wrote:
>> 
>>> On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
>>> 
>>> `raco pkg show` implements something very close that you could turn
>>> into a library
>>> 
>>> https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102
>> 
>> Ah! Nice!
>> 
>> John
>> 
>>> 
>>> On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
>>>  wrote:
 Before I go re-inventing the wheel, I want to ask you folks: has anyone 
 written a library that prints out tabular data in a textual format?
 
 E.G: given
 
 ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
 
 returns
 
 "
 --
 | a  | bcd  | ef |
 | gh | hhu.thnt | t  |
 ———
 “
 
 (sorry about the horrible damage that Apple Mail inflicts upon this 
 message.)
 
 … in the style of postgresql and similar display engines?
 
 It’s easy to write one of these, but if someone else has done it, it will 
 probably have nice bells and whistles that mine won’t.
 
 John
 
 
 
 
 
 
 
 --
 You received this message because you are subscribed to the Google Groups 
 "Racket Users" group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 
>>> 
>>> --
>>> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>>> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>>> -=[ Moses 1:33: And worlds without number have I created; ]=-
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to racket-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-23 Thread 'John Clements' via users-redirect

> On Sep 23, 2017, at 12:02, Laurent  wrote:
> 
> Okay, I made a stand-alone package called 'text-table', uploaded on the pkg 
> server.
> 
> Readme here: https://github.com/Metaxal/text-table/blob/master/README.md
> 
> Needs more doc, but it should be rather self-explanatory, in particular if 
> you try 'racket -l text-table' to see the output of the main example.

Awesome! You’ve saved me hours.

(Translation: Darn! Now I have to get real work done rather than yak-shaving on 
this sub-project…)

Thanks again!

John

> 
> On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:
> There's something like that buried in my bazaar package, maybe it's 
> sufficient for your needs:
> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
> 
> The main submodule prints the examples.
> 
> It provides two ways to output tables. The first one 'table->string' is the 
> simplest one and the example outputs:
> 
>   a │   b │c │  d │ e │  f │  g │h
> ——
> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
> ——
> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
> 
> The second one is more tweakable but more complicated and the example 
> produces:
> ╔╦╦╦╗
> ║i   ║║f1  ║f2  ║
> ╠╬╬╬╣
> ╠╬╬╬╣
> ║a   ║║b   ║c   ║
> ╠╬╬╬╣
> ║x   ║║y   ║z   ║
> ╚╩╩╩╝
> 
> If I had time I would merge the two and make it both simple and tweakable...
> 
> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect 
>  wrote:
> 
> > On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
> >
> > `raco pkg show` implements something very close that you could turn
> > into a library
> >
> > https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102
> 
> Ah! Nice!
> 
> John
> 
> >
> > On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
> >  wrote:
> >> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
> >> written a library that prints out tabular data in a textual format?
> >>
> >> E.G: given
> >>
> >> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
> >>
> >> returns
> >>
> >> "
> >> --
> >> | a  | bcd  | ef |
> >> | gh | hhu.thnt | t  |
> >> ———
> >> “
> >>
> >> (sorry about the horrible damage that Apple Mail inflicts upon this 
> >> message.)
> >>
> >> … in the style of postgresql and similar display engines?
> >>
> >> It’s easy to write one of these, but if someone else has done it, it will 
> >> probably have nice bells and whistles that mine won’t.
> >>
> >> John
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "Racket Users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an 
> >> email to racket-users+unsubscr...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> > --
> > -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
> > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
> > -=[ Moses 1:33: And worlds without number have I created; ]=-
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-23 Thread Laurent
Okay, I made a stand-alone package called 'text-table', uploaded on the pkg
server.

Readme here: https://github.com/Metaxal/text-table/blob/master/README.md

Needs more doc, but it should be rather self-explanatory, in particular if
you try 'racket -l text-table' to see the output of the main example.

On Fri, Sep 22, 2017 at 9:50 AM, Laurent  wrote:

> There's something like that buried in my bazaar package, maybe it's
> sufficient for your needs:
> https://github.com/Metaxal/bazaar/blob/master/text-table.rkt
>
> The main submodule prints the examples.
>
> It provides two ways to output tables. The first one 'table->string' is
> the simplest one and the example outputs:
>
>   a │   b │c │  d │ e │  f │  g │h
> ——
> 123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
> ——
> 111 │  22 │  │ 44 │ 5 │  6 │  7 │ 
>
> The second one is more tweakable but more complicated and the example
> produces:
> ╔╦╦╦╗
> ║i   ║║f1  ║f2  ║
> ╠╬╬╬╣
> ╠╬╬╬╣
> ║a   ║║b   ║c   ║
> ╠╬╬╬╣
> ║x   ║║y   ║z   ║
> ╚╩╩╩╝
>
> If I had time I would merge the two and make it both simple and
> tweakable...
>
> On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect <
> us...@plt-scheme.org> wrote:
>
>>
>> > On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
>> >
>> > `raco pkg show` implements something very close that you could turn
>> > into a library
>> >
>> > https://github.com/racket/racket/blob/master/racket/collects
>> /pkg/private/show.rkt#L102
>>
>> Ah! Nice!
>>
>> John
>>
>> >
>> > On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
>> >  wrote:
>> >> Before I go re-inventing the wheel, I want to ask you folks: has
>> anyone written a library that prints out tabular data in a textual format?
>> >>
>> >> E.G: given
>> >>
>> >> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
>> >>
>> >> returns
>> >>
>> >> "
>> >> --
>> >> | a  | bcd  | ef |
>> >> | gh | hhu.thnt | t  |
>> >> ———
>> >> “
>> >>
>> >> (sorry about the horrible damage that Apple Mail inflicts upon this
>> message.)
>> >>
>> >> … in the style of postgresql and similar display engines?
>> >>
>> >> It’s easy to write one of these, but if someone else has done it, it
>> will probably have nice bells and whistles that mine won’t.
>> >>
>> >> John
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups "Racket Users" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an email to racket-users+unsubscr...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> > --
>> > -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>> > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>> > -=[ Moses 1:33: And worlds without number have I created; ]=-
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Racket Users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to racket-users+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-22 Thread Tony Garnock-Jones
Not yet parameterised or extracted for separate use, but:

  raco pkg install tabular


https://github.com/tonyg/racket-tabular/blob/29e91c9475407da4c5bee03abc2e6043693b3ff6/tabular/main.rkt#L681-L765

Example output:

Welcome to Racket v6.10.1.1.
> (require (submod tabular test))
> (require tabular)




> emp
 last-name  |department-id
--
"Rafferty"  |31
"Jones" |33
"Heisenberg"|33
"Robinson"  |34
"Smith" |34
"Williams"  |#f

> dept
department-id|department-name
-
31   |"Sales"
33   |"Engineering"
34   |"Clerical"
35   |"Marketing"

> (table-natural-join emp dept)
 last-name  |department-id|department-name
--
"Rafferty"  |31   |"Sales"
"Jones" |33   |"Engineering"
"Heisenberg"|33   |"Engineering"
"Robinson"  |34   |"Clerical"
"Smith" |34   |"Clerical"

> (->table #:columns '(X Y Z) '(("a" "bcd" "ef") ("gh" "hhu.thnt" "t")))
 X  |Y | Z

"a" |"bcd" |"ef"
"gh"|"hhu.thnt"|"t"




On 09/21/2017 10:03 PM, 'John Clements' via users-redirect wrote:
> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
> written a library that prints out tabular data in a textual format?
> 
> E.G: given 
> 
> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
> 
> returns
> 
> "
> --
> | a  | bcd  | ef |
> | gh | hhu.thnt | t  |
> ———
> “
> 
> (sorry about the horrible damage that Apple Mail inflicts upon this message.)
> 
> … in the style of postgresql and similar display engines?
> 
> It’s easy to write one of these, but if someone else has done it, it will 
> probably have nice bells and whistles that mine won’t.
> 
> John
> 
> 
> 
> 
> 
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-22 Thread Laurent
There's something like that buried in my bazaar package, maybe it's
sufficient for your needs:
https://github.com/Metaxal/bazaar/blob/master/text-table.rkt

The main submodule prints the examples.

It provides two ways to output tables. The first one 'table->string' is the
simplest one and the example outputs:

  a │   b │c │  d │ e │  f │  g │h
——
123 │ 456 │   77 │ 54 │ 1 │ 5646547987 │ 41 │1
——
111 │  22 │  │ 44 │ 5 │  6 │  7 │ 

The second one is more tweakable but more complicated and the example
produces:
╔╦╦╦╗
║i   ║║f1  ║f2  ║
╠╬╬╬╣
╠╬╬╬╣
║a   ║║b   ║c   ║
╠╬╬╬╣
║x   ║║y   ║z   ║
╚╩╩╩╝

If I had time I would merge the two and make it both simple and tweakable...

On Fri, Sep 22, 2017 at 7:07 AM, 'John Clements' via users-redirect <
us...@plt-scheme.org> wrote:

>
> > On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
> >
> > `raco pkg show` implements something very close that you could turn
> > into a library
> >
> > https://github.com/racket/racket/blob/master/racket/
> collects/pkg/private/show.rkt#L102
>
> Ah! Nice!
>
> John
>
> >
> > On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
> >  wrote:
> >> Before I go re-inventing the wheel, I want to ask you folks: has anyone
> written a library that prints out tabular data in a textual format?
> >>
> >> E.G: given
> >>
> >> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
> >>
> >> returns
> >>
> >> "
> >> --
> >> | a  | bcd  | ef |
> >> | gh | hhu.thnt | t  |
> >> ———
> >> “
> >>
> >> (sorry about the horrible damage that Apple Mail inflicts upon this
> message.)
> >>
> >> … in the style of postgresql and similar display engines?
> >>
> >> It’s easy to write one of these, but if someone else has done it, it
> will probably have nice bells and whistles that mine won’t.
> >>
> >> John
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> > --
> > -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
> > -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
> > -=[ Moses 1:33: And worlds without number have I created; ]=-
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-22 Thread 'John Clements' via users-redirect

> On Sep 21, 2017, at 16:10, Jay McCarthy  wrote:
> 
> `raco pkg show` implements something very close that you could turn
> into a library
> 
> https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102

Ah! Nice!

John

> 
> On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
>  wrote:
>> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
>> written a library that prints out tabular data in a textual format?
>> 
>> E.G: given
>> 
>> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
>> 
>> returns
>> 
>> "
>> --
>> | a  | bcd  | ef |
>> | gh | hhu.thnt | t  |
>> ———
>> “
>> 
>> (sorry about the horrible damage that Apple Mail inflicts upon this message.)
>> 
>> … in the style of postgresql and similar display engines?
>> 
>> It’s easy to write one of these, but if someone else has done it, it will 
>> probably have nice bells and whistles that mine won’t.
>> 
>> John
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
> -=[ Moses 1:33: And worlds without number have I created; ]=-
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-21 Thread Jay McCarthy
`raco pkg show` implements something very close that you could turn
into a library

https://github.com/racket/racket/blob/master/racket/collects/pkg/private/show.rkt#L102

On Thu, Sep 21, 2017 at 5:03 PM, 'John Clements' via users-redirect
 wrote:
> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
> written a library that prints out tabular data in a textual format?
>
> E.G: given
>
> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
>
> returns
>
> "
> --
> | a  | bcd  | ef |
> | gh | hhu.thnt | t  |
> ———
> “
>
> (sorry about the horrible damage that Apple Mail inflicts upon this message.)
>
> … in the style of postgresql and similar display engines?
>
> It’s easy to write one of these, but if someone else has done it, it will 
> probably have nice bells and whistles that mine won’t.
>
> John
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
-=[ Jay McCarthy   http://jeapostrophe.github.io]=-
-=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-21 Thread Greg Hendershott
Clojure's pretty print collection has a `print-table`[^1].  Similar
might be a handy addition to `racket/pretty`. Presumably it would work
on any dictionary -- as well as a header-less sequence flavor like you
showed?

Maybe someone could do during the Sunday Rackethon. :)

[^1]: 


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] tabular text display

2017-09-21 Thread Hendrik Boom
On Thu, Sep 21, 2017 at 05:03:57PM -0400, 'John Clements' via users-redirect 
wrote:
> Before I go re-inventing the wheel, I want to ask you folks: has anyone 
> written a library that prints out tabular data in a textual format?
> 
> E.G: given 
> 
> ‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)
> 
> returns
> 
> "
> --
> | a  | bcd  | ef |
> | gh | hhu.thnt | t  |
> ———
> “
> 
> (sorry about the horrible damage that Apple Mail inflicts upon this message.)
> 
> … in the style of postgresql and similar display engines?
> 
> It’s easy to write one of these, but if someone else has done it, it will 
> probably have nice bells and whistles that mine won’t.

Your example needs a fixed-width font.  Perhaps it would be usefu for it
to be able to produce HTML tables as well.

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] tabular text display

2017-09-21 Thread 'John Clements' via users-redirect
Before I go re-inventing the wheel, I want to ask you folks: has anyone written 
a library that prints out tabular data in a textual format?

E.G: given 

‘((“a” “bcd” “ef”) (“gh” “hhu.thnt” “t”)

returns

"
--
| a  | bcd  | ef |
| gh | hhu.thnt | t  |
———
“

(sorry about the horrible damage that Apple Mail inflicts upon this message.)

… in the style of postgresql and similar display engines?

It’s easy to write one of these, but if someone else has done it, it will 
probably have nice bells and whistles that mine won’t.

John







-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.