[julia-users] Control package name prefix in expressions returned by macros

2016-10-13 Thread Helios De Rosario
Hi, I would like to know how to control the way in which package name 
prefixes are added in the expressions returned by macros.

Let's take a simple example macro, which takes an function call and 
replaces the first argument by a function "foo" of that argument:

macro composefoo(ex)
x = ex.args[2]
ex.args[2] = :(foo($x))
ex
end

If I define this in Main I will obtain:

julia> macroexpand(:(@composefoo bar(x)))
:(bar(foo(x)))

But if I define the same macro inside a package called Foo, the result is:

julia> using Foo
julia> macroexpand(:(@composefoo bar(x)))
:(Foo.bar(Foo.foo(Foo.x)))

In this example, if the function "foo" is defined inside Foo (and not 
exported), it is useful to have the prefix automatically added in the 
returned expression, but I would like to preserve the function name "bar" 
and the argument "x" untouched.

I know that I can escape the returned expression, but that would be 
dangerous in more complex cases, if the expression contains different 
lines, including the assignment of values to new variables and I don't want 
to accidentally overwrite existing variables with the same name in Main. 
Generally, I would like to escape only the names of the variables and 
functions that are included in the input expression. But I don't know if 
there is a smart way of doing that.

Best regards
Helios De Rosario


[julia-users] [ANN] New package RecurrenceAnalysis.jl

2016-05-25 Thread Helios De Rosario
I'm please to announce the release of the new package RecurrenceAnalysis:

https://github.com/heliosdrm/RecurrenceAnalysis.jl

This package provides tools to perform Recurrence Quantification Analysis 
(RQA) in Julia. Besides the basic functions to calculate recurrence 
matrices and RQA parameters (recurrence rate, determinism, entropy, trend, 
etc.), it currently provides methods to find the optimal embedding 
dimension and delay for embedding time series in the phase space.

I expect to add other utilities in the near future, but any contributions 
are welcome, including testing for bugs, or comparison with other toolkits.

I hope you enjoy it.
Best regards,
Helios De Rosario


[julia-users] Laxity of inferred types in dictionaries

2015-03-23 Thread Helios De Rosario
Take this minimal example:

julia k = [a, b]
2-element Array{ASCIIString,1}:
 a
 b

julia v = [1, 0.5]
2-element Array{Float64,1}:
 1.0
 0.5

julia # This is expected
julia Dict(k,v)
Dict{ASCIIString,Float64} with 2 entries:
  b = 0.5
  a = 1.0

julia # But here the values are of type Any, not Float64
julia [a=1, b=0.5]
Dict{ASCIIString,Any} with 2 entries:
  b = 0.5
  a = 1

It seems that the literal definition of dictionaries infers Any when the
values (or keys) are not of the same type -- in this example, an integer
and a float. In the creation of arrays, for instance, Julia is not that
loose (it infers Float64 in this example).

It happens the same with other types and supertypes, e.g. with ASCIIString
and UTF8String.

I would have expected the same behaviour in both ways of defining the
dictionary. Is there a reason why it is not so?

Regards
Helios


Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-18 Thread Helios De Rosario
Hi Tony,

This is the output of versioninfo(), although I'm afraid it is not very
informative about the CPU:

Commit c03f413* (2014-09-21 21:30 UTC)
Platform Info:
  System: Linux (i386-redhat-linux)
  CPU: Unknown CPU Type
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Athlon)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


On Thu, Oct 16, 2014 at 1:37 PM, Tony Kelman t...@kelman.net wrote:

 For future reference and trivia purposes, Helios could you post the output
 from versioninfo() ? I'm curious what generation your CPU is that caused
 the problem.


 On Wednesday, October 15, 2014 2:19:10 PM UTC-7, Elliot Saba wrote:

 Peter, the stable downloads there, are the same as what you get from
 the http://julialang.org/downloads page. We just haven't put these
 generic tarball downloads there yet as we're still ensuring we have all
 the kinks worked out in the build process.

 Helios, glad it's working for you now!  I'm betting the problem here was
 that the target CPU architecture for the Ubuntu builds was pentium4,
 whereas the binary I just gave you was targeted at i686.  I've since made
 a change in our ubuntu buildscripts, so hopefully in the future you'll be
 able to use the PPA painlessly.
 -E

 On Wed, Oct 15, 2014 at 1:55 PM, Helios De Rosario helios.d...@gmail.com
  wrote:

 helios@ubuntu-pc:~/julia-c03f413bbd/bin$ ~/julia-c03f413bbd/bin/julia
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.1 (2014-09-21 21:30 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
 |__/   |  i386-redhat-linux

 julia println(Hello world!)
 Hello world!


 Success!!

 Many thanks, Elliot. That binary distribution seems to work fine in my
 machine. (My old history file was not compatible, but the error message the
 first time I started this version was helpful enough to work around it.)

 Now I can enjoy of updated Julia. :) Thanks again to all the developers
 for it.

 Helios


 On Wed, Oct 15, 2014 at 10:00 PM, Elliot Saba stati...@gmail.com
 wrote:

 H.  Could you try downloading this binary distribution
 http://status.julialang.org/stable/linux-i386, unpacking it, and
 seeing if it works?  It's just a `.tar.gz`, so you can just download it,
 extract it, and run the julia that's inside the `bin` directory.
 -E

 On Sat, Oct 11, 2014 at 5:21 PM, Helios De Rosario 
 helios.d...@gmail.com wrote:

 Hi Elliot. This is what I have done, with detailed output. I hope it
 helps to understand what is happening. (My Ubuntu is in Spanish, but I 
 hope
 that the Spanish output lines are understandable anyway.)

 1. Install Julia from the PPA repo

 helios@ubuntu-pc:~$ sudo apt-get install julia
 Leyendo lista de paquetes... Hecho
 Creando árbol de dependencias
 Leyendo la información de estado... Hecho
 Los paquetes indicados a continuación se instalaron de forma
 automática y ya no son necesarios.
   libllvm3.3 linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
   linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
 Use 'apt-get autoremove' to remove them.
 Paquetes sugeridos:
   ess julia-doc
 Se instalarán los siguientes paquetes NUEVOS:
   julia
 0 actualizados, 1 se instalarán, 0 para eliminar y 0 no actualizados.
 Se necesita descargar 0 B/11,6 MB de archivos.
 Se utilizarán 56,2 MB de espacio de disco adicional después de esta
 operación.
 Seleccionando el paquete julia previamente no seleccionado.
 (Leyendo la base de datos ... 248820 ficheros o directorios instalados
 actualmente.)
 Preparing to unpack .../julia_0.3.1~trusty2_i386.deb ...
 Unpacking julia (0.3.1~trusty2) ...
 Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
 Configurando julia (0.3.1~trusty2) ...
 Processing triggers for libc-bin (2.19-0ubuntu6.3) ...

 2. Run Julia normally:

 helios@ubuntu-pc:~$ julia
 Instrucción ilegal (`core' generado)

 3. Run Julia from gdb (thanks for the suggestion):

 helios@ubuntu-pc:~$ gdb julia
 GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later 
 http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show
 copying
 and show warranty for details.
 This GDB was configured as i686-linux-gnu.
 Type show configuration for configuration details.
 Para las instrucciones de informe de errores, vea:
 http://www.gnu.org/software/gdb/bugs/.
 Find the GDB manual and other documentation resources online at:
 http://www.gnu.org/software/gdb/documentation/.
 For help, type help.
 Type apropos word to search for commands related to word...
 Leyendo símbolos desde julia...hecho.
 (gdb) r
 Starting program: /usr/bin/julia
 [Depuración de hilo usando

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-15 Thread Helios De Rosario
helios@ubuntu-pc:~/julia-c03f413bbd/bin$ ~/julia-c03f413bbd/bin/julia
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type help() for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.1 (2014-09-21 21:30 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  i386-redhat-linux

julia println(Hello world!)
Hello world!


Success!!

Many thanks, Elliot. That binary distribution seems to work fine in my
machine. (My old history file was not compatible, but the error message the
first time I started this version was helpful enough to work around it.)

Now I can enjoy of updated Julia. :) Thanks again to all the developers for
it.

Helios


On Wed, Oct 15, 2014 at 10:00 PM, Elliot Saba staticfl...@gmail.com wrote:

 H.  Could you try downloading this binary distribution
 http://status.julialang.org/stable/linux-i386, unpacking it, and seeing
 if it works?  It's just a `.tar.gz`, so you can just download it, extract
 it, and run the julia that's inside the `bin` directory.
 -E

 On Sat, Oct 11, 2014 at 5:21 PM, Helios De Rosario 
 helios.derosa...@gmail.com wrote:

 Hi Elliot. This is what I have done, with detailed output. I hope it
 helps to understand what is happening. (My Ubuntu is in Spanish, but I hope
 that the Spanish output lines are understandable anyway.)

 1. Install Julia from the PPA repo

 helios@ubuntu-pc:~$ sudo apt-get install julia
 Leyendo lista de paquetes... Hecho
 Creando árbol de dependencias
 Leyendo la información de estado... Hecho
 Los paquetes indicados a continuación se instalaron de forma automática y
 ya no son necesarios.
   libllvm3.3 linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
   linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
 Use 'apt-get autoremove' to remove them.
 Paquetes sugeridos:
   ess julia-doc
 Se instalarán los siguientes paquetes NUEVOS:
   julia
 0 actualizados, 1 se instalarán, 0 para eliminar y 0 no actualizados.
 Se necesita descargar 0 B/11,6 MB de archivos.
 Se utilizarán 56,2 MB de espacio de disco adicional después de esta
 operación.
 Seleccionando el paquete julia previamente no seleccionado.
 (Leyendo la base de datos ... 248820 ficheros o directorios instalados
 actualmente.)
 Preparing to unpack .../julia_0.3.1~trusty2_i386.deb ...
 Unpacking julia (0.3.1~trusty2) ...
 Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
 Configurando julia (0.3.1~trusty2) ...
 Processing triggers for libc-bin (2.19-0ubuntu6.3) ...

 2. Run Julia normally:

 helios@ubuntu-pc:~$ julia
 Instrucción ilegal (`core' generado)

 3. Run Julia from gdb (thanks for the suggestion):

 helios@ubuntu-pc:~$ gdb julia
 GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later 
 http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as i686-linux-gnu.
 Type show configuration for configuration details.
 Para las instrucciones de informe de errores, vea:
 http://www.gnu.org/software/gdb/bugs/.
 Find the GDB manual and other documentation resources online at:
 http://www.gnu.org/software/gdb/documentation/.
 For help, type help.
 Type apropos word to search for commands related to word...
 Leyendo símbolos desde julia...hecho.
 (gdb) r
 Starting program: /usr/bin/julia
 [Depuración de hilo usando libthread_db enabled]
 Using host libthread_db library /lib/i386-linux-gnu/libthread_db.so.1.

 Program received signal SIGILL, Illegal instruction.
 0xb730f3ba in ?? () from /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 (gdb) bt
 #0  0xb730f3ba in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #1  0xb73111fe in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #2  0xb7311407 in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #3  0xb7311c4d in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #4  0xb7311f8e in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #5  0xb73126bf in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #6  0xb731201e in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #7  0xb73126bf in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #8  0xb7312178 in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #9  0xb731281f in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #10 0xb73137e7 in ?? () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #11 0xb72ab662 in jl_init_frontend () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #12 0xb72f38a5 in julia_init () from
 /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
 #13 0x08048e76 in main (argc=0, argv=0xb298

Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-11 Thread Helios De Rosario
Hi, it is an old 32-bit machine. I had already uninstalled Julia 0.3.1 and
downgraded to the 0.2.1 version from the Ubuntu repo, which does run
smoothly. But I will give it another try and let you know. Thanks for the
support.

Helios

On Fri, Oct 10, 2014 at 10:11 PM, Elliot Saba staticfl...@gmail.com wrote:

 What kind of computer do you have?  Is it a 32-bit machine or 64-bit?  Can
 you try running julia inside of gdb and giving any information on what gdb
 says such as a backtrace showing where it crashed?

 To run julia inside of gdb, just run gdb julia, then when gdb is loaded
 press r to run julia, and when it crashes, enter bt to get a backtrace.

 On Fri, Oct 10, 2014 at 12:58 PM, Helios De Rosario 
 helios.derosa...@gmail.com wrote:

 It is 0.3.1~trusty2.

 The crash message in the terminal only says core generated (in
 Spanish). I suppose it means that there is a dump file somewhere with the
 details, but I cannot find it. If somebody knows where should I look for
 it, I would be happy to post those details.

 Thanks
 Helios




 On Thu, Oct 9, 2014 at 8:47 AM, Elliot Saba staticfl...@gmail.com
 wrote:

 Hello Helios, can you tell me what version of the package you have
 installed?  You can get this via dpkg -l julia.  I'm looking for a
 version number like 0.3.1~trusty1 or similar.  Also, can you copy the
 message given at the crash here?

 Thanks,
 -E

 On Wed, Oct 8, 2014 at 5:56 PM, K Leo cnbiz...@gmail.com wrote:

 On Xubuntu 14.04 64, it seems to work fine:

_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.1 (2014-09-21 21:30 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org release
 |__/   |  x86_64-linux-gnu



 On 2014年10月09日 08:50, Helios De Rosario wrote:

 Hi again,

 I saw that the 0.3.1 version of Julia was already available to install
 from the juliareleases repository, and tried to install it. But when I
 start Julia now it crashes. It generates a core file and suggests sending 
 a
 report (I accepted).

 Somebody else has experienced this? I am using Lubuntu 14.04 in an
 i386 machine. Julia 0.2.1 from the main Ubuntu repository worked normally.
 How could I report more details to help debug this problem?

 Thanks for your support
 Helios De Rosario








Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-11 Thread Helios De Rosario
Hi Elliot. This is what I have done, with detailed output. I hope it helps
to understand what is happening. (My Ubuntu is in Spanish, but I hope that
the Spanish output lines are understandable anyway.)

1. Install Julia from the PPA repo

helios@ubuntu-pc:~$ sudo apt-get install julia
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y
ya no son necesarios.
  libllvm3.3 linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic
  linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
Use 'apt-get autoremove' to remove them.
Paquetes sugeridos:
  ess julia-doc
Se instalarán los siguientes paquetes NUEVOS:
  julia
0 actualizados, 1 se instalarán, 0 para eliminar y 0 no actualizados.
Se necesita descargar 0 B/11,6 MB de archivos.
Se utilizarán 56,2 MB de espacio de disco adicional después de esta
operación.
Seleccionando el paquete julia previamente no seleccionado.
(Leyendo la base de datos ... 248820 ficheros o directorios instalados
actualmente.)
Preparing to unpack .../julia_0.3.1~trusty2_i386.deb ...
Unpacking julia (0.3.1~trusty2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Configurando julia (0.3.1~trusty2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.3) ...

2. Run Julia normally:

helios@ubuntu-pc:~$ julia
Instrucción ilegal (`core' generado)

3. Run Julia from gdb (thanks for the suggestion):

helios@ubuntu-pc:~$ gdb julia
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
Type show configuration for configuration details.
Para las instrucciones de informe de errores, vea:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type help.
Type apropos word to search for commands related to word...
Leyendo símbolos desde julia...hecho.
(gdb) r
Starting program: /usr/bin/julia
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library /lib/i386-linux-gnu/libthread_db.so.1.

Program received signal SIGILL, Illegal instruction.
0xb730f3ba in ?? () from /usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
(gdb) bt
#0  0xb730f3ba in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#1  0xb73111fe in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#2  0xb7311407 in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#3  0xb7311c4d in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#4  0xb7311f8e in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#5  0xb73126bf in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#6  0xb731201e in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#7  0xb73126bf in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#8  0xb7312178 in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#9  0xb731281f in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#10 0xb73137e7 in ?? () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#11 0xb72ab662 in jl_init_frontend () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#12 0xb72f38a5 in julia_init () from
/usr/bin/../lib/i386-linux-gnu/julia/libjulia.so
#13 0x08048e76 in main (argc=0, argv=0xb298) at repl.c:355
(gdb) q
Una sesión de depuración está activa.

Inferior 1 [process 4096] will be killed.

¿Salir de cualquier modo? (y o n) y


And these are the contents of /proc/cpuinfo:

processor: 0
vendor_id: AuthenticAMD
cpu family: 6
model: 8
model name: Unknown CPU Type
stepping: 1
cpu MHz: 1799.769
cache size: 256 KB
physical id: 0
siblings: 1
core id: 0
cpu cores: 1
apicid: 0
initial apicid: 0
fdiv_bug: no
f00f_bug: no
coma_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 1
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips: 3599.53
clflush size: 32
cache_alignment: 32
address sizes: 34 bits physical, 32 bits virtual
power management: ts


If you need any further info, just ask.
Thanks and best regards
Helios


Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-10 Thread Helios De Rosario
It is 0.3.1~trusty2.

The crash message in the terminal only says core generated (in Spanish).
I suppose it means that there is a dump file somewhere with the details,
but I cannot find it. If somebody knows where should I look for it, I would
be happy to post those details.

Thanks
Helios



On Thu, Oct 9, 2014 at 8:47 AM, Elliot Saba staticfl...@gmail.com wrote:

 Hello Helios, can you tell me what version of the package you have
 installed?  You can get this via dpkg -l julia.  I'm looking for a
 version number like 0.3.1~trusty1 or similar.  Also, can you copy the
 message given at the crash here?

 Thanks,
 -E

 On Wed, Oct 8, 2014 at 5:56 PM, K Leo cnbiz...@gmail.com wrote:

 On Xubuntu 14.04 64, it seems to work fine:

_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.1 (2014-09-21 21:30 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org release
 |__/   |  x86_64-linux-gnu



 On 2014年10月09日 08:50, Helios De Rosario wrote:

 Hi again,

 I saw that the 0.3.1 version of Julia was already available to install
 from the juliareleases repository, and tried to install it. But when I
 start Julia now it crashes. It generates a core file and suggests sending a
 report (I accepted).

 Somebody else has experienced this? I am using Lubuntu 14.04 in an i386
 machine. Julia 0.2.1 from the main Ubuntu repository worked normally. How
 could I report more details to help debug this problem?

 Thanks for your support
 Helios De Rosario






Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-10-08 Thread Helios De Rosario
Hi again,

I saw that the 0.3.1 version of Julia was already available to install from
the juliareleases repository, and tried to install it. But when I start
Julia now it crashes. It generates a core file and suggests sending a
report (I accepted).

Somebody else has experienced this? I am using Lubuntu 14.04 in an i386
machine. Julia 0.2.1 from the main Ubuntu repository worked normally. How
could I report more details to help debug this problem?

Thanks for your support
Helios De Rosario


[julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-04-19 Thread Helios De Rosario
Hi, I have just changed the OS of my computer to Ubuntu 14.04 (actually 
Lubuntu... too old a computer for other options). I am looking forward to 
installing Julia, but the official documentation has not still any pointer 
that seems appropriate for this version.

https://launchpad.net/~staticfloat/+archive/juliareleases does not still 
contain packages for Trusty Tahr. Adding ppa:staticfloat/juliareleases by 
command line or by the dialog for origins of software does not seem to work 
either. I have found, however, this:

http://packages.ubuntu.com/trusty/julia

But the page for download says that it is not advisable to install that 
manually. Is that correct?

Any advice will be more than welcome.

Best regards
Helios




Re: [julia-users] PPA for Ubuntu 14.04 (Trusty Tahr)

2014-04-19 Thread Helios De Rosario
Great. Thanks!

El sábado, 19 de abril de 2014 23:09:39 UTC+2, Elliot Saba escribió:

 Hello Helios. I am currently working on updating the PPA for trusty. I 
 will post here when the packages are available for download. 

 The main repository you linked has a Julia 0.2.1 package which will be the 
 same as what you get from the juliareleases repo, so go ahead and install 
 that if you wish. Note however that the main Ubuntu repositories will lag 
 behind the Julia releases repository so, for instance, when we release 
 julia 0.3 it will not show up outside of the juliareleases repository for 
 some time. 
 On Apr 19, 2014 1:58 PM, Helios De Rosario 
 helios.d...@gmail.comjavascript: 
 wrote:

 Hi, I have just changed the OS of my computer to Ubuntu 14.04 (actually 
 Lubuntu... too old a computer for other options). I am looking forward to 
 installing Julia, but the official documentation has not still any pointer 
 that seems appropriate for this version.

 https://launchpad.net/~staticfloat/+archive/juliareleases does not still 
 contain packages for Trusty Tahr. Adding ppa:staticfloat/juliareleases by 
 command line or by the dialog for origins of software does not seem to work 
 either. I have found, however, this:

 http://packages.ubuntu.com/trusty/julia

 But the page for download says that it is not advisable to install that 
 manually. Is that correct?

 Any advice will be more than welcome.

 Best regards
 Helios




[julia-users] ccall to sscanf for float variables

2014-02-21 Thread Helios De Rosario
Hello,

This is my first post in this group. Please correct me if I make some 
mistake in asking my question. (I have not found any specific posting 
guide for this group.)

I'm accustomed to use sscanf in C and Octave, and it is one of the first 
things that I missed when started using Julia. I'm not sure of the reason 
why it is not implemented (on the other hand there is the @sprintf macro). 
Of course, regular expressions can do that work as well, and perhaps Julia 
developers have reasons to prefer that option to a scanf-like function. But 
I have not found any statement about this topic in the manual, this group 
or anywhere else.

Ok, be that as it may... I tried to call the C function sscanf with ccall 
(at least for fun, if not for practical reasons), but I have not been able 
to make it work to scan float variables. For example, this does work (using 
int and string variables):

## C equivalent code:
# int hour, minutes;
# char ampm[3];
# sscanf(12:30 AM, %d:%d %s, hour, minutes, ampm);

hour = Int32[0]
minutes = Int32[0]
ampm = ??
ccall(:sscanf, Int32, (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{
Uint8}),
 12:30 AM, %d:%d %s, hour, minutes, ampm)

However, if I want to scan a float, sscanf fails to parse the string. E.g. 
replace hour or minutes by a Float64 - or Float32 - array, and change 
the corresponding %d in the pattern string by %f, %g, %e, etc.; in 
that case ccall returns 0, and the variables do not change.

Any idea of why?
I'm using Julia 0.2.1 for Windows 32 bit in Windows 7. Please let me know 
if you need more details.

By the way, you will see in the example that in the first argument to ccall 
I have only put the name of the C function, instead of a tuple including 
the name of the C library (stdio in this case). The reason is that using 
the tuple throws an error (error compiling anonymous: could not load 
module stdio: no error). Does it anything to do with my not having MinGW 
or any other compiler installed in my machine?