purge changelog

This commit is contained in:
Dennis Korpel 2025-03-31 13:33:59 +02:00
parent 205256abb1
commit 60034b56e2
9 changed files with 0 additions and 182 deletions

View file

@ -1,14 +0,0 @@
Added `std.conv.bitCast`
This convenience function allows reinterpreting casts to be written in a more
readable way.
---
uint n = 0xDEADBEEF;
// Before
writeln("Bytes of n are: ", *cast(const ubyte[4]*) &n);
// After
writeln("Bytes of n are: ", n.bitCast!(const ubyte[4]));
---

View file

@ -1,30 +0,0 @@
Extend the functionality of formattedRead to permit a std.file.slurp like execution.
Template argument types can now be passed to formattedRead along with a
format string to parse and read the input range as a Tuple of those arguments.
All arguments must be read successfully, otherwise, and unlike std.file.slurp
which has non exhaustive option for partial reads, it'll throw a std.format.FormatException.
---
import std.exception : assertThrown;
import std.format : FormatException;
import std.typecons : tuple;
@safe pure unittest
{
auto complete = "hello!34.5:124".formattedRead!(string, double, int)("%s!%s:%s");
assert(complete == tuple("hello", 34.5, 124));
assertThrown!FormatException("hello!34.5:".formattedRead!(string, double, int)("%s!%s:%s"));
}
/// The format string can be checked at compile-time:
@safe pure unittest
{
auto expected = tuple("hello", 124, 34.5);
auto result = "hello!124:34.5".formattedRead!("%s!%s:%s", string, int, double);
assert(result == expected);
assertThrown!FormatException("hello!34.5:".formattedRead!("%s!%s:%s", string, double, int));
}
---

View file

@ -1,15 +0,0 @@
Added fromHexString and fromHexStringAsRange functions to std.digest.
This new function enables the converion of a hex string to a range of bytes.
Unlike the template $(REF hexString, std, conv) that was designed to supersede
a language feature, this function is usable with runtime input.
The `std.conv` module lacks facilities to conveniently transform the input
to a series of bytes directly. Both $(REF parse, std, conv) and $(REF to, std,
conv) can only handle the conversion for a single value of the requested target
integer type. Furthermore, said functions would allocate a new buffer for the
result, while `fromHexStringAsRange` operates lazily by implementing a forward
range.
For further convenience, a validation function $(REF isHexString, std, digest)
was added as well.

View file

@ -1,11 +0,0 @@
ODBC Bindings in `etc.c.odbc` have been updated to ODBC 4.0.
ODBC 4.0, via these new bindings, adds the following functionality:
1. Support for semi-structured data, such as JSON.
2. Collection valued columns.
3. Web-based Authorization flows.
A full list of new features can be found here: https://github.com/Microsoft/ODBC-Specification/blob/master/ODBC%204.0.md
Additionally these modules add support for 64-bit ODBC interfaces.

View file

@ -1,38 +0,0 @@
Added popGrapheme function to std.uni.
The new function is a cross between the existing $(REF graphemeStride, std,
uni) and $(REF decodeGrapheme, std, uni) functions. The new function both
supports `@safe pure nothrow @nogc` like `graphemeStride` does as long as you
don't rely on autodecoding (side node: `@nogc` support for `graphemeStride`
added in this release), and works with any non-array ranges just like
`decodeGrapheme` does.
Example:
-------
import std.uni;
// Two Union Jacks of the Great Britain in each
string s = "\U0001F1EC\U0001F1E7\U0001F1EC\U0001F1E7";
wstring ws = "\U0001F1EC\U0001F1E7\U0001F1EC\U0001F1E7";
dstring ds = "\U0001F1EC\U0001F1E7\U0001F1EC\U0001F1E7";
// String pop length in code units, not points.
assert(s.popGrapheme() == 8);
assert(ws.popGrapheme() == 4);
assert(ds.popGrapheme() == 2);
assert(s == "\U0001F1EC\U0001F1E7");
assert(ws == "\U0001F1EC\U0001F1E7");
assert(ds == "\U0001F1EC\U0001F1E7");
import std.algorithm.comparison : equal;
import std.algorithm.iteration : filter;
// Also works for non-random access ranges as long as the
// character type is 32-bit.
auto testPiece = "\r\nhello!"d.filter!(x => !x.isAlpha);
// Windows-style line ending is two code point in a single grapheme.
assert(testPiece.popGrapheme() == 2);
assert(testPiece.equal("!"d));
-------

View file

@ -1,6 +0,0 @@
Added `readfln` and `File.readfln` to `std.stdio`
These functions read a single line of input and parse it using a format string.
Unlike `readf`, they will not accidentally read multiple lines if the user
forgets to include a line terminator in the format string—a common mistake for
beginners.

View file

@ -1,13 +0,0 @@
Added the `SharedAllocatorList`, as the thread-safe version of the regular `AllocatorList`.
The new $(REF SharedAllocatorList, std,experimental,allocator,building_blocks,allocator_list) has the same semantics as the regular `AllocatorList`.
Just as the regular `AllocatorList`, if the `BookkeepingAllocator` is `NullAllocator`, the `SharedAllocatorList` will switch to `ouroboros` mode,
allocationg memory for its own metadata.
---
SharedAllocatorList!((n) => SharedAscendingPageAllocator(max(n, numPages * pageSize)), NullAllocator) a;
auto b = a.allocate(100);
assert(b.length == 100);
assert(a.deallocate(b));
---

View file

@ -1,39 +0,0 @@
New procedural API for `std.sumtype`
`std.sumtype` has three new convenience functions for querying and retrieving
the value of a `SumType` object.
* `has!T` returns `true` if the `SumType` object has a value of type `T`.
* `get!T` returns the value if its type is `T`, or asserts if it is not.
* `tryGet!T` returns the value if its type is `T`, or throws an exception if it
is not.
These functions make it easier to write code using `SumType` in a procedural
style, as opposed to the functional style encouraged by `match`.
Example:
---
import std.sumtype;
import std.stdio;
SumType!(string, double) example = "hello";
if (example.has!string)
{
writeln("string: ", example.get!string);
}
else if (example.has!double)
{
writeln("double: ", example.get!double);
}
try
{
writeln("double: ", example.tryGet!double);
}
catch (MatchException e)
{
writeln("Couldn't get a double.");
}
---

View file

@ -1,16 +0,0 @@
std.uni has been upgraded from Unicode 15.1.0 to 16.0.0
This Unicode update was released September 10, 2024, and adds new blocks with characters.
See: https://www.unicode.org/versions/Unicode16.0.0/
```
import std;
void main()
{
const alphaCount = iota(0, dchar.max).filter!(std.uni.isAlpha).walkLength;
writeln(alphaCount);
// formerly: 138387
// now: 142759
}
```