Dave Crossland | 4 Aug 17:29 2009

On the path to GL-accelerated ShoeBot

http://matthewmarshall.org/projects/rabbyt/ is a FAST sprite library
for http://www.pyglet.org/ - could this be a path to GL-accelerated
ShoeBot?

shoebot libraries

Some nice people have exploited the last linux kernel vulnerability on
my host server at servage.net two days ago, and deleted my shoebot's
libraries page.
Unfortunately I'm at the countryside now, and will not be able to
restore it for two or three days.
I do apologize to you all.
best
francesco
Dave Crossland | 19 Aug 14:54 2009

Re: shoebot libraries

Ouch :(

Good luck! :)
ricardo lafuente | 20 Aug 13:47 2009

Re: shoebot libraries

gah :/ hope it's not serious...

the libs are on the main tree anyway, so no worries on that side.

architetto francesco fantoni <hva - hermanitos verdes architetti> wrote:
> Some nice people have exploited the last linux kernel vulnerability on
> my host server at servage.net two days ago, and deleted my shoebot's
> libraries page.
> Unfortunately I'm at the countryside now, and will not be able to
> restore it for two or three days.
> I do apologize to you all.
> best
> francesco
>
> _______________________________________________
> Shoebot-devel mailing list
> Shoebot-devel@...
> http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
>
>   
Stuart Axon | 24 Aug 13:36 2009
Picon

Jython experiment update [unsucessful]

Hi
  I wanted to see if there were differences between cairo + python and cairo + java.
[bottom line: there is :)]
If they weren't very different I was thinking of trying the java bindings via jython to get shoebot in the
browser working...

Differences included:

Imports come from
org.gnome.gtk
not
gtk

event handling is also different (using Event objects, which native cairo does not).

I also briefly looked at IronPython and noted the same sort of differences.

In future ctypes is coming to both Jython and Ironpython, meaning that you could do something connect to
native cairo from Jython in a java applet.

For now, the other options people have mentioned are probably the easiest for getting things working in a browser:
Jython + Java2D backend
or connect to canvas somehow.

A possible idea for a backend could be a Processing backend via jython, but I suspect we'd be opening a whole
different can of worms there :)

If anyone knows how easy it is to make alternate graphical backends then I'm definitely interested,
however I don't have any knowledge of Java2D so far.

(Continue reading)

Stuart Axon | 25 Aug 01:29 2009
Picon

Re: Jython experiment update [unsucessful]

Oops, should've proof read this; some terrible grammar, also by native bindings I mean CPython cairo
bindings :)

----- Original Message ----
From: Stuart Axon <stuaxo2@...>
To: shoebox mailing list <shoebot-devel@...>
Sent: Monday, August 24, 2009 12:36:35 PM
Subject: [shoebot-devel] Jython experiment update [unsucessful]

Hi
  I wanted to see if there were differences between cairo + python and cairo + java.
[bottom line: there is :)]
If they weren't very different I was thinking of trying the java bindings via jython to get shoebot in the
browser working...

Differences included:

Imports come from
org.gnome.gtk
not
gtk

event handling is also different (using Event objects, which native cairo does not).

I also briefly looked at IronPython and noted the same sort of differences.

In future ctypes is coming to both Jython and Ironpython, meaning that you could do something connect to
native cairo from Jython in a java applet.

For now, the other options people have mentioned are probably the easiest for getting things working in a browser:
(Continue reading)

Stuart Axon | 31 Aug 03:39 2009
Picon

Bug: Rounded rectangles get extra horizontal bars

Might be a bit late at night but I couldn't work out how to enter a new bug for this...

# Test:
def draw():
  strokewidth(10)
  stroke('#ffffff')
  fill(0, 0, 128)
  rect(0, 0, 200, 400, roundness=1.0)
Stuart Axon | 31 Aug 06:56 2009
Picon

Interesting namespace error...

If you run this simple example

http://www.multiply.org/notebook/archives/2008/08/processing-and.html

(in filestructure and older branch)

Shoebot complains that 'w' is not in the namespace ('w' is in the code) -- Heres the example code:

sizeheight = 600
sizewidth = 600

def background (w,h):
    size(w, h)
    fill(.7, .7, .7)
    rect(0, 0, w, h)

background(sizewidth, sizeheight)

for i in range(20):
    fill(i*40/255.0, i*40/255.0, i*40/255.0)
    stroke(i*20/255.0, i*20/255.0, i*20/255.0)
    rect(i*40, i*40, 40, 40)
Stuart Axon | 31 Aug 07:01 2009
Picon

A couple of fixes

http://bitbucket.org/stuaxo/shoebot/overview/

Ooops - I noticed that my framerate limiter was not right, have fixed that and shoebot can now use up to 49% of
the cpu (on two core, this seems pretty good I think).

As penance I've made the bot finish when you close the window too - this makes using SciTE much nicer amongst
other things (you don't have to manually quit).
Stuart Axon | 31 Aug 07:47 2009
Picon

Re: File structure refactoring

Not much insight but... I've been trying to do some development just now and it's definitely easier on to find things in this branch than in the old one... for sure this should become the main branch.

I noticed that calling size() outside of setup() seems to not work any more (it just resets to the default size).

From: Dave Crossland <dave-yX7OcqChgmE@public.gmane.org>
To: shoebot-devel-cDSMKSnYR370VSKTO42q5SpxlwaOVQ5f@public.gmane.org
Sent: Friday, June 19, 2009 10:38:08 AM
Subject: Re: [shoebot-devel] File structure refactoring

Hi,

1. This is good, interactive prompt sbot is a great learning method imo

2. We should have unit tests so we know precisely what broke

Regards, Dave

On 19 Jun 2009, 7:52 AM, "ricardo lafuente" <r <at> sollec.org> wrote:

hai guys,

yesterday, insomnia led to finally trying my hand at refactoring the Shoebot file structure, and try to separate some of the functionality into different files. For instance, our Color support is pretty nice, and would be good to have it importable without the whole Shoebot coming along.



here's the file structure i created (omitting __init__.py files, which just import the relevant classes from the module):

src/
  sbot
  shoebot-ide

  shoebot/
      core/
         bot.py
         nodebox.py
         canvas.py
         cairo_canvas.py
         oldbot.py
      data/
         point.py
         grob.py
         bezier.py
         typography.py
         img.py
         transforms.py
         colors.py
         input_devices.py
         variable.py
      gui/
         gtk_drawingarea.py
         gtk_window.py
         ide.py
         socket_server.py
         var_window.py
    remember, right now all functionality is inside 5/6 files. I'd love to know if you have alternative suggestions for naming or structuring. Now that i look at it, i guess the main inspiration for this was the Django structure.

btw, the names 'typography', 'img' and 'colors' were used because of possible clashes with existing functions.

pros of this approach:
* at least to me, the program structure looks now much clearer and one doesn't get so much lost in code; lib2geom transition would also be easier this way
* now one can do 'from shoebot.core import NodeBot, CairoCanvas' or 'from shoebot.data import Color'
* separate files for each class means module imports are now more evident -- you can instantly see which modules relate to which class, instead of that module jumble on top of the file
* namespace fixing; i found some (a lot, actually) of namespace pollution thanks to 'from data import *' statements. I've been trying to use Shoebot directly from the interactive prompt and this becomes evident when you use autocompletion -- tons of names that get imported for no particular reason. This refactoring goes a long way to rid ourselves of that.

cons:
* structure changes = possible breakage; i'm now going through a lot of stuff that broke in the process, and fixing some shortcomings in the way. It looks stable-ish, but i'm still going to run over it a couple of times to be sure that there's nothing amiss.

the repo is over at http://bitbucket.org/rlafuente/shoebot-filestructure/overview/

anyone has any insights to mention regarding this issue? i'd love to know, wouldn't feel comfortable pushing all this without feedback :)
_______________________________________________
Shoebot-devel mailing list
Shoebot-devel-cDSMKSnYR370VSKTO42q5SpxlwaOVQ5f@public.gmane.org
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net


_______________________________________________
Shoebot-devel mailing list
Shoebot-devel@...
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net

Gmane