I would dwelve into python lands if there were more job offers, but people around here focus too much on java. I’m kinda fascinated by machine learning.
I’m something of a gnu/linux man myself (I think this was a meme back then, but not with linux), but I’m pretty sure it’ll be fairly difficult to stay away from winblows when I get to have a programming job.
My problem is with not having a compiler reading the syntax and telling me “oy a$#wit this is illegal” beforehand
Grab the jetbrains software package for private people, cost very little, ~$25/month, and you’re covered with a series of well developed IDEs for close to all languages. Pycharm works very well for debugging, can step, set breakpoints and it also has built in intellisense for just about everything.
Here’s creating, sorting and dumping to file using python 3.5.3 on Debian 9. There is also a faster sorting function in numpy, don’t have that installed on home pc, so just used standard one. File is around ~65MB, took 42.53 seconds with sorting, and 42.096 seconds without sorting using 1 core on 5930K.
#!/usr/local/bin/python3
import random, string
a = []
def mk_file(ff):
with open(ff, "w+") as f: f.write("\n".join(a))
def sort_arr():
a.sort()
print("creating array")
for j in range(1000000):
a.append(''.join(random.choice(string.ascii_letters) for i in range(64)))
print("sorting array")
sort_arr()
print("dumping array to file")
mk_file("1m.sorted.lst")
Node is on the server side… and at least Javascript (on the client) doesn’t require installation of the Oracle (or other, shitty) Java runtime as well.
Most if not all languages except from Assembly, C/C++ and some other ancient godlike ones are kinda bloated, we can’t deny it.
I had a big let-down with Java this week, I compiled it on my laptop with openjdk 11(on buster) and the stupid bytecode didn’t run on the even more stupid W10 running oracle’s jre 8… it’s not backwards compatible.
That is pretty easy to achieve. When you target java11 its only gonna work on 11+ (you can target lower java version than what you use to compile, then it will work normally). When you use modules its only gonna work on java 9 and above. When you use openjfx its only gonna work on java 11 and above. If you use any platform specific library, you also either have to package in the packages for all operating systems into a big fat jar. Or make multiple of them. There are many reasons why it might not run.
Java 8 is a huge roadblock to get past to java 9+ for many project. 9/10/11/12 usually is easy going afaik. But breaking down your program into modules is kinda a pain to have to do. And yes you absolutely have to do that at some point as it looks now. Witch is why you will see many programs, libraries, frameworks still stuck on java8.
Their module system really seems to me as if they primarily made it to make their own life easier developing the JDK. Especially, since other JVM languages like kotlin have no support what so ever for modules, they just compile to java8 bytecode. Witch there is usually no problem running that on java 9/10/11/12, until you use libraries that depend on newer features that you cannot just recompile to java8 bytecode.
I don´t know why, but the firefox console seems to be MUCH slower. Though, I get to 999999 putting your code snipped into the console too. (This is not your code snipped I tried to make it faster).
I know I already posted a lot here, and even the forum told me to stop (I will soon enough).
But just now I discovered there are optimization paths on gcc… yeah… also argc and argv are pretty new to me, I’m not very proficient in C, but it’s ok.
So later I’ll bring my laptop to work to try and optimize the compilation and bring some real numbers to the table.
^ this is what I’m talking about… later I’ll have news, perhaps…
Yeah. It seems to me that Java is really good at building the bullshit part of applications. By bullshit I mean what makes it “different” or “value-adding” part. Don’t get me wrong this isn’t a small thing, it’s not a microservice language, it’s built for apps with large amounts of bullshit.
Whereas a substantial number of the major components/needs already exist - SQL, Webservers, reverse proxy, networks, operating system, jvm, email servers, etc.
They just need to write the bullshit part of the app, and have it use the provided interfaces/ libraries with the above listed items.
And then again, java has great libraries so if you know your data structures and algos and can architect the app it’s pretty much know your libraries and it’s snap and play.
It’s also “garbage collected.” Like no one has ever seen a leaky java app lol.
Cloud native application may save us from a lot of these bullshit applications, but there will always be local apps running bullshit. Much of which will be java.
I know this is an older post, but that’s not what backwards compatability is. Compiling in JDK 8 and attempting to run in JRE 11 would be supporting backwards compatability (on the part of JRE 11). Compiling on JDK 11 and attempting to run in JRE 8 would be… forwards compatability I guess lol.
And perhaps a follow up, some legitimate backwards compatability was broken in JDK9 (and its a major point of contention between Java developers), but I think its unlikely (though quite possible) that you’ve run into that issue here.
I would recommend keeping both OpenJDK 8 and 11 on your machine. Most everything new should generally be compiled with JDK11 (unless you’re contributing on a project that hasnt made that switch yet), and 8 is handy for running legacy code. Most IDEs will let you change your JDK on the fly in the project settings (I personally believe that IntelliJ is the easiest for this, but that is entirely personal preference).