this post was submitted on 12 Jun 2025
577 points (98.7% liked)

Programmer Humor

24555 readers
1958 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 123 points 2 weeks ago (3 children)

For optimal performance, you should rewrite it in Rust:

inline_python::python! {
    print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number))
};
[–] [email protected] 71 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

And now you can use wasm to run it in a browser!

[–] [email protected] 24 points 2 weeks ago (1 children)
[–] [email protected] 11 points 2 weeks ago

Make sure the browser is made using Rust and run on a VM running on Linux, compiled to WASM.

load more comments (1 replies)