Re: [julia-users] product of Int64 and Float64 is Int64

2016-10-19 Thread lapeyre . math122a
Or include a space. parse("1. * 80") --> :(1.0 * 80) parse("1.* 80") --> :(1 .* 80) On Wednesday, October 19, 2016 at 1:30:27 PM UTC+2, Mauro wrote: > > On Wed, 2016-10-19 at 13:11, Michele Zaffalon > wrote: > > I am confused by the type of the result of `1.*80`, which is `Int64`, > despit

[julia-users] ANN: Symata.jl language for Symbolic math

2016-10-19 Thread lapeyre . math122a
[ apologies for posting twice! I forgot to include a description in the Subject line] Symata.jl is a symbolic math language. (The old name was SJulia.) You can add it with Pkg.add("Symata.jl"). The site is https://github.com/jlapeyre/Symata.jl Notebook examples are here https://github.com/jla

[julia-users] Re: Is 0.6(nightlies) pretty much broken?

2016-10-19 Thread lapeyre . math122a
Nightly builds by Travis and Appveyor broke for me. For OSX and Windows, maybe not Linux. WARNING: The call to compilecache failed to create a usable precompiled cache file for module Combinatorics. On Wednesday, October 12, 2016 at 8:44:16 PM UTC+2, Neal Becker wrote: > > Seems like nothin

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

2016-10-18 Thread lapeyre . math122a
Thanks. Regarding reimplementing the sympy functions, I can't predict what will happen. There is a lot to be done that is not related to sympy... work on pattern matching, refactoring, etc. For the forseeable future, I think it makes sense to do this only in cases where the efficiency gained

[julia-users] ANN: Symata.jl

2016-10-18 Thread lapeyre . math122a
Symata.jl is a symbolic math language. (The old name was SJulia.) You can add it with Pkg.add("Symata.jl"). The site is https://github.com/jlapeyre/Symata.jl Notebook examples are here https://github.com/jlapeyre/Symata.jl/tree/master/examples (the math looks better in live Jupyter sessions)

[julia-users] Re: redefining Base method for `show`

2016-10-14 Thread lapeyre . math122a
I'm thinking of symbolic mathematics (Symata.jl). Another example is `SymPy.jl`, which prints rationals the same way I want to, like this: "2/3". But in SymPy.jl, rationals are not `Rational`'s, but rather wrapped python objects, so the problem with printing does not arise. If I wrapped `Ration

[julia-users] Re: Zero indexed arrays

2016-10-12 Thread lapeyre . math122a
You might get some ideas here https://github.com/alsam/OffsetArrays.jl On Saturday, October 8, 2016 at 6:39:19 PM UTC+2, Brian Rogoff wrote: > > > > Hi, > I saw in the release notes that Julia added support for different > array indexing methods. I decided to try my hand at implementing zero

[julia-users] Re: redefining Base method for `show`

2016-10-11 Thread lapeyre . math122a
To make it concrete, I have type A{T} x a::Array{Any,1} end The elements of the array a are numbers, Symbols, strings, etc., as well as more instances of type A{T}. They may be nested to arbitrary depth. If I call show on an instance of A{T}, then show will be called recursively on all p

[julia-users] Re: redefining Base method for `show`

2016-10-11 Thread lapeyre . math122a
I think I understand what you are saying (not sure). A problem that arises is that if I call show or print on an object, then show or print may be called many times on fields and fields of fields, etc., including from within Base code before the call returns. I don't know how to tell the built

[julia-users] Re: redefining Base method for `show`

2016-10-10 Thread lapeyre . math122a
For the record, a workable solution, at least for this particular code: I pass all output through wrapout() at the outermost output call. The object to be printed is traversed recursively. All types fall through except for the handful that I want to change. Each of these is each wrapped in a new

[julia-users] redefining Base method for `show`

2016-10-09 Thread lapeyre . math122a
I want to change show for Symbol, Rational, and Bool. Till now, I simply overwrote the existing methods. This works great. I get what I want, even in warn and error and string interpolation, etc. It works flawlessly on v0.4, v0.5, and v0.6. But, this changes the behavior for everyone. So, I wan

[julia-users] Re: travis with dependency on scipy?

2016-10-09 Thread lapeyre . math122a
Me too. I mean, I found things worked much more smoothly after following this advice to use Conda. Also, Windows and OSX are supported immediately. Also, for my application, the Ubuntu package versions are very old, and out of date. This problem is solved as well. On Friday, October 7, 2016 at

[julia-users] Re: choosing a new name for SJulia

2016-10-05 Thread lapeyre . math122a
The search is done. Thanks for the help. On Wednesday, October 5, 2016 at 6:02:58 PM UTC+2, lapeyre@gmail.com wrote: > > I am changing the name of SJulia. If anyone has a comment or suggestion > look at > https://github.com/JuliaLang/METADATA.jl/pull/6602#issuecomment-251660602. > I hope

[julia-users] choosing a new name for SJulia

2016-10-05 Thread lapeyre . math122a
I am changing the name of SJulia. If anyone has a comment or suggestion look at https://github.com/JuliaLang/METADATA.jl/pull/6602#issuecomment-251660602. I hope to only do it once!

[julia-users] Re: travis_wait

2016-10-03 Thread lapeyre . math122a
I did not get travis_wait to work. But printing something to STDERR now and then seems to have fixed the problem. On Monday, October 3, 2016 at 1:04:57 PM UTC+2, lapeyre@gmail.com wrote: > > Has anyone had luck using travis_wait. >

[julia-users] travis_wait

2016-10-03 Thread lapeyre . math122a
Has anyone had luck using travis_wait. ? I tried "- travis_wait julia -e ...". But, the build fails. Or, I could have the build produce more "output". I am now trying to print messages to ST

[julia-users] Re: if-elseif-else programmatically

2016-09-25 Thread lapeyre . math122a
This is probably more efficient in high dimensions. I am thinking mostly about 1,2, and 3. I have many routines and want to avoid keeping three versions of each in sync. Your method will perform worse in 1D, and maybe 2D and 3D too. But, I'm starting to think that, for most of my applications,

[julia-users] Re: if-elseif-else programmatically

2016-09-25 Thread lapeyre . math122a
This is probably more efficient in high dimensions. I am thinking mostly about 1,2, and 3. I have many routines and want to avoid keeping three versions of each in sync. Your method will perform worse in 1D, and maybe 2D and 3D too. But, I'm starting to think that, for most of my applications,

[julia-users] if-elseif-else programmatically

2016-09-24 Thread lapeyre . math122a
I want to generate something like an if-elseif-else construct or switch-case programmatically. The use I have in mind is to write an expression for taking a step in a random walk in n dimensions, so I need 2*n branches. The solution I found is not very readable. I wonder if there is an easier

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

2016-09-03 Thread lapeyre . math122a
I was told that SJulia is broken on recent versions of Julia. This is fixed now. It should work with most versions of 0.4, 0.5, and 0.6 https://github.com/jlapeyre/SJulia.jl On Saturday, September 3, 2016 at 5:47:26 PM UTC+2, lapeyre@gmail.com wrote: > > > > On Saturday, September 3, 2016 at

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

2016-09-03 Thread lapeyre . math122a
On Saturday, September 3, 2016 at 4:13:20 PM UTC+2, Andrew Dabrowski wrote: > > But what about nested pattern matching, or destructuring, isn't that much > easier in Mathematica than Julia? For example defining a function of two > lists by > f[{w_,x_}, {y_,z_}]:=x y/(w+z). > > I remember readi

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

2016-09-01 Thread lapeyre . math122a
On Thursday, January 23, 2014 at 11:47:11 PM UTC+1, Акатер Дима wrote: > > It's mentioned here > http://julialang.org/blog/2012/02/why-we-created-julia/ that Mathematica > was one of the programs that inspired Julia. How does Julia compare to > Mathematica's language? > > To make the question

[julia-users] Re: GSL hypergeometric

2016-05-29 Thread lapeyre . math122a
I'm not sure, but you may be able to use PyCall.jl and python mpmath. On Saturday, May 28, 2016 at 12:32:47 AM UTC+2, digxx wrote: > > I'm using GSL for hypergeometric functions but needed to increase the > precision to big() > unfortunately it is not supported so now my question is whether there

Re: [julia-users] Symbolic mathematics language v 0.0.6

2016-05-16 Thread lapeyre . math122a
Tom, sure, I'm available to chat. Regarding plotting: As, I wrote, SJulia does not depend on SymPy.jl so it should not depend on any plotting libraries. I looked at Plots.jl quickly a few days ago, but could not get it to run on recent v0.5 builds. It wouldn't take much to put some kind of p

Re: [julia-users] Symbolic mathematics language v 0.0.6

2016-05-16 Thread lapeyre . math122a
Hi, Thanks for the report. I have no idea how to install this on OS X. I am happy to get any feedback; bugs, comments, etc. Please post to this thread, or better, the issue tracker for SJulia. I added the following text to the README. Note the part about SymPy. *Note* SymPy here refers to th

Re: [julia-users] How to change REPL mode on startup?

2016-05-16 Thread lapeyre . math122a
Here is a PR https://github.com/JuliaLang/julia/pull/16384 Given the discussion around https://github.com/JuliaLang/julia/pull/13545, I doubt it will be accepted as is. John On Sunday, May 15, 2016

[julia-users] Symbolic mathematics language v 0.0.6

2016-05-12 Thread lapeyre . math122a
The symbolic mathematics language project that I announced last year has been greatly expanded. Here is the link: https://github.com/jlapeyre/SJulia.jl The best way to find what is new is to look at the tests https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest

Re: [julia-users] How to change REPL mode on startup?

2016-04-20 Thread lapeyre . math122a
You can try this branch https://github.com/jlapeyre/julia/tree/gjl/replhooks In .juliarc.jl, you can include code like this: if isdefined(Base, :atreplrun) Base.atreplrun( (repl)->repl.interface.modes[1].prompt = "newprompt>" ) end to install a hook. Call atreplrun repeatedly to push hooks,

Re: [julia-users] Re: Change bold text in REPL to normal

2016-04-20 Thread lapeyre . math122a
Good, this works. But, I don't think the preference for expressions over strings is mentioned in the Metaprogramming section of the manual. John On Wednesday, April 20, 2016 at 4:19:18 PM UTC+2, Yichao Yu wrote: > > On Wed, Apr 20, 2016 at 10:11 AM, > > wrote: > > I see. To get normal weight,

Re: [julia-users] How to change REPL mode on startup?

2016-04-20 Thread lapeyre . math122a
Yes, AFAIK it is not possible to modify the REPL in .juliarc.jl because it is executed before the REPL runs. A tedious workaround is to use .juliarc.jl to create a REPL and then exit() upon completion before the usual REPL is started. I hadn't thought about a PR, but I can take a look at it. Jo

[julia-users] Re: Change bold text in REPL to normal

2016-04-20 Thread lapeyre . math122a
I see. To get normal weight, red, warn() text, this works for me: Base.text_colors[:rednormal] = "\033[0m\033[31m" Base.eval(parse("default_color_warn = :rednormal")) text_colors is defined in base/client.jl On Wednesday, April 20, 2016 at 3:10:19 PM UTC+2, cormu...@mac.com wrote: > > Thanks, us

[julia-users] Re: Change bold text in REPL to normal

2016-04-19 Thread lapeyre . math122a
As a partial solution, this makes warnings print in black rather than red. julia> Base.eval(parse("default_color_warn = :black")) I just had a problem in which I wanted to do the opposite, restore coloring and bold to a new REPL. Also, this gives a black, plain typeface to warning and error mes

Re: [julia-users] How to change REPL mode on startup?

2016-04-19 Thread lapeyre . math122a
Thanks. I got it working. I copied much of the code in client.jl. In the end I wrote the new mode directly into a copy of REPL.setup_interface. There is probably an easier way to get the REPL to start in the new mode rather than julia, but this was faster for me. There were many details, eg

[julia-users] How to change REPL mode on startup?

2016-04-15 Thread lapeyre . math122a
I have a REPL mode for an application: https://github.com/jlapeyre/SJulia.jl/blob/master/src/sjulia_repl.jl I start julia in a terminal, load the package with 'using SJulia', and then press '=' to enter the alternative mode. This works fine. I would like to do this in one step. e.g. enter 's

[julia-users] Re: parallel threads broken, replacing module

2015-07-30 Thread lapeyre . math122a
Thanks Seth. On Thursday, July 30, 2015 at 2:46:42 AM UTC+2, Seth wrote: > > Reference: https://github.com/JuliaLang/julia/issues/12381 > > On Wednesday, July 29, 2015 at 5:35:14 PM UTC-7, Seth wrote: >> >> For what it's worth, I'm seeing the same thing: >> >> julia> @everywhere using LightGraphs

[julia-users] Re: parallel threads broken, replacing module

2015-07-29 Thread lapeyre . math122a
I can file a bug report. But, I'm not entirely sure what to write. Simpler case: > julia -p 4 > @everywhere using ZChop (simple modules) The following version is from a completely fresh build today. I don't get a crash immediately, but I do get WARNING: replacing module ZChop (4 times) Version

[julia-users] parallel threads broken, replacing module

2015-07-29 Thread lapeyre . math122a
Parallel threads has stopped working for me. Any ideas ? Code using addprocs and @everywhere include has stopped working (is broken) on one machine. Code that used to work now causes a number of varying errors to be printed, crashes, runaway processes, etc. when it is loaded. Both a recent v0.4

[julia-users] VoronoiCells.jl

2015-07-29 Thread lapeyre . math122a
Here is some code to manipulate Voronoi cells in 2D. https://github.com/jlapeyre/VoronoiCells.jl I am developing these recent packages more or less just enough to get some research done. When things cool down (i.e. baby is grown and I get an endowed chair of free creativity) I plan to make them

[julia-users] Re: Generalized Gamma Distribution

2015-07-26 Thread lapeyre . math122a
Since there is interest and you offer to review it, I want to. Not sure when I can do it, I am drowning in chores. It will take a bit of time to implement everything according to Distributions.jl, but it doesn't look hard. John On Sunday, July 26, 2015 at 6:11:07 PM UTC+2, Dahua Lin wrote: > >

[julia-users] Re: Generalized Gamma Distribution

2015-07-26 Thread lapeyre . math122a
Yes, I think the other distributions in Distributions.jl check parameters, as well. On Sunday, July 26, 2015 at 6:43:02 PM UTC+2, andrew cooke wrote: > > > maybe you should assert sign(d) == sign(p) (or whatever the correct julia > equivalent is?) > > (sorry if this is dumb - i was just looking

Re: [julia-users] Re: Inverse Laplace Transform

2015-07-24 Thread lapeyre . math122a
New url: https://github.com/jlapeyre/InverseLaplace.jl/blob/master/src/InverseLaplace.jl On Friday, July 24, 2015 at 4:14:57 PM UTC+2, Stefan Karpinski wrote: > > Cool. Just to get an early start on package name bikeshedding, maybe > InverseLaplace.jl? > > On Fri, Jul 24, 2015 at 8:07 AM, > >

Re: [julia-users] Re: Inverse Laplace Transform

2015-07-24 Thread lapeyre . math122a
Sounds good to me. On Friday, July 24, 2015 at 4:14:57 PM UTC+2, Stefan Karpinski wrote: > > Cool. Just to get an early start on package name bikeshedding, maybe > InverseLaplace.jl? > > On Fri, Jul 24, 2015 at 8:07 AM, > > wrote: > >> The link >> >> https://github.com/jlapeyre/ILT.jl >> >>

[julia-users] Generalized Gamma Distribution

2015-07-24 Thread lapeyre . math122a
Here is a generalized gamma distribution. https://github.com/jlapeyre/GenGammaDist.jl https://en.wikipedia.org/wiki/Generalized_gamma_distribution Only rand() and mean() are implemented, and again no tests. This depends on Distributions. The authors of Distributions may want to include somethi

[julia-users] Re: Inverse Laplace Transform

2015-07-24 Thread lapeyre . math122a
The link https://github.com/jlapeyre/ILT.jl

[julia-users] Inverse Laplace Transform

2015-07-24 Thread lapeyre . math122a
Hi, Here is a numeric Inverse Laplace Transform. It needs some tests and stuff before making an ANN:, That may not happen for a while, due to the standard excuses: baby, avoid getting fired. (Unless someone else writes them ;) ) -John

[julia-users] Re: performance problem with factor

2015-05-25 Thread lapeyre . math122a
This package has a fast factoring function. https://github.com/jlapeyre/PrimeSieve.jl But it uses an external library. The code mentioned by Steven Johnson is probably much faster (in general) than the current Julia code, but slower than the code in PrimeSieve. But, the new code is a great step

Re: [julia-users] Re: Symbolic relations package

2015-04-21 Thread lapeyre . math122a
El martes, 21 de abril de 2015, 13:16:02 (UTC+2), Marcus Appelros escribió: > > Which cases can not be handled by your native expander? A lot of cases, IIRC it only does binomial expansion. > Currently > Equations should handle all standard cases I checked it out tried a few things. It's

Re: [julia-users] Re: Symbolic relations package

2015-04-21 Thread lapeyre . math122a
El martes, 21 de abril de 2015, 7:52:19 (UTC+2), Marcus Appelros escribió: > > "Thank you for offering to help. I would like to phase out SymPy, but I > don't see it happening in the foreseeable future. I'm not sure how to > quantify the amount of capability in SymPy, but it is more or less >

Re: [julia-users] Re: Symbolic relations package

2015-04-20 Thread lapeyre . math122a
The SJulia command line mode is now built into the module, you no longer need to build the fork of Julia (thanks Keno). https://github.com/jlapeyre/SJulia julia > using SJulia sjulia > Integrate(Exp(-x^2),[x,0,Infinity])# hit '<' to enter SJulia mode (1//2) * (π ^ (1//2)) El lunes, 20 de

Re: [julia-users] Re: Symbolic relations package

2015-04-20 Thread lapeyre . math122a
SJulia already works as a package (Jim Garrison made the changes). I just learned that it should be possible to add a mode to the REPL in the package code, so that the fork/PR-to-Julia is no longer necessary. I hope to get to this soon. --John El lunes, 20 de abril de 2015, 18:14:27 (UTC+2), V

Re: [julia-users] Symbolic relations package

2015-04-20 Thread lapeyre . math122a
Great! This will allow me to include the SJulia REPL in the SJulia package (IIUC), so that one doesn't need to build a fork of Julia. --John El lunes, 20 de abril de 2015, 23:14:31 (UTC+2), Keno Fischer escribió: > > The REPL code was designed to have new modes added externally. See e.g. > the

Re: [julia-users] Re: Symbolic relations package

2015-04-20 Thread lapeyre . math122a
El lunes, 20 de abril de 2015, 20:04:25 (UTC+2), Marcus Appelros escribió: > > Currently some modifications to REPL.jl are needed, there is a fork > made which does exactly that. > > Am trying to test some of the examples in the SJulia readme, keep in > mind that this is on a old sourcebuilt 0

Re: [julia-users] Symbolic relations package

2015-04-20 Thread lapeyre . math122a
I think it would be great to submit the REPL mod, but it is not acceptable as it is, although, for the most part, it is pretty solid. Currently, a period as the first character switches both in and out of SJulia mode. Some advice from the REPL authors would be useful. I was not able to implement

Re: [julia-users] Re: Symbolic relations package

2015-04-20 Thread lapeyre . math122a
Thank you for offering to help. I would like to phase out SymPy, but I don't see it happening in the foreseeable future. I'm not sure how to quantify the amount of capability in SymPy, but it is more or less "enormous". I think I could work 8 hours a day for a year and not duplicate it in Julia

[julia-users] Re: BinDeps, C libraries in packages

2015-04-20 Thread lapeyre . math122a
It would complicate Example.jl quite a bit. On the other hand, because it's so simple, I look at other packages, not Example.jl, when I need an ... example. --John El lunes, 20 de abril de 2015, 18:12:29 (UTC+2), Viral Shah escribió: > > This seems like it is something useful to have in Exampl

[julia-users] BinDeps, C libraries in packages

2015-04-20 Thread lapeyre . math122a
Here is an example of using BinDeps to download and build C libraries when building your Julia package. https://github.com/jlapeyre/PrimeSieve.jl This file includes a lot of comments: https://github.com/jlapeyre/PrimeSieve.jl/blob/master/deps/build.jl I am posting this here because it may be u

Re: [julia-users] Re: Symbolic relations package

2015-04-20 Thread lapeyre . math122a
Here is SJulia https://github.com/jlapeyre/SJulia sjulia> f = (x^y + y^z + z^x)^3 (x ^ y + y ^ z + z ^ x) ^ 3 sjulia> f = (x^y + y^z)^3 (x ^ y + y ^ z) ^ 3 sjulia> g = Expand(f) x ^ (3 * y) + 3 * (x ^ (2 * y)) * (y ^ z) + 3 * (x ^ y) * (y ^ (2 * z)) + y ^ (3 * z) SJulia is very close in spiri

[julia-users] Re: building Julia could not allocate pools

2015-03-22 Thread lapeyre . math122a
I confirm that removing "ulimit -Sv 500" from .bashrc allows me to build Julia, or at least advances me to the next, unrelated problem. Thanks. On Tuesday, March 3, 2015 at 4:40:40 PM UTC+1, Jonathan Anderson wrote: > > I have the same problem (user janders cannot build julia: > https://gis

[julia-users] Re: Factorization of big integers is taking too long

2015-03-19 Thread lapeyre . math122a
Tim is correct in a sense. I translated some big int code a while ago, I think it was the pollard rho method (don't quite remember the details) and the inability to reuse storage for a bigint caused a big performance hit. (I thought about some workaround, but unfortunately I don't remember what

[julia-users] Re: building Julia could not allocate pools

2015-02-27 Thread lapeyre . math122a
Ok. I'll get to it ASAP. I also tried a completely fresh clone, and I get the same error. On Friday, February 27, 2015 at 3:59:52 PM UTC+1, Ivar Nesje wrote: > > Thanks for reporting > > The error seems to be coming from /src/gc.c#L482 >

[julia-users] building Julia could not allocate pools

2015-02-27 Thread lapeyre . math122a
Anyone know something about this ? I did not build the latest Julia (master branch) since about 30 days. Now, when I do 'git pull' and 'make' I am getting various error messages: could not allocate pools Aborted Makefile:165: recipe for target '/home/jlapeyre/software_source/julia/usr/l

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-02-27 Thread lapeyre . math122a
Thanks for the info Ondrej and John. On Friday, February 27, 2015 at 4:31:46 AM UTC+1, j verzani wrote: > > I think PyCall already has what you need for conversion: > > PyObject(big(pi)) will create a an mpf instance of a big float, like > big(pi) > convert(BigFloat, PyObject(big(pi))) will retu

[julia-users] Re: Julia users @ APS March Meeting?

2015-02-27 Thread lapeyre . math122a
What do you think about making a doodle or some web thingy to arrange a time ? On Monday, February 23, 2015 at 8:39:23 PM UTC+1, Jim Garrison wrote: > > The annual March Meeting of the American Physical Society is next week in > San Antonio, and I am wondering if any Julia users would be intere

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-02-26 Thread lapeyre . math122a
BTW. Do you know much about the SymPy interface ? (or maybe the authors are reading this ?) Francesco has already supplied a lot of information, but I am new to sympy. Here, I ask for an integer to be converted with _to_mpmath https://github.com/jlapeyre/SJulia/blob/master/src/sympy.jl#L89 And

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-02-26 Thread lapeyre . math122a
(I am resending because, this my message to Ondřej did not go to the list) Hi Ondřej, The various sympy projects are very interesting, your work porting Rubi especially. SJulia is using SymPy for a lot of features (Integrate, Solve, ...) . Here is some test code https://github.com/jlapeyre/S

Re: [julia-users] Re: workflow for devloping large modules

2015-02-25 Thread lapeyre . math122a
I usually edit files and 'include' them, sometimes copy and paste. Thanks for posting the information on ESS. Cheers, John On Wednesday, February 25, 2015 at 1:04:09 PM UTC+1, Tamas Papp wrote: > > ESS _does_ support Julia at the moment: > > 1. editing Julia code works fine, even though the afo

[julia-users] Re: workflow for devloping large modules

2015-02-25 Thread lapeyre . math122a
Great. I have not tried ESS yet, but definitely will when it supports Julia. I am not completely happy with emacs and julia-mode now. julia-mode seems to insert a lot of trailing whitespace when killing/yanking. And I can't find a decent terminal mode/ shell buffer, unless I am running something

Re: [julia-users] Re: workflow for devloping large modules

2015-02-25 Thread lapeyre . math122a
I guess you mean using the module's eval to add functions/variables ? This sounds like an excellent option. I am using emacs/julia mode + konsole. On Wednesday, February 25, 2015 at 11:39:31 AM UTC+1, Tamas Papp wrote: > > Hi John, > > In fact you can eval "into" a module and thus add function

[julia-users] Re: workflow for devloping large modules

2015-02-25 Thread lapeyre . math122a
I found a solution. If something is wrong, please correct it in this thread. -- To make a module, you must put code in a single module expression 'module MyModule ... end'. You may 'include' other files within this expression which has the effect of literally writing the contents inside

[julia-users] workflow for devloping large modules

2015-02-24 Thread lapeyre . math122a
I'm looking for a workflow, maybe someone can point me to a thread or a document. I was developing a large module without actually putting it in a module. It is 7500 lines of code (counting every newline) and the test suite is about 700 lines. I arranged things so the module loads in about 2-3 sec

[julia-users] Re: Julia users @ APS March Meeting?

2015-02-23 Thread lapeyre . math122a
I'm interested. On Monday, February 23, 2015 at 8:39:23 PM UTC+1, Jim Garrison wrote: > > The annual March Meeting of the American Physical Society is next week in > San Antonio, and I am wondering if any Julia users would be interested in > getting together there to chat for a bit. I already k

[julia-users] Loading code from base without building Julia

2015-02-22 Thread lapeyre . math122a
Hi, Is it possible to copy code from the base directory, modify it, and reload it ? I suppose this depends on exactly what you want to do. I have modified REPL.jl. At present, the only way I know how to use this is to build Julia. There is the added complication that the modified version would

[julia-users] Re: symbolic computation in Julia (again)

2015-02-21 Thread lapeyre . math122a
Regarding python and SymPy: I meant to say implementing Mma-like expressions via a hierarchy of *classes*, not types > > >

[julia-users] symbolic computation in Julia (again)

2015-02-21 Thread lapeyre . math122a
Hi, Here is more on the experiment in symbolic computation. Some results and timing are given in the README. https://github.com/jlapeyre/SJulia The focus is still on a Mathematica-like language, although I think it's possible and desirable to write routines with an interface so that they can

[julia-users] Re: Levi-Civita symbol/tensor

2015-02-16 Thread lapeyre . math122a
I should note that a couple of routines in PermPlain are not MIT license compatible. But all the code to compute the signature of a permutation most definitely is MIT compatible. I wrote it, although the algorithm is well known. There is also this code which calls PermPlain: https://github.com/

[julia-users] Re: Levi-Civita symbol/tensor

2015-02-16 Thread lapeyre . math122a
Maybe its too late, but here is a fast implementation giving the signature of the output of randperm(n) https://github.com/jlapeyre/PermPlain.jl/blob/master/src/PermPlain.jl#L271 On Monday, February 9, 2015 at 8:41:58 PM UTC+1, Blake Johnson wrote: > > I keep writing code that needs the Levi-Ci

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-01-28 Thread lapeyre . math122a
Francesco, I just realized that Mathics is actually aiming to implement the Mma language. For some reason I thought it was only using the same syntax. So, this is indeed similar to what I am trying to do. Except that I consider the code that I have now to be an experiment. On Wednesday, Januar

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-01-28 Thread lapeyre . math122a
On Wednesday, January 28, 2015 at 10:20:08 AM UTC+1, Francesco Bonazzi wrote: > > > > On Tuesday, January 27, 2015 at 12:34:43 PM UTC+1, John Lapeyre wrote: >> >> > I read that the next version of Rubi will feature a decision tree, no >> longer pattern matching. >> >> Interesting. I don't see

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-01-26 Thread lapeyre . math122a
On Monday, January 26, 2015 at 7:20:54 PM UTC+1, Francesco Bonazzi wrote: > > > > > A Mathematica parser could be used as an optional addition, such as what > Mathics is to SymPy. > > Anyways, there are various options for Julia: > >- use Expr and operate on them, this is similar to how Maxi

Re: [julia-users] Re: ANN: Symbolic computation with Julia

2015-01-26 Thread lapeyre . math122a
(My posts are not appearing where I want. Hope this one does!) On Monday, January 26, 2015 at 6:57:48 PM UTC+1, James Crist wrote: > > Maybe the parser could be useful if rewritten in Julia: > > > Side tracking a bit, but one of the reasons I use SymPy instead of > something like Maxima is that

[julia-users] Re: ANN: Symbolic computation with Julia

2015-01-26 Thread lapeyre . math122a
> Maybe the parser could be useful if rewritten in Julia: > http://www.cs.berkeley.edu/~fateman/lisp/mma4max/parser.lisp > Another option is to rewrite it in Scheme, which is what Julia's parser is written in. I have hacked the mma4max parser some for a previous project, and I looked at the Ju

[julia-users] Re: ANN: Symbolic computation with Julia

2015-01-26 Thread lapeyre . math122a
Hi Francesco, > It is an open source Wolfram Mathematica interpreter written in Python, > and uses SymPy as a callback for math algorithms. > > You may try it from your browser: > http://www.mathics.net/ > I looked at it, but didn't get a chance to use it. > If you wish to try sympy out,

[julia-users] Re: ANN: Symbolic computation with Julia

2015-01-26 Thread lapeyre . math122a
Hello Jim, Thanks for the long response. I looked at the papers; I think they are worth studying. I found that I can progress most quickly modeling on Mathematica. The design is fairly simple and consistent. Of course the documentation is vague in some places, but so far, it is not a problem. Of

[julia-users] ANN: Symbolic computation with Julia

2015-01-25 Thread lapeyre . math122a
Hi, Here is some code I have been working on. It is for symbolic computation based on pattern matching. If you find it interesting, any feedback is welcome! https://github.com/jlapeyre/SJulia --John

[julia-users] Does TypeCheck specify which methods failed ?

2015-01-08 Thread lapeyre . math122a
I see this when I use TypeCheck: checkreturntypes(ModuleName) blah blah The total number of failed methods in ModuleName is 2 But I can't see which methods failed. Am I missing something ? --John

[julia-users] Re: Notice about coverage results

2015-01-07 Thread lapeyre . math122a
Is there already a bug report for this ? (Linux) $ julia --version julia version 0.3.5-pre+121 $ julia --code-coverage Segmentation fault This version of julia was giving the same segfault. But, now mysteriously is not. $ julia-0.4 --version julia version 0.4.0-dev+2470 On Wednesday, January 7

Re: [julia-users] Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
Good. This is fine with me.Thanks. --John On Monday, January 5, 2015 9:52:58 PM UTC+1, Viral Shah wrote: > > I believe the labels can only be attached by those who have read/write > access. > > -viral > > > > > On 06-Jan-2015, at 2:20 am, lapeyre@gmail.com wrote: > > > > Ok. It's done.

Re: [julia-users] Re: Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
Ok. It's done. Just to be sure I understood what I read on a github forum; there is no way for me to attach a label to the PR. So the labels are always added by someone else ? --John On Monday, January 5, 2015 9:25:18 PM UTC+1, Viral Shah wrote: > > Thanks. Do create a PR. > > -viral > > > >

Re: [julia-users] Re: Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
I meant randbool() in v0.3, where it was a more direct call, not randbool() in v0.4. Anyway, I just found the problem and patched it. Adding one '@inline' now makes rand(Bool) in v0.4 about as fast as randbool() in v0.3. Should I open an issue (bug report), or just make a PR ? On Monday, Janua

Re: [julia-users] Re: Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
It may be in part the implementation of the RNG. I think it is also in part whether the abstraction is optimized away. Notice that Julia v0.3 is faster than v0.4. This is probably randbool() vs. rand(Bool). On Monday, January 5, 2015 4:50:56 PM UTC+1, Isaiah wrote: > > Very neat. Just in case t

[julia-users] Re: Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
Oh, and, (I forgot to mention!) the Julia code runs much faster. On Monday, January 5, 2015 3:56:07 PM UTC+1, lapeyre@gmail.com wrote: > > Hi, here is a comparison of Julia and C++ for simulating a random walk > . > > It is the first Julia pr

[julia-users] Julia vs C++-11 for random walks

2015-01-05 Thread lapeyre . math122a
Hi, here is a comparison of Julia and C++ for simulating a random walk . It is the first Julia program I wrote. I just pushed it to github. --John

[julia-users] Re: Julia takes 2nd place in "Delacorte Numbers" competition

2015-01-04 Thread lapeyre . math122a
Congratulations! Awesome. Don't know if this is Arch D or Arch S. The scores look even closer than track and field times. On Sunday, January 4, 2015 6:35:46 PM UTC+1, Arch Robison wrote: > > FYI, I won 2nd place in the recent A

[julia-users] Re: Constructing Expr from s-expressions

2015-01-04 Thread lapeyre . math122a
Not sure, but maybe this is what you are looking for, https://gist.github.com/toivoh/4121122 On Sunday, January 4, 2015 6:49:39 AM UTC+1, Darwin Darakananda wrote: > > Hi everyone, > > Is there currently a function that converts s-expressions into Expr > structures (basically the reverse of Base

Re: [julia-users] Re: bug in jacobisymbol Combinatorics.jl

2015-01-03 Thread lapeyre . math122a
Great, thanks. Cint make more sense. Also, the same change needs to be made for legendresymbol. On Saturday, January 3, 2015 7:11:19 PM UTC+1, Jiahao Chen wrote: > > Thanks for the report and the fix. > > I've updated the code and strengthened the test; the only change was to > use Cint inste

[julia-users] Re: bug in jacobisymbol Combinatorics.jl

2015-01-03 Thread lapeyre . math122a
Changing the line that calls libgmp like this ( Int is replaced with Int32 ) return convert(Int,ccall((:__gmpz_jacobi, :libgmp), Int32, gives correct results. The C header and code says the return type is 'int'. All values that should be -1, come out 4294967295. This may be system dependent,

[julia-users] bug in jacobisymbol Combinatorics.jl

2015-01-03 Thread lapeyre . math122a
This is not correct julia> jacobisymbol(10,7) 4294967295 This happens in v0.3 and v0.4 I can send more information, and have a possible fix. I tried to find a way to make a comment or issue or something at https://github.com/jiahao/Combinatorics.jl, but was unable to find a button for it. Bette

[julia-users] Re: Static type fields

2015-01-02 Thread lapeyre . math122a
And more generally, sections for C++ and java in Noteworthy Differences would be useful. Except, I'm thinking of not only syntactic differences, but rather how very common features or idioms in C++ are done in Julia. A coll

Re: [julia-users] Static type fields

2015-01-02 Thread lapeyre . math122a
I guess that many people coming from a common OO language will look for this and it seems natural to look in the manual in the sections 'Types' or 'Methods'. Maybe somewhere near the discussion of fields in Composite Types .

Re: [julia-users] Re: ANN: ApproxFun v0.05 with support for piecewise and singular functions

2014-12-31 Thread lapeyre . math122a
Duh! Sorry for adding noise to the list. On Wednesday, December 31, 2014 9:06:22 PM UTC+1, Jiahao Chen wrote: > > > On Wed, Dec 31, 2014 at 2:53 PM, > > wrote: > >> Pkg.add("ApproxFun") did not give me v0.0.5 for some reason >> > > 0.0.5 was posted less than two days ago. Did you run Pkg.update()

  1   2   >