Skip to content

Instantly share code, notes, and snippets.

@dtzWill
Last active January 8, 2019 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtzWill/756e7bbeed9d607920165350efb04317 to your computer and use it in GitHub Desktop.
Save dtzWill/756e7bbeed9d607920165350efb04317 to your computer and use it in GitHub Desktop.
Multiplexing bash 4.4 + bash 5.0, quick preview
~/allvm-nixpkgs/allvm (git)-[master] $ tree ./bashes-aot 0:45:56 on 19-01-08
./bashes-aot
├── bin
│   ├── bash44
│   └── bash50
└── mux
└── bashes-mux
2 directories, 3 files
~/allvm-nixpkgs/allvm (git)-[master] $ nix build -f release-muxopt.nix collections.bashes-sizes -o bashes-sizes 0:45:56 on 19-01-08
~/allvm-nixpkgs/allvm (git)-[master] $ csvlook ./bashes-sizes/size.csv 0:46:08 on 19-01-08
| Name | Native Size | Native size (deps) | ALLVM-Opt | ALLVM-NoOpt | Count |
| ------ | ----------- | ------------------ | --------- | ----------- | ----- |
| bashes | 3,199,200 | 776,224 | 2,787,688 | 2,554,808 | 2 |
~/allvm-nixpkgs/allvm (git)-[master] $
~/allvm-nixpkgs/allvm (git)-[master] $ ./bashes-aot/bin/bash44 -version 0:48:52 on 19-01-08
GNU bash, version 4.4.23(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
~/allvm-nixpkgs/allvm (git)-[master] $ ./bashes-aot/bin/bash50 --version 0:48:54 on 19-01-08
GNU bash, version 5.0.0(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@dtzWill
Copy link
Author

dtzWill commented Jan 8, 2019

  • toolchain used here lies about the platform, so software doesn't freak
  • TIL bash accepts both -version and --version 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment