[racket-users] Racket v6.7

2016-10-26 Thread Vincent St-Amour
Racket version 6.7 is now available from http://racket-lang.org/ - Racket supports building graphical applications on Android through the racket-android project: https://github.com/jeapostrophe/racket-android - The Racket REPL comes with line-editing, command and result history, and

Re: [racket-users] Re: Crosscompiling executables

2016-10-26 Thread David Storrs
On Wed, Oct 26, 2016 at 2:30 PM, Matthew Flatt wrote: > At Wed, 26 Oct 2016 14:01:15 -0400, David Storrs wrote: >> That document talks about running raco pkg, although I would have >> expected raco exe. I'm guessing, but it seems like the process for >> crosscompiling a

Re: [racket-users] degenerate performance in syntax-parse

2016-10-26 Thread Dupéron Georges
> The only issue is converting our mountain of code that uses the old syntax > (more than 40,000 lines, if you can believe it). I would suggest keeping the old syntax too via {~or #:blend {~and blend-stx blend}}, but making it log a warning when (attribute blend-stx) is true, printing

Re: [racket-users] Re: Crosscompiling executables

2016-10-26 Thread Matthew Flatt
At Wed, 26 Oct 2016 14:01:15 -0400, David Storrs wrote: > That document talks about running raco pkg, although I would have > expected raco exe. I'm guessing, but it seems like the process for > crosscompiling a racket file target.rkt would be: > > 1) Download a .tgz for Windows (making sure

Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread David Storrs
Thanks, Sam. That was exactly what I needed. Thanks, Matthas. The example was useful. On Wed, Oct 26, 2016 at 2:13 PM, Sam Tobin-Hochstadt wrote: > I think `keyword-apply` is what you want. > > Sam > > On Wed, Oct 26, 2016 at 2:11 PM, David Storrs

Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread Matthias Felleisen
I just did something like that” ;; [Listof String] -> Week ;; parse a list of strings into a week (define (1-week los) ... (define zipped (map list all-keywords all-vals)) (define sorted (sort zipped keywordkeyword). [[ For completeness, (define-syntax (struct/opt stx)

Re: [racket-users] Programmatically generating keywords

2016-10-26 Thread Sam Tobin-Hochstadt
I think `keyword-apply` is what you want. Sam On Wed, Oct 26, 2016 at 2:11 PM, David Storrs wrote: > Is it possible to generate keywords for a call? > > For example, this works: > > (with-output-to-file > (buildpath "." "foo") > (lambda () (displayln "f!")) >

[racket-users] Programmatically generating keywords

2016-10-26 Thread David Storrs
Is it possible to generate keywords for a call? For example, this works: (with-output-to-file (buildpath "." "foo") (lambda () (displayln "f!")) #:mode 'text #:exists 'replace) But this does not: (with-output-to-file (buildpath "." "foo") (lambda () (displayln "f!"))

Re: [racket-users] Re: Crosscompiling executables

2016-10-26 Thread David Storrs
That document talks about running raco pkg, although I would have expected raco exe. I'm guessing, but it seems like the process for crosscompiling a racket file target.rkt would be: 1) Download a .tgz for Windows (making sure that you choose 32-bit or 64-bit as appropriate to the target

Re: [racket-users] Problem displaying a struct returned by a function in a cond statement

2016-10-26 Thread Ken MacKenzie
After you said that I looked at the final return in findsense and it read as such (returnsense)) I changed it to returnsense) And all is well. Thank you! On Wed, Oct 26, 2016 at 1:34 PM, Ben Greenman wrote: > Can you show us findSense? > > The error message is

Re: [racket-users] Problem displaying a struct returned by a function in a cond statement

2016-10-26 Thread Ben Greenman
Can you show us findSense? The error message is saying there's an extra pair of parentheses somewhere, for example: > (1) > (define-struct foo () #:transparent) > ((foo)) On Wed, Oct 26, 2016 at 1:16 PM, Ken MacKenzie wrote: > New to racket and playing with a little

[racket-users] Problem displaying a struct returned by a function in a cond statement

2016-10-26 Thread Ken MacKenzie
New to racket and playing with a little something. Here is my code: #lang racket/base

[racket-users] Re: Redex: macro expanding to a side-condition clause

2016-10-26 Thread Dupéron Georges
Be aware that `expand-all-judgment-form-expanders` does what it says on the tin: if the `(define-judgment-form …)` contains something that should in principle shadow the expander, e.g. something equivalent to `(let ([where/not (λ (x) 42)]) (where/not 'blah))`, then the

Re: [racket-users] Re: Redex: macro expanding to a side-condition clause

2016-10-26 Thread Sam Caldwell
(cc'ing the list) Cool, I hadn't seen that library. I think this approach would get the job done. Thanks, Sam Caldwell On Wed, Oct 26, 2016 at 12:25 PM, Sam Caldwell wrote: > Cool, I hadn't seen that library. I think this approach would get the job > done. > > Thanks, > Sam

Re: [racket-users] Allow Redefinition of Defined Expressions

2016-10-26 Thread İlker Kesen
Thanks a lot Caner. This is what I want exactly. On Wed, Oct 26, 2016 at 5:34 PM Caner Derici wrote: This is probably not a very good idea for numerous reasons, but here's one way to do that: (just extend the 'define' to set! things that are already bound) #lang racket

Re: [racket-users] FFI and C macros

2016-10-26 Thread James
On Oct 24, 2016, at 5:20 PM, Jens Axel Søgaard wrote: > Is https://docs.racket-lang.org/gir/index.html of any use in your context? Thanks. I'm actually not sure. I did find the gir package earlier but got the error shown below when I tried to use it. At first I thought it was because it's

Re: [racket-users] Allow Redefinition of Defined Expressions

2016-10-26 Thread Caner Derici
This is probably not a very good idea for numerous reasons, but here's one way to do that: (just extend the 'define' to set! things that are already bound) #lang racket (require (rename-in racket/base [define define-original]) (for-syntax syntax/parse)) (define-syntax (define stx)

Re: [racket-users] Re: Crosscompiling executables

2016-10-26 Thread Matthew Flatt
It's now possible. See http://docs.racket-lang.org/raco/cross-system.html In contrast to the previous discussion, https://groups.google.com/d/msg/racket-users/bYR1ZF86NGI/5pcS5FYVCgAJ we now distribute ".tgz" files containing a minimal Racket distribution for each platform:

[racket-users] Re: Crosscompiling executables

2016-10-26 Thread David Storrs
I should add that I read the docs on raco exe and googled around, but the list post that I found was from 2013 and said that at the time it was not possible. On Wed, Oct 26, 2016 at 10:06 AM, David Storrs wrote: > I'm running Mac and would like to compile my code to a

[racket-users] Crosscompiling executables

2016-10-26 Thread David Storrs
I'm running Mac and would like to compile my code to a Windows executable. Is there a way to do this, or do I need to copy the code over to a Windows installation and compile it there? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

Re: [racket-users] Creating a list of random things

2016-10-26 Thread Gustavo Massaccesi
An additional example, I hope it's useful. I think it's easy to explain if we replace (random) with a new function (get-counter!) that instead of generating a random number, it provides an increasing sequence. #lang racket (define secret-counter 0) (define (get-counter!)

[racket-users] Allow Redefinition of Defined Expressions

2016-10-26 Thread İlker Kesen
Hi, I want to allow redefinition of already defined expressions (variables, procedures etc.), but Racket prevents me. I know, in DrRacket I can allow it via graphical preferences interface for Pretty Big and R5RS languages. However, I want to allow that operation in racket and sicp languages,

Re: [racket-users] Identifier equality of identifiers stashed in preserved syntax properties

2016-10-26 Thread Alexis King
> On Oct 25, 2016, at 17:27, Ryan Culpepper wrote: > > Consider that (eval (list 'quote #'+)) also evaluates to a symbol, for about > the same reason. Yes, this does make sense, even if I couldn’t put it quite so nicely. :) > Try local-expanding either of these terms