# General Usage

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

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

**Page:** 1048

---

## [AWS S3 and JLD](https://discourse.julialang.org/t/aws-s3-and-jld/3915)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [May 26, 2017, 1:09pm UTC](https://discourse.julialang.org/t/aws-s3-and-jld/3915 "2017-05-26T13:09:21Z")

</div>

Hello All, I am working on large machine learning project, where data are stored in S3. My plan is to asynchronously download data to workers that would learn the Neural Network or do other magic on them. So far, I hav…

---

## [Best way to make myisapprox(a,b;kwds...) = Base.isapprox(a,b;kwds...) type stable?](https://discourse.julialang.org/t/best-way-to-make-myisapprox-a-b-kwds-base-isapprox-a-b-kwds-type-stable/3921)

<div class="topic-metadata">

**Author:** [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Replies:** 6\
**Last updated:** [May 26, 2017, 3:13am UTC](https://discourse.julialang.org/t/best-way-to-make-myisapprox-a-b-kwds-base-isapprox-a-b-kwds-type-stable/3921 "2017-05-26T03:13:24Z")

</div>

It is sometimes useful to extend Base functions behaviour by creating another function that passes through, for example: myisapprox(a,b;kwds...) = Base.isapprox(a,b;kwds...) # other overrides of myisapprox, which may in…

---

## [Escaping symbols in a call to \`@benchmarkable\`](https://discourse.julialang.org/t/escaping-symbols-in-a-call-to-benchmarkable/3934)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [May 25, 2017, 8:59pm UTC](https://discourse.julialang.org/t/escaping-symbols-in-a-call-to-benchmarkable/3934 "2017-05-25T20:59:08Z")

</div>

I am trying to create some benchmarks for the MixedModels package using BenchmarkTools. The instructions emphasize that you need to be careful about escaping symbols in a call to @benchmarkable but apparently I am not b…

---

## [How to ask users ("readline()") to provide a range?](https://discourse.julialang.org/t/how-to-ask-users-readline-to-provide-a-range/3924)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [May 25, 2017, 8:09pm UTC](https://discourse.julialang.org/t/how-to-ask-users-readline-to-provide-a-range/3924 "2017-05-25T20:09:23Z")

</div>

I need to ask users to provide a range, in the form of Start:Step:End, from command line… I tought to parse(StepRange,readline(()), but it doesn’t work: print("Please specify a range in the form Start:Step:End (default…

---

## [Signal's value depend on dialog window](https://discourse.julialang.org/t/signals-value-depend-on-dialog-window/3927)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 1\
**Last updated:** [May 25, 2017, 8:00pm UTC](https://discourse.julialang.org/t/signals-value-depend-on-dialog-window/3927 "2017-05-25T20:00:39Z")

</div>

I’m using Gtk and GtkReactive I want to make the value of a Signal depend on input from a newly spawned window. How do I make a Signal open a dialog-window (a new window with some widgets in it) and have said Signal’s …

---

## [Dead Kernels in IJulia on Windows](https://discourse.julialang.org/t/dead-kernels-in-ijulia-on-windows/3914)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 6\
**Last updated:** [May 25, 2017, 3:20pm UTC](https://discourse.julialang.org/t/dead-kernels-in-ijulia-on-windows/3914 "2017-05-25T15:20:10Z")

</div>

Try as I might, there is a single computer that I can’t seem to get IJulia working on. It’s likely a Windows issue, so I’m hoping someone here could spot what it is. https://github.com/JuliaLang/IJulia.jl/issues/546 Lo…

---

## [Converting byte array to an array of another primitive type](https://discourse.julialang.org/t/converting-byte-array-to-an-array-of-another-primitive-type/3922)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 6\
**Last updated:** [May 25, 2017, 3:17pm UTC](https://discourse.julialang.org/t/converting-byte-array-to-an-array-of-another-primitive-type/3922 "2017-05-25T15:17:03Z")

</div>

If I have a byte array generated from an array of Float64 numbers, how can I get back the array of Float64 numbers?

---

## [Two small testing questions](https://discourse.julialang.org/t/two-small-testing-questions/3837)

<div class="topic-metadata">

**Author:** [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Replies:** 8\
**Last updated:** [May 25, 2017, 3:15pm UTC](https://discourse.julialang.org/t/two-small-testing-questions/3837 "2017-05-25T15:15:32Z")

</div>

How to choose 0.6 for appveyor testing? nightly now points to 0.7 Can coveralls.io be configured to display the highest coverage within a set of build?

---

## [Fastest way to write to and delete from the end of a file and for general editing](https://discourse.julialang.org/t/fastest-way-to-write-to-and-delete-from-the-end-of-a-file-and-for-general-editing/3917)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 7\
**Last updated:** [May 25, 2017, 5:09am UTC](https://discourse.julialang.org/t/fastest-way-to-write-to-and-delete-from-the-end-of-a-file-and-for-general-editing/3917 "2017-05-25T05:09:39Z")

</div>

Hello A significant part of my program is to communicate some data back and forth through files, and I would like to maximize the speed of editing a file. Most of the time I will be writing new lines to the end of the f…

---

## [Passing bytes instead strings in PyCall.jl](https://discourse.julialang.org/t/passing-bytes-instead-strings-in-pycall-jl/3880)

<div class="topic-metadata">

**Author:** [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Replies:** 2\
**Last updated:** [May 24, 2017, 4:49pm UTC](https://discourse.julialang.org/t/passing-bytes-instead-strings-in-pycall-jl/3880 "2017-05-24T16:49:37Z")

</div>

With Python 3 as a backend, what’s the solution to this error? julia\> writer("a") ERROR: PyError (ccall(@pysym(:PyObject\_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C\_NULL)) \<class 'TypeError'\> TypeError('expected byte…

---

## [Error: \`@compat\` called with wrong number of arguments](https://discourse.julialang.org/t/error-compat-called-with-wrong-number-of-arguments/3911)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 5\
**Last updated:** [May 24, 2017, 3:20pm UTC](https://discourse.julialang.org/t/error-compat-called-with-wrong-number-of-arguments/3911 "2017-05-24T15:20:46Z")

</div>

Appveyor gets the following error from Compat 0.25.2 on Julia 0.5.2: ERROR: LoadError: LoadError: syntax: unhandled expr (error #\<julia: Base.ArgumentError(msg="@compat called with wrong number of arguments: (:struct,:(…

---

## [YAML.jl Custom Tag Constructor Example: !include](https://discourse.julialang.org/t/yaml-jl-custom-tag-constructor-example-include/3900)

<div class="topic-metadata">

**Author:** [@joshbode](https://discourse.julialang.org/u/joshbode)\
**Replies:** 0\
**Last updated:** [May 24, 2017, 7:42am UTC](https://discourse.julialang.org/t/yaml-jl-custom-tag-constructor-example-include/3900 "2017-05-24T07:42:21Z")

</div>

YAML.jl has recently gained support for custom tag constructors (YAML.jl/pull/33) and to understand how they work, I thought I’d try it out to implement an !include tag that can be used to include/merge the contents of a…

---

## [@compat macro](https://discourse.julialang.org/t/compat-macro/3899)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 3\
**Last updated:** [May 24, 2017, 6:57am UTC](https://discourse.julialang.org/t/compat-macro/3899 "2017-05-24T06:57:45Z")

</div>

Could someone please explain how the compat macro works from Compat.jl? I went through the source code, but it wasn’t very clear. It seems to enable defining constructors for families of types simultaneously, is that rig…

---

## [Freeing all Variables, File Handles and Resources inside a Script](https://discourse.julialang.org/t/freeing-all-variables-file-handles-and-resources-inside-a-script/3867)

<div class="topic-metadata">

**Author:** [@phrb](https://discourse.julialang.org/u/phrb)\
**Replies:** 3\
**Last updated:** [May 24, 2017, 5:08am UTC](https://discourse.julialang.org/t/freeing-all-variables-file-handles-and-resources-inside-a-script/3867 "2017-05-24T05:08:42Z")

</div>

Hi, I am developing a package that, among other things, runs user-defined functions that may allocate data, open an write to files and run external programs. Is there a function similar to workspace() that I can call in…

---

## [A curious case of allocating behavior](https://discourse.julialang.org/t/a-curious-case-of-allocating-behavior/3896)

<div class="topic-metadata">

**Author:** [@traktofon](https://discourse.julialang.org/u/traktofon)\
**Replies:** 2\
**Last updated:** [May 24, 2017, 3:52am UTC](https://discourse.julialang.org/t/a-curious-case-of-allocating-behavior/3896 "2017-05-24T03:52:38Z")

</div>

Hello, while trying to implement a kind of array where each element is computed on demand by a function (the goal is to avoid storing the full array – it’s a generalized version of what is discussed here), I encountered…

---

## [PyCall, @pyimport in a function](https://discourse.julialang.org/t/pycall-pyimport-in-a-function/3889)

<div class="topic-metadata">

**Author:** [@mwsohn](https://discourse.julialang.org/u/mwsohn)\
**Replies:** 2\
**Last updated:** [May 24, 2017, 1:02am UTC](https://discourse.julialang.org/t/pycall-pyimport-in-a-function/3889 "2017-05-24T01:02:31Z")

</div>

I found that @pyimport works well in the global scope but it doesn’t inside a function. For example, using PyCall @pyimport xlsxwriter works. But using PyCall function testxls() @pyimport xlsxwriter end testxls(…

---

## [How to input latex characters into vscode?](https://discourse.julialang.org/t/how-to-input-latex-characters-into-vscode/3861)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 9\
**Last updated:** [May 23, 2017, 6:02pm UTC](https://discourse.julialang.org/t/how-to-input-latex-characters-into-vscode/3861 "2017-05-23T18:02:41Z")

</div>

I am using the Julia extension for VScode: The autocompletion is very decent. But I dont know how to input latex characters? For example, I tried \\alpha + TAB but it does not work.

---

## [Size of a bitstype](https://discourse.julialang.org/t/size-of-a-bitstype/3882)

<div class="topic-metadata">

**Author:** [@ulysses](https://discourse.julialang.org/u/ulysses)\
**Replies:** 1\
**Last updated:** [May 23, 2017, 5:09pm UTC](https://discourse.julialang.org/t/size-of-a-bitstype/3882 "2017-05-23T17:09:16Z")

</div>

I can find out is a type is bitstype with Base.isbits. Is it possible to find out the size of a bitstype-type also?

---

## [Start repl from non-interactive session](https://discourse.julialang.org/t/start-repl-from-non-interactive-session/3532)

<div class="topic-metadata">

**Author:** [@nico202](https://discourse.julialang.org/u/nico202)\
**Replies:** 5\
**Last updated:** [May 23, 2017, 4:09pm UTC](https://discourse.julialang.org/t/start-repl-from-non-interactive-session/3532 "2017-05-23T16:09:31Z")

</div>

Hi, I cannot find this question elsewhere. I want to be able to start the REPL from a julia script if a certain condition occurs (for debugging purpose/fixing bugs live) without having to include(“program.jl”) directly f…

---

## [Test date validity](https://discourse.julialang.org/t/test-date-validity/3875)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [May 23, 2017, 1:10pm UTC](https://discourse.julialang.org/t/test-date-validity/3875 "2017-05-23T13:10:00Z")

</div>

Is there a way to test the validity of a date other than function test\_date(y::Int, m::Int, d::Int)::Nullable{Date} try return Nullable{Date}(Date(y, m, d)) catch return Nullable{Date}() end …

---

## [One vs 1 in algebra](https://discourse.julialang.org/t/one-vs-1-in-algebra/3874)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [May 23, 2017, 12:34pm UTC](https://discourse.julialang.org/t/one-vs-1-in-algebra/3874 "2017-05-23T12:34:48Z")

</div>

I am writing functions which are basically algebra coded up (from an economic model), with code like (1-βᵢ)\*(1-αᵢ)\*ωᵢ / ((1-βᵢ + γᵢ\*βᵢ)\*(1-αᵢ)\*ωᵢ + γᵢβₖ\*(1-αₖ)\*ωₖ) and it gets worse. They should work with Float64, Rati…

---

## [Error in Images.jl example code](https://discourse.julialang.org/t/error-in-images-jl-example-code/3739)

<div class="topic-metadata">

**Author:** [@phlavenk](https://discourse.julialang.org/u/phlavenk)\
**Replies:** 5\
**Last updated:** [May 23, 2017, 12:18pm UTC](https://discourse.julialang.org/t/error-in-images-jl-example-code/3739 "2017-05-23T12:18:34Z")

</div>

I’ve tried the example code found in documentation of Images.jl Image-algorithms for the warp function. Unfortunately the code does emit error: using Images, CoordinateTransformations, TestImages, OffsetArrays img = te…

---

## [BigInt to hex and back to Bigint](https://discourse.julialang.org/t/bigint-to-hex-and-back-to-bigint/3873)

<div class="topic-metadata">

**Author:** [@hyperx](https://discourse.julialang.org/u/hyperx)\
**Replies:** 4\
**Last updated:** [May 23, 2017, 8:52am UTC](https://discourse.julialang.org/t/bigint-to-hex-and-back-to-bigint/3873 "2017-05-23T08:52:21Z")

</div>

Trying to convert hexadecimal strings of VERY big positive numbers back to integers but so far no good. Tried with hex2num but i get an overflow as number is too big. hexnum “e239f9b3d621a86f8b1ab51cbfa73900d40cc2830f…

---

## [Setting up Own CI server](https://discourse.julialang.org/t/setting-up-own-ci-server/3870)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 3\
**Last updated:** [May 23, 2017, 7:03am UTC](https://discourse.julialang.org/t/setting-up-own-ci-server/3870 "2017-05-23T07:03:24Z")

</div>

I’ve been using AppVeyor and Travis for years now. It is super simple, since PkgDev does ll the work of generating the configs for your. I think I would like to setup my own CI server, on one of my spare OpenStack inst…

---

## [Time-space trade-off algorithms: memory management](https://discourse.julialang.org/t/time-space-trade-off-algorithms-memory-management/3843)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 3\
**Last updated:** [May 23, 2017, 2:35am UTC](https://discourse.julialang.org/t/time-space-trade-off-algorithms-memory-management/3843 "2017-05-23T02:35:21Z")

</div>

I am currently writing a time-space trade-off library for stacks structures (exchange little time efficiency for huge memory improvement). I write features done either in c++ or Julia, and then port them into the other l…

---

## [Questions on Advanced Type Manipulation](https://discourse.julialang.org/t/questions-on-advanced-type-manipulation/3862)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 4\
**Last updated:** [May 22, 2017, 10:31pm UTC](https://discourse.julialang.org/t/questions-on-advanced-type-manipulation/3862 "2017-05-22T22:31:53Z")

</div>

I have a few questions on manipulating types: What is the difference between how promote\_type and typejoin work? Isn’t it inaccurate to interpret typejoin as a set union, as it is described in the documentation, wh…

---

## [Weird hash behavior](https://discourse.julialang.org/t/weird-hash-behavior/3854)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 4\
**Last updated:** [May 22, 2017, 5:40pm UTC](https://discourse.julialang.org/t/weird-hash-behavior/3854 "2017-05-22T17:40:18Z")

</div>

I have a custom type, and I defined == for it. I’m trying to delete! one member in a OrderedDict but it doesn’t work. I traced down the problem to the following behavior: using DataStructures import Base: == n = 2 type …

---

## [Broadcast over . (getfield) in 0.6](https://discourse.julialang.org/t/broadcast-over-getfield-in-0-6/2335)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [May 22, 2017, 2:05pm UTC](https://discourse.julialang.org/t/broadcast-over-getfield-in-0-6/2335 "2017-05-22T14:05:50Z")

</div>

In 0.6 I can do immutable MyType a b end pairs = \[MyType(i,2\*i) for i in 1:10\] getfield.(pairs, :a) but I can’t figure out the broadcast syntax for ., ie how to deal with two dots: pairs..a # where to put ()'s…

---

## [Short circuit operators](https://discourse.julialang.org/t/short-circuit-operators/3846)

<div class="topic-metadata">

**Author:** [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Replies:** 6\
**Last updated:** [May 22, 2017, 1:29pm UTC](https://discourse.julialang.org/t/short-circuit-operators/3846 "2017-05-22T13:29:02Z")

</div>

is the last line intended behaviour? julia\> false || println("Here") Here julia\> true || println("Here") true julia\> false && println("Here") false julia\> true && println("Here") Here julia\> true && false || println…

---

## [Atom 1.17 broke Juno?](https://discourse.julialang.org/t/atom-1-17-broke-juno/3831)

<div class="topic-metadata">

**Author:** [@asampal](https://discourse.julialang.org/u/asampal)\
**Replies:** 2\
**Last updated:** [May 22, 2017, 7:16am UTC](https://discourse.julialang.org/t/atom-1-17-broke-juno/3831 "2017-05-22T07:16:05Z")

</div>

My Atom just updated to 1.17 and something seems to have broken. I can’t even type anything in the console. If I start Julia from Atom, it seems to do something for a little while, but then, nothing. Anyone else having p…

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

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