Tag Archives: Julia

These are a few of my Favourite Things (that are coming with Julia 1.0)

By: oxinabox.github.io

Re-posted from: https://white.ucc.asn.au/2018/06/01/Julia-Favourite-New-Things.html

If I were more musically talented I would be writing a song
Arguments that are destructured, and operator characters combine-ed; Loop binding changes and convert redefine-ed…
no none of that, please stop.

Technically speaking these are a few of my Favourite Things that are in julia 0.7-alpha.
But since since 1.0 is going to be 0.7 with deprecations removed,
We can look at it as a 1.0 list.

Many people are getting excited about big changes like
Pkg3,
named tuples,
field access overloading,
lazy broadcasting,
or the parallel task runtime (which isn’t in 0.7 alpha, but I am hopeful for 1.0)
I am excited about them too, but I think they’re going to get all the attention they need.
(If not then they deserve a post of their own each, not going to try and squeeze them into this one.)
Here are some of the smaller changes I am excited about.

These are excepts from 0.7-alpha NEWS.md
Continue reading

Optimizing your diet with JuMP

By: oxinabox.github.io

Re-posted from: https://white.ucc.asn.au/2018/05/28/Optimizing-your-diet-with-JuMP.html

I’ve been wanting to do a JuMP blog post for a while.
JuMP is a Julia mathematical programing library.
It is to an extent a DSL for describing constrained optimisation problems.

A while ago, a friend came to me who was looking to get “buff”,
what he wanted to do, was maximise his protein intake, while maintaining a generally healthy diet.
He wanted to know what foods he should be eating.
To devise a diet.

If one thinks about this,
this is actually a Linear Programming problem – constrained linear optimisation.
The variables are how much of each food to eat,
and the contraints are around making sure you have enough (but not too much) of all the essential vitamins and minerals.

Note: this is a bit of fun, in absolutely no way do I recommend using the diets the code I am about to show off generates.
I am in no way qualified to be giving dietry or medical advice, etc.
But this is a great way to play around with optimisation.
Continue reading

String Types in Julia

By: oxinabox.github.io

Re-posted from: https://white.ucc.asn.au/2018/05/03/Strings-Types-in-Julia.html

A shortish post about the various string type in Julia 0.6, and it’s packages.
This post covers Base.String, Base.SubString, WeakRefStrings.jl, InternedStrings.jl, ShortStrings.jl and Strs.jl;
and also mentioneds StringEncodings.jl.
Thanks to Scott P Jones, who helped write the section on his Strs.jl package.
Continue reading