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
Warning: pong.cabal: Unknown fields: exposed-modules (line 18) | |
Fields allowed in this section: | |
main-is, buildable, build-tools, cpp-options, cc-options, | |
ld-options, pkgconfig-depends, frameworks, c-sources, | |
default-language, other-languages, default-extensions, | |
other-extensions, extensions, extra-libraries, extra-lib-dirs, | |
includes, install-includes, include-dirs, hs-source-dirs, | |
other-modules, ghc-prof-options, ghc-shared-options, ghc-options, | |
hugs-options, nhc98-options, jhc-options | |
Resolving dependencies... |
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
" My config | |
set nu | |
syntax on | |
au BufNewFile,BufRead *.clj set filetype=lisp |
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
-- Attempt to implement monads | |
return' v = \_ -> v | |
lift a = a () | |
bind a f = f $ lift a | |
inc n = n + 1 |
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
#lang racket | |
(define config | |
(hash "server" "irc.codetalk.io" | |
"port" 6667 | |
"chan" "#lobby" | |
"nick" "tob" | |
"name" "tob the bot")) | |
(define (connect) |
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
#lang racket | |
(define config | |
(hash "server" "irc.codetalk.io" | |
"port" 6667 | |
"chan" "#lobby" | |
"nick" "tob" | |
"name" "tob the bot")) | |
(define (connect) |
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
(define (parse s) | |
(regexp-match #rx"^(?:[:](\S+) )?(\S+)(?: (?!:)(.+?))?(?: [:](.+))?$" s)) | |
; regexp code taken from here http://mybuddymichael.com/writings/a-regular-expression-for-irc-messages.html |
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
-- defines the fibonacci function, takes an integer and returns the fibonacci number | |
fib :: Int -> Int | |
fib n = if n <= 2 then | |
n | |
else fib (n - 1) + fib (n - 2) | |
-- define a infinit list of all fibonacci numbers | |
fibs :: [Int] | |
fibs = map fib [1..] |
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
fibs = scanl (+) 0 $ 1 : fibs | |
main = print $ fibs !! 10 |
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
15:41 -!- Irssi: Starting query in QuakeNet with Antibody | |
15:41 <machinexon> sry if you got offended on forums, DID NOT mean that i had the impression samual | |
wwas the only one contributing atm, i meant i got that impression from his post, | |
and regarding the polish and design of the game, i have said it before but i do | |
like xonstats, a lot, it's really a great example of what programs that really | |
fits for the web | |
15:41 <machinexon> also your commentaries means a *lot*, they make it easier for people to dive into | |
the game, and you always point out non-obvious tactics players use and give some | |
tips yourself etc. which is really good for beginners | |
15:46 <machinexon> plz just respond nodnod or sth so i know you have read this when you have read this |
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
#!/bin/sh | |
# apt-get remove sucks, apt-get purge is good, but then running autoremove afterwards is annoying ;) | |
for args in $*; | |
do sudo apt-get purge $args && sudo apt-get --purge autoremove; | |
done |