HNHacker News
TopNewBestAskShowJobs

greggirwin

164 karma · joined May 23, 2015

submissionscomments
greggirwin··on Red Language: Answers to community questions
Welcome to Red @Turing_Machine! Baroque is fine for music, but not for tech. :) It's funny how a certain feature will attract people to Red (and its predecessor Rebol), but then you find so much more inside. I was the same way. When I found Rebol, in 2001, it was the GUI system that hooked me. That's still a great feature, of course, but it's the core language/format itself, the datatypes, `parse`, and more that I miss when using other tools.
greggirwin··on Writing GUI Apps Using the Red Programming Language
@badsectoracula's comment resonated with me, and obviously many others. VB was transformative. Since then, people have tried to recreate that magic. Hasn't happened. Other transformative magic has appeared but, to build on what @badsectoracula said, people miss the point when trying to recreate VB (or other magical things).

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.

greggirwin··on Red Lang goes blockchain
Very little danger, especially to the core language. One scenario is that someone wants to add support for all kinds of features by adding large, external dependencies, thinking it will make Red more marketable. But the language isn't the thing to sell. Really hard to do that anymore, sad but true. The thing to sell is tools that help people get their job done and make their lives easier. Red is just the thing we want to use to build those tools.
greggirwin··on Writing GUI Apps Using the Red Programming Language
Sarcasm?
greggirwin··on Writing GUI Apps Using the Red Programming Language
One big problem there is that protocols aren't sitting still in time. As more things change, like moving SMTP to ESMTP, Rebol needed to keep up, but didn't always. R2 was closed source, which didn't help. The protocol schemes were all written in Rebol, so you could hack them, which many of us have done over time, but that was an area where docs were lacking and sorely needed, so not many people could do it effectively.
greggirwin··on Writing GUI Apps Using the Red Programming Language
It's OK if they don't go away. We just end up looking better (and having more fun doing so) in comparison. :^)
greggirwin··on Writing GUI Apps Using the Red Programming Language
Wish I could give this comment +10.
greggirwin··on Writing GUI Apps Using the Red Programming Language
GC will come. It just hasn't been needed yet for Red to continue its own development. If you write in Red/System, the C level dialect, you have `free`.
greggirwin··on Writing GUI Apps Using the Red Programming Language
Ah, I see @rebolek noted that as well. He always beats me.
greggirwin··on Writing GUI Apps Using the Red Programming Language
You can see how Red is starting to approach this in http://www.red-lang.org/2017/07/063-macos-gui-backend.html, particularly the Cross Platform GUI Metrics section. It is a really hard problem. Technically it can be done, if you put all the onus on the user. The more we try to do for them, the harder it gets. It will always be a balance.
greggirwin··on Writing GUI Apps Using the Red Programming Language
How hard it is all depends on the DSL. I just found another article on HN and whipped one up as an example. See: https://news.ycombinator.com/item?id=16010971

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.

greggirwin··on Writing GUI Apps Using the Red Programming Language
You can pattern match streams of values, and those values can be any lexical form that Red supports.
greggirwin··on Red Lang goes blockchain
Correct, though we can't predict the future. If somebody throws huge amounts of money at Red they could influence the language. Then it's up to the team and community to decide if it's worth including, or risking a fork. It's open source after all.
greggirwin··on Ask HN: Rebol/Red parse is great. Has it been re-implemented in other languages?
Correct. The grammar is interpreted directly.
greggirwin··on Ask HN: Rebol/Red parse is great. Has it been re-implemented in other languages?
You won't find anything quite like it in any other language, and there's a reason for that. Like Lisp, Redbol langs are homoiconic. Rebol was initially designed as a messaging language, and has a lot of datatypes with literal forms that don't exist in other languages. That's important because the `parse` function can operate at 2 levels: `string` parsing (what you find in other parser toolkits), and `block` parsing. Block parsing means the data has been loaded and tokenized already, and you can parse by high level datatype. I'll try not to get too carried away, but that's tough for me. :^)

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.
greggirwin··on Red Lang goes blockchain
We live in interesting times.
greggirwin··on Red Lang goes blockchain
@ZenoArrow is correct. Nenad Rakocevic supported himself, with modest donations and other work, until he could raise the initial investment money. He and another full time developer have been working on it for a few years, using those resources. This is the next phase, with one goal being to grow the core team, but also encourage community involvement by being able to reward people.

One incentive for backers is if they want a say in how things are prioritized.

greggirwin··on Red Lang goes blockchain
Neither of those features have been a priority, but both will eventually be built in. We'll wait for you. :^)
greggirwin··on Red Lang goes blockchain
Thanks for the info @nickpsecurity!
greggirwin··on Red Lang goes blockchain
If you follow Red, you know that avoiding complexity is a primary goal. Each new back end may add some complexity, but it doesn't change the underlying model of how Red is implemented. And I think it will be kind of what you say you want. It is a dedicated project, with the current goal of raising money so a team can focus on that. Think of it as your dedicated project using Red to build the blockchain programming tool. It wouldn't have to be all Red, that's just the best approach in this case.
greggirwin··on Red Lang goes blockchain
It's not an afterthought, but it takes a lot of time and work. The project priorities are driven by the people paying for the work, and it hasn't been a priority for them. We hope the new projects will allow us to improve the situation. In the meantime, telling us what docs are most lacking, or most needed, helps.
greggirwin··on Qt 5.10 released
Someone mentioned Red in a comment here. Coincidentally, it's a descendant of Rebol, which was designed by Carl Sassenrath, architect of the AmigaOS.
greggirwin··on Ren: a lightweight data-exchange text format
Explicit is different, not better.
greggirwin··on Ren: a lightweight data-exchange text format
I agree. I was sad to see comment support removed from the JSON spec.
greggirwin··on Ren: a lightweight data-exchange text format
That would be a very different format. A big part of the format is that the lexical forms allow you to write things as you normally would, to another human. That does impose limits, but is part of the fundamental design.
greggirwin··on Ren: a lightweight data-exchange text format
No need for special syntax. ^ is already the escape character. Just use blocks. Though a `unit` syntax has been brought up. The notation would use path syntax, but start with an number instead of a word. Frink, of course, is the king of languages in this regard.

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.

greggirwin··on Ren: a lightweight data-exchange text format
Thanks! Good to know.
greggirwin··on Ren: a lightweight data-exchange text format
This comment has generated a lot of interest, and rightly so. The thing to remember is that Ren (and JSON) are data exchange formats, not in-memory representations. If you need more control than their numeric syntax supports, metadata is your friend. Just include that where needed. That doesn't mean every endpoint will honor or treat them the same, of course.
greggirwin··on Ren: a lightweight data-exchange text format
@jepler,

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.

greggirwin··on Ren: a lightweight data-exchange text format
Without a clear choice (as an English speaker) as to which might be more exact in translation, I think I pulled 仁 in because it also looks like the opening of a block, which is fundamental in Ren.
← PreviousPage 3 of 5Next →