Examples in Code

18 views
Skip to first unread message

mailinglists-sa...@927589452.de

unread,
Aug 31, 2019, 2:29:14 PM8/31/19
to sage-codi...@googlegroups.com, mailinglists-sa...@927589452.de
Hi,

Is there a reason to have different code implementations in the doc
strings of for example `goppa_code.py`?

Or should they be reduced to one reocurring example (generating
polynomial)?

Greets
J

Markéta Sluková

unread,
Aug 31, 2019, 4:23:34 PM8/31/19
to sage-coding-theory
Hi,

I just had a quick look at the code and am not sure what you mean. Could you give me a specific example?

Thanks,
Marketa

mailinglists-sa...@927589452.de

unread,
Sep 1, 2019, 8:14:24 AM9/1/19
to sage-codi...@googlegroups.com, mailinglists-sa...@927589452.de
Hi,

On 19-08-31 13:23:34, Markéta Sluková wrote:
> I just had a quick look at the code and am not sure what you mean. Could
> you give me a specific example?
>
> On Saturday, 31 August 2019 20:29:14 UTC+2, mailinglists-sa...@927589452.de
> wrote:
> > Is there a reason to have different code implementations in the doc
> > strings of for example `goppa_code.py`?
> >
> > Or should they be reduced to one reocurring example (generating
> > polynomial)?
> >

looking at `goppa_code.py` in develop 9
there are two examples used

```
sage: F = GF(2^6)
sage: R.<x> = F[]
sage: g = x^9 + 1
```
in line 86ff,103ff,

and

```
sage: F = GF(2^3)
sage: R.<x> = F[]
sage: g = x^2 + x+ 1
```
in line 8ff,298ff,324ff,347ff,

and

```
sage: F = GF(2^3)
sage: R.<x> = F[]
sage: g = (x^2 + x + 1)^2
```
in line 363ff,380ff,397ff,419ff,

If I searched correctly.

Greets
J

Markéta Sluková

unread,
Sep 1, 2019, 8:23:24 AM9/1/19
to sage-coding-theory
I see, is your question why all of them are not the same generating polynomial?

I think it's better to include a variety of examples in the docs to extend the area that is being tested when you run the doc tests :) For example, if you only had examples of one polynomial over one field, things could crash on a different field with a different polynomial. However, this is my understanding of doc tests in Sage and I could be wrong :) 

mailinglists-sa...@927589452.de

unread,
Sep 1, 2019, 8:59:28 AM9/1/19
to sage-codi...@googlegroups.com, mailinglists-sa...@927589452.de
On 19-09-01 05:23:23, Markéta Sluková wrote:
> I see, is your question why all of them are not the same generating
> polynomial?
>
and not the same field

> I think it's better to include a variety of examples in the docs to extend
> the area that is being tested when you run the doc tests :) For example, if
> you only had examples of one polynomial over one field, things could crash
> on a different field with a different polynomial. However, this is my
> understanding of doc tests in Sage and I could be wrong :)
>

I think so too, but then it would be sensible to make it really diverse and include a different example per doc test, wouldn't it?

Markéta Sluková

unread,
Sep 1, 2019, 11:22:34 AM9/1/19
to sage-coding-theory
If you are unhappy with the doc tests, feel free to add some new ones :) However, I think that specifically regarding Goppa codes there already are a few different ones that cover enough area.

Markéta Sluková

unread,
Sep 1, 2019, 11:34:52 AM9/1/19
to sage-coding-theory
If you are looking to improve the Goppa ticket, it would be great to have Patterson's decoding algorithm implemented. :)


On Sunday, 1 September 2019 14:59:28 UTC+2, mailinglists-sa...@927589452.de wrote:

mailinglists-sa...@927589452.de

unread,
Sep 1, 2019, 11:59:32 AM9/1/19
to sage-codi...@googlegroups.com, mailinglists-sa...@927589452.de
I just stumbled upon the differences while working through the code
trying to prove mathmatical correctness of it, but I might add a few
more fields and generating polynomials while I am at it.

mailinglists-sa...@927589452.de

unread,
Sep 1, 2019, 1:04:34 PM9/1/19
to sage-codi...@googlegroups.com, mailinglists-sa...@927589452.de
On 19-09-01 08:34:52, Markéta Sluková wrote:
> If you are looking to improve the Goppa ticket, it would be great to have
> Patterson's decoding algorithm implemented. :)

This sounds like an interesting challenge, I might have a look at it
after finishing my degree (which should be this month)

I just wrote a method to get bounded error to test the decoders and am
fighting with timeit, so it might take 2 3 weeks still


>
> On Sunday, 1 September 2019 14:59:28 UTC+2, mailinglists-sa...@927589452.de
> wrote:
> >
> > On 19-09-01 05:23:23, Markéta Sluková wrote:
> > > I see, is your question why all of them are not the same generating
> > > polynomial?
> > >
> > and not the same field
> >
> > > I think it's better to include a variety of examples in the docs to
> > extend
> > > the area that is being tested when you run the doc tests :) For example,
> > if
> > > you only had examples of one polynomial over one field, things could
> > crash
> > > on a different field with a different polynomial. However, this is my
> > > understanding of doc tests in Sage and I could be wrong :)
> > >
> >
> > I think so too, but then it would be sensible to make it really diverse
> > and include a different example per doc test, wouldn't it?
> >
>
> --
> You received this message because you are subscribed to the Google Groups "sage-coding-theory" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-coding-the...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-coding-theory/e3bdb49e-c2bc-4f90-8d80-4d874ef5a6db%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages