Adriandmen / 05AB1E

A concise stack-based golfing language
MIT License
761 stars 48 forks source link

List Commands #79

Open okx-code opened 7 years ago

okx-code commented 7 years ago

Suggestion: Add more lists, such as triangular numbers or lucas numbers. Also, maybe make another list command where it will get the first n numbers in the sequence, not numbers in the sequence up to n as it is already.

michaelsanford commented 7 years ago

@Adriandmen Do you want this implemented?

If so:

I enjoy this project and am happy to contribute (if you welcome more PRs).

Adriandmen commented 7 years ago

@michaelsanford Well, the extended-math.txt is quite empty (previously known as list-commands.txt), so there's a lot of room for new commands. I can't really think of any functions that are currently needed, perhaps something like a sign-function or any other mathematical function.

Feel free to implement anything you like, there's more than enough room 😄!

P.S. Perhaps it's faster and easier to implement it in the extended_math.py as that file is more clean and smaller than the big (badly written) osabie.py file.

michaelsanford commented 7 years ago

Cool! I just didn't want to arbitrarily grab some command names that you had plans for or a pattern to.

I was thinking the same thing regarding extended_math.py.

Adriandmen commented 7 years ago

No worries about that, there is no strict pattern for the extended math commands :)

gozur commented 7 years ago

We need this stat! @Adriandmen

michaelsanford commented 7 years ago

We already have triangular numbers (Ã…T), so I started working on a generic polygonal number generator (takes 2 parameters: sides and the usual limit). Is that of any use, or should I move on to something else?

Edit: @Adriandmen Unless I misunderstood what that does (I just saw your comment on my PR).

I'm unsure which of, say, these might be most useful to this project.

Adriandmen commented 7 years ago

@michaelsanford Yeah, for example, 5Ã…T gives a list of all triangular numbers <= 5, not the first 5 triangular numbers. We don't have a command (yet) that does the latter.

I like the idea for the polygonal number generator. I've seen some polygonal challenges lately where that might come in handy and we still have plenty of space for new commands :).

Also, the commands do not necessarily need to be list commands, they can also be math commands if you prefer that 😄. Let me know if you have any questions :)

michaelsanford commented 7 years ago

Thanks for that clarification! I'll finish it up and send it along.