The very promising prototype for rebol.org has a current design where a blurb of text sits to the left of a panel of code on the right. One can click buttons to get the code on the right to slide to some alternative examples. The space currently used by the code is about 12 lines long, and about 45 characters wide.
@BrianOtto picked a few random tidbits from things he had (which included a use of COLLECT in PARSE, which is not at the moment in Ren-C, which is something we need to discuss/confront at some point). But I’ve suggested that these samples should be punchy and well designed to demonstrate specific points about the language…and each time you switch to a new code sample, the text on the left would change to be some overview of what the sample is meant to demonstrate.
When the page first comes up, the left text should probably be broad and general…probably mostly capturing a “vision statement” of the overall project. I’m not sure what code example would go best with that. Maybe not a code example at all, but an animation of how easy to compile or install the project is. Who knows? Anyway, what’s on the left and right when people first land on the page would have to be decided.
But assuming the page keeps its current form (vs moving to something like Sublime Text’s PNG animation), one might wonder what the text and samples should be as you page through them. What are the points?
- Code is Data - show BLOCK! restructuring/composition and execution via DO.
- No Keywords - can a brief example that isn’t PARSE show how taking advantage of re-using IF or something is a powerful idea? Is there an easy “killer” case that can show why this is good and not dangerous/bad?
- Natural Datatypes - some sort of quick gloss of Rebol in ten steps
- Freedom of Choice - perhaps show some quick contrasts of ways to write a statement… IF/ELSE vs. THEN vs. ALL OR vs EITHER.
- Evaluator Unchained - I’d personally like a punchy example of something like how + can be made to switch modes from infix to prefix, and how easy this is in userspace…so showing off enfix/variadics somehow.
"Markdown of Programming" - Something about how the language has been agonized over to be pretty and not need IDEs or syntax highlighting, maybe even emphasize something like
--: function [...] [...]to get a separator construct for
-- "Yes you can do this" --. Mention the fact that the code examples being black and white isn’t an accident.
This is just to start the conversation, if people want to pick their favorite 40x12 matrix of code to show off. So if you have an idea: what’s the code, what’s the bullet point and blurb to go with it?
One place to look for inspiration would be the Trello. What on there is “wow” for you? Could that be condensed into a little box of “wow”?
Something to consider: how to show output? This isn’t an interactive console session, so should it be just put in with comments? This will take up space in the examples, so should be considered so people know what the code they’re looking at does.