You need to reduce the words quarto_hash and quarto_url if not old [append checksums reduce [quarto_hash quarto_url ]] There is also no need to extract the words of the map, you should be faster with a select direct on the map I would use if not select checksums quarto_hash [...
The problem is arising because the anonymous function that is being created by the parse-layout function should be a closure, and it isn't. See the diff at https://gist.github.com/earl/a009454787d9fe4cfaca which fixes the problem.
As you want the conversion on the fly, you can either modify R3-GUI before loading. So load r3-gui.r3 down to your local directory. Then you add the line if key == #"w" [key: #"z"] to the function do-text-key, so it looks like do-text-key: funct [ "Process text face keyboard events."...
This syntactic structure is called "construction syntax" (also see CureCode issue #1955). Its raison d'être is to allow literal forms for values which could not otherwise be directly represented. There are two main classes of situations that require construction syntax. Values which (except for construction syntax) have no separate lexical...
I don't know how you defined column and a because when I try it from console, it works: >> column: [Person 2 Date 3 Quantity 4 Size 5 ProductType 6 LineItem 7 Deliver 8 FillStatus 9 Note 10 Time 11] == [Person 2 Date 3 Quantity 4 Size 5 ProductType...
Rebol keeps newlines as they are. But after reading with read/lines you just get a block of items without the newlines. If you want a block of items written as lines separated by newlines, you should write them again with the refinement write/lines and Rebol adds the newlines again. myArray:...
Given the workings of "definitional scoping"...your routine defined as does [print self/key] did binding into the enclosing context. That context could be a module or some context we can't see here. But let's introduce a manual context just to show what I mean: context [ key: "OUTER CONTEXT KEY" email-service!:...
Why not dialect? [h1 10x30 "Hello World!" font arial] Internally I would store it as an object!, because it provides you with an easier manipulation....
Regrettably, as far as I know there isn't. I've had this problem myself in the past. The only way to do it, is as you said. Of course, that's fairly trivial since you can simply do: source request, copy it and make your changes. Request and the other modals are...
save is a mezzanine function, that is basically write mold. So it's possible to mimic the save function using write or it's possible to update save function to support /append refinement.
The cause of the behavior you are seeing is specifically this line of code for the Rebol native DO. /*********************************************************************** ** */ REBNATIVE(do) /* ***********************************************************************/ { REBVAL *value = D_ARG(1); switch (VAL_TYPE(value)) { /* ... */ case REB_NATIVE: case REB_ACTION: case REB_COMMAND: case REB_REBCODE: case REB_OP: case REB_CLOSURE: case REB_FUNCTION:...
The truth value produced by break depends on whether the minimum number of iterations in an iterative rule have been reached or not. >> parse "aaabbb" [ some [ "a" break ] to end] == true Here we have matched "a" at least once, and then broken out of the...
Often suggested, as of today not implemented available only as an experimental patch by Giulio. Any useful custom datatype proposals usually come along with the desire to hook them in so they could effectively "overload" things like + or append. There is an internal layer of abstraction called an ACTION!...
You have always to read the file before you can search in the content of the file. Maybe you are looking for something like clines: read/lines %myfile found: false foreach line clines [ if any [ found found: find line "start" ] [ print line ] ] an other way...
When Rebol creates an object, it collects the (set-)words from the spec first and uses them to create the new object. The words of the new object are initially assigned to none. The spec is then bound to the new object and evaluated. In your first example, you haven't included...
SAVE uses an imperfect but more readable format. Use SAVE/ALL to preserve all values exactly as they should be (SAVE/ALL uses so call serialization format in form of #[datatype! value]). Also, just use LOAD and not DO LOAD to get the data back. DO is not required in this case...
Seemingly the new-line state is assigned to the word based on whether the assigned value has a preceding new-line at the time of assignment (I'll ruminate on the correctness of that statement for a while). This function reassigns the same value (should retain context) to the word with a new...
The correct trigger to use is the 'enter trigger when [enter] on-action [focus f] ...
A LIT-WORD! if seen in a "live" context by the evaluator resolves to the word itself. It can be used to suppress evaluation simply with a single token when you want to pass a WORD! value to a function. (Of course, in your own dialects when you are playing the...
I much favour (where possible) building up a set of grammar rules with positive terms to match target input—I find it's more literate, precise, flexible and easier to debug. In your snippet above, we can identify five core components: space: use [space][ space: charset "^-^/ " [some space] ] word:...
In Rebol 2 you can use write-io for unadulterated writing to ports like STDOUT. So your example would look like this: Rebol [] for i 0 255 1 [ write-io system/ports/output to-string to char! i 1 ] Rebol 3 doesn't have write-io and instead uses write so in theory your...
You have discovered that by the nature of the system, when the interpreter comes across a WORD! symbol type which has been bound to a function, it will invoke the function by default. The default interpreter seeing a GET-WORD! symbol type, on the other hand, suppresses invocation and just returns...
You'll need to break the loop when it hits sysex-end one way or another. You either match sysex-end each time around the loop and break when it hits, or you only match against everything which is not a sysex-end. The first option obviously brings sysex-end into the subrule, but it...
You can see from the source https://github.com/rebol/rebol/blob/master/src/mezz/prot-http.r#L424 that the read actor does not have any refinements defined. This doesn't mean they can't be defined but at present no decision has been made on whether it should be done by using refinements, or by using a query dialect. You can see...
As is already pointed out the problem is that a is reused, not b! the layout function uses a field called init for handling things like this. As I understand it init is first bound to the face and then called with do after the face itself is instantiated (at...
OK, there doesn't seem to be an easy way to do it. So I just added two codecs UTF-16LE/BE for this purpose. See this commit: https://github.com/zsx/r3/commit/630945070eaa4ae4310f53d9dbf34c30db712a21 With this change, you can do: >> b: encode 'utf-16le "hello" == #{680065006C006C006F00} >> s: decode 'utf-16le b == "hello" >> b: encode 'utf-16be...
The /part pair! refinement works with images. The pair relates to the x/y coordinates as in >> img: load %image.png == make image! [519x391 #{ 1D2F9F1D2F9F1C2E9E1C2E9E1B2D9D1B2D9D1B2D9D1B2D9D1D2F9F1C2E9E 1A2C9C192B9B192B9B1A2C9C1B2D9D1C2E9E1D2EA01... >> copy/part img 2x2 == make image! [2x2 #{ 1D2F9F1D2F9F1D2F9F1D2F9F }] REBOL/View Image Datatype And here an example how /part series! is working...
The construct you would be looking for would be CASE. It takes a series of conditions and code blocks to evaluate, evaluating the blocks only if the condition is true and stopping after the first true condition is met. theVar: 60 case [ theVar > 60 [ print "Greater than...
I am used to use help on objects as in >> help system SYSTEM is an object of value: version tuple! 2.7.8.3.1 build date! 1-Jan-2011/16:39:07-8:00 product word! View core tuple! 2.7.8 components block! length: 60 words object! [unset! error! datatype! context! native! action! ... license string! {REBOL End User License...