Live data from Hacker News

Julia 1.0

julialang.org

21–30 of 446 posts

Re: Julia 1.0

#21

Earlier quoted context omitted.

Actually, sometimes you feel its ecosystem does not attract you since this is really a new language, however, as a package developer, when we decide to use Julia or C++ to finish a performance sensitive simulator: https://github.com/QuantumBFS/Yao.jl we choose Julia, just because we only have two people and we still want something fast and easy to use in 3 month (since it is dynamic). Another thing is the multiple di…

Yao.jl is a fantastic project and I hope to keep following it in the future. Maybe we can build differential equation solver algorithms which utilize quantum algorithms :)

Actually, since we are planning to integrate QASM and eQASM (a new kind of assembly from Delft), if you can use Yao.jl to run a quantum algorithm for solving differential equations (there has been several already), you will be able to run it on some real hardware. Still working on more features, and we do need more feedback to help us make this better, please feel free to give us any comments in the issue :)

Re: Julia 1.0

#22
post #8

Earlier quoted context omitted.

Raw speed. Although julia has several nice features (multiple dynamic dispatch, macros), the raw speed obtained by annotating code with types is mind blowing. You can for the most part write like python, then annotate the slowest parts with types. It works really well.

You don't even need to annotate things with types! > square(x) = x * x > @code_typed square(2.0) CodeInfo( 1 1 ─ %1 = Base.mul_float(%%x, %%x)::Float64 └── return %1 ) => Float64 > @code_typed square(2) CodeInfo( 1 1 ─ %1 = Base.mul_int(%%x, %%x)::Int64 └── return %1 ) => Int64 Functions specialize automatically to the arguments you pass in.

Or, to see what's really going on at a low level you have immediate access to the native assembly from the REPL:

    julia> square(x) = x^2 
    square (generic function with 1 method) 
 
    julia> @code_native square(1) 
        .text 
    Filename: REPL[3] 
        pushq       %rbp 
        movq        %rsp, %rbp 
    Source line: 1 
        imulq       %rdi, %rdi 
        movq        %rdi, %rax 
        popq        %rbp 
        retq 
 
    julia> @code_native square(1.0) 
        .text 
    Filename: REPL[3] 
        pushq       %rbp 
        movq        %rsp, %rbp 
    Source line: 1 
        mulsd       %xmm0, %xmm0 
        popq        %rbp 
        retq

Re: Julia 1.0

#23

Earlier quoted context omitted.

Yao.jl is a fantastic project and I hope to keep following it in the future. Maybe we can build differential equation solver algorithms which utilize quantum algorithms :)

Actually, since we are planning to integrate QASM and eQASM (a new kind of assembly from Delft), if you can use Yao.jl to run a quantum algorithm for solving differential equations (there has been several already), you will be able to run it on some real hardware. Still working on more features, and we do need more feedback to help us make this better, please feel free to give us any comments in the issue :)

Cool, I'm not familiar with quantum at all but I'll start looking into it. It will definitely be something we add to DifferentialEquations.jl common interface next year. I'll see about getting a Google Summer of Code project on this.

Re: Julia 1.0

#25
post #24

"Hm I should check it out, are there docs?" https://docs.julialang.org/en/stable/ Julia 0.7 Documentation Sounds like 1.0 hasn't propagated everywhere yet :-)

The documentation should be equivalent, modulo a small couple additions made in the past couple of days.

Re: Julia 1.0

#26

Apart from the library ecosystem, what attracts you to Julia?

The type system, which really encourages development of safe, reusable code. Also the type system can be a useful reusable solver.

I strongly prefer the dependency management system to python's efforts.

I like the strong arithmetic precision management facilities.

Dynamic programming is interesting, but I'm not sure that its great for collaboration.

Re: Julia 1.0

#27
post #8

Earlier quoted context omitted.

Raw speed. Although julia has several nice features (multiple dynamic dispatch, macros), the raw speed obtained by annotating code with types is mind blowing. You can for the most part write like python, then annotate the slowest parts with types. It works really well.

You don't even need to annotate things with types! > square(x) = x * x > @code_typed square(2.0) CodeInfo( 1 1 ─ %1 = Base.mul_float(%%x, %%x)::Float64 └── return %1 ) => Float64 > @code_typed square(2) CodeInfo( 1 1 ─ %1 = Base.mul_int(%%x, %%x)::Int64 └── return %1 ) => Int64 Functions specialize automatically to the arguments you pass in.

You don't need to annotate function definitions with types, but you should actually annotate your composite type definitions with concrete (parametric) types for each field.

Re: Julia 1.0

#28
post #12

I use both R and Python in my work but when we move our models to production it's not real time, just a batch execution like once in a day. I'd like to hear from anyone who uses Julia in their actual job/work. Is it worth learning Julia, hoping to use it in work some day?

I used Julia in my day-to-day work at my previous job (Intel) and in my new position (Rigetti). There's quite a few companies that are using it in production now.

Re: Julia 1.0

#29
post #26

Apart from the library ecosystem, what attracts you to Julia?

The type system, which really encourages development of safe, reusable code. Also the type system can be a useful reusable solver. I strongly prefer the dependency management system to python's efforts. I like the strong arithmetic precision management facilities. Dynamic programming is interesting, but I'm not sure that its great for collaboration.

Dependency management for packages just got hugely better with the release of Pkg3 (now simply Pkg) as part of 0.7 / 1.0.

Re: Julia 1.0

#30
Congrats to everyone behind this effort! I’m looking forward to helping out with getting the image processing packages in Images.jl packages updated for 0.7/1.0.
Post reply on HN