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 :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: query: how many use PHP for linux scripts [message #185912 is a reply to message #185902] Wed, 14 May 2014 12:20 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Wed Nov 27 09:44:48 GMT 2024

Total time taken to generate the page: 0.07203 seconds