Re: [julia-users] Re: Homebrew problem(?): Can't add or build Gtk

2015-09-27 Thread Christoph Ortner
done https://github.com/JuliaLang/Gtk.jl/issues/186 On Sunday, 27 September 2015 11:28:33 UTC+1, Tim Holy wrote: > > On Sunday, September 27, 2015 03:04:03 AM Christoph Ortner wrote: > > I had the same happen to me. > > Christoph > > Please do post an issue over at

Re: [julia-users] Pkg.[update()/install()/build()] woes on Windows 10 64 bit

2015-09-27 Thread Evan Fields
Deleted everything in the .cache folder. Now new exciting errors on Pkg.update(): _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "help()" for help. | | | | | |

[julia-users] Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Mark Sherlock
Hi, I work in computational physics. The main reason we all use Fortran in my area is because it allows arrays to have negative indices. This is very useful when solving some partial differential equations (in e.g. plasma physics, astrophysics, fluid mechanics). I and my colleagues frequently

[julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Páll Haraldsson
UTF-16 was earlier (strictly speaking UCS-2) and Windows adopted it (and also used elsewhere..). UTF-8 is almost in all cases better (except in East-Asian languages, but not even there, if you use, something HTML (or I guess XML..), that has has lots of ASCII for tags etc.):

Re: [julia-users] Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Tom Breloff
Do you need the bracket notarion 'x[-5]'? This would be best implemented as a package with explicit get/set, as Matt implied... As otherwise you risk some tricky bugs. Also if you're implementing "array-like" types, I would definitely use 0.4+. On Sunday, September 27, 2015, Matt Bauman

Re: [julia-users] Nesting Macros passing Expressions

2015-09-27 Thread Yichao Yu
On Sun, Sep 27, 2015 at 12:20 PM, Leonardo wrote: > Hi all, > I need manipulate AST of an expression in a macro, and pass same expression > in input to another macro, but I experience some problem. > > I try to express my doubt with a simplified example: > macro tst2(e2::Expr)

[julia-users] Re: API deployments on JuliaBox

2015-09-27 Thread Miguel Belbut Gaspar
Hi, Thanks for this, it is a very interesting feature. I think I have the same question as the previous post, which I think wasn't addressed by tanmaykm's answer: Is the server created per-user? If I expose a ls() command, will it list my own account home files? I tried using

[julia-users] UTF16String or UTF8String?

2015-09-27 Thread Daniel Carrera
Hello, I just read of Wikipedia that UTF16 is not compatible with ASCII, but UTF8 is a proper super-set of ASCII. If that's the case, why would anyone use UTF16String instead of UTF8String? It seems like UTF8 has the lowest probability of creating hassle down the road. Every valid ASCII string

Re: [julia-users] Pkg.[update()/install()/build()] woes on Windows 10 64 bit

2015-09-27 Thread Tony Kelman
Not sure what's wrong but your local copies of some packages are in a corrupt state. Assuming you haven't made any local modifications to any packages that you want to preserve, it is safe to delete any problematic packages from .julia, then running Pkg.update() or Pkg.resolve() will put back

Re: [julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Milan Bouchet-Valat
Le dimanche 27 septembre 2015 à 11:00 +0200, Daniel Carrera a écrit : > > On 27 September 2015 at 10:39, Milan Bouchet-Valat > wrote: > > Then the default concrete type can be called String or Str, and > > that's > > what people will use. Calling the abstract type String was

[julia-users] Re: Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Daniel Carrera
I don't know anything about PDEs for plasma physics, but you made me curious. What do you use negative indices for? Are arrays supposed to wrap around? You can currently use the `end` keyword to write `foo[end-5]`, but I assume that this is not useful to you. Right? On Sunday, 27 September

[julia-users] Re: Julia code 5x to 30x slower than Matlab code

2015-09-27 Thread Marcio Sales
> > I hope to have a release version in about a month, which is the estimated > time for releasing GMT5.2. There are still several issues from the GMT side > but overall most of it works already. Feel free to test it (see the > gallery.jl for several usage examples) but note that you'll have

[julia-users] Nesting Macros passing Expressions

2015-09-27 Thread Leonardo
Hi all, I need manipulate AST of an expression in a macro, and pass same expression in input to another macro, but I experience some problem. I try to express my doubt with a simplified example: macro tst2(e2::Expr) println(e2.head) end macro tst(e1::Expr) @tst2 esc(e1) end In previous

[julia-users] Re: Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Matt Bauman
There has been a lot of discussion about this in the past few weeks https://groups.google.com/d/msg/julia-users/ScwXMfQIBGs/wD1HTXeZBQAJ https://groups.google.com/d/msg/julia-users/fNisYpMdZ6o/DvFaQi_ZBAAJ TL;DR, yes, it is possible, but it takes some care since it's violating a fairly

Re: [julia-users] Saving complex type to a file

2015-09-27 Thread Marc Stein
Thanks! That helped quite a bit, I'm further along. Not quite working yet, but closer. On Sunday, September 27, 2015 at 6:33:50 AM UTC-4, Tim Holy wrote: > > You can try JLD.jl. > > --Tim > > On Saturday, September 26, 2015 05:31:18 PM Marc Stein wrote: > > I'm just starting out with Julia,

Re: [julia-users] Re: @sprintf with a format string

2015-09-27 Thread Scott Jones
I'm sorry - I meant to test it out right after you submitted the PR, I *do* think you are on the right track, but I've been caught up in the fun of writing code for my happy Belgian company (luckily, it's in Julia), and we hadn't gotten to the point where we needed nice formatting yet. I've

[julia-users] Re: Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread John Gibson
Probably it's for something like indexing by Fourier wavenumber. You represent a real-valued periodic function as a linear combination of Fourier modes exp(2 pi i k x/L) where k varies from -K to K-1. The primary representation in data is an array of complex coefficients for those modes. It

Re: [julia-users] How do I pass an event handle via ccall?

2015-09-27 Thread Spencer Russell
I’m not that familiar with the FDTI library, but it looks like you’ll need to write some platform-specific code (the PDF describes windows and linux code, not sure if the linux code is also supposed to work on OSX). So you’d use `ccall` to set up the handle as per the FTDI docs. One tricky bit

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Scott Jones
On Sunday, September 27, 2015 at 4:56:28 PM UTC-4, Jameson wrote: > > UTF-16 is much faster in many situations than UTF-8. >> > > an encoding is not a speed. it is a format. Both formats are > variable-length encodings, and therefore both algorithms have the same time > and space complexity

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Jameson Nash
> > UTF-16 is much faster in many situations than UTF-8. > an encoding is not a speed. it is a format. Both formats are variable-length encodings, and therefore both algorithms have the same time and space complexity (although the implementation of UTF16 does appear to be simpler from the length

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Daniel Carrera
Thanks. On 27 September 2015 at 20:42, Páll Haraldsson wrote: > > UTF-16 was earlier (strictly speaking UCS-2) and Windows adopted it (and > also used elsewhere..). UTF-8 is almost in all cases better (except in > East-Asian languages, but not even there, if you use,

Re: [julia-users] downloaded binaries vs source compilation

2015-09-27 Thread Jameson Nash
The performance should be fairly close. The advantage of source compilation is that it is easier to edit files in Base and submit those changes as a PR. On Sun, Sep 27, 2015 at 2:33 AM Gabor wrote: > I have always used the downloadable binaries of Julia. > > Please advise: > >

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Páll Haraldsson
2015-09-27 20:29 GMT+00:00 Scott Jones : > If it is mainly in North/South America, Western Europe, or Australia/NZ, > UTF-8 does OK. > UTF-8 is great for data interchange, but can really slow things down if > you have many non-ASCII characters > Did you mean non-BMP?

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Scott Jones
On Sunday, September 27, 2015 at 5:40:03 PM UTC-4, Páll Haraldsson wrote: > > 2015-09-27 21:26 GMT+00:00 Páll Haraldsson >: > >> 2015-09-27 20:29 GMT+00:00 Scott Jones > >: >> >>> If it is mainly in North/South America, Western Europe, or

Re: [julia-users] Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Scott Jones
Could you elaborate on what sort of tricky bugs that would cause? Thanks! On Sunday, September 27, 2015 at 11:46:38 AM UTC-4, Tom Breloff wrote: > > Do you need the bracket notarion 'x[-5]'? This would be best implemented > as a package with explicit get/set, as Matt implied... As otherwise you

Re: [julia-users] How do I pass an event handle via ccall?

2015-09-27 Thread Chris Stook
Thanks! I'll read the section on SignalAsyncWork more carefully. - Chris

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Páll Haraldsson
2015-09-27 21:26 GMT+00:00 Páll Haraldsson : > 2015-09-27 20:29 GMT+00:00 Scott Jones : > >> If it is mainly in North/South America, Western Europe, or Australia/NZ, >> UTF-8 does OK. >> UTF-8 is great for data interchange, but can really

Re: [julia-users] How do I pass an event handle via ccall?

2015-09-27 Thread Isaiah Norton
See also: https://groups.google.com/d/msg/julia-users/dlAx4OY55eg/tqc9mXp32tEJ https://github.com/JuliaLang/julia/pull/12503 On Sun, Sep 27, 2015 at 5:41 PM, Chris Stook wrote: > Thanks! I'll read the section on SignalAsyncWork more carefully. > > - Chris > >

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Scott Jones
On Sunday, September 27, 2015 at 5:26:26 PM UTC-4, Páll Haraldsson wrote: > > 2015-09-27 20:29 GMT+00:00 Scott Jones >: > >> If it is mainly in North/South America, Western Europe, or Australia/NZ, >> UTF-8 does OK. >> UTF-8 is great for data interchange, but can

Re: [julia-users] downloaded binaries vs source compilation

2015-09-27 Thread Gabor
Thank you. So the average user should stick to the binaries. On Sunday, September 27, 2015 at 9:11:28 PM UTC+2, Jameson wrote: > > The performance should be fairly close. The advantage of source > compilation is that it is easier to edit files in Base and submit those > changes as a PR. > > On

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Scott Jones
UTF-16 is much faster in many situations than UTF-8. It really depends a lot on just what you are doing, and the data you are processing. If it is mainly in North/South America, Western Europe, or Australia/NZ, UTF-8 does OK. UTF-8 is great for data interchange, but can really slow things down

Re: [julia-users] Re: UTF16String or UTF8String?

2015-09-27 Thread Daniel Carrera
On 27 September 2015 at 23:41, Scott Jones wrote: > No. Most characters used in the countries I mentioned above can be > represented using just ANSI Latin1 > (which is why I specified *Western Europe*), so UTF-8 will take 1 or 2 > bytes for each character, > but when

Re: [julia-users] Re: @sprintf with a format string

2015-09-27 Thread Scott Jones
On Sunday, September 27, 2015 at 8:33:15 PM UTC-4, Tony Fong wrote: > > did you see the format function in the last part of Formatting.jl's readme? > Yes - and there were some ambiguity problems with that, that limited its extensibility, because you could have: 1) format(formatstring, args...)

[julia-users] Julia convert BitArray to Integer array

2015-09-27 Thread Sweta Yamini
Hi, I am new to Julia. I have an N X N BitArray that I want to pack to Uint8 of size N X ceil(N/8) I tried to reinterpret the array as packed = reinterpret(Uint8, mybitarray) but it gives me an error "auto_unbox: unable to determine argument type" I tried packed = convert(Array{Uint8},

[julia-users] PyCall Overhead

2015-09-27 Thread Christoph Ortner
I am writing a Julia wrapper for a molecular simulation library, ASE. As with previous PyCall experiences, this works really well UNTIL I started to benchmark a certain critical portion of the code. For context: I iterate over all atoms and for each atom get the interaction neighbourhood from

Re: [julia-users] Re: Multi-dimensional Arrays

2015-09-27 Thread Leonardo
Oops! Many thanks Leonardo Il giorno martedì 15 settembre 2015 12:32:02 UTC+2, Tim Holy ha scritto: > > `next` requires a second argument, the `state` variable. Your code doesn't > pass a second argument, which is why you're getting the error. > > --Tim > > On Tuesday, September 15, 2015

Re: [julia-users] Re: @sprintf with a format string

2015-09-27 Thread Tony Fong
did you see the format function in the last part of Formatting.jl's readme? On Sunday, September 27, 2015 at 3:00:23 PM UTC-4, Scott Jones wrote: > > I'm sorry - I meant to test it out right after you submitted the PR, I > *do* think you are on the right track, > but I've been caught up in the

[julia-users] Re: Julia code 5x to 30x slower than Matlab code

2015-09-27 Thread J Luis
Yes, we will be releasing Win binaries when it's released. It's for the mean time that interested people needs to build from source. domingo, 27 de Setembro de 2015 às 14:50:25 UTC+1, Marcio Sales escreveu: > > I hope to have a release version in about a month, which is the estimated >> time

[julia-users] Re: API deployments on JuliaBox

2015-09-27 Thread tanmaykm
Hi Miguel, Server instances are created per API. Server instances are stateless, and are reused across API calls and across users. Based on load, an API can also have more than one server instances. Server instances are brought up on a clean Julia container. They do not have any files from

Re: [julia-users] Will Julia likely ever allow negative indexing of arrays

2015-09-27 Thread Kevin Squire
An older attempt at this can be found here: https://gist.github.com/alsam/8283205 On Sunday, September 27, 2015, Tom Breloff wrote: > Do you need the bracket notarion 'x[-5]'? This would be best implemented > as a package with explicit get/set, as Matt implied... As otherwise

Re: [julia-users] Implementing printf() and sprintf() in Julia.

2015-09-27 Thread Kevin Squire
How about submitting a patch to Formatting.jl? On Sunday, September 27, 2015, Michael Hatherly wrote: > As mentioned in the other thread, > https://groups.google.com/d/msg/julia-users/hBbEGEopi0A/OX4ZEhFnBgAJ and >

Re: [julia-users] Nesting Macros passing Expressions

2015-09-27 Thread Leonardo
Many thanks! I have a similar problem calling a function in following scenario: function tst3(i::Int) println(i) end macro tst(i::Int) tst3(i) end I obtain an error executing code: julia> b = 2::Int julia> @tst b complaining for a problem of type, because tst3 seems to receive a

[julia-users] How do I pass an event handle via ccall?

2015-09-27 Thread Chris Stook
I am wrapping this c library: http://www.ftdichip.com/Support/Documents/ProgramGuides/D2XX_Programmer's_Guide(FT_71).pdf The function FT_SetEventNotification requires passing a handle to an event. The closest thing I see in julia is a Condition(). Would it make sense to pass a pointer to

[julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Daniel Carrera
Why are we changing from String to AbstractString? Obviously, the former is easier to type. Even if there are some changes to the guts of the string implementation, I would have thought that you could just keep the shorter name "String". Cheers, Daniel.

[julia-users] Re: Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Gabor
I do not know the answer, and may not be a solution for you, but here is what I do: typealias String ASCIIString It turned out that I unnecessarily used an abstract type before, so from here on I use and alias the concrete ASCIIString type in my program. On Sunday, September 27, 2015 at

[julia-users] Saving complex type to a file

2015-09-27 Thread Marc Stein
I'm just starting out with Julia, so please forgive me if this is a simplistic question. I'm using the DecisionTree package which generates an Ensemble of DecisionTrees in the code below: ## using DataFrames using DecisionTree clarity =

Re: [julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Milan Bouchet-Valat
Le dimanche 27 septembre 2015 à 00:40 -0700, Daniel Carrera a écrit : > Why are we changing from String to AbstractString? Obviously, the > former is easier to type. Even if there are some changes to the guts > of the string implementation, I would have thought that you could > just keep the

[julia-users] downloaded binaries vs source compilation

2015-09-27 Thread Gabor
I have always used the downloadable binaries of Julia. Please advise: Running 64-bit Windows 7 on a Haswell processor with AVX2 instructions should I expect a speedup or any other advantage from source compilation?

Re: [julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Gabor
Of course, if you need Greek characters, then use UTF8String, I used ASCIIString just for filenames and atom types. On Sunday, September 27, 2015 at 11:00:17 AM UTC+2, Daniel Carrera wrote: > > > On 27 September 2015 at 10:39, Milan Bouchet-Valat > wrote: >> >> Then the

[julia-users] Re: Homebrew problem(?): Can't add or build Gtk

2015-09-27 Thread Christoph Ortner
I had the same happen to me. Christoph

Re: [julia-users] Saving complex type to a file

2015-09-27 Thread Tim Holy
You can try JLD.jl. --Tim On Saturday, September 26, 2015 05:31:18 PM Marc Stein wrote: > I'm just starting out with Julia, so please forgive me if this is a > simplistic question. > > I'm using the DecisionTree package which generates an Ensemble of > DecisionTrees in the code below: > > >

Re: [julia-users] Re: Homebrew problem(?): Can't add or build Gtk

2015-09-27 Thread Tim Holy
On Sunday, September 27, 2015 03:04:03 AM Christoph Ortner wrote: > I had the same happen to me. > Christoph Please do post an issue over at https://github.com/JuliaLang/Gtk.jl; Elliot is very responsive about Homebrew-related issues, but not everyone reads julia- users carefully. Best, --Tim

Re: [julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Tim Holy
I think the only advantage of ASCIIString is that str[8:12] is performant, because you know the byte offset directly from the index. That's not true for UTF8String. --Tim On Sunday, September 27, 2015 11:00:14 AM Daniel Carrera wrote: > On 27 September 2015 at 10:39, Milan Bouchet-Valat

Re: [julia-users] Why is String deprecated in favour of AbstractString?

2015-09-27 Thread Daniel Carrera
Thanks. On 27 September 2015 at 12:31, Tim Holy wrote: > I think the only advantage of ASCIIString is that str[8:12] is performant, > because you know the byte offset directly from the index. That's not true > for > UTF8String. > > --Tim > > On Sunday, September 27, 2015

[julia-users] Implementing printf() and sprintf() in Julia.

2015-09-27 Thread Daniel Carrera
Hello, I made a trivial change to a some clever code by Tim Holy, and used it to make printf() and sprintf() function with the familiar syntax that we know from C/C++ (requires Julia 0.4): immutable FormatString{S} end FormatString(str::AbstractString) = FormatString{symbol(str)} @generated

[julia-users] Re: Implementing printf() and sprintf() in Julia.

2015-09-27 Thread Michael Hatherly
As mentioned in the other thread, https://groups.google.com/d/msg/julia-users/hBbEGEopi0A/OX4ZEhFnBgAJ and https://groups.google.com/d/msg/julia-users/hBbEGEopi0A/fKQcqDEVBgAJ, there are concerns about generating new code for every single formatting string used. I guess generally this won’t