Quantcast

Plan for 4.2 release?

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Plan for 4.2 release?

H Plato
Master has been updated with all the outstanding pull requests. There have been a lot of new features and bug fixes since the 4.1 release (brief summary below), so I’m thinking it makes sense to pull together the next stable branch — v4.2!

It would be great to get some testers and feedback. With the holidays upon us, I’m thinking we look to December to test things / provide feedback, and then plan for the 4.2 release in January.

Thoughts, comments, suggestions, feedback?


- Evapotranspiration and integration with opensprinkler
- More zwave devices supported by razberry
- Full background poll model for venstar colortouch thermostats
- Lots of IA7 improvements, audio, floorplan, prefs,
- Object logger, (requires a mh.ini change, object_logger_enable = 1)
- Homebridge and IOS10 Home support
- Scheduler object with IA7 support
- Omnistat improvements
- Doorbird support
- WeatherNOAA fixes
- Harmon support
- plcbus support
- mysensors support
- Rain8 support
- CBus support
- other general fixes
------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Jeff Siddall
On 11/30/2016 08:56 PM, H Plato wrote:
> Master has been updated with all the outstanding pull requests. There have been a lot of new features and bug fixes since the 4.1 release (brief summary below), so I’m thinking it makes sense to pull together the next stable branch — v4.2!
>
> It would be great to get some testers and feedback. With the holidays upon us, I’m thinking we look to December to test things / provide feedback, and then plan for the 4.2 release in January.
>
> Thoughts, comments, suggestions, feedback?

I just pulled master and got this:

12/01/16 09:27:03 AM: Can't locate experimental.pm in @INC (@INC
contains: /etc/mh/code ./../code/common /usr/local/mh/bin/../lib
/usr/local/mh/bin/../lib/site . /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
/usr/local/mh/bin/../lib/Owfs_Item.pm line 91.

I remember a discussion about perl modules on the list a while back.
Was the consensus that each user should maintain their own perl modules?
  If so it might be good to list any new modules in the release notes.

Anyway, testing now.  Will post any other feedback as I have it.

Thanks,

Jeff

------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Experimental.pm, that's a new one.

I don't think we landed on a approach for included dependancies.  It would be my preference that the first install 'should just work' for whatever the default loaded modules are.

Maybe the code files should be commented that dependancies are manually required. This would be visible on the 'set up misterhouse'/common code web page. That way its clear if someone adds a module and gets an dependancy error, where the issue is.

Thanks for testing and sending in the bug report!

Sent from my mobile device.

> On Dec 1, 2016, at 9:13 AM, Jeff Siddall <[hidden email]> wrote:
>
>> On 11/30/2016 08:56 PM, H Plato wrote:
>> Master has been updated with all the outstanding pull requests. There have been a lot of new features and bug fixes since the 4.1 release (brief summary below), so I’m thinking it makes sense to pull together the next stable branch — v4.2!
>>
>> It would be great to get some testers and feedback. With the holidays upon us, I’m thinking we look to December to test things / provide feedback, and then plan for the 4.2 release in January.
>>
>> Thoughts, comments, suggestions, feedback?
>
> I just pulled master and got this:
>
> 12/01/16 09:27:03 AM: Can't locate experimental.pm in @INC (@INC
> contains: /etc/mh/code ./../code/common /usr/local/mh/bin/../lib
> /usr/local/mh/bin/../lib/site . /usr/local/lib64/perl5
> /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
> /usr/local/mh/bin/../lib/Owfs_Item.pm line 91.
>
> I remember a discussion about perl modules on the list a while back.
> Was the consensus that each user should maintain their own perl modules?
>  If so it might be good to list any new modules in the release notes.
>
> Anyway, testing now.  Will post any other feedback as I have it.
>
> Thanks,
>
> Jeff
>
> ------------------------------------------------------------------------------
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Eloy Paris
Hello,

I ran into this problem a month or so ago when I switched to master.
This fixed it for me:

sudo aptitude install libexperimental-perl

I didn't bother to look into lib/Owfs_Item.pm to see why experimental.pm
is needed. Tobias Sachs might know as it seems he is the one who added
the dependency:

----------------------------------------------------------------------
commit ea511cc0830efb1294dd2890510f323a37baad55
Author: Tobias Sachs <[hidden email]>
Date:   Tue Dec 8 10:20:42 2015 +0100

    prevent oopses about experimenal smartmatch operator
   
    this only adds
   
        use experimenal 'smartmach';
   
    to prevent misterhouse from logging
   
        Oops1: Smartmatch is experimental at ../lib/Owfs_Item.pm line...
   
    messages during startup.
----------------------------------------------------------------------

Cheers,

Eloy Paris.-

On Thu, Dec 01, 2016 at 12:00:02PM -0700, H Plato wrote:

> Experimental.pm, that's a new one.
>
> I don't think we landed on a approach for included dependancies.  It would be my preference that the first install 'should just work' for whatever the default loaded modules are.
>
> Maybe the code files should be commented that dependancies are manually required. This would be visible on the 'set up misterhouse'/common code web page. That way its clear if someone adds a module and gets an dependancy error, where the issue is.
>
> Thanks for testing and sending in the bug report!
>
> Sent from my mobile device.
>
> > On Dec 1, 2016, at 9:13 AM, Jeff Siddall <[hidden email]> wrote:
> >
> >> On 11/30/2016 08:56 PM, H Plato wrote:
> >> Master has been updated with all the outstanding pull requests. There have been a lot of new features and bug fixes since the 4.1 release (brief summary below), so I’m thinking it makes sense to pull together the next stable branch — v4.2!
> >>
> >> It would be great to get some testers and feedback. With the holidays upon us, I’m thinking we look to December to test things / provide feedback, and then plan for the 4.2 release in January.
> >>
> >> Thoughts, comments, suggestions, feedback?
> >
> > I just pulled master and got this:
> >
> > 12/01/16 09:27:03 AM: Can't locate experimental.pm in @INC (@INC
> > contains: /etc/mh/code ./../code/common /usr/local/mh/bin/../lib
> > /usr/local/mh/bin/../lib/site . /usr/local/lib64/perl5
> > /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> > /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
> > /usr/local/mh/bin/../lib/Owfs_Item.pm line 91.
> >
> > I remember a discussion about perl modules on the list a while back.
> > Was the consensus that each user should maintain their own perl modules?
> >  If so it might be good to list any new modules in the release notes.
> >
> > Anyway, testing now.  Will post any other feedback as I have it.
> >
> > Thanks,
> >
> > Jeff
> >

------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Jeff Siddall
On 12/01/2016 02:57 PM, Eloy Paris wrote:
> Hello,
>
> I ran into this problem a month or so ago when I switched to master.
> This fixed it for me:
>
> sudo aptitude install libexperimental-perl

Yeah, looks like RHEL doesn't bundle that one so I just went into cpan
and installed with "i experimental"

------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm

This dependancy has also been added to PLCBus.

Tobias, can you comment?

> On Dec 1, 2016, at 1:56 PM, Jeff Siddall <[hidden email]> wrote:
>
> On 12/01/2016 02:57 PM, Eloy Paris wrote:
>> Hello,
>>
>> I ran into this problem a month or so ago when I switched to master.
>> This fixed it for me:
>>
>> sudo aptitude install libexperimental-perl
>
> Yeah, looks like RHEL doesn't bundle that one so I just went into cpan and installed with "i experimental"


------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Tobias Sachs
Hello,
experimental was added to use the smartmatch operator '~~'
AFIAK this only prevents warnings like "Smartmatch is experimental at
../lib/PLCBUS.pm line"
If it is a problem we could remove the dependency and live with those
warnings, or replace the code where the smartmatch operator is used.

Tobi

Am 01.12.2016 um 22:05 schrieb H Plato:

> Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm
>
> This dependancy has also been added to PLCBus.
>
> Tobias, can you comment?
>
>> On Dec 1, 2016, at 1:56 PM, Jeff Siddall <[hidden email]> wrote:
>>
>> On 12/01/2016 02:57 PM, Eloy Paris wrote:
>>> Hello,
>>>
>>> I ran into this problem a month or so ago when I switched to master.
>>> This fixed it for me:
>>>
>>> sudo aptitude install libexperimental-perl
>> Yeah, looks like RHEL doesn't bundle that one so I just went into cpan and installed with "i experimental"


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Thanks Tobias. 

Learn something new everyday. So smartmatching allows for comparisons without having to explicitly use == for numeric or eq for strings.


There are 9 lines that have smartmatching, 6 in Owfs_Item and 3 in PLCBus. Does this break compatibility with perl versions less than 5.10?

I’d vote to either include experimental.pm in site_libs or remove the dependancy and live with the warnings -- rather than pulling down master and a crash on startup.

Other thoughts, suggestions?

On Dec 1, 2016, at 3:24 PM, Tobias Sachs <[hidden email]> wrote:

Hello,
experimental was added to use the smartmatch operator '~~'
AFIAK this only prevents warnings like "Smartmatch is experimental at ../lib/PLCBUS.pm line"
If it is a problem we could remove the dependency and live with those warnings, or replace the code where the smartmatch operator is used.

Tobi

Am 01.12.2016 um 22:05 schrieb H Plato:
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm

This dependancy has also been added to PLCBus.

Tobias, can you comment?

On Dec 1, 2016, at 1:56 PM, Jeff Siddall <[hidden email]> wrote:

On 12/01/2016 02:57 PM, Eloy Paris wrote:
Hello,

I ran into this problem a month or so ago when I switched to master.
This fixed it for me:

sudo aptitude install libexperimental-perl
Yeah, looks like RHEL doesn't bundle that one so I just went into cpan and installed with "i experimental"



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Jeff Siddall
On 12/01/2016 05:31 PM, H Plato wrote:
> I’d vote to either include experimental.pm in site_libs or remove the
> dependancy and live with the warnings -- rather than pulling down master
> and a crash on startup.
>
> Other thoughts, suggestions?

I am good with including it in site_libs.

Jeff

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

George Clark
In reply to this post by H Plato

As has been mentioned, smartmatch operator is still considered experimental and is subject to change. Even in Perl 5.24, it's listed as experimental.

http://perldoc.perl.org/perlop.html#Smartmatch-Operator

The CPAN dependency appears to just make it easier to disable the warnings about use of an experimental feature.  So adding the module has no negative impact.  The underlying concern though regardless of how you disable the warnings, is that the code depends on a perl feature that is expected to change.

The plan on how smartmatch will change was proposed back in 2012.  See http://markmail.org/message/u22titrq5ljclz4b

Some other posting I've seen suggest it will possibly happen in 5.26.  Here is a discussion from September on Perl 5 Porters,. https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E

So the magic is going to change, and code that uses it might break.  There is probably good reasons to not use experimental code.   I have not reviewed the offending code,  so I have no idea if the proposed changes will break things.

George

On 12/01/2016 04:05 PM, H Plato wrote:
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm

This dependancy has also been added to PLCBus.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
I’m kinda leaning that way myself. It looks like the smartmatch doesn’t solve any particularly challenging problems, and with 9 lines of code, this can introduce complexity and potentially break compatibility for older perl versions:

Tobias, these are your changes, what do you think?

Owfs_Item.pm:    $value = 1 if ( $state ~~ $ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ $OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ main::ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ main::OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ 'yes' );
Owfs_Item.pm:    $value = 0 if ( $state ~~ 'no' );
PLCBUS.pm:            && $cmd ~~ ( $self->{current_cmd}->{expected_response} ) )
PLCBUS.pm:    if ( $new_state ~~ @light_cmds ) {
PLCBUS.pm:    elsif ( $new_state ~~ @plc_cmds ) {

On Dec 1, 2016, at 7:48 PM, George Clark <[hidden email]> wrote:

As has been mentioned, smartmatch operator is still considered experimental and is subject to change. Even in Perl 5.24, it's listed as experimental.

http://perldoc.perl.org/perlop.html#Smartmatch-Operator

The CPAN dependency appears to just make it easier to disable the warnings about use of an experimental feature.  So adding the module has no negative impact.  The underlying concern though regardless of how you disable the warnings, is that the code depends on a perl feature that is expected to change.

The plan on how smartmatch will change was proposed back in 2012.  See http://markmail.org/message/u22titrq5ljclz4b

Some other posting I've seen suggest it will possibly happen in 5.26.  Here is a discussion from September on Perl 5 Porters,. https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E

So the magic is going to change, and code that uses it might break.  There is probably good reasons to not use experimental code.   I have not reviewed the offending code,  so I have no idea if the proposed changes will break things.

George

On 12/01/2016 04:05 PM, H Plato wrote:
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm

This dependancy has also been added to PLCBus.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Tobias Sachs
Hello,
I understand the arguments against the smartmatch operator and I'm not
sure why i used it in the first place. So I replaced the usage of ~~
from the plcbus module and created a pull request (https://github.com/hollie/misterhouse/pull/642).

If i read the git log correctly, the smartmatch in Owfs_Item was
introduced by Jim Duda. I only removed the warnings by adding "use
experimental 'smartmatch'" to the top of the file...
At the moment I don't have any 1-wire setup and could not test any
changes so i don't want to update this code. But if $state is always a
string replacing ~~ with eq or matching against a case insensitive
regexp might be enough to get rid of the smartmatch.

Tobi


H Plato <[hidden email]> wrote:

> I’m kinda leaning that way myself. It looks like the smartmatch doesn’t solve any particularly challenging problems, and with 9 lines of code, this can introduce complexity and potentially break compatibility for older perl versions:
>
> Tobias, these are your changes, what do you think?
>
> Owfs_Item.pm:    $value = 1 if ( $state ~~ $ON );
> Owfs_Item.pm:    $value = 0 if ( $state ~~ $OFF );
> Owfs_Item.pm:    $value = 1 if ( $state ~~ main::ON );
> Owfs_Item.pm:    $value = 0 if ( $state ~~ main::OFF );
> Owfs_Item.pm:    $value = 1 if ( $state ~~ 'yes' );
> Owfs_Item.pm:    $value = 0 if ( $state ~~ 'no' );
> PLCBUS.pm:            && $cmd ~~ ( $self->{current_cmd}->{expected_response} ) )
> PLCBUS.pm:    if ( $new_state ~~ @light_cmds ) {
> PLCBUS.pm:    elsif ( $new_state ~~ @plc_cmds ) {
>
> > On Dec 1, 2016, at 7:48 PM, George Clark <[hidden email]> wrote:
> >
> > As has been mentioned, smartmatch operator is still considered experimental and is subject to change. Even in Perl 5.24, it's listed as experimental.
> >
> > http://perldoc.perl.org/perlop.html#Smartmatch-Operator <http://perldoc.perl.org/perlop.html#Smartmatch-Operator>
> > The CPAN dependency appears to just make it easier to disable the warnings about use of an experimental feature.  So adding the module has no negative impact.  The underlying concern though regardless of how you disable the warnings, is that the code depends on a perl feature that is expected to change.
> > The plan on how smartmatch will change was proposed back in 2012.  See http://markmail.org/message/u22titrq5ljclz4b <http://markmail.org/message/u22titrq5ljclz4b>
> > Some other posting I've seen suggest it will possibly happen in 5.26.  Here is a discussion from September on Perl 5 Porters,.https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E <https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E>
> >
> > So the magic is going to change, and code that uses it might break.  There is probably good reasons to not use experimental code.   I have not reviewed the offending code,  so I have no idea if the proposed changes will break things.
> >
> > George
> >
> > On 12/01/2016 04:05 PM, H Plato wrote:
> >> Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm <http://search.cpan.org/%7Eleont/experimental-0.006/lib/experimental.pm>
> >>
> >> This dependancy has also been added to PLCBus.
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
> > To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Great, thanks Tobias!


On Dec 4, 2016, at 1:20 PM, Tobias Sachs <[hidden email]> wrote:

Hello,
I understand the arguments against the smartmatch operator and I'm not
sure why i used it in the first place. So I replaced the usage of ~~
from the plcbus module and created a pull request (https://github.com/hollie/misterhouse/pull/642).

If i read the git log correctly, the smartmatch in Owfs_Item was
introduced by Jim Duda. I only removed the warnings by adding "use
experimental 'smartmatch'" to the top of the file...
At the moment I don't have any 1-wire setup and could not test any
changes so i don't want to update this code. But if $state is always a
string replacing ~~ with eq or matching against a case insensitive
regexp might be enough to get rid of the smartmatch.

Tobi


H Plato <[hidden email]> wrote:
I’m kinda leaning that way myself. It looks like the smartmatch doesn’t solve any particularly challenging problems, and with 9 lines of code, this can introduce complexity and potentially break compatibility for older perl versions:

Tobias, these are your changes, what do you think?

Owfs_Item.pm:    $value = 1 if ( $state ~~ $ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ $OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ main::ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ main::OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ 'yes' );
Owfs_Item.pm:    $value = 0 if ( $state ~~ 'no' );
PLCBUS.pm:            && $cmd ~~ ( $self->{current_cmd}->{expected_response} ) )
PLCBUS.pm:    if ( $new_state ~~ @light_cmds ) {
PLCBUS.pm:    elsif ( $new_state ~~ @plc_cmds ) {

On Dec 1, 2016, at 7:48 PM, George Clark <[hidden email]> wrote:

As has been mentioned, smartmatch operator is still considered experimental and is subject to change. Even in Perl 5.24, it's listed as experimental.

http://perldoc.perl.org/perlop.html#Smartmatch-Operator <http://perldoc.perl.org/perlop.html#Smartmatch-Operator>
The CPAN dependency appears to just make it easier to disable the warnings about use of an experimental feature.  So adding the module has no negative impact.  The underlying concern though regardless of how you disable the warnings, is that the code depends on a perl feature that is expected to change.
The plan on how smartmatch will change was proposed back in 2012.  See http://markmail.org/message/u22titrq5ljclz4b <http://markmail.org/message/u22titrq5ljclz4b> 
Some other posting I've seen suggest it will possibly happen in 5.26.  Here is a discussion from September on Perl 5 Porters,.https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E<https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E>

So the magic is going to change, and code that uses it might break.  There is probably good reasons to not use experimental code.   I have not reviewed the offending code,  so I have no idea if the proposed changes will break things. 

George

On 12/01/2016 04:05 PM, H Plato wrote:
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm <http://search.cpan.org/%7Eleont/experimental-0.006/lib/experimental.pm>

This dependancy has also been added to PLCBus.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
In reply to this post by Tobias Sachs
I haven’t heard from Jim, so I attempted to change those few lines so we take the smartmatch dependancy out of 4.2

Lieven, using the git hooks, I got the following error when trying to commit the change to my repo. I didn’t touch this part of the code, so I’m assuming it’s the way the package and objects are defined. I’m not sure if we should fix the code so that the validation works, or look at the validation hooks and fix them.

I pushed the file to my github anyways, using git commit —no-verify if you want to take a look (owfs_noexp branch)

## Please see file lib/Owfs_Item.pm.ERR
Died at bin/githook-perltidy line 201.

bin/githook-perltidy: pre-commit FAIL! Restoring...
    git reset --hard
HEAD is now at abd43a8 Merge pull request #641 from jsiddall/add_MYS_MULTIMETER
    git stash pop --quiet —index

And the contents of Owfs_Item.pm.ERR

1538: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1529
1547: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1538
2015: To see 2 non-critical warnings rerun with -w

And the part of the code it doesn’t like:


1518 package Owfs_DS2405;
1519 use strict;
1520 
1521 our $ON    = 'on';
1522 our $OFF   = 'off';
1523 our $PIO   = 0;
1524 our $SENSE = 1;
1525 our $LATCH = 2;
1526 
1527 @Owfs_DS2405::ISA = ('Owfs_DS2405_pio');
1528 
1529 sub new {
1530     my ( $class, $device, $location, $interval ) = @_;
1531     my $self = new Owfs_DS2405_pio( $device, $location, $interval );
1532     bless $self, $class;
1533     return $self;
1534 }
1535 
1536 @Owfs_DS2405_pio::ISA = ('Owfs_Switch');
1537 
1538 sub new {
1539     my ( $class, $device, $location, $interval ) = @_;
1540     my $self = new Owfs_Switch( $device, $location, undef, $interval, $PIO );
1541     bless $self, $class;
1542     return $self;
1543 }
1544 
1545 @Owfs_DS2405_sense::ISA = ('Owfs_Switch');
1546 
1547 sub new {
1548     my ( $class, $device, $location, $interval ) = @_;
1549     my $self = new Owfs_Switch( $device, $location, undef, $interval, $SENSE );
1550     bless $self, $class;
1551     return $self;
1552 }

On Dec 4, 2016, at 1:20 PM, Tobias Sachs <[hidden email]> wrote:

Hello,
I understand the arguments against the smartmatch operator and I'm not
sure why i used it in the first place. So I replaced the usage of ~~
from the plcbus module and created a pull request (https://github.com/hollie/misterhouse/pull/642).

If i read the git log correctly, the smartmatch in Owfs_Item was
introduced by Jim Duda. I only removed the warnings by adding "use
experimental 'smartmatch'" to the top of the file...
At the moment I don't have any 1-wire setup and could not test any
changes so i don't want to update this code. But if $state is always a
string replacing ~~ with eq or matching against a case insensitive
regexp might be enough to get rid of the smartmatch.

Tobi


H Plato <[hidden email]> wrote:
I’m kinda leaning that way myself. It looks like the smartmatch doesn’t solve any particularly challenging problems, and with 9 lines of code, this can introduce complexity and potentially break compatibility for older perl versions:

Tobias, these are your changes, what do you think?

Owfs_Item.pm:    $value = 1 if ( $state ~~ $ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ $OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ main::ON );
Owfs_Item.pm:    $value = 0 if ( $state ~~ main::OFF );
Owfs_Item.pm:    $value = 1 if ( $state ~~ 'yes' );
Owfs_Item.pm:    $value = 0 if ( $state ~~ 'no' );
PLCBUS.pm:            && $cmd ~~ ( $self->{current_cmd}->{expected_response} ) )
PLCBUS.pm:    if ( $new_state ~~ @light_cmds ) {
PLCBUS.pm:    elsif ( $new_state ~~ @plc_cmds ) {

On Dec 1, 2016, at 7:48 PM, George Clark <[hidden email]> wrote:

As has been mentioned, smartmatch operator is still considered experimental and is subject to change. Even in Perl 5.24, it's listed as experimental.

http://perldoc.perl.org/perlop.html#Smartmatch-Operator <http://perldoc.perl.org/perlop.html#Smartmatch-Operator>
The CPAN dependency appears to just make it easier to disable the warnings about use of an experimental feature.  So adding the module has no negative impact.  The underlying concern though regardless of how you disable the warnings, is that the code depends on a perl feature that is expected to change.
The plan on how smartmatch will change was proposed back in 2012.  See http://markmail.org/message/u22titrq5ljclz4b <http://markmail.org/message/u22titrq5ljclz4b> 
Some other posting I've seen suggest it will possibly happen in 5.26.  Here is a discussion from September on Perl 5 Porters,.https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E<https://groups.google.com/forum/#!topic/perl.perl5.porters/7YqNduHm45E>

So the magic is going to change, and code that uses it might break.  There is probably good reasons to not use experimental code.   I have not reviewed the offending code,  so I have no idea if the proposed changes will break things. 

George

On 12/01/2016 04:05 PM, H Plato wrote:
Back to Eloy’s point, I’m unclear on the value and purpose of the Experimental module. CPAN’s pretty light no details what it does —“experimental - Experimental features made easy" http://search.cpan.org/~leont/experimental-0.006/lib/experimental.pm <http://search.cpan.org/%7Eleont/experimental-0.006/lib/experimental.pm>

This dependancy has also been added to PLCBus.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Eloy Paris
On Fri, Dec 09, 2016 at 10:33:12AM -0700, H Plato wrote:

[...]

> And the contents of Owfs_Item.pm.ERR
>
> 1538: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1529
> 1547: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1538
> 2015: To see 2 non-critical warnings rerun with -w
>
> And the part of the code it doesn’t like:
>
>
> 1518 package Owfs_DS2405;
> 1519 use strict;
> 1520
> 1521 our $ON    = 'on';
> 1522 our $OFF   = 'off';
> 1523 our $PIO   = 0;
> 1524 our $SENSE = 1;
> 1525 our $LATCH = 2;
> 1526
> 1527 @Owfs_DS2405::ISA = ('Owfs_DS2405_pio');
> 1528
> 1529 sub new {
> 1530     my ( $class, $device, $location, $interval ) = @_;
> 1531     my $self = new Owfs_DS2405_pio( $device, $location, $interval );
> 1532     bless $self, $class;
> 1533     return $self;
> 1534 }
> 1535
> 1536 @Owfs_DS2405_pio::ISA = ('Owfs_Switch');
> 1537
> 1538 sub new {
> 1539     my ( $class, $device, $location, $interval ) = @_;
> 1540     my $self = new Owfs_Switch( $device, $location, undef, $interval, $PIO );
> 1541     bless $self, $class;
> 1542     return $self;
> 1543 }
> 1544
> 1545 @Owfs_DS2405_sense::ISA = ('Owfs_Switch');
> 1546
> 1547 sub new {
> 1548     my ( $class, $device, $location, $interval ) = @_;
> 1549     my $self = new Owfs_Switch( $device, $location, undef, $interval, $SENSE );
> 1550     bless $self, $class;
> 1551     return $self;
> 1552 }

That's strange... that code is missing "package Owfs_DS2405_pio" and
"package Owfs_DS2405_sense" just like it's done for Owfs_DS2408_pio and
Owfs_DS2408_sense a few lines below in the same file, i.e. something
like:

----------------------------------------------------------------------
diff --git a/lib/Owfs_Item.pm b/lib/Owfs_Item.pm
index 647f998..848fc1c 100644
--- a/lib/Owfs_Item.pm
+++ b/lib/Owfs_Item.pm
@@ -1533,6 +1533,15 @@ sub new {
     return $self;
 }
 
+package Owfs_DS2405_pio;
+use strict;
+
+our $ON    = 'on';
+our $OFF   = 'off';
+our $PIO   = 0;
+our $SENSE = 1;
+our $LATCH = 2;
+
 @Owfs_DS2405_pio::ISA = ('Owfs_Switch');
 
 sub new {
@@ -1542,6 +1551,15 @@ sub new {
     return $self;
 }
 
+package Owfs_DS2405_sense;
+use strict;
+
+our $ON    = 'on';
+our $OFF   = 'off';
+our $PIO   = 0;
+our $SENSE = 1;
+our $LATCH = 2;
+
 @Owfs_DS2405_sense::ISA = ('Owfs_Switch');
 
 sub new {
----------------------------------------------------------------------

So I wonder how this was able to get committed before given the Perltidy
githook, and whether that code is actually working.

Cheers,

Eloy Paris.-


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Thanks Eloy,

  The code looked weird to me, but thought it might be more new experimental features (like smartmatch) that I wasn’t familiar with.

  I added back the packages, and put in a pull request, and it passed the travis tests (although it doesn’t call the Owfs code directly). Again, Kudos to Lieven for the git hooks and continuous integration to help us all submit quality code! It still is strange that it got submitted in the first place though.

  I merge the change into master, so if anyone wants to test it out (Ideally someone that uses Owfs_Item), that would be great!!

  Lieven’s git fix was also merged, so a zip download should now work fine for master.


> On Dec 9, 2016, at 12:38 PM, Eloy Paris <[hidden email]> wrote:
>
> On Fri, Dec 09, 2016 at 10:33:12AM -0700, H Plato wrote:
>
> [...]
>
>> And the contents of Owfs_Item.pm.ERR
>>
>> 1538: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1529
>> 1547: already saw definition of 'sub new' in package 'Owfs_DS2405' at line 1538
>> 2015: To see 2 non-critical warnings rerun with -w
>>
>> And the part of the code it doesn’t like:
>>
>>
>> 1518 package Owfs_DS2405;
>> 1519 use strict;
>> 1520
>> 1521 our $ON    = 'on';
>> 1522 our $OFF   = 'off';
>> 1523 our $PIO   = 0;
>> 1524 our $SENSE = 1;
>> 1525 our $LATCH = 2;
>> 1526
>> 1527 @Owfs_DS2405::ISA = ('Owfs_DS2405_pio');
>> 1528
>> 1529 sub new {
>> 1530     my ( $class, $device, $location, $interval ) = @_;
>> 1531     my $self = new Owfs_DS2405_pio( $device, $location, $interval );
>> 1532     bless $self, $class;
>> 1533     return $self;
>> 1534 }
>> 1535
>> 1536 @Owfs_DS2405_pio::ISA = ('Owfs_Switch');
>> 1537
>> 1538 sub new {
>> 1539     my ( $class, $device, $location, $interval ) = @_;
>> 1540     my $self = new Owfs_Switch( $device, $location, undef, $interval, $PIO );
>> 1541     bless $self, $class;
>> 1542     return $self;
>> 1543 }
>> 1544
>> 1545 @Owfs_DS2405_sense::ISA = ('Owfs_Switch');
>> 1546
>> 1547 sub new {
>> 1548     my ( $class, $device, $location, $interval ) = @_;
>> 1549     my $self = new Owfs_Switch( $device, $location, undef, $interval, $SENSE );
>> 1550     bless $self, $class;
>> 1551     return $self;
>> 1552 }
>
> That's strange... that code is missing "package Owfs_DS2405_pio" and
> "package Owfs_DS2405_sense" just like it's done for Owfs_DS2408_pio and
> Owfs_DS2408_sense a few lines below in the same file, i.e. something
> like:
>
> ----------------------------------------------------------------------
> diff --git a/lib/Owfs_Item.pm b/lib/Owfs_Item.pm
> index 647f998..848fc1c 100644
> --- a/lib/Owfs_Item.pm
> +++ b/lib/Owfs_Item.pm
> @@ -1533,6 +1533,15 @@ sub new {
>     return $self;
> }
>
> +package Owfs_DS2405_pio;
> +use strict;
> +
> +our $ON    = 'on';
> +our $OFF   = 'off';
> +our $PIO   = 0;
> +our $SENSE = 1;
> +our $LATCH = 2;
> +
> @Owfs_DS2405_pio::ISA = ('Owfs_Switch');
>
> sub new {
> @@ -1542,6 +1551,15 @@ sub new {
>     return $self;
> }
>
> +package Owfs_DS2405_sense;
> +use strict;
> +
> +our $ON    = 'on';
> +our $OFF   = 'off';
> +our $PIO   = 0;
> +our $SENSE = 1;
> +our $LATCH = 2;
> +
> @Owfs_DS2405_sense::ISA = ('Owfs_Switch');
>
> sub new {
> ----------------------------------------------------------------------
>
> So I wonder how this was able to get committed before given the Perltidy
> githook, and whether that code is actually working.
>
> Cheers,
>
> Eloy Paris.-
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

Eloy Paris
Hi Howard,

On Fri, Dec 09, 2016 at 01:01:56PM -0700, H Plato wrote:

[...]

>   I merge the change into master, so if anyone wants to test it out (Ideally someone that uses Owfs_Item), that would be great!!

I use Owfs_Item and just updated my install to run the latest code from
master and things seem to be working fine. I don't use all the objects
defined in lib/Owfs_Item.pm, though.

By the way, "use experimental 'smartmatch'" is still present in
lib/Owfs_Item.pm after your rewrite to not make use of the smartmatch
operator.

Cheers,

Eloy Paris.-

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Plan for 4.2 release?

H Plato
Thanks Eloy, fixed and master’s updated.

> On Dec 9, 2016, at 2:38 PM, Eloy Paris <[hidden email]> wrote:
>
> Hi Howard,
>
> On Fri, Dec 09, 2016 at 01:01:56PM -0700, H Plato wrote:
>
> [...]
>
>>  I merge the change into master, so if anyone wants to test it out (Ideally someone that uses Owfs_Item), that would be great!!
>
> I use Owfs_Item and just updated my install to run the latest code from
> master and things seem to be working fine. I don't use all the objects
> defined in lib/Owfs_Item.pm, though.
>
> By the way, "use experimental 'smartmatch'" is still present in
> lib/Owfs_Item.pm after your rewrite to not make use of the smartmatch
> operator.
>
> Cheers,
>
> Eloy Paris.-


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Loading...