[julia-users] Re: Style Guideline

2013-12-31 Thread Steven G. Johnson
On Tuesday, December 31, 2013 11:12:44 AM UTC-5, Daniel Carrera wrote: (18)+(19): I disagree. Although I could favour rules like this in a particular project, in many cases I think that adding type annotations just creates syntactic noise and can create a needless limitation I also

Re: [julia-users] Re: Style Guideline

2013-12-31 Thread Steven G. Johnson
On Tuesday, December 31, 2013 1:45:17 PM UTC-5, John Myles White wrote: Explicit typing isn’t the problem, no? From my perspective, the problem is incorrect typing, not typing per se. My proposal is that one should use explicit Any’s, which doesn’t seem to suffer from the issues you’re

Re: [julia-users] Rational Linear Algebra in Julia

2014-01-14 Thread Steven G. Johnson
See https://github.com/JuliaLang/julia/issues/3014 (Although the application to Rational types seems pretty useless to me; even if you use Rational{BigInt}, you will get exponential complexity in many cases.)

Re: [julia-users] Re: Julia computational efficiency vs C vs Java vs Python vs Cython

2014-01-15 Thread Steven G. Johnson
The following version uses 32-bit integers in the arrays (to reduce cache pressure) and 32-bit integer remainder operations, with everything else 64-bit, and is nearly 3x faster than the original code on my machine: rem32(x::Int32, y::Int32) =

Re: [julia-users] Re: Julia computational efficiency vs C vs Java vs Python vs Cython

2014-01-15 Thread Steven G. Johnson
On Wednesday, January 15, 2014 12:03:57 PM UTC-5, Steven G. Johnson wrote: The following version uses 32-bit integers in the arrays (to reduce cache pressure) and 32-bit integer remainder operations, with everything else 64-bit, and is nearly 3x faster than the original code on my machine

Re: [julia-users] OT: entering Unicode characters

2014-01-17 Thread Steven G. Johnson
On Friday, January 17, 2014 1:32:08 PM UTC-5, Raphael Sofaer wrote: I think the ideal behavior would be for Julia itself to have an opinion on which character in each set of identical-looking characters was right, and to warn on using a homograph that was not canonical. Combined with a

Re: [julia-users] OT: entering Unicode characters

2014-01-17 Thread Steven G. Johnson
I opened an issue for this: https://github.com/JuliaLang/julia/issues/5434 My preference would be for Julia to silently canonicalize all homoglyphs in identifiers (rather than issuing a warning or whatever).

[julia-users] Re: Function introspection for derivation of sensitivity equations

2014-01-17 Thread Steven G. Johnson
You could always print it to a string, but why would you want to? You'd just have to parse it again. The advantage of working with the AST is that it has already been parsed for you.

[julia-users] Re: Multiple plots on one canvas - IJulia / PyPlot

2014-01-19 Thread Steven G. Johnson
Works fine for me. Could it be an SVG display bug in your browser? Try Firefox.

Re: [julia-users] Natural language processing in Julia

2014-01-19 Thread Steven G. Johnson
How do you convert a Synset to a string in Python? Presumably Synset has some Python method for this? On Saturday, January 18, 2014 7:32:58 AM UTC-5, Jon Norberg wrote: Great. And how dose one get the text from pyobject to a julia string? Thanks very much

Re: [julia-users] Re: Function introspection for derivation of sensitivity equations

2014-01-19 Thread Steven G. Johnson
On Friday, January 17, 2014 9:56:41 PM UTC-5, Isaiah wrote: (There really should be a reflection function to look up the Method given a Function and an argument-type tuple.) which(F, (args...)) That prints the method signature, but does not actually return the Method data structure.

Re: [julia-users] Re: Multiple plots on one canvas - IJulia / PyPlot

2014-01-21 Thread Steven G. Johnson
I'm getting a little frustrated with these SVG issues. There is also the problem that, for plots with zillions of data points, SVG display is frighteningly slow. I'm thinking of just turning off SVG output in PyPlot, by default, with a runtime option to re-enable it.

[julia-users] Re: not loading python module

2014-01-24 Thread Steven G. Johnson
On Friday, January 24, 2014 12:35:12 PM UTC-5, Rajn wrote: This is how far I got after making the following changes: changed PYTHONPATH to C:\Python27 and in PyCall.jl ENV[PYTHONHOME]=exec_prefix I'm confused, what did you set PYTHONHOME to?

[julia-users] Re: I have this error with PyCall, I need some help

2014-01-25 Thread Steven G. Johnson
The basic issue is that you can't overload function application in Julia (https://github.com/JuliaLang/julia/issues/2403). So, unless PyCall can detect that an object corresponds to a Function-like type, it doesn't automatically convert it to Function or make it callable.

Re: [julia-users] Re: not loading python module

2014-01-27 Thread Steven G. Johnson
Weird, Anaconda has always worked out of the box for me on Windows. When you installed Anaconda, did you check the boxes *Add Anaconda to the System Path* and also *Register Anaconda as default Python version of the system* in the installer? On Monday, January 27, 2014 1:02:48 PM UTC-5, Rajn

Re: [julia-users] Re: not loading python module

2014-01-27 Thread Steven G. Johnson
I installed on a fresh machine with Anaconda, and I didn't have to set any environment variables at all ... everything needed was done by the Anaconda installer. My guess is that you have some leftover settings (environment vars? registry?) from your earlier attempts with Enthought or

[julia-users] Re: Enter values for the variables manually

2014-01-28 Thread Steven G. Johnson
On Tuesday, January 28, 2014 10:41:38 AM UTC-5, Fabian Gans wrote: Just use readline with STDIN as the only argument. Example: julia N=chomp(readline(STDIN)); Note that you can just use readline() ... STDIN is the default.

[julia-users] more rows/columns shown in IJulia?

2014-01-31 Thread Steven G. Johnson
Yes, using the same mechanism as in the REPL: ENV[LINES] = 200 ENV[COLS] = 100

[julia-users] Re: PyCall: Reloading python libraries?

2014-01-31 Thread Steven G. Johnson
You need to call PyImport_ReloadModule ( http://docs.python.org/2/c-api/import.html). There isn't a direct interface to this in PyCall at the moment, though, so you would need to use ccall for now: something like mymodule = pywrap(PyObject(ccall(pysym(:PyImport_ReloadModule), PyPtr,

[julia-users] Re: NLOpt with MLSL throws invalid_args.

2014-01-31 Thread Steven G. Johnson
The global optimizers in NLopt, such as MLSL, require a finite box to search, so you need to set finite lower and upper bounds for the parameters.

[julia-users] Re: Error when opening notebook in IJulia

2014-02-02 Thread Steven G. Johnson
This looks like an error on the IPython side, not in in Julia. If you just run ipython notebook to open a Python notebook (not IJulia), does it work? (Be aware that running a firewall on your machine may break the IPython notebook. e.g. for the Sophos

Re: [julia-users] base64 decode

2014-02-02 Thread Steven G. Johnson
On Sunday, February 2, 2014 4:01:47 AM UTC-5, John Travers wrote: Yes, that solves my problem., thanks! But it might be nice to have the symmetric functions (i.e. decode as well as encode) in base. Definitely; I think this was always the intention, but it didn't get implemented at the time

[julia-users] Re: Does Julia support plotting?

2014-02-05 Thread Steven G. Johnson
On Tuesday, February 4, 2014 8:21:48 PM UTC-5, Steven Siew wrote: I think that it should be made absolutely clear to newbies (to Julia) that plotting is NOT working by default. Right on the download page (http://julialang.org/downloads/), there is a section Graphics in Julia that says

[julia-users] Re: What does ⋮ means in an Array output?

2014-02-06 Thread Steven G. Johnson
Your example prints for me as: julia [5, test, 'c'] 3-element Array{Any,1}: 5 test 'c' In a 20-line terminal, a simple example of abbreviation is to look at a 1000-element array: julia rand(1000) 1000-element Array{Float64,1}: 0.178138 0.723066 0.124227 0.484368

[julia-users] Re: Common shared package location

2014-02-06 Thread Steven G. Johnson
Install into /usr/local/share/julia/site/v0.xxx, assuming you installed Julia into /usr/bin or /usr/local/bin. Just print the value of LOAD_PATH in Julia to see valid installation locations. On Thursday, February 6, 2014 2:13:48 PM UTC-5, John Travers wrote: I have a feeling this has been

Re: [julia-users] What does three vertical points [...] mean in anArray output?

2014-02-06 Thread Steven G. Johnson
Set ENV[LINES] = 30 to change the number of lines that are displayed (this just sets the LINES environment variable). On Thursday, February 6, 2014 2:23:00 PM UTC-5, Ismael VC wrote: Ok, so to have all the rows printed in that example, I have to get out of the Julia session, rezise the

Re: [julia-users] What does three vertical points [...] mean in anArray output?

2014-02-06 Thread Steven G. Johnson
(Automatic resizing should be implemented in the future, once we finish the process of ripping out the current REPL code and replacing it. https://github.com/JuliaLang/julia/issues/4513)

[julia-users] Re: Canopy PyPlot issue

2014-02-06 Thread Steven G. Johnson
PyCall does not work with Canopy/EPD: https://github.com/stevengj/PyCall.jl/issues/42 (I've made a bit of progress on this, but there are still some funky path settings that I need to figure out to make Canopy work.) Anaconda works better (especially in IJulia so that it can use the

[julia-users] Re: Canopy PyPlot issue

2014-02-07 Thread Steven G. Johnson
On Thursday, February 6, 2014 11:09:21 PM UTC-5, Eric Libby wrote: It was working with before. How can I do a completely clean install on a Mac and remove Canopy/Anaconda so as to make sure Julia and PyPlot play well? Canopy and Anaconda make some modifications to your environment

Re: [julia-users] Re: If (in my system) Int is an alias for Int32, then why there is no Float alias for Float32/64?

2014-02-07 Thread Steven G. Johnson
On Friday, February 7, 2014 3:18:10 AM UTC-5, Milan Bouchet-Valat wrote: Le jeudi 06 février 2014 à 14:01 -0800, Ismael VC a écrit : Thank's Patrick! Very well explained. Yeah, why not put this in the FAQ? Well, there is the fact that (a) this has nothing to do with Julia per se and (b)

[julia-users] Re: If (in my system) Int is an alias for Int32, then why there is no Float alias for Float32/64?

2014-02-07 Thread Steven G. Johnson
On Friday, February 7, 2014 7:26:24 AM UTC-5, Felix wrote: true; they should, but I guess to comply with the IEEE 754 standard http://en.wikipedia.org/wiki/IEEE_754-1985 so you can go for 64 or 32, they could have build in Float to detect the cpu arch type but there is a reason for not

[julia-users] Re: Canopy PyPlot issue

2014-02-07 Thread Steven G. Johnson
On Friday, February 7, 2014 11:01:16 AM UTC-5, Eric Libby wrote: Thanks! The only issue I had with plots in IJulia was that I could not find a way to actually export or save them. Each time I kept getting blank documents. I want to be able to export them as publication quality (dpi=300).

Re: [julia-users] Sublime-IJulia Official Debut

2014-02-07 Thread Steven G. Johnson
It looks like Gadfly does not currently support writemime to any image backend: https://github.com/dcjones/Gadfly.jl/blob/5554d3a1bcdc5fc6852cc8f1e469dd3a0f65f220/src/Gadfly.jl#L726-L744 But image/png writemime output be easy to add (maybe file an issue?) since Gadfly already supports

[julia-users] Re: Canopy PyPlot issue

2014-02-07 Thread Steven G. Johnson
On Friday, February 7, 2014 1:27:34 PM UTC-5, Eric Libby wrote: Thank you for such a detailed reply. I used savefig and it worked fine but when I try to specify the dpi as savefig(myplot2.eps,dpi=300) I get the error: I'm not sure why matplotlib gives that inscrutable error...it works

[julia-users] Re: Canopy PyPlot issue

2014-02-07 Thread Steven G. Johnson
I just tried it on a fresh MacOS 10.9 machine with Anaconda, and it works fine for me. Perhaps things are a bit messed up because you installed both Canopy and Anaconda? Look in your ~/.profile and make sure any Canopy-related things are commented out, and then open a new Terminal window (to

[julia-users] Re: Writing an I/O loop for recording data

2014-02-07 Thread Steven G. Johnson
Maybe use zeromq rather than UDP? Or if it is running locally, why not just write to a file descriptor that Julia can read from? Why do you need to do the reading in C, as opposed to just using another Julia process? On Friday, February 7, 2014 5:01:41 PM UTC-5, Elliot Saba wrote: I'm

[julia-users] Re: Dictionary Key Type Question

2014-02-08 Thread Steven G. Johnson
On Friday, February 7, 2014 8:39:41 PM UTC-5, Michael Schnall-Levin wrote: similarly if i do: d = Dict{Int32, Int32}() d[convert(Int32, 3)] = 5 get(d, 3, 0) ---output 0 This seems like a bug to me; if you have Dict{K,V}, Julia should automatically convert the key value to K in

[julia-users] Re: Returning julia objects with ccall

2014-02-08 Thread Steven G. Johnson
On Saturday, February 8, 2014 2:21:36 PM UTC-5, Carlos Becker wrote: I tried out many ways of passing arrays and other objects from C back to Julia. So far it seems that it takes a lot of extra code if I want to return, for example, a simple double-array or an array of types (eg structs)

Re: [julia-users] Re: Howto: Julia x[I] = [] ?? vs Matlab x(I) = []

2014-02-10 Thread Steven G. Johnson
On Thursday, November 29, 2012 3:24:50 PM UTC-5, Jeff Bezanson wrote: We have del(x, i) and del(x, i:j). We could add del(x, I) where I is a vector, but we can't do it any faster than for i in I del(x,i) end Why can't it be done faster? Presumably you could move all of the non-deleted

Re: [julia-users] Re: Howto: Julia x[I] = [] ?? vs Matlab x(I) = []

2014-02-10 Thread Steven G. Johnson
On Monday, February 10, 2014 1:42:56 PM UTC-5, Steven G. Johnson wrote: On Thursday, November 29, 2012 3:24:50 PM UTC-5, Jeff Bezanson wrote: We have del(x, i) and del(x, i:j). We could add del(x, I) where I is a vector, but we can't do it any faster than for i in I del(x,i) end Why

Re: [julia-users] matrix multiplication with Julia

2014-02-11 Thread Steven G. Johnson
On Tuesday, February 11, 2014 9:18:16 AM UTC-5, Jutho wrote: So to make a fair comparison to that c implementation, I have to compare the Julia speed (10-15 times BLAS speed) with the C speed (1.3 times BLAS speed) in the first regime, and the Julia speed (100 times BLAS speed) with the

Re: [julia-users] matrix multiplication with Julia

2014-02-11 Thread Steven G. Johnson
On Tuesday, February 11, 2014 10:35:35 AM UTC-5, Tim Holy wrote: Jutho, you may want to check out generic_matmatmul deep inside Base; it implements a cache-friendly multiplication algorithm. It's possible that you'll find it's faster yet. generic_matmatmul only does one level of

Re: [julia-users] Re: Howto: Julia x[I] = [] ?? vs Matlab x(I) = []

2014-02-12 Thread Steven G. Johnson
On Wednesday, February 12, 2014 3:41:21 PM UTC-5, Jason Pries wrote: FWIW, The place I use this the most is when solving PDEs using finite elements with Dirichlet/Periodic boundary conditions. If I want to preserve the symmetry of the matrix before factorization, I end up needing to delete

[julia-users] Re: Inline type conversion

2014-02-12 Thread Steven G. Johnson
You could also define: test(s::Symbol) = whatever test(s::Any) = test(convert(Symbol, s)) which will accept any type that can be converted to Symbol, and throw a MethodError otherwise. If you want to be a little more restrictive, you can change Any to Union(String, other

Re: [julia-users] julia running slowly

2014-02-13 Thread Steven G. Johnson
On Thursday, February 13, 2014 10:34:32 AM UTC-5, Stefan Karpinski wrote: Did you code this up in Python too? There's a built-in Julia function called primes (written in pure Juliahttps://github.com/JuliaLang/julia/blob/master/base/primes.jl), which implements a prime number sieve

[julia-users] Re: Winston scatter plot

2014-02-13 Thread Steven G. Johnson
Matplotlib (PyPlot) seems pretty fast even for 10^5 points.

Re: [julia-users] julia running slowly

2014-02-13 Thread Steven G. Johnson
On Thursday, February 13, 2014 10:57:20 AM UTC-5, Steven G. Johnson wrote: for i in 1:sieveTo Note that you can speed it up a bit more (by ~0.01s on my machine) by changing this to @inbounds for i in 1:sieveTo to turn off bounds-checking in the loop (since all the array indices

[julia-users] Re: Julia vs Dylan

2014-02-14 Thread Steven G. Johnson
On Thursday, February 13, 2014 11:06:53 PM UTC-5, Fil Mackay wrote: I would say the deployment strategy of Julia is the same as Python. Install a binary distribution as a prereq of your own package..? Yes, for now, this is similar to Python: Julia programs are run through the julia

[julia-users] Re: reduce() behavior question

2014-02-15 Thread Steven G. Johnson
The purpose of v0 is mainly to define the behavior for an empty-array input. On Thursday, February 13, 2014 7:01:34 AM UTC-5, Ivar Nesje wrote: I think the purpose of v0 is indeed unclear after the implementation changed, but it is just that it has not yet been removed. There are some

[julia-users] Re: Best data structure to remove elements one by one

2014-02-21 Thread Steven G. Johnson
On Friday, February 21, 2014 9:02:48 AM UTC-5, David P. Sanders wrote: OK, I think I have answered my own question: a Set is the good structure. And to create a set from an array I can do something like s = Set([3, 4, 5]...) or s = Set([i*2 for i in 1:5]...) which would be the

[julia-users] ccall to sscanf for float variables

2014-02-21 Thread Steven G. Johnson
Varargs functions like scanf won't work with ccall, in general.

Re: [julia-users] Sparse Matrix Multiplication Slow in Julia?

2014-02-22 Thread Steven G. Johnson
Note that the global scope shouldn't matter much for performance in this case because most of the time is spent in a function (* for sparse matrices)

Re: [julia-users] Re: What is a Number?

2014-02-24 Thread Steven G. Johnson
On Monday, February 24, 2014 9:55:33 AM UTC-5, Iain Dunning wrote: One way to do it is abstract Parent method1(p::Parent) = error(Children must implement this or face an error!) How is this better than just deleting the method1(::Parent) method, in which case you will get a MethodError

[julia-users] Re: animated plot

2014-02-24 Thread Steven G. Johnson
Matplotlib (via PyPlot) has support for generating and exporting animations (http://matplotlib.org/examples/animation/index.html).

[julia-users] Re: Juila vs Mathematica (Wolfram language): high-level features

2014-03-01 Thread Steven G. Johnson
On Friday, February 28, 2014 2:13:30 PM UTC-5, Tony Kelman wrote: On the flipside, and this isn't a language feature as much as a very well-implemented functionality, is Manipulate[]. It is wonderfully simple to set up and deploy interactive data exploration using Mathematica - dragging

[julia-users] Re: ERROR: scalarmin not defined

2014-03-03 Thread Steven G. Johnson
I've filed an issue. https://github.com/JuliaLang/julia/issues/6036 Should be an easy bug to fix.

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Steven G. Johnson
On Tuesday, March 4, 2014 4:37:15 AM UTC-5, Carlos Becker wrote: Another option is to add a vecnorm() function, explicitly to treat the argument as a vector, which would be undefined for other matrix sizes. A vecnorm function could be defined to work on any iterable type, including

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Steven G. Johnson
On Tuesday, March 4, 2014 7:05:02 AM UTC-5, Toivo Henningsson wrote: Because of multiple dispatch, we go to exceptional lengths in Julia to make sure to only overload the same operation on different types, not to create functions that do different conceptual operations based on the type.

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Steven G. Johnson
On Tuesday, March 4, 2014 9:39:18 AM UTC-5, Toivo Henningsson wrote: I think you would want to do the opposite. Define norm(x::AbstractVector, p=2) = vecnorm(x, p=2) where you define vecnorm(itr, p) for any iterable type. I like the idea to define vecnorm for any iterable type. I

[julia-users] Re: Hashing speed question

2014-03-04 Thread Steven G. Johnson
On Tuesday, March 4, 2014 12:41:17 PM UTC-5, Ivar Nesje wrote: Part of the advantage is also possible by just declaring the type of your container. *counts=Dict{SubString{ASCIIString},Int}()* That speeds it up by about 20% on my machine. I get another 25% speedup, bringing it close to

[julia-users] Re: Hashing speed question

2014-03-04 Thread Steven G. Johnson
It's odd that the performance gain that you see is so much less than the gain on my machine. Try putting @time in front of for w in words and also in front of words= That will tell you how much time is being spent in each, and whether the limitation is really hashing performance. On

[julia-users] Re: Does winston support panning and zooming?

2014-03-04 Thread Steven G. Johnson
Panning and zooming work with PyPlot. On Tuesday, March 4, 2014 7:05:07 PM UTC-5, Dan Becker wrote: I just installed julia (v0.2.1) on windows, followed by winston. Plotting works, but I see no obvious way to zoom or pan the plot. I also haven't found anything about this in the

Re: [julia-users] Re: norm() strangeness

2014-03-04 Thread Steven G. Johnson
See https://github.com/JuliaLang/julia/pull/6057 On Tuesday, March 4, 2014 5:47:11 PM UTC-5, Stefan Karpinski wrote: I would be completely fine with that. On Tue, Mar 4, 2014 at 5:32 PM, Steven G. Johnson steve...@gmail.comjavascript: wrote: If we have vecnorm(x,p=2), we won't need

[julia-users] Re: arbitrary precision FFT?

2014-03-05 Thread Steven G. Johnson
It's pretty easy to write a simple radix-2 FFT for power-of-two sizes (e.g. the Wikipedia article on the Cooley-Tukey FFT has pseudocode). For arbitrary precision arithmetic, there's not too much point in much fancier algorithms. (FFTW's benchmark/testing code actually contains an

Re: [julia-users] How to check whether a values is nothing using the Julia C API?

2014-03-10 Thread Steven G. Johnson
On Sunday, March 9, 2014 10:20:23 PM UTC-4, Kenta Sato wrote: I know that pyjulia exists, but I didn't try it. The core idea of pyjulia seems to be incorporated into IJulia, but they does not share the source code. I'm going to investigate the functionality of PyCall.jl. pyjulia and

[julia-users] Re: Multi-line commenting

2014-03-13 Thread Steven G. Johnson
Multiline comments of the form #= =# are now implemented. On Thursday, April 4, 2013 10:16:09 AM UTC-4, Jacob Quinn wrote: See the lengthy discussion here: https://github.com/JuliaLang/julia/issues/69 TL;DR It's a planned feature, but not implemented yet. -Jacob On

[julia-users] Re: How do you unload a package?

2014-03-15 Thread Steven G. Johnson
On Friday, March 14, 2014 2:33:27 PM UTC-4, Ivar Nesje wrote: I think you should be able to use the fully qualified name Winston.plot(...) Note also that if are intending to access the functions via the fully qualified names you should do import Winston instead of using Winston

[julia-users] Re: performance compared to mathematica

2014-03-16 Thread Steven G. Johnson
On Sunday, March 16, 2014 6:53:38 PM UTC-4, Stefan Schwarz wrote: Something that Tim wrote must come naturally in such a domain like Julia e.g. is in. If not, it is just wizardry and something you can gain as a power user of Mathematica/Matlab as well...somehow. If this is for wizards

[julia-users] Re: IJulia switching to correct interpreter

2014-03-17 Thread Steven G. Johnson
Do you have multiple versions of ipython installed? What is the output of Pkg.build(IJulia)? On Monday, March 17, 2014 12:02:00 PM UTC-4, lars klein wrote: I recently discovered the julia language and thought IJulia would be the perfect way to dive in. My system is mint 64bit. I installed

[julia-users] Re: The then keyword

2014-03-19 Thread Steven G. Johnson
On Wednesday, March 19, 2014 11:33:57 AM UTC-4, Cristóvão Duarte Sousa wrote: Sometimes I see myself writing one line if-elses like `if x0 x=-x end`, which I think is not very readable. Of course, in this particular case you could just do x = abs(x), but a typical style for one-line

[julia-users] Re: Syntax highlighting for TextWrangler and BBEdit

2014-03-20 Thread Steven G. Johnson
Can you submit a pull request to Julia? Editor configuration files for a variety of editors are distributed with Julia in the contrib directory: https://github.com/JuliaLang/julia/tree/master/contrib

[julia-users] Re: Syntax highlighting for TextWrangler and BBEdit

2014-03-20 Thread Steven G. Johnson
It looks like you are missing the reserved wordshttps://github.com/JuliaLang/julia/blob/master/src/julia-parser.scm#L89-L92: let, local, bitstype, ccall, baremodule You should probably also define: Open Strings 2 = Close Strings 2 = End-of-line Ends String 2 = false Open Block Comments = #=

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
On Thursday, March 20, 2014 8:26:56 AM UTC-4, Paweł Biernat wrote: # implementation via recursive definition of laguerre polynomials function laguerrel_recursive(n::Integer, alpha::Number, x::Number) l0 = 1# L_{0} l1 = 1+alpha-x# L_{1} This

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
On Thursday, March 20, 2014 8:26:56 AM UTC-4, Paweł Biernat wrote: So it seems that BigFloat is the major drawback. I really wander how Mathematica handles the generation of Laguerre polynomials. I am aware of the GSL bindings and the function sf_laguerre_n, but it also returns NaNs for

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
For example, you may be able to use the analytical asymptotic form of the Laguerre polynomial for large n. Computing special functions efficiently is all about switching between different asymptotic forms, recurrences, etcetera, for different regions of the parameter space.

[julia-users] Re: Sum of Laguerre polynomials

2014-03-21 Thread Steven G. Johnson
On Thursday, March 20, 2014 5:32:15 PM UTC-4, Paweł Biernat wrote: Taking into account your suggestions I came up with an ad-hoc implementation tailored for my needs. Instead of computing Laguerre(n,1,t-n) I compute the whole expression Laguerre(n,1,t-n)*exp(-(t-n))*(t-n) via a function

[julia-users] Re: pycall error

2014-03-22 Thread Steven G. Johnson
Sounds like maybe the hash digest is claiming to be a string, but isn't actually valid UTF8 data? Maybe just leave it as an opaque PyObject: secret = pycall(hash[digest], PyObject) (By using the pycall function, you can specify the desired output type of a function.)

[julia-users] Re: set parent to None in PySide

2014-03-25 Thread Steven G. Johnson
The analogue of Python's None in Julia is nothing (which will get converted to None on the Python side), whereas None in Julia is a completely different object (an empty type union, in fact). So, try just passing nothing (without the quotes) instead of None.

[julia-users] Re: set parent to None in PySide

2014-03-25 Thread Steven G. Johnson
On Tuesday, March 25, 2014 5:12:30 PM UTC-4, Steven G. Johnson wrote: So, try just passing nothing instead of None. Oh, nevermind, I see that you did that. Regarding whether it is garbage-collected, you have to make sure that you aren't holding any references to the object. (Once a Python

Re: [julia-users] What is the Julia equivalent of the MATLAB function: nargin()

2014-04-01 Thread Steven G. Johnson
On Tuesday, April 1, 2014 10:59:44 AM UTC-4, J Luis wrote: Yes, the variable input arguments is easy for us (matlabers) to adapt for, but I really miss (or didn't find the replacement yet) is the conditional behavior depending on the number of outputs. That is Julia functions do not know

Re: [julia-users] What is the Julia equivalent of the MATLAB function: nargin()

2014-04-01 Thread Steven G. Johnson
Note that default arguments in Julia can simplify this further. Often you have Matlab code like function y = foo(x, z) if nargin 2 z = ...default value... end end Which in Julia can be simplified to function foo(x, z = ...default value...) ... end This is

[julia-users] Re: Strange llvm code generated

2014-04-02 Thread Steven G. Johnson
Just filed this as an issue: https://github.com/JuliaLang/julia/issues/6382

[julia-users] Re: Will ccall play nicely with Armadillo/C++?

2014-04-02 Thread Steven G. Johnson
What does Armadillo provide that is not already built in to Julia's standard library? Calling C++ code from Julia is currently something of a pain, especially STL-heavy code.

Re: [julia-users] Translating Julia to Javascript via LLVM and Emscripten

2014-04-06 Thread Steven G. Johnson
On Sunday, April 6, 2014 8:07:31 PM UTC-4, mikeb2012 wrote: a) why can't Julia be the number crunching engine that Javascript lacks, and JS the foundation for the graphics and GUI Julia lacks; or That's more-or-less how IJulia/IPython works. The front-end is a lot of Javascript. See

Re: [julia-users] wait/notify from a thread?

2014-04-07 Thread Steven G. Johnson
data in this example will be notifyasync (i.e., the SingleAsyncWork object whose handle was sent to uv_async_send); might be nicer to call it work. No idea what status is. Would be good to document this in the manual (it only says you'll most likely just discard the callback parameters). In

Re: [julia-users] Re: suggestions: end statement, indentention, case statement, ...

2014-04-07 Thread Steven G. Johnson
On Monday, April 7, 2014 10:58:40 AM UTC-4, Stefan Karpinski wrote: I'm not sure what that's in response to, but yes, we should have such a thing. However, it should automatically use the REPL and provide line editing when appropriate or fall back on dumb input otherwise. I was thinking

Re: [julia-users] Re: suggestions: end statement, indentention, case statement, ...

2014-04-07 Thread Steven G. Johnson
On Monday, April 7, 2014 2:37:14 PM UTC-4, Steven G. Johnson wrote: However, I'm not sure how to write such a method in Base such that it can be cleanly extended/overridden if you are running in IJulia. Oh nevermind, it would be easy. Just write: readline(io::IO, prompt::String

Re: [julia-users] Re: suggestions: end statement, indentention, case statement, ...

2014-04-07 Thread Steven G. Johnson
On Monday, April 7, 2014 2:41:28 PM UTC-4, Steven G. Johnson wrote: readline(io::IO, prompt::String) = default thing in Base Hmm, now I remember the problem. It seems like this would have to be readline(read::IO, write::IO, prompt::String) since different streams are used

[julia-users] Re: emacs IJulia notebook?

2014-04-10 Thread Steven G. Johnson
If it is just connecting to the IPython notebook HTTP server, the only difference it should have to deal with is that IJulia uses a different default port (8998) than IPython (). You could try ipython notebook --port --profile julia On Thursday, April 10, 2014 11:36:36 AM UTC-4,

Re: [julia-users] Re: Export/view movie of plots

2014-04-13 Thread Steven G. Johnson
On Friday, April 11, 2014 8:45:43 AM UTC-4, Sheehan Olver wrote: Was hoping for something one line on Julia You could use the animation interface of Matplotlib from PyPlot.

[julia-users] Re: GPU computing

2014-04-13 Thread Steven G. Johnson
On Saturday, April 12, 2014 3:40:32 PM UTC-4, Deepraj Paul wrote: Can the combo of PyCall in Julia be Interfaced with PyCUDA effectively? I don't see why not; at first glance, everything in the PyCUDA interface looks like stuff that PyCall supports.

Re: [julia-users] Finding the size of a file in mb

2014-04-13 Thread Steven G. Johnson
Technically, the international standard megabyte (MB) is 1000^2 bytes. If you want 2^20 bytes, that is a mebibyte (MiB). On Friday, April 11, 2014 12:30:11 AM UTC-4, Ivar Nesje wrote: Note that hard disc manufacturers use 1000^2 (it makes disks look bigger), and Apple has followed their

Re: [julia-users] Re: Export/view movie of plots

2014-04-14 Thread Steven G. Johnson
On Sunday, April 13, 2014 9:30:36 PM UTC-4, Sheehan Olver wrote: The pyplot gui command didn't work for me (and pyplot doesn't work from the command line). Maybe I just need to update my matplotlib. Perhaps you are using a Mac, and don't have Matplotlib with a working Qt graphics

Re: [julia-users] Performance expectations and benchmarks

2014-04-17 Thread Steven G. Johnson
On Wednesday, April 16, 2014 9:54:31 PM UTC-4, Gilberto Noronha wrote: Well, I would like to see something with custom types and more complexity. Just to expand on Jameson's comments, one of the remarkable things about Julia is that types that are built-in in other languages are actually

[julia-users] Re: resultant vector, angle between the vectors

2014-04-19 Thread Steven G. Johnson
On Saturday, April 19, 2014 5:32:10 PM UTC-4, Steven G. Johnson wrote: norm(a + b) acos(dot(a, b) / (norm(a) * norm(b))) (Though if it were critical for performance you could write optimized implementations of these that fuse all the operations into a single loop.)

Re: [julia-users] How to get memory address of variable?

2014-04-21 Thread Steven G. Johnson
On Sunday, April 20, 2014 6:47:39 AM UTC-4, Freddy Chua wrote: Found pointer_from_objref Thanks! I am trying to fix HDF5 using this! Note that this will give a pointer to an internal Julia data structure (although this may change: https://github.com/JuliaLang/julia/pull/2818), which

[julia-users] Re: output sharing memory with input

2014-04-23 Thread Steven G. Johnson
On Wednesday, April 23, 2014 12:11:50 PM UTC-4, Ethan Anderes wrote: Ok, so I've got not hits on this question. Let me try to make it more concrete: Is there a command which can tell me the variables `a` and `b` in the following commands are refering to the same space in memory: a =

Re: [julia-users] Surprising range behavior

2014-04-23 Thread Steven G. Johnson
On Wednesday, April 23, 2014 10:50:57 PM UTC-4, Steven G. Johnson wrote: On Wednesday, April 23, 2014 10:17:23 PM UTC-4, Simon Kornblith wrote: pi*(0:0.01:1) or similar should work. Actually, that may not work because of https://github.com/JuliaLang/julia/issues/6364 ...which

Re: [julia-users] Surprising range behavior

2014-04-23 Thread Steven G. Johnson
(Simon, you may also be amused to learn that Google thinks that your post is written in Latin and offers to translate it. Mirabile dictu!)

[julia-users] Re: How close to be usefull in iOS?

2014-04-25 Thread Steven G. Johnson
It's also possible to run an IJulia notebook from a server and access it on iOS, either using a web service or by SSH tunneling. On Friday, April 25, 2014 2:12:26 PM UTC-4, ma...@elmalabarista.com wrote: I wonder how ready is julia to be used in iOS? For logic only? For call obj-c/coccoa

  1   2   3   4   5   6   7   8   9   10   >