Codes from 'src/libstd/bitv.rs' in Rust compiler git repo.
Key:
// NOTE cannot use bitv[offset] until snapshot
bitv.index(&offset) as u8 << (7 - bit)
So it seems Index<A,B>
currently can't support bitv[T]
?
trait Printable | |
{ | |
fn print(&self); | |
} | |
impl Printable for int | |
{ | |
fn print(&self) { io::println(fmt!("Trait Print: %d", *self)) } | |
} |
as I read, the `'b` seems named lifetime.. | |
17:10 snowmantw but I just can't figure it out... | |
17:10 Yurume snowmantw: `pcs[0]` syntax is directly connected to `core:ps::Index` trait. | |
17:10 Heather jdm it's sad | |
17:10 Yurume so you need `S:Seq<T>+Index` for using `pcs[0]` | |
17:10 Heather jdm so I can't get it on windows anyhow? | |
17:10 jdm Heather: sorry. we're a very small team with limited resources at the moment. | |
17:11 snowmantw #Yurume I saw it used as Copy in http://static.rust-lang.org/doc/tutorial.html | |
17:11 Heather maybe cygwin | |
17:11 jdm Heather: if you want to try to get the windows port working, we would accept pull requests. |
Codes from 'src/libstd/bitv.rs' in Rust compiler git repo.
Key:
// NOTE cannot use bitv[offset] until snapshot
bitv.index(&offset) as u8 << (7 - bit)
So it seems Index<A,B>
currently can't support bitv[T]
?
function main() | |
{ | |
(input | |
(foo | |
(bar | |
("some_setting", 3.14, | |
output)))) | |
} | |
function foo(cb) |
var http = require("http") | |
function mkAction(url, cb) | |
{ | |
return function() | |
{ | |
http.get(url, function(res) { | |
res.on("data", function(chunk) { | |
cb(chunk) |
function r() | |
{ | |
var _r = function(){} | |
_r.result = 0 | |
_r.done = function() | |
{ | |
return _r.result | |
} | |
_r.call = function() | |
{ |
#!/bin/bash | |
TPATH=$1 | |
URL_UNDERSCORE="http://underscorejs.org/underscore-min.js" | |
URL_JQUERY="http://code.jquery.com/jquery-2.0.2.min.js" | |
GURL_FLUORINE="git://github.com/snowmantw/Fluorine.git" | |
PORT="8090" | |
echo "Start to creat site: $TPATH" |
[:program, [:modules, [:list, [:module, [:name, :main], [:list], [:list, [:fn, [:name, :main], [:list], [:stmts, [:stmts, [:stmts, [:stmts, [:stmts, [:stmts, [:noop], [:write, :SMC_PRIVATE_A, [:str, "How much money do you have?\n"]]], [:write, :SMC_PRIVATE_B, [:str, "How much money do you have?\n"]]], [:read, [:idrefer, [:name, :asset_a], [:list]]]], [:read, [:idrefer, [:name, :asset_b], [:list]]]], [:asn, [:id, [:name, :empty], [:accessor]], [:call, [:id, [:name, :empty_fn], [:accessor, [:id, [:name, :main], [:accessor]]]], [:list, [:id, [:name, :empty], [:accessor]]]]]], [:return, [:call, [:id, [:name, :compare], [:accessor, [:id, [:name, :main], [:accessor]]]], [:list, [:id, [:name, :asset_a], [:accessor]], [:id, [:name, :asset_b], [:accessor]]]]]], [:list, [:return, [:call, [:id, [:name, :compare], [:accessor, [:id, [:name, :main], [:accessor]]]], [:list, [:id, [:name, :asset_a], [:accessor]], [:id, [:name, :asset_b], [:accessor]]]]]], [:sig, [:id, [:name, :main], [:accessor]], [:list, [:sigdecl, :SMC_SHA |