164 karma · joined May 23, 2015
Technology doesn't exist in a timeless vacuum. VB was in the right place at the right time, and solved a big problem. Solving that same problem now isn't nearly as magical. We have new problems. Still, what people miss is that a person (often brilliant) has a vision and creates it. The result has conceptual integrity and resonates with some people. Not all, but some. The goal is not to be all things to all people. That never works.
I loved VB. Still do. I used it from v1.0 thru v6, and was one of the first 4 VB MVPs when they created the MVP program. As badsectoracula said, it wasn't any one thing that made it special; it was the whole. But, just as the Director's Cut of a movie isn't always better, there is the possibility of taking something and making it better. Maybe not in the visionary's view, but for others. A tale as old as time.
There is a time to hold tight to the past, and a time to move forward without forgetting it.
There is a time to fiercely defend our position, and a time to give way and relinquish victory in small battles so that we may win the war.
Red is still very young, but Rebol's design is old. The problems Rebol aimed to solve were like classics in literature (or algorithms in CS), long-lived. Red is not aimed at solving only today's problems, or tomorrow's. It's aimed at solving the future's problems. Not by being one amazing product or technology, but by being a language we can use to communicate about problems we don't even know we have yet. For most people, though, it can serve very well as a tool to solve problems we have today, without knowing any of that.
It's not black magic, by any means, but it's also not yet point and click. We'll build more tools, higher level pieces, and more in the future.
Example 1. Red's infix operator precedence is strictly left to right. But Red has a built in `math` function that can take an expression like `2 + 4 * 3` and produce the result you expect from many other languages.
>> 2 + 4 * 3
== 18
>> math [2 + 4 * 3]
== 14
You can see how it works by using `source math` in the REPL. It's about 7 lines of `parse` rules.OK, I got carried away. Here's a little dialect I just whipped up as an example (error handling omitted for brevity). It has some supporting funcs at the top, to show how you trigger actions while parsing. If you look at the rules, you can see that some literal words are used as keywords, then different datatypes are matched according to their action.
; Actions
call-phone: func [number [issue!] time][
print ["Call" mold number "at" time]
]
send-email: func [dest [email!] data [string!]][
print ["Send" dest length? data "bytes"]
]
post-data: func [dest [url!] data [string!] time][
print [
"Post" length? data "bytes to" dest
either time? time ['at]['on]
time
]
]
; Rules
when=: [['at | 'on] set when [date! | time!]]
call=: ['call set dest issue! opt when= (call-phone dest any [when now])]
email=: ['email set dest email! content= (send-email dest content)]
post=: ['post content= 'to set dest url! when= (post-data dest content when)]
content=: [
set content [string! | file! | url!]
(if not string? content [content: attempt [read content]])
]
contact=: [call= | email= | post=]
rules=: [any contact=]
; Entry point (dialected function)
contactor: func [input [block!]][
parse input rules=
]
; Sample call
contactor [
call #000.555.1212 at 12:34
email user@host.dom "On for lunch?"
post %news.txt to http://all-the-news.com/news.txt on 1-jan-2018
]
; Test run output
Call #000.555.1212 at 12:34:00
Send user@host.dom 13 bytes
Post 1815 bytes to http://all-the-news.com/news.txt on 1-Jan-2018
Other langs can implement something like it, but the fact that Redbol langs were designed to solve this very problem--the exchange of information between people and machines--provides a big advantage.One incentive for backers is if they want a say in how things are prioritized.
And while this may be more beneficial in your work, a lot of software does have to deal with money, where it's important not to use floating point, but BCD or something else.
1) Do you agree that a notation should support currency values? That is, they are useful to identify in data, as atomic units?
2) If so, do you agree there should be a single standard symbol and lexical form used to identify them? Because if we don't do that, we have to support every localized notation, correct?
3) If you agree to both of those questions, what symbol do you suggest? ¤ is generic, but not on any keyboard layout I know of. Also, see Chris's note about ASCII priority.