# General Usage

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

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

**Page:** 1020

---

## [Extract ... from Tuple{...} and verify fixed length](https://discourse.julialang.org/t/extract-from-tuple-and-verify-fixed-length/6308)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [October 24, 2017, 2:25pm UTC](https://discourse.julialang.org/t/extract-from-tuple-and-verify-fixed-length/6308 "2017-10-24T14:25:30Z")

</div>

What is the canonical way of extracting the parameters of a Tuple, and verifying that it has fixed length? Using advice I got in another topic, I am now using """ extract\_Tuple\_fixed(T) Extract the parameters of a …

---

## [Documentation not showing all methods](https://discourse.julialang.org/t/documentation-not-showing-all-methods/6636)

<div class="topic-metadata">

**Author:** [@BenjaminBorn](https://discourse.julialang.org/u/BenjaminBorn)\
**Replies:** 2\
**Last updated:** [October 24, 2017, 4:48am UTC](https://discourse.julialang.org/t/documentation-not-showing-all-methods/6636 "2017-10-24T04:48:55Z")

</div>

This is probably a stupid question but when I type ?\\ in the REPL (Julia 0.6), I get the following docstrings for \\(x, y) and \\(A, B): \\(x, y) Left division operator: multiplication of y by the inverse of x on the le…

---

## [Where to find internals documentation?](https://discourse.julialang.org/t/where-to-find-internals-documentation/6642)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 2\
**Last updated:** [October 24, 2017, 6:53am UTC](https://discourse.julialang.org/t/where-to-find-internals-documentation/6642 "2017-10-24T06:53:55Z")

</div>

Will the internals of the Julia language be explained in detail somewhere in the future? I’d like to learn more about these features as well.

---

## [ZipFile.jl](https://discourse.julialang.org/t/zipfile-jl/6619)

<div class="topic-metadata">

**Author:** [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Replies:** 3\
**Last updated:** [October 24, 2017, 6:47am UTC](https://discourse.julialang.org/t/zipfile-jl/6619 "2017-10-24T06:47:54Z")

</div>

Hello, The README for ZipFile.jl talks about writing to a new zip file and reading from it. Is there a way to add a file to an existing zip file? i.e., append a file? Thanks, Ritchie

---

## [Linked list](https://discourse.julialang.org/t/linked-list/6633)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 8\
**Last updated:** [October 24, 2017, 4:29am UTC](https://discourse.julialang.org/t/linked-list/6633 "2017-10-24T04:29:22Z")

</div>

Is there a package for linked and/or double linked lists? I only found https://github.com/adolgert/Lists.jl which doesn’t seem to be maintained anymore and isn’t available via Pkg.add(). Vectors are just arrays so delet…

---

## [Function argument type that must be comparable](https://discourse.julialang.org/t/function-argument-type-that-must-be-comparable/6643)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 1\
**Last updated:** [October 24, 2017, 3:35am UTC](https://discourse.julialang.org/t/function-argument-type-that-must-be-comparable/6643 "2017-10-24T03:35:26Z")

</div>

Is there a way to force the type of an argument in a function to be comparable? It is not a huge problem as if the isless (or \<) method is not available, it will raise an error. But I would rather enforce the type of th…

---

## [Bounds checking removal](https://discourse.julialang.org/t/bounds-checking-removal/6638)

<div class="topic-metadata">

**Author:** [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Replies:** 2\
**Last updated:** [October 24, 2017, 1:37am UTC](https://discourse.julialang.org/t/bounds-checking-removal/6638 "2017-10-24T01:37:45Z")

</div>

I am trying to provide @inbounds functionality for a custom type. After reading the docs, I have experimented with various combinations of checkbounds with @inline and @propagate\_inbounds. But still I can’t seem to get …

---

## [Function signature with tuple argument of a given length](https://discourse.julialang.org/t/function-signature-with-tuple-argument-of-a-given-length/6631)

<div class="topic-metadata">

**Author:** [@gasagna](https://discourse.julialang.org/u/gasagna)\
**Replies:** 5\
**Last updated:** [October 23, 2017, 7:53pm UTC](https://discourse.julialang.org/t/function-signature-with-tuple-argument-of-a-given-length/6631 "2017-10-23T19:53:47Z")

</div>

Hi, I want to express that a function accepts as first argument a tuple of length consistent with the type parameter of the second argument. This function foo(x::NTuple{M}, b::SomeOtherType{M}) where {M} end is not wh…

---

## [Copy pasting to Julia cmd/Powershell in Windows](https://discourse.julialang.org/t/copy-pasting-to-julia-cmd-powershell-in-windows/6620)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 4\
**Last updated:** [October 23, 2017, 1:06pm UTC](https://discourse.julialang.org/t/copy-pasting-to-julia-cmd-powershell-in-windows/6620 "2017-10-23T13:06:24Z")

</div>

Hi all I often use Atom for programming. But at times I prefer to use Julia through cmd or Powershell. When I copy paste code, it sometimes happens that Julia shows a “ton of output”, as shown below I am not sure whet…

---

## [How Julia loop works with vector?](https://discourse.julialang.org/t/how-julia-loop-works-with-vector/6616)

<div class="topic-metadata">

**Author:** [@MonkieDein](https://discourse.julialang.org/u/MonkieDein)\
**Replies:** 3\
**Last updated:** [October 23, 2017, 2:54am UTC](https://discourse.julialang.org/t/how-julia-loop-works-with-vector/6616 "2017-10-23T02:54:39Z")

</div>

Recently I have been encountering a problem that I want to make a vector that store the old matrix that I need to make my new matrix. However, in Julia while I change my new matrix, the old matrix follow. So, I wonder…

---

## [Error in using PyPlot - windows](https://discourse.julialang.org/t/error-in-using-pyplot-windows/6614)

<div class="topic-metadata">

**Author:** [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Replies:** 2\
**Last updated:** [October 22, 2017, 7:27pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-windows/6614 "2017-10-22T19:27:52Z")

</div>

can anyone nows how to solve this ? in windows 10 x64 julia\> using PyPlot sys:1: UserWarning: This call to matplotlib.use() has no effect because the backend has already been chosen; matplotlib.use() must be called b…

---

## [Parsed anonymous functions, type inference, and Base.invokelatest](https://discourse.julialang.org/t/parsed-anonymous-functions-type-inference-and-base-invokelatest/6518)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 24\
**Last updated:** [October 22, 2017, 1:46pm UTC](https://discourse.julialang.org/t/parsed-anonymous-functions-type-inference-and-base-invokelatest/6518 "2017-10-22T13:46:12Z")

</div>

I have a situation where at some point during runtime a string is parsed and eval’d to an anonymous function, e.g. fa = eval(parse("x -\> mean(x)")) Using Julia v0.5, I could then call fa(\[1,2,3\]) later in the same rout…

---

## [Unit tests for interfaces](https://discourse.julialang.org/t/unit-tests-for-interfaces/6502)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [October 22, 2017, 12:44pm UTC](https://discourse.julialang.org/t/unit-tests-for-interfaces/6502 "2017-10-22T12:44:23Z")

</div>

Is there a convenient way to unit test support for interfaces in Base? I am thinking of something like test\_interface\_array(my\_array\_like\_object) that would test that the type is \<: AbstractArray, query size and indice…

---

## [Indentation in Atom/VS Code](https://discourse.julialang.org/t/indentation-in-atom-vs-code/6591)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 15\
**Last updated:** [October 22, 2017, 4:59am UTC](https://discourse.julialang.org/t/indentation-in-atom-vs-code/6591 "2017-10-22T04:59:13Z")

</div>

Both of the editors render the following 3 lines, of which 2 are continuation of the first, without any indentation. That is, like this: fcoarsetransferred = transferfield!(fcoarsetransferred, fensfine, regionsfine\[…

---

## [Help updating older Julia iterator code](https://discourse.julialang.org/t/help-updating-older-julia-iterator-code/6599)

<div class="topic-metadata">

**Author:** [@rpmuller](https://discourse.julialang.org/u/rpmuller)\
**Replies:** 4\
**Last updated:** [October 21, 2017, 8:34pm UTC](https://discourse.julialang.org/t/help-updating-older-julia-iterator-code/6599 "2017-10-21T20:34:03Z")

</div>

Hi Julia-ites. I’m the author of the Python package PyQuante, which is a quantum chemistry package written in Python. In order to better learn Julia, I spent a weekend a couple of years ago translating the core of the pr…

---

## [Mutable object in parallel loop](https://discourse.julialang.org/t/mutable-object-in-parallel-loop/6595)

<div class="topic-metadata">

**Author:** [@maxtremblay](https://discourse.julialang.org/u/maxtremblay)\
**Replies:** 1\
**Last updated:** [October 21, 2017, 2:50pm UTC](https://discourse.julialang.org/t/mutable-object-in-parallel-loop/6595 "2017-10-21T14:50:45Z")

</div>

Hello, Let’s say that I have a type Foo which is mutable and assume that the construction of an instance of Foo is quite long. I also have a function set\_state(foo::Foo, bar::Vector{Float64}). Here is a sequential exam…

---

## [Does compile time depend on type stability](https://discourse.julialang.org/t/does-compile-time-depend-on-type-stability/6548)

<div class="topic-metadata">

**Author:** [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Replies:** 7\
**Last updated:** [October 21, 2017, 12:57pm UTC](https://discourse.julialang.org/t/does-compile-time-depend-on-type-stability/6548 "2017-10-21T12:57:39Z")

</div>

Hi, I have a larger Gtk.jl application that requires more than one minute to start up. If I press some buttons, the initial compile time is also quite high. However, if I run the application a second time everything is t…

---

## [Parallel code seems slow](https://discourse.julialang.org/t/parallel-code-seems-slow/6588)

<div class="topic-metadata">

**Author:** [@maxtremblay](https://discourse.julialang.org/u/maxtremblay)\
**Replies:** 3\
**Last updated:** [October 20, 2017, 8:35pm UTC](https://discourse.julialang.org/t/parallel-code-seems-slow/6588 "2017-10-20T20:35:09Z")

</div>

Hello, I have a code that I want to run multiple times with different random inputs to compute an average overall all iterations. To get more familiar with parallel programming in Julia, I tried to play around with a s…

---

## [Appending an element to a JLD2 file](https://discourse.julialang.org/t/appending-an-element-to-a-jld2-file/6424)

<div class="topic-metadata">

**Author:** [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Replies:** 4\
**Last updated:** [October 20, 2017, 8:06pm UTC](https://discourse.julialang.org/t/appending-an-element-to-a-jld2-file/6424 "2017-10-20T20:06:55Z")

</div>

I’m curious what the right way to append elements to a vector stored in a JLD2 file, assuming that I want to save the data to disk every time I add an element (because each element is expensive to compute). The first th…

---

## [Closure which discards the return is slower?](https://discourse.julialang.org/t/closure-which-discards-the-return-is-slower/6583)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 7\
**Last updated:** [October 20, 2017, 7:34pm UTC](https://discourse.julialang.org/t/closure-which-discards-the-return-is-slower/6583 "2017-10-20T19:34:05Z")

</div>

using FunctionWrappers struct CallbackF64 f::FunctionWrappers.FunctionWrapper{Void,Tuple{Array{Float64}}} end (cb::CallbackF64)(v) = cb.f(v) f!(u) = (u.=u.^2) f = CallbackF64(f!) u = Float64\[1,2,3\] f(u) # Errors g!(u)…

---

## [State of the Julia ecosystem](https://discourse.julialang.org/t/state-of-the-julia-ecosystem/6446)

<div class="topic-metadata">

**Author:** [@MatthiasKauer](https://discourse.julialang.org/u/MatthiasKauer)\
**Replies:** 26\
**Last updated:** [October 20, 2017, 5:26pm UTC](https://discourse.julialang.org/t/state-of-the-julia-ecosystem/6446 "2017-10-20T17:26:52Z")

</div>

Hi, I am (once again) exploring Julia. The last time I checked it was, I believe, in 2015 and many things have happened since then. I am writing this post in the hope that you can help me correct a few of my current i…

---

## [Julia 0.6 and MPI wrapper](https://discourse.julialang.org/t/julia-0-6-and-mpi-wrapper/6575)

<div class="topic-metadata">

**Author:** [@matthias.taus](https://discourse.julialang.org/u/matthias.taus)\
**Replies:** 3\
**Last updated:** [October 20, 2017, 3:57pm UTC](https://discourse.julialang.org/t/julia-0-6-and-mpi-wrapper/6575 "2017-10-20T15:57:13Z")

</div>

Hi, I just updated to Julia 0.6 and am using the MPI wrapper. When I try to send a vector using MPI, the sending command never finishes. For example the following code does not finish: using MPI MPI.Init() x = rand( C…

---

## [How to optimize such a program](https://discourse.julialang.org/t/how-to-optimize-such-a-program/6527)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 8\
**Last updated:** [October 20, 2017, 3:39pm UTC](https://discourse.julialang.org/t/how-to-optimize-such-a-program/6527 "2017-10-20T15:39:23Z")

</div>

struct TightBindingModel norbits::Int64 lat::Matrix{Float64} end function makesupercell(t::TightBindingModel, scrdlat::Matrix{Int64}) ucs = Vector{Vector{Int64}}() scrdlatinv = inv(scrdlat) for k in …

---

## [What's a user-friendly way to setup repositories for Jupyter notebook tutorials?](https://discourse.julialang.org/t/whats-a-user-friendly-way-to-setup-repositories-for-jupyter-notebook-tutorials/532)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 4\
**Last updated:** [October 20, 2017, 3:09pm UTC](https://discourse.julialang.org/t/whats-a-user-friendly-way-to-setup-repositories-for-jupyter-notebook-tutorials/532 "2017-10-20T15:09:22Z")

</div>

Jupyter notebooks are a good way for doing tutorials, and I already use them like this: or here: Another example is this: While these types of tutorial repositories play very well with online rendering, problems…

---

## [On modifying immutables by reference in multithreaded code](https://discourse.julialang.org/t/on-modifying-immutables-by-reference-in-multithreaded-code/6580)

<div class="topic-metadata">

**Author:** [@foobar\_lv](https://discourse.julialang.org/u/foobar_lv)\
**Replies:** 2\
**Last updated:** [October 20, 2017, 3:05pm UTC](https://discourse.julialang.org/t/on-modifying-immutables-by-reference-in-multithreaded-code/6580 "2017-10-20T15:05:05Z")

</div>

One often needs to update immutables inplace. For example: immutable footype\_imm c1:: Int8 c2:: Int8 c3:: Int8 c4:: Int8 c5\_8::Int32 c9\_16::Int64 end function setfoo(A, idx, val) @inboun…

---

## [Print large Int with \_ separators](https://discourse.julialang.org/t/print-large-int-with---separators/6579)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [October 20, 2017, 2:34pm UTC](https://discourse.julialang.org/t/print-large-int-with---separators/6579 "2017-10-20T14:34:38Z")

</div>

This is part of the read syntax: julia\> 10\_000\_000 10000000 but how can I print numbers in this format? Just want integers. PS.: I can work around this with julia\> using Formatting julia\> replace(format(10^7, commas…

---

## [Problems with latest master of AWSS3](https://discourse.julialang.org/t/problems-with-latest-master-of-awss3/6576)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 0\
**Last updated:** [October 20, 2017, 3:44am UTC](https://discourse.julialang.org/t/problems-with-latest-master-of-awss3/6576 "2017-10-20T03:44:28Z")

</div>

Hello, I based on suggestion in https://github.com/JuliaWeb/Requests.jl/issues/171 I have moved to latest master in AWSS3.jl. Nevertheless, I experience errors and the whole library seems to be broken, as I have describ…

---

## [A simple http server for showing files in browser](https://discourse.julialang.org/t/a-simple-http-server-for-showing-files-in-browser/6561)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 4\
**Last updated:** [October 20, 2017, 3:31am UTC](https://discourse.julialang.org/t/a-simple-http-server-for-showing-files-in-browser/6561 "2017-10-20T03:31:12Z")

</div>

Usually my workflow involves generating batches at plots and then looking at them with my browser (I hate jupyter). A useful tool for this is the python module SimpleHTTPServer (which is only available in python 2). By…

---

## [\`2sqrt(2)\` is allowed, but \`2√2\` is not. Is this a bug?](https://discourse.julialang.org/t/2sqrt-2-is-allowed-but-2-2-is-not-is-this-a-bug/6544)

<div class="topic-metadata">

**Author:** [@Sleort](https://discourse.julialang.org/u/Sleort)\
**Replies:** 4\
**Last updated:** [October 20, 2017, 12:38am UTC](https://discourse.julialang.org/t/2sqrt-2-is-allowed-but-2-2-is-not-is-this-a-bug/6544 "2017-10-20T00:38:33Z")

</div>

The manual says | Function | Description | |:------------------------ |:------------------------------------------------------------------…

---

## [How to convert Any '5' to Int 5?](https://discourse.julialang.org/t/how-to-convert-any-5-to-int-5/6562)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 6\
**Last updated:** [October 19, 2017, 6:41pm UTC](https://discourse.julialang.org/t/how-to-convert-any-5-to-int-5/6562 "2017-10-19T18:41:34Z")

</div>

how to convert Any ‘5’ to Int 5 ? now ‘5’ is converted to 53 julia\> test 11449238-element Array{Any,1}: ‘5’ ‘1’ ‘1’ ‘1’ ‘1’ ‘1’ ‘2’ ‘2’ julia\> convert(Array{Int64},test) 11449238-element Array{Int64,1}: 53 …

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

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