« first day (829 days earlier)      last day (2951 days later) » 
00:00 - 15:0015:00 - 00:00

12:01 AM
I'm beginning to suspect my html dialect needs more hinting along the lines of rebgui
 
@rgchris lovely! thanks a lot.
 
@KevinChrisMarcelo welcome to Rebol/red chat
@rgchris That is indeed neat
 
@BrianH i would love to see that reflected in the module system more.
and a few other related aspects, such as the extremely stupid change-dir on startup.
 
For DO, yes. That's left over from R2. IMPORT doesn't do the change-dir thing. Not sure how I can test that in the tests, I'm afraid.
 
rebol3 script.r changes dirs, that's the problem.
 
12:16 AM
@rgchris how about a little frame or something at the top to allow people to download the original file?
 
@earl That's what R2 does too. Only when you DO a script (which is what specifying it on the command line does). We should have a reliable way to get the calling directory.
 
@BrianH yes, i can't fix R2, but hopefully we can get rid of that stupidity in R3.
until then, we'll probably have to restore system/script/parent(/path), which seems to be the only half-decent way to bring back sanity to CLI usage.
 
@earl We need something better. A script needs access to the directory it was called from, the directory it is in, and the directory the interpreter program is in. Right now I think two of those are not necessarily set correctly. It almost doesn't matter which of those 3 the directory is set to while the script runs, as long as all 3 values are accessible.
 
system/script/parent/path, system/script/path, system/options/path
changing directories without being asked to do so, matters. not a good idea, esp not for CLI usage.
 
@earl Again, not sure that two of those are being set correctly in all circumstances. There is at least one ticket about system/options/path, for instance.
@earl, if we come to an agreement here about this, could you promise to transfer your proposal to a CureCode ticket? This chat is ephemeral.
 
12:33 AM
@BrianH chat here is permanent
 
@GrahamChiu OK, good to hear, but still not indexed. Starring isn't enough. If we have a proposal to change R3 or Red, it needs to go in their respective ticket systems.
 
@GrahamChiu I've been thinking about that. My take at this time is the page should have no more visible content than in the script. I may do another keyword to pop up a 'copy' link.
 
@BrianH it's permanent, permalinkable, indexed and searchable. but i'd of course create tickets as appropriate (didn't have the impression that i was frugal with tickets, but well).
 
@GrahamChiu @earl Thks :)
 
@BrianH Searchable also...upper right. Just got back, just used it :) transcode in Rebol/Red chat room
 
12:41 AM
Tentatively supports Red: reb4.me/cc (could very well breakā€”let me know what input chokes that shouldn't)
I haven't added the unicode spaces yet.
 
Well, I don't know how people have been using this chat forum. If it is used anything like AltME, I would have to create tickets half the time (not in your case of course, @earl).
 
@BrianH Water cooler talk, whatever's on right now. Rebol/Red if there is Rebol/Red business to be spoken of...but if not, whatever. Know that it's logged so if you talk about someone behind their back they can search to see what you said. But also if I took an awesome picture of a duck/goose/whatever you can go look at it. :-)
A different sort of approach than AltME, for people who prefer a more public and "modern web feeling" chat. With the benefit of promoting the use of StackOverflow Q&A among the Rebol community who might otherwise not think to.
 
@rgchris looks good already. will need a different list of predefined "known" words, though.
 
12:57 AM
@rgchris All nice stuff. I guess it's too much to ask that your methods be used to replace the coloring method for scripts on rebol.org? :-/
 
@earl Can be done. I can use the approach from the ACE highlighter and use a dictionary dependent on the header.
@HostileFork I can but post the code (it's getting a little bigger).
 
@BrianH Another chat tip and general StackOverflow avatar tip: change avatar without gravatar account. I should put that in the room FAQ..as well as the fact that it takes a while to refresh the chat image cache.
 
@HostileFork finally, a fix for the map crash: github.com/rebol/r3/pull/78
 
This is the script? function I came up with: reb4.me/r/script-header
Any suggestions welcome.
 
@earl Great! And another tiny surgical fix, wonder when the first big change will be...
 
1:06 AM
@HostileFork Yes, bigger changes take more time :) It's good to get the crashes weeded out.
 
1:31 AM
Looking through the source, and it looks like I can fix #1760, #1509, #1515 and #1519. Yay!
@HostileFork Thanks, I fixed the picture!
 
@BrianH Should update here if you do a page refresh after waiting some unpredictable amount of time...
 
It turns out that some kinds of basic evaluation bugs aren't that difficult. Who knew?
Also, I've been discovering R3 language features that I never knew about before. Going to check older versions to see when they were added. Turns out that there's a SET optimization that I never knew, but which would really come in handy :)
>> a: 1
== 1
>> set [:b] [a]
== [a]
>> b
== 1
Setting a get-word in a block to a word sets the get-word to the value of the word, not to the word itself. This would eliminate the intermediary block in most set word-block reduce value-block expressions, making it a better multi-assignment function.
 
1:56 AM
@BrianH I had the impression that those are due to Carl being lazy about checking throws vs unwinds in return values, right?
Rather annoying to fix, IIRC, because you have to correctly thread this through the whole interpreter core.
 
Okay, tried expansions on the chat room faq to try and firm up "the vision", as it were.
 
@BrianH we've been using this chat room since October 2010 .. though we might have had a few periods of inactivity :)
 
2:15 AM
@BrianH Neat. There's always this feeling when you're writing something in Rebol that "hm, there must be a better trick for this". I think it encourages more paranoia in this regard than many more mundane languages. Talking out loud in StackOverflow Q&A is a way to develop this paranoia in expressive languages... I started feeling that way about C++11 because of using SO.
 
@rgchris I see you use cgi parameters .. wasn't your system REST based?
 
2:32 AM
REST-like.
But there's no conflict in this approach. I went with GET for URLs so they could be linked to. POST makes more sense for the form as it's more of a service.
Though I don't want to encourage it (lest it be abused :)
QM will try to parse different argument encodings:
src: "REBOL [] script [source {REBOL [Title: {Foo}]}]"
read/custom reb4.me/cc compose [post (src) [content-type: "text/x-rebol"]]
That's the equivalent of:
read/custom http://reb4.me/cc compose [post "script.source=REBOL+%5BTitle%3A+%7BFoo%7D%5D"]
 
2:58 AM
In theory JSON would also work, but I don't have it enabled (one line change).
src: {{"script":{"source":"REBOL [Title: {Foo}]"}}}
 
3:26 AM
11
Q: Chat redirecting to A51?

jcolebrandMay be a problem on my end, but chat.SE of all sites (SO, MSE, SE) is pushing me to Area51. Can anyone confirm? (hard to check in chat when you can't get in chat) Additional notes: While the hotlist still works fine inbox notifications seem to also be not working properly.

I got throw'd out for a few minutes there. Fixed pretty quickly, at least.
 
Back!
One other point of interest, the page is filled with metadata from the script headerā€”you can take the link from the URL version and post it in <social-media-of-choice-that-is-not-twitter> and it should pop up with the appropriate metadata.
 
what I miss is being able to link to your own posts ...
what exactly is the rationale for that?
 
3:41 AM
@rghris So I haven't really looked at QuarterMaster before, but now I am looking. :-) I always thought that Rebol dogma was that structured information wouldn't be flattened in strings if you had the chance to design from scratch...that you would "always" use stuff you could LOAD. What made you go the other direction with RSP?
 
3:55 AM
@HostileFork I've gone in the full Rebol approach before and there'd always be one more feature I end up wanting to add. So I thought I'd start with RSP and try to boil it down that way.
The first progression from standard RSP was smart tags. Mini-dialects used to build up dynamic tags.
There's a few other ideas specific to my implementation: local values, shortcuts to reuse code, 'prin and 'print doing what you'd expect.
And, of course, the idea of separation is that the View portion of MVC needs very little dynamic codeā€”that is all figured elsewhere.
 
As you think about the lexing/parsing a lot, do you think you've got a plan for how Rebol might be tweaked to do what you want without string parsing?
 
I don't knowā€”I like HTML [kept clean], I think it works (compared to XML) because of the consistency in terseness: <p><b><h1> whereas Rebol doesn't work well that way.
That's why I think it sucks that HTML5's new elements are verbose: <article><section>
 
I met one of the creators of YAML, and I didn't have any idea what it was. When I saw it in the context of its usage, I wondered why people who were using Node.JS and JavaScript for everything else would use it.
He said the JSON standard didn't allow comments in the exchange format (which I actually did not know to be the case at that time). Which does limit JSON's use for things like configuration fiels and such, and seems an oversight. But what do I know.
Anyway, but the rest of the argument seemed to persuade on not having to delimit strings but just type them. I don't personally have a problem with {strings} and I think it's unfortunate that an aversion to delimiting strings in a structured data format would create such rifts that people would design a whole thing to avoid doing that.
 
I don't know about that, Rebolā€”at least with functionsā€”points at the possibility of comments being baked into the language.
 
Well of course you can have data fields that are not read, but that's quite the kludge.
 
4:10 AM
Is it? In Rebol functions they're part of the structure.
 
I meant it would be a kludge in JSON
 
Ah, rightā€”well, a tradeoff of the very spartan design.
 
I was teaching a friend how to make a website and told her to go off and read some tutorials and start from a basic page. She went and found something suggesting that to put in a <!--[if IE] blah blah--> style comment in order to cause some kind of behavior.
 
Back to HTML though, I guess it's a visual thing. Tags are very prominent, syntax is not.
@HostileFork Hyup, that type of thing is just awful.
 
She said "Wait. I thought things in the <!-- --> were not read by the browser and I could write anything I wanted. If it's doing something different based on what's in that one, how do I know I might not write something in the comments that a browser decides to read and it messes up my page?"
I said "if this were a job interview, you're hired".
 
4:15 AM
Personally I don't use them if I can possibly avoid them. I don't use inline scripts/styles unless I somehow get forced toā€”some external tracker, or something.
I guess I still apply a discipline to web code that I feel is somehow consistent with Rebol.
Or, as tags are Rebol values, it's like interspersing Rebol values into plain text : )
 
Well I wonder if some of these things can be finessed. Like is there a really good reason why Rebol doesn't allow <p><b><h1> ? It allows [p][b][h1]. And if there were a really good reason why it wouldn't, then might it not apply to whatever you were designing as well?
It seems that some of these motivations were based on the "WARNING WARNING WARNING" if we supported that this code would fall apart because it depends on spaces being there.
 
It does support [<h1><p><b>]
 
Oh. Then what were you talking about, then? :-)
 
But then, you have to stringify all the bits in between: [<h1>"Title"</h1>]
[<h1>"A Title With, Commas!"</h1>]
 
Yes. But if you don't then you don't have the expressiveness of being able to put words there [<h1>site-name { : } page-title</h1>]
 
4:27 AM
That looks strange without spaces.
 
Point just seems like the least of the concerns to me, which is kind of what I told the YAML guy. Yet there are people who would see quotes and go "no way, that's more characters, they look unnecessary". So then we wind up back at parsing all over again and crufty formats.
 
I know where you're coming from, I don't have any affinity for the <% %> constructs.
And it does seem there could a middle ground between markup that is pure Rebol and HTML.
I think as long as HTML is the end goal (and it's fairly well entrenched), there's always going to be an awkwardness in representations within languages.
 
Well TAG! as it is seems weird to me every time I see it used in an abstract way. This struck me in the beginning, that people would not understand or find TAG! useful as just some weird string type. I wanted it to be structured like block! or paren! and not this weird thing.
 
@earl "because you have to correctly thread this through the whole interpreter core" - Yup, that's what I'm doing.
 
@HostileFork such as (for example): tag: <img src="something"/> tag/src ?
tag/name tag/alt: "This"
 
4:36 AM
@rgchris Right. But also... tag: <img src=[foo bar]/> tag/src letting you put Rebol structures in there if you wished
 
Hmm, reduce tag == <img src="whatever foo bar was" /> ?
 
Of course the practicalities of this are complex, but that was the first expectation I had when I saw it. I didn't understand what this ANY-STRING! idea was, why TAG! was one of them, etc. Extended Tag Proposal and the Talk Page for Extended Tag Proposal
 
And you still have to straddle the difference between a Rebol string and a markup-encoded one.
(cool, I didn't see that before making my suggestion)
 
@HostileFork That would require changing a tag to be like a block type. That doesn't really work with non-html and non-xml tags, like the current type supports, which would prevent us from generating code for page generation languages. The path stuff doesn't require changing the datatype, just runtime manipulation.
 
@BrianH offers arguments for why this would be complicated, and that there are other ways of skinning the cat for those who have "bought into Rebol" if you start seeing it like a Rebol person sees it.
More or less: it would be half baked enough to be complicated and weird and annoying to Rebol users, and wouldn't really make the people who wanted HTML in Rebol happy. So giving a simpler building block for the Rebol-aware solutions is better than trying to build such a thing.
 
4:42 AM
@HostileFork Yup. Mostly I was talking about tradeoffs.
The current tag type is more flexible than just HTML/XML-style tags. The question is whether this is better done with a datatype or with a set of functions and data model. The functions and data model is more flexible, because you can change it, while it is exceedingly difficult to make changes to a datatype. If you need something different you need the module full of addon functions anyway.
 
My relative convinced-ness is what leads me to say I think it's the price you pay to write things like [<h1>"Title"</h1>] and live with accepting that. There's all kinds of bats*#t crazy stuff in templating languages that people seem to just go "okay" to, despite the lack of any reasoning. Asking for one little compromise shouldn't be a problem...but they'll only accept it if they're seeing some benefit (and understanding it).
And through its spirit of "never making a single piece of software that is a clear superset of previous functionality", Rebol has been untranslatable. "I use FOO. You have made this REBOL BAR. You tell me it is better. But I want a mapping for each command F of FOO to each corresponding command B in BAR. Then show me some set of functionality Z that I did not have before."
 
We're doing stuff to make template languages easier to implement efficiently, such as this. You can do all sorts of interesting things with template languages - take a look at the Razor engine from MS. It doesn't have to be a datatype to be syntax :)
 
In the case of HTML, it's more-or-less beneficial to have it look as close to the resultant HTML, while making it clear which parts are dynamic. I suppose that's why an RSP approach is more common than [<h1>"Title"</h1>] that looks less like.
(up to edit)
 
They've always found half baked websites for the invention (because Rebol hated the web), redesign for the sake of redesign, a twelve step process to talk to anybody, a tendency to sit down and code before completing a spec or even taking enough time to completely study another popular project to make sure there was coverage for even its tutorial apps.
So.... this is what I propose change. :-)
 
Again, it doesn't have to be a datatype to be syntax. LOAD is just a function. You can write other functions.
 
5:02 AM
@BrianH Okay, transcoding is you've got an input binary of UTF-8 being consumed (though not actually removing any data from the binary), each time returning some Rebol value. You might call it once, you might call it iteratively from the end of where you last consumed it.
 
@HostileFork I'd also point out I've not settled for RSP, for the most part it's good enough for now (and comparable to, say, Rails) while a get on with the glue. I haven't given up on changing it at some point, my priority is more on getting the data models into the Rebol sphere.
 
Yup. It's used by LOAD, and can be used by other functions like LOAD but possibly with slightly different syntax for some parts.
 
(and also, QM will render alternatives to RSPā€”they're just not built-in)
 
@BrianH Okay the only reason I would know anything about this is that I was looking at the Red lexer, which is parse based. (And patched this bug that kept it from being possible to modify to work in R3.)
 
I'm more concerned with the usage model of the TRANSCODE function. It won't be a newbie function, so I need the power users to take a look at it and see which of the alternate API models will work. Because the current API model won't.
 
5:10 AM
Let us say that the parse definitions from Red, or similar for Rebol were in the mezzanine. Can you explain how the goals of transcode are different in terms other than performance?
@rgchris Well I wasn't trying to get on your case about it, you're making some good websites. Better than I am certainly. :-)
 
TRANSCODE is TO-BLOCK, but with more options to help you when you need to limit what you're parsing, or how you handle errors. When your parse has several different steps, TRANSCODE can be called with different options to handle the different parts of the process.
 
@BrianH Parse is able to have many different steps, jump around the series, run arbitrary code...again remember I'm trying to understand the goals in terms of something besides "parse would be inefficient for this purpose".
 
@HostileFork I appreciate the challenge to do better.
 
@rgchris Well it wasn't a challenge exactly, but there's this large web legacy. When you invent a thing and the words get around then "RSP" is considered "Rebol Server Pages". If it's mentioned enough people will go look it up and say "okay, this must be the thing..." then read it and go "wait, that's not the Rebol I was learning..."
 
@HostileFork TRANSCODE could be implemented using PARSE and a few of the value making functions. Its advantage is that it is specialized in parsing Rebol data dialect code. Being specialized for the task makes it a bit easier to use. You could use PARSE, but writing the rules for the language would be difficult and awkward, and the end result wouldn't necessarily be more useful. And don't mock efficiency, it can make a function useful in practice, when an inefficient function wouldn't be.
Plus (and I don't know yet whether this is the case here) you could allow a function like TRANSCODE to do things that you might not want to allow the Rebol code called by PARSE to make the resulting values to be able to do.
 
5:21 AM
Side note: That was the original intent : ) (I host that doc, I didn't write it)
 
@BrianH I forget if switching the input series out from under parse in Rebol 3 makes it unhappy...
@BrianH Not mocking efficiency, was praising C++11's emplacement abilities and rvalue references just the other day. :-) I'm just figuring out what we're discussing.
 
@HostileFork Yes and no. It used to be worse, but now it only gets unhappy if you backtrack to a position where the series under question was something else. There's a ticket about this.
@HostileFork Discussing this API revamp and this needed /part option which provides some context for why the API change is needed.
 
So why it can't just always modify its input and always return a single value? You can get the head back, or save your initial position?
Hm, is that possible, or are all positions passed only by value?
Looks like it.
Never consciously noticed that fact.
Well I am really only seeing this at a user level without understanding the low level requirements, and I keep wanting to rethink it as parse when it has a different goal by definition of existence. But what it makes me kind of want is whatever efficiency transcode has that parse does not have to be built into parse.
parse pos [set value any-type!] if you don't want to save the next position. parse pos [transcode block-of-values any-type!] if you want the value pushed onto the end of an existing block and don't want to save the next position. parse pos [transcode block-of-values any-type! new-pos:] if you want to save a new position and push it on the end of a block.
If it doesn't perform to satisfaction, find out why and you help all levels of the system.
 
5:45 AM
Is LOAD now based on TRANSCODE?
 
You have whatever startup cost parse has, but you're losing the refinements, the sets, and the complex interface. If parse has a startup cost that is unnaturally high, maybe find a way to defer it and look for just these specific patterns and optimize for them.
@BrianH (transcode would of course not be a good name for this if it were a word! recognized by the parse dialect, I was just making the point.)
 
@rgchris Yes, R3's LOAD is based on TRANSCODE. I wrote LOAD.
 
That's what I thought (both). So 'transcode is the arbiter of what a legal Rebol value should be.
 
@HostileFork "why it can't just modify its input" - because it might be trying to load from source that is in read-only data segments in the interpreter or an extension.
 
It would be possible for parse to short-cut a case for the first word matching set or transcode and the third matching any-type! and jump straight to whatever transcode does. I would imagine this could be dispatched faster than any sets/path/refinement decoding.
if it's of length four and the fourth is a set-word!, there you go. Shortcut.
I'd test the performance of that vs. existing transcode dispatch. If it's better, then that's a starting point. It's unlikely the ideal optimization, but I'll already guess faster.
 
5:59 AM
Also, TRANSCODE only takes a binary as input, not a block of values. We might be able to make a PARSE operation that loads a Rebol value when parsing a string or binary, or extend some of the block parsing datatype literal operations to strings or binaries. This might not be the best approach, or even necessary with the IF operation.
 
Well, there's one more branch out, only run this check in parse if it's a binary. :-)
Keeps from slowing down the other parses with the check! :-P
We could try it right now if you wanted.
And time it against transcode.
 
I wouldn't lightly suggest changing PARSE though. The code is really hairy. I'm just as wary of changing TRANSCODE, which is why I'm only talking about changing its API for now.
 
A splice at the entry that escapes out for this one test of input, and otherwise runs the existing part, does not scare me and does not require changing transcode.
 
If we were going to change PARSE for binaries, there are much better candidates for adding than Rebol syntax stuff. We already have a Rebol parser. What we don't have is bitfield stuff or some other kinds of destructuring generators.
 
The broader question is really one of documentation, and the classic question for any act of optimization where you create a high level of sensitivity where just that one case runs fast. A small change from someone unsuspecting expecting the speed of transcode...like they want to do two values and not one...may have a surprising performance impact.
But I think it's just there's a current need for this one kind of thing to run fast, when it's really just parse, which everyone would like to optimize. So the proposal is stopgap so one does not worry about exporting transcode to the world.
 
6:07 AM
One thing that my explorations of the evaluator have taught me is just how slow setting a word can be. Blocks can be much faster to create than words are to check before setting. It really seems like the intermediate block API might be faster.
 
Well I'm willing to take on the challenge (although I really should have been finishing the Red-on-R3 very, very alpha pull request)
I'll race you. :-) Transcode vs specialized Parse: how much speedup?
 
TRANSCODE is already exported to the world. LOAD is partly mezzanine - the parsing is done by TRANSCODE, the rest is done by mezz code. I'm talking about tweaking something which already exists and is in use.
 
But what if load used parse?
And parse were as fast as transcode for a fixed format of input?
That matched the entire capability set of transcode?
 
PARSE gets its flexibility at the cost of some speed. TRANSCODE is just a wrapper around hand-optimized native parsing code.
 
>> source parse
parse: make native! [[
    {Parses a string or block series according to grammar rules.}
    input [series!] "Input series to parse"
    rules [block! string! char! none!] {Rules to parse by (none = ",;")}
    /all {For simple rules (not blocks) parse all chars including whitespace}
    /case "Uses case-sensitive comparison"
]]
 
6:12 AM
But the rules aren't native.
 
Just one more 'transcode idea to throw in the mix: what if it had a block! outputā€”Ruby-like I guess, or like 'foreach:
transcode source [values end][source: :end parse values []]
 
@BrianH If you have access to the sources, which of these functions can return the value "8" faster if that's your only expectation of them?
 
Look at the source of sys/load-header to see how transcode is used.
 
Well why don't we just do a test case. I'm no expert here, only looked at the code a little, wrote just one native... I do not actually know the speed difference between a native that takes no parameters and returns 8, and a native that does nothing but takes the block [a] and returns 8.
 
If we replace PARSE with a parser generator that generates native code, it won't be as powerful but the resulting parsers would be a bit faster. They might not be as fast as TRANSCODE though because that function was hand-optimized after having been generated.
 
6:17 AM
I don't know how much a call to foo/a that returns only 8 would be vs a call to bar [b] that returns only 8 is. I do not know the cost of specifying or not specifying type checking in your parameters. Mostly I think in terms of compilers so to me many things seem like they should have zero runtime cost, or at least minimal in a well-written interpreter. But I'm sure there are complexities involved.
 
until [
    transcode/next source [value end][
        do-event value
        tail? source: end
    ]
]
 
@HostileFork If you want to make some natives to test, make some that return values like the API proposals. One wraps the two results in a block. One passes a word and then calls Set_Value on that word to the end value. One calls Set_Value but the word is passed as a parameter of an option.
 
My theory was that the cost of construction of your set blocks would be no worse than a dialect block passed as input to parse. That if anything, the lack of refinements in the dispatch would speed the call.
And if parse were special cased right at the entry point to have a short-circuit evaluation search for a dialect pattern of a certain style matching transcode's needs, it would do what transcode does. So my question here is if that is the case, why should transcode be exported as its own native?
Of course, I am only making the argument from intuition on a codebase I do not know well and did not write, implementing a language that can easily confuse me on any given day. :-)
@earl Note to self (where self is in this case... you :-P) Test suite could use performance regression test, gathering the perf curve for user functions w.r.t. number of refinements in the definition, number of refinements at callsite, perhaps a dummy build with the same test on natives.
It would just be nice to know these things, because otherwise we're only guessing how much faster or slower foo/baz/bar x would be (or could be made) than dialect foo [x baz bar].
 
Oh wait, I got your block thing. FOREACH has to make a bound deep copy of its code block. That would be too expensive, and there's no reason to pass a block anyways because the whole point is to generate values. However, passing the block of two words is interesting if you don't rebind them - it could act like SET, but without the intermediate block.
Still, SET block is even more expensive than Set_Value (it even calls Set_Value internally). Replicating its behavior wouldn't really save much over SET [value end] TRANSCODE source.
 
6:34 AM
I figured BIND would scupper that idea (I resisted the urge to say [transcode/next source :some-function] which I'd suppose would have similar overhead)ā€”but it does read a little easier (to my mind at least).
 
On the other hand, that reminds me that if you pass an intermediate block back you will almost always be passing it to SET block, so you're basically passing it to Set_Value anyway. Based on the code I've seen there's no real efficiency difference between passing an refinement-optional word param vs. a word-or-none param. How much micro-optimization do we need? Does it really come down to how the code looks?
BIND handles the word lookup for you, but Set_Value has to check whether the word is bound, to what, and which value slot to assign to. At least it doesn't have to do the word lookup.
 
An advantage to a function would be in-place type validation.
 
@BrianH If you're saying that the tests I'm describing can front run a copy being made in parse, and that's viable, then good. You know more than I on these things, so that's why I suggested testing.
@KamilTomÅ”ík we are discussing an issue which relates to the idea of a UTF-8 stream of data, a binary. Rebol supports a binary! type natively. If you just say... data: #{DECAFBAD} you have a binary value type.
It's nice because if you have a binary it can be treated like other things. So parse "aaabb" [3 "a" 2 "b"] can match and say true. parse #{AAAAAABBBB} [3 #{AA} 2 #{BB}] can return true.
 
There's no practical advantage to passing a code block to transcode, since the block won't be conditionally or repetitively executed and shouldn't be rebound. Even a function would need to be recreated at runtime to be useful.
It really does just generate values.
 
@KamilTomÅ”ík There's a lot of uniformity. But what we are discussing right now is the loader in the interpreter that is used which has the useful function of converting binary data such as that loaded from a UTF8 file on disk into Rebol values, and it can do this incrementally consuming the input one value at a time.
 
6:44 AM
Look at the code examples here - which of these looks the least awkward? Keep in mind that the values will sometimes need to be chained to other functions as parameters.
 
@BrianH Well now that it seems you grok my idea, what if a paren-less normal old block that had a certain pattern that matched the idea of what transcode is supposed to do was passed to parse, the check was run.
 
>> true? #{DECAFBAD}
== true
 
The moment you add a paren! or break from pattern it stops being as fast as transcode, for now. Maybe.
@BrianH Those are not, as we say on StackOverflow Short, Self Contained, Correct (Compilable/cInterpretable), Examples
You've got the calls but not the input. And you're talking about performance. Having been working with Red's lexer, what transcode does sounds PARSE-y and I think the PARSE-y look is better than any of those calls.
 
parse ".5E-1 word" [values! end]
parse ".5E-1 word" [value! "word"]
(binary, natch) Is that what you mean, Fork?
 
@HostileFork They are just there for aesthetic judgement, and the individual examples are almost one per line. Assume that we can change transcode easily, but can't change parse any time soon so for the short term parse is not an option.
 
6:50 AM
For it to become a performance discussion we have to find out if parse has an achilles heel I'm not seeing in terms of the interface as a native. I wouldn't be surprised if it did. But remember this all started because you specifically asked me for my opinion. Thanks on that, gives me a warm fuzzy feeling. :-) But doesn't change the fact that there's very little I know. (Well, about this issue anyway.)
@BrianH I changed parse to make it respect case-sensitivity in UTF-8 so I'd beg to disagree. This isn't about tinkering in the core of the algorithm, this is a surgical short-circuit.
I'd be willing to try and "race" against transcode, and get hard data on it.
And I'm not imagining more than about 10 lines of code to do this.
 
Respectfully, that was a simple change. The transcode/part option is similar in scope to the proposed parse limit operation, which even Carl had to give up on implementing for now, and which we would need to replace transcode.
 
@BrianH I'm saying this would be simple too, no insult taken.
Well, simple to TRY. I willfully admit I may be totally misunderstanding the ramifications and solving a wrong problem, but if so then my simple attempt will be simply cut down and that will be that.
If I can't replace all the mezzanine calls to transcode with equally (or nearly-equally, or faster) well formed parse calls, then I clearly am missing something about what you're asking.
Again, save me the trouble of trying if you can spot the failure in my logic: All it would be is recognition of stylized calls to parse which are specifically what transcode does now, and only what transcode does now. Recognize them and call the internal transcode function as the implementation of that so-called "parse". If not, run old parse.
Then chop transcode from the published API
Note that I was actually suggesting adding a new term to the parse dialect for this, not implementing parse/limit in a general sense.
Although if there's a good way of expressing this as a subset of what a proper parse dialect expression would be, then great... and then throw an error if it's not in the subset.
 
7:06 AM
oh sorry, havent been here :)
 
@BrianH P.S. Simple to change, hard to find the bug when you're reading someone else's codebase and don't know what the heck you're looking at. I found it with by noticing parse and find anomalies for certain values
@KamilTomÅ”Ć­k No problem. :-) I rewrote our chat FAQ a little today to emphasize that job #1 of this room is to (a) teach Rebol people to use StackOverflow and come out of their caves, and (b) have a more public engagement of StackOverflow users to explain why we're so obsessive.
 
Without the parse limit operation, there's no point in using parse for this at all. The whole point of this is to make a limited-length parse of Rebol source possible without requiring that length of the source to be copied first.
 
We have a lot to talk about among ourselves, but that's been the history of the Rebol project...locking up the conversation in inaccessible places, not using the web
@BrianH You have more experience than me and I only just saw transcode today, but is parse pos: [set foo any-type! next-pos:] effectively transcode/part?
@KamilTomÅ”Ć­k If you have ideas of how to make the chat FAQ better let me know. I understand that if you are in the "fringe" OS or language movement it's a complex thing to recruit, lots of projects and personalities and often too few people...so to me every person's opinion matters.
 
No, the parse would have to fail if it reaches the end of the limit before it finishes the any-type.
 
@BrianH Okay but then this is why introduced the weird verb for parse pos: [transcode foo-block any-type! next-pos:] I was saying I'm not sure quite what subset of the right answer transcode does right now, but if it's written then what harm is giving it to people using parse if it's useful to someone and you were going to put it in the API anyway?
 
7:15 AM
I just added a comment to the transcode API ticket. Based on my analysis of the evaluation code and the code that would be using transcode, it appears that the intermediate block versions would mostly be used with set [value end], which is much less efficient than set 'value, even less efficient than value:, and even less efficient than setting the 'end word internally in the function.
 
If you're telling me no better way to write and special case that exists than to make up a new parse word "transcode" then okay. I was hoping a pattern that is consistent with parse as defined, a subset, could be used and then optimized for to eliminate the need for transcode as a published native.
 
No, there are likely better ways to do this in parse, but something like the limit operation would be necessary for us to use parse for this at all. The limit operation basically makes parse act like the end of the series it is parsing is no further than where the limit specifies, and that parse should go no further. We don't want to have to copy/part source that is embedded in other data, such as would be needed in templating languages.
If the limit operation also took as a parameter a rule that the limit should apply to, that would let us have different limits for different rules.
It was in the parse proposals.
 
@BrianH Well if you were to go to crazy town, and imagine that dissatisfied parse users might find a use for what is now implemented in transcode...and that transcode users might like to look at what they're doing as a parse operation that is optimized under the hood...
If you gave into my madness what would it look like? I clearly left out details because I didn't fit the /part into the "shortcut recognition for this pattern" proposal.
No place for a limit. transcode vs translimit words? Refinements? Something mapping more closely to parse limit stuff I have no clue about (because I didn't spec it, I've not used it, and it's not implemented besides?)
 
It's not the word, it's the behavior.
 
I am black box testing here. So imagine me, a user of parse. I know parse/limit, whatever it does, has not been implemented. Transcode intrigues me for some reason to the point I might imagine calling it.
 
7:29 AM
We need that behavior. The word limit is just fine, but (for parse) the behavior is still under discussion. And we can't do without it in this case.
 
Well, again remember I am seeing this through the lens of Red's lexer and not being entirely clear what transcode's mission is besides performance. You introduced a new element by saying that /part in transcode is beyond performance...it invokes a feature unimplemented in parse.
In the subjunctive universe, how would I write a transcode/part in parse, if I believed it would work even if it didn't?
Does parse lack the expressive formalism for what it does, or is it just technically mired to where it has bigger concerns than transcode so it's stuck?
 
We shouldn't add an operation to parse when for one thing, it doesn't actually need to be implemented as an operation, and two, just for what transcode does when it would be more widely used than that. Anything added to parse needs discussion. For that matter, there may be changes to parse that would have the effect of changing currently erroneous operations into differently erroneous operations. Changing parse is something we need to do, but not now.
In the long run, there will likely be advantages to incorporating the transcode parser into parse, after some discussion of exactly what that entails. For now, we just need to fix transcode itself.
@HostileFork "Does parse lack the expressive formalism for what it does, or is it just technically mired to where it has bigger concerns than transcode so it's stuck?" - Yes, both. See the Parse Project for details about the expressive formalism we're still missing, and CureCode for the technical mire.
@HostileFork The easiest way to implement transcode/part in parse is to parse a copy/part of the source. However, the trick is to do it without any copy overhead. That I don't know how to do in parse.
For instance, assuming we had the no-operation version of parse integration, but no limit, how would you implement this without the copy? 123 = parse copy/part "12345" 3 [return integer!]
We can always call transcode in an if operation, but the no-copy limit part is tricky.
 
8:12 AM
With limit we could do this: 123 = parse "12345" [limit 3 return integer!]
 
@BrianH Sorry, called away. Back. Let me look.
 
Except the no-operation version of transcode integration would be expected to just recognize an integer, not translate to one. We'd need a load operation that operates similarly to the do operation. Like this: 123 = parse "12345" [limit 3 return load integer!]
 
@BrianH Well, in laymans terms why is this hard?
"Because it's written in C" :-P
 
Don't know. Carl said it was too hard to do, and he was the one who proposed it. Maybe you'll have more luck. We'd be better off waiting until we also had Gabriele's keep operation as well before we rewrote load to use it. In the meanwhile, direct transcode fixes are the best bet.
 
I'm really only blackboxing again: starting from a premise that transcode has functionality that works, and does something that is desirable to experts, therefore a user might think it's useful. Hook it to parse, make the cost of it being part of parse negligible everyone wins.
If it warps parse a little, no worse than a new odd native export.
If performance matches and some, even if not all parse users, think it interesting.
 
8:22 AM
I'm not concerned with that right now though. I'm trying to improve load and deal with real-world bugs and performance problems. Enhancing parse is further down the road, unless you want to have at it. I'm still trying to fix load and do.
 
If it can be perfectly matched to a partially implemented variant of a greater parse, same performance for the use cases, perfect.
Well to really understand your point of view I'd have to edit mezzanine code for some time.
As opposed to zero time.
But I can crunch and crash code big. Me smash bug. Me hulk! :-)
e.g. I know some things very well, but Rebol things, ain't gonna match the experts anytime soon. Doesn't make me useless.
 
Yeah. At least this conversation has led to an answer to #1916, option 4. Of the two that have the least overhead, it leads to the less dumb-looking code.
 
My idea here may not work and be misguided, but you did ask, and at least in the moment I have thought it might be worth looking into as to if transcode's interface was something people would only use over parse because of performance. Sounds like the idea is "not just performance, but parse couldn't do it, although it should".
My Red-inspired idea was just that maybe nixing the transcode native and putting the necessary subset of transcode phrased as equally-performant parse would be more ideal from an aesthetic point of view.
Protesting this idea sounds a bit shades of my protest against Doc to put off bootstrap for reasons of stability and formality, except with me on the opposite side of the fence. :-)
A taste of my own medicine perhaps!
Hello @Stopper ... please see our chat room FAQ. If you don't talk to us, we'll hold a grudge forever and ever. (Okay, just kidding....)
 
Even if we put the transcode functionality into parse, we may still want to have a separate function. We'd have to add a lot of missing stuff to parse and it may still not be efficient enough, or for that matter easy enough. Even if they call the same code internally, it may make sense to have two APIs.
Gotta go to sleep now, Diana is insisting :)
 
@BrianH Er, my, graphics tablet says something similar. Ok
All I ask is a bit of science here, if you want to argue interface argue interface, if performance performance.
 
8:37 AM
Well, I had to read most of the evaluator to determine which options would be more efficient. The choice between options 3 and 4 was just aesthetic. I don't want to have to do this 4 times and profile when I can get the same effect by reading the code.
 
@BrianH Read less, profile more. I check out rottentomatoes and the summaries on wikipedia and avoid bad movies. :-)
 
@HostileFork I needed to read the code anyways, just to trace down some really tricky errors. Performance tips are a bonus. I don't want to check out rottentomatoes to tell the difference between 4 films that I haven't even made yet, when I can just read the script and make one film :)
 
@BrianH Well I do thank you for joining the chat here, I know it's a different medium and we can (actually) break it out to channels. Just trying to have a new feel.
So I've encouraged us to not subchannel yet.
(You can actually be logged into several rooms, get notifications in the sidebar, etc.)
@rgchris said "This chat room has pep". must be Scottish. :-)
 
If you want to work on parse, start at the wiki first. It's best to work through the designs before adding things. Also, we have a lot of parse bugs in CureCode.
 
@BrianH Well, I have to finish the Red-on-R3 push, then I kind of informally promised Graham I'd try a WebOS Rebol.
 
8:45 AM
@GrahamChiu Since 2010? I'm a little shocked that so few CC tickets resulted :(
 
@BrianH The room was not active until the open source release, I "unfroze" it.
@BrianH I'm a "10K+" moderator which is a fancy way of saying "it blinks at you a lot to be a spam filter and do free work".
Similar capabilities unlock frozen chat rooms, basically if a discussion tails off and suddenly tries to start again a moderator has to approve it.
I have to make executive chat decisions like "No offense, but you sound like retarded." -- is that abusive or spam? Must I read the context?
In PHP rooms that you don't want to read anyway. :-(
@BrianH But over time using this chat, and using wiki-based Q&A, you get very frustrated without the ability. I would be very interested to hear (if you hang around a while) a position paper of what is done well here vs. AltME, and suggestions for improvement. I'm trying my ideas, but...
 
 
3 hours later…
KK.
12:04 PM
@HostileFork Hello. I tried talking to some people in another room with Tamil users. One of them tells me that he uses online resources in both English and Tamil .
@Ramji @kannan Hello
Welcome to Rebol room.
You can download Rebol from this page.
Just under 1 MB download/
 
@kk thanks
 
KK.
@HostileFork In India, this may not be the best thing in the beginning.
Also, read [this](http://chat.stackoverflow.com/transcript/message/7571183#7571183) comment by @Ramji: see it depends on everyone's view. some will be convinient in english,some may in tamil,malay,telugu etc., to understand.For eg:if u take china, they r learning their
own language and using.so they r confortable with tat. similarly we cant implement this in India,since it's a democracy with various people learning code in
various language which they are confortable.so it depends on their point of view.
@kannan have you downloaded it?
 
12:35 PM
@kk which one
 
KK.
@kannan Which OS you on?
Download according to your OS.
@kannan From this page.
@kannan @Ramji Are you at office? If you can come online in 2-3 hours, you can talk with others in this room.
 
KK.
12:50 PM
Hello @user2046860 If you ask or answer some questions on stackoverflow, you can get your reputation upto 20.
Then you can talk in this and other rooms.
 
 
2 hours later…
KK.
2:46 PM
Hello @rgchris
 
Good day, sir.
Not immediately helpful to you, but there is French of Core Rebol docs and resources in Chinese. Only to say that is has jumped languages.
 
KK.
@rgchris Good to know.
I was advised yesterday by @HostileFork to blog about Rebol in Hindi, but I did not think lots of people here in India would like to access online resources in Hindi.
@rgchris Did you read the above conversation I had with two people and a new user?
Do you think I did something to drive them away? Or anything you think was not quite right?
 
No, not particularly.
 
00:00 - 15:0015:00 - 00:00

« first day (829 days earlier)      last day (2951 days later) »