Hi all,
I've updated racket-explorer (https://github.com/tonyg/racket-explorer)
to handle cyclic (and mutable) data by lazily (and repeatedly) unfolding
children only when the triangle next to an item is opened (and every
time it is opened).
If you've tried it before and been discouraged at its
Awesome!
--
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 https://groups.google.com/d/optout.
Hi Alexander
Thanks for taking notice of my post.
Yes, it is within the *definition* that the arrows don't show up.
I apologize if my post wasn't clear.
Jos
_
From: Alexander D. Knauth [mailto:alexan...@knauth.org]
Sent: viernes, 22 de mayo de 2015 21:42
To: Jos Koot
Cc: Racket-Users
And apologies for this completely wrong remark!
On Fri, May 22, 2015 at 7:19 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
Contracts mediate boundaries between parts of your program and sometimes
tests should go across the boundary (to help test the contracts) and
sometimes they should
Is there a way for a function to tell how many values it’s caller expects it to
return?
I’ve tried this and it didn’t work:
#lang racket
(define (show-k-arity)
(let/ec k
(error 'print-k-arity the arity of k is ~v (procedure-arity k
(let-values ([(x y) (show-k-arity)]) (void))
--
You
This is a minimized example (after expansions and simplifications):
#lang racket
(letrec-syntaxes+values ([(c) {lambda (stx)
(let ([x #'0]) x)}])
()
(c))
This prints correctly 0, but no identifier inside the curly {lambda
...} get any
I'm trying to build a toy language. Below, sample.rkt uses #lang s-exp
toy.rkt, where toy.rkt provides #%top and #%app. What's the right way to
get macro expansion to work in sample.rkt?
The following example, as-is, prints:
(ast 'def (list (ast 'fun (list (ast 'a '(b)) (ast 'foo '(a b))
;
#lang racket
(define/contract (add1 x y)
(integer? integer? . - . integer?)
(+ x y))
(provide (contract-out [add2 (integer? integer? . - . integer?)]))
(define (add2 x y)
(+ x y))
(module+ test
(require rackunit)
(check-exn exn:fail? (λ _ (add1 20.5 21.5)))
For that kind of situation, you should consider writing your test
submodule like this:
#lang racket
(define (add1 x y)
(integer? integer? . - . integer?)
(+ x y))
(provide (contract-out [add1 (integer? integer? . - . integer?)]))
(module* test racket
(require (submod ..))
(add1 #f #f))
Yes, there is :
http://docs.racket-lang.org/style/Units_of_Code.html?q=define%2Fcontract#%28part._.Contracts%29
Thank you for the link. The How to Program Racket Guide will be really
helpful.
But I must admit I'm a little confused. Looking at the *fahrenheit* example in
the
Guide:
#lang
At Thu, 21 May 2015 22:58:04 -0400, Josh Grams wrote:
Also, shouldn't the x's under syntax-rules and in the expansion of
(m) have a 'b' in their scope sets (since they're in the
syntax-rules scope)? Or aren't they?
The `let-syntax` form binds only in its body, not the right-hand sides
of
That's good to know. That means my previous conclusion is wrong
and I'm not forced to use define/contract when using test submodules.
Robby Findler ro...@eecs.northwestern.edu writes:
For that kind of situation, you should consider writing your test
submodule like this:
#lang racket
Contracts mediate boundaries between parts of your program and sometimes
tests should go across the boundary (to help test the contracts) and
sometimes they should go inside (to test internal functions). You have to
pick one or the other with a given test module tho.
Robby
On Friday, May 22,
Hi Matthew,
Your proposal sounds very good to me (for what my opinion is worth). Thanks.
FWIW I give you my findings, which are positive.
I have tried the snapshot with the tests of three of my systems:
lc-with-redex (not in planet or github)
fmt (on planet)
infix (not yet in planet or github)
In
Maybe there are other useful pict/brush modifiers of interest?
https://github.com/soegaard/metapict/blob/master/metapict/pict.rkt#L149
/Jens Axel
2015-05-21 18:41 GMT+02:00 Robby Findler ro...@eecs.northwestern.edu:
Oh, nice! We should add brushstipple to pict itself.
Robby
On Thu, May
Hello list,
I am wondering how to expand a BSL program into the Racket _core language_?
Let's say a simple program:
(define (id x) x)
Thanks.
--
You received this message because you are subscribed to the Google Groups
Racket Users group.
To unsubscribe from this group and stop receiving
On Fri, May 22, 2015 at 5:41 PM, Atticus attic...@posteo.org wrote:
Imho it would be nice if there was a small hint in the documentation
about that case, perhaps there is and I didn't see it?
Yes, there is :
Has this been an oversight? Do we need two official test submodules?
One from the inside, and one from without.
--
Anthony Carrico
--
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,
You could always do something like (require (prefix-in contracted: (submod
..))) to get separate bindings for the versions contracted by contract-out.
On May 22, 2015, at 11:37, Anthony Carrico acarr...@memebeam.org wrote:
Has this been an oversight? Do we need two official test submodules?
Has this been an oversight? Do we need two official test submodules?
One from the inside, and one from without.
That’s a worthy point. I prefer to locate tests as close as possible to the
code being tested. But the fact that 'raco test ...' and DrRacket only
recognize a single submodule named
If you want to have the contracts enforced in the test submodule, all you have
to do is add (require (submod “..”)) to the submodule.
You don’t need to use define/contract, and you don’t need to use module*
instead of module+.
You can just use
#lang racket
(provide
(contract-out
; convert
DOn't forget
$ raco test --submoulde matthew-s-tests
On May 22, 2015, at 3:12 PM, Matthew Butterick m...@mbtype.com wrote:
Has this been an oversight? Do we need two official test submodules?
One from the inside, and one from without.
That’s a worthy point. I prefer to locate tests as
On May 22, 2015, at 8:19 AM, Robby Findler ro...@eecs.northwestern.edu wrote:
Contracts mediate boundaries between parts of your program and sometimes
tests should go across the boundary (to help test the contracts) and
sometimes they should go inside (to test internal functions). You have
Adding to the suggestions, you can write something like `test-internal`
and `test-external` submodules plus
(module+ test
(require (submod .. test-internal)
(submod .. test-external)))
At Fri, 22 May 2015 15:23:33 -0400, Matthias Felleisen wrote:
DOn't forget
$ raco test
Adding to the suggestions, you can write something like `test-internal`
and `test-external` submodules plus
(module+ test
(require (submod .. test-internal)
(submod .. test-external)))
Enlightenment achieved
At Fri, 22 May 2015 15:23:33 -0400, Matthias Felleisen
For me the arrows seem to work fine for both versions.
I tried it with racket version 6.1.1 and a racket snapshot build version
6.2.0.3--2015-05-17.
Which arrows aren’t working for you?
On May 22, 2015, at 1:40 PM, Jos Koot jos.k...@gmail.com wrote:
Below two versions of a very stripped
Oh, I thought you were talking about the arrows within the *use* of stx-case.
I just realized they don’t work within the *definition* of the second version
of stx-case.
That is weird.
On May 22, 2015, at 3:37 PM, Alexander D. Knauth alexan...@knauth.org wrote:
For me the arrows seem to work
Below two versions of a very stripped version of a macro I have made.
In version 1 background expansion and check-syntax show binding arrows
within macro stx-case.
However, in version 2 the arrows are not shown.
How come?
Thanks, Jos
#lang racket
(require (for-syntax racket))
;;; version 1
28 matches
Mail list logo