[julia-users] Re: redefining Base method for `show`

2016-10-15 Thread Jeffrey Sarnoff
module Rationality abstract SymbolicMathematics export SymbolicRational import Base: STDOUT, string, show, Rational type SymbolicRational <: SymbolicMathematics num::Int128 den::Int128 SymbolicRational{I<:Signed}(num::I, den::I) = new(Int128(num), Int128(den))

[julia-users] Failed to precompile LightGraphs

2016-10-15 Thread varun7rs
I recently installed the LightGraphs package for my work but when I enter "using LightGraphs", I get an error saying failed to precompile LightGraphs to /home/user/.julia/lib/v0.5/LightGraphs.jl. Can you please tell me what the error is about and how to get LightGraphs working again?

Re: [julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-15 Thread Bart Janssens
In addition to this, CxxWrap.jl has some additional convenience classes to work with Julia arrays from C++, see https://github.com/JuliaInterop/CxxWrap.jl#working-with-arrays Cheers, Bart On Sat, Oct 15, 2016 at 2:45 AM Isaiah Norton wrote: > On Fri, Oct 14, 2016 at

[julia-users] Type-stable global variables?

2016-10-15 Thread Andrei Zh
What is the most straightforward way to make a variable in the global scope that can change it's value, but not its type? So far I use this: const GLOBAL_VAR = [MyType[]] # array with single element set_global_var(x::MyType) = GLOBAL_VAR[1] = x get_goval_var() = GLOBAL_VAR[1] This works fine

[julia-users] quadgk with 2 arguments

2016-10-15 Thread digxx
having a function of the form f(s,t) defined is it possible to somehow tell quadgk to not evaluate until I supply a value for s while t should be the integration variable? e.g. sth like. The syntax I found so far excluded any arguments... g=s-> quadgk(f(s,*),0,1)

[julia-users] Re: quadgk with 2 arguments

2016-10-15 Thread Daniel O'Malley
I think what you want is g(s) = quadgk(t->f(s,t), 0, 1) On Saturday, October 15, 2016 at 6:37:58 PM UTC-6, digxx wrote: > > having a function of the form f(s,t) defined is it possible to somehow > tell quadgk to not evaluate until I supply a value for s while t should be > the integration

[julia-users] Re: quadgk with 2 arguments

2016-10-15 Thread Kristoffer Carlsson
Perhaps this is what you mean: s = 1.0 quadgk(t -> f(s,t),0,1) On Sunday, October 16, 2016 at 2:37:58 AM UTC+2, digxx wrote: > > having a function of the form f(s,t) defined is it possible to somehow > tell quadgk to not evaluate until I supply a value for s while t should be > the

Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread Yichao Yu
On Sat, Oct 15, 2016 at 6:21 PM, jw3126 wrote: > > > On Sunday, October 16, 2016 at 12:12:14 AM UTC+2, Yichao Yu wrote: >> >> >> >> 2016-10-15 18:06 GMT-04:00 jw3126 : >> >>> myop(::Int16, ::Int16) = Int32(1) >>> myop(::Int16, ::Int32) = Int64(1) >>>

[julia-users] Re: quadgk with 2 arguments

2016-10-15 Thread digxx
Btw: Can quadgk also be used for complex functions? (the integration is still over a real range)

[julia-users] Root finding package

2016-10-15 Thread digxx
So I know there is Roots but is there also one for finding complex roots?

[julia-users] How to determine which functions to overload, or, who is at the bottom of the function chain?

2016-10-15 Thread colintbowers
Hi all, Twice now I've thought I had overloaded the appropriate functions for a new type, only to observe apparent inconsistencies in the way the new type behaves. Of course, there were no inconsistencies. Instead, the observed behaviour stemmed from overloading a function that is not at the

[julia-users] Interpolations.jl: how to use the scale function?

2016-10-15 Thread Florian Oswald
Hi folks, I have question on SO that needs some attention. thanks! http://stackoverflow.com/questions/40045208/how-to-use-scale-in-interpolations-jl

[julia-users] Nemo AcbField error

2016-10-15 Thread digxx
Maybe I'm doing sth wrong or sth has changed since 0.4 but I get an error using an AcbField r=AcbField(64) res=r(1) ERROR: LoadError: error compiling AcbField: error compiling Type: could not load library "libarb" ▒ in include_from_node1(::String) at .\loading.jl:488

Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread Yichao Yu
2016-10-15 18:06 GMT-04:00 jw3126 : > myop(::Int16, ::Int16) = Int32(1) > myop(::Int16, ::Int32) = Int64(1) > myop(::Int16, ::Int64) = Int128(1) > myop(::Int16, ::Int128) = Int128(1) > > foldr(myop, Int16[1]) |> typeof |> println > foldr(myop, Int16[1,1]) |> typeof |> println >

[julia-users] Re: Interpolations.jl: how to use the scale function?

2016-10-15 Thread Kristoffer Carlsson
itp2 = scale(itp,0:0.1:1) itp2[0] # 0.0 On Saturday, October 15, 2016 at 10:04:37 PM UTC+2, Florian Oswald wrote: > > Hi folks, > > I have question on SO that needs some attention. thanks! > > > http://stackoverflow.com/questions/40045208/how-to-use-scale-in-interpolations-jl >

[julia-users] Reductions sometimes not typestable?

2016-10-15 Thread jw3126
myop(::Int16, ::Int16) = Int32(1) myop(::Int16, ::Int32) = Int64(1) myop(::Int16, ::Int64) = Int128(1) myop(::Int16, ::Int128) = Int128(1) foldr(myop, Int16[1]) |> typeof |> println foldr(myop, Int16[1,1]) |> typeof |> println foldr(myop, Int16[1,1,1]) |> typeof |> println foldr(myop,

Re: [julia-users] Reductions sometimes not typestable?

2016-10-15 Thread jw3126
On Sunday, October 16, 2016 at 12:12:14 AM UTC+2, Yichao Yu wrote: > > > > 2016-10-15 18:06 GMT-04:00 jw3126 : > >> myop(::Int16, ::Int16) = Int32(1) >> myop(::Int16, ::Int32) = Int64(1) >> myop(::Int16, ::Int64) = Int128(1) >> myop(::Int16, ::Int128) = Int128(1) >> >>

[julia-users] Re: quadgk with 2 arguments

2016-10-15 Thread digxx
thx

[julia-users] Root finding package

2016-10-15 Thread David P. Sanders
https://github.com/giordano/PolynomialRoots.jl

[julia-users] Re: Root finding package

2016-10-15 Thread Chris Rackauckas
I don't know if NLsolve handles complex roots but I've always found it to be very good. Maybe you can just act like the problem is on a vector of two points (the real and imaginary parts) and solve for where the norm of f(x) is zero. On Saturday, October 15, 2016 at 4:56:23 PM UTC-7, digxx

Re: [julia-users] help with @generated function call please?

2016-10-15 Thread Erik Schnetter
A generated function is only useful if you perform a non-trivial calculation based on the argument types. You don't do that here, so I wonder whether simply using the Cartesian indexing macros by themselves would be sufficient. Note also that you don't need to write `$N` in your code; using `N`

Re: [julia-users] help with @generated function call please?

2016-10-15 Thread Florian Oswald
Yes I think you are right about that. Using a comprehension is just as good for my case. But part of me would like to just finally understand that part of Julia! Ok will have to wait for the next opportunity. :-) Thanks anyway. Florian On Saturday, 15 October 2016, Erik Schnetter

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-15 Thread ABB
I think this is the actual error: /home1/04179/abean/julia/deps/srccache/llvm-svn/lib/Demangle/ItaniumDemangle.cpp(946): error #303: explicit type is missing ("int" assumed) auto args = db.names.back().move_full(); ^ detected during:

[julia-users] Re: Parallel file access

2016-10-15 Thread Steven Sagaert
It still surprises me how in the scientific computing field people still refuse to learn about databases and then replicate database functionality in files in a complicated and probably buggy way. HDF5 is one example, there are many others. If you want to to fancy search (i.e. speedup search

Re: [julia-users] linspace question; bug?

2016-10-15 Thread Stefan Karpinski
On Fri, Oct 14, 2016 at 8:17 PM, Páll Haraldsson wrote: > > Nobody makes a one element linspace intentionally, but would it be bad to > allow it? > Yes, it's better to raise an error when asked to do something that makes no sense than to do some arbitrary wrong thing.

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-15 Thread ABB
I'm getting a new error. This is with the following make.user: LLVM_VER=svn USEICC=1 USEIFC=1 USE_INTEL_MKL=1 USE_INTEL_MKL_FFT=1 USE_INTEL_LIBM=1 building directly on the (KNL) compute node (in parallel: make -j 68) configure: amending tests/server/Makefile configure: amending

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-15 Thread ABB
How smart of me. I was confused because it looked like the version of curl was the correct one. I'll run it again and see where it messes up this time. Thanks for fixing that. On Saturday, October 15, 2016 at 1:51:28 PM UTC-5, Erik Schnetter wrote: > > You didn't show the actual error

Re: [julia-users] Type-stable global variables?

2016-10-15 Thread Yichao Yu
On Sat, Oct 15, 2016 at 8:59 AM, Andrei Zh wrote: > What is the most straightforward way to make a variable in the global > scope that can change it's value, but not its type? So far I use this: > > const GLOBAL_VAR = [MyType[]] # array with single element > >

Re: [julia-users] Does julia -L work with plots?

2016-10-15 Thread Stefan Rigger
Works great, thanks! On Sat, Oct 15, 2016 at 2:56 AM, Isaiah Norton wrote: > Call `show()` at the end of the script. See explanation here: > > https://github.com/JuliaPy/PyPlot.jl#non-interactive-plotting > > On Fri, Oct 14, 2016 at 1:17 PM, Stefan Rigger

[julia-users] Re: Parallel file access

2016-10-15 Thread Ralph Smith
How are the processes supposed to interact with the database? Without extra synchronization logic, SQLite.jl gives (occasionally) ERROR: LoadError: On worker 2: SQLite.SQLiteException("database is locked") which on the face of it suggests that all workers are using the same connection, although

Re: [julia-users] Type-stable global variables?

2016-10-15 Thread Andrei Zh
Thanks, this is exactly what I was looking for. On Saturday, October 15, 2016 at 4:08:48 PM UTC+3, Yichao Yu wrote: > > > > On Sat, Oct 15, 2016 at 8:59 AM, Andrei Zh > wrote: > >> What is the most straightforward way to make a variable in the global >> scope that can

[julia-users] PyTest.jl - pytest-like testing framework for Julia - work-in-progress

2016-10-15 Thread pdobacz
Hello all! I have made an attempt to start building a pytest-like testing framework for Julia. There is a (quite preliminary) package here: https://github.com/pdobacz/PyTest.jl I intend to go along these lines: - follow pytest (http://doc.pytest.org/en/latest/) as closely as reasonably

Re: [julia-users] ERROR: Target architecture mismatch

2016-10-15 Thread Erik Schnetter
You didn't show the actual error message. Debugging is easier if (after seeing an error) you re-run with "make -j1", so that the error message doesn't scroll away. -erik On Sat, Oct 15, 2016 at 1:41 PM, ABB wrote: > I'm getting a new error. This is with the following