Hello,
I was having trouble figuring out how to get racket to print values however I
wanted. In particular, I was hoping to make exact nums print as decimals and
true print as true (and not #t or #true). It would also be nice if I could
custom print procedures so that + printed as plain old + o
>
> There would be nice, to have a collection of scribble examples describing
> how to obtain certain functionality or effects, as for example "indentation
> of a paragraph".
>
Yes, it would be good to have an FAQ somewhere.
Sometimes I try to post things like this on stack overflow, in the hope
At Thu, 22 Jun 2017 14:59:35 -0700 (PDT), kay wrote:
> There're files that starts with BOM. When reading from those files, it seems
> all of Racket's I/O API don't know to strip the BOM, making them extremely
> difficult to work with.
I think that's the normal choice for UTF-8 readers. (Just to
There're files that starts with BOM. When reading from those files, it seems
all of Racket's I/O API don't know to strip the BOM, making them extremely
difficult to work with.
For example, Here is a UTF-8 encoded text file with BOM header. To be exact,
here's the binary layout of the file cont
Dear Racket developers,
On my personal computer, I successfully installed the package for
the nonofficial implementation of R7RS in Racket.
But I didn't this operation at my university, the answer is
https://... proxy web incorrect address
I searched the documentation but I don'
Bizarre, I was for some reason very convinced that begin defined its own scope!
I guess I usually called it in the positions in which it becomes an expression
as opposed to being used in its special form with splicing. The macro is
working like a charm now.
Thanks, I thought the solution would
Are you sure that `begin` doesn't suffice for your needs? It has a somewhat
unintuitive scoping behavior. From the docs [1]
The begin form is special at the top level, at module level, or as a body
after only internal definitions. In those positions, instead of forming an
expression, the content o
Hi Sam,
I'm a little unclear on your intended use case since (begin ...) does
splice defines, for instance:
(define (add-something x)
(begin
(define one 1)
(define two 2))
(+ x one two))
;;
Welcome to DrRacket, version 6.9 [3m].
Language: racket/base, with debugging; memory limit
Hello,
It's simple enough to write a macro that defines something.
(define-syntax-rule (my-define name binding)
(define name binding))
But what if I would like to define multiple things? I.e.
(define-syntax-rule (my-multiple-define name ... binding ...)
(define name binding) ...)
The abo
Ok, I think I've got it, but just to make sure I'm not missing any
subtleties, or else for the benefit of posterity, here's the version with
thread cells.
In "common.rkt":
#lang racket
(provide my-val
call-with-my-val)
(define cell:my-val
(make-thread-cell #f #t))
(define (my-val)
On Wednesday, June 21, 2017 at 10:27:38 PM UTC-7, Ben Greenman wrote:
> #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"))
>
>
> @hyper
Thanks Matthew, that's fascinating. So do you think I was encountering it
due to something like background expansion and a test submodule with quoted
reference cases in my checks or something else? Maybe having that file open
while also working on a file that requires it? I looked over the source
f
This is a bug in prefab registration when an instance of the prefab is
loaded via `read` before the `struct` declaration is encountered.
In other words, putting
'#s((indexable (2 #f)) 0 #f)
at the *start* of the first module below and running in a fresh Racket
or DrRacket will demonstrate the p
Thank you, everyone!! I've gained some nice big picture lessons and appreciate
the welcome to the community.
--
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 rac
Hi Racketeers,
I am having some frustrations dealing with mutable prefab structures,
getting errors about attempting to mutate an immutable structure. I wish I
could give you a sequence of simple steps that I know for sure would
reproduce the problem but I have not found them. I thought I had one
On Thu, Jun 22, 2017 at 10:21 AM, Philip McGrath
wrote:
> I've come up with a (relatively) minimal example.
>
> In "common.rkt":
>>
>> #lang racket
>> (provide my-param)
>> (define my-param
>> (make-parameter #f))
>
>
> In "servlet.rkt":
>>
>> #lang web-server
>> (require "common.rkt")
>> (provi
I've come up with a (relatively) minimal example.
In "common.rkt":
> #lang racket
> (provide my-param)
> (define my-param
> (make-parameter #f))
In "servlet.rkt":
> #lang web-server
> (require "common.rkt")
> (provide start)
> (define (start req)
> (response/xexpr
>`(html (head (title
My apologies, the code I just posted was missing a `reverse`. Here's the fixed
version:
@(define (sec-number→string tag #:doc [doc #f])
(delayed-element
(λ (the-renderer the-part the-resolve-info)
(define sec-tag (make-section-tag tag #:doc doc))
(define resolved-sec-tag (resol
Hi Philip,
I think I'd have to see more code to really tell what the problem is,
but here are some thoughts:
- A continuation captures the values of parameters at the time it is
captured. So, if your parameterize is outside of the dispatcher that
calls the continuation, then the code inside the c
Thanks a lot!
I was able to build an @sec-number-ref function. Here it is below. Matthew,
since this is not a copy-paste of your code, I hope you won't see any problems
if I place this in the public domain / CC0 license?
@(define (sec-number→string tag #:doc [doc #f])
(delayed-element
(λ
At Thu, 8 Jun 2017 08:55:00 -0700 (PDT), Dupéron Georges wrote:
> Generally it is nice to get the actual section title printed when using
> @secref["mysection"]. However, in some cases it is a bit awkwards:
>
> Chapter State of the art presents related work. Chapter Implementation
> explains in
You can set "doc-site.css" and "doc-site.js" to customize the
presentation of documentation. That's how http://docs.racket-lang.org/
adds the Racket logo to the top-right of the page, for example. When
you re-render documentation via `raco pkg` and/or `raco setup`, they
won't replace your "doc-site
I'm encountering some strange behavior when using parameters with my
(stateless) web servlets.
I want to check the value of a cookie every time a request is made to my
server and make a Racket value derived from the cookie's value available
for use within the servlet code. Since this value shouldn
23 matches
Mail list logo