Re: [racket-users] Mysterious issue with pict/code

2019-10-05 Thread Matthew Flatt
Thanks for the report and simplification! I've pushed a repair.

At Sat, 5 Oct 2019 15:33:31 -0400, Sam Tobin-Hochstadt wrote:
> This definitely seems like a bug. Here's a smaller program that shows it:
> 
> #lang racket
> (begin-for-syntax
>   (dynamic-require 'pict/code #f))
> 
> Sam
> 
> On Sat, Oct 5, 2019 at 12:56 PM Stephen Foster  
> wrote:
> >
> > I spent a few hours tracking down a mysterious bug.  Although I've fixed 
> > it, 
> I still don't understand it. I would appreciate some insight from those who 
> understand these things better.
> >
> > Here's the simple reproduction:
> >
> > main.rkt:
> >
> > #lang racket
> >
> > (define-syntax (test stx)
> >
> >   (dynamic-require "./other.rkt" #f)
> >
> >   #'(displayln "HI"))
> >
> > ;This is fine
> > (dynamic-require "./other.rkt" #f)
> >
> > ;This triggers the error
> > (test)
> >
> >
> > And other.rkt is simply:
> >
> > #lang racket
> >
> > (require pict/code)
> >
> > The error when running main.rkt is:
> >
> > no module instance found: # v7.4/collects/racket/private/list.rkt"> 0
> >
> >
> >   context...:
> >
> >
> >namespace->module-namespace82
> >
> >
> >copy-namespace-value
> >
> >
> >temp250
> >
> >
> >for-loop
> >
> >
> >[repeats 1 more time]
> >
> >
> >perform-require!78
> >
> >
> >/Applications/Racket 
> v7.4/share/pkgs/compatibility-lib/mzscheme/private/old-procs.rkt:47:4: 
> make-namespace
> >
> >
> >.../racket/unit.rkt:996:20
> >
> >
> >"/Applications/Racket v7.4/share/pkgs/pict-lib/pict/code.rkt": [running 
> body]
> >
> >
> >temp37_0
> >
> >
> >for-loop
> >
> >
> >run-module-instance!125
> >
> >
> >for-loop
> >
> >
> >[repeats 1 more time]
> >
> >
> >run-module-instance!125
> >
> >
> >apply-transformer-in-context
> >
> >
> >...
> >
> >
> >
> >
> > It would appear that the dynamic-require of a module that requires 
> > pict/code 
> fails inside a macro, but not otherwise.  What's up with that?
> >
> > --Stephen
> >
> >
> >
> >
> > --
> > 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.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/7acffe39-c491-4da6-b00b-2450e41f
> 5008%40googlegroups.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYGMeCVCO_h_NXErf1LQWz
> NWxmBXWTQNt%3DUt2iyyVv5Yw%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5d994668.1c69fb81.28e90.27b3SMTPIN_ADDED_MISSING%40gmr-mx.google.com.


[racket-users] Package server broken, at least five hundred intro cs students affected!

2019-10-05 Thread gfb
Could we figure out:

1. What's wrong with the package server's indexing of updated packages, so 
my students can proceed.
2. An official channel to report problems with the package server.
3. If funding specifically earmarked to support monitoring of and feedback 
from that channel, fixing of issues, and general reliability work, would 
help, because I would be happy to contribute some of my professional 
development funds to that.

Thanks,
 Gary Baumgartner

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/fa5fc7b1-db94-4de9-af43-85908424%40googlegroups.com.


Re: [racket-users] Mysterious issue with pict/code

2019-10-05 Thread Sam Tobin-Hochstadt
This definitely seems like a bug. Here's a smaller program that shows it:

#lang racket
(begin-for-syntax
  (dynamic-require 'pict/code #f))

Sam

On Sat, Oct 5, 2019 at 12:56 PM Stephen Foster  wrote:
>
> I spent a few hours tracking down a mysterious bug.  Although I've fixed it, 
> I still don't understand it. I would appreciate some insight from those who 
> understand these things better.
>
> Here's the simple reproduction:
>
> main.rkt:
>
> #lang racket
>
> (define-syntax (test stx)
>
>   (dynamic-require "./other.rkt" #f)
>
>   #'(displayln "HI"))
>
> ;This is fine
> (dynamic-require "./other.rkt" #f)
>
> ;This triggers the error
> (test)
>
>
> And other.rkt is simply:
>
> #lang racket
>
> (require pict/code)
>
> The error when running main.rkt is:
>
> no module instance found: # v7.4/collects/racket/private/list.rkt"> 0
>
>
>   context...:
>
>
>namespace->module-namespace82
>
>
>copy-namespace-value
>
>
>temp250
>
>
>for-loop
>
>
>[repeats 1 more time]
>
>
>perform-require!78
>
>
>/Applications/Racket 
> v7.4/share/pkgs/compatibility-lib/mzscheme/private/old-procs.rkt:47:4: 
> make-namespace
>
>
>.../racket/unit.rkt:996:20
>
>
>"/Applications/Racket v7.4/share/pkgs/pict-lib/pict/code.rkt": [running 
> body]
>
>
>temp37_0
>
>
>for-loop
>
>
>run-module-instance!125
>
>
>for-loop
>
>
>[repeats 1 more time]
>
>
>run-module-instance!125
>
>
>apply-transformer-in-context
>
>
>...
>
>
>
>
> It would appear that the dynamic-require of a module that requires pict/code 
> fails inside a macro, but not otherwise.  What's up with that?
>
> --Stephen
>
>
>
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/7acffe39-c491-4da6-b00b-2450e41f5008%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYGMeCVCO_h_NXErf1LQWzNWxmBXWTQNt%3DUt2iyyVv5Yw%40mail.gmail.com.


[racket-users] Mysterious issue with pict/code

2019-10-05 Thread Stephen Foster
I spent a few hours tracking down a mysterious bug.  Although I've fixed 
it, I still don't understand it. I would appreciate some insight from those 
who understand these things better.

Here's the simple reproduction:

*main.rkt*:

#lang racket 

(define-syntax (test stx) 

  (dynamic-require "./other.rkt" #f) 

  #'(displayln "HI")) 

;This is fine
(dynamic-require "./other.rkt" #f) 

;This triggers the error
(test)


And *other.rkt *is simply*:*

#lang racket

(require pict/code)

The error when running *main.rkt* is:

no module instance found: # 0

  context...:

   namespace->module-namespace82

   copy-namespace-value

   temp250

   for-loop

   [repeats 1 more time]

   perform-require!78

   /Applications/Racket v7.4/share/pkgs/compatibility-lib/mzscheme/private/
old-procs.rkt:47:4: make-namespace

   .../racket/unit.rkt:996:20

   "/Applications/Racket v7.4/share/pkgs/pict-lib/pict/code.rkt": [running 
body]

   temp37_0

   for-loop

   run-module-instance!125

   for-loop

   [repeats 1 more time]

   run-module-instance!125

   apply-transformer-in-context

   ...



It would appear that the dynamic-require of a module that requires 
pict/code fails inside a macro, but not otherwise.  What's up with that?

--Stephen




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7acffe39-c491-4da6-b00b-2450e41f5008%40googlegroups.com.


Re: [racket-users] Some guidance in setting up Racket as a game scripting language.

2019-10-05 Thread Jens Axel Søgaard
Den ons. 2. okt. 2019 kl. 15.31 skrev Hans Sjunnesson <
hans.sjunnes...@gmail.com>:

> This is a hobby project of mine - a game in C, using SDL. I'd like to only
> use C for the rendering part - rather use a scripting language for all of
> the gameplay code. I want to try to use Racket for this - I've been doing
> enough Clojure that I'm familiar with a lisp. My first approach was to
> following along "Embedding into a Program" section of the Racket guide. But
> I'm running into road blocks - and I can't find any good examples of
> projects which embed Racket in a C program that calls functions in a Racket
> environment. My initial plan was to define a Racket module that provided an
> "init", an "update", and a "draw" function, then call those from the C
> program. The embedding guide points me to using "raco" to generate a C
> version of "racket/base", and that works - I can eval basic stuff, but I'm
> getting an error when I (require "test.rkt"). So I'm guessing there's more
> to be done with setting up the environment.
>

How do I compile the two test files?
In the reddit thread you said, I should start with:
raco ctool --c-mods base.c ++lib racket/base

But what are the options for gcc and the linker?

/Jens Axel

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABefVgzAAjXDc2871uc-VFrmLNGw%3DeJ3-w9QAj3frHXhvFrqCA%40mail.gmail.com.


[racket-users] Re: Some guidance in setting up Racket as a game scripting language.

2019-10-05 Thread Hans Sjunnesson
I get that it's probably not the best way of doing it, like I described it. But 
this is mostly a project of brushing up on C and more low level programming.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/201ac9f1-63c1-404a-80ca-123ac09be04b%40googlegroups.com.