srush / raspy

An interactive exploration of Transformer programming.
https://srush.github.io/raspy
MIT License
240 stars 20 forks source link

constant strings to s-ops (the wrap function) #1

Open gailweiss opened 1 year ago

gailweiss commented 1 year ago

when converting a constant to an s-op, handle conversion of strings with multiple characters as well, e.g. so "aa" is actually interpreted as ["aa",...,"aa"] repeated as many times as the input length. things like tokens=="aa" act weird without this. this does not affect handling of string inputs in general, e.g. length("hi") is still [2.0,2.0]