Re: [racket-users] modifying readtable entry for `(` breaks reading #hash() ?

2015-04-16 Thread Alexander D. Knauth
Thanks!

On Apr 15, 2015, at 2:55 PM, Matthew Flatt  wrote:

> After further experiments, I think trying to generalize too much here
> is a bad idea. I'll just change the way `read/recursive` uses the given
> readtable to make it more sensible and work for your example.
> 
> Although I was initially concerned about preserving backward
> compatibility, seeing how limited the effect turns out to be makes me
> think that it won't be a problem. Uses of `read[-syntax]/recursive` in
> existing packages are unaffected, as far as I can tell.
> 
> At Wed, 15 Apr 2015 06:16:30 -0600, Matthew Flatt wrote:
>> At Tue, 14 Apr 2015 21:04:38 -0400, "Alexander D. Knauth" wrote:
>>> 
>>> On Apr 14, 2015, at 6:57 PM, Matthew Flatt  wrote:
>>> 
 This is the kind of problem that the readtable argument to
 `read/recursive` was meant to solve, but I see that it doesn't work in
 this case.
 
 I have in mind that you'd map `#` to use `read/recursive` with a
 readtable that restores the default `(`. Mapping `#` would cover hash
 tables, vectors, and prefab structures.
 
 As `read/recursive` is currently implemented, however, a given
 readtable is would be used only for the initial `#`, so it doesn't
 affect the `(`s that delimit hash-table entries.
>>> 
>>> Do you mean something like this?:
>>> #lang racket
>>> (define orig-readtable (current-readtable))
>>> (parameterize ([current-readtable
>>>(make-readtable orig-readtable
>>>#\( 'terminating-macro
>>>(λ (c in src ln col pos)
>>>  (read-syntax/recursive src in c 
>>> orig-readtable))
>>>#\# 'non-terminating-macro
>>>(λ (c in src ln col pos)
>>>  (read-syntax/recursive src in c 
>>> orig-readtable)))])
>>>  (println (read (open-input-string "()"))); '()
>>>  (println (read (open-input-string "#hash()"  ; '#hash()
>> 
>> Yes.
>> 
>> 
>>> Because this worked! I’m surprised though; how is it communicating
>>> the orig-readtable to the #hash reader macro so that it can use that
>>> for parsing the ()?
>> 
>> Hm, right. The current reader does use the given readtable all the way
>> through the opening '(', but not after that --- which doesn't seem like
>> a good choice overall.
>> 
>> 
>>> This doesn’t work, though:
>>> (parameterize ([current-readtable ….])
>>>  (println (read (open-input-string "#hash((a . b))" ; . read: expected  
>> or 
>>> `[' or `{' to start a hash pair
>>> If I replace the inner set of parens with brackets, it works.  
>> 
>> Yep.
>> 
>> 
 It would make sense
 --- and I think it would solve your problem --- if the given readtable
 instead applied to all of the delimiters of the non-nested parts of the
 first datum in the input.
>>> 
>>> Would this require giving an extra argument to reader macro
>>> procedures, or am I misunderstanding something?
>> 
>> I had in mind an extra argument to `read/recursive` to enable the new
>> mode, with no change to the arguments to reader macros.
>> 
>> But, now that you say so, I see a potential need to send a readtable to
>> reader macros, too. That would be needed if you wanted to implement a
>> `#hash` macro from scratch that behaves the the built-in one.
>> 
>> The interface for reader macros is already complicated, but I think it
>> would work to add one extra optional-to-accept argument that is the
>> readtable to use for immediate delimiters.
>> 
>> -- 
>> 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.


RE: [racket-users] receiving a copy of my own mails to racket-users@googlegroups.com

2015-04-16 Thread Jos Koot
 
Hi John Clements,
I have looked in google settings, but sofar found no option for my wish.
I had a look in google support but found nothing either.
I'll look further.
If I find somethink useful, I'll report that.
Thanks, Jos Koot

-Original Message-
From: John Clements [mailto:cleme...@brinckerhoff.org] 
Sent: jueves, 16 de abril de 2015 17:49
To: Jos Koot
Cc: racket-users@googlegroups.com
Subject: Re: [racket-users] receiving a copy of my own mails to
racket-users@googlegroups.com


On Apr 16, 2015, at 7:39 AM, Jos Koot  wrote:

> Hi
>  
> I receive e-mails from racket-users@googlegroups.com.
> However, when I send an e-mail to racket-users@googlegroups.com I don't
receive my own e-mail.
> Not a big problem. For the moment I include myself as CC.
> Any idea how to fix this?

I don't see a setting for this (in 5 min of looking). I think the next step
would be to search for information in Google's support forums?

John Clements

-- 
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] literals within syntax-transfromer within syntax-transformer

2015-04-16 Thread Jos Koot
Hi Jens Axel
 
Thanks very much. That works perfectly.
I already guessed that I was confusing contexts, but did not realize how
simply with-syntax and datum->syntax can solve this problem.
Stupid me, for I have used with-syntax and datum->syntax before.
Syntax-case and its helpers (like with-syntax, datum->syntax, quasi-syntax
and so on) are great!
 
Thanks again, Jos Koot

  _  

From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On
Behalf Of Jens Axel Søgaard
Sent: jueves, 16 de abril de 2015 17:13
To: Jos Koot
Cc: racket-users@googlegroups.com
Subject: Re: [racket-users] literals within syntax-transfromer within
syntax-transformer


The literals in the syntax-case expression needs to have the same context 
as the identifiers used in the expressions where try is used.

#lang racket

(require (for-syntax racket))

(define-syntax (try stx)
  (define-syntax (stx-case stx)
(syntax-case stx ()
  ((_ stx-expr clause ...) 
   (with-syntax ([+ (datum->syntax stx '+)]
 [- (datum->syntax stx '-)])
   #'(syntax-case stx-expr (+ -) clause ...)
  (stx-case stx
((_ +) #''plus)
((_ -) #''minus)
((_ x) #''x)))

(try +) 
(try -) 
(try a) 
 

2015-04-16 16:35 GMT+02:00 Jos Koot :



Probably I am mixing literal identifiers from distinct expansion phases.
Nevertheless, I don't understand the behaviour of the program below.
Explanation would be very welcome.
I have looked into the expanded code with the macro stepper,
but I could not find any code looking for the literals.
 
#lang racket
 
(require (for-syntax racket))
 
(define-syntax (try stx)
 (define-syntax (stx-case stx)
  (syntax-case stx ()
   ((_ stx-expr clause ...) #'(syntax-case stx-expr (+ -) clause ...
 (stx-case stx
  ((_ +) #''plus)
  ((_ -) #''minus)
  ((_ x) #''x)))
 
(try +) ; -> plus; as expected
(try -) ; -> plus; expected -
(try a) ; -> plus; expected a
 
I did this in the definitions window of DrRacket, version 6.1.1 [3m].
Language: racket [custom]; memory limit: 2000 MB.
 
Thanks, Jos Koot


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





-- 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] prop:procedure, prop:match-expander, and contract blame

2015-04-16 Thread Jon Zeppieri
On Thu, Apr 16, 2015 at 8:02 AM, Jon Zeppieri  wrote:
> On Thu, Apr 16, 2015 at 7:32 AM, Alexander D. Knauth
>  wrote:
>> By the way, why wouldn’t you just use define-match-expander instead of 
>> defining the B struct?
>>
>>
>
> Because I need the same identifier to expand either to a procedure or
> to a match expander, and I don't know how to do that using
> define-match-expander.
>

A message I received from Matthias prompted me to take a closer look
at the docs for define-match-expander, and I realized that it actually
accepts two syntax transformers, where the second (optional) one is
for when the identifier is used in an expression context. So, in fact,
I can use define-match-expander.

-Jon

-- 
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] Organizing tests

2015-04-16 Thread 'John Clements' via users-redirect

On Apr 16, 2015, at 3:17 AM, Konrad Hinsen  wrote:

> I am looking for an approach that lets me run either all tests in my
> collection, or convenient subsets (e.g. one module), ideally using a
> single tool such as "raco test". Any suggestions? You get bonus points
> for solutions that integrate well with racket-mode in Emacs.

Your wish is granted!

(If I understand you correctly.)

The ‘raco test’ tool can be applied to a collection, using the “—collection” 
(or simply “-c”) flag. You can see a full list of the available flags by 
running 

raco help test

Hope I understood you correctly,

John Clements

-- 
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] receiving a copy of my own mails to racket-users@googlegroups.com

2015-04-16 Thread 'John Clements' via Racket Users

On Apr 16, 2015, at 7:39 AM, Jos Koot  wrote:

> Hi
>  
> I receive e-mails from racket-users@googlegroups.com.
> However, when I send an e-mail to racket-users@googlegroups.com I don't 
> receive my own e-mail.
> Not a big problem. For the moment I include myself as CC.
> Any idea how to fix this?

I don’t see a setting for this (in 5 min of looking). I think the next step 
would be to search for information in Google’s support forums?

John Clements

-- 
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] Organizing tests

2015-04-16 Thread Matthias Felleisen

Use different names for the various test modules. 
At the local level, you can use module+ test. For
the integration tests, you may wish to use module+
integration. Then run raco test with the parameter 
that takes the name of the submodule you want. (If
you really want to run unit tests together with 
integration tests, import the former into the latter.) 

-- Matthias



On Apr 16, 2015, at 11:17 AM, Konrad Hinsen wrote:

> Hi everyone,
> 
> I want to put some order into my tests, but after looking at various
> published Racket packages, I am not sure if there any accepted "best
> practices".
> 
> For a single module, the best approach seems to be a submodule "test"
> for the test cases, which are then run by "raco test". That's nice and
> works fine.
> 
> But what I have is a collection with multiple modules. Each modules
> has local tests, but there are also tests at a higher level that use
> code from several modules.
> 
> I am looking for an approach that lets me run either all tests in my
> collection, or convenient subsets (e.g. one module), ideally using a
> single tool such as "raco test". Any suggestions? You get bonus points
> for solutions that integrate well with racket-mode in Emacs.
> 
> Thanks in advance,
>  Konrad.
> 
> -- 
> 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.


Re: [racket-users] literals within syntax-transfromer within syntax-transformer

2015-04-16 Thread Jens Axel Søgaard
The literals in the syntax-case expression needs to have the same context
as the identifiers used in the expressions where try is used.

#lang racket

(require (for-syntax racket))

(define-syntax (try stx)
  (define-syntax (stx-case stx)
(syntax-case stx ()
  ((_ stx-expr clause ...)
   (with-syntax ([+ (datum->syntax stx '+)]
 [- (datum->syntax stx '-)])
   #'(syntax-case stx-expr (+ -) clause ...)
  (stx-case stx
((_ +) #''plus)
((_ -) #''minus)
((_ x) #''x)))

(try +)
(try -)
(try a)


2015-04-16 16:35 GMT+02:00 Jos Koot :

>  Probably I am mixing literal identifiers from distinct expansion phases.
> Nevertheless, I don't understand the behaviour of the program below.
> Explanation would be very welcome.
> I have looked into the expanded code with the macro stepper,
> but I could not find any code looking for the literals.
>
> #lang racket
>
> (require (for-syntax racket))
>
> (define-syntax (try stx)
>  (define-syntax (stx-case stx)
>   (syntax-case stx ()
>((_ stx-expr clause ...) #'(syntax-case stx-expr (+ -) clause ...
>  (stx-case stx
>   ((_ +) #''plus)
>   ((_ -) #''minus)
>   ((_ x) #''x)))
>
> (try +) ; -> plus; as expected
> (try -) ; -> plus; expected -
> (try a) ; -> plus; expected a
>
> I did this in the definitions window of DrRacket, version 6.1.1 [3m].
> Language: racket [custom]; memory limit: 2000 MB.
>
>  Thanks, Jos Koot
>
> --
> 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.
>



-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] receiving a copy of my own mails to racket-users@googlegroups.com

2015-04-16 Thread Jos Koot
Hi
 
I receive e-mails from racket-users@googlegroups.com.
However, when I send an e-mail to racket-users@googlegroups.com I don't
receive my own e-mail.
Not a big problem. For the moment I include myself as CC.
Any idea how to fix this?
 
Thanks, Jos Koot

-- 
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] literals within syntax-transfromer within syntax-transformer

2015-04-16 Thread Jos Koot
Probably I am mixing literal identifiers from distinct expansion phases.
Nevertheless, I don't understand the behaviour of the program below.
Explanation would be very welcome.
I have looked into the expanded code with the macro stepper,
but I could not find any code looking for the literals.
 
#lang racket
 
(require (for-syntax racket))
 
(define-syntax (try stx)
 (define-syntax (stx-case stx)
  (syntax-case stx ()
   ((_ stx-expr clause ...) #'(syntax-case stx-expr (+ -) clause ...
 (stx-case stx
  ((_ +) #''plus)
  ((_ -) #''minus)
  ((_ x) #''x)))
 
(try +) ; -> plus; as expected
(try -) ; -> plus; expected -
(try a) ; -> plus; expected a
 
I did this in the definitions window of DrRacket, version 6.1.1 [3m].
Language: racket [custom]; memory limit: 2000 MB.
 
Thanks, Jos Koot

-- 
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] prop:procedure, prop:match-expander, and contract blame

2015-04-16 Thread Jon Zeppieri
On Thu, Apr 16, 2015 at 7:32 AM, Alexander D. Knauth
 wrote:
>
>
>>> On Apr 15, 2015, at 2:29 PM, Jon Zeppieri  wrote:
>>>
 I'm trying to provide a struct, the struct type of which uses
 prop:procedure and prop:match-expander, and I'd like the procedure to
 have a contract.
>
>
>>> On Apr 15, 2015, at 10:12 PM, Jon Zeppieri  wrote:
>>>
 It's an instance of a struct. Here's the background: I have a struct
 type, created with `struct`, which has its own constructor and match
 expander. However, I don't want to use that constructor or match
 expander as part of the public interface. (The struct contains some
 fields that should be treated as private.) Now, the only way I know to
 provide a single identifier that can act as both a struct constructor
 and a match expander is to use a struct. So, in this case, I need to
 use a *different* struct type, an instance of which can be used, on
 one hand, as a procedure to construct an instance of the original
 struct type, and on the other, as a match expander (also for the
 original struct type).
>>>
>>> So If I understand correctly what you’re doing, you have a normal struct A, 
>>> at “runtime” with a transformer binding like normal structs have.
>>> Then you have a compile-time struct B, which has prop:procedure and 
>>> prop:match-expander, where you want an instance of B to be the right-hand 
>>> side of a (define-syntax  (B ….))?  Is that correct?  And the 
>>> prop:procedure in B will expand to something like (A ….), and the 
>>> prop:match-expander in B will expand to (A ….) as a match pattern?  Or am I 
>>> misunderstanding what you’re trying to do?
>
>
> On Apr 15, 2015, at 11:02 PM, Jon Zeppieri  wrote:
>
>> You got it.
>
> So do you want to put a contract on the instance of B, or do you want to put 
> a contract on what it expands to?

What it expands to, with correct blame ascription.

>
> If you want to put it on what it expands to, then you could look at this:
> http://docs.racket-lang.org/syntax/exprc.html
> Or this:
> http://docs.racket-lang.org/unstable/wrapc.html

Thanks, I'll take a look.

>
> By the way, why wouldn’t you just use define-match-expander instead of 
> defining the B struct?
>
>

Because I need the same identifier to expand either to a procedure or
to a match expander, and I don't know how to do that using
define-match-expander.

-Jon

-- 
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] raco make, file permissions, and unstable directories

2015-04-16 Thread Matthew Flatt
A potential problem with copying files is that the timestamps can get
out of sync. You'll want to make sure that timestamps on the ".zo"
files stay newer than the timestamps on the ".rkt" sources.

At Thu, 16 Apr 2015 02:03:31 -0500, Robby Findler wrote:
> 1) Compilation to .zo files (what raco make does) can theoretically
> embed absolute paths, but this is something we work hard to avoid, so
> it shouldn't be happening. We use the ability to move .zo files around
> when building our distributions, for example, so I think you should be
> safe. (But there can be bugs, of course.)
> 
> The theoretical possibility exists because a macro runs arbitrary
> racket code to compute its output and then can embed arbitrary stuff
> from the context into the result of its expansion, including
> information about the path where compilation happens. But I really do
> think you can rely on this not happening unless you write your own
> macros that make it happen.
> 
> 2) no, that seems fine. As long as you have the same version of the
> racket executable, the .zo files will work. (And if you don't, you'll
> get an error message pointing out the version mismatch.)
> 
> Robby
> 
> 
> 
> On Wed, Apr 15, 2015 at 12:50 PM, Deren Dohoda  wrote:
> > Hi group,
> >
> > I use Racket in an embedded linux system. My normal development process is
> > to write Racket code in Windows, transfer this to the embedded computer, and
> > then use raco make in the Debian system. But when the system is powered on,
> > it doesn't boot to Debian, it boots to a busybox OS where the filesystem is
> > read-only, and the paths are not the same.
> >
> > To this end, the busybox OS runs a startup script which calls racket
> > directly to run the main file. This all works fine, but I have started to
> > wonder about two things:
> >
> > 1) does raco make build in any absolute path dependencies? Should I instead
> > remount the filesystem as read/write in busybox and run "raco make" there,
> > since the busybox filesystem has different paths than the Debian filesystem?
> >
> > 2) suppose I run raco make on a board and copy the result out to a USB stick
> > with a FAT filesystem which can't preserve things like execute permissions,
> > then copy this back to a new board. Should I expect that the racket
> > executable will have some problems with the previously-used "compiled"
> > folders?
> >
> > Thanks for any insight here.
> >
> > Deren
> >
> > --
> > 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.


Re: [racket-users] prop:procedure, prop:match-expander, and contract blame

2015-04-16 Thread Alexander D. Knauth


>> On Apr 15, 2015, at 2:29 PM, Jon Zeppieri  wrote:
>> 
>>> I'm trying to provide a struct, the struct type of which uses
>>> prop:procedure and prop:match-expander, and I'd like the procedure to
>>> have a contract.


>> On Apr 15, 2015, at 10:12 PM, Jon Zeppieri  wrote:
>> 
>>> It's an instance of a struct. Here's the background: I have a struct
>>> type, created with `struct`, which has its own constructor and match
>>> expander. However, I don't want to use that constructor or match
>>> expander as part of the public interface. (The struct contains some
>>> fields that should be treated as private.) Now, the only way I know to
>>> provide a single identifier that can act as both a struct constructor
>>> and a match expander is to use a struct. So, in this case, I need to
>>> use a *different* struct type, an instance of which can be used, on
>>> one hand, as a procedure to construct an instance of the original
>>> struct type, and on the other, as a match expander (also for the
>>> original struct type).
>> 
>> So If I understand correctly what you’re doing, you have a normal struct A, 
>> at “runtime” with a transformer binding like normal structs have.
>> Then you have a compile-time struct B, which has prop:procedure and 
>> prop:match-expander, where you want an instance of B to be the right-hand 
>> side of a (define-syntax  (B ….))?  Is that correct?  And the 
>> prop:procedure in B will expand to something like (A ….), and the 
>> prop:match-expander in B will expand to (A ….) as a match pattern?  Or am I 
>> misunderstanding what you’re trying to do?


On Apr 15, 2015, at 11:02 PM, Jon Zeppieri  wrote:

> You got it.

So do you want to put a contract on the instance of B, or do you want to put a 
contract on what it expands to?

If you want to put it on what it expands to, then you could look at this:
http://docs.racket-lang.org/syntax/exprc.html
Or this:
http://docs.racket-lang.org/unstable/wrapc.html
 
By the way, why wouldn’t you just use define-match-expander instead of defining 
the B struct?


-- 
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] Organizing tests

2015-04-16 Thread Konrad Hinsen
Hi everyone,

I want to put some order into my tests, but after looking at various
published Racket packages, I am not sure if there any accepted "best
practices".

For a single module, the best approach seems to be a submodule "test"
for the test cases, which are then run by "raco test". That's nice and
works fine.

But what I have is a collection with multiple modules. Each modules
has local tests, but there are also tests at a higher level that use
code from several modules.

I am looking for an approach that lets me run either all tests in my
collection, or convenient subsets (e.g. one module), ideally using a
single tool such as "raco test". Any suggestions? You get bonus points
for solutions that integrate well with racket-mode in Emacs.

Thanks in advance,
  Konrad.

-- 
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] raco make, file permissions, and unstable directories

2015-04-16 Thread Robby Findler
1) Compilation to .zo files (what raco make does) can theoretically
embed absolute paths, but this is something we work hard to avoid, so
it shouldn't be happening. We use the ability to move .zo files around
when building our distributions, for example, so I think you should be
safe. (But there can be bugs, of course.)

The theoretical possibility exists because a macro runs arbitrary
racket code to compute its output and then can embed arbitrary stuff
from the context into the result of its expansion, including
information about the path where compilation happens. But I really do
think you can rely on this not happening unless you write your own
macros that make it happen.

2) no, that seems fine. As long as you have the same version of the
racket executable, the .zo files will work. (And if you don't, you'll
get an error message pointing out the version mismatch.)

Robby



On Wed, Apr 15, 2015 at 12:50 PM, Deren Dohoda  wrote:
> Hi group,
>
> I use Racket in an embedded linux system. My normal development process is
> to write Racket code in Windows, transfer this to the embedded computer, and
> then use raco make in the Debian system. But when the system is powered on,
> it doesn't boot to Debian, it boots to a busybox OS where the filesystem is
> read-only, and the paths are not the same.
>
> To this end, the busybox OS runs a startup script which calls racket
> directly to run the main file. This all works fine, but I have started to
> wonder about two things:
>
> 1) does raco make build in any absolute path dependencies? Should I instead
> remount the filesystem as read/write in busybox and run "raco make" there,
> since the busybox filesystem has different paths than the Debian filesystem?
>
> 2) suppose I run raco make on a board and copy the result out to a USB stick
> with a FAT filesystem which can't preserve things like execute permissions,
> then copy this back to a new board. Should I expect that the racket
> executable will have some problems with the previously-used "compiled"
> folders?
>
> Thanks for any insight here.
>
> Deren
>
> --
> 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.