On Thursday, December 10, 2015 at 4:05:02 AM UTC-8, Matthew Flatt wrote:
> I've pushed a repair for the crash, which was due to a bug in the new
> macro expander.
>
> The "boris/hypertext-browser/http/head.rkt" module creates a pattern of
> binding and shadowing that had never been exercised
This Typed Racket term is well-typed:
(+ 1 (if (= 0 (- 1 1)) 1 "x"))
This one isn't:
(+ 1 (if (= 0 (- 2 2)) 1 "x"))
This looks a bit strange to me, because usually one would expect well-typedness
to be not destroyed by replacing "equals with equals".
I'd like to know the rationale for this
In DrRacket 6.2.1 when using the `match` construct as defined in the
abstraction teachpack together with posn a strange problem appears.
When choosing BSL as language the following code just works as expected:
```
(require 2htdp/abstraction)
(match (make-posn 1 2) [(posn x y) (+ x y)])
```
'John Clements' via Racket Users wrote on 12/10/2015 01:04 PM:
However, it could easily be the case that a package (presumably from Neil Van
Dyke) could contain code that would be installed into the html subdirectory of
the sxml collection, and I’m guessing that’s what you’re referring to.
On Thu, Dec 10, 2015 at 2:26 PM Klaus Ostermann wrote:
> > I don't think any typed language respects this. For example:
> >
> >(if (= 1 1) #f "not a boolean")
> >
> > is equal to #f, but many type systems do not let you replace #f with
> > that expression.
>
> But in
On Thursday, December 10, 2015 at 8:26:02 PM UTC+1, Klaus Ostermann wrote:
> > I don't think any typed language respects this. For example:
> >
> >(if (= 1 1) #f "not a boolean")
> >
> > is equal to #f, but many type systems do not let you replace #f with
> > that expression.
>
> But in
I have to say, the fact that installing a package === using a package is really
cool. Go Racket!
--
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
IIRC, the only numeric type that are singletons are Zero and One, so
this also typechecks:
(+ 1 (if (= 0 (- 0 0)) 1 "x"))
On a related note, the (untyped)Racket optimizer has constant folding,
so in (untyped)Racket all these expressions are compiled to 2. I don't
know if it's possible to add
Thanks for the clarification, Sam. What you write makes sense.
However, since the default case (without explicit annotations) is that I get
these very (too?) precise singleton types, I have the impression that reasoning
about (typed) program equivalence is more difficult in TR than in standard
On Thu, 10 Dec 2015 13:18:57 -0600,
Gustavo Massaccesi wrote:
>
> IIRC, the only numeric type that are singletons are Zero and One, so
> this also typechecks:
>
> (+ 1 (if (= 0 (- 0 0)) 1 "x"))
There's a few more, actually, like the various floating-point zeroes.
> On a related note, the
On Thu, 10 Dec 2015 13:10:04 -0600,
Paolo Giarrusso wrote:
>
> On Thursday, December 10, 2015 at 6:55:28 PM UTC+1, johnbclements wrote:
> > > On Dec 10, 2015, at 9:50 AM, George Neuner wrote:
> > >
> > > On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth wrote:
> > >
> > >> In typed racket (- 1
On Thursday, December 10, 2015 at 6:55:28 PM UTC+1, johnbclements wrote:
> > On Dec 10, 2015, at 9:50 AM, George Neuner wrote:
> >
> > On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth wrote:
> >
> >> In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type
> >> checker doesn't
> I don't think any typed language respects this. For example:
>
>(if (= 1 1) #f "not a boolean")
>
> is equal to #f, but many type systems do not let you replace #f with
> that expression.
But in statically typed languages you usually have a typed equivalence relation
like
\Gamma |- t1
On Thursday, December 10, 2015 at 9:11:00 PM UTC+1, Vincent St-Amour wrote:
> Right. That's why we've built tools to get information about these types
> more digestible:
>
> http://docs.racket-lang.org/ts-reference/Exploring_Types.html
Thanks, I'd seen those but forgot the non-verbose
On 2015-12-10 14:02:55 -0600, Vincent St-Amour wrote:
> My dream is that, instead, the Racket compiler could make its own
> analyses and transformations available as hooks, just as it makes other
> kinds of hooks available. :) Think of it as a "cp0 [1] as a library",
> that #langs and language
I just merged Paolo's fix. The fix should be in the next release.
If you want to try it before that, you can either try building from
source, or using a nightly build tomorrow: pre.racket-lang.org
Vincent
On Thu, 10 Dec 2015 12:44:39 -0600,
Paolo Giarrusso wrote:
>
> On Thursday, December
That was quick. Thanks a lot Paolo and Vincent!
Jonathan
> On 10 Dec 2015, at 22:11, Vincent St-Amour
> wrote:
>
> I just merged Paolo's fix. The fix should be in the next release.
>
> If you want to try it before that, you can either try building from
>
On Dec 10, 2015, at 3:04 PM, Klaus Ostermann wrote:
> Thanks for the clarification, Sam. What you write makes sense.
>
> However, since the default case (without explicit annotations) is that I get
> these very (too?) precise singleton types, I have the impression that
>
On Thu, Dec 10, 2015 at 07:22:40PM -0500, Matthias Felleisen wrote:
>
> On Dec 10, 2015, at 3:04 PM, Klaus Ostermann wrote:
>
> > Thanks for the clarification, Sam. What you write makes sense.
> >
> > However, since the default case (without explicit annotations) is that I
On Dec 10, 2015, at 1:15 PM, Jonathan Brachthäuser
wrote:
> In DrRacket 6.2.1 when using the `match` construct as defined in the
> abstraction teachpack together with posn a strange problem appears.
>
> When choosing BSL as language the following code just works as
Never mind! Write this off to my forgetful old age. This one is supposed to
work for BSL and BSL+. I had forgotten that I fixed this.
(There are other parts of 2htdp/abstraction that work only when functions are
available as values.)
On Dec 10, 2015, at 5:56 PM, Matthias Felleisen
> On Dec 10, 2015, at 4:47 PM, Hendrik Boom wrote:
>
> On Thu, Dec 10, 2015 at 07:22:40PM -0500, Matthias Felleisen wrote:
>>
>> On Dec 10, 2015, at 3:04 PM, Klaus Ostermann wrote:
>>
>>> Thanks for the clarification, Sam. What you write makes
I've pushed a repair for the crash, which was due to a bug in the new
macro expander.
The "boris/hypertext-browser/http/head.rkt" module creates a pattern of
binding and shadowing that had never been exercised before --- at least
not in code saved in bytecode form. (It took me much longer to
On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth
wrote:
>In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type
>checker doesn't necessarily know that at compile time. It knows that
>(- 1 1) is zero because that's a special case in the type system. But it
On Thursday, December 10, 2015 at 7:15:07 PM UTC+1, Jonathan Brachthäuser wrote:
> In DrRacket 6.2.1 when using the `match` construct as defined in the
> abstraction teachpack together with posn a strange problem appears.
>
> When choosing BSL as language the following code just works as
> On Dec 10, 2015, at 9:26 AM, Klaus Ostermann wrote:
>
> This Typed Racket term is well-typed:
>
> (+ 1 (if (= 0 (- 1 1)) 1 "x"))
>
> This one isn't:
>
> (+ 1 (if (= 0 (- 2 2)) 1 "x"))
>
> This looks a bit strange to me, because usually one would expect
>
On Thu, Dec 10, 2015 at 11:26 AM, Klaus Ostermann wrote:
> This looks a bit strange to me, because usually one would expect
> well-typedness to be not destroyed by replacing "equals with equals".
I don't think any typed language respects this. For example:
(if (= 1 1) #f
In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type checker
doesn't necessarily know that at compile time. It knows that (- 1 1) is zero
because that's a special case in the type system. But it doesn't have a special
case for (- 2 2), so it only knows that that's a Fixnum.
Right.
The key distinction here is that TR is not so much reasoning about
constants, but about a singleton type. So TR is still working in terms
of types, not in terms of concrete values.
Vincent
On Thu, 10 Dec 2015 11:55:24 -0600,
'John Clements' via Racket Users wrote:
>
>
> > On Dec 10,
On Thu, Dec 10, 2015 at 08:25:11PM -0500, Matthias Felleisen wrote:
>
>
> > On Dec 10, 2015, at 4:47 PM, Hendrik Boom wrote:
> >
> > On Thu, Dec 10, 2015 at 07:22:40PM -0500, Matthias Felleisen wrote:
> >>
> >> On Dec 10, 2015, at 3:04 PM, Klaus Ostermann
You may want to read our papers on Units, Harper/Lillibridge and Leroy both
from POPL ’94 and chase the citations forward. But perhaps Reynolds’s old
saying “type structure is a syntactic discipline for enforcing levels of
abstraction” suffices — Matthias (yes, I have studied all of this too
> On Dec 9, 2015, at 10:59 PM, David K. Storrs wrote:
>
> On Wednesday, December 9, 2015 at 6:33:02 PM UTC-8, Neil Van Dyke wrote:
>> David K. Storrs wrote on 12/09/2015 08:50 PM:
>>> 1) Is there a web-spidering package that people recommend? I could use
>>> wget and
Answer: Yes, if you redefine nothingness. You can exploit the fact that
appending (or splicing) an empty list will cause it to disappear (meaning, no
# residue).
#lang racket
(require rackunit)
(define (foo-3 x) (if (eq? x "foo") (list #t) empty))
(check-equal? (append-map foo-3 '(a b "foo"
Question: Is there a way to make a function return nothing -- not '() or #void,
but actually nothing?
I'm playing around with HTML parsing as a learning exercise. The current
exercise is writing a look-down function which can be handed an HTML value
produced by the html library and a
34 matches
Mail list logo