Works in:
bash
dash
zsh
- BusyBox's
sh
;; See Section 4 (Syntax): | |
;; | |
;; http://www.mcs.anl.gov/research/projects/AR/otter/otter33.pdf | |
(require 'generic-x) | |
(define-generic-mode | |
'otter-mode | |
;; comments start with '%' | |
'("%") |
# Base options | |
CFLAGS="-O2 -pipe" | |
CXXFLAGS="${CFLAGS}" | |
CHOST="x86_64-pc-linux-gnu" | |
MAKEOPTS="-j4" | |
# Live on the cutting (but not bleeding) edge | |
ACCEPT_KEYWORDS="~amd64" |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Control.Monad ( forM_ ) | |
import Data.Array.IO ( IOArray, newListArray, readArray, writeArray, getElems ) | |
import Data.List ( sort ) | |
import System.Random ( randomRIO ) | |
import Text.Interpol ( (^-^) ) |
Time is 0.00. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00, 0.00) | |
Time is 0.02. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00, -1.67) | |
Time is 0.03. ballBody is at ( 0.00, 14.97). It's velocity is ( 0.00, -3.33) | |
Time is 0.05. ballBody is at ( 0.00, 14.92). It's velocity is ( 0.00, -5.00) | |
Time is 0.07. ballBody is at ( 0.00, 14.83). It's velocity is ( 0.00, -6.67) | |
Time is 0.08. ballBody is at ( 0.00, 14.72). It's velocity is ( 0.00, -8.33) | |
Time is 0.10. ballBody is at ( 0.00, 14.58). It's velocity is ( 0.00, -10.00) | |
Time is 0.12. ballBody is at ( 0.00, 14.42). It's velocity is ( 0.00, -11.67) | |
Time is 0.13. ballBody is at ( 0.00, 14.22). It's velocity is ( 0.00, -13.33) | |
Time is 0.15. ballBody is at ( 0.00, 14.00). It's velocity is ( 0.00, -15.00) |
module LargePrime where | |
import Control.Parallel ( par, pseq ) | |
import GHC.Conc ( numCapabilities ) | |
import System.Environment ( getArgs ) | |
import System.Random ( newStdGen, randomRs ) | |
primes :: [Integer] | |
primes = 2 : filter (go primes) [3, 5..] | |
where |
-module(ql). | |
-compile(export_all). | |
run() -> | |
[begin | |
io:format("~p\t\t", [N]), | |
T = run(N), | |
io:format("~p~n", [T]) | |
end || N <- [10, 100, 1000, 10000, 50000, 100000]], | |
ok. |
-module(tc). | |
-compile([export_all]). | |
-include("include/amqp_client.hrl"). | |
run2() -> | |
%% Setup a connection with two channels and declare a queue | |
{ok, Connection} = amqp_connection:start(#'amqp_params_network'{}), | |
{ok, OtherChannel} = amqp_connection:open_channel(Connection), | |
%% Start a consumer in a separate thread that will exit(kaput) |
#!/bin/sh | |
if [ "$#" -eq "1" -a -d "$1" ]; then | |
ls $1 | |
else | |
/bin/cat $@ | |
fi |
// The contents of this file are subject to the Mozilla Public License | |
// Version 1.1 (the "License"); you may not use this file except in | |
// compliance with the License. You may obtain a copy of the License | |
// at http://www.mozilla.org/MPL/ | |
// | |
// Software distributed under the License is distributed on an "AS IS" | |
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | |
// the License for the specific language governing rights and | |
// limitations under the License. | |
// |