8000 fix: Reverse the printed/parsed order of env bindings internally by wwared · Pull Request #425 · lurk-lab/lurk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Reverse the printed/parsed order of env bindings internally #425

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

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

wwared
Copy link
Contributor
@wwared wwared commented Feb 13, 2025

Fixes #417

Before:

lurk-user> (eval 'a { a: 1, b: 2, a: 3 })
[7 iterations] => 1
lurk-user> !(def a 1)
a
lurk-user> !(def a 2)
a
lurk-user> (current-env)
[1 iteration] => { a: 2, a: 1 }

After:

lurk-user> (eval 'a { a: 1, b: 2, a: 3 })
[7 iterations] => 3
lurk-user> { a: 1, b: 2, a: 3 }
[4 iterations] => { a: 1, b: 2, a: 3 }
lurk-user> !(def a 1)
a
lurk-user> !(def a 2)
a
lurk-user> (current-env)
[1 iteration] => { a: 1, a: 2 }

@wwared wwared requested a review from porcuquine February 13, 2025 23:46
@porcuquine
Copy link
Contributor

Thanks, since this is hard to reason about, can you replicate the example from #417 with this code, ideally in a unit test? This will also help document the behavior of that concrete usage.

@wwared wwared merged commit 1b0c04c into main Feb 14, 2025
1 of 3 checks passed
@wwared wwared deleted the flip-env-order branch February 14, 2025 01:50
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.

Env reading/printing should be in opposite (binding) order.
2 participants
0