Discuss Scratch

Saiid
Scratcher
1000+ posts

PigeonScript - a Golfing Language

ScratchMan544 wrote:

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.
Brain“flakes” lol anyway yeah, so……
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


Google Sv4mvJbXBJPClyDgc7p5WkYITBi618 to see all my posts

;
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.
Sigton
Scratcher
1000+ posts

PigeonScript - a Golfing Language

ScratchMan544 wrote:

-script doesn't necessarily mean JavaScript. Like RiverScript or GolfScript.
Not necessarily, but often does

Sigton


ScratchMan544
Scratcher
100+ posts

PigeonScript - a Golfing Language

Saiid wrote:

ScratchMan544 wrote:

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.
Brain“flakes” lol anyway yeah, so……
-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

ScratchMan544 wrote:

Saiid wrote:

ScratchMan544 wrote:

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.
Brain“flakes” lol anyway yeah, so……
-snip-

Yeah that's the common term for that language on the Scratch website. It was used in the ATC challenges.
leel

Saiid


Google Sv4mvJbXBJPClyDgc7p5WkYITBi618 to see all my posts

;
Saiid
Scratcher
1000+ posts

PigeonScript - a Golfing Language

K here's the github and the doc

Saiid


Google Sv4mvJbXBJPClyDgc7p5WkYITBi618 to see all my posts

;
Sigton
Scratcher
1000+ posts

PigeonScript - a Golfing Language

First time I saw it I thought it said ‘Branflakes’ xDD

Sigton


Jonathan50
Scratcher
1000+ posts

PigeonScript - a Golfing Language

CodeLegend wrote:

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.
That's no harder than separating words. Anyway, in normal maths notation then 1 2 is 1 * 2, isn't it?

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

Jonathan50 wrote:

CodeLegend wrote:

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.
That's no harder than separating words. Anyway, in normal maths notation then 1 2 is 1 * 2, isn't it?
No, but 1(2) is. You cannot stick 2 numbers together without some kind of separation that isn't whitespace in normal notation.

ScratchMan544
Scratcher
100+ posts

PigeonScript - a Golfing Language

CodeLegend wrote:

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

ScratchMan544 wrote:

Saiid wrote:

Brain“flakes” lol anyway yeah, so……
Yeah that's the common term for that language on the Scratch website. It was used in the ATC challenges.

Sigton wrote:

First time I saw it I thought it said ‘Branflakes’ xDD
It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes.

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 “+”?

HELLo there
Sigton
Scratcher
1000+ posts

PigeonScript - a Golfing Language

dzaima wrote:

It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes.
Ah, maybe I didn't misread it then

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used

Sigton


jokebookservice1
Scratcher
1000+ posts

PigeonScript - a Golfing Language

Sigton wrote:

dzaima wrote:

It was branflakes on ATC#2 which is where I think it originated, but by some reason people have moved to brainflakes.
Ah, maybe I didn't misread it then

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used

Sigton
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.

Either assign “+” to a common codegolf challenge, or give it doubke implicit input imo
dzaima
Scratcher
100+ posts

PigeonScript - a Golfing Language

Sigton wrote:

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used
Sigton
true. So maybe double implicit times should take one input and use it twice:
“+” = 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.

HELLo there
jokebookservice1
Scratcher
1000+ posts

PigeonScript - a Golfing Language

Sigton wrote:

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used
Sigton
I think it will be used

Last edited by jokebookservice1 (Oct. 28, 2016 12:37:09)

jokebookservice1
Scratcher
1000+ posts

PigeonScript - a Golfing Language

dzaima wrote:

Sigton wrote:

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used
Sigton
true. So maybe double implicit times should take one input and use it twice:
“+” = 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.
6-

Append 6 to  stack
Pop 6, Pop INPUT
Push result
Which means it is the same as what
6 INPUT-
would give
dzaima
Scratcher
100+ posts

PigeonScript - a Golfing Language

jokebookservice1 wrote:

dzaima wrote:

Sigton wrote:

dzaima wrote:

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 “+”?
Double implicit input would be cool, but I doubt it would ever be used
Sigton
true. So maybe double implicit times should take one input and use it twice:
“+” = 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.
6-

Append 6 to  stack
Pop 6, Pop INPUT
Push result
Which means it is the same as what
6 INPUT-
would give
I'd think of it as
append 6 to stack
subtract: before last - last
subtract: doesn't exist - 6
subtract: input - 6
so
INPUT 6-
edit: also think of what'd be more practical: input-6 or 6-input?
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)


HELLo there
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
define subtraction {
PUSH (POP - POP)
}
Because the first POP returns 6 and the second returns INPUT.
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 setup
alias [>{token}] [\\0 \\\0 1+] ::custom
alias [<{token}] [\\0 \\0 1-] ::custom
...
Not sure if it would work though

Last edited by jokebookservice1 (Oct. 28, 2016 13:01:42)

Powered by DjangoBB