[julia-users] navigating the help & documentation system

2015-07-14 Thread Forrest Curo
There seems to be a great deal of it... The things I'm having trouble locating: 1) How to get information on functions available in a julia package, usage, etc 2) A good lightweight graphics package for such simple-minded tasks as a 2D game board with round pieces on a square grid. 3) The bes

[julia-users] Re: navigating the help & documentation system

2015-07-14 Thread Forrest Curo
On the unpacking issue, rather than put x into a (C type) union, it might be faster with something like so: function unpack(x) x4 = x & 65535 x3 = ( x >> 16) & 65535 x2 = (x >> 32) & 65535 x1 = (x >> 48) & 65535 return x1, x2, x3, x4 end but I'd sti

[julia-users] no method for int64

2015-07-15 Thread Forrest Curo
Finding Cairo to be reasonably well-documented with examples, and already installed, I did 'using Cairo' and then typed in "set_source_rgb(0, 0, 0)" -- with the result: "error -- no method for int64". "help" tells me that yes, "set_source_rgb") is a function, and has two methods. Neither of

Re: [julia-users] Re: navigating the help & documentation system

2015-07-15 Thread Forrest Curo
Eventually a search for Cairo.jl information led me blundering into the following two pieces (which should be added to the tutorials under a heading like "Graphics Usage in Julia"): http://julialang.org/blog/2013/05/graphical-user-interfaces-part1/ http://julialang.org/blog/2013/05/graphical-user-

[julia-users] C function vs 64 bit arithmetic in julia

2015-07-30 Thread Forrest Curo
I want to turn an unsigne64 into bytes, chew on the bytes, & rearrange into a new unsigned64. Should I expect significant gain by reading it into a C function to make it a union of char and unsigned64, take out the chars & put the new ones back into that union -- or should it be close enough in s

[julia-users] Sorting Out Scope Rules...

2015-08-02 Thread Forrest Curo
I have a program which uses Tk and Cairo to draw a gameboard in a window. I would like to put this as a function in a larger program; but the window and board persist and remain accessible only while the loop in that program continues to run. Okay, then, if I want to avoid clutter in the parts of

[julia-users] Re: Sorting Out Scope Rules...

2015-08-03 Thread Forrest Curo
The easy way to get rid of the warning seems to be: changing: using goguts in my program to: include("goguts.jl") --- No scope hassles so far... On Sun, Aug 2, 2015 at 12:15 PM, Forrest Curo wrote: > I have a program which uses Tk and Cairo to draw a gameboard in a window. >

[julia-users] How to run task in background without disabling kb input?

2016-06-02 Thread Forrest Curo
If I try the following: @async begin while(1 == 1) iter(x) # the function listens for incoming rt MIDI events end end end iter begins printing out any notes I play in from my [music] keyboard -- but then I can't use my [text] keyboard to do anything else in the forg

[julia-users] Everything I wrote in version .3 is now 'depreciated'

2015-10-16 Thread Forrest Curo
So what's the easiest way -- given a long, long list of warnings -- to find out what needs to be changed in a program (It runs, after replacing calls to 'Base.Graphics' with 'Graphics' -- but the tk button that used to close the window and exit now doesn't (Ah! I need to remember the default I

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-16 Thread Forrest Curo
s? Do we just update all the deprecations and push the changes? >> This would make the package useless for 0.3 users or is this the >> recommended procedure. >> >> On Friday, October 16, 2015 at 7:39:05 PM UTC-4, Forrest Curo wrote: >>> >>> So what's th

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-16 Thread Forrest Curo
this were a trivial hassle I thought I'd finished, & now I'm needing to excavate & reconstruct that in order to use them.) On Fri, Oct 16, 2015 at 8:41 PM, Matt Bauman wrote: > On Friday, October 16, 2015 at 11:29:40 PM UTC-4, Forrest Curo wrote: >> >> Okay,

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-16 Thread Forrest Curo
new > 0.4 syntax, eliminating deprecation warnings but allowing the code to still > run on 0.3. > > > On Friday, October 16, 2015 at 9:27:59 PM UTC-7, Forrest Curo wrote: >> >> Um... In other words, I can run my old code using julia 0.3 but if I >> want to add new things

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-17 Thread Forrest Curo
Okay, looks like a good exercise in practicing new syntax... :>{ and I'll just have to compare my modified v3 tk package with the unmodified v4 tk package's code for 'button'. On Sat, Oct 17, 2015 at 4:20 AM, wrote: > It might also be worth looking at using Lint.jl.

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-17 Thread Forrest Curo
rrrgh!!! 99.9% of the warnings are about syntax being used within the v4 tc package!!! Can I suppress these & get on with it? On Sat, Oct 17, 2015 at 6:26 AM, Forrest Curo wrote: > Okay, looks like a good exercise in practicing new syntax... :>{ > > and I'll just have t

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-17 Thread Forrest Curo
Thanks, all! Most of my booboos seem to be due to the fact that julia doesn't like 'foo ()' anymore, she now prefers 'foo()' which I suppose makes the parsing simpler. And I now know where to find that pesky tk button code... On Sat, Oct 17, 2015 at 8:00 AM, Kristoffer Carlsson wrote: > You can

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-17 Thread Forrest Curo
short, but not for the reason you'd > think. The types were deprecated very early in 0.4 development (mostly), > but code to generate warnings wasn't added until quite late. Definitely an > oversight, several of us have been fixing them wherever we can. Won't > happen again

Re: [julia-users] Re: Everything I wrote in version .3 is now 'depreciated'

2015-10-17 Thread Forrest Curo
n’t say “she” about the Julia language; say “it”. > > On a related note, I’m not sure I’ve seen your name on the list before, > Forrest - welcome to the community! :) > > // T > > On Saturday, October 17, 2015 at 5:26:39 PM UTC+2, Forrest Curo wrote: > > Thanks, all! >

[julia-users] problem running jl files

2015-11-17 Thread Forrest Curo
I have the latest julia version installed on ubuntu and debian partitions on my hard drive. On the ubuntu, I can type [for example]: julia --depwarning=no newbox.jl and that file loads, runs, exits. On the debian, julia comes up in REPL mode and my file seems unrecognized. (Likewise if I stay in

[julia-users] Re: problem running jl files

2015-11-18 Thread Forrest Curo
still needed(?)) What's gone wrong with simply running a script from the command line? On Tue, Nov 17, 2015 at 9:57 PM, Forrest Curo wrote: > I have the latest julia version installed on ubuntu and debian partitions > on my hard drive. > > On the ubuntu, I can type [for example]:

[julia-users] Re: problem running jl files

2015-11-19 Thread Forrest Curo
2015 at 6:14 AM, Forrest Curo wrote: > Following an example on another site, I see that staying with the REPL > and typing: > include("newbox.jl") > > would work (aside from needing to change a package name or two -- and > possibly finding some way to put in '

[julia-users] Re: problem running jl files

2015-11-20 Thread Forrest Curo
t 10:27 PM, Forrest Curo wrote: > Okay, the problem was that Ubuntu julia was version 4.1, properly > installed, while Debian was 4.0 with directories in nonestandard places. > > Downloading & extracting the 4.1 binary to my home directory, running it > from there as: > juli

[julia-users] using PyCall on an event stream

2015-11-28 Thread Forrest Curo
I get the following: " julia> using PyCall julia> @pyimport mido julia> inp = mido.open_input("Q25 MIDI 1") PyObject julia> for msg in inp print(msg) end PyObject - What follows this last prompt: The for loop is quoting a python program which prints out midi messages

[julia-users] Re: using PyCall on an event stream

2015-11-29 Thread Forrest Curo
gt; using PyCall julia> @pyimport mymid note_on channel=0 note=59 velocity=87 time=0 note_off channel=0 note=59 velocity=64 time=0 ... On Sat, Nov 28, 2015 at 10:35 PM, Forrest Curo wrote: > I get the following: > " > julia> using PyCall > > julia> @pyimpo

[julia-users] Re: using PyCall on an event stream

2015-12-01 Thread Forrest Curo
On Sunday, November 29, 2015 at 5:15:40 AM UTC-8, Steven G. Johnson wrote: > > Is this in the Julia REPL? > Yes. I've since found a better approach which I'm going to post as a new topic!

[julia-users] PyCall Usage

2015-12-01 Thread Forrest Curo
I was having trouble importing a certain python module into julia for realtime interactions... and painfully worked out what looks to be a good general rule-of-thumb: Write your own module (and put it into python's path) in which you don't try to do anything complex that would require figuring c

Re: [julia-users] Re: PyCall Usage

2015-12-01 Thread Forrest Curo
The amount of glue I needed to write was minimal, considering that I didn't want to have to decide how much of the time a routine would devote to listening on a port, nor how many messages might be received between calls, nor how to get a list of these into julia. Trying to tell julia how to take

Re: [julia-users] Re: PyCall Usage

2015-12-01 Thread Forrest Curo
>I'm not sure what you mean by "taking someone else's objects apart". > >Usually there are straightforward rules for converting Python code into >the corresponding Julia code. In your example, of calling mymod.myf(x) >to access x.theirmethod, you could just call x[:theirmethod]. Okay, thanks! On

Re: [julia-users] Re: PyCall Usage

2015-12-01 Thread Forrest Curo
't recognize the mido method "port.iter_pending" in any notation I've found so far How to say that, please? On Tue, Dec 1, 2015 at 6:29 PM, Forrest Curo wrote: > >I'm not sure what you mean by "taking someone else's objects apart". > > >Usually t

Re: [julia-users] Re: PyCall Usage

2015-12-02 Thread Forrest Curo
0 [This still picks up an extra note-off (the first '0' above)the first time I run it... but subsequently works correctly.] On Wed, Dec 2, 2015 at 5:53 AM, Steven G. Johnson wrote: > > > On Wednesday, December 2, 2015 at 12:30:43 AM UTC-5, Forrest Curo wrote: >> >> I ga

Re: [julia-users] Re: PyCall Usage

2015-12-02 Thread Forrest Curo
Um, better to add the part about methods, that you need the concluding '()' so that julia will recognize a method as a function. It is simply very difficult to explain anything whatsoever you have written, whether softwear or poetry or anything else, to anyone who lacks the familiarity you've gain

[julia-users] julia + 2nd program: through terminal or @aspawn?

2015-12-06 Thread Forrest Curo
This works either way, as either way the communications go through a linux fifo -- and I was wondering whether there's an advantage to either version.(?) Example (entirely in julia): julia> addprocs(1) 1-element Array{Int64,1}: 2 julia> x= @spawnat(2,run(`csound KungFu.csd`)) [This csd fil

[julia-users] dictionaries of sets -- or arrays of sets

2016-01-04 Thread Forrest Curo
I can do something like the following with no complaint: julia> ns = Dict{Int8,Set{Int8}} Dict{Int8,Set{Int8}} but I get method errors any time I try to push! something into ns[1] or test isempty(ns[1]) Similarly if I try to make ns an array of sets. How to get an addressable collection of smal

Re: [julia-users] Re: dictionaries of sets -- or arrays of sets

2016-01-04 Thread Forrest Curo
e: > > > On Monday, January 4, 2016 at 9:57:35 AM UTC-7, Forrest Curo wrote: >> >> I can do something like the following with no complaint: >> julia> ns = Dict{Int8,Set{Int8}} >> > > What you've created is the type, but what you want is an instance of

[julia-users] Re: ANN: NBInclude.jl --- include() for IJulia notebooks

2016-08-21 Thread Forrest Curo
Help? -- This* does* sound incredibly useful, but I'm getting a collision with the Compat and JSON modules: [In REPL]: using NBInclude -- produces " INFO: Recompiling stale cache file /home/forrest/.julia/lib/v0.4/NBInclude.ji for module NBInclude. WARNING: Module Compat uuid did not match cac

[julia-users] Re: ANN: NBInclude.jl --- include() for IJulia notebooks

2016-08-21 Thread Forrest Curo
> > Just quit Julia and re-try "using NBInclude" ... you get this error when > Compat was already imported before you run Pkg.update(). ( > https://github.com/JuliaLang/julia/issues/12508) > Yes, so it is, thanks! & I do expect that being able to squirrel away the long, messy coding in othe