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

Move primitives to monkey. #32

Merged
merged 10 commits into from
Sep 29, 2018
Merged

Move primitives to monkey. #32

merged 10 commits into from
Sep 29, 2018

Conversation

skx
Copy link
Owner

@skx skx commented Sep 29, 2018

This pull-request shuffles implementation around so that more of our primitives are written in monkey, rather than go.

That's

  • Neat.
  • Cool.
  • Allows users to see examples of our code, and make changes.

This will close #31 when merged.

This required adding/removing 32 from the ASCII values of each
character, and that meant adding ORD + CHR (just like BASIC!).

Next to move will be ltrim, rtrim, and trim.
Cute implementation via regular-expression :)
Previously this worked by accident!
Rather than golang.
@skx skx self-assigned this Sep 29, 2018
We cannot invoke string.tolower() since they are now defined
in the monkey-implementation.  We can't load them from there,
via static.go, because that is in package main.

So for the moment we'll just remove the tests.  Shame.
@skx skx merged commit f578744 into master Sep 29, 2018
@skx skx deleted the 31-move-primitives branch September 29, 2018 04:34
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

Successfully merging this pull request may close these issues.

Move more of our built-in functions to monkey.
1 participant