SciML / SciML/RuntimeGeneratedFunctions.jl

Support default argument values

Open
#25 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
112
Forks
19
Avg merge
6h 11m
Merged PRs (30d)
9

Description

Is this supposed to work?

julia> f = @RuntimeGeneratedFunction(:(f(x,z=3) = y))
ERROR: argument malformed. Got $(Expr(:kw, :z, 3))
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33

Can it be made to work? I'm trying to use this to get stuff like this https://github.com/mcabbott/Tullio.jl/pull/81/files#diff-5e84de38fb08a2615207f16bf896e93ccb8c58bbfa50e6420fc8d54d88daca84R1082 to work since I want to use the @tullio macro inside generated function body... is it technically infeasible?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown @RuntimeGeneratedFunction expression and inspect how its arguments are validated, particularly the default-value expression $(Expr(:kw, :z, 3)). Check the linked Tullio.jl example for the intended usage. Done means determining whether default arguments can be supported and, if so, confirming the example works without the reported malformed-argument error.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.