Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17094

Re: Unique values of array

Message-ID <1465780.qEpqW9jFZT@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-11-09 02:26 +0100
Subject Re: Unique values of array
Newsgroups comp.lang.javascript
References <f874a1da-b06c-43af-beb6-fe05c5245469@p22g2000vby.googlegroups.com> <1626786.ztarQMnBzF@PointedEars.de> <ab329715-5cfd-4621-b14b-dd5c73f1b12e@d17g2000vbv.googlegroups.com>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


Asen Bozhilov wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Asen Bozhilov wrote:
>> > I have seen different approach to find the unique values in array.
>> > ECMAScript6 will come with Set constructor and this would be easy to
>> > achieve.
>>
>> That would be good.  Reference?
> 
> See the es-wiki harmony proposals:
> <http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets>

ACK.

> If you are interesting SpiderMonkey already has partial support of ES6
> Set:
> <https://developer.mozilla.org/en-US/docs/JavaScript/Reference/
> Global_Objects/Set>

The Matrix has you.
 
> Also there is a working draft of ES6:
> <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>
> 
> There are many new things, should be discussed in separate threads.

ACK.
 
>> So you need a Map that can have objects as keys.
>>
>> <http://PointedEars.de/scripts/map.js>
>> <http://PointedEars.de/scripts/test/map>
> 
> Thanks, I will take a look at your source.

You might also want to have a look at jsx.python.set(), which now uses 
jsx.map.Map if possible (and will probably prefer using Set() above that 
later):

<http://PointedEars.de/scripts/python.js>
<http://PointedEars.de/websvn/filedetails.php?repname=JSX&path=%2Ftrunk%2Fpython.js>
<http://PointedEars.de/scripts/test/python>


PointedEars
-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Unique values of array Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-08 05:00 -0800
  Re: Unique values of array Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-08 06:10 -0800
    Re: Unique values of array Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-08 06:26 -0800
  Re: Unique values of array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-08 21:21 +0100
    Re: Unique values of array Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-08 13:06 -0800
      Re: Unique values of array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-09 02:26 +0100
  Re: Unique values of array Dr J R Stockton <reply1245@merlyn.demon.co.uk.invalid> - 2012-11-09 18:43 +0000
    Re: Unique values of array Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-10 09:06 -0800
      Re: Unique values of array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-10 20:19 +0100
        Re: Unique values of array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-10 20:26 +0100
        Re: Unique values of array Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-11 08:47 -0800
      Re: Unique values of array Dr J R Stockton <reply1245@merlyn.demon.co.uk.invalid> - 2012-11-11 16:52 +0000
        Re: Unique values of array Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-12 05:10 -0800
          Re: Unique values of array Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-13 16:39 +0000
            Re: Unique values of array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-14 10:21 +0100
            Re: Unique values of array Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-14 04:32 -0800

csiph-web