A fool and his not-really-compiler are soon parted
-
@dcon said in A fool and his not-really-money are soon parted:
By the time we upgrade compilers
I've got ten or twelve different C/C++ compilers on this machine. :) That's what you get once you start developing using real cutting edge stuff and for multiple architectures…
-
> rustup target list | ?{ $_.EndsWith('(installed)') -or $_.EndsWith('(default)') } aarch64-apple-ios (installed) aarch64-linux-android (installed) arm-linux-androideabi (installed) armv7-apple-ios (installed) armv7-linux-androideabi (installed) armv7s-apple-ios (installed) wasm32-unknown-emscripten (installed) wasm32-unknown-unknown (installed) x86_64-linux-android (installed) x86_64-pc-windows-msvc (default) x86_64-unknown-linux-gnu (installed) x86_64-unknown-redox (installed)
-
@dkf said in A fool and his not-really-money are soon parted:
I've got ten or twelve different C/C++ compilers on this machine.
I have four versions of GCC and a copy of MSVC2015 on my Linux machine.
-
@ben_lubar loses this round of
-
I think the most I had was 5 versions of Visual Studio...
-
I have a hex editor, so I'm one step away from having a virtually unlimited number of compilers.
-
@mott555 I use my hex editor to cheat at DOS games from the mid-90s.
-
@pie_flavor That's the different backend architectures, but I was talking about actual installs of compilers. I have two different C compilers for embedded systems (different versions of gcc; one is the one we recommend our users use, and the other is the one we're intending to switch them over to next release). I also have a whole bunch of ordinary installations of gcc and clang. And, because this is a Mac, I've also got
/usr/bin/gcc
which is Apple's own screwy version of clang (which is needed for a couple of places because of weird things in Apple's system libraries).
-
@dkf I was simply illustrating that the Rust compiler is the only compiler you need for Rust.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
the only compiler you need for Rust
is...
$ rustup -bash: rustup: command not found
-
@loopback0
curl https://sh.rustup.rs -sSf | sh
rustup is the component manager, rustc is the compiler, cargo is the build/package manager.
-
just pipe this Serbian url into shell
-
@pie_flavor but there is no rust compiler for WTFOS
-
@sockpuppet7 Well, all you have to do is make an LLVM IL compiler for whatever OS that is, and then you'll be able to easily integrate it.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@loopback0
curl https://sh.rustup.rs -sSf |
sudosh
rustup is the component manager, rustc is the compiler, cargo is the build/package manager.FTFY.
-
@Tsaukpaetra No, not really. It all lives in the home directory, no rocket surgery required.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
> rustup target list | ?{ $_.EndsWith('(installed)') -or $_.EndsWith('(default)') } aarch64-apple-ios (installed) aarch64-linux-android (installed) arm-linux-androideabi (installed) armv7-apple-ios (installed) armv7-linux-androideabi (installed) armv7s-apple-ios (installed) wasm32-unknown-emscripten (installed) wasm32-unknown-unknown (installed) x86_64-linux-android (installed) x86_64-pc-windows-msvc (default) x86_64-unknown-linux-gnu (installed) x86_64-unknown-redox (installed)
Without any sort of context, all I can assume from this is that Rust compilers are so shit they need a different install for each target architecture
-
@Jaloopa Depends on why you'd call that shit. Only a couple of them have their own toolchains, but all of them need their own rustc version, yes. However, rustup can switch between active compilers at any time and flags can be passed to rustc or cargo to configure which toolchain/target to use. rustup acts as a package manager in this case - Rust can get installed many times but it is as if it was only installed once.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@Jaloopa Depends on why you'd call that shit. Only a couple of them have their own toolchains, but all of them need their own rustc version, yes. However, rustup can switch between active compilers at any time and flags can be passed to rustc or cargo to configure which toolchain/target to use. rustup acts as a package manager in this case - Rust can get installed many times but it is as if it was only installed once.
What?
-
@Jaloopa What yourself.
-
@Jaloopa said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
> rustup target list | ?{ $_.EndsWith('(installed)') -or $_.EndsWith('(default)') } aarch64-apple-ios (installed) aarch64-linux-android (installed) arm-linux-androideabi (installed) armv7-apple-ios (installed) armv7-linux-androideabi (installed) armv7s-apple-ios (installed) wasm32-unknown-emscripten (installed) wasm32-unknown-unknown (installed) x86_64-linux-android (installed) x86_64-pc-windows-msvc (default) x86_64-unknown-linux-gnu (installed) x86_64-unknown-redox (installed)
Without any sort of context, all I can assume from this is that Rust compilers are so shit they need a different install for each target architecture
I have this nice little script I wrote:
#!/bin/bash # gimme is from https://raw.githubusercontent.com/travis-ci/gimme/v1.5.2/gimme export GIMME_NO_ENV_ALIAS=1 export GIMME_SILENT_ENV=1 export GIMME_CGO_ENABLED=1 export GIMME_INSTALL_RACE=1 export GIMME_GO_VERSION=${GIMME_GO_VERSION:-stable} _goos="$GOOS" _goarch="$GOARCH" eval "$(gimme)" export GOOS="$_goos" export GOARCH="$_goarch" case $(go env GOOS) in windows) case $(go env GOARCH) in 386) export CGO_ENABLED=${CGO_ENABLED:-1} export CC=i686-w64-mingw32-gcc export CXX=i686-w64-mingw32-g++ ;; amd64) export CGO_ENABLED=${CGO_ENABLED:-1} export CC=x86_64-w64-mingw32-gcc export CXX=x86_64-w64-mingw32-g++ ;; *) ;; esac ;; *) ;; esac exec go "$@" <&1
It allows me to just passively run the latest stable (or ANY) version of Go without having to manually update anything.
Go can compile to ANY supported os/arch combo from any installation of Go. You don't need to install extra bullshit to cross-compile for Windows (unless you want cgo, which is what my script helps with), or to compile to WebAssembly or for Android or iOS.
-
@ben_lubar Just like Rust! Except you don't need to write the script yourself.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@Tsaukpaetra No, not really. It all lives in the home directory, no rocket surgery required.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar Just like Rust! Except you don't need to write the script yourself.
Someone had to...
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
the only compiler you need for Rust
And that in turn means that there are platforms on which Rust can't run. Which is understandable, of course; it's a young language and hasn't had the effort put into porting it to exotic things yet. (It's because GCC has more targets than LLVM. Even if the code it generates for some of them is miserably crap. And the GCC intermediate language still gives me horrors from the glimpses I've seen of it.)
-
@hungrier said in A fool and his not-really-compiler are soon parted:
just pipe this Serbian url into shell
It only works on Macs. Then it sorts the entire filesystem.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@sockpuppet7 Well, all you have to do is make an LLVM IL compiler for whatever OS that is, and then you'll be able to easily integrate it.
That is already too much, but not enough, you also would need a standard's compatible clib, and a compatible file system emulation layer over WTFFS. The LLVM was already too much. That is just for one WTFOS, then there is the several different weird OS around.
I would like something that is better than C but is still easy to port everywhere. Something that transpile to C without using even the clib and the dependencies carried in a small very portable C file.
I think we could have a garbage collector that instead of running on a background thread would have a function for me to call whenever I want it to run, so it doesn't need a multithreaded os.
-
@sockpuppet7 said in A fool and his not-really-compiler are soon parted:
I would like something that is better than C but is still easy to port everywhere. Something that transpile to C without using even the clib and the dependencies carried in a small very portable C file.
Those who do not understand Forth are condemned to re-implement it badly, over and over.
-
@sockpuppet7 said in A fool and his not-really-compiler are soon parted:
Something that transpile to C without using even the clib
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Rust can get installed many times but it is as if it was only installed once.
FUCKING HELL! WHY DOES IT?
@gordonjcp said in A fool and his not-really-compiler are soon parted:
Those who do not understand Forth are condemned to re-implement it badly, over and over.
ok
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar Just like Rust! Except you don't need to write the script yourself.
So you're telling me that you can run any version of Rust, defaulting to the latest stable version, without having Rust installed?
-
@dkf said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
the only compiler you need for Rust
And that in turn means that there are platforms on which Rust can't run.
Such as?
-
@sockpuppet7 said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@sockpuppet7 Well, all you have to do is make an LLVM IL compiler for whatever OS that is, and then you'll be able to easily integrate it.
That is already too much, but not enough, you also would need a standard's compatible clib, and a compatible file system emulation layer over WTFFS. The LLVM was already too much. That is just for one WTFOS, then there is the several different weird OS around.
I would like something that is better than C but is still easy to port everywhere. Something that transpile to C without using even the clib and the dependencies carried in a small very portable C file.
I think we could have a garbage collector that instead of running on a background thread would have a function for me to call whenever I want it to run, so it doesn't need a multithreaded os.
Redox OS has made an implementation of the stdlib in pure Rust, no C dependency required.
-
@TwelveBaud said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Rust can get installed many times but it is as if it was only installed once.
FUCKING HELL! WHY DOES IT?
This is one of those jokes I haven't discovered what it means yet.
-
@ben_lubar said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar Just like Rust! Except you don't need to write the script yourself.
So you're telling me that you can run any version of Rust, defaulting to the latest stable version, without having Rust installed?
You can't run Go without having Go installed. Not sure what you're trying to compare to here.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@TwelveBaud said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Rust can get installed many times but it is as if it was only installed once.
FUCKING HELL! WHY DOES IT?
This is one of those jokes I haven't discovered what it means yet.
It was before your time. But fbmac would have loved it.
-
@boomzilla said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@TwelveBaud said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Rust can get installed many times but it is as if it was only installed once.
FUCKING HELL! WHY DOES IT?
This is one of those jokes I haven't discovered what it means yet.
It was before your time.
Yes, that's why I haven't discovered what it means yet.
Care to elaborate?
-
@pie_flavor The retarded WYSIWYG failure of an editor in CS used to sometimes delete two characters when you hit the backspace key.
"FUCKING HELL WHY DOES IT DELETE TWO CHARACTERS WHEN I HIT BACKSPACE ONCE?!" became a popular tag to use and a meme in its own right.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Redox OS has made an implementation of the stdlib in pure Rust, no C dependency required.
Standard libs are dependent on the kernels they are implemented at. So someone would need to implement LLVM and adapt Redox to WTFOS. (And there are several unrelated arcane OSs like that).
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar said in A fool and his not-really-compiler are soon parted:
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar Just like Rust! Except you don't need to write the script yourself.
So you're telling me that you can run any version of Rust, defaulting to the latest stable version, without having Rust installed?
You can't run Go without having Go installed. Not sure what you're trying to compare to here.
My script is written in Bash and has a single dependency that is also written in Bash.
You can install that script and its one dependency and try it for yourself. You don't need to install Go to run it.
-
@ben_lubar Then I'm not quite understanding what the point is.
curl "https://sh.rustup.rs" -sSf | sh -s -- -y
is pretty dang easy.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
@ben_lubar Then I'm not quite understanding what the point is.
curl "https://sh.rustup.rs" -sSf | sh -s -- -y
is pretty dang easy.How do you update Rust when a new version is released? Does it take more than zero commands?
-
@ben_lubar
rustup update
to update all targets. If you really wanted, you could setcargo
to be an alias torustup update & cargo +nightly $@
or however you say it, but really you don't need a script at all at that point.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
rustup update
So
@ben_lubar said in A fool and his not-really-compiler are soon parted:
more than zero commands
-
@Jaloopa And the way to do the same for Go is to uninstall, download, unzip, and copy. It's "zero commands" because the multiple commands have been placed into @ben_lubar's script. Rust has one command to update, and Go has no equivalent of rustup.
-
@pie_flavor said in A fool and his not-really-compiler are soon parted:
Rust has one command to update
Has anyone yet seriously had the requirement to do version number pinning or support multiple versions of things (e.g., because they want to match a specific environment at a customer)?
-
@dkf said in A fool and his not-really-compiler are soon parted:
e.g., because they want to match a specific environment at a customer
Oh come on, when has anyone required a case for anything like that? It says it's multiplatform already, what else do you want?
-
@dkf "Anything other than the latest version, we don't support. Make sure you upgrade within 6 weeks, every 6 weeks."
-
@TwelveBaud said in A fool and his not-really-compiler are soon parted:
"Make sure you upgrade within 6 weeks, every 6 weeks."
“Oh that's awkward. The upload bandwidth to the spacecraft isn't enough for us to have finished getting your software there inside that timespan.”
-
@TwelveBaud said in A fool and his not-really-compiler are soon parted:
@dkf "Make sure you upgrade within 6 weeks, every 6 weeks."
: "Make sure you upgrade within 1 day, every 6 months."
Filed under: Why is there no Oracle emoji?