Comments (8)
I would guess this should be an error then. Maybe try to convert it using the conversion function __ConvertedFromJulia_internal
? Or would you think this is too implicit?
from gap.jl.
Well, that goes back to the question I had yesterday: Why is ConvertedToJulia
called automatically, but ConvertedFromJulia
is not? What you are proposing seems to suggest to call that automatically, too.
Personally, I'd rather go the other way: I would not perform any conversion except the bare minimum (i.e. dealing with T_INT / T_FFE when going from GAP to Julia) in both directions; at least in the lowest level code. If automatic conversions are deemed desirable in some or all cases, then this could be implemented in a higher level. This way, at least the user a chance to bypass the automatic conversion in situations where this is beneficial.
from gap.jl.
Yep, this seems reasonable.
from gap.jl.
Ah, to clarify and finish that thought: if the input is a Julia object which is not an MPtr, or an T_FFE wrapper (or perhaps also a machine integer), then there is a choice between producing an error, or automatically wrapping it into a T_JULIA.
I think the latter is harmless and strictly superior to an error, as it is the bare minimum one needs to do.
A third option is to provide two functions: one which produces an error resp. wraps into a T_JULIA; the other automatically calls ConvertedFromJulia, for convenience
from gap.jl.
All in all though, this is just theoretical wanking, it's best to start writing more complex code, and then seeing what one ends up needing. I.e. be ready to revise whatever decision is made now ;-)
from gap.jl.
Currently, this function is really just used in a single case: Calling GAP functions from Julia. I think making the object a T_JULIA
is the most sensible option here (just did not think about it beforehand). That way, one can actually somehow pass Julia Objects itself to GAP functions.
from gap.jl.
This also means that we might want to use a different pattern in other places.
from gap.jl.
indeed, and based on that, one can easily write a Julia function which first passes all arguments through ConvertedFromJulia
, if so desired.
from gap.jl.
Related Issues (20)
- Failures in Julia nightly
- Run `JuliaInterface` tests as part of `Pkg.test`? HOT 8
- Error handling incomplete / clashes with GAP's Test/TestDirectory, leaves GAP in bad state, subsequent crash HOT 3
- `GAP_ExecuteProcess` should mimic `ExecuteProcess` a bit more closely
- Crash triggered by GAP's `tst/testinstall/kernel/streams.tst`
- `fatal error: julia_gcext.h: No such file or directory` in julia nightly HOT 6
- `using GAP` fails when julia is using multiple threads HOT 7
- REPL completions again broken in Julia nightly HOT 3
- problem with installing GAP packages programmatically
- problem with local builds HOT 1
- Change `ThrowObserver` to throw a custom `GAPError` instead of calling `error`
- Skip holes when iterating over GAP lists? HOT 1
- `fgets` error when leaving Julia HOT 4
- Load prescribed versions of GAP packages
- CI tests fail in Julia nightly: `terminal` not defined in `REPL.TerminalMenus` HOT 1
- `GapObj` vs `julia_to_gap` HOT 2
- Revise setup of the faux GAP root
- Add CI tests that build against and test using latest GAP master
- Add tests involving Julia tasks HOT 2
- Using `etc/run_with_override.jl` should force use of a custom compiled JuliaInterface
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 gap.jl.