LinuxQuestions.org
Help answer threads with 0 replies.
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 02-14-2008, 11:45 PM   #16
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled

Quote:
Originally Posted by PatrickNew View Post
My guess is that what you want isn't a programming language, it's two programming languages. First learn Java. It's not efficient at all, but it's relatively easy and readable - think C++ with all the funky operators thrown out and no memory management to deal with. Once you get used to Java, you'll start to ask yourself "Boy, wouldn't it be nice if the language let me do this..., or that...". Then look at C++. When you come from Java, you'll be more than halfway there on the syntax, and the new things you need to learn will be the powerful techniques you were interested in.
That works well if you have the programmer in mind, but I think it develops bad habits to learn something that takes care of the dirty work first, then have to deal with remembering to do those things yourself with a more raw language.

What about lisp?
ta0kira
 
Old 02-15-2008, 03:22 AM   #17
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I've tried lisp, it's kinda strange, very different from the other languages. I can't understand why there have to have so many parentheses tho, need to use emacs or some other IDE to help me close them. It's interesting tho.

As for the other question: I don't work as a programmer, but I make scripts quite often just to help me manage my system(s) here. Sometimes these scripts are very slow tho, so I code some parts of the script in C, then run that from within the script to speed it up, like when I have to nest loops for some reason (it's rare).
 
Old 02-15-2008, 08:08 AM   #18
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Since you mention LISP, perhaps you'd find another language interesting: PROLOG. There are FOSS PROLOG implementations available for download.

Personally, I have never been successful writing PROLOG programs because, I think, I tend to think too sequentially whilst PROLOG focuses on ends rather than means.

If you can get your mind around the PROLOG paradigm it can be a very powerful and expressive language. When I was working in Switzerland my boss was a PROLOG guru. He could knock out a PROLOG program (with GUI interface) in an hour or so that would have taken me a week to code in C++.

On the other hand, I think I could have coded the same application in APL in a few hours, so maybe you'd like APL. The A+ implementation is available as an RPM in the Fedora repositories, and probably available for other distributions.

Last edited by PTrenholme; 02-15-2008 at 08:11 AM.
 
Old 02-15-2008, 11:24 AM   #19
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Quote:
Originally Posted by H_TeXMeX_H View Post
As for the other question: I don't work as a programmer, but I make scripts quite often just to help me manage my system(s) here. Sometimes these scripts are very slow tho, so I code some parts of the script in C, then run that from within the script to speed it up, like when I have to nest loops for some reason (it's rare).
Since you are concerned with speed, do you spend more of your time with algorithms, endless conditional trees (if, else, case, etc.,) or dealing with abstract objects?
ta0kira
 
Old 02-15-2008, 12:12 PM   #20
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by PTrenholme View Post
If you can get your mind around the PROLOG paradigm it can be a very powerful and expressive language. When I was working in Switzerland my boss was a PROLOG guru. He could knock out a PROLOG program (with GUI interface) in an hour or so that would have taken me a week to code in C++.

On the other hand, I think I could have coded the same application in APL in a few hours, so maybe you'd like APL. The A+ implementation is available as an RPM in the Fedora repositories, and probably available for other distributions.
I'll definitely look into prolog, I think it's under a whole subset of languages used for 'logical' programming.

Quote:
Originally Posted by ta0kira View Post
Since you are concerned with speed, do you spend more of your time with algorithms, endless conditional trees (if, else, case, etc.,) or dealing with abstract objects?
ta0kira
Well, now that I think about it, it's mostly conditional trees that take a lot of time. I don't usually deal with objects or OOP too much because the programs I write are not very large, usually around 1000-3000 lines (in pretty much any language). I do deal with OOP when using python tho, because I have to.
 
Old 02-15-2008, 12:30 PM   #21
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
The nice thing about C is that what one person does you don't have to do. There are a lot of styles out there, but there are (somewhat) non-painful ways to use C. The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. If you take each action required and make it it's own function (to include sub-actions,) then use separate functions for the conditional comparisons (also broken down by "specialty") then C can be very easy to maintain. C++ has the benefit of the same, with the addition of string and list classes so that you don't have to allocate and deallocate something as simple as text.
ta0kira
 
Old 02-15-2008, 12:36 PM   #22
dguitar
Member
 
Registered: Jun 2005
Location: Portland, ME
Distribution: Slackware 13, CentOS 5.3, FBSD 7.2, OBSD 4.6, Fedora 11
Posts: 122

Rep: Reputation: 17
So why no to Perl? The only thing I'll say about 'easy to learn' - some ppl find perl hard to learn because there are so many ways to do things, and so many short cuts.

FYI - there are quite a few games built in Python...
Eve-Online would be a good example.
 
Old 02-15-2008, 01:10 PM   #23
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,338

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
In my experience the language that comes closest to your set of requirements is COBOL.

http://tiny-cobol.sourceforge.net/index.php

http://www.adtools.com/products/unix/linux.htm

http://www.acucorp.com/markets/linux/

------------------
Steve Stites
 
Old 02-16-2008, 06:39 AM   #24
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by ta0kira View Post
The nice thing about C is that what one person does you don't have to do. There are a lot of styles out there, but there are (somewhat) non-painful ways to use C. The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. If you take each action required and make it it's own function (to include sub-actions,) then use separate functions for the conditional comparisons (also broken down by "specialty") then C can be very easy to maintain. C++ has the benefit of the same, with the addition of string and list classes so that you don't have to allocate and deallocate something as simple as text.
ta0kira
I think you might be onto something. It's true that I don't really have a style, or really have been taught any. I'll definitely try this. Is there any place that describes how to code C with a certain style. I have some textbooks on C, but they don't mention too much on style (just the basic stuff: don't write everything on one line, where to put brackets, spacing, etc.).

It seems that I need to program a hell of a lot in order to develop a good style. Maybe there's an easier way.

Thanks for the other comments too.

(COBOL sends chills down my spine ... but thanks for suggestion)
 
Old 02-16-2008, 09:05 AM   #25
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Honestly, I've never read a programming book. Everything I've learned is from message boards, internet searches, man/info pages, and of course endless experimentation and hacking of other programs. I learned just enough to experiment on my own, then picked things up as I needed them for something I was doing. No one really knows what your requirements are, so most references will give you 30% what you want and 70% what you don't want (academic books are the worst.) If you learn basic C then we can help you with style here.
ta0kira
 
Old 02-16-2008, 10:45 AM   #26
UMG:Chicken_Soüp
Member
 
Registered: Nov 2007
Location: Neptune, NJ (exit 100)
Distribution: Slack, Solaris, whatever I have space for
Posts: 32

Rep: Reputation: 16
Hire a programmer. Send them emails with specs.
 
Old 02-16-2008, 02:47 PM   #27
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by ta0kira View Post
Honestly, I've never read a programming book. Everything I've learned is from message boards, internet searches, man/info pages, and of course endless experimentation and hacking of other programs. I learned just enough to experiment on my own, then picked things up as I needed them for something I was doing.
Hmmm ... I've never thought of it that way, but then that's the way I learned everything I know about Linux. Looks like that's what I'll have to do with C too. Anyway, thanks for your comments, they are helpful and thought provoking.

Quote:
Originally Posted by UMG:Chicken_Soüp View Post
Hire a programmer. Send them emails with specs.
Lol, yes take the easy way out. I've found the easy way out never pays, it costs.
 
Old 02-16-2008, 04:10 PM   #28
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi.
Quote:
Originally Posted by ta0kira View Post
... The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. ...
ta0kira
I don't disagree, but I think this is less a property of the language and more of the technique of programming in general.

In my days at the University, I knew of one physics researcher who used COBOL to handle the data reduction of satellite data because the facilities in COBOL were so good at describing and manipulating data.

In regard to the original question, I see only one of the criteria as objective and measurable -- performance. The readability and ease of learning are in the eyes of the beholder. For the performance, you may be interested in the information available at http://shootout.alioth.debian.org/ which looks at about 20 benchmark codes in 40 or so languages.

Best wishes ... cheers, makyo
 
Old 02-16-2008, 05:11 PM   #29
evoc
LQ Newbie
 
Registered: Dec 2007
Location: La Spezia, Italy
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
try the D language...
http://www.digitalmars.com/
 
Old 02-16-2008, 06:44 PM   #30
binutils
Member
 
Registered: Feb 2007
Posts: 59

Rep: Reputation: 15
There is no such a thing.
if you don't believe me, try all and find it yourself.
http://tacojuice.org/plnews/
http://lambda-the-ultimate.org/

Quote:
Originally Posted by The Art of Unix Programming
Master Foo nodded in agreement.

“What, then, is the proper dharma path?” asked Nubi.

The master spoke:

“When the eagle flies, does it forget that its feet have touched the ground? When the tiger lands upon its prey, does it forget its moment in the air? Three pounds of VAX!”

On hearing this, Nubi was enlightened.
 
  


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
What was your first language to learn? vashsna Programming 21 06-11-2007 07:04 PM
what language is best to learn io13 Programming 4 07-09-2006 09:17 AM
What Language Should I Learn? KungFuHamster General 45 04-25-2006 02:10 PM
Which C language to learn? Heiland Programming 10 08-14-2005 08:03 AM

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

All times are GMT -5. The time now is 09:13 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