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

Home » Imported messages » comp.lang.php » query: how many use PHP for linux scripts
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
query: how many use PHP for linux scripts [message #185862] Tue, 13 May 2014 04:17 Go to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
What kinds of linux scripts do you write in PHP? Are they applications,
utilities, other? Are they command-line or do they have fullscreen
interfaces?
Re: query: how many use PHP for linux scripts [message #185863 is a reply to message #185862] Tue, 13 May 2014 04:37 Go to previous messageGo to next message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Am 13.05.2014 10:17, schrieb crankypuss:

> What kinds of linux scripts do you write in PHP? Are they applications,

None. I use shell scripts.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
Re: query: how many use PHP for linux scripts [message #185864 is a reply to message #185862] Tue, 13 May 2014 06:52 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
In article <lkskem$ssl$1(at)dont-email(dot)me>, crankypuss
<crankypuss(at)nomail(dot)invalid> wrote:

> What kinds of linux scripts do you write in PHP? Are they applications,
> utilities, other? Are they command-line or do they have fullscreen
> interfaces?

None. I write them for OS X.

--
"People don't buy Microsoft for quality, they buy it for compatibility
with what Bob in accounting bought last year. Trace it back - they buy
Microsoft because the IBM Selectric didn't suck much" - P Seebach, afc
Re: query: how many use PHP for linux scripts [message #185865 is a reply to message #185862] Tue, 13 May 2014 09:28 Go to previous messageGo to next message
Auric__ is currently offline  Auric__
Messages: 1
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
crankypuss wrote:

> What kinds of linux scripts do you write in PHP? Are they applications,
> utilities, other? Are they command-line or do they have fullscreen
> interfaces?

My only PHP scripts are for the www.

--
No main() No Gain!
Re: query: how many use PHP for linux scripts [message #185866 is a reply to message #185865] Tue, 13 May 2014 10:29 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
add to buddy list
ignore all messages by this user
Auric__ wrote:
> crankypuss wrote:
>
>> What kinds of linux scripts do you write in PHP? Are they applications,
>> utilities, other? Are they command-line or do they have fullscreen
>> interfaces?
>
> My only PHP scripts are for the www.
>

Although you can CLI PHP for system scripts yes historically WWW is its
origin. Shell, Python, and Perl are typically used for "linux" scripts.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: query: how many use PHP for linux scripts [message #185867 is a reply to message #185862] Tue, 13 May 2014 11:00 Go to previous messageGo to next message
Collin Pruitt is currently offline  Collin Pruitt
Messages: 1
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On 5/13/2014 4:17 AM, crankypuss wrote:
> What kinds of linux scripts do you write in PHP? Are they applications,
> utilities, other? Are they command-line or do they have fullscreen
> interfaces?

I've never used PHP for actual scripting outside of CGI. If I have to
write a script, I almost always use either Perl or shell script.

--
Collin Pruitt http://binenv.com/
"With the first link, the chain is forged. The first speech censored,
the first thought forbidden, the first freedom denied, chains us all
irrevocably." - Jean-Luc Picard, TNG "The Drumhead"
Re: query: how many use PHP for linux scripts [message #185876 is a reply to message #185867] Tue, 13 May 2014 12:05 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 09:00 AM, Collin Pruitt wrote:
> On 5/13/2014 4:17 AM, crankypuss wrote:
>> What kinds of linux scripts do you write in PHP? Are they applications,
>> utilities, other? Are they command-line or do they have fullscreen
>> interfaces?
>
> I've never used PHP for actual scripting outside of CGI. If I have to
> write a script, I almost always use either Perl or shell script.
>

When you write a "script", what is it? Command-line only, fullscreen
interface, simple abbreviation of some common task, fullblown
applications, what?
Re: query: how many use PHP for linux scripts [message #185877 is a reply to message #185862] Tue, 13 May 2014 12:26 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
add to buddy list
ignore all messages by this user
On 13/05/14 09:17, crankypuss wrote:
> What kinds of linux scripts do you write in PHP? Are they applications,
> utilities, other? Are they command-line or do they have fullscreen
> interfaces?
None. I use C.


--
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: query: how many use PHP for linux scripts [message #185878 is a reply to message #185876] Tue, 13 May 2014 12:32 Go to previous messageGo to next message
Johnny is currently offline  Johnny
Messages: 2
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 11:05 AM, crankypuss wrote:
> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>> On 5/13/2014 4:17 AM, crankypuss wrote:
>>> What kinds of linux scripts do you write in PHP? Are they applications,
>>> utilities, other? Are they command-line or do they have fullscreen
>>> interfaces?
>>
>> I've never used PHP for actual scripting outside of CGI. If I have to
>> write a script, I almost always use either Perl or shell script.
>>
>
> When you write a "script", what is it? Command-line only, fullscreen
> interface, simple abbreviation of some common task, fullblown
> applications, what?

Linux Shell Scripting Tutorial v1.05r3
A Beginner's handbook

http://www.freeos.com/guides/lsst/
Re: query: how many use PHP for linux scripts [message #185879 is a reply to message #185878] Tue, 13 May 2014 14:09 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
add to buddy list
ignore all messages by this user
On 13/05/14 17:32, Johnny wrote:
> On 05/13/2014 11:05 AM, crankypuss wrote:
>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> What kinds of linux scripts do you write in PHP? Are they
>>>> applications,
>>>> utilities, other? Are they command-line or do they have fullscreen
>>>> interfaces?
>>>
>>> I've never used PHP for actual scripting outside of CGI. If I have to
>>> write a script, I almost always use either Perl or shell script.
>>>
>>
>> When you write a "script", what is it? Command-line only, fullscreen
>> interface, simple abbreviation of some common task, fullblown
>> applications, what?
>
> Linux Shell Scripting Tutorial v1.05r3
> A Beginner's handbook
>
> http://www.freeos.com/guides/lsst/
Prezactly. PHP is optimised for HTML work really.

There are far better languages to do other stuff in, though I have to
say I dislike scripting langauges really and prefer to use C wherever
possible.

If I HAD to pick an interpreted GP language it would probably be Python
though I have never written a single line of it..


--
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: query: how many use PHP for linux scripts [message #185880 is a reply to message #185878] Tue, 13 May 2014 14:20 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 10:32 AM, Johnny wrote:
> On 05/13/2014 11:05 AM, crankypuss wrote:
>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> What kinds of linux scripts do you write in PHP? Are they
>>>> applications,
>>>> utilities, other? Are they command-line or do they have fullscreen
>>>> interfaces?
>>>
>>> I've never used PHP for actual scripting outside of CGI. If I have to
>>> write a script, I almost always use either Perl or shell script.
>>>
>>
>> When you write a "script", what is it? Command-line only, fullscreen
>> interface, simple abbreviation of some common task, fullblown
>> applications, what?
>
> Linux Shell Scripting Tutorial v1.05r3
> A Beginner's handbook
>
> http://www.freeos.com/guides/lsst/

Do you always post irrelevancies, or is this a special occasion; nevermind.
Re: query: how many use PHP for linux scripts [message #185881 is a reply to message #185880] Tue, 13 May 2014 14:35 Go to previous messageGo to next message
Johnny is currently offline  Johnny
Messages: 2
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 01:20 PM, crankypuss wrote:
> On 05/13/2014 10:32 AM, Johnny wrote:
>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> > What kinds of linux scripts do you write in PHP? Are they
>>>> > applications,
>>>> > utilities, other? Are they command-line or do they have fullscreen
>>>> > interfaces?
>>>>
>>>> I've never used PHP for actual scripting outside of CGI. If I have to
>>>> write a script, I almost always use either Perl or shell script.
>>>>
>>>
>>> When you write a "script", what is it? Command-line only, fullscreen
>>> interface, simple abbreviation of some common task, fullblown
>>> applications, what?
>>
>> Linux Shell Scripting Tutorial v1.05r3
>> A Beginner's handbook
>>
>> http://www.freeos.com/guides/lsst/
>
> Do you always post irrelevancies, or is this a special occasion; nevermind.

I thought you were ignorant, and I was trying to help. Now I see you
are stupid, and can't be helped.
Re: query: how many use PHP for linux scripts [message #185883 is a reply to message #185879] Tue, 13 May 2014 16:35 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
<tnp(at)invalid(dot)invalid> wrote:

> On 13/05/14 17:32, Johnny wrote:

>> Linux Shell Scripting Tutorial v1.05r3
>> A Beginner's handbook
>>
>> http://www.freeos.com/guides/lsst/
> Prezactly. PHP is optimised for HTML work really.

Who cares.

> There are far better languages to do other stuff in, though I have to
> say I dislike scripting langauges really and prefer to use C wherever
> possible.

I can't be arsed to fiddle around with C these days. Too much faffing
around with declarations - and no string handling to speak of either.

Non-issues in 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: query: how many use PHP for linux scripts [message #185884 is a reply to message #185879] Tue, 13 May 2014 17:23 Go to previous messageGo to next message
Allodoxaphobia is currently offline  Allodoxaphobia
Messages: 21
Registered: September 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On Tue, 13 May 2014 19:09:14 +0100, The Natural Philosopher wrote:
> On 13/05/14 17:32, Johnny wrote:
>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> > What kinds of linux scripts do you write in PHP? Are they
>>>> > applications, utilities, other? Are they command-line or
>>>> > do they have fullscreen interfaces?
>>>>
>>>> I've never used PHP for actual scripting outside of CGI. If I have to
>>>> write a script, I almost always use either Perl or shell script.
>>>
>>> When you write a "script", what is it? Command-line only, fullscreen
>>> interface, simple abbreviation of some common task, fullblown
>>> applications, what?
>>
>> Linux Shell Scripting Tutorial v1.05r3
>> A Beginner's handbook
>>
>> http://www.freeos.com/guides/lsst/
> Prezactly. PHP is optimised for HTML work really.
>
> There are far better languages to do other stuff in, though I have to
> say I dislike scripting langauges really and prefer to use C wherever
> possible.
>
> If I HAD to pick an interpreted GP language it would probably be Python
> though I have never written a single line of it..

Horses. Courses. REXX

Jonesy
Re: query: how many use PHP for linux scripts [message #185885 is a reply to message #185883] Tue, 13 May 2014 17:10 Go to previous messageGo to next message
JEDIDIAH is currently offline  JEDIDIAH
Messages: 4
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
On 2014-05-13, Tim Streater <timstreater(at)greenbee(dot)net> wrote:
> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
> <tnp(at)invalid(dot)invalid> wrote:
>
>> On 13/05/14 17:32, Johnny wrote:
>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>> Prezactly. PHP is optimised for HTML work really.
>
> Who cares.
>
>> There are far better languages to do other stuff in, though I have to
>> say I dislike scripting langauges really and prefer to use C wherever
>> possible.
>
> I can't be arsed to fiddle around with C these days. Too much faffing
> around with declarations - and no string handling to speak of either.
>
> Non-issues in PHP.

PHP is fine if you're working with the web, kind of pointless otherwise.

--
Apple: Because the individual is not statistically meaningful. |||
/ | \
Re: query: how many use PHP for linux scripts [message #185886 is a reply to message #185885] Tue, 13 May 2014 18:03 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
In article <slrnln52i9(dot)nki(dot)jedi(at)nomad(dot)mishnet>, JEDIDIAH
<jedi(at)nomad(dot)mishnet> wrote:

> On 2014-05-13, Tim Streater <timstreater(at)greenbee(dot)net> wrote:
>> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
>> <tnp(at)invalid(dot)invalid> wrote:
>>
>>> On 13/05/14 17:32, Johnny wrote:
>>
>>>> Linux Shell Scripting Tutorial v1.05r3
>>>> A Beginner's handbook
>>>>
>>>> http://www.freeos.com/guides/lsst/
>>> Prezactly. PHP is optimised for HTML work really.
>>
>> Who cares.
>>
>>> There are far better languages to do other stuff in, though I have to
>>> say I dislike scripting langauges really and prefer to use C wherever
>>> possible.
>>
>> I can't be arsed to fiddle around with C these days. Too much faffing
>> around with declarations - and no string handling to speak of either.
>>
>> Non-issues in PHP.
>
> PHP is fine if you're working with the web, kind of pointless otherwise.

Depends what you're doing. My app has 74 PHP scripts, some of which do
things like communicate with remote hosts, rotate logs, move files
around, read/write a variety of SQLite databases. Doubtless all this
could be done in C, but why should I bother.

--
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
Re: query: how many use PHP for linux scripts [message #185887 is a reply to message #185881] Tue, 13 May 2014 19:04 Go to previous messageGo to next message
Mike Yetto is currently offline  Mike Yetto
Messages: 4
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Be it known Johnny <johnny(at)invalid(dot)net> has declared...
> On 05/13/2014 01:20 PM, crankypuss wrote:
>> On 05/13/2014 10:32 AM, Johnny wrote:
>>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> > On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> >> What kinds of linux scripts do you write in PHP? Are they
>>>> >> applications,
>>>> >> utilities, other? Are they command-line or do they have fullscreen
>>>> >> interfaces?
>>>> >
>>>> > I've never used PHP for actual scripting outside of CGI. If I have to
>>>> > write a script, I almost always use either Perl or shell script.
>>>> >
>>>>
>>>> When you write a "script", what is it? Command-line only, fullscreen
>>>> interface, simple abbreviation of some common task, fullblown
>>>> applications, what?
>>>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>>
>> Do you always post irrelevancies, or is this a special occasion; nevermind.

> I thought you were ignorant, and I was trying to help. Now I see you
> are stupid, and can't be helped.

No, he's just cranky.

Mike "for various values of _just_" Yetto
--
'We are each entitled to our own opinion, but no one is entitled
to his own facts.'
- Daniel Patrick Moynihan
Re: query: how many use PHP for linux scripts [message #185888 is a reply to message #185884] Tue, 13 May 2014 19:02 Go to previous messageGo to next message
Mike Yetto is currently offline  Mike Yetto
Messages: 4
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Be it known Allodoxaphobia <knock_yourself_out(at)example(dot)net> has declared...
> On Tue, 13 May 2014 19:09:14 +0100, The Natural Philosopher wrote:
>> On 13/05/14 17:32, Johnny wrote:
>>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> > On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> >> What kinds of linux scripts do you write in PHP? Are they
>>>> >> applications, utilities, other? Are they command-line or
>>>> >> do they have fullscreen interfaces?
>>>> >
>>>> > I've never used PHP for actual scripting outside of CGI. If I have to
>>>> > write a script, I almost always use either Perl or shell script.
>>>>
>>>> When you write a "script", what is it? Command-line only, fullscreen
>>>> interface, simple abbreviation of some common task, fullblown
>>>> applications, what?
>>>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>> Prezactly. PHP is optimised for HTML work really.
>>
>> There are far better languages to do other stuff in, though I have to
>> say I dislike scripting langauges really and prefer to use C wherever
>> possible.
>>
>> If I HAD to pick an interpreted GP language it would probably be Python
>> though I have never written a single line of it..

> Horses. Courses. REXX

In VM/CMS and MVS I use REXX and for Linux I prefer shell
scripting or perl. As is indicated by its name (a recursive
acronym - PHP Hypertext Preprocessor) it's intended use is web
pages.

Mike "mostly hand signals for the dog" Yetto
--
"Give a man a fish, and you`ll feed him for a day. Teach a man to
fish, and he`ll buy a funny hat. Talk to a hungry man about fish,
and you`re a consultant."
- Scott Adams
Re: query: how many use PHP for linux scripts [message #185889 is a reply to message #185886] Tue, 13 May 2014 19:55 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 5/13/2014 6:03 PM, Tim Streater wrote:
> In article <slrnln52i9(dot)nki(dot)jedi(at)nomad(dot)mishnet>, JEDIDIAH
> <jedi(at)nomad(dot)mishnet> wrote:
>
>> On 2014-05-13, Tim Streater <timstreater(at)greenbee(dot)net> wrote:
>>> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
>>> <tnp(at)invalid(dot)invalid> wrote:
>>>
>>>> On 13/05/14 17:32, Johnny wrote:
>>>
>>>> > Linux Shell Scripting Tutorial v1.05r3
>>>> > A Beginner's handbook
>>>> >
>>>> > http://www.freeos.com/guides/lsst/
>>>> Prezactly. PHP is optimised for HTML work really.
>>>
>>> Who cares.
>>>
>>>> There are far better languages to do other stuff in, though I have
>> to >> say I dislike scripting langauges really and prefer to use C
>> wherever >> possible.
>>>
>>> I can't be arsed to fiddle around with C these days. Too much faffing
>>> around with declarations - and no string handling to speak of either.
>>>
>>> Non-issues in PHP.
>>
>> PHP is fine if you're working with the web, kind of pointless
>> otherwise.
>
> Depends what you're doing. My app has 74 PHP scripts, some of which do
> things like communicate with remote hosts, rotate logs, move files
> around, read/write a variety of SQLite databases. Doubtless all this
> could be done in C, but why should I bother.
>

I agree, Tim. I have a number of scripts which do everything from
backing up files and databases to parsing email messages and updating
spam filters.

Sure, I *could* do it in C - but why bother? And I *could* do it in
Linux scripts - but then I'd just have to redo them for Windblows.

Of course, I could use Perl or other OS-agnostic scripting languages,
but why bother?

PHP is great for a lot of things. People who think it's only good for
web work are not aware of all of the possibilities.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: query: how many use PHP for linux scripts [message #185890 is a reply to message #185889] Tue, 13 May 2014 20:26 Go to previous messageGo to next message
Chris Ahlstrom is currently offline  Chris Ahlstrom
Messages: 3
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Jerry Stuckle wrote this copyrighted missive and expects royalties:

> On 5/13/2014 6:03 PM, Tim Streater wrote:
>>
>> Depends what you're doing. My app has 74 PHP scripts, some of which do
>> things like communicate with remote hosts, rotate logs, move files
>> around, read/write a variety of SQLite databases. Doubtless all this
>> could be done in C, but why should I bother.
>
> I agree, Tim. I have a number of scripts which do everything from
> backing up files and databases to parsing email messages and updating
> spam filters.
>
> Sure, I *could* do it in C - but why bother? And I *could* do it in
> Linux scripts - but then I'd just have to redo them for Windblows.
>
> Of course, I could use Perl or other OS-agnostic scripting languages,
> but why bother?
>
> PHP is great for a lot of things. People who think it's only good for
> web work are not aware of all of the possibilities.

People figure out the language that best fits their personalities, and run
with it.

I don't care if it is C, Perl, Erlang, Haskell, brainfuck, PHP, Python,
shell script, Java, Ruby, C#, or C++. By now they overlap about
70% to 99% in functionality, if you count the supporting libraries.

Use what makes *you* feel productive. For me, that is currently C++, one of
the most flexible languages ever.

--
Eating chocolate is like being in love without the aggravation.
Re: query: how many use PHP for linux scripts [message #185891 is a reply to message #185890] Tue, 13 May 2014 20:37 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 5/13/2014 8:26 PM, Chris Ahlstrom wrote:
> Jerry Stuckle wrote this copyrighted missive and expects royalties:
>
>> On 5/13/2014 6:03 PM, Tim Streater wrote:
>>>
>>> Depends what you're doing. My app has 74 PHP scripts, some of which do
>>> things like communicate with remote hosts, rotate logs, move files
>>> around, read/write a variety of SQLite databases. Doubtless all this
>>> could be done in C, but why should I bother.
>>
>> I agree, Tim. I have a number of scripts which do everything from
>> backing up files and databases to parsing email messages and updating
>> spam filters.
>>
>> Sure, I *could* do it in C - but why bother? And I *could* do it in
>> Linux scripts - but then I'd just have to redo them for Windblows.
>>
>> Of course, I could use Perl or other OS-agnostic scripting languages,
>> but why bother?
>>
>> PHP is great for a lot of things. People who think it's only good for
>> web work are not aware of all of the possibilities.
>
> People figure out the language that best fits their personalities, and run
> with it.
>
> I don't care if it is C, Perl, Erlang, Haskell, brainfuck, PHP, Python,
> shell script, Java, Ruby, C#, or C++. By now they overlap about
> 70% to 99% in functionality, if you count the supporting libraries.
>
> Use what makes *you* feel productive. For me, that is currently C++, one of
> the most flexible languages ever.
>

I agree it depends on the situation. But the language needs to be what
the JOB requires - not what makes you feel productive.

Along with PHP, I also do C (almost 30 years), c++ (25 years), Java (10
years) and other languages. The language I use is completely dependent
on the job.

For instance - C++ is nice, but doesn't work well with Linux Device
Drivers. You're better off using C for that. And it can't be as easily
modified and changed as PHP, which works great as a scripting language.
I would never, for instance, use C++ to do the SPAM email parsing and
updating; PHP has tools which making parsing emails easy, unlike C++.
But at the same time I would never try to write a GUI program in PHP.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: query: how many use PHP for linux scripts [message #185894 is a reply to message #185883] Tue, 13 May 2014 23:42 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
add to buddy list
ignore all messages by this user
On 13/05/14 21:35, Tim Streater wrote:
> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
> <tnp(at)invalid(dot)invalid> wrote:
>
>> On 13/05/14 17:32, Johnny wrote:
>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>> Prezactly. PHP is optimised for HTML work really.
>
> Who cares.
>
>> There are far better languages to do other stuff in, though I have to
>> say I dislike scripting langauges really and prefer to use C wherever
>> possible.
>
> I can't be arsed to fiddle around with C these days. Too much faffing
> around with declarations - and no string handling to speak of either.
>
> Non-issues in PHP.
>
string handling is the chief reason I prefer C..


--
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: query: how many use PHP for linux scripts [message #185897 is a reply to message #185883] Wed, 14 May 2014 04:36 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 02:35 PM, Tim Streater wrote:
> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
> <tnp(at)invalid(dot)invalid> wrote:
>
>> On 13/05/14 17:32, Johnny wrote:
>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>> Prezactly. PHP is optimised for HTML work really.
>
> Who cares.

I'm not sure what the claim that "PHP is optimised for HTML work" is
supposed to imply, but it works quite well for writing "CLI"
applications. I consider it a general-purpose programming language and
the fact that it fits nicely into the web environment is just an added
bonus.

>> There are far better languages to do other stuff in, though I have to
>> say I dislike scripting langauges really and prefer to use C wherever
>> possible.

How to say this inoffensively... I find it amusing that you are
basically saying that there are better languages than PHP but they
mostly suck in one fashion or another. <G>

(I suppose that I agree with that sentiment fwiw, but I have too large a
codebase of existing PHP functions and applications to drop it all and
go start writing C again after not having looked at C or C++ since about
2000.)

> I can't be arsed to fiddle around with C these days. Too much faffing
> around with declarations - and no string handling to speak of either.
>
> Non-issues in PHP.

Agree. I started working in PHP somewhere around 2002. I chose PHP
because at the time I needed to build a website and PHP was readily
available on the hosting system. That I had a previous experience with
Rexx and there are many similarities between PHP and Rexx helped make me
comfortable with PHP, despite the fact that in some ways PHP is "a bit
less than pretty". By the time that I shut down the business that
necessitated the website, and shortly after that walked away from
Windows to begin using linux, I had accumulated a sizable library of
functions and application-components written in PHP.

When I took a look at the level of crudity implemented in the "default"
linux scripting language and found that a proper shebang will allow one
to use PHP for CLI applications, using my existing codebase for "linux
scripting" became a done deal.

I find myself somewhat shocked at the level of hidebound conformity that
appears to exist in the linux community. There is so much that can be
done with PHP that bash really can't compete unless you set the rules up
to favor it heavily. The default linux scripting language is, however,
deeply embedded in many aspects of every linux distro I've come across,
so I can understand to a certain degree the desire to avoid looking at
anything better.

Still, since I can use PHP as my own linux scripting language, and use
it to write fullblown applications, and have a bunch of PHP code that
works fairly decently, I continue in that direction.

Apparently without much company, as I read the replies here. <g>
Re: query: how many use PHP for linux scripts [message #185898 is a reply to message #185885] Wed, 14 May 2014 04:44 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 03:10 PM, JEDIDIAH wrote:
> PHP is fine if you're working with the web, kind of pointless otherwise.

I find that to be absolutely not the case.
Re: query: how many use PHP for linux scripts [message #185899 is a reply to message #185886] Wed, 14 May 2014 05:00 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 04:03 PM, Tim Streater wrote:
> In article <slrnln52i9(dot)nki(dot)jedi(at)nomad(dot)mishnet>, JEDIDIAH
> <jedi(at)nomad(dot)mishnet> wrote:

<snip>

>> PHP is fine if you're working with the web, kind of pointless
>> otherwise.
>
> Depends what you're doing. My app has 74 PHP scripts, some of which do
> things like communicate with remote hosts, rotate logs, move files
> around, read/write a variety of SQLite databases. Doubtless all this
> could be done in C, but why should I bother.

On my netbook (which runs only linux) I have a number of applications
that would be difficult to implement using the default scripting
language because of its lack of facilities.

For example, there is an upstart exit that runs during boot, checks to
see if I've updated the kernel since it was last run, then modifies the
Ubuntu logon graphic to include information like the label of the boot
device, install date, and linux kernel version. I find it nice, given
that I could have booted from any of several production or test
partitions, to see as I am logging in that I've done what I intended.

I've a nautilus extension that provides a bunch of functionality that is
in use constantly. I've a "boot setup" utility that will do the
configuration necessary to set up grub2 or extlinux as the boot program.
I've a fullscreen backup utility that gets run at least once daily and
enables me to perform a backup using either rsync or tar by entering
fewer keystrokes than typing either command would require (and which
lets me do that even when I'm half asleep).

And some other stuff that would be "unmanageable" if I'd attempted to
write it using the default scripting language, even if I were expert in
using that crude "language", which I admittedly avoid becoming.

The idea that PHP is "pointless" unless one is working with the web is
one that I cannot agree with.
Re: query: how many use PHP for linux scripts [message #185900 is a reply to message #185897] Wed, 14 May 2014 05:09 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
add to buddy list
ignore all messages by this user
On 14/05/14 09:36, crankypuss wrote:
> Still, since I can use PHP as my own linux scripting language, and use
> it to write fullblown applications, and have a bunch of PHP code that
> works fairly decently, I continue in that direction.
>
> Apparently without much company, as I read the replies here. <g>

If the first language you learnt in Linux was PHP, then you are likely
to actually be more faimliar in that environment.

MOST linux scripts are not shell these days. python and perl are more
common, which means you have to carry the overheadf of all THOSE
libraries as well.

I cam me to UNIX when there was only shell or C. or AWK :-)


Since I was at that time a full time C programmer, I looked askance at
people constructing massive shell scripts that took enormous amounts of
CPU to run and were extremely hard to maintain. I generally found that
beyond the more simple, C was in fact faster to write and easier to
maintain and ran 100-1000 time faster.


PHP is something I use simply because it is a doddle to integrate with
websites. Nevertheless I think its a pretty poor language.

I never use it outside a web context because frankly C is to my mind
better, and neater and more in line with the way the operating system is
itself constructed.

Having got used to dong my own string manipulations, my own memory
management and my own library construction over many years of writing
low level code for non UNIX systems in C, the advantages if knowing
exactly what you are doing completely outweigh the disadvantages of not
having it done for you.


The context and scope of my variables are what I declare them to be, not
randomly what the PHP designer thought would be handy.

MY variables are static or stack based ad dont need memory management,
and if I do use malloc() I know how to free() and when to do it.

If I want the third character out if the string str, its simply str[2];

I don't need to invoke a PHP function to get (a copy of) it.

And if it happens to be a hexadecimal code, I dont need to think about
whether or not its ascii, UTF or an arbitrary bit pattern. It is after
all 'just a byte'

This isn't in the end anything more than saying that what you understand
best is often the best for you.

Accept its a personal thing, and don't try to justify it in objective
terms, when its really subjective.



--
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: query: how many use PHP for linux scripts [message #185901 is a reply to message #185898] Wed, 14 May 2014 05:17 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
add to buddy list
ignore all messages by this user
On 14/05/14 09:44, crankypuss wrote:
> On 05/13/2014 03:10 PM, JEDIDIAH wrote:
>> PHP is fine if you're working with the web, kind of pointless
>> otherwise.
>
> I find that to be absolutely not the case.

but others don't. They take a personal and opposite view.

PHP CAN be used for other things. But most of us were dong other things
perfectly well before we discovered PHP and for us PHP only has one
advantage: its widely supported as a web scripting language.

And its HUGE advantage over - say C - is the ability to slip in and out
of pure HTML with a ?> <? statement.

Apart from that its relatively crap.

IIRC C++ has some similar features as has PERL.

But the support for other handy stuff is not as good.

*shrug*.

in teh end its a minir detail tha wins te day.

C has the best interface to the operating system, PHP has the best user
interface to HTML and if I was writing a native app for linux I'd
probably use C++ as the interface to x windwows is easier that way.

as far as scripts go, well its a totally undemanding application. Any
crud will work. Even PERL.


--
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: query: how many use PHP for linux scripts [message #185902 is a reply to message #185891] Wed, 14 May 2014 05:18 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 06:37 PM, Jerry Stuckle wrote:
> On 5/13/2014 8:26 PM, Chris Ahlstrom wrote:
>> Jerry Stuckle wrote this copyrighted missive and expects royalties:
>>
>>> On 5/13/2014 6:03 PM, Tim Streater wrote:
>>>>
>>>> Depends what you're doing. My app has 74 PHP scripts, some of which do
>>>> things like communicate with remote hosts, rotate logs, move files
>>>> around, read/write a variety of SQLite databases. Doubtless all this
>>>> could be done in C, but why should I bother.
>>>
>>> I agree, Tim. I have a number of scripts which do everything from
>>> backing up files and databases to parsing email messages and updating
>>> spam filters.
>>>
>>> Sure, I *could* do it in C - but why bother? And I *could* do it in
>>> Linux scripts - but then I'd just have to redo them for Windblows.
>>>
>>> Of course, I could use Perl or other OS-agnostic scripting languages,
>>> but why bother?
>>>
>>> PHP is great for a lot of things. People who think it's only good for
>>> web work are not aware of all of the possibilities.
>>
>> People figure out the language that best fits their personalities, and
>> run
>> with it.
>>
>> I don't care if it is C, Perl, Erlang, Haskell, brainfuck, PHP, Python,
>> shell script, Java, Ruby, C#, or C++. By now they overlap about
>> 70% to 99% in functionality, if you count the supporting libraries.
>>
>> Use what makes *you* feel productive. For me, that is currently C++,
>> one of
>> the most flexible languages ever.
>>
>
> I agree it depends on the situation. But the language needs to be what
> the JOB requires - not what makes you feel productive.

Yes, but in addition to a language's being capable of doing the job,
it's also convenient not to be unproductive. <g> Both aspects seem to
be necessary, capability and "language ergonomics".

> Along with PHP, I also do C (almost 30 years), c++ (25 years), Java (10
> years) and other languages. The language I use is completely dependent
> on the job.
>
> For instance - C++ is nice, but doesn't work well with Linux Device
> Drivers. You're better off using C for that. And it can't be as easily
> modified and changed as PHP, which works great as a scripting language.
> I would never, for instance, use C++ to do the SPAM email parsing and
> updating; PHP has tools which making parsing emails easy, unlike C++.
> But at the same time I would never try to write a GUI program in PHP.

I have a number of fullscreen text-based applications written in PHP,
but if it came down to having to draw every pixel I'd probably want to
brush up on C or C++ because those are the languages for which
pixel-based GUI support libraries exist (not that I'm much impressed
with the results of using those libraries as exhibited by gnome2).

Most of the whizbang flashies that are implemented as parts of "GUI"
applications are unnecessary anyway if there is adequate support for a
good menu system (which mostly, there isn't). And the idea of using a
mouse for everything by dragging this or that icon from hither to yon,
or double clicking on an icon, is an oversimplification imo that has
caused grievous damage to the computing world as a whole. At the same
time the ability to click on a link in html is one of its great
benefits, and flyovers can be very helpful.

All that's mostly opinion, and only mentioned because you said you'd
never attempt a GUI application in PHP, and I wanted to point out that
it isn't so much because of PHP itself that your choice there is
sensible (though drawing individual pixels in an interpreted language is
somewhat questionable), but because there's simply no good support for
writing GUI applications in PHP.

That's as it is, but there's no law of the universe which prohibits such
support from being developed for PHP or some PHP-derivative.
Re: query: how many use PHP for linux scripts [message #185903 is a reply to message #185894] Wed, 14 May 2014 05:21 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 09:42 PM, The Natural Philosopher wrote:
> On 13/05/14 21:35, Tim Streater wrote:
>> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
>> <tnp(at)invalid(dot)invalid> wrote:
>>
>>> On 13/05/14 17:32, Johnny wrote:
>>
>>>> Linux Shell Scripting Tutorial v1.05r3
>>>> A Beginner's handbook
>>>>
>>>> http://www.freeos.com/guides/lsst/
>>> Prezactly. PHP is optimised for HTML work really.
>>
>> Who cares.
>>
>>> There are far better languages to do other stuff in, though I have to
>>> say I dislike scripting langauges really and prefer to use C wherever
>>> possible.
>>
>> I can't be arsed to fiddle around with C these days. Too much faffing
>> around with declarations - and no string handling to speak of either.
>>
>> Non-issues in PHP.
>>
> string handling is the chief reason I prefer C..
>
>

Is that because you've built your own library of string handling
routines for C, or because you like working with all those
null-terminated strings supported by stdlib?

Personally I think null-terminated strings are only useful for defining
some kinds of constant data, but even there it's limiting.
Re: query: how many use PHP for linux scripts [message #185904 is a reply to message #185888] Wed, 14 May 2014 05:24 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 05:02 PM, Mike Yetto wrote:
> Be it known Allodoxaphobia <knock_yourself_out(at)example(dot)net> has declared...
>> On Tue, 13 May 2014 19:09:14 +0100, The Natural Philosopher wrote:
>>> On 13/05/14 17:32, Johnny wrote:
>>>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>>> > On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> >> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> >>> What kinds of linux scripts do you write in PHP? Are they
>>>> >>> applications, utilities, other? Are they command-line or
>>>> >>> do they have fullscreen interfaces?
>>>> >>
>>>> >> I've never used PHP for actual scripting outside of CGI. If I have to
>>>> >> write a script, I almost always use either Perl or shell script.
>>>> >
>>>> > When you write a "script", what is it? Command-line only, fullscreen
>>>> > interface, simple abbreviation of some common task, fullblown
>>>> > applications, what?
>>>>
>>>> Linux Shell Scripting Tutorial v1.05r3
>>>> A Beginner's handbook
>>>>
>>>> http://www.freeos.com/guides/lsst/
>>> Prezactly. PHP is optimised for HTML work really.
>>>
>>> There are far better languages to do other stuff in, though I have to
>>> say I dislike scripting langauges really and prefer to use C wherever
>>> possible.
>>>
>>> If I HAD to pick an interpreted GP language it would probably be Python
>>> though I have never written a single line of it..
>
>> Horses. Courses. REXX
>
> In VM/CMS and MVS I use REXX and for Linux I prefer shell
> scripting or perl. As is indicated by its name (a recursive
> acronym - PHP Hypertext Preprocessor) it's intended use is web
> pages.
>
> Mike "mostly hand signals for the dog" Yetto
>

PHP can validly be used for whatever one can use it for, just like any
other programming tool.

HOWEVER. Note that Rexx is the VM/CMS "system product interpreter" (or
at least that's what they used to call it). Something of equal or
greater capability might someday become the "linux system interpreter",
and would that be a bad thing?
Re: query: how many use PHP for linux scripts [message #185905 is a reply to message #185881] Wed, 14 May 2014 05:26 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/13/2014 12:35 PM, Johnny wrote:
> On 05/13/2014 01:20 PM, crankypuss wrote:
>> On 05/13/2014 10:32 AM, Johnny wrote:
>>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>>> On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> > On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> >> What kinds of linux scripts do you write in PHP? Are they
>>>> >> applications,
>>>> >> utilities, other? Are they command-line or do they have fullscreen
>>>> >> interfaces?
>>>> >
>>>> > I've never used PHP for actual scripting outside of CGI. If I have to
>>>> > write a script, I almost always use either Perl or shell script.
>>>> >
>>>>
>>>> When you write a "script", what is it? Command-line only, fullscreen
>>>> interface, simple abbreviation of some common task, fullblown
>>>> applications, what?
>>>
>>> Linux Shell Scripting Tutorial v1.05r3
>>> A Beginner's handbook
>>>
>>> http://www.freeos.com/guides/lsst/
>>
>> Do you always post irrelevancies, or is this a special occasion;
>> nevermind.
>
> I thought you were ignorant, and I was trying to help. Now I see you
> are stupid, and can't be helped.

That's exactly the kind of rancid horseshit that led me to unsubscribe
from comp.lang.php many moons ago. Please do lose it, or if you can't,
then just piss off to somewhere that people don't mind putting up with it.
Re: query: how many use PHP for linux scripts [message #185907 is a reply to message #185901] Wed, 14 May 2014 05:39 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/14/2014 03:17 AM, The Natural Philosopher wrote:
> On 14/05/14 09:44, crankypuss wrote:
>> On 05/13/2014 03:10 PM, JEDIDIAH wrote:
>>> PHP is fine if you're working with the web, kind of pointless
>>> otherwise.
>>
>> I find that to be absolutely not the case.
>
> but others don't. They take a personal and opposite view.

Yes, and more than a few of those seem to think they're defending their
virgin sister against a potential rapist, rather than discussing
languages and applications and potentialities.

> PHP CAN be used for other things. But most of us were dong other things
> perfectly well before we discovered PHP and for us PHP only has one
> advantage: its widely supported as a web scripting language.

Inertia is powerful stuff.

> And its HUGE advantage over - say C - is the ability to slip in and out
> of pure HTML with a ?> <? statement.

We have different views here, from what I can tell; you seem to view
HTML as the objective with PHP as a relatively minor facilitator, while
I view the overall "web application" (which every website is, if you
look at it from that pov) as the objective and HTML as an interface
language to be used by the application implementation... more ideally I
see HTML as one possible interface language used by a higher-level
application whose logic applies equally whether it is a web-based or
local implementation.

> Apart from that its relatively crap.

I could complain about PHP's inconsistencies for a long time, but I'd
prefer to use the time more usefully.

> IIRC C++ has some similar features as has PERL.
>
> But the support for other handy stuff is not as good.
>
> *shrug*.
>
> in teh end its a minir detail tha wins te day.
>
> C has the best interface to the operating system, PHP has the best user
> interface to HTML and if I was writing a native app for linux I'd
> probably use C++ as the interface to x windwows is easier that way.
>
> as far as scripts go, well its a totally undemanding application. Any
> crud will work. Even PERL.

I think we may be working with different meanings for the word "script".
Re: query: how many use PHP for linux scripts [message #185908 is a reply to message #185900] Wed, 14 May 2014 05:58 Go to previous messageGo to next message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 05/14/2014 03:09 AM, The Natural Philosopher wrote:
> On 14/05/14 09:36, crankypuss wrote:
>> Still, since I can use PHP as my own linux scripting language, and use
>> it to write fullblown applications, and have a bunch of PHP code that
>> works fairly decently, I continue in that direction.
>>
>> Apparently without much company, as I read the replies here. <g>
>
> If the first language you learnt in Linux was PHP, then you are likely
> to actually be more faimliar in that environment.
>
> MOST linux scripts are not shell these days. python and perl are more
> common, which means you have to carry the overheadf of all THOSE
> libraries as well.
>
> I cam me to UNIX when there was only shell or C. or AWK :-)
>
>
> Since I was at that time a full time C programmer, I looked askance at
> people constructing massive shell scripts that took enormous amounts of
> CPU to run and were extremely hard to maintain. I generally found that
> beyond the more simple, C was in fact faster to write and easier to
> maintain and ran 100-1000 time faster.
>
>
> PHP is something I use simply because it is a doddle to integrate with
> websites. Nevertheless I think its a pretty poor language.
>
> I never use it outside a web context because frankly C is to my mind
> better, and neater and more in line with the way the operating system is
> itself constructed.
>
> Having got used to dong my own string manipulations, my own memory
> management and my own library construction over many years of writing
> low level code for non UNIX systems in C, the advantages if knowing
> exactly what you are doing completely outweigh the disadvantages of not
> having it done for you.
>
>
> The context and scope of my variables are what I declare them to be, not
> randomly what the PHP designer thought would be handy.
>
> MY variables are static or stack based ad dont need memory management,
> and if I do use malloc() I know how to free() and when to do it.
>
> If I want the third character out if the string str, its simply str[2];
>
> I don't need to invoke a PHP function to get (a copy of) it.
>
> And if it happens to be a hexadecimal code, I dont need to think about
> whether or not its ascii, UTF or an arbitrary bit pattern. It is after
> all 'just a byte'
>
> This isn't in the end anything more than saying that what you understand
> best is often the best for you.
>
> Accept its a personal thing, and don't try to justify it in objective
> terms, when its really subjective.

I can't find anything in your post to take issue with, oh my! <g>

Still, I don't agree with the bottom line implied, perhaps because
rather than being a programmer in the sense that I choose and use the
best tools available, I tend to build tools that include the features
that I find most useful. I don't love every aspect of PHP, but it has
two qualities that I value highly: the code that I need can be
implemented in PHP, and PHP is sufficiently powerful to allow something
better to be constructed by using it as a bootstrap.

Frankly I have yet to find *any* programming language that I think is
"better" in an overall sense than PDP-11 assembler, but I do have some
ideas about how to make one.

The main reason I posed the question that is the subject of this thread
is that I'm wondering if it would be worth the trouble involved to share
some of the applications that I've been developing, and so far it
appears that there simply isn't any interest in anything PHP-based
because PHP is "icky".

If that's the case it'll save me some effort. I don't have unlimited
time for user handholding, and if nobody much uses PHP for anything but
stuffing a few mySQL queries into their websites, that implies that
nobody much would be interested in taking care of themselves, QED
excessive handholding required. So it goes, eh?
Re: query: how many use PHP for linux scripts [message #185909 is a reply to message #185891] Wed, 14 May 2014 06:40 Go to previous messageGo to next message
Chris Ahlstrom is currently offline  Chris Ahlstrom
Messages: 3
Registered: May 2014
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Jerry Stuckle wrote this copyrighted missive and expects royalties:

> On 5/13/2014 8:26 PM, Chris Ahlstrom wrote:
>>
>> Use what makes *you* feel productive. For me, that is currently C++, one of
>> the most flexible languages ever.
>
> I agree it depends on the situation. But the language needs to be what
> the JOB requires - not what makes you feel productive.
>
> Along with PHP, I also do C (almost 30 years), c++ (25 years), Java (10
> years) and other languages. The language I use is completely dependent
> on the job.

In other words, simply on someone's past decisions, for the most part.

> For instance - C++ is nice, but doesn't work well with Linux Device
> Drivers. You're better off using C for that. And it can't be as easily
> modified and changed as PHP, which works great as a scripting language.
> I would never, for instance, use C++ to do the SPAM email parsing and
> updating; PHP has tools which making parsing emails easy, unlike C++.
> But at the same time I would never try to write a GUI program in PHP.

Every language, it seems, converges on the same large feature set and
incorporates many third-party libraries to do various tasks. Even C++.
Check out Boost sometime, and Qt.

The big differences, I think, are in the infrastructure surrounding the
languages. Java vs C++, for example.

Anyway, I basically agree with you.

--
A possum must be himself, and being himself he is honest.
-- Walt Kelly
Re: query: how many use PHP for linux scripts [message #185910 is a reply to message #185901] Wed, 14 May 2014 07:29 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
In article <lkvcbl$htp$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
<tnp(at)invalid(dot)invalid> wrote:

> C has the best interface to the operating system, PHP has the best user
> interface to HTML ...

In the sense that most APIs interface to C, yes. But one thing about
PHP is the large amount of libraries available to do things, without
which it wouldn't be much use at all.

--
"I am enclosing two tickets to the first night of my new play; bring a
friend.... if you have one." - GB Shaw to Churchill "Cannot possibly
attend first night, will attend second... if there is one." - Winston
Churchill, in response.
Re: query: how many use PHP for linux scripts [message #185911 is a reply to message #185903] Wed, 14 May 2014 07:32 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
add to buddy list
ignore all messages by this user
On 14/05/14 10:21, crankypuss wrote:
> On 05/13/2014 09:42 PM, The Natural Philosopher wrote:
>> On 13/05/14 21:35, Tim Streater wrote:
>>> In article <lktn4a$n8q$1(at)news(dot)albasani(dot)net>, The Natural Philosopher
>>> <tnp(at)invalid(dot)invalid> wrote:
>>>
>>>> On 13/05/14 17:32, Johnny wrote:
>>>
>>>> > Linux Shell Scripting Tutorial v1.05r3
>>>> > A Beginner's handbook
>>>> >
>>>> > http://www.freeos.com/guides/lsst/
>>>> Prezactly. PHP is optimised for HTML work really.
>>>
>>> Who cares.
>>>
>>>> There are far better languages to do other stuff in, though I have to
>>>> say I dislike scripting langauges really and prefer to use C wherever
>>>> possible.
>>>
>>> I can't be arsed to fiddle around with C these days. Too much faffing
>>> around with declarations - and no string handling to speak of either.
>>>
>>> Non-issues in PHP.
>>>
>> string handling is the chief reason I prefer C..
>>
>>
>
> Is that because you've built your own library of string handling
> routines for C, or because you like working with all those
> null-terminated strings supported by stdlib?
>
> Personally I think null-terminated strings are only useful for defining
> some kinds of constant data, but even there it's limiting.

Bit of both.

I just get used to thinking of strings in the way C does.

and getting irritated when I have to do complex string manipulation in PHP

By the time I have tried to find the regexp that works I have usually
written the whole program in C.

null terminated strings are a perfectly decent way to proceed.

you have to either stick a null (or other EOS mark) in or store the
length somewhere.

OK strlen is faster if the length is stored, but finding the nth through
pth byte is not... You still have to so some clumsy copying

And I like the way I can tokenise a C string up by using pointers to the
characters, then when I find a split char, nulling that byte and
advancing the ptr to the next part.

C is a language you can just about do ANYTHING in. I've written
multitasking shedulers in C..and interrupt handlers

Try doing that in perl PHP or Python!

And that's why I like it. I only need to learn one language well. I
COULD write my web pages in C, but the issues of outputting standard
text in huge blocks is a bit of a problem.

whereas its the simplest thing in the world for an interpreter.









--
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: query: how many use PHP for linux scripts [message #185912 is a reply to message #185902] Wed, 14 May 2014 08:20 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 5/14/2014 5:18 AM, crankypuss wrote:
> On 05/13/2014 06:37 PM, Jerry Stuckle wrote:
>> On 5/13/2014 8:26 PM, Chris Ahlstrom wrote:
>>> Jerry Stuckle wrote this copyrighted missive and expects royalties:
>>>
>>>> On 5/13/2014 6:03 PM, Tim Streater wrote:
>>>> >
>>>> > Depends what you're doing. My app has 74 PHP scripts, some of which do
>>>> > things like communicate with remote hosts, rotate logs, move files
>>>> > around, read/write a variety of SQLite databases. Doubtless all this
>>>> > could be done in C, but why should I bother.
>>>>
>>>> I agree, Tim. I have a number of scripts which do everything from
>>>> backing up files and databases to parsing email messages and updating
>>>> spam filters.
>>>>
>>>> Sure, I *could* do it in C - but why bother? And I *could* do it in
>>>> Linux scripts - but then I'd just have to redo them for Windblows.
>>>>
>>>> Of course, I could use Perl or other OS-agnostic scripting languages,
>>>> but why bother?
>>>>
>>>> PHP is great for a lot of things. People who think it's only good for
>>>> web work are not aware of all of the possibilities.
>>>
>>> People figure out the language that best fits their personalities, and
>>> run
>>> with it.
>>>
>>> I don't care if it is C, Perl, Erlang, Haskell, brainfuck, PHP, Python,
>>> shell script, Java, Ruby, C#, or C++. By now they overlap about
>>> 70% to 99% in functionality, if you count the supporting libraries.
>>>
>>> Use what makes *you* feel productive. For me, that is currently C++,
>>> one of
>>> the most flexible languages ever.
>>>
>>
>> I agree it depends on the situation. But the language needs to be what
>> the JOB requires - not what makes you feel productive.
>
> Yes, but in addition to a language's being capable of doing the job,
> it's also convenient not to be unproductive. <g> Both aspects seem to
> be necessary, capability and "language ergonomics".
>

Productivity is a part of using the right language for the job. I would
never try to write a Linux device driver in PHP or Java, for instance.
Nor would I write an Android app in C.

>> Along with PHP, I also do C (almost 30 years), c++ (25 years), Java (10
>> years) and other languages. The language I use is completely dependent
>> on the job.
>>
>> For instance - C++ is nice, but doesn't work well with Linux Device
>> Drivers. You're better off using C for that. And it can't be as easily
>> modified and changed as PHP, which works great as a scripting language.
>> I would never, for instance, use C++ to do the SPAM email parsing and
>> updating; PHP has tools which making parsing emails easy, unlike C++.
>> But at the same time I would never try to write a GUI program in PHP.
>
> I have a number of fullscreen text-based applications written in PHP,
> but if it came down to having to draw every pixel I'd probably want to
> brush up on C or C++ because those are the languages for which
> pixel-based GUI support libraries exist (not that I'm much impressed
> with the results of using those libraries as exhibited by gnome2).
>

Those are possibilities. But if I needed a graphic application I would
use a graphic interface instead of trying to do everything myself. It
would affect the language that I chose, but would not be the *only*
criteria for that language.

> Most of the whizbang flashies that are implemented as parts of "GUI"
> applications are unnecessary anyway if there is adequate support for a
> good menu system (which mostly, there isn't). And the idea of using a
> mouse for everything by dragging this or that icon from hither to yon,
> or double clicking on an icon, is an oversimplification imo that has
> caused grievous damage to the computing world as a whole. At the same
> time the ability to click on a link in html is one of its great
> benefits, and flyovers can be very helpful.
>

Simplification is good. YOU may not like it, but hundreds of millions
of computer users do. And that's who these apps are designed for.

> All that's mostly opinion, and only mentioned because you said you'd
> never attempt a GUI application in PHP, and I wanted to point out that
> it isn't so much because of PHP itself that your choice there is
> sensible (though drawing individual pixels in an interpreted language is
> somewhat questionable), but because there's simply no good support for
> writing GUI applications in PHP.
>

A bit of a misunderstanding here - sorry, I wasn't clear. I would never
build an application in PHP - GUI or not. It's great for scripts, but
too wide open for my tastes. I prefer the ability to compartmentalize
my code more as in C, C++ and Java. Plus, compiled languages are faster.

> That's as it is, but there's no law of the universe which prohibits such
> support from being developed for PHP or some PHP-derivative.

There is a GUI library with a PHP interface PHP (GTK). I haven't tried
it, but I would if I had a short script which needed a GUI.
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: query: how many use PHP for linux scripts [message #185913 is a reply to message #185909] Wed, 14 May 2014 08:23 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 5/14/2014 6:40 AM, Chris Ahlstrom wrote:
> Jerry Stuckle wrote this copyrighted missive and expects royalties:
>
>> On 5/13/2014 8:26 PM, Chris Ahlstrom wrote:
>>>
>>> Use what makes *you* feel productive. For me, that is currently C++, one of
>>> the most flexible languages ever.
>>
>> I agree it depends on the situation. But the language needs to be what
>> the JOB requires - not what makes you feel productive.
>>
>> Along with PHP, I also do C (almost 30 years), c++ (25 years), Java (10
>> years) and other languages. The language I use is completely dependent
>> on the job.
>
> In other words, simply on someone's past decisions, for the most part.
>

Almost NEVER dependent on past decisions. But it IS dependent on the
requirements of the program.

>> For instance - C++ is nice, but doesn't work well with Linux Device
>> Drivers. You're better off using C for that. And it can't be as easily
>> modified and changed as PHP, which works great as a scripting language.
>> I would never, for instance, use C++ to do the SPAM email parsing and
>> updating; PHP has tools which making parsing emails easy, unlike C++.
>> But at the same time I would never try to write a GUI program in PHP.
>
> Every language, it seems, converges on the same large feature set and
> incorporates many third-party libraries to do various tasks. Even C++.
> Check out Boost sometime, and Qt.
>
> The big differences, I think, are in the infrastructure surrounding the
> languages. Java vs C++, for example.
>
> Anyway, I basically agree with you.
>

Yes, every language has its advantages and disadvantages. That's why
there is no one "universal language". Different jobs have different
requirements, and some languages are better than others for any
particular job.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: query: how many use PHP for linux scripts [message #185914 is a reply to message #185905] Wed, 14 May 2014 08:28 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 5/14/2014 5:26 AM, crankypuss wrote:
> On 05/13/2014 12:35 PM, Johnny wrote:
>> On 05/13/2014 01:20 PM, crankypuss wrote:
>>> On 05/13/2014 10:32 AM, Johnny wrote:
>>>> On 05/13/2014 11:05 AM, crankypuss wrote:
>>>> > On 05/13/2014 09:00 AM, Collin Pruitt wrote:
>>>> >> On 5/13/2014 4:17 AM, crankypuss wrote:
>>>> >>> What kinds of linux scripts do you write in PHP? Are they
>>>> >>> applications,
>>>> >>> utilities, other? Are they command-line or do they have fullscreen
>>>> >>> interfaces?
>>>> >>
>>>> >> I've never used PHP for actual scripting outside of CGI. If I have to
>>>> >> write a script, I almost always use either Perl or shell script.
>>>> >>
>>>> >
>>>> > When you write a "script", what is it? Command-line only, fullscreen
>>>> > interface, simple abbreviation of some common task, fullblown
>>>> > applications, what?
>>>>
>>>> Linux Shell Scripting Tutorial v1.05r3
>>>> A Beginner's handbook
>>>>
>>>> http://www.freeos.com/guides/lsst/
>>>
>>> Do you always post irrelevancies, or is this a special occasion;
>>> nevermind.
>>
>> I thought you were ignorant, and I was trying to help. Now I see you
>> are stupid, and can't be helped.
>
> That's exactly the kind of rancid horseshit that led me to unsubscribe
> from comp.lang.php many moons ago. Please do lose it, or if you can't,
> then just piss off to somewhere that people don't mind putting up with it.

The only stoopid person here is Johnny. He replied with an off-topic,
irrelevant comment and got pissed off when you called him on it.

Sounds like some other trolls I know.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
Re: query: how many use PHP for linux scripts [message #185915 is a reply to message #185894] Wed, 14 May 2014 08:39 Go to previous messageGo to previous message
Ben Bacarisse is currently offline  Ben Bacarisse
Messages: 82
Registered: November 2013
Karma: 0
Member
add to buddy list
ignore all messages by this user
The Natural Philosopher <tnp(at)invalid(dot)invalid> writes:

> On 13/05/14 21:35, Tim Streater wrote:
<snip>
>> I can't be arsed to fiddle around with C these days. Too much faffing
>> around with declarations - and no string handling to speak of either.
>>
>> Non-issues in PHP.
>>
> string handling is the chief reason I prefer C..

That seems odd since PHP has almost every single low-level C string
function available to it. You can strspn and strncmp to your heart's
content in PHP. Pretty much the only ones missing are strcat and strcpy
but, surely, they can't be why you prefer C.

A PHP translation of C string handling would inevitably be simpler since
there would be no need manage the storage. That's the biggest advantage
in my opinion, even if never used any of PHP's more complex string
manipulation.

--
Ben.
Quick Reply
Formatting Tools:   
Pages (3): [1  2  3    »]  Switch to threaded view of this topic Create a new topic
Previous Topic: How to get the POST name of a field in a form that uses a counter
Next Topic: PHP-SOAP/5.4.21 SoapClient terminating POST without waiting for reply, but still complaining "error fetching http headers".
Goto Forum:
  

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

Current Time: Fri Oct 20 00:59:17 EDT 2017

Total time taken to generate the page: 0.01212 seconds