something1990 wrote:
Another person that started programming earlier than I did. Did everyone here start programming before HS or even before MS?

i am starting in seventh grade and am allready pretty good and i am still in seventh grade MS for me though i am taking a HS algebra class
Good for you. What languages do you know?
KermMartian wrote:
Yup, the decoding/encoding table for SC2 is about 50k total.


*plain text Wink a compiled EXE or similar using that same table would take less space. Also, there are optimizations that could be done. (My Python dict table only takes 12.4kb of space, but it is JUST the table, nothing extra)

For example, rather than a complete table lookup, you could do partial-table, since ranges of tokens are already ASCII. For example, the A-Z range is already ASCII, and doesn't need to be looked up (obviously for a web proggy like SC it does, but for a lang like python, VB, or C, just dump the raw value into the string - for Python/VB you would use the chr() function, and C/C++ you can just store the byte directly to a char) - i think there are other symbols that are ASCII too, but otherwise an offset can be used for ranges. The a-z range, (which is under 0xbb, in range 0xb0 to 0xca) can just have 0x4f subtracted from it to get it to the ASCII value

If you want to program in Python, I can give you the complete dict for the tokens (it returns HTML, but a simple embedded HTML window will render it as "plain text" simple enough). I have a proggy somewhere on my hdd that i called a "preview 8xp" that does basically what you want, just displays the program code read-only in a simple window. I figured it was rather useless, but if you want it, i can post it here.... (Its in Python, but I *think* I have a win32 compiled version of it) You don't even have to click "Parse", just associate it with .8xp files in windows, and it will open up and parse the file automatically. Surely double-clicking on the .8xp isn't too much work? Razz

Thanks to Kerm for the token table Wink (a simple find/replace turned the PHP array that SC used into a dict that Python can use, w00t)

EDIT: I found it! I called it "quickView", and here is a screenshot:

No you actually can't give him the token table - remember I specifically told you not to redistribute without permission? Smile
Quote:
Dan is good with those tutorials. Even I never knew what they did until he posted that. Even so, I tend not to use them.


lol, thanks. Smile

I am lookin through some stuff, trying to find something else to post up in the 1337 section... Might start putting some routines up...
KermMartian wrote:
No you actually can't give him the token table - remember I specifically told you not to redistribute without permission? Smile


I wasn't going to send him the one you gave me, but rather my re-coded version Wink (and there are other token tables, so its not like its secret or anything - the tilp docs has a good table)
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement