[julia-users] Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread paul analyst
Nan is readed as NaN but Nan is the name of cat. How to read this data ? How to find the cat ? I have data.txt file , UTF8 Lucycat Fliperdog Miadog Nancat Snupydog julia> data=readd readdir readdlm julia> data=readdlm("data.txt",'\t') 5x2 Array{Any,2}: "Lucy""cat"

[julia-users] Re: Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread paul analyst
Orginal file here Paul W dniu środa, 24 czerwca 2015 09:24:58 UTC+2 użytkownik paul analyst napisał: > > Nan is readed as NaN but Nan is the name of cat. How to read this data ? > How to find the cat ? > I have data.txt file , UTF8 > > Lucycat > Fliperdog > Miadog > Nancat > Snup

[julia-users] Re: Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread paul analyst
orginal file here Lucycat Fliper dog Mia dog Nan cat Snupy dog

[julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread colintbowers
Hi all, I've got an issue I don't really like in one of my modules, and I was wondering the best thing (if anything) to do about it. The module if for dependent bootstraps, but the problem is more of a project design issue. I have a type for each bootstrap method, e.g. `StationaryBootstrap`, `

[julia-users] different failures in executing code as function or REPL

2015-06-24 Thread Andreas Lobinger
Hello colleagues, i think i've mentioned before: I'm not really a master on ccalls and the pointer/struct/Type architecture, so it might be obvious to someone else what's wrong here. I'm doing a library adaptation (on libxcb.so), one of the major X11 libraries to put literally everything on scr

[julia-users] Re: Using Winston in Julia 0.3.9

2015-06-24 Thread Ferran Mazzanti
I'm using Julia 0.3.9 as I try to use the latest stable, and afaik 0.4.0 is still not at that stage... But surprisignly here in my iMac the code works and does what it is supposed to do. At the Uni under Linux and Julia 0.3.9 is where it complains Maybe I have to erase everything and do a ne

Re: [julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread Milan Bouchet-Valat
Le mercredi 24 juin 2015 à 01:18 -0700, colintbow...@gmail.com a écrit : > Hi all, > > I've got an issue I don't really like in one of my modules, and I was > wondering the best thing (if anything) to do about it. > > The module if for dependent bootstraps, but the problem is more of a > proje

[julia-users] Re: Using Winston in Julia 0.3.9

2015-06-24 Thread Kaj Wiik
I have the same problem. Winston.add() works. Strange because it's not very long time since I used Winston and everything just worked... julia> add(p, s, a, b, l) ERROR: add not defined julia> Winston.add(p, s, a, b, l) julia> versioninfo() Julia Version 0.3.8 Commit 79599ad (2015-04-30 23:40 U

[julia-users] Re: Using Winston in Julia 0.3.9

2015-06-24 Thread Kaj Wiik
Hmm, I forgot that I had pinned to Winston version 0.11.0, after upgrade to 0.11.11, add() works! Kaj On Wednesday, June 24, 2015 at 12:36:19 PM UTC+3, Kaj Wiik wrote: > > I have the same problem. Winston.add() works. Strange because it's not > very long time since I used Winston and everythin

[julia-users] Installation and User Interface issues

2015-06-24 Thread Joe Tusek
Hi, I have had a read on the forum and tried to google my way out of the problem but can't seem to find what I need to get me going with Julia and Juno. Julia looks very promising (being a Matab user) but at present I can't get past square one. Some things I notice (On W7 machine) 1) I can't wi

[julia-users] JuliaCon registrations open

2015-06-24 Thread Scott Jones
Is there any information on parking? I couldn't find any on the site.

Re: [julia-users] JuliaCon registrations open

2015-06-24 Thread Iain Dunning
We don't have any special agreements, but there are multiple parking options in the area: http://web.mit.edu/facilities/transportation/parking/visitors/public_parking.html I'm not sure what way you are coming from, but parking at Alewife or somewhere like that would probably be cheaper. On Wed, J

[julia-users] Re: Installation and User Interface issues

2015-06-24 Thread Tony Kelman
Issue 1 and 2 are not really bugs with Julia, they are inherent limitations of the Windows console host prior to Windows 10. Run cmd.exe and you'll see the same behavior. There are several options for more nicely usable terminal emulators on Windows, and we hope to eventually bundle one of them

Re: [julia-users] JuliaCon registrations open

2015-06-24 Thread Scott Jones
Ok, I was hoping that arrangements had been made to use MIT parking, like during reunions. I live in Beverly, and commuter rail is rather infrequent! Sent from my iPhone > On Jun 24, 2015, at 8:12 AM, Iain Dunning wrote: > > We don't have any special agreements, but there are multiple parking

[julia-users] Re: Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread Avik Sengupta
Interesting problem! :) Try: readlm("data.txt", '\t', ASCIIString) On Wednesday, 24 June 2015 03:24:58 UTC-4, paul analyst wrote: > > Nan is readed as NaN but Nan is the name of cat. How to read this data ? > How to find the cat ? > I have data.txt file , UTF8 > > Lucycat > Fliperdog > M

Re: [julia-users] Re: Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread Paul Analyst
Wow! julia> a=readdlm("data.txt", '\t', ASCIIString) 5x2 Array{ASCIIString,2}: "Lucy""cat" "Fliper" "dog" "Mia" "dog" "Nan" "cat" "Snupy" "dog" julia> unique(a[:,1]) 5-element Array{ASCIIString,1}: "Lucy" "Fliper" "Mia" "Nan" "Snupy" julia> findin(a,"Nan") 0-element Ar

Re: [julia-users] Re: When are function arguments going to be inlined?

2015-06-24 Thread Andrew
Yup, I like that idea too. Multiple dispatch is quite useful here. This is my implementation. abstract UtilityFunction immutable CRRA <: UtilityFunction sigmac::Float64 sigmal::Float64 psi::Float64 end immutable LogUtility <: UtilityFunction end function u(UF::CRRA,consump,lab

[julia-users] Re: Embedding Julia with C++

2015-06-24 Thread Kostas Tavlaridis-Gyparakis
I did download the 0.4 nightbuilt which includes the above mentioned files in the proper location, but now Eclipse is throwing me a different error I can not sort out how to overcome. When I try to run a small cpp file with a few julia comands Eclipse is compiling the file but when I try to run i

Re: [julia-users] Re: Embedding Julia with C++

2015-06-24 Thread Isaiah Norton
You probably need to call `jl_init(NULL)` at the beginning of the program. If you have not done so yet, I would suggest to read the embedding documentation: http://docs.julialang.org/en/release-0.3/manual/embedding/ and start with the embedding example in the source: https://github.com/J

Re: [julia-users] Re: Embedding Julia with C++

2015-06-24 Thread Kostas Tavlaridis-Gyparakis
I am simply trying to run the first example attached in the embedding documantation which is the following block of code: #include #include using namespace std; int main() { /* required: setup the julia context */ jl_init(NULL); /* run julia commands */ jl_eval_s

Re: [julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread John Myles White
Excited you're working on dependent data bootstraps. I implemented one just the other day since it could be useful for analyzing benchmark data. Would be great to have other methods to do out. -- John On Wednesday, June 24, 2015 at 5:31:52 AM UTC-4, Milan Bouchet-Valat wrote: > > Le mercredi 2

Re: [julia-users] Re: Embedding Julia with C++

2015-06-24 Thread Isaiah Norton
I guess this is still a distro path issue. The following suggestion is not very general, but to at least get going, you could try: jl_init("/home/kostas/workspace/juli/Debug/../lib/x86_64-linux-gnu/julia/") On Wed, Jun 24, 2015 at 9:38 AM, Kostas Tavlaridis-Gyparakis < kostas.tavlari...@gmail.com

Re: [julia-users] Re: Embedding Julia with C++

2015-06-24 Thread Kostas Tavlaridis-Gyparakis
Didn't manage to make the code run. I am really wondering what I am missing here... On Wednesday, June 24, 2015 at 3:59:47 PM UTC+2, Isaiah wrote: > > I guess this is still a distro path issue. The following suggestion is not > very general, but to at least get going, you could try: > > jl_init(

Re: [julia-users] Embedding Julia with C++

2015-06-24 Thread Kevin Squire
It's not just that julia is misspelled as juli in the path, is it? On Wednesday, June 24, 2015, Kostas Tavlaridis-Gyparakis < kostas.tavlari...@gmail.com> wrote: > Didn't manage to make the code run. I am really wondering what I am > missing here... > > On Wednesday, June 24, 2015 at 3:59:47 PM U

Re: [julia-users] Embedding Julia with C++

2015-06-24 Thread Kostas Tavlaridis-Gyparakis
Νο, unfortunately it's not that. I just gave to the project the name "juli" I forgot to type the a and didn't bother correct it aftewrards, so the path name is correct. On Wednesday, June 24, 2015 at 4:31:20 PM UTC+2, Kevin Squire wrote: > > It's not just that julia is misspelled as juli in the p

Re: [julia-users] Embedding Julia with C++

2015-06-24 Thread Tony Kelman
Are you running on latest master? This is probably another casualty of https://github.com/JuliaLang/julia/pull/11640 On Wednesday, June 24, 2015 at 10:39:40 AM UTC-4, Kostas Tavlaridis-Gyparakis wrote: > > Νο, unfortunately it's not that. > I just gave to the project the name "juli" I forgot to

[julia-users] Re: Julia computing problem in a loop

2015-06-24 Thread jamesmnason
Dear Colin: Thanks for your comments. My apologies for not responding sooner. I have been clearing a stack of referee reports off my desk. Yes, I am fortunate to be a coauthor of Peter Hansen and Asgar Lunde. But at the moment, I have no plans to code the MCS into Julia. Peter and Asgar w

[julia-users] Getting the length of a tuple type

2015-06-24 Thread Josh Langsfeld
What is the correct way to get the number of types inside of a T = Tuple{...} type? Is there anything better than length(T.types), which might be compatible with the 0.3 style ( (T1,T2,T3,...))?

[julia-users] Re: Getting the length of a tuple type

2015-06-24 Thread Matt Bauman
Right now there's not an official way to do this. You could take a look at my Tuples package[1], which is an attempt at hashing out the API before trying to get this functionality into base. Your feedback would be very welcome! 1: https://github.com/mbauman/Tuples.jl On Wednesday, June 24, 2

Re: [julia-users] Re: Nan is readed as NaN but is the name of cat. How to read this data ?

2015-06-24 Thread Paul Analyst
Is better, If ia have file coded UTF8 , use readdlm("data.txt", '\t',UTF8String) ? Paul W dniu 2015-06-24 o 14:52, Avik Sengupta pisze: Interesting problem! :) Try: readlm("data.txt", '\t', ASCIIString) On Wednesday, 24 June 2015 03:24:58 UTC-4, paul analyst wrote: Nan is readed as NaN b

[julia-users] Re: Getting the length of a tuple type

2015-06-24 Thread Josh Langsfeld
Thanks, Matt. I hope your stuff does eventually make it into Base. So if I'm not mistaken, there is currently no way to get tuple type code that is cross-compatible between 0.3 and 0.4 without doing your own mini Compat code that looks at VERSION? If that's the case, what would would think abou

[julia-users] Capturing function argument as expression

2015-06-24 Thread JuliaFan
Is it possible to capture arguments passed to a function as expression? E.g. function capture(src) capture(1+5) -> :(1+5) capture(var) -> :(var) Thanks

Re: [julia-users] Capturing function argument as expression

2015-06-24 Thread Stefan Karpinski
Not with a function, but you can do that with a macro: julia> macro capture(ex) Expr(:quote, ex) end julia> @capture(1+5) :(1 + 5) julia> @capture(var) :var On Wed, Jun 24, 2015 at 5:27 PM, JuliaFan wrote: > Is it possible to capture arguments passed to a function as expres

Re: [julia-users] Re: When are function arguments going to be inlined?

2015-06-24 Thread Colin Bowers
Looks good to me! Cheers, Colin On 24 June 2015 at 23:04, Andrew wrote: > Yup, I like that idea too. Multiple dispatch is quite useful here. This is > my implementation. > > abstract UtilityFunction > > immutable CRRA <: UtilityFunction > sigmac::Float64 > sigmal::Float64 > psi::Fl

Re: [julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread Colin Bowers
Thanks for responding. Yes, I think I will do it your way. I was initially hoping there would be a neat way to duplicate how R would do it, ie, with keyword arguments typically always strings or numbers since this is what many new users will be familiar with, but maybe in the end it would just be s

[julia-users] Running a command line program with input arguments

2015-06-24 Thread Nitin Arora
Hi I am trying to run an executable from Julia (0.3.9) which takes in a command line argument. It works on the command line as: program < inputfilename but when I run it using Julia "run" command: rum(`program< inputfilename`) It ignores the "<" and "inputfilename" and just runs the program wi

Re: [julia-users] Converting a string to a custom type results in a function that is not type stable

2015-06-24 Thread Colin Bowers
If you're interested, the source is here: https://github.com/colintbowers/DependentBootstrap.jl I haven't tried to make it into a registered package yet as I'm still tinkering with it a fair bit. But I think I'm nearly there. It is fairly comprehensive for univariate bootstrapping, ie lots of met

Re: [julia-users] Re: Julia computing problem in a loop

2015-06-24 Thread Colin Bowers
> > My apologies for not responding sooner. I have been clearing a stack of > referee reports off my desk. No problems. It's end of semester here in Australia so I've been buried under piles of marking anyway :-) Thus, I would be very interested in learning more about your work in coding > the

[julia-users] Create IOStream from string?

2015-06-24 Thread andrew cooke
I'm trying to test and document some routines that process files. Is there a simple way to create an IOStream from a string? >From the docs I thought IOBuffer(string) would do it, but despite what the docs say ("an in-memory I/O stream") an IOBuffer is not an IOStream. Thanks, Andrew

[julia-users] Re: Create IOStream from string?

2015-06-24 Thread andrew cooke
Oh, I think they're both subtypes of IO and I probably only need IO methods. On Wednesday, 24 June 2015 22:04:47 UTC-3, andrew cooke wrote: > > I'm trying to test and document some routines that process files. Is > there a simple way to create an IOStream from a string? > > From the docs I thou

[julia-users] Re: Create IOStream from string?

2015-06-24 Thread elextr
On Thursday, June 25, 2015 at 12:09:47 PM UTC+10, andrew cooke wrote: > > > Oh, I think they're both subtypes of IO and I probably only need IO > methods. > > On Wednesday, 24 June 2015 22:04:47 UTC-3, andrew cooke wrote: >> >> I'm trying to test and document some routines that process files. I

[julia-users] Julia v0.3.10

2015-06-24 Thread Tony Kelman
Hello all! The latest bugfix release of the 0.3.x Julia line has been released. Binaries are available from the usual place , and as is typical with such things, please report all issues to either the issue tracker , or

[julia-users] Guidelines for overriding Base.convert?

2015-06-24 Thread Sheehan Olver
Is there a guide/good guidelines for overriding Base.convert? Is it allowed for a convert routine to ever return a different type than requested? My overrides (in a fairly deep type hierarchy) seem to be triggering numerous bugs in Julia 0.4, I believe because of issues with type inference

[julia-users] How to debug "Illegal Instruction" in 0.4?

2015-06-24 Thread Sheehan Olver
I got the following crash signal (4): Illegal instruction: 4 unknown function (ip: 0x316f9ff7a) Illegal instruction: 4 with no other information given in 0.4 master. I suppose this is a bug in Julia itself, but without a stack trace it's hard to narrow down. Any suggestions?