For now, you can use sequence-map to turn the hashtable into a sequence of
vectors.
#lang racket
(require math)
(require plot)
(discrete-histogram (sequence-map vector (in-hash (samples->hash '(1 2 3 4
4)
But it would be nicer if discrete-histogram took a hash as input.
On Tue, Jun 7,
On Sun, Jun 12, 2016 at 9:53 PM, Daniel Prager
wrote:
> It seems that math libraries are a sweet-spot for TR. What else?
>
>
The math library has to deal with all the same growing pains (inst, assert).
I think part of the reason it looks so good is that it sparked
the list ...
>
> On Sun, Jun 12, 2016 at 4:56 PM, Ben Greenman <benjaminlgreen...@gmail.com
> > wrote:
>
>> Yep, use `inst` to instantiate the polymorphic variables to sort.
>>
>> #lang typed/racket
>>
>> ((inst sort (List Symbol Integer) Integer)
>
On Sat, Jun 11, 2016 at 12:46 AM, Daniel Prager
wrote:
> Do you have an alternative recommendation in mind?
I guess you already solved this one, but for later it might help to avoid
macros.
--
You received this message because you are subscribed to the Google
start.
>
> I can see that staying clear of macros avoids an additional layer of
> sophistication.
>
> Dan
>
>
> On Sat, Jun 11, 2016 at 5:13 PM, Ben Greenman <benjaminlgreen...@gmail.com
> > wrote:
>
>>
>> On Sat, Jun 11, 2016 at 12:46 AM, Daniel Prager
>
> I believe that ocaml has a special ;; character in the language specially
> for
> handling situations like that.
>
Yep, similar to how Python looks for 2 consecutive newlines to end a block.
(OCaml's ;; is sometimes useful in files, but those cases are very rare.
Yes, that's from scribble/manual. It's Racket's version number. Changing
the first two lines of code to:
#lang scribble/base
@(require scribble/core)
Removes the version number.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe
At first I thought these were torture instruments.
On Wed, Jun 22, 2016 at 3:32 PM, 'John Clements' via Racket Users <
racket-users@googlegroups.com> wrote:
> So… I name some of my machines after medieval instruments. Crumhorn,
> sackbut. Time for a new one. List of medieval instruments? Sure,
Just got the same error in a different file, here's a small example.
(If I call local-expand on a (cast ...) expression, seems I can't use that
expression anymore -- but I can still use the expanded version)
#lang typed/racket
(require (for-syntax racket/base syntax/parse))
(define-syntax (f
You are probably using a student language instead of #lang racket
To fix put "#lang racket" at the top of your program
or click the language button at the bottom-left of your Dr.Racket window
and pick a non-teaching language.
On Mon, May 23, 2016 at 1:47 PM, 'Leo Rokon' via Racket Users <
Try `include-template` from `web-server/templates`
http://docs.racket-lang.org/web-server/templates.html#%28form._%28%28lib._web-server%2Ftemplates..rkt%29._include-template%29%29
(Maybe combined with `@literal` from `scribble/html`)
Example:
;; static.html
static content
;; main.scrbl
#lang
Whoops, I thought it would be easy to put raw HTML in a normal scribble
document using @include-template[]. But I can't figure out how to do it.
The trick I use for LaTeX is:
@(make-element (make-style "relax" '(exact-chars)) "any$\tau$hing")
and 'exact-chars doesn't work for HTML. Sorry for
would work.
But if you want to keep using scribble/html, here's a Makefile that I use
to turn .rkt files into static .html pages:
https://github.com/nuprl/gtp/blob/gh-pages/Makefile
]]
On Sun, May 22, 2016 at 4:42 PM, Hendrik Boom <hend...@topoi.pooq.com>
wrote:
> On Sun, May 22, 2016 at 02
On Fri, Jul 15, 2016 at 12:31 PM, Matthias Felleisen
wrote:
> > On a separate question: How do I contribute to the docs?
>
> git pull requests on github are highly welcome.
The easiest way to make a docs pull request is to:
1. Go to github.com, find the file you want to
Hi, does anyone have an efficient `sequence-append*` function that takes a
sequence of sequences and returns the sequence that has all elements from
each, in order?
Here is my version. It works, but I'm wondering if there's a better way.
(require racket/generator)
;; (Sequenceof (Sequenceof A))
Here's something in the ballpark.
#lang racket
(define-namespace-anchor nsa)
(define ns (namespace-anchor->namespace nsa))
(let ((xyz 1))
(for ((name '(x y z)))
(namespace-set-variable-value! name (lambda () (displayln (format "~a:
~a" name xyz)) (set! xyz (add1 xyz))) #f ns)))
(eval
Does anyone have code for statically approximating the arity (and keywords)
of a function?
Examples of my dream function static-procedure-arity:
> (static-procedure-arity #'(lambda (x) x))
1
> (static-procedure-arity #'(lambda (x #:y y . z) x))
(arity-at-least 1)
> (static-procedure-arity
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 your address, I will mail you some stickers. For free!*
I'm thinking 4 stickers per request (2 rectangles, 2 circles), but if
gt;
> that's a great idea. I'd like to order some at a local supplier for
> distributing them in Germany/Europe.
>
> Are there any legal issues to consider? (I did not find anything in the
> documentation.)
>
> Kind regards,
> Daniel
>
> Am 24.01.2017 um 22:15 schrieb Be
The third result is #f because in the third example, stx is `(annotate
(annotate 4 2))`. So the first pattern matches and `val` is the syntax
`(annotate 4 2)`.
You can get a "strict" evaluation order by using `local-expand` inside the
`annotate` macro. For example:
#lang racket
(define-syntax
The printed explanation is giving the meaning of the whole line (in the
context of the call to member) --- not just the meaning of the application
(null? lat)
Hope this helps
On Sat, Feb 25, 2017 at 11:17 AM, Kieron Hardy
wrote:
> I'm going through The Little Schemer
Yep that's a typo.
I've pushed a fix; thanks for reporting!
https://github.com/racket/racket/commit/591d57b5bc11784b4d34860b26840ffe874bfb91
On Wed, Feb 22, 2017 at 10:36 PM, Vladimir Gajic
wrote:
> Is "(make-plumber) → pluber?" a typo in 14.11 Plumbers documentation?
Here's a version of your code that runs in the Intermediate Student
language ("local" isn't part of Beginning Student):
(define (maxval lst)
(local ((define (aux lst max)
(cond [(null? lst) max]
[(> (car lst) max) (aux (cdr lst) (car lst))]
I can do this in the normal Racket repl:
(define (f x)
(define-syntax-rule (rev-apply x g)
(g x))
(rev-apply x add1))
(f 3)
;; ==> 4
I'd like to put a `(debug-repl)` inside the definition of `f` and call
`rev-apply` in that debug repl too.
On Fri, Jan 20, 2017 at 6:52 AM, Philip
Also try `call-with-limits` from racket/sandbox
http://docs.racket-lang.org/reference/Sandboxed_Evaluation.html#%28def._%28%28lib._racket%2Fsandbox..rkt%29._call-with-limits%29%29
On Thu, Aug 18, 2016 at 6:37 PM, Matthias Felleisen
wrote:
>
> Do you mean something like
I would use `system*` or `process*` with `(find-exe)` [1] as the first
argument.
You might also like `find-console-bin-dir` [2].
[1]
http://docs.racket-lang.org/raco/exe.html#%28def._%28%28lib._compiler%2Ffind-exe..rkt%29._find-exe%29%29
[2]
On Wed, Sep 7, 2016 at 10:35 AM, Tim Brown wrote:
> ffi-types.rkt:19 is:
> ..
> 17 (require/typed
> 18 ffi/unsafe
> *19 [#:opaque CPointer cpointer?] ; includes Bytes and other things
> that can be used as cpointers
> 20 [#:opaque CType ctype?]
> 21 )
> ..
Whew, fantastic! Thank you.
(Should I tell the Fundamentals I students about R6RS?)
On Tue, Sep 20, 2016 at 11:32 AM, Asumu Takikawa <as...@simplyrobot.org>
wrote:
> On 2016-09-20 11:27:07 -0400, Ben Greenman wrote:
> >Oh! Just found that common lisp used these for types:
>
Just confused, is there any reason that 'd' 'e' 'f' 's' 'l' are all
accepted as exp-mark s?
http://docs.racket-lang.org/reference/reader.html%20numbers#%28part._parse-number%29
Before I came here I asked Wolfram Alpha. It says:
- 3d3 is probably "3 dice with 3 sides each" and prints a histogram
Oh! Just found that common lisp used these for types:
- s = short
- f = single
- d = double
- l = long
http://www.gigamonkeys.com/book/numbers-characters-and-strings.html
Is this still true for Racket?
On Tue, Sep 20, 2016 at 11:25 AM, Ben Greenman <benjaminlgreen...@gmail.com>
wrote:
Maybe:
https://pkgn.racket-lang.org/package/hyphenate
On Sun, Oct 2, 2016 at 3:30 PM, Jos Koot wrote:
> Hi to all of this nice list,
>
> IIRC I have seen a tool to put optional hyphens in running text in order
> to allow scribble to break words at the end of a line.
>
>
Maybe this will help:
(struct interval (small big guesses))
creates 5 new functions
1. interval, for making intervals. For example (interval 5 10 0) creates
an interval from 5 to 10 that has 0 guesses
2. interval?, for testing if a value is an interval. For example
(interval? 1) is
Or:
(build-list n (lambda (dont-care) (make-random-string)))
On Tue, Oct 25, 2016 at 10:42 PM, Robby Findler wrote:
> I would probably write that function like this:
>
> #lang racket
>
> (provide
> (contract-out
> [make-a-string (-> non-empty-string?
Can you show us findSense?
The error message is saying there's an extra pair of parentheses somewhere,
for example:
> (1)
> (define-struct foo () #:transparent)
> ((foo))
On Wed, Oct 26, 2016 at 1:16 PM, Ken MacKenzie wrote:
> New to racket and playing with a little
Here!
https://github.com/racket/web-server/blob/master/web-server-doc/web-server/scribblings/dispatch.scrbl
(If you install `raco-find-collection`, then running `raco fc web-server`
should bring you close to the right place.)
On Tue, Nov 8, 2016 at 4:38 PM, Luke wrote:
>
Do you have racket-mode installed?
https://github.com/greghendershott/racket-mode
--
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
to
>
>
> Any connection to Jesse's affine contracts?
>
> http://planet.racket-lang.org/package-source/tov/affine-
> contracts.plt/2/2/planet-docs/manual/index.html
Whoa, I didn't know those existed. Cool!
--
You received this message because you are subscribed to the Google Groups
"Racket Users"
I vote that you stick with Excel & change the version control protocol.
Maybe:
http://stackoverflow.com/a/17106035/5237018
On Fri, Oct 21, 2016 at 9:22 AM, Matthias Felleisen
wrote:
>
> See Claire’s paper on cKanren. Scheduling is one of her examples (though
> small
You can disable El Capitan's "system integrity protection".
http://stackoverflow.com/questions/30768087/restricted-folder-files-in-os-x-el-capitan
On Wed, Oct 19, 2016 at 1:09 PM, David Storrs
wrote:
> I have it on OSX running on metal. My understanding (possibly wrong)
with-cache is a small package for saving the results of an expression to
the filesystem
#lang racket/base
(require pict with-cache)
(define (get-fish)
(with-cache (cachefile "stdfish.rktd")
(λ () (standard-fish 100 50
(get-fish) ;; Builds a fish
(get-fish) ;; Reads a fish from
frame% ...)'
>
> The object itself is essentially a collection of large (about 1 items)
> vectors (about 30 of them) plus some metadata.
>
> Thanks,
> Alex.
>
> On Wednesday, November 23, 2016 at 1:11:27 PM UTC+8, Ben Greenman wrote:
> > with-cache is a small package f
On Tue, Nov 15, 2016 at 11:57 AM, David Storrs
wrote:
> I did not, but that's a very nice feature. Unfortunately, I'm an Emacs
> guy. :/
Then you have no excuse for not making a λ macro.
--
You received this message because you are subscribed to the Google Groups
Typo: I meant "the `define-literal-syntax-class` macro", from here:
https://groups.google.com/d/msg/racket-users/9e_oNlLODeY/MUqGM_r6BwAJ
On Fri, Nov 18, 2016 at 7:03 PM, Ben Greenman <benjaminlgreen...@gmail.com>
wrote:
>
> On Wed, Nov 16, 2016 at 6:05 PM, D
On Wed, Nov 16, 2016 at 6:05 PM, Dan Liebgold
wrote:
> First, I'm trying to define a syntax-class that is just a set of literals,
> and I'm wondering if there is a slightly better way that this:
>
> * http://pasterack.org/pastes/86722
>
> I'd just prefer to not
The trick is that 'whitespace' isn't just #\space. It's any sequence of
whitespace characters, like "\r\r\r" or " \r\n\t"
On Wed, Nov 2, 2016 at 12:12 AM, wrote:
> Hi,
>
> when using the search function for the Racket-docs
> with string-trim I found:
>
> -
>
Indirect answer: could you use `command-line` instead?
#lang racket/base
(require racket/cmdline)
(define input-from (make-parameter #f))
(command-line
#:program "sample"
#:once-each
[("-i" "--input-file")
i
"Use as the input file."
(input-from i)]
#:args (file)
(printf "my
I've installed Racket 6.6 from download.racket-lang.org and I'd like to
submit a change to the HTDP repo.
(This question is not really specific to HTDP, anyway)
Before I submit the edit, I want to test the change on my machine, so I
figure I'll make a clone of the htdp package:
$ raco pkg
tho...@me.com> wrote:
> On Wednesday, October 12, 2016 at 6:54:45 AM UTC-4, Ian Thomas wrote:
> > On Tuesday, October 11, 2016 at 9:50:12 PM UTC-4, Ben Greenman wrote:
> > > Indirect answer: could you use `command-line` instead?
> > >
> > >
> > >
>
yes yes yes
Thank you!
On Wed, Oct 12, 2016 at 12:01 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote:
> At Wed, 12 Oct 2016 11:34:06 -0400, Ben Greenman wrote:
> > I've installed Racket 6.6 from download.racket-lang.org and I'd like to
> > submit a change to the HTDP repo.
&
There are 3 parties that could be blamed:
1. the context that calls `foo`
2. the function `foo`
3. the contract on `foo`
On Thu, Dec 15, 2016 at 5:05 PM, Alexis King wrote:
> Many thanks to both of you for the explanation and examples. I admit
> I’ve seen that paper
"Purely Functional Data Structures"
https://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504
On Tue, Dec 13, 2016 at 1:22 PM, Lawrence Bottorff
wrote:
> Can someone suggest a good text for data structures that would compatible
> with Racket? All I see
On Thu, Dec 1, 2016 at 7:29 PM, David Storrs wrote:
> I'm having trouble understanding the docs on hash contracts (
> https://docs.racket-lang.org/reference/data-structure-
> contracts.html#%28def._%28%28lib._racket%2Fcontract%
> 2Fprivate%2Fhash..rkt%29._hash%2Fc%29%29)
Run `raco pkg install sxml` and use `(require sxml)`.
On Tue, Jan 3, 2017 at 1:54 PM, Robert Kirkpatrick <
robert.kirkpatrick...@gmail.com> wrote:
> Newbie question:
> I can't find a way to install a sxml pkg (require (planet sxml))
> TIA,
> Robert.
>
> --
> You received this message because you
You can use it with keyword-apply
(define (foo #:x x) (+ x 3))
(keyword-apply foo (list (string->keyword "x")) (list 8) '())
;; ==> 11
http://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._keyword-apply%29%29
On Mon, Jan 9, 2017 at 12:47 PM,
Sure. What's your mailing address?
On Tue, Mar 28, 2017 at 4:55 AM, Adeoluwa Adejumo <adejumoadeol...@gmail.com
> wrote:
> On Tuesday, 24 January 2017 22:15:59 UTC+1, Ben Greenman wrote:
> > Hi Racket Users,
> >
> >
> > I ordered a bunch of Racket stickers to ce
https://github.com/racket/racket/pull/1626
--
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
to racket-users+unsubscr...@googlegroups.com.
For more options, visit
Racket stickers and t-shirts are now on devswag.com
- https://devswag.com/products/racket
- https://devswag.com/products/racket-t-shirt
Looking for a last-minute St Patrick's Day gift?
Or a Fathers' Day gift for the Racketeer that has it all?
Then LOOK NO FURTHER!
(Half the proceeds from
Adding a field also fixes the problem:
#lang scribble/manual
@require[@for-label[racket]]
@defstruct*[(abcdefghijklmnopqrstuvwxyzABCDEEFGHIJKLMNOPQRSTUVWX-Z ABCD)
([hi integer?])]{}
and the problem has to do with how `defstruct*` renders the first line of a
struct declaration. If the struct
On Mon, Mar 6, 2017 at 1:18 AM, kay wrote:
> Looks like it might be worth mentioning somewhere in the documentation
Good idea, what do you think of this change:
https://github.com/racket/typed-racket/pull/508
--
You received this message because you are subscribed to the
Maybe, just add a note to the docs?
On Mon, Apr 17, 2017 at 4:56 PM, Vincent St-Amour <
stamo...@eecs.northwestern.edu> wrote:
> The latter is easy to fix; I've submitted a pull request.
>
> The former is trickier. The problem is not so much due to the step size
> itself, but rather to a
One idea:
- write your program just like that, `1 + 2` with no #lang line,
- run your program with a raco command that runs the program once for each
language
Something like `raco mystery-lang -L lang1 -L lang2 -L lang3 file.txt`
In case you need an example raco-command:
Maybe related:
https://groups.google.com/forum/#!topic/racket-users/6fKGky4tud8
On Sun, Jul 16, 2017 at 8:26 AM, Philip McGrath
wrote:
> Could you share the code that is producing the error? The following, for
> example, defines a struct with two fields:
>
> (struct
You can assign numbered captions to figures with `figure` from
`scriblib/figure` (and reference them with `figure-ref`).
http://docs.racket-lang.org/scriblib/figure.html
I don't know how to caption tables or number equations in Scribble.
On Thu, Jul 6, 2017 at 7:50 AM, Dmitry Pavlov
>
> Especially oddly, running scribble with --latex and then manually making
> the PDF works, except that the table of contents is blank.
>
Check if it works when you make the PDF twice.
This sounds like it's trouble resolving cross references.
Maybe there's a bad character in a label [1], maybe
(with-input-from-file "file.txt"
(lambda ()
(for ((line (in-lines)))
)))
On Tue, Jul 18, 2017 at 12:46 PM, Leith wrote:
> Basic question, but I can't seem to find a good answer. What is an
> example of "idiomatic" file I/O using racket? Like, for example,
3 hints:
- `type-check` can call any helper functions defined with
`define-for-syntax`
- Turnstile uses `local-expand` to expand any macros in subterms (in your
case, any macros in `x` and `y`)
- start using `syntax-parse` :)
On Tue, Jul 18, 2017 at 6:11 PM, Matthias Felleisen
Type inference is failing you again.
If you instantiate `foo/s`, you get the type you expect:
#lang typed/racket
(struct (a) Foo ([val : (-> a a)]))
(: foo/s (All (a b)
(-> (-> a b)
(-> (Foo a)
(Foo b)
(Foo b)
mflatt answered some "why"s on the racket-dev list:
https://groups.google.com/d/msg/racket-dev/2BV3ElyfF8Y/4RSd3XbECAAJ
On Thu, Jul 20, 2017 at 12:34 AM, Lehi Toskin wrote:
> I've read through a few README's in the racket7 repo and I can't find
> anything specifically
On Fri, Apr 28, 2017 at 11:08 AM, Daniel Bastos wrote:
> interview done with Guido van Rossum
http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html
Related:
lexical scope is interesting *theoretically*, but its inefficient to
> implement; dynamic scope
Right ... it's about "growable stack languages" or "infinite stack
languages" or "heapful languages" or something like that.
On Fri, Apr 28, 2017 at 11:29 AM, Matthias Felleisen <matth...@ccs.neu.edu>
wrote:
>
> > On Apr 28, 2017, at 11:12 AM, Ben G
The syntax-parse-example package is a showcase of useful macros written
using syntax-parse.
https://pkgs.racket-lang.org/package/syntax-parse-example
At the moment, the showcase is nearly empty ... but it's easy to contribute!
0. Design a beautiful macro, give it a name e.g. BOB
1. Run `raco pkg
#lang scribble/manual
@require[
(only-in scribble/core style)
(only-in scribble/html-properties attributes)]
@(define new-window-style
(style #f (list (attributes '((target . "_blank"))
@hyperlink[#:style new-window-style "https://www.racket-lang.org"]{Racket}
On Tue, Jun 20, 2017
Is the y-axis on the first plot labeled correctly? It's reporting fractions
of a millisecond, but the text talks about 7 vs. 40 seconds.
Also the timings links aren't working for me:
https://www.brinckerhoff.org/img/hash-table-timings.rkt
Try `(call-with-values func void)`
http://docs.racket-lang.org/reference/values.html#%28def._%28%28quote._~23~25kernel%29._call-with-values%29%29
On Tue, May 16, 2017 at 5:56 PM, David Storrs
wrote:
> I have a macro that wraps a function call in some debugging
com>
wrote:
> On Tuesday, January 24, 2017 at 10:15:59 PM UTC+1, 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/sticke
Maybe the issue is line 52 of math/private/distributions/utils (it seems
like a typo to me)
(define-type type-name (struct-name Real Flonum))
I think this means that the type Discrete-Uniform-Dist is really
(discrete-uniform-dist-struct Real Flonum).
Anyway, if I change the return typed of
>
> This is a nice idea, though possibly complicated to implement (AFAICT it
> would require annotating the HTML of a given part of the documentation with
> a reference to the source code that originally generated it, and in a way
> that can be generalized to every Racket project, not just the
unconstrained-domain->
http://docs.racket-lang.org/reference/function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._unconstrained-domain-~3e%29%29
On Tue, Jun 13, 2017 at 11:24 AM, David Storrs
wrote:
> Suppose the following trivial function:
>
>
'(1 2 3) is short for (list 1 2 3)
which is short for (cons 1 (cons 2 (cons 3 null))
which is different from (mcons 1 (mcons 2 (mcons 3 null)))
I hope this helps
On Mon, May 1, 2017 at 1:03 PM, wrote:
> I posted this question on stackoverflow but have not found an
On Tue, May 2, 2017 at 11:43 PM, Daniel Prager
wrote:
> I kind of expected that it would be possible to do what I wanted with
> "indy" contracts, but struggled with the heavy use of combinators in the
> examples.
Two offhand thoughts:
1. To practice with dependent
On Thu, May 4, 2017 at 8:23 PM, Dupéron Georges wrote:
> In these cases, instead of turning off the contract checks altogether, it
> would be nice to have a way to disable the define/contract and turn it into
> a contract-out, using a single parameter (perhaps a
The predicate can be any function.
All files: `(find-files (lambda (x) #true) start-path)`
All pdf files: `(find-files (lambda (x) (equal? #".pdf" (path-get-extension
x))) some-path)`
There's also the `file/glob` module.
All pdf files: `(glob (build-path some-path "**" "*.pdf"))`
Iterator for
> Greg, if you're reading this...any chance you might expand FoM?
In the meantime, the "Syntax Parse Examples" package is always
accepting contributions:
http://docs.racket-lang.org/syntax-parse-example/index.html#%28part._.The_.Examples%29
--
You received this message because you are
Here's a map to some cities where some Racket users are located:
https://drive.google.com/open?id=1i3zN11e_6te5ytduAiv1cidrIi4=sharing
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails
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, wrote:
> (For some reason the mail I sent to usersracket-lang.org last week
> never made it to the Google Group, so I'm posting directly...)
>
> Hello,
>
> I'm a
You can re-use helper functions by running the different example blocks
with the same evaluator (example below).
I don't know how to hyperlink one interaction to another.
- - -
#lang scribble/manual
@require[scribble/example]
@(define my-eval (make-base-eval))
Beginning.
@examples[#:eval
Yes, you can use scribble/html to define functions from lists to documents.
For example, this scribble file calls a function to build an ` ... `
page:
https://github.com/nuprl/gtp/blob/gh-pages/about.rkt
and here's the function:
https://github.com/nuprl/gtp/blob/gh-pages/templates.rkt#L124
--
Try adding `#:eval foo-eval` to `interaction`. (I'm guessing that would
work.)
I'm more sure this will work:
#lang scribble/manual
@(require scribble/example "../main.rkt")
...
@(define foo-eval (make-base-eval '(require "../main.rkt")))
@examples[#:eval foo-eval #:label #f
(magic)
You can download PDFs for most of the documentation here:
http://download.racket-lang.org/all-versions.html
And if your device has Racket installed, you can run `raco docs` to view a
local copy of the HTML.
--
You received this message because you are subscribed to the Google Groups
"Racket
I have 1 mug (unused) that still needs a home.
On Thu, Oct 5, 2017 at 3:18 PM, 'John Clements' via users-redirect <
us...@plt-scheme.org> wrote:
> Forwarded without comment… :)
>
> Begin forwarded message:
>
> *From: *Jasmine Harihar Patel
> *Subject: **Racket Con*
>
I just changed the map settings so anyone can edit it.
If you'd like to add your city to the map:
1. Look for "racketeers.csv" in the menu
2. Click the "vertical dots" to the right of "racketeers.csv". (If you
hover the mouse over these dots, it should say "Layer Options")
3. Click "Open Data
Try changing the include-section to import the `doc` submodule:
@include-section[(submod "sub-scribble.rkt" doc)
I got this idea from the 2nd paragraph of the "scribble/lp2 language" docs:
http://docs.racket-lang.org/scribble/lp.html#%28mod-path._scribble%2Flp2%29
On Wed, Nov 29, 2017 at 7:15
I don't think this is currently possible.
To implement this, I think the `for-2d-sample` loop here needs to change:
https://github.com/racket/plot/blob/master/plot-lib/plot/private/plot3d/surface.rkt#L28
(I guess there should be 2 loops, one to draw the surface and one to
draw the lines)
On
The other day, I wanted to write a contract for a function that takes
any kind of vector and does something depending on whether the vector
is mutable. The contract was basically the one below:
```
#lang racket
(define/contract (f v)
(parametric->/c [A]
(-> (or/c (vectorof A #:immutable
> * Would have never been able to deduce this from the info you referenced...
Good point. Here's a pull request for changing the docs:
https://github.com/racket/scribble/pull/154
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe
My guess is that "(define" does something special to figure out where to
insert newlines in the rendered document.
On Thu, Nov 23, 2017 at 9:13 AM, Jos Koot wrote:
> My code:
>
> #lang scribble/manual
>
> @(require
> scribble/core
> scribble/eval
> racket
>
Let me make sure I understand:
1. A converter is like a two-way function, lets say (A . <-> . B)
2. If someone composes two incompatible converters, like (integer? .
<-> . symbol?) and (string? . <-> . boolean?) then they should get an
error that points to the place where they tried to do the
The error is because type signature of `raise` doesn't allow
"non-flat" values like functions and mutable vectors.
It might not be safe to allow `(raise (vector 1 2 3))` in Typed Racket
... I'm not sure.
For now I think you should make a new exception type. Example:
```
#lang typed/racket/base
That name sounds good to me.
--
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
to racket-users+unsubscr...@googlegroups.com.
For more options, visit
> Others: Does define/match do anything that would make Typed Racket see it
> differently from define + match*? It seems like define/match expands to
> define + match*/derived anyway. The only thing that's different is which
> define it's expanding to. So is expanding to Racket's define instead of
1 - 100 of 257 matches
Mail list logo