« first day (1580 days earlier)      last day (2200 days later) » 

10:00 AM
@HostileFork Yes, I remain unsympatetic. You don't have to explain the challenges of dialect design to me,I wrote lot of them in last ~15 years.
 
@rebolek Spaces in words--escaped--are no different than escaping quotes in strings. They are just characters. No one is threatening to change anything. It strikes me as really odd that you ascribe some particular religious significance to the encoding of a byte value of #{20} into a symbolic element is heresy.
It molds with an escape in it just like molding a string puts an escape in it.
>> mold "^""
 
; Brought to you by: try.rebol.nl
== {{"}}
 
@HostileFork No offence to Chris,but he wasn't first, both R2 VID and R3 GUI use same trick, it's nothing new.
 
That wasn't the point of what I was saying.
 
@rebolek So what?
FWIW, I think the most recent line of thinking for extended word syntax is really rather elegant.
2
 
10:04 AM
@rebolek The point is that in the HTML domain, it isn't a full Rebol stack. You must integrate. That's the point.
 
@HostileFork Religious? Is this the kind of argument you really are using?
 
It is a conservative extension that doesn't break anything (ignoring the ^- to ^| thing for a moment) while strictly improving things.
Also, remember that we had "words with spaces" in R2, and that we still have them in Red.
rebol2> to-word "foo bar"
 
; Brought to you by: try.rebol.nl
== foo bar
 
Yes we do. I consider this a bug.
 
So did Carl, initially.
But implementing the change he soon realised, that to make this "water-proof" isn't worth the hassle.
 
10:07 AM
What is having word containing spaces good for, if you can't access them later? :-)
 
There's a million ways to construct invalid words, the only way to be really sure would be to do a round-trip check (as e.g. @HostileFork also suggested several times). That is so costly, one has to really ask for the benefit.
 
Security?
 
@pekr Well, you can access them later, using the very same mechanisms you used to created them with.
 
@earl Words, being formed as symbols, actually are the unique thing you can check because they cannot be modified. The greater issue is, you can't check anything else.
 
Also, don't be side-tracked by the MOLD bug above. That this single word is currently displayed in the misleading way it is, is a MOLD bug, not a bug in word syntax.
 
10:08 AM
Ah, all those hidden treasures :-)
 
@earl A non-breaking alternative would be perhaps ^+ but I really feel ^- is better.
 
@HostileFork I concur, but I also consider this two separate issues.
 
True
 
Using plain escape syntax also inside words is a very nice idea of a solution to this long-standing issue.
You'd have to rewrite a few things which are valid words at the moment (a^b is a valid word, atm), but that's about the only downside I came to think of so far.
 
@earl @HostileFork I don't get it, you do. So, please, show me some example what is it good for. Not just some abstract talk that it would help to better design the dialects.
@HostileFork ^- is tab
 
10:13 AM
@rebolek Mechanically constructed words have been used widely in R2, so I'm sure you can find some examples there. I think even Red uses it.
There's a lot of things which are syntactically invalid words in Rebol, but syntactically valid tokens in other domains. Sometimes you want to represent those foreign things as words.
Common examples I remember are using spaces inside words, or using plain , or . as words.
Another example is words with leading digits (although many have resorted to using issue! for that case in R2).
 
Why not do something like Geomol did in World with kwantz! datatype (or what the strange name is :-)
 
@rebolek That's an orthogonal issue.
 
@earl How are you going to load source from string, when words can have spaces in them? Is foo bar one word or two words?
 
In this case here, you already know that you want those things to be words.
@rebolek One, of course.
 
@earl I get it, you are just joking.
 
10:18 AM
@rebolek Huh?
 
foo bar is one word? Really?
 
Ah, sorry :)
 
>> length? load "foo bar"
 
Two, of course :)
 
; Brought to you by: try.rebol.nl
== 2
 
10:18 AM
/me ducks
 
Ok :)
 
How to express that is what @HostileFork's recent proposal is about.
Previously, you could of course already have used construction syntax.
 
@rebolek Dialogue in Draem. e.g. character: <parenthetical> "Some dialogue". I'm using that to generate a script-style web page output.
 
(Were it implemented for words, but that's not the point here.)
 
Rebolek, it is called kwatz! IIRC :-) And it solves the case, when Rebol bombs-out on some non rebol friendly sources. Especially Brian Tiffin fought hard to get it, simply to at least error-out, but not collapse ...
 
10:20 AM
@pekr R3 has transcode/error for that case now, slightly different approach to the same issue.
 
@pekr I like the functionality (not the name, obviously :-)
 
posted on February 27, 2015 by fork

[Wish] In #0002195 I suggest that one should be able to use escape characters in ANY-WORD! just as you can in strings. Since escaping previously applied to strings, it was not necessary to be able to escape a space. So the character sequence ^- was taken for TAB. However, outside of a string the desirability of ^- to represent space is high. Hence I propose a change to make ^- mean space.

 
@rebolek I like being able to do that, and usually my character names are one word without spaces. Almost all the time. But sometimes I want the name to be two words. green alien or whatever. So I had to manually go in and facilitate this. I would have preferred to just be able to leave the dialect as is and in these special cases say green^-alien: <parenthetical> "Some dialogue" and not need to come up with any special handling to allow it.
As a programmer, I don't mind the fact that Rebol code needs to be LOADable. I don't mind escaping. I do mind it when the toolset I use puts in arbitrary restrictions and makes me write more code to handle a situation that comes up or backs me in the corner.
 
Or without mixing the two proposals, green^(space)alien.
 
Ah, right. I forgot. The Biblical scroll determining once ^- was tab, thus it must always be so... :-)
 
10:22 AM
Or for the previous example of how to load source from string where words can have spaces in them: foo bar would be two words, foo^(space)bar would be one word with a space inside.
 
I like ^-, but aren't ppl too much used for it being a tab?
 
Separate discussions :)
 
I'd like to point out that caret escape isn't something invented for Rebol, but is used elsewhere also.
 
@rebolek Yeah, DOS. So what :) ?
 
Just saying :)
 
10:24 AM
I would not mind foo^(space)bar either ....
and can't we just escape a space, by using a space? :-) foo^ bar :-)
and we also have an underscore, which is much more common char for the space in IT segment .... foo^_bar
3
 
@pekr Nope. :-) If someone advocated with that, I'd agree with @rebolek...broken.
 
@pekr We theoretically could, but that gives readability problems.
 
@pekr That's not terrible
 
@pekr Indeed, solid idea.
 
I can image the problems when designing the dialect. [some word!] would eat your word with spaces...
 
10:27 AM
if there is a CC ticket to the topic, you can add ^_ as an option, just to record it ...
it does not hurt readability imo ...
 
@pekr To the contrary. Readability of that is rather good, I'd say.
@rebolek Hmm, care to expand? What problem are you thinking of?
 
@pekr In general, the reason dashes are being suggested instead of underscores in URLs has to do with sort of issues of reading text around baselines.
 
Well, but it is impossible to use, as pekr can't bring any good idea ... :-)
 
So if the font has a baseline that's kind of low, and you're looking at one line of text, you don't see it.
 
I know, and for that reason (URLs) I don't like them much ... but ....
 
10:30 AM
I feel like this is an issue where choosing it would be compromise, because I really would prefer ^- for space and ^| for tab.
 
@pekr Hey, even gave you a star for that :)
 
@pekr You can add it to the ticket, your suggestion...
 
@HostileFork Yes, it'd be a compromise, in the name of compatibility. On a clean slate, I'd also prefer ^- and ^|, but it's good to have tenable compromise options ready.
 
OK, so could someone clever explain, how much compatibility would be affected by changing ^- from tab to space?
 
@pekr I've argued that there isn't much Rebol3 and Red code in the wild. You'd get one space where you expected four (or eight, or, ???) Some tabular output on someone's machine would be affected, but I hate tab characters anyway.
 
10:32 AM
My guess is, that ^- might be kind of heavily used. For code formatting, etc.
 
@pekr Assuming that compatibility is a valid argument in the first place (which @HostileFork disagrees with): quite a bit, I fear.
I think one of the most annoying issues would be with SAVEd text data containing tabs, because you'd silently corrupt that unless taking precaution.
 
@earl Corrupt how? They'd still be spaced.
 
It's not about spacing, you are changing data.
 
I do remember some scripts (was it on rebol.org or elsewhere, dunno), with full of such tabs ...
 
Codepoint 9 to codepoint 32. That's data corruption.
 
10:34 AM
I thought you meant code intended to be loaded. Well, if you're using some tab-delimited-meaningful format then yes
 
well, for some columnar text output, someone could have some calculation around tabs, but I wonder how many such scripts are out there ... not much probably ...
 
@HostileFork Not only tab delimited, but anything where you must preserve those tabs.
 
@CSáµ  That's what I said.
 
indeed sir, indeed
 
10:37 AM
@pekr @earl All right, underscore in proposal for now: curecode.org/rebol3/ticket.rsp?id=2195
 
I did not vote for the underscore, nor your proposal. I can't see the consequences, apart from few edge cases, but also rebol users mindset who attribute ^- being a tab for all those years. Of course - how many Rebol users are out there?
But something tells me, that Carl would find such change being - radical
so maybe, I am more towards the compromise here, as ^_ does not look necessarily bad ...
 
@pekr It's probably the best idea. I sort of rejected it based on that URL bias thing to the point of not considering it, but I think you're right.
 
Maybe not the best idea in an absolute sense, but probably the best idea given the environment we are designing in.
@HostileFork Sure you saved :) ?
 
Well, I understand your "visibility" problem point of view, but we are not talking URL related problems here. In your code editor, it should be mostly OK, no? (unless you use some funky font type)
 
10:42 AM
@HostileFork Ah, sorry, that's the word escaping proposal, not the proposal to shuffle escape sequences around. My mistake.
 
Thanks for writing those up, Brian.
 
Sure. One upshot of "The Long Now" of this thinking process: it may not move fast, but maybe things moving so slowly lets us move through the process of distilling things from the wish to the action in a way that it's getting better. Perhaps a mixed blessing.
You know you want a syntax for this, but can't think of it. Some obvious solution is staring you in the face but you can't get to it, somehow...because all you can think of is "construction syntax"
And you've never really seen a "convenient escaped space" before, because you've never needed one. :-/
 
Indeed.
I also think it quite interesting how obvious this solution is in hindsight, yet how long it took to arrive at it.
 
Thanks for the CC ticket ...
The devil dwells in details ... or how to translate one czech saying :-)
 
10:58 AM
@pekr "The devil's in the details", here.
@earl Wanted to mention that I've had some interesting experiences in rewriting code to use "NewPrint". I attacked the help function to begin the course of making a HELP dialect... here was a piece of code I messed with: github.com/rebol/rebol/blob/master/src/mezz/mezz-help.r#L285
			str: ajoin [tab arg/1]
			if all [extra word? arg/1] [insert str tab]
			if arg/2 [append append str " -- " arg/2]
			if all [arg/3 not refinement? arg/1] [
				repend str [" (" arg/3 ")"]
			]
			print str
So that's an interesting example of the kind of puzzle one might untangle if you start thinking of it as a single PRINT statement
NewPrint really is much, much better
print/only [
    if all [extra word? arg/1] [tab]
    tab arg/1
    if arg/2 [
        [space "--" space arg/2]
    ]
    if all [
        arg/3
        not refinement? arg/1
    ] [
        [space "(" arg/3 ")"]
    ]
    newline
]
But I really don't like the lack of a way to separate things in the ALLs. I'd rather:
print/only [
    if all [extra word? arg/1] [tab]
    tab arg/1
    if arg/2 [
        [space "--" space arg/2]
    ]
    if all [arg/3 , not refinement? arg/1] [
        [space "(" arg/3 ")"]
    ]
    newline
]
I also don't know whether or not to use IF/ONLY in such cases, even though I came up with it. (And partially for this purpose)
print/only [
    if/only all [extra word? arg/1] [tab]
    tab arg/1
    if/only arg/2 [space "--" space arg/2]
    if/only all [arg/3 , not refinement? arg/1] [space "(" arg/3 ")"]
    newline
]
 
@HostileFork With ALL, you don't need IF. if all [extra word? arg/1] [insert str tab] is same as all [extra word? arg/1 insert str tab]
 
So these are some thinking points. But I do think every example I've come to has pretty much shown NewPrint to be way, way better.
@rebolek Well I didn't write that bit. That's mezzanine help code, the original. You can't do that in the NewPrint example because there's no string being built programatically.
 
Just saying, it simplifies the code.
 
It's still a bit of a mire. Note that it starts by AJOINing (something I don't like) to create a "first thing". Then in the second step it decides if it wants to insert something else at the head.
In the NewPrint reimagining, you see things in the natural sequence.
That second line which decides if something should be at the first element is actually the first thing.
If it comes back a NONE!, no content and it moves on.
I argue this is a "Portrait of Reform", as the saying goes. Which also includes eliminating REFORM. :-)
Under the new proposal, you could have written:
print/only [
    if/only all [extra word? arg/1] [^-]
    ^- arg/1
    if/only arg/2 [^_ "--" ^_ arg/2]
    if/only all [arg/3 , not refinement? arg/1] [^_ "(" arg/3 ")"]
    ^/
]
So there's some interesting concretization of what we were just talking about.
I think that's actually better. It's equivalent, still using words that are mapped to characters. But it helps you "see" where the code is.
Alternately
print/only [
    if/only all [extra word? arg/1] [^(space)]
    ^(space) arg/1
    if/only arg/2 [^(space) "--" ^(space) arg/2]
    if/only all [arg/3 , not refinement? arg/1] [^(space) "(" arg/3 ")"]
    ^(newline)
]
There's something to be said for that too, perhaps. A cross. Helps you see the code, and retains the "literacy"
It's good to have options.
But I'm just not liking the look of that comma. I've been looking at it and contemplating it for a while and have a creeping suspicion that I don't like it for the purpose.
I believe in the purpose, I'm just not sold on the character. It looks wrong. And having looked at it for a while, and being pretty good at seeing things from a fresh angle, I still feel that way.
print/only [
    if/only all [extra word? arg/1] [^(space)]
    ^(space) arg/1
    if/only arg/2 [^(space) "--" ^(space) arg/2]
    if/only all [arg/3 | not refinement? arg/1] [^(space) "(" arg/3 ")"]
    ^(newline)
]
 
11:24 AM
for some separation, I would prefer the pipe char probably, but not sure, probably too heavy, but we use it in parse for options separation otoh: if/only all [arg/3 | not refinement? arg/1]
 
Yes, it's better.
 
It's like a "wall"
 
The meaning of things in PARSE is different overall. That is sort of just life.
 
but sometimes, when writing parse code, I have issue with that char anyway, especially when you use it to delimit long line, and put it on the separate row ....
 
Anyway, after trying it for a while experimentally, I have decided that space comma space is ugly and I don't like it.
 
11:26 AM
>> parse [greenalien: "blabla" green alien: "bleble"] [some [(handle: copy "") opt [set value word! (append handle join value #" ")] set value set-word! (append handle value) string! (print handle)]]
 
; Brought to you by: try.rebol.nl
greenalien:
green alien:
== true
 
well, one ca use braces, but I somehow don't like it much ...
 
Wow, I can match words with spaces!
Isn't PARSE amazing?
 
PARSE just shows, that regexp is PRASE (pig in czech lang :-)
 
@rebolek Let me break something down for you. I do not admire Rebol for being a fantastic General Purpose Programming language. The concept is expressly that I do NOT want to create a file format, a notation, or any such thing. I want to build on the blocks and have all the tinkertoys there.
I'm not going to in PARSE reinvent the loading and parsing of parens when my dialect needs it.
I am not going to write PARSE rules for INTEGER!, DATE!, PATH or match blocks.
 
11:28 AM
Why should you?
 
I want my blocks matched, I want my PAREN loaded, etc. I want to LOAD my file.
 
Anyone stopping you from doing so?
 
Yes. You stop me when you give me a platitude about using PARSE. Okay, I can use PARSE, great. I could also write:
character {green alien} parenthetical {emotion} dialogue {stuff they say}
And I can do junk like that in absolutely ANY language
 
Oh, platitude. Another great argument after religion.
 
I want, to LOAD green^/alien: <this is a real tag> {This is text} and on the next line I might well write (some code returning the character) <stuff> 14.4 em {Some text}
When you tell me "just parse it" you're asking me to do something that if I have to do it, the whole point is undermined.
The point is I don't want to define a file format. I want to write a dialect. Period.
 
11:31 AM
No,it was you, who said you need it in PARSE.
 
My file should be loadable and give me the types I want in the places I want, and check the structure to make sure it's well-formed.
@rebolek What are you quoting?
 
I'm just so kind that I'm showing you, it can be done right now.
 
@rebolek I need to know what you are responding to.
 
@HostileFork Your Draem example
[one two three four] - is it one word, two, three or four words?
If words can contain spaces, we will never know.
 
@rebolek I see that your point is you can have spaces by recognizing patterns and say that if you see a word followed by a set-word! I could notice that at a higher level and decide that meant something. But it adds complexity. What if I have other interesting ideas for what a word before a character means? offscreen bob: <emotion> "text". Now bob is credited as offscreen bob, when I wanted words before character names to be something else.
I don't understand why you think green^_alien: is somehow threatening you. What's threatening? Show me a case where this breaks something important to your life.
 
11:37 AM
@rebolek Are you really meaning that?
Of course these are four words, words being able to contain spaces has absolutely nothing to do with that.
 
@HostileFork Not true at all.You will check for your commands first ('offscreen) and then for handles.
@earl How can it be so?
 
@rebolek That's going to really irritate Offscreen Smith. His parents named him that way. Are you making fun of him?
 
@rebolek Because there is a completely different syntax for two words separated by a space and a single word containing a space.
 
@rebolek I have shown you that not being able to do it breaks things important to me. Now the burden of proof is on you. What am I breaking that is of critical importance in your world? Can we turn the discussion around so you explain what's so harmful?
 
I don't understand that discussion :-) I have thought, that to solve a 'green alien' being a word, we came up with the green^_alien variant?
 
11:39 AM
@RebolBot do/2
mold/all to-word {word with spaces}
 
; Brought to you by: try.rebol.nl
== "word with spaces"
 
@rebolek THAT is a bug
 
@pekr Exactly. Not sure what Rebolek is missing :)
@HostileFork Yeah, that is a MOLD bug. (Just like so many others.)
 
@HostileFork Ok,so let's use your example. Offscreen Smith: <emoticon> "text" - You say that this is a guy called Offscreen Smith, right?
 
The bug isn't that the word has spaces in it. The bug is that as (in many other cases) MOLD is broken. Fix MOLD so it escapes, all is well.
 
11:40 AM
Well,no. It's a guy called just Smith. Preceded with Offscreen command.
 
btw - one wild idea, not sure, how it would influence the tokenizer (or what is the right term). What if we would prohibit words from containing ' char? We could then state, that 'green is a literal, whereas 'green' or 'green alien' is a word? But not sure I like it anyway ...
 
How are you going to detect the difference? Hint: you never will.
 
that would most probably get tricky to parse, as ' is allowed char for 1'000'000 separation, but maybe it would not be an issue, as words can't begin with numbers, so dunno ...
 
@rebolek Because the idea we're talking about is offscreen Offscreen^_Smith: <emotion> "text". Escaping prevents us from having such problems.
If I wish to write a dialect using types to cue a behavior...and then turn around and use the text of the word for some purpose associated with that behavior...the atomicity of the text I need living with the word is important. I don't want to break it out and have to parse it like you are suggestion.
 
@HostileFork And how the escapes appear in text loaded from somewhere?
 
11:43 AM
Rebolek - if we are currently allowed to have make word! "green alien" as valid, then I am for easily accessing it via the green^_alien form ...
 
@pekr How are you going to match it against some text?
I have a log that I want to parse. There's this line: Offscreen Smith: <emoticon> "text". Is it word followed by set-word, or set-word with a space?
 
@rebolek You mean if I say load "green^_alien"? If you ever PRINT that thing, it will print with a space. If you ever MOLD that thing it will mold with an escape.
 
@rebolek word!, set-word!, tag!, string! (if you use LOAD)
 
@rebolek That is WORD! SET-WORD! TAG! STRING!
 
But it seems you are missing the point. This is not about PARSEing text date, it is about LOADing source as-is, without parsing.
 
11:46 AM
@earl So it will load word with space ONLY if the space is escaped as ^_ (or something like that)?
 
Rebolek - I think that the trick (proposal) is to actually not allow "green alien" being considered as a word ...
 
@rebolek Exactly.
 
OK, then I don't understand what's the point of this proposal at all.
 
Being able to literally write words with spaces.
(And other invalid words.)
 
Why?
 
11:47 AM
It's the very same point as string escapes, escapes inside urls, escape in files, and construction syntax.
Because sometimes you want to be able to express an data element as a word.
At the moment, you can only do that, if your syntactic rules for that data element exactly match the syntactic rules for a Rebol word.
 
Yes, that's true and I like it.
 
There is no escape mechanism for the "name" (we usually call that spelling) of a word.
 
Do we need one?
 
Yes :)
 
Why?
 
11:51 AM
Aren't we going full circle now?
We have given lots of examples before.
 
Not-convincing examples, sorry.
 
@rebolek That's certainly fine. Others like to be able to more comprehensively embrace Rebol dialecting an be able to mesh with third-party worlds, where you can't dictate the lexical space because another system already did define that before you entered the scene.
@rebolek That's your opinion, which is fine. Others find them convincing, also fine.
 
@rebolek Okay, you never use it. The burden of proof is on you for how it affects you in a bad way. I suppose you'd say your concern is someone out there--whoever--gives you a file. You LOAD it. You're operating on the assumption words don't have spaces. They do. Okay. Name some bad things that happen as a result.
 
If we are pushing the boundaries how about numbers at the start of words? 2d6 anyone?
 
@johnk Perfectly doable with the proposed escape syntax.
 
11:54 AM
@johnk With construction syntax, it should be legal. But it will mold as "word@{2d6}" not "2d6"
 
And another good example, thanks.
 
It might be all right to be able to escape numbers, actually. ^2d6
That would mean that print {^1^2^3} would output 123
 
Or alternatively (but less readably) ^(50)d6.
>> "^1^2^3"
 
@HostileFork I've shown you how can you solve your problem with Draem using current PARSE, you showed me an counter-example, I showed you that your proposal would also fail andthen you said it's not about PARSE. Silly discussion.
 
; Brought to you by: try.rebol.nl
== "123"
 
11:55 AM
>> "^(49)^(50)^(51)"
 
; Brought to you by: try.rebol.nl
== "IPQ"
 
@rebolek The problem with Draem is how to solve this with LOAD, not with PARSE.
 
And complex numbers 3+4i
 
@earl LOAD won't solve it. If there's "green alien:" in the source, it would load it as word! set-word!, not as set-word! with space.
 
Maybe a different beast, as you probably don't want to represent those using words.
 
11:57 AM
@rebolek Well, if @earl doesn't think I'm being silly then this would be a case where it isn't just me. So try and be patient and consider if there might be an aspect you're missing. We're presumably talking to try and understand each other vs. just to perpetually not understand.
 
@rebolek But there won't be "green alien:" in the source! There'll be "green^(space)alien:" in the source.
(Or "green^_alien:")
 
@rebolek I think, as in the Rebol2 example, that you may be confused because Rebol2 is broken in handling spaces in words. Pretty badly, as we showed. You can't tell the difference between a word with spaces in it and two words after molding. That's a serious, serious problem.
 
@earl So it's not real space in source, just a "space by convention" ?
 
@rebolek It's a syntax to escape spaces (and other things), exactly.
 

« first day (1580 days earlier)      last day (2200 days later) »