Sage "Bounty"

16 views
Skip to first unread message

William Stein

unread,
Dec 27, 2009, 11:36:10 AM12/27/09
to sage-notebook, sage-devel
The first person to offer a "bounty" for a feature to be added to Sage:

http://www.walkingrandomly.com/?p=2091

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Dr. David Kirkby

unread,
Dec 27, 2009, 12:14:30 PM12/27/09
to sage-...@googlegroups.com
William Stein wrote:
> The first person to offer a "bounty" for a feature to be added to Sage:
>
> http://www.walkingrandomly.com/?p=2091
>
I recall Vladimir Bonereko offering a significant amount of money once to
someone who could show some example of whatever it was the challenge was.

Someone found a trivial example (0==0 or something like that), and in my opinion
VB should have paid him, as strictly he het VB's conditions.

You need to be careful doing this sort of thing. But this offer looks quite
honest and reasonable. The amount of money is not huge, so I have every reason
to believe he would pay it.

Plenty of people do make money from open-source software, so lets hope someone
take him up on the offer.

michael.p...@googlemail.com

unread,
Dec 27, 2009, 1:35:06 PM12/27/09
to sage-devel
Hi all

The offer is genuine I can assure you. Like David said, the amount of
money isn't huge and it would damage my reputation far too much if I
didn't pay it out once someone had done the work. Many of my friends,
colleagues and business contacts read my blog and they would probably
lynch me if I didn't make good my offer. Many of them literally know
where I live ;)

Best Wishes,
Mike
www.walkingrandomly.com

On Dec 27, 5:14 pm, "Dr. David Kirkby" <david.kir...@onetel.net>
wrote:

mhampton

unread,
Dec 27, 2009, 3:05:40 PM12/27/09
to sage-devel
As I commented on the blog, it wouldn't be very hard for someone to
complete the ticket started by Jason Grout if they knew javascript
(and some python of course):

http://trac.sagemath.org/sage_trac/ticket/3866

-Marshall Hampton

On Dec 27, 12:35 pm, "michael.p.crouc...@googlemail.com"

Jason Grout

unread,
Dec 28, 2009, 11:57:58 AM12/28/09
to sage-...@googlegroups.com
mhampton wrote:
> As I commented on the blog, it wouldn't be very hard for someone to
> complete the ticket started by Jason Grout if they knew javascript
> (and some python of course):
>
> http://trac.sagemath.org/sage_trac/ticket/3866
>

And let me just say that I wouldn't claim any part of the prize if
someone finished that ticket. It would satisfying enough to me that we
had the feature, which I've wanted for a long time!

Note that there are a few things that are different about the code on
the ticket and the requirements on the blog. The code on the ticket
does not implement a locator control *inside* the picture. Instead, it
implements a 2d locator control in a square box in the controls section
of an interact (Mathematica also has something like this).

I see several things needing to be done to that ticket:

1. Figure out a way to have interact input in the *output* of the
interact. It seems like you'd need some way of saying "put a locator
control on *this* graphic that I'm printing out right here".

2. For a locator control to be useful, it needs to return values in the
data coordinates of the plot (rather than pixels in the image). I think
it would be easy to return the pixel location in the image (once (1) is
solved). You'd probably use the transformation framework in matplotlib
to convert that to data coordinates.

3. I'm not sure how easily new controls can be easily created. That
would need to also be solved in order to meet the requirements.

Anyways, those are three main points that I would think need to be
addressed in the implementation of such a control. However, I'd love it
if someone did it some simpler way and proved me wrong! Those obstacles
are what prevented me from finishing up the ticket mentioned above---I
just didn't have time to put towards it (and still don't for the
foreseeable future).

All in all, I think having 2d interacts would not only give us a
valuable control, but would prove useful in refining the existing
interact infrastructure. So thanks for proposing a bounty! I'm excited
to see someone win it.

Thanks,

Jason

Jason Grout

unread,
Dec 28, 2009, 12:36:00 PM12/28/09
to sage-...@googlegroups.com
Some more thoughts below...

Jason Grout wrote:

>
> 1. Figure out a way to have interact input in the *output* of the
> interact. It seems like you'd need some way of saying "put a locator
> control on *this* graphic that I'm printing out right here".


Can anyone think of a good syntax for specifying an output that will
have a locator on it?

Here's one possibility:

@interact
def my_interact(a=locator()):
print a
show(plot(sin(x), (x,0,1)), locator="a")


>
> 2. For a locator control to be useful, it needs to return values in the
> data coordinates of the plot (rather than pixels in the image). I think
> it would be easy to return the pixel location in the image (once (1) is
> solved). You'd probably use the transformation framework in matplotlib
> to convert that to data coordinates.


There has been some work towards an html5 backend to matplotlib.
Matplotlib already has the concept of pickers (i.e., being able to click
and move things in a plot). The html5 backend might be just the thing
to have interactive 2d plots like this.

Thanks,

Jason

michael.p...@googlemail.com

unread,
Dec 29, 2009, 4:20:06 AM12/29/09
to sage-devel
> Here's one possibility:
>
> @interact
> def my_interact(a=locator()):
>      print a
>      show(plot(sin(x), (x,0,1)), locator="a")

Looks good to me. Would that encapsulate the possibility that there
might be more than one locator, possibly created dynamically?

By the way, the bounty has increased to 50 pounds worth of Amazon
books (80 dollars-ish) thanks to the generosity of a fellow blogger.
See the bottom of the original blog post for details.

Best Wishes,
Mike

Jason Grout

unread,
Dec 29, 2009, 12:07:57 PM12/29/09
to sage-...@googlegroups.com
michael.p...@googlemail.com wrote:
>> Here's one possibility:
>>
>> @interact
>> def my_interact(a=locator()):
>> print a
>> show(plot(sin(x), (x,0,1)), locator="a")
>
> Looks good to me. Would that encapsulate the possibility that there
> might be more than one locator, possibly created dynamically?
>

How about

@interact
def my_ineract(a=locators()):
print a # list of points
show(plot(sin(x), (x,0,1)), locators="a")

Then a is just a list of points, which can dynamically grow or shrink
depending on the actual locators on the image.

Now actually implementing this is the real work!

Thanks,

Jason

Reply all
Reply to author
Forward
0 new messages