Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Warning: Your Forum Name needs to have some spaces in it if you want to have it that long!

Author
Message
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Mar 2009 17:19
Quote: "0x03, 0x04 etc. is binary, eh?"

No, it's a couple of values demonstrated in hexadecimal notation. He could have used 'binary' if it would have made it clearer for you, but as you're using a web browser which displays text, you'd just get some strange characters instead.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Mar 2009 20:11
I guess I'm used to people typing what they mean

But anyways, the important thing is that there is such a thing as "over-engineering". You can't optimize everything 100% "just because", unless the savings carry more weight than the work. A few bytes here and there does not make it worth Rich's time to essentially re-write the code to store and retrieve data from the database. And then of course there's the matter of going through all the existing records and updating them.

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 5th Mar 2009 20:18
It'd be faster to update the database to use mediumtext instead of tinytext (which I assume it's currently using) than to start encoding/decoding to binary/hex!

Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Mar 2009 20:54
Text is binary... And no it wouldn't, how is it faster to parse between 7 and 14~ bytes to come up with "Oh, this block of text is bold" or "Oh, this block of text is center", when you could parse a total of 2 bytes to reach the same conclusion? The text characters would be the same, so all you'd have to do to go into the "encoding/decoding" is ask "Is the value for this less than the first value of a printable character?"

It's not difficult, and it's not complex. And yes, the example is in C++ because it's a lot clearer to get the point across then PHP code inside some HTML thing. And I could argue with that too, it's not C++, it's something that has the same syntax, but it's not C++

My point being, it's easy to do, it can be implemented fairly quickly by one of the developers, and it'd effectively increase the character limit (Imagine 'center' and '/center' being turned to a single byte).

As I already mentioned, I'm sure there are technical reasons why it can't be done.

@jeku
HEX IS BINARY.
<binary on left, hex on right>
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A
1011 = B
1100 = C
1101 = D
1110 = E
1111 = F

It seems to translate well... And since 8 bits is a byte, 0xFF is the highest value of a byte, and since the "encodings" are only one byte big, they can exist as if they were characters, it's no more difficult than detecting a null character in a string.

I could argue further with this, but I'll wait until someone asks another question about it or posts an argument towards it.


NOTE: If TGC doesn't want to implement this, and they probably won't, they don't have to. I'm not pushing this at TGC or saying that they have to implement it, I'm merely offering a suggestion.

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Mar 2009 22:06
Quote: "@jeku
HEX IS BINARY."


I hope you're joking. Hexadecimal is a base-16 numbering system, and binary is a base-2 numbering system. They are *not* the same. Obviously you can compare them just as easy as you can compare base-10 notation with binary.

Yes, I know how to count in binary, hex, and convert them all to base-10. I'm just letting you know this so you don't embarrass yourself

I think you and I sort of are on the same page, but your conventions are wrong.

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 5th Mar 2009 22:12
Quote: "
I hope you're joking. Hexadecimal is a base-16 numbering system, and binary is a base-2 numbering system. They are *not* the same. Obviously you can compare them just as easy as you can compare base-10 notation with binary.


Yes, I know how to count in binary, hex, and convert them all to basef-10. I'm just letting you know this so you don't embarrass yourself"


They're not the same, but hex is expressly used because it is so good at representing binary (since one hex = 4 bits). Therefore, considering we're all programmers, comparing binary and hex directly is 'fair game' in my opinion


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 5th Mar 2009 22:18 Edited at: 5th Mar 2009 22:18
Quote: "comparing binary and hex directly is 'fair game' in my opinion"


Yes, it is fair to compare them. But not fair to call them the same. This is all I'm trying to say.

The blanket "HEX IS BINARY." statement is absolutely false.

Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 6th Mar 2009 02:55
I see what you meant Jeku. I meant that they are the same in computers (hex is stored as binary). So I apologize for the confusion and my inability to properly express what I meant.

In terms of speed, btw, you can compare a 32-bit number on a 32-bit processor just as fast as an 8-bit number on a 32-bit processor (random note).

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 6th Mar 2009 21:40
Quote: "Text is binary... And no it wouldn't, how is it faster to parse between 7 and 14~ bytes to come up with "Oh, this block of text is bold" or "Oh, this block of text is center", when you could parse a total of 2 bytes to reach the same conclusion? The text characters would be the same, so all you'd have to do to go into the "encoding/decoding" is ask "Is the value for this less than the first value of a printable character?""


I'm not saying it'll be more or less speedy to parse. I'm saying it'll be faster to implement just updating the db.

To implement, you'd have to run a sql call to modify the database to convert the smaller field to one that accepts more data, then go into the PHP files to update them to check for a different (more arbitrary) upper size limit. It'd actually be pretty simple, but would require a time commitment to debug and find all the entries.

Rich, seeming to be a competent coder, probably coded the software in such as a way that it would probably be super easy to do, actually. But I don't think anybody's working on the website on any permanent basis, so expecting someone to go in and do the hour or two of work required (and to make backups and all that good stuff) is kind of a lot to ask.

I'm not claiming to be an expert on PHP or anything, so perhaps there's some usage somewhere that makes this far more difficult than it would seem.

Mr Makealotofsmoke
18
Years of Service
User Offline
Joined: 10th Dec 2006
Location: BillTown (Well Aust)
Posted: 7th Mar 2009 00:21
theres a limit?
So how does mine work?

yo yo wats up?
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 7th Mar 2009 01:09
It worked before because you had a space after "mr".

Matt Rock
20
Years of Service
User Offline
Joined: 5th Mar 2005
Location: Binghamton NY USA
Posted: 7th Mar 2009 10:22 Edited at: 7th Mar 2009 10:27
Quote: "How about we get paid for useful posts, and charged for useless ones?"

I personally like the idea of the forums staying free, and not paying anything. I shouldn't get a stipend for hosting text adventure competitions (though the other judges will hate me for saying that, lol), and likewise, I shouldn't get charged a fine for asking girlfriend advice or asking people who their favorite musicians are. The TGC community has the perfect blend of freedom and moderation. Charging people for stupid posts would tip the scale toward something a little too totalitarian for anyone here... except Grandma, of course.

That being said, paying people for useful threads might be a good idea, if done properly. For instance, the moderators (and me, your fun loving forum President who wants to feel important ) could pick out some number of threads that were stickied for general awesome-factor, and every[insert period of time here], we could do some sort of poll where people vote on their favorite thread, and the thread-maker could win (n) store points. It would encourage people to post more useful threads, but then there's the catch-22 of some people trying a little too hard to be helpful, bumping threads just to get some attention in an effort to win store points. Though for the most part this is a mature community (in behavior anyway ), so I dunno... just an idea based on someone else's idea.

Quirkyjim
16
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 7th Mar 2009 22:39
Yeah, I was kinda kidding 'cus I knew how many people would try to exploit it.

~QJ

Login to post a reply

Server time is: 2025-05-06 12:45:08
Your offset time is: 2025-05-06 12:45:08