Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6e6dcaf

Browse files
committedOct 2, 2014
Adding coffeescript, rebol, rust implementations
1 parent b3b290b commit 6e6dcaf

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed
 

‎README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This ASCII representation is a cartoon mascot at [Cerner Engineering](http://eng
4141
### Languages
4242
* [bash](https://www.gnu.org/software/bash/manual/) - [art.sh](bash/art.sh) (`bash art.sh`)
4343
* [clojure](http://clojure.org/) - [art.clj](clojure/art.clj) (`java -cp clojure.jar clojure.main art.clj`)
44+
* [coffeescript](http://coffeescript.org/) - [art.coffee](coffeescript/art.coffee) (`coffee art.coffee`)
4445
* [d](http://dlang.org/) - [art.d](d/art.d) (`rdmd art.d`)
4546
* [dart](https://www.dartlang.org/) - [art.dart](dart/art.dart) (`dart art.dart`)
4647
* [elixir](http://elixir-lang.org/) - [art.exs](elixir/art.exs) (`elixir art.exs`)
@@ -55,4 +56,6 @@ This ASCII representation is a cartoon mascot at [Cerner Engineering](http://eng
5556
* [node.js](http://nodejs.org/) - [art.js](node/art.js) (`node art.js`)
5657
* [python](https://docs.python.org/3/) - [art.py](python/art.py) (`python art.py`)
5758
* [r](http://www.r-project.org/) - [art.r](r/art.r) (`Rscript art.r`)
58-
* [ruby](https://www.ruby-lang.org/en/) - [art.rb](ruby/art.rb) (`ruby art.rb`)
59+
* [rebol](http://www.rebol.com/) - [art.r](rebol/art.r) (`rebol art.r`)
60+
* [ruby](https://www.ruby-lang.org/en/) - [art.rb](ruby/art.rb) (`ruby art.rb`)
61+
* [rust](http://www.rust-lang.org/) - [art.rs](rust/art.rs) (`rustc art.rs && ./art`)

‎coffeescript/art.coffee

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# "2 to the 5th" programming competition @ engineering.cerner.com
2+
#
3+
# Read in the ASCII art file and simply print it to the console.
4+
# Note: This assumes you are executing "coffee art.coffee" in the current
5+
# working directory.
6+
#
7+
# Reference: http://stackoverflow.com/questions/16387192/read-file-to-string-with-coffeescript-and-node-js
8+
#
9+
fs = require 'fs'
10+
console.log fs.readFileSync '../art/alan.txt', 'utf8'

‎rebol/art.r

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; "2 to the 5th" programming competition @ engineering.cerner.com
2+
;
3+
; Read in the ASCII art file and simply print it to the console.
4+
; Note: This assumes you are executing "rebol art.r" in the current
5+
; working directory.
6+
print read/string %../art/alan.txt

‎rust/art.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::io::File;
2+
3+
// "2 to the 5th" programming competition @ engineering.cerner.com
4+
//
5+
// Read in the ASCII art file and simply print it to the console.
6+
// Note: This assumes you are executing "rustc art.rs && ./art" in
7+
// the current working directory.
8+
//
9+
// Reference: http://doc.rust-lang.org/std/io/
10+
//
11+
fn main() {
12+
let filepath = Path::new("../art/alan.txt");
13+
let contents = File::open(&filepath).read_to_string();
14+
println!("{}", contents);
15+
}

0 commit comments

Comments
 (0)
Please sign in to comment.