Ephera
- 0 Posts
- 21 Comments
For optimal performance, you should rewrite it in Rust:
inline_python::python! { print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number)) };
unsafe
doesn’t deactivate memory safety. It only allows you to then create raw pointers and whatnot, which you could use to circumvent memory safety, but all the normal language constructs still do enforce it.
As in, you call
main()
recursively? Don’t think, I’ve ever tried that in any language…
Those also happen to be errors you’d typically run into, if you don’t yet really know Rust…
According to the screenshot I took, it was a gargoyle berserker with an axe. I had some ridiculous luck with armor drops, so basically every resistance was either maxxed or close to it. I only really got into trouble down in Zot:5…
And hmm, I should do more with Lugonu. I never really have a reason to pick him, but that means I also don’t experiment with him, so I won’t really learn what reasons there are to pick the guy…
I actually do, yes. Hundreds, if not thousands, of hours played and I made it down there and back out exactly once. 🙃
Only in 3D. In 2D, you slap some pixels on top and there’s your scarf:
Ephera@lemmy.mlto Programmer Humor@programming.dev•top 5 unsolved problems in computer scienceEnglish2·28 days agoThat would be cool, but human brains are weirdos. If you’re already copying text, you could’ve edited or annotated it, for example. For example, if it’s an opinion you don’t entirely agree with, you might feel obliged to say so, because you have the ability to do so when it’s a text post.
If you want to call that irrational, I’m not arguing against that. I’m just saying it’s the reality we live in and I’d like to have tooling to deal with that better, because I would also prefer text to not be screenshotted.
Ephera@lemmy.mlto Programmer Humor@programming.dev•top 5 unsolved problems in computer scienceEnglish1·28 days agoYeah, really unfortunate that that’s not possible. Always having to take a screenshot and then type out letter by letter what’s on the screenshot, that can be quite annoying.
But even if copying text was possible, the reason people post pictures of text is to give proper attribution, but also to distance themselves from the content, so that it’s clear that they don’t necessarily hold the exact same opinion or that they might not have all the knowledge to defend the statements in the post.
Cross-posting could fill that same roll without screenshotting text.
Ephera@lemmy.mlto Programmer Humor@programming.dev•top 5 unsolved problems in computer scienceEnglish7·29 days agoWould be cool, if we could cross-post Mastodon posts…
OCaml has a camel with two bumps. So, that’s gotta be the Perl dromedary camel…
I mean, chances are the nukes will be flying across time zones, so gonna be hard to honor that request for both sides…
Well, and there’s also just lots of webpages implemented as an SPA – Single-Page Application.
Which you might be able to register in your browser as a PWA – Progressive Web App.
And which are just generally equally as interactive as an app, so good luck explaining the difference to folks who don’t care about implementation specifics…
Ephera@lemmy.mlto Programmer Humor@programming.dev•There be Gremlins in the CodeEnglish13·1 month agoIn particular, frontend has to interact with humans, which is one hell of a messy API.
Ephera@lemmy.mlto Programmer Humor@programming.dev•Vibe Coders might be serious, but I cannot take them seriously, especially when they say "It is a must-have skill".English4·1 month agoYeah, I also thought it was a meme and used purely in derogatory form, until I learned that the term was actually coined by a co-founder of OpenAI…
Ephera@lemmy.mlto Programmer Humor@programming.dev•Vibe Coders might be serious, but I cannot take them seriously, especially when they say "It is a must-have skill".English5·1 month agoBut like, does that happen often for you, that you need a piece of code that’s gonna be thrown away?
I always feel like if code exists, it’s not gonna be thrown away, so it’s a good idea to make it maintainable. But I do probably have somewhat of a bias…
For that purpose, I use a language with a decent compiler, but I know not everyone is as lucky…
It ain’t called git-hub for nothing. The social network for gits. How else are they supposed to behave?
In the case of Rust, you can also omit the type annotation in the vast majority of cases and the compiler will infer it.