Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
BridgingBot
@GitterIRCbot
[irc] <lechner> Hi, I cannot install arpack on Debian testing even though libarpack.so.2.1.0 is installed. What is the issue in this log, please? http://paste.debian.net/1099605/
BridgingBot
@GitterIRCbot
[slack] <nalimilan> What's in ~/.julia/packages/Arpack/cu5By/deps/build.log?
[slack] <nalimilan> I.e. a problem with Debian packages which should be reported there, and can be fixed by using official binaries.
BridgingBot
@GitterIRCbot
[irc] <efrahim> Is there a way to check which git-commit of a certain package one is using through julia?
BridgingBot
@GitterIRCbot
[slack] <fredrikekre> Just check the version number, which (should) have a corresponding git tag.
BridgingBot
@GitterIRCbot
[slack] <oxinabox> Unless you have it dev’d
[slack] <oxinabox> or have added a branch
[slack] <oxinabox> Or if they were not using tagbot / manually tagging. (But for that can you can read the registry by hand it is just more annoying.)
BridgingBot
@GitterIRCbot
[irc] <uskerine> hi, I want to understand how can I define some global variables in a separate file and call them from other file. I am starting with Julia, any guideline so I can google in the right direction is welcomed. thanks
BridgingBot
@GitterIRCbot
[slack] <mortenpi> include("global_variable_file.jl") should do the trick?
[irc] <uskerine> I want to have several files (structured code) and a common file with global variables
[irc] <uskerine> would include try to redefine the same global variables ?
BridgingBot
@GitterIRCbot
[irc] <uskerine> is there any recommendation for variable/function names in Julia? Like, this_is_my_function vs. thisIsMyFunction ?
BridgingBot
@GitterIRCbot
[slack] <jeffrey_sarnoff> https://github.com/JuliaPraxis/Naming
BridgingBot
@GitterIRCbot
[irc] <uskerine> how can I return a vector of 4 Int32
[irc] <uskerine> in a function?
[slack] <pfitzseb> f(a,b,c,d) = [a,b,c,d]?
[slack] <pfitzseb> you can't with normal arrays -- their type doesn't include any information about the vector's length
[slack] <pfitzseb> you can look into StaticArrays.jl though, which do include that info in their type
BridgingBot
@GitterIRCbot
[irc] <uskerine> but if I do this: a = Vector{Int32}(undef, 4) I allocate space for a 4 item vector, right?
[slack] <pfitzseb> yes
BridgingBot
@GitterIRCbot
[irc] <uskerine> I see, but you can not specify that as return value of a function
[irc] <uskerine> btw, what is the value of specifying a return value of a function?
[irc] <uskerine> by value I mean benefit
BridgingBot
@GitterIRCbot
[slack] <pfitzseb> it can improve performance if Julia can't infer the return type on it's own
[slack] <pfitzseb> and it helps with correctness, because you get a runtime error if return value can't be converted to the indicated return type
[slack] <pfitzseb> julia> typeof((Int32(1), Int32(2), Int32(3), Int32(4)))
NTuple{4,Int32}
BridgingBot
@GitterIRCbot
[irc] <uskerine> Thanks, I am trying to get that be the value of a returned function now
[irc] <uskerine> please kindly see edited question
BridgingBot
@GitterIRCbot
[irc] <uskerine> nah I found the issue, I was using Tuple instead of NTuple in the return
BridgingBot
@GitterIRCbot
[irc] <uskerine> hi, how can I do CHR(65) in Julia?
[irc] <uskerine> and given a = "B" how can I add 1 so I get a = "C"?
BridgingBot
@GitterIRCbot
[slack] <saschamann> if a is a single char, you can do a = 'B' and a + 1 to get 'C'
[slack] <saschamann> if it's a string, this works: join(char + 1 for char in a)
[slack] <saschamann> I'm not sure what CHR(65) does
[irc] <uskerine> Thanks, if I do myVar = "A", is that a single character? I thought Julia did not have char, just strings
[slack] <saschamann> use single quotes for chars
[irc] <uskerine> so myVar = 'A'
[irc] <uskerine> is actually what I am looking for if I want to deal with single char, right?
[slack] <saschamann> yep
[irc] <uskerine> thanks
[slack] <saschamann> The manual has some more details on chars: https://docs.julialang.org/en/v1/manual/strings/#man-characters-1