Commit graph

159 commits

Author SHA1 Message Date
David Nadlinger
e312f9898b Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled.

std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
Denis Shelomovskij
e8712ed9e1 Documentation and struct staticness in std.algorithm fixes 2011-11-14 17:10:19 +03:00
k-hara
5e83c0020d Issue 6935 - struct with @disable this cannot make range 2011-11-13 17:04:19 +09:00
Hara Kenji
e2ba3bd55a Merge pull request #268 from denis-sh/patch-6
integer `iota` is incorrect for negative `step`
2011-10-13 16:49:22 -07:00
k-hara
8d97eb3b21 Add std.random import for debug. 2011-09-29 07:29:19 +09:00
k-hara
78a2d8abdc Reduce module dependencies. 2011-09-29 07:09:16 +09:00
Denis
0f345ea6c2 http://www.d-p-l.org/expression.html
"the remainder has the same sign as the dividend"
Thanks, braddr.
2011-09-27 11:32:46 +03:00
Denis
f1b62aefbd Let's just avoid % on negative numbers. 2011-09-24 17:30:09 +03:00
Denis
2f5a744754 AFAIK, a % b takes it's sign from a (no idea where is it on dpl.org), so integer iota is incorrect for negative step (try proposed tests) 2011-09-20 10:19:40 +03:00
David Simcha
0597d946c1 Fix a few minor doc issues. 2011-09-01 09:33:01 -03:00
David Simcha
9cddfd96f2 Doc fix: s/reindexed/ind. I thought I fixed this a long time ago, but apparently not. 2011-08-30 03:02:48 -03:00
dsimcha
1a7cffeed2 Put back the rest of the lockstep fix commit. 2011-08-27 14:28:11 -04:00
dsimcha
a72896c0c1 Add back fix for lockstep that I accidentally removed by editing an outdated version of std.range. 2011-08-27 14:21:29 -04:00
dsimcha
7fcb6791d0 Add length to transversal. 2011-08-27 09:25:57 -04:00
dsimcha
4114b74b4d Add std.range.indexed and chunks. 2011-08-24 22:35:58 -04:00
David Simcha
c692c2aa8d Merge pull request #216 from dawgfoto/master
small bugfix for std.range.lockstep.
2011-08-24 09:15:28 -07:00
dawg
7de58633f6 fix lockstep requireSameLength check
- which didn't checked the copy on the stack
   but the ranges in the LockStep struct
 - introduced with: 98f98a74
2011-08-24 18:07:49 +02:00
dawg
2342e497cc failing unit test for lockstep with StoppingPolicy.requireSameLength 2011-08-24 18:07:49 +02:00
jmdavis
6b6c604bbe Added drop function to std.range. 2011-08-17 23:05:16 -07:00
Dmitry Olshansky
ca379e5993 minor fixes that get GSOC regular expressions to compile 2011-08-08 15:30:45 +04:00
David Nadlinger
a988cd19f3 The takeExactly() shortcut really depends on R having slicing, not being a random access range. 2011-08-02 22:18:41 +02:00
David Nadlinger
4df94e60b1 Make takeExactly(…).length for non-random-access ranges a property. 2011-08-02 22:18:41 +02:00
dsimcha
d08f0e6621 One more fix for the last pull request. It should really just take ulongs for indexing and slicing. 2011-07-12 22:06:09 -04:00
KennyTM~
95f3698bdc Oops the previous commit doesn't completely fix all possibilities for 'zip'. 2011-07-13 06:36:43 +08:00
KennyTM~
5a2add5e7a Fix bug 6301.
The following functions are modified to accept ranges with iota of longs:

 * std.algorithm.map
 * std.algorithm.splitter
 * std.range.retro
 * std.range.radial
 * std.range.popBackN
 * std.range.zip
 * std.range.iota
 * std.range.moveAt
2011-07-13 06:16:20 +08:00
Daniel Murphy
dc0beb97dc Fix unlisted bug found by implementing http://d.puremagic.com/issues/show_bug.cgi?id=5399.
InputRangeObject.popBack calls back when it should call popBack.
2011-06-30 02:39:47 +10:00
KennyTM~
252c29be22 Notice about bug 4040. 2011-06-22 14:47:45 +08:00
KennyTM~
8f7b9d0d13 Issue 5873 - Cannot call iota() on long with step 2011-06-21 16:42:44 +08:00
Andrei Alexandrescu
5a0134dd10 Fixed 672 broken links 2011-06-09 09:48:53 -05:00
dsimcha
9c7fe081f8 Fix Bug 5891 2011-05-05 18:44:15 -04:00
Andrei Alexandrescu
d061f13d34 https://github.com/D-Programming-Language/phobos/pull/23 2011-05-01 12:11:46 -05:00
Andrei Alexandrescu
3e6679b297 Improvements to std.range and std.algorithm 2011-04-04 00:44:59 -05:00
Andrei Alexandrescu
c3b7665a42 Merge branch 'work' of github.com:andralex/phobos into work
Conflicts:
	posix.mak
	std/algorithm.d
	std/conv.d
	std/datetime.d
	std/range.d
2011-02-27 15:25:59 -06:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Andrei Alexandrescu
78b3f24604 One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-26 15:19:35 -06:00
jmdavis
1a3c750902 Merge branch 'master' of https://github.com/kyllingstad/phobos into kyllingstad-master 2011-02-09 12:08:57 -08:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Lars T. Kyllingstad
ee3c02bbf6 Merge branch 'issue2874' into bugfixes 2011-02-03 11:33:17 +01:00
Lars T. Kyllingstad
efcacab6ec Issue 2874 - phobos docs issues 2011-02-03 11:29:57 +01:00
Lars T. Kyllingstad
3948e3f614 Fix special cases of take()
My earlier fix for issue 5052, "take!(Take!R) should return Take!R, not
Take!(Take!R)", broke David's fix for issue 4464, "std.range.take does
not always return Take!R".  This commit should fix both issues.

The special case when typeof(R.opSlice()) !=  R is now also accounted
for.
2011-02-02 13:23:54 +01:00
David Nadlinger
c056bf2687 Augmented the unittests for Zip.
I assumed that zLongest was orginially intended to test the StoppingPolicy.longest case, even though it previously had requireSameLength.
2011-01-30 23:36:12 +01:00
David Nadlinger
9e26dcfc81 Fixed Zip.empty for StoppingPolicy.longest.
Previously, it would never return true.

Fixes 5506.
2011-01-30 23:34:07 +01:00
David Nadlinger
2866365a32 Cosmetic change to zip unittests.
This only untangles two sections, no functional changes.
2011-01-30 23:16:06 +01:00
Andrei Alexandrescu
b6aabf2044 Improvements to SortedRange; added several search strategies 2011-01-27 12:06:56 -06:00
Andrei Alexandrescu
b91689dcba Short circuit type for takeExactly(takeExactly(r, n)) 2011-01-24 22:16:26 -06:00
Andrei Alexandrescu
9e15909243 Fix for issue 5152 2011-01-22 23:56:12 +00:00
Andrei Alexandrescu
cf8815f542 Fix for issue 4994 2011-01-22 22:20:54 +00:00
Andrei Alexandrescu
f8d1c0e71b Added findParts and takeExactly 2011-01-22 21:26:54 +00:00
Andrei Alexandrescu
331dd3a489 Moved split from string to array, made one more pass through array 2011-01-19 06:44:46 +00:00
Andrei Alexandrescu
cf33c1999a Moved join from std.string to std.array, plus a few cosmetic changes 2011-01-17 20:43:54 +00:00