[racket-users] Re: Any good way to shadow a required module?

2017-05-01 Thread Jinzhou Zhang
On Tuesday, May 2, 2017 at 1:04:13 PM UTC+8, Matthew Butterick wrote:
> On Monday, May 1, 2017 at 9:55:10 PM UTC-7, Jinzhou Zhang wrote:
> > Thus my question is: is there any good way to shadow a required module?
> 
> `subtract-in`
> 
> http://docs.racket-lang.org/reference/require.html?q=subtract-in#%28form._%28%28lib._racket%2Frequire..rkt%29._subtract-in%29%29

Thank you very much! Can't believe I missed it.

-- 
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: Any good way to shadow a required module?

2017-05-01 Thread Matthew Butterick
On Monday, May 1, 2017 at 9:55:10 PM UTC-7, Jinzhou Zhang wrote:
> Thus my question is: is there any good way to shadow a required module?

`subtract-in`

http://docs.racket-lang.org/reference/require.html?q=subtract-in#%28form._%28%28lib._racket%2Frequire..rkt%29._subtract-in%29%29

-- 
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] Any good way to shadow a required module?

2017-05-01 Thread Jinzhou Zhang
I'm creating my own language axe: http://docs.racket-lang.org/axe/index.html
which aimed at providing a "good default" for myself.

Now I am trying to include Alexis's data/collection as defaults. Thus I need to:

```
(require racket)
(require data/collection)

(provide (all-from-out racket))
(provide (all-from-out data/collection))
```

However, `data/collection` overwrites several identifies from racket/list,
such as map, first, second, etc. That makes `(require data/collection)` fail.

I've tried the following:

```
(module for-export racket
  (require data/collection)
  (provide (all-defined-out)))

(provide (all-from-out 'for-export))
```

But it seems that `(all-defined-out)` will only export the manually defined
identifiers in module.

Thus my question is: is there any good way to shadow a required module?

I don't think it is good to exclude the identifiers manually. Because any later
change in data/collection (shadow another identifier) will break my package.

Best Regards,
Jinzhou Zhang

-- 
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] Readtable extensions and syntax coloring in DrRacket

2017-05-01 Thread William G Hatch

I would also like to know about this.  For what it's worth, I also have
an extension for literal strings (the udelim package, and I've been
behind using «guillemets» as nestable literal string quotes), and I
haven't figured out how to extensibly change the coloring either.  One
of my more adventurous reader extensions treats | as a normal character,
and in the interactions pane it additionally doesn't accept a line
unless it has an even number of | characters.  Is the interaction lexing
connected to the color lexing, or is that somewhere else?

Thanks,

William


On Mon, May 01, 2017 at 03:48:06PM -0700, Andrew Gwozdziewycz wrote:

Hi Brendan,

I'm wondering if you tried the here string syntax for your use case,
which other than the fact that it requires a couple of newlines seems
similar in vein to what you were going for (e.g. it doesn't escape
anything)?

```racket

#<
 Any text here, and nothing gets escaped, This is somewhat surprising.
 HI
"Any text here, and nothing gets escaped. This is somewhat surprising."
```

Cheers,

Andrew

On Mon, May 1, 2017 at 2:37 PM, brendan  wrote:

I wrote a little Racket meta-language that adds a dispatch macro to the 
readtable for typing string literals without escape characters. You start with 
two or more #'s followed by any non-# character, then the actual string 
content, then end with the same non-# character and the same number of #'s. So


##|"foo\bar"|##


evaluates the same as


"\"foo\\bar\""


Works great, but it does wreak quite some havoc on DrRacket's syntax coloring. 
Unfortunately as far as I can tell the only way to fix that is to replace the 
color lexer entirely; there's no compositon like there is with readtables. Is 
that correct, or is there a trick that I'm missing?

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




--
http://www.apgwoz.com

--
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] Re: Self evaluating Racket Interpreter

2017-05-01 Thread circularballs
I am somewhat reluctant to use structures as I want to keep the interpreter as 
minimal as possible. Also, I'm not familiar enough with the semantics of frames 
to implement it in interpreter.rkt.

With regards to mcons being different from cons, Oscar Lopez has suggested that 
in stackoverflow. So, I re-implemented the interpreter in r5rs so that set-car! 
and set-cdr! are available and I wouldn't need to use mcons. I've attached the 
files here.

I still got an error
; application: not a procedure;
;  expected a procedure that can be applied to arguments
;   given: (mcons 'expr (mcons 'env))
;   arguments...: [none]

It looks like it still has something to do with mcons. I suspect that this 
might have something to do with Racket's implementation of r5rs? Again, this 
might be completely wrong but I don't know how to determine the cause. 

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


interpreter-r5rs.rkt
Description: Binary data


interpreter-r5rs-self-evaluate.rkt
Description: Binary data


Re: [racket-users] Self evaluating Racket Interpreter

2017-05-01 Thread circularballs
On Tuesday, May 2, 2017 at 2:03:23 AM UTC+8, Jens Axel Søgaard wrote:
> I recommend you change your representation to structures.
> 
> 
> See new answer:
> 
> 
> http://stackoverflow.com/a/43723966/23567
> 
> 
> 
> /Jens Axel
> 
> 
> 
> 
> 
> 
> 2017-05-01 19:03 GMT+02:00  :
> I posted this question on stackoverflow but have not found an answer yet. 
> https://stackoverflow.com/questions/43476080/self-evaluting-racket-interpreter
> 
> 
> 
> I've been trying to write a Racket interpreter that can interpret itself.
> 
> 
> 
> interpreter.rkt contains the code for the interpreter. It is pretty standard. 
> Then, in interpreter-self-evaluate.rkt, I
> 
>     1. import interpreter.rkt,
> 
>     2. copy paste the code from interpreter.rkt and
> 
>     3. evaluate the code using the eeval function defined in interpreter.rkt.
> 
> 
> 
> However, this returns an error "; mcdr: contract violation". I suspect that 
> the problem is in interpreter-self-evaluate.rkt and that it might have 
> something to do with how quote works. I might be completely off base though. 
> Any ideas?
> 
> 
> 
> --
> 
> 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...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> 
> 
> -- 
> 
> -- 
> Jens Axel Søgaard

I am somewhat reluctant to use structures as I want to keep the interpreter as 
minimal as possible. Also, I'm not familiar enough with the semantics of frames 
to implement it in interpreter.rkt.

With regards to mcons being different from cons, Oscar Lopez has suggested that 
in stackoverflow. So, I re-implemented the interpreter in r5rs so that set-car! 
and set-cdr! are available and I wouldn't need to use mcons. I've attached the 
files here.

I still got an error
; application: not a procedure;
;  expected a procedure that can be applied to arguments
;   given: (mcons 'expr (mcons 'env))
;   arguments...: [none]

It looks like it still has something to do with mcons. I suspect that this 
might have something to do with Racket's implementation of r5rs? Again, this 
might be completely wrong but I don't know how to determine the cause.

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


interpreter-r5rs.rkt
Description: Binary data


interpreter-r5rs-self-evaluate.rkt
Description: Binary data


Re: [racket-users] Racket v6.9

2017-05-01 Thread Vincent St-Amour

There was an issue with the signatures on the Windows installers for 6.9.

We've uploaded new, properly signed Windows installers to
download.racket-lang.org

Thanks to Magda Wojciecchowska for the report!

Vincent


On Thu, 27 Apr 2017 15:47:55 -0500,
Vincent St-Amour wrote:
> 
> Racket version 6.9 is now available from
> 
> http://racket-lang.org/
> 
> ---
> 
> Security Announcement:
> 
> A security vulnerability in the `racket/sandbox` library and Typed
> Racket allowed malicious Typed Racket code to escape the sandbox.
> This vulnerability has been fixed in Racket version 6.9. Anyone using
> `racket/sandbox` to execute untrustworthy code with access to Typed
> Racket should upgrade to version 6.9 immediately.
> 
> While this known vulnerability has been eliminated, it is possible that
> similar errors in other installed collections could also be exploited,
> although we are not currently aware of any existing vulnerabilities. We
> recommend that if you use the Racket sandbox to execute untrustworthy
> Racket code, you should also employ additional operating system or
> virtual machine level protections. The documentation for `racket/sandbox`
> has been updated to list recommended security practices for using the
> library.
> 
> Thanks to Scott Moore for identifying this vulnerability.
> 
> ---
> 
> - The official package catalog Web site is revised to have a new user
>   experience.
> 
> - The Northwestern snapshot site keeps weekly snapshots going up to 12
>   weeks into the past. Those provide a middle ground for users who want
>   access to new features earlier than stable releases, but want less
>   churn than nightly builds.
> 
> - DrRacket provides a refactoring tool to remove unused requires in
>   modules.
> 
> - DrRacket's #lang-line customization support works better with buggy
>   (i.e., in development) languages.
> 
> - The web server's cookie libraries, including "id cookie" authentication,
>   support RFC 6265.
> 
> - The `db` library supports PostgreSQL's UUID type.
> 
> - The `raco` command lists matching commands when passed an ambiguous
>   command prefix.
> 
> - The bytecode compiler detects more optimization opportunities for
>   structure operations.
> 
> - Scribble can produce output via XeLaTeX as an alternative to LaTeX.
> 
> - Scribble supports the `acmart` LaTeX style, for use with ACM
>   publications.
> 
> - Scribble supports the use of CJK characters in tags.
> 
> ---
> 
> The following people contributed to this release:
> Alex Knauth, Alexander Shopov, Alexis King, Andrew Kent, Asumu Takikawa,
> Ben Greenman, Daniel Feltey, David Van Horn, Georges Dupéron, Greg
> Hendershott, Gustavo Massaccesi, Ingo Blechschmidt, James Bornholt,
> James Whang, Jay McCarthy, Jeff Shelley, John Clements, Jordan Johnson,
> Leandro Facchinetti, Leif Andersen, Marc Burns, Matthew Butterick,
> Matthew Eric Bassett, Matthew Flatt, Matthias Felleisen, Michael Myers,
> Mike Sperber, Philip McGrath, Philippe Meunier, Robby Findler, Royall
> Spence, Ryan Culpepper, Sam Caldwell, Sam Tobin-Hochstadt, Shu-Hung You,
> Spencer Florence, Stephen Chang, Tony Garnock-Jones, Vincent St-Amour,
> WarGrey Gyoudmon Ju, Wei Tang, and William G Hatch.
> 
> Feedback Welcome
> 
> -- 
> 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] Readtable extensions and syntax coloring in DrRacket

2017-05-01 Thread Andrew Gwozdziewycz
Hi Brendan,

I'm wondering if you tried the here string syntax for your use case,
which other than the fact that it requires a couple of newlines seems
similar in vein to what you were going for (e.g. it doesn't escape
anything)?

```racket
> #< wrote:
> I wrote a little Racket meta-language that adds a dispatch macro to the 
> readtable for typing string literals without escape characters. You start 
> with two or more #'s followed by any non-# character, then the actual string 
> content, then end with the same non-# character and the same number of #'s. So
>
>> ##|"foo\bar"|##
>
> evaluates the same as
>
>> "\"foo\\bar\""
>
> Works great, but it does wreak quite some havoc on DrRacket's syntax 
> coloring. Unfortunately as far as I can tell the only way to fix that is to 
> replace the color lexer entirely; there's no compositon like there is with 
> readtables. Is that correct, or is there a trick that I'm missing?
>
> --
> 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.



-- 
http://www.apgwoz.com

-- 
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] Readtable extensions and syntax coloring in DrRacket

2017-05-01 Thread brendan
I wrote a little Racket meta-language that adds a dispatch macro to the 
readtable for typing string literals without escape characters. You start with 
two or more #'s followed by any non-# character, then the actual string 
content, then end with the same non-# character and the same number of #'s. So

> ##|"foo\bar"|##

evaluates the same as

> "\"foo\\bar\""

Works great, but it does wreak quite some havoc on DrRacket's syntax coloring. 
Unfortunately as far as I can tell the only way to fix that is to replace the 
color lexer entirely; there's no compositon like there is with readtables. Is 
that correct, or is there a trick that I'm missing?

-- 
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] How do I debug scope-manipulating code

2017-05-01 Thread 'William J. Bowman' via Racket Users
Does anyone have advice on how to debug scope-manipulating meta-programs?
I'm not talking about the little 5 line example macros shown in the docs, but 
thousands of lines of
meta-programming that intentionally manipulates binding, but sometimes 
apparently does it wrong.

Part of the problem is that I don't know of a way to unit test for (or specify 
with contracts) correct scopeyness.
All my tests pass.
When a program goes wrong it's large and complicated and I can't find a small 
counterexample.

My current method for debugging is to combine `racket/trace` and `debug-scopes` 
to trace smelly parts
of the code.
I then sprinkle `syntax-local-introduce` until the output looks more reasonable.
This makes me feel like setting fire to "sets of scopes" and using gensym.
Also, it doesn't seem to be working.

-- 
William J. Bowman
Northeastern University
College of Computer and Information Science

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


signature.asc
Description: PGP signature


Re: [racket-users] Self evaluating Racket Interpreter

2017-05-01 Thread Scott Moore
Matthias helpfully pointed me at this 
http://www.ccs.neu.edu/home/matthias/HtDP2e/part_two.html#%28part._i2-3%29, 
which made me reflect a bit more and I agree now it is fair to say that `(1 2 
3) is short for (list 1 2 3). Perhaps a reflexive reaction from letting myself 
get confused about quotation once too many times. ;)

On May 1, 2017, 2:04 PM -0400, Scott Moore , wrote:
> Hijacking this thread a little, but a pet peeve: ‘(1 2 3) is not short for 
> (list 1 2 3), it just happens to evaluate to that…
>
> (let ([x 0]) (list x x)) -> (list 0 0)
> (let ([x 0]) ‘(x x)) -> (list ‘x ‘x)
>
> Perhaps the reader should implement #l(, which inserts an explicit `list` at 
> the beginning of the list.
> Then there would still be a short way to write (list 1 2 3): #l(1 2 3), 
> without all the hiccups involved when using ‘ as an abbreviation for list...
>
> On May 1, 2017, 1:08 PM -0400, Ben Greenman , 
> wrote:
> > '(1 2 3) is short for (list 1 2 3)
> > which is short for (cons 1 (cons 2 (cons 3 null))
> > which is different from (mcons 1 (mcons 2 (mcons 3 null)))
> >
> > I hope this helps
> >
> >
> > > On Mon, May 1, 2017 at 1:03 PM,  wrote:
> > > > I posted this question on stackoverflow but have not found an answer 
> > > > yet. 
> > > > https://stackoverflow.com/questions/43476080/self-evaluting-racket-interpreter
> > > >
> > > > I've been trying to write a Racket interpreter that can interpret 
> > > > itself.
> > > >
> > > > interpreter.rkt contains the code for the interpreter. It is pretty 
> > > > standard. Then, in interpreter-self-evaluate.rkt, I
> > > >     1. import interpreter.rkt,
> > > >     2. copy paste the code from interpreter.rkt and
> > > >     3. evaluate the code using the eeval function defined in 
> > > > interpreter.rkt.
> > > >
> > > > However, this returns an error "; mcdr: contract violation". I suspect 
> > > > that the problem is in interpreter-self-evaluate.rkt and that it might 
> > > > have something to do with how quote works. I might be completely off 
> > > > base though. Any ideas?
> > > >
> > > > --
> > > > 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] Self evaluating Racket Interpreter

2017-05-01 Thread Scott Moore
Hijacking this thread a little, but a pet peeve: ‘(1 2 3) is not short for 
(list 1 2 3), it just happens to evaluate to that…

(let ([x 0]) (list x x)) -> (list 0 0)
(let ([x 0]) ‘(x x)) -> (list ‘x ‘x)

Perhaps the reader should implement #l(, which inserts an explicit `list` at 
the beginning of the list.
Then there would still be a short way to write (list 1 2 3): #l(1 2 3), without 
all the hiccups involved when using ‘ as an abbreviation for list...

On May 1, 2017, 1:08 PM -0400, Ben Greenman , 
wrote:
> '(1 2 3) is short for (list 1 2 3)
> which is short for (cons 1 (cons 2 (cons 3 null))
> which is different from (mcons 1 (mcons 2 (mcons 3 null)))
>
> I hope this helps
>
>
> > On Mon, May 1, 2017 at 1:03 PM,  wrote:
> > > I posted this question on stackoverflow but have not found an answer yet. 
> > > https://stackoverflow.com/questions/43476080/self-evaluting-racket-interpreter
> > >
> > > I've been trying to write a Racket interpreter that can interpret itself.
> > >
> > > interpreter.rkt contains the code for the interpreter. It is pretty 
> > > standard. Then, in interpreter-self-evaluate.rkt, I
> > >     1. import interpreter.rkt,
> > >     2. copy paste the code from interpreter.rkt and
> > >     3. evaluate the code using the eeval function defined in 
> > > interpreter.rkt.
> > >
> > > However, this returns an error "; mcdr: contract violation". I suspect 
> > > that the problem is in interpreter-self-evaluate.rkt and that it might 
> > > have something to do with how quote works. I might be completely off base 
> > > though. Any ideas?
> > >
> > > --
> > > 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] Self evaluating Racket Interpreter

2017-05-01 Thread Jens Axel Søgaard
I recommend you change your representation to structures.

See new answer:

http://stackoverflow.com/a/43723966/23567

/Jens Axel



2017-05-01 19:03 GMT+02:00 :

> I posted this question on stackoverflow but have not found an answer yet.
> https://stackoverflow.com/questions/43476080/self-
> evaluting-racket-interpreter
>
> I've been trying to write a Racket interpreter that can interpret itself.
>
> interpreter.rkt contains the code for the interpreter. It is pretty
> standard. Then, in interpreter-self-evaluate.rkt, I
> 1. import interpreter.rkt,
> 2. copy paste the code from interpreter.rkt and
> 3. evaluate the code using the eeval function defined in
> interpreter.rkt.
>
> However, this returns an error "; mcdr: contract violation". I suspect
> that the problem is in interpreter-self-evaluate.rkt and that it might have
> something to do with how quote works. I might be completely off base
> though. Any ideas?
>
> --
> 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] Self evaluating Racket Interpreter

2017-05-01 Thread Ben Greenman
'(1 2 3) is short for (list 1 2 3)
which is short for (cons 1 (cons 2 (cons 3 null))
which is different from (mcons 1 (mcons 2 (mcons 3 null)))

I hope this helps


On Mon, May 1, 2017 at 1:03 PM,  wrote:

> I posted this question on stackoverflow but have not found an answer yet.
> https://stackoverflow.com/questions/43476080/self-
> evaluting-racket-interpreter
>
> I've been trying to write a Racket interpreter that can interpret itself.
>
> interpreter.rkt contains the code for the interpreter. It is pretty
> standard. Then, in interpreter-self-evaluate.rkt, I
> 1. import interpreter.rkt,
> 2. copy paste the code from interpreter.rkt and
> 3. evaluate the code using the eeval function defined in
> interpreter.rkt.
>
> However, this returns an error "; mcdr: contract violation". I suspect
> that the problem is in interpreter-self-evaluate.rkt and that it might have
> something to do with how quote works. I might be completely off base
> though. Any ideas?
>
> --
> 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] Self evaluating Racket Interpreter

2017-05-01 Thread circularballs
I posted this question on stackoverflow but have not found an answer yet. 
https://stackoverflow.com/questions/43476080/self-evaluting-racket-interpreter

I've been trying to write a Racket interpreter that can interpret itself. 

interpreter.rkt contains the code for the interpreter. It is pretty standard. 
Then, in interpreter-self-evaluate.rkt, I 
1. import interpreter.rkt, 
2. copy paste the code from interpreter.rkt and 
3. evaluate the code using the eeval function defined in interpreter.rkt.

However, this returns an error "; mcdr: contract violation". I suspect that the 
problem is in interpreter-self-evaluate.rkt and that it might have something to 
do with how quote works. I might be completely off base though. Any ideas?

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


interpreter.rkt
Description: Binary data


interpreter-self-evaluate.rkt
Description: Binary data


Re: [racket-users] OpenSSL vs. NaCl/libsodium

2017-05-01 Thread Tony Garnock-Jones
On 4/30/17 11:51 PM, James wrote:
> I think we want standard TLS.  I know enough about cryptography to
> know that I really don't want to roll my own.  So I guess OpenSSL is
> what we'll use but then, maybe, something else for local file
> cryptography and signing.  We might even use OpenPGP as a helper
> application.

TLS for data in motion plus PGP for data at rest sounds like a fine
choice. One very big win over NaCl/libsodium based solutions is that you
have a mature story for key and certificate management.

You might consider libressl instead of openssl: "LibreSSL is a version
of the TLS/crypto stack forked from OpenSSL in 2014, with goals of
modernizing the codebase, improving security, and applying best practice
development processes. Primary development occurs inside the OpenBSD
source tree with the usual care the project is known for."

Cheers,
  Tony

-- 
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] Final call for papers: Trends in Functional Programming, 19-21 june 2017, University of Kent, Canterbury

2017-05-01 Thread p.achten
-
  F I N A L   C A L L   F O R   P A P E R S
-

 TFP 2017 ===

  18th Symposium on Trends in Functional Programming
   19-21 June, 2017
 University of Kent, Canterbury
   https://www.cs.kent.ac.uk/events/tfp17/index.html

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 2017 will be the main event of a pair of functional programming
events. TFP 2017 will be accompanied by the International Workshop on
Trends in Functional Programming in Education (TFPIE), which will take
place on 22 June.

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;
   * Inria Sophia-Antipolis (France) in 2015;
   * and Maryland (USA) in 2016.
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 2017 program chairs, Scott Owens and Meng Wang.


== 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 which the authors state
that the paper is mainly the work of students, the students are listed
as first authors, and a student would present the paper. A prize for
the best student paper is awarded each year.

In both cases, it is the PC of TFP that awards the prize. In case the
best paper happens to be a student paper, that paper will then receive
both prizes.


== PAPER SUBMISSIONS ==

Acceptance of articles for presentation at the symposium is based on a
lightweight peer review process of extended abstracts (4 to 10 pages
in length) or full papers (20 pages). The submission must clearly
indicate which category it belongs to: research, position, project,

Re: [racket-users] Re: #lang languages and cyclic dependencies

2017-05-01 Thread Philip McGrath
I have often done it that way, too. In this case I decided to use a #lang
for a few reasons:

   - The values for some of the parameters are not readable.
   - In some cases I want to do a little bit of work to calculate the
   value. For instance, "production.rkt" reads in the values of some API keys
   from a file not tracked in the git repository.
   - I have more than just two different configurations, e.g. for local
   automated testing vs. interactive local use.
   - I have some colleagues working on other aspects of the project who
   have little to no Racket experience, but who may need to edit the
   configuration files. Especially with syntax-parse, making a small #lang
   gets some free IDE support and good, early error messages if e.g. they
   enter a string where there should have been a number. (Plus, it does show
   off how wonderful Racket is.)

The #lang essentially just redefines #%module-begin so that the module
defines and exports a function "config" (actually a struct with
prop:procedure) that calls a thunk with the intended parameterization.

Ultimately I actually found that writing a #lang was fairly comparable to
the amount of code I would have needed to get good error reporting with the
read-based option, so I'm pretty happy with it.

Philip


On Mon, May 1, 2017 at 2:59 AM, Alex Harsanyi 
wrote:

> Hi Philip,
>
> I don't have an answer to your problem, but I'm curious as to what do you
> store in "local.rkt" and "production.rkt" to justify such a complicated
> solution.
>
> In the projects that I worked on (Racket or otherwise), local vs
> production differ in the values for different parameters, which are just
> key => value mappings.  In Racket, I would just store these as association
> lists in "local.rktd" and "production.rktd" than in the code just to a:
>
> (define config-file (if (prodution?) "production.rktd" "local.rktd"))
> (define config (call-with-input-file config-file read))
>
> Than just use `assoc` to find the values for the parameters.
>
> Best Regards,
> Alex.
>
> On Monday, May 1, 2017 at 9:03:45 AM UTC+8, Philip McGrath wrote:
> > I'm working on a #lang for configuration files for a larger project I'm
> working on, and I'm trying to find a setup that meets my (largely cosmetic)
> goals without producing a "standard-module-name-resolver: cycle in
> loading" error.
> >
> >
> > Given the following directory structure:
> > my-project/config.rktconfig/local.rktproduction.rkt
> > I would like both to write "local.rkt" and "production.rkt" in "#lang
> my-project/config" and to have "(require my-project/config)" provide
> bindings re-exported from "local.rkt" and "production.rkt" and some extra
> bindings for working with those values.
> >
> >
> > This seems like it should be doable, because there aren't any logical
> cyclic dependencies, but I haven't found a way to convince Racket of that.
> >
> >
> > I initially tried making a "my-project/config/lang/" directory with a
> "module-lang.rkt" and a "reader.rkt" consisting of "(module reader
> syntax/module-reader my-project/config/lang/module-language)", then
> having "config.rkt" require and re-export "local.rkt", "production.rkt",
> and the appropriate exports of "module-lang.rkt", but this gave me a "cycle
> in loading" error.
> >
> >
> > My first guess was that the problem might be that Racket was looking for
> a reader submodule of "config.rkt", so I re-wrote "module-lang.rkt" and
> "reader.rkt" as submodules of "config.rkt" (with "module", not "module*" or
> "module+"), but this didn't solve the problem.
> >
> >
> > Is there a way to do what I want?
> >
> >
> > -Philip
>
> --
> 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] Re: #lang languages and cyclic dependencies

2017-05-01 Thread Alex Harsanyi
Hi Philip,

I don't have an answer to your problem, but I'm curious as to what do you store 
in "local.rkt" and "production.rkt" to justify such a complicated solution.

In the projects that I worked on (Racket or otherwise), local vs production 
differ in the values for different parameters, which are just key => value 
mappings.  In Racket, I would just store these as association lists in 
"local.rktd" and "production.rktd" than in the code just to a:

(define config-file (if (prodution?) "production.rktd" "local.rktd"))
(define config (call-with-input-file config-file read))

Than just use `assoc` to find the values for the parameters.

Best Regards,
Alex.

On Monday, May 1, 2017 at 9:03:45 AM UTC+8, Philip McGrath wrote:
> I'm working on a #lang for configuration files for a larger project I'm 
> working on, and I'm trying to find a setup that meets my (largely cosmetic) 
> goals without producing a "standard-module-name-resolver: cycle in loading" 
> error.
> 
> 
> Given the following directory structure:
> my-project/config.rktconfig/local.rktproduction.rkt
> I would like both to write "local.rkt" and "production.rkt" in "#lang 
> my-project/config" and to have "(require my-project/config)" provide bindings 
> re-exported from "local.rkt" and "production.rkt" and some extra bindings for 
> working with those values.
> 
> 
> This seems like it should be doable, because there aren't any logical cyclic 
> dependencies, but I haven't found a way to convince Racket of that. 
> 
> 
> I initially tried making a "my-project/config/lang/" directory with a 
> "module-lang.rkt" and a "reader.rkt" consisting of "(module reader 
> syntax/module-reader my-project/config/lang/module-language)", then having 
> "config.rkt" require and re-export "local.rkt", "production.rkt", and the 
> appropriate exports of "module-lang.rkt", but this gave me a "cycle in 
> loading" error.
> 
> 
> My first guess was that the problem might be that Racket was looking for a 
> reader submodule of "config.rkt", so I re-wrote "module-lang.rkt" and 
> "reader.rkt" as submodules of "config.rkt" (with "module", not "module*" or 
> "module+"), but this didn't solve the problem.
> 
> 
> Is there a way to do what I want? 
> 
> 
> -Philip

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