[racket-users] right abstraction for this?

2015-06-11 Thread 'John Clements' via users-redirect
I write this kind of code all the darn time: ;; take (listof (list a b)) into (hashof a (listof b)) (define (gather l) (for/fold ([ht (make-hash)]) ([pr l]) (hash-set ht (first pr) (cons (second pr) (hash-ref ht (first pr) empty) ;; gather

Re: [racket-users] right abstraction for this?

2015-06-11 Thread Stephen Chang
Would any of the functions in unstable/list help? For example, #lang racket (require unstable/list) (define (gather lst) (for/hash ([g (group-by car lst)]) (values (caar g) (append-map cdr g (gather '((a c) (a d) (b e) (b f))) ; = '#hash((a . (c d)) (b . (e f))) On Thu, Jun 11, 2015

Re: [racket-users] right abstraction for this?

2015-06-11 Thread Greg Hendershott
IIUC in SQL this would simply be: SELECT student, AVG(rating) FROM scores GROUP BY student Apparently a DSL for querying tables can be handy. :) The Racket equivalent for the special case of a 2-column table (a hash-table) could be something like: (define (sql-ish-aggregate-group-by f xs)

Re: [racket-users] right abstraction for this?

2015-06-11 Thread 'John Clements' via users-redirect
On Jun 11, 2015, at 10:19 AM, Stephen Chang stch...@ccs.neu.edu wrote: Would any of the functions in unstable/list help? For example, Ah, ‘group-by’ is very nice, yes. Looks like that was Vincent’s? Many thanks, Vincent! John -- You received this message because you are subscribed to

Re: [racket-users] ...aaand, too late to register for Strange Loop.

2015-06-11 Thread Robby Findler
I understand it may be too far to come for just one day for many, but RacketCon registration is independent of Strange Loop registration. Robby On Thu, Jun 11, 2015 at 2:29 PM, 'John Clements' via users-redirect us...@plt-scheme.org wrote: Golly, that was fast. So much for RacketCon this year.

[racket-users] ...aaand, too late to register for Strange Loop.

2015-06-11 Thread 'John Clements' via users-redirect
Golly, that was fast. So much for RacketCon this year. My fault, I know. John -- 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] Racket modules in R6RS?

2015-06-11 Thread John Carmack
How do you include a racket module in an R6RS program? I have remote.rkt in the same directory as test.scm. With R5RS I could do (#%require remote.rkt), but that doesn't work, and I tried various things in the (import) statement without success. Are there any plans for an R7RS lang in Racket?

[racket-users] Re: Racket modules in R6RS?

2015-06-11 Thread Philip Blair
On Thursday, June 11, 2015 at 4:22:19 PM UTC-4, John Carmack wrote: How do you include a racket module in an R6RS program?   I have remote.rkt in the same directory as test.scm.   With R5RS I could do (#%require remote.rkt), but that doesn’t work, and I tried various things in the

Re: [racket-users] Racket modules in R6RS?

2015-06-11 Thread Matthew Flatt
At Thu, 11 Jun 2015 20:22:16 +, John Carmack wrote: How do you include a racket module in an R6RS program? I have remote.rkt in the same directory as test.scm. With R5RS I could do (#%require remote.rkt), but that doesn't work, and I tried various things in the (import) statement

Re: [racket-users] System Scheme (RnRS): Shared Secret Generator

2015-06-11 Thread Matthew Flatt
At Wed, 10 Jun 2015 18:44:15 +0200, Michael Titke wrote: On 10/06/2015 12:33, Michael Titke wrote: I changed from one OS to another and I was missing a simple feature: automatic password generation. To fill the gap with a Scheme I implemented such a generator as a command line tool

Re: [racket-users] Racket modules in R6RS?

2015-06-11 Thread Matthias Felleisen
Let me rephrase Matthew. Racket is only related to Scheme. See http://racket-lang.org/new-name.html for an explanation of our move. Our understanding is that the Scheme community wants to move back to a world where the language is small while Racket wants to move to a world where programmers

Re: [racket-users] right abstraction for this?

2015-06-11 Thread Vincent St-Amour
As Greg points out, it was directly inspired by SQL's `group-by`. I've found it really handy when thinking about data in a relational way. Anyone opposed to moving it to `racket/list`? That would make it more discoverable? Vincent At Thu, 11 Jun 2015 11:17:26 -0700, 'John Clements' via

Re: [racket-users] racket on android (Was: Racket modules in R6RS?)

2015-06-11 Thread Neil Van Dyke
Matthew Flatt wrote on 06/11/2015 10:00 PM: Android via NDK is a supported platform. Matthew, that's great. Thank you. Anyone implemented `racket/gui` for Android with this, or otherwise hooked up things so that the Racket program can drive a UI on Android? Neil V. -- You received this

RE: [racket-users] Racket modules in R6RS?

2015-06-11 Thread John Carmack
I appreciate the position, but I do think there is still value in being able to optionally carve off all the extra goodness and act like a more primitive Scheme to provide compatibility with various embedded options where full Racket isn't practical. DrRacket is a key element of my strategy

Re: [racket-users] Racket modules in R6RS?

2015-06-11 Thread Matthias Felleisen
Short: What I am trying to say is that after R6RS, we moved on from Scheme. Don't expect us to support it, don't expect us to stand it its way. We are moving in an orthogonal direction. Long: We appreciate small kernel language and we inherited this from Scheme. We do not appreciate it keep

[racket-users] racket on android (Was: Racket modules in R6RS?)

2015-06-11 Thread Neil Van Dyke
Has anyone tried to build Racket 6.x for the Android NDK (or whatever is the current way to do native code)? That might be the fastest path, rather than targeting Dalvik, Java, or JS. Encouraging: I did find that Racket 6.x builds pretty easily as a possibly-viably-sized OpenWrt package,

Re: [racket-users] racket on android (Was: Racket modules in R6RS?)

2015-06-11 Thread Matthew Flatt
Android via NDK is a supported platform. The src/README file has information on cross-compilation and specific hints for Android. I'm not in a position to double check just now, but it built the last time I tried a few months ago. Embedding should be as easy as on any platform. I wouldn't