As an example, this prints twoonethree:
#lang scribble/base
@(printf "one")
@(printf foo)
@(define foo (begin (printf "two") "three"))
Context: I'm using Scribble to generate an exam, and I have some uses of
(set-random-seed) on the first few lines to set state for shuffling
question order la
Hi, I'm trying to do something that I think should be simple, and
can't figure out a good way to do it.
I want to get verbatim output (for code examples) in Scribbled PDF to
be _smaller_ than the default. (nested #:style 'smaller ...) has no
effect, and various other hacky things I've tried like
On Sat, Feb 21, 2015 at 10:58 PM, Matthew Flatt wrote:
> For PDF output, you can use the string "smaller" instead of the symbol
> 'smaller:
>
> (nested #:style "smaller" ...)
Cute. That seems like it'll do the trick. Thanks!
Racket Users list:
http://lists.racket-lang.
Hi, I'm trying to do something that I think should be simple, and
can't figure out a good way to do it.
I want to get verbatim output (for code examples) in Scribbled PDF to
be _smaller_ than the default. (nested #:style 'smaller ...) has no
effect, and various other hacky things I've tried like
autobib structures that scriblib/bibtex creates, and
more freely mix autobib cites with key-based cites.
Either way, thanks!
>
> On Thu, Jul 10, 2014 at 10:29 PM, Joe Gibbs Politz wrote:
>>> You can just edit the file in your copy of racket and then run 'raco setup'.
>>
&
> You can just edit the file in your copy of racket and then run 'raco setup'.
Good point, thanks, that'll work in a pinch for the final build.
Still open to other ideas, because among myself and my co-authors
there are probably half a dozen machines that this might end up
getting built on, so so
I was getting some odd behavior on authors whose names ended in "and"
when compiling a bibliography, and dug into the source a bit. A
little armchair debugging: should this line
https://github.com/plt/racket/blob/88d8a2a9f86b15b3c65cdc232ec05cc6a0f5d6bd/pkgs/scribble-pkgs/scribble-lib/scriblib/bi
> I didn't know about `local-require`.
Neither did I. Thanks!
Racket Users list:
http://lists.racket-lang.org/users
+1 for having hit this minor bump (probably for the same use case as
Greg: Frog templates).
I used dynamic-require, after having tried plain require and getting
this error message.
On Tue, Nov 26, 2013 at 12:17 AM, Greg Hendershott
wrote:
> Why doesn't `require` work in a file provided to `incl
That planet package may be out of date; I use Whalesong but haven't
tried using that version. I've been pulling and building directly
from https://github.com/dyoo/whalesong/tree/master/whalesong. Maybe
try getting Whalesong from there and see if you have the same problem?
On Mon, Nov 25, 2013 at
For an example of using ragg along with Racket's lexer tools, you can
look at Pyret:
Tokenize from an input port:
https://github.com/brownplt/pyret-lang/blob/master/src/lang/tokenizer.rkt
The ragg grammar for Pyret (which uses tokens defined in tokenizer.rkt):
https://github.com/brownplt/pyret-
pretty sure are bugs, you're also welcome to hit
> https://github.com/greghendershott/frog/issues (just that repo is
> fine; don't worry about whether it's likely a bug in Frog or the
> Markdown parser, I can sort that out on my end).
>
>
> On Mon, Oct 21, 2013 at 9:3
I want to write an index page with some handwritten HTML using Frog,
and I want it to include source code. Two issues. First, it seems
like Frog doesn't respect my structure. If I write something
like this in _src/index.html:
# Index page
Some exciting text!
fun sum(l :: List)
racket, rkt:
>
> How I got that was using
>
> $ sudo easy_install Pygments
>
> just like you did. So if you got an older version, I'm not sure why on
> your particular Linux...?
>
>
> On Sun, Oct 20, 2013 at 8:39 PM, Joe Gibbs Politz wrote:
>> OK, my version
I get: Error: no lexer for alias 'a-lexer-that-does-not-exist' found
>
>
> On Sun, Oct 20, 2013 at 7:53 PM, Joe Gibbs Politz wrote:
>> Trying to get set up with Frog, hit the following:
>>
>> $ raco pkg install frog
>> $ mkdir scratch/frog-test
>>
Trying to get set up with Frog, hit the following:
$ raco pkg install frog
$ mkdir scratch/frog-test
$ cd scratch/frog-test
$ raco frog --init
Frog 0.7
Configuration /home/joe/scratch/frog-test/.frogrc not found; using defaults.
Creating files in /home/joe/scratch/frog-test/:
/home/joe/scratch/fro
If someone pings me after SPLASH, I can probably find some time to update
the tutorial.
On Wed, Oct 16, 2013 at 9:46 PM, Sam Tobin-Hochstadt
wrote:
> I'm happy to help with this. I think it would be better to do it with
> you asking me questions, though -- that will expose more of the real
> is
Hi!
I want to try and get auto-indentation for Pyret working in DrRacket.
What APIs should I be looking at for doing this? It seems like a
color-lexer is about the limit of what I can do via the get-info of a
#lang, right? Do I need to implement a drracket:language:language<%>?
A mode?
I'm a l
On Wed, Sep 11, 2013 at 12:57 PM, Dmitry Pavlov wrote:
> Hi Joe,
>
> Thank you. Actually my goal is to run files that do
> not contain the #lang declaration--only pure non-Racket
> non-sexp code. Is there a way to (dynamic-require)
> a module with an externally preset language? I do not know.
Not
Hi Dmitry,
I've been using `dynamic-require` for Pyret, a non-SEXP based
language. For example, here's part of our command-line interface:
https://github.com/brownplt/pyret-lang/blob/master/src/cmdline.rkt#L116
You can ignore the parameterization under `check-mode`, which is Pyret
specific. Th
I got the following error from raco exe, and could use some pointers
in turning it into something actionable. I think I just don't have a
very good mental model of what raco exe is trying to do. Here's the
output:
$ raco exe -o binary /main.rkt
find-module: module referenced both as a library a
> Yes, I've pushed the latest version of "sigplanconf.cls".
Thanks!
Racket Users list:
http://lists.racket-lang.org/users
//docs.racket-lang.org/scribble/SIGPLAN_Paper_Format.html#%28def._%28%28lib._scribble/sigplan..rkt%29._copyrightdata%29%29
> -Ian
> ----- Original Message -
> From: "Joe Gibbs Politz"
> To: users@racket-lang.org
> Sent: Thursday, August 1, 2013 8:59:25 PM GMT -05:00 US/Canada East
Hi!
I'm producing a scribble/sigplan camera-ready paper, and can't get the
copyright text quite right.
I got different copyright text from the publisher than what's included
with Scribble in collects/scribble/sigplan/sigplanconf.cls for the
definition of \permission. I can modify the .cls file i
s.
There are still macros in the emitted program, but there is no
(intended) runtime expansion after the initial macros are dealt with.
Are there other common C-based code entry points we might be running afoul of?
>
> Robby
>
>
> On Thu, Jul 11, 2013 at 4:07 PM, Joe Gibbs Po
We're trying to profile some slow running programs in a #lang, and
having some trouble getting believable results from the profiler. In
particular, it claims that most (e.g. 60-80%) of the time is spent in
/usr/lib/racket/collects/profile/main.rkt:29:2
We've tried on up to 15-20 second runs of p
On Thu, Jun 6, 2013 at 11:01 AM, Jay McCarthy wrote:
> I'm curious why you think Mustache is better than Scribble (and the
> full power of Racket) in your templates?
In this case, I'm willing to give Mustache a chance for a few reasons:
1. Some bias from a web programmer who finds Mustache-like
On Wed, Jun 5, 2013 at 9:37 PM, Erik Pearson wrote:
> @joe I have a relatively simple implementation of "mustache" templates
> that I use for web server templating.
>
> Something similar to your example would be
>
> (render "Welcome {{username}}" #hasheq((username . "erik")))
>
> where the data is
I'm writing a web server in a #lang that doesn't support macros or
syntactic abstraction. I would like to be able to use some sort of
templating dynamically with bindings given by values, e.g.
template.render("page-with-hole-for-username.html", { username: "Joe" })
The FAQ
(http://docs.racket-l
Arjun Guha (CC'ed) wrote TestFest in Racket
(https://github.com/brownplt/testfest) a few years ago to run
students' tests and implementations against one another. It seems
pretty close to what you want, and might be a good place to start.
Cheers!
Joe
On Fri, May 17, 2013 at 4:36 PM, Danny Heap
> Here is a sketch: [...]
Great, thanks! my-bb is enough to get some simple cases working
already, and it should work for everything I have in mind.
I didn't realize that I could use (require 2tdhp/private/world) like
that; world% is what I thought I needed and I thought `private` meant
I couldn
I'd like to write a library function that takes a hash table of
handlers and starts a running world in big-bang style, for example:
(my-big-bang
0
(make-immutable-hash
`((on-tick . ,add1)
(stop-when . ,(lambda (x) (> x 100))
Is there an interface that I could use to write this? I sup
Thanks, unnumbered will be good enough for now.
On Wed, Mar 27, 2013 at 9:03 AM, Sam Tobin-Hochstadt wrote:
> For this, I've just used explicit escapes to Latex. You'd probably
> need to explicitly escape the section references as well.
>
> Sam
>
> On Tue, Mar 26
Hi!
Is there an easy way to add a latex-style appendix in scribble? I'm
writing in scribble/sigplan and don't see any obvious appendix options
searching the docs.
I can just put a section after the bibliography, but it gets numbered like
other sections and the I have to reference it as "the appe
Hi! I'm trying to use path->bibdb and/or bibtex-parse on a bibtex file,
and I'm getting a bibdb where bibdb-raw looks good, but bibdb-bibs is an
empty hash. I'm not missing some initialization step, am I? Am I supposed
to be constructing the bib structs on my own or something? A little
confused
n we'll have to
> incrementally add things to the library as they are discovered in the wild.
>
> Jay
>
>
>
> On Sun, Mar 24, 2013 at 5:15 PM, Joe Gibbs Politz wrote:
>
>> When I cite a @mastersthesis in bibtex to be cited with scriblib/bibtex,
>> I get the f
When I cite a @mastersthesis in bibtex to be cited with scriblib/bibtex, I
get the following error:
Warning: some cross references may be broken due to undefined tags:
(autobib-date "'#hash((type . \"mastersthesis\") (\"year\" . \"2004\")
(\"title\" . \"Starkiller: A Static Type Inferencer and Co
Hi! I'm trying to use path->bibdb and/or bibtex-parse on a bibtex file,
and I'm getting a bibdb where bibdb-raw looks good, but bibdb-bibs is an
empty hash. I'm not missing some initialization step, am I? Am I supposed
to be constructing the bib structs on my own or something? A little
confused
e:
> On Sat, Feb 9, 2013 at 2:25 PM, Joe Gibbs Politz wrote:
>>
>> I can't move all of my require/typed declarations to the end of my TR
>> files, either, since the declarations are needed before certain uses
>> of the bindings I bring in. Is there a recommended rule
> to struct-predicate-procedure? and something might depend on that for
> optimizations.
>
>
> On Fri, Feb 8, 2013 at 8:20 PM, Joe Gibbs Politz wrote:
>>
>> When using require/typed with a struct type in the signature, it seems
>> to matter if the require comes bef
When using require/typed with a struct type in the signature, it seems
to matter if the require comes before or after the struct definition:
typed.rkt
=
#lang typed/racket
(require/typed "untyped.rkt"
[number-me (my-struct -> Number)])
(struct: my-struct ())
(number-me (my-struct))
un
It seems like `cast` doesn't work at all in typed/racket/no-check:
#lang typed/racket/no-check
(cast 5 Number)
../../usr/lib/racket/collects/racket/contract/private/blame.rkt:89:0: 5:
broke its contract
promised: #f
produced: 5
in: #f
contract from: cast
blaming: cast
at: unsaved-editor108
Question about a TR regression in 5.3.2
This worked in 5.3.1:
typed.rkt
===
#lang typed/racket
(provide wrap)
(define: (wrap (p : Procedure)) : Procedure
(λ (_) p))
untyped.rkt
===
#lang racket
(require "typed.rkt")
(define f (λ (n) n))
((wrap f) 5) ;; returns f itself; f is e
43 matches
Mail list logo