This file contains hidden or 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
| # Update to 4.9 kernel do not delete the old kernel as it will be your failsafe if something happens to this one | |
| # Install KabyLake graphics patches | |
| cd /tmp; | |
| wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2; | |
| tar xjvf kbldmcver101.tar.bz2; cd kbl_dmc_ver1_01/; sudo ./install.sh | |
| cd /tmp; | |
| wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kblgucver914.tar.gz; | |
| tar xvzf kblgucver914.tar.gz; cd firmware/kbl/guc/kbl_guc_ver/; sudo ./install.sh |
This file contains hidden or 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
| Interpreting Free Monads of Functor Sums | |
| ======================================== | |
| This text deals with a way to compose certain kinds of monads, thereby mixing | |
| their capabilities. It is a literate Haskell file, so let's begin with a | |
| bunch of noise. | |
| > {-# LANGUAGE MultiParamTypeClasses #-} | |
| > {-# LANGUAGE FlexibleInstances #-} | |
| > {-# LANGUAGE FlexibleContexts #-} |
This file contains hidden or 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
| // Free monad based thread simulation and FRP constructs written in JavaScript | |
| // First, we need some way to express lazy values and actions. | |
| // We can use zero-argument functions for this purpose: call the function and | |
| // you get the value. We also need to compose lazy values/actions. For that | |
| // we have bindLazy function. Lazy values are not expected to be pure | |
| // in this program: evaluating a lazy value/action at different times can produce | |
| // a different value. |
This file contains hidden or 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
| Хм... Сложно согласиться с | |
| > в Haskell монады -- это способ записать _императивный_ код в полностью декларативном языке. | |
| Наверное если смотреть технически - то это верное высказывание. | |
| Но оно скрывает суть. Скрывает смысл "пользы от монад". | |
| Насколько я помню... | |
| Монады - они и в Африке монады. В независимости от того какой язык - чисто декларативный/функциональный или нет. |
This file contains hidden or 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
| lazy val scalaJson = ProjectRef(uri("git://github.com/mdedetrich/scala-json-ast.git#c5ee84"), "scalaJsonASTJVM") | |
| lazy val root = (project in file(".")). | |
| dependsOn(scalaJson). | |
| settings(inThisBuild(List( | |
| organization := "com.example", | |
| scalaVersion := "2.11.8" | |
| )), | |
| name := "sourceDeps" | |
| ) |
This file contains hidden or 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 MultiParamTypeClasses, FunctionalDependencies #-} | |
| import Control.Monad | |
| import Control.Monad.Free | |
| class (Functor f, Functor g, Functor h) => Compose f g h | f g -> h where | |
| compose :: f x -> g y -> Free h (Free f x, Free g y) | |
| compose f g = return (liftF f, liftF g) | |
| composeF :: Compose f g h => Free f x -> Free g x -> Free h x |
This file contains hidden or 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
| trait Module { | |
| type shape | |
| } |
This file contains hidden or 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 OverloadedStrings #-} | |
| module Main where | |
| import Control.Lens -- lens | |
| import Control.Monad.IO.Class -- transformers | |
| import Control.Monad.Trans.AWS -- amazonka | |
| import Network.AWS.EC2 -- amazonka-ec2 | |
| main :: IO () |
This file contains hidden or 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
| package com.vertigo.service.rest.search; | |
| import java.util.EnumSet; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.servlet.DefaultServlet; | |
| import org.eclipse.jetty.servlet.ServletContextHandler; | |
| import com.vertigo.service.rest.search.filter.GuiceFilter; | |
| import com.vertigo.service.rest.search.listener.GuiceServletContextListener; |
This file contains hidden or 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 GADTs #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE StandaloneDeriving #-} | |
| module RedBlackTree where | |
| data Zero | |
| data Succ n | |
| type One = Succ Zero | |
| data Black |