JuliaArrays / JuliaArrays/StaticArrays.jl

`repr` roundtripping. "print it like you build it"

Open
#692 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature up for grabs
Dominant language
Julia
Stars
844
Forks
159
Avg merge
3d 21h
Merged PRs (30d)
3

Description

I'm not sure if there are any functions in the display/show/repr family that are supposed to obey it, but it would be nice if a_rt === a (to the extent that everything is bitstype) in the following

using StaticArrays

a = @SArray [(SA_F32[1,2,3]), SA_F32[2,3,4]]
@show typeof(a)
sa = repr(a)
@show sa
a_rt = eval(Meta.parse(sa))
@show typeof(a_rt)

output:

typeof(a) = SArray{Tuple{2},SArray{Tuple{3},Float32,1,3},1,2}
sa = "SArray{Tuple{3},Float32,1,3}[[1.0, 2.0, 3.0], [2.0, 3.0, 4.0]]"
typeof(a_rt) = Array{SArray{Tuple{3},Float32,1,3},1}

(related a bit to the conversation in https://github.com/JuliaArrays/StaticArrays.jl/issues/691.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Julia reproducer in the issue and the related discussion in issue #691. Investigate the display/show/repr behavior for nested StaticArrays and determine the intended round-trip representation. Done means parsing the representation preserves the original StaticArrays type and value where the issue's bitstype condition applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.