LinuxQuestions.org
Visit Jeremy's Blog.
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 11-21-2011, 01:11 PM   #16
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234

Quote:
Originally Posted by Pa Blum View Post
So, what other mainstream languages are available on Linux
As far as I know: Fortran, Java, C, C++, Pascal, Common Lisp, Prolog, Haskell, Ruby, Perl, Python, Ada, OCaml, Assembly, D, PHP, Bash.

Should be a few others as well. However, what you should learn is up to you - it depends on your goals.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-21-2011, 02:03 PM   #17
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by SigTerm View Post
As far as I know: Fortran, Java, C, C++, Pascal, Common Lisp, Prolog, Haskell, Ruby, Perl, Python, Ada, OCaml, Assembly, D, PHP, Bash.

Should be a few others as well. However, what you should learn is up to you - it depends on your goals.
Typically this is not a big deal to build a mature language compiler/interpreter from sources.
 
2 members found this post helpful.
Old 11-21-2011, 02:17 PM   #18
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Sergei Steshenko View Post
Typically this is not a big deal to build a mature language compiler/interpreter from sources.
Yep. There are plenty of languages available, the real question for a new(?) user would be which one to use.
 
1 members found this post helpful.
Old 11-21-2011, 05:21 PM   #19
Lothar Schwab
LQ Newbie
 
Registered: Aug 2007
Location: Minnesota, USA
Distribution: Lubuntu
Posts: 19

Rep: Reputation: 2
Quote:
Originally Posted by H_TeXMeX_H View Post
Maybe not that easy to learn tho.
I actually found C fairly easy to learn ... but sometimes _very_ difficult to debug. It allows me to do (almost) everything. At the expense of protecting me from (almost) nothing
 
2 members found this post helpful.
Old 11-21-2011, 06:56 PM   #20
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Pa Blum

How about telling us about the "kind" of "software" which
you intend to build with the language you learn?
 
Old 11-22-2011, 12:41 AM   #21
Pa Blum
LQ Newbie
 
Registered: Sep 2009
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thumbs up

Crikey! I'm overwhelmed! I really appreciate all these excellent replies.

Thanks for the gForth link. I'll definitely do some nostalgic(?) tinkering with it.

I've never looked at C++ but have toyed with C in the past. When I discovered Forth, I forgot C (literally.)

Two votes for Lua, eh? Gotta look at that. I'm also curious about Squeak, and why the subject of flashcards brings it up. I've noticed that the word "Perl" never comes up -- just when I was about to try it. Hmmm.

No BASIC bashing please! I worked in QC for a large company that used a lot of VB and I have great respect for it. When VB programmers told my boss that it was impossible in VB to do what she asked, she just had me make up little functioning programs demonstrating her wishes and sent them to those guys (with what comments I hate to think.) They musta hated my guts....nyuk, nyuk....

"stay away from Assembly for X86": I've always loved assembly, especially with the clean little versions embedded in the early TRS machines, but I've already assumed that it gets a little dysfunctional in current, much-developed machinery. I still intend to look at it though, especially if I settle on a language that lets me embed assy snippets.

Caml and Haskell: I'm unfamiliar with their formalized use of the word "functional" but it might be what I'm looking for. (I do read a lot of Francais, mostly fiction, so that adds some jollies to it....) I'm only half-way through the "...for the Masses" article so that's yet another bookmark to follow.

You'd have trouble getting me to try Java, especially since I have no interest in web programming.

Anyhoo, thanks again to everyone. Lots of stuff to look at, to say the least. I have an added distraction with the realization that I have to abandon Ubuntu after many years, as the Mickey-Mouse 11.10 version is colossally flawed, including trying to tear up my hard drive, and I just don't see any chance for it to get fixed via little updates. (sigh) But I'm staying in Linux, for sure.

I appreciate the relocation of my thread -- I wouldn't have been surprised if it had gotten "moved" right out of the forum, but I'm glad to be seeing such good stuff.

pb
 
Old 11-22-2011, 06:33 AM   #22
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Pa Blum View Post
...
Two votes for Lua, eh? Gotta look at that. I'm also curious about Squeak, and why the subject of flashcards brings it up. I've noticed that the word "Perl" never comes up -- just when I was about to try it. Hmmm.
...
Perl is my default language, but didn't you want a strictly typed language ?

If you decide to try Perl, remember that it's not "C".
 
1 members found this post helpful.
Old 11-22-2011, 06:35 AM   #23
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Pa Blum View Post
...
Caml and Haskell: I'm unfamiliar with their formalized use of the word "functional" but it might be what I'm looking for. (I do read a lot of Francais, mostly fiction, so that adds some jollies to it....) I'm only half-way through the "...for the Masses" article so that's yet another bookmark to follow.
...
And Perl has a lot from functional paradigm. Try http://hop.perl.plover.com/ .
 
1 members found this post helpful.
Old 11-23-2011, 12:48 AM   #24
Pa Blum
LQ Newbie
 
Registered: Sep 2009
Posts: 5

Original Poster
Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by Sergei Steshenko View Post
Perl is my default language, but didn't you want a strictly typed language ?

If you decide to try Perl, remember that it's not "C".
I consider that a compliment for Perl (arf?)

...And thanks for the HOP reference. That's sort of got me turned on (mentally, only...) If that makes its functional aspect anything like a code generator, I'm especially interested because I've programmed a lot of code generators in my QC work and found it engrossing.

Geez, you guys are giving me a lot of stuff to check on. Much appreciated....
 
Old 11-23-2011, 08:59 AM   #25
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by resetreset View Post
Why don't you try Javascript?

You don't have to DECLARE your variables before you use them, like C, which for a lazy guy like me, is great!

You own two Javascript books and you don't know that this is a recipe for disaster?

See here for an example:
http://www.linuxquestions.org/questi...roblem-906427/
 
1 members found this post helpful.
Old 11-23-2011, 01:42 PM   #26
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by dugan View Post
You own two Javascript books and you don't know that this is a recipe for disaster?

See here for an example:
http://www.linuxquestions.org/questi...roblem-906427/
Regardless of language.
 
1 members found this post helpful.
Old 11-23-2011, 02:16 PM   #27
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Pa Blum View Post
I've always loved assembly, especially with the clean little versions embedded in the early TRS machines, but I've already assumed that it gets a little dysfunctional in current, much-developed machinery. I still intend to look at it though,
Since you hate C and haven't explained why, I expect you will be severely handicapped in approaching X86 assembler, but I'll try to give some constructive advice anyway.

The most important question before learning X86 assembler is what kind of X86 assembler to learn. There are two dimensions to that question:

A) 16-bit vs. 32-bit vs. 64-bit

One of my sons is taking a university course in x86 assembler. The instructor decided to teach 16-bit x86 assembler writing full DOS programs. My opinion of university professors was always low and CS professors even lower. But this bozo manages to push my opinions even lower. 16-bit X86 is a super quirky assembler language. When it was the language of the most important CPU in use, it was worth the trouble to learn that quirky language even though doing so gave you very distorted views about assembler in general (I once knew every detail of 16-bit x86). Once it was obsolete, teaching it became far stupider than teaching other obsolete languages.

32-bit x86 is still a fairly quirky language and not very representative of assembly language in general. It is now obsolete and is worthless to teach because it is obsolete.

64-bit x86 is a much less quirky language. Programming in assembler at all might be largely obsolete, but knowing 64-bit x86 is a powerful tool for programmers even if you won't directly program in it. There are far fewer online resources and even fewer paper books for 64-bit x86 vs. 32 or 16. That's tough luck. 64-bit is still worth learning. 32 and 16 are not. Go to the extra effort to learn 64 bit x86 or don't go to the effort to learn x86 assembler at all.

B) Target application. You should learn how to write assembler functions that are callable via the C calling standard (ABI). Any other target application is a waste of time to learn.
Most books and online tutorials want to teach you how to write whole DOS programs or whole Windows programs or whole Linux programs in x86 asm. That is a total waste of time. There is an enormous amount of stupid (and OS specific) detail you need to learn to write whole programs in assembler. That ends up distracting the student from ever actually learning assembler. You get only form and not content. Other online resources teach assembler for bare x86 machines starting from boot code. An x86 is in such a weird state on boot up (for historical reasons) that getting it from boot up to usable is an even bigger collection of otherwise useless detail than writing whole programs. Again, the good parts are completely missed as you focus on useless detail.

If you learn how to write C callable function in asm, you go directly into what is important and valuable about writing in asm rather than in a high level language. Even more important: you learn those aspects of asm that will help you be a better software engineer outside of asm programming. You also learn a powerful skill for diagnosing difficult bugs in C and C++ and many other languages.

You might not need to write C programs to call/test your C callable asm functions. Forth and C++ and Java and lots of other languages have ways of calling C callable functions.

Last edited by johnsfine; 11-23-2011 at 02:19 PM.
 
2 members found this post helpful.
Old 11-23-2011, 03:50 PM   #28
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by johnsfine View Post
Since you hate C and haven't explained why, I expect you will be severely handicapped in approaching X86 assembler, but I'll try to give some constructive advice anyway.

The most important question before learning X86 assembler is what kind of X86 assembler to learn. There are two dimensions to that question:

A) 16-bit vs. 32-bit vs. 64-bit

One of my sons is taking a university course in x86 assembler. The instructor decided to teach 16-bit x86 assembler writing full DOS programs. My opinion of university professors was always low and CS professors even lower. But this bozo manages to push my opinions even lower. 16-bit X86 is a super quirky assembler language. When it was the language of the most important CPU in use, it was worth the trouble to learn that quirky language even though doing so gave you very distorted views about assembler in general (I once knew every detail of 16-bit x86). Once it was obsolete, teaching it became far stupider than teaching other obsolete languages.

32-bit x86 is still a fairly quirky language and not very representative of assembly language in general. It is now obsolete and is worthless to teach because it is obsolete.

64-bit x86 is a much less quirky language. Programming in assembler at all might be largely obsolete, but knowing 64-bit x86 is a powerful tool for programmers even if you won't directly program in it. There are far fewer online resources and even fewer paper books for 64-bit x86 vs. 32 or 16. That's tough luck. 64-bit is still worth learning. 32 and 16 are not. Go to the extra effort to learn 64 bit x86 or don't go to the effort to learn x86 assembler at all.

B) Target application. You should learn how to write assembler functions that are callable via the C calling standard (ABI). Any other target application is a waste of time to learn.
Most books and online tutorials want to teach you how to write whole DOS programs or whole Windows programs or whole Linux programs in x86 asm. That is a total waste of time. There is an enormous amount of stupid (and OS specific) detail you need to learn to write whole programs in assembler. That ends up distracting the student from ever actually learning assembler. You get only form and not content. Other online resources teach assembler for bare x86 machines starting from boot code. An x86 is in such a weird state on boot up (for historical reasons) that getting it from boot up to usable is an even bigger collection of otherwise useless detail than writing whole programs. Again, the good parts are completely missed as you focus on useless detail.

If you learn how to write C callable function in asm, you go directly into what is important and valuable about writing in asm rather than in a high level language. Even more important: you learn those aspects of asm that will help you be a better software engineer outside of asm programming. You also learn a powerful skill for diagnosing difficult bugs in C and C++ and many other languages.

You might not need to write C programs to call/test your C callable asm functions. Forth and C++ and Java and lots of other languages have ways of calling C callable functions.
Nah.

Think of ARM "thumb" architecture: http://en.wikipedia.org/wiki/ARM_Thumb#Thumb . Sometimes things have to be really small and cheap.

And the professor is realistic teaching x86 16 bit assembly - he knows that 16 bit ARM development platform is much less likely to be found at home.
 
2 members found this post helpful.
Old 11-23-2011, 04:16 PM   #29
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by johnsfine View Post
But this bozo manages to push my opinions even lower. 16-bit X86 is a super quirky assembler language.
Usefulness/quirkiness are irrelevant and your professor is smarter than you think. Teaching assembler is a good idea because it will give you basic understanding of the way processor works. That there are registers, that "if/else" blocks are really jumps/gotos, etc. And in real-time dos mode you won't have to mess with OS too much (one process, unrestricted memory access, etc), and you won't have to cram into student's head understanding of protected mode. It is a very good way to get started with programming. Also, in MS-DOS it will be easier to have fun soon. You can switch display mode, mess with screen, and make simple graphical demos. With anything higher with DOS, you'll have to study API (possibly several) before you'll be able to do anything interesting - you'll get stdin/stdout and that's it.

Last edited by SigTerm; 11-23-2011 at 04:20 PM.
 
1 members found this post helpful.
Old 11-23-2011, 04:43 PM   #30
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by SigTerm View Post
Teaching assembler is a good idea because it will give you basic understanding of the way processor works.
I totally agree.

Quote:
That there are registers, that "if/else" blocks are really jumps/gotos, etc.
Those are things you would learn earlier and understand better if learning to write functions in 64-bit x86 than if learning to write DOS programs in 16-bit.

Quote:
And in real-time dos mode you won't have to mess with OS too much
When learning to write functions, you won't have to mess with the OS at all. Learning to write DOS programs, my son has spent weeks learning about how an asm program needs to interact with DOS. Any real assembler learning must come later.

Quote:
you won't have to cram into student's head understanding of protected mode.
Why would you ever? If you're writing 16-bit Windows programs (as very distinct from 16-bit DOS programs runnable in Windows) then you need to learn about "protected mode". Same if you're trying to learn how to write a useful X86 OS or useful X86 boot code.

But to write 32-bit or 64-bit asm functions (or even Windows or Linux programs) you don't need to know "protected mode" even exists. Sure you and I know it's there and your 32-bit or 64-bit program can't run without it. But the same is true of lots of quantum theory details that went into the design of the semiconductors inside the CPU. If no one knew that quantum theory stuff or no one knew that protected mode stuff then I couldn't program functions in 64-bit x86 asm. But my knowing that protected mode stuff is just as irrelevant to programming in 64-bit asm as my not knowing the quantum theory stuff.

Quote:
Also, in MS-DOS it will be easier to have fun soon. You can switch display mode, mess with screen, and make simple graphical demos.
True and I hope irrelevant. I hope learning something important can be interesting without needing childish feedback defined as "fun".

I do understand that some students do need flashier feedback to hold their attention. If that is the expected class then the professor should put in the extra effort to prepare to teach something more useful anyway, rather than teach something worthless just because the flashy feedback is already available.

A competent software engine could set up a frame program and assembler bindings to GLUT with only a moderate amount of work. Having done that before the semester starts, a professor could provide that (as a black box, not for the students to need to understand) to allow real 64-bit asm programming to have immediate access to flashy graphics and keep the attention of immature students.

I expect the bozo teaching 16-bit x86 asm at my son's university is not a competent software engineer and couldn't accomplish anything like that. If he had any integrity as a teacher, he would either decide his students aren't immature enough to need that or he would find one of the smartest students who would be able to set that up for him (but then he might need to learn asm programming himself, rather than teaching from a obsolete text book a topic he doesn't actually know).

Last edited by johnsfine; 11-23-2011 at 04:45 PM.
 
1 members found this post helpful.
  


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
LXer: Ubuntu 10.04 Start 0.48 Released; Now Supports Multiple Languages Thanks To You LXer Syndicated Linux News 0 04-29-2010 07:40 PM
save setting and languages flag in ubuntu?? matarodi Ubuntu 3 08-06-2007 03:40 AM
languages of linux: which languages can be choosen in suse and red-hat distributions? Klaus Schnorr Linux - Software 3 09-10-2005 02:19 AM
dpkg on ubuntu / changing languages bibilit Ubuntu 6 06-27-2005 02:22 PM
computer languages? limits? help! borgnet Programming 12 10-21-2004 08:16 PM

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

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