# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=1015

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1016

---

## [Winston how to show time on axis?](https://discourse.julialang.org/t/winston-how-to-show-time-on-axis/6803)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 3\
**Last updated:** [November 13, 2017, 5:12pm UTC](https://discourse.julialang.org/t/winston-how-to-show-time-on-axis/6803 "2017-11-13T17:12:28Z")

</div>

julia\> d=collect(DateTime(t1):Dates.Minute(1):(DateTime(t1))+Dates.Day(1)) 1441-element Array{DateTime,1}: 2016-04-01T00:00:00 2016-04-01T00:01:100:… using Winston julia\> plot(d,rand(1441)) ERROR: eltype of argumen…

---

## [@edit read-only?](https://discourse.julialang.org/t/edit-read-only/7044)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 5\
**Last updated:** [November 13, 2017, 4:19pm UTC](https://discourse.julialang.org/t/edit-read-only/7044 "2017-11-13T16:19:52Z")

</div>

When I @edit 2 + 2, I can change the source code of addition. That seems dangerous. In fact, I only use @edit to inspect source code, to learn how a library works and things like that. I almost never do any edits. Is the…

---

## [Iterator bug?](https://discourse.julialang.org/t/iterator-bug/7039)

<div class="topic-metadata">

**Author:** [@Liso](https://discourse.julialang.org/u/Liso)\
**Replies:** 5\
**Last updated:** [November 13, 2017, 1:59pm UTC](https://discourse.julialang.org/t/iterator-bug/7039 "2017-11-13T13:59:16Z")

</div>

I just tested @Dan’s (?) answer on SO ( Julia - the way of kings (generator performance) - Stack Overflow ) There is function allSAWs(neigh, pathlen) which return iterator. His algorithm has problem that it return wrong…

---

## [Does Julia support other git repos, like BitBucket?](https://discourse.julialang.org/t/does-julia-support-other-git-repos-like-bitbucket/7014)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 4\
**Last updated:** [November 13, 2017, 1:08pm UTC](https://discourse.julialang.org/t/does-julia-support-other-git-repos-like-bitbucket/7014 "2017-11-13T13:08:27Z")

</div>

Most packages are hosted in Github. Does julia support other cloud repos, like bitbucket for example? If I use bitbucket, how would I: Create a Julia package and host it on BitBucket. Install the package from bitbucke…

---

## [PyPlot not working](https://discourse.julialang.org/t/pyplot-not-working/7032)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 0\
**Last updated:** [November 13, 2017, 4:57am UTC](https://discourse.julialang.org/t/pyplot-not-working/7032 "2017-11-13T04:57:16Z")

</div>

I am trying the example codes as below: using PyPlot x = linspace(0, 10, 200) y = sin.(x) plot(x, y, "b-", linewidth=2) I got the error message: ArgumentError: haskey of NULL PyObject haskey(::PyCall.PyObject, ::Strin…

---

## [StructuredQueries not working](https://discourse.julialang.org/t/structuredqueries-not-working/7029)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 3\
**Last updated:** [November 12, 2017, 11:21pm UTC](https://discourse.julialang.org/t/structuredqueries-not-working/7029 "2017-11-12T23:21:28Z")

</div>

I have been using the dplyr package in r for some time and noticed that the StructuredQueries package in Julia has some similar functions and styles to it. However, I could not get this Julia package work, I always get t…

---

## [Analogue of zero(T) for infinitiy](https://discourse.julialang.org/t/analogue-of-zero-t-for-infinitiy/7027)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 5\
**Last updated:** [November 12, 2017, 8:26pm UTC](https://discourse.julialang.org/t/analogue-of-zero-t-for-infinitiy/7027 "2017-11-12T20:26:02Z")

</div>

How do I get the infinity corresponding to a type? Is there an analog of zero(T)? Something like: inf(Float16) Here is how I would define it myself: function inf(::Type{T})::T where T one(T) / zero(T) end Is ther…

---

## [Is the increasing slowness of LLVM compilation a worry?](https://discourse.julialang.org/t/is-the-increasing-slowness-of-llvm-compilation-a-worry/7023)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 8\
**Last updated:** [November 12, 2017, 2:17pm UTC](https://discourse.julialang.org/t/is-the-increasing-slowness-of-llvm-compilation-a-worry/7023 "2017-11-12T14:17:51Z")

</div>

I have heard many-a-times that LLVM is slow when it comes to compilation; I heard it in relations to why Go did not choose LLVM, and Rust having long compilation times, and this video where Jeff Bezanson talks about LLVM…

---

## [Delete a file from script using wildcards?](https://discourse.julialang.org/t/delete-a-file-from-script-using-wildcards/7022)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 2\
**Last updated:** [November 12, 2017, 10:46am UTC](https://discourse.julialang.org/t/delete-a-file-from-script-using-wildcards/7022 "2017-11-12T10:46:08Z")

</div>

I would like to delete, from within a script, a file with name foo-4439.bar, for example, where the number is not known, a priori. I have been trying variations on run(\`rm foo-\*\`) but have not managed to come up with a…

---

## [How does test(pkg; coverage=true) work?](https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [November 12, 2017, 7:05am UTC](https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017 "2017-11-12T07:05:34Z")

</div>

I tried setting the coverage option to true. It generated \*.cov files in the tests folder of one of my packages, which contain numbers on the left margin, but what do they mean? The documentation is not very explicit.

---

## [Removing bound checks globally in an interactive session](https://discourse.julialang.org/t/removing-bound-checks-globally-in-an-interactive-session/6998)

<div class="topic-metadata">

**Author:** [@Snir\_Gazit](https://discourse.julialang.org/u/Snir_Gazit)\
**Replies:** 2\
**Last updated:** [November 12, 2017, 5:22am UTC](https://discourse.julialang.org/t/removing-bound-checks-globally-in-an-interactive-session/6998 "2017-11-12T05:22:08Z")

</div>

Does starting an interactive session (or an IJulia notebook from that session) using the command line option “–check-bounds=no” really eliminate all boundary checks across the entire code? For instance, the following se…

---

## [Convert or copy to StaticArrays.MArray](https://discourse.julialang.org/t/convert-or-copy-to-staticarrays-marray/7001)

<div class="topic-metadata">

**Author:** [@garrison](https://discourse.julialang.org/u/garrison)\
**Replies:** 4\
**Last updated:** [November 11, 2017, 8:27pm UTC](https://discourse.julialang.org/t/convert-or-copy-to-staticarrays-marray/7001 "2017-11-11T20:27:54Z")

</div>

I’m using StaticArrays, and I have a function like the following function (obj::SomeObject{D}, x::AbstractVector{Int}) where {D} x\_mutable = MVector{D,Int}(x) # \[... mutate \`x\_mutable\` in some way, based on obj\]…

---

## [Outdated page in Julia Package Ecosystem Pulse](https://discourse.julialang.org/t/outdated-page-in-julia-package-ecosystem-pulse/7006)

<div class="topic-metadata">

**Author:** [@wood](https://discourse.julialang.org/u/wood)\
**Replies:** 4\
**Last updated:** [November 11, 2017, 8:10pm UTC](https://discourse.julialang.org/t/outdated-page-in-julia-package-ecosystem-pulse/7006 "2017-11-11T20:10:34Z")

</div>

Hello, does anybody noticed that the page of Julia Package Ecosystem Pulse did not update since 1 Oct. 2017? Will this be fixed?

---

## [JuliaPro problem on Mac OS 10.9.5](https://discourse.julialang.org/t/juliapro-problem-on-mac-os-10-9-5/7009)

<div class="topic-metadata">

**Author:** [@mrtkp9993](https://discourse.julialang.org/u/mrtkp9993)\
**Replies:** 0\
**Last updated:** [November 11, 2017, 5:04pm UTC](https://discourse.julialang.org/t/juliapro-problem-on-mac-os-10-9-5/7009 "2017-11-11T17:04:27Z")

</div>

Hi everyone, I installed JuliaPro 0.6.1.1. I succesfully opened program first time but when I tried on second time, I got “App is damaged and can’t be opened” error. But I can run editor from (1) on screenshot. I can’t …

---

## [Segmentation fault on ccall](https://discourse.julialang.org/t/segmentation-fault-on-ccall/6776)

<div class="topic-metadata">

**Author:** [@anon61610682](https://discourse.julialang.org/u/anon61610682)\
**Replies:** 6\
**Last updated:** [November 11, 2017, 3:34pm UTC](https://discourse.julialang.org/t/segmentation-fault-on-ccall/6776 "2017-11-11T15:34:48Z")

</div>

I have implemented an algorithm for image segmentation, and I am trying to interface the C++ compiled shared library through Julia. The code seems to be working properly on a test.cpp file which uses the same C-API (prov…

---

## [Multiple files per module](https://discourse.julialang.org/t/multiple-files-per-module/7007)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 3\
**Last updated:** [November 11, 2017, 3:15pm UTC](https://discourse.julialang.org/t/multiple-files-per-module/7007 "2017-11-11T15:15:38Z")

</div>

I want to split a module into multiple files. Should I put the module declaration: module MyModuleName ... end # module in all the files?

---

## [ANN: New GMT interface](https://discourse.julialang.org/t/ann-new-gmt-interface/6946)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 19\
**Last updated:** [November 11, 2017, 3:11am UTC](https://discourse.julialang.org/t/ann-new-gmt-interface/6946 "2017-11-11T03:11:10Z")

</div>

Hi, GMT.jl got a new tag (0.2) that introduces a new higher-lever type of interface to the GMT package. While this new interface makes it more similar to Plots.jl calls, and indeed there is some overlap, I would like t…

---

## [Analog of ctypeslib.as\_array?](https://discourse.julialang.org/t/analog-of-ctypeslib-as-array/7002)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 0\
**Last updated:** [November 11, 2017, 2:19am UTC](https://discourse.julialang.org/t/analog-of-ctypeslib-as-array/7002 "2017-11-11T02:19:20Z")

</div>

The LAMMPS library has a python interface that I am trying to use in Julia via PyCall. One of the things that can be obtained is a pointer to an array for the positions of the atoms. Within Python, I could call: X = n…

---

## [Two or more @threads for blocks in the same function](https://discourse.julialang.org/t/two-or-more-threads-for-blocks-in-the-same-function/6999)

<div class="topic-metadata">

**Author:** [@alee](https://discourse.julialang.org/u/alee)\
**Replies:** 1\
**Last updated:** [November 10, 2017, 11:01pm UTC](https://discourse.julialang.org/t/two-or-more-threads-for-blocks-in-the-same-function/6999 "2017-11-10T23:01:47Z")

</div>

First off, I am very impressed with multi-threading so far, although I am mainly treating @threads for as basic OpenMP parallel regions. This question is more related to my having to create extra small functions to avoid…

---

## [How to provide the perfect documentation?](https://discourse.julialang.org/t/how-to-provide-the-perfect-documentation/6994)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 5\
**Last updated:** [November 10, 2017, 6:20pm UTC](https://discourse.julialang.org/t/how-to-provide-the-perfect-documentation/6994 "2017-11-10T18:20:42Z")

</div>

Everyone knows how import documentation is and how import tests are and stuff like that. I don’t know a ton of people who love to write documentation because it is stressful to maintain. How to build the perfect docume…

---

## [Does the cost of function call matter in Julia?](https://discourse.julialang.org/t/does-the-cost-of-function-call-matter-in-julia/6990)

<div class="topic-metadata">

**Author:** [@111](https://discourse.julialang.org/u/111)\
**Replies:** 9\
**Last updated:** [November 10, 2017, 12:05pm UTC](https://discourse.julialang.org/t/does-the-cost-of-function-call-matter-in-julia/6990 "2017-11-10T12:05:24Z")

</div>

I’ve written a long function, and according to https://docs.julialang.org/en/latest/manual/performance-tips/, I rewrote it with some functions to avoid the global variables. The performance is nicer now. My questions are…

---

## [Julia print commands not working in emacs org-mode](https://discourse.julialang.org/t/julia-print-commands-not-working-in-emacs-org-mode/6944)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 6\
**Last updated:** [November 10, 2017, 4:42am UTC](https://discourse.julialang.org/t/julia-print-commands-not-working-in-emacs-org-mode/6944 "2017-11-10T04:42:20Z")

</div>

Dear All, I am trying to run julia in emacs org-mode by following the instructions at https://github.com/JuliaEditorSupport/julia-emacs. Everything seems to be working except print commands. If I have the following sou…

---

## [Super Squeeze](https://discourse.julialang.org/t/super-squeeze/6986)

<div class="topic-metadata">

**Author:** [@gabrielgellner](https://discourse.julialang.org/u/gabrielgellner)\
**Replies:** 3\
**Last updated:** [November 10, 2017, 3:01am UTC](https://discourse.julialang.org/t/super-squeeze/6986 "2017-11-10T03:01:14Z")

</div>

two related questions. If I have an array with many size 1 dimensions why doesn’t squeeze(arr) find the one dimensions and remove them automatically? And given it doesn’t what is the best way to make this behavior?…

---

## [Mysterious performance degradation involving similar(), view() and recursion](https://discourse.julialang.org/t/mysterious-performance-degradation-involving-similar-view-and-recursion/6977)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 4\
**Last updated:** [November 9, 2017, 7:37pm UTC](https://discourse.julialang.org/t/mysterious-performance-degradation-involving-similar-view-and-recursion/6977 "2017-11-09T19:37:57Z")

</div>

I was writing a function that involves the usage of similar() view() and recursion and below is the best MWE I can come up with. My original function is more complex. I am running this on Julia 0.6.1 on Windows 10 64bit…

---

## ["\`const static\`" function parameters](https://discourse.julialang.org/t/const-static-function-parameters/1803)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 31\
**Last updated:** [November 9, 2017, 6:03pm UTC](https://discourse.julialang.org/t/const-static-function-parameters/1803 "2017-11-09T18:03:20Z")

</div>

I have a function that uses a constant parameter. The parameter never changes between function calls. For example: function radtodeg(x) const PI = 3.14159 return x \* 180 / PI end Here PI is a constant that does…

---

## [ANN: Julia Installer 4 Linux - Light](https://discourse.julialang.org/t/ann-julia-installer-4-linux-light/6978)

<div class="topic-metadata">

**Author:** [@abelsiqueira](https://discourse.julialang.org/u/abelsiqueira)\
**Replies:** 8\
**Last updated:** [November 9, 2017, 3:47pm UTC](https://discourse.julialang.org/t/ann-julia-installer-4-linux-light/6978 "2017-11-09T15:47:02Z")

</div>

I’ve created JILL, a script to install the latest stable Julia on Linux. My objective was to provide a quick way to install Julia without depending on the distribution, in the way that I use the Julia binaries: (downloa…

---

## [Any way to keep printing out the info/error in log using internal logging?](https://discourse.julialang.org/t/any-way-to-keep-printing-out-the-info-error-in-log-using-internal-logging/6958)

<div class="topic-metadata">

**Author:** [@jwu](https://discourse.julialang.org/u/jwu)\
**Replies:** 1\
**Last updated:** [November 9, 2017, 3:28am UTC](https://discourse.julialang.org/t/any-way-to-keep-printing-out-the-info-error-in-log-using-internal-logging/6958 "2017-11-09T03:28:07Z")

</div>

In julia 0.6 Base, we have logging function to log. But I did not find any way to keep printing out the information while logging. julia\> logging(open("/tmp/testlog.txt","w")) …

---

## [Working on spidev.h and spidev.c translation](https://discourse.julialang.org/t/working-on-spidev-h-and-spidev-c-translation/6479)

<div class="topic-metadata">

**Author:** [@Frank\_Applin](https://discourse.julialang.org/u/Frank_Applin)\
**Replies:** 68\
**Last updated:** [November 8, 2017, 9:40pm UTC](https://discourse.julialang.org/t/working-on-spidev-h-and-spidev-c-translation/6479 "2017-11-08T21:40:04Z")

</div>

OK. I have started working on translating spidev.h and spidev.c to Julia. I hope @yuyichao can tell me if I’m heading down the right path on this (I’m trying to somewhat follow what you advises for i2c-dev). Here’s the …

---

## [Manipulating parametric types](https://discourse.julialang.org/t/manipulating-parametric-types/6893)

<div class="topic-metadata">

**Author:** [@robertfeldt](https://discourse.julialang.org/u/robertfeldt)\
**Replies:** 6\
**Last updated:** [November 8, 2017, 4:02pm UTC](https://discourse.julialang.org/t/manipulating-parametric-types/6893 "2017-11-08T16:02:23Z")

</div>

I want to be able to manipulate parametric types for example to replace some type parameter with a different one. Since the name field of a DataType contains a TypeName and not the type itself and since it does not seem …

---

## [Type stability, deprecation](https://discourse.julialang.org/t/type-stability-deprecation/6822)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon](https://discourse.julialang.org/u/Philippe_Maincon)\
**Replies:** 4\
**Last updated:** [November 8, 2017, 8:27am UTC](https://discourse.julialang.org/t/type-stability-deprecation/6822 "2017-11-08T08:27:37Z")

</div>

Hi, Below, I have an extract of code that does a) automatic differentiation (I know, ForwardDiff.jl does it better, but I want to learn) and b) some “tensor” operation. Running the same test on plain old Float64 is f…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=1014)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=1016)
