[julia-users] Re: multiple dispatch for operators

2016-10-08 Thread Sisyphuss
`LRmatrix.__add__`. However, 3) does not work because `np.ndarray.__add__` has higher priority than `LRmatrix.__radd__`. In this case, it will be awkward to use an `add` function to wrap them. On Saturday, October 8, 2016 at 8:35:19 AM UTC+2, Sisyphuss wrote: > > You mean:

[julia-users] Re: multiple dispatch for operators

2016-10-08 Thread Sisyphuss
to do the right > thing wouldn't you be changing the semantics? > > Gabriel > > On Friday, October 7, 2016 at 3:51:11 AM UTC-6, Sisyphuss wrote: > >> In Julia, we can do multiple dispatch for operators, that is the >> interpreter can identify: >> float + integ

Re: [julia-users] Re: multiple dispatch for operators

2016-10-08 Thread Sisyphuss
onkeypatch numpys __mul__ method to do the right >> thing wouldn't you be changing the semantics? >> >> Gabriel >> >> On Friday, October 7, 2016 at 3:51:11 AM UTC-6, Sisyphuss wrote: >> >>> In Julia, we can do multiple dispatch for operators, that is the

[julia-users] multiple dispatch for operators

2016-10-07 Thread Sisyphuss
In Julia, we can do multiple dispatch for operators, that is the interpreter can identify: float + integer integer + integer integer + float float + float as well as *user-defined* data structure. Recently, I am working on Python (I have no choice because Spark hasn't yet a Julia binding). I

[julia-users] Re: Julia Reference Card

2016-09-07 Thread Sisyphuss
There is no Section 3? On Wednesday, September 7, 2016 at 12:04:29 AM UTC+2, john lynch wrote: > > Thanks for the compliment. I have fixed it in the pdf and the associated > odt. >

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

2016-08-29 Thread Sisyphuss
On Monday, August 29, 2016 at 4:26:44 PM UTC+2, Daniel Carrera wrote: > > On 29 August 2016 at 16:07, Chris Rackauckas > wrote: > >> That's exactly the reason why it's a good idea. The backends aren't >> swappable, but the code is. And for the most part that means you can

Re: [julia-users] Re: A Very Simple Benchmark for Brutal-force Loops in Several Languages: revised, Julia is fast!

2016-08-01 Thread Sisyphuss
Julia is not as "mature" as VBA, which prevents "analysts" of large firms adopting it. In addition, they will be happier to continue using global variables. On Monday, August 1, 2016 at 8:14:37 AM UTC+2, Eric Forgy wrote: > > I mentioned to Prof. Edelman (only half jokingly) at an event in >

Re: [julia-users] ANN: steps towards 0.5.0 release [candidates]

2016-07-15 Thread Sisyphuss
It seems to me that it is the same terminology (RC) as *Battle for Wesnoth.* On Friday, July 15, 2016 at 10:37:19 AM UTC+2, Scott Jones wrote: > > I agree, and it does seem there is a bit of a problem with the > nomenclature that the Julia team is using, which doesn't match industry > wide

[julia-users] Re: A Very Simple Benchmark for Brutal-force Loops in Several Languages: revised, Julia is fast!

2016-07-11 Thread Sisyphuss
It's surprising to see Python so slow and Matlab so fast. Python: maybe it will get much faster when using comprehension? Matlab: does the JIT compiler translate the loops to C? On Monday, July 11, 2016 at 2:09:28 PM UTC+2, David Barton wrote: > > For reference, with Matlab 2016a: 4.97 sec;

[julia-users] Re: When Julia v1.0 will be released?

2016-07-08 Thread Sisyphuss
You should really double (if not triple) the time when estimating. This is a rule of thumb. The technologies keep moving, and it is hard to tell whether Julia1.0 milestone will include new features. Even when Julia1.0 comes out, there are still issues on ecosystem and the documentation.

[julia-users] Re: Drop element from tuple

2016-06-25 Thread Sisyphuss
Why not use `vector`? On Friday, June 24, 2016 at 4:16:49 PM UTC+2, jw3126 wrote: > > I have a Tuple and I want to drop its ith element (e.g. construct a new > tuple with the same elements, except the ith is missing). For example > > (1,2,3,4) , 1 --> (2,3,4) > (1,2,3,4) , 3 --> (1,2,4) >

Re: [julia-users] utils

2016-05-18 Thread Sisyphuss
.jl (methods shared across modules). It's > all roughly the same to me. > > On Saturday, May 14, 2016, Sisyphuss <zhengw...@gmail.com > > wrote: > >> But what does "Utilities" mean? >> >> I plan to put all my small functions frequently used by all ot

[julia-users] Re: utils

2016-05-14 Thread Sisyphuss
But what does "Utilities" mean? I plan to put all my small functions frequently used by all other pieces of code into a single file. Is it the right file name for it? On Friday, May 13, 2016 at 7:11:45 PM UTC+2, Kristoffer Carlsson wrote: > > Utilities.

[julia-users] utils

2016-05-13 Thread Sisyphuss
In many repository, we can find a file naming "utils". What does it stands for? Some small functions used frequently and everywhere?

[julia-users] Re: Julia Utopia: Share your tips and tricks to efficient coding in Julia

2016-05-13 Thread Sisyphuss
I use jupyter notebook in an aggressive way. I consider working in Atom when it releases its Linux portable version (at least without installing). I use `print` and `@show`. But I find the format of `@show` for matrix is not very friendly. And I agree with Tamas. I also program with a very

Re: [julia-users] Re: Julia large project example.

2016-05-13 Thread Sisyphuss
In Debug.jl: module Debug include("AST.jl")using Debug.AST end After the `include`, `AST` is already in `Debug.jl`'s global scope, why it needs to `using Debug.AST` instead of `using AST`? On Friday, May 13, 2016 at 12:25:43 AM UTC+2, Tim Holy wrote: > > It's been a while, but long ago I

Re: [julia-users] Re: Julia large project example.

2016-05-12 Thread Sisyphuss
I think what is missing in the docs is something like "package design guideline". On Thursday, May 12, 2016 at 10:16:53 PM UTC+2, Scott Jones wrote: > > Very good advice - is anything like it already in the Julia docs? If not, > it should be added, up near the beginning. > > On Thursday, May

Re: [julia-users] Re: Julia large project example.

2016-05-12 Thread Sisyphuss
This sure is valuable advice. But I'm not sure whether in v1.0, it will be the same case. On Thursday, May 12, 2016 at 10:10:22 PM UTC+2, Tom Breloff wrote: > > I find the most valuable thing to do when designing julia code is to focus > purely on "verbs", not "nouns". This means focusing on

[julia-users] Re: Julia large project example.

2016-05-12 Thread Sisyphuss
I have tried to use Julia module as static class. According to my experience, it is doable. You cannot have two modules of the same names though. When it comes to your example, it means you can't have two apples (this apple and that apple). I am afraid you should use immutable Apple type.

[julia-users] Re: [ANN] Book: Julia High Performance

2016-05-11 Thread Sisyphuss
I notice the book cost 31.18 euros. Has the discounted period been past? BTW, when Julia upgrades to v0.5, v0.6,..., v1.0, is this book still valid? On Tuesday, May 3, 2016 at 1:17:57 AM UTC+2, Avik Sengupta wrote: > > Just wanted to let you know about the new book discussing the design and >

[julia-users] Re: [ANN] Spark.jl - Julia interface to Apache Spark

2016-04-15 Thread Sisyphuss
Starred it. On Friday, April 15, 2016 at 12:00:17 AM UTC+2, Andrei Zh wrote: > > Spark.jl provides Julia bindings for Apache Spark - by far the most > popular computational framework in Hadoop ecosystem. Find it at: > > > https://github.com/dfdx/Spark.jl > > > There's still *a lot* of work to

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

2016-04-15 Thread Sisyphuss
The doc of Julia is far from helpful. Most time, you should try it to learn what it actually does. On Friday, April 15, 2016 at 4:21:41 AM UTC+2, Sheehan Olver wrote: > > > When the course is over I'll give a description of any issues encountered > using Julia for teaching. At the moment there

[julia-users] Re: diagm for an (n x 1) Array{T, 2}

2016-04-08 Thread Sisyphuss
IMHO, It would also make sense to extend `diagm` to (n x 1 x 1), (n x 1 x 1 x 1), (1 x n x 1) ... arrays. But, if we check the dimension in the function body, it may decrease the performance (IMHO). Note that you can always write `diagm(vec(a))` to transform it to a vector. On Friday,

[julia-users] Re: How to initialize a Matrix{T}?

2016-04-08 Thread Sisyphuss
I have a related question: How to initialize an array of fixed shape except one dimension, such as `m * n * 0`. And I would like to dynamically increase the last dimension later.

[julia-users] Re: What is the correct way to use the type alias Vector and Matrix in multiple dispatch?

2016-04-06 Thread Sisyphuss
You may want to apply `@vectorize_1arg` macro to `hello`. http://docs.julialang.org/en/release-0.4/manual/arrays/ On Wednesday, April 6, 2016 at 10:23:16 PM UTC+2, Po Choi wrote: > > > hello(A::Matrix) = 1 > hello(A::Vector{Matrix}) = 2 > A = randn(3,3); > AA = [randn(3,3) for k in 1:4]; >

Re: [julia-users] constructor & function have different promotion rules?

2016-04-05 Thread Sisyphuss
Yes, I guess. call(TT, 1, 2) call(TT, 'a', 'b') On Tuesday, April 5, 2016 at 4:19:05 PM UTC+2, FANG Colin wrote: > > methods(TT) > > call(::Type{TT}, x::Float64, y::Float64) at In[22]:2 > call(::Type{TT}, x, y) at In[22]:2 > call{T}(::Type{T}, arg) at essentials.jl:56

[julia-users] Re: constructor & function have different promotion rules?

2016-04-05 Thread Sisyphuss
Your `tt` only works for `Float64`: `tt(1.0 , 2.0)` works. To make your code generic, remove the type specification. On Tuesday, April 5, 2016 at 4:09:18 PM UTC+2, FANG Colin wrote: > > Sorry if this has been discussed somewhere as I am unable to find the > relative post. > > immutable TT >

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

2016-04-02 Thread Sisyphuss
Didn't numpy's `transpose()` function make your life hard?

[julia-users] Re: [ANN] ScikitLearn.jl

2016-03-18 Thread Sisyphuss
Cool! On Friday, March 18, 2016 at 5:11:47 PM UTC+1, Cedric St-Jean wrote: > > I'm happy to announce ScikitLearn.jl > and ScikitLearnBase.jl > : a library pair that > brings the scikit-learn interface to

Re: [julia-users] Re: What to read to understand finishing v0.5?

2016-03-10 Thread Sisyphuss
I am monitoring the milestone constantly. I find the percentage does grow: 27% -> 28% -> 33% On Wednesday, March 9, 2016 at 7:36:10 PM UTC+1, David Anthoff wrote: > > At some point in the summer there was communication from the core team > that v0.5 would be a short release cycle that was all

[julia-users] Re: Plotsly

2016-03-10 Thread Sisyphuss
Maybe because it is not registered. Try `Pkg.clone()`. On Thursday, March 10, 2016 at 7:22:42 AM UTC+1, Christoph Ortner wrote: > > > Pkg.add("Plots") > > seems to be broken? > > > julia> Pkg.add("Plots") > fatal: Not a git repository (or any of the parent directories): .git >

[julia-users] Re: a excellent Julia IDE, JuliaDT

2016-03-10 Thread Sisyphuss
This can be a choice for those who have no root permission On Tuesday, March 8, 2016 at 2:56:39 PM UTC+1, Liye zhang wrote: > > If you are trying to find an IDE for Julia which is as convenient as PyDev > for python, or RStudio for R, you can test JuliaDT. Thanks for the > authors' excellent

Re: [julia-users] Acessing raw binary data

2016-03-06 Thread Sisyphuss
You may also want to use `bitrand()`, `bitbroadcast()` and so on. On Thursday, March 3, 2016 at 4:39:11 PM UTC+1, Stefan Karpinski wrote: > > Could you use BitVectors? They store boolean vectors using one bit per > boolean. > > On Thu, Mar 3, 2016 at 8:29 AM, Christina Lee

[julia-users] Re: [ANN] GLVisualize

2016-02-27 Thread Sisyphuss
It's just fantastic! I wonder if it will be the Matplotlib of Julia On Friday, February 26, 2016 at 11:11:02 PM UTC+1, Simon Danisch wrote: > > Hi > > this is the first release of GLVisualize.jl > , a 2D/3D visualization > library completely written in

[julia-users] Just a noob question: why are some test-failing PR merged?

2016-02-23 Thread Sisyphuss
I had a glance at the closed PRs at the GitHub. I found that some PRs didn't pass any/all tests (av,ci), but they still got merged. For example, this one So I wonder why

Re: [julia-users] A scope bug?

2016-02-22 Thread Sisyphuss
I made a mistake. Sorry for the noise. On Monday, February 22, 2016 at 1:27:20 PM UTC+1, Yichao Yu wrote: > > On Mon, Feb 22, 2016 at 5:59 AM, Sisyphuss <zhengw...@gmail.com > > wrote: > > I have the following PageRank code: > > n = 5 > > adj = Float64[0 0

[julia-users] A scope bug?

2016-02-22 Thread Sisyphuss
I have the following PageRank code: n = 5 adj = Float64[0 0 1 1 0; 0 0 1 0 0; 0 1 0 0 0; 1 0 1 0 1; 0 1 1 0 0] adj ./= sum(adj,2) pageRank = ones(Float64,n) N = 1 for t = 1:N temp = zeros(n) for j = 1:n temp[j] = 0.15 + 0.85 *

[julia-users] Re: Google Summer of Code 2016 - Ideas Page

2016-02-11 Thread Sisyphuss
Since Atom will be the canonical IDE for Julia, maybe the project juliette can be removed from that list. On Thursday, February 11, 2016 at 4:49:19 AM UTC+1, Shashi Gowda wrote: > > Hi all, > > I have merged the previous ideas pages (2015, 2014) into a canonical one >

[julia-users] Julia on Ubuntu tablet M10

2016-02-11 Thread Sisyphuss
Canonical and Bq are going to launch a tablet running Ubuntu this year. Is Julia able to run on that platform ?

[julia-users] Re: citing Julia

2016-02-05 Thread Sisyphuss
Large packages often offer this information in their Github "readme.md" On Friday, February 5, 2016 at 7:58:39 AM UTC+1, kleinsplash wrote: > > How about citing a specific package? > > On Wednesday, 17 July 2013 03:13:24 UTC+2, georgiana wrote: >> >> Is there a suggested way to cite Julia if

Re: [julia-users] Juno IDE

2016-02-02 Thread Sisyphuss
The multimedia support, specifically, the image support is the only remaining issue that hold me back from Atom. > > > 4) We want to support different workflows as well as we can. The Atom work > includes a repl which is going to get a lot nicer over the next couple > weeks. If there are any

Re: [julia-users] Juno IDE

2016-02-02 Thread Sisyphuss
think by then the Plotly package will also become mature. On Tuesday, February 2, 2016 at 7:22:23 PM UTC+1, Mike Innes wrote: > > Currently we do support Gadfly > > On Tue, 2 Feb 2016 at 18:19 Sisyphuss <zhengw...@gmail.com > > wrote: > >> The multimedia support, s

[julia-users] Re: Juno IDE

2016-02-02 Thread Sisyphuss
I infer that you are using a Juno/Julia bundle. For this purpose, you may prefer downloading it from here . Or you can also install Julia and Juno separately like Arch by following this manual

[julia-users] Julia version mismatch

2016-01-29 Thread Sisyphuss
I have this problem: When I type Julia --version it shows that I am in 0.4.2-pre But when I enter the Julia REPL, I am in 0.4.4-pre+24

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Sisyphuss
In the Matmul benchmark, "Julia Native" ranks 1st. What is Julia Native? On Wednesday, January 27, 2016 at 7:02:51 AM UTC+1, Nitin Arora wrote: > > Check out this thread. There seems to be discussion on this matter > already. Looks like the code used for these benchmarks was not well >

[julia-users] Re: ANN: Julia v0.4.3 released

2016-01-26 Thread Sisyphuss
Because Juno IDE is developed and maintained by another organization Junolab. If you would like to use the latest version of Julia inside Juno, you could "install it from LightTable" by following the instructions here . On Sunday, January 24, 2016

[julia-users] Re: a good IDE for Julia ? (Julia Studio does not work with Julia v 0.3.0)

2016-01-26 Thread Sisyphuss
Wait for Juno/Atom and use Juno/LT for now. Ref: http://junolab.org/docs/install-manual.html On Saturday, January 23, 2016 at 9:11:49 PM UTC+1, PattiMichelle wrote: > > Eclipse isn't terribly user-friendly for noobs like me - has anyone been > able to get liclipse to point to their Juila

[julia-users] Nested functions cause type instability?

2016-01-26 Thread Sisyphuss
I have the following code: function factorial(n) function fact_iter(product, counter, max_count) if counter > max_count product else fact_iter(product * counter, counter + one(counter), max_count) end end fact_iter(one(n),one(n),n) end By `@code_warntype

[julia-users] Tail call optimization

2016-01-26 Thread Sisyphuss
I wrote 3 versions of factorial: by recursion, by iteration, by for-loop rec_factorial(n) = n == one(n) ? one(n) : n * rec_factorial(n-1) function iter_factorial(n) fact_iter(one(n),one(n),n) end function fact_iter(product, counter, max_count) if counter > max_count product else

Re: [julia-users] Nested functions cause type instability?

2016-01-26 Thread Sisyphuss
Hope that when this is all finished, there could be a blog explaining this new feature, which solves the closure problem! On Tuesday, January 26, 2016 at 7:29:23 PM UTC+1, Stefan Karpinski wrote: > > Currently, yes. This will change very soon. > > On Tue, Jan 26, 2016 at 1:24 P

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Sisyphuss
I didn't know that a man can learn so many languages... is he a genius? On Tuesday, January 26, 2016 at 11:39:00 PM UTC+1, Ismael Venegas Castelló wrote: > > @ylluminate looking at the structure of > the Julia programs, I can only see @kostya

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Sisyphuss
first time I saw quine-relay! ...Yusuke is genius :D > > * https://github.com/mame/quine-relay > > El martes, 26 de enero de 2016, 16:49:29 (UTC-6), Sisyphuss escribió: >> >> I didn't know that a man can learn so many languages... is he a genius? >> >> >>

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Sisyphuss
! ...Yusuke is genius :D > > * https://github.com/mame/quine-relay > > El martes, 26 de enero de 2016, 16:49:29 (UTC-6), Sisyphuss escribió: >> >> I didn't know that a man can learn so many languages... is he a genius? >> >> >> On Tuesday, January 26, 2016 at 11

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Sisyphuss
Yeah, this is Jeff's Femato ! On Wednesday, January 27, 2016 at 12:57:49 AM UTC+1, Ismael Venegas Castelló wrote: > > That is just one implementation of scheme among many, try: > > julia --lisp > > ;-) > > El martes, 26 de enero de 2016, 17:49:00 (UTC-6), Sisyphuss escrib

[julia-users] Re: Sort function

2016-01-20 Thread Sisyphuss
>From the error information, the comparison of Array is not implemented yet. On Wednesday, January 20, 2016 at 4:48:40 PM UTC+1, Ted Fujimoto wrote: > > Hi, > > In Python, we have this: > > >>> sorted([(1, [2,3]), (1,[2,1])]) > [(1, [2, 1]), (1, [2, 3])] > > In Julia, this produces a

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

2016-01-14 Thread Sisyphuss
LightTable is built on Electron which itself is the shell of Atom. So LightTable could be seen as an IDE sister of Atom. So Juno/LT & Juno/Atom is basically the same thing. Is there any nuance? Or what's the future?

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

2016-01-14 Thread Sisyphuss
LightTable is built on Electron which itself is the shell of Atom. So LightTable could be seen as an IDE sister of Atom. So Juno/LT & Juno/Atom is basically the same thing. Is there any nuance? Or what's the future?

[julia-users] Re: Pre-ANN: JuliaJS.jl

2016-01-08 Thread Sisyphuss
@Eric, thanks for your explanation in the other post, and sorry for the late response (I was in China).

[julia-users] Re: Atom inline evaluation shortcut

2015-12-12 Thread Sisyphuss
After experience, this command evaluates all codes. Furthermore, it doesn't put the feedback inline. On Saturday, December 12, 2015 at 2:31:25 PM UTC+1, Eric Forgy wrote: > > Try Cntrl + Shift + Enter

[julia-users] Atom inline evaluation shortcut

2015-12-12 Thread Sisyphuss
In Notebook and Juno/LT, to evaluate a code, one can use Ctrl+Enter or Shift+Enter. Then, what is the correspondent shortcut for Atom?

[julia-users] Re: Pre-ANN: PlotlyJS.jl

2015-12-12 Thread Sisyphuss
Hello Eric, As I know, Atom does not implement the plot yet. Does it mean that if I use Plotly.jl, I can plot in my Atom editor? Best regards, On Monday, November 23, 2015 at 5:47:38 PM UTC+1, Eric Forgy wrote: > > Hi everyone, > > > In this post >

[julia-users] Re: Atom inline evaluation shortcut

2015-12-12 Thread Sisyphuss
s dependency > https://github.com/JunoLab/atom-julia-client/issues/9 . > > Am Samstag, 12. Dezember 2015 14:37:34 UTC+1 schrieb Sisyphuss: >> >> After experience, this command evaluates all codes. >> Furthermore, it doesn't put the feedback inline. >> >> On Saturday

[julia-users] Re: Array of matrices

2015-12-07 Thread Sisyphuss
[Matrix{Float64}() for i = 1:5] works too. On Sunday, December 6, 2015 at 3:25:53 AM UTC+1, Eric Forgy wrote: > > Close :) > > You can try: > > julia> x = [Matrix() for i=1:5] > 5-element Array{Array{Any,2},1}: > 0x0 Array{Any,2} > 0x0 Array{Any,2} > 0x0 Array{Any,2} > 0x0 Array{Any,2} >

[julia-users] Re: Adding 1 to an Array{Array{Int64,1},1}

2015-12-07 Thread Sisyphuss
Have you tried doing it in a function? On Saturday, December 5, 2015 at 2:16:12 AM UTC+1, Chris wrote: > > I am confused about the following: > > julia> a = [[1,1] for i = 1:5] > 5-element Array{Array{Int64,1},1}: > [1,1] > [1,1] > [1,1] > [1,1] > [1,1] > > julia> a + 1 > 5-element

[julia-users] Re: Julia career advice question (x-post r/julia)

2015-12-01 Thread Sisyphuss
> > > With these languages, working through good, focused, tutorials is worth > the investment of time. > Any recommendation?

[julia-users] Re: Need help building Julia on Ubuntu 14.04

2015-11-29 Thread Sisyphuss
My suggestion is not to build it from scratch, because the building process is quite long. On Saturday, November 28, 2015 at 6:19:28 PM UTC+1, Ajay Kumar wrote: > > Dear all > > I am trying to build Julia with more than one processor on my PC. > I am working on an Ubuntu 14.04 OS by using

[julia-users] Re: Why does Julia include an older version of git in it?

2015-11-28 Thread Sisyphuss
Related: https://groups.google.com/forum/?fromgroups=#!topic/julia-users/LBb08MDWu4U On Saturday, November 28, 2015 at 10:28:29 AM UTC+1, Arin Basu wrote: > > Hi All, > > As I wrote earlier, yesterday I offered a workshop on introducing Julia at > my university. After the workshop, one of the

[julia-users] Re: (1.0π) ≠ π

2015-11-27 Thread Sisyphuss
I think you should begin with comparing two Floats with `abs(a-b) > > > This really surprised me: > > *julia> **(1.0π) ≠ π* > > *true* > > > I guess π is treated as infinite precision until it becomes a float? >

[julia-users] Re: Linear combination of matrices using repmat: Matlab vs Julia

2015-11-24 Thread Sisyphuss
On Tuesday, November 24, 2015 at 4:56:26 PM UTC+1, Tony Kelman wrote: > > Are you running matlab single threaded? Instead of storing a 3 dimensional > array and doing indexing and reshape, in Julia you'd be better off storing > an array of matrices. I just realize this two weeks ago.

[julia-users] Re: Pre-ANN: PlotlyJS.jl

2015-11-23 Thread Sisyphuss
So the following package is no longer useful? https://github.com/plotly/Plotly.jl

Re: [julia-users] Best way to pass many arguments to functions

2015-11-23 Thread Sisyphuss
On Monday, November 23, 2015 at 2:46:12 PM UTC+1, Milan Bouchet-Valat wrote: > > Le lundi 23 novembre 2015 à 05:32 -0800, Maxim Berman a écrit : > > Hello, > > > > In Matlab, people often use structures to pass around arguments > > between functions, for example problem instances. This

[julia-users] Re: JuliaBox disconnects after several hours of use (or non-use)

2015-11-23 Thread Sisyphuss
If he has many cells, it won't be convenient to copy-paste. But Juliabox autosaves every several minutes, which already largely prevent the lost of code (at least for my speed of coding). On Monday, November 23, 2015 at 8:23:50 AM UTC+1, Patrick Kofod Mogensen wrote: > > I know this is not a

Re: [julia-users] Assigning variables

2015-11-23 Thread Sisyphuss
Maybe metaprogramming? On Sunday, November 22, 2015 at 8:52:24 PM UTC+1, Stefan Karpinski wrote: > > Not really. An array is much better for this. > > On Sun, Nov 22, 2015 at 2:28 PM, digxx > wrote: > >> Manually I can do: >> arr1=... >> arr2=... >> arr3=... >> and so on

Re: [julia-users] type conversion

2015-11-23 Thread Sisyphuss
On Sunday, November 22, 2015 at 11:22:07 PM UTC+1, Milan Bouchet-Valat wrote: > > Le dimanche 22 novembre 2015 à 14:08 -0800, Martin Kuzma a écrit : > > > > > > Hi, i am new to Julia and i am little bit confused about type > > conversion. > > In the docs is written following: > > > > When

Re: [julia-users] Assigning variables

2015-11-23 Thread Sisyphuss
I knew it. On Monday, November 23, 2015 at 4:25:37 PM UTC+1, Stefan Karpinski wrote: > > You have a bunch of values indexed by an integer. That's what arrays are > for. > > On Mon, Nov 23, 2015 at 10:11 AM, Sisyphuss <zhengw...@gmail.com > > wrote: > >> Maybe me

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

2015-11-23 Thread Sisyphuss
OK, so if I have a function which returns a tuple (a,b,c,d), but I only want the 2nd and 4th value, the most concise way is (x,y) = f()[[2;4]]

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

2015-11-23 Thread Sisyphuss
On Monday, November 23, 2015 at 6:44:58 PM UTC+1, Yichao Yu wrote: > > > I have a function that returns a tuple. > > But I only want the second value of this tuple. > > So I tried `(,a) =f()`. But it does not work. > > > > I'd like to is there any syntax which works? > > Note `(a,) = (1,2)`

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

2015-11-23 Thread Sisyphuss
I have a function that returns a tuple. But I only want the second value of this tuple. So I tried `(,a) =f()`. But it does not work. I'd like to is there any syntax which works? Note `(a,) = (1,2)` does work.

[julia-users] Re: Simple Quesiton about svd() function

2015-11-23 Thread Sisyphuss
If `x` is an eigenvector, then `-x` is also an eigenvector (and with the same norm). On Monday, November 23, 2015 at 3:58:31 AM UTC+1, Michael Bullman wrote: > > Hi All, > > I have a pretty easy question about how/why the svd() behaves how it does. > > Why are my U and V matrices always a

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

2015-11-23 Thread Sisyphuss
Another inconvenience of your solution is that: if you have N objective functions, you will have to define N types and cannot use loop. However, in my solution, I only need to construct an array of objective functions (as objects). On Sunday, November 22, 2015 at 2:20:30 PM UTC+1, Sisyphuss

[julia-users] export @enum type should also export its values

2015-11-22 Thread Sisyphuss
Let's see this example: ``` module tmp export FRUIT, f, apple @enum FRUIT apple=1 orange=2 kiwi=3 f(x::FRUIT) = "I'm a FRUIT with value: $(Int(x))" end ``` f(apple) works fine f(orange) doesn't work f(FRUIT.apple) doesn't work either. An enumerate type is of no use, if can't use its values.

[julia-users] Re: export @enum type should also export its values

2015-11-22 Thread Sisyphuss
Sorry, just found that one can use `tmp.orange` to refer the value. On Sunday, November 22, 2015 at 12:12:56 PM UTC+1, Sisyphuss wrote: > > Let's see this example: > ``` > module tmp > > export FRUIT, f, apple > > @enum FRUIT apple=1 orange=2 kiwi=3 > > f(x::FR

[julia-users] Re: export @enum type should also export its values

2015-11-22 Thread Sisyphuss
+1, Sisyphuss wrote: > > Sorry, just found that one can use `tmp.orange` to refer the value. > >

Re: [julia-users] Re: norm() is faster than maxabs()

2015-11-19 Thread Sisyphuss
gt; I'm not entirely surprised. Multiplication is fast, and with 10^5 > elements > > the sqrt should not be the bottleneck. > > > > --Tim > > > > > On Wed, Nov 18, 2015 at 2:12 PM, Benjamin Deonovic <bdeo...@gmail.com > > > &g

[julia-users] norm() is faster than maxabs()

2015-11-18 Thread Sisyphuss
Interesting phenomenon: norm() is faster than maxabs() x = randn(10) @time maxabs(x) @time norm(x) 0.000108 seconds (5 allocations: 176 bytes) 0.40 seconds (5 allocations: 176 bytes) I have thought the contrary, for norm() requires N square and 1 square root; maxabs() requires 2N

[julia-users] Re: Arbitrary Vector literal nesting

2015-11-18 Thread Sisyphuss
Not to disappoint you, but 0.5 is scheduled for early February 2016, and actually won't happen before April. On Wednesday, November 18, 2015 at 6:46:14 PM UTC+1, vis...@stanford.edu wrote: > > Awesome, I see that 0.5 is scheduled for early December. Looking forward > to having this fixed. >

[julia-users] Define an objective function type

2015-11-18 Thread Sisyphuss
Hello, everyone, I'd like to construct a type which contains some functions that I would like to give value later (as attributes of instance). I define this type as: ``` type Objective f::Any g::Any end ``` where `f` is the objective function and `g` is the derivative. My question is:

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

2015-11-18 Thread Sisyphuss
Thanks. So the first question is solved. On Wednesday, November 18, 2015 at 9:42:26 AM UTC+1, Eric Forgy wrote: > > Try "Function"? > > julia> f(x) = x^2 > f (generic function with 1 method) > > julia> typeof(f) > Function > > > On Wednesday, Novem

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

2015-11-18 Thread Sisyphuss
On Wednesday, November 18, 2015 at 2:53:02 PM UTC+1, Christoph Ortner wrote: > > Not quite answering your question, but here is how I like to do this: > > abstract ObjectiveFunction > type MyOF <: ObjectiveFunction >params > end > > function evaluate(f::ObjectiveFunction, x) > . .. >

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

2015-11-16 Thread Sisyphuss
Run a JuliaBox server? On Monday, November 16, 2015 at 9:05:38 AM UTC+1, Sheehan Olver wrote: > > Another requirement is that the packages are shared across users, to save > disk space. Gadfly + PyPlot + IJulia (with Conda.jl version of Jupyter) > takes over 750MB. Does .julia need to be

[julia-users] Re: Google releases TensorFlow as open source

2015-11-12 Thread Sisyphuss
Good to know that. On Wednesday, November 11, 2015 at 12:18:07 PM UTC+1, Viral Shah wrote: > > I think TensorFlow.jl is a great idea. Also their distributed computation > framework is also the kind that we want to have in Julia. > > I have created JuliaML. Send me email if you want to be part

[julia-users] Re: Clsing IJulia in a neat way

2015-11-03 Thread Sisyphuss
I encountered similar problem on my Ubuntu. On Tuesday, November 3, 2015 at 11:24:02 AM UTC+1, Ferran Mazzanti wrote: > > Dear all, > > I use IJulia from time to time. To do that I open the julia REPL in the > terminal, issue > > using IJulia > notebook() > > ..and the web browser opens and I

Re: [julia-users] Re: Julia and Spark

2015-11-01 Thread Sisyphuss
http://dl.acm.org/citation.cfm?id=2228301 On Saturday, October 31, 2015 at 5:18:01 PM UTC+1, Jey Kottalam wrote: > > Could you please define "streams of RDDs"? > > On Sat, Oct 31, 2015 at 12:59 AM, > wrote: > >> Is there any implementation with streams of RDDs for Julia

Re: [julia-users] Re: Code runs 500 times slower under 0.4.0

2015-10-25 Thread Sisyphuss
It's interesting. It's like a virtual machine, but maybe smaller than it. On Sunday, October 25, 2015 at 12:23:24 AM UTC+2, Stefan Karpinski wrote: > > ReproZip is a pretty awesome language-agnostic tool for easy > reproducibility: > > https://vida-nyu.github.io/reprozip/ > > On Sat, Oct 24,

[julia-users] Re: good textbook for Julia software engineering?

2015-10-23 Thread Sisyphuss
On Thursday, October 22, 2015 at 6:26:29 PM UTC+2, Cedric St-Jean wrote: > > > On Thursday, October 22, 2015 at 11:33:39 AM UTC-4, Sisyphuss wrote: >> >> I have some idea in the previous post. But it seems that they are just >> ignored... >> > > Not to der

[julia-users] Re: Julia and Object-Oriented Programming

2015-10-20 Thread Sisyphuss
> Thanks, > SS > > On Sunday, October 18, 2015 at 5:41:58 AM UTC-7, Sisyphuss wrote: >> >> When I'm learning Julia, I am always thinking what is the correct way to >> do OOP in this language. It seems to me that what I learned in C++ does not >> app

[julia-users] Re: Julia and Object-Oriented Programming

2015-10-19 Thread Sisyphuss
, October 18, 2015 at 2:41:58 PM UTC+2, Sisyphuss wrote: > > When I'm learning Julia, I am always thinking what is the correct way to > do OOP in this language. It seems to me that what I learned in C++ does not > apply in Julia. > > It took me long to realize that the equiv

Re: [julia-users] Re: Does Julia really solve the two-language problem?

2015-10-19 Thread Sisyphuss
On Monday, October 19, 2015 at 5:06:45 PM UTC+2, Tamas Papp wrote: > > On Mon, Oct 19 2015, Steven G. Johnson > wrote: > > > On Sunday, October 18, 2015 at 10:01:20 AM UTC-4, Stefan Karpinski > wrote: > >> > >> There are different styles and levels of writing code in

[julia-users] Julia and Object-Oriented Programming

2015-10-18 Thread Sisyphuss
When I'm learning Julia, I am always thinking what is the correct way to do OOP in this language. It seems to me that what I learned in C++ does not apply in Julia. It took me long to realize that the equivalent of Class of C++ in Julia is not Type, but Module. Module is the basic function

[julia-users] Does Julia really solve the two-language problem?

2015-10-18 Thread Sisyphuss
The two-language problem refers to prototyping with one slow dynamic language and rewrite it with a fast static language for the final product. If Julia really solves the two-language problem, it should meet the following criteria: Let A be the code written during prototyping, B be the code

  1   2   3   >