Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » PigeonScript - a Golfing Language
- Saiid
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
Brain“flakes” lol anyway yeah, so…… We don't need to worry about a file extension until we've actually built a language. And besides, lots of esolangs don't have file extensions, or have ambiguous file extensions. For example, Brainflakes can use .b or .bf, but .bf is also sometimes used for Befunge.
I'm going to head there now and start setting it up. If anyone has a problem with the repo “pigeon-script” and the name PigeonScript, Speak now or forever hold your peace tongue
Saiid
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
I made POTATO, I know how to use a stack to parse postfix (in fact I might have actually used the technique). How will your language be different from potato (apart from things I forgot to add, like looping a certain amount of times.
- ScratchMan544
- Scratcher
100+ posts
PigeonScript - a Golfing Language
Brain“flakes” lol anyway yeah, so…… We don't need to worry about a file extension until we've actually built a language. And besides, lots of esolangs don't have file extensions, or have ambiguous file extensions. For example, Brainflakes can use .b or .bf, but .bf is also sometimes used for Befunge.
-snip-
Yeah that's the common term for that language on the Scratch website. It was used in the ATC challenges.
_=(lambda _:lambda __:_(__))(lambda _:getattr(_,( lambda _:_[:2]+str(print.__call__)[0b10011:(1+1<<1+1+1)+(1<<1+1)+(1<<1)+1]+_[-2:] )(__name__)))(eval) (lambda _:lambda __:_(__))(lambda _:_(_( __import__(dir(__builtins__)[((1<<1+1)<<1+1+1)+(1+1<<1+1+1)+(1+1<<1)+(1<<1)][:3].lower()), print.__doc__[46:52]),open(__file__).write.__str__()[17:22]))(_("getattr"))(( lambda _:lambda __:_(_,__))(lambda _,__:""if __==0else chr(__%128)+_(_,__//128))(963149002634454890336513358634316810781103160855182366005237514)[::-1] )
- ScratchMan544
- Scratcher
100+ posts
PigeonScript - a Golfing Language
So PidgeonScript it is then. How's the github repository going, @saiid?
Last edited by ScratchMan544 (Oct. 27, 2016 20:12:20)
_=(lambda _:lambda __:_(__))(lambda _:getattr(_,( lambda _:_[:2]+str(print.__call__)[0b10011:(1+1<<1+1+1)+(1<<1+1)+(1<<1)+1]+_[-2:] )(__name__)))(eval) (lambda _:lambda __:_(__))(lambda _:_(_( __import__(dir(__builtins__)[((1<<1+1)<<1+1+1)+(1+1<<1+1+1)+(1+1<<1)+(1<<1)][:3].lower()), print.__doc__[46:52]),open(__file__).write.__str__()[17:22]))(_("getattr"))(( lambda _:lambda __:_(_,__))(lambda _,__:""if __==0else chr(__%128)+_(_,__//128))(963149002634454890336513358634316810781103160855182366005237514)[::-1] )
- Saiid
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
leelBrain“flakes” lol anyway yeah, so…… We don't need to worry about a file extension until we've actually built a language. And besides, lots of esolangs don't have file extensions, or have ambiguous file extensions. For example, Brainflakes can use .b or .bf, but .bf is also sometimes used for Befunge.
-snip-
Yeah that's the common term for that language on the Scratch website. It was used in the ATC challenges.
Saiid
- Jonathan50
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
That's no harder than separating words. Anyway, in normal maths notation then 1 2 is 1 * 2, isn't it? IMO -Io- brought up some good points. How would you teach postfix to someone with no math skills? Imagine teaching them that 12 is “twelve”, not “one two”, only to follow that with “but 1 2 is one two”. Infix effectively shows where numbers start and stop.
Last edited by Jonathan50 (Oct. 28, 2016 02:53:27)
Not yet a Knight of the Mu Calculus.
- -Io-
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
No, but 1(2) is. You cannot stick 2 numbers together without some kind of separation that isn't whitespace in normal notation.That's no harder than separating words. Anyway, in normal maths notation then 1 2 is 1 * 2, isn't it? IMO -Io- brought up some good points. How would you teach postfix to someone with no math skills? Imagine teaching them that 12 is “twelve”, not “one two”, only to follow that with “but 1 2 is one two”. Infix effectively shows where numbers start and stop.
- ScratchMan544
- Scratcher
100+ posts
PigeonScript - a Golfing Language
IMO -Io- brought up some good points. How would you teach postfix to someone with no math skills?
I assume we all have math skills, and you can't deny that in most cases postfix notation leads to more compact code, which is our priority here. So how about we just use postfix notation and stop this silly argument.
_=(lambda _:lambda __:_(__))(lambda _:getattr(_,( lambda _:_[:2]+str(print.__call__)[0b10011:(1+1<<1+1+1)+(1<<1+1)+(1<<1)+1]+_[-2:] )(__name__)))(eval) (lambda _:lambda __:_(__))(lambda _:_(_( __import__(dir(__builtins__)[((1<<1+1)<<1+1+1)+(1+1<<1+1+1)+(1+1<<1)+(1<<1)][:3].lower()), print.__doc__[46:52]),open(__file__).write.__str__()[17:22]))(_("getattr"))(( lambda _:lambda __:_(_,__))(lambda _,__:""if __==0else chr(__%128)+_(_,__//128))(963149002634454890336513358634316810781103160855182366005237514)[::-1] )
- dzaima
- Scratcher
100+ posts
PigeonScript - a Golfing Language
Yeah that's the common term for that language on the Scratch website. It was used in the ATC challenges. Brain“flakes” lol anyway yeah, so……
It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes. First time I saw it I thought it said ‘Branflakes’ xDD
Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
- Sigton
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
Ah, maybe I didn't misread it then It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes.
Double implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
Potato had double implicit input (i.e. it would pop from the stack. If it couldn't, it would ask for input). Remember, every program must have a meaning (i.e. no syntax errors) in order to not waste characters.Ah, maybe I didn't misread it then It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes.Double implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
Either assign “+” to a common codegolf challenge, or give it doubke implicit input imo
- dzaima
- Scratcher
100+ posts
PigeonScript - a Golfing Language
true. So maybe double implicit times should take one input and use it twice:Double implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
“+” = input*2,
“*” = input^2.
“^” = input^input (the same input)
but then “-” and “/” becomes a problem as they're constant. So my solution would be:
“-” = -input
“/” = 1/input
Should we use that?
Also, “6/” should be input/6 or 6/input? “5-” = input-5 or 5-input? I'd say input/6 and input-5.
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
I think it will be usedDouble implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
Last edited by jokebookservice1 (Oct. 28, 2016 12:37:09)
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
6-true. So maybe double implicit times should take one input and use it twice:Double implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
“+” = input*2,
“*” = input^2.
“^” = input^input (the same input)
but then “-” and “/” becomes a problem as they're constant. So my solution would be:
“-” = -input
“/” = 1/input
Should we use that?
Also, “6/” should be input/6 or 6/input? “5-” = input-5 or 5-input? I'd say input/6 and input-5.
Append 6 to stack
Pop 6, Pop INPUT
Push result
6 INPUT-
- dzaima
- Scratcher
100+ posts
PigeonScript - a Golfing Language
I'd think of it as6-true. So maybe double implicit times should take one input and use it twice:Double implicit input would be cool, but I doubt it would ever be used Anyways, so this language currently is stack based and is postfix and 34 stacks 34 not 3 and 4, there's implicit input for cases like “1+”. But does it double implicit input for “+”?
Sigton
“+” = input*2,
“*” = input^2.
“^” = input^input (the same input)
but then “-” and “/” becomes a problem as they're constant. So my solution would be:
“-” = -input
“/” = 1/input
Should we use that?
Also, “6/” should be input/6 or 6/input? “5-” = input-5 or 5-input? I'd say input/6 and input-5.Which means it is the same as whatAppend 6 to stack
Pop 6, Pop INPUT
Push resultwould give6 INPUT-
append 6 to stack
subtract: before last - last
subtract: doesn't exist - 6
subtract: input - 6
INPUT 6-
one case would be if you need to subtract 1 form input but I think that decrementing/incrementing the last in stack/implicit input should be built-in commands like D (decrement) and I (increment).
One case of x-input would be 0-input but as I've said before that should be just “-” if nothing is in the stack. And even rarer would you need any other cases of x-input.
Last edited by dzaima (Oct. 28, 2016 12:59:52)
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
Remember that it has to pop one item at a time. 6 gets popped first, so it is as if it was placed onto the stack earlier. Only then is there an empty stack so the INPUT is the second thing to have been appended to the stack.
That is, assuming we are parsing it as
Because the first POP returns 6 and the second returns INPUT.
That is, assuming we are parsing it as
define subtraction {
PUSH (POP - POP)
}
- jokebookservice1
- Scratcher
1000+ posts
PigeonScript - a Golfing Language
I just had an idea for parsing! Make the language TC, then bind extra tokens to already existing commands, e.g.
define setupNot sure if it would work though
alias [>{token}] [\\0 \\\0 1+] ::custom
alias [<{token}] [\\0 \\0 1-] ::custom
...
Last edited by jokebookservice1 (Oct. 28, 2016 13:01:42)