Putting the 'role' back in role-playing games since 2002.
Good Old Games
Donate to Codex
News Content Gallery About Donate Discord Contact
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Which programming language did you choose and why?

Lutte

Dumbfuck!
Dumbfuck
Joined
Aug 24, 2017
Messages
1,721
Talking of java, in its early days people tried to write software like web browsers and office suites in it. Needless to say, they were all colossal failures. Nobody really likes desktop software written in that shit. The few pieces of popular software written in java all had superior alternatives in better language platforms. Azureus is one of the heaviest, most dogshit torrent client I've seen. Eclipse IDE has fancy tools but it's a system hog.

Java software can be made to run fast AND with as little interruption as there can ever be for a GC, but it usually implies consuming 10 to 20x the amount of ram you normally would, which is unacceptable for desktop software used in a multitasking environment (but tolerated by megacorps using gigantic datacenters with machines that each run a singular software bit). Imagine if every single piece of software on your desktop were written in java, they would all compete for whatever little ram is left even with a 32gb setup.


There's a reason why Android needs more than twice the ram iOS does for android smartphones to feel as snappy as iphones. The whole android ecosystem is a ram hog and it's entirely the language's fault.
I still remember when an iPhone with 512mb of ram ran better than 2gb android smartphones and I'm an apple hater. These days I use an android smartphone and it runs great but it's also because it has 8gb of ram which is something that is totally overkill and only necessary because android apps are written in shitty languages.


A smartphone should never have needed 8gb of ram. But that's what you need if you don't want your apps to be swapped and for multitasking to properly work so that when you open something, it's actually still launched from the ram. Because android is a piece of dogshit. Functional, tolerable dogshit. But dogshit nonetheless.
 
Joined
Dec 17, 2013
Messages
3,658
2. Modern hardware is extremely powerful, with CPUs being able to do something on the order of billions of operations per second. Meaning a benchmark test that shows that C++ is 40 times as fast as Python is meaningless in most real world applications
This has been proven wrong so many times I don't know why people keep repeating this lie. You are talking to actual programmers here, no need to convince anyone. You can make programs slow really fast if you don't know what you are doing. Python is slow, no one has proven anything else yet. Show us the fucking programs written in Python that run fast, or shut the fuck up.

Since you continue being too dumb to understand what I am saying, I guess I will let you continue to be dumb. Run along now, boyo.

I think you're downplaying it. IMO, Python is unsufferably slow and you have lots of high level languages that are more expressive AND much faster.

And in the meantime, Python continues to be #1 or #2 most popular language in the world by job listings, every single year. So you do you, gf. ;)

The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.

These are far from the only type of software where the performance of larger scripts will hit severe bottlenecks in real world usage. A industry veteran, Mitch Kapor, once tried to write an outlook clone (mail-agenda organization type software) in python, called chandler.. it was a s-p-e-c-t-a-c-u-l-a-r failure entirely imputable to the runtime just not cut for handling massive amount of data in real time, no one wants to use a piece of software whose UI is unresponsive.

I didn't say they were the only types, those were examples. You are just giving another example. How many times does someone need to write an email client in the real world today? They have these things called Gmail and Outlook and etc. Same for operating systems. A lot of super fast softwares are written by a small number of companies. Most software doesn't need to be super fast.
 

raw

Conscript
Patron
Vatnik
Joined
Nov 1, 2008
Messages
19,002
Location
Barracks
PC RPG Website of the Year, 2015
A smartphone should never have needed 8gb of ram.
An stable and fast internet connection should never require more than ISDN.

Yet, here we are, using 2.4 Ghz to beam shitty websites like RPGCODEX DOT with their Megabytes of advertisements onto your screen and we definitely should invest more into nuclear.

Man is not a thinking creature.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
505

Since you continue being too dumb to understand what I am saying, I guess I will let you continue to be dumb. Run along now, boyo.
Just show us some examples of fast Python programs. Or even slow ones. Something tangible to back up your trash talk. I'm waiting.
 

Tramboi

Prophet
Patron
Joined
May 4, 2009
Messages
1,156
Location
Paris by night
I think you're downplaying it. IMO, Python is unsufferably slow and you have lots of high level languages that are more expressive AND much faster.

And in the meantime, Python continues to be #1 or #2 most popular language in the world by job listings, every single year. So you do you, gf.
Yes and people listen to Shakira and play Fortnite ;)
 

kepler

Literate
Joined
Jun 1, 2022
Messages
32
Location
Lechistan
I think you're downplaying it. IMO, Python is unsufferably slow and you have lots of high level languages that are more expressive AND much faster.

And in the meantime, Python continues to be #1 or #2 most popular language in the world by job listings, every single year. So you do you, gf.
Yes and people listen to Shakira and play Fortnite ;)

Although Shakira and Fortnite is popular for a different reason (marketing), validating something on a base of popularity is just pure copium inhaling.

PorkyThePaladin is a troll and you guys basically feeding him this last couple of pages.

EDIT: Fuck this editor.
 

Azdul

Magister
Joined
Nov 3, 2011
Messages
1,169
Since the QuakeWorld every reasonable programmer knows that if you don't get new packet from the client - client is moving in the same direction with the same speed.

I don't know, what if it isn't and the packet has just not arrived yet?

I thought the problem was that the same variables existed many times. Everyone had positions on their computer but they were already outdated, or in the worst case just estimated by some "clever" method (i.e. a hack). Then suddenly the real value arrived from the server and it was completely different. Something was completely wrong here, maybe the updates that should have happened several times per second were just not coming and since they were only using someone else's libraries they never figured out how?

It's also possible that they were dumb enough to program their server in Unity too, because that was all they knew. The clients running in Unity was probably never an issue. But the server had to be able to support ultra high response and precision, ensuring that no matter what the important position synch was guaranteed to be happening within milliseconds, and no bullshit like garbage collectors or random Unity bloat able to interfere.
1. You cannot reliably send data between every client and server 60 times a second.

If movement is registered only when data exchange takes place - and it takes place 5 times a second - instead of smooth movement you will see players teleporting few steps at the time.

If no data exchange means moving in the same direction with the same speed - everyone moves smoothly for every other client - even if communication channels are not perfect.

2. You cannot send whole state of the world between every client and server too often. Every client receives only difference from previous state - with a checksum. If client will lose one such message - checksum will no longer match and client will get desynced. Client will request full state of the world from the server to get in-sync again - creating temporary high load on the server.

This creates obvious problem when more clients will desync at once. Any large scale interruption in communication creates cascade effect.

When new client connects - his data needs to be send to all other clients. This data needs to be stored somewhere - and it requires memory allocations. Memory allocations require free heap - which triggers GC on client machines - often with 'stop the world' scenario. It creates a perfect storm where all clients experience communication disruptions at the same time.

Darkfall (and old FPS Chrome) used Java for game logic and didn't have such issues. However - their VMs were started by native process and were isolated from critical parts of the engine. Players saw 'load lag' each time other players came nearby - but the clients were not desynced - because communication thread was not affected.
 

frajaq

Liturgist
Joined
Oct 5, 2017
Messages
2,080
Location
Brazil
Im glad this thread has been up for 10 years and I can read old posts. I have absolutely 0 experience in coding and I'm following some random free coding learning thing on the internet. It already starts with JavaScript even for beginners but I'm willing to take my time to really learn things, and this thread already illuminated my path a little since so many people told their experiences.
 
Joined
Dec 17, 2013
Messages
3,658
Just show us some examples of fast Python programs. Or even slow ones. Something tangible to back up your trash talk. I'm waiting.

I realize you are too dumb to understand why you are not getting what I said earlier, but stupidity does not make one immune to strawmanning and thus being (implicitly) ignored. Sorry bro.

I think you're downplaying it. IMO, Python is unsufferably slow and you have lots of high level languages that are more expressive AND much faster.

And in the meantime, Python continues to be #1 or #2 most popular language in the world by job listings, every single year. So you do you, gf.
Yes and people listen to Shakira and play Fortnite ;)

This is a bad analogy because what people listen to in their spare time reflects their personal tastes. What the smartest people select to make money for their businesses reflects something else.
 

Not.AI

Learned
Joined
Dec 21, 2019
Messages
147
I am still surprised that I program better in C++ than in Python.

I mean my code in C++ is nowhere near as buggy as what I write in Python.

I don't know why and how this is even possible. But that is my lived experience.

Seriously, I'm actually much better at doing the same thing in C++ than in Python. I have no idea why.

Can't program in Java either, at this point. Don't know why.

I also like this postmodern "cool" phrase "lived experience". Always wanted to use it - talk about my "lived experience". Checkmark.
 

Tramboi

Prophet
Patron
Joined
May 4, 2009
Messages
1,156
Location
Paris by night
I am still surprised that I program better in C++ than in Python.

I mean my code in C++ is nowhere near as buggy as what I write in Python.

I don't know why and how this is even possible. But that is my lived experience.
Static typing ?
 
Joined
Dec 17, 2013
Messages
3,658
I can wait. In the meantime you could also show some of your projects so we know you are not just talking from your asshole and in fact are an actual programmer. You never know, this is internet.
def count_to_five(): for counter in range(get_krices_iq()): print(str(counter + 1))
 

Blutwurstritter

Learned
Joined
Sep 18, 2021
Messages
352
Location
Germany
def count_to_five(): for counter in range(get_krices_iq()): print(str(counter + 1))
Python:
from PorkyThePaladin import count_to_five

if __name__ == "__main__":
    count_to_five()
    
>>> Traceback (most recent call last):
  FunError: joke not found

Doesn't work for me. :(
 

BoroMonokli

Literate
Joined
May 30, 2022
Messages
10
Aand here is a completely unrelated one: Autohotkey.

It's portable, so perfect for my work computer without admin privileges, uses com objects easily, and allowed me to insanely cut down the amount of work (and attention!) I had to do to transfer data from a spreadsheet to a web interface. Line by line. It saves me ~1 hour of headache every day and one week of headache every year. And that annual saving of effoet is for approx 10 other people, which lets them keep doing their work with disabled people without interruptions.

Speed isnt a concept because webpages are slow.

Although I just copied the entire .NET framework that came with windows to my desktop workspace and with csc I can make c# programs now without needing admin privileges. If I can make msbuild work with selenium without any installations, then I can change back to that.
 

Arbiter

Learned
Joined
Apr 22, 2020
Messages
407
Location
Poland
I can wait. In the meantime you could also show some of your projects so we know you are not just talking from your asshole and in fact are an actual programmer. You never know, this is internet.
def count_to_five(): for counter in range(get_krices_iq()): print(str(counter + 1))

This only shows how verbose Python is.

Kotlin:
Code:
fun countToFive() = (0 until getLimit()).forEach{println(it + 1)}

Scala:
Code:
def countToFive() = (0 until limit).foreach(i => println(i + 1))
 
Last edited:
Joined
Dec 17, 2013
Messages
3,658
No, but Python is the best of both worlds right now, unambigous enough to work as a programming language, but also with a syntax very close to human language/pseudo-code.
 

Arbiter

Learned
Joined
Apr 22, 2020
Messages
407
Location
Poland
No, but Python is the best of both worlds right now, unambigous enough to work as a programming language, but also with a syntax very close to human language/pseudo-code.

Human language/pseudo-code is useful for non-programmers like data scientists, business analysts, finance people. Programmers should write clean, short, maintainable code. Whether that code resembles human language or not is not important as long as the code is clean and its purpose obvious.
 

Viata

Arcane
Joined
Nov 11, 2014
Messages
8,339
Location
Water Play Catarinense
Pseudo-code is a cancer. Anyone that had to implement some complex algorithm and said algorithm was written in pseudo-code knows how horrible that shit is. Fuck whoever came up with the idea of writing in pseudo-code.
 
Joined
Dec 17, 2013
Messages
3,658
One, pseudocode is obviously much easier to maintain than machine level code. Its whole purpose is to display the logic of the program.

Two, you are thinking like a tech nerd. How clean your code is, is mostly a personal pride thing for you. Because in the real world, sometimes you will have crazy deadlines or whatever, and the code won't be clean, or you will work with other people whose code is not clean, and so on. It's pretty much impossible to keep a large codebase "clean". By even trying, you will end up using tools that take a lot longer to churn out code because they are at a much lower level of abstraction, and thus slow down the programmer. So while you are sitting like a pretty cupcake, with your clean code, the others guys have already built out a world-changing app.
 

Arbiter

Learned
Joined
Apr 22, 2020
Messages
407
Location
Poland
One, pseudocode is obviously much easier to maintain than machine level code. Its whole purpose is to display the logic of the program.

Two, you are thinking like a tech nerd. How clean your code is, is mostly a personal pride thing for you. Because in the real world, sometimes you will have crazy deadlines or whatever, and the code won't be clean, or you will work with other people whose code is not clean, and so on. It's pretty much impossible to keep a large codebase "clean". By even trying, you will end up using tools that take a lot longer to churn out code because they are at a much lower level of abstraction, and thus slow down the programmer. So while you are sitting like a pretty cupcake, with your clean code, the others guys have already built out a world-changing app.

Can explain why your Python example is better than my Kotlin and Scala examples? Any would it take less time to write?
 

Rincewind

Magister
Joined
Feb 8, 2020
Messages
1,082
Location
down under
What the smartest people select to make money for their businesses reflects something else.

How did you come to this conclusion that "most devs" == "smartest people"?
 
Top Bottom