Re: [julia-users] how to set the maximal waiting time for ClusterManagers.addprocs_sge()?

2016-06-01 Thread Florian Oswald
Yes this seems to be ten same issue. When my cluster is heavily loaded it sometimes is so slow that I hit the 60sec limit anyway. Why don't we just grab the list of nodes from the sge env variable PE_HOSTFILE as soon as this becomes available and put that list into a simple addprocs( machines )

[julia-users] ANN: DC.jl - automagical linked plots in your IJulia Notebook

2016-06-01 Thread Tim Wheeler
Hello Julia Users, We are happy to announce DC.jl - a package which gives you the power of DC.js in your IJulia notebook. The premise is simple: put in a DataFrame and you get out a nice set of charts that you can

[julia-users] Re: Importing Functions on Different Workers

2016-06-01 Thread ABB
That does work. Thank you very much. Is it possible that a difference is made by using addprocs() after I have the REPL running vs. starting the program as "julia -p N" for some N? I ask because I am (nearly) sure my module was defined the way you suggest earlier today and it was giving me

[julia-users] Re: Importing Functions on Different Workers

2016-06-01 Thread 'Greg Plowman' via julia-users
I find that putting everything required on workers into a module is the way to go. Then just use using Module (after adding workers) This works for me (v0.4.5): ProjectModule.jl: module ProjectModule using DataFrames include("function1.jl") export function1 end function1.jl:

Re: [julia-users] Using pmap in julia

2016-06-01 Thread Martha White
Thank you for the prompt reply! No, I am not using either open or mmap. On Wednesday, June 1, 2016 at 12:20:19 PM UTC-4, Stefan Karpinski wrote: > > Are you opening files via open or mmap in any of the functions > that learningExperimentRun calls? > > On Wed, Jun 1, 2016 at 11:42 AM, Martha

Re: [julia-users] Reading from a TCP socket with quasi-continuous data transfer

2016-06-01 Thread Joshua Jones
On Wednesday, June 1, 2016 at 5:36:44 AM UTC-7, Isaiah wrote: > > > Yes: using multiprocess parallelism instead of tasks. '@everywhere' > executes code on other processes that do not share the same address space > as the head process and cannot access the same socket. See the section on > Tasks

Re: [julia-users] Plots.jl bar width and color

2016-06-01 Thread Tom Breloff
I think I implemented 'bar_width' recently. Might depend on backend? You can always look at the src/args.jl code to get ideas of what is implemented (until good docs are ready of course) On Wednesday, June 1, 2016, Andre Bieler wrote: > Great, > > what about the width

Re: [julia-users] Plots.jl bar width and color

2016-06-01 Thread Andre Bieler
Great, what about the width of the bars?

[julia-users] Re: Using Julia for real time astronomy

2016-06-01 Thread Cedric St-Jean
Apparently, ITA Software (Orbitz) was written nearly entirely in Lisp, with 0 heap-allocation during runtime to have performance guarantees. It's pretty inspiring , in a I-crossed-the-Himalayas-barefoot kind of way. On Wednesday, June 1, 2016 at 5:59:15 PM

[julia-users] Re: random number generation

2016-06-01 Thread David P. Sanders
El miércoles, 1 de junio de 2016, 14:24:01 (UTC-4), Michela Di Lullo escribió: > > How can I do to generate 6 *different* integer random numbers between 1 > and 14? > This is known as "sampling without replacement" and is implemented in StatsBase.jl; documentation here:

[julia-users] Importing Functions on Different Workers

2016-06-01 Thread ABB
Hello - I have the following problem: I would like to find a good way to import a collection of user-defined functions across several workers. Some of my functions are defined on DataFrames, but "using DataFrames" is not getting me anywhere on the other workers. I think the problem I am

[julia-users] Re: Arithmetic with TypePar

2016-06-01 Thread Cedric St-Jean
I really doubt that it can be expressed this way, because Julia will do pattern matching/unification on the type of `bar`, and it would have to know that -1 is the inverse of +1 to unify D+1 with the type of the input array. Can you give more context about what you're trying to do? Why can't

[julia-users] Re: how to set the maximal waiting time for ClusterManagers.addprocs_sge()?

2016-06-01 Thread David van Leeuwen
Could this be related to this ? On Wednesday, June 1, 2016 at 7:26:50 PM UTC+2, Florian Oswald wrote: > > i'm having a problem on a cluster where setting up the connections via > ClusterManagers.addprocs_sge() takes

[julia-users] Re: Using Julia for real time astronomy

2016-06-01 Thread Páll Haraldsson
On Wednesday, June 1, 2016 at 9:40:54 AM UTC, John leger wrote: > > So for now the best is to build a toy that is equivalent in processing > time to the original and see by myself what I'm able to get. > We have many ideas, many theories due to the nature of the GC so the best > is to try. > >

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Ford Ox
You have created Vector. I want to create 2D array. IMO the use of space as hcat is very error prone. Why dont we use for example "," as hcat? After all you dont need ",", when you have ";". Why should we have two ways of doing exactly the same thing? Same goes for "for i in 1:10" and "for i =

Re: [julia-users] Plots.jl bar width and color

2016-06-01 Thread Tom Breloff
You can use any Colors.Colorant, or arrays of them: c = [:blue, RGB(1,0,0), RGBA(1,0,0,0.2)] On Wed, Jun 1, 2016 at 2:23 PM, Andre Bieler wrote: > How can I set the with of bars in a bar plot. > > say for > > ```julia > bar([1,2,3], [4,6,3]) > ``` > > Is it possible to

Re: [julia-users] random number generation

2016-06-01 Thread cdm
this method does not exclude the possibility that the same integer turns up more than once among the six ... julia> rand(1:14, 6) 6-element

Re: [julia-users] random number generation

2016-06-01 Thread cdm
a solution, among many: sub(randperm(14), 1:6) enjoy !!!

Re: [julia-users] filter() function edge case, possible bug.

2016-06-01 Thread Anonymous
ok I just filed one. On Wednesday, June 1, 2016 at 5:16:04 AM UTC-7, Mauro wrote: > > Yes, this is a bug: ranges should behave as vectors in read-only > situations. I suspect that this is on the radar of the devs already as > there is quite a bit of work happening in this area. But still

Re: [julia-users] random number generation

2016-06-01 Thread Michele Zaffalon
shuffle(collect(1:14))[1:6] but I remember seeing a method that picks n random elements from an array. By the way, shuffle(1:14) does not seem to work. On Wed, Jun 1, 2016 at 8:32 PM, El suisse wrote: > I think like this: > > `rand(1:14, 6)` > > 2016-06-01 15:24 GMT-03:00

[julia-users] Arithmetic with TypePar

2016-06-01 Thread Robert DJ
I have a custom type with a TypePar denoting a dimension and would like to define the following: type Foo{D} bar::Array{D+1} end However, this does not work. As D is only 1 or 2 it would OK with type Foo{1} bar::Matrix end type Foo{2} bar::Array{3} end but unfortunately this isn't working,

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Andreas Lobinger
On Wednesday, June 1, 2016 at 8:49:44 PM UTC+2, Ford Ox wrote: > > When we are on this topic > > Why does > [1 + 2] > result in > [3] > instead of > [1 + 2] > > well, in v0.5 with the correct element limiter _ _ _ _(_)_ | A fresh approach to technical computing

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Ford Ox
When we are on this topic Why does [1 + 2] result in [3] instead of [1 + 2] like any other function would do: foo() = nothing [1 foo 2] > [1 foo 2] > I don't think it should be considered a function call. What if you want to do something like this: [ + - ; * / ; ^ log; ] On Wednesday,

Re: [julia-users] random number generation

2016-06-01 Thread El suisse
I think like this: `rand(1:14, 6)` 2016-06-01 15:24 GMT-03:00 Michela Di Lullo : > How can I do to generate 6 *different* integer random numbers between 1 > and 14? > > Thanks in advance to who will answer, > > M. > > ___ >

[julia-users] random number generation

2016-06-01 Thread Michela Di Lullo
How can I do to generate 6 *different* integer random numbers between 1 and 14? Thanks in advance to who will answer, M. -- ___ INVESTI SUL FUTURO, FAI CRESCERE L’UNIVERSITÀ: *DONA IL 5 PER MILLE ALLA SAPIENZA* CODICE FISCALE *80209930587*

[julia-users] Plots.jl bar width and color

2016-06-01 Thread Andre Bieler
How can I set the with of bars in a bar plot. say for ```julia bar([1,2,3], [4,6,3]) ``` Is it possible to pick colors that are not defined as keywords like :black, :grey. etc? Something like #BFBFBF Cheers, Andre

[julia-users] Multiple subplots in Gadfly

2016-06-01 Thread Alain Cuvillier
Hi, I have some plots of functions in Gadfly, for example: plot(sin, 0, 4) plot(cos, 0, 4) ... How can I do a plot containing this functions as subplots in a grid? I tried with Geom.subplot_grid but all the examples I found are based on DataFrame, not functions. Thank you!

[julia-users] Regression of promote with 6 or more arguments in Julia 0.5

2016-06-01 Thread Mosè Giordano
Hi all, I'm noticing a large (factor of >100) regression of performance of promote function when fed with more than 5 arguments ("julia" is Julia 0.4.5; "./julia" is the official current nightly build, version 0.5.0-dev+4438, commit aa1ce87): % julia -e 'using Benchmarks;print(@benchmark

[julia-users] how to set the maximal waiting time for ClusterManagers.addprocs_sge()?

2016-06-01 Thread Florian Oswald
i'm having a problem on a cluster where setting up the connections via ClusterManagers.addprocs_sge() takes longer than the 60 second limit. how can I extend that limit? thanks!

Re: [julia-users] Using pmap in julia

2016-06-01 Thread Stefan Karpinski
Are you opening files via open or mmap in any of the functions that learningExperimentRun calls? On Wed, Jun 1, 2016 at 11:42 AM, Martha White wrote: > I am having difficulty understanding how to use pmap in Julia. I am a > reasonably experienced matlab and c

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Lutfullah Tomak
Thanks for the tip. It makes sense. I did not pay attention that the given function does not returns but I always assumed that timings of for-loop should not change before even if the function does not return bar. Also, on julia 0.4, it is strange that after first run my last timing

[julia-users] Using pmap in julia

2016-06-01 Thread Martha White
I am having difficulty understanding how to use pmap in Julia. I am a reasonably experienced matlab and c programmer. However, I am new to Julia and to using parallel functions. I am running an experiment with nested for loops, benchmarking different algorithms. In the inner loop, I am

Re: [julia-users] Re: Double free or corruption (out)

2016-06-01 Thread 'Bill Hart' via julia-users
I've checked that the problem we were having doesn't happen with Julia 0.4.5 on Travis. In fact, it also doesn't happen on another one of our systems with Julia 0.4.5, so at this stage we have no idea what the problem is. It may be totally unrelated to the problem you are having. Bill. On 31 May

Re: [julia-users] Context manager and Julia (with...)

2016-06-01 Thread Stefan Karpinski
See also https://github.com/JuliaLang/julia/issues/7721 On Wed, Jun 1, 2016 at 10:26 AM, Erik Schnetter wrote: > Julia has a similar feature that is built on closures. See the "do > notation" in the manual. For example: > > ```Julia > open("file", "r") do f > @show

Re: [julia-users] Context manager and Julia (with...)

2016-06-01 Thread Erik Schnetter
Julia has a similar feature that is built on closures. See the "do notation" in the manual. For example: ```Julia open("file", "r") do f @show readline(f) end ``` -erik On Wed, Jun 1, 2016 at 10:18 AM, Femto Trader wrote: > Hello, > > Python have a nice concept

[julia-users] Context manager and Julia (with...)

2016-06-01 Thread Femto Trader
Hello, Python have a nice concept called "context manager" (see "with" statement) http://book.pythontips.com/en/latest/context_managers.html With this concept it's quite easy to open a file without having to close it. Yattag, for example, use this concept to create XML files. You just need to use

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Scott Jones
Good catch! I'd already added returning bar to my parameterized Julia version, comparing the two now on my machine, they are essentially identical in performance. Still, writing 1/3 the code (and having it much more readable), having generic code that would also work for complex, integer,

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Kristoffer Carlsson
Remember to actually return bar when you benchmark the julia code. Also, you are not running the fortran code with optimizations on: ➜ Documents gfortran test.f -O2; ./a.out 0.01 seconds Making sure that bar is actually used: ➜ Documents gfortran test.f -O2; ./a.out 0.047754 seconds

Re: [julia-users] Plots gadfly

2016-06-01 Thread Tom Breloff
This might have been a deprecation warning from Plots that Gadfly isn't supported with the development branches of Plots. I don't have the capacity to update the backend code to handle the big internal rebuild that I'm finishing, so for now Gadfly gets a warning message. I'll post a more complete

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Yichao Yu
On Wed, Jun 1, 2016 at 8:37 AM, DNF wrote: > Out of curiosity: My understanding has been that type instabilities are > related to the compiler not being able to predict the types of variables > based on input types, not variables simply (and predictably) changing types > during

[julia-users] Re: Getting sequence of time and subset it

2016-06-01 Thread Evan Fields
Of course there's a way :) You can use the isna function to check if a value is NA or not. There's also the dropna function which takes a DataArray as input and returns a regular Vector with the NA elements removed. You could try something like the following: firstbreakcol = 4 lastbreakcol =

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Mosè Giordano
Oh my bad, this was really easy to fix! I usually do inspect the code with @code_warntype but missed to do the same this time. Lesson learned. Now the same loop is about ~30 times faster in Julia than in Fortran, really impressive. Thank you all for the prompt comments! Bye, Mosè 2016-06-01

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Mauro
On Wed, 2016-06-01 at 14:37, DNF wrote: > Out of curiosity: My understanding has been that type instabilities are > related to the compiler not being able to predict the types of variables > based on input types, not variables simply (and predictably) changing types > during

Re: [julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Erik Schnetter
You can use `@simd` with the innermost loop. (It really should be extended to work with loop nests as well, but that hasn't been done yet.) Here is how `@simd` would look in your case: ```Julia @inbounds for l = 1:1000, k = 1:20, j = 1:20 @simd for i = 1:70 bar = bar + (array1[i, l] -

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread DNF
Out of curiosity: My understanding has been that type instabilities are related to the compiler not being able to predict the types of variables based on input types, not variables simply (and predictably) changing types during program execution. Should the compiler ideally be able to catch

Re: [julia-users] Reading from a TCP socket with quasi-continuous data transfer

2016-06-01 Thread Isaiah Norton
On Wednesday, June 1, 2016, Joshua Jones < highly.creative.pseudo...@gmail.com> wrote: > >>>1. I've read (here and elsewhere) that Julia does an implicit block >>>while waiting for data. Is there a workaround? >>> >>> Do the blocking read asynchronously in a task. For network I/O (but not

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Kristoffer Carlsson
The previous timings are too fast because they are not returning bar which makes the compiler remove a bunch of stuff. On Wednesday, June 1, 2016 at 2:14:48 PM UTC+2, Scott Jones wrote: > > Is that last timing correct? That's 10x faster than I get. > > My version of the Julia code (I

Re: [julia-users] filter() function edge case, possible bug.

2016-06-01 Thread Mauro
Yes, this is a bug: ranges should behave as vectors in read-only situations. I suspect that this is on the radar of the devs already as there is quite a bit of work happening in this area. But still filing a bug report, if one does not exist yet, is probably the right thing to do. On Wed,

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Scott Jones
Is that last timing correct? That's 10x faster than I get. My version of the Julia code (I parameterized it, so that it doesn't have to be Float64, could be complex, integer, rational, decimal float, whatever floats your boat!) function foo{T<:Number}(array1::Matrix{T}, array2::Matrix{T},

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Lutfullah Tomak
Ok, I revise what I said about @ simd, according to documentation, it only works for one dimensional ranges and it does not allow this type for-loop and throws error. Here is timings for me julia> function foo() array1 = rand(70, 1000) array2 = rand(70, 1000)

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Lutfullah Tomak
Since it is in function, it is not timing copile time but only for-loop. If it were in @time foo() it would time compilation. On Wednesday, June 1, 2016 at 2:30:16 PM UTC+3, Andreas Lobinger wrote: > > It's valid and interesting to measure full roundtrip including compile > time like you do,

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Andreas Lobinger
It's valid and interesting to measure full roundtrip including compile time like you do, however in examples like this, the julia overhead on compiling dominates your measurement. You could put your code into a package and pre-compile. In any case your not measuring the time to run the code

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Andras Niedermayer
The code becomes about 10 times faster on my computer if I replace "bar=0" with "bar=0.0", see http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-changing-the-type-of-a-variable (Also running "foo()" twice avoids measuring JIT compilation.) On Wednesday, June 1, 2016 at

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Lutfullah Tomak
First thing I caught in your code http://docs.julialang.org/en/release-0.4/manual/performance-tips/#avoid-changing-the-type-of-a-variable make bar non-type-changing function foo() array1 = rand(70, 1000) array2 = rand(70, 1000) array3 = rand(2, 70, 20, 20) bar = 0.0 @time for

[julia-users] Re: Is Julia slow with large arrays?

2016-06-01 Thread Mr.Ed.
using @code_warntype suggests that you should change bar=0 to bar=0.0 (or bar::Float64 = 0) i think... (newbie here)

[julia-users] Is Julia slow with large arrays?

2016-06-01 Thread Mosè Giordano
Hi all, I'm working on a Fortran77 code, but I'd much prefer to translate it to Julia. However, I've the impression that when working with large arrays (of the order of tens of thousands elements) Julia is way slower than the equivalent Fortran code. See the following examples: Julia:

Re: [julia-users] Plots gadfly

2016-06-01 Thread Samuele Carcagno
On 01/06/16 09:44, Henri Girard wrote: Gadfly is deprecated : Does it mean we shouldn't use it anymore ? I am trying to use it but I got a long list of recompiling ? What can I use instead ? I don't want to use plotly because I don't want to have a password (which doesn't work properly either !)

Re: [julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Kristoffer Carlsson
Original poster (the person who made the thread). On Wednesday, June 1, 2016 at 12:22:46 PM UTC+2, Michele Zaffalon wrote: > > What is OP? > > On Wed, Jun 1, 2016 at 12:14 PM, Milan Bouchet-Valat > wrote: > >> Le mercredi 01 juin 2016 à 02:35 -0700, Lutfullah Tomak a écrit :

Re: [julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Michele Zaffalon
What is OP? On Wed, Jun 1, 2016 at 12:14 PM, Milan Bouchet-Valat wrote: > Le mercredi 01 juin 2016 à 02:35 -0700, Lutfullah Tomak a écrit : > > julia> b_prime = ["8",9,10,c] > > > > This works with Any. > > > > julia> Any["3", 4, 14, c] > > 4-element Array{Any,1}: > >"3"

Re: [julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Milan Bouchet-Valat
Le mercredi 01 juin 2016 à 02:35 -0700, Lutfullah Tomak a écrit : > julia> b_prime = ["8",9,10,c] > > This works with Any. > > julia> Any["3", 4, 14, c] > 4-element Array{Any,1}: >    "3"         >   4            >  14            >    Any[10,"c"] > Yes, for now you need to use that syntax. In

[julia-users] Re: Using Julia for real time astronomy

2016-06-01 Thread John leger
So for now the best is to build a toy that is equivalent in processing time to the original and see by myself what I'm able to get. We have many ideas, many theories due to the nature of the GC so the best is to try. Páll -> Thanks for the links Le mardi 31 mai 2016 18:44:17 UTC+2, Páll

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Lutfullah Tomak
julia> b_prime = ["8",9,10,c] This works with Any. julia> Any["3", 4, 14, c] 4-element Array{Any,1}: "3" 4 14 Any[10,"c"]

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Andreas Lobinger
On Wednesday, June 1, 2016 at 11:30:01 AM UTC+2, Lutfullah Tomak wrote: > > Do what the warning says. Replace ',' with ';', meaning ["8"; 9; 10; c] or > ["8"; 9;10; [12; "c"]] > julia> b = ["8";9;10;[12;"c"]] 5-element Array{Any,1}: "8" 9 10 12 "c" I'd like to have b[4] =

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Nils Gudat
A roundabout way: lol = ["a",1,"b",(2,3)] lol[4] = collect(lol[4]) Output: 4-element Array(Any,1): "a" 1 "b" [2,3]

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Lutfullah Tomak
Sorry for the noise it doesn't work obviously.

[julia-users] Re: julia equivalent of python [] (Part II)

2016-06-01 Thread Lutfullah Tomak
Do what the warning says. Replace ',' with ';', meaning ["8"; 9; 10; c] or [ "8"; 9;10; [12; "c"]] On Wednesday, June 1, 2016 at 12:21:59 PM UTC+3, Andreas Lobinger wrote: > > Hello colleagues, > > i actually was a little bit puzzled by this: > >_ >_ _ _(_)_ | A

[julia-users] julia equivalent of python [] (Part II)

2016-06-01 Thread Andreas Lobinger
Hello colleagues, i actually was a little bit puzzled by this: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_|

Re: [julia-users] Bizarre Segfault during ccall on OSX

2016-06-01 Thread Helge Eichhorn
That was actually not the root cause of the problem. I refactored my library significantly and made and now the segfault is randomly triggered at different points in the test suite on *0.5*. This is the backtrace I get on a debug build of Julia: signal (11): Segmentation fault: 11 while

[julia-users] Re: Plots gadfly

2016-06-01 Thread Andreas Lobinger
On Wednesday, June 1, 2016 at 10:44:42 AM UTC+2, Henri Girard wrote: > > Gadfly is deprecated : Does it mean we shouldn't use it anymore ? > Where did you get the message that Gadlfy is deprecated? If you mean, you get a lot of deprecation warning, when trying to run Gadfly on julia v0.5dev,

Re: [julia-users] Plots gadfly

2016-06-01 Thread Tamas Papp
I was not aware of Gadfly being deprecated. Where was that announced? In any case, try Plots.jl, where you can use various backends. On Wed, Jun 01 2016, Henri Girard wrote: > Gadfly is deprecated : Does it mean we shouldn't use it anymore ? > I am trying to use it but I got a long list of

[julia-users] Plots gadfly

2016-06-01 Thread Henri Girard
Gadfly is deprecated : Does it mean we shouldn't use it anymore ? I am trying to use it but I got a long list of recompiling ? What can I use instead ? I don't want to use plotly because I don't want to have a password (which doesn't work properly either !) each time I connect... It's very

Re: [julia-users] Reading from a TCP socket with quasi-continuous data transfer

2016-06-01 Thread Joshua Jones
> > >>1. I've read (here and elsewhere) that Julia does an implicit block >>while waiting for data. Is there a workaround? >> >> Do the blocking read asynchronously in a task. For network I/O (but not > file), `read` will only block at the task level. To end the read, `close` > the