Aschhually the most used JS engine is made in C++ (v8)
- 0 Posts
- 20 Comments
noddy@beehaw.orgto
Rust@programming.dev•[BLOG] Why Rust mutexes look like they do - Cliffle
8·1 year agoWrapping a value in a mutex just makes sense. After learning a bit of Rust I made a similar mutex wrapper in C++ when I had to protect a class member in a C++ project. I just had to change the type in the declaration, and bam the compiler tells me about all places this member was accessed. Much easier than using some buggy ‘find all references’, potentially forgetting a few places.
I think the author of the article just haven’t understood how to use the ? operator yet, and don’t think they deserve being called “utterly incompetent” for it. Whether something is a monad or not is not necessarily something a programmer should have to think about on a daily basis IMO.
I just think of rust errors as a tagged enum with either a value or an error. And the ? operator as syntax sugar for returning if something was an error. IMO that simple understanding is sufficient to do error handling in Rust. I don’t think we should gatekeep programming behind some intellectual barrier of whether or not you understand category theory. I certainly don’t understand what a monad is, but I can still write working software and do error handling without unwraps.
I tried it briefly. I like the idea of an alternative to VS code, that’s not some inefficient javascript electron app. But the focus of zed seems to be on collaboration in cloud and also pushing LLM tools. That’s not what I’m looking for. I disliked that it was impossible to hide the “log in to github” button (I don’t want to log into an editor). Irked me the wrong way.
I personally prefer the straight forward everything in one file examples. The worst examples are those that come with its own ad hoc example framework I first need to understand before I can understand the example.
It’s called T9 typing btw. I’m old enough (30) to have had a few phones with buttons myself before the smartphone era gained momentum. I never got really good at it (didn’t text much). My older sister by a few years is a racer at T9 typing though. I remember her phone was making clicking noises at insane rates.
noddy@beehaw.orgto
Programmer Humor@programming.dev•Programming languages personified - leftoversalad
2·2 years agoIMO the ackchyually guy would be a better fit for Haskell. “Ackchyually monad is a monoid in the category of endofunctors!”
noddy@beehaw.orgto
Programmer Humor@programming.dev•Programming languages personified - leftoversalad
4·2 years agoShould’ve made s typescript one, that is a mutant blob of flesh with a life jacket on it.
It will go brrrrrrrt¤gdføTJwrgt65&<)5½$¥[[¥½{2ahgfh Segmentation fault (core dumped)
noddy@beehaw.orgto
Rust@programming.dev•RustPython: An open source Python 3 (CPython >= 3.11.0) interpreter written in Rust
1·2 years agoCan RustPython be sandboxed properly when used as a scripting language? You can’t do sandboxing with CPython. There is an abandoned sandboxing project for pypy, but then you’ll be stuck with an old version of python.
noddy@beehaw.orgto
Programming@programming.dev•Do any of you program on non-US keyboard layouts?
6·2 years agoWhy are there two cables connecting the left and right part? Just curious.
Good luck figuring out why it sometimes doesn’t work 🙃
noddy@beehaw.orgto
Programming Horror@programming.dev•God I wish there was an easier way to do this
14·2 years agoI know an even better way. We can make it run in O(1) by using a lookup table. We only need to store 2^64 booleans in an array first.
noddy@beehaw.orgto
Programming Horror@programming.dev•God I wish there was an easier way to do this
24·2 years agoI know how to fix this!
bool IsEven(int number) { bool even = true; for (int i = 0; i < number; ++i) { if (even == true) { even = false; } else if (even == false) { even = true; } else { throw RuntimeException("Could not determine whether even is true or false."); } } if (even == true) { return even ? true : false; } else if (even == false) { return (!even) ? false : true; } else { throw RuntimeException("Could not determine whether even is true or false."); } }
noddy@beehaw.orgto
Programmer Humor@lemmy.ml•I'm going to sit down and actually learn git this week
9·2 years agoI prefer rebasing on destination branch before merging. When merging you get all the conflicts at the same time. When rebasing you can address conflicts from one commit at a time. Untangling multiple small knots is easier than one huge spaghetti. Also commit history will be much cleaner.
noddy@beehaw.orgto
Programmer Humor@lemmy.ml•Compiz fusion gave me what a degree barely could
141·2 years agoIts likely that I wouldn’t use linux today if it weren’t for messing around with compiz settings on school computers back when I was a teenager. Wobbly windows and desktop cube was such fun. I guess that’s how we can recruit new linux users. Get them while they’re young. “But does your windows laptop do this?” wobble wobble closing application by lighting the window on fire.
If I’m at 127.0.0.1 why would I need to wear a 255.255.255.0?
TLDR: Long rant about modern smart phones.
I’ve concluded that it is impossible to get a new phone that has the features I want. Some phone manufacturer always seems to arbitrarily declare useful features/form factors obsolete, maybe replaces it with some new gimmick and gets the hype machine going so all the other manufacturers do the same in fear of becoming irrelevant.
I just wish that some day some company is going to create a smart phone with a reliable fingerprint reader on the back again where it is reachable by fingers on BOTH the left and right hand. Or that some manufacturer will create a phone with a smaller screen than 6 inches. Or god forbid a normal aspect ratio like 16:9 instead of the ridiculously long lightsabers they’re making now. Then maybe it would be possible to get it out of my pocket while sitting down. Missing headphone jack is just a drop in the ocean IMO. There are so many other annoyances that I didn’t use to have, but now is an issue with modern smart phones.
If I got the chance to dictate what the manufacturers should do. I would tell them to stop. The camera is good enough. Make it smaller and not protruding out the back of the phone so much. The SOC is fast enough. Make it more power efficient instead of chasing for the next GHz. The screen is large enough, just stop. If I wanted a larger screen I would use a tablet. Do some damn QA. Test the main functionality of a phone, which is communication, not game benchmarks, not who can take the prettiest picture of the moon. Is it possible to take the phone out of the pocket without accidentally hanging up on whoever is calling you? Is it possible to send and receive to/from SMS/MMS groups? Does the fingerprint reader actually work or does it just say “sorry too many tries” every time you take the phone out of the pocket before even touching the fingerprint reader?
Just had to get that out of my system :P
noddy@beehaw.orgto
Programming@programming.dev•[Help] Why do app updates have download sizes almost as large as the apps themselves?
4·2 years agoI think windows update does that, or at least used to do. That’s why it is so slow to update, because you need every update in succession, you can’t just grab the latest one.

I’d also add this reason (in addition to embarrasement): I don’t open source my stuff because I know microsoft will “steal it” to train copilot.