'Peter Mueller' via sage-support writes:
> The functions and their docs in codes.bounds.* still seem to be a mess (as
> they have been since many years now). (...)
Indeed, these bounds are a catastrophe. Names, order of parameters, and
documentation is sorely lacking. In particular, none of the docs
describe whether the bounds hold for only linear codes or not.
A way around the incompatibility issues is to completely replace the
functions with a new set of functions with a more well-designed
interface. For instance, each of the bounds can be used as bounds for
any one of the code parameters, instead of just the dimension. Perhaps
someone could think of a clever interface to allow this. Is there any
precedence elsewhere in Sage?
Then the entire current module could just be deprecated.
> (4) Again, there seem to be wrong bounds. For instance,
> codesize_upper_bound(19,10,2) yields 8, while there are easy examples of
> size 16, and it is known that there are even codes of size 20. Looking into
> the source code reveals that codesize_upper_bound erroneously uses the
> Griesmer bound, which works for linear codes only.
The doc here is clearly very lacking. I think it makes sense to allow
querying only for linear codes (over fields), as the focus of Sage's
current functionality is firmly based here.
> Not that more recent additions to sage/coding are perfect, I recall
> spending time untangling the mess on
> https://trac.sagemath.org/ticket/20787
> more or less completely on my own, which gives a good example on how not
> to re-implement old functionality ;-)
Did I personally offend you? Because it seems you're trying to offend me
- mentioning a completely unrelated ticket, which I, mind, had nothing
to do with.
IMHO it is quite evident that the code quality, doc quality
and functionality of sage/coding went up a lot during ACTIS.
> How about we document what's undocumented
> ...
Luckily we're each allowed to work on what we personally find rewarding.
> providing new interfaces to existing functions, but not replacing the code,
> seems more meaningful
"meaningful" is subjective. If you want to improve Sage with a minimal
effort, sure you're right. But there's multiple reasons for replacing
the code completely. It has a crappy interface, it's not well-written,
and my suggestion would enhance it's functionality a lot.
> Most of these code bounds are more general than linear.
> While it might be that the focus of seemingly completed ACTIS INRIA Sage
> coding theory project
> was about linear codes, I don't think any special bias towards linear codes
> is appropriate.
Either you misunderstand me or you're attacking me again; I'll assume
the first. ACTIS was about *algebraic* constructions and especially
efficient decoding - we mostly didn't care at all about general bounds
or general linear/non-linear codes (which were, functionality-wise in an
OK shape already).
There are bounds for general codes, and bounds for only linear codes.
All I'm suggesting is to have, aside from "best-code-bounds" *also* to
have a function for "best-linear-code-bounds", and stuff like that. If
you call that a bias towards linear code, then yes, I definitely think
that's appropriate, considering the major advantages and prevalence of
linear codes.
> Something we should do, I think, is to provide as much of what, currently
> hardly updated any more, http://codetables.de/
> ...
Note that codetables.de has constructive lower bounds, on top of the
upper-bounds. Replacing codetables.de is a *huge* undertaking -
especially the constructions - requiring Nathann'esque ardour. I
completely agree that it would be great if Sage had this, but it's
hardly on the same scale as improving the small set of bounds we
currently support in Sage (which we'd need in any case).
Dima Pasechnik writes:
> Please note that that "completely unrelated" ticket was fixing the work of
> your and David (?) GSoC mentee.
> (and part of it was David's himself, IIRC).
> Saying that you have nothing to do with it is, hmm, strange to me, sorry.
> And you guys just fell totally silent there.
> It's nothing to do with offending or anything, it's just matter of
> responsibility of all the Sage developers
> that has to be taken seriously, otherwise we will end up with a lot of
> broken code.
The ticket was opened by our GSoC student in the warmup but he left it
unfinished (and unmerged) since he began his proper GSoC project. I was
not really involved with that. David decided to finish the ticket, which
it seems he did too hastily. When ACTIS was over, David mostly stopped
contributing to Sage (he got a new job); this is normal. Daniel Augot,
who had never himself before contributed to Sage, attempted to finish
the ticket during Review Days 3, with a lot of help from you. New
developers needing help with debugging is normal. No obviously broken
code was ever introduced into Sage.
> this is the usual error of open-source projects: "let's not fix our old
> bugs, but just rewrite it is all from scratch".
Generalisation. Sometimes that judgement is an error, sometimes it's
not.
> This is a very hard undertaking, and the example of that "completely
> unrelated" ticket
> shows it all too well; few copies and pastes without thinking it all over,
> and, oops,
> a hard to find bug:
> https://trac.sagemath.org/ticket/20787#comment:24
The bug came from one of the ways that #20787 *improved* Sage's
capabilities wrt. Golay codes, by hard-coding some of the
expensive-to-compute properties. It did not come from cut-and-pasting of
old code.
> Instead, I would say, adding more doctests and docs, auditing the old code
> and fixing
> it if needed (some of it is more or less literal translation into Python of
> old GAP Guava package,
> and reads quite non-Pythonic), is much more sensible.
> I did a bit of this on https://trac.sagemath.org/ticket/22961 (ready for
> review now)
I'm still not arguing that wouldn't be good things to do, and you're
welcome to do them. I was merely suggesting something I found would add
more functionality to Sage.
> As long as no new code constructions have to be added, this is more of
> database-thing problem, easier than
> https://doi.org/10.1007/s10623-016-0264-x
> where we did add lots of tricky constructions.
AFAIK we are missing numerous code constructions and code manipulations.
To properly supersede codetables.de, we would also need the search
algorithm for finding good derived codes from base constructions.
>>
>> Generalisation. Sometimes that judgement is an error, sometimes it's
>> not.
>>
>
> Unless there is a majority, or even better, a consensus, for doing this,
> I'd much prefer improving the existing code. It's much more incremental,
> and thus less error-prone (although more boring, of course).
I think it's useless to discuss this further. I see your point, though
it would be stronger if the current code was better tested and of higher
quality to begin with. I don't know if you see my point, but it's not
important; if I get motivated enough to implement what I'm thinking
about, it will bring about new useful functionality as well, so with
proper testing it should be merged in Sage.
>> AFAIK we are missing numerous code constructions and code manipulations.
>> To properly supersede codetables.de, we would also need the search
>> algorithm for finding good derived codes from base constructions.
>>
>
> Well, yes, we need something like "best_code_sage_knows(*,linear=True)"
> function
> for a given set of parameters.
What I mean is that "the best code Sage knows" could be e.g. a BCH code
punctured somewhere, then extended, then Plotkin-summed with something
and then the dual of that. See e.g.
(http://codetables.de/BKLC/BKLC.php?q=2&n=24&k=17). Finding exactly that
sequence of code modifiers requires some sort of worklist algorithm
where the currently best known codes are applied all known modifiers.