summary refs log tree commit diff stats
path: root/lib/pure/collections
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4344 from ReneSac/queuesAndreas Rumpf2016-06-191-33/+184
|\ | | | | Enchanced random access support for queues among other changes
| * Remove high() and low() procs from queues moduleReneSac2016-06-161-13/+2
| | | | | | | | | | Just in case as they are said not overloadable. No deprecation because this is during a PR: those procs didn't exist before. Also update comment due to failed optimization attempt using copyMem() for POD datatypes.
| * Fixes for things pointed by Araq on the PRReneSac2016-06-161-27/+18
| |
| * Improved the documentation and miscelaneousReneSac2016-06-151-33/+102
| | | | | | | | | | | | | | | | | | Better bounds checking. Tried to make it and documentation comply with the conflicting style guides. Added example of usage at the top of the module as well as warnings on usage. Also fix the back() and internal englishOrdinal() proc from previous commit. Added {.discardable.} pragma for .pop(), when calling only for it's side effects. Sprinkled some unlikely() for optimization. Some new tests reflecting those changes.
| * Enchanced random access support for queuesReneSac2016-06-121-24/+126
| | | | | | | | | | | | Now queues support indexing, front() and back() operations and pairs iteration. Also modernized some of the code to use newer Nim features. Added the "add()" alias to "enqueue()", per nim's conventions (also fits better with pop())
* | attempt to fix a critical memory leak in Nim's collectionsAndreas Rumpf2016-06-152-0/+12
| |
* | Implement clear() for CountTableRef. Fixes #4325.Kier Davis2016-06-131-1/+1
|/
* Implements tables.clear.Dominik Picheta2016-06-022-5/+34
|
* moved random procs from math to its own module (breaking change)Andreas Rumpf2016-05-301-1/+1
|
* Introduce template withValue() for tables.nim too.cheatfate2016-05-271-0/+45
|
* Introduce template withValue()cheatfate2016-05-261-0/+53
|
* Fix 2 compile errors in LockFreeHash.nimLompiktab2016-05-141-3/+3
| | | | | * type mismatch in range (line 55) * invalid indentation (line 249)
* Fix missing `]`Stephane Fontaine2016-05-131-1/+1
| | | | other nim can't parse the file. Introduced in https://github.com/nim-lang/Nim/commit/192ba3bbc0ae7f570c1277c9211d24eeea2cf48a#diff-1a01187da2fad29f03da8ce36ffe1f91
* Added heapqueue collection. Fixed timers in asyncdispatch.Yuriy Glukhov2016-04-281-0/+107
|
* Added del for OrderedTable and OrderedTableRefYuriy Glukhov2016-04-131-0/+41
|
* added missing file for --gc:stackAndreas Rumpf2016-03-311-0/+44
|
* added missing fileAndreas Rumpf2016-03-281-0/+95
|
* Fixed Table::del in JSYuriy Glukhov2016-03-211-1/+4
|
* Fixes foldl() and foldr() + foldl() with start parameter.Hans Raaf2016-03-061-10/+37
| | | | | | | | | This fixes the (potential) multi-evaluation of the sequence parameter in foldl() and foldr(). It also adds a foldl() version which gets a start parameter. This allows for creating a result with a different type than the elements of the sequence.
* Merge branch 'devel' of github.com:nim-lang/Nim into develAndreas Rumpf2016-03-041-1/+1
|\
| * Removed unused import of 'os' module from module 'sets'Rostyslav Dzinko2016-03-041-1/+1
| |
* | added intsets.clear procAndreas Rumpf2016-03-041-0/+7
|/
* Don't expect all keys in hashsets to have $ definedSamantha Doran2016-03-011-1/+5
|
* Consistently use Channel instead of TChanneldef2016-02-251-1/+1
|
* Merge pull request #3831 from ephja/nimrod-to-nimAndreas Rumpf2016-02-061-1/+1
|\ | | | | nimrod -> nim
| * nimrod -> nimErik Johansson Andersson2016-02-051-1/+1
| |
* | Fix a few deprecation warningsdef2016-01-251-1/+1
|/
* Fix CountTableRef#getOrDefaultSloane Simmons2016-01-091-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes issue with CountTableRef and getOrDefault: ```{nimrod} import tables proc main() = const testKey = "TESTKEY" let t: CountTableRef[string] = newCountTable[string]() # Before, does not compile with error message: #test_counttable.nim(7, 43) template/generic instantiation from here #lib/pure/collections/tables.nim(117, 21) template/generic instantiation from here #lib/pure/collections/tableimpl.nim(32, 27) Error: undeclared field: 'hcode' echo "Count of " & testKey & " is " & $t.getOrDefault(testKey) t.inc(testKey,3) echo "Count of " & testKey & " is " & $t.getOrDefault(testKey) when isMainModule: main() ``` Previously, `getOrDefault` for CountTableRef objects was calling the `getOrDefaultImpl` template, which used the t.data.hcode object - assuming a Table or similar object. Because CountTableRef didn't have an hcode in its data tuples, this wouldn't compile. Changed to be the same as `CountTable#getOrDefault`.
* Update comment about `map` being in system moduledef2015-11-231-6/+3
|
* added prefix matching to critbits.nimAraq2015-11-101-16/+24
|
* Merge branch 'devel' of https://github.com/nim-lang/Nim into develAraq2015-10-131-0/+93
|\
| * added all/any/allIt/anyIt with tests and inline documentationrbmz2015-10-131-0/+93
| | | | | | | | Signed-off-by: rbmz <rbmz@users.noreply.github.com>
* | udpated the compiler and tester to use getOrDefaultAraq2015-10-133-12/+17
| |
* | added getOrDefault; bootstrapping works againAraq2015-10-132-33/+40
| |
* | Merge branch 'mget' of https://github.com/def-/Nim into def--mgetAraq2015-10-133-43/+101
|\ \ | |/ |/| | | | | | | | | | | | | | | Conflicts: lib/pure/collections/critbits.nim lib/pure/collections/tables.nim lib/pure/xmltree.nim lib/system/sets.nim tests/collections/ttables.nim tests/collections/ttablesref.nim
| * Rename mget to `[]`def2015-03-313-75/+120
| | | | | | | | | | | | | | | | | | - In sets, tables, strtabs, critbits, xmltree - This uses the new var parameter overloading - mget variants still exist, but are deprecated in favor of `[]` - Includes tests and fixed tests and usages of mget - The non-var `[]` now throws an exception instead of returning binary 0 or an empty string
* | Merge pull request #3423 from petermora/breakSequtilsAndreas Rumpf2015-10-121-35/+168
|\ \ | | | | | | Break sequtils
| * | restore {.immediate.} to toSeqPeter Mora2015-10-061-1/+1
| | |
| * | sequtils related changesPeter Mora2015-10-051-36/+169
| | |
* | | added critbits.inc procAraq2015-10-061-0/+8
|/ /
* | Fixed my name.Alexander Mitchell-Robinson2015-09-071-2/+2
| |
* | lib: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-044-239/+239
| | | | | | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* | removed sequtils.reversed again since it's already in algorithm.nimAraq2015-08-101-23/+0
| |
* | added sequtils.reversed; refs #3148Araq2015-08-091-0/+23
| |
* | breaking change: symbol lookups in generics follows spec more closely; fixes ↵Araq2015-08-071-4/+4
| | | | | | | | #2664
* | 'sequtils doesn't take confusing default args anymoreAraq2015-07-081-1/+1
| |
* | prepared selectors module for multi threadingAraq2015-06-301-3/+3
| |
* | Merge branch 'more_concurrency' into develAraq2015-06-304-168/+440
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/tut1.txt lib/core/locks.nim lib/pure/collections/tables.nim lib/pure/selectors.nim
| * | some progress on making async multithreadedAraq2015-05-284-168/+440
| | |
* | | lib/pure/a-c - Dropped 'T' from typespdw2015-06-044-98/+100
| | |