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
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 > program, it

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

2021-04-30 Thread Sam Caldwell
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 receiving emails from it, send an email

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

2020-10-28 Thread Sam Caldwell
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] https://github.com/tonyg/synd

Re: [racket-users] Typed Syndicate Status

2020-03-10 Thread Sam Caldwell
ped 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 email me directly or open issues on gi

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

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

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 <damien.mat...@unice.fr> 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 > t

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 <benjaminlgreen...@gmail.com> 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, <natasha_da...@brown.edu>

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

2017-06-22 Thread Sam Caldwell
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 3:40 PM,

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

2017-06-20 Thread Sam Caldwell
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 Gabrielle < spde

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 <lexi.lam...@gmail.com> wrote: > >> +1 from me

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

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

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

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 <tim042...@gmail.com> wrote: > Hello r

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 <s...@ccs.neu.edu> wrote: > Cool, I hadn't seen that library. I think this approach would get the job > done. >

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

2016-10-24 Thread Sam Caldwell
gt; > and then where you wrote: > > (where/not pat tm) > > write this: > > (where #true (not-thing pat)) > > > > On Mon, Oct 24, 2016 at 5:47 PM, Sam Caldwell <s...@ccs.neu.edu> wrote: > >> In the meantime, consider using a metafunction wi

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

2016-10-24 Thread Sam Caldwell
led 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 <ro...@eecs.northwestern.edu> wrote: > Unfortunately, Redex's pattern language does not currently support >

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

2016-10-24 Thread Sam Caldwell
to achieve 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-match? L

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

2016-09-11 Thread Sam Caldwell
act (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 <jensa...@soegaard.net> wrote: > Rather than use substitute-term you c

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

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

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 <nor...@astro.gla.ac.uk> wrote: > > Greetings. > > Quoting Asumu quoting Matthias: > > I'd like to prop

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

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 <sdmo...@fas.harvard.edu> wrote: > Yes, around 80% of the time if I disable macro hiding, and somet

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

2015-12-13 Thread Sam Caldwell
rm 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 <s...@ccs.neu.edu> wrote: > > Thanks for clarifying, Robby. > > > > I'm modeling reductio

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

2015-12-12 Thread Sam Caldwell
re (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 AM, Robby Findler <ro...@e

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

2015-12-11 Thread Sam Caldwell
on 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%2Freduction-semantics..rkt%29.