Allow interpolation into @remote calls
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the failing @remote call and the RemoteREPL client.jl location shown in the stack trace, then review the linked Julia discourse thread and its benchmark-tools approach. The work is done when values such as addr and bit can be interpolated into @remote calls without a remote "$" syntax error and the get_ADC example executes successfully.
Written by the indexing model from the issue text.
Description
Based on this thread, it is possible to process a macro to allow interpolating of values. My use case is that I want to define something like
function get_ADC(addr, bit)
@remote(pyconvert(Float32, DAQC2.getADC($addr, $bit)))
end
to make it feel like a pure julia function. If I do not interpolate, I get an error from addr and bit not being defined remotely, which makes sense. However, I can not interpolate the arguments into the call to @remote, due to a RemoteException:
ERROR: RemoteException:
ERROR: syntax: "$" expression outside quote
Stacktrace:
[1] top-level scope
@ none:1
[2] eval
@ ./boot.jl:360 [inlined]
Stacktrace:
[1] (::RemoteREPL.var"#47#48"{RemoteREPL.Connection, Expr})()
@ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:391
[2] ensure_connected!(f::RemoteREPL.var"#47#48"{RemoteREPL.Connection, Expr}, conn::RemoteREPL.Connection; retries::Int64)
@ RemoteREPL ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:178
[3] ensure_connected!
@ ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:174 [inlined]
[4] remote_eval_and_fetch
@ ~/.julia/packages/RemoteREPL/BFqrB/src/client.jl:380 [inlined]
[5] get_ADC(addr::Int64, bit::Int64)
@ Main ~/Uni/Semester/8. Sem/Independent Study Activity/scripts/test.jl:24
[6] top-level scope
@ ~/Uni/Semester/8. Sem/Independent Study Activity/scripts/test.jl:26
The fix would perhaps be to do something like benchmark-tools, as seen in the linked post, to allow interpolation?
- Dominant language
- Julia
- Stars
- 148
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaWeb/RemoteREPL.jl
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaWeb/RemoteREPL.jl#82 ·
-
good first issue
Difficulty 3/5 1-2 days Newbie friendliness 45/100
JuliaWeb/RemoteREPL.jl#80 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
JuliaWeb/RemoteREPL.jl#69 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaWeb/RemoteREPL.jl#67 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
JuliaWeb/RemoteREPL.jl#66 ·
All issues in JuliaWeb/RemoteREPL.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FluxML/Metalhead.jl#407 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
SciML/ModelingToolkit.jl#5371 ·
Maintainers usually reply within 2 days