(this
> <https://github.com/JuliaLang/julia/blob/master/base/mpfr.jl#L229> line
> for example). I ended up writing a minimal implementation of an
> AbstractNumber type, and so far it worked out pretty well.
>
> W dniu wtorek, 19 kwietnia 2016 15:17:31 UTC+2 użytkownik Daan
I second that - overwriting the conversion worked very well for me while
debugging some time ago. If you throw an error, you get the exact line
number where it happened:
Base.convert(::Type{BigFloat}, x::Float64) = throw(InexactError())
One case to watch out for, which I only found in my code
Wow, this trick to add CartesianRange's (or other
isbits-immutable-iterators I guess) without allocation was very good to
learn about, thanks a lot!
Pending more efficient views, this is very helpful to me as well.
I have recently given a Julia introduction to a group of numerical analysts
at the university of Leuven, Belgium. For this, I have written a set of
notebooks, and they are available here:
https://github.com/daanhb/Julia-tutorial
The goal of the tutorial is not to survey syntax and features of
he very core of Julia. Thanks again...
>
> On Thursday, November 5, 2015 at 4:47:10 AM UTC-5, Daan Huybrechs wrote:
>>
>> I have recently given a Julia introduction to a group of numerical
>> analysts at the university of Leuven, Belgium. For this, I have written a
>>
Hi Scott
Thanks for your comments. You have a point, and I probably overdid it in
the tutorial when I stressed that adding types is only for dispatch. It can
also have documentation value and indeed may help to catch errors - nothing
wrong with that. I will rephrase it later. The main thing I
Hi Magnus
*macro fac(n)*
*:($(factorial(n)))*
*end*
That will do, yes - many thanks for your message!
I don't think I've grasped macros very well before. Actually, I still
don't, but one useful thing I've learned at least about generated functions
from this and other examples is
and let LLVM do it's thing?
-viral
On 29 May 2015 9:27 pm, Daan Huybrechs daan.hu...@gmail.com
wrote:
On the other hand, building with the LLVM binaries from llvm.org does
still work on a Pi 2 to get a working REPL - I just tested that with
gcc-4.9 and LLVM 3.6.1 today
On the other hand, building with the LLVM binaries from llvm.org does still
work on a Pi 2 to get a working REPL - I just tested that with gcc-4.9 and
LLVM 3.6.1 today.
Daan
Hi Robert
versions 2 and 3 were the alternatives that I was also looking at. Just
seems to be lacking in elegance.
Is there anything that the call() syntax can provide?
Agreed about elegance, it seems a bit overkill.
I'm not sure what you're thinking off with call(). Another
At the risk of being redundant, I would like to say a bit more, because I
remember struggling with similar constructions at first - please forgive my
lecturing :-)
Say you do include T as a parameter for Bar, then there are still several
ways to proceed. The following seems to make syntactical
Trying to grasp staged functions in Julia 0.4, I found the new documentation
https://github.com/JuliaLang/julia/pull/10673 and this issue
https://github.com/JuliaLang/julia/pull/7474 very helpful. (Note from the
issue that the syntax may still change from `stagedfunction` to, perhaps,
Thanks, Seth, that example looks even stranger than what I encountered.
I have suggested adding a short paragraph to the manual:
https://github.com/JuliaLang/julia/pull/10769
I can't think of a case where the author of code would like a default value
of a method to be used in another method
I was a little surprised today by the following behaviour:
julia f(d=2) = d
f (generic function with 2 methods)
julia f(a::Int) = -a
f (generic function with 3 methods)
julia f()
-2
julia methods(f)
# 3 methods for generic function f:
f() at none:1
f(a::Int64) at none:1
f(d) at none:1
Yet,
On Wednesday, April 8, 2015 at 3:52:44 PM UTC+2, Mauro wrote:
On Wed, 2015-04-08 at 15:34, Daan Huybrechs daan.hu...@gmail.com
javascript: wrote:
I was a little surprised today by the following behaviour:
julia f(d=2) = d
f (generic function with 2 methods)
julia f(a::Int
Contributions, or advice on the correct pronunciation of Dierckx,
gratefully accepted.
The original code was written well before my days in Leuven (and the author
retired last year), but I can help with the pronunciation :-)
The -ckx is just like x, fortunately. The -ie- is like the i in
16 matches
Mail list logo