Re: [racket-dev] Lists aren't sets, but have set-like operations

2013-08-21 Thread Carl Eastlund
Ah, yes.  The set? predicate no longer distinguishes a representation.
There are several predicates for the original set type, now called "hash
sets": set-eq?, set-eqv?, set-equal?, set-mutable?, set-immtuable?, and
set-weak?.  I didn't add the basic "hash-set?", but perhaps I should.  It's
a weird name, since "hash-set" and "hash-set!" are already existing,
unrelated functions.

Carl Eastlund


On Wed, Aug 21, 2013 at 7:08 PM, J. Ian Johnson  wrote:

> Okay, I can abide. However, that doesn't really get at my frustration. I'm
> using the set constructor, that appears to now be an immutable-custom-set
> with make-immutable-hash as its make-table. So what I'm looking for is not
> set?, but set-immutable?, as it's a distinct (family of) struct types that
> won't clash with the primitive data that I'm otherwise using.
> -Ian
> - Original Message -
> From: "Carl Eastlund" 
> To: "J. Ian Johnson" 
> Cc: "dev" 
> Sent: Wednesday, August 21, 2013 6:58:56 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [racket-dev] Lists aren't sets, but have set-like operations
>
>
> Ian, sets are now a generic datatype, like dictionaries. Association lists
> are dictionaries, and lists are now sets. They're also streams and
> sequences. They're not just "set-like".
>
>
>
> Carl Eastlund
>
>
> On Wed, Aug 21, 2013 at 6:56 PM, J. Ian Johnson < i...@ccs.neu.edu >
> wrote:
>
>
> I just wasted about 2 hours tracking down a bug that ended up being due to
> (set? '()) now evaluating to #t. I have no problems with set-union,
> intersection, etc. being defined for lists, but to treat lists as sets
> always is perverse to me. The contracts for set operations should use
> set-like? for (or/c set? list?) and keep the two constructions separate.
>
> This conflation is almost as bad as treating empty list as false.
>
> -Ian
> _
> Racket Developers list:
> http://lists.racket-lang.org/dev
>
>
>
>
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Lists aren't sets, but have set-like operations

2013-08-21 Thread J. Ian Johnson
Okay, I can abide. However, that doesn't really get at my frustration. I'm 
using the set constructor, that appears to now be an immutable-custom-set with 
make-immutable-hash as its make-table. So what I'm looking for is not set?, but 
set-immutable?, as it's a distinct (family of) struct types that won't clash 
with the primitive data that I'm otherwise using.
-Ian
- Original Message -
From: "Carl Eastlund" 
To: "J. Ian Johnson" 
Cc: "dev" 
Sent: Wednesday, August 21, 2013 6:58:56 PM GMT -05:00 US/Canada Eastern
Subject: Re: [racket-dev] Lists aren't sets, but have set-like operations


Ian, sets are now a generic datatype, like dictionaries. Association lists are 
dictionaries, and lists are now sets. They're also streams and sequences. 
They're not just "set-like". 



Carl Eastlund 


On Wed, Aug 21, 2013 at 6:56 PM, J. Ian Johnson < i...@ccs.neu.edu > wrote: 


I just wasted about 2 hours tracking down a bug that ended up being due to 
(set? '()) now evaluating to #t. I have no problems with set-union, 
intersection, etc. being defined for lists, but to treat lists as sets always 
is perverse to me. The contracts for set operations should use set-like? for 
(or/c set? list?) and keep the two constructions separate. 

This conflation is almost as bad as treating empty list as false. 

-Ian 
_ 
Racket Developers list: 
http://lists.racket-lang.org/dev 


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Lists aren't sets, but have set-like operations

2013-08-21 Thread Carl Eastlund
Ian, sets are now a generic datatype, like dictionaries.  Association lists
are dictionaries, and lists are now sets.  They're also streams and
sequences.  They're not just "set-like".

Carl Eastlund


On Wed, Aug 21, 2013 at 6:56 PM, J. Ian Johnson  wrote:

> I just wasted about 2 hours tracking down a bug that ended up being due to
> (set? '()) now evaluating to #t. I have no problems with set-union,
> intersection, etc. being defined for lists, but to treat lists as sets
> always is perverse to me. The contracts for set operations should use
> set-like? for (or/c set? list?) and keep the two constructions separate.
>
> This conflation is almost as bad as treating empty list as false.
>
> -Ian
> _
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
>
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Lists aren't sets, but have set-like operations

2013-08-21 Thread J. Ian Johnson
I just wasted about 2 hours tracking down a bug that ended up being due to 
(set? '()) now evaluating to #t. I have no problems with set-union, 
intersection, etc. being defined for lists, but to treat lists as sets always 
is perverse to me. The contracts for set operations should use set-like? for 
(or/c set? list?) and keep the two constructions separate.

This conflation is almost as bad as treating empty list as false.

-Ian
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] going to Strange Loop?

2013-08-21 Thread John Clements
Anyone going to strange loop? Want to share a hotel room?

Best,

John

_
  Racket Developers list:
  http://lists.racket-lang.org/dev