Differences between low-and high-level languages using the Von Neumann model - programming-languages

I'm confused by this textbook problem:
Assembler is a low-level language, but Java and Python are high-level languages.
Explain the difference with an example using the Von Neumann model. Choose either Java or Python.
I know the differences between low-level and high-level languages, but I'm having a really hard time figuring out a way to explain the differences using the Neumann model. I don't really see what the model has to do with low-or high-level languages? Any ideas?

Low-level languages take their fundamentals from the Von Neumann machine, so they are at a level very close to the machine. They are classified into machine language and assembly language. Also, the instructions are different on each computer, so they are difficult to program and are costly.
High-level languages are based on Abstract MAchines. Whenever a high-level language is being used, an interpretation or translation process will be necessary, which helps to convert the programming language to machine language so that it can be executed.

Related

Relationships beetween Complied/Interpreted/Scripting and other programming language classifications?

I got lost in the classifications of programming languages. What is the relationships between "Compiled/Interpreted/Scripting" and "OOP/Procedural/Functional", and possibly many "terms" for classifying languages?
I do not even know how to ask this properly. Looked for programming language hierarchy but every diagram is always missing some terms above.
There is not really a relationship between them, as they are different classification systems.
OOP/Procedural/Functional describe the syntax and grammar of a programming language.
It describes what a language looks like to the software programmer.
Compiled/Interpreted/Scripting describes how the language is processed, and what is necessary for a program to run.
Compiled languages are transformed into machine code before execution, interpreted and scripting languages are transformed into machine code during execution.
Examples of languages and their classification in either system:
Java is a OOP Compiled language.
Kotlin is a functional compiled language.
Python is a procedural interpreted language.
Javascript is a functional scripting language

Which language or tools to learn for natural language processing?

I am French, and am a former Certified Network Security Administrator.
I went back to university 3 years ago to achieve a Bachelor's degree in linguistics, and I am now going to enroll in a Masters Degree in Computer Science applied to Linguistics, with the objective of eventually trying to go through a Doctorate (but I'm not there yet :-) ).
The course will focus on speech recognition, automatic language translation, statistical analysis of texts, speech encoding and decoding, and information abstratction from textual sources.
The professors will let us use any computer language we want to use to code the algorithms and programs we will develop during the curriculum.
I used to develop web apps as a side gig for about 3-4 years and I am proficient in Javascript as I wrote software that used node.js at the server end and the browser at the client. I also have some familiarity with postgresql.
My current style of coding (if we can call that a style) is mainly procedural and I use object prototyping as my main way to create/manage objects in my code. I don't have much experience with object oriented language that use the concept of classes to manage the objects. Therefore I am pretty confident my current coding skills are definitely lacking in regards to what is required for me to write efficient code to deal with that stuff.
So my question is this : what would be the best computer language for me to learn in order to be effective in writing algorithms and data structure suited for the above mentionned linguistic areas?
Thanks in advance for your enlightened answers.
Sat Cit Ananda.
Your question is opinion based, so probably off-topic here.
In France, you have a lot of good courses on Ocaml which is developed at INRIA with several good books (notably, both in French, Developpement d'Applications en Ocaml by Chailloux, Manoury, Pagano; and Programmation de Droite à Gauche & vice versa by Manoury). J.Pitrat also wrote Textes, Ordinateurs et Compréhension; his latest book artificial beings: the conscience of a conscious machines will also interest you.
And learning several programming languages, not only one, is always useful (a single programming language is not enough to do Natural Language Processing; you need to learn several programming languages and several programming paradigms - both functional and object paradigms are useful, and also prolog). You could also start reading the SICP while learning Scheme. Learning more about Lisp-like languages thru Queinnec's book Principe d'implementation de Scheme et Lisp - the updated version of Lisp In Small Pieces will also teach you a big lot.
Java might also be useful (because some NLP libraries are available in Java). CommonLisp, C++2011, Haskell ... too.
Also take time to use and master Linux (and its programming) and free software.
In general, natural language processing requires a lot of computer science (and math).
For production NLP systems, Java seems to be the most common choice. It is a nice and safe language for beginner/intermediate programmers that scales well with codebase size, has a simple grammar and a vast standard library, and it is one of the most commonly used languages where software performance isn't the absolute top priority (or where performance can be scaled horizontally/distributed). I believe for example most of the higher layers of IBM Watson are written in Java. You'll also find it as one of the primary teaching languages in CS courses.

Functional static typed languages and parallel computation

It seems to me that statically typed, and functional languages are perfect for parallel computation. Since asserting strong type constraints such as the functional purity of functions should be easy. And additionally, these programming languages are already well suited for the types of computation-heavy programs that would trivially benefit from data parallelism.
However, it seems that beyond Haskell, none of the other strongly typed functional languages support OS-level threads to back their parallelism. Is it actually the case that Haskell is the only language that supports this sort of thing in the modern day, and that any of the ML series languages, don't provide good threading support among other statically typed language?
In Frege, you can use the fork/join Java API, here is a blog post covering it: http://fregepl.blogspot.de/2011/09/parallelism-in-frege-employing-forkjoin.html
I don't know much about Haskell, but I know that Erlang deals pretty well with concurrency. However, Erlang is a dynamically typed language and the concurrency is handled in the programming language and not in the operating system.
It is suited for parallel programming as it creates sets of parallel processes that may interact via message passing without requiring the use of locks.
For those who are not familiar with Erlang, here is the link for the language introduction.
There is also Scala, which integrates features of functional programming and object oriented programming. Scala runs on the Java VM and the threads communicate using an event-based model. This may be an indicator of the OS-level threads that you are looking for. Furthermore, it has built-in support for the actor model.
There is a book about Scala and multicore systems that you should take a look.

Which programming languages aren't considered high-level? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
In informatics theory I hear and read about high-level and low-level languages all time.
Yet I don't understand why this is still relevant as there aren't any (relevant) low-level languages except assembler in use today.
So you get:
Low-level
Assembler
Definitely not low-level
C
BASIC
FORTRAN
COBOL
...
High-level
C++
Ruby
Python
PHP
...
And if assembler is low-level, how could you put for example C into the same list. I mean: C is extremely high-level compared to assembler. Same even for COBOL, Fortran, etc.
So why does everybody keep mentioning high and low-level languages if assembler is really the only low-level language?
You will find that
many of the truths we cling to depend upon our own point of view.
For a C programmer, Assembler is a low-level language.
For a Java programmer, C is a low-level language and so on.
I suspect the folks programming the first stored-program computer with 1s and 0s would have thought Assembler a high-level language. It's all relative.
(Quote from Return of the Jedi)
According to Wikipedia, the low level languages are machine code and assembly.
From the source:
In computer science, a low-level
programming language is a programming
language that provides little or no
abstraction from a computer's
instruction set architecture. The word
"low" refers to the small or
nonexistent amount of abstraction
between the language and machine
language; because of this, low-level
languages are sometimes described as
being "close to the hardware."
Then, to answer:
So why does everybody keep mentioning high and low-level languages if assembler is really the only low-level language.
I don't know who "everyone" is, but I would venture a guess that back when high-level languages were not as commonplace as they are today, it was more relevant to talk about low-level vs. high-level (because there was a relatively significant amount of programmers writing assembly code). In modern times it is a less important distinction. Personally, I rarely hear people using these terms except to differentiate between assembly or not (except for those times when you might hear someone raised on Python referring to C or C++ as low-level, but this is not in the spirit of the original definition).
You're asking a relatively subjective question; it's a question about terminology, that vernacular, and perspective.
For example, is Lisp a high-level or a low-level language? What if the implementation is running on a Lisp Machine?
Often, when people attempt to build a spectrum from low-level to high-level, what they are trying to quantify is a degree of "closeness to the hardware" as opposed to the degree of "abstraction."
Qualities which count toward an implementation's closeness to the hardware:
The programmer directly controls the memory layout of data and has access at run-time to memory addresses of data.
Mathematical operations are defined in terms of the hardware or loosely defined in order to conform to different types of hardware.
There may be a library providing dynamic memory allocation, but use of dynamic memory is manual.
Management of memory during string manipulation is manual.
Converse qualities which count toward an implementation's abstraction from the hardware:
The programmer does not have run-time access to address of data (references instead of pointers).
Mathematical operations are defined in specific terms not tied to specific hardware. (e.g., ActionScript 3 supports the Number type which self-converts from integer to floating-point rather than experience overflow.)
Management of dynamic memory is handled by the environment, possibly through reference counting, garbage collection, or another automated memory management scheme.
Management of memory during string manipulation is always hidden from the programmer and handled by the environment.
Other qualities might render a language very abstract compared to the hardware on which it runs:
Declarative, search-based syntax. (e.g. Prolog)
With factors like these in mind, I would revise the spectrum you have written as follows:
Lowest level:
Assembly language of the platform in question.
Low-level languages with higher-level flow control than assembly:
C, C++
Pascal
High-level languages:
FORTRAN
COBOL
Python
Perl
Highest-level languages:
PROLOG
Python
Scheme
Python appears twice by intent -- it spans a portion of the spectrum depending on how the code is written.
As low-level, I would add:
.NET IL
Java JVM
Other P-Code used in environments like VB6
The "level" of a language is a moving target. In 1973, PL/I was considered a high-level language. Today, C is considered (at least by language professionals) as a low-level language [see footnote]. Some of the reasons:
Exposes machine-level representations of numbers
"Integer" arithmetic can overflow
No real support for strings, or at the very least, strings are not first-class
Manual memory management
Address arithmetic
Unsafe
A high-level language might include
Support for integer types independent of the target machine
Default integer arithmetic never overflows unless the machine runs out of memory
Strings as first-class values with, e.g., concatenation built in
Automatic memory management with no address arithmetic
Safe
Some candidates as "high-level languages" by this definition might include Icon, Scheme, Smalltalk, and some of your favorite scripting languages.
Back in the day when I was a young scholar and dinosaurs roamed the earth, people referred to Icon as a "very high-level language". As recently as 15 years ago you could even attend a learned symposium on Very High Level Languages. But that term isn't used much any more.
Why does everybody keep mentioning high and low-level languages?
Even though the difference between "high" and "low" keeps changing, distinctions like the ones listed above are still important. And there are so many distinction that the words "high" and "low" can be a useful shorthand. But not that useful—to a cynic, a high-level language is one that looks at least as powerful as whatever my favorite language is, and a low-level language is everything else. In other words, "level" can easily degenerate into mere name-calling.
Footnote: It's hard to find citations for terminology used at professional meetings, especially when professionals don't use the terms "low-level" and "high-level" because they're not so technical. But danben asked about citations, and I found a couple:
"To provide the required precision, experimental programs are usually written in a low-level language (eg C or Pascal)," in a refereed article on computer vision.
"The C programming language is well-known for its flexibility in dealing with low-level constructs," in an important paper by Necula et al.
P.S. Don't count too heavily on Wikipedia for good information on programming languages, especially if the Wikipedia reference cites no references or sources
Purely guessing here, but this may be a case of language-shift, whereby the distinction between low- and high-level langauges is slowly evolving in peoples' minds into the difference between managed- and unmanaged-languages, typed-and untyped-languages etc.etc. (at least in the way people are using the terminology).
To a large extent, "low-level" and "high-level" not binary categories but are a continuum. There are some languages that are clearly low-level (assembly, machine code), but beyond that there is really only "higher-level" and "lower-level".
As I see it, "lower-level" languages require code that looks more like the architecture of the computer, and "higher-level" languages accept code that looks more like the structure of the problem. But with that, languages can be high-level for one problem and low-level for another.
Low-level
Binary
Assembler
ET IL
Java JVM
Other P-Code used in environments like VB6
Definitely not low-level
C
BASIC
FORTRAN
COBOL
Python
Perl
Pascal
High-level
C++
Ruby
Python
PHP
PROLOG
Scheme

What are the most important programming languages to know for concepts? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In your opinion, what are the most important languages for a programmer to know? I'm talking about concepts, not about how practical the language is.
List the languages and a reason. For example, Lisp for functional programming, JavaScript for prototype-based OOP, etc.
Must know:
1) C (system programming, understanding of machine architecture)
2) Perl or Python or Ruby (practical day-to-day tasks)
3) Java or C# or C++ (OOP, and quite important to get a job these days)
Really important:
1) Haskell or ML (functional programming; changes the way you think)
2) Lisp or Scheme (power of macros)
Nice additionals:
1) Forth (very low-level, explicit stack operation + joy to write your own interpreter)
2) Assembly languages (know how your CPU works)
3) Erlang (parallel processing)
4) Prolog (logic programming)
5) Smalltalk (true OOP and true interactive developent)
The assembly languages of as many chips as you can learn for low-level knowledge.
C to learn more practical knowledge of low-level workings, since almost all languages are implemented in C.
C++ for object-oriented programming on top of the low-level goodness of C.
Pascal to learn how to work with strong typing.
Java to see how you can shield yourself from low-level concerns.
Perl to learn regular expressions, weak/dynamic typing, and other good things.
Python to see strong/dynamic/duck typing.
Ruby to see how object-orientedness works on top of Perl-esque weak/dynamic typing.
Common Lisp for that functional enlightenment.
Scheme for the emphasis on recursion.
Emacs Lisp so you can extend Emacs.
Haskell to see pure functional programming done right.
APL so you learn how not to write code.
COBOL so you can make mad money maintaining legacy code.
Erlang to really learn about concurrency. (Thanks to Pete Kirkham for correcting me.)
Scala for functional programming on the JVM.
Clojure for a Lisp-like functional language on the JVM.
Prolog to understand logic programming.
D so you can see why all the D fanatics are always so pro-D.
C# so you can program for .NET (and Mono).
F# so you can do functional programming on .NET.
Forth for stack-based languages.
PHP so you can see how not to create a language. (Just kidding. Learn PHP beacause it's really useful for web development.)
JavaScript because it's basically the language for client-side web scripting.
bash for a good, general-purpose scripting language.
Visual Basic so you can read the code your boss wrote. =)
INTERCAL for "fun."
brainfuck so you can torture your friends.
LOLCODE so you can convince them to still be your friends after you subject them to brainfuck.
...And so on.
C for understanding how the most other language(-implementations) and operation systems are implemented
I think the three languages that best combine practicality and coverage of programming concepts would be
C
Python
Javascript
From these languages you can learn low-level system programming, pointers and memory management, static typing, dynamic typing, high-level scripting, event-driven programming, OO programming, functional programming.
Obviously you're not going to get as pure an intro to functional programming as you would with, say, Haskell, but you can learn a lot of the concepts in Python and (especially) Javascript.
It is not the languages rather the paradigms you should know:
procedural (like C, Pascal)
object-oriented (like Java, C++, Smalltalk)
functional (like Lisp, ML, Scala)
If you understood one of these paradigms in one language, it is easy to learn another language in the same paradigm. And there are even more fields specially supported by languages that are important to understand:
parallelism (in Erlang or Scala)
declarative templates (e.g. in C++ or Prolog)
dynamic languages (e.g. JavaScript)
At at last you should always know what goes on under the hoods, so you better have a look at assembler.
I would say:
C or Assembler to understand how the processor work.
Smalltalk (or C#, Java, Python, Ruby, etc) to understand object oriented programming.
Lisp (any Lisp, Scheme, Common Lisp, Clojure) to understand high level programming, meta programming (macros), etc.
Haskell to understand type inference and other functional concepts.
If you are into distributed systems, I'll consider learning Erlang too. Those are the language I recommend learning, even if only superficial, only for the sake of learning even if you never use them to write a real application.
Its best to know a variety. This gives you a better overall perspective of the art of programming, plus, you get to choose the best tool for the job.
My current list would be:-
C - programming close to the machine.
Python - programmers nirvana.
Perl - for when s**t happens.
Java - cause it will keep you in work.
C# - cause it will keep you in work.
lisp, scheme or something functional to get your brain out of a rut.
SQL - for managing large data sets.
JCL, COBOL, VAX DCL, CShell VB - just to remind you how bad things could be!
A good short list:
C for the machine concepts
Haskell for functional programming
Smalltalk (or maybe Ruby or Simula-67) for object-oriented programming
Prolog for logic programming
Icon for backtracking and mind-blowing string processing
Bourne shell for Unix scripting
Might also include
Scheme for macros
Awk or Perl or ... for regular expressions
FORTH for tiny bootstrapping postfix wonderfulness :-)
For concepts, I would choose assembler and Java.
The first because you should know in intimate detail how machines work.
The second because you should understand how to shield yourself from the intimate details of the way machines work :-). By that I mean a language with a rich set of data structures at hand (so really Java could be Python, C++ with Boost and so on).
Well. I'd say learn C and javascript. They are most widely used languages.
You might want to learn Java/some .Net language and/or python/ruby: they're more convenient, tho.
This have the advantage that all those languages are reasonably well designed.
For example, don't learn PHP or C++ because they're a mess. They're used widely, you might want to learn them one day, but they can seriously mess with your mind.
Limbo - a programming language with concurrency and channels, what C should have evolved into. ( see also D, another C successor )
No-one else seems to be mentioning any declarative languages, so here are a few:
Prolog - a declarative language for logic programming
Modelica - a declarative OO language for modelling systems.
XSLT - a declarative language for transforming XML.
For parallelism, you don't get much wider than shader language, and the related OpenCL - typically 512 processors in parallel on a high-end desktop, rather than Erlang's 4 processors in parallel ( though with many scheduled processes ).
This is a good question. I know a lot of people, myself included, get stuck in a rut where we are just churning out code like one would churn out burgers at a McDonald's. Coding becomes too mechanical—we understand how to get things done, but often times we forget why these things get done behind the scenes.
In my world it's been C++/C/ObjectiveC that have taught me the most, even though I write C# every day at work.
For the most part, learning C++ has helped me learn about memory management and how the various objects are stored in memory, etc.—the actual science of programming. What really opened my eyes was the Programming Paradigms class offered at Standford that you can get off of iTunes and I think YouTube.
You already mentioned two, here are a few more:
Java: Java is a good example of OOP 'cause you HAVE to use oop, and it's designed from the ground up to be an OOP language.
BASIC: Although obsolete, it's a good example of procedural languages and it has a very easy syntax.
For web programming: PHP, ANSI-SQL, javascript.
Some people may argue that HTML and CSS are not programming languages. But they are esential for web app development.
For Desktop app development, C++ with the Qt Framework. Qt gives C++ the additional "cross-platform" fizz.
Pascal or Basic for start and to master basics of procedural programming.
At school we learned Haskel for functional programming.
And then one should try assembler or C for getting deep and Java for OOP.
A have no arguments for this - that's only my taste and what I tried.
I would sat C/C++ cause it sets allot of basics for allot of other languages used around the world.
Personally I learned Java/JavaScript->VB(short course fortunately)->C#->C++, with a pinch of PHP and Perl on top of it all. Best part of that line was C# and then moving behind the scene in C++.
Look for a set of different programming languages:
C++ / C# / Java etc.
C / Assembler
Python, Ruby, Lua, Perl etc.
sh, awk, sed, regular expressions
Prolog (or similar)
Haskell / Lisp etc.
It doesn't really matter which ones you choose, but that you choose one from each "category".
Pseudocode for reading/writing documentation. :p
I think knowing C/C++ or any other low level language will help you with understanding the impacts of how managed/script languages works helps. Such as pointers will demystify variable references.
If you want to understand computers and the underlying hardware, C is the single most important language, commonly said to be the lingua franca of computers. The Stackoverflow podcast tends to cover this at least once a week.
There seem to be enough answers on this, so I'll just leave it at that.
You should know a scripting language so that you can prototype your applications faster.
Maybe python/ruby/perl . Groovy is also an alternative if you're a Java guy that likes his java libs.
Alot is already mentioned but I would definitely add C++ (already done) for the following reason:
C++ for learning how to use pointers and get the main idea about them.
Although there is the discussion if c++ is still the 'better' language (all depends on what you want to make really) it never hurts to understand pointers, just in case you do need them ever.
Having a scan through the answers so far I'm surprised I've not seen any mention of actionscript.
I think if you learn some C/C++, then some Java then that should prepare you for pretty much all of the decent languages out there.
I prefer to see my code in action and I find Actionscript 3 (not 2 or 1) along with Flex (which is MXML) great for quickly demoing visual concepts.
So C & Java helps to learn the syntax of the majority of languages.
Actionscript 3 (very similar to java syntax) & MXML for being able to express you code visually very quickly.
C - low level system programming plus to understand generic concepts about how memory is handled, stack, stack frame, heap and so on. These are helpful for understanding higher level languages
C++ - mainly std library (separation of generic algorithms and containers), templates, namespaces, but OO concepts as well. Templates meta programming will give you completely different perspective on writing software, this is compile time execution versus run time execution. Templates inheritance (static vs dynamic polymorphism).
Python - dynamic type system, list comprehension - functional programming (?), no memory management for developer, spaces for indentation
Objective-C - message dispatching (can dispatch to nil), dynamic type system (static as well), late binding, OO concepts
It may sound crazy, but I first learned to program writing VBScript macros for windows. I used a template, which is available here http://vbscript-macro-template.blogspot.com/ and I just added to it and also tried to understand everything that it did. Now, several years later I am writing my own desktop and database applications.
You should start from C and go through C++, Java and the goto WinForms,
Then better goto .NET

Resources