Skip to content

Ideas for Golfing #35

@phase

Description

@phase

This thread is going to be a place where we discuss ideas on making O better suited for codegolf. Right now O can be pretty verbose and is easily beaten by other languages such as Pyth and Seriously (both written in Python). Here are some ideas on how we can solve this issue:

  • Something needs to be done about implicit input/output. i and o take up too many bytes. Let's compare it with GolfScript (which is so old it loses pretty much everything). Outputting the string 111 in GS is just 111. In O, there are a couple ways to do this. We could output each number by itself, 1o1o1o, which is 3 bytes more. We could output it as a string, "111"o, which is still 3 bytes more. A good idea would to have everything on the stack outputted when the code is finished executing. The input could be pushed to the beginning of the stack before the code executes. DONE!
  • We're running out of symbols! I think we should use all 255 characters available to us in a byte, so we can get the most out of each one. I did this with Refract a little bit, but having each character have its own function would allows us to do more complicated things in a smaller amount of bytes.

/cc @kirbyfan64

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions