9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions
comment 4y ago · link · parent
comment 4y ago · link · parent
Memory layout is a valid point though. C# with its value types gives you a lot more control than Java does, but is still often grouped with Java, and I think rightly so. Go's pointers go quite a bit further, but then on the other hand, it also has high-level data structures like map as language primitives, which makes it less close to the metal as far as I'm concerned.
I'd personally group all GC'd languages in roughly the same class here, but I think it's reasonable to disagree or make finer distinctions.
comment 4y ago · link · parent
comment 4y ago · link · parent
a) Go was really sold as a "systems programming language" early on. Maybe some adopters never really questioned what that means or if that's true?
b) Go produces actual executables, with what in Java would be the JIT executed ahead of time and any runtime bits statically linked in. That is completely orthogonal to abstraction level, of course. But maybe the fact the there's no externally visible runtime makes people group the language into a bucket with C?
comment 4y ago · link · parent
I wonder how long it will stay that way under NY Times ownership. Just today, I was greeted with a new cookie prompt that covered up the keyboard on mobile Safari and wouldn't disappear without a refresh. Not a good sign of things to come.
comment 4y ago · link · parent
I’ve recently tried to figure out if it’s okay to use something like Cloudflare Pages to host a blog. That’s not an esoteric question, but I was unable to get an answer. They’re not based in Europe, the log retention policy is a bit unclear, regulators seem to be disagreeing on whether even their CDN is okay (and Pages is built on top of the CDN). And in Germany, the real danger isn’t a regulator fining you, it’s a private lawyer sending you an “Abmahnung”. Which they will do for any trivial infraction, often using automated platforms.
comment 4y ago · link · parent
* Finding honest product impressions/reviews.
* When looking for a configuration setting or tip to use any piece of software, find a one minute article with clear bullet points instead of an 11 minute YouTube video with a personal backstory and a VPN sponsorship.
* Finding a cooking recipe that isn’t padded with SEO nonsense.
* When finding an online discussion or blog article in a search result, being able to read it straight in the (mobile) browser without hostile prompts to make an account and/or download an app.
* (Europeans only.) Publish a simple website without worrying that the hosting provider you choose doesn’t perfectly conform to privacy laws that even lawyers won’t explain to you and you’re personally liable for ridiculous damages.
* Run software developed by hobby programmers on machines you own.
* Connect devices like speakers, keyboards and mice to computers. (Edit: You mention that.)
And, completely disagreeing with the article on this one point, this is also harder:
* Writing cross-platform UIs. As someone with a lot of hate for Java from back in the day, this is painful to write, but: Java Swing might not have produced the nicest GUIs, but the stack was so much simpler than Electron+Node+Express+Webpack+React+TypeScript (substitute Svelte, Vite or whatever you want), it’s not even funny.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
I think Microsoft is also responsible for an (at the time a bit embarrassing) account breach I suffered. I have no proof, but something very weird happened.
Way back when, I think my Skype account was hacked using a password that no longer should have existed. This happened some time after the forced migration to Microsoft accounts. The new password was unique and password manager-generated, and no machine of mine was ever compromised — luckily.
However, my old Skype password had been embarrassingly weak (different times), and I had only upgraded everything to strong passwords a short time before that. I remember that there was no user-visible way to change the old Skype password or even see the account anymore — I thought it was deleted during the migration.
Yet someone managed to spam all my contacts, some of which got very angry with me personally. My best guess is that they had accidentally exposed an API backend that still used the old account database. Again, I don’t really know and can’t prove it. There were hints in forums of other users with that problem, but never any official answer.
My actual point is, Microsoft isn’t that great at all of this. Whenever they buy something and force migrate all accounts, the user experience gets worse.
I have no idea why so many enterprise IT departments have such a strong preference for their stuff. It’s not like any of it is particularly easy to set up.
comment 4y ago · link · parent
I'm now happy with Logseq, which is basically a clone of Roam, with an open-source business model. I really hope the business side works out for them, because for all practical purposes, they've out-engineered Roam to the point of embarrassment. It allows local storage, and will have an iOS app soon (I was able to register for the beta, it's already very solid).
comment 4y ago · link · parent
comment 4y ago · link · parent
struct FooInter {
actual_data: HashMap<...>,
}
impl FooInner {
fn do_something(&mut self) { ... }
}
pub struct Foo(RwLock<FooInner>);
impl Foo {
pub fn do_something(&self) {
self.0.write().do_something();
}
}
The rule is that FooInner doesn't know about the lock (so calling other methods is safe), while Foo methods can't call other Foo methods (so you can't lock anything twice). You can even move Foo and FooInner to different modules to hide FooInner's contents from Foo, though I rarely find that necessary.I know this is subjective, but for me, this works better than what the blog post suggests -- at least, I haven't gotten it wrong by accident yet.
comment 4y ago · link · parent
comment 4y ago · link · parent
A quote that haunts me: “Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.” Do we have that freedom in the west, today? Will we have it tomorrow? It’s a lot less clear than one would hope.
comment 4y ago · link · parent
Also, and this is really off-topic, I also completely disagree that the names of built-in functions are off limits in a program, or should effectively be keywords. I'm not saying it's particularly wise to name a variable "print" or something. But should I learn by heart the names of all built in functions before naming any variable? Should I refactor my program whenever a new one is added? Resolving those kinds of conflicts is what scoping is for, and it works.
comment 4y ago · link · parent
Template error messages are often best understood as stack traces of the “metaprogramming language”, which isn’t C++, but a complicated type substitution system that beginners don’t understand when they first encounter these errors. So that’s confusing.
But I found that the hardest errors for beginners are linker errors: They look like line noise and contain no easily readable information to point at the source of the problem. It shouldn’t be necessary to explain linker hacks from the 80s when teaching someone how to find out what they forgot to implement.
comment 4y ago · link · parent
When I accidentally misresolved a conflict after a git pull, the C# compiler, upon encountering the >>>>> markers in the source code, noted that there’s an unresolved merge conflict in that line instead of complaining about bitshifts.
When I tried to bitwise invert a value in Rust with “~x”, which is wrong, instead of complaining about an unknown character, the compiler helpfully explained that the operator to use in Rust is “!x”.
When I was in the Python interpreter and entered “exit”, which doesn’t work because exit is not a keyword, I got a message that told me how to actually exit.