Re: [racket] Racket v5.92

2014-01-28 Thread Jon Rafkind
I haven't updated the ppa in a while. There is something wrong with the current packaging scripts and I don't have a lot of time to debug it. If anyone wants to help please let me know. On 01/28/2014 02:52 AM, Todd O'Bryan wrote: > I use the Racket ppa. Hopefully, the new version will appear the

Re: [racket] Re-usable C-like input syntax

2013-05-21 Thread Jon Rafkind
its in git and will appear in the official manual when the docs are useable (slowly but surely) On 05/21/2013 02:50 PM, Neil Van Dyke wrote: > Anyone know where Honu disappeared to? I don't see it in the current manual, > nor in PLaneT. > http://download.racket-lang.org/docs/5.1.3/html/honu/ >

Re: [racket] Re-usable C-like input syntax

2013-05-21 Thread Jon Rafkind
On 05/21/2013 02:45 PM, David Bremner wrote: > Tom Schouten writes: > >> Interesting, but I'm tied to Racket at this point. >> > I'd have a look at "Honu" by Jon Rafkind if you haven't seen it > already. It adds an algol like syntax on top of r

Re: [racket] Compiling Racket for Command-Line Use Only

2013-05-19 Thread Jon Rafkind
I think most of the graphical stuff should be loaded at runtime, and you should not need those libraries just to compile racket. On 05/19/2013 11:16 AM, Nathan Campos wrote: > Hello, > I was thinking about using Racket in my HP Jornada 720 (running Linux of > course) just for fun, since it's

Re: [racket] missing documentation for racket-5.3.4

2013-05-09 Thread Jon Rafkind
On 05/08/2013 03:26 PM, Juan Francisco Cantero Hurtado wrote: > On 05/08/13 21:39, Neil Van Dyke wrote: >> I had a similar problem this morning when installing from the >> pre-release source, but figured it was probably my fault and didn't have >> time to investigate. (Sorry, I didn't know the rel

[racket] redex model rendered too narrow

2013-03-04 Thread Jon Rafkind
The pdf rendering of my redex model does not seem to take `where' clauses into account when computing the width of the pict. In a few rules this results in the where clause being cut off. Any idea what to do about it? Racket Users list: http://lists.racket-lang.org/users

Re: [racket] missing \ in tex output

2013-02-21 Thread Jon Rafkind
Ignore this, it was due to an errant redefinition of FigureTarget in my style.tex \renewcommand{\FigureTarget}[1]{} On 02/21/2013 01:28 PM, Jon Rafkind wrote: > Scribble is producing a figure that contains _ in the name without preceding > \ characters. I will debug the scribble source

[racket] missing \ in tex output

2013-02-21 Thread Jon Rafkind
Scribble is producing a figure that contains _ in the name without preceding \ characters. I will debug the scribble source unless someone has a better idea. \Centertext{\Legend{\FigureTarget{\label{t:x28counter_x28x22figurex22_x22enforestx2dmodelx22x29x29}Figure~1: }{t:x28counter_x28x22figu

Re: [racket] scribble error

2013-02-14 Thread Jon Rafkind
k peek at the source should fill you in (in the error message). >> >> >> On Thu, Feb 14, 2013 at 1:49 PM, Jon Rafkind wrote: >> >>> Strange scribble error today. I haven't debugged it much yet, in case >>> someone has an idea of whats going on. >

Re: [racket] scribble error

2013-02-14 Thread Jon Rafkind
Also, this is with the latest git as of right now: 294bed209ed903e9ac97095c369edfc9d01ff555 On 02/14/2013 12:49 PM, Jon Rafkind wrote: > Strange scribble error today. I haven't debugged it much yet, in case someone > has an idea of whats going on. > > $ scribble --pdf main

[racket] scribble error

2013-02-14 Thread Jon Rafkind
Strange scribble error today. I haven't debugged it much yet, in case someone has an idea of whats going on. $ scribble --pdf main.scrbl File not found: /home/jon/.racket/llncs.cls Downloading via ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs2e.zip... rename-file-or-directory: cannot re

[racket] scribble: colored text

2013-01-15 Thread Jon Rafkind
Is there a way to output colored text? Right now I only care about latex output. Something like.. These words will appear in normal black but the next word will be @blue-text{blue!}. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Question on (quote var) in macros

2013-01-15 Thread Jon Rafkind
Untested but I think this will work (define-syntax (my-macro stx) (syntax-case stx () [(_ (id1 id2 ...) body ...) #'(lambda (expr) (match expr [(list 'id1 id2 ...) body ...]))])) On 01/15/2013 10:22 PM, Paul Meier wrote: > Hi friends, > > I'm working on a macro that expands

Re: [racket] Figured out the Mac OS X crashing issue for liballegro / libsdl / etc...

2013-01-13 Thread Jon Rafkind
thunk) 0) (run-main 0 #f callback)) ;; user code (define (my-game) (define display (create-display)) ...) (allegro-run my-game) On 01/13/2013 03:35 PM, Jon Rafkind wrote: > Does the entire application have to live within the dynamic extent of the > `initialize-ns-app' call or

Re: [racket] Figured out the Mac OS X crashing issue for liballegro / libsdl / etc...

2013-01-13 Thread Jon Rafkind
Does the entire application have to live within the dynamic extent of the `initialize-ns-app' call or just making the screen? (initialize-ns-app (lambda () (create-display)) (do-rest-of-program) or (initialize-ns-app (lambda () (create-display) (do-rest-of-program)) On 01/13/2013 03:14 PM, Dan

Re: [racket] How to get current directory in the module file?

2012-12-14 Thread Jon Rafkind
In a.rkt: #lang racket (require racket/runtime-path) (define-runtime-path cwd ".") (provide cwd) On 12/14/2012 12:55 AM, Haiwei Zhou wrote: > Hi, > > For example, I have two module a and other-directory/b > > a.rkt > - begin of file --- > > #lang racket > > (define cwd (current-directory)) >

Re: [racket] how to create a ctype array

2012-12-13 Thread Jon Rafkind
_array produces a ctype, not an actual array itself. To get an array you can create one with malloc or you can call a C function through the ffi. If you use malloc then you get back a generic # type which you can convert to an array using ptr-ref as per the docs: "Since an array is treated like

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Jon Rafkind
.data 00028b30 00a06680 00a06680 00406680 2**5 CONTENTS, ALLOC, LOAD, DATA 26 .bss 000364b0 00a2f1c0 00a2f1c0 0042f1b0 2**5 ALLOC On 11/16/2012 03:48 PM, Jon Rafkind wrote: Looking over the build log it doesn't look like the racket binary is stripp

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Jon Rafkind
Looking over the build log it doesn't look like the racket binary is stripped. https://launchpadlibrarian.net/122407607/buildlog_ubuntu-raring-amd64.racket_5.3.1.5-20121108~raring_BUILDING.txt.gz On 11/16/2012 08:46 AM, Diogo F. S. Ramos wrote: Matthew Flatt writes: Does the executable from

Re: [racket] [FFI] _union and define-cstruct

2012-10-26 Thread Jon Rafkind
mehow.. But in any case the XEvent cstruct is large enough to hold any kind of specific event. On 10/26/2012 03:06 PM, Jon Rafkind wrote: > I agree with this. The code Laurent is talking about is my x11 ffi bindings. > Laurent, feel free to make this change and push to the repo. I'm n

Re: [racket] [FFI] _union and define-cstruct

2012-10-26 Thread Jon Rafkind
I agree with this. The code Laurent is talking about is my x11 ffi bindings. Laurent, feel free to make this change and push to the repo. I'm not sure why I didn't use the super struct thing to begin with, maybe it didn't exist when I initially wrote the bindings. https://github.com/kazzmir/x11

[racket] Racketcon 2012 videos

2012-10-19 Thread Jon Rafkind
The Racketcon 2012 videos are now online. http://www.youtube.com/user/racketlang Enjoy! Thanks to Blake/Jay/Neil for the video and Eli for the audio. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] macros whose meaning is dependent on context?

2012-10-16 Thread Jon Rafkind
This is what syntax-parameters are for. (require racket/stxparam) (define-syntax-parameter m (lambda (stx) (raise-syntax-error 'm "dont use this outside deeper"))) (define-syntax-rule (deeper e) (syntax-parameterize ([m (lambda (stx) #'1)]) e)) (deeper (m)) -> 1 On 10/16/2012 04:18 PM

[racket] local-expand subexpressions

2012-10-10 Thread Jon Rafkind
My understanding of local-expand from the documentation is that when the stop-list is not #f that sub-expressions will be expanded but I can't seem to get this to happen. #lang racket (define-syntax-rule (bar x) (+ x 1)) (define-syntax (foo stx) (syntax-case stx () [(_ expr) (printf

Re: [racket] Can't `yield' multiple values when `in-generator' is returned from a function?

2012-09-14 Thread Jon Rafkind
FYI this is PR 11662 On 09/14/2012 06:53 AM, Matthew Flatt wrote: > At Fri, 14 Sep 2012 08:20:22 -0400, Greg Hendershott wrote: >> tl'dr: I can `yield' multiple values when an `in-generator' sequence >> is used directly in a comprehension, but not when it is returned from >> a function. I'm stumpe

Re: [racket] DrRacket 5.1.3 on Ubuntu 12.04?

2012-09-08 Thread Jon Rafkind
If you install from the PPA you will get the latest stable version: https://launchpad.net/~plt/+archive/racket On 09/08/2012 01:37 PM, Danny Heap wrote: > I invoked > > sudo apt-get install racket > > ... on a Ubuntu 12.04 machine, and the version

Re: [racket] Ubuntu ppa update

2012-08-10 Thread Jon Rafkind
ok thanks, ill add one and update the ppa On 08/10/2012 08:51 PM, Danny Heap wrote: > I think there should be a dependency for libjpeg2: > > On Fri, Jul 20, 2012 at 07:19:22PM -0400, Danny Heap wrote: >> I installed racket in Ubuntu 12.04, first using aptitude (5.1.3), then >> downloading directly

[racket] ubuntu ppa update

2012-08-10 Thread Jon Rafkind
The racket ppa is now on version 5.3.0. Also I discovered how to add a .desktop file so a menu entry for 'drracket' will show up in applications->programming. I'm not quite sure what will happen on Unity, does anyone know? The ppa is being updated as I type this with the version that contains th

Re: [racket] ... in macro defining macros?

2012-08-03 Thread Jon Rafkind
't recall seeing > an example of it. > > Best, > Nick > > On Thu, Aug 2, 2012 at 11:55 PM, Jon Rafkind wrote: >> To match a literal ellipses in syntax-parse use #:literal [(ellipses ...)] >> and match on the term `ellipses', then to use a literal ellipses in the

Re: [racket] ... in macro defining macros?

2012-08-02 Thread Jon Rafkind
To match a literal ellipses in syntax-parse use #:literal [(ellipses ...)] and match on the term `ellipses', then to use a literal ellipses in the template use (... ...) instead of just ... It looks like you only want the latter, so (define-syntax (example stx) (syntax-parse stx [(_ name:

[racket] scribble: bracketed numbers with autobib

2012-07-09 Thread Jon Rafkind
How can I get scribble to generate references like "blah [1]" instead of "blah (Foobar 2010)" I am already using scribble/autobib with make-bib so I would prefer if I could continue to do so. A quick read of the documentation suggests I should use (cite "foo") and (bib-entry #:key "foo") but

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
On 06/04/2012 09:50 PM, Jon Rafkind wrote: > On 06/04/2012 09:48 PM, Eli Barzilay wrote: >> A few minutes ago, Jon Rafkind wrote: >>> Also that example is somewhat bizarre.. I think the (clock a ...) >>> template should be (get-clock) instead of ((get-clock) a ...), &g

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
On 06/04/2012 09:48 PM, Eli Barzilay wrote: > A few minutes ago, Jon Rafkind wrote: >> Also that example is somewhat bizarre.. I think the (clock a ...) >> template should be (get-clock) instead of ((get-clock) a ...), >> right? > No -- with that change you get a weir

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
I think its because without the (clock a ...) pattern the input (clock) is matched to the pattern 'clock' which matches by default. The pattern for just a lone identifier should be (in terms of syntax/parse) 'clock:identifier'. The docs for make-set!-transformer suggest to use a fender expressio

Re: [racket] quote-syntax in macro-generator

2012-06-01 Thread Jon Rafkind
mark that was used when `(make)' was expanded thus removing all marks from the final expansion. On 06/01/2012 12:16 PM, Jon Rafkind wrote: > Today's macro PSA is about macro-generating-macro forms. If you use a macro > to generate a transformer then you must be careful about nesti

[racket] quote-syntax in macro-generator

2012-06-01 Thread Jon Rafkind
Today's macro PSA is about macro-generating-macro forms. If you use a macro to generate a transformer then you must be careful about nesting `syntax' forms otherwise you will interpolate templates too many times. Specifically #'#'x will interpolate x twice. Given the following bindings: chick

Re: [racket] syntax-parse #:at

2012-05-21 Thread Jon Rafkind
w-syntax x ... ...) > > has > >(syntax-parse stx > [(_ x) > (with-syntax ([output (make-transformer x pattern template)]) >#'(define-syntax x output))]) > > Again, `x' appears in as the first sub-form of `make-transformer' --- > but th

Re: [racket] requiring in multiple phases

2012-05-21 Thread Jon Rafkind
(define-syntax-rule (require-for-all req ...) (require (for-meta -1 req ...) (for-meta 0 req ...) (for-meta 1 req ...)) (require-for-all "a.rkt" "b.rkt" "c.rkt") should work afaik On 05/21/2012 11:39 AM, Neil Van Dyke wrote: > If I want to "require" a module for multiple phases, is there a short

Re: [racket] syntax-parse #:at

2012-05-21 Thread Jon Rafkind
On 05/21/2012 10:06 AM, Jon Rafkind wrote: > On 05/21/2012 06:02 AM, Matthew Flatt wrote: >> At Sun, 20 May 2012 22:42:30 -0600, Jon Rafkind wrote: >>> The issue is why do I have to use a name other than 'name' for the >>> pattern variable on the line where i

Re: [racket] syntax-parse #:at

2012-05-21 Thread Jon Rafkind
On 05/21/2012 06:02 AM, Matthew Flatt wrote: > At Sun, 20 May 2012 22:42:30 -0600, Jon Rafkind wrote: >> The issue is why do I have to use a name other than 'name' for the >> pattern variable on the line where it says 'HERE'. If I use the >> 'nam

Re: [racket] syntax-parse #:at

2012-05-20 Thread Jon Rafkind
ause I need to execute analyze at phase 2. I get to phase 2 by using a let-syntax trampoline in the output of the 'define-new-syntax' macro. The 'pattern' and 'template' variables will have been replaced with their matched syntax as appropriate so the 'make-trans

Re: [racket] syntax-parse #:at

2012-05-17 Thread Jon Rafkind
Ok I see from the syntax/parse source that it uses lctx as the first argument to datum->syntax, so that mostly answers my question. On 05/17/2012 02:41 PM, Jon Rafkind wrote: > What exactly are the semantics of #:at inside a #:literal-sets ([x #:at y]) ? > > From the docs " If

[racket] syntax-parse #:at

2012-05-17 Thread Jon Rafkind
What exactly are the semantics of #:at inside a #:literal-sets ([x #:at y]) ? >From the docs " If the #:at keyword is given, the lexical context of the lctx >term is used to determine which identifiers in the patterns are treated as >literals;". In what way is 'lctx' used?

Re: [racket] `def' ?

2012-05-10 Thread Jon Rafkind
"Maybe we can eventually make language a complete impediment to understanding." http://www.strangehorizons.com/2006/20060313/verbing_weirds_language.gif On 05/10/2012 09:54 AM, Greg Hendershott wrote: > Should `def' be added as an alias for `define'? > > Possible reasons why: > 1. Most frequently

Re: [racket] render-metafunction font size

2012-05-03 Thread Jon Rafkind
May 3, 2012 at 3:35 PM, Matthew Flatt wrote: >> At Thu, 03 May 2012 14:18:17 -0600, Jon Rafkind wrote: >>> I am using `render-metafunction' from redex/pict inside a scribble >>> document but the resulting pict's font is too large. >> How about scaling the pict

[racket] render-metafunction font size

2012-05-03 Thread Jon Rafkind
I am using `render-metafunction' from redex/pict inside a scribble document but the resulting pict's font is too large. How can I make it smaller, or preferabbly use the same font size as the rest of the document? I found `current-font-size' from slideshow/base but that doesn't seem to be the ri

Re: [racket] redex: default matching behavior of patterns

2012-05-01 Thread Jon Rafkind
wrote: > This is heavily relied on. > > Robby > > On Tue, May 1, 2012 at 6:45 PM, Jon Rafkind wrote: >> The default matching behavior of patterns in redex will try to match >> duplicate pattern variables to the same term. Thus >> >> #lang racket >> &

Re: [racket] redex: default matching behavior of patterns

2012-05-01 Thread Jon Rafkind
Ok after 2 minutes more of thought I guess the response will most likely be "which integer will you be referencing in the result of the metafunction" -- so maybe it can be an error to use an unadorned pattern variable twice in a pattern? On 05/01/2012 05:45 PM, Jon Rafkind wrote: >

[racket] redex: default matching behavior of patterns

2012-05-01 Thread Jon Rafkind
The default matching behavior of patterns in redex will try to match duplicate pattern variables to the same term. Thus #lang racket (require redex) (define-language Z [x integer]) (define-metafunction Z simple : integer integer -> integer [(simple integer integer) 1]) (term (simple 1 2))

Re: [racket] What's involved in distributing a game that uses Allegro video game bindings?

2012-04-27 Thread Jon Rafkind
I put all the code here https://github.com/kazzmir/racket-allegro-4 It might not completely work, ill fix any minor bugs asap. On 04/27/2012 03:13 PM, Jon Rafkind wrote: > This is essentially what I was doing to distribute Allegro4. I'll put the > code on github so you can see how it

Re: [racket] Status of the Allegro bindings?

2012-04-13 Thread Jon Rafkind
tware rendering. On 04/13/2012 11:49 AM, Jon Rafkind wrote: > You should really use the allegro5 bindings, they should work on OSX unlike > the allegro4 bindings. The allegro.plt package bindings were for Allegro4. > > To answer your question the allegro.plt package should probably sho

Re: [racket] Status of the Allegro bindings?

2012-04-13 Thread Jon Rafkind
You should really use the allegro5 bindings, they should work on OSX unlike the allegro4 bindings. The allegro.plt package bindings were for Allegro4. To answer your question the allegro.plt package should probably show up on planet, its a bug that it doesn't. I think I was supposed to look into

Re: [racket] drracket does not work in Ubuntu 12.04 Beta 2

2012-04-09 Thread Jon Rafkind
Run this command $ sudo apt-get install libjpeg62 On 04/09/2012 04:36 PM, Jackson Lawler wrote: > I was using DrRacket for a class using PLAI on Ubuntu 11.10 with some issues > before the complete failure in 12.04 Beta 2. > It was very slow when it came to scrolling with my trackpoint, but movin

[racket] nightly build available as a ppa

2012-03-23 Thread Jon Rafkind
You can now get a nightly build of racket through the Ubuntu PPA system. https://launchpad.net/~plt/+archive/racket-nightly Here are the quick instructions to set it up $ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:plt/racket-nightly $ sudo apt-get update $ sudo

Re: [racket] phases

2012-03-05 Thread Jon Rafkind
s -- Matthias > > > On Mar 1, 2012, at 3:31 PM, Jon Rafkind wrote: > >> Recent problems with phases have led me to investigate how they work in more >> detail. Here is a brief tutorial on what they are and how they work with >> macros. The guide and reference have somethin

Re: [racket] phases

2012-03-01 Thread Jon Rafkind
Felleisen > wrote: >> Nice job. Now polish and add this write-up to the guide. Thanks -- Matthias >> >> >> On Mar 1, 2012, at 3:31 PM, Jon Rafkind wrote: >> >>> Recent problems with phases have led me to investigate how they work in >>> m

[racket] phases

2012-03-01 Thread Jon Rafkind
Recent problems with phases have led me to investigate how they work in more detail. Here is a brief tutorial on what they are and how they work with macros. The guide and reference have something to say about phases but I don't think they go into enough detail. Bindings exist in a phase. The l

Re: [racket] syntax-local-value of define-syntax-class

2012-02-27 Thread Jon Rafkind
phase 1. On 02/27/2012 01:32 PM, Jon Rafkind wrote: > Ok but it still doesn't work if I take out the (begin-for-syntax). > > (define-syntax-class x) > > Now its defined at phase 0. Anyway if I can get the syntax class I can access > its attributes (ryan said it was ok). >

Re: [racket] syntax-local-value of define-syntax-class

2012-02-27 Thread Jon Rafkind
1, but you're looking up a phase 0 binding here. > > Bug aside, I had no idea there was anything meaningful for external users to > do with the values underlying syntax classes. What does the value let you do? > > Carl Eastlund > > On Mon, Feb 27, 2012 at 3:21 PM, Jon Rafki

[racket] syntax-local-value of define-syntax-class

2012-02-27 Thread Jon Rafkind
I thought syntax-local-value would produce the syntax-class object that a given identifier is bound to but it errors out with 'x is not defined as syntax'. Any ideas why? There is one part of my original code base where this works and another where it doesn't. I cannot seem to replicate the part

[racket] copy syntax properties

2012-02-15 Thread Jon Rafkind
`datum->syntax' does not copy syntax properties from the 4th parameter to the new syntax object if the 2nd parameter is already a syntax object. What is the reasoning for this? Lexical context and source location are taken from the 1st and 3rd arguments so it seems inconsistent for syntax proper

Re: [racket] read (compiled): code compiled for version A, not B

2012-02-04 Thread Jon Rafkind
On 02/03/2012 07:01 PM, Neil Van Dyke wrote: > Is there a good and convenient way to avoid errors like these? > > compiled/info_rkt.zo::0: read (compiled): code compiled for version > 5.2.0.7, not 5.2.1.3 > > I was thinking maybe the "compiled" directories could have subdirectories for > Rack

Re: [racket] FFI: Casting pointers

2012-01-22 Thread Jon Rafkind
After a bit of reading, I arrived at this, which seems to work: > > (_fun ... > [vf : _OggVorbis_File-pointer > = (let ([file (malloc _OggVorbis_File 'interior)]) >(set-cpointer-tag! file OggVorbis_File-tag) >file)] > ..

Re: [racket] FFI: Casting pointers

2012-01-22 Thread Jon Rafkind
I'm pretty sure you can use cpointer-push-tag! http://docs.racket-lang.org/foreign/foreign_tagged-pointers.html?q=cpointer-push&q=in-lines&q=read-bytes&q=command&q=for/fold#(def._((lib._ffi/unsafe..rkt)._cpointer-push-tag!)) (let ([file (malloc)]) (cpointer-push-tag! file _OggVorbis-file-pointe

Re: [racket] Help with phases

2012-01-17 Thread Jon Rafkind
and its transformer is > applied and we get (list 1 0) , since >(p1 cnt=1) and (p2 0). > > > > On Tue, Jan 17, 2012 at 12:51 PM, Jon Rafkind <mailto:rafk...@cs.utah.edu>> wrote: > > I'm guessing a little bit but I think its because the `phases

Re: [racket] Help with phases

2012-01-16 Thread Jon Rafkind
I'm guessing a little bit but I think its because the `phases' macro is expanded at phase 2 before `set-compile' is called. If you put (set-compile) before the definition of `phases' then you get '(1 2). On 01/17/2012 12:06 AM, Veer Singh wrote: > > Why macro call (phases) produces '(1 0) and no

Re: [racket] raco auto - automatically compile dependencies

2011-12-08 Thread Jon Rafkind
After some more experiments it appears that 'raco make' actually does all of this. Oh well, alls well that ends well! On 12/08/2011 03:43 PM, Jon Rafkind wrote: I created a new tool for raco called 'auto' and put it on github. The purpose of the tool is to automatically

[racket] raco auto - automatically compile dependencies

2011-12-08 Thread Jon Rafkind
I created a new tool for raco called 'auto' and put it on github. The purpose of the tool is to automatically compile dependencies and make sure they are in sync with their source. https://github.com/kazzmir/raco-auto A new zo will be created in the following cases * no zo exists * source .r

Re: [racket] scribble: @verbatim inside macro

2011-11-23 Thread Jon Rafkind
This hack works for now: @(define-syntax-rule (my-example stuff) (begin @para{An example} (verbatim stuff))) On 11/23/2011 12:26 PM, Jon Rafkind wrote: I want to write a macro in scribble that will output a `verbatim' but I keep getting an error about 'expected pre-co

[racket] scribble: @verbatim inside macro

2011-11-23 Thread Jon Rafkind
I want to write a macro in scribble that will output a `verbatim' but I keep getting an error about 'expected pre-content? got #'. What should I do in the macro so that I can output verbatim? I tried various things other than `para' but none seem to work. @(define-syntax-rule (my-example stuff

[racket] require/provide inside a macro

2011-11-18 Thread Jon Rafkind
require and provide seem to exhibit strange behavior when used inside a macro. Here, the `all-prefix' macro works (because of the 'prefix-in' somehow) while the `all' macro doesn't. #lang racket/base (define-syntax-rule (all-prefix) (begin (require (for-meta 1 (prefix-in x: racket/base))

Re: [racket] reconstructing syntax objects

2011-11-17 Thread Jon Rafkind
On 11/17/2011 01:24 PM, Jon Rafkind wrote: On 11/17/2011 01:20 PM, Ryan Culpepper wrote: On 11/17/2011 12:28 PM, Jon Rafkind wrote: I have some code that deconstructs and reconstructs a syntax object. I'm pretty sure this code is at fault for not adding the proper lexical context back on

Re: [racket] reconstructing syntax objects

2011-11-17 Thread Jon Rafkind
On 11/17/2011 01:20 PM, Ryan Culpepper wrote: On 11/17/2011 12:28 PM, Jon Rafkind wrote: I have some code that deconstructs and reconstructs a syntax object. I'm pretty sure this code is at fault for not adding the proper lexical context back on so I get an error about 'no #

[racket] reconstructing syntax objects

2011-11-17 Thread Jon Rafkind
I have some code that deconstructs and reconstructs a syntax object. I'm pretty sure this code is at fault for not adding the proper lexical context back on so I get an error about 'no #%app bound'. (syntax-parse form [(form ...) (with-syntax ([(form* ...) (map honu->racket (syntax->list #

[racket] get-slides-as-picts dimensions

2011-10-31 Thread Jon Rafkind
I hacked up this short program to fade between slides. It seems to work well (although it won't work for animations) but I'm wondering how to get rid of the hard coded size constraints (640, 480). I just want to generate slides that would be the normal size they would have looked like if I was ru

Re: [racket] Graphics Issues in Ubuntu 11.10

2011-10-17 Thread Jon Rafkind
not sure what it would be called. There is a 'racket nightly' thing I think but I don't have a system set up to actually build and upload a new .deb each night. Do you need this fix to be installed on a bunch of different computers (and thus need the PPA to do it)? On 10/17/2011 06:

Re: [racket] Gathering GC statistics for Racket programs

2011-10-01 Thread Jon Rafkind
Looks neat. Can you add more statistics for gc time, like maximum/minimum/average/median? On 10/01/2011 04:50 PM, Sam Tobin-Hochstadt wrote: > Since Matthew added nice programmatic tools for understanding the > behavior of the GC, I've written a little tool to summarize the GC > behavior of your

Re: [racket] Poll: Does anybody besides Doug use 'plot'?

2011-09-30 Thread Jon Rafkind
> On the other hand, if you want Racket to be an exercise and showcase for > perfect backward compatibility, that might be interesting. Perhaps someone > can find > some novel techniques to help do that, and some way of demonstrating the > contribution (seamless backward compatibility througho

Re: [racket] internal define in define

2011-09-22 Thread Jon Rafkind
Yet another option that I mentioned was: | (+ 1 { n = 8 | (sqr x) = (* x x) | (sqr n) }) #lang honu (1 + { var n = 8; sqr(x){ x * x } sqr(n) }) > 65 Of course I sort of cheated and just (as in 5 seconds ago) changed {} from (begin ...) to (let () ...) __

Re: [racket] invoke macro stepper from command line

2011-09-14 Thread Jon Rafkind
hat uses 'expand/step' or > 'expand-module/step' from macro-debugger/stepper. You will need to set the > current > namespace to something suitable for what you're expanding. > > Ryan > > > On 09/14/2011 02:17 PM, Jon Rafkind wrote: >> Is th

[racket] invoke macro stepper from command line

2011-09-14 Thread Jon Rafkind
Is there a way to invoke the gui macro stepper from the command line? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] racket ppa for ubuntu

2011-09-04 Thread Jon Rafkind
on't know where that comes from (doesn't seem to be part of the > .desktop file). Oh hm, does it get them from > http://screenshots.debian.net/ ? Anyone want to upload some there? > > --Doug > > > On Sat, Feb 19, 2011 at 10:53 PM, Jon Rafkind wrote: >> Thanks

Re: [racket] Installing

2011-09-03 Thread Jon Rafkind
On 09/03/2011 03:33 PM, Sam Tobin-Hochstadt wrote: > On Sat, Sep 3, 2011 at 5:26 PM, Doug Orleans wrote: >> On Sat, Sep 3, 2011 at 5:09 PM, Sam Tobin-Hochstadt >> wrote: >>> There's and Ubuntu PPA here: >>> https://launchpad.net/~plt/+archive/racket m

Re: [racket] module->language-info at repl

2011-09-01 Thread Jon Rafkind
ain.rkt" and "racket/base.rkt", for example, > which are implemented in the `racket/private' language. > > At Thu, 01 Sep 2011 14:23:04 -0600, Jon Rafkind wrote: >> I changed #:info to >> >> #:language-info #('Z/runtime configure 'dont-care) &g

Re: [racket] module->language-info at repl

2011-09-01 Thread Jon Rafkind
ded to > `racket', then `racket' uses `configure-runtime' before instantiating > the module. > > At Thu, 01 Sep 2011 13:01:48 -0600, Jon Rafkind wrote: >> More details on how my system is setup: >> >> 1. Make a directory for a new language called Z >

Re: [racket] module->language-info at repl

2011-09-01 Thread Jon Rafkind
Z/main.rkt #lang racket/base (provide (all-from-out racket/base)) 4. Run with the Z language $ PLTCOLLECTS=`pwd`:$PLTCOLLECTS racket -Iq Z Welcome to Racket v5.1.3.6. > At this point I would expect it to say "called z-info" to try to set up the runtime. On 09/01/2011 12:50 PM, J

[racket] module->language-info at repl

2011-09-01 Thread Jon Rafkind
The repl doesn't seem to invoke the module language's get-info procedure. My #lang has a `get-info' procedure that is passed to the module-reader by #:info honu-info. get-info is defined as (provide honu-info) (define (honu-info key default default-filter) (printf "get info for ~a\n" key) (ca

Re: [racket] Racketizing Chrome

2011-08-30 Thread Jon Rafkind
I attempted to compile racket for chrome's sandbox (NaCL) but ran into a half dozen issues (functions like execv are not implemented). I haven't pursued it further but its probably possible. On 08/30/2011 06:30 PM, Ray Racine wrote: > Chrome has solidified their native app capability. Downside,

Re: [racket] How to use abstract classes?

2011-08-24 Thread Jon Rafkind
(super-new) > (define/override (child-method given-input) > (string-append "First got " given-input > > (define second-child-class% > (class* generic-parent-class% (child-interface) > (super-new) > (define/override (child-method give

Re: [racket] How to use abstract classes?

2011-08-24 Thread Jon Rafkind
You could use a mixin. http://docs.racket-lang.org/reference/mixins.html?q=mixin&q=class#(form._((lib._racket/private/class-internal..rkt)._mixin)) On 08/24/2011 08:31 AM, Alexander Kasiukov wrote: > Dear Racket users, > > What is the best way to make a class in Racket abstract? I would like to h

Re: [racket] heredoc syntax

2011-08-18 Thread Jon Rafkind
On 08/18/2011 04:00 PM, Eli Barzilay wrote: Three minutes ago, Jon Rafkind wrote: Ok. For future reference this is how its done: #lang at-exp racket @string-append{ foo bar } Yeah, and you can use a more convenient name, indent the text, and/or the whole thing, and get the same result. For

Re: [racket] heredoc syntax

2011-08-18 Thread Jon Rafkind
On 08/18/2011 03:34 PM, Eli Barzilay wrote: 50 minutes ago, Jon Rafkind wrote: Whats the syntax for heredoc strings? I was surprised that I couldn't find documentation for the lexical structure of racket. I also grepped the source for 'heredoc' but didn't come up with any

Re: [racket] heredoc syntax

2011-08-18 Thread Jon Rafkind
org/reference/reader.html?q=reader#(part._parse-string) Last paragraph Jay On Thu, Aug 18, 2011 at 2:43 PM, Jon Rafkind wrote: Whats the syntax for heredoc strings? I was surprised that I couldn't find documentation for the lexical structure of racket. I also grepped the source for 'here

[racket] heredoc syntax

2011-08-18 Thread Jon Rafkind
Whats the syntax for heredoc strings? I was surprised that I couldn't find documentation for the lexical structure of racket. I also grepped the source for 'heredoc' but didn't come up with anything. I like python's heredoc syntax -- triple quotes. """a heredoc string""", if such a thing could

[racket] keyword arguments in define-syntax-rule

2011-08-10 Thread Jon Rafkind
Can `define-syntax-rule' support keyword arguments? Preferably keywords with default values. (define-syntax-rule (foo #:x [x 5]) x) (foo) (foo #:x 2) If this sounds like a good idea and could be implemented I can give it a whirl. _ For list-relate

Re: [racket] Ubuntu PPA Problem

2011-08-06 Thread Jon Rafkind
Ok I just tested the PPA in 10.04 and it works (in i386). Can you try again? On 08/06/2011 08:21 AM, Jon Rafkind wrote: > Sorry about that. Launchpad is currently building the 10.04 PPA. Its > taking an extraordinary amount of time probably because their systems > are overloaded. Hop

Re: [racket] Ubuntu PPA Problem

2011-08-06 Thread Jon Rafkind
Sorry about that. Launchpad is currently building the 10.04 PPA. Its taking an extraordinary amount of time probably because their systems are overloaded. Hopefully it will complete within 24 hours or so. Strangely its only the i386 build that is still going, the amd64 is done so I'm not sure why

Re: [racket] External connection to Finndesign Liitin

2011-08-03 Thread Jon Rafkind
If I run liitin.rkt (either on the command line or in drracket) it complains there is no #lang line. When I add one I get this error compile: unbound identifier (and no #%app syntax transformer is bound) at: quote in: (quote (quote gaia:fibonacci:2011-01-01T12:00:00)) On 08/03/2011 04:36 AM, Jukk

Re: [racket] color partial lexemes

2011-08-02 Thread Jon Rafkind
On 08/02/2011 03:36 PM, Robby Findler wrote: > On Tue, Aug 2, 2011 at 4:18 PM, Jon Rafkind wrote: >> On 08/02/2011 12:57 PM, Jon Rafkind wrote: >> >> Oh sorry, I realize I was talking about two different things. I set up a >> test case that creates a color:text%

Re: [racket] color partial lexemes

2011-08-02 Thread Jon Rafkind
On 08/02/2011 12:57 PM, Jon Rafkind wrote: > Oh sorry, I realize I was talking about two different things. I set up > a test case that creates a color:text% and explicitly calls > `start-colorer' with the pairs, style, and get-token things I defined, > but for implementing a lan

  1   2   >