[racket] Small Inline Visualizations In DrRacket's REPL
Laurent,
I just converted it to typed racket, otherwise essentially the same.
https://gist.github.com/2657613
'rounded has a pixel issue for me.in emacs. Probably a font thing.
'normal and 'double look great.
Are you doing some PGM code in Racket?
Thanks,
Ray
On Thu, May 10, 2012 at 2:13 AM, Laurent <laurent.orseau at gmail.com> wrote:
> Hi,
>
> Here (attached) is another small lib to display tables in text format.
> Sample output:
> ╭────┬┬────────┬────╮
> │i ││f1 │f2 │
> ├────┼┼────────┼────┤
> ├────┼┼────────┼────┤
> │a ││b │c │
> ├────┼┼────────┼────┤
> │x ││y │z │
> ╰────┴┴────────┴────╯
>
> Unfortunately, my version of DrRacket displays one too many pixel.
> If you enhance it, let me know ;)
>
> Laurent
>
> On Thu, May 10, 2012 at 5:31 AM, Ray Racine <ray.racine at gmail.com> wrote:
>
>> I was forwarded a nice working sample from Grant Rettke. From a high
>> level, just build a snip% and display it.
>>
>>
>> On Wed, May 9, 2012 at 10:14 PM, Ray Racine <ray.racine at gmail.com> wrote:
>>
>>> Say I have a modestly complex set of data contained in a standard Racket
>>> structure, e.g. (struct: Data ([...])). I'd like to define some sort of
>>> specialized pretty print (visualization) capability to be used withing
>>> DrRacket at the REPL level.
>>>
>>> So I'm working with some code in Dr Racket in the REPL.
>>>
>>> > (define data (Data ....)) ;; create a structure of data
>>>
>>> > (pretty-visualize data) ;; Either pops up some dialog with
>>> text/graphical visualization or is rendered by the REPL immediately below.
>>> ==================
>>> | Text
>>> | or 2-d Canvas
>>> | rendering here.
>>> |
>>> |
>>> ==================
>>>
>>> > |
>>>
>>> Say something along the lines one can see in the Professional Tables
>>> here.
>>> http://en.wikibooks.org/wiki/LaTeX/Tables
>>>
>>> I've been poking around in the DrRacket manual but haven't found any
>>> place to gain traction on something like this. Any pointers on here I
>>> should start reading?
>>>
>>> Thanks in advance.
>>>
>>>
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120511/59f9def2/attachment-0001.html>