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

Pascal 3.2 Runtime #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geisterfurz007
Copy link
Contributor

@geisterfurz007 geisterfurz007 commented Oct 25, 2022

This PR creates a runtime for Pascal 3.2 (with some caveats)!

Reference

appwrite/appwrite#4023

Caveats

Caveats:

  • StdOut and StdErr are not returned to the program after the first execution
  • Installing dependencies is not implemented yet. Preinstalled units can be used right off the bat (which includes most of the useful ones, I suppose?)
  • Custom types / classes are not implemented (yet?), I think. I have not tested them yet but I believe that type definitions may not be in the middle of the implemented procedures, although I haven't tried it out

I think a lot of this could be improved by creating a unit from this and loading that instead but I felt like that kind of defeated the idea of a function runtime if you had to write essentially a library file including all the fuzz around it. It might be doable similar to how the Java 8.0 runtime does it, wrapping the function in a class with imports and package definition and stuff?

I hope though that this implementation covers the (probably rare) usecases there are for a Pascal function runtime.

@geisterfurz007 geisterfurz007 force-pushed the feat-4023-pascal-runtime branch 7 times, most recently from d31f558 to 3ca1ef7 Compare October 26, 2022 16:12
@geisterfurz007 geisterfurz007 marked this pull request as ready for review October 26, 2022 16:12
@stnguyen90 stnguyen90 linked an issue Oct 27, 2022 that may be closed by this pull request
5 tasks
@PineappleIOnic
Copy link
Contributor

Thank you so much for the PR 🤩. We're adding the hacktoberfest-accepted label to ensure this PR counts towards your Hacktoberfest contributions count. With that said, please stay active on this PR to address any comments once you receive a review. Happy Hacktoberfest! 🎃

@christyjacob4
Copy link
Contributor

@geisterfurz007 thanks a lot for your contributions during Hacktoberfest 2022!

Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord. 

@geisterfurz007
Copy link
Contributor Author

Thanks Christy, I have already received my swag a couple weeks back :) I rebased this PR again to resolve the conflict in the .travis.yml; if there are any other changes needed, let me know!

@Meldiron
Copy link
Contributor

Hey there 👋

We are about to release Open Runtimes V3 which brings some changes to both how we structure runtimes internally, as well as changes to some interfaces that developers inteact with. We did this to allow new features and bring Open Runtimes closer to HTTP standards ✨

We value your contribution and want to ensure all changes can be merged to the main branch. However to make it possible we request you to update the PR to follow the V3 structure and syntax. You can refer to V3 Pull Request and take a look at Node.JS 18.0 runtime specifically. Some biggest changes are:

  • Helper scripts (build, start)
  • Folder renaming for build & start process
  • context object instead of previous req and res
  • HTTP server to accept any method and any path
  • Headers were introduced for logs and errors
  • Safe timeout was introduced

v3 branch also has many new end to end tests to ensure proper integration, so please sync with that and target your branch against v3 branch.

Please let us know if you are interested in working on this 🙏

@geisterfurz007
Copy link
Contributor Author

Ho boi... Honestly, I am not sure @Meldiron! I enjoyed the challenge last October and found some nostalgia in dabbling with Pascal again but I would lie if I said it wasn't a pain to get running 😄 I am also questioning whether there is an actual target audience for an Open Runtime for Pascal; the language is slightly dated, poorly documented and really, I cannot see anyone picking up something that has been designed to support serverless functions while sticking to something like Pascal.

If there is an actual desire to have this become a thing, I can maybe look at this near end of July or start of September; everything in between is packed with stuff.

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.

🤖 Improve Appwrite Functions with Pascal Support
4 participants