I hereby claim:
- I am cronin101 on github.
- I am cronin (https://keybase.io/cronin) on keybase.
- I have a public key whose fingerprint is F8EA 6307 E547 60ED 92D9 3DCF 0E15 CCA2 087A 76E1
To claim this, I am signing this object:
| require './data_source' | |
| require './stream_observer' | |
| require './streaming_app' | |
| source = DataSource.new | |
| app = StreamingApp.new | |
| app.settings.set :stream_observer_factory, | |
| -> type { StreamObserver.new(source, type) } |
| import Control.Arrow | |
| import Control.Monad | |
| nToFishBuush :: (Show a, Integral a) => a -> String | |
| nToFishBuush n = case ((`rem` 3) &&& (`rem` 5)) n of | |
| (0, 0) -> "FISSSSSHBUSSSHH!" | |
| (0, _) -> "fissshhhhhh" | |
| (_, 0) -> "bUUUUUsh" | |
| _ -> show n |
| module RPN where | |
| import Data.List | |
| calc :: (Read a, Fractional a) => String -> a | |
| calc = head . foldl processToken [] . words | |
| where | |
| processToken stack@(x:x':xs) token = case token of "/" -> (x' / x):xs | |
| "*" -> (x' * x):xs | |
| "+" -> (x' + x):xs | |
| "-" -> (x' - x):xs |
| require 'engtagger' | |
| # Normalises a line from an ingredient list | |
| module IngredientParser | |
| module_function | |
| def parse(line) | |
| tagger = EngTagger.new | |
| tagged = tagger.add_tags(line) |
| (* Problem 1: The last element of a list *) | |
| let problem_one = | |
| let rec last = function | |
| | head :: [] -> head | |
| | head :: tail -> last tail | |
| | _ -> failwith "Empty List" | |
| last;; | |
| assert ((problem_one [1]) = 1 );; | |
| assert ((problem_one [1..10]) = 10);; |
I hereby claim:
To claim this, I am signing this object:
##Initiating a RubiCL computation pipeline To start a pipeline, annotate the dataset with the corresponding C-type. This is done using the square bracket notation shown below. All questions in the evaluation will use integers.
# Array support
big_array_of_numbers = [1, 2, 3, 4]
big_array_of_numbers[Int].further.method.calls.go.here| Hadope | |
| Showcasing features | |
| can complete an Integer pipeline computation | |
| can complete a Double pipeline computation | |
| returns the correct result | |
| can #zip and #braid | |
| Top level namespace | |
| is defined | |
| Devices |
| main ⭔ (1..100)[Int].map { |x| x + 10 }.map { |y| y * y}.filter { |x| x.even? }.filter { |y| y < 200 }[Fixnum] | |
| #[2014-03-23 14:44:27 +0000] Simplify!: Simplified from [["x = x >> 1", "x = x + 10", "x = x * x"], ["x = x + 10"], ["x = x * x"], ["((x % 2 == 0)) && (x < 200)"], ["x < 200"], ["x = (x << 1) | 0x01"]], to [["x = x >> 1", "x = x + 10", "x = x * x", "?{((x % 2 == 0)) && (x < 200)}?", "x = (x << 1) | 0x01"]]. | |
| #[2014-03-23 14:44:27 +0000] Executing filter kernel: | |
| # __kernel void hadopemappingfilter7(__global int *data_array, __global int *presence_array) { | |
| # int x; | |
| # int global_id = get_global_id(0); | |
| # x = data_array[global_id]; | |
| # | |
| # x = x >> 1; | |
| # x = x + 10; |