Monday January 22nd
Plotting in Julia
Spent today plotting in Julia
- Wrote a function and plotted X against Y
- Then plotted it. The grid on command apparently changed from
- Also, what’s neat is that for the title, it truncates after any
(, but it will, if you type
^, raise that to the power, as you would like it to do, which is nice!
User Defined Types in Julia
- User defined types in Julia are just awesome.
You can add constraints, and there are
Anytypes, which are the subset of all types, and other types, such as
Anyis the supertype of all types
Concretetypes can hold values, such as
Abstracttypes cannot hold values
- You can see the subtypes of a type by typing
Tis the specific type.
- You can ask
Float64 <: Anywhich reads “Is Float a subtype of Any?”, which is true because Any is a supertype that contains all subtypes.
- I’m really enjoying it.
- You can check types by
is(x, y). This does bit-level comparison.
- plotted some interesting stuff like the Legendre Polynomial or the Lemniscate function. I didn’t know about Lemniscate before, so that was really interesting! I think I may have made a moving sculpture via welding before that uses some version of the concept, though (don’t ask).
- I have a list of things to get together for my sailing trip next week
- I’m going to Sparklecon this weekend!
- I’m reviewing types tonight and trying to get started on Week 3’s homework since I have a short week next week (ie on a boat)!
- I’m going to work through the final SQL section of my Udacity course, and finish up Project 1.
- I’m going to get that Julia certificate!
- I saw this
bokehfunction, but it looks like it may be discontinued? In particular, this issue.
- Oh, I watched this video on Julia’s Type system. It’s by Jeff Bezanson and it’s called “The State of the Type System”
- Need to learn more about
- Intersection Types (“given two types, find a type that is a subtype of both”)
- Union Types
And that’s about it!
Written on January 22, 2018