AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 134 |
r3wp | 1094 |
total: | 1228 |
results window for this page: [start: 301 end: 400]
world-name: r3wp
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
Volker: 14-Jan-2006 | surprising unique/skip - kind of make-object for blocks. usefull in this cases: !>>templ: ["a" 1] == ["a" 1] !>>union/skip ["a" 2 "b" 2] templ 2 == ["a" 2 "b" 2] !>>union/skip ["b" 2] templ 2 == ["b" 2 "a" 1] | |
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
Geomol: 30-Jun-2006 | Example: Let's say, our date is 6 digits YYMMDD. >> date: "230812" We deside, it's the year 2023: >> insert date "20" Now dashes are inserted to form a date understandable by REBOL: >> insert skip date 6 "-" >> insert skip date 4 "-" Date now looks like this: >> date == "2023-08-12" And we can control, it's a valid date with: >> to-date date == 12-Aug-2023 If it's not a valid date, like if the original had other characters than digits, we'll get an error. Errors can be caught with: >> error? try [to-date "foobar"] == true Hope it helps. | |
Maxim: 14-Jun-2007 | note the /skip refinement is indexed starting at 0 (meaning don't skip any items, new-line everyone of them) | |
Gregg: 21-Jul-2007 | delimit: func [ "Insert a delimiter between series values." series [series!] "Series to delimit. Will be modified." value "The delimiter to insert between items." /skip ;<-- be sure to use system/words/skip in this func size [integer!] "The number of items between delimiters. Default is 1." ][ ; By default, delimiters go between each item. ; MAX catches zero and negative sizes. size: max 1 any [size 1] ; If we aren't going to insert any delimiters, just return the series. ; This check means FORSKIP should always give us a series result, ; rather than NONE, so we can safely inline HEAD with it. if size + 1 > length? series [return series] ; We don't want a delimiter at the beginning. series: system/words/skip series size ; Use size+n because we're inserting a delimiter on each pass, ; and need to skip over that as well. If we're inserting a ; series into a string, we have to skip the length of that ; series. i.e. the delimiter value is more than a single item ; we need to skip. size: size + any [ all [list? series 0] ; lists behave differently; no need to skip dlm. all [any-string? series series? value length? value] all [any-string? series length? form value] 1 ] head forskip series size [insert/only series value] ] | |
btiffin: 1-Aug-2007 | I'm not completely clued in, but I think get-words can be faster as well, as the lexical scanner can skip the evaluation, In your case; evaluating a filename, returns a filename, (and I only assume) is an extra (nearly empty?)step than just getting the filename. | |
btiffin: 17-Nov-2007 | Paul; For one you can skip the intermediate file. Try >> res: make string! 80 call/output "ipconfig" res it'll place the stdout results right in the string res. | |
Henrik: 13-Jan-2008 | SteveT, using faces directly with MAKE is a lower level approach than LAYOUT. What LAYOUT does, is produce a face object that consists of many subfaces from your layout description written in the VID dialect. Each one of these face objects have settings for size, offset, appearance, text content, etc, which are set as the layout description is parsed. Using MAKE FACE directly provides greater control, but is more cumbersome to use, because you have to set all these values manually and arrange the face tree manually. You can see the content of the base FACE object in the console with: >> ? face The FACE object is the only object ever used, so it's a good idea to get to know it. You can extend it with more values and VID does this, to create variants, modes and extra operations on a face, like SET-FACE, GET-FACE, etc. The reason why many choose to skip VID for this, is that VID doesn't provide the level of control needed as some things can't be determined properly at layout time, such as interdependency of sizes or offsets between faces, which is why VID doesn't support easy resizing out of the box. Oh and when you get to try VID3 in REBOL3, forget everything I said, because it's a whole different system. :-) | |
BrianH: 17-Jan-2008 | If you want to do keyword-based records, put the keywords and values in the same block and use select/skip data key 2 Put each record in its own block: with variable length records you will need to track the end of the record otherwise. This method will be slower, but take less space when at least half of the fields are usually missing. | |
Oldes: 4-Mar-2008 | formDecimal: func[ number [decimal!] digits [integer!] /local negative? p result ][ if digits <= 0 [return form to-integer 0.5 + number] if negative?: number < 0 [number: - number] p: power 10 digits result: form to-integer number * p + 0.5 if number < 1 [ insert/dup result "0" (1 + digits - length? result) ] if negative? [ insert result "-" ] head insert skip tail result negate digits #"." ] >> formDecimal 4E-2 4 == "0.0400" | |
Janko: 8-Jan-2009 | I have another question about parse, if I may.. I am trying to make a parse block that will uppercase all letters after the . ! or ? . I did it just for dots, but I can't make it for all 3 ( one alternative is to call parse 3 times each time with different separator char. The problem can be observed here, and happens because [ A | B | C ] pattern first looks for A and if it doesn't find a checks B , which means it will skip B if A is after B. Is there any way to say "use any of those chars - *whichever comes first" ? .. example where you can see the problem: | |
Janko: 8-Jan-2009 | It works if I have just one kind of separator of if I have them in this order for example "a.b.c.d!e?" if I have ""a.b.c.d!e?f. " it will skip the ! ? and produce "a. B. C. D!e?f. " | |
Janko: 8-Jan-2009 | because it will skip over ! and ? to the last "." | |
Steeve: 8-Jan-2009 | hmm... do this parse source [any [["!" | "?" | "."] mark: (do something) | skip ]] | |
PeterWood: 13-Apr-2009 | >> extract: copy [] == [] >> parse lines [any [["wanted" copy temp to "rubbish" (append extract temp)] | skip ]] == true >> extract == [" line1 contentA " " line three content B "] | |
PeterWood: 14-Apr-2009 | Mike: A small change will include wanted: >> extract: copy [] == [] >> parse lines [any [[copy temp ["wanted" to "rubbish"] (append extract temp)] | skip ]] == true >> extract == ["wanted line1 contentA " "wanted line three content B "] | |
PeterWood: 14-Apr-2009 | You can also insert Rebol code at the start of the parse rules to perform intialisaton parse lines [(extract: copy []) any [[copy temp ["wanted" to "rubbish"] (insert tail extract temp)] | skip ]] | |
sqlab: 14-Apr-2009 | better rule: [(wanted: copy [] ) any [to "wanted" copy line to "rubbish" (append wanted line) skip ] to end] | |
Pekr: 14-Apr-2009 | I am far from parse guru, but above rule (while works) looks weird :-) Why to produce interface rule that way? The line is ending with line terminator anyway, no? parse/all lines [ any [ [ "interface" copy int-name to newline (print int-name) newline | skip ] ] ] | |
Pekr: 14-Apr-2009 | Slightly different version: wanted: copy [] spacer: charset " ^/" name-char: complement spacer interface: [ "interface " copy int-name some name-char (append wanted int-name) spacer ] parse/all lines [any [interface | skip]] print mold wanted | |
Pekr: 14-Apr-2009 | spacer: charset " ^/" name-char: complement spacer interface: [ "interface " copy int-text some name-char (print ["interface: " int-text]) (append wanted int-text) thru newline ] description: [ "description " copy desc-text to newline (print ["description: " desc-text]) newline ] ip-address: [ ["ip address " copy add-text to newline (print ["ip address: " add-text]) newline | "no ip address" newline (print ["ip address:" "no adress"]) ] ] int-section: [interface any [description | ip-address | "!" break | skip]] parse/all lines [any [int-section | skip]] | |
mhinson: 15-Apr-2009 | Hi, I have broken this down to try & understand it, but my understanding is still very vague, paticularly in respect of the order of things like the copy statement & also the number of brackets needed is confusing me. lines: {junk Interface fa0 ! interface fa1} spacer: charset " ^/" name-char: complement spacer parse/all lines [ any [ [ [ "interface " copy int-text some name-char (print ["interface: " int-text]) thru newline ] any ["!" break | skip] ] | skip ] ] I need to find some way to make it only get the "interface " if it starts at the first position on the line. I thought I needed to remove the word "any" to do this, but that did not work. | |
PeterWood: 15-Apr-2009 | It is quite easy to find something that starts in the first postion of a line by matching against newline+the something. I'm too lazy to remember the newline character so I tend to write something like this: >> interface: join newline "interface " == "^/interface " >> spacer: charset to string! newline == make bitset! #{ 0004000000000000000000000000000000000000000000000000000000000000 } >> name-char: complement space r == make bitset! #{ FFFBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF } >> parse/all lines [any [interface copy int-text some name-char (print ["interface: " int-text]) | skip]] interface: fa1 == true | |
PeterWood: 15-Apr-2009 | In case this isn't clear. I'll try to explain the parse rule. First any effectively says to match any of the rules in the following block until the end of the string is reached. The first rule in the block is [interface copy int-text some name-char (print ["interface: " int-text)] says match with the word interface (newline + "interface ") then if there is a match, copy some name-char which says copy one or more characters which match the criteria of a name-char then if there are some name-char characters evaluate the rebol code in parentheses. If there wasn't a match with that first rule, then the second rule that follows the | will be applied. skip will pass over one character and always provides a match. | |
PeterWood: 16-Apr-2009 | Mike - The method that I showed you does not use up the "newline" at the end of the line. If you check again, the parse rule simply says copy in-text some name-char. This "stops" before the newline at the end of the line. In fact guessing at your requirements a little and assuming the name-char is available. Some thing along these lines should be close to what you want: keywords: ["^/interface " | "^/another keyword " | "^/yet another kerword"] parse/all lines [any [ copy int-keyword [keywords copy int-text some name-char ( print int-keyword ": " int-text] ) | skip ] ] {I obviously haven't tested this code.) | |
mhinson: 16-Apr-2009 | The mist maybe slowly clearing (sorry to be so slow to catch on). The 2 stage process may be the answer, perhaps I can add a key char at the first line position when I read the file, then use this as the line start reference, but continue to use the end of line as normal. I think I understand Peter's example & have tweaked it a bit to make it work for me. lines: {~junk Interface fa0 ~! ~interface fa1 ~interface fa2 point-to-point ~! ~interface Fa3 ~ description test three ~ ip address 1.1.3.3 255.255.255.0 ~! ~interface Fa4 ~ ip address 1.1.4.4 255.255.255.0 ~! ~interface Fa3 ~ description test four etc ~} spacer: charset "^/" name-char: complement spacer stopwords: "point-to-point" keywords: ["~interface " | "~ description " | "~ ip address"] parse/all lines [any [ copy int-keyword keywords copy int-text [to stopwords | some name-char] ( print [int-keyword ": " int-text] ) | skip ] ] | |
Group: Make-doc ... moving forward [web-public] | ||
MikeL: 16-Nov-2005 | For makedoc2.r input log 488 on Rambo which has morphed to Reviewed log 3955, this change deck provides =url support for anyone who wants it. The line changes are all inserts and the line number is the download version from the script library as of a few minutes ago -ins 136 | "url" url -ins 169 url: [ some space copy text thru newline ( emit url parse/all text " " ) ] -ins 311 url [emit-url doc/2] -ins 512 emit-url: func [spec] [ emit [reduce {<a href="} spec/1 {">} skip spec 1 </a><p>] ] | |
Group: Parse ... Discussion of PARSE dialect [web-public] | ||
Anton: 3-Oct-2006 | What's the parse rule to go backwards ? -1 skip ? | |
Anton: 4-Oct-2006 | string: "<good tag><bad tag><other tag><good tag>" entity: "<ENTITY>" parse/all string [ any [ to "<" start: skip to ">" end: skip (if not find copy/part start end "good tag" [ change/part start entity 1 ; fix up END (for when your entity is other than a 1-character long string) end: skip end (length? entity) - 1 change/part end entity 1 ; fix up END again end: skip end (length? entity) - 1 ]) :end skip ] to end ] string ;== {<good tag><ENTITY>bad tag<ENTITY><ENTITY>other tag<ENTITY><good tag>} | |
Anton: 4-Oct-2006 | string: "<good tag><bad tag> 3 > 5 <other tag><good tag with something inside>" string: " > >> < <<good tag><bad tag> 3 > 5 <other tag><good tag etc> >> > " ; (1) search for end tags >, they are erroneous so replace them ; (2) search for start tags <, if there is more than one, replace all except the last one ; (3) search for end tag >, check tag body and replace if necessary entity: "&entity;" ntag: complement charset "<>" ; non tag parse/all result: copy string [ any [ ; (1) any [ any ntag start: ">" end: ( change/part start entity 1 end: skip start length? entity ;print [1 index? start] ) :end ] ; (2) (start: none stop?: none) any [ any ntag start: "<" end: ;(print [2 mold start]) any ntag "<" ( ;print "found a second start tag" change/part start entity 1 end: skip start length? entity ;(print [2.1 mold copy/part start end]) start: none ) :end ] (if none? start [stop?: 'break]) stop? ; ok, we found at least one start tag ;(print ["OK we found at least one start tag" mold start]) :start skip ; (3) any ntag end: ">" ;(print [3 mold copy/part start end]) (if not find copy/part start end "good tag" [ ;print ["found a bad tag" mold copy/part start end] change/part start entity 1 ; fix up END (for when your entity is other than a 1-character long string) end: skip end (length? entity) - 1 change/part end entity 1 ; fix up END again end: skip end (length? entity) - 1 ]) :end skip ] to end ] result | |
Ladislav: 4-Oct-2006 | result: "" parse/all string [ any [ ; starting good tag copy s ["<good tag" thru ">"] (append result s) | ; ending good tag "</good tag>" (append result "</good tag>") | ; entity replacement "<" (append result "<") | ">" (append result ">") | copy s skip (append result s) ] ] print result | |
Coccinelle: 27-Oct-2006 | rule: ["CBA" | skip rule] parse "ABCZXYXYCBA" ["ABC" rule] | |
Gabriele: 25-Dec-2006 | >> rules: [ [ any [ [ end break [ | [ copy value [to newline | to end] (print value) opt skip [ ] [ ] == [ any [ end break | copy value [to newline | to end] (print value) opt skip ] ] >> parse s2 rules str 1 str 2 str 3 == true | |
Joe: 25-Dec-2006 | yes, thanks gabriele - happy holidays ! i find the opt skip not very intuitive ! | |
Joe: 25-Dec-2006 | wouldn't to newline thru newline be easier to understand than opt skip | |
Gabriele: 26-Dec-2006 | joe, if you don't care about parse returning true you can just use skip (without opt, which is there for the end case) | |
Gabriele: 26-Dec-2006 | copy value to newline skip | |
Ladislav: 27-Dec-2006 | Joe: another option is to use: rules: [ any [ copy value [to newline | to end] (print value) skip ] to end ] | |
Ladislav: 27-Dec-2006 | but, as Gabriele said, that is equivalent to: rules: [ any [ copy value [to newline | to end] (print value) skip ] ] if you ignore the parse result | |
BrianH: 27-Dec-2006 | to end skip will always fail. move the skip after the to newline. | |
Ladislav: 29-Dec-2006 | lad, maybe, but if you change the name of the variable to copy to you have then to change it twice in the rule. - right. That is a general problem of procedural programming style. OTOH, the "opt skip" variant has got another problem - the "opt skip" code is related only to the first alternative, which seems to me like the reason why Joe doesn't like it | |
Oldes: 19-Jan-2007 | Isn't this a bug? >> b: "1234^@567" parse/all b [copy i to {^@} 1 skip b: to end] probe i probe b 1234 567 BUT: >> b: "1234^@567" parse/all b [copy i to #{00} 1 skip b: to end] probe i probe b 1234 1234^@567 | |
Volker: 19-Jan-2007 | >> b: "1234^@567" parse/all b [copy i to "^(0)" 1 skip b: to end] == true >> i == "1234" | |
Oldes: 9-Apr-2007 | >> firsttime?: true parse [1 2 3 4 5][any [set v integer! p: (prin v if all [firsttime? v = 4][p: skip p -2 firsttime?: false]) :p]] 1234345== true | |
Oldes: 9-Apr-2007 | >> parse [1 2 3 4 5] [any [p: (probe p) skip]] [1 2 3 4 5] [2 3 4 5] [3 4 5] [4 5] [5] [] | |
Anton: 10-Apr-2007 | firsttime?: true parse [1 2 3 4 5][ any [ set v integer! p: ; <-- set P to the current parse position. ; (This is the input series with the series index at the current position.) ( ; Here inside the paren is normal rebol code prin v if all [firsttime? v = 4][ p: skip p -2 ; <-- move the index of the series referred to by P firsttime?: false ] ) :p ; <-- set the current parse position to P ] ] | |
Maxim: 13-Apr-2007 | symbol: charset [#"a" - #"z" #"A" - #"Z" #"0" #"9" "_-?!*+~"] nstr: "...aa.....a.....a.....h." parse/all nstr [ some [ symbol | end skip | [ here: ( probe here either none? here/1 [print nstr print "!!" ][print here/1 print nstr remove here here: back here]) ; :here skip ] ;:here ] ] probe nstr | |
Maxim: 13-Apr-2007 | and nothing works... if I set here to be the previous letter and then use skip in the rules... the first dot from nstr will not get removed... since we cannot go past the begining. | |
Ladislav: 13-Apr-2007 | Max: ...symbol | end skip | ... does not have much sense, since it is equivalent to just ...symbol | ... | |
Ladislav: 13-Apr-2007 | rule: [(next-rule: unless result-of-expression [[end skip]]) next-rule] | |
Ladislav: 13-Apr-2007 | see this: >> rule: [(next-rule: unless result-of-expression [[end skip]]) next-rule] == [(next-rule: unless result-of-expression [[end skip]]) next-rule] >> result-of-expression: false == false >> parse "" rule == false >> result-of-expression: true == true >> parse "" rule == true | |
Rebolek: 24-May-2007 | OK I need to find some other way :) Is it possible to go back in parse? -1 skip doesn't seem to work. | |
Geomol: 24-May-2007 | I was thinking the same. I seem to remember, that at some time (some version of REBOL), -1 skip did work!? Hmm... | |
Geomol: 24-May-2007 | A clumsy way of doing it: >> parse "aaa" [some "a" p: (p: skip p -1) :p "a"] == true | |
Rebolek: 24-May-2007 | Even better. Thanks Anton. Seems that "-1 skip" should not be that hard to implement | |
BrianH: 26-May-2007 | ; Version with support for decreasing ranges regset: func [expression /local out negate? b e x] [ negate?: false out: make bitset! [] parse/all expression [ opt ["~" (negate?: true)] some [ "-" (insert out #"-") | b: skip "-" e: skip ( b: first b e: first e loop 1 + ( either b > e [b - x: e] [e - x: b] ) [ insert out x x: 1 + x ] ) | x: skip (insert out first x) ] ] if negate? [out: complement out] out ] ; Version without support for decreasing ranges regset: func [expression /local out negate? b e x] [ negate?: false out: make bitset! [] parse/all expression [ opt ["~" (negate?: true)] some [ "-" (insert out #"-") | b: skip "-" e: skip ( b: first b e: first e either b > e [ insert insert insert out b #"-" e ] [ loop 1 + e - b [ insert out b b: 1 + b ] ] ) | x: skip (insert out first x) ] ] if negate? [out: complement out] out ] | |
BrianH: 26-May-2007 | Most of the changes were made to make it faster and to use less memory overhead. - It is faster for parse to match a one-character string than a character value. - Insert is faster than union, and makes no temporaries. - If you are capturing a single character, I think [a: skip (a: first a)] is faster than [copy a skip (a: first a)]. - Path access is slower than the equivalent native, so [first a] instead of [a/1]. - The fastest loop is loop, even with the math to calculate the number of times. | |
BrianH: 26-May-2007 | ; Version with support for decreasing ranges regset: func [expression /local out negate? b e x] [ negate?: false out: make bitset! [] parse/all expression [ opt ["~" (negate?: true)] some [ "-" (insert out #"-") | b: skip "-" e: skip ( b: first b e: first e either b > e [ insert out e repeat x b - e [insert out e + x] ] [ insert out b repeat x e - b [insert out b + x] ] ) | x: skip (insert out first x) ] ] if negate? [out: complement out] out ] ; Version without support for decreasing ranges regset: func [expression /local out negate? b e x] [ negate?: false out: make bitset! [] parse/all expression [ opt ["~" (negate?: true)] some [ "-" (insert out #"-") | b: skip "-" e: skip ( b: first b e: first e either b > e [ insert insert insert out b #"-" e ] [ insert out b repeat x e - b [insert out b + x] ] ) | x: skip (insert out first x) ] ] if negate? [out: complement out] out ] | |
BrianH: 7-Jun-2007 | ; Try against this, the forskip code with the skip part taken out forall: func [ "Evaluates a block for every value in a series." [catch throw] 'word [word!] {Word set to each position in series and changed as a result} body [block!] "Block to evaluate each time" /local orig result ][ if not any [ series? get word port? get word ] [throw make error! {forall expected word argument to refer to a series or port!}] orig: get word while [any [not tail? get word (set word orig false)]] [ set/any 'result do body set word next get word get/any 'result ] ] | |
BrianH: 7-Jun-2007 | If you want to test the speed of parse, replace the any-type! with a skip - the forall you are comparing it to doesn't do that test. | |
Rebolek: 8-Jun-2007 | I tried to enclose parse in loop 1 [] and it seems to handle break. I guess you'll probably prove me wrong, Brian :) parall: func [ 'word body /loc data ][ loop 1 [ data: get :word parse data compose/deep [ some [(to set-word! word) skip (to paren! [do body])] ] ] ] re: continue - this is not r3 ;) >> n: [1 2 3 4 5] parall n [if n/1 = 4 [break/return "break"] if n/1 > 4 [print "bad"]] == "break" | |
Ladislav: 28-Jun-2007 | this is possible, but my guess, that Steeve would call it ugly too: >> once-only: func [rule] [use [rule'] copy/deep [rule': :rule [rule' (rule': [end skip])]] ] >> rule: [(a': once-only a b': once-only b c': once-only c) 3 [a' | b' | c']] == [(a': once-only a b': once-only b c': once-only c) 3 [a' | b' | c']] | |
Geomol: 28-Jun-2007 | Ladislav, that's not ugly, it's beautiful! :-) I have a question though. Do you need the skip at the end of once-only? Wouldn't it work just with rule': [end] | |
Ladislav: 28-Jun-2007 | John: [end skip] is a rule that surely fails, while [end] may succeed (at end) | |
Geomol: 28-Jun-2007 | I see. That's also why my block parsing give false result with less input. So for block-parsing, it should be: >> once-only: func [:rule] [use [rule'] copy/deep [rule': :rule [rule' (rule': [end skip])]]] | |
Geomol: 28-Jun-2007 | >> once-only: func [rule] [use [rule'] copy/deep [rule': :rule [rule' (rule': [end skip])]]] >> rule: [(a': once-only 'a b': once-only 'b c': once-only 'c) 3 [a' | b' | c']] >> parse [a b c] rule ** Script Error: Invalid argument: a | |
Steeve: 28-Jun-2007 | Once (again) Rebol is amazing, i think i found a simple and elegant dialect Currently, it's not allowing recursive once usage, but it's obvious to do with a stack. take: func [r] [n: 0 once/1: (length? r) + 1 / 3 once/2/2: r replace/all r '.. '.] .: [(n: n + 1)] ..: [(n: n + 1) end skip] once: [0 [(if n > 0 [poke once/2/2 n - 1 * 3 + 1 '..] n: 0) []]] rule: [. "a" | . "b" | . "c"] parse "CBA" [ (take rule) once] == true parse "BAC" [ (take rule) once] == true parse "CBA" [ (take rule) once] == true parse "BBC" [ (take rule) once] == true parse "CA" [ (take rule) once] == false parse "CABA"[ (take rule) once] == false rule2: [. "a" | . "a" | . "b" | . "c"] parse "CABA"[ (take rule2) once] == true | |
Tomc: 29-Jun-2007 | do rules: [ set 'a "first rule " set 'b "second rule " set 'c "third rule " ] rule: [ [end (if empty? erode[here: back tail :here]) :here skip]| [here: erode there: ( all[ token: copy/part :here :there word: find rules token word: first back word remove/part find erode word 2 ] all[empty? erode not tail? there insert/only erode [] there: tail there] )] :there rule ] data: "first rule second rule third rule " erode: [ a | b | c | a] parse/all data rule | |
Steeve: 30-Jun-2007 | i well know how to skip blank chars, but i think it's not logic in that case | |
Gabriele: 17-Jul-2007 | when using parse (not parse/all) you can skip spaces putting something like "" in the rule | |
Group: MySQL ... [web-public] | ||
Oldes: 14-Jul-2007 | and now I have a prove: not-squote: complement charset "'" not-dquote: complement charset {"} ws: charset " ^-^M^/" data: {INSERT INTO hmm_kalendar_akce VALUES (NULL,9,'posledni-skotsky-kral',NULL,'(Last King of Scotland, The)','Poslední skotský král',NULL,NULL,'','http://www.kinoartbrno.cz/?stranka=film&film=posledni-skotsky-kral',0,NULL)} ;the parse part from insert-all-queries function: parse/all s: data [ any [ #"'" some ["\'" | "''" | not-squote] #"'" |{"} some [{\"} | {""} | not-dquote] {"} | #"`" thru #"`" | e: #";" ( probe "next query?" probe e ) any [ws] s: | skip ] ] | |
ChristianE: 25-Aug-2010 | If the SKIP-NETWORKING config entry is enabled, MySQL won’t listen for TCP/IP connections at all. That's a security setting. All interaction with MySQL must then be made via Unix sockets. Whereas the mysql-driver only supports TCP connections. I don't no about CPanel, but look out for some CPanel setting like "skip networking" or alike. | |
caelum: 26-Aug-2010 | ChristianE, I could not find the SKIP-NETWORKING config entry anywhere on cpanel, but after reading some tech docs from my ISP I conclude they have it set to only allow database access via Unix sockets, so I guess I will have to live with that. | |
Group: Web ... Everything web development related [web-public] | ||
Anton: 26-Feb-2005 | read-thru: func [ {Read a net file from thru the disk cache. Returns binary, else none on error.} url [url! file!] /progress callback {Call func [total bytes] during transfer. Return true.} /update "Force update from source site" /expand "Auto-decompress after transfer." /check {Update only if version, checksum/secure, or date/size do not match.} info /to "Specify a file target, not cache." local-file [file! none!] /local file data purl loc-path ][ vbug ['read-thru url info] if none? file: path-thru url [return none] if local-file [file: local-file] if all [not update exists-thru?/check file info] [ if error? try [data: read/binary file] [return none] return data ] if file? url [ if error? try [data: read/binary url] [return none] return data ] loc-path: first split-path file if data: read-net/progress url :callback [ if not exists? loc-path [make-dir/deep loc-path] if all [expand find/match data "rebpress"] [ if error? try [data: decompress skip data 8] [return none] ] write/binary file data if all [check block? info info/2] [ error? try [set-modes file [modification-date: info/2]] ] ] vbug ['read-thru-ok? found? data] data ] | |
Pekr: 13-Apr-2008 | then Gabriele is good target to consider, he might have some ideas, as he knows best what VID3 is going to be about. Imo we should skip VID2 ... | |
Dockimbel: 2-May-2008 | >> load skip page/locals/headers/Last-Modified 5 == 30-Apr-2008/1:08 | |
Ashley: 2-Apr-2010 | Code snippet to "inline" an image: string: trim/lines form read/binary file remove back tail string ajoin [{<img src="data:image/} next suffix? file ";base64," skip string 5 {">}] Adds about 30-50% to image size but reduces server fetches (important for wireless access). | |
Group: Announce ... Announcements only - use Ann-reply to chat [web-public] | ||
Ashley: 14-Jan-2006 | RebDB v2.0.2 released: http://www.dobeash.com/it/rebdb/ This release fixes a critical bug with multi-column DISTINCT statements that can cause incorrect query results to be returned. The bug was eventually tracked down to the behaviour of unique/skip in REBOL, so developers making use of unique/skip should be aware of this [somewhat unexpected] behaviour: >> unique/skip [1 "A" 1 "B"] 2 == [1 "A"] >> unique/skip ["A" 1 "B" 1] 2 == ["A" 1 "B" 1] If someone could cross-post this to the ML that would be much appreciated. | |
eFishAnt: 2-May-2006 | Visit http://www.TGD-Consulting.de/Download.htmland take a look at the final release of Hex-It!. (I posted on behalf of Dirk Weyand, since he cannot reach AltME) Hex-It! is a small but powerful hex-editor. You can use this tool to analyse or alter the "fingerprints" for any kind of files. Known first as a contribution to the REBOL Demo 2006 contest, the final release with enhanced features is available now. Features of Hex-It! v1.2.0: --------------------------- * cross platform hex-editor * free "save-feature" for small files sized lesser 15 KB, to edit larger files purchase a license-key that unlocks this limitation * enhanced spot navigation with mouse scroll-wheel support * non blocking file access * support of large files (a maximum chunk of 1MB file-data is only held in memory at once) Some notes and useful tips & tricks on the usage of Hex-It!: ------------------------------------------------------------ - Modifications of files were automatically saved on exit, if you load another file or if a different chunk of the same file is selected. - Byte selection: + Select a byte with a left mouse button (LMB) click on the hexadecimal values to the left. The byte is highlighted then. + If a byte is selected, either use the cursor keys or the scroll-wheel of the mouse to scroll through the bytes of the file. + Change a selected byte with plus (+) & minus (-) or just enter its new value. Single characters, three digit numbers or single hexadecimal values are valid. + Use the right mouse button (RMB) to deselect a highlighted byte. - Spot-navigation: + The spot specifies the index/position of a byte in the file. If no byte is selected it shows the position of the top left byte displayed. + Enter a number to set directly the spot to a byte-position. + Skip a certain amount of bytes relative to the current spot by using plus (+) & minus (-), e.g. "+10000" skips 10000 bytes forward and "-1000" skips 1000 bytes backwards. + Skip to end of file: Click with the RMB on the arrow-down Spot-button or use the "End"-Key. + Skip to first byte of file: Click with the RMB on the arrow-up Spot-button or use the "Home"-Key. - Seek: + ASCII- or Hex-Strings are valid queries. + LMB click on the "Seek"-button seeks from the current position. + RMB click on the "Seek"-button seeks from the beginning of the file. Please note, that the license of this release is not BSD like anymore. | |
Group: SDK ... [web-public] | ||
BrianH: 28-Jun-2006 | <filename>:<stream>:$<attribute> without the < and > of course. Since the default stream is the empty string and all attributes start with $ you can skip one of the colons with default attributes. The default attribute is $DATA, and what you would normally think of as the contents of %file would be in %file::$DATA really. Executable files aren't marked as such with attributes like they are in Unix, but you can hide stuff in alternate streams. It wouldn't matter what the file was named if you could pass it to CreateProcess or some such, so you can hide executable code in alternate streams but without library support you can't call it. You should validate the filenames of files you are serving for security anyways, so this is just one more thing to look for. | |
Maxim: 22-Sep-2006 | I do not know how resources are used or done, but afaict, encap does not really compile anything. It just appends encrypted source code to the binary, which is read back directly like a file (probably using a preset skip value). | |
Maxim: 22-Sep-2006 | right now, it seems as if all encap does is: save %your-script.exe append Load/binary enface.exe compress load/binary your-script.r preprocessing just really adds more lines to your-script.r itself.. it adds nothing to the binary side of things like the resources which you describe. My guess is that the main() of the enface checks to see if its file size is larger than it should and in such a case does: do to-string decompress skip load/binary argv[0] base-encap-size other wise handling the args, finding a script to load, and letting extra args flow through to the loaded script. this way the same binary works for both encapped and core SDK binaries. | |
Rondon: 14-Jan-2012 | REBOL [ Title: "ARCFOUR and CipherSaber" Date: 17-Jan-2004 File: %arcfour.r Author: "Cal Dixon" Purpose: {Provides encryption and decryption using the ARCFOUR algorithm} Note: {this implementation can decrypt data at about 40KB/s on my 1Ghz AMD Duron system with Rebol/View 1.2.10.3.1} Library: [ level: 'advanced platform: 'all type: [function module protocol] domain: [encryption scheme] tested-under: [view 1.2.10.3.1 on [W2K] by "Cal"] license: 'PD support: none ] ] ;ARCFOUR specification: http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt ;CipherSabre specification: http://ciphersaber.gurus.com/faq.html#getrc4 arcfour-short: func [key [string! binary!] stream [binary! string!] /mix n /local state i j output swap addmod sz][ swap: func [a b s /local][ local: sz s a poke s a + 1 to-char sz s b poke s b + 1 to-char local ] addmod: func [ a b ][ a + b // 256 ] sz: func [ s a ][ pick s a + 1 ] state: make binary! 256 repeat var 256 [ insert tail state to-char var - 1 ] j: 0 loop any [ n 1 ] [ i: 0 loop 256 [ swap i j: addmod j add sz state i sz key i // length? key state i: i + 1] ] i: j: 0 output: make binary! length? stream repeat byte stream [ swap i: addmod i 1 j: addmod j sz state i state insert tail output to-char xor~ byte to-char sz state addmod (sz state i) (sz state j) ] clear state return output ] make root-protocol [ addmod: addmod: func [ a b ][ a + b // 256 ] sz: func [ s a ][ pick s a + 1 ] swap: func [a b s /local][ local: sz s a poke s a + 1 to-char sz s b poke s b + 1 to-char local ] ins: get in system/words 'insert i: 0 j: 0 open: func [port][ port/state/tail: 2000 port/state/index: 0 port/state/flags: port/state/flags or port-flags port/locals: context [ inbuffer: make binary! 40000 state: make binary! 256] use [key n i j] [ key: port/key n: port/strength repeat var 256 [ ins tail port/locals/state to-char var - 1 ] j: 0 loop any [ n 1 ] [ i: 0 loop 256 [ swap i j: addmod j add sz port/locals/state i sz key i // length? key port/locals/state i: i + 1 ] ] ] i: j: 0 ] insert: func [port data][ system/words/insert tail port/locals/inbuffer data do [] ] copy: func [port /local output][ output: make binary! local: length? port/locals/inbuffer loop local [ swap i: addmod i 1 j: addmod j sz port/locals/state i port/locals/state ins tail output to-char sz port/locals/state addmod (sz port/locals/state i) (sz port/locals/state j) ] local: xor~ output port/locals/inbuffer clear port/locals/inbuffer local ] close: func [port][ clear port/locals/inbuffer clear port/locals/state clear port/url clear port/key] port-flags: system/standard/port-flags/pass-thru net-utils/net-install arcfour self 0 ] arcfour: func [key stream /mix n /local port][ port: open compose [scheme: 'arcfour key: (key) strength: (n)] insert port stream local: copy port close port return local ] ; CipherSaber is an ARCFOUR stream prepended with 10 bytes of random key data ciphersaber: func [ key stream /v2 n ][ arcfour/mix join key copy/part stream 10 skip stream 10 either v2 [ any [ n 42 ] ][ 1 ] ] | |
Group: !RebGUI ... A lightweight alternative to VID [web-public] | ||
Volker: 5-Jun-2005 | prebol: func [code "changes code" /local p f] [ parse code rule: [ any [ p: #include set f file! ( p: change/part p load f 2 ) :p | into rule | skip ] ] code ] ; changes code, use copy/deep if needed t1: now/precise save %test.r [The embedded stuff] p: prebol [Hello [World #include %test.r here] we are ] print[difference now/precise t1] | |
Volker: 5-Jun-2005 | prebol: func [code /local p f rule] [ if file? code [code: load code] parse code rule: [ any [ p: #include set f file! ( p: change/part p prebol load f 2 ) :p | into rule | skip ] ] code ] ; changes code, use copy/deep if needed t1: now/precise save %test.r [The embedded and #include %test2.r stuff] save %test2.r [Subembedded] p: prebol probe [Hello [World #include %test.r here] we are] print [difference now/precise t1 newline mold p] | |
Graham: 19-Sep-2005 | I guess the slight problem with a flat structure is that you have more interdepencies in the code With a flat structure, I have to know that there are 4 elements in each row row: skip face/data first face/picked - 1 * 4 Whereas with blocks for rows I can do this instead row: skip face/data first face/picked - 1 | |
Sunanda: 20-Sep-2005 | *Some* validation can only happen after the event -- unless you enforce the order in which fields are completed. And even then it's not always possible. May you need some lightweight masks for simple things. Plus the ability to skip off to a tailored validation function for the more awkward stuff. | |
Graham: 20-Sep-2005 | in some ways you have to implement a mini editor for the field. prevent scrolling. skip over characters. | |
Graham: 23-Sep-2005 | I'm doing some async io, which works with View, but in Rebgui, I get the following error when I click on my button make object! [ code: 312 type: 'script id: 'cannot-use arg1: 'path arg2: 'none! arg3: none near: [if pf/data <> face/data [ old: pf/data if old [ clear skip pf/pane/:old/effect/draw 7 show pf/pane/:old ] pf/data: face/data insert tail face/effect/draw [pen leaf fill-pen leaf circle 6x10 3] show face face/action face ]] where: 'switch ] | |
Graham: 25-Sep-2005 | Any idea on why this error occurs? make object! [ code: 312 type: 'script id: 'cannot-use arg1: 'path arg2: 'none! arg3: none near: [if pf/data <> face/data [ old: pf/data if old [ clear skip pf/pane/:old/effect/draw 7 show pf/pane/:old ] pf/data: face/data insert tail face/effect/draw [pen leaf fill-pen leaf circle 6x10 3] show face face/action face ]] where: 'switch ] | |
shadwolf: 5-Oct-2005 | row adding row is mutch more easyer than handleling column ... To skip column we have several way to do this ... one or just estetical and doesn't impact upon internal datas and other are about impacting uppon internal datas structure then provoc a redraw | |
Group: rebcode ... Rebcode discussion [web-public] | ||
BrianH: 26-Oct-2005 | REBOL [] use [fixup-rule label-rule label-fixup-rule label-error-rule here] [ ; Initialize the intermediate rules label-rule: make block! 0 label-fixup-rule: make block! 0 label-error-rule: make block! 0 ; Build the fixup-rule based on the opcode-rule fixup-rule: copy/deep rebcode*/opcode-rule parse fixup-rule [ some [ here: lit-word! block! '| ( unless find ['bra 'brat 'braf] here/1 [insert here/2 [label-error-rule |]] ) | lit-word! 'word! '| ( unless 'label = here/1 [here/2: [label-error-rule | word!]] ) | lit-word! | '| | 'block! | 'series! | 'word! (here/1: [label-error-rule | word!]) | 'any-type! (here/1: [label-fixup-rule | any-type!]) | into ['integer! '| 'word! | 'word! '| 'integer!] ( insert here/1 [label-fixup-rule |] ) | block! (insert here/1 [label-error-rule |]) ] ] ; Replace the fix-bl function rebcode*/fix-bl: func [block /local labels here there label rule] bind [ labels: make block! 16 block-action: :fix-bl if debug? [print "=== Fixing binding and labels... ==="] parse block [ some [ here: subblock-rule (here/1: bind here/1 words) | 'label word! (here/1: bind here/1 words insert insert tail labels here/2 index? here) | 'offset word! integer! ( here/1: bind 'set words here/3: 3 + here/3 + index? here if (here/3 < 1) or (here/3 > 1 + length? block) [ error/with here "Offset out of bounds:" ] ) | opcode-rule (here/1: bind here/1 words) | skip (error here) ] ] either 0 < length? labels [ label-rule: make block! length? labels foreach [key val] labels [insert insert tail label-rule to-lit-word key '|] clear back tail label-rule label-fixup-rule: [there: label-rule (there/1: 2 + select labels there/1)] label-error-rule: [label-rule (error/with here "Cannot use label here:")] rule: fixup-rule ] [ rule: opcode-rule ] parse block [ some [ here: ['bra word! | 'brat word! | 'braf word!] ( if not label: select labels here/2 [error/with here "Missing label:"] here/2: label - index? here ) | rule | skip (error here) ] ] ] rebcode* ] | |
Henrik: 9-Dec-2006 | if we also could have direct access to the buffer that is used for outputs so we can skip the View engine, but throw pixels directly on screen, even more speed can be gained. | |
Coccinelle: 23-Feb-2007 | peut-être que cela te serait utile : ; Patch to rebcode assembler ; - Add setl opcode -> setl: ["Set variable to label offset (0 based offset)" word! word!] ; - very usefull to call sub routine system/internal/rebcode*: make system/internal/rebcode* [ fix-bl: func [block /local labels here label][ labels: make block! 16 block-action: :fix-bl if debug? [print "=== Fixing binding and labels... ==="] parse block [ some [ here: subblock-rule (here/1: bind here/1 words) | 'label word! (here/1: bind here/1 words insert insert tail labels here/2 index? here) | 'setl word! word! | opcode-rule (here/1: bind here/1 words) | skip (print "LA" error here) ] ] parse block [ some [ here: ['bra word! | 'brat word! | 'braf word!] ( fix-label labels at here 2 here 0 ) | 'brab into [some word!] word! ( label: here/2 forall label [ fix-label labels label here -1 ] ) | 'brab word! word! ( fix-label labels at here 2 here -1 ) | 'setl word! word! ( here/1: 'set here/1: bind here/1 words here/3: -1 + any [ select labels to word! here/3 error/with here join "Missing label '" [here/3 ":"] ] ) | opcode-rule | skip (print "ICI" error here) ] ] ] system/internal/assemble: func [ "REBCODE Assembler" body /local frame here do-blks labels tmp rule ][ body: second :body fix-bl body ] ] | |
Group: Tech News ... Interesting technology [web-public] | ||
[unknown: 9]: 1-Feb-2007 | Marketing Ideas to lawyers AN ARTICLE FROM SUNDAY'S NEW YORK TIMES WE SHOULD READ CAREFULLY. Awaiting the Day When Everyone Writes Software By JASON PONTIN Published: January 28, 2007 BJARNE STROUSTRUP, the designer of C++, the most influential programming language of the last 25 years, has said that “our technological civilization depends on software.” True, but most software isn’t much good. Too many programs are ugly: inelegant, unreliable and not very useful. Software that satisfies and delights is as rare as a phoenix. Skip to next paragraph Sergei Remezov/Reuters Charles Simonyi, chief executive of Intentional Software, in training for his trip to the International Space Station, scheduled for April. Multimedia Podcast: Weekend Business Reporters and editors from The Times's Sunday Business section offer perspective on the week in business and beyond. How to Subscribe All this does more than frustrate computer users. Bad software is terrible for business and the economy. Software failures cost $59.5 billion a year, the National Institute of Standards and Technology concluded in a 2002 study, and fully 25 percent of commercial software projects are abandoned before completion. Of projects that are finished, 75 percent ship late or over budget. The reasons aren’t hard to divine. Programmers don’t know what a computer user wants because they spend their days interacting with machines. They hunch over keyboards, pecking out individual lines of code in esoteric programming languages, like medieval monks laboring over illustrated manuscripts. Worse, programs today contain millions of lines of code, and programmers are fallible like all other humans: there are, on average, 100 to 150 bugs per 1,000 lines of code, according to a 1994 study by the Software Engineering Institute at Carnegie Mellon University. No wonder so much software is so bad: programmers are drowning in ignorance, complexity and error. Charles Simonyi, the chief executive of Intentional Software, a start-up in Bellevue, Wash., believes that there is another way. He wants to overthrow conventional coding for something he calls “intentional programming,” in which programmers would talk to machines as little as possible. Instead, they would concentrate on capturing the intentions of computer users. Mr. Simonyi, the former chief architect of Microsoft, is arguably the most successful pure programmer in the world, with a personal fortune that Forbes magazine estimates at $1 billion. There may be richer programmer-billionaires — Bill Gates of Microsoft and Larry Page of Google come to mind — but they became rich by founding and managing technology ventures; Mr. Simonyi rose mainly by writing code. He designed Microsoft’s most successful applications, Word and Excel, and he devised the programming method that the company’s software developers have used for the last quarter-century. Mr. Simonyi, 58, was important before he joined Microsoft in 1981, too. He belongs to the fabled generation of supergeeks who invented personal computing at Xerox PARC in the 1970s: there, he wrote the first modern application, a word processor called Bravo that displayed text on a computer screen as it would appear when printed on page. Even at leisure, Mr. Simonyi, who was born in Hungary and taught himself programming by punching machine code on Russian mainframes, is a restless, expansive personality. In April, he will become the fifth space tourist, paying $20 million to board a Russian Soyuz rocket and visit the International Space Station. Mr. Simonyi says he is not disgusted with big, bloated, buggy programs like Word and Excel. But he acknowledges that he is disappointed that we have been unable to use “our incredible computational ability” to address efficiently “our practical computational problems.” “Software is truly the bottleneck in the high-tech horn of plenty,” he said. Mr. Simonyi began thinking about a new method for creating software in the mid-1990s, while he was still at Microsoft. But his ideas were so at odds with .Net, the software environment that Microsoft was building then, that he left the company in 2002 to found Intentional Software. “It was impractical, when Microsoft was making tremendous strides with .Net, to send somebody out from the same organization who says, ‘What if you did things in this other, more disruptive way?’ ” he said in the January issue of Technology Review. For once, that overfavored word — “disruptive” — is apt; intentional programming is disruptive. It would automate much of software development. The method begins with the intentions of the people inside an organization who know what a program should do. Mr. Simonyi calls these people “domain experts,” and he expects them to work with programmers to list all the concepts the software must possess. The concepts are then translated into a higher-level representation of the software’s functions called the domain code, using a tool called the domain workbench. At two conferences last fall, Intentional Software amazed software developers by demonstrating how the workbench could project the intentions of domain experts into a wonderful variety of forms. Using the workbench, domain experts and programmers can imagine the program however they want: as something akin to a PowerPoint presentation, as a flow chart, as a sketch of what they want the actual user screen to look like, or in the formal logic that computer scientists love. Thus, programmers and domain experts can fiddle with whatever projections they prefer, editing and re-editing until both parties are happy. Only then is the resulting domain code fed to another program called a generator that manufactures the actual target code that a computer can compile and run. If the software still doesn’t do what its users want, the programmers can blithely discard the target code and resume working on the domain workbench with the domain experts. As an idea, intentional programming is similar to the word processor that Mr. Simonyi developed at PARC. In the jargon of programming, Bravo was Wysiwyg — an acronym, pronounced WIZ-e-wig, for “what you see is what you get.” Intentional programming also allows computer users to see and change what they are getting. “Programming is very complicated,” Mr. Simonyi said. “Computer languages are really computer-oriented. But we can make it possible for domain experts to provide domain information in their own terms which then directly contributes to the production of the software.” Intentional programming has three great advantages: The people who design a program are the ones who understand the task that needs to be automated; that design can be manipulated simply and directly, rather than by rewriting arcane computer code; and human programmers do not generate the final software code, thus reducing bugs and other errors. NOT everyone believes in the promise of intentional programming. There are three common objections. The first is theoretical: it is based on the belief that human intention cannot, in principle, be captured (or, less metaphysically, that computer users don’t know what people want). The second is practical: to programmers, the intentional method constitutes an “abstraction” of the underlying target code. But most programmers believe that abstractions “leak” — that is, they fail to perfectly represent the thing they are meant to be abstracting, which means software developers must sink their hands into the code anyway. The final objection is cynical: Mr. Simonyi has been working on intentional programming for many years; only two companies, bound to silence by nondisclosure agreements, acknowledge experimenting with the domain workbench and generator. Thus, no one knows if intentional programming works. Sheltered by Mr. Simonyi’s wealth, Intentional Software seems in no hurry to release an imperfect product. But it is addressing real and pressing problems, and Mr. Simonyi’s approach is thrillingly innovative. If intentional programming does what its inventor says, we may have something we have seldom enjoyed as computer users: software that makes us glad. Jason Pontin is the editor in chief and publisher of Technology Review, a magazine and Web site owned by M.I.T. E-mail: [pontin-:-nytimes-:-com]. | |
Volker: 11-May-2007 | text: { 10-Mar-2007 $12,002.34 "Home Hardware" "Tile Saw" 1--Mar-2007 $12002.34 "Home Hardware" "Tile Saw" } parse text blk-rule: [ some [ str: newline | #";" [thru newline | to end] new: (probe copy/part str new) | [#"[" | #"("] blk-rule | [#"]" | #")"] break | skip ( either attempt [ set [value new] load/next str ] [ probe :value ] [ new: find str " " print ["GIBBERISH" copy/part str new] ] ) :new ] ] | |
PatrickP61: 1-May-2008 | For the security minded, there is a new startup at www.Yubico.com with a cool new usb wafer that generates OTP (one time passwords). It is small, light, and cheap (currently $35.00). But the really neat thing about it is it can be combined with a service like www.MashedLife.com which can manage all of your website accounts with a secure login. With OTP, keyloggers are not effective anymore. It seems like a neat idea. You can listen to Steve Gibson review at www.twit.tv/sn141. If you want just the Yubico stuff, advance the audio stream to about 3/4 the way through at about 1:15 to skip the RSA stuff before. | |
Henrik: 2-Sep-2008 | Pekr, did you skip the part about the browser being highly multithreaded? | |
Group: !REBOL3-OLD1 ... [web-public] | ||
BrianH: 1-May-2006 | ;The changed build function would be: build: func [ {Build a block using given values} block [block! paren! path! lit-path! set-path!] /with values [block!] /local context inner ] [ values: any [values [only: :encl ins: :dtto]] context: make object! values inner: func [block /local item item' pos result] [ result: make :block length? :block parse block [ any [ pos: set item word! ( either all [item': in context item item <> 'self] [ change pos item' set/any [item pos] do/next pos insert tail :result get/any 'item ] [insert tail :result item pos: next pos] ) :pos | set item get-word! ( either all [item': in context item item <> 'self] [ insert/only tail :result get/any item' ] [insert tail :result item] ) | set item [ block! | paren! | path! | set-path! | lit-path! ] ( insert/only tail :result inner :item ) | set item skip (insert/only tail :result get/any 'item) ] ] :result ] inner :block ] | |
Group: Games ... talk about using REBOL for games [web-public] | ||
btiffin: 31-Jan-2008 | Grrr... :) I have no desire for millions, but ... I wrote and published a fantasy card game back in the early 80s; an entire decade before Magic the Gathering. They made enough money to buy TSR. Rassafrassa. :) Not to say my Monster Romp (tm) game competes with Magic; I paid an artist a whole $3 for each picture, but had I flogged it I could be independently wealthy now instead of umm, not. I have about 800 decks of the original 1000 run. Sold 60 decks the one day I set up a booth to sell it, then gave away the rest. From those days forward I promised myself to never pursue an idea. Best to let them die on the operating table and skip the what if crap. That is until I bump into a greedy partner. Success requires greed imho, or at least a state of mind somewhere above "communist". :) Paul; I'm not sure, but I posted this to the calendat back in July. http://rebol/mustard.co.nz/rebtower-0.0.4.zip | |
Group: !CureCode ... web-based bugtracking tool [web-public] | ||
Oldes: 27-May-2009 | For example while parsing binary! and I use [1 skip] I want to skip 1 byte only, not a unicode char which can be on more bytes. |
301 / 1228 | 1 | 2 | 3 | [4] | 5 | 6 | ... | 9 | 10 | 11 | 12 | 13 |