Re: httpd library and missed opportunity.

2017-08-01 Thread Alex Tweedly via use-livecode

On 02/08/2017 01:42, Monte Goulding via use-livecode wrote:

On 2 Aug 2017, at 10:36 am, Alex Tweedly via use-livecode 
 wrote:

The 'test' button is handy - but it's not the only way.
In fact, I rarely use it - I build my standalones, then try it out on 2 or 3 
platforms (OK, this may be very untypical, because I am just starting to play 
with mobile and html5 ... but I suspect it will continue to be a viable 
work-flow - if only because of frequent interruptions, etc.) So I would hope to 
be able to run the server,  and then make multiple tests with a single 
standalone.

Hmm… Well click the Test button and then from your other platform enter the IP 
of the machine with the IDE. Should work fine.
I was a bit unclear, sorry.  I make some edits, then build for multiple 
platforms (Mac, Android and HTML). Then I want to test each of those 
platforms out, perhaps multiple times. Maybe all it needs is a "Retest" 
button (or "cmd+Test") to re-use the most-recently-built for the 
selected test target.

You said "[HTTPd library] ...  now that we have one included in the IDE we 
...". So is it the intention that this library is only available in the IDE, and 
won't be available for inclusion in a standalone, or for use from LCServer ?  (I can't 
see it in the list of inclusions in the SB, unlike diff, getopt, etc. - though that list 
is getting long enough that scrolling through it to see if something is there or not is 
becoming  inexact).

It should be in the list in dp-9.

I don't see it (or don't recognize it). (dp8 Indy, OSX)

Alex.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: httpd library and missed opportunity.

2017-08-01 Thread Monte Goulding via use-livecode

> On 2 Aug 2017, at 10:36 am, Alex Tweedly via use-livecode 
>  wrote:
> 
> The 'test' button is handy - but it's not the only way.
> In fact, I rarely use it - I build my standalones, then try it out on 2 or 3 
> platforms (OK, this may be very untypical, because I am just starting to play 
> with mobile and html5 ... but I suspect it will continue to be a viable 
> work-flow - if only because of frequent interruptions, etc.) So I would hope 
> to be able to run the server,  and then make multiple tests with a single 
> standalone.

Hmm… Well click the Test button and then from your other platform enter the IP 
of the machine with the IDE. Should work fine.

> You said "[HTTPd library] ...  now that we have one included in the IDE we 
> ...". So is it the intention that this library is only available in the IDE, 
> and won't be available for inclusion in a standalone, or for use from 
> LCServer ?  (I can't see it in the list of inclusions in the SB, unlike diff, 
> getopt, etc. - though that list is getting long enough that scrolling through 
> it to see if something is there or not is becoming  inexact).

It should be in the list in dp-9.

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: httpd library and missed opportunity.

2017-08-01 Thread Alex Tweedly via use-livecode

The 'test' button is handy - but it's not the only way.
In fact, I rarely use it - I build my standalones, then try it out on 2 
or 3 platforms (OK, this may be very untypical, because I am just 
starting to play with mobile and html5 ... but I suspect it will 
continue to be a viable work-flow - if only because of frequent 
interruptions, etc.) So I would hope to be able to run the server,  and 
then make multiple tests with a single standalone.


You said "[HTTPd library] ...  now that we have one included in the IDE 
we ...". So is it the intention that this library is only available in 
the IDE, and won't be available for inclusion in a standalone, or for 
use from LCServer ?  (I can't see it in the list of inclusions in the 
SB, unlike diff, getopt, etc. - though that list is getting long enough 
that scrolling through it to see if something is there or not is 
becoming  inexact).


Alex.

On 02/08/2017 01:13, Monte Goulding via use-livecode wrote:

On 2 Aug 2017, at 7:16 am, Alex Tweedly via use-livecode 
 wrote:


python -m SimpleHTTPServer 8080
This will let you access your standalone by opening your web browser and visiting 
http://localhost:8080 .


What ?  IMO, this is just plain "wrong".

I think there’s a couple of things here. The scope of the original HTML5 
implementation did not include writing a HTTP server in LCS. It was before my 
time at the company but I believe a significant proportion of the project was 
Peter’s first thing he did in LC and he probably wasn’t aware of the fact 
there’s a few HTTPd implementations around the community. Anyway, now that we 
have one included in the IDE we definitely want to implement a deploy library 
so that you just need to click the Test button and it will pop up in your 
browser. Bonus points for being able to add extra browsers so you can choose a 
target.

I create a report about this a while back 
http://quality.livecode.com/show_bug.cgi?id=19909 


Anyway, this could either be contributed by someone in the community or done in 
house when we get a chance.

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: httpd library and missed opportunity.

2017-08-01 Thread Monte Goulding via use-livecode

> On 2 Aug 2017, at 7:16 am, Alex Tweedly via use-livecode 
>  wrote:
> 
>> python -m SimpleHTTPServer 8080
>> This will let you access your standalone by opening your web browser and 
>> visiting http://localhost:8080 .
>> 
> What ?  IMO, this is just plain "wrong".

I think there’s a couple of things here. The scope of the original HTML5 
implementation did not include writing a HTTP server in LCS. It was before my 
time at the company but I believe a significant proportion of the project was 
Peter’s first thing he did in LC and he probably wasn’t aware of the fact 
there’s a few HTTPd implementations around the community. Anyway, now that we 
have one included in the IDE we definitely want to implement a deploy library 
so that you just need to click the Test button and it will pop up in your 
browser. Bonus points for being able to add extra browsers so you can choose a 
target.

I create a report about this a while back 
http://quality.livecode.com/show_bug.cgi?id=19909 


Anyway, this could either be contributed by someone in the community or done in 
house when we get a chance.

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: httpd library and missed opportunity.

2017-08-01 Thread Brian Milby via use-livecode
I'd like to think that by the time LC 9 leaves DP status that this will be
possible.  There is already a library included in DP 8 to handle httpd
requests.

On Tue, Aug 1, 2017 at 5:18 PM, Andre Garzia via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Alex,
>
> Python is kinda tricky to bundle. If you're looking into writing an
> extension, then these might be useful:
>
> * Libmicrohttpd - from GNU project, embedable httpd in C:
> https://www.gnu.org/software/libmicrohttpd/
>
> Implementing httpd is not hard, it could be done quite easily.
>
> On Tue, Aug 1, 2017 at 6:16 PM, Alex Tweedly via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > [ started a new thread, so I can't rant without tainting the other
> thread ]
> >
> > I started out on the 'find a rev/livecode solution for a simple HTTP
> > server" for one small reason :
> >
> >the LC 9.0 Dictionary Guide, under "HTML5 Deployment" says
> >
> > Testing your HTML5 app with a local web server
> >> Some browsers, such as Google Chrome, do not permit pages to download
> >> resources from file:// URLs. You won't be able to test your application
> in
> >> these browsers unless you run a local HTTP server.
> >>
> >> A quick and easy way to run a simple local HTTP server is to use Python.
> >> Open a terminal window, change directory to your standalone's directory,
> >> and run:
> >>
> >> python -m SimpleHTTPServer 8080
> >> This will let you access your standalone by opening your web browser and
> >> visiting http://localhost:8080.
> >>
> >> What ?  IMO, this is just plain "wrong".
> >
> > This is like going into the BMW dealership and being told "Yeah, you'll
> > love the way the new Z4 drives. Just get into this Mercedes sports car
> here
> > and we'll take you over to the racetrack to watch someone else drive
> one."
> >
> > Why are we suggesting that users use another (OK, a "competing")
> scripting
> > language to test HTML5 deployment ?
> >
> > Livecode is perfectly able to run a simple HTTP server. It is perfectly
> > possible and not too hard to write a basic one. In fact, we now even have
> > an included library that makes it trivial to write that very basic
> server.
> >
> > Why didn't we (i.e. Livecode - a careful use of the word  "we") just
> > package up that simple server, and then include that, with suitable
> > instructions.
> >
> > That would have avoided any implication that LC is any less capable than
> > other scripting languages, and avoided reminding anyone that LC doesn't
> > (yet) come packaged with all the libraries and therefore utilities that
> you
> > could hope for.
> >
> >
> > So - I'm hoping to write a basic version (including my "get around the
> > same-domain limitation") and get it, or something like it, included in
> the
> > LC distribution, so that the documentation has no need to recommend
> another
> > language.
> >
> > 
> >
> > Alex.
> >
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
>
> --
> http://www.andregarzia.com -- All We Do Is Code.
> http://fon.nu -- minimalist url shortening service.
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: httpd library and missed opportunity.

2017-08-01 Thread Andre Garzia via use-livecode
Alex,

Python is kinda tricky to bundle. If you're looking into writing an
extension, then these might be useful:

* Libmicrohttpd - from GNU project, embedable httpd in C:
https://www.gnu.org/software/libmicrohttpd/

Implementing httpd is not hard, it could be done quite easily.

On Tue, Aug 1, 2017 at 6:16 PM, Alex Tweedly via use-livecode <
use-livecode@lists.runrev.com> wrote:

> [ started a new thread, so I can't rant without tainting the other thread ]
>
> I started out on the 'find a rev/livecode solution for a simple HTTP
> server" for one small reason :
>
>the LC 9.0 Dictionary Guide, under "HTML5 Deployment" says
>
> Testing your HTML5 app with a local web server
>> Some browsers, such as Google Chrome, do not permit pages to download
>> resources from file:// URLs. You won't be able to test your application in
>> these browsers unless you run a local HTTP server.
>>
>> A quick and easy way to run a simple local HTTP server is to use Python.
>> Open a terminal window, change directory to your standalone's directory,
>> and run:
>>
>> python -m SimpleHTTPServer 8080
>> This will let you access your standalone by opening your web browser and
>> visiting http://localhost:8080.
>>
>> What ?  IMO, this is just plain "wrong".
>
> This is like going into the BMW dealership and being told "Yeah, you'll
> love the way the new Z4 drives. Just get into this Mercedes sports car here
> and we'll take you over to the racetrack to watch someone else drive one."
>
> Why are we suggesting that users use another (OK, a "competing") scripting
> language to test HTML5 deployment ?
>
> Livecode is perfectly able to run a simple HTTP server. It is perfectly
> possible and not too hard to write a basic one. In fact, we now even have
> an included library that makes it trivial to write that very basic server.
>
> Why didn't we (i.e. Livecode - a careful use of the word  "we") just
> package up that simple server, and then include that, with suitable
> instructions.
>
> That would have avoided any implication that LC is any less capable than
> other scripting languages, and avoided reminding anyone that LC doesn't
> (yet) come packaged with all the libraries and therefore utilities that you
> could hope for.
>
>
> So - I'm hoping to write a basic version (including my "get around the
> same-domain limitation") and get it, or something like it, included in the
> LC distribution, so that the documentation has no need to recommend another
> language.
>
> 
>
> Alex.
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: httpd library and missed opportunity.

2017-08-01 Thread J. Landman Gay via use-livecode

My first reaction was: I bet LC didn't have enough spare time and people.

My second reaction was: Well, it's open source, after all.

My third reaction was: Good for you, Alex! Bravo!


On 8/1/17 4:16 PM, Alex Tweedly via use-livecode wrote:

[ started a new thread, so I can't rant without tainting the other thread ]

I started out on the 'find a rev/livecode solution for a simple HTTP 
server" for one small reason :


the LC 9.0 Dictionary Guide, under "HTML5 Deployment" says


Testing your HTML5 app with a local web server
Some browsers, such as Google Chrome, do not permit pages to download 
resources from file:// URLs. You won't be able to test your 
application in these browsers unless you run a local HTTP server.


A quick and easy way to run a simple local HTTP server is to use 
Python. Open a terminal window, change directory to your standalone's 
directory, and run:


python -m SimpleHTTPServer 8080
This will let you access your standalone by opening your web browser 
and visiting http://localhost:8080.



What ?  IMO, this is just plain "wrong".

This is like going into the BMW dealership and being told "Yeah, you'll 
love the way the new Z4 drives. Just get into this Mercedes sports car 
here and we'll take you over to the racetrack to watch someone else 
drive one."


Why are we suggesting that users use another (OK, a "competing") 
scripting language to test HTML5 deployment ?


Livecode is perfectly able to run a simple HTTP server. It is perfectly 
possible and not too hard to write a basic one. In fact, we now even 
have an included library that makes it trivial to write that very basic 
server.


Why didn't we (i.e. Livecode - a careful use of the word  "we") just 
package up that simple server, and then include that, with suitable 
instructions.


That would have avoided any implication that LC is any less capable than 
other scripting languages, and avoided reminding anyone that LC doesn't 
(yet) come packaged with all the libraries and therefore utilities that 
you could hope for.



So - I'm hoping to write a basic version (including my "get around the 
same-domain limitation") and get it, or something like it, included in 
the LC distribution, so that the documentation has no need to recommend 
another language.




Alex.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode