Re: Are set operations needed?
On Thu, Jul 18, 2013 at 07:07:20PM +0800, Richard Hainsworth wrote: > I wondered whether the desire to have sets in perl6 was driven by > mathematical fashion sensitivity (in some roundabout unconscious > way) and because sets are important to mathematical foundations. > [...] > Sets do not implement well on a computer. I suspect that these two statements, taken together, give a large part of the reason Perl 6 has sets implemented in the core. They're an important part of the mathematics that program(mer)s use to solve problems, and without a common foundation it's easy to come up with many suboptimal implementations. A similar argument exists for Temporal and date/time objects. Also, in earlier days of Perl 6 discussions, we discovered that people would learn about junctions and then try to use them to solve set-based problems. This frequently led to many dead-end discussions about trying to generalize junctions to that purpose. Having sets and set operators explicitly included in the core is intended to also guide people away from the false path of thinking that junctions are the Perl 6 vehicle for set-based operators. Pm
Re: Are set operations needed?
Full list of "Texas" (ie ASCII) set operators: union: (|) intersection: (&) set difference: (-) symmetric difference: (^) subset: (<=) proper subset: (<) superset: (>=) proper superset: (>) is an element of: (elem) is contained by: (cont) On Thu, Jul 18, 2013 at 11:45 AM, Solomon Foster wrote: > All set operations work on Rakudo, but none of the Unicode set > operators are enabled, because multibyte Unicode characters kill the > performance of Rakudo's parser when compiling Rakudo. > > So for example you can use (|) for set union, but not ∪. I think > there are probably some glitches there yet, particularly with set > construction -- Rakudo's version is based on an older version of > Niecza's implementation. I'll probably get around to porting Niecza's > updates over to Rakudo before the August release. > > On Thu, Jul 18, 2013 at 11:21 AM, Richard Hainsworth > wrote: >> I'm well behind the curve on implementation, this I know. >> >> But before writing the email, I checked the perl6 web site on what was >> implemented. Set operations still given as not implemented. >> >> The impression I formed was that set operations would be a long time coming >> - even after Christmas. >> >> What subset is implemented (perhaps better, where is this documented). >> >> Richard >> >> >> On 07/18/2013 07:16 PM, Moritz Lenz wrote: >>> >>> On 07/18/2013 01:07 PM, Richard Hainsworth wrote: Are set operations needed in Perl6? No implementation of the perl6 set specification yet exists (AFAIK). >>> >>> >>> You are wrong. Both rakudo and niecza implement significant subsets of the >>> set specification. >>> >>> Cheers, >>> Moritz >> >> > > > > -- > Solomon Foster: colo...@gmail.com > HarmonyWare, Inc: http://www.harmonyware.com -- Solomon Foster: colo...@gmail.com HarmonyWare, Inc: http://www.harmonyware.com
Re: Are set operations needed?
All set operations work on Rakudo, but none of the Unicode set operators are enabled, because multibyte Unicode characters kill the performance of Rakudo's parser when compiling Rakudo. So for example you can use (|) for set union, but not ∪. I think there are probably some glitches there yet, particularly with set construction -- Rakudo's version is based on an older version of Niecza's implementation. I'll probably get around to porting Niecza's updates over to Rakudo before the August release. On Thu, Jul 18, 2013 at 11:21 AM, Richard Hainsworth wrote: > I'm well behind the curve on implementation, this I know. > > But before writing the email, I checked the perl6 web site on what was > implemented. Set operations still given as not implemented. > > The impression I formed was that set operations would be a long time coming > - even after Christmas. > > What subset is implemented (perhaps better, where is this documented). > > Richard > > > On 07/18/2013 07:16 PM, Moritz Lenz wrote: >> >> On 07/18/2013 01:07 PM, Richard Hainsworth wrote: >>> >>> Are set operations needed in Perl6? No implementation of the perl6 set >>> specification yet exists (AFAIK). >> >> >> You are wrong. Both rakudo and niecza implement significant subsets of the >> set specification. >> >> Cheers, >> Moritz > > -- Solomon Foster: colo...@gmail.com HarmonyWare, Inc: http://www.harmonyware.com
Re: Are set operations needed?
I'm well behind the curve on implementation, this I know. But before writing the email, I checked the perl6 web site on what was implemented. Set operations still given as not implemented. The impression I formed was that set operations would be a long time coming - even after Christmas. What subset is implemented (perhaps better, where is this documented). Richard On 07/18/2013 07:16 PM, Moritz Lenz wrote: On 07/18/2013 01:07 PM, Richard Hainsworth wrote: Are set operations needed in Perl6? No implementation of the perl6 set specification yet exists (AFAIK). You are wrong. Both rakudo and niecza implement significant subsets of the set specification. Cheers, Moritz
Re: Are set operations needed?
And regardless of homotopy type theory being able to supplant set theory, with the spirit of "there's more than one way to do it", set ops are still a welcome tool. Also in that spirit, would you like to write up a summary of HoTT alternatives to common set ops, or post a link to a HoTT summarzing its relation to algorithmically manipulating data? I downloaded the free PDF of that book but I'm afraid most of it will go over my head. I can grok the figures in http://en.wikipedia.org/wiki/Homotopy but not much more -y On Thu, Jul 18, 2013 at 7:16 AM, Moritz Lenz wrote: > On 07/18/2013 01:07 PM, Richard Hainsworth wrote: > >> Are set operations needed in Perl6? No implementation of the perl6 set >> specification yet exists (AFAIK). >> > > You are wrong. Both rakudo and niecza implement significant subsets of the > set specification. > > Cheers, > Moritz >
Re: Are set operations needed?
On 07/18/2013 01:07 PM, Richard Hainsworth wrote: Are set operations needed in Perl6? No implementation of the perl6 set specification yet exists (AFAIK). You are wrong. Both rakudo and niecza implement significant subsets of the set specification. Cheers, Moritz
Are set operations needed?
Are set operations needed in Perl6? No implementation of the perl6 set specification yet exists (AFAIK). The question occurred to me as I have been working my way through a new book on foundational maths not based on sets (http://homotopytypetheory.org/book/). Foundations of maths, until recently, has been done in terms of set theory and first-order logic. I wondered whether the desire to have sets in perl6 was driven by mathematical fashion sensitivity (in some roundabout unconscious way) and because sets are important to mathematical foundations. Given that foundational maths may now be done (strictly the goal has not yet been fully achieved) in homotopy type theory (HoTT), perhaps the imperative to have sets in perl6 is no longer as strong? An interesting thing about HoTT is that part of it, namely type theory, has been driven by computer science. Indeed, part of the power of HoTT is that it is possible to create computer-aided proof assistants. Sets do not implement well on a computer. In other words, perhaps sets, which have already been ring-fenced by existing implementations, can be cut from the perl6 specification altogether? Richard Hainsworth finanalyst