Comments (5)
You might have to be the one to open that StaticArrays
issue, @aplavin — I've completely forgotten what this is all about!
from accessors.jl.
Thanks a lot for reporting! Broadcasting is tricky and not supported right now. Though I agree it would be nice to have. The
julia> @set s[2:3] += [100, 100] # slicing fails ungracefully
ERROR: StackOverflowError:
is a bug I would say. The ideal approach to fixing it would be to fix the following in StaticArrays.jl:
julia> Base.setindex(@SVector[1,2,3], [1,2], 1:2)
ERROR: StackOverflowError:
Stacktrace:
[1] setindex(a::SVector{3, Int64}, x::Vector{Int64}, inds::UnitRange{Int64}) (repeats 79984 times)
@ StaticArrays ~/.julia/packages/StaticArrays/6QFsp/src/deque.jl:198
and wait for this PR to land.
If you want to get this fixed faster I am happy to guide you.
from accessors.jl.
and wait for this JuliaLang/julia#46453 to land.
I don't think this is necessary. Just fixing StaticArrays setindex should be enough - it's just called in Accessors as is:
Accessors.jl/src/staticarrays.jl
Line 3 in f0a65fe
from accessors.jl.
Ah thanks you are right @aplavin
from accessors.jl.
Broadcasting is now supported (Accessors#master
, to be released soon)! All examples from the first post work on Vector
s.
The remaining SVector
issues are because of their setindex
method that leads to StackOverflow - yes, it is still the case. When that is fixed, Accessors
will support it without any further changes.
Would be useful if you opened an issue in the StaticArrays repo!
from accessors.jl.
Related Issues (20)
- "Concat lens": combine multiple lenses side by side HOT 7
- Assemble an object from optics HOT 7
- `hasproperty()` analogue for optics HOT 3
- IndexLens and changing the container size HOT 3
- `Base.show` ambiguity
- @reset naming convention HOT 4
- fate of insert and delete after these functions get into Base
- How to @reset when the field is known only by its equivalent symbol. HOT 2
- Only a single function argument can be the optic target HOT 3
- [Feature request] Set multiple fields at once HOT 6
- Errors in extensions during precompilation HOT 5
- multi-argument modify HOT 4
- `set` for `StructArray`
- Bad idea, would avoid using this pkg HOT 14
- To be or not to be HOT 3
- Traversal order of `Recursive` HOT 11
- `==` not defined for `IndexLens` HOT 4
- String properties not supported HOT 3
- Tests fail on 1.11 HOT 2
- `@(re)set` very slow when a parametric inner constructor is defined? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accessors.jl.