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 wr

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: >

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
ase it 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

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 unsub

[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 care

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

2019-02-16 Thread David Van Horn
help 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 examples

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

2019-02-16 Thread David Van Horn
er to RaLists 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

[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 title

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 fo

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 t

[racket-users] DrRacket (6.11) issue on Windows 10

2017-11-13 Thread David Van Horn
I have a student who is has a strange problem that is preventing him from using DrRacket. When he opens DrRacket, it goes through the launch window, all the tools load, etc., but then when the main DrRacket window should appear, it doesn't. Or rather it does, but not somewhere visible or accessib

Re: [racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
On Tue, Nov 7, 2017 at 2:45 PM, Robby Findler wrote: > On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn wrote: >> Other than copy/pasting, I can seem to recreate a decimal-looking >> number that is actually a special fraction, so I'm not sure how the >> author of

Re: [racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
me printfs in and around there would help? > > Robby > > > On Tue, Nov 7, 2017 at 1:03 PM, David Van Horn wrote: >> 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 >&g

[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 wrote: > Define two different commands at the latex level? > > Robby > > On Sun, Mar 5, 2017 at 9:39 AM David Van Horn wrote: >> >> I'm trying to make a wrapper for a latex com

[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 wrote: > Thanks, this does make the section heading a link, but in the table of > contents or in the left hand navigati

Re: [racket-users] scribble section as link

2017-03-04 Thread David Van Horn
gt; 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 wrote: >> I'm using scribble to make a web page and I'd like a section-like >> heading that is ju

[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 gr

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

2016-03-09 Thread David Van Horn
ar 9, 2016 at 5:03 PM, David Van Horn 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 generate latex friendly output? >> >> Thanks,

[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 "Racke

[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 q

[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 t

[racket] ICFP 2015: Final Call for Papers

2015-02-13 Thread David Van Horn
aineyINRIA Rocquencourt (France) Andreas Rossberg Google (Germany) Manuel Serrano INRIA Sophia Antipolis (France) Simon Thompson University of Kent (UK) David Van Horn University of Maryland (USA) Stephanie Weirich Universi

Re: [racket] Scribble: fake section links

2015-01-26 Thread David Van Horn
el section listing. (I didn't even see it on your course page until I looked again.) David > On Jan 26, 2015, at 4:19 PM, David Van Horn wrote: > >> On 1/26/15 4:14 PM, Stephen Chang wrote: >>>> Is there a way to make @link that appears like a @section heading?

Re: [racket] Scribble: fake section links

2015-01-26 Thread David Van Horn
On 1/26/15 4:14 PM, Stephen Chang wrote: >> Is there a way to make @link that appears like a @section heading? I >> want to have links to external URLs that appear as though they're >> section headings in a scribble-based web page. > > So you want the link to have the style of a section header bu

[racket] Scribble: fake section links

2015-01-26 Thread David Van Horn
Is there a way to make @link that appears like a @section heading? I want to have links to external URLs that appear as though they're section headings in a scribble-based web page. Thanks! David Racket Users list: http://lists.racket-lang.org/users

[racket] ICFP 2015: Call for Papers

2014-11-07 Thread David Van Horn
cs at Tallinn University of Technology (Estonia) Mike Rainey INRIA Rocquencourt (France) Andreas Rossberg Google (Germany) Manuel SerranoINRIA Sophia Antipolis (France) Simon ThompsonUniversity of Kent (UK) David Van

[racket] ICFP 2015 Call for Workshop and Co-located Event Proposals

2014-10-09 Thread David Van Horn
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2015 20th ACM SIGPLAN International Conference on Functional Programming August 30 - September 5, 2015 Vancouver, Canada http://icfpconference.org/ic

[racket] frtime

2014-09-17 Thread David Van Horn
This program is less flashy than it used to be: #lang frtime seconds Is FrTime still supported? Is there a way to get the old behavior of being, well, reactive? David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] on reversing a list by way of sort

2014-09-15 Thread David Van Horn
On 9/15/14, 4:53 PM, David Van Horn wrote: > I don't think you made enough examples. Nope - my bad. Cute. Awful, but cute (and there could be correct implementations of sort that would break your rev). David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] on reversing a list by way of sort

2014-09-15 Thread David Van Horn
I don't think you made enough examples. On 9/15/14, 4:48 PM, Daniel Bastos wrote: > Dear Racketeers, I was studying the exercise 20.2.4 of HtDP when I > came up with this way of reversing lists. (Every element is a least > element. Or greatest.) > > (define (f x y) true) > > (define (rev ls) (so

[racket] ICFP 2014 Final Call for Participation

2014-08-01 Thread David Van Horn
jvers, Ghent University Sam Tobin-Hochstadt, Indiana University Programming Contest Co-Chairs: Duncan Coutts, Well Typed LLP Nicolas Wu, University of Oxford Student Research Competition Chair: Meng Wang, Chalmers University Publicity Chair: David Van Horn, University of Mar

Re: [racket] function parameters in racket

2014-07-20 Thread David Van Horn
On 7/20/14, 10:07 AM, קוראל אלימלך wrote: > how can i define a function that gets a not known number of parameters > (like the + function: > that i can send (+1 2 ) or (+ 1 2 3 ) (+1 2 3 4 )) http://docs.racket-lang.org/guide/lambda.html I think many of the questions you have will be answere

Re: [racket] Type of argument in a function

2014-07-20 Thread David Van Horn
On 7/20/14, 7:04 AM, קוראל אלימלך wrote: > How can i define that a function will get an integer argument? > > is its possible? > > for example: > (define (func (x::Number))) /// its not working that way > > and if ill call the function with string there will be an error.. In addition to the sug

[racket] Width of traces boxes

2014-07-15 Thread David Van Horn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a way to (programmatically) adjust the maximum width of the boxes used to display terms in the traces window of Redex? (I feel like I used to know how to do this and have forgotten.) Thanks, David -BEGIN PGP SIGNATURE- Version: GnuPG

[racket] ICFP 2014 Call for Participation

2014-06-26 Thread David Van Horn
University Publicity Chair: David Van Horn, University of Maryland Video Chair: Iavor Diatchki, Galois Malcolm Wallace, Standard Chartered Bank Industrial partners: Platinum partners Jane Street Capital Gold partners Google Microsoft Research Mozilla Oracle Labs

[racket] ICFP 2014 Student Volunteer Programme

2014-06-03 Thread David Van Horn
[With apologies for cross-posting] Please forward this to anyone who may be interested! ICFP Student Volunteer Programme http://icfpconference.org/icfp2014/sv.html We are looking for student volunteers to help with the running of ICFP 2014 in Gothenburg, Sweden. If you are a student (part-time, f

[racket] ICFP 2014 Student Research Competition: Call for Submissions

2014-05-16 Thread David Van Horn
== CALL FOR SUBMISSION SRC@ICFP 2014 Gothenburg, Sweden 1-3 September 2014 http://www.icfpconference.org/icfp2014/src

[racket] setup sandbox eval with submodule

2014-05-14 Thread David Van Horn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'd like to create a sandbox evaluator that uses a language created in a submodule. So something like this: #lang racket (require racket/sandbox scribble/eval) (module+ some-lang (provide (all-defined-out)) (define #%top-interaction '..

Re: [racket] Generating docs for gh-pages

2014-05-10 Thread David Van Horn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/10/14, 8:25 PM, David Van Horn wrote: > Bizarrely, this renders using the old scribble style. Any ideas > what's causing that? Never mind: I was using scribble/doc instead of scribble/manual, which is what caused it. David ---

Re: [racket] Generating docs for gh-pages

2014-05-10 Thread David Van Horn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/10/14, 7:55 PM, Matthew Butterick wrote: > At the top of your Scribble sources, instead of this: > > (for-label "../../ralist.rkt") > > Refer to your package like this: > > (for-label data/ralist) Thanks! Bizarrely, this renders using the old

[racket] Generating docs for gh-pages

2014-05-10 Thread David Van Horn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm trying to follow the directions Matthew Butterick gave for generating scribble docs to push to a gh-pages branch: http://lists.racket-lang.org/users/archive/2014-May/062339.html I'm doing this for my ralist package: https://github.com/dvanhorn/r

[racket] changing pkg.racket-lang.org address

2014-05-10 Thread David Van Horn
Is it possible to change one's email address on pkg.racket-lang.org? Thanks, David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Q. about 'nostops' in MTWT paper

2014-05-09 Thread David Van Horn
On 5/9/14, 11:29 AM, Alexander McLin wrote: > Do you mind expanding on what MTWT stands for? I'm not familiar with this > paper and am curious. Macros that Work Together http://www.eecs.northwestern.edu/~robby/pubs/papers/jfp2012-fcdf.pdf > On Thu, May 8, 2014 at 6:20 PM, John Clements > wrote:

Re: [racket] specifying types for fields in non-polymorphic structures

2014-04-25 Thread David Van Horn
ut that's what the Posn type is for. If you apply posn to something other than reals, you won't get a Posn. If you have a Posn and apply posn-x, you get a real. (define: (f [p : Posn]) : Real (+ (posn-x p) (posn-y p))) David > On Apr 25, 2014, at 9:49 PM, David Van Horn

Re: [racket] specifying types for fields in non-polymorphic structures

2014-04-25 Thread David Van Horn
On 4/25/14, 9:38 PM, Alexander D. Knauth wrote: > Is there a way of specifying types for fields in non-polymorphic structures? > Like this: > (struct: posn ([x : Real] [y : Real])) > (define-type Origin > (posn Zero Zero)) > I know this doesn’t work, but is there something that could work like

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-07 Thread David Van Horn
On 3/7/14, 11:52 AM, Eric Dong wrote: > Forgive me if I am super terribly wrong. Isn't it the case that an improper > list is only known to be improper if we walk to the end and find something > other than an empty? So wouldn't that mean "first" and "rest" take linear > time since they must make su

Re: [racket] Trouble using make-base-eval

2014-03-03 Thread David Van Horn
On 3/3/14, 8:29 PM, Greg Hendershott wrote: > I get the same error with your code. It looks like there's a > #:pretty-print arg that defaults to #t. If I set it #f it works for > me: > > #lang scribble/manual > @(require scribble/eval) > @(define some-eval >(make-base-eval #:lang 'racket >

[racket] Trouble using make-base-eval

2014-03-03 Thread David Van Horn
I was just dusting off old notes I have written in scribble that used to work, but now I get an error, which I've boiled down to the following example: $ cat try.scrbl #lang scribble/manual @(require scribble/eval) @(define some-eval (make-base-eval #:lang 'racket)) $ scribble --pdf try.scrbl

[racket] ICFP 2014: Call for papers

2014-01-07 Thread David Van Horn
= 19th ACM SIGPLAN International Conference on Functional Programming ICFP 2014 Gothenburg, Sweden, 1-3 September 2014 http://www.icfpconference.org/icfp2014

Re: [racket] Boston Area Meet Up

2013-11-06 Thread David Van Horn
On 11/6/13, 7:41 AM, Greg Hendershott wrote: Question for NEU folks, or others with local space: If someone like Daniel did the organizing, could you provide some space? I'm sure either NEU or Harvard could provide the space. David Racket Users list: http://lists.racke

Re: [racket] What #lang to use to create teachpack?

2013-11-04 Thread David Van Horn
On 11/4/13, 6:36 PM, Norman Ramsey wrote: > I think you will find "#lang racket" the best language for writing > teachpacks. Using "#lang racket" I have successfully create a package, installed it, and require'd it. But when I print a structure defined in my package, the arguments don't pri

[racket] ICFP 2014: Call for Workshop & Co-located Event Proposals

2013-10-30 Thread David Van Horn
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2014 19th ACM SIGPLAN International Conference on Functional Programming August 31 – September 6, 2014 Gothenburg, Sweden http://icfpconference.org/i

Re: [racket] [ANN] RacketCon 2013: 29 September

2013-09-22 Thread David Van Horn
On 9/22/13 11:41 AM, Sam Tobin-Hochstadt wrote: Things I really enjoy in Boston: - The Museum of Fine Arts, right across the street from Northeastern Also near NEU and the MFA is the Elizabeth Stewart Gardner Museum, which is very nice: http://www.gardnermuseum.org/ - The Freedom Trail

Re: [racket] Immutable vectors

2013-09-05 Thread David Van Horn
On 9/5/13 10:42 AM, Konrad Hinsen wrote: Neil Toronto writes: > FWIW, `vector->immutable-vector' is pretty fast. It's usually the least > significant part of an O(n) operation. Its two biggest problems are that > it allocates memory and annoys people. That's a good summary of my first imp

[racket] ICFP 2013 Call for Participation

2013-08-22 Thread David Van Horn
Blame Ronald Garcia Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism Joshua Dunfield and Neelakantan R. Krishnaswami 1630-17 Break 17-1740 Session 15: Analysis and Optimization Optimizing Abstract Abstract Machines J. Ian Johnson, Nicholas Labich, Matthew Might and Da

Re: [racket] Generating Type 1 PDF fonts from plot

2013-07-17 Thread David Van Horn
On 7/17/13 8:45 PM, David Van Horn wrote: I have generated PDF files from some plots with labels. The font for the label ends up embedded as a PostScript font (according to pdffonts). Is there a way to use Type 1 fonts? Here's an example: > more sin.rkt #lang racket (require plo

[racket] Generating Type 1 PDF fonts from plot

2013-07-17 Thread David Van Horn
I have generated PDF files from some plots with labels. The font for the label ends up embedded as a PostScript font (according to pdffonts). Is there a way to use Type 1 fonts? Here's an example: > more sin.rkt #lang racket (require plot) (plot (function sin (- pi) pi #:label "y = sin(x)")

[racket] snips in redex traces

2013-05-06 Thread David Van Horn
Is it possible to render snips in redex traces? For example, here's something I'd like to write and have it result in a pretty traces window: #lang racket ;; Traffic lights as redex model (require redex 2htdp/image) (define-language L) (define RED(circle 14 "solid" "red")) (define YELLOW

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread David Van Horn
On 4/4/13 11:15 AM, Matthias Felleisen wrote: ;; --- On an unrelated note, you may wish to experiment with lambdaLVar as a #lang so that you can write programs. Since you seem to be designing a PL, I consider the practical evaluation as at least as important as a reduction semantics. Just a thou

Re: [racket] Redex question: parameterizing a language definition

2013-04-03 Thread David Van Horn
On 4/3/13 8:02 PM, Lindsey Kuper wrote: I have a rather involved Redex question that I was originally going to send to this list, but it got long enough that it was crying out for hyperlinks and code formatting. So, here it is on Stack Overflow: http://stackoverflow.com/questions/15800167/plt-re

Re: [racket] for/hash and for/list: adding nothing, adding more than one thing

2013-03-21 Thread David Van Horn
On 3/21/13 6:55 PM, Tim Nelson wrote: (1) How can I *not* add a hash entry for a given iteration? When I use for/list, can I abuse the nature of empty and append* (I cringe as I write this): (append* (for/list ([i '(1 2 3 4 5)]) (cond [(even? i) (list (* i 100))]

[racket] ICFP 2013: Second Call for Papers

2013-03-16 Thread David Van Horn
= 18th ACM SIGPLAN International Conference on Functional Programming ICFP 2013 Boston, MA, USA, 25-27 September 2013 http://www.icfpconference.org/icfp2013 =

Re: [racket] Redex multi-hole contexts

2013-02-28 Thread David Van Horn
On 2/28/13 1:32 PM, Nicholas Alexander Marquez wrote: So in attempting to model an abstract machine for a parallel language (pH), I found it very unpleasant to use Redex. I didn't care about the non-determinism resulting from which thread might possibly be executing at the moment; they should

[racket] ICFP 2013: Call for papers

2013-02-08 Thread David Van Horn
= 18th ACM SIGPLAN International Conference on Functional Programming ICFP 2013 Boston, MA, USA, 25-27 September 2013 http://www.icfpconference.org/icfp2013 =

Re: [racket] Beginners request for code review.

2013-01-31 Thread David Van Horn
On 1/31/13 5:40 AM, Piotr Klibert wrote: I have a problem with your suggestion, namely: 2) If you make this a github repository, then you could publish it as a 'raco pkg' package and everyone could try it out. Looks like fun! I use bzr and launchpad for personal things and github for work rel

[racket] Scribble: collapse index entries

2013-01-17 Thread David Van Horn
Is it possible to get Scribble to collapse index entries to the same key, so that instead of foo, 1 foo, 2 you'd get foo, 1, 2 or better foo, 1-2 ? Thanks, David #lang scribble/manual @section{First page} @as-index{foo} @section{Second page} @as-index{foo} @index-section[]

[racket] Book parts in scribble

2013-01-16 Thread David Van Horn
I'm trying to achieve something like Latex's \part in scribble and not sure what the right approach is. I want I First part 1 First chapter 2 Second chapter II Third part 3 Third chapter 4 Fourth chapter Should the parts be sections that include-section each section for the chapters? But the

Re: [racket] runtime determining 32 vs 64 bit machine?

2012-12-23 Thread David Van Horn
On 12/24/12 12:24 AM, Danny Yoo wrote: I'm currently looking at (system-type 'machine) to determine whether I'm on a 32-bit vs 64-bit machine. However, the strings I'm getting are a bit too platform specific, and I'm resorting to matching the string "64" somewhere in there. Is there a nicer way

Re: [racket] Dynamically Bind Functions

2012-12-21 Thread David Van Horn
On 12/21/12 9:41 PM, Cristian Esquivias wrote: I'm trying to replace a function with another using parameterize. For example, when I try: (define (add2 n) (add1 (add1 n))) (parameterize ([add1 (λ [n] (+ n 2))]) (add2 2)) I get an error: parameterize: contract violation expected: p

Re: [racket] circular lists are not lists or sequences

2012-12-12 Thread David Van Horn
On 12/10/12 11:00 AM, Jens Axel Søgaard wrote: 2012/12/10 David Van Horn : On 12/10/12 10:14 AM, Matthew Flatt wrote: We did change `in-list' to add a `list?' guard, so the behavior is as intended. Maybe we need a new `in-' sequence constructor that works as long as pairs appea

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
On 12/10/12 10:46 AM, Matthias Felleisen wrote: I disagree. See first sentence of list? docs: Returns #t if v is a list: either the empty list, or a pair whose second element is a list. It's not clear whether this is the biggest set or the smallest set that satisfies this spec. (But OK,

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
On 12/10/12 10:42 AM, Matthias Felleisen wrote: list? means 'inductively constructed' data. I guess my issue is that I don't see that written down anywhere. David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] circular lists are not lists or sequences

2012-12-10 Thread David Van Horn
right to me. I can submit a pull request if that design is OK. (I guess I'm a little surprised that `list?' returns false for a circular list since a circular list never falsifies the list definition given in the docs.) David At Mon, 03 Dec 2012 18:12:51 -0500, David Van Horn w

Re: [racket] Transitively extend redex metafunctions

2012-12-07 Thread David Van Horn
On 12/7/12 7:49 PM, Robby Findler wrote: This is an excellent example of one of the reasons why we'd planned to add a notion of modules to Redex. The idea being that you could group a bunch of metafunctions/judgment-forms/reduction relations together and then simultaneously extend the set of them

[racket] Transitively extend redex metafunctions

2012-12-07 Thread David Van Horn
The various extension forms for redex are critical for code re-use, but extensions break down when the things (metafunctions, judgments, etc.) being extended are not monolithic, but instead call helper metafunctions or judgments. Due to the paucity of binding forms for these things, sometimes

Re: [racket] Problem with scribble examples written in linked language

2012-12-05 Thread David Van Horn
On 12/5/12 4:03 PM, Matthew Flatt wrote: At Wed, 05 Dec 2012 15:38:59 -0500, David Van Horn wrote: Unfortunately, my language depends on redex, and therefore racket/gui/base, which causes: raco setup: error: during Building docs for /Users/dvanhorn/Documents/git/pcf/scribblings/pcf/main.scrbl

Re: [racket] Problem with scribble examples written in linked language

2012-12-05 Thread David Van Horn
On 12/5/12 3:44 PM, Ryan Culpepper wrote: Require redex/reduction-semantics and redex/pict instead of redex. But the langauge actually needs redex -- running a module launches traces windows if you write #lang pcf traces. So doing this fixes the docs but breaks the language. David

Re: [racket] Problem with scribble examples written in linked language

2012-12-05 Thread David Van Horn
On 12/5/12 2:33 PM, Matthew Flatt wrote: At Wed, 05 Dec 2012 14:24:09 -0500, David Van Horn wrote: Am I doing something wrong, or is this a buggy interaction between the sandbox and raco link? The sandbox's default settings probably don't interact nicely with `raco link',

[racket] Problem with scribble examples written in linked language

2012-12-05 Thread David Van Horn
I am trying to scribble some examples using a custom evaluator. if I use the example from the documentation, things work: @(require racket/sandbox scribble/eval) @(define my-evaluator (parameterize ([sandbox-output 'string] [sandbox-error-output 'string]) (ma

[racket] circular lists are not lists or sequences

2012-12-03 Thread David Van Horn
I have some code that's been broken somewhere between 5.1.1 and git HEAD. The issue seems to be either that circular lists no longer are considered lists by `list?', or `in-list' has added a `list?' check (and circular lists were never `list?'). In any case, these are the kinds of things I wo

Re: [racket] Online testing

2012-11-28 Thread David Van Horn
On 11/28/12 12:08 PM, Matthias Felleisen wrote: I think David is interested in an extension of the check-syntax mode. CS should report when test cases fail. I am willing to help it along by writing all test cases within (module+ test ...) for that. Yes exactly. I'd be happy to write (module+

[racket] Online testing

2012-11-28 Thread David Van Horn
Something that would be useful to me is a #lang racket/test that is just like #lang racket but runs the entire module at compile time and collects test failures, reporting them as syntax errors. Then I could develop code with online compilation to give me online feedback about test cases. Onc

Re: [racket] Call by Name

2012-11-27 Thread David Van Horn
On 11/27/12 2:39 PM, J. Ian Johnson wrote: If you don't need to dispatch on name at runtime, you can write a macro for this and use format-id to construct the identifier naming the function. Otherwise you would need to use eval, which is highly inadvisable. #lang racket (require (for-syntax ra

Re: [racket] render draw.ss drawings to pdf, ps, etc.

2012-11-27 Thread David Van Horn
On 11/10/12 2:54 PM, David Van Horn wrote: Is there an easy way to render draw.ss drawings to PDF or PS? A) I know draw.ss is deprecated -- this is legacy code B) It's OK if the solution involves "magic" (e.g. using some pict library) -- this is just a one-off thing to render s

[racket] render draw.ss drawings to pdf, ps, etc.

2012-11-10 Thread David Van Horn
Is there an easy way to render draw.ss drawings to PDF or PS? A) I know draw.ss is deprecated -- this is legacy code B) It's OK if the solution involves "magic" (e.g. using some pict library) -- this is just a one-off thing to render some drawings in a high-quality printing format. Thanks!

Re: [racket] plot w/ log scale

2012-11-08 Thread David Van Horn
On 11/8/12 5:48 PM, Vincent St-Amour wrote: You can use axis transforms, but you may need to bound them. #lang racket (require plot) (parameterize ([plot-y-transform (axis-transform-bound log-transform 1 2000)]) (plot (discrete-histogram '(#(a 10) #(b 100) #(c 1000) Thanks! Maybe someo

[racket] plot w/ log scale

2012-11-08 Thread David Van Horn
Is there some way to plot a discrete histogram with a log-scale y-axis? Thanks, David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Evaluating a module with an unintended language

2012-11-02 Thread David Van Horn
On 11/1/12 10:11 PM, Matthias Felleisen wrote: I can't think of another way. But I am also wondering why you'd want to run a program written in language L in language K. -- Matthias This is something I want to do on occasion, where K is an abstraction of L (either a symbolic evaluator or an a

[racket] The PLoT library is excellent

2012-11-01 Thread David Van Horn
Thank you, Neil T., for making such an awesome library. David Racket Users list: http://lists.racket-lang.org/users

[racket] ICFP 2013: Call for workshops and co-located events

2012-10-29 Thread David Van Horn
CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2013 18th ACM SIGPLAN International Conference on Functional Programming September 22 - 28, 2013 Boston, Massachusetts, USA http://icfpconference.org/ic

Re: [racket] Congrats to Asumu and Stevie

2012-10-25 Thread David Van Horn
On 10/25/12 12:22 PM, David Van Horn wrote: Asumu and Stevie just won the OOPSLA best student paper award for their paper "Gradual Typing for First-Class Classes" (with Sam and Matthias): http://www.ccs.neu.edu/racket/pubs/oopsla12-tsdthf.pdf It's quite the acc

[racket] Congrats to Asumu and Stevie

2012-10-25 Thread David Van Horn
Asumu and Stevie just won the OOPSLA best student paper award for their paper "Gradual Typing for First-Class Classes" (with Sam and Matthias): http://www.ccs.neu.edu/racket/pubs/oopsla12-tsdthf.pdf It's quite the accomplishment, so congratulations! David Racket Users

Re: [racket] redex + #lang = awesome

2012-10-24 Thread David Van Horn
On 10/24/12 2:28 PM, Prabhakar Ragde wrote: David Van Horn wrote: Then I thought, PCF's binding structure is a lot like Racket's: wouldn't it be nice to get syntax coloring, syntax arrows, renaming, etc. That was about another 30 lines of code. Can you say a few words about h

Re: [racket] confusion about shadowing predefined functions in interactions window

2012-10-22 Thread David Van Horn
On 10/22/12 10:05 PM, Dan Grossman wrote: (define (range lo hi) (print "hi") (if (> lo hi) null (cons lo (range (+ 1 lo) hi ... I apologize if this is a known "feature" or a known "bug" -- I do scan the release notes briefly when new versions come out, but don't remember anything

[racket] redex + #lang = awesome

2012-10-22 Thread David Van Horn
Sam and I have been developing a prototype language using redex and #lang for about a year now, and that's been a really great experience (I don't believe we could have done this research and gotten it right without this tool support). But on my way to OOPSLA I re-implemented some of the core

Re: [racket] Sum of Even

2012-09-25 Thread David Van Horn
On 9/25/12 11:04 AM, Ashley Fowler wrote: I am trying to do a recursive analysis on the Sum of even numbers function. So far I have already defined the function. I have found the base case. The hard part is finding the non-recursive definition. I'm having trouble of what non-recursive definition

  1   2   3   >