[julia-users] workflow question--include file when it changes?

2014-03-11 Thread David Chudzicki
Hi-- The workflow I'd like is to edit a file and see the effect of what I've done upon saving. Best would be something like conttest julia mycode.jl, which runs the script through Julia whenever it changes, but I'm finding this too slow (since loading some of the packages my script uses takes a

Re: [julia-users] Converting a column of a DataFrame to a string

2014-03-11 Thread John Myles White
Here's one way to do that: UTF8String[string(x) for x in df[:A]] -- John On Mar 11, 2014, at 6:48 PM, Jason Solack wrote: > no, i'm sorry. I have a vector that's eltype is Float64, it has values that > i'd like to replace with the words that describe their values. right now when > assigning

Re: [julia-users] Select and element from a tuple for each row in an array

2014-03-11 Thread John Myles White
Here’s one way: A = { (4000,0.97613,1.6e6), (2000,0.97613,80.0), (8000,0.97613,3.2e6), (1000,0.97613,40.0) } Float64[row[3] for row in A] — John On Mar 11, 2014, at 9:34 PM, Matthew Crews wrote: > (4000,0.97613,1.6e6) > (2000,0.97613,80.0) > (8000,0.97613,3.2e6) > (1000,0.97613,

Re: [julia-users] Select and element from a tuple for each row in an array

2014-03-11 Thread John Myles White
Here’s one way: A = { (4000,0.97613,1.6e6), (2000,0.97613,80.0), (8000,0.97613,3.2e6), (1000,0.97613,40.0) } Float64[row[3] for row in A] — John On Mar 11, 2014, at 9:34 PM, Matthew Crews wrote: > (4000,0.97613,1.6e6) > (2000,0.97613,80.0) > (8000,0.97613,3.2e6) > (1000

Re: [julia-users] Trouble getting Sundials.jl to work

2014-03-11 Thread Jameson Nash
I have an open issue assigned to me to go implement Sys.dllist() for windows :/ but nm /usr/local/lib/libsundials_cvode.so is listing all of the functions you call call, so youc can just look to see see if CVodeCreate is in the list. It also indicates the visibility of that function -- to be calle

[julia-users] Select and element from a tuple for each row in an array

2014-03-11 Thread Matthew Crews
I know there has to be a clever way to do this in Julia but I'm stumped. I have a 1d array of tuples and I want to extract the third element from each row of the array. Here is an example of what I'm working with: julia> experArr 20-element Array{(Any,Any,Any),1}: (4000,0.97613,1.6e6) (2000,0

Re: [julia-users] trouble with pkg.build("Nettle")

2014-03-11 Thread Isaiah Norton
Hi, That file downloads fine for me, and I was able to install IJulia on a clean system several days ago. Could you try downloading it manually, to eliminate any local network issues? Also please send versioninfo(). On Tue, Mar 11, 2014 at 4:45 PM, Ivan Tan wrote: > Hi all, > > New to Julia an

Re: [julia-users] Converting a column of a DataFrame to a string

2014-03-11 Thread Jason Solack
no, i'm sorry. I have a vector that's eltype is Float64, it has values that i'd like to replace with the words that describe their values. right now when assigning them i'm getting errors since it's type is Float and it needs to be string. so i'd like to convert the first column in the datafra

Re: [julia-users] Re: GSOC- 2014 Computer Visions using OpenCV

2014-03-11 Thread J Luis
Will Kearney created an initial GDAL wrapper https://github.com/wkearn/GDAL.jl .GDAL is an extremely powerful library to read a lot of different formats, multi-bands included. It supports also (the lib) image resizing. Terça-feira, 11 de Março de 2014 22:14:20 UTC, Tim Holy escreveu: > > There

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Jonathan Malmaud
It might be useful to add functionality equivalent to IPython's 'run' magic. From http://ipython.org/ipython-doc/dev/interactive/tutorial.html: Running and Editing The %run magic command allows you to run any pyth

Re: [julia-users] Trouble getting Sundials.jl to work

2014-03-11 Thread Thomas Moore
I fear print(Sys.dlliist()) is not an option in julia. There's lots of other options (Sys,MACHINE, Sys.init, etc) but no Sys.dllist(). My Julia install is Version 0.3.0-prerelease+308 if that is relevant :) Also, nm /usr/local/lib/libsundials_cvode.so just gives me a long list like this:

Re: [julia-users] Converting a column of a DataFrame to a string

2014-03-11 Thread John Myles White
I'm not totally sure what you mean. A column of a DataFrame is a vector, so one natural way to convert the column to a string would be to join all of the entries using join: using DataFrames df = DataFrame(A = 1:10) join(df[:A], "::") Is that what you're looking for? -- John On Mar 11, 2014,

[julia-users] Converting a column of a DataFrame to a string

2014-03-11 Thread Jason Solack
So this seems like silly question, but i'm looking to convert a column in a dataframe to a string and I don't see how to do that. Any help? Thank you! Jason

[julia-users] Re: GSOC 2014: Project Syntax Checker

2014-03-11 Thread Knud Sørensen
Regarding warm-up task. You could take a look at the bugs found by coverity some time ago. https://groups.google.com/d/topic/julia-dev/Lw4GF34VGbE/discussion On Tuesday, 11 March 2014 14:33:23 UTC+1, Siddhant Jain wrote: > > Hello everyone, > > This in regard to the 'Syntax Checker' project tha

Re: [julia-users] Packing and unpacking parameters

2014-03-11 Thread Cristóvão Duarte Sousa
Great approach John! I was not aware of the linear indexing of type fields, that opens a lot of possibilities. Thanks On Tue, Mar 11, 2014 at 3:51 PM, John Myles White wrote: > For now, I suspect the easiest way to do this is to switch back and forth > between immutable types and vectors by usin

Re: [julia-users] Re: GSOC- 2014 Computer Visions using OpenCV

2014-03-11 Thread Tim Holy
There already is a wrapper for MagickWand, we just don't use if for more than saving/loading images. MagickWand does not support multidimensional images well, so I'm quite hesitant to start relying on MagickWand for more than I/O. (I think OpenCV is better in this regard.) For this specific iss

[julia-users] Re: PyCall Segmentation fault: 11

2014-03-11 Thread Ethan Anderes
Thanks :) On Tuesday, March 11, 2014 2:19:27 PM UTC-7, Jake Bolewski wrote: > > This looks like it was fixed a couple hours ago, see > https://github.com/JuliaLang/julia/issues/6097#issuecomment-37348594 > > Jake > > On Tuesday, March 11, 2014 5:16:19 PM UTC-4, Ethan Anderes wrote: >> >> Hi, >>

[julia-users] Re: Windows CI for packages (and Julia itself, hopefully) with AppVeyor

2014-03-11 Thread Tony Kelman
About as easy as getting Travis set up, at least to start up the first few builds. If your package has binary dependencies, then how are you enforcing that those dependencies are available and in an expected location across all platforms? If you're currently using BinDeps to download the necessa

[julia-users] Re: PyCall Segmentation fault: 11

2014-03-11 Thread Jake Bolewski
This looks like it was fixed a couple hours ago, see https://github.com/JuliaLang/julia/issues/6097#issuecomment-37348594 Jake On Tuesday, March 11, 2014 5:16:19 PM UTC-4, Ethan Anderes wrote: > > Hi, > > Just complied julia and am getting a segmentation fault when trying to use > PyCall. Sho

[julia-users] PyCall Segmentation fault: 11

2014-03-11 Thread Ethan Anderes
Hi, Just complied julia and am getting a segmentation fault when trying to use PyCall. Should I file an issue with PyCall or am I doing something wrong here? Thanks. -Ethan julia> Pkg.status() 1 required packages: - PyCall0.4.2 julia> versioninfo() Julia Version 0.3

[julia-users] Re: Windows CI for packages (and Julia itself, hopefully) with AppVeyor

2014-03-11 Thread Jake Bolewski
This is really great. As someone who has gone most of his life without using Windows, how easy is this to set up if you are not a knowledgeable window's developer? I'm thinking about sometimes hard to build library dependencies, like libgit2 or an opencl vendor implementation. I would try th

[julia-users] Re: GSOC- 2014 Computer Visions using OpenCV

2014-03-11 Thread Jake Bolewski
Siddha Ganju, If you would like to work on the OpenCV project I would stick to wrapping OpenCV. I don't think that this is a particularly good project for a beginner as it will invariably involve julia c interop, a c / c++ shim, knowledge of OpenCV data type internals, and julia code generati

[julia-users] trouble with pkg.build("Nettle")

2014-03-11 Thread Ivan Tan
Hi all, New to Julia and tried to install with the instructions from https://github.com/stevengj/julia-mit/blob/master/README.md but IPython kept crashing. There was an error during the building of IPython but I can't seem to find a way around it. Sorry guys I'm unfamiliar with this. Here's th

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Mauro
This and related topics seem to crop up a lot, e.g. almost concurrently this discussion happened: https://groups.google.com/d/msg/julia-users/xbsdu8Ob4cw/2Vtyo9CFhYoJ And Kevin opened this issue to improve the documentation: https://github.com/JuliaLang/julia/issues/6082 It is a bit focused on pac

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Ivar Nesje
Reinterpret works for any length stings. See that the return type is Array{Int,1}. Just be careful when using reinterpret because (I believe) you will get the native byte order (Litle endian/Big endian), and you should be careful to follow the specification of the algorithm/transport protocoll.

[julia-users] Re: Windows CI for packages (and Julia itself, hopefully) with AppVeyor

2014-03-11 Thread Ivar Nesje
This is Great! There is an unfortunate correlation between being a open source contributor and not using the most popular operating system among users. You should post this to the julia-dev list. I would assume that fewer people skip posts on the lower traffic list, and when this is up and run

[julia-users] Re: make fails

2014-03-11 Thread Tony Kelman
Try `make -C src clean-flisp` On Tuesday, March 11, 2014 12:55:38 PM UTC-7, Comer Duncan wrote: > > I have been out of town for ten days and today did a git pull. I then did > the usual make and got what appears to be a normal make except near the end > I get the following spew: > > LINK sr

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
Seems useful and I did not know about it. Strings in my case can be longer than 64 bits though but this is a useful building block. Thanks! Den tisdagen den 11:e mars 2014 kl. 20:13:05 UTC+1 skrev Avik Sengupta: > > Does this work? > > julia> a="abcdefgh" > "abcdefgh" > > julia> reinterpret(Int6

[julia-users] make fails

2014-03-11 Thread Comer Duncan
I have been out of town for ten days and today did a git pull. I then did the usual make and got what appears to be a normal make except near the end I get the following spew: LINK src/support/libsupport.a CC src/flisp/flisp.o CC src/flisp/julia_extensions.o LINK src/flisp/libflis

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Ethan Anderes
Hi Kevin: As a convert from Matlab, the first thing I asked for when shopping around for an alternative language for scientific computing was "what's the command I use to run a file, top to bottom". >From my view, this is a important command to have front and center. I would >want to avoid for

[julia-users] Re: GSOC- 2014 Computer Visions using OpenCV

2014-03-11 Thread J Luis
Well, given that this thread is under the name of "... OpenCV", why not using OpenCV itself? The floodfill function does exactly that. Terça-feira, 11 de Março de 2014 18:06:46 UTC, Siddha Ganju escreveu: > > I have given a thought to creating a Julia wrapper for MagickWand (Issue # > 69

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Avik Sengupta
Does this work? julia> a="abcdefgh" "abcdefgh" julia> reinterpret(Int64, a.data) 1-element Array{Int64,1}: 7523094288207667809 On Tuesday, 11 March 2014 16:07:35 UTC+5:30, Robert Feldt wrote: > > Implementing simple RSA crypto in pure Julia (not for actual sec-sensitive > use) but for low-s

[julia-users] Re: GSOC 2014: Project Syntax Checker

2014-03-11 Thread Mike Innes
Yes, as Stefan has pointed out, making your own lexer/parser is not likely to be the best way to approach this project (and perhaps we should make that more explicit). Your best bet here is to have a look at the existing Julia parser - get a feel for things, then think about improvements you co

[julia-users] Re: GSOC- 2014 Computer Visions using OpenCV

2014-03-11 Thread Siddha Ganju
I have given a thought to creating a Julia wrapper for MagickWand (Issue #69). In this context is there any available generator that can help me out? For either PythonMagickWand or MagickWand? I found Clang.jl that I can use as a ready reckoner fo

[julia-users] Windows CI for packages (and Julia itself, hopefully) with AppVeyor

2014-03-11 Thread Tony Kelman
I want to make a bit of an announcement for people who don't browse the Github issues list. I've been working on setting up continuous integration, a la Travis, but for Windows using AppVeyor - http://blog.appveyor.com/2014/02/19/appveyor-20-dedicated-build-vms-parallel-testing-nuget-deployment

Re: [julia-users] GSOC 2014: Project Syntax Checker

2014-03-11 Thread Stefan Karpinski
Building a separate parser and lexer for Julia code separate from the main one strikes me as a bad idea. The way to improve syntax checking is to improve the error messaging of the main Julia parser, not to build a separate tool. That project should probably be reworded or perhaps removed. On Tue

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Kevin Squire
Maybe we should stop exporting "include", so that people use "require" and LOAD_PATH is always searched? On Tuesday, March 11, 2014, Ethan Anderes wrote: > Yep. This is what I was hoping for too. However, just to be clear I would > want include("test0.jl") to work when the directory which contai

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Ethan Anderes
Yep. This is what I was hoping for too. However, just to be clear I would want include("test0.jl") to work when the directory which contains test0.jl is in LOAD_PATH. Cheers, Ethan On Tuesday, March 11, 2014 7:43:47 AM UTC-7, J Luis wrote: > > > > Do you mean, all you want is "addpath(dirname)

Re: [julia-users] Packing and unpacking parameters

2014-03-11 Thread John Myles White
For now, I suspect the easiest way to do this is to switch back and forth between immutable types and vectors by using linear indexing in the fields of a type, then linear indexing within each field. Here’s a specific example of how a generic function might work: immutable Foo a::Vector

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
no problem. really don't forget the padding. http://rdist.root.org/2009/10/06/why-rsa-encryption-padding-is-critical/ On Tuesday, 11 March 2014 12:37:34 UTC-3, Robert Feldt wrote: > > Yes, I see where I went wrong now. I will base64 encode the uint8 array, > pass that around and then reverse

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
Yes, I see where I went wrong now. I will base64 encode the uint8 array, pass that around and then reverse on the other side. Sorry for the noise, Robert Den tisdagen den 11:e mars 2014 kl. 16:32:50 UTC+1 skrev andrew cooke: > > > well that's because it's an invalid character sequence. > > if i

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
sorry, last line should be "share the ENCRYPTED data", otherwise what i wrote is awfully confusing. On Tuesday, 11 March 2014 12:32:50 UTC-3, andrew cooke wrote: > > > well that's because it's an invalid character sequence. > > if it started as a valid utf8 string, you won't see that or unencodi

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
well that's because it's an invalid character sequence. if it started as a valid utf8 string, you won't see that or unencoding. if it wasn't a utf8 string originally then you have an encoding issue. you implied earlier that you want to share the encoded data as a string. you don't. it's eith

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
Yes, but the problem I had was rooted in: julia> convert(UTF8String, Uint8[0x41,0x42, 128]) ERROR: invalid UTF-8 sequence in convert at utf8.jl:155 /Robert Den tisdagen den 11:e mars 2014 kl. 16:21:00 UTC+1 skrev andrew cooke: > > > actually, it seems convert works both ways. > > julia> conve

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
actually, it seems convert works both ways. julia> convert(UTF8String, [0x41,0x42]) "AB" On Tuesday, 11 March 2014 12:10:53 UTC-3, andrew cooke wrote: > > > do these not do what you need (or form the basis for it)? > > julia> convert(Vector{Uint8}, utf8("hello world")) > 11-element Array{Uin

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
no problem. don't forget the padding! On Tuesday, 11 March 2014 12:16:44 UTC-3, Robert Feldt wrote: > > Thanks Andrew, > > That is exactly the kind of obvious-in-retrospect type of solution I was > hoping for. I can adapt this to my needs. > > Cheers, > > Robert > > Den tisdagen den 11:e mars 2

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
Thanks Andrew, That is exactly the kind of obvious-in-retrospect type of solution I was hoping for. I can adapt this to my needs. Cheers, Robert Den tisdagen den 11:e mars 2014 kl. 16:10:53 UTC+1 skrev andrew cooke: > > > do these not do what you need (or form the basis for it)? > > julia> con

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread andrew cooke
do these not do what you need (or form the basis for it)? julia> convert(Vector{Uint8}, utf8("hello world")) 11-element Array{Uint8,1}: 0x68 0x65 0x6c 0x6c 0x6f 0x20 0x77 0x6f 0x72 0x6c 0x64 julia> bytestring(convert(Vector{Uint8}, utf8("hello world"))) "hello world" On Tuesday, 11

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
At least I think I need a string (;)) since: 1. The input to a RSA encryption is typically a string to be encrypted. This string is converted to a large integer which is then encrypted. This large integer is then dumped to a string so that it can be transmitted, saved to file etc. 2. The PKCS

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread J Luis
Do you mean, all you want is "addpath(dirname) = push!(LOAD_PATH, > dirname)"? > By itself it would be already useful (imagine when one do not know this solution and have to search the docs for it) > Or something different? > Precisely. What I was referring was a way to declare paths tha

Re: [julia-users] RetType in ccall as a variable --> 'not defined'

2014-03-11 Thread J Luis
Thanks, works beautifully. Terça-feira, 11 de Março de 2014 13:15:31 UTC, Jameson escreveu: > > The first three parameters to ccall are special and are eval'd at compile > time. To get the effect you are looking for, declare the return type as > Ptr{Void}, and then call `convert(ret_type, ptr)`

[julia-users] Re: Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Ivar Nesje
In Julia you should not use strings to encode binary data, as you have to do in C. Strings in Julia is just a wrapper around an `Array{Uint8,1}` with some extra validation. As you do not want the validation, you should probably just use the array directly. Why do you think you need a String? I

[julia-users] GSOC 2014: Project Syntax Checker

2014-03-11 Thread Siddhant Jain
Hello everyone, This in regard to the 'Syntax Checker' project that has been mentioned on the ideas page. I really like the idea and would like to work more on it. I am currently working on a semester long project to develop a compiler independently and hence have an idea as to what goes into

Re: [julia-users] RetType in ccall as a variable --> 'not defined'

2014-03-11 Thread Jameson Nash
The first three parameters to ccall are special and are eval'd at compile time. To get the effect you are looking for, declare the return type as Ptr{Void}, and then call `convert(ret_type, ptr)` On Tue, Mar 11, 2014 at 11:57 AM, J Luis wrote: > I want to parameterize the return type of a ccall

Re: [julia-users] Trouble getting Sundials.jl to work

2014-03-11 Thread Ivar Nesje
Your code works for me, so I think there is still a problem on your system configuration. The error is about the C function `CVodeCreate`, not the Julia function with the same name, and apparently Julia finds the sundials library, but it does not contain the function. Try to run `print(Sys.dll

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread Tim Holy
Do you mean, all you want is "addpath(dirname) = push!(LOAD_PATH, dirname)"? Or something different? --Tim On Tuesday, March 11, 2014 04:17:17 AM J Luis wrote: > I've been here before too (and will come back) > > An "addpath" would be a far far simpler to use solution. > > Terça-feira, 11 de M

[julia-users] RetType in ccall as a variable --> 'not defined'

2014-03-11 Thread J Luis
I want to parameterize the return type of a ccall call that otherwise will return a pointer to void. So I tried function create_data(API::Ptr{None}, family, geometry, mode, par, wesn::Ptr=C_NULL, inc::Ptr=C_NULL, reg=0, pad=2, data::Ptr{Void}= C_NULL) if (family == GMT_IS_VECTOR)

Re: [julia-users] addpath from Matlab?

2014-03-11 Thread J Luis
I've been here before too (and will come back) An "addpath" would be a far far simpler to use solution. Terça-feira, 11 de Março de 2014 5:58:06 UTC, Ethan Anderes escreveu: > > Thanks Kevin. I hadn't tried require since I wanted the ability to chance > the scripts and re-include them. However,

[julia-users] Convert to/from integer from/to string (i2osp from PKCS#1)

2014-03-11 Thread Robert Feldt
Implementing simple RSA crypto in pure Julia (not for actual sec-sensitive use) but for low-sec applications. But I have troubles with encoding strings as integers and back. The PKCS#1 crypto standard says that strings should be seen as 8-bit (octet) strings. I tried creating a Uint8[] with the

Re: [julia-users] Trouble getting Sundials.jl to work

2014-03-11 Thread Thomas Moore
OK, running push!(DL_LOAD_PATH, "/usr/local/lib/") has improved the situation a little: now we get this error: ERROR: ccall: could not find function CVodeCreate in library libsundials_cvode in ode at /home/thomas/.julia/Sundials/src/Sundials.jl:250 At least the shared library is recognised

[julia-users] Re: readchomp, readlines & friends on Windows

2014-03-11 Thread Ivar Nesje
Usually you should be using eachline instead of readlines, especially for large files, because they return an iterator and does not allocate strings for the individual lines, so that garbage collection can free the intermediary strings. kl. 04:19:25 UTC+1 tirsdag 11. mars 2014 skrev Peter Simon