December 06, 2011
From: "Dmitry Olshansky" <dmitry.olsh at gmail.com>
> On 06.12.2011 10:34, Nick Sabalausky wrote:
>> From: "Nick Sabalausky" <bus_dmdbeta at semitwist.com>
>>> In one of my programs I'm getting:
>>>
>>> D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\regex.d(6576): Error: cannot implicitly convert expression (m) of type Captures!(string,uint) to RegexMatch!(string,ThompsonMatcher)
>>>
>>> Which isn't very helpful. I'm tracking down the code that's triggering it...
>>>
>>
>>
>> Test case:
>>
>> import std.regex;
>> void main()
>> {
>>    std.regex.replace!(
>>        (RegexMatch!string m) { return ""; }
>>    )( "", regex("") );
>> }
>>
> That's the breaking change, and there is no way out of it. This one should
> work:
> std.regex.replace!(
>        ( m) { return ""; }
>    )( "", regex("") );
>
> or
>
> std.regex.replace!(
>        (Captures!string m) { return ""; }
>    )( "", regex("") );
>

Ok, I see.

Is there nothing that can be done to get an error message on the offending line in the user's code? Like a template contraint on replace or something?

December 06, 2011
Al 06/12/11 06:01, En/na Nick Sabalausky ha escrit:
> There's no linebreaks in the "DMD Bugs Fixed" section of the changelog.

Fixed in the last dmd2 beta, still in dmd1 beta

> There's also a missing line break towards the end of "New/Changed Features".

Still in the last dmd2 beta

Regards,
-- 
Jordi Sayol


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3638 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20111206/9c11389f/attachment-0001.bin>
December 06, 2011
On 06.12.2011 12:33, Nick Sabalausky wrote:
> From: "Dmitry Olshansky" <dmitry.olsh at gmail.com>
>> On 06.12.2011 10:34, Nick Sabalausky wrote:
>>> From: "Nick Sabalausky" <bus_dmdbeta at semitwist.com>
>>>> In one of my programs I'm getting:
>>>>
>>>> D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\regex.d(6576): Error: cannot implicitly convert expression (m) of type Captures!(string,uint) to RegexMatch!(string,ThompsonMatcher)
>>>>
>>>> Which isn't very helpful. I'm tracking down the code that's triggering it...
>>>>
>>>
>>>
>>> Test case:
>>>
>>> import std.regex;
>>> void main()
>>> {
>>>    std.regex.replace!(
>>>        (RegexMatch!string m) { return ""; }
>>>    )( "", regex("") );
>>> }
>>>
>> That's the breaking change, and there is no way out of it. This one
>> should work:
>> std.regex.replace!(
>>        ( m) { return ""; }
>>    )( "", regex("") );
>>
>> or
>>
>> std.regex.replace!(
>>        (Captures!string m) { return ""; }
>>    )( "", regex("") );
>>
>
> Ok, I see.
>
> Is there nothing that can be done to get an error message on the offending line in the user's code? Like a template contraint on replace or something?
>
Good idea. I'll try to add an overload for RegexMatch that does pragma(error) with some meaningful message and _LINE_ .

-- 
Dmitry Olshansky

December 06, 2011
On 6 dec 2011, at 08:11, Dmitry Olshansky wrote:

> On 06.12.2011 10:34, Nick Sabalausky wrote:
>> From: "Nick Sabalausky" <bus_dmdbeta at semitwist.com>
>>> In one of my programs I'm getting:
>>> 
>>> D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\regex.d(6576): Error: cannot implicitly convert expression (m) of type Captures!(string,uint) to RegexMatch!(string,ThompsonMatcher)
>>> 
>>> Which isn't very helpful. I'm tracking down the code that's triggering it...
>>> 
>> 
>> 
>> Test case:
>> 
>> import std.regex;
>> void main()
>> {
>>   std.regex.replace!(
>>       (RegexMatch!string m) { return ""; }
>>   )( "", regex("") );
>> }
>> 
> That's the breaking change, and there is no way out of it. This one should work:
> std.regex.replace!(
>       ( m) { return ""; }
>   )( "", regex("") );
> 
> or
> 
> std.regex.replace!(
>       (Captures!string m) { return ""; }
>   )( "", regex("") );
> 
> -- 
> Dmitry Olshansky


You cannot create an alias ?

-- 
/Jacob Carlborg

December 06, 2011
From: "Jordi Sayol" <g.sayol at yahoo.es>
>Al 06/12/11 06:01, En/na Nick Sabalausky ha escrit:
>> There's no linebreaks in the "DMD Bugs Fixed" section of the changelog.
>
>Fixed in the last dmd2 beta, still in dmd1 beta
>
>> There's also a missing line break towards the end of "New/Changed Features".
>
>Still in the last dmd2 beta
>

Also:

    - There's no mention of the new std.regex

    - There's nothing in "Library Bugs Fixed" (Or is that correct?)

And the problems Don mentioned earlier still aren't fixed. To recap:

    - index.html includes a redirect to d-p-l.org. This page should be
viewable locally.

    - The message  "invariant keyword is now deprecated - use immutable
instead" is misleading (and I agree).

    - "Somehow std.boxer has reappeared in the sidebar. Ditto std.cover,
std.intrinsic, std.outofmemory, ..."


December 06, 2011
On 06.12.2011 21:01, Jacob Carlborg wrote:
> On 6 dec 2011, at 08:11, Dmitry Olshansky wrote:
>
>> On 06.12.2011 10:34, Nick Sabalausky wrote:
>>> From: "Nick Sabalausky"<bus_dmdbeta at semitwist.com>
>>>> In one of my programs I'm getting:
>>>>
>>>> D:\DevTool\dmd2beta\dmd2\windows\bin\..\..\src\phobos\std\regex.d(6576): Error: cannot implicitly convert expression (m) of type Captures!(string,uint) to RegexMatch!(string,ThompsonMatcher)
>>>>
>>>> Which isn't very helpful. I'm tracking down the code that's triggering it...
>>>>
>>>
>>> Test case:
>>>
>>> import std.regex;
>>> void main()
>>> {
>>>    std.regex.replace!(
>>>        (RegexMatch!string m) { return ""; }
>>>    )( "", regex("") );
>>> }
>>>
>> That's the breaking change, and there is no way out of it. This one should work:
>> std.regex.replace!(
>>        ( m) { return ""; }
>>    )( "", regex("") );
>>
>> or
>>
>> std.regex.replace!(
>>        (Captures!string m) { return ""; }
>>    )( "", regex("") );
>>
>> -- 
>> Dmitry Olshansky
>
> You cannot create an alias ?
>
It's more complicated then that. RegexMatch is full engine state, which
I can't expose to user (because there are different types of them ).
Also it's ineffective and is a leaky abstraction e.g. previously one can
call popFront on it inside delegate (guess the result, especially since
it was an aliased shallow copy of state).
The only thing that is meant to be exposed are captured matches, and
they are inside separate Captures struct.

-- 
Dmitry Olshansky

1 2
Next ›   Last »