Hi,
The return value from a lambda gets "int'ified" so I am not able to distinguish a "return 0;" from a "return UNDEFINED;".
I guess it's not too hard to fix, but might break something?
Is there a workaround.. what can I do?
Ex: Pike v7.7 release 9 running Hilfe v3.5 (Incremental Pike Frontend)
function a = lambda( int b ){ if( b > 0 ) return b-1; if( b == 0 )
return UNDEFINED; };
a(2);
(2) Result: 1
a(1);
(3) Result: 0
zero_type(_);
(4) Result: 0
a(0);
(5) Result: 0
zero_type(_);
(6) Result: 0 // would like zero_type to return 1 here!
a(-1);
(7) Result: 0
zero_type(_);
(8) Result: 0 // I expected UNDEFINED, since nothing was
// returned from the lambda..
//K
Oops, my bad.
Forgot all about that life isn't always the same in Hilfe land as in "default" pike
zero_type(lambda(){}());
(3) Result: 0
zero_type(lambda(){return UNDEFINED;}());
(4) Result: 1
Got confused by that the type of result wasn't (isn't) preserved in Hilfe.
NB: zero_type() will never give the right answer for values retrieved from Hilfe's result-history.
//K
Kaos wrote:
Hi,
The return value from a lambda gets "int'ified" so I am not able to distinguish a "return 0;" from a "return UNDEFINED;".
I guess it's not too hard to fix, but might break something?
Is there a workaround.. what can I do?
Ex: Pike v7.7 release 9 running Hilfe v3.5 (Incremental Pike Frontend)
function a = lambda( int b ){ if( b > 0 ) return b-1; if( b == 0 )
return UNDEFINED; };
a(2);
(2) Result: 1
a(1);
(3) Result: 0
zero_type(_);
(4) Result: 0
a(0);
(5) Result: 0
zero_type(_);
(6) Result: 0 // would like zero_type to return 1 here!
a(-1);
(7) Result: 0
zero_type(_);
(8) Result: 0 // I expected UNDEFINED, since nothing was
// returned from the lambda..
//K
How about we open up a Bugzilla for Pike on Lysator and add hilfe as a component? It's 10min work and I can do it. All these little differences in Hilfe should be collected somewhere. Bugzilla isn't my favourite issue- and bug-tracker, but it's avilable _now_.
It is? Then I must have been mistaken when I took half an hour yesterday to produce a non-working solution.
It might have broken since I added a Product last, but I've added "Pike" now. We'll see if it shows up in tonights* cron run.
* Or whenever Erik has set them up to run.
It doesn't feel like a natural place bugs post 7.4 I suppose. Plus possible maintainers of Crunch are limited to you and perhaps mast.
Peter Bortas @ Pike developers forum wrote:
How about we open up a Bugzilla for Pike on Lysator and add hilfe as a component? It's 10min work and I can do it. All these little differences in Hilfe should be collected somewhere. Bugzilla isn't my favourite issue- and bug-tracker, but it's avilable _now_.
What about the mantis bt that Alexander put up some month or two ago.. ? haven't used it any yet, though.
Alexander Demenshin wrote (2004-11-05):
Hi,
Just in case - I did setup Mantis to aid bug reporting, tracking etc.
It's located at:
http://pike.strongfire.net/bts/
[...]
//K
I had forgot about that. Working solutions with administrators other than me is always good. :-) I've revised my opinion on Crunch since yesturday though. It's a good working system that has the advantage of being the normal worktool for the currently biggest source contributors to Pike.
I think my reluctance to use it steams mainly from the fact that the database isn't available to outside people for redundacy storage/emergency moves. My system administrator paranoia strikes again. I'll talk to grubba and see if we can set something up.
pike-devel@lists.lysator.liu.se