Someone should start by writing all the setuid apps in Go. OpenBSD would probably be more open to Go than Rust since Go is a lot like C with a Garbage Collector. They love C.
Integrating “safe” languages into OpenBSD?
241–250 of 344 posts
Re: Integrating “safe” languages into OpenBSD?
#242Earlier quoted context omitted.
> go needs go, haskell needs haskell, rust needs rust That's painful. It's one big point which Nim [1] does better. It compiles to C and bootstraps from C. That makes porting to other platforms much easier. I don't understand why Haskell and Rust don't provide bootstrapping from C. Did they write the first compilers with Assembler? > You just don't notice it because these two languages are already part of the base sy…
> I don't understand why Haskell and Rust don't provide bootstrapping from C. Did they write the first compilers with Assembler? I don't know about Haskell, but the first Rust compiler was written in OCaml. See for instance the comments at https://www.reddit.com/r/rust/comments/6nt2j1/is_there_any_e...
Re: Integrating “safe” languages into OpenBSD?
#243The points made against switching to newer languages are valid. It will cost time, it will cost effort, it will take many years of work to convince stubborn maintainers to switch. But it will not stop _everyone_ from adopting better languages, and their efforts will eventually surpass the older, less secure systems. When there's feature parity, each and every new exploit will be called out: "this wouldn't have happen…
As for the point about how nobody is working on replacements, that's wrong. There's (partial) replacements for most coreutils written in rust, and a whole kernel has been under active development for years now. I acknowledge the strong pull to go and re-implement existing standards like POSIX in a new language like Rust. But, having had to again deal with all the corner cases of signal handling and threads for a Linu…
Re: Integrating “safe” languages into OpenBSD?
#244Earlier quoted context omitted.
I find most of the programming/lang/framework subreddits intolerable. I dip into those waters occasionally, but unsub pretty quick. Too many egos, trolls, asshats, and too much noise. There are notable exceptions, like /r/elixir. But I abandoned /r/python and /r/django months ago, and won't be back. I'm an adult, and prefer to discuss things those who will show at least a modicum of respect to others.
The flipside of that is - I'm an adult, I want to talk to people who can handle critiques and debate without getting unduly upset. Disagreement != trolling.
Re: Integrating “safe” languages into OpenBSD?
#245Earlier quoted context omitted.
What languages do you come from? What is fast compilation for you? The compilation phase can take hours in C++. Up to a day when compiling huge projects will all the optimization flags. Live that for some time and it will quickly prove you that you were wrong. Compilation time matters.
Fast compilation: less than a second (feels like not waiting at all) Slow compilation: more than a minute (makes to start browsing HN, missing the end, thus losing even more time) To have fast compilation even with big projects is hard. Go, C, and D are usually fast. Scala is usually slow. I care about development builds primarily. The edit-compile-test loop must be really really fast. Optimization flags are irreleva…
> Slow compilation: more than a minute (makes to start browsing HN, missing the end, thus losing even more time)
See the thread here: https://askubuntu.com/questions/409611/desktop-notification-...
TL;DR install undistract-me, add 2 lines to bashrc, and you will get a desktop popup when a command that takes longer than 10 seconds to complete is finished.
Fedora does this by default on install and I have found it so handy. Kick off a compile etc, then just browse HN/reddit til I get the popup.
Re: Integrating “safe” languages into OpenBSD?
#246If "safe" language would be real magic pill for safe programming, Ada would have replaced C and C++ in systems programming and safety critical applications long time ago.
Rust is a different kind.
Also, I've seen people doing generic low level network stacks (or at least articles about it) in Ada, seems lovely.
Re: Integrating “safe” languages into OpenBSD?
#247Earlier quoted context omitted.
There are those of us who have been writing C++ for decades and are sick of the footguns and build systems but have never had a viable alternative before. 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. Yeah, there are some people who are a little too over the top but a large part of the support behind Rust is from t…
(well I mean there has been Ada* for ages) *or fortran or pascal
At least for me, part of the attraction of Rust is the development tools around the language itself (e.g. cargo).
Re: Integrating “safe” languages into OpenBSD?
#248Earlier quoted context omitted.
If compilation of rustc runs out of memory it represent an upper limit on the complexity of actually viable Rust programs, and given how much software is larger than a compiler it is a discouraging performance level.
True, but we're talking about 32 bit systems. Chrome stopped being able to compile on 32 bit systems years ago, as a C++ programs. I think Firefox is in the same situations. It does sound kind of bad for Rust, but the competition isn't doing much better :p (weak excuse, I know)
That's not to say either one is "worse" or "better", but comparing the two on an axis like platform support is like comparing tomahawk missiles and tall ships. Totally different requirements and use cases.
Re: Integrating “safe” languages into OpenBSD?
#249Earlier quoted context omitted.
If compilation of rustc runs out of memory it represent an upper limit on the complexity of actually viable Rust programs, and given how much software is larger than a compiler it is a discouraging performance level.
Rustc is more than just a Rust program; we compile LLVM from scratch, for example. Is the OOM in the Rust code, or in the LLVM code, or in the final linking, or what? It's not clear. The compiler is one of the largest Rust programs that exist. Last I checked, it was three quarters of a million lines of Rust, but a quick loc shows 1.5 million lines of Rust, 2.3 million lines of C++, and 900,000 lines of C (again, most…
Re: Integrating “safe” languages into OpenBSD?
#250Earlier quoted context omitted.
> That's painful. It's one big point which Nim [1] does better. It compiles to C and bootstraps from C. That makes porting to other platforms much easier. Unless you are talking about an architecture which doesn't have llvm backend, it takes the same effort as nim to port rust and haskell. > Did they write the first compilers with Assembler? Rust was written in Ocaml first, bootstrapping from C need decent amount of…
> Unless you are talking about an architecture which doesn't have llvm backend Nim doesn't depend on LLVM. It works also with GNU C.