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
| ;; knowledge representation, syllogism via knowledge base | |
| (defrecord Triple [subject predicate object]) | |
| (def knowledge-base | |
| [(Triple. :Socrates :is-a :Greek) | |
| (Triple. :Greek :is-a :human-being) | |
| (Triple. :human-being :has-property :mortal)]) | |
| (defn collect-predicate-along-axis [kb subject predicate axis] |
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
| type Name = { | |
| first: ~str, | |
| last: ~str | |
| } | |
| type Shape = Circle(int) | Rect(int, int) // Variants with constructors | |
| type Direction = North | South | East | West // without constructors | |
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
| 13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| | FUCKIN PUSSIES | |
| 13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
| 13:16 <luite> | hello | |
| 13:16 <ChongLi> | somebody has a mental illness! | |
| 13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| | compelled to write Node.js! | |
| 13:16 <genisage> | hi | |
| 13:16 <luite> | you might be pleased to learn that you can compile | |
| | haskell to javascript now |
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
| pub trait BaseVec: Index<uint,Self::T> | |
| + Eq { | |
| type T; | |
| static LEN: uint; | |
| fn from_value(value: Self::T) -> Self; | |
| } | |
| pub trait BaseVec3: BaseVec { | |
| fn new(x: Self::T, y: Self::T, z: Self::T) -> Self; | |
| } |
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 | |
| ;; | |
| ;; Run-of-the mill metacircular evaluator for (a small subset of) scheme. | |
| ;; Includes delimited continuations, and the tower of (positive) meta-levels. | |
| ;; | |
| (struct closure [vars body environment]) | |
| (struct primitive [procedure]) |
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
| { | |
| {I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It | |
| is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as | |
| you did, the {internet|net|web} will be {much more|a lot more} | |
| useful than ever before.| | |
| I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!| | |
| {I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} | |
| your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? | |
| {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. | |
| Thanks.| |
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
| fn libc_rsqrt(f: &f32) -> f32 { | |
| 1.0/f32::sqrt(*f) | |
| } | |
| fn llvm_rsqrt(f: &f32) -> f32 { | |
| 1.0/core::unstable::intrinsics::sqrtf32(*f) | |
| } | |
| fn asm_rsqrt(f: &f32) -> f32 { | |
| let mut b = &0.0f32; | |
| unsafe { | |
| asm!("rsqrtss ($0), %xmm0\n\t\ |
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
| extern mod extra; | |
| use extra::json::*; | |
| /* | |
| * This function manages to do absolutely no copying, which is pretty cool. | |
| * | |
| * "What are all those `'r`s?" you ask. Well, they're liftime parameters. They | |
| * indicate how long something lasts (before it's freed). They can't change how | |
| * long something lives for, they only allow you to tell the compiler stuff it |
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
| fn r̄ͬ̇ͦ̓u͗͗̅̐s̔̈́ͯ̄̓ͭ͋tͣͯͦ̂̃̆̓_̍͌̉̃l̆a͐̾̿̋̈́n̉ͬͥ́ͪ̊gͭ͛̾_́cͪͬ͑͂̈oͭͨ̊̋̓ͧm̌̿̐̿ͤ̆͐e̔̓̆ͭͨ̾̚s() { | |
| println("ĭ̒̚tͧ̂͆ͫ̄ ̃ͬ͗̍̂c̈͒̊õ͑̓ͩͦ͒m̊͗̐̒esͩ͛!ͨ̀ͩ̀͆̄̚ ĭ̿̈̍̀ͮ͑tͦ͂̉̒̔̇ ̓co͛́̾ͤ̄̉͌m͂͆̀ͫe͛ͨ͌̇͆ͣͥs͂!̇̌̎̆"); | |
| } | |
| fn main() { | |
| r̄ͬ̇ͦ̓u͗͗̅̐s̔̈́ͯ̄̓ͭ͋tͣͯͦ̂̃̆̓_̍͌̉̃l̆a͐̾̿̋̈́n̉ͬͥ́ͪ̊gͭ͛̾_́cͪͬ͑͂̈oͭͨ̊̋̓ͧm̌̿̐̿ͤ̆͐e̔̓̆ͭͨ̾̚s(); | |
| } |
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
| pub struct Context { | |
| chan: SharedChan<Msg>, | |
| } | |
| enum Msg { | |
| CreateWindow(Context, uint, uint, ~str, WindowMode, Chan<Option<Window>>), | |
| DetachCurrentContext, | |
| // window messages | |
| GetShouldClose(*c_void, Chan<bool>), |