From: Patrick Maupin on
On Apr 26, 4:12 pm, lkcl <luke.leigh...(a)googlemail.com> wrote:

>  and, given that you can use AJAX (e.g. JSONRPC) to communicate with a
> server-side component, installed on 127.0.0.1 and effectively do the
> exact same thing, nobody bothers.

I suppose, but again, that pushes off the security thing. There are a
lot of obvious ways to make unintended security holes in a 127.0.0.1
application, so I'm sure there are also a lot of ways that would be
unobvious to this security non-expert. And, of course, the real
dealbreaker is, it still requires a separate install.

> > That's understood (and a great thing).  But if programmers could usepyjamas in the browser without an extra download to get to all the
> > desktop features (which is how it *appears* to most users when they
> > use flash or something like that),
>
>  no - it's not going to happen: it's _required_ to install the flash
> plugin.

Yeah, but *everybody knows* you have to have the flash plugin. It's a
given. Even if you write an exciting new flash app, probably only
0.01% of your userbase will need to install flash; everybody else will
already have it installed.

> > Alternatively, a single small download of a broswer add-on package to
> > bring pyjamas desktop features into the browser (maybe even just for
> > mozilla for now) would be awesome, as well.
>
>  on debian/testing: "apt-get install hulahop python-xpcom" - actually
> you just do "apt-get install pyjamas-desktop" because hulahop, python-
> xpcom are dependencies and xulrunner is a sub-dependency.
>
>  on win32: it's an additional 350k install: python "comtypes".  that's
> _it_ - that's all - and you're done: everything else is already there
> (MSHTML.DLL is the key but you need the MSXML dll as well, but, duhh,
> those come pre-installed with the OS, duhh)
>
>  otherwise, you'd need that whopping 10mb python-inside-a-plugin, and
> i'd need to port pyjd to it. loovely.  i look forward to receiving
> sponsorship to do that (probably about 2 weeks work: it's not rocket
> science, now that there's 4 pyjd ports).

I really appreciate your thoughts and these suggestions. But if you
could extend "look, here's this awesome asteroids game, and you don't
have to install anything!" to "look, here's this <arbitrary business
app> and it stores all its data on your local machine, and you don't
have to install anything!" that would be effing awesome.

Next best would be the python-in-a-plugin. I think if someone steps
up to the plate and supports your development of that, it would make a
great delivery mechanism for programs.

Best regards,
Pat
From: lkcl on
On Apr 26, 11:25 pm, Patrick Maupin <pmau...(a)gmail.com> wrote:
> On Apr 26, 4:12 pm, lkcl <luke.leigh...(a)googlemail.com> wrote:
>
> >  and, given that you can use AJAX (e.g. JSONRPC) to communicate with a
> > server-side component, installed on 127.0.0.1 and effectively do the
> > exact same thing, nobody bothers.
>
> I suppose, but again, that pushes off the security thing.  There are a
> lot of obvious ways to make unintended security holes in a 127.0.0.1
> application,

not to an experienced web developer. by starting the browser at a
URL which can only used once, you can effectively do the same trick
that X-Server X-Auth "magic cookies" does.

> so I'm sure there are also a lot of ways that would be
> unobvious to this security non-expert.  And, of course, the real
> dealbreaker is, it still requires a separate install.

not necessarily. luis pamirez created pygtkweb (a reimplementation
of gtk widgets, to be compiled to javascript, to run in a web browser)
and he created it as a stand-alone app that 1) fired off a web browser
2) ran a small cgi-bin-esque web service 3) served static (pre-
compiled) pages 4) served AJAX to the compiled app.

with pyjd, that "step 1" can be bypassed or more specifically step 1
and 2 can be combined into the _one_ python app (two threads /
processes); you effectively combine the "start the window with the
browser engine in it" step with the "start a mini web server" step.

so it can be done: it's just not "immediately obvious".

l.
From: Wolfgang Strobl on
lkcl <luke.leighton(a)googlemail.com>:

>On Apr 25, 9:37�pm, Wolfgang Strobl <ne...(a)mystrobl.de> wrote:
>> Daniel Fetchinson <fetchin...(a)googlemail.com>:
>>
>> >> for fits and giggles, to show what's possible in only 400
>> >> lines of python, here is a game of asteroids, written by joe rumsey.
>> >> yes, it runs underpyjamas-desktop too.
>>
>> >> � �http://pyjs.org/examples/asteroids/public/Space.html
>>
>> >This URL returns a blank page for me on firefox 3.3.5 (linux) with and
>> >without adblock plus.
>>
>> http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
>> 3.6.3 with ABP, Chrome 4.1)
>
> yep. apologies. didn't want to play asteroids, wanted to do a
>release.

Sure. :-) But you made a very prominent reference to it. Btw., both
http://pyjs.org/ and http://code.google.com/p/pyjamas/ still name 0.6 as
the current version. Shouldn't that be changed to 0.7?

Two weeks ago, I played around with the trunk version, looking for an
working drag&drop example. I didn't find anything, but noticed some
unfinished code in a dnd subdirectory. Are you aware of the fact that
many of the examples just don't work and that there is no way of
telling, other than by trying each one out in turn? I didn't look at
every example again, but AFAIK, this didn't change with 0.7. (Tried with
Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).

There are quite some impressive working examples, but the user
experience is somewhat lacking and hampered by stumbling over faulting
examples, IMHO. May I suggest to restrinct some overview page to the
working examples, only?

Given my original motivation for looking into it - may I ask whether
there is a working example for a dnd operation, somewhere? Perhaps I
just didn't find it in the abundance of example code :-) Thanks for
helping and for this great project!


--
Wir danken f�r die Beachtung aller Sicherheitsbestimmungen
From: lkcl on
On Apr 28, 7:00 am, Wolfgang Strobl <ne...(a)mystrobl.de> wrote:
> lkcl <luke.leigh...(a)googlemail.com>:
>
>
>
>
>
> >On Apr 25, 9:37 pm, Wolfgang Strobl <ne...(a)mystrobl.de> wrote:
> >> Daniel Fetchinson <fetchin...(a)googlemail.com>:
>
> >> >> for fits and giggles, to show what's possible in only 400
> >> >> lines of python, here is a game of asteroids, written by joe rumsey..
> >> >> yes, it runs underpyjamas-desktop too.
>
> >> >>    http://pyjs.org/examples/asteroids/public/Space.html
>
> >> >This URL returns a blank page for me on firefox 3.3.5 (linux) with and
> >> >without adblock plus.
>
> >>http://pyjs.org/examples/asteroids/output/Space.htmlworks. (Firefox
> >> 3.6.3 with ABP, Chrome 4.1)
>
> > yep.  apologies.  didn't want to play asteroids, wanted to do a
> >release.  
>
> Sure.  :-) But you made a very prominent reference to it. Btw., bothhttp://pyjs.org/andhttp://code.google.com/p/pyjamas/still name 0.6 as
> the current version. Shouldn't that be changed to 0.7?

yes. haven't got round to it yet.

> Two weeks ago, I played around with the trunk version, looking for an
> working drag&drop example. I didn't find anything, but noticed some
> unfinished code in a dnd subdirectory. Are you aware of the fact that
> many of the examples just don't work

no - because i specifically asked people, in the 0.7 pre-releases, to
report any bugs found on http://code.google.com/p/pyjamas/issues and i
said that once a certain amount of time had elapsed without receiving
significant bugreports, i would do a release.

> and that there is no way of
> telling, other than by trying each one out in turn?

yepp that's correct. across multiple browsers and across multiple
desktop platforms. nine in total. which is why i asked for community
input this time.

for the 0.6 release i spent about a month of my own time and money
doing the necessary verification, and i decided i wasn't going to
place the entire burden of testing onto my own shoulders, this time,
because pyjamas is a _community_ project and is _not_ funded by
google, PSF, or any other organisation, foundation or company.


>  I didn't look at
> every example again, but AFAIK, this didn't change with 0.7. (Tried with
> Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).

then please issue bugreports for as many as you feel comfortable
with / have time for. i _did_ tell people this time that i was
relying on community input more than for 0.6. thus, the "quality" of
the release depends on collective input.

> There are quite some impressive working examples, but the user
> experience is somewhat lacking and hampered by stumbling over faulting
> examples, IMHO. May I suggest to restrinct some overview page to the
> working examples, only?

no, because they're all intended to work. ohh... wait... are you
referring to some of the django-based ones? no, you can't be, because
the http://pyjs.org/examples page won't refer you to them.


> Given my original motivation for looking into it - may I ask whether
> there is a working example for a dnd operation, somewhere?

the person who started the port of gwt-dnd requested that they be
"left alone" to complete it, but then didn't. the use of java2py.py
and manual conversion i can do about 1000 lines per day, and people
i've guided before usually take about 3x longer than me. i don't have
money to work on even 1 line let alone 1000, so if you'd like to go
through the code, converting it and the examples, i'm happy to advise
(on the pyjamas-dev list so that other people can contribute as well
if they choose).

it's quite straightforward, and somewhat mind-numbing and detail-
orientated: the absolute most important thing is _not_ to "get
creative", but just "trust" the original gwt-dnd code and simply do
"rote" conversion. java2py.py does 95% of the work: it's interfaces,
sub-classes and function/operator overloading where things get a
little hairy. oh, and references to "self", a concept which doesn't
exist in java (and java2py.py can't help with except in one special
and obvious case).

other than that: there _is_ sufficient in there to simply "roll your
own" drag-and-drop. you have access to mouse events; you can create
state... it's not hard. but, if you're counting on a _lot_ of dnd
work, doing the semi-automated conversion of gwt-dnd would be a goood
idea.

l.
From: Wolfgang Strobl on
lkcl <luke.leighton(a)googlemail.com>:

>On Apr 28, 7:00�am, Wolfgang Strobl <ne...(a)mystrobl.de> wrote:

>> Two weeks ago, I played around with the trunk version, looking for an
>> working drag&drop example. I didn't find anything, but noticed some
>> unfinished code in a dnd subdirectory. Are you aware of the fact that
>> many of the examples just don't work
>
> no - because i specifically asked people, in the 0.7 pre-releases, to
>report any bugs found on http://code.google.com/p/pyjamas/issues and i
>said that once a certain amount of time had elapsed without receiving
>significant bugreports, i would do a release.

Look at it from the point of view of people walking by, trying to decide
whether they should invest some of their time into digging into yet
another framework and library.

>
>> and that there is no way of
>> telling, other than by trying each one out in turn?
>
> yepp that's correct. across multiple browsers and across multiple
>desktop platforms. nine in total. which is why i asked for community
>input this time.

It's hard to come by with valuable input when the baseline - what is
expected to work under which circumstances is unknown. Don't expect the
community having as much knowledge about all the relevant topics as you
have.

>
>for the 0.6 release i spent about a month of my own time and money
>doing the necessary verification, and i decided i wasn't going to
>place the entire burden of testing onto my own shoulders, this time,
>because pyjamas is a _community_ project and is _not_ funded by
>google, PSF, or any other organisation, foundation or company.

So please make it simpler for more people to help. Other people have
other projects, where they invest some of their own time and money in.

>
>
>> �I didn't look at
>> every example again, but AFAIK, this didn't change with 0.7. (Tried with
>> Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
>
> then please issue bugreports for as many as you feel comfortable
>with / have time for.

Ok, will do.

>i _did_ tell people this time that i was
>relying on community input more than for 0.6. thus, the "quality" of
>the release depends on collective input.
>
>> There are quite some impressive working examples, but the user
>> experience is somewhat lacking and hampered by stumbling over faulting
>> examples, IMHO. May I suggest to restrinct some overview page to the
>> working examples, only?
>
> no, because they're all intended to work. ohh... wait... are you
>referring to some of the django-based ones?

No. Having written a few small django apps myself, I'm certainly aware
about such dependencies. But are you aware that's there is no simple way
to tell whether certain apps have environment dependencies like this?
Avoiding examples depending on django is obvious. What about the
infohierarchy sample, for example?

I'm talking about messages like
lightout TypeError: lightout.RootPanel().,get is no function
and such. I'll make a list over the weekend.

>no, you can't be, because
>the http://pyjs.org/examples page won't refer you to them.

Sure.


>> Given my original motivation for looking into it - may I ask whether
>> there is a working example for a dnd operation, somewhere?

> the person who started the port of gwt-dnd requested that they be
>"left alone" to complete it, but then didn't. the use of java2py.py
>and manual conversion i can do about 1000 lines per day, and people
>i've guided before usually take about 3x longer than me. i don't have
>money to work on even 1 line let alone 1000, so if you'd like to go
>through the code, converting it and the examples, i'm happy to advise
>(on the pyjamas-dev list so that other people can contribute as well
>if they choose).

Hey, I'm just asking, after looking around for a while and finding none,
I'm not demanding anything.

Thanks for the detailed explaination of how to do a conversion, which
I've deleted here for brevity. I'll give it a try, but it will require
some reading.


--
Wir danken f�r die Beachtung aller Sicherheitsbestimmungen