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

Use let-blocks when apprioriate in stdlib & examples #2051

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

yannham
Copy link
Member

@yannham yannham commented Sep 24, 2024

This PR updates to Topiary 0.5.1, which includes the support for formatting let-blocks (and the let-in formatting fix). Additionally, I made a pass on the examples and the stdlib to use let-blocks whenever it seemed appropriate, so that both remains idiomatic Nickel.

This is the last item on the checklist before being able to release Nickel 1.9

@yannham yannham force-pushed the task/use-let-blocks branch from 4b35e7f to a93c6d9 Compare September 24, 2024 12:42
@github-actions github-actions bot temporarily deployed to pull request September 24, 2024 12:45 Inactive
Copy link
Contributor

github-actions bot commented Sep 24, 2024

🐰 Bencher Report

Branch2051/merge
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
fibonacci 10📈 view plot
⚠️ NO THRESHOLD
499,030.00
foldl arrays 50📈 view plot
⚠️ NO THRESHOLD
1,763,600.00
foldl arrays 500📈 view plot
⚠️ NO THRESHOLD
6,846,300.00
foldr strings 50📈 view plot
⚠️ NO THRESHOLD
7,102,700.00
foldr strings 500📈 view plot
⚠️ NO THRESHOLD
62,544,000.00
generate normal 250📈 view plot
⚠️ NO THRESHOLD
44,564,000.00
generate normal 50📈 view plot
⚠️ NO THRESHOLD
2,063,800.00
generate normal unchecked 1000📈 view plot
⚠️ NO THRESHOLD
3,395,000.00
generate normal unchecked 200📈 view plot
⚠️ NO THRESHOLD
749,760.00
pidigits 100📈 view plot
⚠️ NO THRESHOLD
3,209,000.00
pipe normal 20📈 view plot
⚠️ NO THRESHOLD
1,495,900.00
pipe normal 200📈 view plot
⚠️ NO THRESHOLD
10,055,000.00
product 30📈 view plot
⚠️ NO THRESHOLD
823,410.00
scalar 10📈 view plot
⚠️ NO THRESHOLD
1,504,700.00
sum 30📈 view plot
⚠️ NO THRESHOLD
819,460.00
🐰 View full continuous benchmarking report in Bencher

@yannham
Copy link
Member Author

yannham commented Oct 1, 2024

This is actually also blocked on tweag/topiary#747 to be able to update to latest Topiary in the flake.

@yannham
Copy link
Member Author

yannham commented Oct 2, 2024

Now that we've got rid of Topiary as an input of the Nickel flake, we need Topiary to be compatible with tree-sitter 0.22 (used by the Nickel grammar) - which is the case, but this version hasn't been released yet. Waiting for a new version of Topiary to be released, so that we can finally format let-blocks.

@yannham yannham added this to the Next minor (1.9) milestone Oct 25, 2024
@yannham
Copy link
Member Author

yannham commented Oct 25, 2024

(while this PR is by no mean really required for 1.9, its precondition is: update Topiary to latest version once it's on crates.io so that nickel format can handle the latest syntax changes)

@yannham yannham force-pushed the task/use-let-blocks branch from a93c6d9 to ed9bdf2 Compare October 29, 2024 09:52
@yannham yannham marked this pull request as ready for review October 29, 2024 10:20
@yannham yannham requested a review from jneem October 29, 2024 10:24
@yannham yannham added this pull request to the merge queue Oct 29, 2024
Merged via the queue into master with commit dbd52ac Oct 29, 2024
5 checks passed
@yannham yannham deleted the task/use-let-blocks branch October 29, 2024 13:57
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.

2 participants