BUG with parallel for-while-for

4 views
Skip to first unread message

Ralf Hemmecke

unread,
Jun 10, 2022, 6:36:18 PM6/10/22
to fricas-devel
(13) -> [k for k in 4.. by -3 while k>0]

(13) [4, 1]
Type: Stream(Integer)
(14) -> [k for k in 4.. by -3 while k>0 for m in 1..29]
There are no library operations named swhile
Use HyperDoc Browse or issue
)what op swhile
to learn if there is any operation containing " swhile " in its
name.

Cannot find a definition or applicable library operation named
swhile with argument type(s)
(Record(part1: Integer,part2: Integer) -> Boolean)
InfiniteTuple(Record(part1: Integer,part2: Integer))

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.

Shouldn´t I be able to freely mix for and while in a parallel iteration?

Ralf

Waldek Hebisch

unread,
Jun 10, 2022, 11:25:29 PM6/10/22
to fricas...@googlegroups.com
Well, for some reason your iteration triggered stream case.
And AFAICS the error message is true: there is no 'swhile'
in algebra. It seems that corresponding code remains
unimplemented. To say the truth, implementation of this
looks like can of worms. And we have a lot of things that
could be improved, so this one waits for more attention.

To say the truth, getting iteration for generators to work seem
more important. And IMO interation over stream should be
special case of interation using generators. But when I
looked at this there seemed to be almost no interest
(you basicaly wrote that if our generators can not do
all what Aldor generators do, then they are not interesting).
So some initial work is done, but I moved to other things.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages