Re: [julia-users] how to do push! on a fieldname?

2016-10-10 Thread K leo
Thanks so much Mauro. That does it. On Monday, October 10, 2016 at 10:58:30 PM UTC+8, Mauro wrote: > > Try > > for fl in fieldnames(myt) >push!(getfield(myt,fl), 0.) > end > > `fieldnames` returns the name of the field as a symbol, thus your error. > > On M

[julia-users] how to do push! on a fieldname?

2016-10-10 Thread K leo
I hope to expand all arrays in a type using something like the following: fields=fieldnames(myType) > for i=1:length(fields) > push!(fields[i], 0.) > end But I get error saying no method matching push!(::Symbol, ::Float64) What else can I do for my purpose?

Re: [julia-users] Is there a way to export all functions defined in a module?

2016-09-29 Thread K leo
s; see <https://github.com/simonster/Reexport.jl>. > > -erik > > On Thu, Sep 29, 2016 at 5:35 PM, K leo <cnbi...@gmail.com > > wrote: > >> without retyping all the names. >> > > > > -- > Erik Schnetter <schn...@gmail.com > > http://www.perimeterinstitute.ca/personal/eschnetter/ >

[julia-users] Is there a way to export all functions defined in a module?

2016-09-29 Thread K leo
without retyping all the names.

[julia-users] Re: Any 0.5 performance tips?

2016-09-28 Thread K leo
Just discovered a few days ago that keyword arguments in functions are very slow, but I guess they are not slower in 0.5. On Thursday, September 29, 2016 at 10:15:20 AM UTC+8, Andrew wrote: > > My large project is much (3-4x?) slower under 0.5. I know there are a > variety of open issues about

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread K leo
ClobberingReload")`, it should > automatically remove IJulia and its dependencies. > > BTW, if you haven't tried IJulia/Jupyter notebooks, I would strongly > recommend giving it a shot. It's the #2 most popular Julia package for a > reason. > > Cédric > > On W

[julia-users] Re: help understanding different ways of wrapping functions

2016-09-28 Thread K leo
anual. > > Den onsdag 28 september 2016 kl. 06:29:37 UTC+2 skrev K leo: >> >> I tested a few different ways of wrapping functions. It looks different >> ways of wrapping has slightly different costs. But the most confusing to >> me is that putting everything inline l

[julia-users] Re: "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-28 Thread K leo
(3) # returns x = 3 > B.f(3) # returns x + 1 = 3 + 1 > > > > On Sunday, September 25, 2016 at 3:15:57 PM UTC+2, K leo wrote: >> >> I get a few warning messages like this often. Does it mean that >> DataFrames package need to be updated, or that I need to do something in my >> user code? >> >

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-27 Thread K leo
On Wednesday, September 28, 2016 at 12:53:12 PM UTC+8, K leo wrote: > > This a very heavy install. It's fetching tons of things that I have not > used. Not sure what they are, but seems like trashing my system. > julia> Pkg.clone("git://github.com/cstjean/Clobbering

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-27 Thread K leo
This a very heavy install. It's fetching tons of things that I have not used. Not sure what they are, but seems like trashing my system. On Wednesday, September 28, 2016 at 4:30:32 AM UTC+8, Cedric St-Jean wrote: > > Yeah, it's because of IJulia, sorry about that. I need it to support >

[julia-users] help understanding different ways of wrapping functions

2016-09-27 Thread K leo
I tested a few different ways of wrapping functions. It looks different ways of wrapping has slightly different costs. But the most confusing to me is that putting everything inline looks much faster than wrapping things up. I would understand this in other languages, but I thought Julia

[julia-users] help understanding memory allocation results

2016-09-26 Thread K leo
I did a memory allocation analysis with "julia --track-allocation=user", and got a strange result about a statement (below). Can anyone help me understand what that means? The function is pretty short and is called from within a loop with "i". - function M_CPB(i::Int, strsys::StrSys;

[julia-users] "both DataArrays and StatsBase export "rle"; uses of it in module DataFrames must be qualified"

2016-09-25 Thread K leo
I get a few warning messages like this often. Does it mean that DataFrames package need to be updated, or that I need to do something in my user code?

[julia-users] Is there a way to download a copy of Plots' documentation?

2016-09-25 Thread K leo
in epub or even in pdf

Re: [julia-users] Re: Dict get destroys global variable?

2016-09-22 Thread K leo
Thank you Isaiah for pointing that out! On Friday, September 23, 2016 at 12:06:17 PM UTC+8, Isaiah wrote: > > Use `global a = ...` > Please see: > http://docs.julialang.org/en/latest/manual/variables-and-scoping/#hard-local-scope > > global variables are only inherited for reading but not for

[julia-users] Re: Dict get destroys global variable?

2016-09-22 Thread K leo
Sorry, this is not related to Dict at all. If I replace the "a=get..." statement with simply "a=2", the global variable is no longer accessible. What is wrong? On Friday, September 23, 2016 at 11:52:24 AM UTC+8, K leo wrote: > > Calling "get" anywhere i

[julia-users] Dict get destroys global variable?

2016-09-22 Thread K leo
Calling "get" anywhere in a function makes a global variable undefined. Can anyone please help explaining the following? 1) without calling "get", the global variable is fine: a=0 > > Dicta = Dict{Int,Int}() > > function testGlobal() > > println(a) > > merge!(Dicta, Dict(1=>1)) > > #

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-21 Thread K leo
know. > > > calling (Sundials.jl). Pulling the dev version of Sundials.jl fixed the > > issue for me. > > And good to know it's fixed. > > > > > K Leo, if you are using any external library, that may be the cause of > the > > memory leak you are seeing.

[julia-users] Re: Does Julia 0.5 leak memory?

2016-09-21 Thread K leo
allocates memory when it runs and those memory are not getting released even after the code has finished. I will try to see if I can cook up some demo code. On Wednesday, September 21, 2016 at 9:53:07 PM UTC+8, Páll Haraldsson wrote: > > On Sunday, September 18, 2016 at 12:53:19 PM UTC,

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-20 Thread K leo
manually but that didn't do anything either. > > -Luke > > On Monday, September 19, 2016 at 3:08:52 PM UTC-7, K leo wrote: >> >> The only package used (at the global level) is DataFrames. Does that not >> release memory? >> >> On Tuesday, September 20,

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
The only package used (at the global level) is DataFrames. Does that not release memory? On Tuesday, September 20, 2016 at 6:05:58 AM UTC+8, K leo wrote: > > No. After myfunction() finished and I am at the REPL prompt, top shows > Julia taking 49%. And after I did gc(), it shows Jul

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
September 19, 2016 at 3:55:14 PM UTC-4, K leo wrote: >> >> Thanks for the suggestion about valgrind. >> >> Can someone please let me first understand the expected behaviour for >> memory usage. >> >> Let's say when I first starts Julia REPL it takes

[julia-users] Re: How to deal with methods redefinition warnings in 0.5?

2016-09-19 Thread K leo
To me, these methods redefinition warnings are pretty annoying - there are zillions of them. Why should they be there? Look, when I do a include again, I know I am overriding those methods in my file. On Monday, September 12, 2016 at 9:50:27 PM UTC+8, K leo wrote: > > After c

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-19 Thread K leo
Thanks for the suggestion about valgrind. Can someone please let me first understand the expected behaviour for memory usage. Let's say when I first starts Julia REPL it takes 5% of RAM (according to top). Then I include "myfile.jl" and run myfunction(). During the execution of

[julia-users] Re: What is the best way to element-wise right shift an array?

2016-09-18 Thread K leo
OK, ran a test. And the difference is pretty dramatic. Look: | | |_| | | | (_| | | Version 0.5.0-rc4+0 (2016-09-09 01:43 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release |__/ | x86_64-pc-linux-gnu julia> include("testArray.jl") julia> testShift()

Re: [julia-users] Does Julia 0.5 leak memory?

2016-09-18 Thread K leo
I am also wondering what information I should look into. On Sunday, September 18, 2016 at 9:30:00 PM UTC+8, Yichao Yu wrote: > > > Impossible to tell without any information provided. >

[julia-users] Does Julia 0.5 leak memory?

2016-09-18 Thread K leo
I run Julia through repl. The procedure is simple: include("myfile.jl"), then run myfunction() (I might do a Ctrl-C to interrupt the function), edit something in myfile.jl, then repeat. Initially, julia processes normally take less than 10% RAM, then after some time, one main Julia process

[julia-users] What is the best way to element-wise right shift an array?

2016-09-18 Thread K leo
I have been using simply A=[0; A[1:end-1]], but found it to be somehow quite expensive. I saw that there is unshift! but it has to be followed up with deleteat! to make the array the same size, i.e. there need to be two operations. So how can I get a better performance doing the shift?

Re: [julia-users] Does anyone know how jl_calls may have to do with SIGUSER1?

2016-09-12 Thread K leo
UTC+8, Yichao Yu wrote: > > > > On Mon, Sep 12, 2016 at 10:03 AM, K leo <cnbi...@gmail.com > > wrote: > >> I put the following lines in my C++ code. These are only executed once >> near the beginning of the code >> and run fine. There are no

[julia-users] Does anyone know how jl_calls may have to do with SIGUSER1?

2016-09-12 Thread K leo
I put the following lines in my C++ code. These are only executed once near the beginning of the code and run fine. There are no other julia related statements in the code. But with the presence of these statements in the code, whenever the code does some communications requests on the

[julia-users] Re: How to deal with methods redefinition warnings in 0.5?

2016-09-12 Thread K leo
After calling workspace(), there are even a lot of warnings regarding methods in packages. On Monday, September 12, 2016 at 6:57:47 PM UTC+8, felip...@gmail.com wrote: > > Try calling workspace() before repeating include.

[julia-users] How to deal with methods redefinition warnings in 0.5?

2016-09-11 Thread K leo
I see the new behavior in 0.5 when I do include("file.jl") again on REPL, I get a bunch of warnings about methods definition overwritten. What can I do? Am I supposed to be able to include("file.jl") after I modify something in it?

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-11 Thread K leo
Thanks so much for the guide, Bart. Will study. On Monday, September 12, 2016 at 5:18:52 AM UTC+8, Bart Janssens wrote: > > On Sun, Sep 11, 2016 at 2:47 AM K leo <cnbi...@gmail.com > > wrote: > >> Hi Bart, >> >> These are meant to call Julia code

Re: [julia-users] Re: There is very little overhead calling Julia from C++

2016-09-11 Thread K leo
Sorry, how to tell from these numbers that using jl_call from C++ is about 25 times slower than using ccall from Julia? On Monday, September 12, 2016 at 5:33:02 AM UTC+8, Bart Janssens wrote: > > On Fri, Sep 9, 2016 at 1:40 AM Steven G. Johnson > wrote: > >> Except that in

Re: [julia-users] How does garbage collection really work in Julia?

2016-09-10 Thread K leo
Thanks for clearing. I see that I used wrong word, "clear" instead of "collect". Then can I rephrase my questions below: On Sunday, September 11, 2016 at 9:31:35 AM UTC+8, Yichao Yu wrote: > > > > On Sat, Sep 10, 2016 at 8:00 PM, K leo <cnbi...@gmail.c

Re: [julia-users] Is JL_GC_PUSH not allowed to be nested?

2016-09-10 Thread K leo
Then how do we protect different objects that get allocated at different points in code? On Sunday, September 11, 2016 at 9:33:00 AM UTC+8, Yichao Yu wrote: > > > > No, there can only be one `JL_GC_PUSH` in a C scope (and the corresponding > `JL_GC_POP` must happen before the program exit from

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
Hi Bart, These are meant to call Julia code from C++. You mentioned "there may be easier ways using Cxx.jl or CxxWrap.jl". Are the two packages only for calling C/C++ from Julia, and not the otherway around? Am I missing something? On Saturday, September 10, 2016 at 3:38:27 AM UTC+8, Bart

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
Hi Bart, Do you think "jl_A" should also be rooted as it is later used as the argument? On Saturday, September 10, 2016 at 3:38:27 AM UTC+8, Bart Janssens wrote: > > > > On Fri, Sep 9, 2016 at 6:44 PM Isaiah Norton > wrote: > >>// construct a TestType instance >> >>

[julia-users] Is JL_GC_PUSH not allowed to be nested?

2016-09-10 Thread K leo
I tried to nest the GC pairs (JL_GC_PUSH, JL_GC_POP), but got some compile errors regarding julia.h. In file included from test6.cpp:11:0: > test6.cpp: In function ‘int main(int, char**)’: > /home/xxx/Software/julia-9c76c3e89a/include/julia/julia.h:609:19: error: > redeclaration of ‘void*

Re: [julia-users] How does garbage collection really work in Julia?

2016-09-10 Thread K leo
On Sunday, September 11, 2016 at 7:35:41 AM UTC+8, Yichao Yu wrote: > > > > On Sat, Sep 10, 2016 at 6:46 PM, K leo <cnbi...@gmail.com > > wrote: > >> Thanks for the reply. A couple questions: >> > >> 1) When I quit Julia and do a fresh s

Re: [julia-users] How does garbage collection really work in Julia?

2016-09-10 Thread K leo
that may not be obvious; for example, JIT compilation uses > memory because julia code is compiled by julia code. > > > > Best, > > --Tim > > > > On Saturday, September 10, 2016 7:05:18 AM CDT K leo wrote: > > > Let's say in REPL you define an object

[julia-users] How does garbage collection really work in Julia?

2016-09-10 Thread K leo
Let's say in REPL you define an object, then after many many other operations, Julia's GC wouldn't free the object you defined earlier until you exit Julia or you somehow really run out of memory or something. Is that the correct understanding? Now I am trying to think what happens with the

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
On Saturday, September 10, 2016 at 9:12:10 PM UTC+8, Yichao Yu wrote: > > > > On Sat, Sep 10, 2016 at 8:53 AM, K leo <cnbi...@gmail.com > > wrote: > >> julia-config.jl is hardly useful at all. I unpacked the Linux binary of >> Julia (0.5) in ~/Software/j

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
I need to add "-L/home/djia/Software/julia-9c76c3e89a/lib/julia -lLLVM-3.7.1" into the script cooked up based on julia-config output, and then it works. Should I file an issue on julia-config? On Saturday, September 10, 2016 at 8:53:39 PM UTC+8, K leo wrote: > > julia-con

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
be set. > g++ -o test -fPIC -I$JULIA_DIR/include/julia test6.cpp -L$JULIA_DIR/lib/ -L$JULIA_DIR/lib/julia -lLLVM-3.7.1 -ljulia $JULIA_DIR/lib/julia/libstdc++.so.6 On Saturday, September 10, 2016 at 7:06:34 PM UTC+8, Yichao Yu wrote: > > > > On Sat, Sep 10, 2016 at 6:56 AM, K

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread K leo
gt; Op za 10 sep. 2016 02:36 schreef K leo <cnbi...@gmail.com >: > >> Bart, >> >> Can you explain what you mean by "need to be rooted"? The jl_new_struct >> statement as Isaiah suggested works, why do we need the additional >> statements as you suggested? >> >>> > > > >>>

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-09 Thread K leo
Bart, Can you explain what you mean by "need to be rooted"? The jl_new_struct statement as Isaiah suggested works, why do we need the additional statements as you suggested? On Saturday, September 10, 2016 at 3:38:27 AM UTC+8, Bart Janssens wrote: > > > > On Fri, Sep 9, 2016 at 6:44 PM

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-09 Thread K leo
oxing, and rooting. The embedding section of the manual > is designed to provide an overview, but ultimately you are going to have to > read and grok the Julia source to get every little detail. > > On Fri, Sep 9, 2016 at 9:23 AM, K leo <cnbi...@gmail.com > > wrote: > &

[julia-users] Re: basic question on structuring modules

2016-09-09 Thread K leo
The module name needs to be the same as the file, so in this case you need to change the function name. On Friday, September 9, 2016 at 9:29:48 PM UTC+8, Neal Becker wrote: > > Let's say I have a simple module which contains 1 function called "foo" > > I might create foo.jl that contains > >

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-09 Thread K leo
table on julia side, and change function signature > to 'Ptr{TestType}'; or allocate a 'jl_value_t*' with the correct type tag, > and > set the fields. > > On Friday, September 9, 2016, K leo <cnbi...@gmail.com > > wrote: > >> I tried the following, it compiles O

[julia-users] How to use jl_call1 with a struct argument?

2016-09-09 Thread K leo
I tried the following, it compiles OK and runs OK, but it appears the julia function is not called (because there is no output from the println statement). What is wrong? #include > #include > using namespace std; > struct TestType { > double a; > double b; > }; > int main(int argc,

[julia-users] Re: There is very little overhead calling Julia from C++

2016-09-08 Thread K leo
> with C. On Thursday, September 8, 2016 at 12:43:30 PM UTC+8, K leo wrote: > > I just did a test of calling a Julia function 100,000 times, both from > Julia and from C++. The execution times are very close. The results are > as follows. This is on Xubuntu

Re: [julia-users] calling julia functions in C++

2016-09-08 Thread K leo
16 at 1:26:54 AM UTC+8, Isaiah wrote: > > As far as I can tell, everything in this thread is covered in the > embedding section [http://docs.julialang.org/en/latest/manual/embedding/] > except for the note about `jl_load` usage. Care to make a pull-request? ;) > > On Thu

[julia-users] There is very little overhead calling Julia from C++

2016-09-07 Thread K leo
I just did a test of calling a Julia function 100,000 times, both from Julia and from C++. The execution times are very close. The results are as follows. This is on Xubuntu 16.04 64bits. ***Julia ** | | |_| | | | (_| | | Version 0.5.0-rc3+0 (2016-08-22 23:43 UTC)

Re: [julia-users] calling julia functions in C++

2016-09-07 Thread K leo
Thank you. This just saved my day. Can someone please put this intro in the documentation? On Tuesday, June 30, 2015 at 11:58:18 PM UTC+8, Isaiah wrote: > > try > > jl_value_t * mod = (jl_value_t*)jl_eval_string("mymodule"); > jl_function_t * func =

[julia-users] Re: ran into problem compiling C embedded with julia using mingw-w64 gcc on windows

2016-09-07 Thread K leo
I just ran that example on Ubuntu with Julia 0.5. I found I did have to change a few things to make it run. export JULIA_DIR= export JULIA_HOME=$JULIA_DIR/bin export PATH=$JULIA_HOME:$PATH export LD_LIBRARY_PATH=$JULIA_DIR/lib:$LD_LIBRARY_PATH And when I compile it, I used the following

[julia-users] Further on calling C++ from Julia or vice versa

2016-09-07 Thread K leo
Upon studying the C++ API that I will need to use, I found that it specifies many virtual member functions which are callback functions that are invoked by the API library based upon different events. The user (I) will need to overload these virtual functions based on needs, which appears to be

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-06 Thread K leo
Sorry, only the '+' before '=', no '+' at the beginning. Correct way: LIB_DEPENDENCY += $(LIBDIR)/lib$(LLVM_LIB_NAME).$(SHLIB_EXT) On Tuesday, September 6, 2016 at 2:08:54 PM UTC+8, K leo wrote: > > in deps/BuildBootstrap.Makefile, put '+' in the line so it becomes as >

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-06 Thread K leo
e error. > > Uwe > > On Sunday, September 4, 2016 at 6:22:36 AM UTC+2, K leo wrote: >> >> The error of adding Cxx was eliminated by changing small bits in the >> makefile. It builds successfully. I am so surprised to find that it is >> such a huge package with

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-03 Thread K leo
The error of adding Cxx was eliminated by changing small bits in the makefile. It builds successfully. I am so surprised to find that it is such a huge package with over 1GB in size. On Sunday, September 4, 2016 at 6:41:28 AM UTC+8, K leo wrote: > > Thanks very much for the advise. &

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-03 Thread K leo
INFO: Package database updated On Saturday, September 3, 2016 at 9:17:38 AM UTC+8, Steven G. Johnson wrote: > > > > On Friday, September 2, 2016 at 8:51:21 PM UTC-4, K leo wrote: >> >> While the majority of my analytics are in Julia, I will need to use an >> external even

[julia-users] Re: Can someone please update Winston?

2016-09-03 Thread K leo
auckas has said there has been some development work, > so hopefully, that will work. > > On Friday, August 26, 2016 at 10:04:22 PM UTC, K leo wrote: >> >> so that it works with version 0.5. > >

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-02 Thread K leo
I need to add that the target OS is Ubuntu. On Saturday, September 3, 2016 at 8:51:21 AM UTC+8, K leo wrote: > > While the majority of my analytics are in Julia, I will need to use an > external event handling API which is implemented in C++. It looks that I > have two optio

[julia-users] Is it better to call Julia from C++ or call C++ from Julia?

2016-09-02 Thread K leo
While the majority of my analytics are in Julia, I will need to use an external event handling API which is implemented in C++. It looks that I have two options: 1) write the main code in C++ with the API and call Julia function for analytics; 2) write the main code also in Julia that work

[julia-users] Re: Can someone please update Winston?

2016-08-27 Thread K leo
plotting backend without changing your plot commands. > > But I can see that, although Winston hasn't been tagged in almost a year, > there has been some development work. Have you tried > Pkg.checkout("Winston")? > > On Friday, August 26, 2016 at 3:04:22 PM UTC-7, K leo wrote: >> >> so that it works with version 0.5. > >

[julia-users] Can someone please update Winston?

2016-08-26 Thread K leo
so that it works with version 0.5.

[julia-users] Why is "collect" better than "[]"?

2016-06-06 Thread K leo
Why deprecate array concatenation with "[]" and suggest to use "collect"? It requires more typing and makes code less elegant. What do we really gain with inefficiency? Also using "[]" directly in REPL does not have problem, but including code generates warning. Why?

Re: [julia-users] What does "include" really do?

2016-05-02 Thread K leo
a parameter value, etc. How can I time the time spent on include? On Monday, May 2, 2016 at 10:07:17 PM UTC+5:30, Yichao Yu wrote: > > > On May 2, 2016 12:07 PM, "K leo" <cnbi...@gmail.com > wrote: > > > > Did you imply that repeating "inclu

Re: [julia-users] What does "include" really do?

2016-05-02 Thread K leo
Did you imply that repeating "include" at the REPL should not slow it down? On Monday, May 2, 2016 at 9:10:58 PM UTC+5:30, Yichao Yu wrote: > > include parse and eval the file in current module. > > Without detail (and I mean very detail, not just a sentence or two > about what it does) about

[julia-users] What does "include" really do?

2016-05-02 Thread K leo
When I test my programs, I often do include("myprog.jl") on the REPL after editing the program. What I found is that after I do this enough times, response to the "include" becomes slow at the REPL. What is happening?

[julia-users] Re: What are the best ways to define scenarios?

2016-04-29 Thread K leo
stants > Create a function that operates on that type that carries out the scenario. > > loop (or map (or pmap)) through an array of the aforementioned type, > applying the aforementioned function. > > > On Friday, 29 April 2016 09:15:40 UTC+8, K leo wrote: >> >> Each

[julia-users] What are the best ways to define scenarios?

2016-04-28 Thread K leo
Each scenario has the same set of constants but with different values. I would like to loop through all these scenarios. What are the best ways to handle this?

[julia-users] What to do with those Gadfly warning/error messages?

2016-04-25 Thread K leo
Plots work, but there are a lot of messages print out to REPL. What can I do about them? See below. $ juliag _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread K leo
Looking through the linear standard functions list in the documentation, I think perhaps the only function used is linreg. I don't directly use LAPACK. On Sunday, April 24, 2016 at 9:18:36 PM UTC+5:30, Milan Bouchet-Valat wrote: > > Le dimanche 24 avril 2016 à 08:44 -0700, K leo a

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread K leo
; for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.5 (2016-03-18 00:58 UTC) _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release |__/ | x86_64-unknown-linux-gnu On Sunday, April 24, 2016 at 7:18:48 PM UTC+5:30, Milan Bouchet-Valat wrote: > > Le dimanche 24 avril 2016 à 05

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-24 Thread K leo
See below. On Sunday, April 24, 2016 at 4:01:49 PM UTC+5:30, Milan Bouchet-Valat wrote: > > Le samedi 23 avril 2016 à 18:10 -0700, K leo a écrit : > > > Le samedi 23 avril 2016 à 04:52 -0700, K leo a écrit : > > > Anyway, > > > the Ubuntu PPA is no longer mai

Re: [julia-users] Re: implications of using the precompiled "generic linux binary" vs building julia myself?

2016-04-24 Thread K leo
-Valat wrote: > > Le samedi 23 avril 2016 à 18:23 -0700, K leo a écrit : > > I also would like to know about what to do with the lib folder. Can > > someone explain? There is no README with Linux generic version. > You just need to extract the whole contents of the archive

[julia-users] Re: implications of using the precompiled "generic linux binary" vs building julia myself?

2016-04-23 Thread K leo
I also would like to know about what to do with the lib folder. Can someone explain? There is no README with Linux generic version. On Thursday, July 23, 2015 at 7:52:36 AM UTC+5:30, David Kao wrote: > > What did you do with the generic build? > > I can take the bin/julia and run it, but I am

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-23 Thread K leo
On Saturday, April 23, 2016 at 7:01:45 PM UTC+5:30, Milan Bouchet-Valat wrote: > > Le samedi 23 avril 2016 à 04:52 -0700, K leo a écrit : > Anyway, > the Ubuntu PPA is no longer maintained. The recommended solution is to > use generic Linux binaries from the Julia website.

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-23 Thread K leo
or the Julia version. So given the little difference in time, perhaps the conclusion is Ubuntu 16.04 is more efficient using hardware resources. Any comments? On Thursday, April 21, 2016 at 8:35:31 PM UTC+5:30, K leo wrote: > > > > On Thursday, April 21, 2016 at 8:21:14 PM UTC+5:3

Re: [julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-21 Thread K leo
On Thursday, April 21, 2016 at 8:21:14 PM UTC+5:30, Yichao Yu wrote: > > On Thu, Apr 21, 2016 at 10:39 AM, K leo <cnbi...@gmail.com > > wrote: > > Prior to running Ubuntu 16.04, I get Julia from the PPA, and run it > simply > > like: > > > >&g

[julia-users] Why Ubuntu 16.04 version runs only on one CPU?

2016-04-21 Thread K leo
Prior to running Ubuntu 16.04, I get Julia from the PPA, and run it simply like: > julia Then when I run julia code, "top" shows CPU usage of Julia as something like 200% (I have two cores). Now on 16.04, julia only runs upto 100% of CPU. The version of julia is said to maintained by "Ubuntu

[julia-users] round(Int, typemin(Float64))

2016-04-20 Thread K leo
julia> round(Int, typemin(Float64)) ERROR: InexactError() in round at ./float.jl:181 Should this be handled this way? Or is it better to make round(Int, typemin(Float64)) to be typemin(Int)? Also, why is typemin(Float64) -Inf but typemin(Int) -9223372036854775808? Can typemin(Int) be made -Inf

[julia-users] Re: an error with DataFrames on Ubuntu 16.04 64bits

2016-04-18 Thread K leo
The PPA version. On Monday, April 18, 2016 at 9:51:44 AM UTC+5:30, Tony Kelman wrote: > > Where is your Julia build from?

[julia-users] an error with DataFrames on Ubuntu 16.04 64bits

2016-04-17 Thread K leo
Run my julia code for the first time after setting julia up on Ubuntu 16.04, I got the following errors: INFO: Precompiling module DataFrames... ERROR: LoadError: LoadError: error compiling anonymous: could not load library "libz" libz: cannot open shared object file: No such file or directory

[julia-users] Atom package autocomplete-julia missing?

2016-04-17 Thread K leo
The package is no longer available. Does anyone know why?

[julia-users] Re: causes of system crash?

2016-04-14 Thread K leo
, 2016 at 4:25:52 PM UTC+5:30, K leo wrote: > > These couple weeks I ran julia (0.4.5) on a Xubuntu guest of VirtualBox > hosted by a Macbook Pro. During the hour-long runs, the system crashed a > few times: user interface froze. This has happened a few times in the past > when I ran

Re: [julia-users] causes of system crash?

2016-04-10 Thread K leo
to say both Xubuntu and OSX have the same problem, but that becomes a hard argument. On Sunday, April 10, 2016 at 4:47:55 PM UTC+5:30, Milan Bouchet-Valat wrote: > > Le dimanche 10 avril 2016 à 16:25 +0530, K leo a écrit : > No program should be able to crash the whole system. So this really

Re: [julia-users] Is there a way to convert function name to a string?

2016-04-09 Thread K leo
y to be a good solution > unless you really, really know what you are doing. Perhaps if you > explained what you want to achieve you would get suggestions for better > solutions. > > Best, > > Tamas > > > On Sat, Apr 09 2016, K. leo wrote: > > >

[julia-users] Is there a way to convert function name to a string?

2016-04-08 Thread K leo
Say a function is named FuncA. I hope to get this name into a string like "FuncA". Is there a way to do that?

[julia-users] Re: how should I really define const to avoid redefining warning?

2016-04-05 Thread K leo
> I wonder in what cases the warnings show. I try to make a simple case where I have just one file called "testConst.jl" in which I have the following 2 lines: [code] const A=12 println(A) [\code] Everytime I modify the file and include it on the REPL, I don't get warning of redefining

Re: [julia-users] how should I really define const to avoid redefining warning?

2016-04-05 Thread K leo
t code into a module, and use `using` to load the module. > > After updating a module, I use `workspace()` to remove all previous > definition in the REPL: > > `workspace(); using FunHPC` > > -erik > > > On Tue, Apr 5, 2016 at 9:13 AM, K leo <cnbi...@gmail.com >

[julia-users] how should I really define const to avoid redefining warning?

2016-04-05 Thread K leo
I have some const defined in various files in the following way: [code]const AConst=1[/code] Everytime after I modify something in the files (constants remain unchanged) and include a file on Julia's REPL, I always get a bunch warnings about redefining constants. Repeating the process many time

[julia-users] Is Ubuntu's PPA needed for installing Julia?

2016-04-01 Thread K leo
So the PPA has not been maintained for many months. I tried to download a Linux generic version of Julia and it appears to work well on my Xubuntu 15.10 64bits. So my question is do we really need the PPA to install Julia?

[julia-users] Re: how to move Julia packages from Ubuntu to OSX?

2015-06-18 Thread K leo
Fantastic Eliot - thank you. That problem is resolved! BTW, does anyone know what the following message is about: *julia **using Winston* Warning: could not import Base.Text into Tk On Tuesday, June 16, 2015, Elliot Saba staticfl...@gmail.com wrote: Congratulations! You have helped me

[julia-users] Re: how to move Julia packages from Ubuntu to OSX?

2015-06-14 Thread K leo
Adding Winston individually succeeded. But I still get the font problem. Looks the same as before. === julia using Winston ploWarning: could not import Base.Text into Tkt julia plot(1:3) (process:73606): Pango-WARNING **:

[julia-users] problem adding Winston on OSX 10.10.3

2015-06-14 Thread K leo
that works for dependencies that need to be in the search path. In the mean time, to get it to work, you can install xz (e.g., `brew install xz`, if you use homebrew outside of Julia). Cheers, Kevin On Sat, Jun 13, 2015 at 5:19 PM, K leo cnbiz...@gmail.com wrote: In another message I

[julia-users] problem adding Winston on OSX 10.10.3

2015-06-13 Thread K leo
In another message I mentioned about the troubles I have with moving packages from Ubuntu to the Mac. To further understand about the problems, I now experiment to add packages individually in a new ~/.julia directory. The first package to add is Winston. It has trouble building Cairo with the

[julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-13 Thread K leo
hi Elliot, Thanks for the detailed message. Strangely, when I did BinDeps.debug(Cairo), I got: ERROR: BinDeps not defined. Also strangely, when I did 'brew rm pango, I got: Error: No such keg: /usr/local/Cellar/pango What is wrong?

[julia-users] how to move Julia packages from Ubuntu to OSX?

2015-06-13 Thread K leo
first; that will import the package. That is pretty strange; let's see what BinDeps has to say. -E On Sat, Jun 13, 2015 at 4:49 AM, K leo cnbiz...@gmail.com wrote: hi Elliot, Thanks for the detailed message. Strangely, when I did BinDeps.debug(Cairo), I got: ERROR: BinDeps not defined

  1   2   >