My Recent Pastes (244 and counting)

Pastes by Mietek Bąk (244 and counting)

Pages:

Below are the 15 most recent pasties by Mietek Bąk.

August 01, 2009
11:07AM EDT
by Mietek Bąk

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

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

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

#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

#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

{-# LANGUAGE EmptyDataDecls,
             Rank2Types,
             TypeFamilies,
             TypeOperators,
             ScopedTypeVariables,

July 15, 2009
1:23PM EDT
by Mietek Bąk

{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}

module Vector where


July 15, 2009
1:14PM EDT
by Mietek Bąk

{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}

module Vector where


July 15, 2009
11:25AM EDT
by Mietek Bąk

{-# 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

{-# 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

{-# 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

{-# LANGUAGE NoImplicitPrelude #-}

module Scalar where

import qualified Prelude as P

June 25, 2009
9:05PM EDT
by Mietek Bąk

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

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

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

#define SDEFINE(TYPE) \

Next page