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
{- | |
Dear reader, | |
This is an attempt to de-mystify how Control.Monad.State.get seems to | |
magically create a State out of nothing. | |
Here's an example taken from the documentation: | |
tick :: State Int Int | |
tick = do |
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
Sooo, what is happening here? | |
[error] error while loading Diff, class file needed by Diff is missing. | |
[error] reference type Serializable of package scala refers to nonexisting symbol. | |
[error] class file needed by Diff is missing. | |
[error] reference type Serializable of package scala refers to nonexisting symbol. | |
[error] two errors found | |
[debug] Compilation failed (CompilerInterface) | |
Compilation failed | |
at xsbt.CompilerInterface.run(CompilerInterface.scala:93) |
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
/* | |
I want to use a higher-rank polymorphic function when transforming an AST to generalize the | |
'traversal' so it can be separated from the actual transformation of each node. | |
This snippet of code doesn't quite capture my use case but it provokes the same compile error | |
as I get here: https://gist.github.com/1139579 | |
*/ | |
trait ~>[F[_],G[_], -UpperBound] { | |
def apply[A <: UpperBound](a: F[A]): G[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
#!/bin/sh | |
exec scala "$0" "$@" | |
!# | |
/* | |
Subset of our Simple Java AST | |
*/ | |
sealed abstract class SJStatement | |
case class SJAssert (assertion : SJExpression) extends SJStatement |
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
(root source.scala | |
(include @storage-modifiers) | |
(include @keywords) | |
(include @declarations) | |
(include @inheritance) | |
(include @imports) | |
(include @comments) | |
(include @block-comments) | |
(include @strings) | |
(include @initialization) |
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
package org.lifty.engine | |
import java.io.File | |
import org.lifty.engine._ | |
import scalaz._ | |
import Scalaz._ | |
/* This class is just used for debugging purposes */ | |
object Main { |
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
@heiflo: Deep Mix Moscow Radio www.deepmix.eu | |
@behaghel: JJ Cale | |
@franztaptanium: Steps from Hell | |
@peyloW: Deine Lakaien, Raubtier, Timoteij, VNV Nation, Dragon Force | |
@TwistedChaz: Portico Quartet - Knee-Deep in the North Sea (Album) | |
@ArmyOfBruce: Orbital | |
@tylerweir: di.fm |
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
__________________________________________________ | |
Project definition: | |
__________________________________________________ | |
version := "0.7" | |
resolvers += "Scala Tools Releases" at "http://scala-tools.org/repo-releases/" | |
libraryDependencies += "org.scalatest" % "scalatest" % "1.3" % "test" |
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
// Attempt to do tail-recursion in JavaScript without getting a stack-overflow exception. | |
// This is horribly slow because of all of the extra stack frames pr. thunk. | |
// What would you call this? Lazy-tail-recursion? | |
var tailrec = function(f) { | |
for(var x = f() ; typeof x == "function" ; x = x()){} | |
return x; | |
}; | |
var counter = function(){ |
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
Jun 8 08:21:15 localhost Unknown[305]: Launching the Language Chooser for an OS Install | |
Jun 8 08:21:24 localhost configd[102]: bootp_session_transmit: bpf_write(en1) failed: Network is down (50) | |
Jun 8 08:21:24 localhost configd[102]: DHCP en1: INIT transmit failed | |
Jun 8 08:21:24 localhost LCA[306]: Bookmark failed to issue extension for item (depth=4000): No such file or directory | |
Jun 8 08:21:28 localhost LCA[306]: Using keyboard layout 9 | |
Jun 8 08:21:28 localhost Unknown[307]: Keyboard Layouts: duplicate keyboard layout identifier -16899. | |
Jun 8 08:21:28 localhost Unknown[307]: Keyboard Layouts: keyboard layout identifier -16899 has been replaced with -28673. | |
Jun 8 08:21:28 localhost Unknown[307]: Keyboard Layouts: duplicate keyboard layout identifier -16900. | |
Jun 8 08:21:28 localhost Unknown[307]: Keyboard Layouts: keyboard layout identifier -16900 has been replaced with -28674. | |
Jun 8 08:21:28 localhost LCA[306]: Found primary language hint "en" |