Re: [julia-users] congratulations to Indian dost

2016-10-19 Thread Michele Zaffalon
Tim Holy: I had hoped you learnt to be more careful with untested versions. See what happened this time around: https://www.theguardian.com/science/2016/oct/20/bad-day-for-space-probes-one-lost-on-mars-another-in-safe-mode-at-jupiter? On Wednesday, September 24, 2014 at 5:27:52 PM UTC+2, Tim

[julia-users] Re: BLAS.set_num_threads() and peakflops scaling

2016-10-19 Thread Thomas Covert
So are you suggesting that real numerical workloads under BLAS.set_num_threads(4) will indeed be faster than under BLAS.set_num_threads(2)? That hasn't been my experience and I figured the peakflops() example would constitute an MWE. Is there another workload you would suggest I try to

Re: [julia-users] Can't overwrite some methods in 0.5.0

2016-10-19 Thread Alex Mellnik
Yichao, I'm afraid I'm not following -- could you expand on that a bit? Thanks, Alex On Wednesday, October 19, 2016 at 4:41:30 PM UTC-7, Yichao Yu wrote: > > On Oct 19, 2016 7:26 PM, "Alex Mellnik" > wrote: > > > > Here's my bizarre find of the day. Most functions can

[julia-users] Re: BLAS.set_num_threads() and peakflops scaling

2016-10-19 Thread Ralph Smith
At least 2 things contribute to erratic results from peakflops(). With hyperthreading, the threads are not always put on separate cores. Secondly, the measured time includes the allocation of the result matrix, so garbage collection affects some of the results. Most available advice says to

Re: [julia-users] Can't overwrite some methods in 0.5.0

2016-10-19 Thread Yichao Yu
On Oct 19, 2016 7:26 PM, "Alex Mellnik" wrote: > > Here's my bizarre find of the day. Most functions can be overwritten without problems: > > function add7(i) > 7 + i > end > Out[1]: > add7 (generic function with 1 method) > In [2]: > > add7(0) > add7(0) > Out[2]: > 7

[julia-users] Can't overwrite some methods in 0.5.0

2016-10-19 Thread Alex Mellnik
Here's my bizarre find of the day. Most functions can be overwritten without problems: function add7(i) 7 + i end Out[1]: add7 (generic function with 1 method) In [2]: add7(0) add7(0) Out[2]: 7 In [3]: function add7(i) 9 + i end function add7(i) 9 + i end Out[3]: add7 (generic

[julia-users] Re: mktemp doesn't accept anonymous function?

2016-10-19 Thread Ralph Smith
specifically: > mktemp(parent) Returns (path, io), where path is the path of a new >> temporary file in parent > > and io is an open file object for this path. > > >> so you would normally use the second entry (x in my example) in the function block. On Wednesday, October 19, 2016 at

[julia-users] Re: Create EPS files with Gadfly

2016-10-19 Thread Christopher Fisher
Thanks Avik. I saw there is no official backend, but I wasn't sure if there was a clever way to hack something together from one of the other packages. Your idea involving the PS file might be an easier workaround. On Wednesday, October 19, 2016 at 5:42:05 PM UTC-4, Avik Sengupta wrote: > >

[julia-users] Re: mktemp doesn't accept anonymous function?

2016-10-19 Thread Ralph Smith
mktemp returns a 2-tuple, so (at least in v0.5) julia> mktemp() do y,x println(y) end /tmp/tmpS63NPs julia> mktemp((y,x) -> println(y)) /tmp/tmpA2p0Y1 julia> On Wednesday, October 19, 2016 at 5:06:55 PM UTC-4, John Brock wrote: > > > > Am I doing something wrong or is this a

[julia-users] Re: Create EPS files with Gadfly

2016-10-19 Thread Avik Sengupta
The list of available backends to Gadfly are available here: http://gadflyjl.org/stable/man/backends.html There is no EPS backend, only a PS backend, which you may be able to convert to eps?? Regards - Avik On Wednesday, 19 October 2016 21:20:13 UTC+1, Christopher Fisher wrote: > > Is it

[julia-users] mktemp doesn't accept anonymous function?

2016-10-19 Thread John Brock
Am I doing something wrong or is this a bug? It seems like if the 1st version works, the 2nd and 3rd should, too. julia> mktemp(println) /var/folders/jd/1skd5rh11hnc_s19lmx93zywgp/T/tmpf7HaUHIOStream() julia> mktemp(x->println(x)) ERROR: wrong number of arguments in anonymous at none:1

[julia-users] Create EPS files with Gadfly

2016-10-19 Thread Christopher Fisher
Is it possible to create .eps files in Gadfly? Thanks, Chris

[julia-users] Re: How to install JuMP without SSL errors?

2016-10-19 Thread Tony Kelman
If you don't have a really good reason to be using 0.6-dev right now, you shouldn't be. Use 0.5.0 if at all possible. On Sunday, October 16, 2016 at 8:55:07 AM UTC-7, Rick Graham wrote: > > Ref: https://github.com/JuliaOpt/JuMP.jl/issues/864 > > I can't seem to add package JuMP. Other

[julia-users] Re: kill asynchronous tasks

2016-10-19 Thread ggggg
https://github.com/JuliaLang/julia/issues/6283

Re: [julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Michele Zaffalon
A bad habit learnt using Python... On Wed, Oct 19, 2016 at 3:53 PM, Krisztián Pintér wrote: > > i know i shouldn't, but i'm kinda angry at this "1." notation. saving one > character really worth losing readability? also leading to errors like > this. personally, i would not

Re: [julia-users] iterator trait

2016-10-19 Thread Mauro
In principle you could use method_exists to check whether the start, next & done are defined for a particular type to make the isiterator function. In practice this may run into https://github.com/JuliaLang/julia/issues/8959 which should be fixed with https://github.com/JuliaLang/julia/pull/18457

[julia-users] Re: How to install JuMP without SSL errors?

2016-10-19 Thread Jonathan Goldfarb
FYI: https://github.com/JuliaLang/julia/issues/18871 On Sunday, October 16, 2016 at 11:55:07 AM UTC-4, Rick Graham wrote: > > Ref: https://github.com/JuliaOpt/JuMP.jl/issues/864 > > I can't seem to add package JuMP. Other packages seem to be added fine. > > How can I fix this? > > OS: Fedora 24

[julia-users] iterator trait

2016-10-19 Thread David Anthoff
Is there some way to find out whether a type can be iterated? I'm looking for something like `isiterator(IterType)`, that would return `false` from a default implementation and which any type that actually supports the standard iterator interface would return `true`. If we had that, we could

[julia-users] kill asynchronous tasks

2016-10-19 Thread Ryan Gardner
I'm looking for a way to reliably kill asynchronous tasks. My code is roughly: task = @async call_external_program_that_may_never_return #do stuff of interest exit(0) #please really exit now, no matter what Currently, if the external program never returns, neither does my program,

[julia-users] Re: Python Callbacks using pyjulia

2016-10-19 Thread Steven G. Johnson
A workaround from pyjulia might be to create a Julia function that can wrap a Julia Function around a Python function fwrap = j.eval('f -> (args...) -> f(args...)') and then do j.dasslSolve(fwrap(f), 1.0, [0.0, 10.0]) Not super elegant, but occasionally inter-language calling requires this

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

2016-10-19 Thread Isaiah Norton
e.g. http://half.sourceforge.net/ But if you aren't sure you need to support this, then just throw an error (Float16 is relatively new and AFAICT only useful in specialized applications because of the precision limit, which is why support is rare) If you are sure you (a) need it but (b) only

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

2016-10-19 Thread Stefan Karpinski
You can pull the significant bits and the exponent values out of a Float16 and then use those to compute the value as a Float32: https://en.wikipedia.org/wiki/Half-precision_floating-point_format On Wed, Oct 19, 2016 at 1:00 PM, Yichao Yu wrote: > > > On Wed, Oct 19, 2016 at

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

2016-10-19 Thread Yichao Yu
On Wed, Oct 19, 2016 at 12:54 PM, Kyle Kotowick wrote: > Aha, that fixed it! > > I'm running into one issue though. What do I do with the data when it's a > "Float16" type? C++ has no way to represent a 16-bit float, so I'm having > difficulty converting it to a regular 32-bit

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

2016-10-19 Thread Kyle Kotowick
Aha, that fixed it! I'm running into one issue though. What do I do with the data when it's a "Float16" type? C++ has no way to represent a 16-bit float, so I'm having difficulty converting it to a regular 32-bit float. jl_value_t *ret = jl_eval_string(code_string); jl_array_t *ret_array =

[julia-users] BLAS.set_num_threads() and peakflops scaling

2016-10-19 Thread Thomas Covert
I have a recent iMac with 4 logical cores (and 8 hyper threads). I would have thought that peakflops(N) for a large enough N should be increasing in the number of threads I allow BLAS to use. I do find that peakflops(N) with 1 thread is about half as high as peakflops(N) with 2 threads, but

Re: [julia-users] matrix multiplications

2016-10-19 Thread Cameron McBride
I agree on the consistency part with other in-place operations. I certainly don’t feel it’s hard to just use A_mul_B!, but my familiarity with BLAS shouldn’t be taken for granted. And if an in-place operator syntax exists in the language already… How about the flip side of the argument, it

[julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Steven Sagaert
agreed On Wednesday, October 19, 2016 at 3:53:00 PM UTC+2, Krisztián Pintér wrote: > > > i know i shouldn't, but i'm kinda angry at this "1." notation. saving one > character really worth losing readability? also leading to errors like > this. personally, i would not even allow this syntax at

[julia-users] Re: Python Callbacks using pyjulia

2016-10-19 Thread cdm
it seems a near term work around could be had through PyCall ... ? https://github.com/JuliaPy/PyCall.jl On Wednesday, October 19, 2016 at 7:21:05 AM UTC-7, Steven G. Johnson wrote: > > It looks like this is a problem in the DASSL.jl package. They made the > common mistake of

[julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Steven G. Johnson
Also https://github.com/JuliaLang/julia/pull/11529

[julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Steven G. Johnson
On Wednesday, October 19, 2016 at 9:53:00 AM UTC-4, Krisztián Pintér wrote: > > > i know i shouldn't, but i'm kinda angry at this "1." notation. saving one > character really worth losing readability? also leading to errors like > this. personally, i would not even allow this syntax at all. >

Re: [julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Tamas Papp
And the same goes for the closely related .1 syntax. Perhaps you could create an issue, if there isn't one already? On Wed, Oct 19 2016, Krisztián Pintér wrote: > i know i shouldn't, but i'm kinda angry at this "1." notation. saving one > character really worth losing readability? also leading

[julia-users] Re: Python Callbacks using pyjulia

2016-10-19 Thread Steven G. Johnson
It looks like this is a problem in the DASSL.jl package. They made the common mistake of over-specifying the types of their arguments, and in particular they require you to pass a Julia ::Function argument for the equations to be solved, rather than any callable object (here, the Python

[julia-users] Re: Python Callbacks using pyjulia

2016-10-19 Thread cdm
any luck with replicating the example from the README at https://github.com/pwl/DASSL.jl

Re: [julia-users] variable scope inside @threads loop?

2016-10-19 Thread Yichao Yu
On Wed, Oct 19, 2016 at 10:08 AM, Jingpeng Wu wrote: > > > Currently, it seems that every variable was shared to all threads, which > limit the application range a lot. Is there anyway to define private > variable to each threads? similar with OpenMP. > Same as normal

[julia-users] variable scope inside @threads loop?

2016-10-19 Thread Jingpeng Wu
Currently, it seems that every variable was shared to all threads, which limit the application range a lot. Is there anyway to define private variable to each threads? similar with OpenMP.

[julia-users] Re: UTF8, how to procesed text data

2016-10-19 Thread Krisztián Pintér
On Wednesday, October 19, 2016 at 1:46:38 PM UTC+2, program...@gmail.com wrote: > > > julia> temp[61:65] > "aźdz" > > julia> findin(temp[61:65],"d") > ERROR: invalid UTF-8 character index > in addition to other answers, you have the *search* function that is string-specific, and might work

[julia-users] Re: Python Callbacks using pyjulia

2016-10-19 Thread Frank Hellmann
The python script looks like this (sorry, thought attachments would be inlined): import julia j = julia.Julia() j.using("DASSL") f = lambda t, x, dx: x - dx r = j.dasslSolve(f, 1., [0., 10.])

Re: [julia-users] matrix multiplications

2016-10-19 Thread zamani . majid1989
yes exactly ! On Wednesday, October 19, 2016 at 4:28:21 PM UTC+3:30, Milan Bouchet-Valat wrote: > > Le mardi 18 octobre 2016 à 15:28 -0700, Steven G. Johnson a écrit : > > > > > > > Since it uses the in-place assignment operator .= it could be made > > > to work as desired, but there's some

[julia-users] Re: product of Int64 and Float64 is Int64

2016-10-19 Thread Krisztián Pintér
i know i shouldn't, but i'm kinda angry at this "1." notation. saving one character really worth losing readability? also leading to errors like this. personally, i would not even allow this syntax at all. On Wednesday, October 19, 2016 at 1:11:38 PM UTC+2, Michele Zaffalon wrote: > > I am

Re: [julia-users] UTF8, how to procesed text data

2016-10-19 Thread Milan Bouchet-Valat
Le mercredi 19 octobre 2016 à 06:02 -0700, programista...@gmail.com a écrit : > Version 0.3.12, udate to 5 ? Yes. 0.3.x versions are unsupported for some time now. Regards > > Le mercredi 19 octobre 2016 à 04:46 -0700, program...@gmail.com a  > > écrit :  > > > Data file is coding UTF8 but i

Re: [julia-users] UTF8, how to procesed text data

2016-10-19 Thread programistawpf
Version 0.3.12, udate to 5 ? W dniu środa, 19 października 2016 14:56:15 UTC+2 użytkownik Milan Bouchet-Valat napisał: > > Le mercredi 19 octobre 2016 à 04:46 -0700, program...@gmail.com > a > écrit : > > Data file is coding UTF8 but i cant procedsed this datain Julia ? > > What wrong ? >

Re: [julia-users] matrix multiplications

2016-10-19 Thread Milan Bouchet-Valat
Le mardi 18 octobre 2016 à 15:28 -0700, Steven G. Johnson a écrit : > > > > Since it uses the in-place assignment operator .= it could be made > > to work as desired, but there's some designing to do. > > > > The problem is that it doesn't know that * is a matrix multiplication > until

Re: [julia-users] UTF8, how to procesed text data

2016-10-19 Thread Milan Bouchet-Valat
Le mercredi 19 octobre 2016 à 04:46 -0700, programista...@gmail.com a écrit : > Data file is coding UTF8 but i cant procedsed this datain Julia ? > What wrong ? > > o=open("data.txt") > > julia> temp=readline(io) > "3699778,13,2,gdbiehz jablej gupując szybgi Injehnej dg 26 > paździehniga,1\n" >

Re: [julia-users] UTF8, how to procesed text data

2016-10-19 Thread Stefan Karpinski
http://docs.julialang.org/en/release-0.5/manual/strings/ On Wed, Oct 19, 2016 at 7:46 AM, wrote: > Data file is coding UTF8 but i cant procedsed this datain Julia ? What > wrong ? > > o=open("data.txt") > > julia> temp=readline(io) > "3699778,13,2,gdbiehz jablej

[julia-users] Python Callbacks using pyjulia

2016-10-19 Thread Frank Hellmann
Hello, I am evaluating using Julia for implementing some algorithms we want to use. As a first usecase we wanted to try using the DASSL solver in julia on a python function. Unfortunately we get the error below. I don't really know how to start debugging this problem, any pointers would be

Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread Michele Zaffalon
Thanks. On Wed, Oct 19, 2016 at 1:46 PM, wrote: > Or include a space. > > parse("1. * 80") --> :(1.0 * 80) > > parse("1.* 80") --> :(1 .* 80) > > On Wednesday, October 19, 2016 at 1:30:27 PM UTC+2, Mauro wrote: >> >> On Wed, 2016-10-19 at 13:11, Michele Zaffalon

Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread lapeyre . math122a
Or include a space. parse("1. * 80") --> :(1.0 * 80) parse("1.* 80") --> :(1 .* 80) On Wednesday, October 19, 2016 at 1:30:27 PM UTC+2, Mauro wrote: > > On Wed, 2016-10-19 at 13:11, Michele Zaffalon > wrote: > > I am confused by the type of the result of `1.*80`,

[julia-users] UTF8, how to procesed text data

2016-10-19 Thread programistawpf
Data file is coding UTF8 but i cant procedsed this datain Julia ? What wrong ? o=open("data.txt") julia> temp=readline(io) "3699778,13,2,gdbiehz jablej gupując szybgi Injehnej dg 26 paździehniga,1\n" julia> temp[61:65] "aźdz" julia> findin(temp[61:65],"d") ERROR: invalid UTF-8 character index

[julia-users] ANN: Symata.jl language for Symbolic math

2016-10-19 Thread lapeyre . math122a
[ apologies for posting twice! I forgot to include a description in the Subject line] Symata.jl is a symbolic math language. (The old name was SJulia.) You can add it with Pkg.add("Symata.jl"). The site is https://github.com/jlapeyre/Symata.jl Notebook examples are here

Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread Michele Zaffalon
And julia> parse("1.*80") :(1 .* 80) julia> parse("1.0*80") :(1.0 * 80) On Wednesday, October 19, 2016 at 1:36:00 PM UTC+2, Michele Zaffalon wrote: > > I should have realized that: > > julia> promote(1., 80) > (1.0,80.0) > julia> 80*1. > 80.0 > > Thank you. > > On Wednesday, October 19, 2016 at

Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread Michele Zaffalon
I should have realized that: julia> promote(1., 80) (1.0,80.0) julia> 80*1. 80.0 Thank you. On Wednesday, October 19, 2016 at 1:30:27 PM UTC+2, Mauro wrote: > > On Wed, 2016-10-19 at 13:11, Michele Zaffalon > wrote: > > I am confused by the type of the result of

Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread Mauro
On Wed, 2016-10-19 at 13:11, Michele Zaffalon wrote: > I am confused by the type of the result of `1.*80`, which is `Int64`, despite > the fact that `1.` is `Float64`, and that `Float64(1)*80` is a `Float64`: No this is parsed as 1 .* 80. Try 1.0*80 > julia>

[julia-users] Re: Juno workspace variable display.

2016-10-19 Thread Martin Florek
On Ubuntu: Ctrl+Shift+P It's great, thanks On Tuesday, 13 September 2016 05:26:01 UTC+2, Patrick Belliveau wrote: > > Works for me too. Thanks Uwe! I'll put in a feature request to have a it > added to the menu. Juno's getting really good. > > Patrick > > On Monday, September 12, 2016 at

[julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread Michele Zaffalon
I am confused by the type of the result of `1.*80`, which is `Int64`, despite the fact that `1.` is `Float64`, and that `Float64(1)*80` is a `Float64`: julia> typeof(1.), typeof(80), typeof(1.*80), typeof(Float64(1.)*80) (Float64,Int64,Int64,Float64) Does it have to do with the fact that both

Re: [julia-users] Julia programming for engineers!

2016-10-19 Thread zamani . majid1989
yes i have read this part ... and thought that it would be nice to have guide that aims some engineering topics. On Wednesday, October 19, 2016 at 2:12:18 PM UTC+3:30, Tamas Papp wrote: > > I suppose you are aware of > > >

[julia-users] Re: Is 0.6(nightlies) pretty much broken?

2016-10-19 Thread lapeyre . math122a
Nightly builds by Travis and Appveyor broke for me. For OSX and Windows, maybe not Linux. WARNING: The call to compilecache failed to create a usable precompiled cache file for module Combinatorics. On Wednesday, October 12, 2016 at 8:44:16 PM UTC+2, Neal Becker wrote: > > Seems like

Re: [julia-users] Julia programming for engineers!

2016-10-19 Thread Tamas Papp
I suppose you are aware of http://docs.julialang.org/en/release-0.5/manual/noteworthy-differences/#noteworthy-differences-from-matlab On Wed, Oct 19 2016, zamani wrote: > Hi guys .. using Julia is fun .. > I'm going to write a guide for matlab users specially students but i need > some help

[julia-users] Re: Nemo AcbField error

2016-10-19 Thread Tommy Hofmann
pari was not built/downloaded properly. Do a Pkg.build("Nemo") in julia and check again. On Wednesday, October 19, 2016 at 2:44:20 AM UTC+2, Jeffrey Sarnoff wrote: > > I do not get that error. Are you using the current versions of Julia nd > Nemo? You may see a warning message with the first

[julia-users] Julia programming for engineers!

2016-10-19 Thread zamani . majid1989
Hi guys .. using Julia is fun .. I'm going to write a guide for matlab users specially students but i need some help with grammar as english is not my native language... its going to based on a book by the title of Matlab Programming for engineers (

[julia-users] Re: Is 0.6(nightlies) pretty much broken?

2016-10-19 Thread wookyoung noh
it looks really danger command :) rm -rf ~/.julia/lib works to me. Best regards, WooKyoung Noh On Thursday, October 13, 2016 at 7:52:16 PM UTC+9, Neal Becker wrote: > > Seems to be fixed with > rm -rf ~/.julia > > Strange that Pkg.rm/Pkg.add didn't seem to fix it > > Neal Becker wrote: >

[julia-users] Re: matrix multiplications

2016-10-19 Thread zamani . majid1989
Thanks @Stefan ... On Tuesday, October 18, 2016 at 8:03:46 PM UTC+3:30, zamani.m...@gmail.com wrote: > > hi guys > is there a way to reduce allocated memory in matrix multiplications? > > for example this code blew in my machine gives : > > function test4(n) > a = rand(n,n) > for i = 1:100

Re: [julia-users] Re: canonical binary representation for Array

2016-10-19 Thread Michele Zaffalon
On Thursday, October 13, 2016 at 3:38:36 PM UTC+2, Steven G. Johnson wrote: > > write on a numeric array will output the raw bytes, i.e. Column-major data > in the native byte order. > > > Would it be a reasonable assumption that reshaping will not change the ordering in future Julia

[julia-users] Re: Julia types newbie question

2016-10-19 Thread Ismael Venegas Castelló
You can do something like this: C:\Users\Ismael λ julia5 _

Re: [julia-users] Re: quadgk with 2 arguments

2016-10-19 Thread Michele Zaffalon
You are right. On Wed, Oct 19, 2016 at 12:37 AM, Steven G. Johnson wrote: > > > On Tuesday, October 18, 2016 at 4:34:38 PM UTC-4, Michele Zaffalon wrote: >> >> quadgk(t -> cis(gamma(t)), 0, 1) >> > > No, this is wrong because you forgot the Jacobian factor. >