From 5f1a85b7635fb84ca08adbb6ed288d828d39f168 Mon Sep 17 00:00:00 2001 From: JoYo Date: Sun, 17 Jul 2016 22:19:05 -0400 Subject: [PATCH] provisioning fixes --- README.md | 24 +++++++++++++++++------- Vagrantfile | 1 + provision-ubuntu.sh | 2 +- run.py | 14 ++++++++------ 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2f2a6b6..c020950 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,32 @@ # sins - Scrap is not Scrap ## About -This experiment began out of a fascination with a public school education in biology and a dissatisfaction with genetic algorithms with their ability to do work. Work is for chumps; entropy is less energy. +This experiment began out of a fascination with a public school education in biology and a dissatisfaction with genetic algorithms with their ability to do work. +Work is for chumps; entropy is less energy... er. ### [Artifical Life Slideshow](https://docs.google.com/presentation/d/1P5wEIuympcGkyadeAofbZbJqTmpwpZGw9-DXg5_P7Ms) ## Quick Start - ./waf configure - ./waf build + +### Ubuntu 16.04 + python3 run.py -provision + python3 run.py -build + python3 run.py ## (not so) FAQ -What biology? All I see is bad python code. +What biology? All I see is bad code. ----- -Biology is a great example of a tremendous waste of time, so I love to be inspired by it. Other than that, there isn't really anything else here except a bunch of pseudoscience regarding dissent with modification. Computers are generally deterministic except in specific circumstances which makes producing new functionality in code the programmer's responsibility. The field of artificial intelligence attempts to reproduce human intelligence through deterministic computing and has come a long way in recent years. Artificial intelligence still has predictable results--we have a few tests for human intelligence, the most common being the [Turing test](https://en.wikipedia.org/wiki/Turing_test). +Biology is a great example of a tremendous waste of time, so I love to be inspired by it. +Other than that, there isn't really anything else here except a bunch of pseudoscience regarding dissent with modification. +Computers are generally deterministic except in specific circumstances which makes producing new functionality in code the programmer's responsibility. +The field of artificial intelligence attempts to reproduce human intelligence through deterministic computing and has come a long way in recent years. +Artificial intelligence still has predictable results--we have a few tests for human intelligence, the most common being the [Turing test](https://en.wikipedia.org/wiki/Turing_test). Intelligence is a bad thing now? ----- -Yes. +Yes, Siri. What does this all have to do with scrap not being scrap? ----- -I have a habit of calling new projects "scrap" until I can think of a better name for them. I like to think that scrap is no longer scrap but you get to decided that one for yourself. I also originally named components after biblical figures but decided that was a sin against Father Darwin. +I have a habit of calling new projects "scrap" until I can think of a better name for them. +I like to think that scrap is no longer scrap but you get to decided that one for yourself. +I also originally named components after biblical figures but decided that was a sin against Father Darwin. diff --git a/Vagrantfile b/Vagrantfile index ac3f148..6c8c732 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,4 +2,5 @@ Vagrant.configure("2") do |config| config.vm.box = "bento/ubuntu-16.04" + config.vm.provision "shell", path: "provision-ubuntu.sh" end diff --git a/provision-ubuntu.sh b/provision-ubuntu.sh index 574fae9..b9ffcb4 100644 --- a/provision-ubuntu.sh +++ b/provision-ubuntu.sh @@ -1,2 +1,2 @@ #! /usr/bin/env sh -apt-get install -y build-essential libssl-dev nasm +apt-get install -y clang libssl-dev nasm diff --git a/run.py b/run.py index a971681..1222be2 100644 --- a/run.py +++ b/run.py @@ -1,7 +1,8 @@ #! /usr/bin/env python3 # encoding: utf-8 -import os import logging +import os +import shutil import subprocess @@ -79,7 +80,7 @@ def hex_dumps(scrap_dir): if __name__ == '__main__': import argparse - import shutil + import sys logger = logging.getLogger() logger.setLevel(logging.DEBUG) @@ -105,11 +106,12 @@ if __name__ == '__main__': provision = ['sudo', 'sh', 'provision-ubuntu.sh'] prov_proc = subprocess.run(provision) - elif args.build: - import sys - os.environ['CC'] = 'clang' - waf = [sys.executable, 'waf.py', 'configure', 'build'] + waf = [sys.executable, 'waf.py', 'configure'] + waf_proc = subprocess.run(waf) + + elif args.build: + waf = [sys.executable, 'waf.py', 'build'] waf_proc = subprocess.run(waf) logger.info(waf_proc.stdout)