ahoward / ahoward/spin

spinel stdlib reach: what can a real handler actually use?

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

spinel
Dominant language
Ruby
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

context

the spike proved spinel compiles a web-shaped handler (ENV + stdin + bare
gets + string interpolation + if/elsif). but the edges of spinel's stdlib
coverage are unmapped, and they bound what real handlers can do.

known so far

  • ENV["..."], bare gets loop, String#split/length/chomp/[],
    interpolation, if/elsif, methods, require_relative
  • STDIN.gets (inference treats STDIN as int → emits 0; use bare gets)
  • ⚠️ heterogeneous arrays (e.g. [string, proc]) break type inference —
    this is why routing is if/elsif, not a proc-table (see #routing)

probe these, document what compiles

  • Hash literals + access ({}, h["k"]) — handlers want key/value
  • JSON parse/generate — the real request/response payload format
  • regex on a request body / path
  • Array of homogeneous structs/values + iteration
  • FFI (spinel ships an examples/ffi/sqlite — confirm a handler can
    call a C lib; this is a load-bearing claim of the PRD)
  • integer/float math edge cases, to_i/to_f
  • string building at volume (response bodies)

deliverable

a docs/spinel-coverage.md table: feature → compiles? → notes/workaround.
this becomes the authoritative "what you can write in a handler" reference,
and tells us which idioms the DSL must avoid.

Contributor guide

No contributing guide indexed for this repository

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 reviewing the known Spinel stdlib behavior and the examples/ffi/sqlite example, then probe each listed feature for compilation and runtime behavior. Record the results in docs/spinel-coverage.md as a feature, compiles?, and notes/workaround table; done means the table covers every requested probe and documents handler-safe idioms.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.