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
| import Control.Monad | |
| import qualified Data.IntMap as IM | |
| import qualified Data.List as L | |
| import Data.Maybe | |
| import Data.Text | |
| import qualified Data.Text.IO as TIO | |
| import Data.Text.Read | |
| import System.Exit | |
| main = forever $ do |
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
| CC := clang | |
| TARGET := game | |
| AL_CFLAGS := -Ilib/allegro/include | |
| AL_LDFLAGS := -Llib/allegro/lib | |
| GLIB_CFLAGS := -Ilib/glib -Ilib/glib/glib | |
| GLIB_LDFLAGS := -Llib/glib/glib/.libs | |
| CFLAGS := -g -Wall $(AL_CFLAGS) $(GLIB_CFLAGS) | |
| LDFLAGS := $(AL_LDFLAGS) $(GLIB_LDFLAGS) |
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
| #include <allegro5/allegro.h> | |
| #include <glib.h> | |
| #include <stdio.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| uint32_t al_version = al_get_allegro_version(); | |
| int al_major_version = al_version >> 24; | |
| int al_minor_version = (al_version >> 16) & 255; | |
| int al_revision = (al_version >> 8) & 255; |
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
| -- Given a File object, recursively discover all of its non-directory children | |
| listFiles :: (FileClass f) => f -> IO ([File]) | |
| listFiles f | |
| -- this file doesn't exist | |
| | fileQueryExists f Nothing == False = return ([]) | |
| -- this file isn't a directory | |
| | fileQueryFileType f [FileQueryInfoNone] Nothing /= FileTypeDirectory = return ([]) | |
| -- otherwise, create the enumerator and start looping |
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
| function! SearchHoogle(q) | |
| call system('firefox "http://www.haskell.org/hoogle/?hoogle='.a:q.'" &') | |
| endfunction | |
| command! -nargs=1 Hoogle call SearchHoogle('<args>') | |
| if has("autocmd") | |
| au filetype haskell nmap K :call SearchHoogle(expand('<cword>'))<cr> | |
| endif |
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
| Waf: Entering directory `/home/damien/workspace/github/gogobject/build' | |
| [ 1/184] cgo: cairo-1.0/cairo.go -> build/_cgoobj.1/_cgo_defun.c build/_cgoobj.1/_cgo_export.c build/_cgoobj.1/_cgo_export.h build/_cgoobj.1/_cgo_gotypes.go build/_cgoobj.1/_cgo_main.c build/_cgoobj.1/.._cairo-1.0_cairo.cgo1.go build/_cgoobj.1/.._cairo-1.0_cairo.cgo2.c | |
| [ 2/184] plan9c: build/_cgoobj.1/_cgo_defun.c -> build/_cgoobj.1/_cgo_defun.6 | |
| [ 3/184] cgo: gi/gi.go -> build/_cgoobj.2/_cgo_defun.c build/_cgoobj.2/_cgo_export.c build/_cgoobj.2/_cgo_export.h build/_cgoobj.2/_cgo_gotypes.go build/_cgoobj.2/_cgo_main.c build/_cgoobj.2/.._gi_gi.cgo1.go build/_cgoobj.2/.._gi_gi.cgo2.c | |
| [ 4/184] plan9c: build/_cgoobj.2/_cgo_defun.c -> build/_cgoobj.2/_cgo_defun.6 | |
| [ 5/184] go: build/_cgoobj.2/_cgo_gotypes.go build/_cgoobj.2/.._gi_gi.cgo1.go -> build/gobject/gi.6 | |
| [ 6/184] go: gogtk-demo/common.go -> build/gogtk-demo/common.6 | |
| [ 7/184] c: build/_cgoobj.1/_cgo_main.c -> build/_cgoobj.1/_cgo_main.c.26.o | |
| [ 8/184] c: build/_cgoobj.1/_cgo_export |
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
| /* | |
| * This is an example Linux daemon that communicates via dbus. | |
| * When run, it will daemonize and print to standard output two lines: | |
| * | |
| * 1. The PID of the daemon process, which can be used to kill it later with `kill -s SIGINT <pid>' | |
| * 2. The unique D-Bus address it will be listening to | |
| */ | |
| #include <signal.h> | |
| #include <stdio.h> |
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 solution to www.rubyquiz.com/quiz1.html | |
| module Solitaire where | |
| import Data.Char (isAlpha, isSpace, toUpper, ord, chr) | |
| import Data.List (unfoldr, elemIndex, dropWhileEnd) | |
| import Data.Maybe (catMaybes) | |
| data Suit = Clubs | |
| | Diamonds |
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
| module Main where | |
| import Control.Monad | |
| import Data.List (find) | |
| import Data.Maybe | |
| import Network.HTTP | |
| import System.Exit | |
| import System.IO | |
| import Text.XML.Light |
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
| module Main where | |
| import qualified Codec.Binary.UTF8.String as UTF | |
| import Control.Monad | |
| import Data.ByteString (ByteString) | |
| import Data.List (find) | |
| import Data.Maybe | |
| import Data.Text.Encoding | |
| import Network.HTTP | |
| import Network.URI (parseURI, URI) |