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

2019-03-15 Thread Greg Hendershott
This is a great idea. Also I want to point out that:

1. Sometimes it's OK to start by sharing a repo on Git{Hub Lab}. Not
everything needs to go on pkgs.racket-lang.org immediately, to be
visible and share, especially early on.

(To be clear, I'm not saying, "oh only perfect 1.0 things should be a
package". I'm just pointing out that pkgs.r-l.org isn't fantastic for
discoverability, so if that's the main motivation, it's not your only
or even your best option.)

2. If you do have a package that does XYZ, and someone then makes a
package for X, sometimes it's OK to change your package just to
re-`provide` their module for X (and yours still does Y and Z).

For example, my rackjure package had a threading macro. Then Alexis
made a `threading` package. It was 99% compatible, she took a PR for
the 1%, and I changed rackjure to re-provide that. And the docs say
so. So, it didn't break users of rackjure. Plus people could switch to
using `threading` directly, if/when they wanted. And the Racket world
had one less bit of duplicate code. I think that worked out well.

(In fact if that continued to where rackjure was "merely" a
"meta-package" that re-provided focused packages, I'd be fine with
that!)

Maybe that idea could apply here?

-- 
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-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] printing decimals

2019-03-15 Thread Laurent
You're probably looking for `real->decimal-string`.

Also take a look at ~r instead of ~a, as the former is only for numbers.

On Fri, Mar 15, 2019 at 5:57 PM  wrote:

> Hi all,
>
> I've been looking through the docs for a way to print decimals to a
> defined precision.
>
> I can get close to what I want using something like ~a and giving it a set
> width without having to build a function to do so. I mean I can build a
> function to do as its just a bit of string manip but it feels really odd
> that there doesn't seem to be a built in way to do so even though we try to
> keep all the decimals in fractional notation to maintain precision as long
> as possible in racket.
>
> any ideas anyone or am I just being blind and its right there in the docs
> somewhere?
>
> thanks,
> Scott
>
> --
> 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] printing decimals

2019-03-15 Thread sdgudeman
sigh good greif I was being blind its all of a page or so below ~a 
thank you Jon

On Friday, March 15, 2019 at 12:58:58 PM UTC-5, Jon Zeppieri wrote:
>
>
> https://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29
>
> On Fri, Mar 15, 2019 at 1:57 PM > wrote:
>
>> Hi all,
>>
>> I've been looking through the docs for a way to print decimals to a 
>> defined precision.
>>
>> I can get close to what I want using something like ~a and giving it a 
>> set width without having to build a function to do so. I mean I can build a 
>> function to do as its just a bit of string manip but it feels really odd 
>> that there doesn't seem to be a built in way to do so even though we try to 
>> keep all the decimals in fractional notation to maintain precision as long 
>> as possible in racket.
>>
>> any ideas anyone or am I just being blind and its right there in the docs 
>> somewhere?
>>
>> thanks,
>> Scott
>>
>> -- 
>> 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...@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] printing decimals

2019-03-15 Thread Jon Zeppieri
https://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29

On Fri, Mar 15, 2019 at 1:57 PM  wrote:

> Hi all,
>
> I've been looking through the docs for a way to print decimals to a
> defined precision.
>
> I can get close to what I want using something like ~a and giving it a set
> width without having to build a function to do so. I mean I can build a
> function to do as its just a bit of string manip but it feels really odd
> that there doesn't seem to be a built in way to do so even though we try to
> keep all the decimals in fractional notation to maintain precision as long
> as possible in racket.
>
> any ideas anyone or am I just being blind and its right there in the docs
> somewhere?
>
> thanks,
> Scott
>
> --
> 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.


[racket-users] printing decimals

2019-03-15 Thread sdgudeman
Hi all,

I've been looking through the docs for a way to print decimals to a defined 
precision.

I can get close to what I want using something like ~a and giving it a set 
width without having to build a function to do so. I mean I can build a 
function to do as its just a bit of string manip but it feels really odd 
that there doesn't seem to be a built in way to do so even though we try to 
keep all the decimals in fractional notation to maintain precision as long 
as possible in racket.

any ideas anyone or am I just being blind and its right there in the docs 
somewhere?

thanks,
Scott

-- 
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] Writing scribble?

2019-03-15 Thread David Storrs
An alternative is to write it in whatever editor you like (Emacs) and then
either use DrRacket to render it to scribble or do it directly from the
command line:

$ scribble ./my_scribble_file.scrbl

This will generate "./my_scribble_file.html", which you can then view in a
browser.  If you regenerate it, just hit "refresh" on the browser to see
the changes.

On Wed, Mar 13, 2019 at 8:21 PM Matt Jadud  wrote:

> I was going to say... is ESC-B some kind of shortcut from one of those
> "text editors" I hear people talk about? ;) (I should have remembered that
> DrR has bindings for many Emacs shortcuts...)
>
> Also, thanks for the reminder about the prefs/bindings; this is
> essentially the first time I've spent significant time poking at Scribble,
> and the shortcuts that are useful are different, so they're in my
> unlearned-space. I appreciate the pointers.
>
> Cheers,
> M
>
>
> On Wed, Mar 13, 2019 at 8:16 PM Robby Findler 
> wrote:
>
>> It is control-left and control-right to go by words in DrRacket. If
>> you go to Edit|Keybindings|Show Active Keybindings and type "word"
>> you'll see those and the ones Matthias mentioned and some other
>> word-related keystrokes.
>>
>> Robby
>>
>> On Wed, Mar 13, 2019 at 1:24 PM Matt Jadud  wrote:
>> >
>> > Hi all,
>> >
>> > I assume people use DrRacket to write Scribblings.
>> >
>> > I'll be writing text, and want to move back one word. On the Mac, most
>> of the time I can hit Option-LeftArrow, and I go back one word.
>> >
>> > I DrRacket, this takes me back an expression, which in Scribble is a
>> whole paragraph.
>> >
>> > Are there shortcuts for moving around Scribble documents that I don't
>> know? Do people use other tools to write Scribblings?
>> >
>> > Cheers,
>> > Matt
>> >
>> > --
>> > 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.


[racket-users] [TFP'19] second call for papers: Trends in Functional Programming 2019, 12-14 June 2019, Vancouver, BC, CA

2019-03-15 Thread p.achten

   2 N D  C A L L  F O R  P A P E R S


  == TFP 2019 ==

  20th Symposium on Trends in Functional Programming
   12-14 June, 2019
  Vancouver, BC, CA
  https://www.tfp2019.org/index.html


== Important Dates ==

Submission Deadline for pre-symposium formal reviewThursday, March 28, 
2019
Sumbission Deadline for Draft Papers   Thursday, May 9, 2019
Notification for pre-symposium submissions Thursday, May 2, 2019
Notification for Draft Papers  Tuesday, May 14, 1029
TFPIE  Tuesday, June 11, 
2019
Symposium  Wednesday, June 12, 
2019 – Friday, June 14, 2019
Notification of Student Paper Feedback Friday June 21, 2019
Submission Deadline for revised Draft Papers (post-symposium formal review)
   Thursday, August 1, 
2019
Notification for post-symposium submissionsThursday, October 
24, 2019
Camera Ready Deadline (both pre- and post-symposium)   Friday, November 29, 
2019


The symposium on Trends in Functional Programming (TFP) is an international 
forum for 
researchers with interests in all aspects of functional programming, taking 
a broad 
view of current and future trends in the area. It aspires to be a lively 
environment 
for presenting the latest research results, and other contributions (see 
below at scope). 

Please be aware that TFP uses two distinct rounds of submissions (see below 
at submission 
details).

TFP 2019 will be the main event of a pair of functional programming events. 
TFP 2019 
will be accompanied by the International Workshop on Trends in Functional 
Programming 
in Education (TFPIE), which will take place on June 11.


== Scope ==

The symposium recognizes that new trends may arise through various routes. 
As part of 
the Symposium's focus on trends we therefore identify the following five 
article 
categories. High-quality articles are solicited in any of these categories:

Research Articles:
Leading-edge, previously unpublished research work
Position Articles:
On what new trends should or should not be
Project Articles:
Descriptions of recently started new projects
Evaluation Articles:
What lessons can be drawn from a finished project
Overview Articles:
Summarizing work with respect to a trendy subject

Articles must be original and not simultaneously submitted for publication 
to any 
other forum. They may consider any aspect of functional programming: 
theoretical, 
implementation-oriented, or experience-oriented. Applications of functional 
programming 
techniques to other languages are also within the scope of the symposium.

Topics suitable for the symposium include, but are not limited to:

Functional programming and multicore/manycore computing
Functional programming in the cloud
High performance functional computing
Extra-functional (behavioural) properties of functional programs
Dependently typed functional programming
Validation and verification of functional programs
Debugging and profiling for functional languages
Functional programming in different application areas:
security, mobility, telecommunications applications, embedded
systems, global computing, grids, etc.
Interoperability with imperative programming languages
Novel memory management techniques
Program analysis and transformation techniques
Empirical performance studies
Abstract/virtual machines and compilers for functional languages
(Embedded) domain specific languages
New implementation strategies
Any new emerging trend in the functional programming area

If you are in doubt on whether your article is within the scope of TFP, 
please contact 
the TFP 2019 program chairs, William J. Bowman and Ron Garcia.


== Best Paper Awards ==

To reward excellent contributions, TFP awards a prize for the best paper 
accepted for 
the formal proceedings.

TFP traditionally pays special attention to research students, 
acknowledging that 
students are almost by definition part of new subject trends. A student 
paper is one 
for which the authors state that the paper is mainly the work of students, 
the students 
are listed as first authors, and a student would present the paper. A prize 
for the 
best student paper is awarded each year.

In both cases, it is the PC of TFP that awards the prize. In case the best 
paper happens 
to be a student paper, that paper will then receive both prizes.


== Instructions to Author ==

Papers must be submitted at:

https://easychair.org/conferences/?conf=tfp2019

Authors of papers have the choice of having their contribu

[racket-users] Racket News - Issue 4

2019-03-15 Thread 'Paulo Matos' via Racket Users
I have just published Issue 4 at

http://racket-news.com/2019/03/racket-news-issue-4.html

Grab a coffee and enjoy!
-- 
Paulo Matos

-- 
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] Struct subtype with default/fixed value of super-type

2019-03-15 Thread Marc Kaufmann
Hi all,

suppose I have a struct `(struct fish (size name) #:transparent)` and a 
sub-type `(struct shark fish (scares-people?) #:transparent)`. What if I 
want all sharks to have size 'large by default whenever I create one, so 
that I create them via:

(define white-shark (shark "The big white" #t))

rather than 

(define white-shark (shark 'big "The big white" #t))

Is that possible to do, other than defining my own wrapper? If it is not 
possible with the current structures, I guess it would be bad practice to 
overwrite the `shark` constructor, and rather create a `my-shark` 
constructor to avoid (hypothetical) reader of my code wouldn't get confused.

Best,
Marc

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

2019-03-15 Thread jackhfirth
I think we should all work towards making our existing code in this area 
more discoverable, so we can get a better sense of what libraries for 
working with tables exist in the wild. To those of you who own Racket 
packages that provide any functionality related to data tables: I recommend 
adding the "tabular" tag to your package's description in the package 
catalog. There's no need to remove more-specific tags (like "data-frame") 
from your package, but even if you have a more specific tag please include 
the general "tabular" tag so it's easy to search for your package. So far 
there's only 3 packages 
 tagged with 
"tabular" (and one of those is a package of mine that I just tagged while 
writing this post). I see several packages that are good candidates for the 
tag:

   - data-frame
   - sqlite-table
   - table-panel
   - tabular
   - rml-core (maybe?)
   - sinbad
   - spmatrix (maybe?)
   - spreadsheet-editor
   - csv
   - csv-reading
   - csv-writing
   - simple-csv
   - Most things with the "sql" tag
   
The more packages we have tagged and documented, the easier it will be to 
find real code using tables in the wild. Which is information we'll need if 
we want to understand how a standard `racket/table` API might look.

On Thursday, March 14, 2019 at 10:28:41 AM UTC-7, Ryan Kramer wrote:
>
> On Thursday, March 14, 2019 at 12:26:39 AM UTC-5, Alex Harsanyi wrote:
>
>>
>> There are now several projects announced on this list, all of them deal 
>> with
>> data analysis on one way or the other.  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?  Something where the final product is 
>> greater
>> than the sum of its parts...
>>
>> Or perhaps these libraries have aims that are so different from each other
>> that the only thing they share is a very abstract concept of "table"?
>>
>
> I think my project "plisqin" is one of those you are thinking of. Matt's 
> "tbl" is also one. I'm also keeping an eye on Ryan's "sql". Are there any 
> more you were thinking of?
>
> Regarding joining forces/merging these projects, this is a good question 
> that I think warrants discussion. So I'll share my thoughts.
>
> Obviously I can't speak for all of us, but right not I only see the "very 
> abstract concept of "table"" as potential shared code. (Also, learning 
> about snip% earlier in this thread was awesome. I'd love to use something 
> like that in my project.)
>
> I think the differences between plisqin and tbl are fairly obvious - 
> plisqin is an alternative to SQL while tbl is an alternative to 
> "Python/NumPy/SciPy, or R/Tidyverse (or, horrors, plain R)"
>
> Now comparing Ryan's sql to plisqin is a different story. These projects 
> are both alternatives to SQL. But I think there is enough difference 
> between our approaches and scope to warrant separate projects, at least for 
> now.
> 1) sql seems to be mostly implemented as macros. plisqin is mostly 
> implemented as procedures.
> 2) plisqin has some design decisions that some might consider "too much 
> magic", namely inline joins and "inject-able aggregates" (need better name) 
> as documented here: https://docs.racket-lang.org/plisqin/intro.html. 
> Whereas sql-the-package seems to more closely mirror SQL-the-language - it 
> would be difficult to surprise yourself with the SQL you generate.
> 3) I am trying to design #lang plisqin so that people with no Lisp 
> experience can use it. (Whether I will succeed is another matter...)
>
> I apologize to Ryan C if I have mischaracterized sql. I'd like to have a 
> longer conversation about this, but maybe this list is not the right place. 
> (Also, Ryan, if you think our goals are more similar than I do, I'd be 
> happy to work with you. You're definitely a more experienced Racketeer and 
> it would surely boost my code quality.)
>
> - Ryan Kramer
>

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