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

Upgrade to purity inference #84

Merged
merged 32 commits into from
Dec 19, 2024
Merged

Upgrade to purity inference #84

merged 32 commits into from
Dec 19, 2024

Conversation

lukewilliamboswell
Copy link
Collaborator

No description provided.

@lukewilliamboswell lukewilliamboswell changed the title [WIP] Upgrade to purity inference Upgrade to purity inference Dec 19, 2024
@lukewilliamboswell
Copy link
Collaborator Author

Down to one failing test... currently being skipped to confirm CI is running to completion.

@lukewilliamboswell lukewilliamboswell marked this pull request as ready for review December 19, 2024 03:50
crates/roc_host/Cargo.toml Show resolved Hide resolved
platform/InternalIOErr.roc Show resolved Hide resolved
platform/MultipartFormData.roc Outdated Show resolved Hide resolved
@@ -1,13 +0,0 @@
module [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing Sleep and the related example? Is this temporary for getting everything working? It seems to be in basic-cli, so maybe it got missed in the great copy of `87?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it was implemented it was putting the whole thread to sleep. I think I added it mindlessly porting across from basic-cli... but it's not something I think we want in a multithreaded HTTP web server, at least not like this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic webserver spawns a thread per request. So sleep is actually fine (though silly to do).

platform/SplitList.roc Outdated Show resolved Hide resolved
examples/echo.roc Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is tiny at 152 bytes, I agree that including it is better than generating it every time

red_test_image.png Outdated Show resolved Hide resolved
Comment on lines +75 to +87
to_host_method : Method -> _
to_host_method = \method ->
when method is
OPTIONS -> 5
GET -> 3
POST -> 7
PUT -> 8
DELETE -> 1
HEAD -> 4
TRACE -> 9
CONNECT -> 0
PATCH -> 6
EXTENSION _ -> 2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did have a proper rust Method impl, but we were having segafults during the development of this upgrade and suspected the Method to be an issue (possibly alignment or refcounting). Turned out not to be the source of our issues, but I decided it was easier just to leave it like this and not re-generate glue.

The delta is the space difference between a u8 and u64 per request.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to padding I think there literally is no difference.

@lukewilliamboswell lukewilliamboswell merged commit 0caba41 into main Dec 19, 2024
4 checks passed
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.

3 participants