« first day (1611 days earlier)      last day (2169 days later) » 

12:07 AM
@MarkI Note there shouldn't be a mold/all ... only mold (which guarantees you can load it back)
And it shouldn't be called MOLD :-/ Every time I see that I have to go reconstruct my arguments for how those function sets should work.
 
12:32 AM
If SAVE were single arity and returned a string like MOLD, there's an efficiency problem with write %foo.reb save value. Because if it's large you end up creating this whole intermediate string, which you then have to encode as UTF-8, etc.
You could turn this to save/write value %foo.reb, but then it couldn't still be returning a string and be efficient. Adding the /write refinement would have to get it to return an unset. It's doable.
(If you were going to actually want the string in the end anyway, you might as well do it as stuff: save value and then write %foo.reb.)
But this makes LOAD and SAVE seem like the wrong words because they're so file-ish. SAVE/WRITE has a funny feeling to it. Hmmm... SOURCE has a nice feeling to it. source [a [b] c] => "[a [b] c]"
That just might be a winner for the new name for MOLD, and one might be able to leave SAVE alone. With TO-STRING and SPELLING-OF taking care of many other problems.
Oh, source exists for getting function source code. Hmmm. That's not used as much as mold, and arguably it's not "source"
>> source source
 
; Brought to you by: try.rebol.nl
source: make function! [[
    "Prints the source code for a word."
    'word [word! path!]
][
    if not value? word [print [word "undefined"] exit]
    print head insert mold get word reduce [word ": "]
    exit
]]
 
12:48 AM
>> probe :source
 
; Brought to you by: try.rebol.nl
make function! [[
    "Prints the source code for a word."
    'word [word! path!]
][
    if not value? word [print [word "undefined"] exit]
    print head insert mold get word reduce [word ": "]
    exit
]]
== make function! [[
    "Prints the source code for a word."
    'word [word! path!]
][
    if not value? word [print [word "undefined"] exit]
    print head insert mold get word reduce [word ": "]
    exit
]]
 
It sticks a set-word in front of it by taking a lit-quoted word. :-/ Okay, silly. If you really need that, you can ask for it. SOURCE is a much better word for MOLD.
 
1:03 AM
>> ?? source
 
; Brought to you by: try.rebol.nl
source: make function! [[
    "Prints the source code for a word."
    'word [word! path!]
][
    if not value? word [print [word "undefined"] exit]
    print head insert mold get word reduce [word ": "]
    exit
]]
== make function! [[
    "Prints the source code for a word."
    'word [word! path!]
][
    if not value? word [print [word "undefined"] exit]
    print head insert mold get word reduce [word ": "]
    exit
]]
 
@RebolBot
x: 10
?? x
 
; Brought to you by: try.rebol.nl
x: 10
== 10
 
@RebolBot
x: 10
source x
 
; Brought to you by: try.rebol.nl
x: 10
 
1:05 AM
posted on March 30, 2015 by fork

[Wish] The function known as SOURCE is currently a console-oriented function. It basically takes a quoted lit-word or path, looks it up, and puts that word in front of the molded value: >> probe :source make function! [[ "Prints the source code for a word." 'word [word! path!] ][ if not value? word [print [word "undefined"] exit] print head insert mold get word reduce [word ":

 
I suppose ?? isn't an exact duplicate of the behavior as it returns the value as well as output the name as a set-word. But does it need to? You could always say ?? x x if you wanted that.
 
1:18 AM
Coming in a few minutes to a Ren Garden near you...
Hm, SC is SECOND in Rebmu. SR isn't taken..but I want SC for SOURCE, as in "Source Code". So SECOND is getting bumped. SN? SD? Both available...I think I prefer SN...for now.
 
1:38 AM
@Feeds @HostileFork wouldn't that be overly presumptuous? If indents are an accepted part of a dialect, then the handler can do trim/auto trim/tail on any given strings, no?
 
@rgchris I don't consider it so, else I'd not have written it. I believe this covers readability in what has been the common case every time I've worked with multi-line strings. If you have a good counterexample that couldn't be satisfied with a leading caret, feel free to add it.
 
>> data: [
    para {
        Some Text
        Goes Here
    }
]

trim/auto trim/tail data/para
 
; Brought to you by: try.rebol.nl
== "Some Text^/Goes Here"
 
:22375624 That doesn't help with reading and molding (sourcing!) out code and wanting it to preserve things. Putting the burden on the programmer to handle the common case and forcing them to reinvent the escaping (some of which they can't do) isn't letting them say what they mean. I might want it trimmed, I might not. The string format can be enhanced to meet all desires.
If you want the current behavior:
 
@HostileFork It's easier to work around a case where the indent is not implied vs. a case where the indent is intentional.
 
1:42 AM
data: [
    para {^|^
^       Some Text
        Goes Here^|
    }
]
If you actually want all that space and newlining.
I argue 95% of the time you don't.
In the remaining 5% it will break down as maybe you want the leading space but not the newline at the front, or the newline at the end but not the spacing or the newline at the front, etc.
This puts each choice on the map as an independent thing.
More likely:
data: [
para {

^ Some Text
^ Goes Here

}
]
I don't know why that's not formatting.
But imagine it having a leading caret saying "I want the indents" and then throwing in extra newlines at top and bottom saying I want those opening newline and closing newlines too.
 
I don't disagree that the non-indented text is more common. Will try to let the idea settle :)
What of cases such as:
{
    Some Text
   Goes Here
}
Or a mix of spaces/tabs?
 
So far I've assumed there's a global column analysis of the first column and that used. Tabs are presumed illegal in strings due to the other proposal, and as GitHub is showing they're getting more alarmist about such things: github.com/hostilefork/uscii/blob/…
If you want a tab, you'd have to escape it. Otherwise, a space is a space. Terminal spaces followed by a caret at end of line if they are to be significant.
 
@HostileFork Might be they're trialling a new syntax highlighter?
I know they were tapping my TextMate bundle recently...
 
@rgchris Whatever they're doing, I think it's good to have exactly one kind of invisible in strings... the space character. That's the conclusion I've come to. I believe it in source code now in general too, but it's even more important in string literals.
 
2:15 AM
The highlighter is flagging spaces too. Will look into that.
@HostileFork I've seen you start many a campaign here—that might be the hardest, most quixotic, of the lot!
(mind I've been in favour of most :)
 
@rgchris Quixotic perhaps. But I do have a cross-platform GUI, built on a runtime library that I've researched how to get good automated documentation of...and that is kind of exceptional in its own right. I can code in Rebol and Red, and read/write their source code...
 
@HostileFork I'm not being critical, more just—good luck on that one...
Not even saying you're wrong on the merits.
 
@rgchris One doesn't need luck when one has a distribution, if the distribution wins.
 
Fair point.
 
I just want to think through all the consequences. Some of my ideas have been either wrong or merely half-right, with trials.
Trying is the key.
@rgchris I'm pretty sure the MOLD => SOURCE change is a winner at first sight, though.
Been trying to get rid of that word forever, tripping on SAVE and how single-arity SAVE didn't fit into the puzzle properly.
 
2:27 AM
@HostileFork Does that imply that it's no longer intended for serialization?
 
@rgchris SOURCE as we know it goes away, and is just a name for what MOLD does today. SAVE and LOAD aren't touched.
SAVE is thus arity 2, and doesn't have to proxy your value through an in-memory string just to write it to a file; it can go direct.
 
@HostileFork I guess I mean—SOURCE doesn't infer serialization to me (not that MOLD does either).
 
@rgchris If you LOAD code from a file, what is it you are loading? Would you say it's reasonable to say you loaded "source"?
 
Data, or Values.
 
Text.
Nope, textual source. You're not loading a file containing values. You are loading a string, representing source for values.
If it were values you wouldn't have to load it. It would be values already.
 
2:32 AM
Wouldn't TO-SOURCE carry more of the intent? (not suggesting it, just asking)
 
Maybe, but it's too much to type. You can use source as a verb, like if you are working at a newspaper: "There are twice as many manatees this year as last year." "Source that."
Also, I feel the builtins starting with TO carry a lot of weight in thinking that TO-X means X is a datatype.
 
So long as they're still there : )
@HostileFork My inclination is that typing isn't as much a concern as being concise. That that usage of source doesn't quite fit. Yeah, you wouldn't say 'to-source that' but that's not the action intended in that case.
data: ["There are twice as many manatees this year as last year"]
source data
 
If you're not doing anything with it, then of course it's going to look strange.
 
data: ["There are twice as many manatees this year as last year"]
package: source data
send hostile@fork package
 
data: ["There are twice as many manatees this year as last year"]
print ["The LOADable string that would give you the data block is" source data]
data: ["There are twice as many manatees this year as last year"]
ren-data: source data
send hostile@fork ren-data
 
2:39 AM
SOURCE-OF is another with more direct meaning.
But if I were at a newspaper, I'd expect that to mean 'find a source on that information'.
 
I think the argument for brevity here is in league with why length is better than length-of
Sheer commonality.
 
Hm, I know you have an aversion to hyphens whereas I carry one in my last name :)
I take your point on FOREACH, but I don't necessarily buy brevity where it clouds the intent of a statement.
 
I'm pro getting rid of the ? for non-logic result functions, the -of is usually an improvement.
 
Agreed!
 
I've debated that one for-each vs each. I know I hate the foreach, the word is like nails on a chalkboard.
every is actually a prettier word.
So every x [a b c] [probe x]
 
2:46 AM
I like EVERY better than EACH.
 
every (body) in the house, raise your hands, and say "yeah!"
house: [fork cat]
every body house [print either body = 'cat ["I have paws not hands."] ["yeah?"]]
 
:)
 
each is a little clunky feeling, so I've been considering it. But each is well-known.
 
Better to be right than conform!
 
@rgchris Unless you want to be popular. "Remember kids: Don't smoke. Unless you want to look cool." -- Penn and Teller
 
2:54 AM
We've made it this far without being popular. Popular is overrated... ...except for all the free stuff and the power, I suppose. But that's not for us.
 
@rgchris Speaking of popular, @rebolek and I have been discussing the migration of my website stuff to Lest. So there's been rewriting. Such as: before and after
So that should open up some StyleTalk usage
 
Cool. It's all in there, I believe. Let me know what your impressions are. It's on a backburner while I try and figure out what model I want to use to take it forward.
 
I was going to write a kind of Draem post-mortem, but I think the experience has motivated a push for Lest to do things it doesn't do that someone (like me) might want a static site generator to do
 
I have some thoughts on how it could be expanded to obviate the need for Bootstrap (although it'd probably piggyback in the interim).
 
@rgchris Have you seen: getskeleton.com
 
3:04 AM
Nup.
 
Bootstrap seems a bit heavy, I was wondering if I could get away with less.
 
Nice.
*Sigh*—one more thing to explore.
 
@rgchris You could always go back to Rebol2... 1 megabyte! True...there are still some glitches to work out... :-) hulu.com/watch/292071
HTML and CSS are quite frustrating, and it's frustrating to read about things like the point system behind CSS specificity, and the fact that someone would have to come along and tell the people making these things that what they were designing would need to deal with such conflicts...people do like to march on without planning.
It's unfortunate that understanding these things have become a necessity; yet at the same time Rebol has lagged on providing much of what has been hacked onto that frame.
 
The Skeleton CSS is really short...
I'll maybe make it a goal to be able to reproduce it from StyleTalk.
(after all, StyleTalk was conceived as a way to recreate a specific style sheet)
It can't at the moment as StyleTalk doesn't do media queries, but this has been a longstanding goal.
 
@rgchris Something I am being forced to react to is Google complaining about the absence of CSS "media queries" to resize images and such. I don't know if Skeleton vs Bootstrap has a variance in helping deal with that?
 
3:28 AM
Pretty sure Bootstrap does. I've have it working as well for some of my QM/MakeDoc output.
I'm guessing the Skeleton approach would be similar. Usually these projects seem to pick similar best practices.
 
@rgchris Do you still think MakeDoc is a "way to go" that fits in any future? Something about Lest and Draem is they were focusing on what I think is the strength in being LOADable, and building on a backbone of MarkDown in paragraphs. The complaints about strings and such has to do with some of the weak points where the burden is on the system to clean up when I think the needs seem to keep coming up so each person shouldn't have to "reinvent" common cases and escaping
 
3:45 AM
@HostileFork I do, but that's not to say it shouldn't move closer to MarkDown in as many ways as makes sense (link syntax being the more obvious case, but I've been using that for years now). There's a flexibility in document structure that I find lacking in MarkDown, and find LOADability burdensome for writing. That's just my opinion though and I don't see it as a hopeless case of divergence. There's a lot of crossover. In the end, it's just a different wrapper for the same thing...
 
@rgchris I'm interested in the burden of LOADability, and if that burden can be reduced. To me this is Rebol's strength and anything that isn't playing to it isn't a "dialect", thus dooming it to non-specialness.
My rearrangement of Draem format to Lest format was non-trivial, but would have been a LOT harder if it hadn't had structure to start with.
 
I don't see MakeDoc as a dialect (at least the textual representation, or source :)
It does contain dialects that currently conform to LOAD all the same.
 
Perhaps you could write an article called "In Defense of MakeDoc" or similar.
 
Could do. Will consider it...
 
4:05 AM
@rgchris It would be nice if there were more unification on the efforts, and so I'm trying to start that by winding into Lest rather than "go my own way"...pushing on it to get a sort of best-of-both-worlds experience. So if we can really understand what makes MakeDoc necessary with concrete examples, that might reveal another necessary feature.
I don't think =i is that feature, so it'd be important to kind of hone out what the real long-term winners are.
 
Apologies, though I did say my idea was going to be lame. Spaces and ] are the only things tags currently can't begin with, so ... oops.
 
4:21 AM
Hm... here's an idea. HELP already quotes its argument. It's able to probe into the quoted argument and "read things about it" and format that for you. What if help/only was more like ?? and old-SOURCE, and didn't interpret the thing you were asking about? help/only append would thus give you back something more probe-like and source like, except it would know that it was called append and not require the quote.
(Just wondering, because you don't want to--for instance--make probe quote its argument, since then probe first blk would wind up telling you about FIRST. So in trying to make up another word, I thought of our old pal /ONLY who says "do less than you were thinking of doing based on what I asked for". A HELP that /ONLY gave you the definition of something is more basic than something trying to pretty print for you...)
Anyway, TTYL @MarkI / @rgchris ... got to take a break for a bit. Actually did a lot of work today.
 
@HostileFork Um ... you're just trying to make me feel better, right?
Take your break, we'll chat later.
 
@MarkI Anything that makes you feel better, but I feel better by getting rid of MOLD. Hate that word. SOURCE wins for me. Never understood the differences between FORM and TO-STRING so I got rid of FORM and made TO-STRING make sense. There's nothing that wrong with source :append vs source append, so it's probably not worth worrying about...still, thinking.
 
@HostileFork I just meant SOURCE quotes its argument for a reason, which you have just acknowledged in your latest post.
Rest well.
 
@MarkI MOLD doesn't, and I propose the function of MOLD (especially as per being used in code as opposed to a console-only command) given to SOURCE as a non-ugly name more deserving of the spec and behavior of MOLD, which should always be MOLD/ALL, etc. etc. etc... pieces fitting together
Naming-wise, console conveniences should always take a back-seat to the needs of the language proper. Because that's the source... it's what runs whether you're in a console or not.
 
 
2 hours later…
6:30 AM
@HostileFork Sensing some deja vu here...
 
posted on March 30, 2015 by rebolek

[Comment] I do not think that this should be handled at Rebol level. Text editors can show "invisible" whitespaces, this looks like unnecessary complication.

 
 
4 hours later…
10:22 AM
Time is leading me to favor a single FUNCTION generator with a spec and a body, where locals gathering is controlled by /ONLY. This allows DOES to be a equivalent to FUNCTION [] BODY and DOES/ONLY to be equivalent to FUNCTION/ONLY [] BODY.
Features such as being infix or not can be controlled by the spec. infix: true. Then tested with an operation like infix?
Same for behaving internally as a closure or not. Expose exactly one user type for functions, FUNCTION!...and only one test...FUNCTION? Testing body-of for NONE! is good enough for finding out if you have access to the implementation or not.
 
11:02 AM
I've been killing off "bad" abbreviations in Rebmu, like WG for while-greater?. Such a construct will never be useful to add to the language proper, and has been of limited savings over wG? the number of instances it has been used. That all falls under "penny-wise pound-foolish" thinking about the overall picture; much more mileage comes from COMBINE, NewPrint, etc...and that's benefits that non-puzzle cases get boosted by.
Rebmu is the most comprehensive study of function groupings, orthogonality, name distinctness, and necessity of operations out there.
 
11:38 AM
https://github.com/red/red/pull/1077
GitHub
Red Pull Req—Case folding
qtxie
1427693853
 
12:12 PM
any is like or... all is like and... but I think I've remarked that there isn't an xor analogy. It's not perfect, but what about one? It could take a list of expressions, evaluate them all, and if exactly one value is "truthy" then return that value. It "decays" to XOR when you just use two values.
 
posted on March 30, 2015 by Dmitry Bubnenkov

Red is very interesting language, but I can't understand the situation where it would better may main languages (D and Python). Could anybody show the code examples, that will help me (and I hope others) understand cases where it's better?

 
1:00 PM
posted on March 30, 2015 by rheber

#905 Simple text replace, no?

 
1:19 PM
>> help not-equal?
 
; Brought to you by: try.rebol.nl
USAGE:
    NOT-EQUAL? value1 value2

DESCRIPTION:
    Returns TRUE if the values are not equal.
    NOT-EQUAL? is a native value.

ARGUMENTS:
    value1 (any-type!)
    value2 (any-type!)
 
I can see why there's an infix atomic not-equal, but why a prefix not equal instead of not equal? :-/ If you go down that road you'd expect to have lots of other things like not-strict-equal? and not everything else.
But hmmm. I suppose it could be argued that you don't need any not-relative ones. not-strict-greater? is just strict-lesser-or-equal?. So you only need those two.
 
1:39 PM
posted on March 30, 2015 by fork

[Wish] In the audience-favorite ticket #1879, it is proposed that the operations AND, OR, and XOR become "conditional" (to match NOT). Ladislav explains what that means in the post. This would mean the bitwise operators become the very nice and general words INTERSECT, UNION, DIFFERENCE and COMPLEMENT. There was a question of what to do with prefix AND~, OR~, and XOR~. Here's an idea: get r

 
@HostileFork Well, it could be changed to lesser-or-greater? ... <grin>
 
@MarkI I'm actually liking unequal? and strict-unequal? because they abbreviate to U? and SU? in Rebmu, and merging UN into the word keeps one from wondering if it's strict-not-equal? or not-strict-equal?
 
2:27 PM
@rebolek One (of many) problems with the language facility not following the multi-line-string rules and being smart about indenting and escaping is the molding. You're guaranteeing pretty much that mold cannot do readable things for you with the indentation level.
Putting the burden on the programmer does a number of different things. It wastes a lot of memory and time, as your source code winds up having these very large strings you have to strip to get what is the common logic. Also, every programmer winds up reinventing the same set of conventions instead of there being one. It's like the caret escaping argument.
 
2:51 PM
0
Q: How to write strict-greater? (-lesser?, -greater-or-equal?, -lesser-or-equal?)

HostileForkRebol and Red have a notion of the ordinary equal? function (offered infix simply as =) as being a sort of "natural equality". Hence it is willing to compare 1 = 1.0 even though one is an integer and the other a float... and to compare strings and characters case-insensitively by default. The s...

 
@Feeds @HostileFork I'm not sure strict comparisons make sense if they are not testing for equality.
"A" is not necessarily "lesser" than "a", for example; it actually depends.
And what would you say should be the result of strict-lesser? applied to 1 and 1.0?
They're not strictly equal, that's for sure ...
 
@MarkI It is lesser if I use the /CASE refinement (which should be a /STRICT refinement as we said) on sorts and searches. There is a notion of what it means.
 
@HostileFork There is actually no such standard notion, especially if you are referring to code point value comparisons.
 
red> sort/case ["ABC" "abc" "ABC"]
 
; Brought to you by: try.rebol.nl

*** Script error: action 7 not defined for type: 2
 
3:00 PM
And there won't be one anytime soon.
 
>> sort/case ["ABC" "abc" "ABC"]
 
; Brought to you by: try.rebol.nl
== ["ABC" "ABC" "abc"]
 
The /case refinement to sort is a shining example of how not to do it.
Not the functionality, that's fine, but calling it case-sensitive is a huge mistake.
Yes, it is case-sensitive, but it's a particular kind of case sensitivity, caps-first sensitivity.
There are other kinds.
I am not proposing that it be changed to /caps-first, but I would accept it if someone else did.
 
In other news I think I've figured out REPEAT actually should have been the name for the single-arity variant of while that keeps running its body until it produces a false value. x: 1 repeat [++ x x < 10]. Might be nice if it tracked the last non-false value and returned that, so 10 in that case.
 
Its implementation would also have to be changed, as the current one also incorporates code-point aliasing.
So while /strict is an improvement over /case, it's a drop in the bucket at this point.
 
3:07 PM
@MarkI Answering my question can provide you with an easy-to-edit-in forum with Markdown to go into great depth on it :)
 
@HostileFork Looking forward to it. Needed to bounce things off you first, just in case, thanks.
I hope to not end up with a monstrosity like sort/caps-first/squish-blanks/alias-codepoints/shortlex-numerics, please wish me luck.
 
@MarkI Good luck. I started kind of running into that with trying to invent character class generators. It seems a bit like we're needing a Unicode dialect :-/
 
@HostileFork Indeed. Which would still be lightyears (if not parsecs) ahead of everyone else.
 
3:37 PM
@MarkI PARSE is going to stay grounded until someone can load up and just type parse "1C3abc" [3 digit/hex 3 letter/lowercase] and things of the sort. It's shameful to let RegEx win on ANY aspect of out-of-the-box experience.
 
RegEx wins? Where, what?
 
So, if anybody wants to try Lest without downloading it, you can! lest.qyz.cz/try.html
4
 
@rebolek Cool! Is it evaluatively-safe from infinite loops and server hangs?
 
@HostileFork It's first version, just finished, so there are no checks yet, But afaik, you can't make infine loop in Lest. :)
But of course some level of safety needs to be added, there are some unsafe points.
 
3:57 PM
@pekr Predefined character classes.
 
4:09 PM
Hello @carlo_kokoth ; your avatar shows up here now and again. You're now above 20 so you should be able to chat...
 
Doc asks for a feedback - so, if you've got some ideas, feel free to post - github.com/red/red/issues/1079
 
4:38 PM
@pekr Would comments in the Red Dev chat be acceptable?
 
4:58 PM
Hm, I take it back. REPEAT is really just what UNTIL should have been called, iterating until TRUE? and then returning the truthful value. Then WHILE and UNTIL are in parity like IF/UNLESS are. I believe back in the day @earl was making an argument that the single-arity version really doesn't make as much sense to have a complement due to the lack of usefulness of getting back a false/none at the end of the iteration.
OTOH when you are interested in the last value from the body, you may be equally interested in that for when you were checking the condition block for truthfulness or falsehood, because you never return the condition block result.
 
@HostileFork I think that the word REPEAT would be pretty much wasted as UNTIL replacement. REPEAT most likely is the best word to use for a "new" loop construct. The only real alternative in my eyes would be calling such a new loop construct, well, LOOP.
(Just from a human factors perspective. I faintly remember some research actually backing up that "REPEAT is the better FOR" stance.)
 
@earl LOOP is what I've chosen in Ren Garden prototyping for the moment. Once you have it then trying to explain the difference between a LOOP and a REPEAT if they're similar-but-different doesn't work very well if it's shades of meaning. It's better if they're completely and memorably distinct.
I think UNTIL would be used more, the way UNLESS is used, if it was a proper complement to WHILE.
 
@HostileFork I don't share that belief. Actually, quite to the contrary, I think that WHILE should be used less.
 
red> help strict-not-equal?
 
; Brought to you by: try.rebol.nl
*** Error: word has no value!
*** Error: word has no value!
strict-not-equal? is a unset! of value: unset
 
5:06 PM
If I said otherwise, it may have come from pushing the Red button.
@earl Imperative programming should be used less. But it will be for a time.
 
@HostileFork Sure. But in this particular case, WHILE is one of the most general looping constructs (obviously). More specific constructs should be used wherever possible.
@HostileFork What do you expect from "strict-greater?" -- if you look at how strictness in equality is currently defined, there's a lot of leeway for inequalities.
In a gist, STRICTness also discerns differences in: datatype, binding, case.
 
@earl Question inspired somewhat by the realization that /CASE wasn't purely about disabling case-sensitive checking, it had some other equivalencies in the unicode table, showing non-case-related strictness in character comparisons that are brought out by strict-equal? vs equal? checks.
Since the increased difference seemed to be driven by a reaction to what would be considered to be strict-equal? or not, it suggested the refinement might be called /STRICT. So the question is sort of asking that. I didn't know. So it's a chance to speak about it in an institutional knowledge way.
 
There's also CureCode #1834, which proposes to rid STRICT comparisons of the binding check.
And there's another ticket somewhere, suggesting that a general comparison function is needed, which exposes the built-in comparison behaviour (I think the suggestion was to name it COMPARE).
 
5:26 PM
Well, my thought was something along the lines of changing the /CASE refinements to /STRICT and then have "whatever it does in that comparison operator" be used for these strict operators, then you wouldn't need a COMPARE with COMPARE/CASE etc. ; and you wouldn't have to worry about understanding what the result bias was.
 
@HostileFork You need a general COMPARE for other use cases.
(Such as making it easier to write custom comparators to be used with SORT/compare, for example.)
 
posted on March 30, 2015 by abolka

[Comment] #1834 proposes getting rid of binding checks in strict comparisons. So if #1834 is implemented, /STRICT would indeed become an appropriate name.

 
Ah, here is the general COMPARE proposal: CureCode #2110. Even more general than I remembered.
 
Another nice benefit of /STRICT is it's not competitive with the very popular CASE
 
Hu?
 
5:34 PM
>> help case
 
; Brought to you by: try.rebol.nl
USAGE:
    CASE block /all

DESCRIPTION:
    Evaluates each condition, and when true, evaluates what follows it.
    CASE is a native value.

ARGUMENTS:
    block -- Block of cases (conditions followed by values) (block!)

REFINEMENTS:
    /all -- Evaluate all cases (do not stop at first true case)
 
So?
Do we have a rule now, that refinement names never ought to clash with function names?
Posting my addendum to above /STRICT vs /CASE issue here as well: "Even with #1834, strict comparison would still heed datatype differences, though -- so we still need an answer to how that would map to scenarios when a total order is required (such as in SORT)."
 
No, but it makes things look nicer each time it's avoided.
@earl Is something like strict-equiv? really necessary? How often does it come up that you can't do all [strict-equal? a b strict-equal? context-of a context-of b]? Is it something that really needs a "name"
 
@HostileFork It also includes added precision in decimal comparison. Though that could (and probably should) arguably be moved to a separate comparator.
 
@earl Again sounds like something that would be used very rarely, and if you care that much about the details there are probably other details you care about.
You're unlikely to be satisfied with any particular packaging of the attributes "just by happenstance" unless you're already using a subset of cases through which that happens to pass for the instances you pass in.
 
5:39 PM
@HostileFork For toggling CASE-sensitivity, /CASE seems a very appropriate name. So I think that "it's nice to avoid /case because there is a CASE function" looses hands down to pragmatism in this case.
@HostileFork The original idea behind the current set of comparators was a "hierarchy in precision".
Those who haven't seen it, be sure to check rebol.net/wiki/Comparisons.
 
@earl It doesn't win because specifically it doesn't say anything about whether you're doing case-sensitivity or case-insensitivity (just..."CASE") and it doesn't align with an operator outside of it like lesser?/case...nor should it.
 
But I agree, that this intended hierarchy turns out quite questionably in practice.
@HostileFork Yes, it implies that you are generally aware of Rebol's case-insensitivity.
 
There were some lobbying to fragment that certainty in itself...
 
Not just fragment ...
>> sort [foo "foo" bar "bar"]
 
; Brought to you by: try.rebol.nl
== ["bar" "foo" bar foo]
 
5:47 PM
The exposure of the invisible hierarchy...
 
>> lesser? quote foo "foo"
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-invalid-compare.html
    *** ERROR
** Script error: cannot compare word! with string!
** Where: lesser?
** Near: lesser? quote foo "foo"
 
@RebolBot
real-lesser?: function [a b] [
    if equal? :a :b [return false]
    blk: reduce [a b]
    sort blk
    :a = blk/1
]

real-lesser? quote foo "foo"
 
; Brought to you by: try.rebol.nl
== false
 
total-lesser?
I guess that answers your SO question :)
 
5:56 PM
Heh.
I guess so.
 
I was actually thinking about writing that up as an answer, after rambling about "please define first". But, no time at the moment for rambling :)
 
@earl Best to spend your spare cycles arguing for Plan Minus Four...
I'm going ahead and migrating rebol-proposals out of Ren Garden and into its own GitHub repository, shared with Rebmu. Going to go back over the examples and get them all working again, some stuff being broken as I shuffle. Last time I did so it took... several hours.
I do think r[...] being REPEAT ("UNTIL") and w[...][...] being WHILE are very useful. More useful to take R for that than an alias for RD, as alias for READ. You just don't have a lot of reads usually within the same puzzle.
(Was doing some RenCpp checkins and needed to do some tasks on proposals, reminding me that I need more test cases.)
Need to get all of that stuff in sync before I can distribute Ren Garden in "Rebmu workbench" mode.
 
6:30 PM
posted on March 30, 2015 by adrians

[Comment] If there's to be a distinction between what we call the source as entered by the user and the definitive, or canonical interpretation of that source by the runtime, then source and mold (or a better word) should have different meanings, IMO. If we don't care about maintaining that distinction, then sure, source is a nicer word than mold.

 
6:43 PM
@HostileFork `>> lest [ul li << ["a" "b"]]
== "<ul><li>a</li><li>b</li></ul>"`
 
@rebolek Great!! Time to put it through some evil tests... :-)
Not on test site yet...
 
No, this was first local test :)
It's actually very simple, just 14 lines. I was bit surprised it worked on first try :)
Will be on test site in ~5 minutes.
 
@HostileFork What's u[...] in Rebmu?
 
@earl UNLESS (by default, of course you can overwrite anything you don't use). iNTxxx[...] comes up a lot.
U is an alias for UL (in turn an alias for UNLESS, all "Rebol proposals" Rebol items are preserved)
 
6:59 PM
Well, maybe in ~15, there is a bug that I don`t get.
 
7:16 PM
posted on March 30, 2015 by fork

[Comment] One thing to notice about "old SOURCE" is that it doesn't return you a make-spec...it just printed some stuff out. One reason it didn't give you a value back is because it would have to put that in a block to aggregate. So if your SOURCE tried to give back a value that *wasn't* a string it would be like: [make function! [a b] [foo a + b]] Hence so SPEC-OF and BODY-OF really are pr

 
@earl Interesting. I presume that datatype order is fixed, that is, if a string is strictly less than a word then all strings are strictly less than all words. Right?
 
source-of isn't the end of the world if people don't like the verbing. But some amount of verbing happens, or the verb has the wrong interpretation.
It's not help-on or help-with, it's just help. Not like you type HELP REFORM and the system goes and unsets the word to put it out of its misery. (Sometimes the only help you can give.)
People have lived with the verbing on source as it is for a long time, a bit of a shame to suddenly care when it has a chance to step in and make a clean sweep on mold with no hyphen...
So I've said I think it's okay to do a literal none for loop to request "no loop variable"...instead of trying to make up a separate word meaning "loop over a spec with no variable". It's tough to come up with a way to say that. And I think I've come up with a similar notion for how to deal with FORALL vs. REPEAT, same principle, different argument omitted...
 
@HostileFork it works on test site now. However it does not support EVAL yet, there is some really strange bug.
 
@rebolek I'll see if I can learn enough to tinker at some of my ideas and see what happens
 
So right now it is not possible to do things like set data ["hello" "world"] span << data.
 
7:28 PM
Unify FORALL and old-REPEAT under a primitive called iterate. Except instead of the loop variable being the optional part, it's the series to iterate that is optional and presumed to be already in the input variable if omitted. Hence iterate var # [...] would be used when the variable already contains the series, and iterate var series [...] if you want it to be set to positions in a series.
ul [li << [[span "a" span "b"] [span "c"]]] =>
<ul>
    <li><span>a</span><span>b</span></li>
    <li><span>c</span></li>
</ul>
@rebolek ul [li << [[span "a" span "b"] "**or markdown**"]]... I see the markdown isn't default. Could you set it up on the test site to be a switch / checkbox?
I think that switch being text meaning "do escaping for html", html meaning "leave raw", and markdown is probably the best idea.
 
@HostileFork Yes, I think I can. But I need to solve the bug first, It's driving me crazy.
 
8:00 PM
Uf, I got it. Now works with eval support.
 
8:11 PM
@rebolek Cool! Blocks too... set data ["hello" "world"] [div p as class "x"] << ["One" [span as class y "Two"] data] ... hm, any way to "extract" data there?
That's an example of where I feel like y needs to be an evaluated spot. So if it's allowed to not be in string quotes, it should be lit-quoted
 
@MarkI I presume that as well.
 
@HostileFork "extract" data? Can you explain that?
 
@HostileFork You've also said that you can appreciate a view where LOOP requiring an argument to be NONE is bad dialect design in the first place :)
 
@HostileFork It is evaluated spot. Try adding set y "test". It should probably throw an error,if y does not hold any value.
 
@rebolek Somehow splice data contents in that spot, so instead of a block (a la COMPOSE/ONLY) it would be like I wrote ["One" [span as class y "Two"] "hello" "world"] (as in COMPOSE).
 
8:17 PM
@HostileFork Hm, I see. I need to think about it.
 
@earl Have to look back at what I said, more just that encouraging a general design of # to take away arity could be bad. It may just be that the suppressed versions need names like loop-none and iterate-value, or something, while recognizing that they're the same thing as if you passed in nones in slots. So you could teach the generics and leave it up to users for what they like.
 
@HostileFork Or a better single-argument dialect design.
 
posted on March 30, 2015 by Rebolek

If you are interested in Lest and want to try it without downloading, you can check it online at http://lest.qyz.cz/try.html (work in progress).

 
@earl One problem with throwing arguments into the loop dialect is what the implications of that would be if you used the generator outside of a LOOP driver. If you use looper: make-looper [x: 1 to 10] and then call looper does it give back a value, or set x, or what?
 
@HostileFork I think MAKE-LOOPER would simply fail in that case. Layered dialects.
 
8:30 PM
Well, it's worth thinking about what mileage the dialect might get out of doing more than simple value generation, and if things like loop [x: 1 to 10 y: 20 to 30] [...] have useful meaning or not. I guess the thing is that I feel "do this thing N times" without knowing which step you are on is too rare and constructed to matter all that much how it works.
 
posted on March 30, 2015 by abolka

[Comment] At first glance, SOURCE doesn't strike me to be particularly evocative of the proposed purpose. It's also such a widely used term, that SOURCE simply doesn't strike me as specific enough (also think about inflected use in jargon, such as "the sourced value" or "then I sourced it out"). Further, the verbing strikes me at rather awkward (and something that we otherwise try to avoid), bu

 
In addition to above MOLD/SOURCE comment, a not yet fully-formed thought: I think that in general a function for serialisation really deserves a somewhat out-of-the-ordinary name.
In order to make it easier to use that in jargon without ambiguity.
 
LOAD... loads a "thing". What does it LOAD? It loads a string. A string containing what? SOURCE.
What is the rule of SOURCE as a command? "Generates something you can use back with LOAD". Due to limits of the system it cannot give you the precise same text that was input. But can give you something that can be used as source.
 
I follow the reasoning, it just doesn't strike me as very compelling. The awkward verbing really hurts.
 
source-of is a possibility, but people seemed fine with SOURCE as a verb before.
 
8:39 PM
I think hardly anybody read it as a verb before.
source-of is much better for this line of argumentation. But it also indicates (to me, at least) that we should try harder.
2
 
posted on March 30, 2015 by Gregg

[Comment] This ticket, along with the other recent escape-focused tickets, raise important questions. I don't have answers right now, but would like to see them discussed more. We have a few contexts to consider: Literal Redbol that we write, data sourced from somewhere else (e.g., user input), and Ren. Thanks to Brian for bringing these issues up. Now is a good time to think about them.

2
 
8:55 PM
posted on March 30, 2015 by fork

[Comment] As mentioned in chat, the problem with having each programmer invent a way to handle this are many: * MOLD-ing or other source-generating functions...that want to obey indentation and "pretty-print"...will not be able to do so. Strings will have to be left as-is due to lack of awareness of whether the programmer intended the spaces to be stripped or not. * Concern about efficiency

 
9:06 PM
posted on March 30, 2015 by Gregg

[Comment] Maybe I'm missing something, but why not just have SOURCE return the formatted string. If whatever console doesn't display it fully, they can add PRINT themselves, or another shortcut for that will be proposed.

posted on March 30, 2015 by Gregg

[Comment] Renaming MOLD, for me, expands into much larger issues, where we want a matrix of needs and solutions for conversions. Like the *JOIN funcs, the various options we have overlap, along with the loading side, in sometimes unclear ways.

posted on March 30, 2015 by rebolek

[Comment] "Each person re-inventing the escaping and stripping in their own unique way..." There is TRIM for stripping. I'm not saying that TRIM is perfect, but why to reinvent the wheel instead of fixing/improving existing tools?

 
9:24 PM
posted on March 30, 2015 by fork

[Comment] @rebolek Please see #2211. There simply is no existing tool and cannot be--developers cannot supply strings that MOLD can output "nicely". That ticket is the more important one, but this issue of eliminating invisibles besides space and making terminal line spaces apparent if they have meaning is "forward-looking".

 
@earl Having just the three functions, an item-wise enumeration... a positional iterator... and a dialected loop... is so far looking to outweigh other concerns. In fact, if you don't like the idea of passing nones and x holds your series, you can just say iterate x x [...] and it says "use it as both the iteration variable word and the source series".
(That's what I'll likely be using most of the time in Rebmu vs. the equivalent iterate x # [...] because it's easier to say itXx[...] than to try and deal with embedded #.)
I simply do not think that loop # [dialect] [body not using value emitted] or each # [series] [body not using value in series] are common enough to worry all that much about. Also, these things need to set their words back to what they were, you could throw any variable in there and not use it. Maybe you don't need it today, maybe you will later.
It is the sheer constructed uncommonness of the "I don't care what the value is" operations that makes trying to facilitate them in naming with questions like "how is FORALL different than REPEAT" etc. Confusion w/no education. Whereas learning about literal nones in quoted contexts can actually teach people a principle...and "get" something about the language.
 
@HostileFork What's item-wise enumeration? FOREACH? What's a positional iterator? FORALL?
 
@earl I'm still experimenting with names. I like iterate for the positional iterator because it can say "iterate through positions". Right now I'm trying out every instead of each to see if I like it for item-wise. LOOP being the dialect.
 
@HostileFork I didn't mean your proposed names, I forgot about what behaviour you refer to.
 
9:39 PM
@earl Yes, item-wise would be FOREACH-ish and positional would be FORALL-ish or REPEAT-ish.
Iterators in other languages are often sort of "objects" that carry a notion of state with them, which must be dereferenced to collapse to a single value (that itself does not carry that state). So ITERATE seems a good verb.
In Rebol's case, iterators having their reification as series positions.
 
@HostileFork With current LOOP being exactly that "uncommonness" (which I also think rather rare), we can get some measures about how rare it is exactly.
 
@earl That is true; though I wonder how many instances of it are in demo or example code as "constructed uncommonness".
 
@HostileFork Few, I think.
But it's quite possible that many are cases of "pragmatism", to put it mildly. <s>Iterating over the index range and then picking by index is a basic looping idiom many are familiar with.</s> -- Strike that, I was thinking about REPEAT, not LOOP.
 
>> repeat x 3 [print x]
 
; Brought to you by: try.rebol.nl
1
2
3
 
9:46 PM
>> repeat x [a b c] [probe x]
 
; Brought to you by: try.rebol.nl
[a b c]
[b c]
[c]
== [c]
 
Slogan: "REPEAT: ...because FORALL and LOOP don't have a variable to set."
 
; Brought to you by: try.rebol.nl
1
2
3
 
10:01 PM
@earl YMMV but I cannot think of needing (old) loop as a construct often in practice. Knowing in advance how many times something needs to be done without having which time you're on be known strikes me as a rarity, and in fact probably most useful in the puzzling domain.
red> 1 << 2
 
; Brought to you by: try.rebol.nl
== 4
 
For all the talk of not bowing to C's influence, I don't see why infix bitshift is worth adding there. I think that should be strict-lesser?.
=, ==, !=, !==, >, <, <<, >>, <<=, >>=. Drop <>, it's visually jarring and looks too much like an empty tag.
I don't like ! for NOT, because it's too hard to see. But some people apparently like it and use it.
 
11:06 PM
@HostileFork the shorthand for hex>FFFF: 16>FFFF ? h>FFFF ? Hmmm
 
@kealist I'm not terribly crazy about shorthand, and looking at something like 16>1616 isn't very informative. If I saw something that said hex>1616 I'd have a chance of knowing what I was looking at.
hex is already shortened.
 

« first day (1611 days earlier)      last day (2169 days later) »