Re: [racket-users] racket -m from commandline

2022-12-17 Thread David Van Horn
You likely want to also use the -t option so that the module is required. Here's an example: % cat try.rkt #lang racket (provide main) (define (main . args) (displayln (cons "HELLO:" args))) % racket -tm try.rkt there (HELLO: there) On Sat, Dec 17, 2022 at 11:50 AM whuk...@gmail.com

Re: [racket-users] Re: Listing All Programs

2019-09-05 Thread David Van Horn
This program works in 7.3, but not 7.4, which complains about the use of strings before it's definition. Swapping the order of valid-progs and strings fixes that, but the program then loops, although I don't understand why. On Thu, Sep 5, 2019 at 11:10 AM David Van Horn wrote: > > How

Re: [racket-users] Re: Listing All Programs

2019-09-05 Thread David Van Horn
How about this: a stream of strings which can be be parsed and compiled. (Note that this will loop when it gets to the first program that makes the compiler loop; luckily it's inefficient enough that you'll never actually get there.) #lang racket (define valid-progs (for/stream ([p strings]

Re: [racket-users] Listing All Programs

2019-09-05 Thread David Van Horn
t would > be easier to consider only lambdas with only one argument. > > Though if you want to also use all of Racket's primitives (that is, > including I/O), then good luck. My closest guess would be: > (for/list ([i (in-naturals)]) > (mflatt i)) > > On Thu, Sep 5, 2019 at

Re: [racket-users] Listing All Programs

2019-09-05 Thread David Van Horn
What do you mean by valid? On Thu, Sep 5, 2019, 9:05 AM Adam Golding wrote: > What is the shortest/smallest racket program (ithat enumerates all and > only valid racket programs? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To

[racket-users] PLMW at ICFP: Call for Scholarship Applications (due 17 May)

2019-05-02 Thread David Van Horn
ACM SIGPLAN Programming Languages Mentoring Workshop Co-located with ICFP'19 PLMW web page: https://icfp19.sigplan.org/home/PLMW-ICFP-2019 The purpose of the programming languages mentoring workshop (PLMW) is to encourage senior undergraduate and early career (first or second year) to pursue

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread David Van Horn
python programmers jump into their first experience > with Racket, but a link to your documentation has essentially just made you > an involuntary ambassador. > > > John > > > On Feb 16, 2019, at 14:00, David Van Horn wrote: > > > > There are several exampl

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread David Van Horn
sts would be much more enticing if we could convince > David Van Horn to begin his documentation with a couple of small examples…. > > John > > > On Feb 13, 2019, at 14:35, Stephen De Gabrielle > wrote: > > > > Thanks > > > > I should note that anyone wit

[racket-users] Setting global attributes for in scribble

2018-11-28 Thread David Van Horn
I'm trying to add a lang attribute to all html elements generated by scribble (when rendering to HTML). If I add a style with attributes to the title, this does the right thing but only for the "top" page. The attribute is missing in other sections. (Strangely if I add a js-addition to the

Re: [racket-users] Parameterized Redex models

2018-03-14 Thread David Van Horn
Yes, it looks like the original cache is just re-installed when re-enabled. Perhaps there should be an operation provided by Redex to clear away the cache. David On Wed, Mar 14, 2018 at 2:17 PM, 'Leandro Facchinetti' via Racket Users < racket-users@googlegroups.com> wrote: > > First, thanks

Re: [racket-users] Parameterized Redex models

2018-03-14 Thread David Van Horn
Some small improvements to your suggestions: 1) Instead of turning the cache off completely, you could just invalidate the cache when the parameter changes, i.e. write a `set-k!' function that updates the parameter and toggles the cache off and back on (I assume this will clear it out). 3) Move

[racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
I have some ISL+ programs that are being saved in the WXME format, but I can't seem to find any element in the file that would trigger this format (no images, comment boxes, etc.). Is there some way to figure out why the files are being saved this way in DrRacket? Thanks, David -- You received

[racket-users] scribble/example and HtDP languages

2017-08-30 Thread David Van Horn
How can I make definitions-area examples using the HtDP languages in Scribble? I tried the following, but since the evaluator corresponds to the interactions-area, it complains about definitions not being allowed: #lang scribble/manual @(require racket/sandbox scribble/example) @title{Notes}

Re: [racket-users] scribble and optional latex arguments

2017-03-05 Thread David Van Horn
That's what I'm doing. On Sun, Mar 5, 2017 at 10:48 AM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > Define two different commands at the latex level? > > Robby > > On Sun, Mar 5, 2017 at 9:39 AM David Van Horn <dvanh...@cs.umd.edu> wrote: >> >> I

[racket-users] scribble and optional latex arguments

2017-03-05 Thread David Van Horn
I'm trying to make a wrapper for a latex command that has an optional argument. My current solution is to do the following to wrap a command called `\foo`: (define (foo #:opt [o #f] x) (if o (make-multiarg-element (make-style "SfooOpt" '(multicommand)) (list

Re: [racket-users] scribble section as link

2017-03-04 Thread David Van Horn
The latex analogy of what I'd like is something like: \addcontentsline{toc}{section}{\href{google.com}{The Google}} On Sat, Mar 4, 2017 at 2:30 PM, David Van Horn <dvanh...@cs.umd.edu> wrote: > Thanks, this does make the section heading a link, but in the table of > contents or in t

Re: [racket-users] scribble section as link

2017-03-04 Thread David Van Horn
tch...@ccs.neu.edu> wrote: > Does `hyperlink` do what you want? > > eg > > @section{@hyperlink["http://google.com"]{The Google}} > > On Sat, Mar 4, 2017 at 1:49 PM, David Van Horn <dvanh...@cs.umd.edu> wrote: >> I'm using scribble to make a web page and I'd l

[racket-users] scribble section as link

2017-03-04 Thread David Van Horn
I'm using scribble to make a web page and I'd like a section-like heading that is just a link to an external URL, but I don't see how to do this. Is it possible? David -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this

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

2016-03-09 Thread David Van Horn
> > On Wed, Mar 9, 2016 at 5:03 PM, David Van Horn <dvanh...@cs.umd.edu> wrote: >> I have some source code I'm trying to typeset in a racketblock that >> uses subscript characters like ₀. This breaks when it gets to latex. >> Is there some workaround to genera

[racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread David Van Horn
I have some source code I'm trying to typeset in a racketblock that uses subscript characters like ₀. This breaks when it gets to latex. Is there some workaround to generate latex friendly output? Thanks, David -- You received this message because you are subscribed to the Google Groups

[racket-users] unit "mixins"

2016-03-02 Thread David Van Horn
Hello, I'm trying to do something like a unit "mixin", but have gotten stuck. Here's a sketch of what I'd like: #lang racket (define-signature x^ (a)) (define-signature y^ (b)) (define-signature z^ (c)) (define-signature f^ (f)) (define-unit u@ (import x^ y^ z^) (export f^) (define (f

[racket-users] An Introduction to Redex with Abstracting Abstract Machines

2016-01-24 Thread David Van Horn
Dear Racket Users, I've been working on a short introduction to using Redex, the semantic modelling toolkit included in Racket. I presented this material at the Redex Summer School and recently gave a tutorial based on it at POPL; it's probably in good enough shape to share. The tutorial works