To follow up with a question on this "multiple dispatch is resolved at
runtime" statement:
I was under the impression, that if the Julia JIT compiler is able to
infer the concrete types of the variables involved in a method call,
that it will select the appropriate method at compile time. Am
There's also the complication that "run time" and "compile time" are much
easier to define in C++ than in Julia...
// T
On Wednesday, December 23, 2015 at 2:21:07 PM UTC+1, Stefan Karpinski wrote:
>
> That's correct. Semantically, multiple dispatch is resolved at run time,
> but in practice,
That's correct. Semantically, multiple dispatch is resolved at run time,
but in practice, Julia is able to resolve a lot of calls completely
statically. Even more so than C++ because instead of generating a single
method body for an abstract type and using virtual dispatch to call methods
on
Instead of using "compile-time" and "run-time", is it fair to say that
overloading selects a method based on the type of the expression (what
you see in the code in front of you), whereas dispatch selects a method
based on the type of the value (which might be a sub-type of the
expression type)?
Which is precisely why in Julia there is semantically no such distinction.
On Wed, Dec 23, 2015 at 8:36 AM, Tomas Lycken
wrote:
> There's also the complication that "run time" and "compile time" are much
> easier to define in C++ than in Julia...
>
> // T
>
> On
In Matlab everything is a matrix. Hence, I am used to organise a collection
of vectors in a matrix.
Translated to Julia, if I have a collection of vectors x1... xn, I would
store it in a matrix
X = [x1 ... xn].
Is this the philosophy one should adhere to in Julia too?
Or would it be better
Kind of all of the above. Mainly for nonparametric machine learning at the
moment.
ATM I maintain X as a matrix of input vectors and F = [f1,...,fn] a matrix
of outputs (i.e. a row vector in most cases, but sometimes a dxN matrix
with d >1). The sample of the function f: x |-> f(x) is
The choice of the most appropriate data structure depends a lot on what you
plan to do with the data. How are you going to use the vectors? Is the
number of vectors fixed or does it grow/shrink often at runtime? Are you
going to do linear-algebra operations on the set of vectors (e.g.
I have found this ones at Gist:
*
https://gist.github.com/search?l=julia=.juliarc.jl=searchresults=%E2%9C%93
This one is aslo in my .juilarc.jl nowadays ...a total life saver! XD
"https://xkcd.com/303;
nethack() = run(`telnet nethack.alt.org`)
El miércoles, 23 de diciembre de 2015, 14:38:44
there is this message over on julia-dev:
https://groups.google.com/d/msg/julia-dev/8qzfy2Za9qc/k_4fXNt_szIJ
May be grep-able, but doesn't change the point that a single letter macro name
is not the greatest for readability.
Mine's empty. I just take anything I want in .juliarc.jl and put it
directly in base. j/k
On Wed, Dec 23, 2015 at 6:53 PM, cdm wrote:
>
> there is this message over on julia-dev:
>
>
> https://groups.google.com/d/msg/julia-dev/8qzfy2Za9qc/k_4fXNt_szIJ
>
>
Hi,
I'm spending some quality time with Blink.jl trying to understand how it
works and came across a macro @d. As you can imagine, it is difficult to
search for this macro definition :D
Any ideas?
Best regards,
Eric
grep -RP '^\s*macro\s+d\s*\('
assuming GNU grep with PCRE mode support
On Wed, Dec 23, 2015 at 10:47 PM, Eric Forgy wrote:
> Hi,
>
> I'm spending some quality time with Blink.jl trying to understand how it
> works and came across a macro @d. As you can imagine, it is
Hi Stefan,
I'm a poor Windows/Matlab guy and haven't been on a *nux box since 2002 :)
The command didn't work for me from Julia Shell mode, from Windows Command
Prompt or even from my Git Bash :D
On Thursday, December 24, 2015 at 12:23:46 PM UTC+8, Stefan Karpinski wrote:
>
> grep -RP
Folks,
I am using Julia 0.4.1 on Windows10. I did the following
trivial multiplication and Julia is giving wrong output ? Is there any
problem with my installation of Julia ?
`
In [2]
1234567*12345678
Out[2]:
-1272282078
The correct output should be: 15241566651426
Thank
I'm a newbie to Julia and just today learnt that there's a .juliarc.jl
initialization file. So I'm curious what sorts of things people use it for.
Some DDG-ing and Googling only returned this gist:
https://gist.github.com/Ismael-VC/6db0c310eaf04d0b0a1b in which at least
the `separator()`
Julia is assuming your inputs are 32 bit integers. The result of
multiplying them is larger than 2^32-1. Therefore, the integer
multiplication is performed modulo 2^32, which is what the hardware
does naturally.
Try doing typeof(1234567) to see what type Julia thinks your numbers
are.
Read
related question; perhaps with responses that are similarly helpful:
what Julia-related contents can be found in your .bashrc ?
(maybe only Julia version paths, but i would not be surprised at more ...)
curious ...
~ cdm
Hi Ümit,
You're hitting integer overflow:
http://docs.julialang.org/en/release-0.4/manual/faq/#why-does-julia-use-native-machine-integer-arithmetic
Each of your operands can fit in an Int32, but the product can't. See
the linked info for some strategies for dealing with this.
-s
On Wed, Dec
Int on 32 bit system defaults to int32 so you will overflow the resulting 32
bit integer.
Use Int64(123..) * Int64(123..) if you want to explicitly use int64s.
I have this:
using Plots
plotly()
default(legend=false, size=(1000,1000))
On Wednesday, December 23, 2015, Ismael Venegas Castelló <
ismael.vc1...@gmail.com> wrote:
> I have found this ones at Gist:
>
> *
> https://gist.github.com/search?l=julia=.juliarc.jl=searchresults=%E2%9C%93
>
> This one
To enable a per-directory startup file, I use the following code (which
came from this list)
if chomp(readall(`pwd`)) != ENV["HOME"]
if isfile("juliarc.jl")
require("juliarc.jl")
end
end
On Wed, Dec 23, 2015 at 9:53 PM, Ethan Anderes
wrote:
> I can’t
I can’t live without this…
function paste()
include_string(clipboard());
end
Entering paste() at the REPL prompt evaluates whatever you just copied. I
find it extremely useful when copy-and-pasting largish blocks of code while
prototyping…especially since, without it, the evaluations can
Cool! Thanks Greg. I am also using Atom and happy to learn new tricks :)
On Thursday, December 24, 2015 at 1:33:04 PM UTC+8, Greg Plowman wrote:
>
> Hi Eric,
>
> I too am a long suffering Windows user.
>
> I find the Atom editor to be useful here:
> From the menu bar, Find->Find in Project
> I
Hi Eric,
I too am a long suffering Windows user.
I find the Atom editor to be useful here:
>From the menu bar, Find->Find in Project
I typed "macro d("
1 result found in 1 file for macro d(
v0.4\Lazy\src\macros.jl
241 macro d(xs...)
And here's the macro:
macro d(xs...)
@cond if VERSION
If/when you need the result, you can use join to get a string. For example:
julia> as = collect("")
4-element Array{Char,1}:
'a'
'a'
'a'
'a'
julia> as[2] = 'b'
'b'
julia> as
4-element Array{Char,1}:
'a'
'b'
'a'
'a'
julia> join(as)
"abaa"
// T
On Tuesday, December 22, 2015 at
Is there a difference?
Try this?
http://stackoverflow.com/questions/1801216/what-is-the-difference-between-multiple-dispatch-and-method-overloading
On Wednesday, December 23, 2015 at 8:50:08 PM UTC+8, Neal Becker wrote:
>
> Is there a difference?
>
>
Thanks guys! that makes a lot more sense..
On Tuesday, 22 December 2015 14:49:19 UTC+2, kleinsplash wrote:
>
> Hi,
>
>
> I am working through a tutorial and have come across this line:
>
>
> call{T<:Real}(::Type{Complex{T<:Real}}, re::T<:Real, im::T<:Real) at
> complex.jl:4
>
> when running:
30 matches
Mail list logo