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 Graphics.UI.WX | |
main = start $ do | |
-- create widgets | |
f <- frame [ text := "Example" ] | |
b <- button f [ text := "Test" ] | |
e <- entry f [ text := "1" ] | |
status <- staticText f [ size := sz 40 20 ] | |
-- populate initial values |
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
{----------------------------------------------------------------------------- | |
Re: Reifying case expressions [on lists] | |
A version of ListTo that can handle lazy results. | |
See http://article.gmane.org/gmane.comp.lang.haskell.cafe/94953 | |
and follow-up discussion. | |
------------------------------------------------------------------------------} | |
{-# LANGUAGE GADTs #-} | |
module ListTo (ListTo, caseOf, interpret, idL, takeL, andL, testId, testTake, testAnd) where |
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
{----------------------------------------------------------------------------- | |
Re: Space-efficient, composable list transformers | |
A version of ListTo | |
that can handle lazy results and sequential compositon. | |
See http://article.gmane.org/gmane.comp.lang.haskell.cafe/95027 | |
and follow-up discussion. | |
------------------------------------------------------------------------------} | |
{-# LANGUAGE GADTs #-} |
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.Exception | |
import qualified Sound.SC3 as SC | |
-- Haskell version | |
incorrectPan = withSuperCollider $ do | |
SC.audition $ SC.out 0 $ | |
0.2* SC.balance2 (osc 220) (osc 220) mod (SC.constant 1) | |
getChar | |
where | |
osc freq = SC.sinOsc SC.AR (SC.constant freq) (SC.constant 0) |
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
<html> | |
<head> | |
<title>Test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" /></script> | |
<script type="text/javascript" charset="utf-8"> | |
// onLoad Handler | |
$(function () { | |
$('#form').submit( function() { | |
$.post('/submit', { x : $('#x').val() }, function (result) { | |
$('#x').val(result); |
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
peach:~ apfelmus$ haste-boot | |
Downloading base libs from ekblad.cc | |
Reading package info from stdin ... done. | |
Reading package info from stdin ... done. | |
Reading package info from stdin ... done. | |
Reading package info from stdin ... done. | |
Attempting to clone/update: git://github.com/valderman/fursuit.git | |
Cloning into fursuit... | |
remote: Counting objects: 134, done. | |
remote: Compressing objects: 100% (74/74), done. |
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
/* Eval | |
Evaluate the given thunk t into head normal form. | |
If the "thunk" we get isn't actually a thunk, just return it. | |
*/ | |
function E(t) { | |
if(t instanceof Thunk) { | |
if(t.f) { | |
t.x = t.f(); | |
t.f = 0; | |
} |
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
-- see also | |
-- http://apfelmus.nfshost.com/blog/2012/06/07-forklift.html | |
module ForkLift where | |
import Control.Concurrent | |
import Control.Monad | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.State |
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
-- debug log for querying http://localhost:100000/video.mp4 with Chrome | |
Listening on http://0.0.0.0:10000/ | |
Can't open log file "log/access.log". | |
Exception: log/access.log: openFile: does not exist (No such file or directory) | |
Logging to stderr instead. **THIS IS BAD, YOU OUGHT TO FIX THIS** | |
Can't open log file "log/error.log". | |
Exception: log/error.log: openFile: does not exist (No such file or directory) |
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 RecordWildCards #-} | |
import Data.Monoid | |
import Control.Monad | |
import qualified Graphics.UI.Threepenny as UI | |
import Graphics.UI.Threepenny | |
data Input = Input |
OlderNewer