Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-15 Thread Zheng Wendell
By the way, if you use JuliaBox for your teaching. Don't forget to announce it to the Julia team, so that they can get more funding to maintain it. Disclaimer: I have no relation with the Julia team. On Fri, Apr 15, 2016 at 8:50 PM, Daniel Carrera

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Zheng Wendell
np.array([a[i] for i in [1,2,4] + list(range(7,17,2))]) This works, albeit awkward. Python was not originally designed for mathematics. On Tue, Apr 5, 2016 at 10:40 AM, DNFwrote: > Thanks for the suggestion, but that returns a list, not an array. Also I > wanted a mix of arbitrary indices and

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Zheng Wendell
You can use list compression in python [a[i] for i in [1,2,4,7,9] ] On Apr 5, 2016 8:55 AM, "DNF" <> wrote: > > Typo, I meant to type: > > Python 3.5 > a[i*len(a)//n:(i+1)*len(a)//n] > > Julia: > a[1+i*end÷n:(i+1)end÷n] > > I'm just learning Python, and must say I find indexing in Python to be

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-04 Thread Zheng Wendell
Yes, let's return to the OP. Note that what the author *really wants* is to get the i-th potion of an array. Either integer division or 0-based alone can't solve this problem. a[i*100/n : (i+1)*100/n] needs both features. As Eric puts it, user-written code can be as efficient as the built-in

Re: [julia-users] Julia version mismatch

2016-02-08 Thread Zheng Wendell
After `make cleanall`, the problem is solved. Thanks! @Mauro

Re: [julia-users] Difference between Juno/LT & Juno/Atom

2016-01-20 Thread Zheng Wendell
Wish that this IDE will be released as archive like LightTable.

Re: [julia-users] Re: `(,a) = (1,2)` returns an error

2015-11-24 Thread Zheng Wendell
On Tue, Nov 24, 2015 at 2:21 PM, Steven G. Johnson wrote: > > > On Tuesday, November 24, 2015 at 8:16:39 AM UTC-5, Sisyphuss wrote: >> >> I didn't know the convention that _ is used as any superfluous >> assignment. So I can write `_ = a; a = b; b = _` for integer swap? >> > > Yes, but you can

Re: [julia-users] Re: `(,a) = (1,2)` returns an error

2015-11-24 Thread Zheng Wendell
I didn't know the convention that _ is used as any superfluous assignment. So I can write `_ = a; a = b; b = _` for integer swap? On Mon, Nov 23, 2015 at 7:28 PM, Seth wrote: > Why not simply > > _, x, _, y = f() > > ? This seems easier to read and understand. _ is a valid variable but is >

Re: [julia-users] Re: Define an objective function type

2015-11-22 Thread Zheng Wendell
I was waiting for someone others to comment on it. But since no one did it, I'll try it. Your solution is just fine for personal use. But imagine that you are making an application working on ObjectiveFunction. For your clients to profit from your application, they should inherit a concrete type

Re: [julia-users] Re: Creating a stable version of Julia + Packages for a semester long course?

2015-11-17 Thread Zheng Wendell
Just curious about when JIT compiles the code during the runtime, at what directory it stores? On Mon, Nov 16, 2015 at 10:33 PM, Sheehan Olver wrote: > I guess if the students are limited to the pre-assigned packages all > running on the same machine, then the cache can

Re: [julia-users] Re: Naming convention

2015-10-09 Thread Zheng Wendell
I think what the community standards object is not the sexualization, but more generally the anthropomorphism. On Fri, Oct 9, 2015 at 12:14 AM, Stefan Karpinski wrote: > On Thu, Oct 8, 2015 at 10:03 PM, Carlos Pita > wrote: > >> this is specially

Re: [julia-users] Re: Juno + Julia 0.4

2015-09-26 Thread Zheng Wendell
0.4-rc1, Juno takes forever to compile a function. On Tue, Sep 15, 2015 at 2:05 PM, Mike Innes wrote: > Actually, I've spent some time over the last couple days updating Jewel > etc. to work with Julia v0.4 as well as 0.3. The Juno/LT bundles will > probably be around

Re: [julia-users] Re: printing UInt displays hex instead of decimal

2015-09-20 Thread Zheng Wendell
`b` is a 2-dimensional array. On Sun, Sep 20, 2015 at 9:59 PM, Jesse Johnson wrote: > That is part of the inconsistency I was referring to. IMO a single default > representation for a value should be used everywhere. > > Further, in 0.4rc1 there seems to be another,

Re: [julia-users] Re: IDE for Julia

2015-09-17 Thread Zheng Wendell
I mean without installation (no need of root permission). On Thu, Sep 17, 2015 at 11:19 AM, Daniel Carrera wrote: > What's a portable version? You mean like in a USB stick? > > Cheers, > Daniel. > > On 17 September 2015 at 11:18, Sisyphuss wrote: >

Re: [julia-users] Slicing DataFrames resets indexes

2015-08-24 Thread Zheng Wendell
If the index is so important to you, you should have included an index (ID number, city name, date, etc) for it, instead of relying on the row number output on the fly. On Mon, Aug 24, 2015 at 6:28 PM, Robert Smith rsmith31...@gmail.com wrote: In my opinion, when you did `df[20:50,:]`, you

Re: [julia-users] Re: [Vectorization] Comparison of codes

2015-05-08 Thread Zheng Wendell
@Steven, we are not talking about the same thing. You are talking about vectorizing the code, while I am talking about vectorizing the function. On Fri, May 8, 2015 at 8:23 PM, Steven G. Johnson stevenj@gmail.com wrote: On Friday, May 8, 2015 at 12:30:57 PM UTC-4, Sisyphuss wrote: The

Re: [julia-users] [Vectorization] Comparison of codes

2015-05-08 Thread Zheng Wendell
@Tim, can I explicitly deactivate the inline functionality ? On Fri, May 8, 2015 at 7:11 PM, Tim Holy tim.h...@gmail.com wrote: Yes, function get inlined within certain limits. You can check by using @code_typed and looking for :call expressions (@code_typed includes the inlining pass).

Re: [julia-users] Re: [Vectorization] Comparison of codes

2015-05-08 Thread Zheng Wendell
We are thinking about the same thing ! On Fri, May 8, 2015 at 9:14 PM, Tomas Lycken tomas.lyc...@gmail.com wrote: I guess the real benefit comes from being able to define f!(b, a), which means you can save the allocation of memory for the result (by re-using memory you have from elsewhere).

Re: [julia-users] Re: [Vectorization] Comparison of codes

2015-05-08 Thread Zheng Wendell
mean by vectorizing the function. Can you explain? On Fri, May 8, 2015 at 2:55 PM, Zheng Wendell zhengwend...@gmail.com wrote: @Steven, we are not talking about the same thing. You are talking about vectorizing the code, while I am talking about vectorizing the function. On Fri, May 8, 2015

Re: [julia-users] Re: Question: f(x::AbstractArray) == f{T:Any}(x::AbstractArray{T}) ?

2015-05-05 Thread Zheng Wendell
I understand now. Thanks for you two! On Tue, May 5, 2015 at 2:45 PM, Alex alexc...@googlemail.com wrote: So in the example above, the type parameter is redundant. However, in the following example, type parameter is not redundant, is it? ``` f(x::AbstractArray(Real)) !=

Re: [julia-users] Re: look into function source code

2015-05-05 Thread Zheng Wendell
Thank you very much! On Tue, May 5, 2015 at 10:40 AM, Alex alexc...@googlemail.com wrote: You can also use `@less` and`@edit` instead of `@which`. Sometimes the line numbers are off and you don't get the full function code though (might have been fixed in 0.4). Best, Alex. On Tuesday, 5

Re: [julia-users] Re: Question: f(x::AbstractArray) == f{T:Any}(x::AbstractArray{T}) ?

2015-05-05 Thread Zheng Wendell
So in the example above, the type parameter is redundant. However, in the following example, type parameter is not redundant, is it? ``` f(x::AbstractArray(Real)) != f{T:Real}(x::AbstractArray{T}) ? ``` On Tue, May 5, 2015 at 10:35 AM, Alex alexc...@googlemail.com wrote: Is the type parameter

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 t...@breloff.com wrote: This solves the problem because z is now local to g. I

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

2015-04-30 Thread Zheng Wendell
related to the design (the origin of the high performance) of Julia, I don't think it to be easily solved. On Thu, Apr 30, 2015 at 1:05 PM, Zheng Wendell zhengwend...@gmail.com wrote: @David, your code is the same as case 4. @Tom, no, in case 3, all *z*'s have local scope (of *for* loop), even

Re: [julia-users] Re: constant-type global

2015-04-27 Thread Zheng Wendell
Ah, OK. Currently, the constant-value global doesn't prevent the user to change its value, it only gives a warning. This makes me think that it _is_ a constant-type global. Imaging that when the constant-type global finally comes out, the behavior of constant-value global will also change -- it

Re: [julia-users] Re: constant-type global

2015-04-27 Thread Zheng Wendell
when possible since redefining constants is often handy for reloading code during development. On Apr 27, 2015, at 9:14 AM, Zheng Wendell zhengwend...@gmail.com wrote: Ah, OK. Currently, the constant-value global doesn't prevent the user to change its value, it only gives a warning. This makes

Re: [julia-users] How long will it take to build v0.4 if I already have built a v0.3

2015-04-26 Thread Zheng Wendell
Thanks to you two! Your responses are very clear. On Sun, Apr 26, 2015 at 8:21 PM, Jameson Nash vtjn...@gmail.com wrote: (of course, if you decide that you actually want git to clean up any untracked files and get back to a pristine repository state, `clean -fdx git reset --hard

Re: [julia-users] Float32() or float32() ?

2015-04-24 Thread Zheng Wendell
Thanks, Patrick ! Frightened by the word unstable, I do not dare to use it anymore. Expecting the version 0.4 to be released soon! On Fri, Apr 24, 2015 at 3:13 PM, Patrick O'Leary patrick.ole...@gmail.com wrote: The master branch of the git repository is currently version 0.4-dev, which is in