« first day (1637 days earlier)      last day (2143 days later) » 

12:00 AM
>> pick [a b c d] true
 
; Brought to you by: try.rebol.nl
== a
 
>> pick [a b c d] false
 
; Brought to you by: try.rebol.nl
== b
 
I don't think you should be able to use PICK with LOGIC!, so either condition 'a 'b offered another alternative.
 
 
1 hour later…
1:12 AM
@MarkI C programming practice: comma usage, pro or anti?
if (condition)
   x = 10, foo(), y++;
 
1
Q: type of literal words

RAbrahamI was reading Bindology and tried this: >> type? first ['x] == lit-word! >> type? 'x == word! I expected type? 'x to return lit-word! too. Appreciate any insights.

 
1:49 AM
1
A: type of literal words

HostileForkA LIT-WORD! if seen in a "live" context by the evaluator resolves to the word itself. It can be used to suppress evaluation simply with a single token when you want to pass a WORD! value to a function. (Of course, in your own dialects when you are playing the role of "evaluator", it's a Tinker...

 
 
2 hours later…
3:54 AM
posted on April 24, 2015 by qtxie

FEAT: added more error checking for vector! datatype

 
@gnat How goes? Tinkering with Red I see.
 
4:29 AM
Yeah. Out of country in the moment, but wanted to bring both a presumed bug and a questionable "feature" to someone's attention. ;-}
How are you? Looks like you are continuing to tinker with r3 and C?
 
@gnat Yes, hacking away, still getting control and lockdown and not attacking any new features.
"Give me whereon to stand", said Archimedes, "and I will move the earth."
Right now I'm trying my first type-checking experiment via a C++ #ifdef such that building under C++ can catch bugs the C build can't, while still building the same as before under C.
It's a study of something that had bothered me before of "when is a FRAME not a FRAME." I'd like to know the answer to that.
#ifdef __cplusplus
struct REBFRM : public REBSER {};
#else
typedef REBSER REBFRM;
#endif
The C typedef has no "teeth", but the C++ derivation does. It allows passing REBFRM pointers where a REBSER was expected, but not vice-versa w/o a cast.
(I've mentioned the implementation choice where "frame" as used in objects/ports/errors for key to value lookup is actually hacked on as a type of ANY-BLOCK! that fits a certain structure. The first value in this series is a special type users don't have the ability to make that holds some fields, but mostly just a block of words. The other values in the series are the values for those keys. So a valid frame fits that structure, has an length of the word series one less than the main series.)
It is perhaps (?) obvious that it would be nice to know--as you were passing pointers around--if the pointer was to one of these "magical" key/value series that fit the invariant.
Anyway, this is my first test of C++ static type checking adding value while not "turning the codebase into C++"
 
5:28 AM
https://github.com/red/red/pull/1114
GitHub
Red Pull Req—FIX: issue #1113 (Word path access on a string broken)
qtxie
1429917795
 
 
1 hour later…
6:30 AM
Having learned what a GOB! is, I do not believe it should be built into the core of Rebol. The core should be able to be extended with new types that themselves reuse Rebol types and services, and collaborate with the garbage collector to know when they are no longer needed.
 
 
1 hour later…
7:36 AM
First C++ type check: success. More enlightenment about the working of frames, and how VAL_WORD_FRAME is indeed not always a "frame"
Some other surprises in there...a module's "Spec" is a frame.
 
 
2 hours later…
9:30 AM
@HostileFork - Doc started some discussion (on Altme) about how to get to the metadata. It would be imo big semantic change (his first proposal would be to use \ ) ...
 
@pekr Well, I'm still learning just what a module is supposed to be. Some of this is quite tangled.
>> help find
 
; Brought to you by: try.rebol.nl
USAGE:
    FIND series value /part length /only /case /any /with wild /skip size /last /reverse /tail /match

DESCRIPTION:
    Searches for a value; for series returns where found, else none.
    FIND is an action value.

ARGUMENTS:
    series (series! gob! port! bitset! typeset! object! none!)
    value (any-type!)

REFINEMENTS:
    /part -- Limits the search to a given length or position
        length (number! series! pair!)
    /only -- Treats a series value as only a single value
 
Hmmm...this is missing several refinements (/tail, /match, /reverse... /last)
I was going to ask what exactly it was /match was supposed to do
 
Missing?
 
HF, but you try to define new stuff for Rebol/Red, and such discussion is happening.
 
9:36 AM
/last -- Backwards from end of series
/reverse -- Backwards from the current position
/tail -- Returns the end of the series
/match -- Performs comparison and returns the tail of the match
 
@pekr I'm not really defining modules at the moment, I'm just fixing bugs. I do monitor web-public AltME discussions.
/match seems to be like /tail with the requirement that the position where the match started be the head of the input
 
 
2 hours later…
11:38 AM
Greetings @RAbraham. We're glad to answer your questions, ask if you have them. :-)
 
Hi @HostileFork. Thank you for your detailed answers to my previous questions!. I tried bind? in the Red 0.5.2 console and it wasn't defined. I guess that it is still being hashed out? or does Red take a different strategy altogether?
 
@RAbraham One of my concerns is that in general Red has not really formally mapped out what its hybrid model entails. Compilation is a bit in contention with a number of the more interesting Rebol features...and in fact Red was once named in part as a "reduced" version of Rebol, prior to deciding to include an interpreter. Exactly how that interpreter will interact with compiled code has no obvious (to me) roadmap.
(Not to say I don't think there are interesting and useful ways to address the question, I just don't think an underspecified variant will yield pleasing results by default...the pleasing results will require investment and design.)
 
Maybe you could ask your question here - groups.google.com/forum/#!forum/red-lang
 
Right now my focus is on prototyping for RenCpp / RenC
DocKimbel has a plan and it is best to let him pursue it in his way and methods. There is not a lot of use in arguing. The best argument I can make is to make something and demonstrate it being planned and complete and working, and have him go "Red needs that". There is not really another way to influence.
Bug reports, perhaps.
And in fact, he did fix that parsing bug. Which is the sort of thing that should be in test suites and such.
 
11:53 AM
Ah, I understand. thanks @HostileFork. @pekr I think I'll wait for a while. I feel that the Red Dev team may be aware of such a fundamental notion as binding and I don't want to rush them.
 
@RAbraham There have been a few changes. See binding differences in Rebol3.
 
as long as there are useful ways to address the binding question in Red :). Looking forward to it.
Ya, I have that page open :). It is indeed a great answer. I was just curious about Red
 
@RAbraham and if you missed it, another BrianH epic: definitional scoping
I've been digging in the C sources... a lot this month... even after saying I wouldn't. I'm thinking of writing "Bindology Squared" or something and talking about how it all really works...where it breaks down, etc.
Overall though it reminds me of what a manager of mine once said about the project we were working on when I got too picky. He said "It's like a singing dog. The reason people go to see a singing dog is not because the dog sings in tune. It's that it sings at all." In that sense, the very fact that Rebol can accomplish what it does given its oddball nature is impressive to start with.
 
that would be great. I'm on a reading binge for Red/Rebol and an article on bindology would be nice to read.
 
@RAbraham I think I sent you the Ren Garden video before? If you're on a watching/reading binge, that paints a bit of a picture of where I'm going.
 
12:01 PM
Cool, will check it out. Thanks!. Alright, I have to head out, just thought I'd chat a bit
nice meeting you @HostileFork and @pekr
 
@RAbraham TTYL, do give the video a watch if you have a moment...
 
absolutely
 
12:32 PM
I've tried to find ways to make better use of backslash, but they've kind of fallen flat so far.
It seems that QUERY or another operation would be better, returning an object of metadata by default and then allowing perhaps a more optimized answer.
query/field (make block! 10) 'capacity => 10
 
 
1 hour later…
1:41 PM
Rebol's character comparison routines are a bit locality-naive. For instance: in trying to find a unicode character case-insensitively, it will actually hit the case table for each element in the search string, converting every one to lowercase...instead of creating a search pair at the outset of the upper and lowercase variant of the character you are trying to find and then doing two comparisons while stepping through.
 
2:22 PM
@HostileFork That method might require a search triple or more, and to create it you'd have to walk the entire table anyway.
You could create a "reverse" table, of course, but, well ...
 
 
3 hours later…
5:23 PM
@HostileFork Anybody think about length? of an integer being the number of digits in it?
 
 
2 hours later…
7:13 PM
@MarkI In what base? Does a minus count?
 
8:12 PM
@HostileFork Good questions! Also a good question: would length? 0 be 0 ...
 
@MarkI It was an answer disguised as questions. :-)
 
I think I was originally intending something like "the number of characters in its mold string".
 
It's clearer to ask for that if that is what you want.
 
But I've already moved on to: what if what it returned was the number of bytes in its internal representation ...
 
38 secs ago, by HostileFork
It's clearer to ask for that if that is what you want.
 
8:15 PM
@HostileFork I didn't even know it clearly at the time, I apologize for thinking out loud.
 
hey there @HostileFork
 
@MarkI Thinking out loud is what we do here...
@AlexanderGuo Heya. What's up?
 
about my bkg: so I just recently graduated from college
been working full-time for a few months
I kinda code a lot though
so the main reason why I'm looking into languages like Lisp is mainly for the REPL
anyway yeah
hi everybody
so to solve my problem with the multi-line REPL, I modified VIM SLIME to call a function SlimePreSendHook
that function will join multiple lines into one line
heh okay I guess I'll go back to coding..........
 
A better console REPL for Rebol is certainly possible. Right now its strongest REPL features are things like the reflective help.
 
reflective help?
well I find it funny that Rebol 2 had multiline support, while Rebol3 didn't
I don't know if that's a purposeful oversight or not
 
8:20 PM
    @RebolBot
    foo: function [
        {Your function description here}
        val [integer!] {Parameter documentation here, some integer}
        stuff [string! binary!] {Some more documentation.}
    ] [
        print [val stuff]
    ]

    help foo
 
; Brought to you by: try.rebol.nl
USAGE:
    FOO val stuff

DESCRIPTION:
    Your function description here
    FOO is a function value.

ARGUMENTS:
    val -- Parameter documentation here, some integer (integer!)
    stuff -- Some more documentation. (string! binary!)
 
holy shit
 
; Brought to you by: try.rebol.nl
USAGE:
    FOO val stuff

DESCRIPTION:
    Your function description here
    FOO is a function value.

ARGUMENTS:
    val -- Parameter documentation here, some integer (integer!)
    stuff -- Some more documentation. (string! binary!)
 
@AlexanderGuo :-) It is the "function specification dialect"
 
8:21 PM
yeah, homoiconicity makes crazy features like these possible
er, easier, I should say. It's always possible.
 
@AlexanderGuo it's not oversight,it's just "not yet" implemented.
 
was the REPL rewritten between REBOL2 and REBOL3? cuz REBOL2 had it
@rebolek
 
@AlexanderGuo Rebol2 was apparently rather monolithic. The goal of Rebol3 was to break out the core into something that was OS-independent and had a kind of IOCTL-ish abstraction layer. Rebol3 itself never makes OS calls to anything from serial ports to readline libraries etc.
 
@Host
@HostileFork ah I see
 
We only know a certain amount about the situation, some from reverse-engineering Rebol3...because Rebol2 was closed source.
The proper "libreadline" implementation was never done, and Carl would never use something like libreadline or curses. He would insist on implementing it all direct to the OS.
 
8:25 PM
why?
 
@AlexanderGuo Yes, R3 used standard system console instead of custom one and multiline support wasn't high priority for Carl in the beginning.
 
Rebol is designed to be built with any dependencies it happens to use as subsetted directly from a snapshot of that library's sources. It won't depend on anything. It's just the way he rolls.
 
Carl's a pretty crazy guy. First guy to do preemptive OS and now Rebol
 
@AlexanderGuo First preemptive consumer OS. They existed in industry.
 
@HostileFork ah i see. speaking of OS, there doesn't seem to be much more room for research, is there?
 
8:29 PM
@AlexanderGuo Always room for research. And we do not have good Real-Time OS support at the consumer level. Having processes be able to get service promises is a long way off...
"I'm an MP3 playing program, I have a song to play. I require my quota to run my decoder and output the sound. Once you've promised me the quota--acting on orders of the user--do not allow a lower priority process to create paging or memory problems that prevent you from giving me what you promised so that I can play the song without skipping."
 
@HostileFork ah, I've heard of Real-Time OS being in cars
 
Yes, but if you give some corner-cutter a chance they'll run your antilock brakes off the iPad embedded into the dashboard.
 
so in terms of code as a front-end, Rebol is one of the best I've come across
2
it seems that the main problem is nobody's come up with anything compelling to do with Rebol
 
@AlexanderGuo Depends on who you mean by "nobody" and what counts as "compelling".
 
@HostileFork on the scale of something like Ruby
 
8:36 PM
link: REBOL to become open source http://www.rebol.com/article/0511.html
@AlexanderGuo Rebol has its niche, and I wish it nailed that niche more flawlessly vs. being Yet-Another-Imperative-Programming-Language.
Right now a good way to look at it is to use PARSE some, get a feel for it and how to solve problems in it, and not necessarily to think of it as a programming-in-the-large answer. It is a long term experiment invested in and designed heavily by a few people who've thought pretty deeply. A lot of that thought has been lagging in getting incorporated into the implementation.
 
@HostileFork well, if Rebol has a really good frontend, then the only task left is to flesh out compelling backends
@HostileFork the Red programming language project seems promising to me
assuming they execute on their vision
 
Execution is unlikely to stop.
Anyway, I just draw the icons here.
@AlexanderGuo If you want an example of "bring the crazy", I thought this was pretty neat:
for: func [
    {Execute a "C-style" FOR loop with an initialization, test, and step}
    init [block!]
    test [block!]
    step [block!]
    body [block!]
    /local out
] [
    init: context init

    while bind/copy test init
        bind compose/deep [
            set/any 'out (to paren! body)
            (step)
        ] init

    get/any 'out
]
"So let's say your language was missing a looping construct..."
 
lol that's cool
so basically Rebol is as expressive as Lisp, discounting the fixed-arity part
 
It's different, and if you want multiple arity you can pass a dialect block if it suits you. foo [a b c] can interpret the block how it likes, and accept foo [a b] or foo [a: [b c] <def> http://example.com]. Like in the function spec dialect above.
 
so like, what, Rebol's contexts vs Lisp's macors?
 
8:48 PM
Fixed arity is only a rule in the default "DO dialect" that powers everything else.
 
ah, I see
wow
 
16
A: Is there a overall explanation about definitional scoping in Rebol and Red

BrianHRebol actually does not have scoping at all. Let's take this code: rebol [] a: 1 func-1: func [] [a] inner: context [ a: 2 func-2: func [] [a] func-3: func [/local a] [a: 3 func-1] ] So, with that code loaded, if Rebol had lexical scoping, this is what you'd see: >> reduce [fu...

@AlexanderGuo If you haven't looked at PARSE much, it's a great place to start, as I said.
@RebolBot
parse "Because dialecting in [Rebol] and [Red] is [Cool]!!!" [
    some [
        thru "["
        copy data to "]"
        (print data)
    ]
    to end
]
 
; Brought to you by: try.rebol.nl
Rebol
Red
Cool
== true
 
"SOME number of times (one or more), match a rule block that seeks up THRU (e.g. including) a "[", then COPY into the variable data all the information up TO (e.g. not including) a "]". If that rule matches, escape into ordinary non-dialected code...run a print. After this rule can match no longer seek up to the end of the input to get a TRUE result from the overall match (e.g. eat the "!!!" at the end)."
@AlexanderGuo Can you see the simple modification to get that to include vs. exclude the brackets in the matched data?
 
@HostileFork oh yeah, PARSE was one of the reasons why I became interested in Rebol
2
I was designing my own way of declaratively parsing/extracting information from a string
then I came across Rebol and did a deep dive there
and really like what I found
 
8:59 PM
@AlexanderGuo Good. Well, there are some masters of PARSE around. I want to make it easier to get started with by having pre-made character classes to use... parse "12A3abc" [4 digit/hex some letter], that kind of thing.
I've programmed for what one might call a long time. I'm not blind to the flaws and oversights of Rebol and Red's design, and could gripe for hours about it needing more work than it should this far into development (chronologically far, at least). But there's some fun stuff in it, it's a way of solving problems that has certain kinds of satisfaction and frustrations. So glad you're getting a chance to look into it.
@AlexanderGuo Sidenote: changing your avatar on SO+chat
 
9:25 PM
@HostileFork haha thanks for that. Profile pic not super important to me though
 
@AlexanderGuo It helps us here with identification, because otherwise users look the same in the activity bar up top right when they join. I thought you were @graph. Doesn't have to be anything special or custom, just any square different from these gravatars...
 
 
2 hours later…
11:50 PM
Hmmm. PATH! evaluation is a bit weird, in that there is a type dispatch table for how to handle a type. But starting the path with a WORD! doesn't call the dispatch for WORD! of course...it evaluates the word but does not call a function if it's a function. The way you wind up calling a function is if you get to the end of the path processing and the value that churns out is a function.
So there's a kind of "two phase" processing of elements in DO (with a simple WORD! representing a quicker experience of those two phases, as they happen one right after the other).
 

« first day (1637 days earlier)      last day (2143 days later) »