[julia-users] Re: [ANN] QuickTypes.jl: Concise type definitions with default arguments

2016-10-30 Thread Scott Jones
Maybe `@mutable` instead of `@qtype` or `@type`, to reflect Jeff's PR to change the `type` keyword to `mutable`, making the naming consistent On Tuesday, October 25, 2016 at 11:00:13 AM UTC-4, Cedric St-Jean wrote: > > Types are central to Julia programming, but the built-in `type` and >

[julia-users] Re: Please help me to convert a BitArray to a Integer array in Julia

2016-10-17 Thread Scott Jones
1) You should join us in the Gitter chatroom https://github.com/JuliaLang/julia, it actually can be a better place to get quick answers to simple questions like this than julia-users. 2) I tested with v0.4.5, and it worked fine for me. Show us (in the Gitter chat room) exactly what you did and

[julia-users] Re: Please help me to convert a BitArray to a Integer array in Julia

2016-10-17 Thread Scott Jones
Hmmm, I'd tried it on v0.4.7, and the second one did work, I'm surprised it failed in v0.4.5. To get the latest: http://julialang.org/downloads/ On Monday, October 17, 2016 at 8:54:12 AM UTC-4, Sujoy Datta wrote: > > he > Thank you, Tim and Scott. I am using version 0.4.5 and both of these >

Re: [julia-users] Please help me to convert a BitArray to a Integer array in Julia

2016-10-17 Thread Scott Jones
e true > > > julia> 1a > 3×2 Array{Int64,2}: > 0 0 > 1 0 > 0 1 > > > > On Monday, October 17, 2016 at 2:08:44 PM UTC+3, Scott Jones wrote: >> >> Tim, do you know if there is any difference in performance between the >> two methods?

Re: [julia-users] Please help me to convert a BitArray to a Integer array in Julia

2016-10-17 Thread Scott Jones
Tim, do you know if there is any difference in performance between the two methods? Note, Sujoy, the first method that Tim showed is only available on v0.5 and later (some of the nice stuff added to entice people to move off of v0.4.x to v0.5.x ;-) ) On Monday, October 17, 2016 at 5:48:20 AM

[julia-users] Re: What is really "big data" for Julia (or otherwise), 1D or multi-dimensional?

2016-10-17 Thread Scott Jones
On Friday, October 14, 2016 at 1:00:35 PM UTC-4, Páll Haraldsson wrote: > > On Thursday, October 13, 2016 at 7:49:51 PM UTC, cdm wrote: >> >> from CloudArray.jl: >> >> "If you are dealing with big data, i.e., your RAM memory is not enough >> to store your data, you can create a CloudArray from

[julia-users] Building v0.6 fails on Mac OS X (recent change, within last day or so)

2016-08-20 Thread Scott Jones
Has anybody else come across this? I am no longer able to build from master due to this: CC src/jltypes.o In file included from /j/julia/src/jltypes.c:16: In file included from ./julia_internal.h:465: In file included from /j/julia/usr/include/libunwind.h:25: In file included from

[julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-16 Thread Scott Jones
Symbols are interned, so that for a given string value of a symbol, there is only one copy. There will only be memory allocations if the symbol is not already present in Julia's symbol table. If you have many dictionary structures that use mostly the same set of keys, then symbols work quite

[julia-users] Re: Numer of ones in bitstype

2016-08-13 Thread Scott Jones
Do you want the least significant 1 bit set? Then use trailing_zeros(x). (I use that a lot for packing floating point values, which are right justified in the word (if you consider the msb as being the rightmost bit). If you want the most significant 1 bit set, then leading_zeros(x) (which

[julia-users] Re: Is there a way to reclaim memory?

2016-08-03 Thread Scott Jones
I almost think that you may need to come up with your own structure, instead of a Vector of Vectors, to avoid the problems you are having. The nice thing about Julia, you'd be able to make your own data structure <: AbstractArray, and be able to use it with many Julia functions. For example,

Re: [julia-users] ANN: steps towards 0.5.0 release [candidates]

2016-07-15 Thread Scott Jones
I agree, and it does seem there is a bit of a problem with the nomenclature that the Julia team is using, which doesn't match industry wide practice. At least the first Julia release candidate is really just a beta release (i.e. after a feature freeze and branch off of current development), as

Re: [julia-users] More on Macros

2016-07-09 Thread Scott Jones
Is there any hope of #6910/#10940 getting in, maybe early in the v0.6 release cycle? Having bruised my brain more than once with the current macro rules and when to use esc() or not, it would be very nice to see macro hygiene really cleaned up before v1.0, and doing it early in the v0.6 cycle

Re: [julia-users] indexing over `zip(collection1, collection2)`

2016-07-09 Thread Scott Jones
I've found it very useful, even if it is O(n) complexity to get the n-th element, to allow indexing. For a database, if you have a packed record (for example, like SQLite's row format), and you only need to access a single field, it's better to be able to do just that, and *not* have to unpack

Re: [julia-users] hashing floating point zeroes

2016-07-09 Thread Scott Jones
At least Unums (1.0) and Arbs don't have that annoying asymmetry of IEEE floating point, you have exact zero, or inexact pos or neg "really small close to zero" in Unums, or zero with a radius of 0, or a 0 with radius that can be *quite* small around zero (+/-), or something that can be as

Re: [julia-users] When Julia v1.0 will be released?

2016-07-08 Thread Scott Jones
nks to Tim Holy's wonderful (as always) contributions. Great stuff, that will cut down a lot of complaints about only having 1-based, column major arrays in Julia. On Friday, July 8, 2016 at 10:10:52 AM UTC-4, Daniel Carrera wrote: > > > On Friday, 8 July 2016 16:01:25 UTC+2, Scott Jo

Re: [julia-users] When Julia v1.0 will be released?

2016-07-08 Thread Scott Jones
Actually, the blog post from StaffJoy ( https://blog.staffjoy.com/retro-on-the-julia-programming-language-7655121ea341#.35atllel3) never said that it turned out to be a mistake, in the conclusion they said: > The Julia language helped to create Staffjoy and turn it into a business, > and for

[julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-19 Thread Scott Jones
@yuyichao made the following comments in #16999: I think Scott has a point No he doesn't and never did. who needs to understand the precise rules for deepcopy. I'll never make the mistake of wasting my time arguing with SPJ (edit: > sorry, mistyped as SGJ just now) again but I certainly

[julia-users] Re: Deepcopy of BigInt and BigFloat (#16999)

2016-06-18 Thread Scott Jones
@rfourquet commented in #16999: > I don't have any example where this would be an issue, and honestly I > didn't think to much about this problem, I just thought it looked safer (so > I step back!). I myself have occasionally used x+0 to get a "deep copy" > of a BigInt x. But @yuyichao

[julia-users] Deepcopy of BigInt and BigFloat (#16999)

2016-06-18 Thread Scott Jones
I'm concerned about the performance implications of PR #16999, which makes a copy any BigFloats or BigInts when doing deepcopy. The rationale for doing so is that somebody might bypass the BigInt and BigFloat types, and directly operate on their GMP/MPFR internals. A few comments here (since I

[julia-users] Re: FFT speed much slower than Octave

2016-06-17 Thread Scott Jones
Your processor can handle 4 simultaneous threads with HyperThreading. What are your results if you try setting the number of threads to 4? Do you know how many threads Octave uses for FFTW on your machine? -Scott On Friday, June 17, 2016 at 3:01:45 PM UTC-4, Logan Williams wrote: > > Followup:

[julia-users] Re: Custom string escaping in docstrings

2016-06-15 Thread Scott Jones
I think that the docstring system is looking for a normal string, not a string with any string macro. You can get around this by using the `@doc` macro directly, i.e. @doc R""" My docstring $a+\alpha$ """ -> function myfunc() end works fine. On Wednesday, June 15, 2016 at 7:51:27 PM UTC-4,

Re: [julia-users] Re: Can I somehow get Julia without standard library?

2016-06-14 Thread Scott Jones
understanding of how Julia works, that doesn't seem too > difficult. But maybe someone could chime in on why it would be almost > impossible, or if it's on the horizon? > > On Tuesday, June 14, 2016 at 7:23:46 AM UTC-7, Scott Jones wrote: >> >> You should try out my &qu

Re: [julia-users] Re: Can I somehow get Julia without standard library?

2016-06-14 Thread Scott Jones
You should try out my "lite" branch of Julia, I got it back in sync with master yesterday, made sure it still passed the unit tests, etc. https://github.com/ScottPJones/julia/tree/spj/lite I don't think it's so black and white as Avik and Stefan have made it seem. My lite branch takes less than

[julia-users] ANN: Updated "lite" branch of Julia

2016-06-13 Thread Scott Jones
Since people have been looking at paring down the size of Julia recently, I went back and made sure my "lite" branch ( https://github.com/ScottPJones/julia/tree/spj/lite) of Julia was sync'ed with master, as that as had quite a lot of changes recently. Here is some information comparing the

[julia-users] Re: Excessive memory allocations in for loop

2016-06-08 Thread Scott Jones
One minor thing, I noticed what looks like a bug in the code: the initial setting of q[1,1:4] I think should really be q[1:4,1], otherwise it isn't consistent with setting q[:,iStep] in the loop. I rewrote the function, so that it has only 7 allocations (independent of nPoints), and is about 9

Re: [julia-users] Re: Memory corruption when using BigFloats

2016-06-07 Thread Scott Jones
Thinking further, since BigFloats are treated by convention as being immutable (the same as for strings), it would work to simply have `deepcopy(x::BigFloat)` return x, the same as `copy(x::Number)` returns x. -Scott On Tuesday, June 7, 2016 at 6:35:41 PM UTC-4, Scott Jones wrote: > >

Re: [julia-users] Re: Memory corruption when using BigFloats

2016-06-07 Thread Scott Jones
,0x6f702323,0x32363923,0x696c0030,0x6f635f61,0x335f7970,0x00343230] > > > >>>>> > >>>>> Other than that, it's hard to share since if it hits the REPL in > any > >>>>> way (printing, or default displaying) it segfaults. I only found &

[julia-users] Re: Memory corruption when using BigFloats

2016-06-07 Thread Scott Jones
t has >>>>> them on Windows (on Linux Python just throws an error). If a Julia Dev >>>>> wants to take a look at it in more detail I'll give them temporary access >>>>> to the branch. >>>>> >>>>> Otherwise I'll keep t

[julia-users] Re: Memory corruption when using BigFloats

2016-06-07 Thread Scott Jones
y might have been incorrectly freed (and then reallocated), or for something to store something to a location it doesn't really own. Scott On Tuesday, June 7, 2016 at 12:58:23 PM UTC-4, Pablo Zubieta wrote: > > Do you happen to have a minimal reproducible example? > > On Tuesday, Jun

[julia-users] Memory corruption when using BigFloats

2016-06-07 Thread Scott Jones
I've been trying to help @ChrisRackaukus (of DifferentialEquations.jl fame!) out with a nasty bug he's been running into. He is using `BigFloat`s, and keeps getting numbers that, when printed, cause an MPFR assertion failure. When I looked at these corrupted `BigFloat`s, I found the following

Re: [julia-users] Re: Can I somehow get Julia without standard library?

2016-06-07 Thread Scott Jones
hether this is something you'd be interested in, but Scott > Jones has worked on building a Julia "lite" version with fewer components: > https://groups.google.com/forum/?fromgroups#!searchin/julia-users/raspberry$20pi/julia-users/WStpLtrKiFA/JhiAbc-vAwAJ >

Re: [julia-users] Re: Uniform syntax

2016-06-05 Thread Scott Jones
I think it may just boil down to being a historical artifact - until recently (and only in v0.5, AFAIK), macros were handled rather differently from functions. Now that macros actually act like functions, and have different methods (of course limited to types known at parse time, symbols,

[julia-users] Re: Help creating user-defined types and constructors

2016-06-04 Thread Scott Jones
You might also want to think about using BitVectors to store the information about whether a person was infected, vaccinated, or deceased (which would take only 3 bits per person), and then you could easily perform operations to find out the number of people infected, etc. using the bit

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Scott Jones
Good catch! I'd already added returning bar to my parameterized Julia version, comparing the two now on my machine, they are essentially identical in performance. Still, writing 1/3 the code (and having it much more readable), having generic code that would also work for complex, integer,

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Scott Jones
Is that last timing correct? That's 10x faster than I get. My version of the Julia code (I parameterized it, so that it doesn't have to be Float64, could be complex, integer, rational, decimal float, whatever floats your boat!) function foo{T<:Number}(array1::Matrix{T}, array2::Matrix{T},

[julia-users] Re: What is the difference between bitwise and logical operators?

2016-05-30 Thread Scott Jones
The && and || operators are conditional, as in other languages. The second operand is not always evaluated.

[julia-users] Re: many-way arrays cause unexpected heap allocation

2016-05-28 Thread Scott Jones
On today's v0.5, the breaking point is between 6 and 7 indices. I did some more benchmarking to see if the code above suffers from cache line issues (because it is iterating over the array in row-major order, and Julia prefers column-major order). Current Intel chips have a 32KB L1 data cache

Re: [julia-users] Re: Congratulations to Keno

2016-05-28 Thread Scott Jones
The news that you are now gainfully employed by Julia Computing is probably the best news for all Julians! (they would have to have been really stupid to let you go elsewhere [if you weren't continuing your education], and we all know they are geniuses!) Congrats again for your mouthfuls (AB,

Re: [julia-users] Re: Congratulations to Keno

2016-05-27 Thread Scott Jones
Hmmm, now I suspect (and hope!) he'll just start procrastinating on his *next* degree (unless they decided to just give him a bloody Ph.D. already, forget B.S.!) by continuing to do great things for Julia ;-) He deserves congratulations all the time, but it's nice to hear his academics haven't

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-27 Thread Scott Jones
OK, since the syntax is now being accepted, I thought it must have been merged already. (will it be merged soon?) Thanks!

[julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-27 Thread Scott Jones
Unfortunately, even though the return type assertion syntax is accepted, it is broken: *julia> **compute_val(1)* *ERROR: ArgumentError: typeassert: too few arguments (expected 2)* * in compute_val(::Int64) at ./REPL[2]:1* * in eval(::Module, ::Any) at ./boot.jl:225* * in macro expansion at

[julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-27 Thread Scott Jones
That could be handled by add `::String`, as a return type assertion, right? (also helping readability / maintainability of the code, IMO) On Thursday, May 26, 2016 at 2:52:53 PM UTC-4, Kristoffer Carlsson wrote: > > Not completely related but I have had the following happen a few times: > >

Re: [julia-users] Re: Congratulations to Keno

2016-05-27 Thread Scott Jones
What happened? Did they decide to give him a B.S., M.S. and Ph.D. all at once? ;-) I always wonder how he has any time for classes, given all the time he spends on Julia! On Friday, May 27, 2016 at 12:40:24 AM UTC-4, Jeff Bezanson wrote: > >

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Scott Jones
It *is* also a very generous language ;-) It gives us very nice facilities for writing performant code generically in rather few LOC - that seems generous to me! On Thursday, May 26, 2016 at 11:34:43 AM UTC-4, Ford Ox wrote: > > :-D :-D :-D > > add generous language: I have meant general

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Scott Jones
Jeff has already answered that it is not intended to be only a scientific language, at his thesis defense, and reaffirmed that just two nights ago at a talk. If I can state the case correctly, they felt that if they made the best scientific/numeric/technical language, which was a much harder

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Scott Jones
Hmm, I use the long function form whenever the function is over 2 (at most 92 char) lines, so I disagree strongly that just because it uses the function form, it is inherently "non-functional". foo(a) = "fits on one line" bar{maybe_many_parameters}(lots_of_long_arguments) = "too long for

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Scott Jones
So, another type could be added, say `Nothing` (currently deprecated) that converts everything to nothing without error. That would not be a special case then, right? There are a lot of other decisions in Julia that were made for pragmatic reasons - I think indicating that `nothing` should

Re: [julia-users] Julia implementation

2016-05-25 Thread Scott Jones
>From my own experiences, while I do believe rewriting it in C would make it faster, a much better option would be to adapt JuliaParser.jl. Last year right when I first started with Julia, I thought I'd need to implement most of code that was performance critical (at least for me) in C, and

Re: [julia-users] Re: Julia large project example.

2016-05-24 Thread Scott Jones
What effect does that have on performance? (Of course, I want to have my cake and eat it too!) On Tuesday, May 24, 2016 at 4:03:50 AM UTC-4, Ford Ox wrote: > > A little bit more on the topic of encapsulation, if somebody desperately > wants it. > > module... > export... > type Foo x end >

[julia-users] Re: Let's Bridge the IRC and Gitter

2016-05-24 Thread Scott Jones
Yes, big thanks to Lyndon for setting that test up, it worked very well! I'd seen it used in Gitter chat room https://gitter.im/codeforscience/community, which I strongly recommend to Julians interested in open data science initiatives, there are already a few Julians hanging out there.

Re: [julia-users] Keyword chaining

2016-05-24 Thread Scott Jones
Unless that's something added in later C standards, I'm pretty sure C doesn't have that (as Stefan stated, the case below is simply that an `if` or `else` can have a single statement (`{statements ... }`) being a block statement). Julia does support what you are talking about, but only (AFAIK)

[julia-users] Re: Matrix multiplication performance with BitMatrix, Matrix{Bool}, Matrix{Int8}

2016-05-17 Thread Scott Jones
Couldn't these be optimized (at least on Intel) by some of the AVX mask instructions? At least on 64-bit platforms, BitArrays use 64-bit chunks, and I think that would work well with the AVX-512 KAND instruction. I'm not sure what support LLVM has though to use those newer instructions. Even

Re: [julia-users] LQ decomposition.

2016-05-17 Thread Scott Jones
Somebody recently requested an answer from me to do solve a problem in C++ (which did turn out to be homework) on SO, so instead of answering it, I gave a trivial four line (and much easier to read) solution in Julia ;-) (and said that was an example of why I no longer wanted to program in

[julia-users] Re: Julia Utopia: Share your tips and tricks to efficient coding in Julia

2016-05-16 Thread Scott Jones
I'll also take a stab at this. For context, I've been programming in Julia full time for the last 13 months, as well as mentoring a couple of my colleagues using Julia, and have contributed to various parts of Julia (string conversions, unit tests, documentation, among other things). * I use

Re: [julia-users] limiting println() precision using defaults or decorators

2016-05-14 Thread Scott Jones
On Friday, May 13, 2016 at 7:48:54 PM UTC-4, Tom Breloff wrote: > > Check out the Formatting package, as well as the spin-off > https://github.com/ScottPJones/StringUtils.jl Thanks for the tip of the hat, and right back at you! People should be aware, that some of the best parts of the

Re: [julia-users] Re: Julia large project example.

2016-05-12 Thread Scott Jones
Very good advice - is anything like it already in the Julia docs? If not, it should be added, up near the beginning. On Thursday, May 12, 2016 at 4:10:22 PM UTC-4, Tom Breloff wrote: > > I find the most valuable thing to do when designing julia code is to focus > purely on "verbs", not

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-10 Thread Scott Jones
issing a exclamation point. 'plot' creates a new figure, > and 'plot!' modifies a figure. If there's not a Plot object as the first > argument it will implicitly insert the currently active figure, so the > command is essentially 'plot!(current(), ...)' > > On Tuesday, May 10, 2016,

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-10 Thread Scott Jones
The code and input CSV file are now on GitHub as public gists: (the code is not as fancy as yours, Alex knows how to do for loops and ifs, and has learned about creating and pushing to vectors, but not all that fancy stuff that even I didn't know ;-) )

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-10 Thread Scott Jones
m on dev)... I > can't ever remember when I implemented anything. > > On Mon, May 9, 2016 at 10:24 AM, Scott Jones <scott.pa...@gmail.com > > wrote: > >> My son Alex is building on what he did last year for his science project, >> where he used Julia to help do the c

[julia-users] Re: Is there a function/macro that shows the line number where it is called?

2016-05-10 Thread Scott Jones
Mike Innes just helped us come up with a neat little hack, that let me capture the file and line # info in a macro (it really *shouldn't* require a hack though, something needs to be done to fix #9577). _lin(a::Expr) = a.args[2].args[1].args[1] _fil(a::Expr) = string(a.args[2].args[1].args[2])

Re: [julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Scott Jones
On Monday, May 9, 2016 at 11:09:27 AM UTC-4, Tom Breloff wrote: > > I haven't ever needed to plot > > > Wh---whaaat?? ;) > Yeah, seriously! Give me Emacs (or something with good Emacs bindings+extensibility), a C/C++ compiler (now Julia), and a debugger, and I'm a happy man. ;-) I think all

[julia-users] Hopefully simple plotting question (for my 9 yr old son's science project!)

2016-05-09 Thread Scott Jones
My son Alex is building on what he did last year for his science project, where he used Julia to help do the calculations on the data he'd collected (basically, he's lazy [in a good way], he'd rather work with his dad to learn how to program something rather than do all all the basic arithmetic

[julia-users] Re: [ANN] Book: Julia High Performance

2016-05-04 Thread Scott Jones
Very well written, IMO. I'm halfway through it, and have already recommended that they buy a few copies for the Dynactionize Belgium (Antwerpen), India (Kochi), and Spain (Barcelona) offices (I think it will save me a lot of time answering performance questions about Julia!) Kudos to Avik! On

[julia-users] Re: [ANN] Major Breaking Release/Overhaul for ODBC.jl

2016-05-04 Thread Scott Jones
This is absolutely wonderful! You should also point out that this fixes a number of string encoding issues. Along with the NUMERIC/DECIMAL type support, better architecture, more complete testing, it really has made great strides! -Scott

Re: [julia-users] Re: Trouble with parametric parts of a type def

2016-04-29 Thread Scott Jones
I constantly run into cases where triangular dispatch would be very useful in our work. Ever since Jeff's talk at JuliaCon 2015, I've been hoping for the improved type system work (which seemed fairly complete, with working code in examples). Any hope of that making it into v0.5? If not, what

Re: [julia-users] Re: Mathematical Computing course in Julia

2016-04-17 Thread Scott Jones
On Saturday, April 16, 2016 at 6:57:51 AM UTC-4, Tim Holy wrote: > > I agree line numbers have been a persistent problem in julia. In a > language > that inlines as aggressively as julia, and uses macros and metaprogramming > to > generate code, it's not a trivial problem---in some cases you

[julia-users] Re: Int or Int64

2016-04-13 Thread Scott Jones
There is no Float, you should use Float32 or Float64 depending on precision needed for your application. I'd definitely use Int instead of Int64 as long as Int32 will be large enough, to avoid performance issues on 32-bit machines. (I build and use Julia on my 32-bit ARM based Raspberry Pi) On

Re: [julia-users] Creating new globals

2016-04-12 Thread Scott Jones
The syntax to make an empty generic function wasn't added until v0.4, so that may be why older code uses global. On Tuesday, April 12, 2016 at 8:05:36 AM UTC-4, Didier Verna wrote: > > Mauro wrote: > > > If I understand correctly, you argue that all global bindings should

Re: [julia-users] Fast multiprecision integers?

2016-04-08 Thread Scott Jones
I like very much the idea of a discriminated union - that would help enormously with some of the stuff I work on. On Friday, April 8, 2016 at 8:47:59 AM UTC-4, Erik Schnetter wrote: > > Laurent > > I'm afraid you can't use `reinterpret` with a type such as `BigInt`. > > I think what you want

Re: [julia-users] overflow behavior

2016-04-05 Thread Scott Jones
What if numeric literals acted the same way as irrational numbers like pi, and automatically adapted to the environment where they are used? I know that that sort of rule would have made a lot of the bit twiddling code a lot simpler than having to worry that 0xff and 0x1ff, or

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Scott Jones
rough all of the packages in METADATA.jl - it's quite a lot). That's why I'd still like to see *some* easy to type two character ASCII sequence for integer division (and I think others would also prefer that to using \div (or whatever you have to do in your editor) or div(a, b) all the time).

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-04 Thread Scott Jones
On Monday, April 4, 2016 at 7:27:40 AM UTC-4, Stefan Karpinski wrote: > > Number does not imply or assume commutativity. The Quaternions package > provides a Quaternion type which is a subtype of Number. Rational, however, > only allows integer numerators and denominators. Since integer >

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-04 Thread Scott Jones
On Sunday, April 3, 2016 at 12:09:35 PM UTC-4, Tim Holy wrote: > > Indexing with // is a bit undesirable because 6//3 gets simplified to 2//1 > upon > construction, and there's no reason to pay the cost of that operation. > That was Eric's idea - I was strictly talking about integer

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-04 Thread Scott Jones
On Sunday, April 3, 2016 at 12:20:44 PM UTC-4, Stefan Karpinski wrote: > > I question the alleged ubiquity of integer division. This is not an > operation I find myself needing all that often. Of course, everyone's > programming needs are different, but I just don't find myself wanting the >

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-03 Thread Scott Jones
reat plus for many people. What do you think about adding \\ as an integer division operator to Julia? On Sunday, April 3, 2016 at 10:09:16 AM UTC-4, Stefan Karpinski wrote: > > On Sun, Apr 3, 2016 at 8:50 AM, Scott Jones <scott.pa...@gmail.com > > wrote: > >> Yes, Pyt

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-03 Thread Scott Jones
Yes, Python3 did switch from 1/2 returning a float, but Python3 still is having major problems with acceptance from the Python community, so I don't think that's the best example to use. It is a bit of a mess when you look at a number of languages. Python2 Python3 Lua Julia CC++

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-03 Thread Scott Jones
For some reason, my posts are getting sent prematurely! Continuing: Since the integer division operator // of Python (2&3) and Lua already means something important in Julia, and \ is also taken, I'd like to propose \\ as an integer division operator for Julia. Having to always type \ d i v

[julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-02 Thread Scott Jones
Oops, somehow my reply got sent before I finished it! About the division: I do think that Julia is not consistent with the / operator. Other operators almost always return something of the same type. While there is the Unicode character ÷ operator, which does integer division, that's a pain

[julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-02 Thread Scott Jones
I feel your pain, those two items have been a pain for me and my colleagues, however, I think Julia is such a flexible language that I have high hope that both 0-based vs. 1-based indexing and the difference between row-major vs. column-major can be handled in a generic fashion, and as Tony has

Re: [julia-users] Formatting comma thousands separator

2016-03-23 Thread Scott Jones
t, I noted that in your package that you renamed fmt to cfmt. > Is the "c" in "cfmt" to represent c-style formatting? If so then I think > it should be pyfmt for python-style formatting. > > Since there are many "styles" emerging for formatting, would it b

Re: [julia-users] Formatting comma thousands separator

2016-03-15 Thread Scott Jones
present c-style formatting? If so then I think > it should be pyfmt for python-style formatting. > > Since there are many "styles" emerging for formatting, would it be worth > considering names to reflect the style? > > cfmt = sprintf1 > format (with keyword arguments)

[julia-users] Re: Transpiling Julia to C – The LLVM CBackend

2016-03-14 Thread Scott Jones
Really cool stuff guys! Kudos all around! I think this might work well in conjunction with the "julia-lite" branch I've been working on (given the lack of "tree-shaking"). On Thursday, March 10, 2016 at 4:43:18 PM UTC-5, Jameson wrote: > > We at JuliaComputing have resurrected the LLVM CBackend

Re: [julia-users] Formatting comma thousands separator

2016-03-14 Thread Scott Jones
Thanks Tom! In order to do this with my package (which uses Tom's nice PR on top of the Formatting package), you could do the following: val = 123456789 fmt_default!(Integer, :commas) println(u"This is a lot of money: $\%(val)") (note that $ does not need to be quoted, because I use

[julia-users] Re: Basic Information

2016-03-10 Thread Scott Jones
1) I'd strongly recommend watching the intro video by @dpsanders from JuliaCon 2015. https://www.youtube.com/watch?v=gQ1y5NUD_RI=3=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM 2) If you have a lot of experience in some other language, maybe read first the

[julia-users] Re: What to read to understand finishing v0.5?

2016-03-09 Thread Scott Jones
I'm curious about the when the following change will make it into v0.5, originally it was said that it would be done early after v0.4 split off of master: *julia> **a = [[1],[2],[3]]* *WARNING: [a,b,...] concatenation is deprecated; use [a;b;...] instead* in depwarn(::ASCIIString, ::Symbol)

[julia-users] Re: String interpolation question

2016-03-09 Thread Scott Jones
If you're interested, try out what I was working on in https://github.com/ScottPJones/StringUtils.jl/pull/1, combination of Swift style interpolation, Emoji, LaTex and Unicode character literals, and in-line formatting for interpolated expressions. On Wednesday, March 9, 2016 at 8:59:47 AM

[julia-users] Possible bug with do syntax

2016-03-06 Thread Scott Jones
d = Dict(:a=>1,:b=>2) r = get(d, :c) do ; 3 ; end gets an error: *ERROR: syntax: unexpected ;* * in eval(::Module, ::Any) at ./boot.jl:267* but: r = get(d, :c) do 3 end works.

[julia-users] Re: Different field type depending on parameter value

2016-03-01 Thread Scott Jones
I've been running into the same issue myself recently, thanks for all the exploration here of the different ways of attacking the problem. In my case, I need the type of a vector to change, i.e. from UInt8, UInt16,... up to UInt64, depending on the data, so unlike your case, I can't use

[julia-users] C REPL for Keno's Cxx.jl?

2016-02-25 Thread Scott Jones
At JuliaCon 2015 this last summer, after seeing Keno's presentation on Cxx, some of us were talking about how it would be nice to also have a simpler C REPL for Julia, just like his C++ REPL in Cxx.jl. People even said that having the C REPL like that would even be something they'd be happy to

[julia-users] Re: New Database Package -- Postgres

2016-02-20 Thread Scott Jones
Great to have some more database support added! I look forward to using this! On Friday, February 19, 2016 at 6:32:54 AM UTC-5, N Carson wrote: > > Just published a new Postgres adapter for Julia! > > https://github.com/NCarson/Postgres > > It is fairly complete but not well tested or optimized.

Re: [julia-users] @generated function cumulative definition

2016-02-20 Thread Scott Jones
Very nice example, showing both the benefits of Isaac's macros, and of using generated functions in general. I was wondering, because of the column major nature of Julia, should the order of the loops be changed? i.e. for A and B, it is changing the columns more rapidly than the rows, only

[julia-users] Re: @generated function cumulative definition

2016-02-20 Thread Scott Jones
That's very impressive! Having recently been trying to understand the intricacies of generated functions, this really does seem to improve ease-of-use and readability. Kudos! On Saturday, February 13, 2016 at 12:17:14 AM UTC-5, Isaac Yonemoto wrote: > > As generated functions are right now,

Re: [julia-users] Bug #15077 still present

2016-02-20 Thread Scott Jones
I've now come up with a test case, and it shows the bug is actually worse than I'd originally thought, and it can definitely happen for wrapped-around keys. I've also included the version of dict.jl from my spj/maxprobe, which both fixes the bug, and improves performance, by keeping track of

[julia-users] Re: Growth patterns of programming languages developed at Github

2016-02-20 Thread Scott Jones
Very interesting stuff! Do you have any statistics on churn among contributors? i.e. people who come, make one or two contributions, but then never show up again? I think retention of contributors might be more important that acquistion of contributors. About the chart for Swift, that seems

Re: [julia-users] Unitful.jl for physical units

2016-02-19 Thread Scott Jones
On Friday, February 19, 2016 at 10:31:07 AM UTC-5, Tom Breloff wrote: > Jeffrey: I love trying to figure out what you're saying... it's a good > replacement for a daily crossword puzzle. :P > Yes, I second that! I always found Jeffrey's language quite refreshing, but then again, I'm

[julia-users] Pre ANN: interpolated formatting for string literals

2016-02-19 Thread Scott Jones
This is really a pre-announcement, just something I whipped up this afternoon, that I've added to my StringUtils.jl package, as a WIP PR: https://github.com/ScottPJones/StringUtils.jl/pull/1 I've pulled in the code from Tom Breloff's very nice PR #10 on JuliaLang/Formatting.jl, so that now, in

[julia-users] Bug #15077 still present

2016-02-17 Thread Scott Jones
I just wanted to warn people that the bug in #15077 is still present, there is a small bug in the change #15096 that Jeff merged yesterday. Line 536 of dict.jl: if index - index0 > maxprobe should be if ((index - index0) & (newsz - 1)) > maxprobe instead, to correctly handle wrapping around the

[julia-users] Re: Unitful.jl for physical units

2016-02-17 Thread Scott Jones
Is there anything to convert to/from Julia's UT seconds (which are tied to the Earth's rotation), and SI seconds? On Friday, February 12, 2016 at 3:23:22 PM UTC-5, Andrew Keller wrote: > > I'm happy to share a package I wrote for using physical units in Julia, > Unitful.jl

[julia-users] Re: julia on ARM for a drone

2016-02-16 Thread Scott Jones
What do you really need in Julia on the drone? You might be interested in the branch of Julia I'm maintaining, in https://github.com/ScottPJones/julia/tree/spj/lite, where I've attempted to cut out as much as possible from Base, while still having a useful version of Julia. (I've been building

Re: [julia-users] Strange failure running test/unicode/utf8code.jl

2016-02-15 Thread Scott Jones
t; Reported here https://github.com/JuliaLang/julia/issues/15072 > > On Sat, 2016-02-13 at 22:33, Scott Jones <scott.pa...@gmail.com > > wrote: > > I'm seeing a very strange failure recently (within the last week), where > > running "test/runtests.jl" se

  1   2   3   4   5   >