Live data from Hacker News

Integrating “safe” languages into OpenBSD?

marc.info

321–330 of 344 posts

Re: Integrating “safe” languages into OpenBSD?

#321

Earlier quoted context omitted.

It sounds and seems like a language worthy of more investigation on my part, but I have to agree that the militant, presumptive attacks on any language besides their Chosen One has left a bad taste in my mouth. This 100 times over. It's a language that seems novel and strong enough to stand on its own merits - but there's a section of the community that makes me want to stay away. I wish they'd spend less effort re-w…

> I wish they'd spend less effort re-writing already working tools in C and more effort writing new, better tools. Is this really a thing? Folks keep pointing out this bugbear of folks going out and asking projects to rewrite in Rust and ... there aren't that many examples of this. If anything most of the more famous Rust projects (ripgrep, redox, etc) are clean-slate.

https://github.com/uutils/coreutils for instance

Personally, I don't find this a bad idea, as long as it is not the primary thrust. The reason it is needed is that you aren't going to convince everyone to change the default tools they've used for however many years. If you want to make things safe, you have to swap out implementations and keep same/similar interfaces.

Re: Integrating “safe” languages into OpenBSD?

#322

Earlier quoted context omitted.

> I don't think anyone is arguing that we should throw everything out, however for all my greenfield stuff Rust has been a welcome breath of fresh air. If you can write things from scratch in a clear room fashion, perhaps. C++ is very good, when you need to integrate a lot of 'low-level' libraries (that are alredy in C or C++) together in a meaninful way, like for instance, browsers do. Like the capacity to 'talk' wi…

I mean this in the most non-confrontational way: have you actually used/looked at Rust? The reason I ask is just about every item you laid out I've had the opposite experience. Talking with C/C++ is trivial with bindgen and clang. Embedding in C++ is likewise straightforward. I mean Firefox is one of the larger C++ codebases out there. The package manager is great and makes dropping in things much less painful. On th…

> I mean this in the most non-confrontational way: have you actually used/looked at Rust?

I follow Rust since Graydon Hoare's initial vision for it. Which i love it when it first came out. The garbage collected Rust had so much potential, in my point of view.

Then when i started to follow it, it was chaging into this current encarnation trying to chase C++, and market as a better C++.

I've coded in it for a period of 6 months, i like it, i understand its value, but somehow with the explicit lifetime thing, it started to become even more painful to code in it, even compared to C++, where you still have to create a header file and a impl file, without a proper module system.

The first Rust vision, now was re-created even more beautifully in Swift.

I get it what Rust is, i think it has its value and its place, im just saying that it will get a time where it will be very harsh to Rust get more adoption, because, even if you like it, you just cant get out of the great ecosystem all coded in C and C++. Interfacing with C for other languages is pretty easy, but you still have to wrap C++ interfaces, and use just some features, because you lost access to the whole thing (think LLVM for instance).

So C++ has this net effect, which it achieved by the virtue of all this amazing software ecosystem, where giving its talking its native language its much easear to interact with.

Re: Integrating “safe” languages into OpenBSD?

#323

Earlier quoted context omitted.

Perfect. I absolutely agree. The thing is, I use C++ because it does a lot of things specialized for what I need. I don't work on every problem, and I look forward to the chance to use Rust. That being said, for now, the problems I'm working on are domains that very much benefit from C++ and I will continue to use it. I totally agree that Rust is a great language and has wide applications. It doesn't fit my current n…

What's wrong with D? I quite liked it when I used it (for a relatively small project). It's not really a C++ replacement (GC), but as a high-level language the only problem I found was lack of a large library ecosytem - the language itself was quite pleasant to work with (more so than C++ and even Rust, which I also like).

D seems not bad -- I just mean that Rust was the first "C++ killer" which actually could match C and C++ speeds. I also have a lot of respect for Walter Bright and Andrei Alexandrescu.

I'm sure I'd much prefer it over Go, for example.

Re: Integrating “safe” languages into OpenBSD?

#324

Earlier quoted context omitted.

I'd say wounded, passive aggressive responses like this are far more damaging to a community than bluntness or the occasional swear word. They're much more insidious and subtle. No one will ever really ban you for talking like that, but it changes the whole tone of a place much more than the occasional heated discussion.

Your parent's response wasn't passive aggressive at all, it was a direct statement of their view of the problem with people who think the problem is other people being "thin skinned".

Really not sure how you don't see it. Mimicking my sentence structure, implying that people who talk like me are ostracised by society (!?), and using phrases like "incredibly toxic". I could almost hear the tone of voice reading that sentence.

Re: Integrating “safe” languages into OpenBSD?

#325

Earlier quoted context omitted.

> I wish they'd spend less effort re-writing already working tools in C and more effort writing new, better tools. Is this really a thing? Folks keep pointing out this bugbear of folks going out and asking projects to rewrite in Rust and ... there aren't that many examples of this. If anything most of the more famous Rust projects (ripgrep, redox, etc) are clean-slate.

https://github.com/uutils/coreutils for instance Personally, I don't find this a bad idea, as long as it is not the primary thrust. The reason it is needed is that you aren't going to convince everyone to change the default tools they've used for however many years. If you want to make things safe, you have to swap out implementations and keep same/similar interfaces.

Yeah, that's my point, there are scattered examples but it's nobody's primary thrust.

Re: Integrating “safe” languages into OpenBSD?

#326
post #300

Earlier quoted context omitted.

Eh, 64-bit desktops were becoming common a decade ago. Considering the small minority of developers using a 32-bit machine for development, I don't see that it is worthwhile to spend effort on that. Note that Rust can (and does) target various 32-bit platforms (ARM and maybe RISC-V, not sure) for cross-compile. Self-hosting on a 32-bit platform is such a minor drawback these days. 64-bit ARM processors are becoming m…

There are still plenty of 32bit machines out there. I personally have maintained and support a Intel 4004 knockoff used for controlling a big industrial machine. And of course more modern variants of the same machine with an 8008. Some of these couldn't even run DOS but it's still supported. 32bit is not even close to be being that old and lots of machines, applications or platforms require it and they need maintenan…

Oh, I wasn't implying that OBSD or NBSD should adopt Rust as a development language. Not at all.

My point is more that I wouldn't want the Rust developers to spend time on making it able to self-host on 32-bit platforms. I'd prefer they spend their time elsewhere, that's all.

Re: Integrating “safe” languages into OpenBSD?

#327

Earlier quoted context omitted.

> I don't think anyone is arguing that we should throw everything out, however for all my greenfield stuff Rust has been a welcome breath of fresh air. If you can write things from scratch in a clear room fashion, perhaps. C++ is very good, when you need to integrate a lot of 'low-level' libraries (that are alredy in C or C++) together in a meaninful way, like for instance, browsers do. Like the capacity to 'talk' wi…

> And by the way, modern C++ is already secure enough, making some selling points for Rust, a little bit of cosmetic right now. There is not a single large-scale network-facing widely attacked piece of software I'm aware of in C++ that has not fallen to some memory safety problem. Memory safety issues frequently produce RCE.

> And by the way, modern C++ is already secure enough, making some selling points for Rust, a little bit of cosmetic right now.

Sorry. In hindsight, and out of the context like this, i think i picked up harsher words than i should. I dont meant to be disrespectful to all the great and valuable work that is going on the Rust community.

> There is not a single large-scale network-facing widely attacked piece of software I'm aware of in C++ that has not fallen to some memory safety problem. Memory safety issues frequently produce RCE.

Sure, Rust will be better at this. No doubt. But lets not forget that a lang like C++ needed to evolve while still working, so how much of those security issues are there given the use of ancient code practices of the past? software coded in the 90's even the 80's. I guess we at least should wait for when Rust has millions of tools, and billions of line of codes running in production, to see what sort of issues might plague Rust code the most. But Rust will need to get there first. So lets not forget that its a language created in the 70's and that is responsible for great tool, and is still being used to build big project, with millions of LOC and with many devs working in groups in some very sophisticated pieces of software, and this is no small feat.

What i meant to say, earlier, that maybe is not so clear, is the choice is not as unidimensional, by just cherry picking one point of view when you need to decide what kind of tech, fits the best for a given scenario. Im trying to point out that other languages like C++ or even C, still can be good bets, when you look into more vectors of influence, not only in the security aspect, or what language have more FP idioms in it. In the real life, is not as easy as some Rust evangelists imply it is.

C++ its not as good as Rust in the security aspect, theres no doubt about it, but the modern C++ is fine when you sum the vectors of what language will fit the best for a given scenario. I mean, you can be explicit about ownership, and make the api clear about ownership and lifetime. Of course Rust choose to be more pedantic about it. But as a C++ dev i have no issues with lifetime or owership management just by using smart pointers, std::move, etc.. (even in a multi-threaded environment)

But i dont think is as easy, as the Rust community is implying, that is to "just use Rust" for a project, where C++ may also be a good fit.

Even for new, clean room projects, i think C++ may be a better fit for certain scenarios, and im glad that theres also Rust as a choice. But i think sometimes this zealot type of evangelism sometimes more based in spreading fear, than by selling Rust for its own virtues, can hurt more than it looks like.

I guess by now, Rust doesnt even need to be compared to anything else, thanks to great hackers like you its already showing its own virtues. Im just trying to say that by now it probably reached a peak of users that can use the language in more low-level scenarios, and it probably should aim to get more of the Ruby, Python, PHP, NodeJS crowd, to fill its army.

Because from now on it would be harsher for Rust to get more adoption, without a big ecosystem backing it up (Like Swift has with Apple, Java with Android and C and C++ has with Unix)

Re: Integrating “safe” languages into OpenBSD?

#328

Seems most os developers don’t care about the users and only about their maintenance and adoption cost. I WANT my computer and files protected by software written in a safe way using safe languages. I don’t care about the compile time of grep, I stopped caring about that kind of dick measurement competitions a long time ago. Give me a safe, open operating system and I’m willing to trade Posix compatibility and compil…

Curious, but this kind of shitty attitude won't work with OpenBSD nor with any other open source that I know. It is not about what you care, but about what they care. Like if they own you something. That being said, I wonder in what safe language the OS you used to write this is written.

I wouldn't call protecting my computer and data being shitty attitude. OS developers need to realize that secure is not something they can compromise on going forward.

Re: Integrating “safe” languages into OpenBSD?

#329
post #173

I remember I stopped frequenting /r/programming when it became this weird Haskell echo chamber. It was a bubble where a small but vocal faction inside the community seemed to over react to any criticism. They methodically and tirelessly responded to every comment with an endless litany of "facts" showing how Haskell could do anything from os kernels to game programming. They touted every industry mention of Haskell u…

There is a sort of social game that seems to emerge at some point, combining the worst of in-group bullshit and logic-puzzlng as a substitute for actually attempting to help folks honestly seeking questions. The game goes like this: start discussing something: say, including rust in OpenBSD. - Assume it (here, using rust in oBSD) is a great idea. - For each objection, explain why it is trivial. Your tools are your ow…

That's frustrating to hear. I've stuck to the #rust[1] channel and have always received friendly answers whenever I've gotten stuck, and I've had a lot of questions over the past 3 years. :)

[1] https://chat.mibbit.com/?server=irc.mozilla.org&channel=%23r...

Re: Integrating “safe” languages into OpenBSD?

#330
post #278

Earlier quoted context omitted.

… such as? You're merely restating the claim, without providing any proof. Consumer machines, AFAICT, are all amd64 (or x86_64, if you prefer that name). I understood the original post to mean i386 == x86, and I agree — where do you even find an x86 today (for sale, in a non-niche use case, i.e., "pretty easy")?

OpenBSD has as a goal to run on much more than just standard currently-sold consumer hardware. You can certainly disagree with that goal, but that doesn't make it go away.

Oh I totally get this—but what is this hardware that people are still using OpenBSD with that they haven't upgraded in 30 years? Targeting i386 as opposed to, say, i486 or i686 seems like an exercise in idealistic masochism.
Post reply on HN