So… programming is speaking to a computer to tell it what to do, right? Like take this input, put it into this memory, process it in this and this way and give me output? And some of these orders can be expressed in some languages better than in others?
Only masochists use Fortran. (Or if forced to use it by a sadist)
More or less, yeah.
Mostly yes, but there are also orders that only work in a select few languages. So instead of a preference the decision becomes forced / limited.
What does this look like exactly, and what is the role of the compiler in that?
american English
end of todays episode of the ogs sitcom
Hard to pick a favorite but I can tell you perl is my most hated.
Edit: Actually I did really like python when I was learning. But I think C++ is probably the one I delved the most into since it was what the engine used that I was working with.
Um I thought they were using ROOT (C++ based)?
To be clear, we are not discussing quality so much as we are describing affinity to a certain language. Much harder to make a case that a certain language is better quality than another.
The things that make me like a language:
- intuitive
- simple syntax
- I feel that syntactic sugar is one of the things that makes a language most unique. Python’s got list comprehensions, for example.
- ease of maintenance
- in a large complex codebase, strongly typed languages like C++ and Java may be easier to work with than JS or Python
- Time spent debugging (I hear Rust gets a lot of points here)
- Just for fun: sometimes it’s fun to program in esoteric languages like brainf**k
- programming paradigms
- Object oriented (pretty much all the popular langs except C)
- Functional (Haskell, scala)
- power, a two sided coin
- python is powerful in that you can write up a power ML script in like half an hour.
- c/c++ is powerful in that you are very “close to the metal”, so you can do all sorts of nifty optimizations.
- ecosystem
- JS and python have excellent package managers, which make it easy to get the library you need
This is but a small imperfect list, but just a few things I think about when looking at a programming language.
Can’t believe you didn’t mention compiling
Hahaha I’m a jerk like that
But now that you’ve got me thinking, I’m not sure a compiler makes me “like” a language any more or less. Speed vs. portability I suppose would be the criteria that depends on compiler v. interpreter.
I like Turing machines (especially infinite time ones)
Ah yes, transfinite ordinal time. I totally know all about that >.<
Is this in the same wheelhouse as machines that can compute non-deterministic algorithms?
No, it’s a different expansion. The abstract is very densely formulated, but the actual article is very readable if you’re familiar with standard Turing machines.
As for ordinals, I think all you need to know is that if we keep counting 0, 1, 2, … to infinity, then we just call the step after having gone through all the natural number ω, the first infinite ordinal. Then we can keep counting onwards, ω+1, ω+2, ω+3 … etc. until we reach ω + ω = ω•2, and onwards, ω•2 + 1, ω•2 + 2, … and so on to ω•3, ω•4, and so on to ad infinitum. We call the step after all of this ω•ω = ω2. Then we can still keep counting onwards and onwards (it never ends )
I’m only lightly acquainted with both concepts, but I’ll check it out!
Should be said, just to avoid confusion, that nondeterministic Turing machines can compute the same things as deterministic Turing machines, and that the real problem is not whether something can be computed, but how fast it can be computed. If I remember correctly the famous P = NP problem is equivalent to showing that deterministic Turing machines are just as efficient as nondeterministic ones.
The interesting thing about infinite time Turing machines is that they can actually compute problems that are not computable in finite time. For example, an infinite time Turing machine can solve the halting problem for finite time Turing machine: if we have a program P and we want to know whether it halts in finitely many steps, we just start running it. If P has finished before step ω, then P halts, and if not, it loops.
This shows that infinite time Turing machines are strictly more powerful than finite time Turing machines, since a finite time Turing machine can never decide for all programs whether they halt (in finite time) or loop.
That’s a good distinction. It’s easy to forget that there’s a difference between taking forever and taking forever
So which side of the debate do you land on? Does P==NP??
If I had to choose, I’d say they’re different, mostly because of nobody ever finding a polynomial solution to any of the many different NP complete problems. However, it would be a lot more exciting if it turned out that they’re equal, so I hope for that
My criteria for a good language: ease of maintenance and raw performance (as I write scientific codes that have to churn through lots of calculations so performance counts). C++ offers the best balance of those two factors. But also important is familiarity, so what Fortran lacks over C++ in terms of ease of maintenance it makes up for in familiarity (for me - I really should just learn more C++). Also, speed of writing, so I often take a performance hit by using Python for non-performance-critical applications cos it’s so dame quick and easy to write.