[julia-users] Re: Convert ASCIIString to Uint8

2016-02-07 Thread Scott Jones
convert(Vector{UInt8}, str) will work fine. On Saturday, February 6, 2016 at 8:31:19 PM UTC-5, icebl...@gmail.com wrote: > > Hello, > > I m trying to convert ASCIIString (or ASCII) to Uint8 . > > b"string" seems to be the option. However it doesnt seem to handle > b"$(variable)" > > Also,

[julia-users] Re: Convert ASCIIString to Uint8

2016-02-07 Thread iceblue25 . 1
Thanks, it works On Saturday, February 6, 2016 at 6:43:28 PM UTC-8, Fengyang Wang wrote: > > collect(UInt8, "hello world") > > should do the trick. > > On Saturday, February 6, 2016 at 8:31:19 PM UTC-5, icebl...@gmail.com > wrote: >> >> Hello, >> >> I m trying to convert ASCIIString (or ASCII)

Re: [julia-users] Color.jl - Colors.jl?

2016-02-07 Thread Kevin Squire
Hi Andreas, Colors.jl is meant as a complete replacement for Color.jl. The latter is not installable on Julia v0.4 and above. See this julia-users post for more information. I'm not sure why Issues were disabled on

Re: [julia-users] Re: Understanding immutables

2016-02-07 Thread Cedric St-Jean
On Sun, Feb 7, 2016 at 10:11 AM, Bart Janssens wrote: > > On Sunday, February 7, 2016 at 3:39:51 PM UTC+1, Cedric St-Jean wrote: > >> then `a` is stack-allocated. The foo(a) call may either copy `a` further, >> or just pass on a stack pointer to the existing `a`, depending on

Re: [julia-users] Re: Periodic or cyclic arrays possible?

2016-02-07 Thread Erik Schnetter
The expression `(i-1) % length + 1` is not correct for negative `i`. You have to use `mod` instead of `%`. Julia has a function `mod1(x,y)` that is essentially defined as `mod(x-1, y) +1`, so that's what you probably want to use. -erik On Sat, Feb 6, 2016 at 8:40 PM, Cedric St-Jean

Re: [julia-users] Memory allocation free array slices ?

2016-02-07 Thread Stefan Karpinski
Being able to stack-allocate objects that refer to the heap is an important case that we need to address, but doing so is non-trivial and hasn't been done yet. On Sunday, February 7, 2016, Tim Holy wrote: > I filed an issue, https://github.com/JuliaLang/julia/issues/14955,

Re: [julia-users] Memory allocation free array slices ?

2016-02-07 Thread Tim Holy
I filed an issue, https://github.com/JuliaLang/julia/issues/14955, which you can check to learn about progress on this problem. Best, --Tim On Saturday, February 06, 2016 03:35:34 PM Nitin Arora wrote: > I see, thanks for the information. I think, if possible, this feature will > help the

Re: [julia-users] Understanding immutables

2016-02-07 Thread Tim Holy
heap <--> stack (oops) On Sunday, February 07, 2016 06:39:51 AM Cedric St-Jean wrote: > There's an issue on Github > to add GC support for stack-allocated objects, and that makes no sense to > me! Could someone please help me out? In my mind,

Re: [julia-users] Using `Rational` with `Poly`

2016-02-07 Thread Stefan Karpinski
There are various assumptions baked into the rational code that may or may not be satisfied by non-integer numeric types. I would suggest taking the code from Base and trying it out without that restriction and seeing how it goes. On Saturday, February 6, 2016, Fengyang Wang

[julia-users] Understanding immutables

2016-02-07 Thread Cedric St-Jean
There's an issue on Github to add GC support for stack-allocated objects, and that makes no sense to me! Could someone please help me out? In my mind, stack-allocated objects = Int+Float+...+Immutable (in some circumstances). I thought that with

Re: [julia-users] Understanding immutables

2016-02-07 Thread Tim Holy
I'm not certain this is correct, but here's my understanding: `a = ImagePos(img, 10, 20)` absolutely must protect `img` from being GCed in code like this: function foo() img = rand(5,5) return ImagePos(img, 10, 20) end But currently objects on the heap do not seem to

Re: [julia-users] Understanding immutables

2016-02-07 Thread Yichao Yu
On Sun, Feb 7, 2016 at 9:39 AM, Cedric St-Jean wrote: > There's an issue on Github to add GC support for stack-allocated objects, > and that makes no sense to me! Could someone please help me out? In my mind, > stack-allocated objects = Int+Float+...+Immutable (in some

[julia-users] Re: Simultaneous audio playback / recording.

2016-02-07 Thread CrocoDuck O'Ducks
I am starting looking into your module and... ehm... what is the proper way to install it? On Wednesday, 3 February 2016 18:54:49 UTC, Sebastian Kraft wrote: > > > Hi, > > in the last weeks I started a PortAudio.jl package (based on parts of the > AudioIO.jl package). It is still under

Re: [julia-users] Understanding immutables

2016-02-07 Thread Cedric St-Jean
On Sun, Feb 7, 2016 at 9:54 AM, Yichao Yu wrote: > On Sun, Feb 7, 2016 at 9:39 AM, Cedric St-Jean > wrote: > > There's an issue on Github to add GC support for stack-allocated objects, > > and that makes no sense to me! Could someone please help me

Re: [julia-users] Color.jl - Colors.jl?

2016-02-07 Thread Tim Holy
It was getting spammed (it's happened twice now), so I "temporarily" turned them off but forgot to turn them back on again. I just edited the README of Color.jl. Best, --Tim On Sunday, February 07, 2016 12:26:47 AM Kevin Squire wrote: > Hi Andreas, > > Colors.jl is meant as a complete

Re: [julia-users] associating outer constructors with different names with a type

2016-02-07 Thread Toivo Henningsson
I think rather the issue here is that SomeType instances should behave more or less the same no matter whether they were constructed through TypeA or TypeB, and it would be wasteful for the compiler to specialise code on these two cases separately? To try to answer the question from this point

[julia-users] Re: Understanding immutables

2016-02-07 Thread Bart Janssens
On Sunday, February 7, 2016 at 3:39:51 PM UTC+1, Cedric St-Jean wrote: > then `a` is stack-allocated. The foo(a) call may either copy `a` further, > or just pass on a stack pointer to the existing `a`, depending on compiler > details. Any stack-allocated object gets automatically wiped as the

Re: [julia-users] Pre-compiling images for different CPUs on GCloud

2016-02-07 Thread Erik Schnetter
An even better command is: ``` julia -e 'println(Sys.cpu_name)' ``` -erik On Sat, Feb 6, 2016 at 7:24 PM, Pavel wrote: > The "core-avx2" target worked (LLVL 3.4), and it was in the output of `llc > --version`. I was able to precompile locally and deploy on GCloud

Re: [julia-users] Re: Periodic or cyclic arrays possible?

2016-02-07 Thread Matt Bauman
I highly recommend reading the Interfaces chapter[1] for a walk-through on creating your own array type. Another great trick that you can use is `A[mod1(x, end)]`. 1. http://docs.julialang.org/en/release-0.4/manual/interfaces/ On Sunday, February 7, 2016 at 10:52:45 AM UTC-5, Erik Schnetter

[julia-users] Re: Simultaneous audio playback / recording.

2016-02-07 Thread CrocoDuck O'Ducks
Thanks! The module is installed. I will make some experiment and report back! On Sunday, 7 February 2016 16:31:57 UTC, Sebastian Kraft wrote: > > Am Sonntag, 7. Februar 2016 16:51:35 UTC+1 schrieb CrocoDuck O'Ducks: >> >> I am starting looking into your module and... ehm... what is the proper

Re: [julia-users] Understanding immutables

2016-02-07 Thread Yichao Yu
On Sun, Feb 7, 2016 at 10:19 AM, Cedric St-Jean wrote: > > > On Sun, Feb 7, 2016 at 9:54 AM, Yichao Yu wrote: >> >> On Sun, Feb 7, 2016 at 9:39 AM, Cedric St-Jean >> wrote: >> > There's an issue on Github to add GC support for

[julia-users] Re: Simultaneous audio playback / recording.

2016-02-07 Thread Sebastian Kraft
Am Sonntag, 7. Februar 2016 16:51:35 UTC+1 schrieb CrocoDuck O'Ducks: > > I am starting looking into your module and... ehm... what is the proper > way to install it? > It's not a registered package, yet. Therefore, it requires the following steps:

[julia-users] Re: I think I'm obtaining the nightly ubuntu PPA incorrectly...

2016-02-07 Thread Jeff Waller
this is a downside of having a project that spans 3 travis languages; (c++, node, julia) -- currently the language is set to c++. Ironically, the c++ provided by language c++ is the wrong one on Linux (gcc 4.6 is too old). I think I copied that script back in the day, but have since modified

[julia-users] Re: Dual licenses for Julia packages

2016-02-07 Thread Jeffrey Sarnoff
Well, maybe maybe not -- irrelevant, though. I was not advocating its use, just relating something. As I said, this is a legal question. I am going to ask an intellectual property lawyer. On Sunday, February 7, 2016 at 7:04:06 PM UTC-5, Steven G. Johnson wrote: > > > > On Sunday, February 7,

[julia-users] Re: Dual licenses for Julia packages

2016-02-07 Thread Jeffrey Sarnoff
The question is a legal question. This is* not* legal advice. I have not done this with any Julia code. I did do something similar some years ago with other source code. Understanding that permission may be contingent on an agreement to pay money, the gist of it was: LICENCE: For strictly

Re: [julia-users] Memory allocation free array slices ?

2016-02-07 Thread Nitin Arora
Thanks and Tim and Stefan, if there is anyway I can contribute to help, do let me know. thanks, Nitin On Sunday, February 7, 2016 at 8:24:38 AM UTC-8, Stefan Karpinski wrote: > > Being able to stack-allocate objects that refer to the heap is an > important case that we need to address, but

[julia-users] Re: Dual licenses for Julia packages

2016-02-07 Thread Steven G. Johnson
On Sunday, February 7, 2016 at 6:17:14 PM UTC-5, Jeffrey Sarnoff wrote: > > The question is a legal question. This is* not* legal advice. > > I have not done this with any Julia code. I did do something similar some > years ago with other source code. > Understanding that permission may be

[julia-users] Re: Dual licenses for Julia packages

2016-02-07 Thread Jeffrey Sarnoff
So there is no misunderstanding -- I deleted the prior post. I will relate whatever the lawyer I ask has to say about this. On Sunday, February 7, 2016 at 7:11:36 PM UTC-5, Jeffrey Sarnoff wrote: > > Well, maybe maybe not -- irrelevant, though. I was not advocating its use, > just relating

[julia-users] Re: I think I'm obtaining the nightly ubuntu PPA incorrectly...

2016-02-07 Thread Tony Kelman
No, julia isn't actually pre-installed in the VM image on travis. If you expand out the first few build steps from some package's log, you can see how it downloads and extracts a binary at the start of the build.