Re: [julia-users] slow while loop

2014-03-27 Thread John Myles White
Try this: function main() j = k = 1 t1 = @elapsed while k <= 10^8 j += k & 1 k += 1 end j = k = 1 t2 = @elapsed while true k > 10^8 && break j += k & 1 k += 1 end return t1, t2 end # Fo

Re: [julia-users] slow while loop

2014-03-27 Thread Laszlo Hars
In a function: elapsed time: 1.069738859 seconds elapsed time: 0.965128370 seconds still 11% difference

Re: [julia-users] slow while loop

2014-03-27 Thread Laszlo Hars
Yes, these timings are in the global scope, but I see the same speed differences inside a function.

Re: [julia-users] slow while loop

2014-03-27 Thread John Myles White
Are you timing this in the global scope? On my machine, I don't see a big difference when running these two loops inside a function. The loops also take 500ms, but 17 seconds. -- John On Mar 27, 2014, at 9:42 PM, Laszlo Hars wrote: > I tried to speed up a Julia function of several levels of

[julia-users] slow while loop

2014-03-27 Thread Laszlo Hars
I tried to speed up a Julia function of several levels of loops, but got unexpected speed relations. The problem is demonstrated with: ~~~ tic() j = k = 1 while k <= 10^8 j += k & 1 k += 1 end toc() tic() j = k = 1 while true k > 10^8 && break j += k & 1 k += 1 end toc() print

Re: [julia-users] print formatting: right justification

2014-03-27 Thread Andrew Dabrowski
The current behavior makes sense, it's I who don't. It even works in a map statement. julia> map( ( x -> @printf( "%3s \n", x ) ), test ) 1 21 321 On Thursday, March 27, 2014 11:29:51 PM UTC-4, Stefan Karpinski wrote: > > Does it make sense for printf to be broadcasting or something? Th

Re: [julia-users] print formatting: right justification

2014-03-27 Thread Stefan Karpinski
Does it make sense for printf to be broadcasting or something? This has come up before but never phrased quite that way – maybe this is the first time that idea clicked for me. > On Mar 27, 2014, at 11:22 PM, Andrew Dabrowski wrote: > > > > Thanks - I really should have been able to figure t

Re: [julia-users] Wrapping my head around coroutines

2014-03-27 Thread Stefan Karpinski
Coroutines are control flow, so all of them run in the same process sequentially. The distributed primitives are different – those are potentially in separate processes. > On Mar 27, 2014, at 10:06 PM, Collin Glass wrote: > > Hi, I'm almost done a bomberman client for an AI hackathon, I just n

Re: [julia-users] print formatting: right justification

2014-03-27 Thread Andrew Dabrowski
Thanks - I really should have been able to figure that out. I guess I need sleep. :)

Re: [julia-users] print formatting: right justification

2014-03-27 Thread Jameson Nash
the problem is that %s implies string(test), which returns "1\n21\n321\n" do separate printf calls for each element in the array and you should get the desired effect On Thu, Mar 27, 2014 at 10:22 PM, Andrew Dabrowski wrote: > > j > ulia> test = [ "1", "21", "321" ] > 3-element Array{ASCIIString

[julia-users] print formatting: right justification

2014-03-27 Thread Andrew Dabrowski
j ulia> test = [ "1", "21", "321" ] 3-element Array{ASCIIString,1}: "1" "21" "321" I'd like to print this out as 1 21 321 julia> print( test ) 1 21 321 julia> @printf( "%3s", test ) 1 21 321 Maybe I just don't understand the formatting commands: according to what I read, "%3s

[julia-users] Wrapping my head around coroutines

2014-03-27 Thread Collin Glass
Hi, I'm almost done a bomberman client for an AI hackathon, I just need to get the TCP input to run in it's own thread. I have the following code: include("bomberman.jl") try GAMEIP = "0.0.0.0" GAMEPORT = 4 player = Player(GAMEIP, GAMEPORT) print(typeof(play

Re: [julia-users] Re: Patching Julia

2014-03-27 Thread Jameson Nash
Probably should add a note to the README that prepare-julia-env.bat will rebuild the julia sysimg if it has been deleted (since all of the jl files are included in the share directory). On Thu, Mar 27, 2014 at 5:45 PM, Tim Holy wrote: > If you just have one, relatively isolated function you want

[julia-users] Re: Julia vs Matlab compiled code

2014-03-27 Thread J Luis
> If we're talking about the Coder products, the advantage of Julia is that > you'll never find yourself in gdb trying to discern the oft inscrutable > work of the code generator when your program crashes. However, the Julia > debugging story can still use a good bit of work. > I'm sure it l

[julia-users] Re: Julia vs Matlab compiled code

2014-03-27 Thread Patrick O'Leary
On Thursday, March 27, 2014 4:02:33 PM UTC-5, J Luis wrote: > > Are you using Matlab R13? Because that was the last release with a true > compiler. > Otherwise you are using a misnomer compiler. R14 and above call it > compiler but it doesn't compile anything. Just encrypts and uses a ML > runti

Re: [julia-users] Re: Julia vs Matlab compiled code

2014-03-27 Thread Stefan Karpinski
Indeed, Matlab's compiler isn't really a compiler, it's mostly an obfuscator (and a way to work around needing a license server if you're brave enough to deploy Matlab code). I haven't done a direct comparison but since Julia is about C speed, I'm pretty sure it still compares favorably. Are you su

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread Ivar Nesje
The module might also export a macro that you can apply to the method declaration.

Re: [julia-users] Re: Patching Julia

2014-03-27 Thread Tim Holy
If you just have one, relatively isolated function you want to modify, you may be able to do this: julia> cat(3) 0-element Array{None,1} julia> Base.cat(catdim::Integer) = "meow" Warning: Method definition cat(Integer,) in module Base at abstractarray.jl:470 overwritten in module Main at none:1

[julia-users] Re: Patching Julia

2014-03-27 Thread Bob Cowdery
I'm on Windows and the instructions look like its a bit of work to set up for a build which is why I was trying to avoid it. But if that's the only way I will bite the bullet. On Thursday, March 27, 2014 8:01:01 PM UTC, Bob Cowdery wrote: > > Is there any way to patch Julia? I wanted to try out

Re: [julia-users] number of cores varies in multiplication if array or vector

2014-03-27 Thread Tim Holy
For such operations, Julia calls out to OpenBLAS; while OpenBLAS is terrific, the number of threads has been a bit of a sore point. https://github.com/xianyi/OpenBLAS/issues/103 --Tim On Thursday, March 27, 2014 12:15:04 PM Carlos Stein wrote: > Hi all, > > I'm getting started with Julia, loo

[julia-users] Re: number of cores varies in multiplication if array or vector

2014-03-27 Thread Jake Bolewski
Carlos, The second operation uses more cores because it called out to a multithreaded BLAS operation. This will happen if the structure of your data can take advantage BLAS calls. The data layouts are the same so I don't know why the first version does not work. Method dispatch is probably s

[julia-users] Re: Julia vs Matlab compiled code

2014-03-27 Thread J Luis
Quinta-feira, 27 de Março de 2014 20:50:03 UTC, Rampal Etienne escreveu: > > I am considering switching from Matlab to Julia, mostly because of the > promised increase in speed. However, I am using the Matlab compiler that > converts Matlab code to C (or C++) and then compiles it, and therefore

[julia-users] Julia vs Matlab compiled code

2014-03-27 Thread Rampal Etienne
I am considering switching from Matlab to Julia, mostly because of the promised increase in speed. However, I am using the Matlab compiler that converts Matlab code to C (or C++) and then compiles it, and therefore runs faster. So my question is: how does Julia compare to Matlab's compiled code?

Re: [julia-users] Patching Julia

2014-03-27 Thread Stefan Karpinski
You can just change the file and recompile Julia. Does that not do what you need? > On Mar 27, 2014, at 4:01 PM, Bob Cowdery wrote: > > Is there any way to patch Julia? I wanted to try out a C DLL to dig out the > peer address and needed to patch socket.jl. I tried copying, renaming and > inc

[julia-users] number of cores varies in multiplication if array or vector

2014-03-27 Thread Carlos Stein
Hi all, I'm getting started with Julia, looks great. I was testing the performance for a simple array product *(A*v)* and it depended if *v* is a vector or an array. The matrix version A = randn(400,4000) v = randn(4000,1) y = A*v used one core, while the vector version A = randn(400,4000

[julia-users] Patching Julia

2014-03-27 Thread Bob Cowdery
Is there any way to patch Julia? I wanted to try out a C DLL to dig out the peer address and needed to patch socket.jl. I tried copying, renaming and including it but just got a load of errors for my trouble. Is it possible or is it a rebuild. Bob

Re: [julia-users] How long time does it take to install Julia by compiling Julias source code?

2014-03-27 Thread linusjarneving
Thanks Stefan, you were right. Den torsdagen den 27:e mars 2014 kl. 14:29:41 UTC+1 skrev Stefan Karpinski: > Depends on your system. On a midrange laptop, probably an hour or so. > > > On Thu, Mar 27, 2014 at 7:05 AM, >wrote: > >> >> >> >> >> *How long time should it take (roughly speaking) to co

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Jake Bolewski
Mikael, any type of parallelism has implicit overhead. You are not doing nearly enough work to amortize this overhead. On Thursday, March 27, 2014 2:31:14 PM UTC-4, Mikael Simberg wrote: > > All right, thanks! That gets rid of the error. > > If you don't mind though, I'd have some more ques

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Mikael Simberg
All right, thanks! That gets rid of the error. If you don't mind though, I'd have some more questions because I'm still doing something wrong or my expectations are too high. So I have again similar code as before: function mainfunction(r; single = false) const n = 1000 A = Shared

Re: [julia-users] Interfaces like in Go

2014-03-27 Thread Kevin Squire
The Graphs.jl package has a slightly different implementation of interfaces. Again, it's not an official solution, just a way to address the issue. Kevin On Thursday, March 27, 2014, Dom Luna wrote: > Yeah abstract types seem to be the best place to implement something like > this since, at lea

[julia-users] Re: JSON parsing into Matrix (checkbounds error)

2014-03-27 Thread Collin Glass
I got it working with: for i = 1:51 for j = 1:23 r.Board[i,j] = json["Board"][i][j]["Name"] end end I would like to better understand what the checkbounds error does. Now that I've done this imperatively, is there a better way I could parse this nested array of json:

Re: [julia-users] Terminate a task

2014-03-27 Thread Amit Murthy
Issue created : https://github.com/JuliaLang/julia/issues/6283 On Mon, Mar 24, 2014 at 10:14 PM, Jameson Nash wrote: > Alternatively, might be fun to make a ccall_in_worker_thread > intrinsic which handles all of the fiddly gc details and only blocks the > local task (and/or returns a remoteref

[julia-users] Re: JSON parsing into Matrix (checkbounds error)

2014-03-27 Thread Collin Glass
They are not actually in my code. They represent the rest of the 23x51 cells. Here is the basic rowxcolumn for loops I'm using to parse: for i in json["Board"] for j in json["Board"][i] r.Board[i,j] = json["Board"][i][j]["Name"] end end When I use while i <= 5 it parses. On Thursda

Re: [julia-users] Interfaces like in Go

2014-03-27 Thread Dom Luna
Yeah abstract types seem to be the best place to implement something like this since, at least to my knowledge it wouldn't fundamentally break anything. You would still be able to define abstract types as is but you would also have the added power to further refine the behaviour of that type.

Re: [julia-users] Re: Request to make peer address available

2014-03-27 Thread Amit Murthy
Yes, this would be nice to have - both for TCP as well as UDP. On Thu, Mar 27, 2014 at 8:02 PM, Bob Cowdery wrote: > Perhaps I can ask a more specific question and hopefully get some help. > The parameter in socket.jl _uv_hook_recv() is addr::Ptr{Void} which as far > as I can see from libuv sou

[julia-users] Re: JSON parsing into Matrix (checkbounds error)

2014-03-27 Thread Collin Glass
r being of type Response with some other game state data. On Thursday, March 27, 2014 11:09:10 AM UTC-4, Collin Glass wrote: > > They are not actually in my code. They represent the rest of the 23x51 > cells. > > Here is the basic rowxcolumn for loops I'm using to parse: > > for i in json["Board"

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread Stefan Karpinski
I think that design is flawed – you don't want to be adding random methods to user-supplied functions. You could just use a helper function in the definition of bar that applies the foo transformation using a user-supplied anonymous function applied to each scalar. On Thu, Mar 27, 2014 at 10:26 A

Re: [julia-users] JSON parsing into Matrix (checkbounds error)

2014-03-27 Thread John Myles White
What are you trying to do by using ...? -- John On Mar 26, 2014, at 11:06 PM, Collin Glass wrote: > Hi, I'm creating a TCP client for a bomberman game in Julia. I need to parse > the current state of the gameboard (which is a lot of tiles). > > Sample JSON, > > {{["Name"=>"Wall"],["Name"=>"

Re: [julia-users] Re: Build a constructor with fewer inputs than values

2014-03-27 Thread RecentConvert
It works! Thanks for the help and patience.

Re: [julia-users] something wrong with indexing sparse matrices

2014-03-27 Thread Mauro
> I started to fix this: https://github.com/JuliaLang/julia/pull/6280

Re: [julia-users] Re: Build a constructor with fewer inputs than values

2014-03-27 Thread RecentConvert
Not sure how it's suppose to go. As I understood it from the constructors documentation *new* was how it was done, not return.

Re: [julia-users] Re: Build a constructor with fewer inputs than values

2014-03-27 Thread Tim Holy
On Thursday, March 27, 2014 07:41:34 AM RecentConvert wrote: > Not sure how it's suppose to go. As I understood it from the constructors > documentation > *new* was how it was done, not return. Meaning, the point is that your print("Te

[julia-users] Re: Request to make peer address available

2014-03-27 Thread Bob Cowdery
Perhaps I can ask a more specific question and hopefully get some help. The parameter in socket.jl _uv_hook_recv() is addr::Ptr{Void} which as far as I can see from libuv source is a pointer to this: struct sockaddr_in uv_ip4_addr(const char* ip, int port); Can I dig out the ip and port in juli

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread andreas
Thanks for the fast response! However, when I change bar as proposed in the module this gives an error "No method foo(Array)": foo(x::Real) = x^2 bar(foo, [1:3]) As far I understand passing foo as function argument to bar(f, y) is not sufficient. The problem is that bar() uses foo(x::Real) a

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread andreas
Thanks for the fast response! However, when I change bar in the module this gives an error "No method foo(Array)": foo(x::Real) = x^2 println(bar(foo, [1:3])) As far I understand passing foo as function argument to bar(f, y) is not sufficient. The problem is that bar() uses

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
Hi Mikael, This seems to be a bug in the SharedArray constructor. For sharedarrays of length less than the number of participating pids only the first few pids are used. Since the length of s = SharedArray(Uint, (1)) is 1, it is mapped only on the first process. For now a workaround is to just cr

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
Hi Tim, The issue of the extra 40 milliseconds is related to how RemoteRefs to the individuals mappings are fetched. I don't quite get how pmap_bw is related to this On Thu, Mar 27, 2014 at 6:27 PM, Tim Holy wrote: > This is why, with my original implementation of SharedArrays > (oh-so-lon

Re: [julia-users] imwrite ImageCmap

2014-03-27 Thread Yakir Gagnon
Indeed!!! Thank you so much! Yakir Gagnon The Queensland Brain Institute (Building #79) The University of Queensland Brisbane QLD 4072 Australia cell +61 (0)424 393 332 work +61 (0)733 654 089 On Thu, Mar 27, 2014 at 10:21 PM, Tim Holy wrote: > This is fixed if you do Pkg.update(). > > --Tim

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Mikael Simberg
Yes, you're at least half-right about it not doing quite what I want. Or let's say I was expecting the majority of the overhead to come from having to send the array over to each process, but what I wasn't expecting was that getting a boolean and an integer back would take so much time (and thus I

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread Stefan Karpinski
Aka function arguments – I've been doing too much wrapping of C libraries lately. Example: function bar(f,y) a = length(y) [f(a) f(y)] end Which can be used like this: bar(y) do x # body of f(x) end You can also pass an explicit function argument as bar(f,y). (I swear this email wa

Re: [julia-users] "pass" a function to a module

2014-03-27 Thread Stefan Karpinski
Callbacks? On Thu, Mar 27, 2014 at 8:04 AM, andreas wrote: > > Dear list, > > I'd like to be able to "pass" a function to a module, lets say > foo(x::Real). foo(x::Real) is used in the module and more methods are > added (which make use of foo(x::Real)). > > My idea is that the user loads the

Re: [julia-users] Re: Circular Dependency in Composite Types

2014-03-27 Thread Stefan Karpinski
It's a pretty old one too: https://github.com/JuliaLang/julia/issues/269. On Thu, Mar 27, 2014 at 6:13 AM, Tobias Knopp wrote: > This is currently not possible but you can use > > > type A > foo::B > end > > type B > bar > end > > as a workaround. If you search in Julias issue tracker, you w

Re: [julia-users] current status of specialisation on function valued args

2014-03-27 Thread Stefan Karpinski
It has not, I'm afraid. We do need to do something about it though. On Wed, Mar 26, 2014 at 9:53 PM, andrew cooke wrote: > > hi, > > did this - > https://groups.google.com/d/msg/julia-dev/AP8AibF9Iuk/fMuMqBt5EfwJ - > happen? > > couldn't find an issue. > > thanks, > andrew >

Re: [julia-users] How long time does it take to install Julia by compiling Julias source code?

2014-03-27 Thread Stefan Karpinski
Depends on your system. On a midrange laptop, probably an hour or so. On Thu, Mar 27, 2014 at 7:05 AM, wrote: > > > > > *How long time should it take (roughly speaking) to compile Julias source > code? More then 30 mins? /Linus * >

[julia-users] How long time does it take to install Julia by compiling Julias source code?

2014-03-27 Thread linusjarneving
*How long time should it take (roughly speaking) to compile Julias source code? More then 30 mins?/Linus *

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Tim Holy
This is why, with my original implementation of SharedArrays (oh-so-long-ago), I created pmap_bw, to do busy-wait on the return value of a SharedArray computation. The amusing part is that you can use a SharedArray to do the synchronization among processes. --Tim On Thursday, March 27, 2014 06

Re: [julia-users] Re: Build a constructor with fewer inputs than values

2014-03-27 Thread Tim Holy
Status isn't returning the value created by new. --Tim On Thursday, March 27, 2014 05:45:08 AM RecentConvert wrote: > It turns out the error wasn't in the code I posted but how it was then > implemented though I still am not sure what is wrong. > > This code works. > type Status AutoBG::Vector{Bo

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
No explanation for the uneven distribution of the 40 milliseconds though. On Thu, Mar 27, 2014 at 6:11 PM, Amit Murthy wrote: > There is a pattern here. For a set of pids, the cumulative sum is 40 > milliseconds. In a SharedArray, RemoteRefs are maintained on the creating > pid (in this case 1)

Re: [julia-users] worker/proc nomenclature

2014-03-27 Thread Amit Murthy
Ah! OK. Makes sense. On Thu, Mar 27, 2014 at 5:15 PM, Ben Arthur wrote: > i guess i should be more explicit in my suggestion that we rename > addprocs() to addworkers(), and rmprocs() to rmworkers(). this new > nomenclature would be more precise, b/c you can't just add/rm any proc with > these

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
There is a pattern here. For a set of pids, the cumulative sum is 40 milliseconds. In a SharedArray, RemoteRefs are maintained on the creating pid (in this case 1) to the shmem mappings on each of the workers. I think they are referring back to pid 1 to fetch the local mapping when the shared array

[julia-users] Re: writedlm problem

2014-03-27 Thread Eythan Weg
It works for me. Thank you. - Eythan "Tanmay K. Mohapatra" Tue, 25 Mar 2014 22:08:21 -0700 (PDT) Hi, Thanks for bringing it to attention. This should now be fixed in the master branch. - Tanmay On Saturday, March 22, 2014 12:30:28 AM UTC+5:30, Eythan Weg wrote:

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
Some more weirdness Starting with julia -p 8 A=Base.shmem_fill(1, (1000,1000)) Using 2 workers: for i in 1:100 t1 = time(); p=2+(i%2); remotecall_fetch(p, x->1, A); t2=time(); println("@ $p ", int((t2-t1) * 1000)) end prints ... @ 3 8 @ 2 32 @ 3 8 @ 2 32 @ 3 8 @ 2 32 @ 3 8 @ 2 32 No

Re: [julia-users] imwrite ImageCmap

2014-03-27 Thread Tim Holy
This is fixed if you do Pkg.update(). --Tim On Wednesday, March 26, 2014 06:51:42 PM Yakir Gagnon wrote: > Stuck... Can someone give me an example of imwriting the output from > ImageCmap? So this for instance does not work (taken from "Using Image.jl > for false-color > maps"

[julia-users] "pass" a function to a module

2014-03-27 Thread andreas
Dear list, I'd like to be able to "pass" a function to a module, lets say foo(x::Real). foo(x::Real) is used in the module and more methods are added (which make use of foo(x::Real)). My idea is that the user loads the module and can then define foo(x::Real). If the user later redefines this

Re: [julia-users] SharedArray oddities

2014-03-27 Thread Amit Murthy
I think the code does not do what you want. In the non-shared case you are sending a 10^6 integer array over the network 1000 times and summing it as many times. Most of the time is the network traffic time. Reduce 'n' to say 10, and you will what I mean In the shared case you are not sending the

Re: [julia-users] worker/proc nomenclature

2014-03-27 Thread Ben Arthur
i guess i should be more explicit in my suggestion that we rename addprocs() to addworkers(), and rmprocs() to rmworkers(). this new nomenclature would be more precise, b/c you can't just add/rm any proc with these functions, just worker procs. to be even more consistent, we should probably al

Re: [julia-users] Pkg.publish broken?

2014-03-27 Thread Tim Holy
For the "No new package versions to publish," did you commit and tag your changes? For the one you're presumably more worried about, search the issues for that error string (#5998). --Tim On Wednesday, March 26, 2014 08:41:41 PM Sheehan Olver wrote: > I'm trying to Pkg.publish() but get the f

[julia-users] Re: Circular Dependency in Composite Types

2014-03-27 Thread Tobias Knopp
This is currently not possible but you can use type A foo::B end type B bar end as a workaround. If you search in Julias issue tracker, you will find an issue where this is discussed. Am Donnerstag, 27. März 2014 11:02:04 UTC+1 schrieb Freddy Chua: > > Hi I believe this question have not

[julia-users] Circular Dependency in Composite Types

2014-03-27 Thread Freddy Chua
Hi I believe this question have not been asked as I could not find anything related to "circular" So I have two composite types type A foo::B end type B bar::A end The execution of this script results in a undefined error. How do I resolve this?

[julia-users] SharedArray oddities

2014-03-27 Thread Mikael Simberg
Hi, I'm having some trouble figuring out exactly how I'm supposed to use SharedArrays - I might just be misunderstanding them or else something odd is happening with them. I'm trying to do some parallel computing which looks a bit like this test case: function createdata(shared) const n = 1

Re: [julia-users] Interfaces like in Go

2014-03-27 Thread Tobias Knopp
In my opinion it would be worth adding some syntax for defining an interface for abstract types. It should give us nice error messages and clean way to document an interface. This is quite similar to the C++ concepts but as it is already possible to restrict the "template parameter" in Julia, t

Re: [julia-users] Re: PySide QSizePolicy

2014-03-27 Thread Samuele Carcagno
On 27/03/14 01:07, j verzani wrote: Try this for example, QtGui = PyCall.pyimport("PySide.QtGui") QtGui["QSizePolicy"]["Fixed"], that works thanks! I found that the following also works: szp = Qt.QSizePolicy() loadParametersButton[:setSizePolicy](szp[:Expanding], szp[:Expanding]) Sam On

Re: [julia-users] Interfaces like in Go

2014-03-27 Thread Mauro
There is no official/formal way. But have a look at base/graphics.jl for an ad hoc way of specifying an interface. I think it's the only place in base where this is done, so I'm not sure how julian this is. Also, I think Leah thought of adding some functionality to infer the interface of a type