Compiling wasm-gc v0.1.0 (https://github.com/alexcrichton/wasm-gc#6fe4e9de)
error: could not exec the linker cc
: No such file or directory (os error 2)
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps/wasm_gc-220fb6710333d060.wasm_gc0.rcgu.o" "-o" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps/wasm_gc-220fb6710333d060" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps/wasm_gc-220fb6710333d060.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps" "-L" "/home/selfup/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps/libenv_logger-00e3003c8ba14f89.rlib" "/tmp/cargo-install.lJhVfpgwNN3f/release/deps/libparity_wasm-353ddb98eb2b052
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
struct User { | |
first_name: &'static str, | |
last_name: &'static str, | |
} | |
impl User { | |
fn new(first_name: &'static str, last_name: &'static str) -> User { | |
User { | |
first_name: first_name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using this instead of scoped vars (regular function) | |
function saveWorld(largeBucket, smallBucket, result) { | |
this.largeBucketA = largeBucket; | |
this.smallBucketA = 0; | |
this.movesCounter = 0; | |
while (this.largeBucketA !== result && this.smallBucketA !== result) { | |
if (this.largeBucketA === largeBucket && this.smallBucketA === 0) { | |
this.largeBucketA = largeBucket - smallBucket; // 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { app } from 'hyperapp' | |
import { main, nav, section, h1, button, a, p, span } from '@hyperapp/html' | |
const Route = props => { | |
const match = props.exact | |
? location.pathname === props.path | |
: location.pathname.match(props.path) | |
return props.render | |
? match && props.render({ path: props.path }) | |
: match && section(props.view) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person extends React.Component { | |
render () { | |
const name = this.props.name.length > 8 | |
? this.props.name.substring(0, 5) | |
: this.props.name; | |
const age = this.props.age; | |
const hobbies = this.props.hobbies.map((hobbie) => <li>{hobbie}</li>); | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Demo() { | |
this.x = 42; | |
} | |
Demo.prototype = { | |
logX: function() { | |
console.log(this.x); | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
big_arr = (0..900_000).to_a | |
sm_arr = (0..700_000).to_a | |
def diff(big, sm) | |
(big - sm) | |
end | |
def similarities(big, sm) | |
(big & sm) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
struct User { | |
first_name: &'static str, | |
last_name: &'static str, | |
} | |
impl User { | |
fn new(first_name: &'static str, last_name: &'static str) -> User { | |
User { | |
first_name: first_name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cmxs { | |
alias cmxsh="chmod +x ./scripts/*.sh" | |
function meta_mod { | |
echo $cmxsh >> ./scripts/chmodx.sh && $cmxsh | |
} | |
if [ -d scripts ] | |
then | |
meta_mod |