# General Usage

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

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

**Page:** 1057

---

## [Julia processes on a NUMA dual processor machine](https://discourse.julialang.org/t/julia-processes-on-a-numa-dual-processor-machine/2943)

<div class="topic-metadata">

**Author:** [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Replies:** 2\
**Last updated:** [March 30, 2017, 9:42pm UTC](https://discourse.julialang.org/t/julia-processes-on-a-numa-dual-processor-machine/2943 "2017-03-30T21:42:19Z")

</div>

Hello, I have a program that spawns a number of julia processes and runs some code on them. The code uses @async in a way that is similar to the sample pmap code in the julia documentation. The problem that I am seei…

---

## [Stay in -i REPL after ERROR?](https://discourse.julialang.org/t/stay-in-i-repl-after-error/2873)

<div class="topic-metadata">

**Author:** [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Replies:** 6\
**Last updated:** [March 30, 2017, 6:48pm UTC](https://discourse.julialang.org/t/stay-in-i-repl-after-error/2873 "2017-03-30T18:48:15Z")

</div>

I am debugging my first Julia script with the -i flag. After an Error, the interactive REPL exits. Is there a way to remain in the repl to examine the variables, definitions, etc. that caused the error? Thank you!

---

## [Remove iterator in loop](https://discourse.julialang.org/t/remove-iterator-in-loop/2926)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 23\
**Last updated:** [March 30, 2017, 4:13pm UTC](https://discourse.julialang.org/t/remove-iterator-in-loop/2926 "2017-03-30T16:13:01Z")

</div>

I was wondering if there is a way to remove an iterator in a loop. For example, for obj in Objects if someCondition removeIterator(obj) end do other stuff... end There is a way to do this in Java.

---

## [Blogging with Julia code blocks](https://discourse.julialang.org/t/blogging-with-julia-code-blocks/2419)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 36\
**Last updated:** [March 30, 2017, 3:17pm UTC](https://discourse.julialang.org/t/blogging-with-julia-code-blocks/2419 "2017-03-30T15:17:31Z")

</div>

I started a blog (https://juliohm.github.io) where I am planning to use Julia for my examples. GitHub Pages and Jekyll are the recommended tools by GitHub and many people from the R community have developed plugins for r…

---

## [Check whether an array is read-only](https://discourse.julialang.org/t/check-whether-an-array-is-read-only/2949)

<div class="topic-metadata">

**Author:** [@cjb](https://discourse.julialang.org/u/cjb)\
**Replies:** 4\
**Last updated:** [March 30, 2017, 3:08pm UTC](https://discourse.julialang.org/t/check-whether-an-array-is-read-only/2949 "2017-03-30T15:08:31Z")

</div>

I am using mmaped arrays, and sometimes they are opened as read-only. i’d like to know, at run-time, whether an array is read-only, and if so make a copy so I can have a temporary modifiable version of it. Is there a fu…

---

## [More compact type info in stacktrace/errors for Unitful.jl](https://discourse.julialang.org/t/more-compact-type-info-in-stacktrace-errors-for-unitful-jl/2923)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 5\
**Last updated:** [March 30, 2017, 8:55am UTC](https://discourse.julialang.org/t/more-compact-type-info-in-stacktrace-errors-for-unitful-jl/2923 "2017-03-30T08:55:29Z")

</div>

Is it possible to somehow reduce the verbosity of the stacktrace regarding the type info. I rely on the use of units with unitful.jl and on the color types used within Images.jl. Btw. both packages are fantastic. Unfortu…

---

## [Using \`Core.Inference.return\_type\`](https://discourse.julialang.org/t/using-core-inference-return-type/2945)

<div class="topic-metadata">

**Author:** [@Evizero](https://discourse.julialang.org/u/Evizero)\
**Replies:** 10\
**Last updated:** [March 30, 2017, 8:44am UTC](https://discourse.julialang.org/t/using-core-inference-return-type/2945 "2017-03-30T08:44:15Z")

</div>

I discovered this function in 0.6 (EDIT: which apparently existed in 0.5 as well) and it addresses a task I have come across a couple of times in the past. Often I would like to query the return type of a specific method…

---

## [How to convert text to image with Images.jl?](https://discourse.julialang.org/t/how-to-convert-text-to-image-with-images-jl/2877)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 13\
**Last updated:** [March 30, 2017, 4:52am UTC](https://discourse.julialang.org/t/how-to-convert-text-to-image-with-images-jl/2877 "2017-03-30T04:52:36Z")

</div>

How to convert text stored in a Julia string to an image of given size? For example, let’s say we are given the word “Julia”, how can we generate the logo with WIDTHxHEIGHT pixels?

---

## [How to produce the code "f(a...,b...)"](https://discourse.julialang.org/t/how-to-produce-the-code-f-a-b/2950)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 5\
**Last updated:** [March 29, 2017, 5:28pm UTC](https://discourse.julialang.org/t/how-to-produce-the-code-f-a-b/2950 "2017-03-29T17:28:10Z")

</div>

I’m trying to generate the code f(a...,b...) from inside a macro. The following doesn’t seem to work because it adds an extra tuple around a... and b..., julia\> quote f($((:($i...) for i=\[:a,:b\])...)) …

---

## [How to optimaly save in JLD or HDF5 many Any arrays](https://discourse.julialang.org/t/how-to-optimaly-save-in-jld-or-hdf5-many-any-arrays/1569)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 0\
**Last updated:** [January 18, 2017, 1:08pm UTC](https://discourse.julialang.org/t/how-to-optimaly-save-in-jld-or-hdf5-many-any-arrays/1569 "2017-01-18T13:08:56Z")

</div>

How optimaly to save in JLD or HDF5 many arrays like below: for 1000 like this arrays JLD format is extremly huge . julia\> temp\_rekord 9-element Array{Any,1}: 1 “9600123” “20110101111100000000001019111110111110…

---

## [PyCall pyimport fails to import python submodules when embedding in C#](https://discourse.julialang.org/t/pycall-pyimport-fails-to-import-python-submodules-when-embedding-in-c/2191)

<div class="topic-metadata">

**Author:** [@stemann](https://discourse.julialang.org/u/stemann)\
**Replies:** 0\
**Last updated:** [February 20, 2017, 5:02pm UTC](https://discourse.julialang.org/t/pycall-pyimport-fails-to-import-python-submodules-when-embedding-in-c/2191 "2017-02-20T17:02:25Z")

</div>

Hi, We have stumbled upon a puzzling case where we are unable to import python submodules when embedding Julia in C#, e.g. @pyimport skimage.draw as draw works just fine in the Julia (0.5) REPL, but gives a null point…

---

## [Is ZMQ Socket still open?](https://discourse.julialang.org/t/is-zmq-socket-still-open/2655)

<div class="topic-metadata">

**Author:** [@kimran](https://discourse.julialang.org/u/kimran)\
**Replies:** 0\
**Last updated:** [March 14, 2017, 8:18am UTC](https://discourse.julialang.org/t/is-zmq-socket-still-open/2655 "2017-03-14T08:18:12Z")

</div>

How could I check whether a ZMQ Socket is still open/available/working? Sometimes a ZMQ.send just does not come back for me This can be after the socket and context have been created a long time ago I guess a timeout …

---

## [Flexible subseting](https://discourse.julialang.org/t/flexible-subseting/2948)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [March 29, 2017, 12:41pm UTC](https://discourse.julialang.org/t/flexible-subseting/2948 "2017-03-29T12:41:32Z")

</div>

Hi all- I’m trying to figure out a flexible way to subset an array of objects based on attributes. If I have 4 attributes, I could have as many as 15 specific functions. What I was hoping to do is reduce that down to as…

---

## [Strange failure in v0.6](https://discourse.julialang.org/t/strange-failure-in-v0-6/2911)

<div class="topic-metadata">

**Author:** [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Replies:** 12\
**Last updated:** [March 29, 2017, 11:25am UTC](https://discourse.julialang.org/t/strange-failure-in-v0-6/2911 "2017-03-29T11:25:19Z")

</div>

When trying to pre-compile one of our modules on v0.6, I got this strange inference failure. Everything works fine on v0.4.7, v0.5.0 and v0.5.1. The stack trace goes on and on, but never displays any information about …

---

## [Function name after parameters](https://discourse.julialang.org/t/function-name-after-parameters/2937)

<div class="topic-metadata">

**Author:** [@evoclue](https://discourse.julialang.org/u/evoclue)\
**Replies:** 2\
**Last updated:** [March 29, 2017, 2:12am UTC](https://discourse.julialang.org/t/function-name-after-parameters/2937 "2017-03-29T02:12:06Z")

</div>

Is it possible to define a function somehow in the manner below: function (X)zz X+X end Calling (1)zz would give you the value 2. My interest in this is purely aesthetic.

---

## [Submodule structs as "default" generic names](https://discourse.julialang.org/t/submodule-structs-as-default-generic-names/2931)

<div class="topic-metadata">

**Author:** [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Replies:** 1\
**Last updated:** [March 28, 2017, 9:07pm UTC](https://discourse.julialang.org/t/submodule-structs-as-default-generic-names/2931 "2017-03-28T21:07:07Z")

</div>

Here’s my current dilemma: I have a package/module M and within that, a submodule SA which exports structs AFoo and ABar. I would like, by default, the words M.Foo and M.Bar to refer to those two structs but I’d like oth…

---

## [Readcsv julia 0.6.0 not working properly](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905)

<div class="topic-metadata">

**Author:** [@davidbp](https://discourse.julialang.org/u/davidbp)\
**Replies:** 3\
**Last updated:** [March 28, 2017, 8:58pm UTC](https://discourse.julialang.org/t/readcsv-julia-0-6-0-not-working-properly/2905 "2017-03-28T20:58:41Z")

</div>

Hi guys, In Julia Version 0.6.0-pre.alpha.116 (Commit 0e970f0 (2017-03-10 19:40 UTC) I cannot use readcsv to read the following: "721","1438","1439","How does Quora quickly mark questions as needing improvement?","Why…

---

## [Installing and using package for rref](https://discourse.julialang.org/t/installing-and-using-package-for-rref/2932)

<div class="topic-metadata">

**Author:** [@monsij](https://discourse.julialang.org/u/monsij)\
**Replies:** 3\
**Last updated:** [March 28, 2017, 3:58pm UTC](https://discourse.julialang.org/t/installing-and-using-package-for-rref/2932 "2017-03-28T15:58:28Z")

</div>

Can someone please help me to install the packages from Windows command line.I want to implement rref functionality. It’s showing non registered beside every package name when I query Pkg.status().I have installed them m…

---

## [Inconsistent behaviour of Int/Date conversion](https://discourse.julialang.org/t/inconsistent-behaviour-of-int-date-conversion/2917)

<div class="topic-metadata">

**Author:** [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Replies:** 12\
**Last updated:** [March 28, 2017, 1:05pm UTC](https://discourse.julialang.org/t/inconsistent-behaviour-of-int-date-conversion/2917 "2017-03-28T13:05:04Z")

</div>

Converting from Integers to Dates interprets the relationship differently than converting Dates to Integers. I would assume it to be symmetric. When converting Int → Date, the integer value 1 is interpreted as 1 year. Wh…

---

## [Where should conversion methods for types from different packages go?](https://discourse.julialang.org/t/where-should-conversion-methods-for-types-from-different-packages-go/2916)

<div class="topic-metadata">

**Author:** [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Replies:** 3\
**Last updated:** [March 28, 2017, 12:18pm UTC](https://discourse.julialang.org/t/where-should-conversion-methods-for-types-from-different-packages-go/2916 "2017-03-28T12:18:38Z")

</div>

I think it would be great if the Julia ecosystem could stay connective but modular, so it doesn’t end up like the fragmented ecosystem of R. One thing that would be really nice is interoperability among different types u…

---

## [Replace NULLs in DataTable](https://discourse.julialang.org/t/replace-nulls-in-datatable/2910)

<div class="topic-metadata">

**Author:** [@abieler](https://discourse.julialang.org/u/abieler)\
**Replies:** 1\
**Last updated:** [March 28, 2017, 11:52am UTC](https://discourse.julialang.org/t/replace-nulls-in-datatable/2910 "2017-03-28T11:52:22Z")

</div>

Alternatives to doing df\[df\[:A\].isnull, :A\] = newValue for replacing NULLs in column :A of the DataTable df with “newValue”? From an earlier question I think that using .values and .isnull is not encouraged. Maybe a…

---

## [How to get linear indices of array along a slice k?](https://discourse.julialang.org/t/how-to-get-linear-indices-of-array-along-a-slice-k/2922)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 0\
**Last updated:** [March 28, 2017, 10:13am UTC](https://discourse.julialang.org/t/how-to-get-linear-indices-of-array-along-a-slice-k/2922 "2017-03-28T10:13:14Z")

</div>

Hey, I need to know all linear indices of an array along a certain dimension k, keeping all other dims fixed at some value. I want to know indices along that slice. I wanted to do A = ones(3,4,5) # what are the linear…

---

## [Another julia riddle - parallel processes](https://discourse.julialang.org/t/another-julia-riddle-parallel-processes/2900)

<div class="topic-metadata">

**Author:** [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Replies:** 1\
**Last updated:** [March 27, 2017, 7:22pm UTC](https://discourse.julialang.org/t/another-julia-riddle-parallel-processes/2900 "2017-03-27T19:22:17Z")

</div>

I have a module which starts a long running cycle of computation. How do I send it to another process , if I don’t want to define the process beforehand. I am looking for a way to dynamically add processes. something …

---

## [@linux\_only macros?](https://discourse.julialang.org/t/linux-only-macros/2815)

<div class="topic-metadata">

**Author:** [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Replies:** 3\
**Last updated:** [March 27, 2017, 11:13am UTC](https://discourse.julialang.org/t/linux-only-macros/2815 "2017-03-27T11:13:38Z")

</div>

I’m using (unintentionally, as i copied from someplace) an @linux\_only macro. I was thinking this is from BinDeps, but this seems not to be the case. Where is it from, and what is the 0.6 safe and backward compatible v…

---

## [Unexpected behavior of #==#](https://discourse.julialang.org/t/unexpected-behavior-of/2891)

<div class="topic-metadata">

**Author:** [@Till](https://discourse.julialang.org/u/Till)\
**Replies:** 9\
**Last updated:** [March 27, 2017, 10:04am UTC](https://discourse.julialang.org/t/unexpected-behavior-of/2891 "2017-03-27T10:04:32Z")

</div>

Hi, I was playing around with multi line comments (in Julia v0.5.1) , and got some interesting results. So I tried: julia\> my#=comment=#var = 0 (generic function with 1 method) And now I get: julia\> 3 \* 4 0 So I…

---

## [Problems with h5py after update](https://discourse.julialang.org/t/problems-with-h5py-after-update/2730)

<div class="topic-metadata">

**Author:** [@lukasfischer](https://discourse.julialang.org/u/lukasfischer)\
**Replies:** 5\
**Last updated:** [March 27, 2017, 10:01am UTC](https://discourse.julialang.org/t/problems-with-h5py-after-update/2730 "2017-03-27T10:01:12Z")

</div>

Hi, i was using h5py to access a specific dataset that is not yet supported by the HDF5 module. until lately, i was able to use f = h5py.File(filename, "r") aqLog = f\["AcquisitionLog"\]\["Log"\] logEntryDescription …

---

## [Overriding exported variables in Main after using, bad idea?](https://discourse.julialang.org/t/overriding-exported-variables-in-main-after-using-bad-idea/2875)

<div class="topic-metadata">

**Author:** [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)\
**Replies:** 4\
**Last updated:** [March 26, 2017, 12:11pm UTC](https://discourse.julialang.org/t/overriding-exported-variables-in-main-after-using-bad-idea/2875 "2017-03-26T12:11:56Z")

</div>

Is there something particularly wrong about doing something like that: module Module1 export A,B,f,g ... end using Module1 A = Module1.A B = Module1.B f = Module1.f g = Module1.g I have a macro that does that …

---

## [How to listen to a ZMQ subscriber in the separate thread or in parallel?](https://discourse.julialang.org/t/how-to-listen-to-a-zmq-subscriber-in-the-separate-thread-or-in-parallel/2884)

<div class="topic-metadata">

**Author:** [@kimran](https://discourse.julialang.org/u/kimran)\
**Replies:** 1\
**Last updated:** [March 26, 2017, 10:27am UTC](https://discourse.julialang.org/t/how-to-listen-to-a-zmq-subscriber-in-the-separate-thread-or-in-parallel/2884 "2017-03-26T10:27:32Z")

</div>

I have a ZMQ subscriber socket I want to constantly listen to this socket and react (call a callback method) whenever a message is received Perhaps like this: while true msg = ZMQ.recv(socket) callback(msg) end How…

---

## [Pass variable value to macro inside a for loop](https://discourse.julialang.org/t/pass-variable-value-to-macro-inside-a-for-loop/2879)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 3\
**Last updated:** [March 26, 2017, 1:19am UTC](https://discourse.julialang.org/t/pass-variable-value-to-macro-inside-a-for-loop/2879 "2017-03-26T01:19:11Z")

</div>

I’m trying to get the following lines of code to work, but @export\_all\_files keeps getting a symbol with: the value loaded\_folder instead of the folder it should be loaded (i.e. src or config/initializers) Why is tha…

---

## [Bind variable to element of an array](https://discourse.julialang.org/t/bind-variable-to-element-of-an-array/2849)

<div class="topic-metadata">

**Author:** [@jebej](https://discourse.julialang.org/u/jebej)\
**Replies:** 6\
**Last updated:** [March 25, 2017, 5:30pm UTC](https://discourse.julialang.org/t/bind-variable-to-element-of-an-array/2849 "2017-03-25T17:30:49Z")

</div>

I’m sure it is possible to bind a variable to an element of an array, but wasn’t able to figure out how, does anyone know?

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

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