JuliaGeometricAlgebra / GeometricAlgebra.jl

Geometric Algebra library for Julia
MIT License
1 stars 1 forks source link

Desired functionalities before registration #1

Open serenity4 opened 2 years ago

serenity4 commented 2 years ago

Before we register this package, we should define minimal functionality that may be helpful to others.

Here is a list (kept up to date) of the different features that we are targetting:

eschnett commented 2 years ago

The dot product \cdot is already exported by LinearAlgebra. We should extend that function instead of defining a new one.

eschnett commented 2 years ago

We should also define (or extend) a few helper functions such as ndims, size etc.

We might also want to define indexing to get at individual components of a multivector. We could keep this optional, but could then still define a standard for how to index multivectors.

serenity4 commented 2 years ago

The dot product \cdot is already exported by LinearAlgebra. We should extend that function instead of defining a new one.

Indeed, and it also exports the cross product \times (which we could take as the commutator product). I see that those are aliases to dot and cross respectively though, and are not functions. It would have been better if those were not aliases but functions that dispatch to dot and cross. We might prefer to define proper functions instead of aliases for all operators, otherwise the names are misleading. About conflicts with LinearAlgebra, I don't know if one would try to use it along GeometricAlgebra; I'd rather think that GeometricAlgebra would have LinearAlgebra as a backend. And otherwise dealing with imports manually would not be as bad as having aliases be misleading. What do you think?

We should also define (or extend) a few helper functions such as ndims, size etc.

We might also want to define indexing to get at individual components of a multivector. We could keep this optional, but could then still define a standard for how to index multivectors.

* Should multivectors be an `AbstractArray`? (Probably not.)

* Should they implement the iterator interface? (Probably yes.)

Good point about these helper functions. We can define the functions that are not defined in Base (so, things other than ndims and size, maybe grade for example) for implementations to extend.

I also agree that multivectors should not necessarily be AbstractArray.

About iteration, although I think they should implement the iterator interface I think there are multiple iteration orders for vectors (other than (dually) single-graded) and multivectors in general, so it would be hard to write tests against that. Indexing would be easier to handle, e.g. we can provide functions for indexing from a linear index into a structured index and vice-versa (a bit similar to CartesianIndex but along grades which have a non-uniform length)

eschnett commented 2 years ago

I often have code that uses both linear algebra and higher level representations. I would try to stay away from conflicts. This would also make it more difficult for people to rewrite existing low-level functions to using higher level representations (geometric algebra). LinearAlgebra is a very basic package, it's difficult to stay out of its way.

We could choose a new name, e.g. times, and make this an alias (or a function calling) cross.

I would use the iterator interface mostly for functions such as map, i.e. to apply element-wise operations. Maybe I really want the broadcasting interface instead.

serenity4 commented 2 years ago

I often have code that uses both linear algebra and higher level representations. I would try to stay away from conflicts. This would also make it more difficult for people to rewrite existing low-level functions to using higher level representations (geometric algebra). LinearAlgebra is a very basic package, it's difficult to stay out of its way. We could choose a new name, e.g. times, and make this an alias (or a function calling) cross.

I see, I agree that it would be best to not have two different versions of the same unicode operators. But my concern is that we'd force implementations to extend dot and cross instead of more appropriate functions. dot is most likely ok but the cross product actually has a different meaning than the commutator product (for one, it produces a vector, instead of a bivector). Also, in general I think that extending aliases is confusing because we think we're extending a function while in reality we're extending the aliased one.

Then, we can of course have our own aliases, but my concern is about what functions we're fundamentally extending. The dot product and cross product are quite specific to linear algebra. If \times and \cdot were functions, there wouldn't be any issue, but we can't change that in LinearAlgebra.

On the user side, a way to solve this conflict would be to define your own function \times or \cdot which calls either the one from LinearAlgebra or from GeometricAlgebra. Something like

×(x, y) = LinearAlgebra.:×(x, y)
×(x::GeometricAlgebraType, y::GeometricAlgebraType) = GeometricAlgebra.:×(x, y)

or, to show that it's two fundamentally different things:

×(x, y) = LinearAlgebra.cross(x, y)
×(x::GeometricAlgebraType, y::GeometricAlgebraType) = GeometricAlgebra.commutator(x, y)

and same for \cdot. It's not ideal, but I think that avoiding confusion about semantics would be preferable. For the time being, if an implementation wishes to use the same \times as LinearAlgebra, nothing prevents it from doing so with something like

using LinearAlgebra
import LinearAlgebra: ×
using GeometricAlgebra

GeometricAlgebra.:×(x::MyType, y::MyType) = ×(x, y)
×(x::MyType, y::MyType) = ...

which I think can be a good temporary solution. We can revisit that once we have an official implementation in this package.

I would use the iterator interface mostly for functions such as map, i.e. to apply element-wise operations. Maybe I really want the broadcasting interface instead.

That makes sense for vectors, but for multivectors there are no well-defined elements. Making a distinction would likely require setting up abstract type hierarchies, and I don't think that's a good idea right now. I think it's best to let implementations define it for their own types for the time being, and not deal with it in this package.

ktchu commented 2 years ago

I agree with the original proposal, and all of the comments sound reasonable.

I have a couple of thoughts regarding definition of operators, types, etc. in the interface definition.

serenity4 commented 2 years ago

This sounds great. Regarding extending operators from LinearAlgebra, I am still a bit put off by having

julia> using GeometricAlgebra

julia> ⋅
dot (generic function with 42 methods)

julia> ×
cross (generic function with 1 method)

while the fundamental operators are much more than the standard dot and cross products, but if that's only me I can get behind the suggestion by @ktchu.

Otherwise, I find reasonable the suggestions for the type hierarchy and the core operations defined for them. As a minor comment, I would believe that inv, dual, reverse, single-argument - and maybe (less sure about those) ==, isapprox are operators in themselves (though not always binary) in that they are required for performing core operations.

ktchu commented 2 years ago

@serenity4 I agree that the aliases are off-putting. Two thoughts on how to address that issue.

  1. (short-term) Include a docstring for our exported version of the \cdot and \times operators so that they at least show up in the help for \cdot and \times.

  2. (long-term) After the general GeometricAlgebra.jl becomes more mature and if it has reasonably wide adoption, I don't think it would be unreasonable to propose to the maintainers of the LinearAlgebra package that we transition \cdot and \times to function calls instead of aliases to avoid the confusion that you pointed out in the REPL.

ktchu commented 2 years ago

As a minor comment, I would believe that inv, dual, reverse, single-argument - and maybe (less sure about those) ==, isapprox are operators in themselves (though not always binary) in that they are required for performing core operations.

Agreed that these could be considered operators. Clarification question about terminology: are we using the term "operator" for both the long-form function name and the unicode operator function names? Or is there a different way that we are distinguishing operators from "interface functions"?

serenity4 commented 2 years ago

After the general GeometricAlgebra.jl becomes more mature and if it has reasonably wide adoption, I don't think it would be unreasonable to propose to the maintainers of the LinearAlgebra package that we transition \cdot and \times to function calls instead of aliases to avoid the confusion that you pointed out in the REPL.

Unfortunately LinearAlgebra is in the standard library, so I am afraid that option is not available.

are we using the term "operator" for both the long-form function name and the unicode operator function names? Or is there a different way that we are distinguishing operators from "interface functions"?

I would personally think of operators as "functions that perform core logic essential in the geometric algebra framework", as opposed to interface functions that are here to provide additional metadata/utilities/integration with other interfaces. In that sense, I wouldn't differentiate between the unicode name and the standard name, even if the unicode symbol is (most of the time) an infix operator. Though it's more of a personal terminology, I think the term is otherwise rather blurry as it may have slightly different meanings in different contexts (in mathematics vs programming for example).

Jollywatt commented 2 years ago

Hello all,

I'm enthusiastic to get this project rolling, but would like to get some clarity on how to start. I have a working implementation of multivector types over at https://github.com/Jollywatt/GeometricAlgebra.jl. My current understanding is that the next steps for me should be:

  1. Rename to something like Multivectors.jl or even EuclideanMultivectors.jl or DenseMultivectors.jl depending on how specialised I want my package to be. (At the moment, it works with any metric signature, and supports SparseArrays, but it may be better to pick something specific and do it well instead of trying to do everything.)
  2. Restructure code to use JuliaGeometricAlgebra/GeometricAlgebra.jl and extend its methods.
  3. Once the implementation reaches near-maturity, transfer ownership of the project to this organisation.

Some things I'm unsure about:

Edit: The package https://github.com/digitaldomain/Multivectors.jl already exists. From glimpsing the source, my implementation differs in that:

Jollywatt commented 2 years ago

Meta-question: where is the best place to consult this group for opinions and feedback regarding my own implementation package? Should we have a wiki?

serenity4 commented 2 years ago

I am personally busy with other projects at the moment, though happy to discuss directions for the project. Any efforts are appreciated to develop this package if it can be useful to you or others.

Your understanding seems correct. I would say that the transfer of ownership is optional, depending on whether you want to have the package be part of the organization or not. It is usually good practice to increase the confidence in projects (notably by potentially having more than a single maintainer), when you believe the package is in a decent state to be considered seriously for development and upkeep. Transfer of ownership is achieved by using the option "Transfer" in the repo settings. I guess that GitHub would then put some sort of automatic redirection in place for older versions.

For the naming, it seems somewhat analogous to automatic differentiation in Julia: there will be several implementations of the same thing. Instead of a descriptive name (as you suggested i.e. EuclideanMultivectors.jl, DenseMultivectors.jl or other), but that can't describe the core functionality as well as GeometricAlgebra.jl, I would suggest to use something a bit detached from the functionality (e.g. for AD this was Zygote.jl, Enzyme.jl, Diffractor.jl, ...). That is, only if you intend to register the package in the General registry, otherwise you can name it GeometricAlgebra.jl as that's completely fine.

I am not so sure right now that there will be one main package to elicit to take the place of a canonical GeometricAlgebra.jl; it would be nice if there was, but probably there will always be several approaches to implementing GA that will have different uses for different contexts. At some point I think we could rename this GeometricAlgebra.jl to GeometricAlgebraBase.jl. The name GeometricAlgebra.jl would be sort-of implicitly "forbidden" (just like I don't think there is any AutomaticDifferentiation.jl).

Regarding your meta-question, I think https://github.com/orgs/JuliaGeometricAlgebra/discussions can be a good place (can you create new discussions?), otherwise feel free to create a geometric-algebra stream on Zulip (could be more discoverable by other people).

@eschnett and @ktchu feel free to chime in if you have any thoughts on the matter.

ktchu commented 2 years ago

@Jollywatt Great to meet you! Thanks for restarting the conversation on the JuliaGeometricAlgebra/GeometricAlgebra.jl package. I think we've all gotten a bit busy over the summer.

I agree with @serenity4's comments. In case it's helpful, I'll add one other idea to the mix.

Eventually, we may need to sort out how to use packages with the same name from different registries, but I think this is a low probability event in the near-term.

chrisjldoran commented 1 year ago

Hi everyone. I wanted to extend a discussion to this thread that I've started with @Jollywatt. I have been working on GA in Julia for a few years now, and together with a collaborator we have a new, optimised library ready to release. https://github.com/MonumoLtd/GeometricAlgebra.jl. This has some commercial support from a company I am working with.

I talked about the library at ICACGA last year, originally intending to call it SimpleGA. (I am also due to talk on this at JuliaCon this summer.) But using acronyms in package names is not encouraged and seeing that GeometricAlgebra is not taken we decided to use that name. Then I came across @Jollywatt's work and this thread. So I wanted to see what people think about registering this name, given your plans. My thoughts are:

Anyway, let me know what you think. Personally I would like to use the GeometricAlgebra package name and talk about this at JuliaCon. I think there is plenty of scope to grow applications on top of this library while keeping the core simple. And obviously I am keen to work with as many people as possible to develop this.

serenity4 commented 1 year ago

Hi,

It's nice to see commercial uses of GA!

The main issue I have with registering a package under the name GeometricAlgebra.jl is as I described in my previous comment:

I am not so sure right now that there will be one main package to elicit to take the place of a canonical GeometricAlgebra.jl; it would be nice if there was, but probably there will always be several approaches to implementing GA that will have different uses for different contexts.

For example, with a package which allows low-level access to geometric algebra constructs and restrictions to retain performance, then it is a nice package to build things from, but not really something that one would like to advertise as the "way" to do geometric algebra. This would be appropriate for developers, which may appreciate the use of GA for implementing core numerical algorithms, but not for general users that simply want to play around with GA and use it for non-performance critical code.

On the other hand, a high-level package will most likely have its own drawbacks, specifically in terms of performance which is often suboptimal with generic GA implementations. Very good performance can definitely be achieved, but if hand-written implementations of specialized algorithms perform even 1.5x faster than the GA implementation, libraries implementing performance-critical algorithms may outright discard the idea of using GA (or, at least, that makes the idea of dedicating time to even learn about GA less appealing, particularly in a community that cares that much about peformance). A good metric IMHO is to see how linear algebraic operations perform compared to existing libraries. If one can get the same performance as optimized linear algebra routines, then GA may have a much larger impact and could argue for its adoption in core packages.

I personally believe that it is not possible to get optimal performance without resorting to an approach which integrates compile-time simplifications and having direct control over the generated instructions, which prompted me to work on a SymbolicGA.jl package. But that has drawbacks too; notably, a lack of dynamism which is less suited to playing around in the REPL for example, as well as potentially increased compile times especially as the dimensions of algebras increase.

That is why I would recommend to use another package name, as no matter what is chosen as the "canonical" GA implementation it will address a different set of trade-offs that may or may not be suited for a given audience. And if a GeometricAlgebra package is put forward, that would surely shadow other implementations and might be the only impression most people will get about GA, which again might be aligned with their expectations or might not.

The issue is similar with the automatic differentiation ecosystem in Julia, but AD is such a focus and so widely known as a concept that people tend to know about which packages they should use or not (or at least there are Discourse threads for that). But there, whether to use Zygote, Enzyme or ForwardDiff for example is completely context-dependent, and each has its drawbacks (be it for performance - again, use-case dependent, e.g. backward or forward differentiation - or support for advanced programming constructs).

As mentioned in the discussion, there is always the option of using a local registry if you really want to use the name GeometricAlgebra. For example, you could register the package on the General registry with another name, making it accessible and allowing collaboration, and have a local registry where that package is registered under the name GeometricAlgebra such that you can use one name or the other in your projects. Not ideal, but a fair option.

By the way, I don't think it is necessarily bad to have acronyms in package names, just that if we can avoid it then it's better. It's typically not great if these acronyms are about very specific things that 99.99% of people won't know about (worse if it is not even easy to figure out from the package description or even via Google). A short repo description with an expanded acronym would be a fairly easy way to improve readability. I wouldn't expand NURBS in a package name for example, and the Julia package NURBS.jl has the fairly explanatory description NURBS.jl - Non Uniform Rational Basis-Splines for Julia which IMO clarifies it nicely.

(I am also presenting at JuliaCon about SymbolicGA.jl, and I'd be happy to share ideas over GA implementations anytime. Feel free to reach out!)

chrisjldoran commented 1 year ago

Thanks. I get all these points and will think on them. I do have some immediate thoughts though:

(A recent win was stripping out all Vectors from some code and swapping in GA elements allowed my algorithm to immediately run on the GPU, which is pretty cool.)

Let me know what you think, particularly around committee ownership of GeometricAlgebra.

Chris

serenity4 commented 1 year ago

It seems inevitable that someone will register GeometricAlgebra at some point.

Indeed, this is why we thought that this JuliaGeometricAlgebra/GeometricAlgebra.jl package could be a decent placeholder for a GeometricAlgebra.jl package. We started thinking about designing it as an API package that would provide functions (and possibly abstract types) for implementations to extent, but never finished it and so it remained unregistered.

For me personally, the reason for stopping work on fleshing out this initial API came from the fact that in the implementation I am working on, no API is required beyond a unique macro. My use case with GA is not even to have types which represent GA elements, but rather define geometric operations using GA as a meta-language which can integrate seemlessly with arbitrary container types, e.g. tuples, standard vectors but also GPU-specific types. The only use I have of GA at this stage is as a language in which to code algorithms to make them simpler, easier to understand and more composable. All in a GPU-compatible way (using graphics APIs, which are more restrictive than compute APIs) and with maximum performance. As for my own motivations, I am developing a set of libraries for graphics programming (we do seem to have overlapping interests!) using the Vulkan/SPIR-V route. I aim to use algorithms written in GA language in Julia that are compatible with compilation into SPIR-V code (yes, I am really putting a lot of effort to avoid having to use GLSL/HLSL for coding shaders), which is currently coming together quite well.

I can propose to have a GeometricAlgebra.jl package that acts as a suite providing access to different implementations over a unified interface, similarly to DifferentialEquations.jl. I would certainly prefer to have a package that uses implementations as dependencies rather than focusing on one specific implementation with its particular API. At this stage I am convinced that whatever API will be developed will be significantly tied to the implementation that uses it, notably because of the level of abstraction at which GA resides. For example, whether or not to include arbitrary multivectors as valid elements is not a trivial matter depending on the implementation.

I do not have any issue with promoting specific implementations (and I do encourage it, for GA has a very good potential in the realm of numerical computing), and agree that leaving the name GeometricAlgebra.jl free is not great for the risk of having someone else registering it. The issue I would have is promoting any specific project as the main path for developing geometric algebra in Julia, unless it shows exceptionally good trade-offs for most uses. Notably with respect to:

And as mentioned previously, different trade-offs will be more or less important to different people. Near-optimal performance with GA implementations requires careful thought, and designing an intuitive high-level API is not an easy task either.

We can definitely have a think about how to select such a canonical implementation (and in pragmatic terms, as perfect does not exist). I do not think based on all the GA packages I know of that we'd have any suitable candidates ready right now, but we can work towards developing a few approaches that would have potential in this regard. Reserving a GeometricAlgebra.jl package in the name of an open organization and a common effort can be done separately from selecting an implementation. Waiting a bit more before performing such a selection would be wiser IMHO.

Regarding the management of any GeometricAlgebra.jl, as long as it happens inside a well-defined organisation where at least two active members have admin rights, I don't think there will be any problem of reputation or trust. I can add you to the JuliaGeometricAlgebra organization if you want.

A few more comments on performance:

ktchu commented 1 year ago

First, it's great to meet you, @chrisjldoran! Congratulations on the upcoming release of your GeometricAlgebra package! Thank you for sharing your thoughts and ideas for reasonable approaches for managing GeometricAlgebra package in the general registry.

@serenity4 Good to hear from you again. Like you, I have been busy with other work, which has unfortunately contributed to the lag in our discussion.

I generally agree with @serenity4 regarding the challenges and trade-offs with a single GeometricAlgebra package in the General Julia package registry. Personally, I think the local registry approach is a good one to help reduce clutter in the General registry (though the marketing, adoption, and confusion drawbacks are not to be discounted). For your reference, I have included some notes I collected on setting up a local registry at the end of this comment (it was easier to set up than I expected)

@serenity4 It sounds like approach we were originally thinking of for General/GeometricAlgebra might be (1) difficult to reach consensus on, (2) perhaps not as viable as originally believed (because each implementation has different goals, assumptions, etc.), and (3) is a heavier effort than I think we might reasonably have time to maintain.

As an alternate proposal, what do people think of implementing General/GeometricAlgebra as a "portal package" (as @chrisjldoran suggested)? I'm envisioning something lightweight similar to the following.

Local Registry: Registry Maintainers

Local Registry: Package Maintainers

Setup

Register a new package

Release a new version of the package

julia> using LocalRegistry
julia> register(package_name)

Local Registry: Package Users

serenity4 commented 1 year ago

Thanks for the suggestion @ktchu, a portal package makes a lot of sense to me. It would be great to take the opportunity of having such a portal to host documentation:

I think to get started (and register something) having at least a clear README and links to implementations would be enough, though.

I see two main challenges with local registries for wider adoption (so far, I believe we all used local registries for specific projects, which is different than asking for other packages in the General registry to use them):

I believe these caveats are enough to justify having implementations in the General registry for those whose purpose is to be adopted and built upon by the Julia community. I see local registries as good solutions for specific projects, but maybe not so great to require for developers and users in general - at least not until secondary registries emerge and we don't require a new registry simply for installing a single geometric algebra package (e.g., having a "Graphics" registry with a collection of related packages might be useful, though fragmentation may become a problem). Having both a version in General and in local registries also seem fine to me, though personally I find having to use another name than GeometricAlgebra.jl for my packages acceptable and easiest.

chrisjldoran commented 1 year ago

Thanks everyone. I've been thinking about this a lot over the last few days, and here is what I intend to do. I know it goes against the advice above, but I hope you agree that the reasoning is sound. You also have my word that I'll reverse this if it clearly causes problems in the community.

First off, I think we all want the same thing. As @serenity4 said, we want a GA library that serves as a initial introduction to the subject and is:

This didn't exist last summer, which is precisely why I set out to build it. I also have the luxury currently of having 2 experienced Julia software engineers on tap to help get the code to a professional standard. So I'd like to release this as GeometricAlgebra, and expect the library to be criticised when it fails to meet @serenity4's goals.

I'm sure you don't need a lecture on the advantages of having an MVP that keen be used, tested and criticised over trying to design the perfect piece of software by committee!

Under the hood the GeometricAlgebra library has a range of different implementations, all of which can be used simultaneously. I see no issue introducing additional ones and handling all of the complications of multiple algebras with submodules, namespace management and multiple dispatch. This combination in Julia is actually quite awesome and makes everything just work.

Over time I expect to see a lot more work on the larger algebras, and ideally a symbolic package too. These can all be active so that, eg if you do some work in a symbolic package but then want to drop into a implementation for speed that is easy to do. (I can see that the conversion utility between algebras could become a focus of work, but there are no conceptual issues here).

So I do think we can shoot for having everything we want in one place, with the main thought having to go into conversions between algebras. We'd want to avoid unnecessary duplication, so performance will be the main criteria if forced to chose. But I'm always happy to swap out code for something faster, and Julia has great benchmarking tools to settle any debates.

Beyond that my library is 'agenda-free'. Multivectors are created from basis vectors, and you can chose the name these however you like. Multiplication is *, and everything else works as expected. The only piece of personal agenda that underlies this package is that it is 'geometric product' first. If you want to just do exterior algebra you can make it work, but there are better alternatives out there. That is the one smallish hill I will take a stand on!

Beyond the core package, the site will also advertise other implementations and extensions, as well as hopefully building up a good set of examples. The ultimate test is that this library is used to enable interesting projects, and not to be admired as a GA implementation.

In terms of timeline I'm proposing:

My measure of success with this endeavour is that in 12 months time there is a self-sustaining group of people improving the package, and I know that when I type 'using GeometricAlgebra' in my own projects it will just work!

As I said, if it turns out that these ambitions are unachievable then I'll reverse out and we'll go a different route. But for now I do think a good solution is in reach and we should at least try to build it!

ktchu commented 1 year ago

@serenity4 @chrisjldoran. I think this has been a productive discussion about pathways forward for General/GeometricAlgebra. While there will always be points of disagreement, I think we are all working in good faith to find a structure that works well for the community (including future users and developers).

@chrisjldoran. I agree with your measures of success for this package (and any package in general) and appreciate you explicitly expressing your willingness to revert changes that cause difficulties to the community. I also agree that Julia's language structure should make it possible to, in principle and over time, converge several implementations under the same hood. And, MVP over perfect software by committee is definitely something I'm a supporter of.

Regarding registration of the General/GeometricAlgebra package, I have a couple of thoughts in the area of "promoting a community spirit".

serenity4 commented 1 year ago

Under the hood the GeometricAlgebra library has a range of different implementations, all of which can be used simultaneously. I see no issue introducing additional ones and handling all of the complications of multiple algebras with submodules, namespace management and multiple dispatch. This combination in Julia is actually quite awesome and makes everything just work.

Just to be clear, when talking about implementations previously I was talking about implementations of the geometric algebra framework, not specific geometric algebras. Ideally, such a framework would allow any kind of geometric algebras. Including only the most used ones is a reasonable choice, yet remains a trade-off. The term "implementation" was used to refer how GA rules are defined and enforced in the code, not to refer to specific algebras.

My measure of success with this endeavour is that in 12 months time there is a self-sustaining group of people improving the package, and I know that when I type 'using GeometricAlgebra' in my own projects it will just work!

Unfortunately, it won't be as simple as that. I believe we all agree that different implementations will choose different trade-offs. You may have your own goals, but imposing trade-offs is not the way to go. And changing a set of trade-offs for another would typically require rewrites from scratch. SymbolicGA.jl is my second iteration of a 2-year long development process (in and out), the first of which being https://github.com/serenity4/GeometricAlgebra.jl, and it may not be the last.

I can cite several trade-offs that the implementation you propose makes (please correct me if I am wrong on any of those points):

Note that those are not "negative" points in any way; they are trade-offs. But personally, these trade-offs are not those I am after, and that is the reason I would not join the development of this specific project. That does not mean at all that I would not enjoy sharing ideas over ways to implement geometric algebra in Julia, however!

I understand that you want to launch an effort and include other people in the development of a geometric algebra framework. I simply believe there is no rush to advertise a General/GeometricAlgebra.jl package. Why sacrifice this central name for a first prototype? If you expect mainstream adoption of the library, know that if (or rather when) a large redesign is needed, that will be hugely breaking, and I would rather avoid rough transitions for users if it could be avoided by simply having different packages for smoother transitions.

I believe it is perfectly possible to lead such a development effort using another package name. I am trying to avoid suffering from consequences of a choice we will have made early on. This is why I hope that you will accept choosing another name (SimpleGA.jl for example, or anything else that you like), and leave all the rest (the project, the ambitions...) unchanged. We can let the discussion cool down for a while before any decision is made. Again, we are not in a rush.

chrisjldoran commented 1 year ago

Thanks guys, a bunch of interesting questions. I do hope I get to meet you both soon. In no particular order, first @ktchu

serenity4 commented 1 year ago

I agree with your points @chrisjldoran, I was just highlighting that those are trade-offs based on assumptions you made that work for you. I tend to have a more ambitious and perhaps idealistic goal; for one, most of these trade-offs are not required when going through the symbolic route. From what I see, you have a very pragmatic take on how to approach these trade-offs, and I respect that (even more so when backed by your experience using GA for concrete projects).

In the end, you are free to do as you wish, and I only hope that we will not come to regret using that silver bullet with using that GeometricAlgebra.jl name if you go for it. Regardless, you do seem to have a good drive, and I'd be more than happy to see GA flourish in the Julia ecosystem.

I won't be able to make it to GAME2023, but I am looking forward to meeting those of you who will attend JuliaCon :)

Jollywatt commented 1 year ago

Just agreeing with @serenity4's points here. My own emphasis is to prioritize the newcomers' experience in order to encourage adoption.

Imagine a new user wanting to try out Julia and GA. They quickly find "GeometricAlgebra.jl", and will then expect to be able to:

Then, once the user is a bit more serious, they might look to more specific packages like "FastGA.jl", "PGA.jl" or "SymbolicGA.jl" depending on their needs.

If the newcomer is faced with e.g., having to move everything from $\mathbb{R}^3$ to the STA using a peculiar isomorphism in order to "apply a rotor to a 3D vector", they might come away thinking GA is more complicated than it is.[^1] Putting it on the user to implement $\wedge$ could have a similar effect.

I'm optimistic and believe that a performant GA implementation that is "complete" in the above sense is just around the corner.[^2] MonumoLtd/@chrisjldoran's package is deliberately a "partial" implementation. Hence my plea to leave the privileged name "GeometricAlgebra.jl" reserved for the time being and to choose a descriptive name for General.

[^1]: One idea for how to fix this for https://github.com/MonumoLtd/GeometricAlgebra.jl could be to implement e.g., an GA30.Mixed type which simply wraps GA31.Even and overrides mv_to_text to display it as an element of Cl(3). You'd have to implement this separately for every algebra though.

[^2]: It's encouraging that, based on some simple benchmarks, my own https://github.com/Jollywatt/GeometricAlgebra.jl seems to be around 1.5x slower than @chrisjldoran's for things like 3D multivector products and sums, while the former is a "complete" implementation.

serenity4 commented 1 year ago

I see that the package is already pending registration: https://github.com/JuliaRegistries/General/pull/80669

chrisjldoran commented 1 year ago

Thanks everyone. We'll see how it goes, and I expect you to keep challenging me to meet our ambitions. A couple of small points:

ktchu commented 1 year ago

@chrisjldoran. I was under the impression that your proposal was still under discussion (i.e., a decision was not yet made), so I am surprised and disappointed to see that the pending registration of Monumo Ltd's implementation with the General registry.

While I respect your expertise and status in the field of Geometric Algebra and appreciate your software engineering/delivery philosophy, your goals as stated can be achieved using a local registry for now while we, as a community, decide on the path we would like to take to move forward:

But my main reason for doing this now is the upcoming conferences, and my belief in release and iterate.

While using a local registry is perhaps slightly more inconvenient for developers who would like to contribute, it is relatively low overhead for most seasoned developers (and, in my opinion, a worthwhile skill for less experienced developers to acquire).

From the perspective of "marketing" Monumo's package to the wider community at a conference (especially for a 'soft' launch to a slightly tangential community), I would expect that having the package in the General registry vs a local registry should not make or break interest from people who are serious about Geometric Algebra (though it may be a bigger activation barrier for people mostly interested in graphics ... but, in my opinion, that should not be the target audience for a Geometric Algebra package registered in the General registry).

To summarize, I disapprove of the currently active registration of Monumo Ltd's GeometricAlgebra package because our community discussion has not yet concluded (i.e., no decision has been explicitly made and multiple viable options are still on the table). To be clear, I am not necessarily opposed to the technical aspects of the Monumo package (though there are several identified by @serenity4 and @Jollywatt that raise concerns for me). In my opinion, respecting an in-progress community discussion (and the concomitant inconveniences of the slight delay) outweighs the benefits of a fast move to market.

I respectfully request that Monumo withdraw its registration of their GeometricAlgebra package for inclusion in the General registry. Thank you for your consideration.