[racket-users] Syntax-highlighting colors in slideshow/repl ?

2020-05-11 Thread Scott Moore
Hi all, Does anyone know of a way to set the colors for syntax highlighting in a slideshow/repl area? I tried using the `slideshow/code` / `pict/code` parameters but they don't effect slideshow/repl. I suspect I need to do whatever DrRacket does to the editor when you switch themes, but I can't

Re: [racket-users] Self evaluating Racket Interpreter

2017-05-01 Thread Scott Moore
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

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

Re: [racket-users] Re: Proper non-tail recursion?

2017-04-27 Thread Scott Moore
On the other hand, if I recall correctly SML has the same behavior as racket. I think the implementation uses a chain of "stacklets" that are heap allocated. On Apr 27, 2017, 8:07 PM -0400, Jon Zeppieri , wrote: > On Thu, Apr 27, 2017 at 8:05 PM, Hendrik Boom wrote: > > On Thu, Apr 27, 2017 at 0

Re: [racket-users] Setting parameters between files does not work as expected

2017-04-24 Thread Scott Moore
Parameters are thread local, and from reading the docs of virtual-connection and connection-pool, I think they create new threads to handle the connections. These threads are probably created before you parameterize, and thus see the original values. Try replacing the virtual-connection stuff w

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-14 Thread Scott Moore
Robby beat me to it. For a longer discussion, see Christos, Robby, Cormac and Matthias’ paper: http://www.ccs.neu.edu/racket/pubs/popl11-dfff.pdf on the difference between dependent (->d) and indy-dependent contracts (->i). A contrived example of why this is better is: (define/contract (foo x y)

Re: [racket-users] Contract on a parameter’s value as a function precondition?

2016-11-28 Thread Scott Moore
which I’m not sure that chaperone-procedure’s existing API would support. Would this require modification of procedure chaperones to support parameters directly, or is there some way to implement it separately? > On Nov 23, 2016, at 10:51 AM, Scott Moore wrote: > > Yes, we worke

Re: [racket-users] Contract on a parameter’s value as a function precondition?

2016-11-23 Thread Scott Moore
Yes, we worked with Matthew to implement the necessary hooks in procedure chaperones (see the 'mark options that were added to the return value of wrapper-proc). For the contracts we were writing, we ended up using these continuation marks directly. To implement what you're looking for, a lit

Re: [racket-users] Re: FUSE filesystem package

2016-10-12 Thread Scott Moore
4:53 PM, Scott Moore wrote: > On October 12, 2016 at 2:35:37 PM, Vincent St-Amour > (stamo...@eecs.northwestern.edu) wrote: > > On Wed, 12 Oct 2016 16:31:46 -0500, > Scott Moore wrote: >> >> PS: is the documentation for use-once/c somewhere? >>

Re: [racket-users] Re: FUSE filesystem package

2016-10-12 Thread Scott Moore
On October 12, 2016 at 2:35:37 PM, Vincent St-Amour (stamo...@eecs.northwestern.edu) wrote: On Wed, 12 Oct 2016 16:31:46 -0500,  Scott Moore wrote:  >  > PS: is the documentation for use-once/c somewhere?  >  > I’ll add it to the docs when I get a chance. You can see the defini

[racket-users] Re: FUSE filesystem package

2016-10-12 Thread Scott Moore
On October 12, 2016 at 12:15:38 PM, Dupéron Georges (jahvascriptman...@gmail.com) wrote: This is great! Thumbs up, and thanks for writing this library. I have a couple of filesystems in my "TODO" list, hopefully this package will motivate me to actually write them one of these days :) .  Awesome

[racket-users] FUSE filesystem package

2016-10-11 Thread Scott Moore
Hi all, I'm announcing a new package: fuse ( https://github.com/thinkmoore/racket-fuse). fuse is a racket library for implementing filesystems in userspace using the FUSE API available on many *nix platforms and OS X (currently, I've only tested using recent releases of FUSE on Linux). People ha

Re: [racket-users] dynamic-require

2016-03-20 Thread Scott Moore
If the definitions are saved as “test.rkt”, the following works:  #lang racket  (module a racket/base (displayln "hello"))  (dynamic-require '(submod "test.rkt" a) #f)  On March 16, 2016 at 12:13:46 PM, Jos Koot (jos.k...@gmail.com) wrote: Hi,   The following example of dynamic-require in the r

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

2016-03-10 Thread Scott Moore
Whoops left off the mailing list... On March 10, 2016 at 2:48:49 PM, Scott Moore (sdmo...@fas.harvard.edu) wrote: On March 10, 2016 at 2:41:53 PM, Leif Andersen (l...@leifandersen.net) wrote: On the other hand, I'm all down for making a `literal` or `exact`  scribble form that spits ou

Re: [racket-users] macro stepper

2016-02-11 Thread Scott Moore
Yes, around 80% of the time if I disable macro hiding, and sometimes even with macro hiding if I’m moving back and forth through a long sequence of steps. I had been meaning to file a report... On February 11, 2016 at 11:27:21 AM, Matthias Felleisen (matth...@ccs.neu.edu) wrote: ... has anyone

Re: [racket-users] Reliable equality testing of procedures

2015-11-04 Thread Scott Moore
One place where this can go wrong is with contracts. Contracts are implemented using chaperones and impersonators (depending on the particular contract) http://docs.racket-lang.org/reference/chaperones.html?q=chaperone#%28tech._chaperone%29. Because of how chaperones and impersonators work, a p

Re: [racket-users] let/define

2015-11-03 Thread Scott Moore
5])   (display y)   (define y 10)   y) On November 3, 2015 at 8:51:38 AM, Éric Tanter (etan...@dcc.uchile.cl) wrote: Thanks all! This is helpful — the mental model of begin that I presented to my students was too simple to account for defines. -- Éric On Nov 2, 2015, at 10:00 PM, Scott Moore

Re: [racket-users] Strange garbage collection behavior with closures

2015-10-21 Thread Scott Moore
hen you end up with a non-empty closure (i.e., allocated at run time) due to the reference to `box`, and so you get `#f` at the end as you expect. I don't know why PasteRack produces #f, but it must not hold onto the namespace. At Wed, 21 Oct 2015 21:07:52 -0400, Scott Moore wrote:

[racket-users] Strange garbage collection behavior with closures

2015-10-21 Thread Scott Moore
I’m trying to do something a bit fancy that makes use of weak-hashes, but I’ve run into strange behavior (things not being removed that I believe should be) when I use keys that are closures. Doing some of my own debugging, this doesn’t appear specific to weak hashes, but also to weak boxes. Her

Re: [racket-users] Capability security in Racket?

2015-08-19 Thread Scott Moore
Hi Sean, An alternative approach you might consider instead of relying heavily on sandboxes and namespaces is to define your own #lang where you can carefully control how different objects are allowed to communicate with each other. This approach could have two advantages: 1) you can use lighter-w

Re: [racket-users] Macro-introducing macros with inter-macro communication channel

2015-06-23 Thread Scott Moore
I ran into this issue recently. The right answer for me was to write a trampolining macro. define-values is treated specially by the macro expander and thus can't be handled easily in a local expand. The pattern I ended up using (adapted from an old mailing list post by Ryan and a discussion with M

[racket-users] Fully-expanding a define form in its definition context

2015-05-04 Thread Scott Moore
Hi, I'm trying to write a macro that fully-expands define forms with the goal of doing some static checking (and thus want the code in racket core so that I know what I'm looking at). Ideally, this macro would work in any context where a define form works. Unfortunately, I'm having a great deal of

Re: [racket] Unexpected results with impersonators and make-keyword-procedure

2015-03-09 Thread Scott Moore
ure is implemented > through an internal structure type that has `prop:impersonator-of`. > > Thanks for the report! > > At Fri, 6 Mar 2015 20:04:10 -0500, Scott Moore wrote: >> Hi, >> >> I've run into some strange behavior with the interaction between >> imp

[racket] Unexpected results with impersonators and make-keyword-procedure

2015-03-06 Thread Scott Moore
Hi, I've run into some strange behavior with the interaction between impersonators and make-keyword-procedure. I expect that when not invoked with keywords, the result of make-keyword-procedure and a lambda with the same form should be equivalent. Instead, they behave differently when impersonated

Re: [racket] [racket-users]Is Racklog suitable to learn Prolog? A simple example just fails.

2014-07-03 Thread Scott Moore
I'm not sure what behavior you were expecting for this program. Under standard prolog semantics (goal-directed) this program will yield infinitely many solutions, so this may not be a bug in racklog but rather in the program. That said, Matthias is probably right that using a currently maintained