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
Contest idea
Root / Site Discussion / [.]
12Me21Created:
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?
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=MqZgoNRERY8Sorry 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.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=MqZgoNRERY8Sorry 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
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:
- Smallest program wins (comments will not be included in the count)
- Must be faster than removing comments by hand
- Needs to work 100% of the time*
- It is NOT allowed to modify SLOT 1 (you can use SLOT 2 though)
- ' in a string
- skipping the CR after a comment
RUN 1 6 [NAME]OKfor the MEOW example. Send code to 12Me21.MC@gmail.com
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.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//slappedREM 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?
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 '*whispers* sshh if we have to include that our programs will have to be longer//slappedREM 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?
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.
http://www016.upp.so-net.ne.jp/Khnum/petitcom/SBReduce.htmlCool, 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