FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » anyone else writing Linux (or cross-system) applications in PHP?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180294 is a reply to message #180246] Mon, 04 February 2013 07:38 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
crankypuss, 2013-02-02 21:27:

[...]
> Is there a forum where the other folks (presuming there are any) who
> have been writing applications in PHP hang out? Don't say "yeah dummy,
> go to comp.lang.python" please, my homor quotient is maxed out for
> today. <g>

Maybe <http://gtk.php.net/> is what you are looking for.

But this is still very limited - i recommend to learn C++ and how to use
Qt. See <http://qt-project.org/downloads>.

Qt also provides "Qt Creator" - a nice IDE including GUI designer,
debugger etc.. (see <http://qt-project.org/wiki/Category:Tools::QtCreator>).


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180295 is a reply to message #180253] Mon, 04 February 2013 07:40 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
crankypuss, 2013-02-03 11:49:

> On 02/02/2013 02:27 PM, Jonathan N. Little wrote:
[...]
>> Because for the web is where PHP originated. Get data, do something,
>> done. Not really suited for event driven apps.
>
> I have code that says you're mistaken.

In which way? How does your PHP code handle events without polling in an
endless loop?


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180296 is a reply to message #180294] Mon, 04 February 2013 09:04 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:

> crankypuss, 2013-02-02 21:27:
>
> [...]
>> Is there a forum where the other folks (presuming there are any) who
>> have been writing applications in PHP hang out? Don't say "yeah dummy,
>> go to comp.lang.python" please, my homor quotient is maxed out for
>> today. <g>
>
> Maybe <http://gtk.php.net/> is what you are looking for.

Website hasn't been updated for three years.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180297 is a reply to message #180289] Mon, 04 February 2013 09:14 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <ken0po$3qr$1(at)online(dot)de>, Martin <no(at)spam(dot)invalid> wrote:

> On 02/03/2013 08:00 PM, Jonathan N. Little wrote:
>
>>>> I don't think so. Since its original name was "Personal Home Page Tools"
>>>> for scripts to facilitate created personal webpages on a server speaks
>>>> to its origins. How an application interacts in with the user from a
>>>> webserver is very different from that of a desktop application.
>>>
>>> It's okay if we disagree on this, you're allowed to be incorrect. <G>
>>
>> Not sure even if a smile can change history though.
>
> you're totally right, PHP started out as "Private Home Page" and was
> designed as an inline script for HTML templates, just like all the other
> "XYZ Server Pages" in the early days.
>
> For those with a sense of humour there is this comparison between perl
> and PHP:
>
> http://tnx.nl/php.html

The main witticism there has to be the assertion that perl has better
documentation than PHP.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180298 is a reply to message #180296] Mon, 04 February 2013 09:29 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Am 04.02.2013 10:04, schrieb Tim Streater:

> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>
>> crankypuss, 2013-02-02 21:27:
>>
>> [...]
>>> Is there a forum where the other folks (presuming there are any) who
>>> have been writing applications in PHP hang out? Don't say "yeah dummy,
>>> go to comp.lang.python" please, my homor quotient is maxed out for
>>> today. <g>
>>
>> Maybe <http://gtk.php.net/> is what you are looking for.
>
> Website hasn't been updated for three years.

I know - but this is everything i'm aware of for building "standalone"
applications with a GUI. If you can recommend something better - feel
free to do so. Maybe the OP will understand, why using PHP for this
purpose is not the best idea ;-)


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180299 is a reply to message #180278] Mon, 04 February 2013 09:32 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/03/2013 12:00 PM, Jonathan N. Little wrote:
> crankypuss wrote:
>> On 02/03/2013 08:17 AM, Jonathan N. Little wrote:
>
> <snip>
>
>>> I don't think so. Since its original name was "Personal Home Page Tools"
>>> for scripts to facilitate created personal webpages on a server speaks
>>> to its origins. How an application interacts in with the user from a
>>> webserver is very different from that of a desktop application.
>>
>> It's okay if we disagree on this, you're allowed to be incorrect. <G>
>
> Not sure even if a smile can change history though.
>
>>
>> As for how users interact with applications, if you think it's different
>> on the web vs on the desktop, I would claim that you haven't finished
>> generalizing your view of it. In either case the application presents
>> something, the user responds, rinse-and-repeat. The main difference
>> between a web-app and a desktop-app is the level of precision provided
>> by the interface and the amount of latency. I've built web-apps that
>> run equally well on the desktop. If you aren't aware of it, there is
>> (or, was) a guy in the Windows world who sells a shareware product to
>> facilitate writing desktop applications in PHP.
>
> But how it "runs" is different. A desktop app starts and has a message
> loop that checks for user interaction. Responds and continues until
> either program, user, or system terminates the processes. With the web
> the php script receives its input via the web server, script runs and
> does its stuff, creates the web page and terminates.
>

I guess you never worked much with state-driven applications, not
everyone has. What we think of as a "desktop app" just sits there with
its state-data in memory, and a "web app" reloads its state-data when
another request comes in from the same user. Once the state data is
re-established the internal processing is basically the same except for
what subroutines are used to draw the "screen". In fact a "desktop app"
doesn't keep its state-data in memory except conceptually unless the
system is so lightly loaded that there's no thread-switching or swapping
going on. Conceptually it generalizes to pretty much the same thing in
either case.

The "message loop" you speak of really isn't any different between a
web-app and a desktop-app. For a desktop-app it looks like this,

1. application is entered on initiation
2. application presents initial display
4. application waits for input and is swapped out
5. user does something to cause an interrupt
6. application gets rescheduled as ready-to-run, swapped in
7. application scratches head, presents output
8. application goes back to (4) and gets "swapped out" again

For a web-app it looks like this,

1. server starts up and eventually reaches idle state
2. a message comes in (analogous to 5 above)
3. application's state data gets reloaded as it's "swapped in"
4. application scratches head, presents output
5. application gets swapped out (state saved)

It's pretty much the same thing, except that some websites don't do
squat about saving state-data for an individual user. Some use PHP
"session" stuff to do that, where a session identifier is a token coming
in on each http request that allows that user's state-data to be
reloaded for the request.

The loop is basically the same except that its "top" gets rolled around
to the middle and given a different name. For a desktop-app the "top"
is the guy hitting the enter key or clicking the mouse or whatever,
that's the top of the "message loop". For a web-app the browser
recognizes a link-click and sends an http request. It's the same thing
unless you get fixated on the details to the point where you can't see
the forest. Look an X Windows application in enough detail and you'll
see the same basic process with a different protocol used between the
client and the server. Steak or hamburger, it's all beef.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180300 is a reply to message #180298] Mon, 04 February 2013 09:34 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <kenv1g$ich$1(at)dont-email(dot)me>,
Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:

> Am 04.02.2013 10:04, schrieb Tim Streater:
>
>> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
>> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>>
>>> crankypuss, 2013-02-02 21:27:
>>>
>>> [...]
>>>> Is there a forum where the other folks (presuming there are any) who
>>>> have been writing applications in PHP hang out? Don't say "yeah dummy,
>>>> go to comp.lang.python" please, my homor quotient is maxed out for
>>>> today. <g>
>>>
>>> Maybe <http://gtk.php.net/> is what you are looking for.
>>
>> Website hasn't been updated for three years.
>
> I know - but this is everything i'm aware of for building "standalone"
> applications with a GUI. If you can recommend something better - feel
> free to do so. Maybe the OP will understand, why using PHP for this
> purpose is not the best idea ;-)

I can't, unfortunately, I've been waiting for the gtk stuff myself for 6
or 7 years.

That doesn't stop me writing scripts in PHP. Neither does it stop me
writing applications where I do the GUI bit in Javascript and the
backend stuff in PHP. Heavy? Sure, but who cares. That's why we have
multi-core, multi-GHz CPUs.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180301 is a reply to message #180295] Mon, 04 February 2013 09:49 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 12:40 AM, Arno Welzel wrote:
> crankypuss, 2013-02-03 11:49:
>
>> On 02/02/2013 02:27 PM, Jonathan N. Little wrote:
> [...]
>>> Because for the web is where PHP originated. Get data, do something,
>>> done. Not really suited for event driven apps.
>>
>> I have code that says you're mistaken.
>
> In which way? How does your PHP code handle events without polling in an
> endless loop?
>
>

There's only two ways to handle repetitive events, interrupts and
polling. No modern operating system polls by using a hard spin-loop,
and no application that isn't a total piece of crap ever implements a
hard spin-loop without some kind of system-call that allows it to be set
aside while the processor services another thread. Whether your
application contains a loop that has a system-call in it, or is
rescheduled when an interrupt comes in, it's the same loop with its top
rolled around and a different subroutine used to put it to sleep. Hell,
even if your application is so stupid that it's just branching to here,
any modern operating system will time-swap it out and let somebody else
have a shot at the processor.

So the answer depends somewhat on how one interprets "even driven". All
applications are event driven unless they are just doing hard
computation, in/grind/out. The techniques one uses to make the
application do what's intended vary depending on details. In other
words it depends on what you want to do. Polling is not bad if done
properly, neither are interrupt-based mechanisms, look close enough and
they're basically the same thing.

As for PHP being "not really suited for event driven apps" that seems
kind of silly to me, but then most people think that calling ncurses to
get a character means their application will have to sit there waiting
until the ENTER key is pressed. Sure, the ncurses call is blocking, but
that doesn't mean you can't write a non-blocking subroutine that does
something that's blocking; only threads get blocked, big deal.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180302 is a reply to message #180294] Mon, 04 February 2013 09:55 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 12:38 AM, Arno Welzel wrote:
> crankypuss, 2013-02-02 21:27:
>
> [...]
>> Is there a forum where the other folks (presuming there are any) who
>> have been writing applications in PHP hang out? Don't say "yeah dummy,
>> go to comp.lang.python" please, my homor quotient is maxed out for
>> today. <g>
>
> Maybe <http://gtk.php.net/> is what you are looking for.
>
> But this is still very limited - i recommend to learn C++ and how to use
> Qt. See <http://qt-project.org/downloads>.
>
> Qt also provides "Qt Creator" - a nice IDE including GUI designer,
> debugger etc.. (see <http://qt-project.org/wiki/Category:Tools::QtCreator>).
>
>

Go to a line-mode login and try to run one of your Qt applications.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180303 is a reply to message #180298] Mon, 04 February 2013 10:01 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 02:29 AM, Arno Welzel wrote:
> Am 04.02.2013 10:04, schrieb Tim Streater:
>
>> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
>> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>>
>>> crankypuss, 2013-02-02 21:27:
>>>
>>> [...]
>>>> Is there a forum where the other folks (presuming there are any) who
>>>> have been writing applications in PHP hang out? Don't say "yeah
>>> dummy,
>>>> go to comp.lang.python" please, my homor quotient is maxed out for
>>>> today. <g>
>>>
>>> Maybe <http://gtk.php.net/> is what you are looking for.
>>
>> Website hasn't been updated for three years.
>
> I know - but this is everything i'm aware of for building "standalone"
> applications with a GUI. If you can recommend something better - feel
> free to do so. Maybe the OP will understand, why using PHP for this
> purpose is not the best idea ;-)
>
>

Maybe the OP will understand that his ncurses-based applications work
whether X is started or not. The OP has looked and grasps the idea that
Qt and Gtk require an X server. And the OP has written sufficient GUI
code in C++ to recognize a crap interface when he sees one. But thanks,
you appeared to be trying to help, and that's appreciated.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180304 is a reply to message #180300] Mon, 04 February 2013 10:06 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 02:34 AM, Tim Streater wrote:
> In article <kenv1g$ich$1(at)dont-email(dot)me>,
> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>
>> Am 04.02.2013 10:04, schrieb Tim Streater:
>>
>>> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
>>> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>>>
>>>> crankypuss, 2013-02-02 21:27:
>>>>
>>>> [...]
>>>> > Is there a forum where the other folks (presuming there are any) who
>>>> > have been writing applications in PHP hang out? Don't say "yeah
>> dummy,
>>>> > go to comp.lang.python" please, my homor quotient is maxed out for
>>>> > today. <g>
>>>>
>>>> Maybe <http://gtk.php.net/> is what you are looking for.
>>>
>>> Website hasn't been updated for three years.
>>
>> I know - but this is everything i'm aware of for building "standalone"
>> applications with a GUI. If you can recommend something better - feel
>> free to do so. Maybe the OP will understand, why using PHP for this
>> purpose is not the best idea ;-)
>
> I can't, unfortunately, I've been waiting for the gtk stuff myself for 6
> or 7 years.
>
> That doesn't stop me writing scripts in PHP. Neither does it stop me
> writing applications where I do the GUI bit in Javascript and the
> backend stuff in PHP. Heavy? Sure, but who cares. That's why we have
> multi-core, multi-GHz CPUs.
>

Yep. With almost any desktop application you can imagine, unless it's
written *very* poorly, the amount of time spent waiting for the user to
do something is a couple orders of magnitude larger than the time spent
actually doing processing. Desktop applications are only serving one
user and he's as slow as a human, it's different from a server
supporting a zillion requests from all and sundry.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180305 is a reply to message #180261] Mon, 04 February 2013 11:32 Go to previous messageGo to next message
Jasen Betts is currently offline  Jasen Betts
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On 2013-02-03, J.O. Aho <user(at)example(dot)net> wrote:
> On 03/02/13 12:50, The Natural Philosopher wrote:
>
>>> If you want something cross-platform, then look at mono, sure it's
>>> larger to install than PHP, but the benefit is that you can make
>>> applications that will run on multiple platforms.
>>>
>> java is probably the most popular cross platform interpreted language.
>>
>>
> Sure it is, but also the one which has been struggling with security
> issues and do not feel to be something to recommend nowadays, but lets
> see if Oracle has the will to fix the issues.

Simple. don't use Oracle Java. use one of the other two (or more?) flavours.

> I have to say I feel C# applications on Linux to be smother than Java,
> but then I don't use much of either.

yeah, half the cross platform stuff I use runs under Mono,
a third under Java and the rest is written in one of the oldest
cross-platform languages of all: C.

--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news(at)netfront(dot)net ---
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180306 is a reply to message #180265] Mon, 04 February 2013 11:37 Go to previous messageGo to next message
Jasen Betts is currently offline  Jasen Betts
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On 2013-02-03, M. Strobel <sorry_no_mail_here(at)nowhere(dot)dee> wrote:
> Am 03.02.2013 14:08, schrieb J G Miller:
>> On Sunday, February 3rd, 2013, at 10:58:04h +0100, M. Strobel wrote:
>>
>>> But in system administration the bash is the shell that starts Linux up.
>>
>> Most of the major distributions do not use bash as the startup shell,
>> but dash to provide a Bourne shell (not Bourne Again shell).
>>
>
> And in which distributions /bin/sh is not a link to /bin/bash?

dash is a debian thing (in name atleast),
it's used on debian and probably most of the ".deb" distros.



--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news(at)netfront(dot)net ---
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180307 is a reply to message #180286] Mon, 04 February 2013 11:46 Go to previous messageGo to next message
Jasen Betts is currently offline  Jasen Betts
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On 2013-02-03, The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
> On 03/02/13 21:47, J G Miller wrote:

>> Well Debianistas do not always follow their own recommendations,
>> do they? ;)
>>
>> {init.d/}# ls -1 | wc -l
>> 120
>>
>> {init.d/}# grep bash *
>> acpi-support:#!/bin/bash
>> console-log:#! /bin/bash
>> nfs-kernel-server:#!/bin/bash
>>
>> {init.d}# grep '#! */bin/sh' * | wc -l
>> 120
>>
> That's amazing! 120-3 = 120!
>

no, that'd be /etc/init.d/README and other files with matching
strings on lines other than the first.

--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news(at)netfront(dot)net ---
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180308 is a reply to message #180256] Mon, 04 February 2013 12:23 Go to previous messageGo to next message
Jasen Betts is currently offline  Jasen Betts
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On 2013-02-03, crankypuss <noemail(at)noemail(dot)invalid> wrote:
> On 02/02/2013 03:20 PM, Keith D. Lee wrote:
>> All:
>> What about Perl?
>>
>
> Enjoy. No reason not to go back to the predecessor of PHP. That's
> where PHP came from, y'know.

php.net says some feaures were inspired by perl.

> Some fellow whose name I don't recall
> built it to do the things Perl wasn't set up for. google "PHP history"
> there's a bit in wikipedia about it.

That's no more "coming from perl" that what I write here is "coming
from Crankypuss"

--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news(at)netfront(dot)net ---
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180309 is a reply to message #180308] Mon, 04 February 2013 15:57 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 05:23 AM, Jasen Betts wrote:
> On 2013-02-03, crankypuss <noemail(at)noemail(dot)invalid> wrote:
>> On 02/02/2013 03:20 PM, Keith D. Lee wrote:
>>> All:
>>> What about Perl?
>>>
>>
>> Enjoy. No reason not to go back to the predecessor of PHP. That's
>> where PHP came from, y'know.
>
> php.net says some feaures were inspired by perl.
>
>> Some fellow whose name I don't recall
>> built it to do the things Perl wasn't set up for. google "PHP history"
>> there's a bit in wikipedia about it.
>
> That's no more "coming from perl" that what I write here is "coming
> from Crankypuss"
>

Wikipedia, the encyclopedia anyone can edit.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180310 is a reply to message #180299] Mon, 04 February 2013 16:06 Go to previous messageGo to next message
Jonathan N. Little is currently offline  Jonathan N. Little
Messages: 12
Registered: February 2011
Karma: 0
Junior Member
crankypuss wrote:
> On 02/03/2013 12:00 PM, Jonathan N. Little wrote:
>> crankypuss wrote:
>>> On 02/03/2013 08:17 AM, Jonathan N. Little wrote:
>>
>> <snip>
>>
>>>> I don't think so. Since its original name was "Personal Home Page
>>>> Tools"
>>>> for scripts to facilitate created personal webpages on a server speaks
>>>> to its origins. How an application interacts in with the user from a
>>>> webserver is very different from that of a desktop application.
>>>
>>> It's okay if we disagree on this, you're allowed to be incorrect. <G>
>>
>> Not sure even if a smile can change history though.
>>
>>>
>>> As for how users interact with applications, if you think it's different
>>> on the web vs on the desktop, I would claim that you haven't finished
>>> generalizing your view of it. In either case the application presents
>>> something, the user responds, rinse-and-repeat. The main difference
>>> between a web-app and a desktop-app is the level of precision provided
>>> by the interface and the amount of latency. I've built web-apps that
>>> run equally well on the desktop. If you aren't aware of it, there is
>>> (or, was) a guy in the Windows world who sells a shareware product to
>>> facilitate writing desktop applications in PHP.
>>
>> But how it "runs" is different. A desktop app starts and has a message
>> loop that checks for user interaction. Responds and continues until
>> either program, user, or system terminates the processes. With the web
>> the php script receives its input via the web server, script runs and
>> does its stuff, creates the web page and terminates.
>>
>
> I guess you never worked much with state-driven applications, not
> everyone has. What we think of as a "desktop app" just sits there with
> its state-data in memory, and a "web app" reloads its state-data when
> another request comes in from the same user. Once the state data is
> re-established the internal processing is basically the same except for
> what subroutines are used to draw the "screen". In fact a "desktop app"
> doesn't keep its state-data in memory except conceptually unless the
> system is so lightly loaded that there's no thread-switching or swapping
> going on. Conceptually it generalizes to pretty much the same thing in
> either case.
>
> The "message loop" you speak of really isn't any different between a
> web-app and a desktop-app. For a desktop-app it looks like this,

Well sort of, where the web app has a web server in between and the
desktop has the OS,

>
> 1. application is entered on initiation
> 2. application presents initial display
> 4. application waits for input and is swapped out
> 5. user does something to cause an interrupt
> 6. application gets rescheduled as ready-to-run, swapped in
> 7. application scratches head, presents output
> 8. application goes back to (4) and gets "swapped out" again
>
> For a web-app it looks like this,
>
> 1. server starts up and eventually reaches idle state
> 2. a message comes in (analogous to 5 above)
> 3. application's state data gets reloaded as it's "swapped in"
> 4. application scratches head, presents output
> 5. application gets swapped out (state saved)
>

However with the desktop app it keeps running with a pid to the
instance, the web app does not. To keep continuity with a web app you
need to employ session mechanism. It need some sort of a login and
logout or it gets quite complicated with DBs and files. A simple example:

Application updated a simple file from user:

Desktop
1. App launches get pid
2. Locks file.
3. Reads file.
4. Displays file.
5. Waits for user input.
6. Writes updated file.
7. Removes lock
8. Program exits and pid is destroyed

Web:
1. Session created with user login
2) Web server calls script
locks file*
reads it
displays it
script ends
3) Web server waits for next request.
check session if same user goto 4 else 2
4) Get user edits
write file
remove lock*
script ends
5) User logout to remove session

*With a web app you would not lock the file from step 2-4 because if the
user left (close the browser, whatever) the session does not
automatically get destroyed the the desktop pid to run a cleanup to
unlock the file and such. You can have a session expire to auto logout
and such but it is not the same at all. With a desktop app it is real
easy to to insure only one instance, not so nor often desirable for web.


> It's pretty much the same thing, except that some websites don't do
> squat about saving state-data for an individual user. Some use PHP
> "session" stuff to do that, where a session identifier is a token coming
> in on each http request that allows that user's state-data to be
> reloaded for the request.

To emulate what happens in the desktop environment on the web is not so
easy.

> The loop is basically the same except that its "top" gets rolled around
> to the middle and given a different name. For a desktop-app the "top"
> is the guy hitting the enter key or clicking the mouse or whatever,
> that's the top of the "message loop". For a web-app the browser
> recognizes a link-click and sends an http request. It's the same thing
> unless you get fixated on the details to the point where you can't see
> the forest. Look an X Windows application in enough detail and you'll
> see the same basic process with a different protocol used between the
> client and the server. Steak or hamburger, it's all beef.
>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180311 is a reply to message #180298] Mon, 04 February 2013 16:08 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 02:29 AM, Arno Welzel wrote:
> Am 04.02.2013 10:04, schrieb Tim Streater:
>
>> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
>> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>>
>>> crankypuss, 2013-02-02 21:27:
>>>
>>> [...]
>>>> Is there a forum where the other folks (presuming there are any) who
>>>> have been writing applications in PHP hang out? Don't say "yeah
>>> dummy,
>>>> go to comp.lang.python" please, my homor quotient is maxed out for
>>>> today. <g>
>>>
>>> Maybe <http://gtk.php.net/> is what you are looking for.
>>
>> Website hasn't been updated for three years.
>
> I know - but this is everything i'm aware of for building "standalone"
> applications with a GUI. If you can recommend something better - feel
> free to do so. Maybe the OP will understand, why using PHP for this
> purpose is not the best idea ;-)

Sometimes it's hard for me to grasp the idea that most people just use
whatever is sitting on the shelf and would never consider the idea of
building something else; usually it's at least as difficult for them to
grasp the idea that for me applications are not half as interesting as
the tools that enable them. See, I don't *care* what's available this
week for writing standalone apps under PHP, what I mostly care about is
what the underlying operating system will support reliably and what the
PHP language itself is capable of.

The original post didn't ask for someone to help a poor weenie build
desktop applications in PHP, it asked who else is writing Linux or
cross-system applications in PHP, with perhaps some hope of finding out
where they're discussing it.

So far the answer is "no, we're using stuff we think is easier" with the
possibility that M. Strobel is also engaged in this bizarre activity
(though he didn't say yea or nay but commented on its applicability).
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180312 is a reply to message #180310] Mon, 04 February 2013 16:15 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 09:06 AM, Jonathan N. Little wrote:

<mostly, snipped>

> To emulate what happens in the desktop environment on the web is not so
> easy.

The world is in a sad state when people prefer code that was written
easy over code that was written right.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180313 is a reply to message #180283] Mon, 04 February 2013 16:21 Go to previous messageGo to next message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 03.02.2013 22:47, schrieb J G Miller:
> On Sunday, February 3rd, 2013, at 20:25:39h +0000, Richard Kettlewell wrote:
>
>> Neither of those pages contain instructions to avoid Bash.
>
> But this tends to suggest that bash should be avoided if possible.
>
> From <http://www.debian.org/doc/debian-policy/ch-files.html>
>
> QUOTE
>
> You may wish to restrict your script to SUSv3 features plus the above set when
> possible so that it may use /bin/sh as its interpreter. Checking your script
> with checkbashisms from the devscripts package or running your script with an
> alternate shell such as posh may help uncover violations of the above requirements.
> If in doubt whether a script complies with these requirements, use /bin/bash.
>
> UNQUOTE
>
>> Notice for instance that (at least in sid) dash.preinst is a #!/bin/bash
>> script, but dash doesn’t appear on the lintian page.
>
> Well Debianistas do not always follow their own recommendations,
> do they? ;)
>
> {init.d/}# ls -1 | wc -l
> 120
>
> {init.d/}# grep bash *
> acpi-support:#!/bin/bash
> console-log:#! /bin/bash
> nfs-kernel-server:#!/bin/bash
>
> {init.d}# grep '#! */bin/sh' * | wc -l
> 120
>

In archlinux all 47 scripts in /etc/rc.d are bash scripts.

In suse 11.4 /etc/init.d (and subdirs) I count 273 /bin/sh and 75 /bin/bash

I never had true Debian because of their conservatism.

/Str.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180314 is a reply to message #180312] Mon, 04 February 2013 16:24 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 04/02/13 16:15, crankypuss wrote:
> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>
> <mostly, snipped>
>
>> To emulate what happens in the desktop environment on the web is not so
>> easy.
>
> The world is in a sad state when people prefer code that was written
> easy over code that was written right.

well there you go. You had better start from scratch and design your own
hardware then. And your own language and your own operating system.

Engineering is never about Getting Things Right: only mathematicians
have that luxury. For people in the Real World (TM) its a question of
getting things good enough for purpose, by the shortest and least hard
route.

If that means engineering a 1501cc engine in, instead of 1500cc, because
the difficulties of achieving the prefect Roundness of Wheels is
absolute, then that's what we do.

PHP is that route for simple web based apps. For anything else its
largely not that useful.

Accept it, and move on..

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180315 is a reply to message #180313] Mon, 04 February 2013 16:28 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 04/02/13 16:21, M. Strobel wrote:
> Am 03.02.2013 22:47, schrieb J G Miller:
>> On Sunday, February 3rd, 2013, at 20:25:39h +0000, Richard Kettlewell wrote:
>>
>>> Neither of those pages contain instructions to avoid Bash.
>>
>> But this tends to suggest that bash should be avoided if possible.
>>
>> From <http://www.debian.org/doc/debian-policy/ch-files.html>
>>
>> QUOTE
>>
>> You may wish to restrict your script to SUSv3 features plus the above set when
>> possible so that it may use /bin/sh as its interpreter. Checking your script
>> with checkbashisms from the devscripts package or running your script with an
>> alternate shell such as posh may help uncover violations of the above requirements.
>> If in doubt whether a script complies with these requirements, use /bin/bash.
>>
>> UNQUOTE
>>
>>> Notice for instance that (at least in sid) dash.preinst is a #!/bin/bash
>>> script, but dash doesn’t appear on the lintian page.
>>
>> Well Debianistas do not always follow their own recommendations,
>> do they? ;)
>>
>> {init.d/}# ls -1 | wc -l
>> 120
>>
>> {init.d/}# grep bash *
>> acpi-support:#!/bin/bash
>> console-log:#! /bin/bash
>> nfs-kernel-server:#!/bin/bash
>>
>> {init.d}# grep '#! */bin/sh' * | wc -l
>> 120
>>
>
> In archlinux all 47 scripts in /etc/rc.d are bash scripts.
>
> In suse 11.4 /etc/init.d (and subdirs) I count 273 /bin/sh and 75 /bin/bash
>
> I never had true Debian because of their conservatism.
>
> /Str.
>
my debian server shows one instance of /bin/bash, and that's mysql startup.

All the rest are /bin/sh...

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180316 is a reply to message #180311] Mon, 04 February 2013 16:34 Go to previous messageGo to next message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 04.02.2013 17:08, schrieb crankypuss:

> Sometimes it's hard for me to grasp the idea that most people just use whatever is
> sitting on the shelf and would never consider the idea of building something else;
> usually it's at least as difficult for them to grasp the idea that for me
> applications are not half as interesting as the tools that enable them. See, I don't
> *care* what's available this week for writing standalone apps under PHP, what I
> mostly care about is what the underlying operating system will support reliably and
> what the PHP language itself is capable of.
>
> The original post didn't ask for someone to help a poor weenie build desktop
> applications in PHP, it asked who else is writing Linux or cross-system applications
> in PHP, with perhaps some hope of finding out where they're discussing it.
>
> So far the answer is "no, we're using stuff we think is easier" with the possibility
> that M. Strobel is also engaged in this bizarre activity (though he didn't say yea or
> nay but commented on its applicability).

I meant to say you could do it in PHP (build desktop applications), but nobody does
it because of how things evolved.

I am using Tcl/Tk for the desktop and for helpers to web applications, and PHP for
the web.

/Str.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180317 is a reply to message #180314] Mon, 04 February 2013 16:35 Go to previous messageGo to next message
Jonathan N. Little is currently offline  Jonathan N. Little
Messages: 12
Registered: February 2011
Karma: 0
Junior Member
The Natural Philosopher wrote:
> On 04/02/13 16:15, crankypuss wrote:
>> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>>
>> <mostly, snipped>
>>
>>> To emulate what happens in the desktop environment on the web is not so
>>> easy.
>>
>> The world is in a sad state when people prefer code that was written
>> easy over code that was written right.
>
> well there you go. You had better start from scratch and design your own
> hardware then. And your own language and your own operating system.
>
> Engineering is never about Getting Things Right: only mathematicians
> have that luxury. For people in the Real World (TM) its a question of
> getting things good enough for purpose, by the shortest and least hard
> route.
>
> If that means engineering a 1501cc engine in, instead of 1500cc, because
> the difficulties of achieving the prefect Roundness of Wheels is
> absolute, then that's what we do.
>
> PHP is that route for simple web based apps. For anything else its
> largely not that useful.
>
> Accept it, and move on..
>

IOW the right tool for the right job.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180318 is a reply to message #180314] Mon, 04 February 2013 16:38 Go to previous messageGo to next message
J G Miller is currently offline  J G Miller
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On Monday, February 4th, 2013, at 16:24:43h +0000,
The Natural Philosopher wrote:

> Engineering is never about Getting Things Right

I would suggest that should be better stated as

"Engineering is never about Getting Things Perfect"
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180319 is a reply to message #180318] Mon, 04 February 2013 16:41 Go to previous messageGo to next message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 04.02.2013 17:38, schrieb J G Miller:
> On Monday, February 4th, 2013, at 16:24:43h +0000,
> The Natural Philosopher wrote:
>
>> Engineering is never about Getting Things Right
>
> I would suggest that should be better stated as
>
> "Engineering is never about Getting Things Perfect"
>
.... because perfect does not exist with contradictory requirements.

/Str.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180320 is a reply to message #180311] Mon, 04 February 2013 16:44 Go to previous messageGo to next message
J G Miller is currently offline  J G Miller
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On Monday, February 4th, 2013, at 09:08:21h -0700, Cranky Puss explained:

> The original post didn't ask for someone to help a poor weenie build
> desktop applications in PHP, it asked who else is writing Linux or
> cross-system applications in PHP, with perhaps some hope of finding out
> where they're discussing it.

It would be helpful if you could give some examples of what type
of applications you are in the processing of writing, as "Linux
application or cross-system application" is really so vague as to
be practically meaningless.

Why not post your question to newsgroup alt.php and see
if you get any answers?
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180321 is a reply to message #180319] Mon, 04 February 2013 16:58 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 04/02/13 16:41, M. Strobel wrote:
> Am 04.02.2013 17:38, schrieb J G Miller:
>> On Monday, February 4th, 2013, at 16:24:43h +0000,
>> The Natural Philosopher wrote:
>>
>>> Engineering is never about Getting Things Right
>>
>> I would suggest that should be better stated as
>>
>> "Engineering is never about Getting Things Perfect"
>>
> ... because perfect does not exist with contradictory requirements.
>

....whiuch completely sums up so much.
Viz 'how can you assure me that (nuclear power stations, or any other
technology) is completely safe?

By not building it at all.

So no computers, cars electricity or anything. And by the way don't go
outside or the germs might get you, and don't stay indoors because its
also bad for you.


> /Str.
>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180323 is a reply to message #180310] Tue, 05 February 2013 06:00 Go to previous messageGo to next message
Jasen Betts is currently offline  Jasen Betts
Messages: 11
Registered: February 2013
Karma: 0
Junior Member
On 2013-02-04, Jonathan N. Little <lws4art(at)gmail(dot)com> wrote:
>
> However with the desktop app it keeps running with a pid to the
> instance, the web app does not. To keep continuity with a web app you
> need to employ session mechanism. It need some sort of a login and
> logout or it gets quite complicated with DBs and files. A simple example:

I did some experimetation wuth a web server that ran forked
applications and kept the instances around communicating with them via
pipes, it was neat seeing what were originally desktop apps running
over a browser on a server 700km away. development was abandonned.

>> It's pretty much the same thing, except that some websites don't do
>> squat about saving state-data for an individual user. Some use PHP
>> "session" stuff to do that, where a session identifier is a token coming
>> in on each http request that allows that user's state-data to be
>> reloaded for the request.

yeah there was cheking for that stuff...

> To emulate what happens in the desktop environment on the web is not so
> easy.

AJAX is a big help.

--
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news(at)netfront(dot)net ---
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180324 is a reply to message #180314] Tue, 05 February 2013 09:21 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 09:24 AM, The Natural Philosopher wrote:
> On 04/02/13 16:15, crankypuss wrote:
>> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>>
>> <mostly, snipped>
>>
>>> To emulate what happens in the desktop environment on the web is not so
>>> easy.
>>
>> The world is in a sad state when people prefer code that was written
>> easy over code that was written right.
>
> well there you go. You had better start from scratch and design your own
> hardware then. And your own language and your own operating system.

One never knows, do one. I'm not capable of designing my own hardware
from scratch at present, the rest I've done at one time or another.

> Engineering is never about Getting Things Right: only mathematicians
> have that luxury. For people in the Real World (TM) its a question of
> getting things good enough for purpose, by the shortest and least hard
> route.

Oddly enough the piece of paper they gave me back when dinosaurs roamed
the earth does not say anything about "Software Engineering" but it does
appear to grant me a halfassed degree in "Computer Science", and there
really is a difference.

> If that means engineering a 1501cc engine in, instead of 1500cc, because
> the difficulties of achieving the prefect Roundness of Wheels is
> absolute, then that's what we do.
>
> PHP is that route for simple web based apps. For anything else its
> largely not that useful.
>
> Accept it, and move on..
>

Take your own advice, son; I accepted it for many years, and I have
moved on.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180325 is a reply to message #180317] Tue, 05 February 2013 09:22 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 09:35 AM, Jonathan N. Little wrote:
> The Natural Philosopher wrote:
>> On 04/02/13 16:15, crankypuss wrote:
>>> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>>>
>>> <mostly, snipped>
>>>
>>>> To emulate what happens in the desktop environment on the web is not so
>>>> easy.
>>>
>>> The world is in a sad state when people prefer code that was written
>>> easy over code that was written right.
>>
>> well there you go. You had better start from scratch and design your own
>> hardware then. And your own language and your own operating system.
>>
>> Engineering is never about Getting Things Right: only mathematicians
>> have that luxury. For people in the Real World (TM) its a question of
>> getting things good enough for purpose, by the shortest and least hard
>> route.
>>
>> If that means engineering a 1501cc engine in, instead of 1500cc, because
>> the difficulties of achieving the prefect Roundness of Wheels is
>> absolute, then that's what we do.
>>
>> PHP is that route for simple web based apps. For anything else its
>> largely not that useful.
>>
>> Accept it, and move on..
>>
>
> IOW the right tool for the right job.
>

PHP is hardly "the right tool" for any job, but it can be used for more
than simple web based apps.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180326 is a reply to message #180311] Tue, 05 February 2013 09:26 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 09:08 AM, crankypuss wrote:
> On 02/04/2013 02:29 AM, Arno Welzel wrote:
>> Am 04.02.2013 10:04, schrieb Tim Streater:
>>
>>> In article <510F6570(dot)8060103(at)arnowelzel(dot)de>,
>>> Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
>>>
>>>> crankypuss, 2013-02-02 21:27:
>>>>
>>>> [...]
>>>> > Is there a forum where the other folks (presuming there are any) who
>>>> > have been writing applications in PHP hang out? Don't say "yeah
>>>> dummy,
>>>> > go to comp.lang.python" please, my homor quotient is maxed out for
>>>> > today. <g>
>>>>
>>>> Maybe <http://gtk.php.net/> is what you are looking for.
>>>
>>> Website hasn't been updated for three years.
>>
>> I know - but this is everything i'm aware of for building "standalone"
>> applications with a GUI. If you can recommend something better - feel
>> free to do so. Maybe the OP will understand, why using PHP for this
>> purpose is not the best idea ;-)
>
> Sometimes it's hard for me to grasp the idea that most people just use
> whatever is sitting on the shelf and would never consider the idea of
> building something else; usually it's at least as difficult for them to
> grasp the idea that for me applications are not half as interesting as
> the tools that enable them. See, I don't *care* what's available this
> week for writing standalone apps under PHP, what I mostly care about is
> what the underlying operating system will support reliably and what the
> PHP language itself is capable of.
>
> The original post didn't ask for someone to help a poor weenie build
> desktop applications in PHP, it asked who else is writing Linux or
> cross-system applications in PHP, with perhaps some hope of finding out
> where they're discussing it.
>
> So far the answer is "no, we're using stuff we think is easier" with the
> possibility that M. Strobel is also engaged in this bizarre activity
> (though he didn't say yea or nay but commented on its applicability).

.... Jason Betts seems to be using PHP for desktop applications but
through a java front-end? And perhaps Tim Streater is doing something
with it too.

Not a whole huge mob of folks. <g>
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180327 is a reply to message #180320] Tue, 05 February 2013 09:36 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
On 02/04/2013 09:44 AM, J G Miller wrote:
> On Monday, February 4th, 2013, at 09:08:21h -0700, Cranky Puss explained:
>
>> The original post didn't ask for someone to help a poor weenie build
>> desktop applications in PHP, it asked who else is writing Linux or
>> cross-system applications in PHP, with perhaps some hope of finding out
>> where they're discussing it.
>
> It would be helpful if you could give some examples of what type
> of applications you are in the processing of writing, as "Linux
> application or cross-system application" is really so vague as to
> be practically meaningless.

The two applications that are furthest progressed are a partition-backup
utility and a boot-setup utility. Both of these are for Linux rather
than being cross-system. The only cross-system application I've written
in PHP so far is an accounting application for small businesses, but it
hasn't even been looked at for a couple years at least.

Probably the next two I'll address will be a file-manager to replace
Nautilus et-al, and a text editor. Unless I hold to my earlier plan to
resolve the oops-wrong-includes situation, or do something entirely
different.

> Why not post your question to newsgroup alt.php and see
> if you get any answers?
>

I'll check with google groups to see if that one's active these days, a
few years back I tried subscribing to it and it was fairly dead. If
what you really meant was "why not go away" that will doubtless happen
once people stop responding to this thread.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180328 is a reply to message #180327] Tue, 05 February 2013 09:49 Go to previous messageGo to next message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma: 0
Member
In article <keqjqq01l1p(at)news3(dot)newsguy(dot)com>,
crankypuss <noemail(at)noemail(dot)invalid> wrote:

> On 02/04/2013 09:44 AM, J G Miller wrote:
>> On Monday, February 4th, 2013, at 09:08:21h -0700, Cranky Puss explained:
>>
>>> The original post didn't ask for someone to help a poor weenie build
>>> desktop applications in PHP, it asked who else is writing Linux or
>>> cross-system applications in PHP, with perhaps some hope of finding out
>>> where they're discussing it.
>>
>> It would be helpful if you could give some examples of what type
>> of applications you are in the processing of writing, as "Linux
>> application or cross-system application" is really so vague as to
>> be practically meaningless.
>
> The two applications that are furthest progressed are a partition-backup
> utility and a boot-setup utility. Both of these are for Linux rather
> than being cross-system. The only cross-system application I've written
> in PHP so far is an accounting application for small businesses, but it
> hasn't even been looked at for a couple years at least.
>
> Probably the next two I'll address will be a file-manager to replace
> Nautilus et-al, and a text editor. Unless I hold to my earlier plan to
> resolve the oops-wrong-includes situation, or do something entirely
> different.
>
>> Why not post your question to newsgroup alt.php and see
>> if you get any answers?
>>
>
> I'll check with google groups to see if that one's active these days, a
> few years back I tried subscribing to it and it was fairly dead. If
> what you really meant was "why not go away" that will doubtless happen
> once people stop responding to this thread.

This guy just seems to like hearing himself 'talk' or post his
pronouncements on news. Until I saw Rachel Madow talk about the NRA's
attack ad mentioning Obama's girls, I'd only ever come across trolling
here in news groups. I don't frequent web-based forums much. This guy
is spouting philosphy and approaches, purely, I think, to evoke a
response. With the news groups this thread has subscribed, he's
certainly getting it.

I don't have a computer science degreee but I've been writing software
for 30 years and managed servers and projects that worked and lots that
didn't. The "what language should I use" is most often answered "Which
one do you know the best and how soon can you get this written?"
Fortran is fine for computational stuff. C for LOTS of things. I still
haven't drank the OOP Koolaid yet, but php's implementation of that
seems OK. Perl's is just weird. I learned what languages I needed to
do a job.

So far, I haven't seen anything remotely discussing a concrete goal. I
can't talk about 'modern' languages because I haven't bother to learn
them.

Mr. Crankypants, are you trying to do something in particular or are you
complaining that Obama's kids get special treatment?

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180330 is a reply to message #180326] Tue, 05 February 2013 10:31 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <keqj7f21khr(at)news3(dot)newsguy(dot)com>,
crankypuss <noemail(at)noemail(dot)invalid> wrote:

> ... Jason Betts seems to be using PHP for desktop applications but
> through a java front-end? And perhaps Tim Streater is doing something
> with it too.

My desktop app uses JavaScript to present to the user, and PHP for
backend stuff such as writing to SQLite databases, communicating over
the net, writing log files, and other functions that the app needs. I
use apache/ajax to communicate between the two. As I said before -
heavy? Sure, but who cares.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180331 is a reply to message #180324] Tue, 05 February 2013 12:15 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 05/02/13 09:21, crankypuss wrote:
> On 02/04/2013 09:24 AM, The Natural Philosopher wrote:
>> On 04/02/13 16:15, crankypuss wrote:
>>> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>>>
>>> <mostly, snipped>
>>>
>>>> To emulate what happens in the desktop environment on the web is not so
>>>> easy.
>>>
>>> The world is in a sad state when people prefer code that was written
>>> easy over code that was written right.
>>
>> well there you go. You had better start from scratch and design your own
>> hardware then. And your own language and your own operating system.
>
> One never knows, do one. I'm not capable of designing my own hardware
> from scratch at present, the rest I've done at one time or another.
>
>> Engineering is never about Getting Things Right: only mathematicians
>> have that luxury. For people in the Real World (TM) its a question of
>> getting things good enough for purpose, by the shortest and least hard
>> route.
>
> Oddly enough the piece of paper they gave me back when dinosaurs roamed
> the earth does not say anything about "Software Engineering" but it does
> appear to grant me a halfassed degree in "Computer Science", and there
> really is a difference.
>

I know. I've employed both. The one I sacked was a computer scientist.

>> If that means engineering a 1501cc engine in, instead of 1500cc, because
>> the difficulties of achieving the prefect Roundness of Wheels is
>> absolute, then that's what we do.
>>
>> PHP is that route for simple web based apps. For anything else its
>> largely not that useful.
>>
>> Accept it, and move on..
>>
>
> Take your own advice, son; I accepted it for many years, and I have
> moved on.


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180332 is a reply to message #180325] Tue, 05 February 2013 12:16 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 05/02/13 09:22, crankypuss wrote:
> On 02/04/2013 09:35 AM, Jonathan N. Little wrote:
>> The Natural Philosopher wrote:
>>> On 04/02/13 16:15, crankypuss wrote:
>>>> On 02/04/2013 09:06 AM, Jonathan N. Little wrote:
>>>>
>>>> <mostly, snipped>
>>>>
>>>> > To emulate what happens in the desktop environment on the web is
>>>> > not so
>>>> > easy.
>>>>
>>>> The world is in a sad state when people prefer code that was written
>>>> easy over code that was written right.
>>>
>>> well there you go. You had better start from scratch and design your own
>>> hardware then. And your own language and your own operating system.
>>>
>>> Engineering is never about Getting Things Right: only mathematicians
>>> have that luxury. For people in the Real World (TM) its a question of
>>> getting things good enough for purpose, by the shortest and least hard
>>> route.
>>>
>>> If that means engineering a 1501cc engine in, instead of 1500cc, because
>>> the difficulties of achieving the prefect Roundness of Wheels is
>>> absolute, then that's what we do.
>>>
>>> PHP is that route for simple web based apps. For anything else its
>>> largely not that useful.
>>>
>>> Accept it, and move on..
>>>
>>
>> IOW the right tool for the right job.
>>
>
> PHP is hardly "the right tool" for any job, but it can be used for more
> than simple web based apps.

"With additional hardware and software, you *can* use an Apple II to
send a man to the moon"

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180333 is a reply to message #180330] Tue, 05 February 2013 12:41 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
Tim Streater, 2013-02-05 11:31:

> In article <keqj7f21khr(at)news3(dot)newsguy(dot)com>,
> crankypuss <noemail(at)noemail(dot)invalid> wrote:
>
>> ... Jason Betts seems to be using PHP for desktop applications but
>> through a java front-end? And perhaps Tim Streater is doing something
>> with it too.
>
> My desktop app uses JavaScript to present to the user, and PHP for
> backend stuff such as writing to SQLite databases, communicating over
> the net, writing log files, and other functions that the app needs. I
> use apache/ajax to communicate between the two. As I said before -
> heavy? Sure, but who cares.

I would care if i would need all that stuff just to be able to run an
application. It's not only about processing power or memory consumption
- but also about security and stability. The more components you put
together the more likely something can go wrong.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180334 is a reply to message #180302] Tue, 05 February 2013 12:42 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
crankypuss, 2013-02-04 10:55:

> On 02/04/2013 12:38 AM, Arno Welzel wrote:
>> crankypuss, 2013-02-02 21:27:
>>
>> [...]
>>> Is there a forum where the other folks (presuming there are any) who
>>> have been writing applications in PHP hang out? Don't say "yeah dummy,
>>> go to comp.lang.python" please, my homor quotient is maxed out for
>>> today. <g>
>>
>> Maybe <http://gtk.php.net/> is what you are looking for.
>>
>> But this is still very limited - i recommend to learn C++ and how to use
>> Qt. See <http://qt-project.org/downloads>.
>>
>> Qt also provides "Qt Creator" - a nice IDE including GUI designer,
>> debugger etc.. (see
>> <http://qt-project.org/wiki/Category:Tools::QtCreator>).
>>
>>
>
> Go to a line-mode login and try to run one of your Qt applications.

< http://doc.qt.digia.com/solutions/4/qtsingleapplication/qtsinglecoreapplica tion-example-console.html>


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Re: anyone else writing Linux (or cross-system) applications in PHP? [message #180335 is a reply to message #180299] Tue, 05 February 2013 12:49 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
crankypuss, 2013-02-04 10:32:

[...]
> The loop is basically the same except that its "top" gets rolled around
> to the middle and given a different name. For a desktop-app the "top"
> is the guy hitting the enter key or clicking the mouse or whatever,
> that's the top of the "message loop". For a web-app the browser
> recognizes a link-click and sends an http request. It's the same thing
> unless you get fixated on the details to the point where you can't see
> the forest. Look an X Windows application in enough detail and you'll
> see the same basic process with a different protocol used between the
> client and the server. Steak or hamburger, it's all beef.

If you're a hammer every problem is just a nail...


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Pages (3): [ «    1  2  3    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with readdir and ssh2
Next Topic: web designers and developers
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 12:24:15 GMT 2024

Total time taken to generate the page: 0.03858 seconds