Creating ring variables from strings
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Here is a strange behavior when creating rings from strings. The first attempt gives an error, but the second one succeeds:
```macaulay2
i1 : QQ["x_1"]
stdio:1:1:(3): error: baseName: no base name available
i2 : QQ["x_1"]
o2 = QQ[x_1]
o2 : PolynomialRing
```
This only happens when my string has an underscore in it. In a new session, the following works on the first try
```macaulay2
i1 : QQ["x"]
o1 = QQ[x]
o1 : PolynomialRing
```
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the two QQ["x_1"] attempts in a fresh Macaulay2 session, then trace the ring-creation and string-variable handling entry points involved. Add a regression test showing that an underscored variable name succeeds on its first attempt, and verify that the existing QQ["x"] behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100