Re: [racket-users] Racket's UDP Behavior

2016-04-12 Thread Nick Gordon
On Monday, April 11, 2016 at 1:41:57 PM UTC-5, Tony Garnock-Jones wrote:
> On 04/11/2016 01:52 PM, Nick Gordon wrote:
> > I'm building reliable data transfer onto Racket's UDP suite for a
> > term project, and I need to know what Racket does with corrupt
> > datagrams. Since the Racket docs don't mention the word checksum for
> > the UDP segment, I need to know some things:
> 
> The kernel discards corrupt UDP datagrams, so Racket doesn't see them.
> 
> There is certainly *no* automatic retransmission involved.
> 
> > I can't build reliable data transfer until I can be sure I'm not
> > losing datagrams in the ether, and I don't know how to accomplish
> > this. Is there a preferred workaround for this (as in continued
> > retransmission until the datagram successfully reaches its
> > destination)?
> 
> Yes, effectively this. I recommend reading up on protocols for achieving
> "reliable" delivery on unreliable networks. For example, look into how
> TCP works. (Bear in mind that UDP is basically the same thing as IP.)
> 
> One of your first tasks will be to decide what "reliable" means in your
> context. If you haven't seen it before, check out the
> Fischer-Lynch-Patterson Impossibility Result:
> http://the-paper-trail.org/blog/a-brief-tour-of-flp-impossibility/
> 
> Also, look into the Byzantine Generals problem:
> https://en.wikipedia.org/wiki/Byzantine_fault_tolerance
> 
> Once you understand why the Byzantine Generals problem has no solution,
> you can start to work toward making a decision about how your "reliable"
> system should behave in corner cases.
> 
> Tony

I haven't had the time to look up those theoretical results, but I definitely 
have taken your advice into account. It deviates slightly from the "ideal" 
design specification, but since we aren't actually rewriting the 
transport-level driver for our OS, we have to sort of "emulate" the system.
Thus, I am compensating for not being able to interact with corrupt datagrams 
by having each side of the program resend them whenever they detect a loss.

Thank you much!

-- 
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] my best idea ever: become a sponsor of RacketCon 2016

2016-04-12 Thread Neil Van Dyke
For those who'd like to "give back" to Racket, but who are not in a 
position to sponsor the convention, some other things that lots of 
people do:


* Contribute open source packages.
* Help out on the email list.
* When you've used Racket successfully, tell the email list.  (For 
stealth-mode, there's always pseudonymous email accounts.)

* Tell people outside the Racket community about Racket.

Neil V.

--
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] Questions about implementing a Lisp-2

2016-04-12 Thread Hendrik Boom
On Tue, Apr 12, 2016 at 08:23:52PM -0700, Josh Tilles wrote:
> On Monday, April 11, 2016 at 8:41:54 PM UTC-4, Neil Van Dyke wrote:
> > I would first decide whether and how I want functions and variables 
> > provided by modules in this language, to be usable from modules in other 
> > `#lang`s.  That narrows down the options of how to do it.
> Very good point. To be honest, usability from other `#lang`s wasn't a 
> priority for me—at least not in the first iteration of this little project of 
> mine.
> 
> > If you're writing an Emacs Lisp implementation,
> I'm not writing an Emacs Lisp implementation; I'm writing an 
> implementation of KLambda, a tiny (the "K" stands for "Kernel") and 
> rather idiosyncratic Lisp.

Good!

> 
> > I would look at what Guile has done.  And also consider whether the
> > dynamically-scoped and buffer-local variables affect how you solve
> > your Lisp-2 namespaces problem.

Emacs Lisp got lexical scoping wrong -- they forgot about it 
completely.  There seems to be a project to get elisp to do lexical 
scoping, but given the amount of code that is written in elisp, 
someone I spoke to thinks it may take another ten years or so to 
accomplis it.

Don't make the same mistake!

-- hendrik

-- 
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] Questions about implementing a Lisp-2

2016-04-12 Thread Neil Van Dyke

Josh Tilles wrote on 04/12/2016 11:23 PM:
I'm writing an implementation of KLambda, a tiny (the "K" stands for 
"Kernel") and rather idiosyncratic Lisp. 


This is the best URL I found for what I think is KLambda: 
http://shenlanguage.org/Documentation/shendoc.htm#Kl



I had expected there to be a way to use Racket's existing features to implement 
KLambda.


I'm sure there's more than one way, and some ways I haven't thought of.

For the first shot, I suggest prefixing for one of the namespaces, like 
Matthew Butterick suggested.  Perhaps slightly better, prefix for both 
namespaces, and I think you might catch errors in your early 
implementation sooner (i.e., if your implementation ever sees an 
unprefixed identifier where you shouldn't, you know it's an error, not 
just that it's an identifier from the namespace that didn't get 
prefixed.  Later, if you start importing from other `#lang`s, absence of 
prefixing could be a cue for a different calling convention you need to 
use.  (Though, if you ever provide from `#lang klambda` to other langs, 
you might end up preferring that function namespace be unprefixed, since 
that's the more common thing to provide.  And then maybe it's easier for 
providing to other `#lang klambda` modules, as well, if you only prefix 
the *non*-function namespace.)  This prefixing is a quick and easy 
method, but it might work sufficiently well.


If you don't leverage the Racket binding model by using prefixing or 
similar identifier kludge, then I think you have to start maintaining 
the model yourself.  I wouldn't do that without a good reason (like, if 
KLambda's model differed significantly from Racket in ways other than 
just being a Lisp-2).


Good luck,

Neil V.

--
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] my best idea ever: become a sponsor of RacketCon 2016

2016-04-12 Thread Matthew Butterick
I just sent $2000 to become a sponsor of this year's RacketCon. That's an 
increase from the $1500 I put in last year, and $1000 the year before that.

I haven't been to all the RacketCons. But I know from going to the last few 
that Vincent St-Amour and Matthew Flatt have kept raising the bar. They do a 
great job. More sponsorship helps them both improve the event and keep the 
ticket price low for everyone. Because if you can get yourself to St Louis, you 
should be at RacketCon.

But beyond that, sponsoring RacketCon is a great way to invest in the future of 
Racket. Because, like Soylent Green, Racket is made of people — people who find 
time in what are already busy professional and personal schedules to improve 
what, AFAICT, is the best programming environment in the world (or, as Matthias 
would say, second best).

Because the people involved with Racket — they could get away with being jerks. 
Racket is that good. But, miraculously, they're not. They're kind and generous 
and modest. That's why RacketCon doesn't need a conference code of conduct. It 
would be superfluous. At Strange Loop, the code of conduct is "Act like you're 
involved with Racket." 

I want to emit a special gamma ray of gentle shame to those Racketeers who use 
Racket professionally, i.e. make money from it. Folks, Racket is one of the 
best deals we've ever gotten. It's easy to socialize costs and privatize 
profits — just ask YouTube and Netflix, who together consume half the bandwidth 
of the Internet so jackasses can binge-watch "Entourage." Are we not better 
than that? I contend that if you put $500 into RacketCon every year, Racket 
would still be the best deal you've ever gotten.

Vincent is ready to receive your money at stamo...@eecs.northwestern.edu. I 
thank you.



-- 
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] Questions about implementing a Lisp-2

2016-04-12 Thread Josh Tilles
On Monday, April 11, 2016 at 8:41:54 PM UTC-4, Neil Van Dyke wrote:
> I would first decide whether and how I want functions and variables 
> provided by modules in this language, to be usable from modules in other 
> `#lang`s.  That narrows down the options of how to do it.
Very good point. To be honest, usability from other `#lang`s wasn't a priority 
for me—at least not in the first iteration of this little project of mine.

> If you're writing an Emacs Lisp implementation,
I'm not writing an Emacs Lisp implementation; I'm writing an implementation of 
KLambda, a tiny (the "K" stands for "Kernel") and rather idiosyncratic Lisp.

> I would look at what Guile has done.  And also consider whether the
> dynamically-scoped and buffer-local variables affect how you solve
> your Lisp-2 namespaces problem.
The Guile-ELisp connection is an interesting one which I had already been 
interested in eventually learning more about, but I had expected there to be a 
way to use Racket's existing features to implement KLambda.


Thanks Neil!
-Josh

-- 
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] Re: What do you use macros for?

2016-04-12 Thread George Neuner
On Wed, 13 Apr 2016 06:45:01 +1000, Daniel Prager
 wrote:

>Thanks George
>
>Of interest to me is that you eschew the use of syntax-parse / -case /
>-rules in favour of a straight syntax->datum -> straight racket ->
>datum->syntax solution. I suppose this approach trades away hygiene and
>error-checking for simplicity.

I have more conventional syntax-rules macros that are mostly for
dealing with the boiler-plate involved in database connections and
transactions.

I only recently learned about syntax-parse but I haven't tried it yet.
Racket has so many features you could spend your life just learning
the distribution.  [Only partly jest]


>* * *
>I have a similar in spirit (but less sophisticated) macro that embeds
>mustache-style templating in sxml in conjunction with Jens's Urlang JS
>replacement in conjunction with Neil's html-writing library.

Nice!

George

-- 
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] What do you use macros for?

2016-04-12 Thread Matthias Felleisen

> On Apr 12, 2016, at 4:54 PM, Anthony Carrico  wrote:
> 
>  Please view Asumu's google hangout on typed racket 


Asumu is my PhD students and the Kindergarden ought to have been a give-away 
:-) 

Yes, Racket’s syntax extension system is the second best in the world. And 
I am still young enough to take on PhD students who will improve it .. 

Want to volunteer? 

-- 
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] What do you use macros for?

2016-04-12 Thread Anthony Carrico
On 04/11/2016 10:25 AM, Matthias Felleisen wrote:
> Second credit to Matthew (and Shriram and Robby) who kept me 
> on the 'macros are good for designing complete languages' track, 
> too. This one is important for different reasons. Often you want
> to create a reasonably complete language but not invent everything
> from scratch. In our words, you want 'linguistic inheritance'. For
> example, you like Haskell's type system but you hate, loathe, despise
> the stupid idea of universally lazy evaluation. Well, if you were
> in Racket, you'd define a 10-line language that looks, feels, smells, 
> tastes like the host but has a by-value evaluation mechanism. Of course, 
> Racket is by-value, so you may convert it into a lazy language without
> giving up the lovely parentheses and the beautiful Lisp syntax. Well, 
> it's a 10-line language definition, based on Racket's generalization
> of old, very old, stone-age old Lisp macro system. 
> 
> See the last chapter of Realm of Racket on how to teach Kindergarden 
> kids to define this kind of by-need (actually by-name) Racket. 

I love how Scheme and Racket continue to push the boundary on what can
be done with syntax extension, but these paragraphs are hyperbole. There
is a long way to go before working programmers can make linguistic
inheritance happen. At least a book needs to be written, maybe more
research. Please view Asumu's google hangout on typed racket + the class
system for evidence about just how sticky things are in the real world.
Don't get me wrong, PLT has done, and is doing the work, and that work
is under appreciated by the programming languages community, but
still... really? Let's not over-sell and under-deliver.

-- 
Anthony Carrico

-- 
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: What do you use macros for?

2016-04-12 Thread Daniel Prager
Thanks George

Of interest to me is that you eschew the use of syntax-parse / -case /
-rules in favour of a straight syntax->datum -> straight racket ->
datum->syntax solution. I suppose this approach trades away hygiene and
error-checking for simplicity.

Also, nice trick appropriating byte-strings:

* * *
I have a similar in spirit (but less sophisticated) macro that embeds
mustache-style templating in sxml in conjunction with Jens's Urlang JS
replacement in conjunction with Neil's html-writing library.

It currently does two things:

   1. Creates template variables: ($ foo) -> "{{foo}}"
   2. Maps embedded Urlang function calls to JS syntax: ($ (foo bar baz))
   -> "foo(bar, baz)"

E.g. this snippet of sxml

  `((h1 "SVG test")
(div
 (input (@ (type "range") (value ,($ radius))
   (min "10") (max "95") (step "5")))
 (br) (br)
 (button (@ (on-click "swap")) "Change color"))

(svg (@ (width "200") (height "200"))
 (circle (@ (cx "100") (cy "100") (r ,($ radius))
(stroke "green") (stroke-width "4")
(fill ,($ fill)))

maps to

SVG test

  
   
  Change color


  
  



when passed through (xexp->html ...) and formatted nicely. Here's my little
macro ...

(define-syntax ($ stx)
  (syntax-parse stx
[(_ var:id)
 (with-syntax ([v (datum->syntax stx
 (format "{{~a}}" (syntax->datum
#'var)))])
   #'v)]
[(_ (fn:id args:id ...))
 (with-syntax ([js (datum->syntax stx
  (format "{{~a(~a)}}"
  (syntax->datum #'fn)
  (string-join
   (map (compose
 (λ (x) (format
"~a" x))
 syntax->datum)
(syntax->list
#'(args ...)))
   ", ")))])
   #'js)]))


Compared to George's macro, it uses syntax-parse for pattern-matching
rather than match, and still uses datum->syntax / syntax->datum, but more
locally within with-syntax.

Dan

-- 
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: What do you use macros for?

2016-04-12 Thread George Neuner

Hi Dan,

On 4/11/2016 6:51 PM, Daniel Prager wrote:


On Apr 12, 2016 7:53 AM, "George Neuner"  wrote:
>
> My most common uses are to handle database connections and
> to embed free form SQL into Racket code.

Care to post one of your examples, with a bit of commentary?



Ok.  I have attached the definition file for my SQL embedding macro.  It 
is a relatively simple minded syntax transformer, but it needs some 
auxiliary functions so it is inconvenient to repeat it all here.  I hope 
the attachment survives to the mailing list.


First off, I want to say that the db module in Racket is awesome! 
However ... like other database access libraries, it can be inconvenient 
to compose complex queries because the functions expect SQL code to be 
provided as a string.


Racket has multi-line string literals (#<<) which are suitable for 
embedding *static* SQL [if you don't mind delimiters in the margin].  
But AFAICS there is no way to splice environment references into a 
multi-line literal - i.e. quasiquote/unquote(-splicing) - and so they 
can't easily be used for dynamic SQL.  And there are many needs for 
dynamic SQL: in particular table names cannot be variables, so queries 
that are reusable against multiple tables cannot be written statically.


Not to mention that multi-line strings won't auto-indent, and any 
whitespace you might include for readability ends up in the code 
string.  SQL ignores whitespace outside of strings, but lots of 
whitespace in the code possibly lengthens transmission time to a remote 
DBMS and parse time for the query, and so may impact your application 
performance (however slightly) as you repeatedly submit overly long code 
strings.


So you - or at least *I* - end up with a lot of code that looks like:

  (set! sql-cmd (string-join `(  ; <- note quasiquote

   :

   ",business as"
   "   (select " ,(prefix-fields (business-fields) "B")
   "  from (select distinct biz from stores) as S"
   "  join businesses as B on B.id  = S.biz"
  ,(if search-txt
 "join acts as A on A.biz = S.biz"
  "" )
   ")"

   :

   ",ratings (biz,reviews,score) as"
   "   (select B.id"
   "  ,count_reviews( (select * from survey), B.id )"
   "  ,score_survey ( (select * from survey), B.id, 100 )"
   "  from (select id from business) as B"
   ")"

   :

 )))

  (set! result (query-rows db sql-cmd ... )


These CTEs are snippets from a 73  line query in one of my applications.


Not terribly easy to read even with DrRacket's syntax coloring: just 
strings and little snips of Racket.  Inefficient because the SQL code 
string is being composed at runtime.  I have timed string-join: it is 
quite a bit slower to join lots of short strings than to join fewer long 
strings.



So I created the code in embed_sql.rkt.  The language it accepts is not 
SQL precisely but a hybrid of SQL and Racket.  For example, double 
quoted Racket strings are converted to single quoted SQL strings.  I 
borrowed Racket's bytestrings to represent SQL strings that should be 
double quoted: e.g., strange table names.  Because commas are used 
natively in SQL, I borrowed unquote-splicing ,@ syntax to embed Racket 
expressions into SQL.  Racket style comments are ignored everywhere.  
SQL style -- comments aren't supported.


The mess above can be written [more nicely I think] as:

  (set! sql-cmd
(SQL
 :
   ,business as
 (select ,@(prefix-fields (business-fields) "B")
from (select distinct biz from stores) as S
join businesses as B on B.id  = S.biz
   ,@(if search-txt
  (SQL join acts as A on A.biz = S.biz)
  (SQL))
  )
 :
   ,ratings (biz,reviews,score) as
 (select B.id
,count_reviews( (select * from survey), B.id )
,score_survey ( (select * from survey), B.id, 100 )
from (select id from business) as B
  )
 :
 )


The macro turns static SQL into a simple string, and dynamic SQL into a 
string-join quasiquoted form.  It ignores whitespace and minimizes the 
number of string fragments passed to the eventual string-join (which 
will be done at runtime).


The macro can be used wherever a string is expected, so it can be used 
directly to supply the command argument to a query function call.  It 
works ad hoc in the REPL assuming any embedded Racket code is valid.


It isn't perfect ... in particular errors occurring in embedded Racket 
expressions can be hard to figure out.  But it has handled all the SQL I 
have thrown at it and I have used it in a number of applications.  I'd 
like eventually to improve it with some syntax coloring, but I haven't 
figured out how to do that (or even if it's possible).



YMMV.   Everyone may feel free to laugh 

Re: [racket-users] Re: Hidden a list

2016-04-12 Thread Vincent St-Amour
On Tue, 12 Apr 2016 11:17:31 -0500,
Héctor Mc wrote:
> 
> Thanks,
> 
> This start because I need a syntax like the next:
> 
> (define u (make-s user (nom ape sexo))
> (set-s u ((nom "nom" ) (ape "ape")))
> (get-s u 'nom)
> u ; --> '((nom "nom") (ape "ape") (sexo ""))
> 
> And I start using lists but I can't hidden. From there I changed to a struct 
> but now I get this problem.
> 
> set-usuario-key!: unbound identifier in module in: set-usuario-key!
> 
> How I can solve that?

Structs are not collections of key-value pairs, so there are no
accessors that can take the name of a field and access it.

They will, however, have accessors for individual fields, like
`set-usuario-nom!`. Those should work fine.

If you do want to have such a function, I would write it something like
this:

(define (set-usuario-key! usuario key val)
  (cond [(equal? key 'nom) (set-usuario-nom! usuario val)]
...))

Or, if you really want key-value pairs, use hashes. Possibly wrapped in
a struct, to get the hiding you want.

Vincent

-- 
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] DrRacket 6.4 error message + a misleading message

2016-04-12 Thread Matthias Felleisen

WeScheme is perfectly fine for college freshmen. It’s my preference not to run 
in a browser. 


> On Apr 12, 2016, at 12:25 PM, Elena Machkasova  wrote:
> 
> Yes, I am familiar with Marceau's work (at least the published papers), it is 
> very cool. One of very few systematic research-based approaches to error 
> messages. 
> I haven't used WeScheme, might be something to look into (although our target 
> audience is college students and other adult beginners, not middle school). 
> 
> Elena  
> 
> On Tue, Apr 12, 2016 at 11:13 AM, Matthias Felleisen  > wrote:
> 
> Yes, all of our releases are always announced.
> 
> If you are studying error messages, please check out Guillaume Marceau’s 
> work, supervised by Kathi Fisler and co-advised by Shriram Krishnamurthi. He 
> worked out an even better version of his ideas for WeScheme, which is still 
> the starting point for Bootstrap, our educational spin-off project for middle 
> schools. 
> 
> — Matthias
> 
> 
> 
> 
> 
>> On Apr 12, 2016, at 11:58 AM, Elena Machkasova > > wrote:
>> 
>> Sounds good, thanks! Will the new release be announced? We are looking at 
>> error messages as a part of a research project, so it would be good to use 
>> the new one if we can. 
>> 
>> Elena 
>> 
>> On Tue, Apr 12, 2016 at 10:53 AM, Matthias Felleisen > > wrote:
>> 
>> Thanks, I have pushed a fix and additional tests for error messages. This 
>> will be included with the next release, to appear in a couple of weeks. — 
>> Matthias
>> 
>> 
>> 
>> 
>> > On Apr 11, 2016, at 9:25 PM, Elena Machkasova > > > wrote:
>> >
>> > Hi All,
>> >
>> > we have discovered that in 6.4 DrRacket (Advanced Student) seems to have a 
>> > bug generating error messages for foldl/foldr:
>> >
>> > (foldl + (list 2 3 4) 0)
>> >
>> > gives an error message "foldl: 2th argument must be a list, given 0"
>> > (in addition to the incorrect "th" for "2nd", the 0 is actually the third 
>> > argument, not second).
>> >
>> > There is also a somewhat misleading error (for beginners) in 6.4 and 
>> > earlier versions, shown with a somewhat artificial example:
>> >
>> > (map (lambda (x y) (+ x y)) (list 2 3 4))
>> >
>> > gives and error:
>> >
>> > the given procedure's expected number of arguments does not match
>> > the given number of lists
>> >  given procedure: #
>> >  expected: 2
>> >  given: 1
>> >
>> > This is technically correct, but not understandable to a student since 
>> > most likely they mistakenly used a two-argument function instead of a 
>> > one-argument one. In fact, students are never shown a map with multiple 
>> > lists. A better message would say that a one-argument function was 
>> > expected, but a two-argument function was given.
>> >
>> > The second error is somewhat of a design choice, but the first one (with 
>> > foldl) is a bug. If there is a way to patch it in 6.4, that would be 
>> > greatly appreciated.
>> >
>> > Cheers,
>> > Elena
>> >
>> >
>> > --
>> > 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 
>> > .
>> 
>> 
>> 
>> 
>> -- 
>> Dr. Elena Machkasova
>> Associate Professor of Computer Science
>> Division of Science and Mathematics
>> University of Minnesota, Morris
>> Office: Sci 2325
>> (320) 589-6308 
>> http://cda.morris.umn.edu/~elenam/ 
>> 
> 
> 
> 
> 
> -- 
> Dr. Elena Machkasova
> Associate Professor of Computer Science
> Division of Science and Mathematics
> University of Minnesota, Morris
> Office: Sci 2325
> (320) 589-6308
> http://cda.morris.umn.edu/~elenam/ 
> 

-- 
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] DrRacket 6.4 error message + a misleading message

2016-04-12 Thread Elena Machkasova
Yes, I am familiar with Marceau's work (at least the published papers), it
is very cool. One of very few systematic research-based approaches to error
messages.
I haven't used WeScheme, might be something to look into (although our
target audience is college students and other adult beginners, not middle
school).

Elena

On Tue, Apr 12, 2016 at 11:13 AM, Matthias Felleisen 
wrote:

>
> Yes, all of our releases are always announced.
>
> If you are studying error messages, please check out Guillaume Marceau’s
> work, supervised by Kathi Fisler and co-advised by Shriram Krishnamurthi.
> He worked out an even better version of his ideas for WeScheme, which is
> still the starting point for Bootstrap, our educational spin-off project
> for middle schools.
>
> — Matthias
>
>
>
>
>
> On Apr 12, 2016, at 11:58 AM, Elena Machkasova 
> wrote:
>
> Sounds good, thanks! Will the new release be announced? We are looking at
> error messages as a part of a research project, so it would be good to use
> the new one if we can.
>
> Elena
>
> On Tue, Apr 12, 2016 at 10:53 AM, Matthias Felleisen  > wrote:
>
>>
>> Thanks, I have pushed a fix and additional tests for error messages. This
>> will be included with the next release, to appear in a couple of weeks. —
>> Matthias
>>
>>
>>
>>
>> > On Apr 11, 2016, at 9:25 PM, Elena Machkasova 
>> wrote:
>> >
>> > Hi All,
>> >
>> > we have discovered that in 6.4 DrRacket (Advanced Student) seems to
>> have a bug generating error messages for foldl/foldr:
>> >
>> > (foldl + (list 2 3 4) 0)
>> >
>> > gives an error message "foldl: 2th argument must be a list, given 0"
>> > (in addition to the incorrect "th" for "2nd", the 0 is actually the
>> third argument, not second).
>> >
>> > There is also a somewhat misleading error (for beginners) in 6.4 and
>> earlier versions, shown with a somewhat artificial example:
>> >
>> > (map (lambda (x y) (+ x y)) (list 2 3 4))
>> >
>> > gives and error:
>> >
>> > the given procedure's expected number of arguments does not match
>> > the given number of lists
>> >  given procedure: #
>> >  expected: 2
>> >  given: 1
>> >
>> > This is technically correct, but not understandable to a student since
>> most likely they mistakenly used a two-argument function instead of a
>> one-argument one. In fact, students are never shown a map with multiple
>> lists. A better message would say that a one-argument function was
>> expected, but a two-argument function was given.
>> >
>> > The second error is somewhat of a design choice, but the first one
>> (with foldl) is a bug. If there is a way to patch it in 6.4, that would be
>> greatly appreciated.
>> >
>> > Cheers,
>> > Elena
>> >
>> >
>> > --
>> > 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.
>>
>>
>
>
> --
> Dr. Elena Machkasova
> Associate Professor of Computer Science
> Division of Science and Mathematics
> University of Minnesota, Morris
> Office: Sci 2325
> (320) 589-6308
> http://cda.morris.umn.edu/~elenam/
>
>
>


-- 
Dr. Elena Machkasova
Associate Professor of Computer Science
Division of Science and Mathematics
University of Minnesota, Morris
Office: Sci 2325
(320) 589-6308
http://cda.morris.umn.edu/~elenam/

-- 
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] Re: Hidden a list

2016-04-12 Thread Héctor Mc

Thanks,

This start because I need a syntax like the next:

(define u (make-s user (nom ape sexo))
(set-s u ((nom "nom" ) (ape "ape")))
(get-s u 'nom)
u ; --> '((nom "nom") (ape "ape") (sexo ""))

And I start using lists but I can't hidden. From there I changed to a struct 
but now I get this problem.

set-usuario-key!: unbound identifier in module in: set-usuario-key!

How I can solve that?

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


user.rkt
Description: Binary data


Re: [racket-users] DrRacket 6.4 error message + a misleading message

2016-04-12 Thread Matthias Felleisen

Yes, all of our releases are always announced.

If you are studying error messages, please check out Guillaume Marceau’s work, 
supervised by Kathi Fisler and co-advised by Shriram Krishnamurthi. He worked 
out an even better version of his ideas for WeScheme, which is still the 
starting point for Bootstrap, our educational spin-off project for middle 
schools. 

— Matthias





> On Apr 12, 2016, at 11:58 AM, Elena Machkasova  wrote:
> 
> Sounds good, thanks! Will the new release be announced? We are looking at 
> error messages as a part of a research project, so it would be good to use 
> the new one if we can. 
> 
> Elena 
> 
> On Tue, Apr 12, 2016 at 10:53 AM, Matthias Felleisen  > wrote:
> 
> Thanks, I have pushed a fix and additional tests for error messages. This 
> will be included with the next release, to appear in a couple of weeks. — 
> Matthias
> 
> 
> 
> 
> > On Apr 11, 2016, at 9:25 PM, Elena Machkasova  > > wrote:
> >
> > Hi All,
> >
> > we have discovered that in 6.4 DrRacket (Advanced Student) seems to have a 
> > bug generating error messages for foldl/foldr:
> >
> > (foldl + (list 2 3 4) 0)
> >
> > gives an error message "foldl: 2th argument must be a list, given 0"
> > (in addition to the incorrect "th" for "2nd", the 0 is actually the third 
> > argument, not second).
> >
> > There is also a somewhat misleading error (for beginners) in 6.4 and 
> > earlier versions, shown with a somewhat artificial example:
> >
> > (map (lambda (x y) (+ x y)) (list 2 3 4))
> >
> > gives and error:
> >
> > the given procedure's expected number of arguments does not match
> > the given number of lists
> >  given procedure: #
> >  expected: 2
> >  given: 1
> >
> > This is technically correct, but not understandable to a student since most 
> > likely they mistakenly used a two-argument function instead of a 
> > one-argument one. In fact, students are never shown a map with multiple 
> > lists. A better message would say that a one-argument function was 
> > expected, but a two-argument function was given.
> >
> > The second error is somewhat of a design choice, but the first one (with 
> > foldl) is a bug. If there is a way to patch it in 6.4, that would be 
> > greatly appreciated.
> >
> > Cheers,
> > Elena
> >
> >
> > --
> > 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 
> > .
> 
> 
> 
> 
> -- 
> Dr. Elena Machkasova
> Associate Professor of Computer Science
> Division of Science and Mathematics
> University of Minnesota, Morris
> Office: Sci 2325
> (320) 589-6308
> http://cda.morris.umn.edu/~elenam/ 
> 

-- 
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] DrRacket 6.4 error message + a misleading message

2016-04-12 Thread Elena Machkasova
Sounds good, thanks! Will the new release be announced? We are looking at
error messages as a part of a research project, so it would be good to use
the new one if we can.

Elena

On Tue, Apr 12, 2016 at 10:53 AM, Matthias Felleisen 
wrote:

>
> Thanks, I have pushed a fix and additional tests for error messages. This
> will be included with the next release, to appear in a couple of weeks. —
> Matthias
>
>
>
>
> > On Apr 11, 2016, at 9:25 PM, Elena Machkasova 
> wrote:
> >
> > Hi All,
> >
> > we have discovered that in 6.4 DrRacket (Advanced Student) seems to have
> a bug generating error messages for foldl/foldr:
> >
> > (foldl + (list 2 3 4) 0)
> >
> > gives an error message "foldl: 2th argument must be a list, given 0"
> > (in addition to the incorrect "th" for "2nd", the 0 is actually the
> third argument, not second).
> >
> > There is also a somewhat misleading error (for beginners) in 6.4 and
> earlier versions, shown with a somewhat artificial example:
> >
> > (map (lambda (x y) (+ x y)) (list 2 3 4))
> >
> > gives and error:
> >
> > the given procedure's expected number of arguments does not match
> > the given number of lists
> >  given procedure: #
> >  expected: 2
> >  given: 1
> >
> > This is technically correct, but not understandable to a student since
> most likely they mistakenly used a two-argument function instead of a
> one-argument one. In fact, students are never shown a map with multiple
> lists. A better message would say that a one-argument function was
> expected, but a two-argument function was given.
> >
> > The second error is somewhat of a design choice, but the first one (with
> foldl) is a bug. If there is a way to patch it in 6.4, that would be
> greatly appreciated.
> >
> > Cheers,
> > Elena
> >
> >
> > --
> > 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.
>
>


-- 
Dr. Elena Machkasova
Associate Professor of Computer Science
Division of Science and Mathematics
University of Minnesota, Morris
Office: Sci 2325
(320) 589-6308
http://cda.morris.umn.edu/~elenam/

-- 
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] DrRacket 6.4 error message + a misleading message

2016-04-12 Thread Matthias Felleisen

Thanks, I have pushed a fix and additional tests for error messages. This will 
be included with the next release, to appear in a couple of weeks. — Matthias




> On Apr 11, 2016, at 9:25 PM, Elena Machkasova  wrote:
> 
> Hi All, 
> 
> we have discovered that in 6.4 DrRacket (Advanced Student) seems to have a 
> bug generating error messages for foldl/foldr:
> 
> (foldl + (list 2 3 4) 0) 
> 
> gives an error message "foldl: 2th argument must be a list, given 0" 
> (in addition to the incorrect "th" for "2nd", the 0 is actually the third 
> argument, not second). 
> 
> There is also a somewhat misleading error (for beginners) in 6.4 and earlier 
> versions, shown with a somewhat artificial example: 
> 
> (map (lambda (x y) (+ x y)) (list 2 3 4))
> 
> gives and error:
> 
> the given procedure's expected number of arguments does not match
> the given number of lists
>  given procedure: #
>  expected: 2
>  given: 1 
> 
> This is technically correct, but not understandable to a student since most 
> likely they mistakenly used a two-argument function instead of a one-argument 
> one. In fact, students are never shown a map with multiple lists. A better 
> message would say that a one-argument function was expected, but a 
> two-argument function was given. 
> 
> The second error is somewhat of a design choice, but the first one (with 
> foldl) is a bug. If there is a way to patch it in 6.4, that would be greatly 
> appreciated. 
> 
> Cheers,
> Elena
> 
> 
> -- 
> 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 2016] extended deadline, april 25 2016, final call for papers

2016-04-12 Thread p.achten
TFP 2016 has extended its deadline for draft papers by two weeks (now
April 25).  Although all draft papers accepted to TFP 2016 will be
invited to submit to the post-symposium formal proceedings, authors
are reminded that they are not obligated to do so; we welcome works in
progress that may not be destined for the TFP proceedings.

Thanks,
David Van Horn

-
C A L L   F O R   P A P E R S
-

 TFP 2016 ===
 
  17th Symposium on Trends in Functional Programming
   June 8-10, 2016
 University of Maryland, College Park
 Near Washington, DC
 http://tfp2016.org/


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). Authors of draft papers will be invited to submit revised
papers based on the feedback receive at the symposium.  A
post-symposium refereeing process will then select a subset of these
articles for formal publication.

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


== INVITED SPEAKERS ==

TFP 2016 is pleased to announce keynote talks by the following two
invited speakers:

* Ronald Garcia, University of British Columbia: "Static and Dynamic
  Type Checking: A Synopsis"

* Steve Zdancewic, University of Pennsylvania: "Type- and
  Example-Driven Program Synthesis"


== HISTORY ==

The TFP symposium is the heir of the successful series of Scottish
Functional Programming Workshops. Previous TFP symposia were held in
   * Edinburgh (Scotland) in 2003;
   * Munich (Germany) in 2004;
   * Tallinn (Estonia) in 2005;
   * Nottingham (UK) in 2006;
   * New York (USA) in 2007;
   * Nijmegen (The Netherlands) in 2008;
   * Komarno (Slovakia) in 2009;
   * Oklahoma (USA) in 2010;
   * Madrid (Spain) in 2011;
   * St. Andrews (UK) in 2012;
   * Provo (Utah, USA) in 2013;
   * Soesterberg (The Netherlands) in 2014;
   * and Inria Sophia-Antipolis (France) in 2015.
For further general information about TFP please see the TFP homepage.
(http://www.tifp.org/).


== 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 2016 program chair, David Van Horn.


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