(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This archive contains the following programs: | |
bfc The compiler for the 'brainfuck' language (240 bytes!) | |
bfc.asm Source for the compiler | |
bfi The interpreter for the 'brainfuck' language | |
bfi.c Source for the interpreter (portable) | |
src/ Some example programs in 'brainfuck' | |
src/atoi.b Reads a number from stdin | |
src/div10.b Divides the number under the pointer by 10 | |
src/hello.b The ubiquitous "Hello World!" |
// Draw a sine curve with a fill | |
let centerY = frame.height / 2 // find the vertical center | |
let steps = 200 // Divide the curve into steps | |
let stepX = frame.width / CGFloat(steps) // find the horizontal step distance | |
// Make a path | |
let path = UIBezierPath() | |
path.moveToPoint(CGPoint(x: 0, y: centerY)) | |
// Loop and draw steps in straingt line segments |
use std::io::stdin; | |
fn main() { | |
let mut line = String::new(); | |
loop { | |
let n_read = stdin().read_line(&mut line).unwrap(); | |
println!("n_read: {}", n_read); |