2 ms·
Print wouldn't be a good example, but think more along the lines of a TM-esque definition, which reads and writes to a "tape". "print" wouldn't work, but, for e
by JoelMcCracken 17y ago
Print wouldn't be a good example, but think more along the lines of a TM-esque definition, which reads and writes to a "tape". "print" wouldn't work, but, for example, something that takes as an input an email and either accepts if it is validly formatted or rejects if not would be a good example. It doesn't require very much to get working, however it is hard to do correctly (how many places don't accept "+" in emails, for example).
So, possibly, it would be more useful for yes and no answer questions. Also, algorithms that are intended to do things quickly wouldn't work very well, as per the platform these are naturally very slow. It would be a bit silly to write a quicksort with this, for example.
Other examples that I can see working well:
xml parser
json parser
.... parser
html stripping
email format manipulation
basic binary file manipulation (untaring, possibly, reading/manipulation of networking packets...)
diff