Skip to content

Instantly share code, notes, and snippets.

View TheThirdOne's full-sized avatar

Benjamin Landers TheThirdOne

  • Los Angeles, California
View GitHub Profile

GSOC 2018 - Benjamin Landers

The first subpart of my GSOC 2018 project was working on feature to rotate models based by selecting a face. After working on it for while, it, was merged into master. Unfortunately, a few bugs crept through, but were quickly caught by the community and then fixed.

After that I attempted and failed to solve some minor bugs (one of which I encountered earlier in the summer).

Then I moved on to the next large subpart of the summer, working on porting the 3d views from Perl to C++. While I made good progress on the 3D plater, there are still a few things that are a few i

impl Parsable for Move {
fn parse(iter:&mut Peekable<Chars>) -> Result<Self,ParseError> {
Ok(match iter.next() {
Some('M') => {
let origin = Num::parse(iter)?;
let ship = Ship::parse(iter)?;
let destination = if iter.peek().map_or(false,|c|char::is_digit(*c,10)) {
Ok(Num::parse(iter)?)
}else{
Err(Ship::parse(iter)?)
macro_rules! string_equals {
($t:ty,$x:expr,$y:expr) => {
{
assert_eq!(format!("{}",$x),$y);
let result = <$t>::parse(&mut $y.chars().peekable());
match result {
Ok(z) => assert_eq!(z,$x),
Err(e) => {print!("Failed to parse \"{}\" as {:?} with error message \"{}\"",$y,$x,e); assert!(false)},
}
}
function compute1(x){
if(x==0)return x;
if(x > 0)return 2*x-1;
if(x < 0)return -2*x;
}
function compute2(x,y){
let xbar = compute1(x);
let ybar = compute1(y);
let z = xbar+ybar;
class Test {
public static void main(String[] args){
int[][] test = new int[34][];
test[0] = new int[3];
test[0][1] = 1;
test[1] = new int[3];
test[2] = new int[3];
test[3] = new int[3];
System.out.println(log(test));
}