On Saturday, 15 October 2016 at 06:51:44 UTC, Satoshi wrote:
Hello,
can someone look at this quite simple bug in dmd please?
https://issues.dlang.org/show_bug.cgi?id=16590
I cannot release non-opensource libraries without this.
You mean auto ref right ?
please attach a small test-case.
You ca
It can also be written like this producing smaller code.
But it the cost of slower decoding.
dchar myFront(ref char[] str) pure
{
dchar c = cast(dchar) str.ptr[0];
if (c & 128)
{
if (c & 64)
{
int idx = 0;
int l = charWidthTab.ptr[c - 192];
On Saturday, 15 October 2016 at 19:07:50 UTC, Patrick Schluter
wrote:
At least with that lookup table below, you can detect isolated
continuation bytes (192 and 193) and invalid codes (above 244).
__gshared static immutable ubyte[] charWidthTab = [
1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
On Saturday, 15 October 2016 at 10:17:09 UTC, Matthias Bentrup
wrote:
You could turn "hints" that can possibly create invalid code
automatically into assertions in non-release builds. Or let the
user add an assertion and use the "turn assert() into assume()"
idea for release builds.
I canno
On Sunday, 16 October 2016 at 07:59:16 UTC, Patrick Schluter
wrote:
Here my version. It's probably not the shortest (100 ligns of
assembly with LDC) but it is correct and has following
properties:
- Performance proportional to the encoding length
- Detects Invalid byte sequences
- Detects Overl
On Monday, 17 October 2016 at 08:03:18 UTC, Satoshi wrote:
On Monday, 17 October 2016 at 07:54:33 UTC, Mike Parker wrote:
On Monday, 17 October 2016 at 07:50:17 UTC, Satoshi wrote:
On Saturday, 15 October 2016 at 06:55:31 UTC, Uplink_Coder
wrote:
On Saturday, 15 October 2016 at 06:51:44 UTC, S