start new:
tmux
start new with session name:
tmux new -s myname
| # unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages. | |
| # ghc-pkg-clean -f cabal/dev/packages*.conf also works. | |
| function ghc-pkg-clean() { | |
| for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'` | |
| do | |
| echo unregistering $p; ghc-pkg $* unregister $p | |
| done | |
| } | |
| # remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place. |
| (use '[clojure.core.match :only [match]]) | |
| (defn evaluate [env [sym x y]] | |
| (match [sym] | |
| ['Number] x | |
| ['Add] (+ (evaluate env x) (evaluate env y)) | |
| ['Multiply] (* (evaluate env x) (evaluate env y)) | |
| ['Variable] (env x))) | |
| (def environment {"a" 3, "b" 4, "c" 5}) |
| #r "Nuget.Core" | |
| #r "System.Xml.Linq" | |
| open NuGet | |
| open System | |
| open System.Linq | |
| let repoFac = new PackageRepositoryFactory() | |
| let repo = repoFac.CreateRepository("http://btn-tc01:8083") | |
| let FiveFiveVersion = new SemanticVersion("5.5.0") | |
| let packages = repo.FindPackages("Database.PASNGR", new VersionSpec(), false, false) |
| App.config TeAI.fs TeAIChess.fsproj TeAIConsole.fs TeAIHelpers.fs TeAIModel.fs | |
| >>xbuild TeAIChess.fsproj ~/contrib/fchess/src/ :) | |
| XBuild Engine Version 3.0.1.0 | |
| Mono, Version 3.0.1.0 | |
| Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011. | |
| Build started 12/14/2012 11:46:26. | |
| __________________________________________________ | |
| Project "/home/nen/contrib/fchess/src/TeAIChess.fsproj" (default target(s)): | |
| Target PrepareForBuild: |
| >> Emerging (1 of 1) dev-dotnet/fchess-9999 from weirdo | |
| >>> Unpacking source... | |
| remote: Counting objects: 9, done. | |
| remote: Compressing objects: 100% (1/1), done. | |
| remote: Total 5 (delta 4), reused 5 (delta 4) | |
| Unpacking objects: 100% (5/5), done. | |
| From git://github.com/Cynede/FChess | |
| d997552..70a4f9b master -> master | |
| GIT update --> | |
| repository: git://github.com/Cynede/FChess.git |
| >>time ./hs 15 ~/tests/ :) | |
| stretch tree of depth 16 check: -1 | |
| 65536 trees of depth 4 check: -65536 | |
| 16384 trees of depth 6 check: -16384 | |
| 4096 trees of depth 8 check: -4096 | |
| 1024 trees of depth 10 check: -1024 | |
| 256 trees of depth 12 check: -256 | |
| 64 trees of depth 14 check: -64 | |
| long lived tree of depth 15 check: -1 | |
| ./hs 15 1.08s user 0.72s system 99% cpu 1.803 total |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| const int infinity = 2147483647; | |
| struct edge_t { | |
| int v1; | |
| int v2; | |
| int cost; |
| var ast = SyntaxTree.ParseText(@" | |
| namespace Foo { | |
| #define MyIf = if | |
| #define MyElse = else | |
| public class some | |
| { | |
| public void someMethod() | |
| { | |
| MyFor(int i = 0; i < 10; i++) |
| private static bool IsLetterOrUnicodeSchemeIdentifier(char num) | |
| { | |
| if (num < '\x0080') | |
| { | |
| return char.IsLetter(num); | |
| } | |
| switch (char.GetUnicodeCategory(num)) | |
| { | |
| case UnicodeCategory.UppercaseLetter: | |
| case UnicodeCategory.LowercaseLetter: |