? Cont​est idea (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Cont​est idea

1 2
  • #1 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website On the PTC wiki, someone had a contest to create a game that was less than a kilobyte (1024 bytes!) I like these kind of contests, because it mainly tests your programming skills, and not how good you are at making a story, or anything like that. However, I think 1024 characters might not be enough (maybe 2048?) Is anyone interested in this contest, or have a better idea? Posted
  • #2 ✎ 214 ColeslawProductions This is called "Code Golf" and I think this is a great idea! Computerphile made a video about a code golf program just 4 days ago. https://www.youtube.com/watch?v=MqZgoNRERY8 Posted
  • #3 ✎ 270 NeatNit First Week Joined in the very first week of SmileBASIC Source Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    This is called "Code Golf" and I think this is a great idea! Computerphile made a video about a code golf program just 4 days ago. https://www.youtube.com/watch?v=MqZgoNRERY8
    Sorry for going off topic, but speaking of that video, do you think it's possible to recreate that same tune and code in SB? Me, I don't know the first thing about MML, but some of you gotta know.... DiscordStew? :P Back on topic: Code golf is fun, I might participate. Would you accept submissions in plain text without a public code, that have not been tested? :P
    Posted
  • #4 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    This is called "Code Golf" and I think this is a great idea! Computerphile made a video about a code golf program just 4 days ago. https://www.youtube.com/watch?v=MqZgoNRERY8
    Sorry for going off topic, but speaking of that video, do you think it's possible to recreate that same tune and code in SB? Me, I don't know the first thing about MML, but some of you gotta know.... DiscordStew? :P Back on topic: Code golf is fun, I might participate. Would you accept submissions in plain text without a public code, that have not been tested? :P
    Well, yes, I guess. If I can get petit modem to work. Maybe instead of having a size limit, we would have a task to complete, and whoever does it with the smallest program wins. That would work well for a smaller contest, because you wouldn't need to worry about uploading the program to the servers, since you could just type it. So now we have 2 potential ideas: Create a game that is less than _ bytes, and the best game wins, or Solve a task, and the smallest program wins.
    Posted Edited by 12Me21
  • #5 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website Anyway, here is the first contest Make a program to run in SLOT 1, that will tell you the size of the program in SLOT 0 not including comments. For example: BEEP 69'MEOW counts as 6 characters Rules:
    1. Smallest program wins (comments will not be included in the count)
    2. Must be faster than removing comments by hand
    3. Needs to work 100% of the time*
    4. It is NOT allowed to modify SLOT 1 (you can use SLOT 2 though)
    *things to be careful of:
    1. ' in a string
    2. skipping the CR after a comment
    note: REM doesn't count as a comment Example output: RUN 1 6 [NAME]OK for the MEOW example. Send code to [email protected]
    Posted Edited by 12Me21
  • #6 ✎ 214 ColeslawProductions Well, I don't know how to make a program read itself as it executes. Posted
  • #7 ✎ 270 NeatNit First Week Joined in the very first week of SmileBASIC Source Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    Make a program to run in SLOT 0, that will tell you the size of the program in SLOT 0 not including comments.
    I think you made a typo (bolded).
    Posted
  • #8 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    Well, I don't know how to make a program read itself as it executes.
    Oops, I meant to say SLOT 1
    Make a program to run in SLOT 0, that will tell you the size of the program in SLOT 0 not including comments.
    I think you made a typo (bolded).
    Fixed
    Posted
  • #9 ✎ 477 SquareFingers
    REM does not count as a comment!
    ' is the same thing as REM. Why would you count one as being different from the other?
    Posted
  • #10 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    REM does not count as a comment!
    ' is the same thing as REM. Why would you count one as being different from the other?
    REM is just a statement that makes smilebasic ignore the code after it. It doesn't even make the text green like ' And no one uses it.
    Posted
  • #11 ✎ 477 SquareFingers
    REM is just a statement that makes smilebasic ignore the code after it. It doesn't even make the text green like ' And no one uses it.
    All right, besides colour, ' is the same thing as REM. Is this enough reason to count one as being different from the other?
    Posted Edited by SquareFingers
  • #12 ✎ 909 Y_ack REM is more of a comment than ' will ever be. :^) Also, I have seen remarks used in Japanese programs. And I think in the samples as well. Posted
  • #13 ✎ 214 ColeslawProductions
    REM is just a statement that makes smilebasic ignore the code after it. It doesn't even make the text green like ' And no one uses it.
    All right, besides colour, ' is the same thing as REM. Is this enough reason to count one as being different from the other?
    *whispers* sshh if we have to include that our programs will have to be longer//slapped
    Posted
  • #14 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    REM is just a statement that makes smilebasic ignore the code after it. It doesn't even make the text green like ' And no one uses it.
    All right, besides colour, ' is the same thing as REM. Is this enough reason to count one as being different from the other?
    *whispers* sshh if we have to include that our programs will have to be longer//slapped
    Yes. No one is going to use REM in programs that are supposed to be as short as possible, anyway. EDIT: I think SmileBoom is trying to "phase out" usage of REM, since it's not in the suggestions when you type, and it doesn't have green syntax highlighting like '
    Posted Edited by 12Me21
  • #15 ✎ 214 ColeslawProductions Do carriage return (13) and/or line feed (10) characters need to be included in the count? Posted
  • #16 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    Do carriage return (13) and/or line feed (10) characters need to be included in the count?
    Yes. (this makes it simpler) All characters are included in the count, even control characters.
    Posted
  • #17 ✎ 180 phil_ Scholar Received for knowing a great deal about programming topics Achievements osu! Is Awesome! I love osu! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website I will be participating in this contest. I'll probably have a program in on Friday since I either have work, school, or Judo before then. Posted
  • #18 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website I have discovered some amazing code compacting methods. I don't want to reveal all of them, but I will say: If the syntax highlighting works, then the code will work too (as long as it worked before compacting) X=1Y=1 is valid I'm going to make a new thread for this. Posted Edited by 12Me21
  • #19 ✎ 909 Y_ack http://www016.upp.so-net.ne.jp/Khnum/petitcom/SBReduce.html Posted
  • #20 ✎ 1573 12Me21 Head Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website
    http://www016.upp.so-net.ne.jp/Khnum/petitcom/SBReduce.html
    Cool, but it's not perfect: S=S XOR L$[I]==STR$(34) can be S=ASC(L$[I])==34XOR S (saves 2 bytes) It also gives tons of errors with my shortened code For some reason it removes : even though that doesn't impact size
    Posted Edited by 12Me21
1 2