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

Improvement ideas #41

Open
7 of 16 tasks
laurenthuberdeau opened this issue Jun 19, 2024 · 1 comment
Open
7 of 16 tasks

Improvement ideas #41

laurenthuberdeau opened this issue Jun 19, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@laurenthuberdeau
Copy link
Collaborator

laurenthuberdeau commented Jun 19, 2024

Some ideas on how to improve the project:

New features

Optimizations

  • Pre-allocate AST nodes before recursive call to use AST node memory as return location for fun calls.
  • Separate heap in 2 zones: one for the global state and one for the current declaration.
  • Manually manage stack of local variables in parser to save on local variable management.
  • Reuse assignment variable as temporary when possible. i.e. a = f(f(a)) => _f a $a; _f a $a; instead of _f __t1 $a; _f a $__t1.

Code quality / Tech debt

  • Unify the way the environment is tracked in the shell and exe backends.
  • Add a CI/CD pipeline that tests Pnut on all supported platforms and makes releases for them.
  • Improve errors produced by Pnut.
  • Rewrite pnut to use structs.

Other

  • Improve README.md.
  • Make a landing page for Pnut on pnut.sh.
  • Add more examples.
@laurenthuberdeau laurenthuberdeau added the documentation Improvements or additions to documentation label Jun 19, 2024
@xplshn
Copy link

xplshn commented Jul 29, 2024

I think it'd be impressive to add the tools over at https://git.suckless.org/sbase/files.html as examples. That'd also be exciting for people interested in writing pure SH scripts (scripts that don't call external commands). :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants