The Tdarcos/Ben Pork Wager

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: The Tdarcos/Ben Pork Wager

by Tdarcos » Mon Oct 10, 2011 10:36 am

Ice Cream Jonsey wrote:
Tdarcos wrote:Oracle can say anything they want. Does not mean they're correct. As Abraham Lincoln supposedly said, "If we take a horse and call its tail a leg, it does not mean the horse has 5 legs. Calling a tail a leg does not make it one."
Extending object means it's an object. Which I know you know. But that's where it's headed.
Again, they can call it an object or claim it's descended from one, but that does not make it so. The guy who designed Brainfuck can call it a programming language or claim it is one, but it's so ridiculously convoluted (hence the name) that no serious person would do so. (In fact, the Wikipedia article I pointed to above says it's "not suitable for practical use.")

Oh, speaking of Wikipedia, let's look at the first two sentences of the article on objects in computer programming: http://en.wikipedia.org/wiki/Object_%28 ... science%29
Wikipedia wrote:In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure. (With the later introduction of object-oriented programming the same word, "object", refers to a particular instance of a class)[.] In the domain of object-oriented programming an object is usually taken to mean an ephemeral compilation of attributes (object elements) and behaviors (methods or subroutines) encapsulating an entity
How can a quoted string be manipulated? As far as I know, a quoted string is immutable. You can modify a variable containing a string, but a string constant itself cannot be modified because there is no capability to do so. Where are the attributes? What behaviors does it have?

Later it says
Three properties characterize objects:
Identity: the property of an object that distinguishes it from other objects
State: describes the data stored in the object
Behavior: describes the methods in the object's interface by which the object can be used
Where is the "idenity", "state" or "behavior" of a string constant that makes it an object? It has none of these.

I understand what they are doing, having read this. They are treating strings as a class, in which case then you can use methods of it, such as when you declare a string with the name "astring", then instead of using len(astring), left(astring,5), right(astring,6), mid(astring,10,5) you use methods of the string class such as astring.len, astring.left(5), astring.right(6), astring.mid(10,5), in which case you use methods of a string class to work on it instead of calling explicit functions that operate on strings. Okay, I'll buy that for variables which are strings or potentially for constants which are assigned a string value. It's just changing the syntax for manipulating string variables.

This you could do for a variable or constant which is instantiated to a string object.

But this is not the same as an item which is an unnamed manifest constant. It can't be accessed, cannot be modified and cannot have any actions performed on it. Now, if the compiler wants to change this manifest constant internally into a private named object/class that is a string constant, so that it can just treat it the same as any other object in order to manipulate it as such, that's an entirely different matter where the compiler redefines something as something else. Or where it changes something to make it easier on itself or for its own convenience.

On the IBM 360/370 mainframe, if you used a constant in an instruction, such as

Code: Select all

           L      12,=F'5'
           MVC  XRAY,="YES"
          ...
           MVC  ZULU,="YES"
It does not insert this where it is declared. The assembler creates these constants at the bottom of the program, creates an address for them, goes back and inserts the address, then when multiple references to a constant occur, it uses the same address for all of them.

Here, the compiler does this for its own convenience.

So I stand by my comments, a manifest constant can be called an object but just because someone is calling a manifest constant an object does not make it one.

by Ice Cream Jonsey » Mon Oct 10, 2011 7:22 am

Tdarcos wrote:Oracle can say anything they want. Does not mean they're correct. As Abraham Lincoln supposedly said, "If we take a horse and call its tail a leg, it does not mean the horse has 5 legs. Calling a tail a leg does not make it one."
Extending object means it's an object. Which I know you know. But that's where it's headed.

by Tdarcos » Mon Oct 10, 2011 3:20 am

Ice Cream Jonsey wrote:
Tdarcos wrote:Okay, fine. Show me how you change the value of the string object to something else. The one characteristic that makes something an object (as opposed to a constant) is that the object can be changed.
Strings are objects in modern computer languages, dude.

http://download.oracle.com/javase/1.4.2 ... tring.html
Says right there that the String class extends Object.
Oracle can say anything they want. Does not mean they're correct. As Abraham Lincoln supposedly said, "If we take a horse and call its tail a leg, it does not mean the horse has 5 legs. Calling a tail a leg does not make it one."

Calling a constant with no properties, no methods, no changeable values and no way to add or remove anything an object, doesn't make it one. Basically, then, you could call a number an object then, which means basically everything is an object whether or not it has any characteristics of one.

This may be what Oracle wants to do, because it simplifies the programming paradigm by making everything an object. They can choose to do this if they want, but, to paraphrase my presidential quote, calling a manifest constant an object doesn't make it so.

It might be for political or technical reasons Oracle is doing this. Oracle apparently has had either a neutral or hostile relationship with Java ever since they got ownership of it when they bought Sun. A number of people have said that Oracle does not have the best intentions for the Java community with the way it has been acting lately.

So doing things this way could be anything. Declare a constant as an object and you eliminate distinctions, you're basically making everything that is a standalone element into an object as opposed to distinguishing between different things.

And in my opinion that's a bad idea, because strong typing, in which two things must be equal to the same thing to be equivalent, allows better code development because it improves the way programmers think. This has been one of the biggest reasons for attack vectors in C++ programs because the number of very complicated constructions you can use or misuse because there's no safety checks and you can get away with just about anything.

Preventing programmers from doing the wrong thing improves software development and reduces the possibility of an attacker injecting changes into your application. When you use different things for different purposes and can't "mix apples and oranges" you can't use conflicting constructs together and cause errors.

Now, if you're going to define an object as every self-contained element in a program then basically the term means everything... and nothing.

by Ice Cream Jonsey » Sun Oct 09, 2011 8:08 pm

Tdarcos wrote:Okay, fine. Show me how you change the value of the string object to something else. The one characteristic that makes something an object (as opposed to a constant) is that the object can be changed.
Strings are objects in modern computer languages, dude.

http://download.oracle.com/javase/1.4.2 ... tring.html

Says right there that the String class extends Object.

I said it before and I didn't mean it as an insult: there's 30 years of development in computer programming that you are not necessarily up on. That's not anyone saying that you aren't up on ANY thing languages do these days, but that they do stuff you aren't aware of.

(They do stuff I am not aware of, that Ben is not aware of, that any programmer here is not aware of. It includes others than you, but make no mistake, it does include you.)

No insult is implied. That's just the way it is, and it's going to get worse for programmers are more languages are developed and older languages go by the wayside.

by pinback » Sun Oct 09, 2011 5:40 pm

I just want him to admit that it's not a bug, and he just hasn't understood any advances in computer language development in the last 30 years.

by AArdvark » Sun Oct 09, 2011 4:37 pm

Wait a sec, here. If Dr. Tacos wins he get thirty pork butt dinners buy if you win you get nothing. Where's the fair in that? He should at least make a video of your choice if you win, man.



THE
ARBITER
AARDVARK


(not affiliated with the protoss race)

by pinback » Sun Oct 09, 2011 3:35 pm

AArdvark wrote:What does Tdarcos give you for winning? I never heard that end of the deal.




THE
ONE WAY
AARDVARK
I get nothing but the satisfaction of a job well done.

I feel like I've done a well job.

by AArdvark » Sun Oct 09, 2011 1:59 pm

What does Tdarcos give you for winning? I never heard that end of the deal.




THE
ONE WAY
AARDVARK

by Flack » Sun Oct 09, 2011 12:45 pm

pinback wrote:I won this one, right? Guys?
It's like punching quicksand. Can you ever really win?

by Tdarcos » Sun Oct 09, 2011 11:32 am

pinback wrote:
Tdarcos wrote:
pinback wrote:Listen closely, cuz this is the most important part:

"Not available" is NOT a nonexistent object. It is a STRING OBJECT.
No sir, it is not. It is a string, not a string object.
Wrong. The quicker you understand that you are wrong, the quicker you will understand the language.
Okay, fine. Show me how you change the value of the string object to something else. The one characteristic that makes something an object (as opposed to a constant) is that the object can be changed.

Show me how to set a property of that string. Or an attribute. Either is fine. Because you can do that with objects. You can't do it with anything that is not an object.

So, if you can initialize, read or change a property of this string, then it is a string object; show me and I'll apologize and admit you were right, and I was wrong. But if you cannot read or change the value, it's a string constant, not an object.

See if

Code: Select all

 print "hello".name
(or)
 "hello" is static
are acceptable. You can do this with an object in Hugo, print its name property or set the static attribute. Something like this:

Code: Select all

room27 room "Somewhere"
{

  is static
  long_desc
  {
    self.name ="A"
    "Hello there" 
}
If you can't do that with "hello" then quoted strings are not objects, they are constants.

by pinback » Sun Oct 09, 2011 10:12 am

I won this one, right? Guys?

by pinback » Sat Oct 08, 2011 9:55 am

Tdarcos wrote:
pinback wrote:Listen closely, cuz this is the most important part:

"Not available" is NOT a nonexistent object. It is a STRING OBJECT.
No sir, it is not. It is a string, not a string object.
Wrong. The quicker you understand that you are wrong, the quicker you will understand the language.
The string is a constant, not an object.
Wrong. The quicker you understand that you are wrong, the quicker you will understand the language.
Well, it's not an object (for the reasons I stated above)
Wrong. The quicker you understand that you are wrong, the quicker you will understand the language.
For the reasons I have exhaustively stated above, a string is not an object, it is a constant.
Wrong. The quicker you understand that you are wrong, the quicker you will understand the language.



CAVEAT: If Hugo actually does not treat strings as objects, then I will just say that "my anus" is, at the very least, a string POINTER, just as object names are object POINTERS, so passing it to the "w_to" routine is just as valid as passing it a room object. It just doesn't make any sense. But the compiler's job is not to tell you that what you're doing doesn't make sense, just whether it's valid or not. Which it is. NO BUG. NO POR-- CHICKEN

by Tdarcos » Sat Oct 08, 2011 9:33 am

pinback wrote:This seems hard for you. I will try to make it simple:
Tdarcos wrote:Since use of an uninitialized object or nonexistent object would cause serious errors this is a bug in the compiler for not catching it.
I'm going to skip past this one, since I spend my life debugging "NullPointerException" Java errors, because even if you reference a null object, IT STILL COMPILES, LIKE EVERY OTHER LANGUAGE IN THE UNIVERSE. So let's move on:
Your comment proves exactly the point I was making. Java will crash with use of an uninitialized pointer (which I didn't know Java supported, it was my understanding Java didn't allow direct access to pointers). Hugo will allow you to use something other than an object in a construct where only an object makes sense, then blithely continue along, fat, stupid and happy to do so.
pinback wrote:
And actually, you're wrong:

Code: Select all

   S_to Noplace 
The Hugo compiler will throw a flag if "Noplace" is not defined. It will not allow you to reference a nonexistent object.
See, I can never tell if you're truly believing what you're typing, or you're just trolling or trying to get your $30.
I've already realized there is a fundamental disagreement here and you're not going to pay me.

"But where the fuck is the $5 you already promised me, asshole?" :)

I'm discussing this issue because I want to hear your (and others) remarks. I might not convince you of anything, but we can discuss this issue and perhaps we can all learn something. I know I have.
pinback wrote:Listen closely, cuz this is the most important part:

"Not available" is NOT a nonexistent object. It is a STRING OBJECT.
No sir, it is not. It is a string, not a string object. An object has characteristics which are subject to change. You can have an empty object but if the object has any value, property or routine (called a method in Object Pascal and C), the element must have a name. And that's the difference and why a string is not an object, because an object has (or can have) named components. If it has any components, it has attributes, or properties, or routines. These all have names, and the values of attributes and properties can be accessed (and changed) by name.

The string is a constant, not an object.
pinback wrote:So if you say:

Code: Select all

W_to "my anus"
...and the player types "w", he does not actually enter my anus,
I would hope he doesn't! If you're that friendly to some random guy you hardly even know, I gotta wonder what your girlfriend thinks!
pinback wrote:he enters a string object. String objects are not generally ready for guests which is why it makes the game act funny, but the fact is, it's perfectly valid code.
Well, it's not an object (for the reasons I stated above) and whether it's valid code is debatable.

I now understand why, in Hugo that "noun" has no problem with a string constant being specified immediately after it, but other objects have to move down one line. Noun is a bulit-in property that the compiler supports directly so it knows that the string following it is just a string and doesn't pretend it's an object. The other properties are set up by the user's program (or in this case, the libraries supplied with the system), and since they are not standard properties they are subject to different rules.
pinback wrote:Oh, and just to really drive the point home:
You speak about someone being able to "enter my anus" and now you want to "drive the point home." Do you have unresolved homosexual tendencies you might need to address?
pinback wrote:
A string is not an object
YES PAUL! YES IT IS! IN LIKE EVERY LANGUAGE INVENTED SINCE 1972!!
For the reasons I have exhaustively stated above, a string is not an object, it is a constant. It is immutable (you can't change a constant), has no parameters, values, properties or methods/routines. And you cannot add or assign a value, property or method to a constant. It has no name either.

Now, if you have a named string, you simply have a named constant. It's still a constant, not an object, and there is a difference.

If I code in some language the construct

Code: Select all

Constant A = 4;
I can't assign any other value to A (there are exceptions; Turbo Pascal allowed "const" to be used to assign an initial value to a variable but the variable was not protected from change), add a property, or anything else to it. It is immutable, cannot be altered to add or remove elements, and cannot be descended from (the way one can create a new object that descends from an ancestor object).

by pinback » Fri Oct 07, 2011 7:34 pm

This seems hard for you. I will try to make it simple:
Tdarcos wrote:Since use of an uninitialized object or nonexistent object would cause serious errors this is a bug in the compiler for not catching it.
I'm going to skip past this one, since I spend my life debugging "NullPointerException" Java errors, because even if you reference a null object, IT STILL COMPILES, LIKE EVERY OTHER LANGUAGE IN THE UNIVERSE. So let's move on:
And actually, you're wrong:

Code: Select all

room W_Past_warehouse "Approaching East of Warehouse area"
{
   
    
   S_to Noplace
   E_to W_of_warehouse
   W_to
      "Not available"
   
   long_desc
      "The path running east leads toward a warehouse."

    
}
The Hugo compiler will throw a flag if "Noplace" is not defined. It will not allow you to reference a nonexistent object.
See, I can never tell if you're truly believing what you're typing, or you're just trolling or trying to get your $30. Listen closely, cuz this is the most important part:

"Not available" is NOT a nonexistent object. It is a STRING OBJECT. So if you say:

Code: Select all

W_to "my anus"
...and the player types "w", he does not actually enter my anus, he enters a string object. String objects are not generally ready for guests which is why it makes the game act funny, but the fact is, it's perfectly valid code.

Oh, and just to really drive the point home:
A string is not an object
YES PAUL! YES IT IS! IN LIKE EVERY LANGUAGE INVENTED SINCE 1972!!

by Tdarcos » Fri Oct 07, 2011 6:59 pm

pinback wrote:Why did you want to put the player inside a string, TDR?

Why?
I wasn't. I use it as an example where I had made an error by not moving the text down to the next line. When it's on the same line, the compiler misinterprets it and causes the game to lock up. Moving it to the next line when I did it, fixed the problem. It was a minor error I made, that I was using it to show where the compiler does the wrong thing.

by Tdarcos » Fri Oct 07, 2011 6:56 pm

Ice Cream Jonsey wrote:
You didn't even read what I wrote, did you?
Oh, we read it alright.
No, clearly you did not.
Ice Cream Jonsey wrote:You make not like the conclusions, but we read it.
I was talking about a function of the program generating the wrong results by putting a property value on the same line as the property declaration. You were talking about the requirement to split a line by using a \ at the end. That's entirely different and has absolutely no relevance to the question I posted, so clearly you did not read what I wrote and proceeded to say whatever you wanted, the fact it had absolutely zero relevance to the question I posted notwithstanding.
Ice Cream Jonsey wrote:
Expressing the text on two lines works perfectly (without the use of the backslash) but expressing the text on one line fails without error. This is the exact opposite of what you are referring to.
Paul. PAUL. The compiler, engine and language will let you do a w_to "Some_Object". If you don't have that object defined, that's on you.
In a language requiring declaration of items in order to use them, failure to declare is an error of the program writer, and is an obvious bug which the compiler should catch. Since use of an uninitialized object or nonexistent object would cause serious errors this is a bug in the compiler for not catching it.

And actually, you're wrong:

Code: Select all

room W_Past_warehouse "Approaching East of Warehouse area"
{
   
    
   S_to Noplace
   E_to W_of_warehouse
   W_to
      "Not available"
   
   long_desc
      "The path running east leads toward a warehouse."

    
}
The Hugo compiler will throw a flag if "Noplace" is not defined. It will not allow you to reference a nonexistent object.
Ice Cream Jonsey wrote: You could rename "Blah" to "Some_Object" later and it would be fine.
Use of uninitialized or undeclared objects is not a valid purpose and serves no purpose (there is no way to use this as a feature that would allow the program to work), and for the compiler to fail to notice this is an error. There is no conceivable legitimate reason to reference a non-existent object and doing so is an error that even the simplest compiler should catch.

I've seen some applications - Firefox might be one, but Netscape Navigator definitely is one - that when the program referenced a pure virtual function (the template) of a class, instead of an overriding function to handle the particular action needed, the runtime library terminated the application. This is an example where the system protects the programmer from himself by catching obvious and glaring errors.
Ice Cream Jonsey wrote:I mean, why on earth you want to send your player character into a string I have no idea, but that's not something the compiler should or will stop you from doing.
Wrong. A compiler should catch errors that are obvious. A string is not an object, does not work as an object, and can't be used as one, so using one where an object should be present is an error the compiler should catch.
Ice Cream Jonsey wrote:
I am pointing out where a construct causes the run-time library to fail without detecting the error. If the construct is valid the application should not fail; if the construct is invalid the compiler should flag it as erroneous.
You are going to find yourself very frustrated in life if you believe that all languages are buggy if they don't catch real-time exceptions.

I'm not frustrated, I simply know when something is a real compiler or when it's a toy not worthy of serious consideration. And I doubt that you would use a weak toy to design a serious piece of fiction like CryptoZookeeper or the other ones you've used Hugo for. If it was as bad as this implies, people would have discarded Hugo as being worthless and would not have used it.

Error trapping of the obvious is trivial, it improves the code generated because really bad constructs don't go through, and because it makes the writer more careful because a bad construct won't be tolerated.

Older C compilers won't catch this type of error, but good ones will generally throw a flag (which can be overridden by a compiler argument if you need it) if you use the construct

Code: Select all

if ( a=4 ) { 
instead of

Code: Select all

if (a==4) {
in fact, good coders will do their comparisons backward such as

Code: Select all

if  (4==a) {
in case they forget to use == and use = by mistake so the compiler will catch the attempt to assign something to a constant.
Ice Cream Jonsey wrote:Commander, the reason why I said it's going to be you and not the language is because that is how it is EVERY SINGLE TIME a programmer learns a new language.

Where this will all go next is that you'll find something the language doesn't have and call it a bug.
That's got to be the weakest and most stupidly presented example of a strawman argument I've ever seen.
OK, but for the record, when you thought that Hugo couldn't print numbers that were strings, you called it a bug.
Because I knew that it could do so because the status line does so.
Ice Cream Jonsey wrote: What if Hugo simply didn't have the ability to print numbers? You would have called it a bug. That's the only reason I said that. If that's not accurate, consider it..... redacted!!!
Okay, it wouldn't have been a bug. It would have been a design failure so bad and a class of flawed application so horrendous as to make the program a toy not worth considering.

Even the smallest Basic interpreters written in 4K thirty years ago could print numbers. An application development system - a compiler, an interpreter, a spreadsheet - which is designed to allow user applications to make the development system perform actions, and has no capacity to print numbers is not merely defective, it is out and out a toy of absolutely no value and worse than useless.
Ice Cream Jonsey wrote:
It is neither an error nor a bug in Fortran, Basic or Java to fail to have pointers.... I understand your analogy except that no Basic written in about the last 20 years has required line numbers. I have FreeBasic installed
So when I say, "BASIC has line numbers" and you say, "FreeBasic doesn't require line numbers" ... I'm not so sure I said something incorrect there.
I used FreeBasic as an example. But find one. I will reiterate my statement: no commercially released Basic interpreter or compiler in the last 20 years has required line numbers, and where labels are required for branching, the labels can be words. And there is no serious open-source basic that has been released in the last 20 years that required line numbers to be used. Visual Basic, the Basic that is used in Excel or Word, the basic now used in OpenOffice.Org, none of these require line numbers.

But go ahead, prove me wrong, find any serious Basic which has been recently released - meaning one created since 1991 that has a regular following beyond the author and that those who follow the system are using it to create programs they actually use - that requires line numbers on each line and I'll apologize.
Ice Cream Jonsey wrote:Yeah, but programmers can do all sorts of wild and crazy things to lock up their applications, that gets by the compiler. In this case, the Hugo engine is trusting the programmer that he or she has a reason for doing that. That's all.
Ronald Reagan gave one of the greatest statments ever, "Trust, but verify." People make mistakes all of the time; the more things the compiler presumes the programmer can do wrong and catches, the better the code is.

One of the most powerful features of programming languages, that has seriously increased programmer efficiency, is the automation of memory management and garbage collection. This, more than anything else is why so many people moved to Java over C++ because Java does GC and memory management automatically. C++ programmers still have to do their own memory management and garbage collection, and they have commensurately higher error rates.
Ice Cream Jonsey wrote:
I have been programming for decades; that gives me an advantage in that I might push the envelope more than someone else.
I do not deny this! This is why I wanted you to test CZK.
I'll admit I wish I could have done better on it, the thing is that one of the things that bores me too easily are difficult problems I can't reasonably solve, and the second are games that kill me off fairly quickly (or, as related to the above, that I can't figure out how to keep from being killed in a hurry.)
Ice Cream Jonsey wrote:The next big game I write I will approach you again and I'll see if we can make this work.... financially. (And I'll give you a walkthrough to consult so you can find bugs and move on.)
Well, that's nice of you. The real problem is I do try to solve a problem and I'll attack it from a number of angles, but after a while I'll get frustrated because sometimes it seems like the problem can't be solved, or that the person who designed it thinks in such an unusual way that I don't see it from their angle and thus can't figure out what they were thinking.
Ice Cream Jonsey wrote:In his defense, it was Pascal.
With the development of Turbo Pascal, and later Delphi, it made Pascal an excellent environment for the development of serious applications. Pascal is a very good learning tool, and with the addition of object orientation it gave it capacities on par with C++ but with less danger of getting oneself in trouble by use of bad constructs. Pascal's usual one-pass requirement, predeclaration of identifiers, and strict typing force better habits in the development of applications and reduce attack vectors.

Since you have to declare an array or a dynamic structure in advance, you allocate it from a memory area, and going outside the memory you allocated causes the program to fault, this makes buffer overflow attacks - very common in C/C++ applications - impossible in ones written in Pascal. Access unallocated or unauthorized memory, and you don't create an execution vector for an attacker, your program crashes instead.
Ice Cream Jonsey wrote: Who's judging? This is a judging-free zone. A judge-free zone, Commander!
I must respectfully disagree, Your Honor.

by AArdvark » Fri Oct 07, 2011 2:36 pm

Random thoughts related to this thread.

Perhaps trying an example of illogic will make his brains explode like those Mudd's Women androids I seen on Star Trek.

Whose the Aussie guy? I never saw him before.

Will Dr. Tacos Iscariot never get his thirty pieces of silver pork-butt dinners?



THE
AFTER SUPPER
AARDVARK

by Flack » Fri Oct 07, 2011 11:05 am

Hugo's got more bugs than Joe's Apartment!

[youtube][/youtube]

ICJ = PWNED

by pinback » Fri Oct 07, 2011 9:57 am

Why did you want to put the player inside a string, TDR?

Why?

by pinback » Fri Oct 07, 2011 9:50 am

Flack wrote:
Tdarcos wrote:You have no idea what my capacity or capability is and you are not qualified to judge what I can or cannot do.
Image

(That second one is really funny. Pinback me up here.)
It was, in fact, the first thing I thought of when I read that line.

Top