Re: [swift-users] Swift creduce

2017-04-19 Thread Huon Wilson via swift-users
Sorry, I was inaccurate: there’s also some syntactic constructs that don’t get 
minimized as much as they could because they’re too “complicated". The most 
common one I’ve noticed is instance variable without defaults: creduce doesn’t 
seem to be able to coordinate removing both declaration and the later 
initialization at the same time, and it’s invalid to remove either one 
individually.

However, I’ve found doing one run of creduce, followed by some hand editing to 
tease out any those sort of dependencies remaining (including just replacing 
function bodies with fatalError()), lets a second run finish the job. 
Alternatively, after the first run, the code is often small enough that one can 
just do the rest by hand without a second run.

Huon

> On Apr 19, 2017, at 17:21, Huon Wilson via swift-users 
>  wrote:
> 
> No; Swift just looks C-like enough that many of the various heuristics 
> creduce has still work reasonably efficiently. Unless one's “good or not” 
> script is doing something weird, the areas where creduce doesn’t understand 
> Swift are ignored, because the compiler output is not going to match what the 
> script is checking for.
> 
> The main downside of it not understanding Swift is that it is likely to be 
> slower than on C, since it’ll be wasting its time on some mutations that will 
> very very rarely be interesting.
> 
> Huon
> 
>> On Apr 19, 2017, at 17:16, Doug Hill  wrote:
>> 
>> Ok, that's unexpected. Does creduce know about Swift now?
>> 
>> Doug Hill
>> 
>> 
>>> On Apr 19, 2017, at 5:13 PM, Slava Pestov  wrote:
>>> 
>>> Huon noticed that creduce actually works pretty well with Swift as-is. I’ve 
>>> been using it without any issues.
>>> 
>>> Slava
>>> 
 On Apr 19, 2017, at 3:53 PM, Doug Hill via swift-users 
  wrote:
 
 Is there a version of 'creduce' for Swift?
 
 I did some basic googling and didn't find anything, so I thought I'd ask 
 here.
 
 Thanks.
 
 Doug Hill
>> 
> 
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift creduce

2017-04-19 Thread Doug Hill via swift-users
Wow, very cool. I'm not going to lie, creduce really does have some magic going 
on. :)

Thanks everyone, I'll go back to creduce and see how it handles Swift.

Doug Hill


> On Apr 19, 2017, at 5:21 PM, Huon Wilson  wrote:
> 
> No; Swift just looks C-like enough that many of the various heuristics 
> creduce has still work reasonably efficiently. Unless one's “good or not” 
> script is doing something weird, the areas where creduce doesn’t understand 
> Swift are ignored, because the compiler output is not going to match what the 
> script is checking for.
> 
> The main downside of it not understanding Swift is that it is likely to be 
> slower than on C, since it’ll be wasting its time on some mutations that will 
> very very rarely be interesting.
> 
> Huon
> 
>> On Apr 19, 2017, at 17:16, Doug Hill  wrote:
>> 
>> Ok, that's unexpected. Does creduce know about Swift now?
>> 
>> Doug Hill
>> 
>> 
>>> On Apr 19, 2017, at 5:13 PM, Slava Pestov  wrote:
>>> 
>>> Huon noticed that creduce actually works pretty well with Swift as-is. I’ve 
>>> been using it without any issues.
>>> 
>>> Slava
>>> 
 On Apr 19, 2017, at 3:53 PM, Doug Hill via swift-users 
  wrote:
 
 Is there a version of 'creduce' for Swift?
 
 I did some basic googling and didn't find anything, so I thought I'd ask 
 here.
 
 Thanks.
 
 Doug Hill
>> 
> 

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift creduce

2017-04-19 Thread Huon Wilson via swift-users
No; Swift just looks C-like enough that many of the various heuristics creduce 
has still work reasonably efficiently. Unless one's “good or not” script is 
doing something weird, the areas where creduce doesn’t understand Swift are 
ignored, because the compiler output is not going to match what the script is 
checking for.

The main downside of it not understanding Swift is that it is likely to be 
slower than on C, since it’ll be wasting its time on some mutations that will 
very very rarely be interesting.

Huon

> On Apr 19, 2017, at 17:16, Doug Hill  wrote:
> 
> Ok, that's unexpected. Does creduce know about Swift now?
> 
> Doug Hill
> 
> 
>> On Apr 19, 2017, at 5:13 PM, Slava Pestov  wrote:
>> 
>> Huon noticed that creduce actually works pretty well with Swift as-is. I’ve 
>> been using it without any issues.
>> 
>> Slava
>> 
>>> On Apr 19, 2017, at 3:53 PM, Doug Hill via swift-users 
>>>  wrote:
>>> 
>>> Is there a version of 'creduce' for Swift?
>>> 
>>> I did some basic googling and didn't find anything, so I thought I'd ask 
>>> here.
>>> 
>>> Thanks.
>>> 
>>> Doug Hill
> 

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift creduce

2017-04-19 Thread Doug Hill via swift-users
Ok, that's unexpected. Does creduce know about Swift now?

Doug Hill


> On Apr 19, 2017, at 5:13 PM, Slava Pestov  wrote:
> 
> Huon noticed that creduce actually works pretty well with Swift as-is. I’ve 
> been using it without any issues.
> 
> Slava
> 
>> On Apr 19, 2017, at 3:53 PM, Doug Hill via swift-users 
>>  wrote:
>> 
>> Is there a version of 'creduce' for Swift?
>> 
>> I did some basic googling and didn't find anything, so I thought I'd ask 
>> here.
>> 
>> Thanks.
>> 
>> Doug Hill

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift creduce

2017-04-19 Thread Slava Pestov via swift-users
Huon noticed that creduce actually works pretty well with Swift as-is. I’ve 
been using it without any issues.

Slava

> On Apr 19, 2017, at 3:53 PM, Doug Hill via swift-users 
>  wrote:
> 
> Is there a version of 'creduce' for Swift?
> 
> I did some basic googling and didn't find anything, so I thought I'd ask here.
> 
> Thanks.
> 
> Doug Hill
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


[swift-users] Swift creduce

2017-04-19 Thread Doug Hill via swift-users
Is there a version of 'creduce' for Swift?

I did some basic googling and didn't find anything, so I thought I'd ask here.

Thanks.

Doug Hill
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users