Re: [racket-users] How to type annotate for bindings in complex syntax forms

2017-03-09 Thread Vincent St-Amour
On Mon, 06 Mar 2017 23:50:38 -0600,
lu wrote:
> 
> Awesome. Thanks! Where can I find the documentation for this TR reader syntax?
> 
> Why is TR not able to figure out the type for these variables without
> human help? Does that mean the implementation of `command-line` is in
> TR and the types of those variables are inferred by the type system,
> or they are explicitly typed to be `Any` for simplicity?

`command-line` is a syntactic extension, which gets expanded away before
TR checks types. Its expansion is unfortunately too complex for TR's
inference to handle, hence why it needs your help.

Vincent


> On Monday, March 6, 2017 at 2:48:15 PM UTC-8, Sam Tobin-Hochstadt wrote:
> > You can use the #{x : T} reader syntax to annotate variables in macros
> > like `command-line`. Here's a working version of your code:
> > 
> > ```
> > #lang typed/racket
> > 
> > (define *channel* (make-parameter "#general"))
> > (define *message* : (Parameterof (Listof String)) (make-parameter '()))
> > 
> > 
> > (define (parse-cmdline)
> >   (command-line
> >#:program "q"
> >#:once-each
> >[("-c" "--channel") #{ch : String} "slack channel to post (default:
> > use .qrc setting or default)" (*channel* ch)]
> >#:args #{msg : String}
> >(*message* msg)))
> > ```
> > 
> > On Mon, Mar 6, 2017 at 2:08 AM, kay <> wrote:
> > > For a complex syntax form like `command-line`, I have difficulty 
> > > correctly annotate the bindings it defines.
> > >
> > > More specifically, in the below code, for variable `msg`, even the 
> > > document[1] says the `#:args` binds as list of **strings**, but the error 
> > > indicates that it somehow is declared as `Listof Any`.
> > >
> > > Similarly, for variable `ch` bound in line 11, I believe it should always 
> > > be `String`, but it somehow is declared to be `Any`.
> > >
> > > What should I do with this type of error, if I want my varaibles to be 
> > > more precisely typed than just `Any`?
> > >
> > >
> > > [1]: 
> > > https://docs.racket-lang.org/reference/Command-Line_Parsing.html?q=command-line#%28form._%28%28lib._racket%2Fcmdline..rkt%29._command-line%29%29
> > >
> > > ```
> > >  1  #lang typed/racket
> > >  2
> > >  3  (define *channel* (make-parameter "#general"))
> > >  4  (define *message* : (Parameterof (Listof String)) (make-parameter 
> > > '()))
> > >  5
> > >  6
> > >  7  (define (parse-cmdline)
> > >  8  (command-line
> > >  9   #:program "q"
> > > 10   #:once-each
> > > 11   [("-c" "--channel") ch "slack channel to post (default: use 
> > > .qrc setting or default)" (*channel* ch)]
> > > 12   #:args msg
> > > 13   (*message* msg)))
> > > 14
> > > 15
> > > 16  #|
> > > 17  tr.rkt:11:91: Type Checker: Wrong argument to parameter - 
> > > expected String and got Any in: (*channel* ch)
> > > 18  tr.rkt:13:5: Type Checker: Wrong argument to parameter - expected 
> > > (Listof String) and got (Listof Any) in: (*message* msg)
> > > 19  |#
> > > ```
> > >
> > > --
> > > 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] 2017: Call for participation

2017-03-09 Thread timmolderez

---
  2017 : The Art, Science, and Engineering of Programming

   April 3-6, 2017, Brussels, Belgium
   http://2017.programming-conference.org
---

We are excited to welcome you to  2017, a new conference focused 
on everything to do with programming. It takes place at the Vrije Universiteit 
Brussel, Belgium on April 3-6. The  conference is closely 
associated with the open-access journal "The Art, Science, and Engineering of 
Programming". The journal's first two issues form the conference's research 
track, which means you can freely access all papers presented at the conference 
before it even starts! Along with the research track,  2017 
features a program with two main keynotes, two symposia, eight workshops, a 
coding dojo, a demo track, and a student research competition.

To catch a glimpse of what  2017 has to offer, feel free to have a 
look at our overview video:
https://www.youtube.com/watch?v=GM_hLNW4ioE

***
 Program highlights
***

Main conference:
 - Keynote: "Live Literate Programming" by Gilad Bracha
 - Keynote: "How Racket Went Meta" by Matthew Flatt
 - Research track: 18 full papers
 - Demonstrations: 10 tool demos
 - ACM Student Research Competition: 8 entries

Co-located events:
 - 10th European Lisp Symposium: 2 keynotes by Hans Hübner and Bohdan 
Khomtchouk, ~18 papers (not final yet)
 - Modularity 2017: 8 invited talks by Jörg Kienzle, Shmuel Katz, Mira Mezini, 
Bedir Tekinerdogan, Stéphane Ducasse, Uwe Aßmann, Lodewijk Bergmans and Mario 
Südholt
 - CoCoDo - RainCode Labs Compiler Coding Dojo: code together with experts 
Adrian Johnstone, Elizabeth Scott, Robby Findler, and more to come!
 - LASSY - Workshop on Live Adaptation of Software SYstems
 - MiniPLoP - Mini Pattern Languages of Programs writers' workshop
 - MOMO - Workshop on Modularity in Modeling
 - MoreVMs - Workshop on Modern Language Runtimes, Ecosystems, and VMs
 - PASS - Workshop on Programming Across the System Stack
 - PX - Workshop on Programming Experience
 - ProWeb - Programming Technology for the Future Web
 - Salon des Refusés workshop

Social events:
 - Beer reception at the conference venue (April 3rd)
 - Reception at the Musical Instruments Museum (April 4th)
 - Banquet at the Natural Sciences Museum (April 5th)

***
 Registration, attendance and accommodation
***

 - You can register for  2017 at: 
http://2017.programming-conference.org/attending/registration
 - Early registration ends soon! Please register before March 13th to obtain 
the early-bird discount.
 - More information on attending the conference is available at: 
http://2017.programming-conference.org/attending/reaching-the-conference
 - More information on accommodation is available at: 
http://2017.programming-conference.org/attending/accomodation

***
 About Brussels
***

Brussels is the capital of Belgium, and home to the headquarters of the 
European Union. Despite its European nature and all the different languages 
spoken on every street corner, Brussels still has a very "village-like"  
character. It's well known for its Grand-Place, its Atomium, its Manneken-Pis, 
its Gueuze and its Kriek, its waffles and its chocolates. Be sure to take some 
time off to soak up the special atmosphere of its many different districts: 
Take a stroll to Rue Dansaert, Halles Saint-Géry, and Place Sainte-Catherine. 
Head for Saint-Boniface, Châtelain, or Flagey. In other words, go ahead and 
relish Brussels, a fine and beautiful city to explore and discover.

---

For more information, please visit http://2017.programming-conference.org
You can also find us on Twitter (twitter.com/programmingconf) and Facebook 
(facebook.com/programmingconf)

Looking forward to see you in Brussels,

Theo D'Hondt (General chair), Wolfgang De Meuter (Organizing chair), Crista 
Lopes (Program chair), Jörg Kienzle, Ralf Lämmel, Hidehiko Masuhara, Tim 
Molderez, Tobias Pape, and Jennifer Sartor

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