Add for(value <- items)
and for(value, offset <- items)
to Sweet.js
for(x <- [1,2,3,4]) {
var a = x + 10;
print(a);
}
application.js: application.coffee | |
coffee -c application.coffee | |
server: application.js | |
python -m SimpleHTTPServer 5050 | |
.PHONY: server |
mkdir -p /tmp/openssl-test | |
cd /tmp/openssl-test | |
date > test_file | |
openssl des3 -e -salt -in test_file -out test_file.des3 -k foo.bar.1 | |
echo test_file.des3: | |
hexdump -C test_file.des3 |
use std::sync::mpmc_bounded_queue::Queue; | |
use std::io::Timer; | |
use std::time::Duration; | |
fn main() { | |
let queue: Queue<i8> = Queue::with_capacity(10); | |
queue.push(0); | |
let q1 = queue.clone(); |
#![feature(globs)] | |
extern crate mio; | |
use mio::*; | |
use mio::net::*; | |
use mio::net::tcp::*; | |
const SERVER: Token = Token(0); | |
struct Server { |
extern crate time; | |
#[deriving(Show)] | |
struct XorshiftStar { | |
x: u64 | |
} | |
impl XorshiftStar { | |
fn new() -> XorshiftStar { | |
XorshiftStar { x: time::now().tm_nsec as u64 } |
use std::collections::HashMap; | |
use std::collections::hash_map::Entry; | |
fn main() { | |
let text = [ | |
"The", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog", | |
"at", "a", "restaurant", "near", "the", "lake", "of", "a", "new", "era" | |
]; | |
let mut map: HashMap<&str, u32> = HashMap::new(); |
#!/usr/bin/ruby | |
require "tmpdir" | |
def usage() | |
STDERR.puts <<EOU | |
Usage: #$0 input-file output-file ranges+ | |
Ranges can be defined with: |
Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.
In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
import play.api.libs.json._ | |
import spray.http._ | |
import MediaTypes._ | |
import spray.client.pipelining.Post | |
import spray.httpx.marshalling.Marshaller | |
case class Foo(a: Int, b: String) |