- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.7k
RFC/WIP: Modularize strpack #1378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Yeah, not surprised. I was wanting to get a couple smaller modules done (hence monads, QuickCheck) before tackling this beast. I've got through Wednesday to work on this before I disappear through the weekend. Will post here with patches once they start flowing. | 
| Meanwhile, I've figured out how to solve the immediate problem. (Of course, it would probably still be a good idea to turn strpack into a module.) It turns out not to be a case of strpack needing  pack(TestStruct(0, 0))and all is well. Without that line, the pack and unpack functions don't get defined until the user calls  | 
| Ah, I see. You can use the  | 
| Good, thanks. | 
| Just starting on this, but getting patches up as promised. Up to this point this drops the  The tricky bit so far is referring to non-exported functions in the quoted blocks using their fully-qualified names since the block must be  | 
| Cool! Are you looking for testing/feedback at this stage, or should I wait until you declare completion? | 
| I'm happy to take feedback any time, but I do still have work to do. I did quickly check that the basics work, but my original test code won't work because I killed the macro it uses. I would not be surprised if certain specific things fail right now. Unless I get something done tonight, though, I don't expect to get back to this until next week. | 
| Another candidate for a package? strpack is one of those things that I think would migrate back into Base, once stabilized. | 
| I don't really see why this would go into Base. | 
| I was under the impression that this would eventually make it possible to pass structs to C code. If not, then perhaps, we can close this. | 
| It already does make it possible to pass structs to C code, and it is indeed very useful. But I think that this aspect of strpack (and strpack does more than just this) will eventually be superseded by built-in immutable types. The advantage of the latter is that it will be zero-copy, which strpack manifestly is not. If extras/ is being emptied, then definitely strpack should become a package. | 
| @ViralBShah See the code at the end of https://github.com/dmbates/JSparse.jl/blob/master/src/JSparse.jl  The idiom @timholy In your documentation you may want to note that the sequence can be condensed to  | 
| Yes, to be clear, the ability to construct C-compatible structures is a side effect. This will still have its uses for serializing/deserializing other binary data, particularly when dealing with oddball formats or when a purpose-built serializer/deserializer isn't worth it. I'll close this with the intent to move to its own package. | 
| @dmbates re the documentation: it's true that it can be condensed, but I was worried that the global iostr variable might look like magic, and I felt the longer version would be clearer. | 
) Stdlib: LinearAlgebra URL: https://github.com/JuliaLang/LinearAlgebra.jl.git Stdlib branch: master Julia branch: master Old commit: d568106 New commit: 7e11b5e Julia version: 1.13.0-DEV LinearAlgebra version: 1.13.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/LinearAlgebra.jl@d568106...7e11b5e ``` $ git log --oneline d568106..7e11b5e 7e11b5e Add `AbstractArray` conversions for `AbstractQ` (#1470) 52c41f7 Add missing methods to `diagind` documentation (#1473) 28ee87e Overload array constructors for BunchKaufman (#1461) (#1466) 6f73f65 Add 'eigmin'/'eigmax' methods for 'Eigen' (#1468) 7b21cab Use `Iterators.rest` within `generic_norm` to simplify code (#1459) 57ac0eb Make `parentof_applytri` fully type-stable (#1243) 880a9fe Add `_sym_uplo` to skip validation (#1441) 8d6ca14 Public function to access the `uplo` for `Symmetric`/`Hermitian` (#1440) 7a4b27e Make `dot` with Bool-arrays type-stable (#1456) 6fe77f8 Make `dot` with Bool-arrays type-stable 5af75df Remove zeroing in `similar` for `Hermitian` (#1455) 5685390 Index into diag in `Tridigaonal` * `Diagonal` (#1454) 51923a5 Forward structure-preserving broadcasting to diag for `Diagonal` (#1423) 35a4427 Iterator norm in `isapprox` for `Array`s (#1378) 98723df Structured broadcasting for UpperHessenberg (#1325) ``` Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>
Looks like strpack may needs some "esc"s in it. I may get to this myself, but in the meantime I thought I'd report it.
Commenting out the 3 lines that create this as a module lets everything work properly.
Presumably, strpack itself should be converted to a module. It also depends on iostring.jl and lru.jl, so I wouldn't want to make drastic changes without consulting @pao .