unimplemented primitive: Warning, instead of Error
Nobody has claimed this yet.
- Dominant language
- CoffeeScript
- Stars
- 57
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
I wonder the rationale behind the decision that an unimplemented primitive in NetLogo Web shall report an error rather than a warning. When I created a model with behavior space support, I was forced to remove all file-related primitives before deploying it in NLW; that means I have to maintain two different versions, even when the file-related primitives will never trigger in NLW.
Hence, it resonates with my previous proposal of a unified API in the devel core meeting - that is, if I want to maintain a single version, I have to use Send-To at this moment. Yet, the send-to extension does not meet my intention to utilize file streaming - when I have to run 10,000s of experiments in behavior space, I cannot achieve what I have done in the following code:
; print-spreadsheet: When running in the behavior space, generate output for it.
; The output is in CSV and pre-processed to feed into Stata.
to print-spreadsheet
file-open "Spreadsheet.csv"
if (not file-exists? "Spreadsheet.csv")
[ file-print mini-csv:to-row [ "1-Testing" "2-Quarantine" "3-Face-Covering" "4-Lockdown" "Serial" "Days" "Population" "Infected" "Detected" "Deceased" "Lockdown-Days" "Average-Workforce" "Average-Mask-Per-Capita" ] ]
let mappings [ "A" "B" "C" "D" "E" ]
file-print mini-csv:to-row (list
((position first do-we-need-more-testing mappings) + 1)
((position first should-we-quarantine-contacts mappings) + 1)
((position first face-covering-is-needed mappings) + 1)
((position first lockdown-is-necessary mappings) + 1)
behaviorspace-run-number (ticks / 1200) original-population accumulated-infected accumulated-detected accumulated-deceased accumulated-lockdown
(accumulated-workforce / (ticks / 1200)) (accumulated-masks / original-population / (ticks / 1200)))
file-close
end
Thanks!
Best,
John Chen
Contributor guide
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
The issue names no files, tests, or entry points. Start by locating how unimplemented primitives are reported in NetLogo Web and review the discussion around warning versus error behavior. Done would require an agreed design and corresponding implementation, with coverage for models that reference unsupported file primitives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100