Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » [ATC#5] Codegolfing to the Extreme!
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
@CodeLegend can you tell me what to expect on the challenges because mine has a lot but may not be enough Thanks!
Because JS is the future (echos) future future futur futu fut fu f
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
I was considering adding that to my language, but I got the idea from Pyth, and your interpreter Also, your language can implicitly print the contents of the stack on exit. One fewer command to require, since the last thing any useful program will do is print something out.must NOT mimic specific aspects of another programming language. (This is up to my discretion.)
@CodeLegend can I add that?
Implicit i/o is very important! Please do use it. I'll update the rules with this clarification. A good rule of thumb is that if it's used in multiple languages, you can use it in yours.
- gtoal
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Let me check I understand the IO requirements.
1) Our interpreter must do an initial ‘ask’ in order to enter the codegolfed program to be executed
2) the executing program can ‘ask’ as many times as it needs for user data
3) The only I/O needed or wanted or allowed is placing text in a displayed list. (Will that list have a predefined name?) So no pen drawing to be supported, no sprites, no stamping of text etc.
1) Our interpreter must do an initial ‘ask’ in order to enter the codegolfed program to be executed
2) the executing program can ‘ask’ as many times as it needs for user data
3) The only I/O needed or wanted or allowed is placing text in a displayed list. (Will that list have a predefined name?) So no pen drawing to be supported, no sprites, no stamping of text etc.
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
Don't expect to make a super-short program for all of them… As a basic turing-completeness check, ask yourself if you could perform @CodeLegend can you tell me what to expect on the challenges because mine has a lot but may not be enough Thanks!any mathematical function. If you couldn't, re-engineer your language so that you could. String manipulation is a bit trickier, but the three blocks in Scratch seem to suffice.
If your language is Turing-complete, you will be able to complete all of the challenges.
EDIT: Most Hard Challenges and some Intermediate Challenges require looping or conditionals. (Turing-complete languages have these too)
Last edited by CodeLegend (July 23, 2016 01:53:35)
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
Correct. No specific name is required, as long as I can tell where I'm supposed to be looking. Let me check I understand the IO requirements.
1) Our interpreter must do an initial ‘ask’ in order to enter the codegolfed program to be executed
2) the executing program can ‘ask’ as many times as it needs for user data
3) The only I/O needed or wanted or allowed is placing text in a displayed list. (Will that list have a predefined name?) So no pen drawing to be supported, no sprites, no stamping of text etc.
EDIT: not quite correct, any extraneous I/O is allowed but completely unnecessary. (I'd like people to come out of this competition with something to show for it. Anything can be added, as long as it's not intrusive to the required functionality.)
Last edited by CodeLegend (July 23, 2016 01:49:19)
- gtoal
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Don't expect to make a super-short program for all of them… As a basic turing-completeness check, ask yourself if you could perform @CodeLegend can you tell me what to expect on the challenges because mine has a lot but may not be enough Thanks!any mathematical function. If you couldn't, re-engineer your language so that you could. String manipulation is a bit trickier, but the three blocks in Scratch seem to suffice.
If your language is Turing-complete, you will be able to complete all of the challenges.
I think it's a fair question to ask what implicit functions will be required. If a problem needs the use of tan(x) and the coder didn't include a call to a tan function, he'd have to write one from scratch. There are too many math and other library functions for us to guess at. Maybe define a subset of functions (ones that can be implemented with scratch blocks)? OR… set problems that don't require *any* implicit functions apart from simple arithmetic.
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
I am still working on string manipulation but I am thinking about just adding in all of the Scratch string manipulation blocks. My mathematics is great. My if statements are ify they work but they are confusion. Will we be the ones solving the challenge?Don't expect to make a super-short program for all of them… As a basic turing-completeness check, ask yourself if you could perform @CodeLegend can you tell me what to expect on the challenges because mine has a lot but may not be enough Thanks!any mathematical function. If you couldn't, re-engineer your language so that you could. String manipulation is a bit trickier, but the three blocks in Scratch seem to suffice.
If your language is Turing-complete, you will be able to complete all of the challenges.
Also you should make a rule of people making blank statements because you can just make when you click enter on the ask it can solve the advanced challenges. I would just ban it
Because JS is the future (echos) future future futur futu fut fu f
- gtoal
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
PS May I reserve the name “!” for any language I might write for this? In case I find myself more idle than I expect on the boat, after I've finished the other two projects I planned to work on… :-)
- gtoal
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Question: say I implement a general-purpose text compression algorithm, would it be a valid golf submission when we get to that stage, to allow the program to be entered using compressed text, ie no longer a 1:1 correlation between text and language constructs? Somewhat akin to, perhaps, entering a btoa-encoded gzip of a C source program.
- Jonathan50
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Are hacked blocks allowed?
Not yet a Knight of the Mu Calculus.
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
If you include all of the scratch mathematical functions, you'll be good to go. I'm not going to give a specific set because that would narrow down possible challenges. -snip-
I think it's a fair question to ask what implicit functions will be required. If a problem needs the use of tan(x) and the coder didn't include a call to a tan function, he'd have to write one from scratch. There are too many math and other library functions for us to guess at. Maybe define a subset of functions (ones that can be implemented with scratch blocks)? OR… set problems that don't require *any* implicit functions apart from simple arithmetic.
The interpreter can't be changed after the challenges are released. So unless they get really lucky, that's not going to happen. -snip-
I am still working on string manipulation but I am thinking about just adding in all of the Scratch string manipulation blocks. My mathematics is great. My if statements are ify they work but they are confusion. Will we be the ones solving the challenge?
Also you should make a rule of people making blank statements because you can just make when you click enter on the ask it can solve the advanced challenges. I would just ban it
Sure! “!” is reserved. PS May I reserve the name “!” for any language I might write for this? In case I find myself more idle than I expect on the boat, after I've finished the other two projects I planned to work on… :-)
As long as the code entered into the ask box only uses the 95 characters listed in the first post, anything goes. Question: say I implement a general-purpose text compression algorithm, would it be a valid golf submission when we get to that stage, to allow the program to be entered using compressed text, ie no longer a 1:1 correlation between text and language constructs? Somewhat akin to, perhaps, entering a btoa-encoded gzip of a C source program.
The first post doesn't say otherwise. Are hacked blocks allowed?
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
If you include all of the scratch mathematical functions, you'll be good to go. I'm not going to give a specific set because that would narrow down possible challenges. -snip-
I think it's a fair question to ask what implicit functions will be required. If a problem needs the use of tan(x) and the coder didn't include a call to a tan function, he'd have to write one from scratch. There are too many math and other library functions for us to guess at. Maybe define a subset of functions (ones that can be implemented with scratch blocks)? OR… set problems that don't require *any* implicit functions apart from simple arithmetic.The interpreter can't be changed after the challenges are released. So unless they get really lucky, that's not going to happen. -snip-
I am still working on string manipulation but I am thinking about just adding in all of the Scratch string manipulation blocks. My mathematics is great. My if statements are ify they work but they are confusion. Will we be the ones solving the challenge?
Also you should make a rule of people making blank statements because you can just make when you click enter on the ask it can solve the advanced challenges. I would just ban itSure! “!” is reserved. PS May I reserve the name “!” for any language I might write for this? In case I find myself more idle than I expect on the boat, after I've finished the other two projects I planned to work on… :-)As long as the code entered into the ask box only uses the 95 characters listed in the first post, anything goes. Question: say I implement a general-purpose text compression algorithm, would it be a valid golf submission when we get to that stage, to allow the program to be entered using compressed text, ie no longer a 1:1 correlation between text and language constructs? Somewhat akin to, perhaps, entering a btoa-encoded gzip of a C source program.The first post doesn't say otherwise. Are hacked blocks allowed?
I also think that it is a fair point because you released some of the challenges already. Also I shared mine (not even close to done) https://scratch.mit.edu/projects/116870302/
Because JS is the future (echos) future future futur futu fut fu f
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Thanks! I was confused about that oneQuestion: Can I use a engine on scratch if I give credit that will do the calculation for the math?From the first post:Your interpreter must NOT contain any code (Scratch blocks or translated from another language) from an interpreter created by someone other than yourself.So yes, if that project wasn't designed as a programming language interpreter.
Last edited by IcyCoder (July 23, 2016 02:12:22)
Because JS is the future (echos) future future futur futu fut fu f
- Jonathan50
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
I'm just providing Scratch's
([ v] of () :: operators)block. Its a bit long to use though (well, for golfing) and it'll hurt even more because I have no procedures.
Not yet a Knight of the Mu Calculus.
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
I can't tell what you're referring to. Remember that when you quote you can reduce the quote to a specific piece of the original message, as long as you're not deliberately changing the inferred meaning.-snip-
I also think that it is a fair point because you released some of the challenges already. Also I shared mine (not even close to done) https://scratch.mit.edu/projects/116870302/
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
The whole thing that some one can make a hard challenge in 0 char of codeI can't tell what you're referring to. Remember that when you quote you can reduce the quote to a specific piece of the original message, as long as you're not deliberately changing the inferred meaning.-snip-
I also think that it is a fair point because you released some of the challenges already. Also I shared mine (not even close to done) https://scratch.mit.edu/projects/116870302/
Because JS is the future (echos) future future futur futu fut fu f
- CodeLegend
- Scratcher
500+ posts
[ATC#5] Codegolfing to the Extreme!
No, they can't unless they get super lucky. I haven't released any challenges yet. The ones in the first post are examples.The whole thing that some one can make a hard challenge in 0 char of codeI can't tell what you're referring to. Remember that when you quote you can reduce the quote to a specific piece of the original message, as long as you're not deliberately changing the inferred meaning.-snip-
I also think that it is a fair point because you released some of the challenges already. Also I shared mine (not even close to done) https://scratch.mit.edu/projects/116870302/
- IcyCoder
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
OKNo, they can't unless they get super lucky. I haven't released any challenges yet. The ones in the first post are examples.The whole thing that some one can make a hard challenge in 0 char of codeI can't tell what you're referring to. Remember that when you quote you can reduce the quote to a specific piece of the original message, as long as you're not deliberately changing the inferred meaning.-snip-
I also think that it is a fair point because you released some of the challenges already. Also I shared mine (not even close to done) https://scratch.mit.edu/projects/116870302/
Because JS is the future (echos) future future futur futu fut fu f
- PullJosh
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
For what it's worth, the name has been spot-on so far.I'm calling mine “Pull-allyourhairout”. I'm calling mine “StachyStack”
- Jonathan50
- Scratcher
1000+ posts
[ATC#5] Codegolfing to the Extreme!
Ok, I made two-letter names for all of those operations. I'm keeping that though just in case someone makes a program that takes the name of an operation as input… I'm just providing Scratch's([ v] of () :: operators)block. Its a bit long to use though (well, for golfing) and it'll hurt even more because I have no procedures.
Last edited by Jonathan50 (July 23, 2016 02:44:32)
Not yet a Knight of the Mu Calculus.
- Discussion Forums
- » Advanced Topics
- » [ATC#5] Codegolfing to the Extreme!