A language that allows you to talk to and command a computer.
Those two are languages not by any means perfect from a language design point of view, and there are likely already better alternatives, they are only chosen due to a pragmatic tradeoff between ecosystem and familiarity.
C++ however is decent, and is evolving in very good directions in the 2010's, and will remain relevant in the foreseeable future.
Bash can also be used when you're lazy. But if the project goes on, you will sooner or later regret that choice.
The language syntax in itself does not matter. All that matters is how many useful libraries and tooling it has.
This is how other languages compare:
- C: but cannot make a large codebase DRY without insanity
- Ruby: the exact same as Python, and only strong in one domain: web development, while Python rules everything else, and is not bad on web either. So just kill Ruby, please.
undefinedrather than blowing up is bullshit.
- Go: likely a good replacement for Python. If the ecosystem gets there, will gladly use it more.
- Java: good language, but has an ugly enterprisey ecosystem, Oracle has made/kept the development process too closed, and API patenting madness on Android just kills if off completely
- Haskell: many have tried to learn some functional stuff, but too hard. Sounds really cool though.
- Rust: sounds cool, you will gladly replace C and C++ with it if the ecosystem ramps up.
- C#: Microsoft is evil
- Tcl, Perl: Python killed them way back and is less insane
- R, GNU Octave and any other "numerical computing language": all of this is a waste of society's time as explained at: Section "Numerical computing language"
- Swift: Ciro would rather stay away from Apple dominated projects if possible since they sell a closed source operating system
Interestingly, the very first programming language with an actual implementation was interpreted: Short Code in 1950.
This is not surprising, as interpreters are easier to write than compilers.
And just like modern scripting languages, it reduced execution speed by about 50x.
The more heavily a project relies on it, the more you start to regret it.
It gets the job done, but cannot make a large codebase DRY without insanity.
It is interesting to note how late C appeared: 1972, compared e.g. to Fortran which is from 1957. This is basically because C was a "systems programming language", i.e. with focus on pointer manipulation, and because early computers were so weak, there was no operating system or many software layers in the early days. Fortran however was a numerical language, and it ran directly on bare metal, an application that existed before systems programming.
There are only two pre-requisites to using Haskell in 2020. You have to be an idealist. And you have to be a genius:
Java is good. But its ecosystem sucks. Its boilerplate requirement is a pain, but the design is otherwise very clean.
The language all browsers converted to as of 2019, and therefore the easiest one to distribute and most widely implemented programming language.
Hopefully will be killed by WebAssembly one day.
- web-cheat/image-load-lazy.html: https://stackoverflow.com/questions/2321907/how-do-you-make-images-load-lazily-only-when-they-are-in-the-viewport/57389607#57389607
- web-cheat/esm.html: ESM modules
- you make network requests all the time
God, it's impossible! You just have to convert the entire fucking call stack all the way up to async functions. It could mean refactoring hundreds of functions.
The problem is that async was introduced relatively late, previously we just had to use infinitely deep callback trees, which was worse. But now we are in an endless period of transition between both worlds.
And then, after many many hours of this work, you might notice that the new code is way, way way slower than before, because making small functions
Anyways, since you Googled here, you might as well learn the standard pattern to convert callbacks functions into async functions using a promise: https://stackoverflow.com/questions/4708787/get-password-from-input-using-node-js/71868483#71868483
TODO why did Python kill it? They are very similar and existed at similar times, and possibly Perl was more popular early on.
Perl likely killed Tcl.
Ciro Santilli's wife was studying a bit of basic Python for some job interviews, when she noticed:
Wow,Damn right, girl, damn right.
inis so powerful! You can do
for x in list,
for x in dictand
if x in dictall with that single word!
Then finally, when the École Polytechnique mathematics department didn't let Ciro Santilli do his internship of choice due to grades and Ciro was at an useless last moment backup internship, he learned more Python instead of doing his internship job, and was hooked.
How many stupid bugs. How many stupid bugs do we need to face???
- this fucking train-wreck cannot come up with a unified documented way of specifying dependencies:So basically
package-lock.json. But how to generate it cleanly? You would need to create a virtualenv?
pip searchwas disabled in 2020: https://stackoverflow.com/questions/17373473/how-do-i-search-for-an-available-python-package-using-pip. WTF. If server load is a problem, just create a token system! It is hard to understand how such a popular language can't rais enough money to keep such simple server functionality running.
The best package ever is: https://pypi.org/project/china-dictatorship/ see also: https://cirosantilli.com/china-dictatorship/mirrors
python -m pip install --user virtualenv virtualenv -p python3.8 .venv . .venv/bin/activate
The people who work on this will go straight to heaven, no questions asked.
One problem with Django is that it does not expose its ORM as an external library: https://stackoverflow.com/questions/33170016/how-to-use-django-1-8-5-orm-without-creating-a-django-project which is wasteful of development time.
As of 2021, last updated 2016, and python 3.5 appears to be mandatory or else:which apparently broke in 3.6: https://stackoverflow.com/questions/41343263/provide-classcell-example-for-python-3-6-metaclass and
RuntimeError: __class__ not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was __classcell__ propagated to type.__new__?
pyenvinstall fails on Ubuntu 20.10, so... fuck. Workarounds at:
The only reason why Ruby exists.
This web framework is pretty good as of 2020 compared to others, because it managed to gain a critical community size, and there's a lot of basic setup already done for you.
Integrations React integration:
- https://github.com/shakacode/react_on_rails: webpack and server-side rendering
- https://github.com/reactjs/react-rails Official on the React side only. Demo app linked from package: https://github.com/BookOfGreg/react-rails-example-app and how it fails: https://github.com/BookOfGreg/react-rails-example-app/issues/30... The related projects section has some good links:
Uses Redux, while reactjs/react-rails appears to do that more manually
Lots of focus on Heroku deployability, which is fantastic: https://shakacode.gitbooks.io/react-on-rails/content/docs/additional-reading/heroku-deployment.html
Live instance: https://www.reactrails.com/ with source at: https://github.com/shakacode/react-webpack-rails-tutorial Not the most advanced web-app (a gothinkster/realworld-level would be ideal). Also has clear dependency description, which is nice.
Trying at https://github.com/shakacode/react-webpack-rails-tutorial/tree/8e656f97d7a311bbe999ceceb9463b8479fef9e2 on Ubuntu 20.10. Got some failures: https://github.com/shakacode/react-webpack-rails-tutorial/issues/488 Finally got a version of it working at: https://github.com/shakacode/react-webpack-rails-tutorial/issues/488#issuecomment-812506821
Oh, and the guy behind that project lives in Hawaii (Ciro Santilli's ideal city to live in), has an Asian-mixed son, and two Kinesis Advantage 2 keyboards as seen at https://twitter.com/railsonmaui/status/1377515748910755851, Ciro Santilli was jealous of him.