LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-17-2004, 01:13 PM   #16
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55

Quote:
Originally posted by johnMG
naflan,

Oh my, you don't program for a living? That means you can pick the language that's the most fun!

Many folks say, that language is Python. But it really depends on what you want to do.

Like you say, if you'd like to get into GUI stuff, you're probably best off with Python (maybe along with the PyGTK module). Writing GUI code in C is more work than it's worth. Besides, if you need to, you can always create a small C module, and then make use of it from within your Python code.

Now, if you're more the sysadmin type, Perl is probably what you want. You can always do small gui apps with Perl/Tk.

Oh, and you asked about a good gui toolkit for C? Well, GTK+ is probably the most "standard" one these days. You might also look at FLTK. If you want to do graphics stuff in C using OpenGL, glut is nice (though it hardly has any widget support). If you've got the patience, you can learn Lesstif. There's gotta be a bunch others, but I don't recall them at the moment.
Oh I love this argument...you want to do GUI so use python because it has PyGTK but if you only want small GUI apps you could do these with Perl/Tk. You don't use Perl much, do you? If you did you'd know that Perl is every bit as good for GUIs as Python is. IN fact GTK has bindings for pretty much every language available...and that INCLUDES Perl. If you want to write programs in a powerful, multi-purpose scripting language with GUI support then use Perl. Anything you can do in Python you can do in perl and more. If you want to do a GUI use PerlGTK or Perl/Tk or wxPerl...the list goes on.
 
Old 03-17-2004, 10:08 PM   #17
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Komakino wrote:
Oh I love this argument...you want to do GUI so use python because it has PyGTK but if you only want small GUI apps you could do these with Perl/Tk.

Whoa. Hey there. Hey now. How are ya. Slow down. :) Sorry, maybe I wasn't clear enough.

Read that line I posted one more time:

Now, if you're more the sysadmin type, Perl is probably what you want. You can always do small gui apps with Perl/Tk.

To elaborate, what I was getting at was:

If you're the sysadmin type, you might have more use for Perl than Python -- and further, as a sysadmin, you probably won't be writing large pieces of software, but rather many smaller Perl scripts here and there, so go ahead and use Perl (maybe Perl/Tk) for any GUI programs you might happen to need. I wrote "small programs" because sysadmins generally spend more time on other things besides writing large pieces of software.

If you're just interested in application programming, my guess is that Python will serve you better than Perl, though obviously opinions differ -- and I've been known to be wrong before. :)
 
Old 03-18-2004, 12:18 AM   #18
hadding
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 40

Rep: Reputation: 15
What no mention of Scheme ??? *gasp. Grabs for bottle of Nitro tabs*

For util & admin type scripts I'd suggest Perl.

For Applications go with Python & wxPython ( Fun and has a nice Lispy feel).Better yet do what I do and code your core modules in C or Assembly & use wxPython for a GUI wrapper.

Well so much for my 2 cents.


_h
 
Old 03-18-2004, 02:05 AM   #19
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
don't forget
Tcl.

lovely little language, simple and dead powerful.
 
Old 03-18-2004, 09:03 AM   #20
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Well, if you already know java and C, then why not learn PHP? Its syntax resembles C 99% of the time, so It should be very easy to pick up.
 
Old 03-18-2004, 09:34 AM   #21
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Original Poster
Rep: Reputation: 15
I"ve used php some. I'm not sure its sytax resembles C though. Is php usefull for anything other than web?
 
Old 03-19-2004, 05:56 PM   #22
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Where does this idea come from that if you want a GUI app in a scripting language use python? There is nothing python can do that Perl cannot whereas the opposite cannot be said to be true. Plus python's loops are HIDEOUS.

I can see your point in the argument about "if you're a sysadmin, learn Perl" but why not learn it anyway? There's little point in learning python to write GUI apps only oneday to discover you need something more powerful for when you could kill both birds with one stone by learning perl which can accomplish all goals.

And no, I see no point in PHP, it is too limited.
 
Old 03-19-2004, 08:31 PM   #23
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Define limited, besides the fact it cannot do GUIs.
 
Old 03-20-2004, 02:30 AM   #24
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Where does this idea come from that if you want a GUI app in a scripting language use python?

Here's a good read:
http://www.linuxjournal.com/article.php?sid=3882
 
Old 03-20-2004, 06:15 AM   #25
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by jinksys
Define limited, besides the fact it cannot do GUIs.
It's limited to webpages.
 
Old 03-20-2004, 12:59 PM   #26
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Quote:
Originally posted by Komakino
It's limited to webpages.
PHP scripts can be run from the commandline.
I wrote a port scanner, and brute force cracker
using php on my machine and apache isnt even
installed. So no, its not just limited to web pages.

btw, here's an tutorial on PHP's command line interface.
http://www.phpfreaks.com/tutorials/86/0.php

Last edited by jinksys; 03-20-2004 at 01:04 PM.
 
Old 03-20-2004, 04:42 PM   #27
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
I stand corrected.

But I still can't see it doing anything Perl cannot
 
Old 03-20-2004, 09:13 PM   #28
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Quote:
Originally posted by Komakino
I stand corrected.

But I still can't see it doing anything Perl cannot
Youre right,
perl can do alot more than php can do since it can use pluggable modules.
 
Old 03-21-2004, 12:27 AM   #29
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
Quote:
I stand corrected.

But I still can't see it doing anything Perl cannot
And Perl can't do anything my Turing Machine can't

Alex
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with perl module for w3c validator to work on my local Apache+PHP+perl instal tbamt Linux - Software 0 12-16-2004 05:37 PM
cgi perl : I cant get perl to append my html file... the_y_man Programming 3 03-22-2004 05:07 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM
can i set ~/public_html/perl as a perl directory for apache? doublefailure Linux - Networking 1 07-09-2002 04:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration