Why do you need to name something to understand it? Why can't you just understand the abstraction?
The second question contains the answer to the first. That is, the effort spent by a programmer in naming code blocks helps other programmers, who have to read the source, instantly find out what the code is doing -- higher level of abstraction. Time spent reading code is a lot greater than time spent writing it.
So, other than saving a few lines of code, lambda functions don't seem to have much benefit over local functions. It seems more a subjective matter of taste which one is better. Programmers who prefer functional programming languages like short, terse code, even if the execution speed is not much faster than ordinary procedural code.
What, why is this garbage modded up? The Nim compiler is written in Nim.
Compiling the Nim compiler is quite straightforward. Because the Nim compiler itself is written in the Nim programming language the C source of an older version of the compiler are needed to bootstrap the latest version. The C sources are available in a separate repo here.
I remember how people scoffed at Java when it was young. It was considered too slow, a new toy language and didn't allow programmers to use the preshius malloc/free and would be irrelevant within a few years. Boy, were they wrong.
I would think so. Let's look at the evolution of programming languages: a) machine code - The language of the CPU (1s and 0s) but very hard for humans to read and write. So it takes a lot of time to get anything done. b) assembly language - Same as machine code but easier to read and write. So it takes less time than machine code, and therefore costs less to develop a program. c) Early high-level languages: Eg: C/Fortran/Pascal. These are an order of magnitude faster to develop than assembly language, so for the same programmer salaries as assembly, your program has 10 times more functionality. But the user cost is the program can be 10% - 50% (or more) slower than the assembly version. c) Object-oriented languages: Eg: C++/Java/Python. These languages provide increased abstraction than C/Pascal. This allows programmers to deal with even larger amount of code, therefore develop even larger programs than C.
What's special about Nim is, it's short and easy to read/write, just like Python. But Python programs run extremely slowly and therefore very few commercial programs are written in Python. While Python is dynamically typed, Nim is statically typed but uses type inference. By being statically typed, Nim is almost as fast as C. So now, you can implement your big C/C++ program in Nim in 1/2 or 1/3 the time it took to do it in C/C++, but the performance is almost the same as C/C++. And that means cheaper software, I hope.
as a user, i care about cost/performance; curly braces, indents, static typing - totally irrelevant
They're quite relevant, actually. Each of these technological improvements either reduce development time or allow for writing bigger programs. Since companies don't have an infinite budget for software development, better languages means your programs can have more features for the same amount of money spent in development.
Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers.
IMO, only lazy, inept, or noob programmers don't indent correctly. So if a language requires them to indent properly, they call it forced indentation because they usually don't indent correctly in other languages.
If I'm wrong, how many different ways can you indent the following code? for x in range(1,10):
for y in range(1,10):
if someCondition:
result[x][y] = a[x][y] + b[x][y]
Yeah, they're so toxic that a small bunch of programmers, working part-time and for free, have beaten a big soulless corp like Mozilla to create a language that is far superior to Rust. But good luck on your smear campaign against Nim.
When I need help with a problem involving a programming language, I'll usually go to that programming language's main IRC channel to ask my question. I'm more likely to use a language where I can deal with civilized adults who will help me find the information I need, rather than a bunch of youth or immature adults who will just insult me
Just post your problem in the Nim forum instead of IRC. I don't think there are rude people there. Also, information saved in the forums will help other people who have the same problem.
Who cares? Do you want to use the language or chat with the community? Such people exist in most communities. AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.
Nim = Python code + Turbo Pascal type declarations.
You have to question why this information was posted in the first place. Was it so people on the internet could invite the judge to a party or be invited to the judge's social gatherings? No, it was expressly done by malicious people (eg: silk road users) to inform other malicious people about one of their prime enemies. This was done so they could discriminate, harass or harm the judge in the future for taking away their prized illegal goods/services web store.
So, yes, it's illegal to post this kind of info. The private lives of public servants should not be invaded in the same way as private life of an ordinary citizen should not.
The cop now has, an unlocked-by-you, legal access to everything on your phone. You willing handed to him, and disabled the protective lock.
Why does the cop need physically search your phone? He can simply ask one of the app developers to provide all your private data. In case you didn't know, almost all android apps transmit your private data (such as contact list, call logs, photos, apps installed etc) to their servers.
Why do you suddenly care that the police can search your phone, but pose no resistance to apps doing the same?
This exactly, except "data scientist" is actually a better way to describe what statisticians actually do.
But there's a big difference between a scientist and a statistician. A scientist pokes around and discovers new theories or mathematical models (often out of thin air). A statistician OTOH, like an engineer, simply applies the theories of scientists to accomplish real world usable things like pie charts and bar graphs.
So unless this guy is discovering or testing new theories, he's not a scientist. He's just a statistician.
If you worked for me, and you wrote garbage like that, I would give you a verbal warning and show you how to do it correctly.
LOL. I worked on a project where we couldn't use C++, only C. I used the same goto pattern for cleanup. The alternative would've been a bunch of nested if statements and that would make the code less readable and difficult to maintain. Goto is the superior solution for exit-on-error scenarios.
If this code pattern is garbage, can you show the alternative that is not garbage?
But he's right, 18,000 developers laid from just one company is a lot. Why do you need more girls or kids or whoever when you already have huge glut of developers already available? Is there a secret plan to make developers' wage close to minimum wage?
Good grief man, if your wife is having episodes get another ADULT into the house!
I think, that's the problem. He doesn't have any adult relatives to take care of this problem, and a private nurse would cost a lot. It seems a common problem with nuclear families.
RMS openly says trying to charge for free software is fine.
That sounds disingenuous. You can't demand money for a product and offer it for free at the same time. If something is free, the customer feels no obligation to pay for the product.
Since the GPL gives free redistribution rights to customers, the first few customers will pay for the GPL software and then turn around and redistribute it to others, for free. The original vendor selling the GPL software will probably go bankrupt because they would've made only a few thousand dollars selling to the "seed" customers. The only way they can survive in such an environment is make sure the product is substandard, then charge support and consultation fees to fix any issues.
If there's only 100 users, it wouldn't take many resources to keep a VM running the server somewhere.
Instead of the company going through that hassle, why can't these 100 users find another game?! Few users means this game is not that much fun anymore. This is just a super lame excuse to trick/force companies to share their code for nothing/free.
Copyright should have a use it or lose it provision.
That's bullshit. The code belongs to the copyright holder to do as he/she sees fit during the copyrighted phase, they should not lose it.
What happens if the company refuses to release the server binary program for fear that competitors may reverse engineer their game? Do the companies have a chance to say no? After all, it's an abandoned game, therefore there are only a few hundred players that are interested in playing the game.
They should have a choice to refuse releasing the server code as they may have a successful game that's based on the old, abandoned game.
You don't understand investing. $300 worth bitcoins at $0.50/coin = 600 bitcoins. A bitcoin is worth $218 currently, so 600 bitcoins = 218 x 600 = $130,800. Not bad for a $300 investment.
The minor detail that the bad code uses recursion is irrelevant.
Stop parroting the stupidity of the article writer. There is nothing bad about this code. The code is utterly simple and is being used to test whether the student: a) Can read code AND b) Has a decent understanding of recursion
Anyone who can figure out what the code does will know how to get the same result with simpler code.
Again, the test writers are not trying to find an optimized way to display "0123456." They are instead interested in testing whether the student has basic competence in understanding/using recursion.
What is so much better about CEOs making 500 times as much as their office workers, than having some kind of rational basis for compensating workers, when it is the workers who are doing all the work?
But should a janitor in a successful company A, make 5 times what another janitor in an unsuccessful company B is making, even though though both of them perform the same exact task (theoretically speaking) that requires the same amount of time and effort? I think not, that would promote a sort of lottery system.
If CEO's salary is to trickle down to workers, it should be based on the value of their work. For example, creative marketing and technical contributions that increase company profits over a long time should be trickled down, but common jobs should have the same salary structure.
They built the stadium, they get to decide who plays in it and under what terms.
Who cares? They both point potential customers, who use generic keywords, to a vendor. And they both cost millions of dollars. Why is one a ripoff (generic keyword URL seller) and the other completely okay (google)?
But domain squatters didn't build anything.
You think only builders should get value? What about owners, shouldn't they get something for the valuable assets they have invested in? You should inform landlords around the world that they don't deserve rent for just owning property.
They're just taking advantage of a weakness in the system, to the detriment of everyone else.
There are only a few generic terms available out of the vast ocean of possible URLs. There is a lot of competition with dozens of big companies wanting to own one of these generic URLs because of the huge potential earnings associated due to marketing advantage when a common word is the URL. Well, the URL owner wants the business to pay for this marketing advantage. Now, tell me what legal or ethical crime the URL owner has committed in wanting millions for his asset?
whenever a big new industry or platform comes into existence. Someone who's figured out how to seize ownership of an essential piece of the supply chain and then make a mint charging rents, or by selling all or parts of it for 100x what he paid.
Before you go too harsh on this guy, remember google's several hundred billion dollar market capital is based entirely charging huge per-click ad fees for certain search keywords like "insurance", "hotel" and "doctor." I think it's just supply and demand of marketing assets (which is what a generic name URL is).
If your web insurance company is capable of generating tens of millions a year, you either have to pay Google and/or someone like Mr. Millin to be visible to your customer. IOW, the buyer of the URL will only pay fair value, and no more.
Not making complete fucking moron decisions about security is easy, if you hire someone vaguely competent.
But isn't connecting a car to the internet inherently stupid (for the consumer, not the vendor)? The risk of theft and car crashes via hacking are inherent in such a design decision whereas there are few benefits, such as getting updates without visiting the dealer.
By connecting your car to the internet, billions of people and a few thousands of hackers and govt agents can now gain control of your car, also the car manufacturer can track your car usage info and sell that to advertisers and three-letter agencies.
It's like connecting your toaster to the internet -- pointless and not very useful.
The second question contains the answer to the first. That is, the effort spent by a programmer in naming code blocks helps other programmers, who have to read the source, instantly find out what the code is doing -- higher level of abstraction. Time spent reading code is a lot greater than time spent writing it.
So, other than saving a few lines of code, lambda functions don't seem to have much benefit over local functions. It seems more a subjective matter of taste which one is better. Programmers who prefer functional programming languages like short, terse code, even if the execution speed is not much faster than ordinary procedural code.
What, why is this garbage modded up? The Nim compiler is written in Nim.
https://github.com/Araq/Nim
How is A.py better than B.py (other than saving one line of code)?
# A.py
a = [10, 1, 5, 20,
result = filter(lambda x: x > 10, a)
# B.py ...]
a = [10, 1, 5, 20,
def greaterThan10(x):
return x > 10
result = filter(greaterThan10, a)
I remember how people scoffed at Java when it was young. It was considered too slow, a new toy language and didn't allow programmers to use the preshius malloc/free and would be irrelevant within a few years. Boy, were they wrong.
I would think so. Let's look at the evolution of programming languages:
a) machine code - The language of the CPU (1s and 0s) but very hard for humans to read and write. So it takes a lot of time to get anything done.
b) assembly language - Same as machine code but easier to read and write. So it takes less time than machine code, and therefore costs less to develop a program.
c) Early high-level languages: Eg: C/Fortran/Pascal. These are an order of magnitude faster to develop than assembly language, so for the same programmer salaries as assembly, your program has 10 times more functionality. But the user cost is the program can be 10% - 50% (or more) slower than the assembly version.
c) Object-oriented languages: Eg: C++/Java/Python. These languages provide increased abstraction than C/Pascal. This allows programmers to deal with even larger amount of code, therefore develop even larger programs than C.
What's special about Nim is, it's short and easy to read/write, just like Python. But Python programs run extremely slowly and therefore very few commercial programs are written in Python. While Python is dynamically typed, Nim is statically typed but uses type inference. By being statically typed, Nim is almost as fast as C. So now, you can implement your big C/C++ program in Nim in 1/2 or 1/3 the time it took to do it in C/C++, but the performance is almost the same as C/C++. And that means cheaper software, I hope.
They're quite relevant, actually. Each of these technological improvements either reduce development time or allow for writing bigger programs. Since companies don't have an infinite budget for software development, better languages means your programs can have more features for the same amount of money spent in development.
IMO, only lazy, inept, or noob programmers don't indent correctly. So if a language requires them to indent properly, they call it forced indentation because they usually don't indent correctly in other languages.
If I'm wrong, how many different ways can you indent the following code?
for x in range(1,10):
for y in range(1,10):
if someCondition:
result[x][y] = a[x][y] + b[x][y]
Yeah, they're so toxic that a small bunch of programmers, working part-time and for free, have beaten a big soulless corp like Mozilla to create a language that is far superior to Rust. But good luck on your smear campaign against Nim.
Just post your problem in the Nim forum instead of IRC. I don't think there are rude people there. Also, information saved in the forums will help other people who have the same problem.
Who cares? Do you want to use the language or chat with the community? Such people exist in most communities. AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.
Nim = Python code + Turbo Pascal type declarations.
You have to question why this information was posted in the first place. Was it so people on the internet could invite the judge to a party or be invited to the judge's social gatherings? No, it was expressly done by malicious people (eg: silk road users) to inform other malicious people about one of their prime enemies. This was done so they could discriminate, harass or harm the judge in the future for taking away their prized illegal goods/services web store.
So, yes, it's illegal to post this kind of info. The private lives of public servants should not be invaded in the same way as private life of an ordinary citizen should not.
Why does the cop need physically search your phone? He can simply ask one of the app developers to provide all your private data. In case you didn't know, almost all android apps transmit your private data (such as contact list, call logs, photos, apps installed etc) to their servers.
Why do you suddenly care that the police can search your phone, but pose no resistance to apps doing the same?
But there's a big difference between a scientist and a statistician. A scientist pokes around and discovers new theories or mathematical models (often out of thin air). A statistician OTOH, like an engineer, simply applies the theories of scientists to accomplish real world usable things like pie charts and bar graphs.
So unless this guy is discovering or testing new theories, he's not a scientist. He's just a statistician.
LOL. I worked on a project where we couldn't use C++, only C. I used the same goto pattern for cleanup. The alternative would've been a bunch of nested if statements and that would make the code less readable and difficult to maintain. Goto is the superior solution for exit-on-error scenarios.
If this code pattern is garbage, can you show the alternative that is not garbage?
But he's right, 18,000 developers laid from just one company is a lot. Why do you need more girls or kids or whoever when you already have huge glut of developers already available? Is there a secret plan to make developers' wage close to minimum wage?
I think, that's the problem. He doesn't have any adult relatives to take care of this problem, and a private nurse would cost a lot. It seems a common problem with nuclear families.
That sounds disingenuous. You can't demand money for a product and offer it for free at the same time. If something is free, the customer feels no obligation to pay for the product.
Since the GPL gives free redistribution rights to customers, the first few customers will pay for the GPL software and then turn around and redistribute it to others, for free. The original vendor selling the GPL software will probably go bankrupt because they would've made only a few thousand dollars selling to the "seed" customers. The only way they can survive in such an environment is make sure the product is substandard, then charge support and consultation fees to fix any issues.
Instead of the company going through that hassle, why can't these 100 users find another game?! Few users means this game is not that much fun anymore. This is just a super lame excuse to trick/force companies to share their code for nothing/free.
That's bullshit. The code belongs to the copyright holder to do as he/she sees fit during the copyrighted phase, they should not lose it.
What happens if the company refuses to release the server binary program for fear that competitors may reverse engineer their game? Do the companies have a chance to say no? After all, it's an abandoned game, therefore there are only a few hundred players that are interested in playing the game.
They should have a choice to refuse releasing the server code as they may have a successful game that's based on the old, abandoned game.
You don't understand investing. $300 worth bitcoins at $0.50/coin = 600 bitcoins. A bitcoin is worth $218 currently, so 600 bitcoins = 218 x 600 = $130,800. Not bad for a $300 investment.
Stop parroting the stupidity of the article writer. There is nothing bad about this code. The code is utterly simple and is being used to test whether the student:
a) Can read code
AND
b) Has a decent understanding of recursion
Again, the test writers are not trying to find an optimized way to display "0123456." They are instead interested in testing whether the student has basic competence in understanding/using recursion.
TFA is either written by a troll or a moron.
But "ok google" or whatever it's called, keeps the mic always on, even when you're not making a phone call, you plank.
What about samsung (or any other android) smartphones? They have cameras and microphones too. Why are smart TVs with mics bad but smartphones not?
But should a janitor in a successful company A, make 5 times what another janitor in an unsuccessful company B is making, even though though both of them perform the same exact task (theoretically speaking) that requires the same amount of time and effort? I think not, that would promote a sort of lottery system.
If CEO's salary is to trickle down to workers, it should be based on the value of their work. For example, creative marketing and technical contributions that increase company profits over a long time should be trickled down, but common jobs should have the same salary structure.
Who cares? They both point potential customers, who use generic keywords, to a vendor. And they both cost millions of dollars. Why is one a ripoff (generic keyword URL seller) and the other completely okay (google)?
You think only builders should get value? What about owners, shouldn't they get something for the valuable assets they have invested in? You should inform landlords around the world that they don't deserve rent for just owning property.
There are only a few generic terms available out of the vast ocean of possible URLs. There is a lot of competition with dozens of big companies wanting to own one of these generic URLs because of the huge potential earnings associated due to marketing advantage when a common word is the URL. Well, the URL owner wants the business to pay for this marketing advantage. Now, tell me what legal or ethical crime the URL owner has committed in wanting millions for his asset?
Before you go too harsh on this guy, remember google's several hundred billion dollar market capital is based entirely charging huge per-click ad fees for certain search keywords like "insurance", "hotel" and "doctor." I think it's just supply and demand of marketing assets (which is what a generic name URL is).
If your web insurance company is capable of generating tens of millions a year, you either have to pay Google and/or someone like Mr. Millin to be visible to your customer. IOW, the buyer of the URL will only pay fair value, and no more.
But isn't connecting a car to the internet inherently stupid (for the consumer, not the vendor)? The risk of theft and car crashes via hacking are inherent in such a design decision whereas there are few benefits, such as getting updates without visiting the dealer.
By connecting your car to the internet, billions of people and a few thousands of hackers and govt agents can now gain control of your car, also the car manufacturer can track your car usage info and sell that to advertisers and three-letter agencies.
It's like connecting your toaster to the internet -- pointless and not very useful.