HNHacker News
TopNewBestAskShowJobs

jonniedie

31 karma · joined August 3, 2020

submissionscomments
jonniedie··on PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
StarWars indexing makes 4 sense.
jonniedie··on Julia 1.6 addresses latency issues
Really? I’d love to know how to do that because I run against this issue every day. Are you in the package’s environment or using `includet`?
jonniedie··on Julia 1.6 addresses latency issues
Revise can’t change structs in modules either. The only sane way I’ve found to handle this is using a Pluto notebook. But that’s not for everybody.
jonniedie··on Fortran is back on the top 20 TIOBE index list
Some other nice things that come from having a type system for numerical work:

- Forward mode automatic differentiation. Having a type system that allows `Dual` numbers to pass through your algorithm, simulation, or whatever means you can calculate derivatives, gradients, jacobians, and hessians efficiently (for small problems) and accurately without having to change any of your code. There are so many times where I say “hey, I wonder what the sensitivity of my simulation output to this input parameter is” and it’s really nice to be able to answer that question with one line of code.

- Unitful numbers. It’s really nice to be able to pass numbers with units through a simulation (little to no performance penalty!) to make sure everything checks out in that respect.

- Uncertainty. Both Measurements.jl and MonteCarloMeasurements.jl provide numbers that propagate (linear and nonlinear, respectively) uncertainty as the pass through calculations. Want to see how uncertainty in a parameter propagates through a calculation? Just change that one parameter to an uncertain number and let it run through your algorithm as-is and it will spit out an answer with uncertainty bounds on the other side.

These are just a few examples of the stuff I use it for in my everyday work. Having a full type system for numerical work is one of those things that seems silly before you use it, but once you do, you wonder how you got by without it before.

EDIT: BTW, these are just examples of numerical types. Sending specialized array types through a your code is also a thing. For example, if you have a `Diagonal` type matrix and you send it to an eigenvalue solve, it just pulls the elements from the diagonal without wasting any time trying to calculate anything. Or there are things like ComponentArrays.jl (full disclosure, I wrote this library), that let you pass arbitrarily deep structured information through a differential equation or optimization solver for much cleaner and more readable code than just indexing into a plain vector like you would usually have to do. And you can even put your weird numerical types inside of the weird array types and just send it on through.

jonniedie··on Data Science in Julia for Hackers
Julia doesn’t rely on any Unicode. It just gives you the option to use it. If it’s not useful to you, feel free to not use it.
jonniedie··on Why scientists are turning to Rust
A simple data structure:

  struct ASimpleDataStructure
    a
    b
  end
Convert a variable to a different type:

  x = 1
  x = Float64(x)
Open a file:

  open(“a_file.txt”)
Import foreign code:

  using PyCall
  so = pyimport(“scipy.optimize”)
  so.newton(x -> cos(x) - x, 1)
jonniedie··on Working with Images in Julia – Week 1 – 18.S191 MIT Fall 2020
The fact that images are just arrays of color objects is really neat. Like, you can just put three blue and one brown pixels together in a matrix and you have an image.
jonniedie··on Pluto.jl – a reactive, lightweight, simple notebook
Reproducibility is a huge one for me. I’m often doing exploratory work that I’ll want to save in its current state and pick back up a few months (or even years) later. With Jupyter, this almost never works because I am constantly editing and running cells out of order as I’m exploring things. If I save at any given point, there is no guarantee that the notebook will be in the same state when I reopen it and re-run the cells.

With Pluto and other reactive notebooks, you have a guarantee that the code you see on the screen will produce the same results. So if you go back and edit cells out of order, save the notebook, then open it and re-run later, it will always be in the same state you left it in.

jonniedie··on Pluto.jl – a reactive, lightweight, simple notebook
FWIW, I thought I remembered hearing that the maintainers of the Julia extension in VSCode are working on getting embedded Pluto notebooks working.
jonniedie··on JuliaDB
It’s pronounced “curth”
jonniedie··on Julia 1.5 Highlights
Most people who talk about “production ready systems” have never had to do any serious numerical work.