Re: [racket-users] Pretty display of tabular data?

2019-03-15 Thread Greg Hendershott
> 90% of the reason I made `raart` is because of this.
>
> https://docs.racket-lang.org/raart/index.html#%28def._%28%28lib._raart%2Fdraw..rkt%29._table%29%29
>
> (require raart
> (draw-here (table (text-rows THE-TABULAR-DATA)))

Although I didn't see one in the docs, it looks like you have an
example in the tests:

  https://github.com/jeapostrophe/raart/blob/master/t/draw.rkt#L24-L39

-- 
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] Pretty display of tabular data?

2019-03-14 Thread Matt Jadud
On Thu, Mar 14, 2019 at 11:51 AM  wrote:

>
> 3. Which brings me to to the biggest obstacle.
>
> — beginners make mistakes
> — languages must explain mistakes
> — beginners better understand these explanations
>
>
Yes to all three of your points. I was thinking about your last point in my
first exploration, and error handling/reporting is something that is at the
front of my mind as I look at things like Pyret's sanitizers, as well as
the many/manifest ways that I see students struggle/fail with R. I don't
think I'll be able to "solve" this in the first instance, but keeping
centered the lived experience of the novice when learning to work with data
(which often comes in "from the wild," and is not
consistent/reliable/etc.), how to manage that messiness, and how to report
back in a learning-centric way when they encounter difficulty is going to
be 1) hard and 2) critical.

Which is perhaps a reflection/restatement/variation of what your last point.

I'm generally familiar with the broad space in which Guillaume's work is
situated, and have seen in presented/read it. So, yes.

And, thank you for the pointer to the rewriter library. The Racket stack is
rich enough at this point that I forget the wealth of tools that are
available.

Cheers,
M

-- 
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] Pretty display of tabular data?

2019-03-14 Thread matthias



> On Mar 14, 2019, at 1:26 AM, Alex Harsanyi  wrote:
> 
>  Would it be possible to join forces
> and merge these projects so that we end up with one library that servers
> multiple purposes equally well? 


1. I have been at this point many times. 

A big example is the testing libraries that we use for teaching (test-engine/) 
vs production programming (rackunit/). Initially I wanted the former to compile 
to the latter, but because we need John’s stepper to work and we focus on 
DrRacket and we have pedagogic constraints, that just didn't work out. 

Another example would be drawing and event handling, see pict and images and 
big-bang vs the GUI tool box. They are even further apart than the testing 
libraries. 

2. So Matt’s injection of two perspectives is a really good one. 

Still it might make sense to think of the one for devs as a scaled-up version 
of those for pedagogic setting and vice versa. This can happen at 

— the conceptual level: let me introduce concepts in CS1 or my high school 
course that are useful later when you use Real Racket
— the implementation level: the pedagogic one several restricts the dev-focused 
one and improves the error messages severely. 

3. Which brings me to to the biggest obstacle. 

The key difference between the teaching languages and Racket is that the former 
assume that 

— beginners make mistakes 
— languages must explain mistakes 
— beginners better understand these explanations 

This is hard to get right because implementations bake in assumptions about who 
the users are w/o (usually) paying attention to this idea. Whoever works on the 
pedagogic version, consider linking in the rewriter library so you benefit from 
Guillaume Marceau’s research: 

 (require lang/private/rewrite-error-message) 
 (get-rewriten-error-message x)


— Matthias

-- 
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] Pretty display of tabular data?

2019-03-13 Thread Jay McCarthy
I started with the good text-table library, but found I wanted more
and more other drawing tools and ended up making something pict-like
for the terminal.

On Wed, Mar 13, 2019 at 2:26 PM Jay McCarthy  wrote:
>
> 90% of the reason I made `raart` is because of this.
>
> https://docs.racket-lang.org/raart/index.html#%28def._%28%28lib._raart%2Fdraw..rkt%29._table%29%29
>
> (require raart
> (draw-here (table (text-rows THE-TABULAR-DATA)))
>
> Jay
>
> On Wed, Mar 13, 2019 at 2:19 PM Matt Jadud  wrote:
> >
> > Hi all,
> >
> > I have a tabular data type that I'd like (I think) to be able to render it 
> > either in ASCII or in a prettier way in the Interactions pane. I've 
> > explored gen:write and friends, and can get the struct to display the way I 
> > want---with ASCII. Essentially easy-peasy.
> >
> > What I wonder is: am I able to do something prettier? Can I encapsulate 
> > some kind of styled rendering as a snip%, or... something... so that I can 
> > render the first 5 and last 5 rows of a table with bolding of headers, etc.?
> >
> > I don't know where to start, essentially, if I wanted to try and do this. 
> > Or, perhaps it is not particularly doable.
> >
> > Pointers to examples in codebases are welcome (if such examples exist), and 
> > I can work from there. Or, indications that this might be really difficult 
> > are also welcome.
> >
> > Cheers,
> > Matt
> >
> > (Apologies if this somehow comes through twice... I sent it to plt-scheme 
> > first...)
> >
> > --
> > 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; ]=-



-- 
-=[ 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] Pretty display of tabular data?

2019-03-13 Thread Laurent
Not sure how much this would help you, but there's a `text-table`package.
It's fairly simple though.
Docs: https://docs.racket-lang.org/text-table/index.html

On Wed, Mar 13, 2019 at 6:19 PM Matt Jadud  wrote:

> Hi all,
>
> I have a tabular data type that I'd like (I think) to be able to render it
> either in ASCII or in a prettier way in the Interactions pane. I've
> explored gen:write and friends, and can get the struct to display the way I
> want---with ASCII. Essentially easy-peasy.
>
> What I wonder is: am I able to do something prettier? Can I encapsulate
> some kind of styled rendering as a snip%, or... something... so that I can
> render the first 5 and last 5 rows of a table with bolding of headers,
> etc.?
>
> I don't know where to start, essentially, if I wanted to try and do this.
> Or, perhaps it is not particularly doable.
>
> Pointers to examples in codebases are welcome (if such examples exist),
> and I can work from there. Or, indications that this might be really
> difficult are also welcome.
>
> Cheers,
> Matt
>
> (Apologies if this somehow comes through twice... I sent it to plt-scheme
> first...)
>
> --
> 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] Pretty display of tabular data?

2019-03-13 Thread Jay McCarthy
90% of the reason I made `raart` is because of this.

https://docs.racket-lang.org/raart/index.html#%28def._%28%28lib._raart%2Fdraw..rkt%29._table%29%29

(require raart
(draw-here (table (text-rows THE-TABULAR-DATA)))

Jay

On Wed, Mar 13, 2019 at 2:19 PM Matt Jadud  wrote:
>
> Hi all,
>
> I have a tabular data type that I'd like (I think) to be able to render it 
> either in ASCII or in a prettier way in the Interactions pane. I've explored 
> gen:write and friends, and can get the struct to display the way I 
> want---with ASCII. Essentially easy-peasy.
>
> What I wonder is: am I able to do something prettier? Can I encapsulate some 
> kind of styled rendering as a snip%, or... something... so that I can render 
> the first 5 and last 5 rows of a table with bolding of headers, etc.?
>
> I don't know where to start, essentially, if I wanted to try and do this. Or, 
> perhaps it is not particularly doable.
>
> Pointers to examples in codebases are welcome (if such examples exist), and I 
> can work from there. Or, indications that this might be really difficult are 
> also welcome.
>
> Cheers,
> Matt
>
> (Apologies if this somehow comes through twice... I sent it to plt-scheme 
> first...)
>
> --
> 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.


[racket-users] Pretty display of tabular data?

2019-03-13 Thread Matt Jadud
Hi all,

I have a tabular data type that I'd like (I think) to be able to render it
either in ASCII or in a prettier way in the Interactions pane. I've
explored gen:write and friends, and can get the struct to display the way I
want---with ASCII. Essentially easy-peasy.

What I wonder is: am I able to do something prettier? Can I encapsulate
some kind of styled rendering as a snip%, or... something... so that I can
render the first 5 and last 5 rows of a table with bolding of headers,
etc.?

I don't know where to start, essentially, if I wanted to try and do this.
Or, perhaps it is not particularly doable.

Pointers to examples in codebases are welcome (if such examples exist), and
I can work from there. Or, indications that this might be really difficult
are also welcome.

Cheers,
Matt

(Apologies if this somehow comes through twice... I sent it to plt-scheme
first...)

-- 
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.