-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Closed
Copy link
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.regression 1.11Regression in the 1.11 releaseRegression in the 1.11 releaseregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release
Description
On 1.11:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.0 (2024-10-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> function mwe(filepath, nb, max_nb)
write(filepath, ones(UInt8, nb))
p = open(`cat $filepath`; read=true)
b = Vector{UInt8}(undef, 1024)
nr = readbytes!(p, b, max_nb)
return nr, b
end
mwe (generic function with 1 method)
julia> (nr, v) = mwe("/Users/edavies/Downloads/tmp.bin", 53209, typemax(Int))
(53209, UInt8[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 … 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
julia> length(v)
1024
On 1.10:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.5 (2024-08-27)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> function mwe(filepath, nb, max_nb)
write(filepath, ones(UInt8, nb))
p = open(`cat $filepath`; read=true)
b = Vector{UInt8}(undef, 1024)
nr = readbytes!(p, b, max_nb)
return nr, b
end
mwe (generic function with 1 method)
julia> (nr, v) = mwe("/Users/edavies/Downloads/tmp.bin", 53209, typemax(Int))
(53209, UInt8[0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 … 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
julia> length(v)
118745
Moelf
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.regression 1.11Regression in the 1.11 releaseRegression in the 1.11 releaseregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release