|
|
RetroX
|
|
Reply #62 Posted on: April 10, 2010, 06:09:45 pm |
|
|
Master of all things Linux
Location: US Joined: Apr 2008
Posts: 1055
|
Explain why Python, PHP and Lua are so popular, then.
PHP: All web languages are interpreted. PHP is the best one. Python: Shell script replacement. Lua: what Also, msvc++ runtimes are crap. Useful, I guess, but crap. :/ And Rusky, segfaults don't happen every 2 seconds. They happen once every 2 days on average.
|
|
|
Logged
|
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)Why do all the pro-Microsoft people have troll avatars?
|
|
|
Josh @ Dreamland
|
|
Reply #63 Posted on: April 10, 2010, 06:28:59 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
"They happen once every 2 days on average." I've had four segfaults in total in the past year. They each took between five and twenty minutes to fix.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #66 Posted on: April 10, 2010, 07:39:51 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
"Valgrind is a hack to replace dependent typing; both let you do the debugging up front." Does anything follow from that, or... "Segfaults aren't the only error that comes from using lower level languages." You chose not to name examples, or... "Null pointer exceptions don't exist in actually-higher-level languages (i.e. excluding Java)." Neither do divide by zero errors; they just cause glitching. "Not having run into segfaults means you haven't done any non-trivial programming." Like the kind one might use a high level language for to avoid such...
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Micah
|
|
Reply #67 Posted on: April 10, 2010, 08:17:09 pm |
|
|
Joined: May 2008
Posts: 128
|
PHP: All web languages are interpreted. PHP is the best one. Both of those statements are completely false. Python: Shell script replacement. That's not what it's used for in almost all cases... Lua: what Lua is used very often for a scripting language in games and game engines. You have not answered luiscubal's question. Try again. Also, msvc++ runtimes are crap. Useful, I guess, but crap. :/ High-level languages and runtimes don't mean MSVC++. "Valgrind is a hack to replace dependent typing; both let you do the debugging up front." Does anything follow from that, or... ...Yes. Your argument was that you wanted to do "debugging up front" with Valgrind instead of using a good high-level language and type system, which, for some reason, you dubbed "letting the program do it constantly" (whatever the heck that means). Rusky was stating that that is completely invalid. "Null pointer exceptions don't exist in actually-higher-level languages (i.e. excluding Java)." Neither do divide by zero errors; they just cause glitching. Uh, what? Do you have any sources at all to back up this utter nonsense? Did you even think at all about this statement before posting it? That is completely false. C++ is the language with more things that, instead of giving you an error, "cause glitching". One of these things is buffer overflows. There are many others. "Not having run into segfaults means you haven't done any non-trivial programming." Like the kind one might use a high level language for to avoid such... Please try writing more clearly. I have no idea what you mean by this.
|
|
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #68 Posted on: April 10, 2010, 08:37:55 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
"Uh, what? Do you have any sources at all to back up this utter nonsense? Did you even think at all about this statement before posting it? That is completely false." Josh @ Dreamland: js: 1/0 js: Infinity
So much for being "completely false," as you regard most of my statements that aren't to your liking. Buffer overflows kill the program nine times out of ten. The rest are detected 100% of the time by any decent debugger. Languages with better exception handling can catch such things; not all do. JavaScript's my favorite example of one that doesn't react in any way to division by zero; defining it as Infinity won't always cause the correct behavior. "...Yes. Your argument was that you wanted to do "debugging up front" with Valgrind instead of using a good high-level language and type system, which, for some reason, you dubbed "letting the program do it constantly" (whatever the heck that means). Rusky was stating that that is completely invalid." He seemed to be comparing Valgrind to dependent typing, not stating that anything was "invalid" (Which, I might add, a simple premise can't be; people just like to say "invalid" to sound smart). Consistent checking didn't refer to dependent typing; quit pretending that dependent typing can account for 100% of bounds error checking. It catches much; the rest is handled runtime. "Please try writing more clearly. I have no idea what you mean by this." Probably because that was a very serprex-ish statement. Trivial programming--the kind that would not produce segfaults--is what the really-high-level languages are apparently good for.
|
|
« Last Edit: April 10, 2010, 09:04:39 pm by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
score_under
|
|
Reply #69 Posted on: April 10, 2010, 08:47:41 pm |
|
|
Joined: Aug 2008
Posts: 308
|
PHP: All web languages are interpreted. PHP is the best one. Both of those statements are completely false.
The second sentence is an opinion. Oh, it doesn't agree with your opinion? Special case! Then it's *completely false*!
|
|
|
Logged
|
|
|
|
Micah
|
|
Reply #70 Posted on: April 10, 2010, 08:54:07 pm |
|
|
Joined: May 2008
Posts: 128
|
Josh @ Dreamland: js: 1/0 js: Infinity
So much for being "completely false," as you regard most of my statements that aren't to your liking. Buffer overflows kill the program nine times out of ten. The rest are detected 100% of the time by any decent debugger. Languages with better exception handling can catch such things; not all do. JavaScript's my favorite example of one that doesn't react in any way to division by zero; defining it as Infinity won't always cause the correct behavior.
Infinity and NaN are pretty much errors for numbers in JS. They are in no way glitching. He seemed to be comparing Valgrind to dependent typing, not stating that anything was "invalid" (Which, I might add, a simple premise can't be; people just like to say "invalid" to sound smart). You were saying that you'd rather do things Valgrind's way. He was saying that dependent typing is a non-hackish way to do the same things that Valgrind does. Consistent checking didn't refer to dependent typing; quit pretending that dependent typing can account for 100% of bounds error checking. It catches much; the rest is handled runtime. Obviously you haven't really learned how dependent typing works. The length of an array would be in its type. If there is ever the possibility that an array can be indexed out-of-bounds, i.e. it is indexed with a number whose range is not completely a subset of its range of indices, you will get an error. Probably because that was a very serprex-ish statement. Non-trivial programming--the kind that would not produce segfaults--is what the really-high-level languages are apparently good for. You completely misunderstood what Rusky said. Non-trivial programming is not something that would not produce segfaults. Non-trivial programming is programming non-trivial things, in which segfaults would probably happen much more often in low-level languages than they would when programming trivial things. PHP: All web languages are interpreted. PHP is the best one. Both of those statements are completely false. The second sentence is an opinion.Oh, it doesn't agree with your opinion? Special case! Then it's *completely false*!
Oh, all right--the first one is completely false, the second one is completely opinion.
|
|
|
Logged
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #72 Posted on: April 10, 2010, 09:04:19 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Infinity and NaN are pretty much errors for numbers in JS. They are in no way glitching. So, you're denying that treating a number as Infinity and proceeding like nothing happened could ever produce a behavior not accounted for by the programmer. I see. You were saying that you'd rather do things Valgrind's way. He was saying that dependent typing is a non-hackish way to do the same things that Valgrind does. So, it's non-hackish because it's done automatically instead of by request? Pffft. Obviously you haven't really learned how dependent typing works. The length of an array would be in its type. If there is ever the possibility that an array can be indexed out-of-bounds, i.e. it is indexed with a number whose range is not completely a subset of its range of indices, you will get an error. Uh-huh. So I guess arrays can simply never be resized, especially to an arbitrary or user-defined size. Well, at least it's safe and efficient. You completely misunderstood what Rusky said. Non-trivial programming is not something that would not produce segfaults. Non-trivial programming is programming non-trivial things, in which segfaults would probably happen much more often in low-level languages than they would when programming trivial things. Meant trivial programming. Fixed.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Micah
|
|
Reply #73 Posted on: April 10, 2010, 09:20:13 pm |
|
|
Joined: May 2008
Posts: 128
|
Infinity and NaN are pretty much errors for numbers in JS. They are in no way glitching. So, you're denying that treating a number as Infinity and proceeding like nothing happened could ever produce a behavior not accounted for by the programmer. I see.
It's how JavaScript handles errors. This design is probably mainly due to the environment in which JavaScript almost always runs: browsers. It's not the most bug-proof way, but I was never arguing that. Plenty of high-level languages error upon division by 0. One example of a language that makes it hard to find bugs related to division by zero does not mean that C++ is better for everything than high-level languages. Obviously you haven't really learned how dependent typing works. The length of an array would be in its type. If there is ever the possibility that an array can be indexed out-of-bounds, i.e. it is indexed with a number whose range is not completely a subset of its range of indices, you will get an error. Uh-huh. So I guess arrays can simply never be resized, especially to an arbitrary or user-defined size. Well, at least it's safe and efficient.
Arrays can be resized. It would change the type. If you had dependent typing in an imperative programming language, you just wouldn't make a specific size part of the array variable's type. Values can have more specific types than the variables that contain them.
|
|
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #74 Posted on: April 10, 2010, 09:24:17 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
This design is probably mainly due to the environment in which JavaScript almost always runs: browsers. See Unity. Marbs is presently writing Dominoes 3 in JavaScript.
One example of a language that makes it hard to find bugs related to division by zero does not mean that C++ is better for everything than high-level languages. And vice-versa, mind you.
"Arrays can be resized. It would change the type. If you had dependent typing in an imperative programming language, you just wouldn't make a specific size part of the array variable's type. Values can have more specific types than the variables that contain them." Yes, yes, yes. Now tell me what size type int x[ftoi((scanf("%d",&a),a))] has, and how many witty optimizations can be done around it. Rusky stated how such was handled (though then dropped out): runtime.
From there, it's down to personal preference. Valgrind and dependent typing we've decided to be the same, so. In the event of the unforseen, I prefer the program to die rather than to waste time every access making sure it lives.
|
|
« Last Edit: April 10, 2010, 09:26:44 pm by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|