Very cool!

On Friday, May 15, 2015 at 4:39:40 PM UTC-4, Jeff Waller wrote:
>
> This version supports 0.4.x using svec as well as previous 0.4.x and of 
> course
> 0.3.x as well here's the docs <http://node-julia.readme.io/> if 
> interested.
>
> It's been a pretty long time + the svec change was breaking, so not all of 
> the
> feature requests made it in to this, like the cool one 
> <https://github.com/waTeim/node-julia/issues/4>, but that's next for sure.
>
> Various bug fixes.
>
> A couple new features features
>
> * supporting the result of julia import as an object similar to node.js 
> require Issue 6 <https://github.com/waTeim/node-julia/issues/6>
> * supporting struct types with Javascript accessor functions Issue 7 
> <https://github.com/waTeim/node-julia/issues/7>
>
> Allows for pretty cool syntax, i think (cut-n-pasted from docs)
>
> var julia = require('node-julia');
> var JuMP = julia.import('JuMP');
> var m = julia.eval('m = JuMP.Model()');
> var x = julia.eval('JuMP.@defVar(m,0 <= x <= 2)');
> var y = julia.eval('JuMP.@defVar(m,0 <= y <= 30)');
>
> julia.eval('JuMP.@setObjective(m,Max, 5x + 3*y)');
> julia.eval('JuMP.@addConstraint(m,1x + 5y <= 3.0)');
>
> var status = JuMP.solve(m);
>
> console.log('Objective value: ',JuMP.getObjectiveValue(m));
> console.log('X value: ',JuMP.getValue(x));
> console.log('Y value: ',JuMP.getValue(y));
>
>
>

Reply via email to