- Nato a Milano il 22 Ottobre 1970
- 1989: Maturità scientifica presso il Liceo G.B. Vico
- 1990-1992: Studi presso il politecnico di Milano, ingegneria nucleare. Analisi I , II, Fisica I , II, Geometria e Programmazione Calcolatori.
- 1992-1997: Viaggi in Europa inframezzati da studi presso la facoltà di Fisica di Bologna e sviluppo di programmi di calcolo numerico in C, C++ e Java.
- 1998: Trasferimento in montagna e inizio della attività contadina.
- 2001: Sviluppo di applicazioni in Python per lo scheduling delle risorse all'interno delle fabbriche metalmeccaniche.
- 2003: Calcolo dello sviluppo dello specchio parabolico riflettore per l'illuminazione del cavo orale.
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.Concurrent | |
import Control.Concurrent.STM | |
main = do | |
c <- atomically $ newTChan :: IO (TChan ()) | |
r <- atomically $ newTVar False | |
forkIO $ do | |
atomically $ do | |
r0 <- readTVar r | |
case r0 of |
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 | |
import Data.List | |
type Count = Int | |
data Jolly a = None | Given a | Internal (a -> Bool) | Placed Int a | |
pick :: Eq a => (a -> Bool) -> [a] -> StateT (Int, Jolly a) [] [a] | |
pick k cs = do | |
(i, mj) <- get | |
let more = case mj of |
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
{-# LANGUAGE ExistentialQuantification #-} | |
-- hacked from roberto tazzoli experiment -- | |
module Svg (renderSvg) where | |
import Data.List (intercalate) | |
import System.Random (randomRIO) | |
import Control.Monad (liftM2, replicateM) | |
data EBox = forall a . Show a => E String a |
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 Prelude hiding (reverse) | |
import Control.Arrow (first) | |
import Data.Set (Set) | |
import qualified Data.Set as S | |
import Data.Monoid (Monoid, mappend, mempty) | |
import Hakyll.Core.DirectedGraph | |
-- | This data structure represents the state of the dependency analyzer. It | |
-- holds a complete graph in 'analyzerGraph', which always contains all items, |
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 Dependencies (Analyzer (..), mkAnalyzer, News, Build, Graph) where | |
import Data.Set (Set) | |
import qualified Data.Set as S | |
import qualified Data.Map as M | |
import Control.Arrow ((&&&)) | |
import Control.Applicative ((<$>)) | |
import Data.Monoid (Monoid, mappend, mempty) | |
import DirectedGraph |
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
-- | Pure item Selector | |
type Mask a = a -> Bool | |
-- | Build record, containing an action to build an item, and the dependencies. | |
-- | |
-- The return value of the action computed in its monad is a set of created resources, | |
-- along with their compiler. | |
-- |
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 Manager where | |
-- | Yielded values from a manager. The constructor tagging mark the item for the client to act accordingly | |
data Yield a | |
= Uptodate a -- ^ this item is uptodate | |
| Unlink a -- ^ this item must be eliminated | |
| Build a -- ^ this item must be built | |
| Empty -- ^ the manager has no item to manage | |
-- | Create method. Index and value associated is given along dependency logic and existential dependency, if present. |
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 | |
import Control.Applicative | |
checkProperty = undefined | |
getDmgMult t elem = maybe 1 id $ do | |
e <- elem | |
let check f = checkProperty t ((==e) . f) >>= guard | |
(check succ >> return 2) `mplus` (check pred >> return 0.5) |
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 System.Exit ( exitWith, ExitCode(ExitSuccess) ) | |
import Graphics.UI.GLUT | |
import Foreign.Marshal.Array | |
myInit :: IO () | |
myInit = do | |
clearColor $= Color4 0 0 0 0 | |
display :: DisplayCallback | |
display = do |
OlderNewer