LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Your opinions of the best combination of programming languages to learn. (https://www.linuxquestions.org/questions/programming-9/your-opinions-of-the-best-combination-of-programming-languages-to-learn-813373/)

Sergei Steshenko 07-02-2010 12:15 PM

An interesting project in Lisp: http://lush.sourceforge.net/ .

bigearsbilly 07-03-2010 04:54 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4021629)
- the politically incorrect answer is: "because too many people are too dumb for them".

true of all programming really but especially the really high level ones like lisp.
When I was working with with lisp I had a junior and he'd try to
use procedural techniques, loops and condition variables.
not right at all.


A lot of code I've come across professionally is sub-standard.
I think the industry sees programming as the lowest step on the ladder to
being a project manager or other such crap.

Sergei Steshenko 07-03-2010 05:23 AM

Quote:

Originally Posted by bigearsbilly (Post 4022571)
true of all programming really but especially the really high level ones like lisp.
When I was working with with lisp I had a junior and he'd try to
use procedural techniques, loops and condition variables.
not right at all.


A lot of code I've come across professionally is sub-standard.
I think the industry sees programming as the lowest step on the ladder to
being a project manager or other such crap.

A must read on Lisp: http://www.paulgraham.com/avg.html .

For the lazy:

Quote:

What's so great about Lisp? And if Lisp is so great, why doesn't everyone use it? These sound like rhetorical questions, but actually they have straightforward answers. Lisp is so great not because of some magic quality visible only to devotees, but because it is simply the most powerful language available. And the reason everyone doesn't use it is that programming languages are not merely technologies, but habits of mind as well, and nothing changes slower. Of course, both these answers need explaining.

...

During the years we worked on Viaweb I read a lot of job descriptions. A new competitor seemed to emerge out of the woodwork every month or so. The first thing I would do, after checking to see if they had a live online demo, was look at their job listings. After a couple years of this I could tell which companies to worry about and which not to. The more of an IT flavor the job descriptions had, the less dangerous the company was. The safest kind were the ones that wanted Oracle experience. You never had to worry about those. You were also safe if they said they wanted C++ or Java developers. If they wanted Perl or Python programmers, that would be a bit frightening-- that's starting to sound like a company where the technical side, at least, is run by real hackers. If I had ever seen a job posting looking for Lisp hackers, I would have been really worried.

...

In January 2003, Yahoo released a new version of the editor written in C++ and Perl. It's hard to say whether the program is no longer written in Lisp, though, because to translate this program into C++ they literally had to write a Lisp interpreter: the source files of all the page-generating templates are still, as far as I know, Lisp code. (See Greenspun's Tenth Rule ( http://www.paulgraham.com/quotes.html ) .)

pr_deltoid 07-03-2010 07:21 AM

The only thing I have against Perl is that it's so much like shell scripting, a lot of things about it are similar. I don't really care for it all that much. Being able to do one thing a few different ways, a thousand different little syntax tricks and special variables to remember. It seems cluttered... I like C/C++/Python. I probably should have chosen C/C++/Python and not just C/Python. It'd be nice to learn a functional language, though...
I've decided to add this in a post, though: I chose C/Python but I really should say C/C++/Python.
I originally voted thinking more along the lines of "the best combination of languages without spending a very large amount of time on learning". With more time, I'd have to say C/C++/Python and as far as I can tell, a functional language.

Sergei Steshenko 07-03-2010 07:33 AM

Quote:

Originally Posted by prdeltoid (Post 4022663)
The only thing I have against Perl is that it's so much like shell scripting ...

No, it isn't.

Write in shell:

Code:

sergei@amdam2:~/junk> cat -n fancy_data_structure.prl
    1  my $some_coeff = 1.5;
    2
    3  my $hash_ref =
    4    {
    5    yet_another_hash =>
    6      {
    7      one => 1,
    8      two => 2
    9      },
    10
    11    array_of_hashes =>
    12      [
    13        {
    14        name => 'John',
    15        address => '1 Mary st'
    16        },
    17
    18        {
    19        name => 'Paul',
    20        address => '5 James st'
    21        }
    22      ],
    23
    24    a_method_with_two_closures =>
    25      do{
    26        my $another_coeff = 3.0;
    27
    28        sub # anonymous subroutine
    29          {
    30          my ($x) = @_;
    31
    32          $some_coeff * $another_coeff * $x; # the returned value
    33          }
    34        }
    35    };
sergei@amdam2:~/junk>

Or even try to write this in Python.

Sergei Steshenko 07-03-2010 07:41 AM

Quote:

Originally Posted by prdeltoid (Post 4022663)
The only thing I have against Perl is that it's so much like shell scripting ...

Now that you have a clear understanding how to write in shell the above data structure, here is another challenge for you - rewrite in shell this:

http://search.cpan.org/~arthur/Parse...se/Stallion.pm
.

pr_deltoid 07-03-2010 07:46 AM

I don't really remember beginning-to-intermediate Perl, really. I only read "Beginning Perl" and I don't remember everything. It's not a bad language and I was thinking about sticking with it, but it was the hardest of any book or tutorial I've read, basically, to really take a lot from, because it seems so complicated and cluttered in some ways. I can't honestly make any sense out of your above code example. I'd have to read about it for a while again.
It's much easier to get things done with than Bash, and it's a lot more suitable for more types of programs than Bash, but there are things about it (that I don't like about Bash) that I think are extremely similar or pretty much the same. I'm not an expert on programming languages, but just the general feel of it is complicated and cluttered to me, and uncomfortable.

Sergei Steshenko 07-03-2010 07:56 AM

Quote:

Originally Posted by prdeltoid (Post 4022686)
I don't really remember beginning-to-intermediate Perl, really. I only read "Beginning Perl" and I don't remember everything. It's not a bad language and I was thinking about sticking with it, but it was the hardest of any book or tutorial I've read, basically, to really take a lot from, because it seems so complicated and cluttered in some ways. I can't honestly make any sense out of your above code example. I'd have to read about it for a while again.
It's much easier to get things done with than Bash, and it's a lot more suitable for more types of programs than Bash, but there are things about it (that I don't like about Bash) that I think are extremely similar or pretty much the same. I'm not an expert on programming languages, but just the general feel of it is complicated and cluttered to me, and uncomfortable.

You comparison is the same as to say "flying a supersonic stealth fighter plain is the same as riding a scooter".

Read at least table of contents of the book to be found here: http://hop.perl.plover.com/ .

Read about Lisp above; remember that Perl borrowed a lot of ideas from Lisp, and Larry Wall never tried to hide it.

MTK358 07-04-2010 08:38 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4022589)

That was an interesting article. Especially this part:

Quote:

As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.
That's kind of the way I was looking at Perl and Lisp.

pr_deltoid 07-28-2010 05:06 PM

Sorry for the bump, but I've been looking at Ruby, and it's very nice. Competition for Python, going by what I've seen. I might go with Ruby instead of Python. I've noticed that portupgrade for FreeBSD uses Ruby and Ruby BDB. I don't know yet any big projects that use it. Real nice syntax, and clean code. The tutorial I've been reading makes it seem real nice, so far.
:redface:

EDIT:
http://www.ruby-lang.org/en/about/
Quote:

Ruby is a language of careful balance. Its creator, Yukihiro “matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.

Sergei Steshenko 07-28-2010 05:46 PM

Quote:

Originally Posted by prdeltoid (Post 4048397)
Sorry for the bump, but I've been looking at Ruby, and it's very nice. Competition for Python, going by what I've seen. I might go with Ruby instead of Python. I've noticed that portupgrade for FreeBSD uses Ruby and Ruby BDB. I don't know yet any big projects that use it. Real nice syntax, and clean code. The tutorial I've been reading makes it seem real nice, so far.
:redface:

EDIT:
http://www.ruby-lang.org/en/about/

Ruby is notoriously slow.

pr_deltoid 07-28-2010 06:01 PM

I've read that they've been working on it and that some things are pretty drastically sped up, and others are doing much better.

pr_deltoid 07-28-2010 06:16 PM

This explains one of the big changes in 1.9, a new VM, which also helps speed things up:
http://ruby.about.com/od/newinruby191/a/YARV.htm

Sergei Steshenko 07-28-2010 07:31 PM

Quote:

Originally Posted by prdeltoid (Post 4048426)
This explains one of the big changes in 1.9, a new VM, which also helps speed things up:
http://ruby.about.com/od/newinruby191/a/YARV.htm

Looks like Perl 5 way.

eveningsky339 07-28-2010 08:49 PM

I've heard good things about Ruby, however I have yet to get my hands dirty with the language. I'm a simpleton when it comes to programming but I do enjoy the challenge.

My picks were C, C++, and Python. Python is great for new programmers because of its clear syntax, simplicity, and support of multiple programming paradigms. C and C++ are obvious picks because they are the most popular languages out there.


All times are GMT -5. The time now is 08:02 AM.