Re: [racket] Read-syntax for an entire .rkt file

2015-02-19 Thread Spencer Florence
What you want is `with-module-reading-parameterization `: (with-module-reading-parameterization

Re: [racket] Considering backward-incompatible change to Plot

2015-03-17 Thread Spencer Florence
I've been using plot heavily for https://github.com/florence/convex-hulls, which pulls a bitmap% from the snip% to render it as a gif. As long at the Plot object can get me a bitmap% or its underlying vector, I would love the new interface. or maybe I should just be using `plot-pict`... On Tue, M

Re: [racket] Considering backward-incompatible change to Plot

2015-03-17 Thread Spencer Florence
like an awesome project. I could probably even use the convex > hull implementations in Pict3D. > > You could use `plot-bitmap` or `plot/dc` as well, FWIW. > > I'll count this as a +1, then. :) > > Neil ⊥ > > On 03/17/2015 01:51 PM, Spencer Florence wrote: > &

Re: [racket-users] PLT policy on Travis CI bandwidth costs

2015-04-02 Thread Spencer Florence
Greg's Travis CI repo has a branch for using Travises cache, so that each project would only download Racket once (per release). I don't know what its state is though? It seems like that would be idea if it works. https://github.com/greghendershott/travis-racket/tree/use-cache On Thu, Apr 2, 2015

Re: [racket-users] Capturing sets of options in a splicing syntax class?

2015-05-27 Thread Spencer Florence
try `syntax/parse/experimental/template`. It gives you access to `??', which basically says "use a if present, else b", and some other cool templates besides. From the docs: > (syntax-parse #'(m 1 2 3) [(_ (~optional (~seq #:op op:expr)) arg:expr ...) (template ((?? op +) arg ...))]) # > (syntax

[racket-users] Cover 2.0

2015-05-30 Thread Spencer Florence
Hi All, We're pleased to announce the release of Cover 2.0! Along with the various bug fixes, Cover now: * Is faster. * Is completely thread safe. * Has a new, easier to use, Racket API. This is to support integrating with IDE's and make new output formats easier to write. New contributors are

Re: [racket-users] Cover 2.0

2015-05-30 Thread Spencer Florence
Whoops, sorry! Knew we forgot something... Sorry about that! Cover is a multi-file code coverage tool, designed to work like `raco test`. On Sat, May 30, 2015 at 8:36 PM Hendrik Boom wrote: > On Sat, May 30, 2015 at 06:00:06PM +0000, Spencer Florence wrote: > > Hi All, > > >

Re: [racket-users] Iteration speed

2015-06-01 Thread Spencer Florence
There is a `#lang typed/racket/base/no-check` On Mon, Jun 1, 2015 at 9:34 PM John Carmack wrote: > Is there an option to parse all the type annotations, but not do any of > the checking? Highly interactive tuning sessions could work without type > checking, then turn it back on for structural wo

[racket-users] Macro introduce identifiers in the new expander

2015-07-20 Thread Spencer Florence
Hello, I'm trying to update some code to the new expander. The below code works on 6.2 but fails on the new expander with an unbound identifier error. #lang racket (require (for-syntax syntax/parse)) ;; a standard context for identifiers (define-for-syntax ctx #'ctx) ;; create an ID with the co

Re: [racket-users] Macro introduce identifiers in the new expander

2015-07-21 Thread Spencer Florence
; this doesn't > >> (let () > >> (def) > >> (use)) ; but there is a difference between (use) and id > >> > >> ;; and this doesn't either > >> (let () > >> (define id 5) > >> (use)) > >> > >>

[racket-users] Cover 3.0

2015-09-22 Thread Spencer Florence
Hi all, We're pleased to announce the release of Cover 3.0! Cover is an extensible multi-file code coverage tool for Racket. You can read more about it in our README at https://github.com/florence/cover . Breaking Changes: * The Coveralls format has been moved into its own package. Anyone usin

Re: [racket-users] Bug with errortrace and begin-for-syntax?

2015-10-10 Thread Spencer Florence
Yup, that looks like a bug. I've created a PR to fix it: https://github.com/racket/errortrace/pull/4 On Sat, Oct 10, 2015 at 8:51 AM Matthias Felleisen wrote: > > On Oct 10, 2015, at 12:06 AM, Alex Knauth wrote: > > #lang racket/base > (require (for-meta 0 racket/base) > (for-meta 1 rac

[racket-users] using a different "scribble.tex"

2016-01-06 Thread Spencer Florence
Hey all, I'm currently trying to use a custom tex style file with scribble. Unfortunately this style file conflicts with the line "\usepackage[usenames,dvipsnames]{color}" in the "scribble.tex" file include by the scribble to tex compiler. Is there any way to tell scribble to use a different "scr

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-10 Thread Spencer Florence
They way I've worked around this in the past is to render the problematic character as a Pict and then drop that Pict into the scribble document. Doing that has some problems but it can service if you can't get the character you want into scribble. On Thu, Mar 10, 2016, 9:19 AM Vincent St-Amour <

Re: [racket-users] project idea: drracket notebook mode

2018-12-27 Thread Spencer Florence
One exists: https://github.com/rmculpepper/iracket On Thu, Dec 27, 2018, 12:53 AM Andrew Gwozdziewycz It seems like the better bang for buck might be implementing a Jupyter > kernel, and leveraging that ecosystem. > > https://github.com/jupyter/jupyter/wiki/Jupyter-kernels > > On Dec 20, 2018, a

Re: [racket-users] using a different "scribble.tex"

2016-03-31 Thread Spencer Florence
> style file (i.e., replacement for "scribble-style.tex") end the comment > and drop in your replacement for "scribble.tex". > > At Wed, 06 Jan 2016 20:44:40 +, Spencer Florence wrote: > > Hey all, > > I'm currently trying to use a custom tex style file

Re: [racket-users] handin server error

2016-09-07 Thread Spencer Florence
This is a little bit of a hack and weakens the handin server security but adding the following to the top of your checker file should make this error go away: ``` (require handin-server/sandbox) (sandbox-path-permissions (cons (list 'read"/") (sandbox-path-permissions))) ``` --spen

[racket-users] Adding libraries to the student language search

2016-09-25 Thread Spencer Florence
When the current language is one of the student languages searching the documentation from DrRacket limits the search to a subset libraries installed. Is there any way to add a new library to this subset? --Spencer -- You received this message because you are subscribed to the Google Groups "Ra

Re: [racket-users] Why are hash and make-hash not symmetric?

2016-12-07 Thread Spencer Florence
For symmetry there is "make-immutable-hash", which is like "hash" but has the interface of "make-hash". (I don't know why "hash" is the way it is though). --spencer On Wed, Dec 7, 2016 at 10:49 AM David Storrs wrote: > -> (hash 'a 1 'b 2) > '#hash((a . 1) (b . 2)) > > -> (make-hash '((a . 1) (b

Re: [racket-users] RacketCon Code of Conduct

2017-06-18 Thread Spencer Florence
+1 more for a Code of Conduct On Sun, Jun 18, 2017 at 11:28 AM Matt Jadud wrote: > I'm with Claire 100%. > > I think the code of conduct proposed as a starting point is completely > reasonable. > > So, "+1." > > Cheers, > Matt > > On Sun, Jun 18, 2017 at 12:07 PM, claire alvis > wrote: > >> On

[racket-users] syntax-original? different in expanded code than during expansion

2017-09-20 Thread Spencer Florence
The program: ``` #lang racket (define-syntax (exp stx) (define a (local-expand (cadr (syntax->list stx)) 'expression '())) (define one (cadr (syntax->list a))) (displayln (list one (syntax-original? one))) a) (exp 1) ``` prints `(# #f)`. However if I open the macro stepper in and step

[racket] Package fails to compile during 'make in-place' but not 'raco pkg install'

2013-12-20 Thread Spencer Florence
When I attempt to run a 'make in-place' on the head of the racket repo with the package 'opengl' installed, the make fails with this error: raco setup: found undeclared dependency: raco setup: mode: run raco setup: for package: "opengl" raco setup: on package: "srfi-lite-lib" raco setup: d

[racket] Getting an expression to type

2014-01-26 Thread Spencer Florence
I'm having difficulty getting the following code to type: #lang typed/racket (: test : ((U Number (Parameterof Number)) -> Number)) (define (test p) (if (not (parameter? p)) p (p))) But I get the error: > Type Checker: Expected Number, but got (U Complex (Parameterof Number)) in: p

Re: [racket] Getting an expression to type

2014-01-26 Thread Spencer Florence
ely a bug, not sure exactly what is going wrong though. > Can you file a bug for this? > > In terms of getting your program to run, if you replace '(not > (parameter? p))' with 'number?' it should work. > > On Sun, Jan 26, 2014 at 10:08 AM, Spencer Florence >

[racket] typed/racket and contract boundaries

2014-01-27 Thread Spencer Florence
I have a typed module being required by a normal #lang racket module. When I call a function from the typed module I get this error: default-blame-format: contract violation expected: a blame object with a non-#f positive field given: # Can someone give me some insight into what is going on

Re: [racket] Using big-bang with picts

2014-02-17 Thread Spencer Florence
I've run into this before. The way we solved it was to rotate bitmaps my 0 degrees: Its silly, but it works. So (define (world->image p) (rotate (pict->bitmap p)) On Mon, Feb 17, 2014 at 2:38 PM, Robby Findler wrote: > This does look like a bug in 2htdp/universe, tho. > > Looking at the univ

[racket] call/comp, eq? and call-with-continuation-prompt

2014-03-10 Thread Spencer Florence
For some reason the below program returns false: #lang racket (define g #f) (define p (make-continuation-prompt-tag)) (define (t) (let ([a (cons 1 2)]) (call-with-composable-continuation (λ (k) (set! g k)) p) a)) (call-with-continuation-prompt t p) (eq? (call-with-continuation-prompt g p

Re: [racket] call/comp, eq? and call-with-continuation-prompt

2014-03-10 Thread Spencer Florence
; Baffled, too. > > > On Mar 10, 2014, at 9:44 PM, Spencer Florence wrote: > > > For some reason the below program returns false: > > > > #lang racket > > (define g #f) > > (define p (make-continuation-prompt-tag)) > > (define (t) > > (let ([a (con

Re: [racket] call/comp, eq? and call-with-continuation-prompt

2014-03-10 Thread Spencer florence
d capture a continuation. > At Mon, 10 Mar 2014 21:44:19 -0400, Spencer Florence wrote: >> For some reason the below program returns false: >> >> #lang racket >> (define g #f) >> (define p (make-continuation-prompt-tag)) >> (define (t) >> (let ([a (c

[racket] instantiating multiple sandboxes with gui's

2014-03-23 Thread Spencer Florence
I'm attempting to launch multiple evaluators which require `racket/gui`, however I get the error: cannot instantiate `racket/gui/base` a second time in the same process Is `racket/gui/base` maintaining some kind of state thats escaping the sandbox? Example of the problem: #lang racket/base

[racket] substring without the copy

2014-04-03 Thread Spencer Florence
Is there any way to perform `substring` without creating a new string? I'm working with lots of very large and (for all intents and purposes) immutable strings and would like to avoid the extra allocations and copy time. --Spencer Racket Users list: http://lists.racket-lan

Re: [racket] substring without the copy

2014-04-04 Thread Spencer florence
tract that should be generated by requiring substring/shared is string?. On Fri, Apr 4, 2014 at 4:12 PM, John Clements wrote: > On Apr 3, 2014, at 7:08 PM, Spencer Florence wrote: >> Is there any way to perform `substring` without creating a new string? I'm >> working wi

Re: [racket] instantiating multiple sandboxes with gui's

2014-04-05 Thread Spencer Florence
In xrepl that program catches breaks as well, so that behavior is probably fine and unavoidable. Although somehow drracket's repl managed to break out of that program. I wonder how it does that... On Sat, Apr 5, 2014 at 3:00 PM, Sam Tobin-Hochstadt wrote: > What if you do this: > > (let l (

Re: [racket] instantiating multiple sandboxes with gui's

2014-04-06 Thread Spencer florence
How does this handle dynamic and lazy requires? On Sun, Apr 6, 2014 at 11:30 AM, Greg Hendershott wrote: > For those following along at home, I just pushed to `experimental` > branch an updated strategy: > https://github.com/greghendershott/racket-mode/commit/0358c0248a062245c134c48053aed79298a7

Re: [racket] instantiating multiple sandboxes with gui's

2014-04-06 Thread Spencer florence
Annother option is for ,run to spin up a place, and then have the emacs repl pass commands over the channel. That should allow GUI to be instantiated as much as one wants. Im not sure how passing a "C-c" over to the place would work however. C-c could just kill the place, but that would come at

Re: [racket] Callback on shutdown

2014-05-04 Thread Spencer Florence
Would something like dynamic-wind work for you? http://docs.racket-lang.org/reference/cont.html?q=dynamic-wind#%28def._%28%28quote._~23~25kernel%29._dynamic-wind%29%29 On Sun, May 4, 2014 at 2:29 PM, Tony Garnock-Jones wrote: > Hi all, > > I'm looking for an atexit()-like facility for Racket. >

Re: [racket] Blog post about Racket

2014-05-13 Thread Spencer Florence
> - machine learning I know Dan King did a bit with machine learning in Racket a while ago, but I have no clue what state its in: https://github.com/danking/racket-ml On Tue, May 13, 2014 at 10:35 AM, Konrad Hinsen wrote: > Stephen Chang writes: > > > > That said, it's interesting to look at

[racket] Strange error from syntax/parse (?)

2014-05-14 Thread Spencer Florence
Hey all, I'm getting an odd error from syntax/parse (I think, it might be racket/match), and I've having trouble tracking down the cause, since the error isn't giving me a source location. The error is: /racket/match/define-forms.rkt: ?: expected a clause with a pattern and a result at: ()

[racket] Strange macro behavior with set! and syntax-local-introduce

2014-05-15 Thread Spencer Florence
I'm attempting to write a macro which introduces a new id, then another macro that set!s that id. Example: #lang racket (require (for-syntax syntax/parse racket/syntax)) (define-for-syntax funny #f) (define-syntax (make-funny-set! stx) (syntax-parse stx [(_ v) (define unmarked (generate

Re: [racket] Strange macro behavior with set! and syntax-local-introduce

2014-05-15 Thread Spencer Florence
ntax-parse stx > [(_ v) #`(set! #,funny v)])) > > (make-funny-set! 2) > (void (void (void (funny-set! 3 > (funny-ref) > > [I had to write such a macro a while back, and the above is roughly what I > remember doing. Note the lexical context] > > > On May 15,

Re: [racket] Strange macro behavior with set! and syntax-local-introduce

2014-05-15 Thread Spencer Florence
t! stx) > >> (syntax-parse stx > >>[(_ v) #`(set! #,funny v)])) > >> > >> (make-funny-set! 2) > >> (void (void (void (funny-set! 3 > >> (funny-ref) > >> > >> [I had to write such a macro a while back, and the above is roughly >

[racket] Determining type from a syntax object

2014-06-14 Thread Spencer Florence
Hey All, I'm trying to take advantage of typed/racket in a few macros. Is there any way to check the type of an expression from its syntax object? something like: (:has-type? (-> Void) #'expression) --Spencer Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Determining type from a syntax object

2014-06-14 Thread Spencer Florence
ession? Or do you need > to make decisions at compile time based on whether or not the types > worked? > > Robby > > On Sat, Jun 14, 2014 at 2:04 PM, Matthias Felleisen > wrote: > > > > No, TR expands first, then checks. -- Matthias > > > > >

Re: [racket] Determining type from a syntax object

2014-06-17 Thread Spencer Florence
It would be useful in the case of designing macros. The macro could make decisions based not only on syntax but on type. Although to be honest (and to answer Robby's earlier question) I came across this while avoiding a longer but better way to design my program. --Spencer On Mon, Jun 16, 2014

[racket] syntax-case and multiple ellipsis

2014-06-17 Thread Spencer Florence
Hey all, I'm trying to write a macro with syntax-case that looks something like this: (syntax-case stx (in def) [(_ name (def a ...) ... (in clause do ...) ...) stuff]) But, this gives me the error "syntax-case: misplaced ellipsis in pattern (follows other ellipsis)" on

Re: [racket] syntax-case and multiple ellipsis

2014-06-17 Thread Spencer Florence
syntax-parse #'(a a a a 41 42 43) > [(c:id ... d ...) > #''((c ...) (d ...))]) > > > /Jens Axel > > > > > 2014-06-17 19:46 GMT+02:00 Spencer Florence : > > Hey all, > > > > I'm trying to write a macro with syntax-case that looks something

Re: [racket] syntax-case and multiple ellipsis

2014-06-17 Thread Spencer Florence
2 3) (in 4 5 6)) > > On Tue, Jun 17, 2014 at 2:08 PM, Spencer Florence > wrote: > > Unfortunately I'm working in typed racket, which (as far as I can tell) > > doesn't play nice with syntax-parse. Any other ideas? > > > > > > On Tue, Jun 17, 2014 at 1

[racket] define-type on List and Listof

2014-06-17 Thread Spencer Florence
Hi all, I'm trying to rename some types in typed/racket but something odd is happening: (define-type A Listof) works but: (define-type B List) errors with "Type Checker: parse error in type; type name `List' is unbound in: List" Is this a bug or am I missing something? --Spencer

Re: [racket] lazy letrec-values

2014-07-10 Thread Spencer Florence
It looks like he has taken those down. But I'm sure he would email a copy if asked (the think is http://pl.barzilay.org/resources.html#classnotes btw) On Thu, Jul 10, 2014 at 8:42 PM, Matthias Felleisen wrote: > > There are also Eli's class notes. I don't have a URL handy but I am sure > if you

[racket] DrRacket, OSX, and xattr

2014-07-24 Thread Spencer Florence
Hi all, Whenever I save a file with DrRacket on OSX, it always sets some extended attributes on the file. Specifically it sets: [snips:pl7/examples] xattr -l somefile.rkt com.apple.FinderInfo: 54 45 58 54 44 72 53 63 00 00 00 00 00 00 00 00 |TEXTDrSc| 0010 00 00 00 00 00 0

Re: [racket] DrRacket, OSX, and xattr

2014-07-24 Thread Spencer florence
r. > I don't know if it's due to xattr being altered by something in the > background, but it does seem to happen a lot. > --- > Justin Slepak > PhD student, Computer Science dept. > - Original Message - > From: Spencer Florence > To: racket > Sent: T

Re: [racket] DrRacket, OSX, and xattr

2014-07-24 Thread Spencer Florence
licks on the file will open the file in DrRacket. > > This was the recommended behavior back in the day before you could > associate extensions with applications (I think). > > Why do you want to disable it? > > Robby > > On Thu, Jul 24, 2014 at 3:43 PM, Spencer Florence

Re: [racket] DrRacket, OSX, and xattr

2014-07-24 Thread Spencer Florence
nds)) > (sleep 2) > (list (file-or-directory-modify-seconds fn) (current-seconds)) > (file-creator-and-type fn #"DrSc" type) > (list (file-or-directory-modify-seconds fn) (current-seconds)) > > > > On Thu, Jul 24, 2014 at 6:45 PM, Spencer Florence > wrote:

[racket] Shared and structs with #:auto

2014-07-29 Thread Spencer Florence
Hi all, I'm trying to use shared with a structure that has a field with #:auto If I have some structure like this: (struct test ([a #:auto]) #:transparent #:mutable) this works fine: (shared ([b (test)]) b) but this errors: (shared ([b (test 1)]) b) with "shared: wrong argument count for

Re: [racket] Shared and structs with #:auto

2014-07-29 Thread Spencer Florence
---- Original Message - > From: "Spencer Florence" > To: "racket" > Sent: Tuesday, July 29, 2014 5:32:46 PM GMT -05:00 US/Canada Eastern > Subject: [racket] Shared and structs with #:auto > > > > Hi all, > > I'm trying to use shared with a structur

Re: [racket] confusing error message: what is "lang:read.1"?

2014-08-06 Thread Spencer Florence
"lang:read.1" looks a some name generated by "syntax-local-lift-expression" or "generate-temporaries". IIRC the ".1" is how the printer handles showing identifiers that may have the same symbol, but different scope. so: #lang racket (define-syntax (example stx) (syntax-case stx () [(_)

[racket] Macro Stepper with custom languages

2014-08-21 Thread Spencer florence
Hi all, I’m currently making a custom language in racket. For some reason DrRacket does not give me a macro stepper button with my language, although it does for other custom languages like ‘#lang honu’ or ‘#lang datalog’ do get the macro stepper. What do I need to do to convince DrRacket to

Re: [racket] Provide transformers

2014-09-21 Thread Spencer florence
I think the way i have seen this done is to use a macro at the top level instead of a provide transformer. for example define/provide-test-suite from rackunit probably works a little like (define/provide-test-suite tests blah blah …) => (begin     (provide tests)    (define tests

Re: [racket] typed racket and generic interfaces, is there a workaround using properties?

2014-09-26 Thread Spencer florence
I don’t think you can. You would need define the struct in an untyped module then require it via require/typed. This is why dict’s don’t work in typed/racket either. On Sat, May 24, 2014 at 9:39 PM, Alexander D. Knauth wrote: > Do generic interfaces work using structure type properties, and if

Re: [racket] typed racket, filters, and polymorphism

2014-09-28 Thread Spencer florence
would something like this work? #lang typed/racket (struct (U) number+unit ([amount : Real] [unit : U])) (define-type Weight-Unit (U 'kg 'g 'mg 'μg)) (define-type Weight (number+unit Weight-Unit)) (define-predicate weight? Weight) (: make-weight : Real Weight-Unit -> Weight) (de

Re: [racket] Understanding contracts

2014-10-01 Thread Spencer florence
Where are you calling `cubic-bezier` from? If its from the REPL, the module itself, or a submodule the function won’t have a contract attached. Only code outside `cubic-bezier`s module will have the version of `cubic-bezier` with a contract attached. On Wed, Oct 1, 2014 at 9:46 PM, Alexander Mc

Re: [racket] place-image winking effect with low y coord

2014-10-06 Thread Spencer florence
huh, I’m unable to reproduce this as well. Brian, if you use the `record?` clause in big-bang do you see the same behavior in the generated gif? [ add (record? "/tmp”) to the big-bang expression, similar to what Matthias did in his example ] Also do you see the same behavior if you change

[racket] Macros that use local-require (hygiene issues?)

2014-11-06 Thread Spencer Florence
Hi All, I've been struggling to have a macro be given a path then require something from that path. The following code produces and "Unbound Identifier" error, although I would expect it to evaluate to 1. Could someone provide insight into what is going on? #lang racket/load ;;provider (module T

Re: [racket] Macros that use local-require (hygiene issues?)

2014-11-06 Thread Spencer Florence
x/parse)) (define-syntax (test-binding stx) (syntax-parse stx [(_ path) #'(begin (require path) a)]))) ;; go (mod) On Thu Nov 06 2014 at 3:09:28 PM Spencer Florence wrote: > Hi All, > > I've been struggling to have a macro be given a path then require

Re: [racket] Macros that use local-require (hygiene issues?)

2014-11-06 Thread Spencer Florence
parse)) > (define-syntax (test-binding stx) > (syntax-parse stx > [(_ path) >#'(let () (local-require (only-in path [a a])) a)])) > (test-binding 'T)) > ;; go > (require ‘R) > > > On Nov 6, 2014, at 4:09 PM, Spencer Florence wrote: >

Re: [racket] Macros that use local-require (hygiene issues?)

2014-11-06 Thread Spencer Florence
ased? Hygiene? Marks? Dye packets? > > Jay > > On Thu, Nov 6, 2014 at 4:36 PM, Spencer Florence > wrote: > > Thanks! That fixed it! > > > > Although I'm still curious as to why the error happens in the first > place. > > > > On Thu Nov 06 2014 at 3

[racket] multipart http requests

2014-12-30 Thread Spencer Florence
Does anyone know of a racket library that does multipart posts? Neither the net/http-client nor net/url libraries seem to have an abstraction for this built in. --spencer Racket Users list: http://lists.racket-lang.org/users

Re: [racket] multipart http requests

2014-12-30 Thread Spencer Florence
Unfortunately what I'm looking something to handle automatically sending http post's of the type multipart/form-data. On Tue Dec 30 2014 at 12:31:11 PM Tony Garnock-Jones wrote: > On 12/30/2014 10:22 AM, Spencer Florence wrote: > > Does anyone know of a racket library that d

[racket] Understanding local-expand with definition contexts

2015-01-05 Thread Spencer Florence
Hey all, I'm trying to use 'local-expand', however it seems to think its never in a definition context. For example: (require (for-syntax syntax/parse)) (define-syntax (test stx) (syntax-parse stx [(_ e) (define ctx (if (list? (syntax-local-context)) (cons (gensym) (s

Re: [racket] Understanding local-expand with definition contexts

2015-01-05 Thread Spencer Florence
d and handled explicitly, with > tools like `syntax-local-bind-syntaxes` or re-writing to > `letrec-values`, as appropriate for the definition context. > > At Mon, 05 Jan 2015 14:49:03 +, Spencer Florence wrote: > > Hey all, > > > > I'm trying to use 'local

Re: [racket] Understanding local-expand with definition contexts

2015-01-05 Thread Spencer Florence
t () (define x 1)) >x) > > In other words, the final `x` really is out of the scope of the > definition of `x`. > > At Mon, 05 Jan 2015 16:26:30 +, Spencer Florence wrote: > > Progress is a new error! I don't think I understand how > > syntax-local-bind-sy

Re: [racket] Understanding local-expand with definition contexts

2015-01-05 Thread Spencer Florence
how `test` is meant to differ from `begin`. Or > maybe you can say why it doesn't work to add the internal-definition > context to the bindings listed in `exports` (i.e., to bring everything > into the definition context). > > At Mon, 05 Jan 2015 16:44:10 +, Spencer Flore

Re: [racket] Understanding local-expand with definition contexts

2015-01-05 Thread Spencer Florence
Awesome! Thanks, that works for what I'm doing. On Mon Jan 05 2015 at 2:47:43 PM Matthew Flatt wrote: > That turns out to be tricky. I've enclosed an implementation, but it > works only for units that have no imports. > > At Mon, 05 Jan 2015 17:21:37 +, Spencer Floren

[racket] Documentation not building on the pkg.racket-lang.org

2015-01-06 Thread Spencer Florence
Hey Y'all, I'm trying to get the documentation for one of my packages (named cover) to appear on pkg.racket-lang.org. Currently the webpage shows the documentation as crossed out. I suspect this is because the old documentation file was renamed (when I did this I had to reinstall the package loca

Re: [racket] show-requires isn't submodule-aware?

2015-01-08 Thread Spencer Florence
Something else odd I see with show-requires. If its called directly on a submodule it errors: -> (show-requires '(submod (file "submod.rkt") test)) ; result arity mismatch; ; expected number of values not received ; expected: 1 ; received: 2 ; values...: \Sz�configure-runti...figure-runtime

[racket] What is `Apparent Identifier Binding`?

2015-01-15 Thread Spencer Florence
Hey All, I'm trying to understand why two identifiers I have don't reference the same value. If I look at them in the macro stepper all of their properties and marks are the same, with the exception of "Apparent identifier binding". One has "lexical (all phases)" and the other "none". What is "App

Re: [racket] read-syntax for an entire .rkt file

2015-02-18 Thread Spencer Florence
There is also a `with-module-reading-parameterization` that sets up the reader to do this. On Wed, Feb 18, 2015, 10:36 PM Sam Tobin-Hochstadt wrote: > On Wed, Feb 18, 2015 at 10:22 PM, Thomas Gilray > wrote: > > Hi everyone, > > > > I am trying to figure out how to use read-syntax on a port for

[racket] make-evaluator and (old style) planet packages

2013-09-26 Thread Spencer florence
How can I use make-evaluator with a planet package as a language? If I were to do (make-evaluator '(planet dyoo/bf:1:8/language)) I get the error "#%require: not at top-level or in module body in: (#%require (planet dyoo/bf:1:8/language))" Thoughts? --S

Re: [racket] make-evaluator and (old style) planet packages

2013-09-26 Thread Spencer florence
evaluators are not the way to go? --Spencer On Thu, Sep 26, 2013 at 10:11 PM, Eli Barzilay wrote: > 40 minutes ago, Spencer florence wrote: > > How can I use make-evaluator with a planet package as a language? > > > > If I were to do (make-evaluator '(planet dyoo/bf:1:

Re: [racket-users] Re: typo in manual

2019-11-25 Thread Spencer Florence
Not the first typo this library has had... I've pushed a repair, thanks for the report! --spf On Fri, Nov 22, 2019 at 11:47 AM 'Joel Dueck' via Racket Users < racket-users@googlegroups.com> wrote: > Documentation for individual packages is maintained by the package authors. > > Clicking on the

Re: [racket-users] pict polygons

2019-12-17 Thread Spencer Florence
2htdp/image works with pict directly (they are pict-convertible?, and all pict functions accept those). If that does work for whatever reason, it shouldnt be terrible to write that function using ‘dc’ and ‘dc-path%’, and it would make a great PR to ‘pict’! —spencer On Tue, Dec 17, 2019 at 8:15 A

Re: [racket-users] cover package?

2020-02-26 Thread Spencer Florence
Moral of this story: the pkg-build server configuration can have bugs in it. Therefore, if you don't test it, it will have bugs in it --spencer On Wed, Feb 26, 2020 at 3:28 PM Stephen Foster wrote: > On further investigation, cover just seems to be broken, older versions > install without error

Re: [racket-users] Re: ask a pict its colour?

2020-04-20 Thread Spencer Florence
You could use pict/convert to make a wrapper that remembers the color: ``` #lang racket (require pict pict/convert) (struct pict+color (pict color) #:property prop:pict-convertible (lambda (x) (pict+color-pict x))) (define (my-colorize p c) (pict+color (colorize p c) c)) (define (get