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
| package main | |
| import "fmt" | |
| type Register uint16 | |
| func (r Register) High() uint8 { | |
| return uint8(r >> 8) | |
| } |
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
| #![recursion_limit="579"] | |
| fn main() { | |
| let y = &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& | |
| &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |
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
| import random | |
| from allowed_blocks import * | |
| class Nucleotide(object): | |
| def __init__(self, value = None): | |
| if value is None: | |
| self.value = random.choice(allowed_blocks) | |
| elif type(value) is list: | |
| self.value = random.choice(value) |
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
| (ns cljbot.core | |
| (:require [clojure.string :as string] | |
| [irclj.core :as irc] | |
| [irclj.events :as events])) | |
| (def server "irc.openredstone.org") | |
| (def port 6667) | |
| (def channel "#openredstone") | |
| (def nick "tbot_4") | |
| (def real "The 4th tbot") |
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
| #include <stdio.h> | |
| #define string int | |
| #define begin { | |
| #define end } | |
| #define return(x) printf("%s", x); return 0; | |
| string main(int argc, char **argv) | |
| begin |
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
| module Lib where | |
| import Network | |
| import Data.List | |
| import System.IO | |
| import Control.Arrow | |
| import Control.Monad.Reader | |
| import Control.Exception | |
| import Text.Printf |
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
| package main | |
| import ( | |
| // "errors" | |
| "fmt" | |
| ) | |
| type Stack []int | |
| func (s *Stack) Put(elem int) { |
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
| trait AstElem[+T] { | |
| def eval(): T | |
| } | |
| class LispFunction[-T, +R](f: List[T] => R) { | |
| def apply(l: List[AstElem[T]]): R = { | |
| f(l.map(_.eval())) | |
| } | |
| } |
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
| import java.io.PrintWriter | |
| import java.net.{InetAddress, Socket} | |
| import scala.io.BufferedSource | |
| object Main { | |
| def main(args: Array[String]) = { | |
| val conn = new Socket( | |
| InetAddress.getByName("irc.openredstone.org"), | |
| 6667 |
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
| import java.net._ | |
| import java.io._ | |
| import scala.io._ | |
| class IRC(server: String, nick: String, user: String, channel: String) { | |
| val port = 6667 | |
| val host = InetAddress.getByName(server) | |
| val sock = new Socket(host, port) | |
| lazy val in = new BufferedSource(sock.getInputStream()) | |
| val out = new PrintStream(sock.getOutputStream()) |