I am looking to learn a new programming language. I have a a decent amount of python experience, and a tiny bit of HTML and CSS knowledge. Any recommendations for a heavily used, popular language?
Kratos
I was afraid of that...it looks TOUGH.darkbibble wrote:if you learn C you can pretty much code for any machine
Yes, I was considering Javascript, as it looks easier to learn than Java. I also enjoy making cool stuff for others to see. C (correct me if I am wrong) seems more like a language for hardcore geeks who enjoy wreaking havoc on computers.Pithagoros wrote:I am with IPSW on preferences there
C is not tough to learn. Memory management is sometimes a bit tricky, but not the language.
However, I am thinking that javascript which is not java would augment your HTML and CSS knowledge and let you foray into HTML 5.
I would look at something that runs in the JVM and the browser, for example Scala or Clojure. In the case of Scala, it includes a lot from Java and this means you'll see a lot of C like syntax but without the semicolons. Even though Scala is clearly more encompassing, it might be easier to start out with because it requires so much less, they call it "ceremony". I guess that's defined as stuff that you add to your program perhaps every time but you can't explain why to a new user in a clear and non-confusing way. One might argue that the braces used in C like languages but dropped in Python are an example of that, the new user asks: "Why do I indent *and* show the form of the program with the braces too, why both?" A good argument might be made for that one but perhaps not so much with all the stuff added at the start of a Java application. Scala (and Clojure) work in the JVM and in the browser, so you could perhaps create a program that worked in both.Kratos wrote:I am looking to learn a new programming language. I have a a decent amount of python experience, and a tiny bit of HTML and CSS knowledge. Any recommendations for a heavily used, popular language? Kratos
C is just a language that has been around forever, it can get you a bit closer to the hardware but you can use it anyway you like. You don't have to go straight into hardcore hacking. I mean, you could learn conversational Spanish but you wouldn't need to start analysing Cervantes.Kratos wrote: Yes, I was considering Javascript, as it looks easier to learn than Java. I also enjoy making cool stuff for others to see. C (correct me if I am wrong) seems more like a language for hardcore geeks who enjoy wreaking havoc on computers.![]()
Kratos
That would be Javascript (Which is not Java).Any recommendations for a heavily used, popular language?
It was originally for writing operating systems, unix specifically. As a result, it's pretty much a glorified assembly language. Learning an *actual* assembly language would also be a good choice. Not so much because you'd be writing a lot of code in it (such languages are very, very hardware specific) but that it will aid you in understanding just what a compiler really does with the higher level code you write. I tend to refer to such languages as getting down there with the hardware to argue right of way with the processor.Kratos wrote:I was afraid of that...it looks TOUGH.darkbibble wrote:if you learn C you can pretty much code for any machine
Kratos
That is so far from true....it's [C] pretty much a glorified assembly language.
Couldn't agree more. If one really wants to learn the fundamentals of programming the Pi (or any ARM chip), that's a good place to start.Heater wrote:W. H. Heydt,As it happens the ARM processor as used in the Pi is a lot nicer to program in assembler than the Intel x86 of the PC world....it's [C] pretty much a glorified assembly language.
You can create any sort of programming structure you want in an assembly language. After all...everything comes down to machine language in the end. It's just a matter of how much abstraction you do above that, from pure symbolic version of machine instructions through macro assembly and on up.Heater wrote:W. H. Heydt,That is so far from true....it's [C] pretty much a glorified assembly language.
I don't know any assembly languages that are portable across processor architectures. Unless you are targeting some kind of virtual machine.
Assembly languages don't support structured programming.
C might be one of the lowest level "high level" languages that can do this but it is conceptually far a way from assembler.
I do agree though. Anyone with an interest in programming should learn at least one assembly language, That is to say one machine instruction set. It's good to know what goes on down in the engine room.
As it happens the ARM processor as used in the Pi is a lot nicer to program in assembler than the Intel x86 of the PC world.
Of course that is true. As you say: "everything comes down to machine language in the end".You can create any sort of programming structure you want in an assembly language.
Everyone has recommended powerful and popular languages. Maybe it would be more practical to learn more about Python by looking at PyPy (a compiled version of Python) and also at Parython (a parallel version of Python).Kratos wrote:I am looking to learn a new programming language. I have a a decent amount of python experience, and a tiny bit of HTML and CSS knowledge. Any recommendations for a heavily used, popular language?
Kratos
Excuse? Most of the first part of your list boils down to variations on subroutines, which if not supported directly by machine instructions (as was done on the IBM 1620 with the Branch and Transmit operation), are found in programming conventions, such as loading a specific register with a return address before branching to a subroutine (register 14 was the convention on many IBM S/360 and S/370 operating systems, permitting a return using "BR 14", hence the "do nothing" IEFBR14 utility). Floating point can be handled with subroutine libraries if there aren't any machine language instructions for it. As for the rest, *all* of them have to implemented at a machine code level, and--therefore--have to be possible in assembly languages.Heater wrote:W. H. Heydt,Of course that is true. As you say: "everything comes down to machine language in the end".You can create any sort of programming structure you want in an assembly language.
But you don't get any, or much, support for high level concepts like functions, procedures, methods, lambdas, closures, parameter passing, iteration, functional programming, object oriented programming, list processing, declarative programming, data structures, big numbers, floating point (if your hardware does not support FP), parallel processing, encapsulation, etc, etc.
To misquote a certain author...it's subroutines all the way down.It's those high level abstractions that make it tolerable to reason about large programs. Allow code reuse. Ease of change. And so on.
I'm not quite sure what you mean by the "neologisms". For example C and other languages have things called "functions". Only problem is they are not functions at all. They can maintain internal state. They can change global state. They have side effects. All things that functions are not supposed to do.
So "methods" in the object oriented world, is a far more appropriate name.
C didn't invent that. It goes back to at least the first version of FORTRAN in the 1950s.Heck C uses "=", which is an assertion of equality in mathematics, as an assignment operator. How crazy is that?
Those are parts of tables. For "column" read "field". For 'row" read "record". At least for anyone whose programming pre-dates the advent of RDBMS.What is the "columns" and "rows" thing about?
Hmm... This programmers first experience of programming, in Algol, BASIC and assembler, predates the introduction ofThose are parts of tables. For "column" read "field". For 'row" read "record". At least for anyone whose programming pre-dates the advent of RDBMS.
Indeed it does. At least Algol did not make that mistake. A mistake that has been perpetuated ever since through the linage of C, C++, Java, C#, Javascript, etc, etc.C didn't invent that [= assignment]. It goes back to at least the first version of FORTRAN in the 1950s.
I do see what you mean. And to some extent I agree.To misquote a certain author...it's subroutines all the way down.
I'm not sure what you mean. The 6502 (8 bit) microprocessor had JSR-RTS instructions -- the basis of every type of subroutine. The return address was handled automatically, though of course all parameters had to be passed in the three (!) registers, or in memory.Heater wrote: There are no "subroutines" in assembler or machine instructions. There may well be mechanisms to support them, using the stack, or dedicated registers as you say.
Certainly the 6502 and many other machines have support for subroutines, functions, procedures etc. Perhaps using the stack, like JSR/RTS, or some register to save a return address or whatever.I'm not sure what you mean. The 6502 (8 bit) microprocessor had JSR-RTS instructions -- the basis of every type of subroutine.