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
# DYLD_LIBRARY_PATH library variables break linking of standard system libraries by forcing dyld to ignore | |
# everything but the library's basename when performing what would otherwise be successful library | |
# resolution. | |
mkdir rust-lib | |
echo 'void my_libjpeg_api (void) { }' | clang -dynamiclib -x objective-c -o rust-lib/libjpeg.dylib - | |
echo 'extern void my_libjpeg_api(void); int main (int argc, char *argv[]) { my_libjpeg_api(); return 0; }' | clang -x objective-c -o example - -framework ImageIO -Lrust-lib -ljpeg | |
env DYLD_LIBRARY_PATH=`pwd`/rust-lib ./example | |
#dyld: Library not loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib | |
# Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO |
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 p { | |
object Test { | |
import construction.Monadic | |
import execution.Bimonad | |
def main(args: Array[String]): Unit = { | |
val expression = Monadic[List](10) flatMap (1 to _ toList) coflatMap (_.sum) |
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 proxy | |
import language.dynamics | |
abstract class Param[T] { type Type } | |
object Param { | |
def apply[T](name: String) = new Param[name.type] { type Type = T } | |
} | |
class Proxy(underlying: Map[String, Any]) extends Dynamic { |
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
abstract class Foo { | |
trait BarT { this: Bar => def zomg: String } | |
type Bar <: BarT | |
def newBar: Bar | |
} | |
// Or not sealed if you reject axiom K? :) | |
sealed abstract class FooEqual[X <: Foo, Y <: Foo] { | |
val x: X |
NewerOlder