My Recent Pastes (244 and counting)
Pastes by Mietek Bąk (244 and counting)
Below are the 15 most recent pasties by Mietek Bąk.
August 01, 2009
11:07AM EDT
by Mietek Bąk
View all 15 lines
make_can_name(ActionName) -> list_to_atom("can_" ++ atom_to_list(ActionName)). make_do_name(ActionName) -> list_to_atom("do_" ++ atom_to_list(ActionName)).
August 01, 2009
11:00AM EDT
by Mietek Bąk
View all 19 lines
secure_do(ActionName, ActionFun, Arg) -> case privilege:can_do(ActionName, Arg) of true -> ActionFun(Arg); false ->
August 01, 2009
10:59AM EDT
by Mietek Bąk
View all 19 lines
secure_do(ActionName, ActionFun, Arg) -> case privilege:can_do(ActionName, Arg) of true -> ActionFun(Arg); false ->
July 28, 2009
11:56AM EDT
by Mietek Bąk
View all 25 lines
#warning ad-hoc fixes for gcc 3.4.4 on solaris #undef HUGE_VAL #define HUGE_VAL __builtin_huge_val()
July 28, 2009
10:39AM EDT
by Mietek Bąk
View all 23 lines
#warning ad-hoc fixes for HUGE_VAL, isnan, isfinite, isnormal #undef HUGE_VAL #define HUGE_VAL (__builtin_huge_val())
July 25, 2009
5:11PM EDT
by Mietek Bąk
View all 47 lines
{-# LANGUAGE EmptyDataDecls,
Rank2Types,
TypeFamilies,
TypeOperators,
ScopedTypeVariables,
July 15, 2009
1:23PM EDT
by Mietek Bąk
View all 85 lines
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
module Vector where
July 15, 2009
1:14PM EDT
by Mietek Bąk
View all 82 lines
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
module Vector where
July 15, 2009
11:25AM EDT
by Mietek Bąk
View all 166 lines
{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses, NoImplicitPrelude, TypeSynonymInstances #-}
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
module VectorSimple ((*), (+), (-), (/), Polar2, Scalar, Vector2, Vector3, asPolar, fromInteger, fromPolar, negate, pi, toPolar, v2ang, v2mag, v3mag, vfold, vmap, vzip) where
July 15, 2009
11:21AM EDT
by Mietek Bąk
View all 133 lines
{-# LANGUAGE FlexibleInstances, FunctionalDependencies, IncoherentInstances, MultiParamTypeClasses, NoImplicitPrelude, OverlappingInstances, TypeSynonymInstances, UndecidableInstances #-}
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
module Vector where
July 15, 2009
10:59AM EDT
by Mietek Bąk
View all 136 lines
{-# LANGUAGE FlexibleInstances, FunctionalDependencies, IncoherentInstances, MultiParamTypeClasses, NoImplicitPrelude, OverlappingInstances, TypeSynonymInstances, UndecidableInstances #-}
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
module Vector ((*), (+), (-), (/), Polar2, Scalar, Vector2, Vector3, asPolar, fromInteger, fromPolar, negate, pi, toPolar, v2ang, vfold, vmag, vmap, vzip) where
July 14, 2009
5:35PM EDT
by Mietek Bąk
View all 10 lines
{-# LANGUAGE NoImplicitPrelude #-}
module Scalar where
import qualified Prelude as P
June 25, 2009
9:05PM EDT
by Mietek Bąk
View all 11 lines
Pid = case foo:lookup(Key) of none -> Pid = foo:spawn(Key), foo:insert(Key, Pid), Pid,
April 18, 2009
4:50PM EDT
by Mietek Bąk
View all 16 lines
route(FromServer, To, Packet) when is_list(FromServer) -> From = jlib:make_jid("", FromServer, ""), route(From, To, Packet); route({FromUser, FromServer}, To, Packet) -> From = jlib:make_jid(FromUser, FromServer, ""),
January 05, 2009
6:03AM EDT
by Mietek Bąk
View all 53 lines
#include <assert.h> #include <stdio.h> #include <stdlib.h> #define SDEFINE(TYPE) \
