Re: [julia-users] the state of GUI toolkits?

2015-04-30 Thread Andreas Lobinger
Hello colleagues, On Tuesday, April 28, 2015 at 1:11:17 PM UTC+2, Tim Holy wrote: > > Also, on 0.3 Gtk loads just fine for me. Not sure why it's not working on > PkgEvaluator. > That it works for you and (assumingly) others in the Gtk.jl development i already learned from the local issue discu

Re: [julia-users] the state of GUI toolkits?

2015-04-30 Thread Andreas Lobinger
Hello collegue, On Tuesday, April 28, 2015 at 11:11:27 AM UTC+2, Tim Holy wrote: > > Here's one vote for Gtk. Currently it might need some love to fix up for > recent > julia changes---presumably you (or someone) could fix it up in a couple of > hours. > i already spend some time looking into

[julia-users] Re: the state of GUI toolkits?

2015-04-30 Thread Andreas Lobinger
Hello colleague, On Wednesday, April 29, 2015 at 9:52:40 AM UTC+2, Steven Sagaert wrote: > > I'd love to see a Qt5/QML wrapper. I find Qt5 superior to Gtk. Also it's > available on more platforms (mobile). > Looking at the technology (and the claims) of Qt5 i'd also prefer a working Qt5 adaptat

[julia-users] Import statements

2015-04-30 Thread Bill Hart
We used to have the following in our code import Base: convert, promote_rule, show, string, parseint, serialize, deserialize, base, bin, dec, oct, hex, gcd, gcdx, lcm, div, size, zero, one, sign, hash, abs, deepcopy, rem, mod, isequal But in the latest update something s

Re: [julia-users] Building sysimg error with multi-core start

2015-04-30 Thread René Donner
Hi, I had to fiddle with the precompilation myself, initially hitting similar issues. Are you starting julia simply with "julia" or do you specify the path to the system image using the "-J" parameter? In case you use "-J" you need to use the exeflags parameter of addprocs to specify this for

Re: [julia-users] performance of functions

2015-04-30 Thread Tim Holy
Check the SO post again; there are now many suggested workarounds, some of which are not a big hit to readability. And no, this won't be fixed in 0.4. --Tim On Wednesday, April 29, 2015 08:57:46 PM Sebastian Good wrote: > I ran into this issue today > (http://stackoverflow.com/questions/2617363

[julia-users] Re: Newbie help... First implementation of 3D heat equation solver VERY slow in Julia

2015-04-30 Thread Ángel de Vicente
Hi, On Wednesday, April 29, 2015 at 5:03:05 PM UTC+1, Viral Shah wrote: > > You may see some better performance with julia 0.4-dev. The other thing to > do that is easy is to start julia with the -O option that enables some more > optimizations in the JIT, that may or may not help. > thanks for

[julia-users] initializing arrays of tuples in julia 0.4

2015-04-30 Thread Jim Garrison
In Julia 0.3, I can create an empty array of tuples as follows: julia> (Int,Int)[] 0-element Array{(Int64,Int64),1} If I want, I can even initialize it with a comprehension. julia> (Int,Int)[(z, 2z) for z in 1:3] 3-element Array{(Int64,Int64),1}: (1,2) (2,4) (3,6)

Re: [julia-users] initializing arrays of tuples in julia 0.4

2015-04-30 Thread Mauro
This works: julia> Tuple{Int,Int}[(z, 2z) for z in 1:3] 3-element Array{Tuple{Int64,Int64},1}: (1,2) (2,4) (3,6) because now the type of (2,3) is Tuple{Int,Int} and not (Int,Int) (which is just a tuple of datatypes). On Thu, 2015-04-30 at 11:53, Jim Garrison wrote: > In Julia 0.3, I can crea

[julia-users] Performance of Distributed Arrays

2015-04-30 Thread Ángel de Vicente
Hello all, I'm trying to understand the sort of performance that we can get in Parallel with Julia. DistributedArrays look very tempting, but my first try gives me a hopeless performance. As a test code, I got it from the slides (pages 75-80) at http://www.csd.uwo.ca/~moreno/cs2101a_moreno/Par

[julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Ismael VC
Hello everyone! I’m trying to build Julia at PythonAnywhere , and the build fails because of: CC src/flisp/flisp.o CC src/flisp/builtins.o CC src/flisp/string.o CC src/flisp/equalhash.o CC src/flisp/table.o CC src/flisp/iostream.o CC

[julia-users] Re: Build error: could not open \"flisp.boot\".

2015-04-30 Thread Ismael VC
Previously I tried with the generic binary, but It seems something is not supported by PythonAnywhere, relevant forum discussion: - https://www.pythonanywhere.com/forums/topic/2145 - https://www.pythonanywhere.com/forums/topic/1420 El jueves, 30 de abril de 2015, 5:22:11 (UTC-5), Ismae

Re: [julia-users] Re: Scope of variables in julia

2015-04-30 Thread Zheng Wendell
@David, your code is the same as case 4. @Tom, no, in case 3, all *z*'s have local scope (of *for* loop), even the *z* in function *g()*. Ref: the issue cited by @mauro On Thu, Apr 30, 2015 at 1:15 AM, Tom Breloff wrote: > This "solves" the problem because z is now local to g. I don't think it

[julia-users] Re: initializing arrays of tuples in julia 0.4

2015-04-30 Thread Alex
You can use Compat.jl : julia> Compat.@compat Tuple{Int,Int}[(z, 2z) for z in 1:3] 3-element Array{(Int64,Int64),1}: (1,2) (2,4) (3,6) (this is for 0.3; without @compat I get Array{(Any...,),1}) Best, Alex. On Thursday, 30 April 2015 11:53:32 UTC+2, Jim Garrison wrote: > > In Julia 0.3, I c

Re: [julia-users] Possible bug in @spawnat or fetch?

2015-04-30 Thread Sam Kaplan
Thanks Amit! In the GitHub issue that you posted I'll add a link to back to this thread. On Wednesday, April 29, 2015 at 10:40:54 PM UTC-5, Amit Murthy wrote: > > Simpler case. > > julia> function test2() >@async x=1 >x = 2 >end > > test2 (generic function with 1

Re: [julia-users] Re: Scope of variables in julia

2015-04-30 Thread Zheng Wendell
1) Response about the scope The following example in the issue cited by @mauro is an advanced issue about the scope, and somewhat related to the case here: ``` foo1=1 let foo2=1 f2() = (foo1=6; foo2=6) @assert f2()==6 @assert foo1==1 # hard scope @assert foo2==6 # soft scope end

[julia-users] Re: Performance of Distributed Arrays

2015-04-30 Thread Alex
Hi, I can't say anything regarding the performance of Distributed Arrays. However, note that they have been relocated from Base to a separate package: https://github.com/JuliaParallel/DistributedArrays.jl which should work with 0.4-dev. Best, Alex. On Thursday, 30 April 2015 12:10:47 UTC+2,

Re: [julia-users] Re: Scope of variables in julia

2015-04-30 Thread Sisyphuss
I filed an issue: https://github.com/JuliaLang/julia/issues/11065 >

Re: [julia-users] performance of functions

2015-04-30 Thread Sebastian Good
@anon is a nice piece of functionality but translating it to work post-tupocalypse turns out to be more than I can currently grok! Tuples of types aren’t types anymore so the mechanics of the @generated functions require some changing. Wish I could help; any hints? On April 30, 2015 at 5:30:57 A

Re: [julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Isaiah Norton
I am guessing there is some other error further back. Try `make -j1` so it fails immediately. On Thu, Apr 30, 2015 at 6:22 AM, Ismael VC wrote: > Hello everyone! > > I’m trying to build Julia at PythonAnywhere > , and the build fails because of: > > CC src/fli

Re: [julia-users] Re: Newbie help... First implementation of 3D heat equation solver VERY slow in Julia

2015-04-30 Thread Angel de Vicente
Viral Shah writes: > You may see some better performance with julia 0.4-dev. The other > thing to do that is easy is to start julia with the -O option that > enables some more optimizations in the JIT, that may or may not help. thanks for the tip. the -O option works only in 0.4, right? -- Ánge

[julia-users] PyPlot plots not showing in IJulia

2015-04-30 Thread axsk
Using IJulia i get the following result: In [1]: using PyPlot x = linspace(0,2*pi,1000) y = sin(3*x + 4*cos(2*x)); plot(x, y, color="red", linewidth=2.0, linestyle="--") Out[1]: 1-element Array{Any,1}: PyObject Unfortunately, no plot image is shown. I am using the current Julia nightly,

Re: [julia-users] performance puzzle: linux vs osx

2015-04-30 Thread Isaiah Norton
> > 40 days old master The recent tuple changes (#10380) were merged after that and represent a very substantial change, so comparing top-of-trunk to a 40-day old version isn't very useful. I would suggest to try a comparably recent (ideally identical) build under the VM before drawing any conclu

[julia-users] Re: Performance of Distributed Arrays

2015-04-30 Thread Jake Bolewski
DistributedArray performance is pretty bad. The reason for removing them from base was to spur their development. All I can say at this time is that we are actively working on making their performance better. For every parallel program you have implicit serial overhead (this is especially tru

Re: [julia-users] performance of functions

2015-04-30 Thread Tim Holy
Didn't realize it needed updating, so thanks for the bug report. I poked around a bit, and I agree it's not entirely straightforward. I'll try to get to it soon. --Tim On Thursday, April 30, 2015 10:21:20 AM Sebastian Good wrote: > @anon is a nice piece of functionality but translating it to wo

[julia-users] how to dispatch on an instance being a datatype

2015-04-30 Thread Tamas Papp
This is toy problem that came up in the context of something larger, reduced to be simple so that I can ask about it more easily. Suppose I want to implement the function is_instanceof_datatype(x) = is(typeof(x),DataType) using dispatch: a default method that is is_instanceof_datatype(x) = fals

[julia-users] Re: Performance of Distributed Arrays

2015-04-30 Thread Jake Bolewski
Also, you want to map(fetch, refs) not pmap. With that i get better speedup (still not great, but at least > 2x with 8 processors) julia> N=100;T=1000;A=rand(3,N);@time SimulationSerial(A,N,T) elapsed time: 1.822478028 seconds (233 kB allocated) julia> N=100;T=1000;dA=drand(3,N);@time

[julia-users] Re: how to dispatch on an instance being a datatype

2015-04-30 Thread Tom Breloff
Is this what you're looking for? julia> yyy(x::DataType) = true yyy (generic function with 1 method) julia> yyy(x) = false yyy (generic function with 2 methods) julia> yyy(Int) true julia> yyy(5) false On Thursday, April 30, 2015 at 11:04:02 AM UTC-4, Tamas Papp wrote: > > This is toy p

Re: [julia-users] how to dispatch on an instance being a datatype

2015-04-30 Thread Isaiah Norton
Are you aware of the `isa` function? isa(x,Foo) isa(x,DataType) etc. The context is that I want to write a method that, for instances of > DataTypes, returns the slots in a given order, but for other values it > does something else, and I don't know how to do this. What slots are you referring

[julia-users] type stable leading_zeros etc.

2015-04-30 Thread Sebastian Good
Recent 0.4 changes made expressions like Int32(1) + Int32(2) type stable, i.e returning Int32 instead of Int64 as they did previously (on a 64-bit system, anyway). However leading_zeros seems to always return an Int64. I wonder if it makes sense to convert the result of leading_zeros to the same

[julia-users] Re: PyPlot plots not showing in IJulia

2015-04-30 Thread axsk
I now discovered that calling gcf() in the end of the cell shows the plot. But this way I am just able to plot one plot, so this still is not the solution. On Thursday, April 30, 2015 at 4:40:10 PM UTC+2, axsk wrote: > > Using IJulia i get the following result: > > In [1]: > > using PyPlot > > x

[julia-users] Re: Problem building packages with dependencies

2015-04-30 Thread Peter Simon
To follow up: As suggested in the manual , I copied the package root directory from another (virtual) machine specially set up with the same operating system and identical file system org

Re: [julia-users] Closed variable stops "working" after modules are reloaded

2015-04-30 Thread Isaiah Norton
Running `reload` twice, or simply replacing `reload` with `include`, gives the expected behavior. If you look at `@code_typed m2.f(d)` before and after the second `reload`, you will see that after the second `reload`, `m2.f(d)` is actually closing over `d`: start: julia> @code_lowered m2.f(d) 1

[julia-users] Re: performance puzzle: linux vs osx

2015-04-30 Thread Spencer Lyon
Thanks for the tip. I rebuilt my docker image to have a 1-day old master and am getting the same results (see updated gist). So, unfortunately the puzzle isn't resolved yet... On Wednesday, April 29, 2015 at 4:50:03 PM UTC-4, Spencer Lyon wrote: > > I ran into strange performance issues in an

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Michael Francis
My goal is not to remove namespaces, quite the opposite, for types a namespace is an elegant solution to resolving the ambiguity between different types of the same name. What I do object to is that functions (which are defined against user defined types) are relegated to being second class cit

[julia-users] Re: Naming convention

2015-04-30 Thread Scott Jones
On Wednesday, April 29, 2015 at 3:10:03 PM UTC-4, Simon Danisch wrote: > > I haven't read the full discussion, but I think there is a very elegant > solution for these problems (pretty sure it has been mentioned somewhere). > Just internally use very Julian functions which make the best of multi

Re: [julia-users] Import statements

2015-04-30 Thread Kevin Squire
Hi Bill, This should work, so if it doesn't, there's likely a bug. Can you give a minimal example of the problem? What is the output of versioninfo()? Cheers, Kevin On Thu, Apr 30, 2015 at 1:48 AM, Bill Hart wrote: > We used to have the following in our code > > import Base: convert, prom

Re: [julia-users] Re: Performance of Distributed Arrays

2015-04-30 Thread Angel de Vicente
Hi Jake, Jake Bolewski writes: > DistributedArray performance is pretty bad. The reason for removing > them from base was to spur their development. All I can say at this > time is that we are actively working on making their performance > better. OK, thanks. Should I try with the DistributedA

Re: [julia-users] Re: Newbie help... First implementation of 3D heat equation solver VERY slow in Julia

2015-04-30 Thread Angel de Vicente
Angel de Vicente writes: > Viral Shah writes: >> You may see some better performance with julia 0.4-dev. The other >> thing to do that is easy is to start julia with the -O option that >> enables some more optimizations in the JIT, that may or may not help. > > thanks for the tip. the -O optio

[julia-users] Re: the state of GUI toolkits?

2015-04-30 Thread Max Suster
I too would love to have a Qt5.jl package. Having such a robust and cross-platform GUI interface would make many projects more attractive to (non-expert) outsiders coming into Julia. I have been meaning to find time for this, but wrapping the whole of Qt5 alone is quite a project. . . Perhaps,

Re: [julia-users] Re: Scope of variables in julia

2015-04-30 Thread Tom Breloff
I actually wonder if the bug is that Versions 1 and 4 *should* produce an error, but they secretly work. In your version 1: for i=1:2 if i>=2; println(z); end z="Hi" end z should be local to each iteration of the loop, so I think the second pass should produce an undefined error. Se

Re: [julia-users] Re: Newbie help... First implementation of 3D heat equation solver VERY slow in Julia

2015-04-30 Thread Patrick O'Leary
On Thursday, April 30, 2015 at 11:29:15 AM UTC-5, Ángel de Vicente wrote: > > Angel de Vicente writes: > > > Viral Shah writes: > >> You may see some better performance with julia 0.4-dev. The other > >> thing to do that is easy is to start julia with the -O option that > >> enables some more

[julia-users] Re: the state of GUI toolkits?

2015-04-30 Thread Tom Breloff
I would consider contributing, since I 1) would like to use it, and 2) want to learn more about integrating with C++. My problem is that I've never seen or used Qt5 before, only Qt4. So I'd need someone else to take the lead. On Thursday, April 30, 2015 at 12:34:13 PM UTC-4, Max Suster wrote:

Re: [julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Ismael VC
Thank yo very much Isaiah, I've just did `make clean && make` again and I still get the same error: ``` Making install in SYM CC src/jltypes.o CC src/gf.o CC src/support/hashing.o CC src/support/timefuncs.o CC src/support/ptrhash.o CC src/support/operators.o CC src/sup

[julia-users] Re: PyPlot plots not showing in IJulia

2015-04-30 Thread Nils Gudat
Copy-pasting your code produces the plot for me as expected, have you tried Pkg.update()?

Re: [julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Ismael VC
If anyone is interested in checking out the console session, just send me a message to ismael.vc1...@gmail.com, thanks! El jueves, 30 de abril de 2015, 11:59:13 (UTC-5), Ismael VC escribió: Thank yo very much Isaiah, I've just did `make clean && make` again and I > still get the same error: >

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Tom Breloff
Can anyone point me in the right direction of the files/functions in the core library where dispatch is handled? I'd like to explore a little so I can make comments that account for the relative ease at implementing some of the changes suggested. I agree that it would be really nice, in some

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Isaiah Norton
> > Can anyone point me in the right direction of the files/functions in the > core library where dispatch is handled? I'd like to explore a little so I > can make comments that account for the relative ease at implementing some > of the changes suggested. > Start here: https://github.com/JuliaLa

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Mauro
>> Can anyone point me in the right direction of the files/functions in the >> core library where dispatch is handled? I'd like to explore a little so I >> can make comments that account for the relative ease at implementing some >> of the changes suggested. >> > > Start here: > https://github.com

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Tom Breloff
Bookmarked and watching. Thanks :) On Thursday, April 30, 2015 at 1:39:54 PM UTC-4, Mauro wrote: > > >> Can anyone point me in the right direction of the files/functions in > the > >> core library where dispatch is handled? I'd like to explore a little > so I > >> can make comments that acc

[julia-users] Out-of-memory errors

2015-04-30 Thread Páll Haraldsson
In 0.3.5. julia> @time sum(rand(1)) ERROR: MemoryError() in rand at random.jl:123 julia> gc() julia> @time sum(rand(1)) elapsed time: 4.127246913 seconds (80168 bytes allocated, 0.83% gc time) 4.999858681707974e7 julia> gc() julia> @time sum(rand(10)) # ten time m

Re: [julia-users] type stable leading_zeros etc.

2015-04-30 Thread Stefan Karpinski
I'm not sure why the result of leading_zeros should be of the same type as the argument. What's the use case? On Thu, Apr 30, 2015 at 11:23 AM, Sebastian Good < sebast...@palladiumconsulting.com> wrote: > Recent 0.4 changes made expressions like Int32(1) + Int32(2) type stable, > i.e returning In

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Matt Bauman
On Thursday, April 30, 2015 at 1:11:27 PM UTC-4, Tom Breloff wrote: > > I agree that it would be really nice, in some cases, to auto-merge > function definitions between namespaces (database connects are very simple > OO example). However, if 2 different modules define foo(x::Float64, > y::Int

Re: [julia-users] Re: Scope of variables in julia

2015-04-30 Thread Mauro
On Thu, 2015-04-30 at 18:37, Tom Breloff wrote: > I actually wonder if the bug is that Versions 1 and 4 *should* produce an > error, but they secretly work. In your version 1: > > for i=1:2 > if i>=2; println(z); end > z="Hi" > end > > z should be local to each iteration of the loop,

Re: [julia-users] type stable leading_zeros etc.

2015-04-30 Thread Sebastian Good
Existing compiler intrinsics work this way (__lzcnt, __lzcnt64, __lzcnt16), It came up for me in the following line of code in StreamingStats     ρ(s::Uint32) = uint32(uint32(leading_zeros(s)) + 0x0001) The outer uint32 is no longer necessary in v0.4 because the addition no longer expands 3

Re: [julia-users] type stable leading_zeros etc.

2015-04-30 Thread Sebastian Good
And I guess as a matter of practicality, a vectorized leading_zeros instruction should leave its results in the same sized registers as it started, or it would only be possible on Int64s, though I don’t know if LLVM is doing that just yet. On April 30, 2015 at 2:36:53 PM, Sebastian Good (sebast.

[julia-users] readtable produce wrong column name

2015-04-30 Thread Li Zhang
hi all, I first use writetable to write a dataframe to a csv file. some of the column names are "(somename)", or "name & other". the output csv file showed exact name headers, but when i use readtable to read the csv file back to a dataframe, column names become "_somename_" and "name_other".

Re: [julia-users] readtable produce wrong column name

2015-04-30 Thread Jacob Quinn
DataFrame column names must be valid Julia identifiers, so readtable does the conversion when reading data in. -Jacob On Thu, Apr 30, 2015 at 12:43 PM, Li Zhang wrote: > hi all, > > I first use writetable to write a dataframe to a csv file. some of the > column names are "(somename)", or "name

[julia-users] icc/icpc options

2015-04-30 Thread Oleg Mikulchenko
Hi, Is there the right way to setup Intel compiler's options in Make.inc for building Julia with icc and MKL? E.g. I would like to use AVX2 options. I has tried to add them to some pieces in Make.inc, but didn't see options at compiling by icpc/icc/

Re: [julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Isaiah Norton
The underlying issue is that uv_exepath [1] fails, leading to flisp being unable to find where it is running [2], which leads to the error message you observed. >From some cursory googling, my I guess this is an issue with the PythonAnywhere docker and/or apparmor configuration. Clearly it is poss

Re: [julia-users] icc/icpc options

2015-04-30 Thread Stefan Karpinski
Just so you're aware, changing C compilers would have no impact on performance of your Julia code – Julia code is always generated by LLVM, no matter what C compiler you use for Julia's small C code base. Changing BLAS to MKL is supported and will have an effect on BLAS operations. On Thu, Apr 30,

[julia-users] Re: icc/icpc options

2015-04-30 Thread Oleg Mikulchenko
Thank you, actually I was expected that answer.

Re: [julia-users] Re: icc/icpc options

2015-04-30 Thread Isaiah Norton
Note that we turn off AVX2 in the default configuration because LLVM 3.3 codegen with AVX2 on was badly broken on Haswell: https://github.com/JuliaLang/julia/blob/dea3d0e42029af05f58a0069491238462382e591/src/codegen.cpp#L5418-L5421 On Thu, Apr 30, 2015 at 3:20 PM, Oleg Mikulchenko wrote: > Thank

[julia-users] Interact.jl widgets does not show up when IJulia and Ipython updated to the latest version

2015-04-30 Thread Li Zhang
anyone have same problems? or an issue needs to be filed.

[julia-users] Re: readtable produce wrong column name

2015-04-30 Thread Li Zhang
but in my original dataframe, julia doesn't complain when i add a column using df[symbol("(somename)")]=dataarray. On Thursday, April 30, 2015 at 2:43:19 PM UTC-4, Li Zhang wrote: > > hi all, > > I first use writetable to write a dataframe to a csv file. some of the > column names are "(somename

Re: [julia-users] Building sysimg error with multi-core start

2015-04-30 Thread Pavel
Hi Rene, Good point about the worker startup flags, will keep that in mind. In my case however that does not seem to be the problem as I am overwriting the default image (doing that in a Docker container so it is fine to mess things up and play). Narrowed down the problem to one specific packa

[julia-users] Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Páll Haraldsson
Hi, [As a best language is subjective, I'll put that aside for a moment.] Part I. The goal, as I understand, for Julia is at least within a factor of two of C and already matching it mostly and long term beating that (and C++). [What other goals are there? How about 0.4 now or even 1.0..?] W

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Tom Breloff
I think it's a good thing to spell out precise scenarios where "using" multiple modules at the same time is good and unambiguous, and when you can get in trouble. If anything, it gives developers an idea of the edge cases that need to be handled and can help in thinking about design changes an

[julia-users] broadcast comparison operators

2015-04-30 Thread Alexandros Fakos
Hi, Why the following commands give different results? julia> broadcast(.==,[1.0],[0.0,1.0]) 2-element Array{Float64,1}: 0.0 1.0 julia> repmat([1.0],2,1).==[0.0,1.0] 2x1 BitArray{2}: false true How can I use broadcast for array comparisons (with a bit array as output)? Thanks, Alex

[julia-users] function similar to matlab tabulate

2015-04-30 Thread Alexandros Fakos
Hi, Is there a way to get a table of frequencies of the unique values in an array in Julia? Something like matlab's tabulate Thanks a lot, Alex

Re: [julia-users] Build error: could not open \"flisp.boot\".

2015-04-30 Thread Ismael VC
Thank you very much Isaiah, I will report this to PythonAnywhere, have a nice day! On Thu, Apr 30, 2015 at 2:07 PM, Isaiah Norton wrote: > The underlying issue is that uv_exepath [1] fails, leading to flisp being > unable to find where it is running [2], which leads to the error message > you ob

Re: [julia-users] function similar to matlab tabulate

2015-04-30 Thread René Donner
Hi, I am not aware of a built-in function, but this should do the trick: a = ["a","a","b","c","c","c","d"] d = Dict() for x in a d[x] = get!(d,x,0) + 1 end for k in sort(collect(keys(d))) println("Value $k with count $(d[k])") end Cheers, Rene Am 30.04.2015 um 20:35 schr

[julia-users] Re: function similar to matlab tabulate

2015-04-30 Thread Johan Sigfrids
countmap in the StatsBase.jl package does this. On Thursday, April 30, 2015 at 11:11:37 PM UTC+3, Alexandros Fakos wrote: > > Hi, > > Is there a way to get a table of frequencies of the unique values in an > array in Julia? > Something like matlab's tabulate > > Thanks a lot, > Alex >

Re: [julia-users] Re: function similar to matlab tabulate

2015-04-30 Thread Milan Bouchet-Valat
Le jeudi 30 avril 2015 à 13:41 -0700, Johan Sigfrids a écrit : > countmap in the StatsBase.jl package does this. There's also https://github.com/nalimilan/Tables.jl/ > On Thursday, April 30, 2015 at 11:11:37 PM UTC+3, Alexandros Fakos > wrote: > Hi, > > > Is ther

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Scott Jones
On Wednesday, April 29, 2015 at 11:36:15 PM UTC-4, MA Laforge wrote: > > *Scott and Michael:* > I am pretty certain I understand what you are saying, but I find your > examples/descriptions a bit confusing. I think (hope) I know why Stafan is > confused. > > *Stefan:* > I think Scott has a val

[julia-users] Re: the state of GUI toolkits?

2015-04-30 Thread Max Suster
Good to hear interest. I will also have to look at what might be a good strategy for wrapping Qt5 with Cxx. The core functionality of Qt5 (shared by Qt4) would be an obvious place to start. The part that is clearly daunting is the interface for event handling, namely signals and slots. Not only

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Stefan Karpinski
On Wed, Apr 29, 2015 at 9:08 PM, Scott Jones wrote: > Your restrictions are making it very hard to develop easy to use APIs that > make sense for the people using them… > > That’s why so many people have been bringing this issue up… > Not a single person who maintains a major Julia package has c

[julia-users] Re: function similar to matlab tabulate

2015-04-30 Thread Alexandros Fakos
Thanks a lot. countmap returns a dictionary but I would prefer an array. How can I do that? Thank you On Thursday, April 30, 2015 at 4:41:43 PM UTC-4, Johan Sigfrids wrote: > > countmap in the StatsBase.jl package does this. > > On Thursday, April 30, 2015 at 11:11:37 PM UTC+3, Alexandros Fakos

[julia-users] Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Ivar Nesje
That was lots of questions. I'll answer one. >I know to get the best speed, 0.4 is needed. Still, (for the above) what are >the problems for 0.3? Have most of the fixed speed issues been backported? Is >Compat.jl needed (or have anything to do with speed?) I think slicing and >threads stuff (an

Re: [julia-users] Re: the state of GUI toolkits?

2015-04-30 Thread Isaiah Norton
> > The part that is clearly daunting is the interface for event handling, > namely signals and slots. There is a WIP clang plugin designed to replace moc. Worth keeping an eye on. https://github.com/woboq/moc-ng On Thu, Apr 30, 2015 at 4:59 PM, Max Suster wrote: > Good to hear interest. I wil

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Stefan Karpinski
On Thu, Apr 30, 2015 at 12:19 PM, Michael Francis wrote: > My goal is not to remove namespaces, quite the opposite, for types a > namespace is an elegant solution to resolving the ambiguity between > different types of the same name. What I do object to is that functions > (which are defined agai

[julia-users] Macro to generate function signature

2015-04-30 Thread David Gold
I'm working (in 3.7) on a function that takes two functions f and g as inputs, merges all non-conflicting methods of f and g into one function h, and returns h. I'm trying to use macros to generate the signatures of each method for h: macro argsgen(typle, n::Int64) y = eval(:($typle)) x

[julia-users] Re: .jl to .exe

2015-04-30 Thread Páll Haraldsson
[People answered literally.] As answered, "cross-compile" no, but is it really a problem? You would just install Julia on Windows (and Mac OS X, etc.) and compile from there. I assume it's possible in this indirect way to cross-compile in any direction. I assume the script works on all platform

Re: [julia-users] Re: Defining a function in different modules

2015-04-30 Thread Stefan Karpinski
On Thu, Apr 30, 2015 at 12:15 AM, MA Laforge wrote: > Stefan, > > I am sorry, but my experience leads me to disagree with your statement > that Julia is unable to dispatch a function dynamically (@ runtime). > I didn't say this – all function calls are dispatched dynamically. > ...So your stat

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Scott Jones
Maybe because it seems that a lot of the major packages have been put into Base, so it isn't a problem, as MA Laforge pointed out, leading to Base being incredibly large, with stuff that means Julia's MIT license doesn't mean all that much, because it includes GPL code by default... Scott On T

[julia-users] Re: .jl to .exe

2015-04-30 Thread Páll Haraldsson
> > A Windows license - I assume you could use Wine. > I wasn't clear for those who do not know Wine. It's a way to not have to have a Windows license. It helps you run Windows software on Linux (and Mac OS X I think). It can't handle all software. I think it should handle Julia (didn't check)

Re: [julia-users] broadcast comparison operators

2015-04-30 Thread Stefan Karpinski
The broadcast function assumes that the output array is the same type as the input arrays. You can do something like this with the mutating broadcast! function: julia> broadcast!(==, falses(2,2), [1,2], [2,1]') 2x2 BitArray{2}: false true true false Also, you can just use the .== function,

[julia-users] Re: Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Sisyphuss
This post interests me. I'll write something here to follow this post. The performance gap between normal code in Python and badly-written code in Julia is something I'd like to know too. As far as I know, Python interpret does some mysterious optimizations. For example `(x**2)**2` is 100x faste

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Stefan Karpinski
This is not why Base is so large – it's large because people expect technical computing environments to be "batteries included" and to just work without having to install additional stuff. On Thu, Apr 30, 2015 at 5:26 PM, Scott Jones wrote: > Maybe because it seems that a lot of the major packag

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Stefan Karpinski
See also Matlab, R and typical SciPy distros, all of which are huge. There's an open issue to shrink Base and move a lot of functionality into modules which are separate but available by default: https://github.com/JuliaLang/julia/issues/5155. There's nothing technical standing in the way of this i

Re: [julia-users] type stable leading_zeros etc.

2015-04-30 Thread Stefan Karpinski
Yeah, this seems like a reasonable change. If you want to make a PR, this shouldn't be too hard. Change the relevant definitions, run `make testall` and see what breaks, fix it, repeat. It will potentially cause some breakage in packages, but this is a good time for that and it shouldn't be too bad

Re: [julia-users] broadcast comparison operators

2015-04-30 Thread Alexandros Fakos
Thank you so much Stefan. I feel like an idiot that I didn't try [1.0] .== [0.0,1.0] at first Best, Alex On Thursday, April 30, 2015 at 5:31:52 PM UTC-4, Stefan Karpinski wrote: > > The broadcast function assumes that the output array is the same type as > the input arrays. You can do somethin

Re: [julia-users] Re: Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Páll Haraldsson
I wouldn't expect a difference in Julia for code like that (didn't check). But I guess what we are often seeing is someone comparing a tuned Python code to newbie Julia code. I still want it faster than that code.. (assuming same algorithm, note row vs. column major caveat). The main point of mine

[julia-users] Re: Macro to generate function signature

2015-04-30 Thread Peter Brady
If you can include the function name in the macro argument list this should work julia> macro repper(fname, args...) ex = Expr(:call, fname) for (i, arg) in enumerate(args) push!(ex.args, Expr(:(::), symbol("x$i"), arg)) end ex end ju

Re: [julia-users] Macro to generate function signature

2015-04-30 Thread Isaiah Norton
The reduced case is: h((x1::Int64,x2::Int64)...) = x1+1 Which doesn't work, because the "..." conflicts with the vararg syntax (the error message is admittedly not very good). I would suggest to generate the entire function from your macro, in which case you can just splice the tuple in and ever

[julia-users] Re: Macro to generate function signature

2015-04-30 Thread Peter Brady
Looks like I deleted my post. If you can include the function name in the macro argument list this should work julia> macro repper(fname, args...) ex = Expr(:call, fname) for (i, arg) in enumerate(args) push!(ex.args, Expr(:(::), symbol("x$i"), arg))

Re: [julia-users] Re: Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Scott Jones
Yes... Python will win on string processing... esp. with Python 3... I quickly ran into things that were > 800x faster in Python... (I hope to help change that though!) Scott On Thursday, April 30, 2015 at 6:01:45 PM UTC-4, Páll Haraldsson wrote: > > I wouldn't expect a difference in Julia for c

[julia-users] Re: Performance variability - can we expect Julia to be the fastest (best) language?

2015-04-30 Thread Ali Rezaee
They were interesting questions. I would also like to know why poorly written Julia code sometimes performs worse than similar python code, especially when tuples are involved. Did you say it was fixed? On Thursday, April 30, 2015 at 9:58:35 PM UTC+2, Páll Haraldsson wrote: > > Hi, > > [As a be

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Scott Jones
It might be nice to do the following: Have a Julia-lite build, that only has core stuff (by core, I’d still have all the tuples, arrays, numeric and string types, i/o, documentation, etc., but not the esoteric math stuff… but that with a single import (or package add, whatever), could load up al

Re: [julia-users] Defining a function in different modules

2015-04-30 Thread Scott Jones
Ah, but SciPy != Python… it is more analogous to what I proposed… you have normal Python, and SciPy with the numerical functionality preloaded… Scott > On Apr 30, 2015, at 5:48 PM, Stefan Karpinski wrote: > > See also Matlab, R and typical SciPy distros, all of which are huge. There's > an op

  1   2   >