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

writing-python-inside-rust-4/ #5

Open
utterances-bot opened this issue May 25, 2020 · 5 comments
Open

writing-python-inside-rust-4/ #5

utterances-bot opened this issue May 25, 2020 · 5 comments
Labels

Comments

@utterances-bot
Copy link

Writing Python inside your Rust code — Part 4 - Mara's Blog

In this final part of the series, we’ll explore a trick to make the behaviour of a macro depend on whether it’s used as a statement or as part of an expression. Using that, we’ll make the python!{} macro more flexible to allow saving, reusing, and inspecting Python variables.

https://blog.m-ou.se/writing-python-inside-rust-4/

@m-ou-se m-ou-se added the comments label May 25, 2020 — with utterances
Copy link

Nice blog. I'd like to see a post about how colors work.

Copy link

Floating point would be interesting, you might find the simple-soft-float crate I wrote to be useful -- I wrote it to use for verifying the floating-point hardware for the Open Source PowerPC/RISC-V Processor/GPU I'm helping build.

Copy link

Colors would be interesting, I'm working on a project that requires swapping the background color of a scanned PDF (for accessibility related reasons). I've gotten pretty good results by assuming all backgrounds are white and taking the perceptual difference between each pixel and white.

Right now I swap all pixels with a difference below a threshold with a pure version of the new background color, but I feel like I should be able to do something cleaner by taking the weighted average of the pixel and the new background, weighed by the pixel's closeness to white...

Copy link

I'm late to the party, but this was a really great post where I learned a surprising number of new things; thanks so much!

Learning about colors would be interesting, but mutexes sound nearly as fun as well.

Copy link

Thank you for writing and sharing.

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

No branches or pull requests

7 participants