How to add --watch parameter to coffee command? - coffeescript

I have this: coffee --output extension/javascripts/ --compile app.coffee and I want to add --watch parameter. How can I implement this?
because when I do so, it does not work
─$ coffee --output extension/javascripts/ --compile app.coffee --watch
File not found: --watch.coffee

coffee -o extension/javascripts/ -cw app.coffee
You can combine commands. (so cw is compile and watch)

Related

SFML: Unable to run code because of soundbuffer error

I came across a problem that wouldn't let me play sounds on SFML. Whenever I call the sf::SoundBuffer buffer; object, the code would break and spit out an error.
I either think its a problem inside the makefile. Other than that, I'm completely lost in what to do
Sample of makefile:
all: compile link
compile:
g++ -I src/include -c main.cpp
link:
g++ main.o -o Sorter -L src/lib -l sfml-audio -l sfml-graphics -l sfml-window -l sfml-system
Picture of the error

Attempting to run parallel tests with py.test and -n option is not working

I am attempting to run parallel tests with pytest in mac terminal, but when I use:
py.test -n NUM
I get the following error:
Alexs-MacBook-Pro:sauceTests alex$ py.test -n 3
usage: py.test [options] [file_or_dir] [file_or_dir] [...]
py.test: error: unrecognized arguments: -n
inifile: None
rootdir: /Users/alex/PycharmProjects/sauceTests
Thanks!
You need to install a plugin for that:
pip install pytest-xdist

Where do I find alias arguments in fastlane?

In a fastlane project that I am taking over everything is run by command line (e.g. not fastfile). In this project (using fastlane 1.7) there are aliases used for arguments. Where would I go to find out what each of the aliases map to as far as fastlane commands? For example:
def build(Myapp, skip_profile)
if skip_profile || download_provisioning_profiles(MyApp)
build_cmd = "gym -a -r -s #{MyApp.name} -o ./build -n #{MyApp.ipa_name} --use_legacy_build_api"
system(build_cmd)
else
puts "Was unable to install provisioning profiles"
exit 1
end
end
Looking at this I am pretty sure that -o is the output but where would I look to find out explicitly what -a and -r and -s and -o are?
Run
fastlane gym --help
to get a list of all available options for the gym tool.

Eclipse Makefile: Make Variables are skipped

I have a project with a Makefile in it, on Unix console it works fine, compiles, builds and I can run the binary at the end.
I imported the project into Eclipse workspace and somehow Makefile module of Eclipse cannot build the project now. It gives the following error:
g++: error: /src/main: No such file or directory
Whereas there should have been
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main
which uses two make variables. I already put them before this line and define them as :
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
Same Makefile is fine with console, but not with Eclipse, which is weird.
Any thoughts?
Here is where I put my export lines:
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main -g -o src/obstacleDetection.o -c src/obstacleDetection.cpp
cd libs && cp $(CMS_HOME)/src/main/.libs/libactivemq-cpp.so.18.0.4 . && ln -sf libactivemq-cpp.so.18.0.4 libactivemq-cpp.so.18
g++ -L $(CMS_HOME)/src/main/.libs/ -g -o bin/obstacleDetection src/obstacleDetection.o src-gen/Point.pb.cc src-gen/Point.pb.h -lactivemq-cpp -lssl -lprotobuf -pthread
#echo "Success. Run the executable from the binary directory with: LD_LIBRARY_PATH=../libs/ ./obstacleDetection"
This is not right:
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
g++ $(APR_INCLUDE) -I $(CMS_HOME)/src/main ...
All lines in the recipe (that is, lines that are indented with a TAB in a target context like this) are passed to the shell. These are not make variable assignments. There are two things wrong with that:
First, each logical line in the recipe is passed to a new shell. That means any changes to the process context (such as the environment or the working directory) are present only for the duration of that logical line; once the shell processing that line exits, all those changes are lost. So, these lines have no impact: they set an environment variable in the shell, then the shell exits and that setting is gone.
Second, the variable references you make in your compile line, such as $(APR_INCLUDE), are make variable references, not environment variable references. So even if those environment variable assignments still had effect, they would not be used because you're not referring to environment variables here.
You want to create make variable assignments. That can only be done outside of a recipe. Also, you don't need to export them because only make needs to see them (make will expand them before invoking the shell). So, your makefile should look like this:
APR_INCLUDE = /usr/include/apr-1
CMS_HOME = $(HOME)/Desktop/activemq-cpp-library-3.8.4
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main -g -o src/obstacleDetection.o -c src/obstacleDetection.cpp
cd libs && cp $(CMS_HOME)/src/main/.libs/libactivemq-cpp.so.18.0.4 . && ln -sf libactivemq-cpp.so.18.0.4 libactivemq-cpp.so.18
g++ -L $(CMS_HOME)/src/main/.libs/ -g -o bin/obstacleDetection src/obstacleDetection.o src-gen/Point.pb.cc src-gen/Point.pb.h -lactivemq-cpp -lssl -lprotobuf -pthread
#echo "Success. Run the executable from the binary directory with: LD_LIBRARY_PATH=../libs/ ./obstacleDetection"

Go language: can't find import (github project)

Hi I am writing on a small go app solving a specified graph problem. I want to use goraph's maxflow algorithm (see github.com/gyuho/goraph) for this, but I have problems to import it to my project.
What I have done:
- I created a .go folter in my home directory and added the GOPATH to my .bash_profile (export GOPATH=$HOME/.go)
Then I called "go get github.com/gyuho/goraph". The files are stored under ~/.go/src/github.com/gyuho/goraph. In .go also exist a "bin" and a "pkg" folder.
In my code I do the following:
package flow
import (
"encoding/json"
"github.com/gyuho/goraph"
"log"
)
//some func definitions...
This is my Makefile:
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOFMT=gofmt -w
# Directories
SRC=src
FLOW_SRC=$(SRC)/flow
ERLANGC_SRC=$(SRC)/erlangc
LOGGING_SRC=$(SRC)/logging
# Names and files
MAKING_OS=$(shell go env GOOS)
MAKING_ARCH=$(shell go env GOARCH)
TARGET_NAME=flow
TARGET_DIR=$(shell pwd)/bin
# Cross compilation targets
BIN_DARWIN_AMD64=darwin-amd64
BIN_LINUX_AMD64=linux-amd64
BIN_LINUX_386=linux-386
TARGET_LINUX_AMD64=$(TARGET_DIR)/$(BIN_LINUX_AMD64)/$(TARGET_NAME)
TARGET_LINUX_386=$(TARGET_DIR)/$(BIN_LINUX_386)/$(TARGET_NAME)
TARGET_DARWIN_AMD64=$(TARGET_DIR)/$(BIN_DARWIN_AMD64)/$(TARGET_NAME)
ALL_TARGETS=$(TARGET_LINUX_AMD64) $(TARGET_LINUX_386) $(TARGET_DARWIN_AMD64)
# Rules
all: format tests build-darwin-amd64 build-linux-amd64 build-linux-386
clean: $(ALL_TARGETS)
$(GOCLEAN)
rm -f $^
ci: tests build-linux-amd64
tests:
$(GOTEST) $(FLOW_SRC)/*.go
$(GOTEST) $(ERLANGC_SRC)/*.go
build-darwin-amd64:
mkdir -p $(TARGET_DIR)/$(BIN_DARWIN_AMD64)
cd src && GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(TARGET_DARWIN_AMD64)
build-linux-amd64:
mkdir -p $(TARGET_DIR)/$(BIN_LINUX_AMD64)
cd src && GOARCH=amd64 GOOS=linux $(GOBUILD) -o $(TARGET_LINUX_AMD64)
build-linux-386:
mkdir -p $(TARGET_DIR)/$(BIN_LINUX_386)
cd src && GOARCH=386 GOOS=linux $(GOBUILD) -o $(TARGET_LINUX_386)
format:
$(GOFMT) -d -tabwidth=2 -tabs=false -w -s $(FLOW_SRC)/*.go
$(GOFMT) -d -tabwidth=2 -tabs=false -w -s $(ERLANGC_SRC)/*.go
go env:
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bstoecker/.go/"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.2.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.2.2/libexec/pkg/tool/darwin_amd64"
TERM="dumb"
CC="clang"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common"
CXX="clang++"
CGO_ENABLED="1"
when calling make I get the following error:
gofmt -w -d -tabwidth=2 -tabs=false -w -s src/flow/*.go
gofmt -w -d -tabwidth=2 -tabs=false -w -s src/erlangc/*.go
go test src/flow/*.go
# command-line-arguments
src/flow/graph_json.go:5: can't find import: "github.com/gyuho/goraph"
FAIL command-line-arguments [build failed]
make: *** [tests] Error 2
anyone an idea what I am doing wrong?
thanks so far
Any example in that goraph project don't import just "github.com/gyuho/goraph".
They import a specific package within that application:
For instance:
import (
"fmt"
"testing"
"github.com/gyuho/goraph/algorithm/bfs"
"github.com/gyuho/goraph/graph/gsd"
// go test -v github.com/gyuho/goraph/example
// go test -v /Users/gyuho/go/src/github.com/gyuho/goraph/example/bfs_test.go
)
See if you can import one of those packages within goraph, instead of goraph itself.