The superior programming language

Hello Veeky Forums, novice programmer here.
I know that the Veeky Forums board is about math and science only, but i find that Veeky Forums would likely be the best fit to determine the superior language. Especially since you all bicker o much over minute shit like fields of science, i though that bickering could be productive for once.

With all this in mind i simply must ask:
Which programming language is the best to learn?

I'm looking for something that:
- can be easily embedded into other languages (like Lua into Java for example)
- Has the most direct compiler (least number of steps between programming language and machine language)
- Universal between the broadest range of systems (Linux, apple, windows, pi, etc.)
- Most efficient (least number of lines of code necessary to get the same stuff done, for example: java requires about 6 lines of code to print "hello world" whereas Lua requires only 1)
- anything else tht would make a progamming language helpful

get to it Veeky Forums.

Other urls found in this thread:

tiobe.com/tiobe-index/
en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
functionalcs.github.io/curriculum/
lambdanative.org/
mitpress.mit.edu/sites/default/files/titles/content/sicm/book-Z-H-4.html#%_toc_start
arxiv.org/pdf/1602.02120.pdf
twitter.com/SFWRedditVideos

bump

Lua obviously

C++ is the best to learn. Almost any other language you learn will be taught using the principles of C++. Most books about programming do it from the perspective that you have learned C++. C++ is great at learning the fundamentals of programming which would be lost on you if you took another language first.

Adga and Idris are the best programming languages right now.

Isabelle/HOL and Coq are the up-and-coming soon-to-be best programming languages before long (~5 years).

Typo: misspelled Agda.

Best to learn and best are two different questions. Best to learn is either Java or C++, because if you ever try to use programming for anything real (and you aren't a researcher) it's overwhelmingly likely that's what you'll be using, at least at first.

There is no universal "best" language. There's arguably a best language for some specific purposes and there is your favorite language though.

Obligatory Haskell answer

Agda is superior to Haskell.

>Agda
not buying it.
agda seems to be too heavily based in math logic and lacks the syntax of most other languages.

How does it work in relation to the desired set of properties i mentioned above?

agda and haskell are both intimidating.
Agda is too abstract and math-based, a pain in the ass to deal with for someone who is a c student in maths.
Haskell is closer to something comprehensible, but still rather intimidating.

Here is what i have experience with:
- Java
- Flash
I am novice because im still quite new to programming languages. C is the closes to what i am familiar with, but seems less straight forward than Java. Lua (from my understanding in research) is the most straight-forwards and comprehensible, while being the most efficient.

I as that you two:
&
please explain in terms of the desired properties i mentioned why these languages are superior.

If you don't understand type theory and type systems you have no business doing programming, period.

If you don't even know how to construct a loop invariant I don't want you programming anything that people are going to ever use.

there is only one answer
C
not by any means easy. I prefer FORTRAN for my own work. but C allows you to direct your machine to do very specific detailed things (memory allocation, custom structures, the list goes on), it offers a lot of control.

Just program a proof in coq and use it to generate a proven ocaml program. Only brainlets would do it another way

Endless list of vulnerabilities shows that dudes have no control over what they write.

>not compiling Coq to Haskell instead

Why would you ever use an impure language?

because i can use it for other purposes than pure masturbation.

>If you don't understand type theory and type systems you have no business doing programming, period.
>If you don't even know how to construct a loop invariant I don't want you programming anything that people are going to ever use.
how awfully inviting. I have never heard of either of these terms before now.

>Two well-known type theories that can serve as mathematical foundations are Alonzo Church's typed λ-calculus and Per Martin-Löf's intuitionistic type theory.
I got anxiety when i saw the word calculus. user, im shit at math. I recently decided to test the waters of programming to see if i would be competent.

I'm new user. Have some patience, a lot of the things i see (like torch and haskell) are quite collosal to my new mind, and math is a despised aqquantence of mine (since i was always a c student). Have some patience and explain to me how agda or haskell fulfills the following:

>- can be easily embedded into other languages (like Lua into Java for example)
>- Has the most direct compiler (least number of steps between programming language and machine language)
>- Universal between the broadest range of systems (Linux, apple, windows, pi, etc.)
>- Most efficient (least number of lines of code necessary to get the same stuff done, for example: java requires about 6 lines of code to print "hello world" whereas lua requires only 1)
>- anything else that would make a programming language helpful

agda and haskell seem more abstract than java or lua. They certainly seem to fill the "direct compiler" requirement, as they seem to be the closes to the machine's language itself, though this makes it much more abstract and difficult to understand for a novice sch as myself.

Absolutely retarded question. It depends on what you are trying to do. My top (as a math/applied math major working in finance)

R
Python
Mathematica

For pure knowledge reasons
Haskell
Ocaml

Don't forget you're on Veeky Forums. Don't get memed.

Somebody said it above - there is no best language, but C++ is THE fast language with all the libraries (code modules that you can steal and use) that has the object oriented paradigm that spread everywhere after it's introduction. On the other hand, it's relatively hard to learn and it will wire your brain that you'll always default back to a certain kind of inherited ugliness. And it will never go away because of the libraries and because old people teach what they know and the students eventually become the old people and it goes full circle.
If you want a job, you need it, or C, and Java for business, which is also not pretty but has libraries.
If you want web-stuff, then there are many languages and they change like fashion.
If you just want to do scripts (stuff like "oh noes, I want to replace 'color' with 'colour' in 65 files, let's quickly write a few lines that do that and some more"), then you'd go for Python. And Python is also maybe the easiest language to learn and read while still be asked for in at least some jobs. And especially in the sciences. C++ is surely not "Most efficient", while Python is compact. But not compiled, usually.
Here on the boeard you get domain specific responses like : Nobody not in such or a related field would ever think of learning R or Mathematica.
And then there is research languages like Haskell, which let's you stop from being a monkey for a while and converse about pretty things in life (pretty math and logic), but there are no companies wanting coders. And then there are derivates like Adga, Idris, Coq, which knowbody knows and which Veeky Forums faps over.
tl;dr tell us what you want out of life.
The compiler point of you shouldn't be a problem. All compiled languages are simple to compile, I'd say.
Maybe the key word "Virtual machine" clears up some of your issues?
PS learn Idris.
Pic related is
tiobe.com/tiobe-index/

I find very few reasons to use anything other than Python these days.

If I need speed I can usually find a C++ backend with python bindings to do what I need.

Haskell has monads.

lmao, good response user. That's why I prefer FORTRAN, its a bit more... forgiving to the average coder.

I'm just a mathy type guy, so my scope of coding is intimate, but very narrow.

You should never need to use fortran unless you're working with HPC.

>>- can be easily embedded into other languages (like Lua into Java for example)

>not Lua into C/C++
>using Java at all

Kill yourself

>write once, run everywhere

I use matlab for everything else, but I thought i would catch some flak if I posted about it in a code thread

This is what i meant by "can be easily embedded into other languages (like Lua into Java for example)"

>tell us what you want out of life.
to have a language that is commonly used in programming careers, is universal between systems, and fulfills the most of the listed features i inquired of.

Then, better use Scala instead of Java.

does scala embed into other langauges?
If so then what languages?

Scala runs on the JVM so goes perfectly with Java. But I was referring to which refers to which defends Java by "write once, run everywhere".

American Dairy Goat Association

>JVM
what is that?

>t. Someone who is deluded about programming

Java is probably the most portable, but it is also the most shit...

Commonly used in programming that isn't shit would be C++

BTW, all languages that don't have a logic, heavy math focus, are

B. R A I N L E T
R.
A.
I.
N.
L.
E.
T.

tier, as it probably means you want to programming as a career, and never do research, which for the most part means you should visit /g/ instead of Veeky Forums

The only people who get a pass in STEM here with computers are actual computer scientists, but those are fucking rare, and you don't sound like that's anything what you want to do.


The mere fact that calculus scared you means anything "interesting" to Veeky Forums is beyond your reach unless you decide to attempt losing your brainlet status.

Seriously, most of what we like here is autistic elitism, but it's not unfounded or unwarranted. We simply want nothing to do with people who can't pass relatively basic math courses, or at least that they're not interested in pushing through it for the very simple fact that the most interesting shit in the world, takes a lot of hard work to learn.

I suggest you spend several more months between here, /g/, reading the wiki's for both, especially /g/'s

After a while you should get a sense for what's interesting to you and where you want to go.

Don't ever immediately make a decision off what you read on Veeky Forums in general though, you could easily be getting memed, and cutting your teeth on some of this shit really is a big mistake. Always investigate shit for yourself, taking into account all the info you can.

Then think about it, weigh your options and goals you want to meet, and don't be a fucking screw up.

You read my post and responded, but didn't follow my suggestion on reading up the Virtual Machine. Shame.

i'm a little lost on future goals atm.
I'm just looking into programming or computer science as a carrer.
Calculus gave me anxiety because i hear all sorts of nasty shit about it, and fear that i may fail if i should attempt.
What i find interesting is physics, but that shit requires calculus and the aformentioned anxiety makes the prospect difficult.

That's a silly question. There is no perfect language. That's as if you were asking someone to tell you which tool is the best, the hammer, screwdriver, saw?...

the answer is simple, the more tools you have, the better and faster you can do your job!

I recommend that you look at these in any order
Java - great portability
C/C++ - Fast, scalable, plenty of references and easy to learn
R/Matlab - Great for math, analysis, satistics...
Python/Perl - Probably best for working with files and data, also powerfull for web applications and data gathering
JavaScript 2 - Idk, but might be the future of web developement.
Haskel or other Functional language - Might be usefull if you need to seriously parallelize your computations!
OpenCL/CUDA - very similar to C and allow you to compute stuff on the GPU, which is way faster and parallelized!

There's probably more more i forgot to mention right now... just... repeat this simple list everytime you are about to solve some problem:
1. define your task
2. pick your tool (language)
3. ...
4. Profit

What bad could you hear about calculus?
calculus is just normal math, but different. Nothing scary about it. I've only done Calculus I and II but once you get the basics theres not much that can go wrong.
Sure, it's a bit anti-intuitive at first, but soon you realize it's just normal math. You apply specific rules to specific situations, plug in your numbers and get a result...
don't let it get to you... Look at some Calculus classes online so you get the basic idea and you'll see it's actually pretty simple

whenever i ask people who have been in calculus I or II what it is like, all i hear is that it is really bad.

I will heed your advice.

I mean, It's not like I have great and fun memories of it. It's school after all. But I don't regret understanding it.

I'm going through this now

en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours

everyone welcome to join

VBA of course, the only language you need in an actual job.

People are retarded think about how many Americans find basic algebra hard. Could you trust them on their opinion of number systems for instance?

How do we join? Is there a discord channel?

Don't listen to anyone in this thread.

The answer is Python. Python works on every system, and it's the only one that has libraries that allow for scientific computing and advanced statistics. Every engineer in the valley uses it to some extent.

Why have you come to Veeky Forums with this question you fucking numbskull?

There's no objective best language.

Whatever you do drop Java asap.

Always the same:
C for hardware stuff.
C++ for video games and high performance program.
Java for mobile apps.
Python for everything else.

Oh, I donno. We can also make a thread, if people care. I started reading in any case.

Rust

There's a reason that "Rewrite it in Rust" is a common phrase.

>- can be easily embedded into other languages (like Lua into Java for example)
Python
>- Has the most direct compiler (least number of steps between programming language and machine language)
Assembly
>- Universal between the broadest range of systems (Linux, apple, windows, pi, etc.)
C
>- Most efficient (least number of lines of code necessary to get the same stuff done, for example: java requires about 6 lines of code to print "hello world" whereas Lua requires only 1)
Python

This

>I just passed CS 101: the post

Haskell is the superior language

What he said kinda.

You have three choices for jobs atm:

I like VHDL and have a math background strong enough to do signal processing.

Get very good at FPGA design(I know this may no be a traditional language but big $$$)

Get good @ RDB+Java+scripting+MatLab+SAS for the business $$$

Finally get good enough at C where you can suck my dick and make me a custom file system simultaneously and Ill pay you the big $$$

shame, how old are you?

19
20 in september
am leaf

In university currently, plan on taking computer science basics next semester. (i am currently undergraduate)

>There's no objective best language.
>avoid java like the plague
what did he mean by this?

Learn any functional language
functionalcs.github.io/curriculum/

- easiest to learn as a beginner since directly associated with math you prob already know from highschool

- easiest to verify as correct
- easiest to write large programs with in terms of less code to get shit working
- easiest to reason about
- easiest to make your own DSL for your embedding purposes/mini interpreter

Imperative languages you need 10,000+ hours in order to write competently any large project because of all the corner cases/gotchas and undefined behavior you need to know about through experience. Functional languages none of that exists.

Another bonus not mentioned is least amount of time sitting in front of a computer screen. You can write, optimize, and even verify/debug a functional program on pieces of paper. Where I work this is exactly what we do, sit around with pieces of paper and a whiteboard doing almost all of the work like running complex analysis on our paper program before ever sitting down in front of a keyboard. The actual entering of the code just takes a day. Before I switched to a functional language I was spending 12hrs a day in a typical shitty warehouse style 'open office' with dozens of other developers glued to a keyboard running endless tests which you don't have to run either when writing a functional program.

You can abstract all of those with Common Lisp, Scheme, or even Standard ML.

Write once, export to any platform you want like this project lambda native lambdanative.org/ which allows cross-platform building by pushing a button

Because i know what i virtual machine is:
>a virtual machine is an emulations of a computer system.

You response was helpful but also a bit confusing to understand. Thanks either way.

Obviously the answer is straight up assembly code

C++ has a lot of fat on top of the fundamentals. My uni hasn't used it in introductory courses for a long time now and teach C instead

There are multiple steps to even forming a string in assembly, much less printing one to the screen

C# for Windows programs

>Imperative languages you need 10,000+ hours in order to write competently any large project because of all the corner cases/gotchas and undefined behavior you need to know about through experience. Functional languages none of that exists.

In functional languages you can't even do loops without relying on the compiler to optimize tail recursion into loops.

You're kidding yourself if you think deep knowledge of inner workings of the compiler and OS isn't necessary to write passable functional code.

>JavaScript 2 - Idk, but might be the future of web developement.

JavaScript IS web development right now. And the JS cancer is trying to infect the back end next

Also,
>Cal Newton
>Cal Newport

What the fuck

>print "string"

>You're kidding yourself if you think deep knowledge of inner workings of the compiler and OS isn't necessary to write passable functional code.

It's not though, only deep knowledge about the program you are creating in terms of reasoning about types is required whereas deep knowledge of the compiler and OS is necessary to write any passable program in C/C++ considering std::unique_ptr, move constructors ect since the compiler inserts free for you at a hopefully-useful place but neglects other issues like dangling iterators, references, or pointers. Esp like dereferencing a moved-from unique_ptr which is undefined behavior and not caught unless you know about your compiler and have set it to hardened modes.

C/C++
/thread

what I mean is that JS might be worth learning or re-learning now that we have ECMA 2015 and 2016. Those new standards make it way more usable for complex apps

>Embed
TinyScheme

>Direct Compiler
Every language producers direct machine code

>Universal
Any language can be universal all these operating systems have APIs/system calls

>Efficient
Scheme or Lisp macros

>Anything else
Scheme you can rewrite Lagrange equations and debug your Phys homework mitpress.mit.edu/sites/default/files/titles/content/sicm/book-Z-H-4.html#%_toc_start

>try to sort a list in place
>can't because everything is immutable
>can't even use a hash table

Functional programming is not practical.

You can do imperative programming in a functional language if you want and make all the hash tables you wish though why would you when BSTs exist you can search in parallel, which is the default these days for SML/OCaml ect. You can also try this in C/C++ arxiv.org/pdf/1602.02120.pdf

>Every language producers direct machine code
No, except you have a very wide definition of machine code.
>Any language can be universal
If you consider compiling for each platform as "universal".

>You can do imperative programming in a functional language
If the language supports this paradigm. Show me imperative haskell code.

If it isn't Lisp, it belongs in the

seriously? no one has mentioned Julia yet?

>I'm looking for something that:
>- can be easily embedded into other languages (like Lua into Java for example)
Julia is extremely fast, it has C-like speed so that it doesnt need to be embedded, it replaces C/C++ and Fortran. It calls C functions directly, no need for wrappers

>- Has the most direct compiler (least number of steps between programming language and machine language)
Even though its a dynamically typed scripting language, it compiles directly to machine code with the LLVM compiler, the code is JIT'ed

>- Universal between the broadest range of systems (Linux, apple, windows, pi, etc.)
Julia is ported to all major platforms

>- Most efficient (least number of lines of code necessary to get the same stuff done, for example: java requires about 6 lines of code to print "hello world" whereas Lua requires only 1)
Julia has Python/Ruby-like syntax, this makes it very good at doing general purpose programming. Julia is not tied down with OO, it is meant to replace R and Matlab so its an array based language

>- anything else tht would make a progamming language helpful
Julia can do systems level programming, so its a do-everything language, it doesnt need Java/C++ backends

>fewer LOC means more efficient.
Ah, I can really see how novice you are.

Disregarding Assmbly, C is the computationally fastest language with most cross platform support. I'm a Math Grad (working on master's now), I use C for any big computation after outlining and testing an algorithm in Octave.

This guy is right.
The title suggested that you wanted a more math-oriented language, such as Haskell, LISP or APL, which IMO are the best languages, Veeky Forums-tier.
Then you come with a list of completely inane criteria, such as "something that'll land me a gud job no matter how shit it is", so the title of the OP is misleading and the thread belongs in Seriously OP, your question is pajeet-tier. I don't mean to say that those languages are useless and that we should live in a pure-functional paradise and pretty much alienate ourselves from the real world, but your orientation is complete job-oriented, shows you have no interest in the theory of programming by itself but just on getting some job as a code monkey.
There are some languages that are both theoretically interesting and useful in the real world, but you are just asking people to tell you "python, man".
tl;dr OP belongs in >>>/india/

I wish we had more people like you, now we have people like OP (hell, I really despise this guy after reading his bullshit) who are shitting all over the field and now we have a horrible mess, where every step of the way is nothing but pain.
I've been programming for a few years, always learning, and I've come to abhor the state of the field right now. And it's thanks to people who just want things easy, just to get the money rolling.
Not that I have a problem with money, only with mediocre people.

I'm sold.
I will start practicing this summer.

I'm not doing it just for money. I am interested in making some programs that serve actual functions: like a road-map that accounts for traffic density and probably obstacles. Or an AI that can play dark souls, etc.
Programming is genuinely interesting but i am a newbie at the thing. Perhaps i can improve with time and learn what all these things are.

>huur you dont know about types
>huur, I know type invariants, I can do pleb-tier imperative programming
you wish you could be a medicore programmer instead of a wannabe fizzbuzzer

I just wish people would actually give a fraction of a fuck about actual mathematical/theorical principles of programming when they come and post in Veeky Forums, especially when they claim to search for "The superior programming language".
And no, I'm not a fizzbuzzer, but nice slur you got there

Obviously C user

Why are you even asking this...?

>not first designing your program in theory and then deciding which language will serve your purposes best
Brainlet detected, go learn Scheme or something so you can wank off in the corner alone over muh lambda calculus. Never see carpenters or plumbers arguing about whether wrenches, hammers, or screwdrivers are the best tool, they just use the right tool for the job, finish it, then go home and bang the wife. Only CS faggots seem obsessed with trying to make the best swiss army knife language

You want C but you want object abstractions, fine, use objective C and cut away the mountains of chaff.
C++ is pretty poor at everything tbqh