575
you are viewing a single comment's thread
view the rest of the comments
[-] Ephera@lemmy.ml 124 points 4 days ago

For optimal performance, you should rewrite it in Rust:

inline_python::python! {
    print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number))
};
[-] ATPA9@feddit.org 71 points 4 days ago* (last edited 4 days ago)

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

[-] victorz@lemmy.world 24 points 4 days ago
[-] ulterno@programming.dev 12 points 3 days ago

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

this post was submitted on 12 Jun 2025
575 points (98.6% liked)

Programmer Humor

24240 readers
1955 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