News for hackers. Stuff that matters.
Re:Why scientists are turning to Rust by adamnemecek on Tuesday December 01, 2020 @06:35PM (#25271511)
Which part of Julia is difficult?
Re:Why scientists are turning to Rust by st1x7 on Tuesday December 01, 2020 @07:00PM (#25271716)
Compared to Python? Just about everything starting from simple things like how to create a simple data structure, how to convert a variable to a different type, how to understand any error message that you get, how to open a file or modify a visualisation and extending all the way up to overarching concepts like the typing system, importing foreign code and managing dependencies.
Re:Why scientists are turning to Rust by jonniedie on Tuesday December 01, 2020 @08:24PM (#25272244)
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)
Re:Why scientists are turning to Rust by st1x7 on Wednesday December 02, 2020 @03:19AM (#25274293)
This really isn't constructive.

- I had none of those examples in mind (for example by foreign code I was referring to code written in a different project, not to using a different language). No, I don't need you to give me code snippets on how to do my actual list.

- Obviously Julia can do everything that Python can. And most of it will look ergonomic, short and simple. The difficult part isn't whether the language can do it once you know how, it's how quickly you can get to figuring it out when you don't know it.

- So what makes the small things difficult is really the mix of unhelpful error messages and the limited resources online.

This is my overall point - if you take someone who hasn't written code in either Python or Julia, give them access to online search and ask them to complete almost any task, they'll do it faster and with less effort in Python.

Re:Why scientists are turning to Rust by adamnemecek on Tuesday December 01, 2020 @09:01PM (#25272450)
Yeah defining a strict in python would be more lines.
Re:Why scientists are turning to Rust by adamnemecek on Tuesday December 01, 2020 @07:20PM (#25271838)
How is making a structure in Julia harder than in python?
Re:Why scientists are turning to Rust by xiphias2 on Tuesday December 01, 2020 @06:58PM (#25271702)
For me it was understanding the type unification rules. After a long time I read the original dissertation papers, and only that was the time when I finally understood what method is being called why at what point. While method dispatch is the most interesting part of Julia, it's the most complex as well.