Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create standard library #53

Open
4 of 9 tasks
jcubic opened this issue Feb 15, 2022 · 1 comment
Open
4 of 9 tasks

Create standard library #53

jcubic opened this issue Feb 15, 2022 · 1 comment

Comments

@jcubic
Copy link
Owner

jcubic commented Feb 15, 2022

What do we need?

Based on original game:

  • parse query string
  • download files
  • save cookies
  • escape formatting and angle branches
  • Export/import view ? - what about CLI?
  • shuffle
  • Math functions
  • keys, values

Other ideas

  • Python range function
@jcubic
Copy link
Owner Author

jcubic commented Feb 25, 2022

It would be nice to create some functions of the library in Gaiman itself.

def range(start, stop, step)
    if not stop then
        stop = start
        start = 0
    end

    if not step then
        if start > stop then
            step = -1
        else 
            step = 1
        end
    end

    if start > stop and step > 0 then
        return []
    end

    let result = []

    def run()
        result.push(start)
        start += step
    end

    if start > stop then
        while start > stop do
            run()
        end
    else
        while start < stop do
            run()
        end
    end

    return result
end

jcubic added a commit that referenced this issue May 31, 2022
jcubic added a commit that referenced this issue Jun 2, 2022
jcubic added a commit that referenced this issue Jun 12, 2022
jcubic added a commit that referenced this issue Jun 12, 2022
jcubic added a commit that referenced this issue Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant