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
(ns tutorial.scrape1 | |
(:require [net.cgrand.enlive-html :as html])) | |
(def *url* "http://www.belex.rs/trgovanje/prospekt/VZAS/show") | |
(defn get-page | |
"Gets the html page from passed url" | |
[url] | |
(html/html-resource (java.net.URL. url))) | |
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
module Main | |
ex1 : IO () | |
ex1 = do | |
let s = "Hello, " | |
putStrLn $ s ++ ", world!" | |
main : IO () | |
main = do | |
putStrLn "Hello, " |
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
module Main | |
%default total | |
data Format = End | |
| FInt Nat Format | |
| FStr Nat Format | |
| FChar Char Format | |
data Digit : Char -> Type where |
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
data Lit = Lit Int | |
data Add l r = Add l r | |
class Eval x where | |
eval :: x -> Int | |
instance Eval Lit where | |
eval (Lit x) = x | |
instance (Eval l, Eval r) => Eval (Add l r) where |
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
pkgs : { | |
allowUnfree = true; | |
packageOverrides = self : rec { | |
oraclejdk7 = self.callPackage ./oraclejdk/jdk7-linux.nix { installjdk = 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
module Main where | |
main :: IO () | |
main = putStrLn "Hello, world!" |
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
# Set the variable NIX_PATH to point to the directory where you've cloned the | |
# nixpkgs repository. Then you can run one of two commands: | |
# | |
# nix-build -A crashEnv | |
# | |
# This puts a script called 'load-env-crashEnv' into ./result/bin. Running | |
# that script puts you into a shell where you can use all of the crash-related | |
# binaries. | |
# | |
# nix-shell -A crash.safeIsa |
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
/// <reference path="react-0.13.0.d.ts"/> | |
import React = require('react'); | |
var RD = React.DOM; | |
enum ElementType { A, B, C } | |
interface NameTypeI {name: string; type: ElementType;} | |
interface CallbackI { newNode: (x: NameTypeI) => void; } | |
class NewNode extends React.Component<CallbackI,{},{}> { | |
constructor(props: CallbackI, context: {}) { |
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
with import <nixpkgs> {}; | |
let wlc = import ./wlc.nix pkgs; | |
in | |
stdenv.mkDerivation { | |
name = "swaywm-0.1"; | |
src = fetchgit { | |
url = https://github.com/SirCmpwn/sway.git; | |
rev = "adf5b8fed70b3b61e67f16c3bec4a9b25d8ec831"; |