hacspec-python icon indicating copy to clipboard operation
hacspec-python copied to clipboard

A shorter way to write polynomial evaluation, with a comprehension

Open achlipala opened this issue 7 years ago • 4 comments

achlipala avatar Feb 17 '18 22:02 achlipala

Gotta say, I'm amused that the "shorter way" is 3 lines longer than the code it replaces. :-)

benlaurie avatar Feb 18 '18 07:02 benlaurie

Can you add this as a third option (next to poly and poly_reduce)? Having them next to each other makes it easier to compare.

franziskuskiefer avatar Feb 18 '18 10:02 franziskuskiefer

@benlaurie, I'm presuming it's clear, but just in case not: the shorter way includes some set-up infrastructure code that wouldn't be duplicated per primitive. ;-)

@franziskuskiefer, could it be nicer to use Git branches instead of dumping alternatives in single files? I like to take advantage of version-control metadata instead of duplicating part of its functionality within single revisions.

achlipala avatar Mar 02 '18 16:03 achlipala

On 2 March 2018 at 16:31, Adam Chlipala [email protected] wrote:

@benlaurie https://github.com/benlaurie, I'm presuming it's clear, but just in case not: the shorter way includes some set-up infrastructure code that wouldn't be duplicated per primitive. ;-)

@franziskuskiefer https://github.com/franziskuskiefer, could it be nicer to use Git branches instead of dumping alternatives in single files? I like to take advantage of version-control metadata instead of duplicating part of its functionality within single revisions.

I'd say that given these are likely going to stick around for a while, having to maintain 3 different branches for each infrastructure change seems like a bad choice.

If we were going to choose one right now, then maybe.

benlaurie avatar Mar 02 '18 21:03 benlaurie