[racket-users] for loop: any way to access the whole list?

2019-06-14 Thread Sanjeev Sharma
within this for loop is there any way to access different pieces of the 
description and amt?  car-ing and cdr-ing for example?

Or move the identifier definitions into the let*, and pass those to for in 
some way?

(let*((ratio 9/12))
  (for((description(list "this" "that"))
   (amt(list 4467.61 2428.37)))
(printf"~a ~a: changed values\n"
   description
   (cat(* amt ratio) -2.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/07ad5ce3-0ba8-48a5-a356-5cb1545de4cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: for loop: any way to access the whole list?

2019-06-14 Thread Sanjeev Sharma
cat is from srfi/54

On Friday, June 14, 2019 at 10:45:10 AM UTC-4, Sanjeev Sharma wrote:
>
> within this for loop is there any way to access different pieces of the 
> description and amt?  car-ing and cdr-ing for example?
>
> Or move the identifier definitions into the let*, and pass those to for in 
> some way?
>
> (let*((ratio 9/12))
>   (for((description(list "this" "that"))
>(amt(list 4467.61 2428.37)))
> (printf"~a ~a: changed values\n"
>description
>(cat(* amt ratio) -2.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/c169fcde-ba78-4ba6-8756-cb399089c560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket Week Housing - Deadline is 06/21

2019-06-14 Thread Jay McCarthy
Racket Week is less than a month away! The dorm housing signup for the
workshops is closing soon. You'll have until 06/21 to register for it.

https://school.racket-lang.org/#housing

The details are at the link, but in summary, it's $40/night at the
University of Utah dorms.

Jay

--
Jay McCarthy
Associate Professor @ CS @ UMass Lowell
http://jeapostrophe.github.io
Vincit qui se vincit.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAJYbDamgeBN1VOQRVtb4u2uWKNnac0a2Y2f08Sj_RQmqmzswOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: 7 GUIs

2019-06-14 Thread Matthias Felleisen



> On Jun 1, 2019, at 7:47 PM, Matthias Felleisen  wrote:
> 
> 
> Someone recently mentioned the “7 GUIs” task. I spent a couple of days to 
> write up minimal solutions: 
> 
>  https://github.com/mfelleisen/7GUI/blob/master/task-7.rkt 
> 
> In my spare time, I will develop this repo in more depth (types, units, etc) 
> because it looks like a reasonably educational task.  


I have continued my work on this repo, with two major additions: 

 — Macros/ which shows how to abstract over syntactic patterns in the GUI code 
 — Typed/ which injects types according to Typed Racket’s gradual typing 
philosophy 

Both READMEs are simple experience reports. It has been fun, and I intend to 
add MVC implementations based on Units at some point soon, and perhaps a bit 
more. 

— 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/A167D566-F645-460E-9155-CC0F33043159%40felleisen.org.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for loop: any way to access the whole list?

2019-06-14 Thread Jens Axel Søgaard
I am not entirely sure this answer is what you are looking for, but the
following generator
will produce the pairs of the list instead of the elements.

(define (in-pairs xs)
  (make-do-sequence
   (λ ()
 (define (pos->element p) p)
 (define (next-position p) (cdr p))
 (define initial-position xs)
 (define (continue-with-pos? p) (pair? p))
 (values pos->element
 next-position
 initial-position
 continue-with-pos?
 #f #f

Example:

>* (for ([p (in-pairs '(1 2 3 4))])
*(displayln p))
(1 2 3 4)
(2 3 4)
(3 4)
(4)

So you can use

(define descriptions (list "this" "that"))
(define amounts  (list 4467.61 2428.37))
(for ([d descriptions] [ds (in-pairs descriptions)])
  [a amounts]  [as (in-pairs amounts])
   ...)

And use ds and as to get to other descriptions/amounts than the current
(which are in d and a).

/Jens Axel



Den fre. 14. jun. 2019 kl. 16.45 skrev Sanjeev Sharma :

> within this for loop is there any way to access different pieces of the
> description and amt?  car-ing and cdr-ing for example?
>
> Or move the identifier definitions into the let*, and pass those to for in
> some way?
>
> (let*((ratio 9/12))
>   (for((description(list "this" "that"))
>(amt(list 4467.61 2428.37)))
> (printf"~a ~a: changed values\n"
>description
>(cat(* amt ratio) -2.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/07ad5ce3-0ba8-48a5-a356-5cb1545de4cd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
-- 
Jens Axel Søgaard

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABefVgzj7eyxCpoq%3D3ULbeZ9-BsDkPj50RZa%3D-nhQxnf65u4rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] The search for routy

2019-06-14 Thread Ben Greenman
On 6/14/19, Gregor Kopp  wrote:
> Hi!
> I found here docs: https://docs.racket-lang.org/routy/
> I'd like to try this for fast prototyping, but can't find the package as my
>
> google-fu is sloppy I guess.
> Any help please, sirs and madams?

Another option: search for "routy" at pkgs.racket-lang.org

https://pkgd.racket-lang.org/pkgn/search?q=routy+


The entry for the package (with a link to the github source) is here:

https://pkgs.racket-lang.org/package/routy

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R4V9TYOG7wmCr23%2Bcnf2nSLZK6OtNP7vqj%3D-6yaPzu6iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] The search for routy

2019-06-14 Thread Matthias Felleisen


You may be interested in 

  https://github.com/adjkant/web-sourcery (wip) 







> On Jun 14, 2019, at 3:15 AM, Gregor Kopp  wrote:
> 
> Thank you very much!
> It's hot here...
> 
> Am Freitag, 14. Juni 2019 08:58:53 UTC+2 schrieb Tom Gillespie:
> https://github.com/Junker/routy found via `racket routy git` seems right?
> 
> On Thu, Jun 13, 2019 at 11:56 PM Gregor Kopp  wrote:
> Hi!
> I found here docs: https://docs.racket-lang.org/routy/
> I'd like to try this for fast prototyping, but can't find the package as my 
> google-fu is sloppy I guess.
> Any help please, sirs and madams?
> 
> Thank you, Gregor
> 
> 
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/df56c1d0-7626-4284-bb77-089af462dacf%40googlegroups.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/82c97a21-0ffd-4614-a805-96e810426a1e%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5463F325-B52F-4C7E-B7D6-C1B64178E9B8%40felleisen.org.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket News - Issue 10

2019-06-14 Thread 'Paulo Matos' via Racket Users
It's here!!!

https://racket-news.com/2019/06/racket-news-issue-10.html

Have a good weekend,
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/f6a730ed-72f1-ba93-ffe3-21bd4af9dfe8%40linki.tools.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Why struct type doesn't include field names?

2019-06-14 Thread Matthew Flatt
At Thu, 13 Jun 2019 20:50:34 -0700, Sorawee Porncharoenwase wrote:
> Hence the question: why struct type doesn’t include field names?

It was an early design decision. There didn't seem to be a need to keep
field names, and so we left them out for simplicity. That may seem
difficult to believe, given that all the functionality that structure
types eventually acquired, but that's how it went.

I think omitting field names was probably a mistake. Other decisions
that were probably mistakes: making structure types opaque by default
and including "auto" fields. Those are to point to reconsider in a
design for Racket 2.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d03b5e7.1c69fb81.813a5.1e92SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Why struct type doesn't include field names?

2019-06-14 Thread David Storrs
On Thu, Jun 13, 2019 at 11:50 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:

> Hence the question: why struct type doesn’t include field names?
>


  struct-plus-plus  (
https://docs.racket-lang.org/struct-plus-plus/index.html#%28part._.Reflection%29)
gives you full reflection data, including field names.  Also, field
contracts, field wrappers, keyword constructor, functional setters, field
transformers, field validation, inter-field integrity checking, and easy
syntax for converting struct++ types to and from other values.  It doesn't
support supertypes or field options (#:auto or #:mutable on a field), but
it has strictly superior functionality to replace #:auto and you can always
make the full struct #:mutable.

























> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CADcuegvjQ_%2BgYg_VQb4TG-czSAMzZJOtZ0K3Ge7c_XNUO2QzCQ%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKoeSWq6ucOiRQxPpzU8Q-7LfVNmZHBw4G1k-On3SXqoUnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] for loop: any way to access the whole list?

2019-06-14 Thread David Storrs
On Fri, Jun 14, 2019 at 10:45 AM Sanjeev Sharma  wrote:

> within this for loop is there any way to access different pieces of the
> description and amt?  car-ing and cdr-ing for example?
>

I'm not entirely clear on what you're looking for, but maybe this helps?

(define lst '(a b c))
(for ([(val idx) (in-indexed lst)])
  (displayln (cons  val idx))
  (when (< idx (sub1 (length lst)))
(displayln (format "\tnext val: ~a" (list-ref lst (add1 idx))

Output:
(a . 0)
next val: b
(b . 1)
next val: c
(c . 2)


> Or move the identifier definitions into the let*, and pass those to for in
> some way?
>
> (let*((ratio 9/12))
>   (for((description(list "this" "that"))
>(amt(list 4467.61 2428.37)))
> (printf"~a ~a: changed values\n"
>description
>(cat(* amt ratio) -2.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/07ad5ce3-0ba8-48a5-a356-5cb1545de4cd%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKoenWYdDgchNr5-T_UzDbNb3uzgL%3DKxQv8a2U2DmXXSedA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] RacketCon hotel group rate

2019-06-14 Thread James Platt
I actually booked rooms at a hotel across the street from the Little America 
for much less.  In all the conferences and other events I have been to, I don't 
think I have ever, even once, found the group-rate rooms at the host hotel to 
be the best deal.

James


On Jun 14, 2019, at 3:40 PM, Matthew Flatt wrote:

> If you're attending just RacketCon, there are still some group-rate
> rooms available at the Little America Hotel --- but you'll need to act
> fast. Our guaranteed group reservation has expired, but they'll
> continue to accept group reservations as long as space remains.
> 
> See
> 
>  https://con.racket-lang.org/
> 
> for more information.
> 
> At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
>> Racket Week is less than a month away! The dorm housing signup for the
>> workshops is closing soon. You'll have until 06/21 to register for it.
>> 
>> https://school.racket-lang.org/#housing
>> 
>> The details are at the link, but in summary, it's $40/night at the
>> University of Utah dorms.
>> 
>> Jay
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTPIN_ADDED_MISSING%40gmr-mx.google.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0F46524A-2E60-48F5-B013-67571DA16812%40biomantica.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] RacketCon hotel group rate

2019-06-14 Thread Matthew Flatt
If you're attending just RacketCon, there are still some group-rate
rooms available at the Little America Hotel --- but you'll need to act
fast. Our guaranteed group reservation has expired, but they'll
continue to accept group reservations as long as space remains.

See

  https://con.racket-lang.org/

for more information.

At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
> Racket Week is less than a month away! The dorm housing signup for the
> workshops is closing soon. You'll have until 06/21 to register for it.
> 
> https://school.racket-lang.org/#housing
> 
> The details are at the link, but in summary, it's $40/night at the
> University of Utah dorms.
> 
> Jay

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] managing competing access to filesystem within places

2019-06-14 Thread Matthew Flatt
At Fri, 14 Jun 2019 15:26:17 -0700, Matthew Butterick wrote:
> 
> 
> > On Jun 13, 2019, at 6:43 PM, Matthew Flatt  wrote:
> > 
> > 
> > Oh, don't do that. Unreliable workarounds to concurrency problems
> > really do come back to bite you later.
> 
> To ask the second dumbest possible question, what error-recovery policies are 
> reliable under concurrency? (Put another way, what guarantees exist about 
> errors under concurrency? E.g. can we trust that all errors will trigger an 
> exception?)
> 
> And the dumbest possible: if there are no such policies, then how can you 
> ever 
> be certain the code works?

That's a difficult and non-dumb question, and what follows is probably
too general of an answer, but I'll try.

Concurrency with shared state is a particularly rich source of
unspecified behavior. The only way to deal with that is to make sure
your program never reaches an unspecified situation. If concurrently
reading and writing to a shared mutable variable is not specified, for
example, then one way to avoid that is by using a lock (whose behavior
with concurrency is specified) and only touch the variable while
holding the lock. And if your program does reach an unspecified
situation? Normally you do not get an error; some difficulty in
detecting the error is probably why it's unspecified in the first
place.

But I think you're more interested in the filesystem level. The range
of possible behaviors is usually more specified at the filesystem
level, but it's not always easy to reason about. For example,
`rename-file-or-directory` is an atomic operation on Unix filesystems,
which means that if two processes concurrently try to rename different
files to the same path, then one of them will win; the resulting path
will refer to one file or the other with its contents intact, and the
other file's content will effectively disappear. That's enough
specification to be useful for some tasks, and other tasks just
shouldn't enable those kinds of races.

And then there's Windows, where `rename-file-or-directory` is not
straightforwardly atomic. Meanwhile, errors such as "permission denied"
can be reported for things that you would not consider to be permission
errors, like moving a file to a name that was formerly occupied, but
that was deleted while some process still has it open, so the name is
not yet released. So, as a practical matter, the set of behaviors to
avoid is larger.

The errors that are possible from filesystem operations are usually
pretty open-ended, especially at the Racket level, where we don't try
to enumerate them. Meanwhile, you usually get some integrity guarantees
from the filesystem, though we don't try to enumerate those
exhaustively in the Racket documentation, either.

Sometimes, staying out of the error-triggering space is unavoidable,
and the possible errors are well enough defined by all filesystems, so
retrying is a workable solution. If you really have to be in that
space, then retry an arbitrary number of times, perhaps with an
exponential backoff (i.e., double the delay between retries).

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d042f03.1c69fb81.f1a05.491dSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] RacketCon hotel group rate

2019-06-14 Thread David Storrs
On Fri, Jun 14, 2019 at 5:16 PM Robby Findler 
wrote:

> Not that you should change your system/plans, but attendees booking
> rooms at the hotel is actually part of what helps to pay for the event
> (because of the way the contracts between the event and the hotel
> works). In this case, I don't think there is any issue and RacketCon
> is, as far as I know, fine, but that may explain your experience. :)
>
> Robby
>
>
That's good to know; thanks, Robby.

In this case, James and I paid the 'patron' rate in order to help support
the con, so I hope you don't think too badly of us despite not taking the
group rate -- I'd rather give money straight to y'all instead of to a hotel!

Dave

On Fri, Jun 14, 2019 at 3:20 PM James Platt  wrote:
> >
> > I actually booked rooms at a hotel across the street from the Little
> America for much less.  In all the conferences and other events I have been
> to, I don't think I have ever, even once, found the group-rate rooms at the
> host hotel to be the best deal.
> >
> > James
> >
> >
> > On Jun 14, 2019, at 3:40 PM, Matthew Flatt wrote:
> >
> > > If you're attending just RacketCon, there are still some group-rate
> > > rooms available at the Little America Hotel --- but you'll need to act
> > > fast. Our guaranteed group reservation has expired, but they'll
> > > continue to accept group reservations as long as space remains.
> > >
> > > See
> > >
> > >  https://con.racket-lang.org/
> > >
> > > for more information.
> > >
> > > At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
> > >> Racket Week is less than a month away! The dorm housing signup for the
> > >> workshops is closing soon. You'll have until 06/21 to register for it.
> > >>
> > >> https://school.racket-lang.org/#housing
> > >>
> > >> The details are at the link, but in summary, it's $40/night at the
> > >> University of Utah dorms.
> > >>
> > >> Jay
> > >
> > > --
> > > 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.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTPIN_ADDED_MISSING%40gmr-mx.google.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.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/0F46524A-2E60-48F5-B013-67571DA16812%40biomantica.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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAL3TdOO5iCNf6ayxhE%3D6sH9-LuruTaxuiawSzGbu9upiFh1jBg%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKodAH%3Ds8AStvr1hNYx%2BmvXF6%3DmH5A_AdXWq5harLNkzfbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] managing competing access to filesystem within places

2019-06-14 Thread Matthew Butterick



> On Jun 13, 2019, at 6:43 PM, Matthew Flatt  wrote:
> 
> 
> Oh, don't do that. Unreliable workarounds to concurrency problems
> really do come back to bite you later.

To ask the second dumbest possible question, what error-recovery policies are 
reliable under concurrency? (Put another way, what guarantees exist about 
errors under concurrency? E.g. can we trust that all errors will trigger an 
exception?)

And the dumbest possible: if there are no such policies, then how can you ever 
be certain the code works?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/07C94517-FA0B-46A7-949D-0AB3179A2F70%40mbtype.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: grammar-based fuzzing

2019-06-14 Thread Eric Eide
Eric Eide  writes:

> You might be interested in Xsmith.  Version 1.0 will be released imminently,
> like within the next week.  I'll send another email when it's released.

To follow up in this thread, Xsmith version 1.0.0 is now available.  You can
find it in the Racket package catalog:
https://pkgs.racket-lang.org/package/xsmith

(The online docs haven't updated yet.  Soon, I expect.)

Happy fuzzing!

Eric.

-- 
---
Eric Eide   . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/m1wohnpzb2.fsf%40gris-dmz.flux.utah.edu.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Why struct type doesn't include field names?

2019-06-14 Thread Dmitry Pavlov

Hello,

While we are at it: is it theoretically possible in Racket or Typed Racket (or 
will be possible in Racket 2 or Typed Racket 2) to access struct fields without 
repeating the name of the struct type again?

Like in C

typedef struct
{
  double x;
  double y;
} VeryLongStructureName;

VeryLongStructureName a;

double z = a.x + a.y;


The analogous Racket code for the last line would be

(define z (+ very-long-structure-name-x a) (+ very-long-structure-name-y a))

and I am wondering whether it can be shortened to something like (define z (+ 
(. x a) (. x b)))

(I know that match can work with structs, but it is not always as convenient as 
the C way with the dot)


Best regards,

Dmitry


--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d23df714-e808-91f3-b978-29bcca849100%40iaaras.ru.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] RacketCon hotel group rate

2019-06-14 Thread Matthew Flatt
Right --- the goal is not to provide the cheapest possible
accommodations but to recommend a pretty good hotel and to try to
improve the rate there. You should book at the Little America if that
kind of hotel appeals to you.

As full disclosure, RacketCon does lose some money if it turns out that
I far overestimated interest in the hotel. But my experience over the
years, so far, is that contracting a group rate works out.

At Fri, 14 Jun 2019 16:16:32 -0500, Robby Findler wrote:
> Not that you should change your system/plans, but attendees booking
> rooms at the hotel is actually part of what helps to pay for the event
> (because of the way the contracts between the event and the hotel
> works). In this case, I don't think there is any issue and RacketCon
> is, as far as I know, fine, but that may explain your experience. :)
> 
> Robby
> 
> On Fri, Jun 14, 2019 at 3:20 PM James Platt  wrote:
> >
> > I actually booked rooms at a hotel across the street from the Little 
> > America 
> for much less.  In all the conferences and other events I have been to, I 
> don't think I have ever, even once, found the group-rate rooms at the host 
> hotel to be the best deal.
> >
> > James
> >
> >
> > On Jun 14, 2019, at 3:40 PM, Matthew Flatt wrote:
> >
> > > If you're attending just RacketCon, there are still some group-rate
> > > rooms available at the Little America Hotel --- but you'll need to act
> > > fast. Our guaranteed group reservation has expired, but they'll
> > > continue to accept group reservations as long as space remains.
> > >
> > > See
> > >
> > >  https://con.racket-lang.org/
> > >
> > > for more information.
> > >
> > > At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
> > >> Racket Week is less than a month away! The dorm housing signup for the
> > >> workshops is closing soon. You'll have until 06/21 to register for it.
> > >>
> > >> https://school.racket-lang.org/#housing
> > >>
> > >> The details are at the link, but in summary, it's $40/night at the
> > >> University of Utah dorms.
> > >>
> > >> Jay
> > >
> > > --
> > > 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.
> > > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTP
> IN_ADDED_MISSING%40gmr-mx.google.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.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0F46524A-2E60-48F5-B013-67571DA1
> 6812%40biomantica.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAL3TdOO5iCNf6ayxhE%3D6sH9-LuruT
> axuiawSzGbu9upiFh1jBg%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d041d6f.1c69fb81.6dad.0140SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] RacketCon hotel group rate

2019-06-14 Thread Robby Findler
Not that you should change your system/plans, but attendees booking
rooms at the hotel is actually part of what helps to pay for the event
(because of the way the contracts between the event and the hotel
works). In this case, I don't think there is any issue and RacketCon
is, as far as I know, fine, but that may explain your experience. :)

Robby

On Fri, Jun 14, 2019 at 3:20 PM James Platt  wrote:
>
> I actually booked rooms at a hotel across the street from the Little America 
> for much less.  In all the conferences and other events I have been to, I 
> don't think I have ever, even once, found the group-rate rooms at the host 
> hotel to be the best deal.
>
> James
>
>
> On Jun 14, 2019, at 3:40 PM, Matthew Flatt wrote:
>
> > If you're attending just RacketCon, there are still some group-rate
> > rooms available at the Little America Hotel --- but you'll need to act
> > fast. Our guaranteed group reservation has expired, but they'll
> > continue to accept group reservations as long as space remains.
> >
> > See
> >
> >  https://con.racket-lang.org/
> >
> > for more information.
> >
> > At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
> >> Racket Week is less than a month away! The dorm housing signup for the
> >> workshops is closing soon. You'll have until 06/21 to register for it.
> >>
> >> https://school.racket-lang.org/#housing
> >>
> >> The details are at the link, but in summary, it's $40/night at the
> >> University of Utah dorms.
> >>
> >> Jay
> >
> > --
> > 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.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTPIN_ADDED_MISSING%40gmr-mx.google.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0F46524A-2E60-48F5-B013-67571DA16812%40biomantica.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOO5iCNf6ayxhE%3D6sH9-LuruTaxuiawSzGbu9upiFh1jBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Announce: Xsmith 1.0.0 Released

2019-06-14 Thread Eric Eide
I am pleased to announce that Xsmith version 1.0.0 is now available.  You can
find it in the Racket package catalog at:

  https://pkgs.racket-lang.org/package/xsmith

Xsmith is a library for creating fuzz testers, also known as "fuzzers," for
programming language compilers and interpreters.  In other words, Xsmith is a
library for creating random program generators.

Xsmith implements a domain-specific language (DSL) for defining random program
generators.  The DSL is used to specify a programming language's grammar,
typing rules, and other information that guides generation choices.  Xsmith
also includes utilities for creating a command-line interface for generating a
single program or starting a web server that generates one program per request.

Xsmith is bundled with two example random program generators that were created
using the library: one for C and one for Scheme.

This is the first public release of Xsmith.  It is neither feature-complete nor
API-stable, but it should be usable by people other than the authors :-).  We
welcome feedback!

Please send bug reports and fixes to .

There is a mailing list, , for discussing Xsmith.
Visit the list's management website to subscribe:
http://www.flux.utah.edu/mailman/listinfo/xsmith-dev

Happy fuzzing!

Eric.

-- 
---
Eric Eide   . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/m14l4rre9x.fsf%40gris-dmz.flux.utah.edu.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] managing competing access to filesystem within places

2019-06-14 Thread Matthew Butterick


> On Jun 14, 2019, at 4:34 PM, Matthew Flatt  wrote:
> 
> Sometimes, staying out of the error-triggering space is unavoidable,
> and the possible errors are well enough defined by all filesystems, so
> retrying is a workable solution. If you really have to be in that
> space, then retry an arbitrary number of times, perhaps with an
> exponential backoff (i.e., double the delay between retries).

OK, thanks for the encouragement. After more experimentation I got the 
lock-server idea to work (meaning, my parallel renders now complete without 
errors, which was not true before).

For the benefit of future generations, two complications tripped me up, the 
first I understand, the second I don't, but maybe someday:

1) At first I had each rendering place issue its lock requests file by file. 
This didn't work because each place needed to lock a set of files, and the 
individual lock / unlock requests could end up interleaved in the lock server, 
with strange results (some locked / some unlocked). So I bundled each set of 
files into a "lock transaction" which I passed in a single place message, then 
all of them would get locked or unlocked as a group.

2) I set up each rendering place to repeatedly ask for a lock until it was 
approved. But even after approving a lock request from a certain rendering 
place, the lock server would end up with repeat lock requests from there. To 
fix this, I needed to create a third response for the lock server, which was 
"dude you already have a lock".

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/BCC26E32-FFF6-40ED-92F9-98C70895E227%40mbtype.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] RacketCon hotel group rate

2019-06-14 Thread Robby Findler
Very generous, thank you!

Robby

On Fri, Jun 14, 2019 at 4:24 PM David Storrs  wrote:
>
>
>
> On Fri, Jun 14, 2019 at 5:16 PM Robby Findler  
> wrote:
>>
>> Not that you should change your system/plans, but attendees booking
>> rooms at the hotel is actually part of what helps to pay for the event
>> (because of the way the contracts between the event and the hotel
>> works). In this case, I don't think there is any issue and RacketCon
>> is, as far as I know, fine, but that may explain your experience. :)
>>
>> Robby
>>
>
> That's good to know; thanks, Robby.
>
> In this case, James and I paid the 'patron' rate in order to help support the 
> con, so I hope you don't think too badly of us despite not taking the group 
> rate -- I'd rather give money straight to y'all instead of to a hotel!
>
> Dave
>
>> On Fri, Jun 14, 2019 at 3:20 PM James Platt  wrote:
>> >
>> > I actually booked rooms at a hotel across the street from the Little 
>> > America for much less.  In all the conferences and other events I have 
>> > been to, I don't think I have ever, even once, found the group-rate rooms 
>> > at the host hotel to be the best deal.
>> >
>> > James
>> >
>> >
>> > On Jun 14, 2019, at 3:40 PM, Matthew Flatt wrote:
>> >
>> > > If you're attending just RacketCon, there are still some group-rate
>> > > rooms available at the Little America Hotel --- but you'll need to act
>> > > fast. Our guaranteed group reservation has expired, but they'll
>> > > continue to accept group reservations as long as space remains.
>> > >
>> > > See
>> > >
>> > >  https://con.racket-lang.org/
>> > >
>> > > for more information.
>> > >
>> > > At Fri, 14 Jun 2019 08:31:30 -0400, Jay McCarthy wrote:
>> > >> Racket Week is less than a month away! The dorm housing signup for the
>> > >> workshops is closing soon. You'll have until 06/21 to register for it.
>> > >>
>> > >> https://school.racket-lang.org/#housing
>> > >>
>> > >> The details are at the link, but in summary, it's $40/night at the
>> > >> University of Utah dorms.
>> > >>
>> > >> Jay
>> > >
>> > > --
>> > > 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.
>> > > To view this discussion on the web visit 
>> > > https://groups.google.com/d/msgid/racket-users/5d03f81c.1c69fb81.eba49.412cSMTPIN_ADDED_MISSING%40gmr-mx.google.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.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/racket-users/0F46524A-2E60-48F5-B013-67571DA16812%40biomantica.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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/CAL3TdOO5iCNf6ayxhE%3D6sH9-LuruTaxuiawSzGbu9upiFh1jBg%40mail.gmail.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAE8gKodAH%3Ds8AStvr1hNYx%2BmvXF6%3DmH5A_AdXWq5harLNkzfbw%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOP0uOQ%2BCi_aFtNx%2BhAZ9GEZtBLJ4UzHU%3D25Ksy0kTeg6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] The search for routy

2019-06-14 Thread Gregor Kopp
Hi!
I found here docs: https://docs.racket-lang.org/routy/
I'd like to try this for fast prototyping, but can't find the package as my 
google-fu is sloppy I guess.
Any help please, sirs and madams?

Thank you, Gregor

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/df56c1d0-7626-4284-bb77-089af462dacf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] The search for routy

2019-06-14 Thread Tom Gillespie
https://github.com/Junker/routy found via `racket routy git` seems right?

On Thu, Jun 13, 2019 at 11:56 PM Gregor Kopp  wrote:

> Hi!
> I found here docs: https://docs.racket-lang.org/routy/
> I'd like to try this for fast prototyping, but can't find the package as
> my google-fu is sloppy I guess.
> Any help please, sirs and madams?
>
> Thank you, Gregor
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/df56c1d0-7626-4284-bb77-089af462dacf%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PPNzm2qE%2BnoUQP%2BsSyJ8dByiWPWC9WWhAMSOx9J83c_Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] The search for routy

2019-06-14 Thread Gregor Kopp
Thank you very much!
It's hot here...

Am Freitag, 14. Juni 2019 08:58:53 UTC+2 schrieb Tom Gillespie:
>
> https://github.com/Junker/routy found via `racket routy git` seems right?
>
> On Thu, Jun 13, 2019 at 11:56 PM Gregor Kopp  > wrote:
>
>> Hi!
>> I found here docs: https://docs.racket-lang.org/routy/
>> I'd like to try this for fast prototyping, but can't find the package as 
>> my google-fu is sloppy I guess.
>> Any help please, sirs and madams?
>>
>> Thank you, Gregor
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/df56c1d0-7626-4284-bb77-089af462dacf%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/82c97a21-0ffd-4614-a805-96e810426a1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [racket-users] exact rationals in interactions window

2019-06-14 Thread Jos Koot
Yes, the intermediate output-string does the job. Thanks.
Stupid me, not thinking of that by myself.
Jos

From: Robby Findler
Sent: 13 June 2019 21:32
To: Jos Koot
Cc: Racket Users
Subject: Re: [racket-users] exact rationals in interactions window

Does this help?

(let ([cp (current-print)])
  (current-print
   (λ (x)
 (define sp (open-output-string))
 (parameterize ([current-output-port sp])
   (cp x))
 (display (get-output-string sp)

On Thu, Jun 13, 2019 at 12:20 PM Jos Koot  wrote:
>
>
>
> Hi
>
>
>
> Is it possible to instruct DrRacket to display non-integer exact rationals 
> with a slash in stead of a horizontal line?
>
> If so, how? I tried current-print and the like, but without success.
>
>
>
> Jos
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/5d0285e1.1c69fb81.4a5ab.43b8%40mx.google.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d034f53.1c69fb81.e0de4.b3dd%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.