This file contains 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
foo :: String -> IO () | |
foo dummy = do | |
let (x, y) = (1, 1) | |
(x, y) <- pure $ (trace "x" (x+1), (trace "y" y*3) | |
print $ show (y + y) <> dummy | |
print $ show (x + x) <> dummy | |
foo2 x = foo (trace "outerfoo" "foo") | |
foo3 xs dummy = print $ show (map (+1) xs) <> dummy |
This file contains 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 Control.Monad.State (execState, get, modify) | |
import Debug.Trace (trace) | |
foo :: IO () | |
foo = do | |
(x, y) <- pure $ flip execState (1,1) $ do | |
(x, y) <- get | |
modify (\(x, y) -> (trace "x1" (x+1), (trace "y1" y))) | |
(x, y) <- get |
This file contains 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
{ | |
master = pkgs.python35Packages.buildPythonApplication (inputs // { | |
preUnpackHook = '' | |
PDIR = $(pwd) | |
echo "qui: $PDIR" | |
cd $(mktemp -d) | |
git clone $PDIR . | |
export sourceRoot="./checkprices" | |
''; | |
checkPhase = "env MYPYPATH=$PWD/stubs py.test"; |
This file contains 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
let | |
pkgs = import ./channel.nix; | |
foo_project = import foo/default.nix; | |
main_service = cmd: { | |
wantedBy = [ "multi-user.target" ]; # Specify that the system wants this service to run. | |
after = [ "network.target" ]; # Start the webserver after the network has come up. | |
serviceConfig = { | |
ExecStart = cmd; | |
User = "nobody"; |
This file contains 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 Data.Exists | |
data Showable_ a = Showable_ a | |
data Showable = Showable (Exists Showable_) | |
instance showable_ :: (Show a) => Show (Showable_ a) where | |
show (Showable_ x) = show x | |
instance showable :: (Show (Showable_ a)) => Show Showable where | |
show (Showable v) = runExists show' v |
This file contains 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
groovy:000> trait A{ String duh() {"a"}} | |
===> true | |
groovy:000> trait B{ String duh() {"b"}} | |
===> true | |
groovy:000> class C implements A,B {} | |
===> true | |
groovy:000> c = new C() | |
===> C@797cf65c | |
groovy:000> def blez(A a){a.duh()+"!"} | |
===> true |
This file contains 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
dario@feynman /tmp> diffoscope v3.3.5-slp.tar.bz2 stackless-335-export.tar.bz2 | |
--- v3.3.5-slp.tar.bz2 | |
+++ stackless-335-export.tar.bz2 | |
│ --- v3.3.5-slp.tar | |
├── +++ stackless-335-export.tar | |
│ ├── metadata | |
│ │ @@ -1,3977 +1,4244 @@ | |
│ │ --rw-r--r-- 0/0 126 2014-07-28 10:49:51 stackless-dev-stackless-c856cc204b1c/.hg_archival.txt | |
│ │ --rw-r--r-- 0/0 584 2014-07-28 10:49:51 stackless-dev-stackless-c856cc204b1c/.bzrignore | |
│ │ --rw-r--r-- 0/0 891 2014-07-28 10:49:51 stackless-dev-stackless-c856cc204b1c/.gitignore |
This file contains 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
[dario@archvm ~]$ python | |
Python 3.5.1 (default, Dec 7 2015, 12:58:09) | |
[GCC 5.2.0] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> 2+2 | |
4 | |
>>> | |
[dario@archvm ~]$ env PYTHONSTARTUP=a.py python | |
Python 3.5.1 (default, Dec 7 2015, 12:58:09) | |
[GCC 5.2.0] on linux |
This file contains 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
: gcd ( a b -- c ) over zero? [ nip ] [ over mod swap gcd ] if ; |
This file contains 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
(XEN) Xen version 4.5.1 (Ubuntu 4.5.1-0ubuntu1.1) (stefan.bader@canonical.com) (gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010) debug=n Fri Nov 6 22:29:21 UTC 2015 | |
(XEN) Bootloader: GRUB 2.02~beta2-29 | |
(XEN) Command line: placeholder no-real-mode edd=off pci=biosirq | |
(XEN) Video information: | |
(XEN) VGA is text mode 80x25, font 8x16 | |
(XEN) Disc information: | |
(XEN) Found 0 MBR signatures | |
(XEN) Found 0 EDD information structures | |
(XEN) Multiboot-e820 RAM map: | |
(XEN) 0000000000000000 - 0000000000058000 (usable) |