Re: [racket-users] Re: scribble: referencing two identifiers with the same name?

2021-05-03 Thread Sam Caldwell
Ah, I meant what happens when I open up my scribble file in DrRacket and press the "Scribble HTML" button. Maybe it would be more accurate to describe that as a plugin than DrRacket itself? -Sam Caldwell On Mon, May 3, 2021 at 11:24 AM Robby Findler wrote: > On Mon, May 3, 2021 at

Re: [racket-users] Re: scribble: referencing two identifiers with the same name?

2021-05-03 Thread Sam Caldwell
ion I need to do something like the Typed Racket example. -Sam Caldwell [1] https://docs.racket-lang.org/scribble/running.html?q=scribble#%28part._xref-flags%29 On Sat, May 1, 2021 at 2:00 PM Ryan Kramer wrote: > Using the prefix should still link correctly. When I run the following > p

[racket-users] scribble: referencing two identifiers with the same name?

2021-04-30 Thread Sam Caldwell
docs were written)? It also looks like this pattern could be captured by a macro---has someone written that already? Thanks, Sam Caldwell -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop recei

Re: [racket-users] Help implementing an early return macro

2020-10-28 Thread Sam Caldwell
y to remove and the basic ideas apply. I didn't include splicing begins in the post, but it's comparatively straightforward and in the actual implementation [2]. -Sam Caldwell [1] http://prl.ccs.neu.edu/blog/2018/10/22/defining-local-bindings-in-turnstile-languages/ [2] http

Re: [racket-users] Typed Syndicate Status

2020-03-10 Thread Sam Caldwell
7;s about time I integrated typed syndicate into the master branch so you shouldn't need to fiddle with those. I'm generally happy to answer any question you may have about typed or untyped Syndicate, no matter how small, and look into any issue that needs to be addressed. Feel free to e

Re: [racket-users] Typed Syndicate Status

2020-03-10 Thread Sam Caldwell
hi Ray, On Tue, Mar 10, 2020 at 10:25 AM Ray Racine wrote: > For a new project with Syndicate I'd like to jump up to typed/syndicate if > possible even if it is a little bit "early". As expected it looks like > PLT's approach to typing dataspaces, tuples spaces, actors and messaging > looks n

Re: [racket-users] Re: resources on PL design

2019-06-30 Thread Sam Caldwell
I'd add the HOPL proceedings to the mix: https://hopl4.sigplan.org/track/hopl-4-papers#History-of-HOPL Where the designers of languages often talk about their motivations, why they made particular decisions, and what kinds of effects those decisions seemed to have. On Sun, Jun 30, 2019 at 7:24 A

Re: [racket-users] Strip the lexical context from an identifier

2019-02-22 Thread Sam Caldwell
You can also do this with syntax-local-introduce to remove x's use-site scope*: #lang racket (require (for-syntax syntax/parse)) (define-syntax (my-macro stx) (syntax-parse stx [(_ x:id) #:with x- (syntax-local-introduce #'x) #'(lambda (a b) x-)])) ((my-macro a) 1 2) ;; 1 (

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread Sam Caldwell
Your definition of `ancestor` is one or two steps of parentage: > ancestor(A, B) :- parent(A, B). > ancestor(A, B) :- parent(A, C), parent(C, B). I suspect you want one of those lines to appeal to the `ancestor` relation to allow longer chains. - Sam Caldwell On Wed, Jan 31, 2018 at 1

Re: [racket-users] Alternatives to DrRacket

2017-11-27 Thread Sam Caldwell
. - Sam Caldwell On Mon, Nov 27, 2017 at 11:33 AM, Damien MATTEI wrote: > Le Monday 27 November 2017 05:18:02 pm David Storrs, vous avez écrit : > > > > > > 2. The macro stepper is extremely handy when it works, and being able > to > > > inspect syntax ob

Re: [racket-users] Redex v6.4 "broke" LambdaJS

2017-09-06 Thread Sam Caldwell
. -Sam Caldwell On Wed, Sep 6, 2017 at 2:39 PM, Ben Greenman wrote: > I think it'll work if you delete the underscores, e.g. change "e_1" to > "e1". > > On Wed, Sep 6, 2017 at 2:22 PM, wrote: > >> (For some reason the mail I sent to usersracket-lan

Re: [racket-users] Expanding a macro into multiple syntax objects (Defining two things with one macro)

2017-06-22 Thread Sam Caldwell
ntent of begin is spliced into the surrounding context. Example: > (let ([curly 0]) (begin (define moe (+ 1 curly)) (define larry (+ 1 moe))) (list larry curly moe)) '(2 0 1) - Sam Caldwell [1] http://docs.racket-lang.org/guide/begin.html On Thu, Jun 22, 2017 at

Re: [racket-users] How to find code in the racket distro

2017-06-20 Thread Sam Caldwell
s that it is a particular incantation of string_recase which is also in the file. I'm not sure if finding other bits of the implementation would be as seamless but it's worth a try next time you're looking for something! - Sam Caldwell On Tue, Jun 20, 2017 at 2:00 PM, Stephen De Gabr

Re: [racket-users] RacketCon Code of Conduct

2017-06-16 Thread Sam Caldwell
I agree that we should have one. - Sam Caldwell On Fri, Jun 16, 2017 at 2:50 PM, Stephen De Gabrielle < spdegabrie...@gmail.com> wrote: > Awesome. (It's an opinion) > > On Fri, 16 Jun 2017 at 19:48, Alexis King wrote: > >> +1 from me. I think the Strange Loop

Re: [racket-users] How to apply side effects to all elements in a list

2017-03-22 Thread Sam Caldwell
bears)) (render-bears (rest bears))) (possibly with some extra arguments thrown in) - Sam Caldwell On Wed, Mar 22, 2017 at 3:45 PM, Angus wrote: > I am a bit stuck on rendering images in a list. > > Here is my code below. > > (require 2htdp/image) > > (def

Re: [racket-users] Stickers!

2017-01-24 Thread Sam Caldwell
Thanks Ben, these look great! On Tue, Jan 24, 2017 at 4:15 PM, Ben Greenman wrote: > Hi Racket Users, > > I ordered a bunch of Racket stickers to celebrate the 6.8 release. Here's > proof: > http://www.ccs.neu.edu/home/types/resources/stickers.jpg > > If you send me your address, I will mail you

Re: [racket-users] Racket backwards compatible to schemer books?

2016-11-22 Thread Sam Caldwell
I think there are some minor incompatibilities. For example, the seasoned schemer uses `letcc` whereas in racket you would write `let/cc`. I don't know if these are catalogued somewhere. - Sam Caldwell On Fri, Nov 18, 2016 at 2:20 PM, Tim Johnson wrote: > Hello racketeers : > >

Re: [racket-users] Re: Redex: macro expanding to a side-condition clause

2016-10-26 Thread Sam Caldwell
(cc'ing the list) Cool, I hadn't seen that library. I think this approach would get the job done. Thanks, Sam Caldwell On Wed, Oct 26, 2016 at 12:25 PM, Sam Caldwell wrote: > Cool, I hadn't seen that library. I think this approach would get the job > done. > > Th

Re: [racket-users] Redex: macro expanding to a side-condition clause

2016-10-24 Thread Sam Caldwell
> > (where/not pat tm) > > write this: > > (where #true (not-thing pat)) > > > > On Mon, Oct 24, 2016 at 5:47 PM, Sam Caldwell wrote: > >> In the meantime, consider using a metafunction with an `else` clause. > > > > This would entail fixing th

Re: [racket-users] Redex: macro expanding to a side-condition clause

2016-10-24 Thread Sam Caldwell
k with failed matches not being first-class in Redex, but I'm a little disappointed if I can't create my own shorthand. Thanks, Sam Caldwell On Mon, Oct 24, 2016 at 6:31 PM, Robby Findler wrote: > Unfortunately, Redex's pattern language does not currently support > `not`. It migh

[racket-users] Redex: macro expanding to a side-condition clause

2016-10-24 Thread Sam Caldwell
hieve this? Thanks, Sam Caldwell Full example: == #lang racket (require redex) (define-language L (E number (+ E E))) (define-syntax (where/not stx) (syntax-case stx () [(_ pat tm) #'(side-condition ,(not (redex-mat

Re: [racket-users] Trouble with recursive lambda macros, using Y combinator

2016-09-11 Thread Sam Caldwell
ine fact (recursion fact (n) (if (zero? n) 1 (* n (fact (sub1 n)) > (fact 0) 1 > (fact 10) 3628800 - Sam Caldwell On Sun, Sep 11, 2016 at 9:15 AM, Jens Axel Søgaard wrote: > Rather than use substitute-term you can bind name to do the r

Re: [racket-users] Order of reduction rules in Redex

2016-09-06 Thread Sam Caldwell
(+ C q) (+ e C)) This is basically the same approach as defining a call-by-value lambda calculus, except instead of values you have expressions-that-do-not-contain-lifted. This is covered in the Long Tutorial[1], specifically in section 2.4 [1] https://docs.racket-lang.org/redex/redex2015.htm

Re: [racket-users] Macro calling macro question

2016-05-20 Thread Sam Caldwell
Kevin, I have made this exact mistake in the past. The trouble is with the lexical context being passed to `format-id`. (_foo 3) foo3 ;; 3 Here, _foo is passed the syntax #'(_foo 3), which came from the same environment as the reference, foo3. (foo 3) foo3 ;; error ... Here, _foo is passed the

Re: [racket-users] What do you use macros for?

2016-04-08 Thread Sam Caldwell
I don't see how a lazy language would let me implement my own version of `let`. Care to enlighten me? - Sam Caldwell On Fri, Apr 8, 2016 at 7:10 AM, Norman Gray wrote: > > Greetings. > > Quoting Asumu quoting Matthias: > > I'd like to propose that there are thre

Re: [racket-users] SEwPR PLT Redex code error? (pg 225)

2016-02-23 Thread Sam Caldwell
I am pretty sure it is a result of this change: https://groups.google.com/d/topic/racket-users/blV3EEkJxVk/discussion On Tue, Feb 23, 2016 at 1:23 PM, Matthias Felleisen wrote: > > This is must be a regression. The build-process for the second part > includes running the figures (and their test

Re: [racket-users] macro stepper

2016-02-11 Thread Sam Caldwell
Yes, I mention seeing this in a bug report I filed last week: https://github.com/racket/macro-debugger/issues/13 - Sam Caldwell On Thu, Feb 11, 2016 at 11:37 AM, Scott Moore wrote: > Yes, around 80% of the time if I disable macro hiding, and sometimes even > with macro hiding if I’m

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-13 Thread Sam Caldwell
form that have the mode (I O) or (O I) can be used > with 'traces' and 'stepper' (as well as show-derivations). > > hth, > Robby > > > On Sat, Dec 12, 2015 at 8:21 PM, Sam Caldwell wrote: > > Thanks for clarifying, Robby. > > > > I'm modeling

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-12 Thread Sam Caldwell
(term E (where (State) ,(apply-reduction-relation red (term State-Q But I can't say I felt great about doing so. (The side-condition is needed to prevent infinite looping). Is there a cleaner way to achieve the same result? Thanks, Sam Caldwell On Sat, Dec 12, 2015 at 11:11

[racket-users] Redex - constraining what is used to fill a hole

2015-12-11 Thread Sam Caldwell
my question boils down to: 1) What is/is not allowed in each position when defining a shortcut? 2) How can I constrain what is used to fill a hole, as attempted in my example? Thanks, Sam Caldwell [1] http://docs.racket-lang.org/redex/The_Redex_Reference.html#%28form._%28%28lib._redex%2Freductio