« first day (1415 days earlier)      last day (2365 days later) » 

6:36 AM
@HostileFork Sorry, not me.
 
6:58 AM
@HappySpoon Et tu, Spoon?
@RebolBot alive?
 
Just making sure.
Greetings @DamkerngT.
>> print {"It's nice to meet you," said {The RebolBot}, "...we do like to talk to people here."}
 
; Brought to you by: try.rebol.nl
"It's nice to meet you," said {The RebolBot}, "...we do like to talk to people here."
101 1 1
 
@HostileFork Hello!
 
Cool.
Well as you can see, we have a couple of little room robots
red> print "I'm new."
 
7:02 AM
; Brought to you by: try.rebol.nl
I'm new.
 
red> print "Hello, world!"
 
; Brought to you by: try.rebol.nl
Hello, world!
 
Cool!
 
The RebolBot is of course written in... what else... Rebol
21
Q: RebolBot - a chat bot for the chat rooms

Graham Chiu RebolBot is a chat bot with a natural English dialect interface, specifically targeting the StackOverflow chat rooms. Yet it has a modular design, can post tweets to Twitter, and could be modified with only a little effort to work with other chat systems. An instance of the bot hangs out...

So we speak in the English Language Learners space about linguistics, and language
And Rebol is very much (to my eyes) a language that is designed for a kind of practicality. Its axe to grind is different than, say, Haskell's axe to grind with programming.
Which is part of what makes it different, and interesting.
 
Do I have to always begin my lines with red> to interact with the bot here?
 
7:06 AM
If you want to speak to the Red bot yes, but Rebol and Red are different languages. >> suffices to speak to RebolBot if you have one line of request. For multi-line requests, you address the bot and then use shift-enter.
@RebolBot
code: ["Hello World" print]
reverse code
do code
 
; Brought to you by: try.rebol.nl
Hello World
 
Oh, I see!
 
@RebolBot introduce me
 
As you can see, I'm primarily a C++ programmer by trade and training.
 
7:07 AM
@RebolBot introduce HappySpoon
 
@DamkerngT. What do you mean?
 
It might not know that pattern.
But that's a good suggestion.
Did you notice how code was reversed in my example, but it did not reverse the string?
>> reverse "Hello World"
 
; Brought to you by: try.rebol.nl
== "dlroW olleH"
 
>> reverse [print "Hello World"]
 
; Brought to you by: try.rebol.nl
== ["Hello World" print]
 
7:09 AM
It's stack-based, I believe?
 
Well, every evaluated block evaluates to its last result. Like Ruby
>> do [1 + 2 3 + 4 5 + 6]
 
Ahh
 
; Brought to you by: try.rebol.nl
== 11
 
@rebolbot who is @HostileFork
 
So basically, 1 + 2 was evaluated and thrown away, 3 + 4 was evaluated and thrown away, 5 + 6 was evaluated and that's the result of the whole expression.
 
7:10 AM
@HappySpoon I know this about HostileFork and their local time is 15-Sep-2014/2:10:13
@HappySpoon I'd like to know about you! Use the 'save my details' command
 
@RebolBot
parse "Hello there [Damkerng T.] how are you today" [
    thru "["
    copy name to "]"
    (print name)
]
print "and bob's yer uncle"
 
; Brought to you by: try.rebol.nl
Damkerng T.
and bob's yer uncle
 
Rebolbot is not like Goggle, it has to be fed data :)
 
@DamkerngT. So when we speak of the intersection of language and programming, do you understand the above code?
What THRU and TO might mean?
 
@HostileFork I could guess, though I'm sure how accurate my guess would be.
Ahh... I think I get it.
Why does (print name) have to be parenthesized?
 
7:13 AM
@DamkerngT. Well parse is a sort of mini language within a language. Here we see it taking two parameters: an input series (in this case, a string) and a block of rules. Because Rebol does not evaluate blocks unless you ask it to, that gives the opportunity for various engines to make up their own ideas about how to interpret the rules.
Glad you asked
Because parentheses are just one of the tinkertoys
>> type? first [() () ()]
 
; Brought to you by: try.rebol.nl
== paren!
 
Oh! It's a type!
 
The default evaluator uses them for precedence
But you? You can do what you wish.
>> compose [print (reverse "olleH")]
 
; Brought to you by: try.rebol.nl
== [print "Hello"]
 
Perhaps you want to use them for templating; "I'd like a construct that will evaluate things in parentheses but leave everything else alone"
In the case of parse, it's used to enclose things that you want to be evaluated as code if that point in the match is reached.
Sky's the limit, really, but because people like to use it for templating... it's frowned upon to use them for precedence even though you can. Feels like a waste.
 
7:16 AM
Hehe
 
Rebol has, sadly, ruined lives. People who came to it and saw and felt enlightened. How much you could do with so little.
>> copy/part (to-string read hostilefork.com) 100
 
; Brought to you by: try.rebol.nl
== {<!doctype html>
<html lang=en>
<head>
^-<meta charset=utf-8>
^-<meta name="google-site-verification" c}
 
@HostileFork I was ruined by many other languages, so that's okay with me. :)
 
>> parse to-string read hostilefork.com [thru <title> copy header to </title> (print header)]
 
; Brought to you by: try.rebol.nl
 : Hostile Fork Projects
== false
 
7:18 AM
(the false is because parse only evaluates to true if it reaches end of input)
(and I only went through the close of </title>)
@DamkerngT. Well, these are addictions. I kind of want to drum up support, especially because Red is pretty badass... lately there's been a leadership gap in Rebol itself
 
Oh, I didn't know that Rebol has existed since 1997!
 
At one time it had geek cred, even, coming from an AmigaOS architect
 
So, I think Rebol is the language, and Red is the bot.
 
No, Red is a reinvention of Rebol
We have two bots one for each language
 
Oh! I see now.
 
7:21 AM
And Red is still very bleeding edge, but very ambitious
I think you have to really care about language and complexity to care about it
 
I usually care about what works best in a specific project.
 
People who plug together large "mash-ups" and will do "View Source" on a page and see an unreadable mess of gobbledygook, and think of that as "okay" because they reached their aims... will think of the very meticulous way Rebol and Red people work as being kind of nuts.
Those people would probably also think the Haskell people are nuts.
 
@HostileFork Not me. :)
 
It depends on whether you wish to study brevity and essential character of a machine, or if you wish to study formalism.
At heart I am more interested in formalism.
 
I think I'm geared toward practicality.
 
7:24 AM
@DamkerngT. So let us speak linguistics!
>> type? <hello there>
 
; Brought to you by: try.rebol.nl
== tag!
 
Oh, another type. :)
 
; Brought to you by: try.rebol.nl
== url!
 
>> type? $10.20
 
7:25 AM
; Brought to you by: try.rebol.nl
== money!
 
>> type? #{DECAFBAD}
 
; Brought to you by: try.rebol.nl
== binary!
 
>> type? 2#{1010101010}
 
@HostileFork What do you mean?
 
Err, wait.
>> type? #2{1010101010}
 
7:26 AM
; Brought to you by: try.rebol.nl
== "1010101010"
 
Hmm... That's weird.
 
Okay that confuses me. There's a way to enter binary constants. @HappySpoon what's up with that?
In any case, you can parse binary literals
 
>> type? [42, "The answer"]
 
; Brought to you by: try.rebol.nl
== string!
 
@RebolBot
parse #{FFFFFFFFDECAFBAD000000} [
    some #{FF}
    copy value to #{00}
    (print value)
    to end
]
 
7:28 AM
; Brought to you by: try.rebol.nl
== block!
; Brought to you by: try.rebol.nl
#{DECAFBAD}
== true
 
So commas and periods are exactly the same in Rebol
They are considered indistinguishable
Due to small size
 
LOL
 
And so, given the international idea of using commas in the decimal place, as we saw in Montreal
>> 10,20
 
; Brought to you by: try.rebol.nl
== 10.2
 
There is no distinction in the language, outside of string literals, between them.
The use of square brackets as the main code block delimiter is also not accidental.
On most (not all) keyboards you can type them without a shift.
 
7:30 AM
Much easier to type than { and }.
 
Rebol has a lot of beauty to it, for instance
@RebolBot
if all [
    1 < 2
    3 < 4
    10 < 20
] [
    print "All your conditions were true!"
]
 
; Brought to you by: try.rebol.nl
All your conditions were true!
 
Oh, neat!
 
But again you have to see it, to see that IF is a function
>> help if
 
; Brought to you by: try.rebol.nl
USAGE:
    IF condition true-branch /else false-branch /only

DESCRIPTION:
    If TRUE condition, return arg; evaluate block args by default
    IF is a native value.

ARGUMENTS:
    condition
    true-branch

REFINEMENTS:
    /else -- If FALSE condition, return second arg; evaluate block by default
        false-branch
    /only -- Suppress evaluation of block args.
 
7:32 AM
The fact that Rebol can supply help for functions comes from its reflective nature.
 
>> help
 
; Brought to you by: try.rebol.nl
Use HELP or ? to see built-in info:

    help insert
    ? insert

To search within the system, use quotes:

    ? "insert"

To browse online web documents:

    help/doc insert

To view words and values of a context or object:

    ? lib    - the runtime library
    ? self   - your user context
    ? system - the system object
    ? system/options - special settings

To see all words of a specific datatype:

    ? native!
    ? function!
    ? datatype!
 
Oh, kinda document-included. :)
 
@RebolBot
foo: function [
    {This is where you describe the function.}
    arg1 [integer!] {This is where you put something about arg1}
    arg2 {This is some junk about arg2}
] [
    print arg1
    print arg2
]

help foo
 
; Brought to you by: try.rebol.nl
USAGE:
    FOO arg1 arg2

DESCRIPTION:
    This is where you describe the function.
    FOO is a function value.

ARGUMENTS:
    arg1 -- This is where you put something about arg1 (integer!)
    arg2 -- This is some junk about arg2
 
7:34 AM
But when you start seeing the code as structure, you realize that FUNCTION is itself a function. :-)
It takes two parameters, the first is in the parameter dialect.
The second describes the body.
When you can really saliently explain why "colon is not the assignment operator" you are getting closer to getting the trick.
But it's really crazypants when you start messing with it.
 
According to Wikipedia, Red is relatively new (since 2011).
 
@RebolBot
oldprint: :print
print: function [value] [
oldprint reverse value
]

print "Hello World!"
 
; Brought to you by: try.rebol.nl
!dlroW olleH

** Script error: reverse does not allow integer! for its series argument
** Where: print do either either either -apply-
** Near: print length? do-commands print do-error prin "OK"

>>
 
Heh, I messed up the bot bridge by redefining print :-)
But you can defend things! @DamkerngT. ever hear of Nomic?
 
Nope.
 
7:38 AM
Check it out :-)
 
> Nomic is a game in which changing the rules is a move.
Interesting!
 
@RebolBot
protect 'print
print: function [value] [do make error! "Haha we h4x0red you"]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-locked-word.html
    *** ERROR
** Script error: protected variable - cannot modify: print:
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
Rebol lets you change the rules, and gives you some tools for layering what you allow to change or not.
You must admire the zero-installation half-megabyte executable :-)
 
Very!
 
7:40 AM
It does crazy things.
We're a little sad around here that the creator has... well... kind of wandered off and not really left a strong backbone for the open source collective that would like to steward it now.
 
Oh, no!
 
And Red is doing well, coming along, but you still can't quite use it.
Red/System is good if you have a C-like task, pretty stable.
It's basically C recast in the linguistic rules of the Rebol universe.
People are very demanding, they want end-to-end solutions, something that will get them to market... I think abstract ideas are a challenge. I've listened to the Haskell podcast about things like trying to sell Haskell to people building PHP infrastructure at Facebook, and it's really just a little niche frontier.
They just pile more fuel on the PHP fire to keep things running. So we have a hard sell, as all alternative thinkers do.
 
I agree.
 
7:59 AM
@HostileFork If you are still interested, I am one of those select few that subscribed to your channel.
 
8:16 AM
@iArnold Ah, you poor soul. :-) Well, check your skype for an "unlisted" video. Nothing too fancy, just not putting it up for the Internet-at-large.
 
 
3 hours later…
10:55 AM
@HostileFork I have about 20 channels subscribed. So I don't have to check out numerous channels if possibly something I generally find interesting was posted.
 
 
3 hours later…
1:56 PM
@HostileFork Will have to wait a week. Have a bet with the wife I can do 2 weeks without my pc (at home).
Now I am a poor soul ;-)
 
2:40 PM
@iArnold - I don't even know you and I can feel for you! It is killing me event thinking about those 2 weeks, LOL :-) Well, at least I would be let to use my digital camera instead :-)
 
@pekr Thnx Pekr! Lucky for me I work full-time in this nice place with computer & internet access, so I can keep up with most online activities.
 
3:16 PM
posted on September 15, 2014 by Rex

Could anyone give me an example of how to use this widget? I found it in the dialect, but does not know how it works.

 
 
4 hours later…
7:14 PM
Welcome to the Rebol and Red room. See our FAQ.
 

« first day (1415 days earlier)      last day (2365 days later) »