« first day (1735 days earlier)      last day (2045 days later) » 

12:00 AM
Just taking a wee look at u-parse.c. Should be able to implement my changes by the end of a weekend.
Certainly not this one though...
 
12:17 AM
@rgchris Feel free to ask if you have any questions, I'm going to keep trying to make everything more obvious...
 
I assume a lot of the things that are going on in said file are Rebolly things, right? Something like REBSER *blk makes a new Rebol block?
 
@rgchris A REBSER is the "backing store" for a series. That declares a pointer to one. If you wanted to make one you would use Make_Series().
This naming issue is a bit confusing, because a SERIES! is value is actually one of those pointers plus an index.
So a REBVAL can have bits in it saying it's a REB_BLOCK (in the header), that way it knows the other bits are to be interpreted as a REBSER* and an integer index.
Mechanically, the underlying routines that manipulate the data in a series operate on a REBSER* inside the Rebol code.
So a lot of a native or other routine is to take the REBVALs you get, extract the "series" pointers from them and their indices... manipulate those, and pack REBVALs back up to send back. (Since Rebol at the user level doesn't have a way to talk about the REBSER backing store... only through a value that has an index associated)
Though I have spoken about a possibility for changing that, which may not be meritless.
>> series: '[a b c]
>> type? series
== series!

>> position: [a b c]
== position!

>> type? reduce series
== position!
 
 
1 hour later…
1:48 AM
The deal-breaker with that though, is that it would require string-position! etc. for type correctness.
 
2:30 AM
In Rebol 3, loadably molding tags requires constructions for the empty tag and tags that begin with one of 38 characters.
Namely, the space character, the 33 control characters, and the 4 characters in "]<=>".
Tags that begin with the other 90 ASCII characters, which are all graphic characters, load and mold fine without constructions.
However, this is far from the end of the story.
Most notably, the current state of affairs means parens will need special molding code as well.
Try this at home kids: [(< )]
(Don't forget the space!)
 
>> mold [(< )]
== "[(<)]"
...?
 
Now try loading [(<)], which is what the previous line molded out as.
 
Ah.
 
Just one more wart that no-one will ever run into or care about except me.
 
I care about it. It's a good point.
The line of thinking rules out <)(> as a tag natural, among other things, but we've mostly been thinking about defining tag naturals in terms of what's legal vs. what's illegal (e.g. control characters weren't under consideration, and we hadn't talked about parens yet.)
 
2:39 AM
Well, I should be less sensitive about it to be sure.
But it's one of those things that anybody that runs into it is going to be rightly puzzled.
 
Having someone working on these questions and belaboring requires sensitivity.
 
And it really can't be fixed either without making something else more puzzling.
One of those areas which if you put a paragraph in the user's manual about it you'll just be confusing people.
Permanent SO question: How do I express a paren that has < as its last word?
 
In plan -4 technically, <( can be legal. Because you can't write 1 <(2), outer space prevails in those cases.
Just like that.
(<)
(<) should be legal, and arguably <(foo) (bar)> should be a legal tag. It might have uses in "string compose" situations.
 
Sure, we can add to the list of 38 characters that force tag construction.
But I fear we cannot stop.
Let me ask you HF: Do you think we can stop after adding close-parenthesis to that list?
 
We might not be able to stop, if they add an infinite number of unicode code pages.
And I'm sure there are considerations and questions outside of ASCII, like if there are other unicode "whitespace" characters, do we allow them as delimiters (in the language as a whole) and do they fall under the ruleset of things that can't open a tag.
 
2:54 AM
I was considering only ASCII.
 
Then yep, we will be able to stop. :-)
 
For some reason your smiley is failing to convince me.
 
Well let's look at quotes, symmetric delimiter. <"
can you produce a mold problem with that?
 
Of course, all tags will fail the load/mold test if they contain unbalanced double quotes.
 
Hmmm. Why?
 
2:56 AM
That's an additional construct-requirer I was leaving out for the moment.
@HostileFork To allow tags to contain '>' characters.
 
That feature isn't even legal in HTML5, you have to do &lt;
 
Making a third kind of construct-requirer, a tag that contains '>' characters outside of double quotes.
 
I believe you should need to escape a > or < inside a tag to have it in there literally.
 
There is no escaping in Rebol tags besides the double-quoting.
 
I think <" { } {> should be a natural tag, as should {< < > <} be a natural string.
I think that is an arbitrary burden to pick (considering HTML5 especially saying it's not legal), and additionally if it were to be adhered to it would need to also do single quotes.
 
2:59 AM
@HostileFork You mean natural tag, don't you? All strings are legal tags.
 
Yes.
The existing behavior of quote matching in tags should go, and I like the idea of being able to use a non-HTML escaping syntax (in particular the Rebol one for strings). Again I think these questions should be run by @rgchris, who argues for the bridging capabilities of tags and is the reason why we're taking away OP! fodder like <? and ?> and allowing the --> to terminate a tag... so, an opinion on this issue would be good too.
 
@HostileFork Be careful what you wish for, @rgchris doesn't want new OP!s ...
 
I'd say that if (and it's a big if) Rebol was going to take on the responsibility for permitting < and > to be escaped by Rebol strings, due to the perceived high value of <either cond="1 < 2" true={print {True}} false='print "False"'>... then it should permit Rebol's string types as well as single quotes and also do the nesting.
@MarkI That's earl.
 
@HostileFork I thought it was both. Actually that you and I are the only ones for the idea at all.
 
If we were true believers in XML, we might say that such intelligence in that tag would be great for its ability to finesse the < and > inside of it.
 
3:06 AM
Natural tags should be the ones that are commonly used, not necessarily bound to what is proper.
 
As it stands, I think we're willing to forego errors and have a simpler abstraction, allowing all the same notations with:
<either cond="1 ^(<) 2" true={print {True}} false='print "False"'>
Or
<either cond="1 ^< 2" true={print {True}} false='print "False"'>
Which looks a little weird, but so does ^^, so... maybe fine.
And the fact is you won't be able to give that to HTML5 without processing it anyway.
 
@rgchris Well, it would be nice if proper tags were natural, but I totally agree that we need more natural tags than that.
 
On the downside, you don't have something catching your mis-pairings. On the plus side, you have a whole language that isn't stuck in strings to work with that catches better pairings.
 
@MarkI Most common tags are proper, just shouldn't be OCD about catching those outside the venn diagram...
(although, as before—should be tolerant of preprocessors: <% if foo > bar [] %>)
 
@rgchris How would you propose that being read as a tag? :-/
 
3:12 AM
@rgchris Get outta town. Nobody reads that puppy, do they?
That is HORRIBLE.
 
:D
 
I mentioned the raw strings earlier, where you could set up a sequence that begins and ends it, but that can't work for <div stuff stuff stuff vid>
Ugly C++ feature, those raw strings.
 
@rgchris I was fooling around the other day trying to find some invariants in Rebol quotation.
Like, if you had a string in its external form, and you wrapped it in a set of outer "{" and "}" characters, would that be valid?
 
@rgchris Do you think tags would be better served or worse served by checking pairings in naturals? e.g. <% if (foo > bar) [] %> being okay, but <% if foo > bar) [] %> not? What you might argue is that imbuing tags with such a property could make them "more than strings" and a nicer commodity. And if we apply that to single ticks and double quotes, perhaps they do get a kind of specialness.
 
I found exactly one such statement that was actually true.
 
3:16 AM
There may be such a line of argumentation to be made. As I said above, it was an if but the if hinges on doing it for all the delimiters.
 
If you take a Rebol script, and wrap it in "[" and "]" characters, you still have a Rebol script.
Well, okay, two statements, because that works for "(" and ")" as well, of course.
 
Pitch would be "Tags are strings with 'structural' checks at load time, but once they are loaded, they really are just strings."
 
@HostileFork These would be the common pairings—@MarkI if you have more...: <!-- --> <![ ]> <% %> <? ?>
 
@rgchris #2 would be covered by the proposal I suggest. Are you saying the other 3 permit > and do not complain?
 
Right.
<% must terminate with %>, <? with ?> and probably <!-- with --> to be natural.
 
3:21 AM
The rule I propose about enforcing Rebol-style matches in the tags would presumably be problematic for systems with their own escaping mechanisms. quote backslash quote quote for instance.
So similarly, if they embed a string inside their tag with their escaping rules and say "escaped"%>" then suddenly Rebol has to know their internal escaping to know where the end really is
Next thing you know, PHP parser inside Rebol
 
Hm.
 
The 80-20 rule and staying true to the roots would be to honor HTML5 and Rebol's rules.
Possibly even erring on the side of not honoring the single tick quotes.
The > inside the HTML5 comment is a bit of a grumpy point.
 
One needs to be pragmatic about this. There's two sources of tags—one that I include in source, and one that is, for example, cut from load/markup (or decode, whatever). If the former is <% "escaped"%>" %> you get buzzed by the Rebol parser. If it is the latter, you get a non-natural tag.
 
You won't be "commenting out HTML code" when you're generating it, but you may want to put in a comment block that talks about <div>s and <spans> and such. But that also hits us with the multi-line tag issue.
@MarkI Multi-line tags: for or against?
 
FOR!
 
3:27 AM
I know what you think, that's why I didn't ask you. :-)
 
That was a hint to Mark :)
 
Multi-line tags have the multi-line string issue, which is how much leading whitespace, and I would hope that we are going on a proposal like: curecode.org/rebol3/ticket.rsp?id=2211&cursor=22
I wonder how far we might get with my strategy, which is to do it Rebol style.
 
Yeah, except multi-line tags have a different character:
<a
    href="this"
    title="That"
>
I'm sympathetic to the multiline string proposal though...
Think it could work.
 
<div>
<!-- The above is a <div> and we can say that because we nest ok. -->
<!-- This ">" is legal because it's in quotes, so is '>' and ">" and {{[>]}} and [[{>}]] -->
<!-- Here > we draw the line -->
And ([>]) and [(>)] ad nauseum.
I guess I can get behind this idea, as an interesting compromise, making a kind of supertag.
I propose this be called SuperTag. :-)
Well, wait. No '>' with it's
 
I'm still leaning <!-- whatever > goes > in here < is fine as long %> as it's not --> It may very well not be optimal having three or four different rules for identifying the limits of a tag, but I think the tradeoff would be worth it for the expressive win.
 
3:37 AM
I vote against it, I think HTML5 needs a bit of pushback. And I'll go back to the reminder that we're not going to make anyone truly happy if they're not into Rebol for its own sake, and if they are they're going to appreciate the added coherence.
 
And it does depend on how the tag starts, so it's not like you have to go far in the string to discern which rule to use...
 
The way that you're getting --> is not due to looking for that pattern in particular. It's due to allowing any > to end a tag once it has been opened.
Well, not exactly.
I guess the answer above would be that single quotes do not protect > but double quotes and the others do.
e.g. the only way you get the checked benefit in supertag is if you use double quotes.
This could be framed as a benefit...if you want to say tag-join [<div id='> div-name <' style='> style <'>] you might make such an abstraction.
And then, with escaping, we can pick up the slack. ^> and ^< if you need them.
I guess my vote is against putting HTML5 related "intelligence" into TAG!, because I do not think HTML5 is intelligent.
I see no reason why <!-- foo --> should behave differently from <!-- foo -> or <abc --> or <?-- bar --?> in terms of the logic of the underlying processing code.
"HTML allows you to" is not a good enough argument for Rebol's naturals, especially on so minor a point that we can finesse in more brilliant ways.
The put-it-in-double-quotes finesse is interesting enough, augmented by escaping if you must.
So what you're really getting is more like Rebol intelligence, presumably reusing some portion of the scanner, parameterized to know it's looking at a string. Yet still matching and nesting the parens and brackets, taking care of the quotes, etc.
Behold: SuperTag
And crazy thought... what if COMPOSE could process a SuperTag?
(of course, if it took a TAG! it might get one that was malformed, because all bets are off after load time.)
>> verdict: "crazy"
>> compose <It's just so (verdict) it might be (verdict).>
I'd say "probably best left to the libraries" except if we're talking about a parse/validation process for doing it already inside Rebol for LOAD, the machinery would basically already be there.
 
4:15 AM
@MarkI So with SuperTag, it sounds like I am saying the logical consequence of the "if (and if it's a big if)" being played out is actually... possibly a very good thing.
Sounds like it likely would not affect much legacy, but it resolves your <) and <] because those aren't naturals just as <foo ) bar> and <foo ] bar> would not be.
Nested tags a good idea so you can <!-- Talk about <tags> in comments -->, but falling out as a consequence anyway.
Plenty of leeway for Rebol authors targeting HTML5, between ^> and ^< if they need the literal character in the string... or ">" and [<] and {{[(<)]}} and all the variants.
 
4:44 AM
@rebolek Does the above proposal suit your usages of tags? --^
@rgchris Hm, maybe the space greater than rule is okay as long as space greater than can't close a tag. So any tag can allow it, because <this > is an illegal tag. You always need a character to be touching the end tag. Then it's not --> or %> in particular.
That shifts it to where you can't put -> in a tag natural without escaping it.
 
@HostileFork I like @rgchris proposal.for <!-- dfsgdgvds -->
COMPOSE on TAG! sounds promising.
 
We will support <!-- dfsgdgvds -->, question is just about what kinds of things we support inside it in terms of < and >.
And of course, we'll support anything in construction syntax.
 
anything
 
There is more to gain I think from checking <X ())[)()))]((]](() Y> for matching than permitting <X ) Y> as a natural unescaped IMO. It has a chance of giving TAG! more of a soul and a chance to earn its respect instead of just being a wonky string.
<X ^) Y> is there if you need it.
And now suggesting <X ")" Y> being legal, with the idea that SuperTag is lexed and checked by a parameterized variant of the Rebol scanner...just for a string and leaving it as a string.
Permitting things that Rebol would not as part of the parameterization. <Talk about 4chan if you like>
Throw a little magic in on COMPOSE and you might be getting something interesting.
Notably, PATH! is left out of this picture. Slashes are just ordinary characters.
 
5:34 AM
I wonder if tags need to at least try and support paths out of the box. It seems you should be able to have "path handlers" as you have scheme handlers.
register-path-handler path! word! function [path [path!] word [word!]] [
    ;-- with word as bar
    ;-- if tag is <foo bar="baz"> give back STRING! "baz"
    ;-- if tag is <foo bar=(baz)> give back PAREN! with LOAD of contents (word! baz)
    ...
]
Perhaps you could override every path handler pairing.
It's just an NxN matrix of REBVALs that are functions, filled some way initially. If you put a native in the slot it wouldn't be slower than today.
The path handler registration could type check it once, no need to type check on each subsequent call.
 
 
2 hours later…
7:51 AM
@HostileFork awesome thanks! My C coding skills are non-existant, but I can put ren-c through the wringer on the user level. That needs to be done too ( and will make of useful modules in the long run )
 
@Maarten Hopefully we'll be getting to the feature benefits soon. Several lined up...
@Maarten And to the extent you have time and can review ideas or give feedback, such as on the tag stuff above, please do. Or if you can go through CureCode and pick out things that "don't matter to you" or "do matter". There should be some survey method. Anyway, perhaps consider browsing curecode.org/rebol3/view-tickets.rsp and if anything screams "important" you could comment there or here to that effect.
 
I will do that in a week or two, back in civilization
@HostileFork meanwhile, it may be a good idea process wise to tag a commit every now and then. So people that write user-land code can a) assume a base and b) see regression/progress.
 
8:09 AM
@Maarten When the features come; still hammering out basics of strengthening the foundations and tightening the nuts and bolts. So the main perceivable feature so far is "you get the Saphirion/Atronix stuff working in a core build". Some bug fixes that probably weren't stopping anyone in particular, but represent fundamental problems.
The next big one sounds like it will be CMake build. For now, that and the general idea that there's momentum behind unforking the efforts is the announcement to keep people in the loop with.
Mostly it is a dev-space and not a user-space story so far.
 
 
3 hours later…
11:34 AM
If anyone wishes to do me a favor, try pulling from hostilefork/rebol's "stable-stack" branch. It has an assert in it that I'd like to know about people hitting (and odds are high that people will hit it). It prints out a message about the evaluation that caused the problem so when they're hit they should be easy to fix.
So if people can run with that and let me know about problems it would be good.
(It is a Ren/C branch, but my hostilefork account can only have one Rebol "family" clone...so it's a branch in rebol.)
 
12:26 PM
@HostileFork Hey, I made a small C++ library that sorts collections at least as fast as the standard library's std::sort and sometimes faster.
 
1:26 PM
@rgchris I am against perverting tag! lexical syntax to handle these ill-specified and poorly-implemented extensions.
I am also against, as is everybody in this group as far as I can tell, attempting to codify HTML5 sillinesses into Rebol tags.
So why should I be for codifying ASP sillinesses? I am not.
IMO you would be better off using strings and putting them out between "<%" and "%>" strings.
The moment the content between the angle brackets is interpreted differently is the moment it ceases to be a tag!.
Now, that being said, I have no objection to introducing new (tag-like) types that have different content models.
But they would be html-comment-tag!, asp-tag!, and the like, most definitely NOT "kinds of" tag!.
For example, did you know that --> can occur inside HTML comments?
<!-- ----> hello --> is a perfectly valid HTML comment tag that almost no implementation gets right.
You're lucky if you can even find that documented anywhere.
 
That's batshit insane.
 
@Morwenn I will forgive your understatement :)
 
2:34 PM
@MarkI And RSP, and ERB. There is a pragmatism here—though I'm all for the purists' Rebol, if a bit of flexibility (that has little impact on Rebol's lexical and parsing nimbleness) not only helps open doors, but makes handling legacy environments a delight, then I think we have a win-win.
@MarkI That's overkill. This is all about what tag constructs are recognised by the parser that don't require onerous escapes, not the semantic differences between different types of tag. These constructs are common—it's a marked-up world (for now) and Rebol can have that world in its back pocket.
 
@rgchris I am all for flexibility. If it can't be right, it'd better be flexible. Unfortunately, what you are talking about here, namely, allowing unquoted greater-than signs in tag content if the first character of the tag content is %, is called hard-coding, and in fact is the exact opposite of flexibility -- you are trying to be "right".
 
Look at strings—if the first character is { you don't have to quote "
Or binary—if it starts with 2#, you can only use 1s and 0s—different representation of the same data.
We don't use a binary-2! type.
 
@rgchris A related, also huge, problem. You can't control which way said strings get molded, and THAT IS THE ISSUE.
@rgchris A related, also huge, problem. You can't control which way said binaries get molded, without a global-var hack.
 
Well this is easier, because depending on the first character you know how a tag will mold!
 
@rgchris Bye-bye mold next tag.
 
2:45 PM
How? We have construction syntax for that!
 
I said mold, not mold/all.
 
If MOLD/ALL is to be the new default, we lose that anyway.
That's why we need FORM (however renamed).
 
I would vociferously object if mold next [a b c] was not [b c].
 
@MarkI @rgchris <% and %> could just be another delimiter for string, along with { and }. With <% and %> widely used for various HTML-embedded templating languages, that's an avenue worth investigating, I think. If we are trying to somehow mingle with "the messy real world"(TM).
@MarkI That is a problem.
 
@earl Still have the problem of choosing which one to mold it out as.
 
2:48 PM
@MarkI I don't see that particular problem, no.
 
@earl What, the code or my objection to it changing?
 
The general problem still is: nobody quantifies what they expect FORM, MOLD, MOLD/all and related things to be.
 
@earl In your "string" proposal, how would you get <%abc%> to not be molded out as "abc"?
 
@MarkI You wouldn't, not with a serialiser following the primary goal to preserve the value's data. (As in contrast to a serialiser that would be primarily (or even in addition) be concerned with preserving the value's original literal formatting.)
 
@earl So you're just talking about a different kind of escaping literal form for strings. That's fine by me.
 
2:51 PM
Definitely need to draw up some cases here :)
 
@MarkI Could also be for tags. But then, for some reason I have yet to ask you to explain, you don't want tags to have string-like escapes.
 
@earl I didn't say I don't want that! I said we don't have that.
 
@MarkI Fully agreed. But we don't have backslash- or dot-escapes either.
 
@earl I don't want that, at least where we can avoid it.
 
@rgchris Sure, I don't think that's contentious. Escapes of course only when you need them. What we all may differ in slightly is were we draw the escaping-needed-from-here-on line.
 
2:54 PM
@earl And I never said I didn't want those either :). I will also refrain from the obvious "escaping dims clarity" comment.
 
@MarkI Didn't you propose them for tags? (Sorry, if I didn't follow the double or triple negation correctly :)
 
@earl I proposed BACKSLASH as a lexical escape character, not a character escape character.
 
I'm open to having an escape for <% '%^>' %>
 
And it was dim, and it was soundly rejected, and I have withdrawn it, and I haven't come up with anything better yet.
 
@MarkI Ah, sorry, missed the withdrawal.
@MarkI Why not just go with the existing ^-escapes in tags as well?
And to be perfectly clear on an earlier point: if "[b c]" == FOO next [a b c] then your serialiser FOO looses data.
 
2:58 PM
@earl Double-escaping. Or would you be getting rid of the quotation-mark escapes in tags as well?
 
@MarkI What do you mean by double-escaping?
We have multiple escape forms in other types as well, if it's that.
 
@earl I was talking about mold as a formatter, not as a serialiser, which is what I term mold/all.
 
@MarkI Again, my main pain point is that nobody specifies what their serialisers should do.
 
<a b=">"> vs. <a b='>'> <— second is an error in Rebol 2
 
If mold is a "formatter", then what's "form"?
 
2:59 PM
@earl Multiple character escaping is ... possibly bearable. Mixing character and string escaping, not so much.
@earl A dumber formatter.
 
@MarkI Brilliant. TO-STRING?
 
@earl I believe "serialiser" specifies what it should do. Formatter, printer, output form, less so.
@earl Dumberer?
 
Lovely :)
I'm sure we have a dumberest formatter somewhere :)
 
@earl TO-BINARY
 
@MarkI I think, everything that converts a value/object tree into string form is a serialiser in my book.
 
3:03 PM
@earl Even if the output of said serialiser is always ""?
 
@MarkI A kind of "K-serialiser", probably, yes.
@MarkI Can you give an example for the "quotation-mark escapes" you are referring to, just to be sure we are on the same page.
 
I have been using "serialised form" as a synonym for "external form" and "form that loads as it was when molded".
Possibly an error on my part.
 
Pertaining to the other earlier discussion, if we can't have <% ] %>, then the whole point of having <% %> in the first place is maybe rendered moot.
 
@earl In Rebol 3, quotation marks in tags perform an escaping function in addition to being literally present, namely, that greater-than signs do not terminate tag parsing if they were preceded by an odd number of quotation-marks. Example: <a tag containing ">" a greater-than sign>.
@earl I didn't say it yet, thank you for beating me to it, if they represent code then they have to represent code fragments.
 
@MarkI Yep.
@MarkI Is that all it does?
 
3:09 PM
@earl Yep.
 
@MarkI (cc/@rgchris) I haven't followed the recent HTML developments in detail. Do you technically have to escape > in HTML5 attribute values?
@MarkI Do you suggest keeping quotation-mark escapes?
 
@earl Yes.
@earl They match the attribute-value spec I quoted, so I do want them to stay, yes.
 
@MarkI If all they do is not requiring > to be escaped, whereas the HTML spec requires them to be escaped, how do they match?
 
@earl Grok failure. The HTML spec requires them to be escaped by quoting them inside double or single quotes.
If you are using an entity, you can use that anywhere.
 
Ok, understood.
So you have don't have to escape using a character entity.
 
3:18 PM
Exactly. And if you did, you wouldn't need the quotes.
 
You have to "escape" by single- or double-quoting the attribute value.
Pity.
 
I look at it as an opportunity to allow different kinds of escaping in Rebol string types.
 
Multiple escape thingies, then.
 
Some (@HostileFork, looking at you) may not think much of that "opportunity" though.
 
@MarkI We have that already, don't we? In file! with dq-escapes and percent-encoding.
 
3:21 PM
@earl Yes -- with one very important caveat. The quotes themselves are external to files, and internal to tags.
 
(Sorry, phone ringing.)
 
Also, for what it's worth, there are in fact two kinds of escapes in files not including the outer "external" double quote one.
Hat-escapes and percent-escapes are both allowed in either quoted or unquoted files.
I haven't any idea how to reconcile that one yet. It's on my to-do list though.
 
3:47 PM
@MarkI Thanks for your indulgence and time clarifying.
 
posted on August 01, 2015 by zsx

Fixes for FFI integration by zsx

 
 
2 hours later…
5:29 PM
@MarkI You may not object to more kinds of tag!, but I do. I do not want <% ... %> to be php-tag! or <!-- ... --> to be HTML5 comment tag. I've mentioned already the problems with such lines of thinking, including now having to grok PHP's escape syntax, with <% "[ESCAPE-NEXT-CHAR]"%>" %> and we are not here to cater to PHP in the first place. And we sure don't need to support <!-- -----> hello -->.
(I assume PHP's escape-next-char is backslash but that would mess up markdown if I put it.)
Presumably most of these languages that have the ability for standalone if X > Y or if X < Y can support if (X > Y) and if (X < Y) just as well. (Rebol itself can, albeit not necessarily generating exactly the same effect if that is inside a compose or otherwise seeing the parens.) If someone is forced to embed code from such languages they can do it that way with SuperTag.
Again, SuperTag's rule is that while in the tag, it allows a wider range of characters as string...but if it hits a " or { or ( or [ then it kicks over into Rebol rules for that type at a scanner level only. This would include an unescaped < as well.
In order to go back to just accepting string characters again, then the started element must be closed.
Hence if Rebol supports "<", then SuperTag supports <div title="<"> or <!-- I can't decide if Pac-Man is better represented in ASCII as "C" or "c" or "<" -->
Perhaps obviously, the Rebol rules kick in only once the character is encountered. Hence foo="stuff" and foo=(stuff) being illegal Rebol doesn't matter for <foo="stuff"> or <foo=(stuff)> as the rules were only on once the " or ( were seen, and they stop when it's closed successfully.
I've been wondering dialect-wise if COMBINE would be improved if instead of FORMing datatypes implicitly, you could put a datatype as the first element to say what you wanted. combine [tag! "a" "b"] => <ab>
We've talked about combine/as ["a" "b"] tag! but that feels awkward, and it wouldn't work in NewPath with foo/["a" "b"]/bar if you were trying to get foo/<ab>/bar because there's nowhere to put the refinement.
The idea being that dialect-wise, datatypes could always be converted to string. So combine [to-string tag! "a" "b"] could give you "tag!ab" if you wanted it. It just would be that DATATYPE! in particular would be special, in that if you hit it before you've generated any content it will set the type.
So combine [(if 1 > 2 ["this branch won't run, so none..."]) tag! "a" "b"] => <ab>
And combine ["a" tag! "b"] => ** Error, can't apply TAG! to combine which already has content
@Morwenn Do you know why it's faster in the cases it's faster?
 
6:27 PM
Anybody ever considered just implementing Rebol on top of Go?
 
@Maarten You just did! Have fun. :-)
Part and parcel of Rebol's approach is staying close and simple to bare metal. We are close to being able to embed a C89 compiler into Rebol (w/some C99 features) so that it can build itself.
This is the angle of our current pursuits.
I've done work to allow a C++ build of that same codebase, which offers nice opportunities, but even there we're not willing to flip the switch as a requirement because of not wanting to become dependent on a C++ toolchain.
 
@HostileFork my reasoning is that the load phase is fairly simple, Go gas GC built in and a strong set of core libraries. Plus....it's super cross platform
If I understand you correctly we will be able to just auto import libs one we r have the source code?
 
@Maarten Delegating to another language's GC is of limited benefit to Rebol. Its memory strategy involves things like chunking out pieces for series, doing allocations of the request size...getting back a larger chunk that's been rounded up but then being able to make use of the larger amount as capacity...it has an OS/filesystem type mentality.
@Maarten Auto import what kind of libs? There is some automatic wrapping Shixin has done with c2r3 for C.
 
I hope that maps to Go 's slices.
 
6:43 PM
@Maarten From brief review of what that means, not in a way I can see as meaningful.
There really isn't all that much in Rebol's implementation to outsource to the cleverness of another language. Because there really isn't all that much in Rebol's implementation.
If anything, there's too much code in Rebol for what it does today.
And this is part of what's interesting and appealing about the idea.
We've spoken of borrowing some immutable structure code from Clojure or elsewhere, and that may be worth following up on, because as written it's tough to imagine Rebol having a threading story.
 
7:08 PM
(That's considerably different from "throw out the premises of the language and rewrite Rebol in Clojure", which is a project I can today announce never being involved with.)
 
7:19 PM
@HostileFork Yeah, of course. When the size of the collection so sort is known at compile time, the library is designed to choose a specific sorting algorithm for this size, generally obtained with a sorting network.
So it should be faster for small sets (of size 0~32) and it falls back to std::sort otherwise.
 
@Morwenn How does one test the size of a collection for whether it's known at compile time and make behavior conditional on that?
 
@HostileFork I have overloads for fixed-size C arrays and std::array. It's as simple as this.
 
Ah, okay, just types.
I was thinking "how would you sort a const vector, anyway?" :-)
 
Yep. But it's hidden under a common interface. So it should provide better performance from time to time and be as fast as std::sort otherwise.
Hey, it's not unusal to have to sort arrays of size 3 or 4. This shoud hide a good performance improvement under a same interface.
I also exposed the backend: a sort_n<> function which takes the number of elements to sort as a template parameter and does the dispatch.
 
@earl I am only partway through an analysis of escaping pros and cons, I hope to have a fuller picture to share soon.
@HostileFork Introducing more string types may be preferable to adding features to the feature-crammed ones we have.
In the short term, all I am looking for is sane default behaviour, and flexible custom behaviour.
I've even backed off Tags III, though (on purpose) I haven't removed its bot link yet.
So if anyone can make an argument about sane (as opposed to language-altering) defaults, or about flexible (as opposed to single-track) behaviour, I'd be happy to listen.
 
7:44 PM
@HostileFork plus I DO NOT WANT the JVM. Go seems solid in terms of runtime. Rebgo would have a lot of easy to add natives
 
That sentence scans poorly, sorry. I mean "base their argument upon reasoning concerning" when I say "make an argument about". I certainly did not intend to say "have an argument with".
 
I'll need to figure out Parse. But that would be Really of leather concern
 
@Maarten You can of course take a crack at it if you like. But in terms of attention hours spent I'd prefer more time from people spent on hammering out the language questions vs. having yet another implementation in the mix. Being written in C has the advantage of control, and working with what's there has the advantage of "prior existence."
 
8:12 PM
> and --> and -> and < and <-- and <- may have to take one for the team. We'll have => and its friends to console us.
Hm, overstrike?
@rebolek Three hyphens bounding something is apparently overstrike. Is that in CommonMark?
I dislike fonts that superscript the asterisk*.
* -- this font, being an example
 
8:48 PM
@rgchris SuperTAG! (name updated to include caps and exclamation point) is compelling enough to me to yield basically all of the characters from operator to tag. I don't like the idea of seeing --> and not knowing if it's an arrow or an end of tag enough to kill it as an arrow. Oh well.
 
posted on August 01, 2015 by fork

[Wish] Make a natural tag start with , ~, or = followed by a >. (There may be other prohibitions on what the second and penultimate character can be, and it may be that is reclaimed for "empty tag".) Content is processed by general string rules with string escaping, with some way of escaping unpaired > and and ^ or

 
It means you get almost everything. The things you don't get are: ending tags with spaces (permitted in HTML5), and unescaped usage of > and < outside of Rebol contents. You also get a stricter structure on what you can put in an HTML comment in terms of what you can write in parentheses or brackets. If this bothers you then you can put your comment in { } inside the comment.
<!--{
    Write [ what ) ever < you want.
}-->
This is not a 100% solution for copy-pasting existing PHP or HTML into Rebol. And I don't think we should go that way. The simple fact is that you cannot without starting to pull some of their implementation mechanisms...essentially you need a correct syntax highlighter for every language embedded into the lexer. And we don't want that garbage.
I'm sympathetic to those who want to generate other languages, but Rebol is first and foremost Rebol.
 
 
2 hours later…
11:15 PM
@HostileFork Really HF? Bye-bye arrow words? If it doesn't start with '<' or end with '>' then it's not an arrow word ...
 
@MarkI Bye bye dashed ones, at least. For SuperTag's solid grounding, I'm willing to settle for => and ==> and =>> and ~> etc. The tag exception bugs me too much.
So I shall let <- foo -> be a TAG!
It gets too wishy-washy once you say "if it starts with an exclamation point, then..."
 
@HostileFork You can't tell that those aren't end-of-tags, I don't get the difference from -> --> ->> ...
 
Those won't be allowed. Arrow/symbol words won't have dashes in them. ->> won't be a legal arrow or a legal tag ending.
 
Please explain how you can differentiate - from = in this context.
 
A dash has one line. Equals have two.
 
11:19 PM
Funny lad.
Why are you picking on '-'? Why not pick on '='? That's the distinction I need help with.
Because '-' are more common than '=' in tags, or what?
 
Tag's requirements to end in ->
SuperTag is the invention of something that can be defined simply in terms of existing problems and code, and yet still cover a swath of applications in HTML-webbish-generative contexts.
 
@HostileFork You mean "Tag's requirements once my 2-hour-old wish is implemented".
I apologize for not understanding that.
 
You've heard of Internet time... we now work in closer to singularity time. Having been come up with last night, SuperTAG! is legacy code by now. :-)
 
replace/all 'legacy 'deprecated :)
 
I do not want TAG! to be adaptive to foreign needs. The idea of subsuming a PHP parsing and escaping logic in to tolerate a specific behavior for <% and %> is a good example of what TAG! shouldn't be doing, as is the support of <!-- -----> -->. They are good compass points to say "okay, if not that, then what is TAG! supposed to be doing?"
Not adding a lot of code or definition to Rebol. That's what's neat about SuperTAG!.
It's described there in a teeny proposal.
And it passes the buck back to problems we're already solving (or need to for other reasons)...for which the code exists (or will need to for other reasons).
Does this mean you will have to choose the way you write HTML comments or PHP code a bit more carefully to be a bit of a polyglot with Rebol? Yes. That's where the creativity comes in. Because effectively, using tag to generate things for not Rebol is a kind of an abuse of the tool. Rebol's types are for Rebol programs, written by Rebol programmers, and it's nice if there's a sweet spot found where they can serve in multiple domains.
But the goal is to make something that might still be around after all that stuff dies out.
 
11:43 PM
via Plan -4, it would be possible to have a construction syntax exception like tag!< > > < > > > < >!tag
Or something like it. tag!start< > < > < > < > > < >tag!end
We might generalize construction syntax such that if you say type!( to open something it is assumed the syntax does not end until )type!
So tag!<Have to ^> escape> with tag!(<Don't have to > escape ) ) ( )>)!tag perhaps
 

« first day (1735 days earlier)      last day (2045 days later) »