[julia-users] Re: How has the behavior of include/require etc. changed in 0.4?
Great point. Definitely looks like a docstring error here. I was speaking somewhat off topic. What I had in mind was the proposed solution in the link to the other github issue (https://github.com/QuantEcon/QuantEcon.jl/issues/64#issuecomment-130149602). Here for some reason I could call `using Distributions` without any problems. But then when I called `using QuantEcon` it would complain that Distributions couldn't load. Somehow explicitly calling `Base.compilecache(:Distributions)` made it so we could call `using QuantEcon` without a problem... I can't really explain why that worked, but to me it feels like we might have been hitting an edge case bug with the precompilation feature. On Saturday, August 15, 2015 at 6:47:32 PM UTC-4, Steven G. Johnson wrote: It is not a problem to load a package where some dependencies are precompiled and others aren't. The original LoadError is about a docstring, so it sounds like an incompatibility with the new doc system.
[julia-users] ANN: tuplegen macro for fixed-length arrays
I wrote a short macro for Julia 0.4 to generate fixed-length tuples using comprehension-like syntax. This is useful in code where tuples are used to represent fixed-length arrays. Here is an example: v = @tuplegen [(i==2)? i * 6 : i for i = 1 : 3] macro-expands to v = (1, 2*6, 3) which would yield (1,12,3). You could get the same result via the standard code: v = tuple( [ comprehension goes here ] ...) but this latter code would create a heap-allocated array as a temporary variable and hence would presumably be less efficient. The metaprogramming to make this work is similar to the metaprogramming for my unroll macro, so I put them in the same package. You can get @tuplegen (and @unroll) via: Pkg.clone(https://github.com/StephenVavasis/Unroll.jl;)
Re: [julia-users] JuliaCon 2015 videos
My thanks to Viral and all the JuliaCon presenters and organizers! I've enjoyed viewing several videos this morning; I think they will be a valuable resource for others looking to use Julia. On Sat, Aug 15, 2015 at 11:31 AM, Viral Shah vi...@mayin.org wrote: Next set: 1. Sebastien Martin: Taxi fleet simulation and visualization: http://youtu.be/MjERK9Xajrg?a 2. Bob Carpenter: Stan.jl - Statistical Modeling and Inference Made Easy: http://youtu.be/YdgMJ37CDws?a 3. Pontus Stenetorp: Suitably Naming a Child with Multiple Nationalities: http://youtu.be/MJzRf3Exlqc?a 4. Chiyuan Zhang: Mocha.jl - Deep Learning for Julia: http://youtu.be/ljySoebYylE?a 5. Kiran Pamnany and Ranjan Anantharaman: Multi-threading Julia: http://youtu.be/GvLhseZ4D8M?a 6. St. Louis University - Text Mining Research Group: TextMining.jl: http://youtu.be/dgfIIZ5yA4E?a 7. Zachary Yedidia: SFML.jl - Julia bindings for the Simple Fast: http://youtu.be/UKfM7EopMe0?a -viral On 15-Aug-2015, at 10:07 am, Viral Shah vi...@mayin.org wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral -- chris.p...@ieee.org
[julia-users] Re: How has the behavior of include/require etc. changed in 0.4?
It is not a problem to load a package where some dependencies are precompiled and others aren't. The original LoadError is about a docstring, so it sounds like an incompatibility with the new doc system.
Re: [julia-users] JuliaCon 2015 videos
I don’t know why the slides are missing. Perhaps Jiahao or Andreas may know. I do recollect that there were a few hiccups in some of the talks with the recording. -viral On 16-Aug-2015, at 8:28 am, Tony Kelman t...@kelman.net wrote: These are great so far! Putting them out in batches is also useful to avoid overwhelming us with too much choice at once. Question though - was there a license issue or something with Robert Moss' talk, or will the slides be made available separately at some point? Little tough to follow that one without being able to see any of the slides at all. On Saturday, August 15, 2015 at 2:36:43 PM UTC-7, Christian Peel wrote: My thanks to Viral and all the JuliaCon presenters and organizers! I've enjoyed viewing several videos this morning; I think they will be a valuable resource for others looking to use Julia. On Sat, Aug 15, 2015 at 11:31 AM, Viral Shah vi...@mayin.org wrote: Next set: 1. Sebastien Martin: Taxi fleet simulation and visualization: http://youtu.be/MjERK9Xajrg?a 2. Bob Carpenter: Stan.jl - Statistical Modeling and Inference Made Easy: http://youtu.be/YdgMJ37CDws?a 3. Pontus Stenetorp: Suitably Naming a Child with Multiple Nationalities: http://youtu.be/MJzRf3Exlqc?a 4. Chiyuan Zhang: Mocha.jl - Deep Learning for Julia: http://youtu.be/ljySoebYylE?a 5. Kiran Pamnany and Ranjan Anantharaman: Multi-threading Julia: http://youtu.be/GvLhseZ4D8M?a 6. St. Louis University - Text Mining Research Group: TextMining.jl: http://youtu.be/dgfIIZ5yA4E?a 7. Zachary Yedidia: SFML.jl - Julia bindings for the Simple Fast: http://youtu.be/UKfM7EopMe0?a -viral On 15-Aug-2015, at 10:07 am, Viral Shah vi...@mayin.org wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral -- chris...@ieee.org
[julia-users] Re: Sparse matrix with elements that are fixed-size dense matrices
This is usually called block sparse and there are some data structures for it in PETSc and Trilinos IIRC. Getting it to work robustly in Julia right this second will likely be a bit tricky. Arrays of arrays have some corner cases and aren't always the nicest things to work with, but it's worth trying. On Saturday, August 15, 2015 at 11:01:10 AM UTC-7, Douglas Bates wrote: I want to use sparse matrices in which the nonzeros are fixed-sized dense matrices. The matrix is of size m*p by n*q with nz nonzero blocks, each of size p by q. Generally p and q are very small but m, n and nz can be large. In a CSC representation of such a matrix, A, the A.colptr and A.rowval arrays are of lengths n+1 and nz, respectively, and A.nzval is a 3-dimensional array of size p by q by nz Does this type of structure appear elsewhere? I think I have seen descriptions in some sparse matrix packages of arrays like this where p and q might be stencil sizes. I'm fine with creating the structure and its methods myself but I also don't want to reinvent the wheel. Mostly I want to evaluate products of such matrices.
[julia-users] Re: Overloading . by specializing getfield() / setfield!()?
Not yet. Maybe for 0.5? https://github.com/JuliaLang/julia/issues/1974 On Saturday, August 15, 2015 at 7:35:20 PM UTC-7, Dominique Orban wrote: I'm wondering if implementing getfield() / setfield!() for a composite type could be a good design for getters and setters. Say I have a type type Thing a :: Int b :: int end where I'm requiring the `a` field to be even. It'd be great to be able to type thing = Thing() thing.a = 3 and receive an error. In 0.3.10 and 0.4, I can't implement setfield!(): ERROR: cannot define function setfield!; it already has a value. Is there a way to do this?
[julia-users] ANN: JuliaGPU mailing list
Everyone, I have gradually been pushed towards GPU computing and was looking for a forum to join in order to keep up with the latest on GPU computing and Julia. However, it turned out that the JuliaGPU organisation did not have a mailing list, so after confirming the situation with Tim Holy I went ahead and created one [2]. Feel free to join if you are interested in GPU computing and let's get the discussion started. Pontus [1]: https://github.com/JuliaGPU [2]: https://groups.google.com/forum/#!forum/julia-gpu
[julia-users] Overloading . by specializing getfield() / setfield!()?
I'm wondering if implementing getfield() / setfield!() for a composite type could be a good design for getters and setters. Say I have a type type Thing a :: Int b :: int end where I'm requiring the `a` field to be even. It'd be great to be able to type thing = Thing() thing.a = 3 and receive an error. In 0.3.10 and 0.4, I can't implement setfield!(): ERROR: cannot define function setfield!; it already has a value. Is there a way to do this?
Re: [julia-users] JuliaCon 2015 videos
Next set: 1. Avik Sengupta: A practical guide to exposing Julia APIs on the web: http://youtu.be/o40OpLe2k7Q?a 2. Hongbo Rong: Accelerating sparse matrix kernels in Julia: http://youtu.be/k40K2zJVv0A?a 3. Luis Benet: Taylor series expansions in Julia: http://youtu.be/6zrQuq5mODQ?a 4. Westley Hennigh: Who optimizes the optimizers: http://youtu.be/Qito5AGSv4s?a 5. Mauro Werder: Interfaces for Julia -Traits.jl: youtu.be/j9w8oHfG1Ic?a 6. David Gold: Nullable arrays - http://youtu.be/2v5k28F80BQ?a -viral On 16-Aug-2015, at 12:01 am, Viral Shah vi...@mayin.org wrote: Next set: 1. Sebastien Martin: Taxi fleet simulation and visualization: http://youtu.be/MjERK9Xajrg?a 2. Bob Carpenter: Stan.jl - Statistical Modeling and Inference Made Easy: http://youtu.be/YdgMJ37CDws?a 3. Pontus Stenetorp: Suitably Naming a Child with Multiple Nationalities: http://youtu.be/MJzRf3Exlqc?a 4. Chiyuan Zhang: Mocha.jl - Deep Learning for Julia: http://youtu.be/ljySoebYylE?a 5. Kiran Pamnany and Ranjan Anantharaman: Multi-threading Julia: http://youtu.be/GvLhseZ4D8M?a 6. St. Louis University - Text Mining Research Group: TextMining.jl: http://youtu.be/dgfIIZ5yA4E?a 7. Zachary Yedidia: SFML.jl - Julia bindings for the Simple Fast: http://youtu.be/UKfM7EopMe0?a -viral On 15-Aug-2015, at 10:07 am, Viral Shah vi...@mayin.org wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral
Re: [julia-users] JuliaCon 2015 videos
These are great so far! Putting them out in batches is also useful to avoid overwhelming us with too much choice at once. Question though - was there a license issue or something with Robert Moss' talk, or will the slides be made available separately at some point? Little tough to follow that one without being able to see any of the slides at all. On Saturday, August 15, 2015 at 2:36:43 PM UTC-7, Christian Peel wrote: My thanks to Viral and all the JuliaCon presenters and organizers! I've enjoyed viewing several videos this morning; I think they will be a valuable resource for others looking to use Julia. On Sat, Aug 15, 2015 at 11:31 AM, Viral Shah vi...@mayin.org javascript: wrote: Next set: 1. Sebastien Martin: Taxi fleet simulation and visualization: http://youtu.be/MjERK9Xajrg?a 2. Bob Carpenter: Stan.jl - Statistical Modeling and Inference Made Easy: http://youtu.be/YdgMJ37CDws?a 3. Pontus Stenetorp: Suitably Naming a Child with Multiple Nationalities: http://youtu.be/MJzRf3Exlqc?a 4. Chiyuan Zhang: Mocha.jl - Deep Learning for Julia: http://youtu.be/ljySoebYylE?a 5. Kiran Pamnany and Ranjan Anantharaman: Multi-threading Julia: http://youtu.be/GvLhseZ4D8M?a 6. St. Louis University - Text Mining Research Group: TextMining.jl: http://youtu.be/dgfIIZ5yA4E?a 7. Zachary Yedidia: SFML.jl - Julia bindings for the Simple Fast: http://youtu.be/UKfM7EopMe0?a -viral On 15-Aug-2015, at 10:07 am, Viral Shah vi...@mayin.org javascript: wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org javascript: wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral -- chris...@ieee.org javascript:
[julia-users] Re: ANN: Major overhaul of ForwardDiff.jl
Agreed, this is really awesome work, I must say an extremely successful summer of code contribution. Nicely done to Jarrett, and very well-mentored by Miles. I feel like there is quite a large group of people out there who have no idea what automatic differentiation is or that the techniques even exist, but would be very well-served to make use of them. So tell your friends, and have a look at http://www.juliadiff.org/ if you're not familiar - there's a really nice set of tools shaping up for this in Julia. On Friday, August 14, 2015 at 8:46:26 PM UTC-7, Jeffrey Sarnoff wrote: +1 for your clean-up (understated and well-articulated) On Friday, August 14, 2015 at 4:20:09 PM UTC-4, Jarrett Revels wrote: Hi! ForwardDiff.jl https://github.com/JuliaDiff/ForwardDiff.jl, a Julia package for performing automatic differentiation, has just been updated and is now much less buggy, much more performant, and much more comprehensively tested. An additional goal of the update was to provide a more friendly API, so hopefully the package is now easier to use for newcomers (documentation can be found in the master branch's README). *To use the updated version of the package, check out it's most recent commit on the master branch*. The update is not yet tagged for release, as we want to give people a chance to work with the new API some before tagging a new version. Feel free to provide feedback in the form of an issue or pull request to the repository! Note that this update only supports Julia v0.4. Best, Jarrett
[julia-users] Re: JuliaCon 2015 videos
Great stuff, really great stuff! On Saturday, August 15, 2015 at 6:37:38 AM UTC+2, Viral Shah wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org javascript: wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
You can get Int64 value by duration.value and convert 'by hand' from there. A possibility to convert from Millisecond to DateTime would be nice... On Saturday, August 15, 2015 at 2:41:04 AM UTC+3, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
Re: [julia-users] Creating a bitmapped image with color bar
I was planning to test this a little bit more into detail (and then a PR should be possible). Two things hit me: * Image.jl seems to be unstable (segfault in Pkg.build, sometime in using) * afaics the code Maurizio is using, was your example in a previous discussion - is this a valuable test or has something changed on imwrite Is there another place where ImageCmap is used?
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
https://lh3.googleusercontent.com/-ozWWsLO25j8/Vc8HjJQDDTI/AWY/aKAqTYCKOOo/s1600/%2521yikes%2521.png Good morning, .. and I expected that would work .. that the period operators would cooperate differently. You deserve a more satisying introduction to basic stuff with time intervals. --- You want time differences to just work so you can do the same. I agree. On Saturday, August 15, 2015 at 2:46:04 AM UTC-4, Jeffrey Sarnoff wrote: Ian -- I can imagine a long-winded solution where the relevant time units are extracted and differenced, but I was hoping for simpler.. -- as you should! When I saw you use Hour in the first example, I thought you were doing some thing where hour counts were the focus ... (I will prepare a more fully helpful example). On Saturday, August 15, 2015 at 2:21:04 AM UTC-4, Jeffrey Sarnoff wrote: well that's accurate -- I was not trying to make them nefarious, I mistook the emphasis. I will come back with a more fully driveable example in about 15mins. On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
On Saturday, August 15, 2015 at 5:59:36 AM UTC-4, Kaj Wiik wrote: You can get Int64 value by duration.value and convert 'by hand' from there. A possibility to convert from Millisecond to DateTime would be nice... There should be durationAB = DateTimeB - DateTimeA rational_hours = convert(Hour, durationAB) On Saturday, August 15, 2015 at 2:41:04 AM UTC+3, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
Ian -- I can imagine a long-winded solution where the relevant time units are extracted and differenced, but I was hoping for simpler.. -- as you should! When I saw you use Hour in the first example, I thought you were doing some thing where hour counts were the focus ... (I will prepare a more fully helpful example). On Saturday, August 15, 2015 at 2:21:04 AM UTC-4, Jeffrey Sarnoff wrote: well that's accurate -- I was not trying to make them nefarious, I mistook the emphasis. I will come back with a more fully driveable example in about 15mins. On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
well that's accurate -- I was not trying to make them nefarious, I mistook the emphasis. I will come back with a more fully driveable example in about 15mins. On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
Re: [julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
If you email me a description of how it had been planned to word (doing what, using which underpinning funs) .. , I will give that a go. On Sat, Aug 15, 2015 at 1:00 PM, Jacob Quinn quinn.jac...@gmail.com wrote: Yeah, it's forthcoming. I left it out originally just to be conservative in code and function, but it's come up enough that we should add it in for TimePeriods. A good up for grabs kind of PR if anyone's feeling up for it. -Jacob On Sat, Aug 15, 2015 at 10:59 AM, Ian Butterworth i.r.butterwo...@gmail.com wrote: Thanks guys. I ended up using Kaj's approach. Functionality like we discussed would be good if possible. On Saturday, 15 August 2015 06:16:09 UTC-4, Jeffrey Sarnoff wrote: What would like two lines of code to do with durations? On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
[julia-users] Sparse matrix with elements that are fixed-size dense matrices
I want to use sparse matrices in which the nonzeros are fixed-sized dense matrices. The matrix is of size m*p by n*q with nz nonzero blocks, each of size p by q. Generally p and q are very small but m, n and nz can be large. In a CSC representation of such a matrix, A, the A.colptr and A.rowval arrays are of lengths n+1 and nz, respectively, and A.nzval is a 3-dimensional array of size p by q by nz Does this type of structure appear elsewhere? I think I have seen descriptions in some sparse matrix packages of arrays like this where p and q might be stencil sizes. I'm fine with creating the structure and its methods myself but I also don't want to reinvent the wheel. Mostly I want to evaluate products of such matrices.
Re: [julia-users] JuliaCon 2015 videos
Next set: 1. Sebastien Martin: Taxi fleet simulation and visualization: http://youtu.be/MjERK9Xajrg?a 2. Bob Carpenter: Stan.jl - Statistical Modeling and Inference Made Easy: http://youtu.be/YdgMJ37CDws?a 3. Pontus Stenetorp: Suitably Naming a Child with Multiple Nationalities: http://youtu.be/MJzRf3Exlqc?a 4. Chiyuan Zhang: Mocha.jl - Deep Learning for Julia: http://youtu.be/ljySoebYylE?a 5. Kiran Pamnany and Ranjan Anantharaman: Multi-threading Julia: http://youtu.be/GvLhseZ4D8M?a 6. St. Louis University - Text Mining Research Group: TextMining.jl: http://youtu.be/dgfIIZ5yA4E?a 7. Zachary Yedidia: SFML.jl - Julia bindings for the Simple Fast: http://youtu.be/UKfM7EopMe0?a -viral On 15-Aug-2015, at 10:07 am, Viral Shah vi...@mayin.org wrote: One more batch posted: 1. Jacob Quinn: Composable streams for data transfer and processing - http://t.co/DPuN42F3Qu 2. Tanmay Mohapatra: Interfacing Julia with Complex systems using Protocol Buffers - http://t.co/Ddxj60KL7g 3. Eric Davies: Towards A Consistent Database Interface - http://t.co/vdQwFRp7aD 4. Viral Shah: The present and future of sparse matrices in Julia - http://t.co/WVQY89GsiT 5. Jake Bolewski: Staged programming in Julia - http://t.co/XlYl2XGB9O 6. Robert Moss: Julia as a Specification Language for the next-generation Airborne Collision Avoidance System - http://t.co/QJN2ZfP1ZI -viral On Friday, August 14, 2015 at 7:33:04 PM UTC+5:30, Viral Shah wrote: Here are the next batch of videos. There is a JuliaCon 2015 channel now: https://www.youtube.com/playlist?list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM This batch includes: David Sanders: Validated numerics in Julia - http://t.co/WRZcYGjhfl Patrick Sanan: Using Julia on a Cray Supercomputer - https://youtu.be/NwyKz2KLdtY Keno Fischer: Shaving the Yak - http://t.co/cEJqCqAdRC Spencer Lyon: Methods, Models, and Moments - Julian Economics with QuantEcon.jl - http://t.co/l0f5CH6k3u Randy Zwitch: Everyday Analytics and Visualization - http://t.co/7pbL7yd010 -viral On 13-Aug-2015, at 10:51 pm, Viral Shah vi...@mayin.org wrote: Folks, I am happy to announce that the videos are almost all ready, and I will start posting them in batches. I am starting with Jeff’s talk on our Youtube channel: https://www.youtube.com/user/JuliaLanguage Direct link to the video: https://www.youtube.com/watch?v=xUP3cSKb8sI -viral
Re: [julia-users] Problem building 0.4 on OSX 10.8.5 - error in signal-handling.c
This struct is supposed to be getting defined by signals-apple.c:11-12 ``` #define __need_ucontext64_t #include machine/_structs.h ``` I don't have a 10.8 system to test with however (Apple moved this header in 10.9). Can you take a look at that header (in /usr/include) and see if there is something other than `__need_ucontext64_t` that is required to get it to define the ucontext64_t? Also note, GitHub issues tracker would be a better places to post this question than julia-users. On Sat, Aug 15, 2015 at 10:38 AM Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: I'm encountering an error building 0.4 master. I did a complete clone/build after removing the julia directory. System is OSX 10.8.5. Error is: CC src/signal-handling.o In file included from signal-handling.c:62: ./signals-unix.c:40:72: error: use of undeclared identifier 'ucontext64_t'; did you mean 'ucontext_t'? bt_size = rec_backtrace_ctx(bt_data, MAX_BT_SIZE, (bt_context_t)((ucontext64_t*)context)-uc_mcontext64-__ss); ^ /usr/include/sys/_structs.h:227:26: note: 'ucontext_t' declared here typedef _STRUCT_UCONTEXTucontext_t; /* [???] user context */ ^ In file included from signal-handling.c:62: ./signals-unix.c:40:85: error: expected expression bt_size = rec_backtrace_ctx(bt_data, MAX_BT_SIZE, (bt_context_t)((ucontext64_t*)context)-uc_mcontext64-__ss); ^ 2 errors generated. make[1]: *** [signal-handling.o] Error 1 make: *** [julia-src-release] Error 2 Any help appreciated. Thanks, Adrian.
[julia-users] Re: How has the behavior of include/require etc. changed in 0.4?
Hmm. Too bad it didn't fix all the problems! I would guess you are hitting some strange bug in the automatic pre-compilation mechanism recently merged into Julia master. Disclaimer: this is all unfounded speculation, but here are my thoughts on what might be happening. It seems that until most (all?) packages choose to opt-in to precompiling (by putting `__precompile()__` before the declaration of their module) we might have issues loading packages with a large number of dependencies (like QuantEcon) where some have opted in an others haven't. On Saturday, August 15, 2015 at 8:07:09 AM UTC-4, Nils Gudat wrote: It seems to solve the issue regarding functions from base (upon checking, mean now has 70 methods after using QuantEcon), but the LoadError that's displayed in my original post persists. I guess that was expected though, given that it's unrelated to the problem of extending functions, and I don't think it'll keep me from using QuantEcon on 0.4. Thanks!
[julia-users] Problem building 0.4 on OSX 10.8.5 - error in signal-handling.c
I'm encountering an error building 0.4 master. I did a complete clone/build after removing the julia directory. System is OSX 10.8.5. Error is: CC src/signal-handling.o In file included from signal-handling.c:62: ./signals-unix.c:40:72: error: use of undeclared identifier 'ucontext64_t'; did you mean 'ucontext_t'? bt_size = rec_backtrace_ctx(bt_data, MAX_BT_SIZE, (bt_context_t)((ucontext64_t*)context)-uc_mcontext64-__ss); ^ /usr/include/sys/_structs.h:227:26: note: 'ucontext_t' declared here typedef _STRUCT_UCONTEXTucontext_t; /* [???] user context */ ^ In file included from signal-handling.c:62: ./signals-unix.c:40:85: error: expected expression bt_size = rec_backtrace_ctx(bt_data, MAX_BT_SIZE, (bt_context_t)((ucontext64_t*)context)-uc_mcontext64-__ss); ^ 2 errors generated. make[1]: *** [signal-handling.o] Error 1 make: *** [julia-src-release] Error 2 Any help appreciated. Thanks, Adrian.
[julia-users] Re: How has the behavior of include/require etc. changed in 0.4?
It seems to solve the issue regarding functions from base (upon checking, mean now has 70 methods after using QuantEcon), but the LoadError that's displayed in my original post persists. I guess that was expected though, given that it's unrelated to the problem of extending functions, and I don't think it'll keep me from using QuantEcon on 0.4. Thanks!
Re: [julia-users] Creating a bitmapped image with color bar
On Saturday, August 15, 2015 04:19:52 AM Andreas Lobinger wrote: Two things hit me: * Image.jl seems to be unstable (segfault in Pkg.build, sometime in using) Hmm, that's not my experience at all, so I'd definitely appreciate if you filed an issue. * afaics the code Maurizio is using, was your example in a previous discussion - is this a valuable test or has something changed on imwrite It's a valuable test. Is there another place where ImageCmap is used? I don't use them much, so it would be great if someone who needs them can pitch in and help improve the support. --Tim
Re: [julia-users] Creating a bitmapped image with color bar
Turns out this was a problem with PBM. imwrite isn't implemented for that format yet without ImageMagick. Check out the implementation of imread, though; we could turn it back on (https://github.com/timholy/Images.jl/pull/337) if you (or someone) wanted to provide the analog for imwrite. However, I got the same error as Andreas Lobinger; I'm not sure how you got the ImageMagick part of your error message. --Tim On Friday, August 14, 2015 06:54:19 AM Maurizio Tomasi wrote: Tim, does ImageCmap works with latest Julia? I cloned the latest Julia repository (0.4), added the Color, Images, and ImageView package and run this code (adapted from https://groups.google.com/forum/#!searchin/julia-users/%22ImageCmap%22/julia -users/T-i1JdwB4zk/f7FEsh4En4oJ but using PBM format in order not to rely on ImageMagick) with no avail. using Images, Color # build a sample image datafloat = reshape(linspace(0.5, 1.5, 6), 200, 300) # convert the raw 0.5:1.5 data to a integer type, so we can index dataint = iround(Uint8, 254*(datafloat - 0.5) + 1) # ranges from 1 to 255 # build our colormap b = RGB(0,0,1) w = RGB(1,1,1) r = RGB(1,0,0) cmaprgb = Array(RGB, 255) f = linspace(0,1,128) cmaprgb[1:128] = [(1-x)*b + x*w for x in f] cmaprgb[129:end] = [(1-x)*w + x*r for x in f[2:end]] img = ImageCmap(dataint, cmaprgb) imwrite(img,image.pbm) The error is the following: ERROR: MethodError: `mapinfo` has no method matching mapinfo(::Type{Images.ImageMagick}, ::Images.ImageCmap{Color.RGB{T:Union{AbstractFloat,FixedPointNumbers.FixedP ::oint}},2,Array{UInt8,2}}) Closest candidates are: mapinfo(::Type{Color.RGB{FixedPointNumbers.UfixedBase{UInt8,8}}}, ::Any) mapinfo(::Type{Color.AlphaColorValue{Color.RGB{FixedPointNumbers.UfixedBase{ UInt8,8}},FixedPointNumbers.UfixedBase{UInt8,8}}}, ::Any) mapinfo{CT:Union{Color.AbstractAlphaColorValue{C:Color.ColorValue{T},T:Re al},Color.ColorValue{T}}}(::Type{Color.RGB24}, ::AbstractArray{CT:Union{Color.AbstractAlphaColorValue{C:Color.ColorValue{ ::T},T:Real},Color.ColorValue{T}},N}) ... in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:585 in anonymous at /home/tomasi/.julia/v0.4/Images/src/io.jl:576 in open at iostream.jl:114 in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:573 in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:186 Before submitting any bug report, I would like to be sure I'm not getting something totally wrong. Maurizio. On Thursday, August 13, 2015 at 6:36:44 PM UTC+2, Tim Holy wrote: Images (on which ImageView is based) has an ImageCmap (= image colormap) type. You could play with it and see how far you get. Also, see the MapInfo section of http://timholy.github.io/Images.jl/function_reference.html. It's a crazy- powerful mechanism for on-the-fly changes in how data are mapped to screen pixels. --Tim On Thursday, August 13, 2015 05:44:16 AM Maurizio Tomasi wrote: Hi to everybody, I am the creator of Healpix.jl, a Julia package (https://github.com/ziotom78/Healpix.jl) which implements algorithms related to the Healpix sphere tessellation scheme (http://healpix.jpl.nasa.gov/). The Healpix scheme subdivides a sphere in patches (pixels) of equal area, and it is widely used in cosmology. I am writing to julia-user because I would like to implement visualization functions too, but I haven't figured out what is the best way to implement them. So far, I have used the Healpy (https://github.com/healpy/healpy) library as a reference for my implementation. Healpy wraps the original C++ Healpix library in a Python module. It uses Matplotlib to create plots of spherical projections. Internally, both the original C++ Healpix library and Healpy produce such plots by calculating a bitmapped representation of the projection: they convert each (x,y) point in the image plane into a normalized (u,v) coordinate, which is then spherically projected to a point on the sphere's surface. The value associated to the point on the sphere determines the color of the point at (x,y). Here are a few examples of typical Healpix maps: http://healpix.jpl.nasa.gov/images/skymaps/ecl53s.gif (Mollweide projection), http://healpix.sourceforge.net/html/plot_orthpolrot.png (Orthogonal projection). The algorithm is really easy to implement in Julia, but I cannot decide how to actually do the following: 1. How to interactively show the map by e.g. opening a window, or by displaying the image directly in a IJulia notebook? 2. The bitmap produced using this algorithm associates a scalar to each pixel, but one usually wants to convert such scalar through a color map in order to have a RGB value to be actually drawable. (I am interested in piecewise-linear maps). 3. When displaying the map, how to put a color
[julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
Thanks guys. I ended up using Kaj's approach. Functionality like we discussed would be good if possible. On Saturday, 15 August 2015 06:16:09 UTC-4, Jeffrey Sarnoff wrote: What would like two lines of code to do with durations? On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
Re: [julia-users] Creating a bitmapped image with color bar
It's also worth pointing out that since Color became parametric, it should be cmaprgb = Array(RGB{Float64}, 255) # or choose Ufixed8, Float32, ... rather than cmaprgb = Array(RGB, 255) With the latter you'll have poor performance. --Tim On Friday, August 14, 2015 06:54:19 AM Maurizio Tomasi wrote: Tim, does ImageCmap works with latest Julia? I cloned the latest Julia repository (0.4), added the Color, Images, and ImageView package and run this code (adapted from https://groups.google.com/forum/#!searchin/julia-users/%22ImageCmap%22/julia -users/T-i1JdwB4zk/f7FEsh4En4oJ but using PBM format in order not to rely on ImageMagick) with no avail. using Images, Color # build a sample image datafloat = reshape(linspace(0.5, 1.5, 6), 200, 300) # convert the raw 0.5:1.5 data to a integer type, so we can index dataint = iround(Uint8, 254*(datafloat - 0.5) + 1) # ranges from 1 to 255 # build our colormap b = RGB(0,0,1) w = RGB(1,1,1) r = RGB(1,0,0) cmaprgb = Array(RGB, 255) f = linspace(0,1,128) cmaprgb[1:128] = [(1-x)*b + x*w for x in f] cmaprgb[129:end] = [(1-x)*w + x*r for x in f[2:end]] img = ImageCmap(dataint, cmaprgb) imwrite(img,image.pbm) The error is the following: ERROR: MethodError: `mapinfo` has no method matching mapinfo(::Type{Images.ImageMagick}, ::Images.ImageCmap{Color.RGB{T:Union{AbstractFloat,FixedPointNumbers.FixedP ::oint}},2,Array{UInt8,2}}) Closest candidates are: mapinfo(::Type{Color.RGB{FixedPointNumbers.UfixedBase{UInt8,8}}}, ::Any) mapinfo(::Type{Color.AlphaColorValue{Color.RGB{FixedPointNumbers.UfixedBase{ UInt8,8}},FixedPointNumbers.UfixedBase{UInt8,8}}}, ::Any) mapinfo{CT:Union{Color.AbstractAlphaColorValue{C:Color.ColorValue{T},T:Re al},Color.ColorValue{T}}}(::Type{Color.RGB24}, ::AbstractArray{CT:Union{Color.AbstractAlphaColorValue{C:Color.ColorValue{ ::T},T:Real},Color.ColorValue{T}},N}) ... in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:585 in anonymous at /home/tomasi/.julia/v0.4/Images/src/io.jl:576 in open at iostream.jl:114 in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:573 in imwrite at /home/tomasi/.julia/v0.4/Images/src/io.jl:186 Before submitting any bug report, I would like to be sure I'm not getting something totally wrong. Maurizio. On Thursday, August 13, 2015 at 6:36:44 PM UTC+2, Tim Holy wrote: Images (on which ImageView is based) has an ImageCmap (= image colormap) type. You could play with it and see how far you get. Also, see the MapInfo section of http://timholy.github.io/Images.jl/function_reference.html. It's a crazy- powerful mechanism for on-the-fly changes in how data are mapped to screen pixels. --Tim On Thursday, August 13, 2015 05:44:16 AM Maurizio Tomasi wrote: Hi to everybody, I am the creator of Healpix.jl, a Julia package (https://github.com/ziotom78/Healpix.jl) which implements algorithms related to the Healpix sphere tessellation scheme (http://healpix.jpl.nasa.gov/). The Healpix scheme subdivides a sphere in patches (pixels) of equal area, and it is widely used in cosmology. I am writing to julia-user because I would like to implement visualization functions too, but I haven't figured out what is the best way to implement them. So far, I have used the Healpy (https://github.com/healpy/healpy) library as a reference for my implementation. Healpy wraps the original C++ Healpix library in a Python module. It uses Matplotlib to create plots of spherical projections. Internally, both the original C++ Healpix library and Healpy produce such plots by calculating a bitmapped representation of the projection: they convert each (x,y) point in the image plane into a normalized (u,v) coordinate, which is then spherically projected to a point on the sphere's surface. The value associated to the point on the sphere determines the color of the point at (x,y). Here are a few examples of typical Healpix maps: http://healpix.jpl.nasa.gov/images/skymaps/ecl53s.gif (Mollweide projection), http://healpix.sourceforge.net/html/plot_orthpolrot.png (Orthogonal projection). The algorithm is really easy to implement in Julia, but I cannot decide how to actually do the following: 1. How to interactively show the map by e.g. opening a window, or by displaying the image directly in a IJulia notebook? 2. The bitmap produced using this algorithm associates a scalar to each pixel, but one usually wants to convert such scalar through a color map in order to have a RGB value to be actually drawable. (I am interested in piecewise-linear maps). 3. When displaying the map, how to put a color bar under the map, like in the two links I provided above? I have had a look at ImageView, and it look ok for point 1. However, it seems to me that it is
Re: [julia-users] Re: Get time between two DateTime values in hours (and minutes if simple)
Yeah, it's forthcoming. I left it out originally just to be conservative in code and function, but it's come up enough that we should add it in for TimePeriods. A good up for grabs kind of PR if anyone's feeling up for it. -Jacob On Sat, Aug 15, 2015 at 10:59 AM, Ian Butterworth i.r.butterwo...@gmail.com wrote: Thanks guys. I ended up using Kaj's approach. Functionality like we discussed would be good if possible. On Saturday, 15 August 2015 06:16:09 UTC-4, Jeffrey Sarnoff wrote: What would like two lines of code to do with durations? On Friday, August 14, 2015 at 7:41:04 PM UTC-4, Ian Butterworth wrote: Trying to get the number of hours between these two dates (ideally x hours and y minutes), but can't figure out how to convert the duration variable into hours. The bottom line currently errors timein = 2015/8/13 10:19:50 timein2 = 2015/8/14 13:12:34 time_series[1] = DateTime(timein,/mm/dd HH:MM:SS) time_series[2] = DateTime(timein2,/mm/dd HH:MM:SS) duration = time_series[2]-time_series[1] Dates.Hour(duration)
Re: [julia-users] Re: Sumatra
Currently all works. Just to get a complete functionality is needed to implement the function find_dependencies() for Julia which is a Python function which looks for the packages and their version installed in Julia. Have you already tried sumatra? 2015-05-25 6:27 GMT-05:00 Magnus Lie Hetland m...@idi.ntnu.no: I haven't tried, but I've been looking for something along these lines, and might have a look at it. What have you tried, and what did not wor?-)