AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 93 |
r3wp | 1079 |
total: | 1172 |
results window for this page: [start: 1 end: 100]
world-name: r4wp
Group: #Red ... Red language group [web-public] | ||
Pekr: 29-Feb-2012 | I know. OK, maybe I need an advice. I was looking into some C code educatory example, which contained something like: char multi[5][10]; decomposed to: multi[0] = {'0','1','2','3','4','5','6','7','8','9'} multi[1] = {'a','b','c','d','e','f','g','h','i','j'} multi[2] = {'A','B','C','D','E','F','G','H','I','J'} multi[3] = {'9','8','7','6','5','4','3','2','1','0'} multi[4] = {'J','I','H','G','F','E','D','C','B','A'} which gets stored in a memory block of a "0123456789abcdefghijABCDEFGHIJ9876543210JIHGFEDCBA" value. If I would be supposed (for any reason :-), to interface to such a construct, I would simply use a pointer in Red, and would be responsible to manually decompose/treat the value of arrays, not to break it for the C level code? | |
DocKimbel: 5-Aug-2012 | For example: a: context [c: 123 d: b/e] b: context [e: 456 f: a/c] cannot be compiled currently. | |
DocKimbel: 13-Aug-2012 | `system/words` virtual path support was added in today's commits, to be able to get/set a global variable or call a function from within namespaces with conflicting local names. Example: e: 123 a: context [ e: -1 print-line e print-line system/words/e system/words/e: 0 ] print-line e will output: -1 123 0 | |
GrahamC: 15-Sep-2012 | I've sent money to europe by bank wire, and it's very expensive. Best if you can setup a US bank account when you're next visiting the USA ( if that is possible for non residents ), or an E*trade account. | |
Arnold: 23-Sep-2012 | Pekr maybe try this instead of with 1 2 3 4 5 >> GET_BUFFER: [a b c d e] == [a b c d e] >> data: 4 == 4 >> GET_BUFFER(data) == 4 >> GET_BUFFER/:data == d >> GET_BUFFER/(data) == d | |
Pekr: 26-Sep-2012 | I used no punctuation char, just "e", then changed it to "e" (with hook above it), and it added that strange chars to the end of the string ... | |
Pekr: 26-Sep-2012 | uh, in above line, in the word "svete", the first "e" has hook above it, like in the original HelloWorld you used for czech ... | |
Kaj: 26-Sep-2012 | Can we call it E: like on my Atari 8-bit? ;-) | |
Gregg: 6-Oct-2012 | Yes, the hope is that we can rally support to do the things, like web sites, forum moderation, etc. so core developers (i.e. Doc) can focus on development. | |
DocKimbel: 14-Oct-2012 | Basically, Red/System compiler is doing automatically what C compiler requires you to do manually (i.e. specifying function prototypes separately in headers). | |
Arnold: 18-Oct-2012 | Hi Kaj on my macbook: Last login: Fri Oct 19 07:21:16 on ttys001 MacBook-van-Arnold-160:~ Arnold$ /Users/Arnold/Downloads/Red\(/System\)\ Testing-dc1b702068063b65/Darwin/Red/hello ; exit; Hello, world! §±ÖÁµ, ºÌüµ! `O}Y, NLu Dobrý den svte logout [Proces voltooid] /Users/Arnold/Downloads/Red\(/System\)\ Testing-dc1b702068063b65/Darwin/Red/Fibonacci ; exit; MacBook-van-Arnold-160:~ Arnold$ /Users/Arnold/Downloads/Red\(/System\)\ Testing-dc1b702068063b65/Darwin/Red/Fibonacci ; exit; Fibonacci 35: 9227465 logout [Proces voltooid] MacBook-van-Arnold-160:~ Arnold$ /Users/Arnold/Downloads/Red\(/System\)\ Testing-dc1b702068063b65/Darwin/Red/empty ; exit; logout [Proces voltooid] I took the programs from the Red tree under Darwin | |
Jerry: 10-Nov-2012 | Many years ago, I found REBOL 2 and liked it a lot, but back then REBOL didn't support Unicode, so it was useless in China/Taiwan. I wrote e-mail to Carl, but I got no feedback. So I decided to start a magazine column in China and Taiwan to introduce REBOL. My idea was to make readers love REBOL and felt the same pain (of no unicode support). I also kind of encouraged them to write e-mail to RT on the Unicode issue. | |
Ladislav: 15-Nov-2012 | Though, Ladislav claims he and Carl did encounter such issue at least once - I am claiming that I have revealed a bug in Carl's code caused by the fact that indices are not isomorphic to integers, i.e. they "contain a gap". That is a totally different issue than whether indexing should be 1-based or 0-based. | |
Ladislav: 15-Nov-2012 | , i.e. the gap needs to be prolonged to infinity, otherwise we are simply inconsistent | |
Andreas: 15-Nov-2012 | (i.e. "SKIP-based") | |
Andreas: 16-Nov-2012 | I.e., you'd hardly ever actually write PICK series 1, you'd use FIRST instead. | |
kensingleton: 17-Nov-2012 | My Understanding of Series: A contiguous collection of boxes sequentially numbered in ascending order starting at 1. Each box can contain any rebol value The head of a series is always box number 1 The last item in a series is always in box number (length? series) The tail of a series is always box number (length? series) + 1 Any series can have multiple words referencing any box in that series resulting in a sub-series (but not a copy) index? series - always returns the box number of the value referenced by series Evaluating a word referencing a series returns the series from box number (index? series) up to and including box number (index? tail series) index? is the only rebol word that directly uses the box numbers of the series All other rebol words that manipulate series are relative to the box number of the word referencing the series A series is empty when: equal? head series tail series => true – or – when all boxes are empty Examples: s1: [a b c d e f g h i j] => creates 10 boxes numbered 1 to 10 from the left with a in box 1 and j in box 10 – unseen is box 11 which is 'tail as seen by: index? tail s1 s2: at s1 3 => references s1 starting from box 3 of s1 - [c d e f g h i j] s3: at s2 4 => references s1 starting from box 6 of s1 - [f g h i j] which is item 4 of s2 probe index? s1 => 1 probe index? s2 => 3 probe index? s3 => 6 probe head s3 => [a b c d e f g h i j] - showing that s3 references the same series as s1 probe pick s1 2 => 'b probe pick s2 2 => 'd probe pick s3 2 => 'g probe s3/-2 - this is shorthand for back back s3 or pick s3 -2 (the negative number simply means move back twice) => 'd probe tail s1 => [] probe tail s2 => [] probe tail s3 => [] forall s2 [prin first s2] print => cdefghij forall s3 [prin first s3] print => fghij probe index? tail s1 => 11 Possible SOLUTION: So, what is missing? Words that directly manipulate the box numbers (index)? – so maybe we need something like this: s1/index: 4 => sets the index of s1 to 4 and causes word s1 to reference the series starting from box 4 add s3/index 2 => adds 2 to the index of s3 causing s3 to reference the box 2 places further on => 'h add s2/index -2 or subtract s2/index 2 => subtracts two from s2's index causing s2 to now reference box 1 You can now use any mathematical operations on the index of a word referencing a series as long as it results in an integer in range If index? series > (length? series) + 1 or index? series < 1 then an "index out of bounds" error should result Zero is a non-issue because it has no meaning in a 1 based series This kind of shorthand: s1/-3 becomes redundant - but if kept still means: back back back s1 | |
Ladislav: 17-Nov-2012 | My Understanding of Series: A contiguous collection of boxes sequentially numbered in ascending order starting at 1. - this is correct only for series I would call "Head Series", i.e. such series that are their own heads. | |
DocKimbel: 19-Nov-2012 | It doesn't scale well, and as you can see in the following example, it can quickly get nasty: [/external obj1 [a b] /external obj2 [c d] /external obj3 [e f] /global g h] | |
Gregg: 30-Nov-2012 | ...for easy embedded stuff, just give me a small GUI system, for bigger picture, give me a HTML5 So what do you propose for the GUI, that will allow it to look good? i.e., what is your constructive suggestion, rather than criticizing all the wrongs of the past. | |
DocKimbel: 7-Dec-2012 | I have found an issue with word! value casing in Red. The Red/System code generated for: print 'a = 'A is: stack/mark-native ~print stack/mark-native ~strict-equal? word/push ~a word/push ~A natives/strict-equal?* stack/unwind natives/print* stack/unwind The problem is that Red/System is case-insensitive, so ~a and ~A are the same variable. So, no way to make it work like that. I see two options for solving it: 1) Make Red/System case-sensitive. 2) Deep encode each Red generated symbol to distinguish lower and uppercases. Solution 2) works, but it makes symbol decoration operation very costly (each symbol letter is prefixed with a sigil for lowercases and another one for uppercases). The example above becomes: stack/mark-native ~_p_r_i_n_t stack/mark-native ~_s_t_r_i_c_t_-_e_q_u_a_l_? word/push ~_a word/push ~-A natives/strict-equal?* stack/unwind natives/print* stack/unwind So, it is not nice, it doubles every Red symbol size that is handled by Red/System and slows down Red compilation by 25%. So, my questions are: a) Does anyone see another cheaper solution to this problem? b) In case of option 1), do you have anything against making Red/System identifiers case-sensitive? | |
Gregg: 26-Mar-2013 | STRICT-EQUAL? delegates to the datatype. Should the doc string just say "strictly equal" in it, or should it be more like R2? i.e., there may be more going on, unless you have a behavior locked down for it. | |
Gregg: 26-Mar-2013 | So this for MOLD? Returns a source format string representation of a value. i.e., include "string" | |
Gregg: 27-Mar-2013 | I will have to test more. If I just paste the original append source into the console (i.e. all doc strings removed), calling append then crashes. | |
DocKimbel: 28-Mar-2013 | Right, adding basic float support to Red is not difficult, but as floats are not needed internally to build Red, they are low priority (but if someone wants to contribute it, it will be welcome). Moreover, the runtime lexer is disposable code, it will be soon replaced by a new one with Unicode support and more complete syntax support. So extending it now for additional literal forms is a bit of waste of time. If someone is interested in implementing float support anyway, the decimal! name is reserved for a future BCD datatype, so possible names are: real! or float!. It will be a 64-bit float, so mapped underneath to Red/System float! type. A support for float32! at Red level is not planned, converting float! to float32! at Red/System level when needed (i.e. OpenGL API) should be enough. | |
Gregg: 12-Apr-2013 | ; JS-like MAP. The order of args to the function is a bit odd, but is set ; up that way because we always want at least the value (if your func takes ; only one arg), the next most useful arg is the index, as you may display ; progress, and the series is there to give you complete control and match ; how JS does it. Now, should the series value be passed as the head of the ; series, or the current index, using AT? map-js: func [ "Evaluates a function for each value(s) in a series and returns the results." series [series!] fn [function!] "Function to perform on each value; called with value, index, and series args" /only "Insert block types as single values" /skip "Treat the series as fixed size records" size [integer!] ][ collect [ repeat i length? series [ ; use FORSKIP if we want to support /SKIP. keep/only fn series/:i :i :series ; :size ? ] ] ] ;res: map-js [1 2 3 a b c #d #e #f] :form ;res: map-js [1 2 3 a b c #d #e #f] func [v i] [reduce [i v]] ;res: map-js [1 2 3 a b c #d #e #f] func [v i s] [reduce [i v s]] ;res: map-js "Hello World!" func [v i s] [pick s i] | |
Gregg: 13-May-2013 | Is the plan to use .res files? i.e., to have a resource compiler that the linker can include? | |
Geomol: 28-May-2013 | -e:67: warning: Insecure world writable dir ... got a couple of those. Any problem? | |
Arnold: 22-Jun-2013 | @XieQ you subtract 1 first and then add it back? All indices get shifted 1, including the last one. In loops in C it is i.e. j < N and in R/S it will be j <= N. You meant curiosity not curiously. | |
Luis: 10-Jul-2013 | The red APK builder script build.r attempt to download some files i.e. http://static.red-lang.org/droid-tools/jli.dll.But only gets 404 Page not found... | |
Group: Announce ... Announcements only - use Ann-reply to chat [web-public] | ||
sqlab: 27-Feb-2013 | Kaj, the problem, that the console window closed, was caused by my wong assumption, that the convention for file names is the same as in Rebol. i.e. read -> crash read %test -- > crash write %test -- > crash read "test" --> works | |
Ladislav: 7-Mar-2013 | https://groups.google.com/forum/#!msg/rebol/6MMlv-E3j-E/fUudREMX-HYJ | |
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
Jerry: 6-May-2012 | My English is not very good. Writing a book in English is very difficult for me. I might need to hire someone to help me translate it into English and make it an e-book. Good news is, my publisher is willing to let me put 1/3 of the books in slideshare or somewhere like that to share with others when the book is published. BTW. The book is about 330 pages. | |
Ladislav: 27-Sep-2012 | (i.e. a program that interprets REBOL code entered by the user, etc.) | |
Ladislav: 27-Sep-2012 | Andreas, there is apparently a difference between code/data that is considered to be part of the interpreter and... - yes, hat is exactly what I tried to underline, and I especially wanted to cite these: If a programming language interpreter is released under the GPL, does that mean programs written to be interpreted by it must be under GPL-compatible licenses? When the interpreter just interprets a language, the answer is no. The interpreted program, to the interpreter, is just data; a free software license like the GPL, based on copyright law, cannot limit what data you use the interpreter on. ...However, when the interpreter is extended to provide “bindings” to other facilities... - I have to emphasize *when the interpreter is extended* and *other facilities* - i.e. other code not considered to be a part of the interpreter. Also, code present in the interpreter does not qualify as *interpreter extension* providing bindings to *other facilities* | |
AdrianS: 19-Oct-2012 | Kaj, the fossil source browser that you linked to has a download option for the current version as an archive - for those who don't want to bother installing fossil - i.e. they don't need to install file by file | |
Gregg: 4-Dec-2012 | Kaj, do you have specific instructions for running test apps? e.g., for Red/System on Windows, should all GTK stuff work, or does it require other installations? Basic MS DOS Red tests ran fine here. \Red(System) Testing\MSDOS\Red>hello Hello, world! ?a??e, ??sµe! ??, ?? Dobry den svete \Red(System) Testing\MSDOS\Red>Fibonacci.exe Fibonacci 40: 102334155 | |
sqlab: 27-Feb-2013 | sorry wrong group Kaj, the problem, that the console window closed, was caused by my wong assumption, that the convention for file names is the same as in Rebol. i.e. read -> crash read %test -- > crash write %test -- > crash read "test" --> works | |
AdrianS: 28-Feb-2013 | I would think with something like a Topaz, i.e. Rebol in a browser, they could have something much greater. | |
Pekr: 8-Mar-2013 | https://groups.google.com/forum/#!topic/rebol/6MMlv-E3j-E | |
Ladislav: 30-Mar-2013 | , i.e. if you really get identical builds when getting identical system/version | |
Pekr: 22-May-2013 | Bo - I wonder if you know about Cyphre's intent to accelerate View anyway, so imo Carl just misses important info on what is actually going on ;-) https://groups.google.com/forum/#!topic/rebol/6MMlv-E3j-E | |
AdrianS: 4-Jun-2013 | Ladislav, is the method you outlined for defining variadic functions is there a way not to have the variadic function not change the arity of any functions following the variadic function? i.e. with the definition of 'sumn, as you have it, if you have the following in a script: print sumn 1 2 print "hello" The "hello" doesn't print. I guess this is because when Rebol is 'do-ing the script, the 'print is returned by the variadic function and the 'do dialect somehow doesn't re-interpret that word with its following argument, but sees it as a no-argument 'print. If, on the other hand, you have: print sumn 1 2 do print "hello" ;or if you have something like "foo" instead of the 'do hello will be printed out as intended Could you describe what is happening here since I'm not exactly sure I understand how Rebol is handling things? Among other things, how is it OK to invoke arg-adder without providing the one arg it expects when you have "return/redo :arg-adder? | |
AdrianS: 19-Jul-2013 | Thanks, Robert. Could you briefly describe somewhere (in just a few sentences) the workflow you use when working on/debugging r3-gui? i.e is it possible to stay in the same R3 instance and rebuild (do you even need to be using the monolithic r3-gui script when debugging?), reload the script safely, etc. | |
Group: Rebol School ... REBOL School [web-public] | ||
Endo: 25-Apr-2012 | Also check E164 formatting: http://en.wikipedia.org/wiki/E.164 and http://www.wtng.info/wtng-tt.html | |
Ladislav: 21-Jun-2012 | You should just remember that end: never fails, so the expression: end: </div> break | </br> break | ... is equivalent to: end: [</div> break | </br> break ...] , i.e., the end: part is known for all alternatives | |
Evgeniy Philippov: 22-Jun-2012 | Peter, that would be good. If I will have his e-mail I will probably write him. | |
Endo: 27-Jun-2012 | I wrote another function which returns in the above format, so I can SELECT/SKIP 2, to get the number of occurence of the value, and it doesn't use SORT, uses REMOVE-EACH instead. it: >> f: func [b /local c r n1 n2] [r: copy [] foreach v unique b [c: copy b n1: length? c remove-each w c [v = w] n2: length? c append r reduce [v n1 - n2]] r] >> a: [a b c c a a b b c d d e e e f f h f f g h] >> f a == [a 3 b 3 c 3 d 2 e 3 f 4 h 2 g 1] | |
Sunanda: 9-Aug-2012 | Thanks Steeve, that's much more robust than my code :) Just for info ..... ....It needs some error trapping to handle un-loadable values, eg: >> is-a "number?" "33.e" ** Syntax Error: Invalid decimal -- 33.e ....And (like my code) it's not so good with 'true and 'false owing to the way REBOL works: >> is-a "logic?" "true" == false But it'll do the job! | |
BrianH: 9-Aug-2012 | >> head rle/into "ddeeee" rle/into "aaabbc" make block! 10 == [3 #"a" 2 #"b" 1 #"c" 2 #"d" 4 #"e"] | |
Steeve: 10-Aug-2012 | An alternative for R3 (strings and blocks) rle: func [s /local p e o][ o: copy [] parse/case s [ any [ p: skip any [e: if (p/1 == e/1) skip] (repend o [offset? p e p/1]) ] ] o ] | |
BrianH: 11-Aug-2012 | Steeve, that's basically the same as my R2 RLE's block rule, but with the IF workaround replaced with IF. It has a few gotchas: - Executes function values in block data - Doesn't handle unset! or error! values - Converts lit-paths to paths and lit-words to words before comparison and again before putting in the output. - Lots of intermediate block creation overhead - Considers bindings of words when comparing them, not just case-sensitive spelling The first 3 can be handled by using :p/1 and :e/1 instead of p/1 and e/1, and the fourth by using REDUCE/into instead of REPEND. The last one can't be handled by any built-in function or operator in R3 (see http://issue.cc/r3/1834for details) but you could do a combination of functions and operators to get case-sensitive comparison without considering bindings. PARSE/case's QUOTE operation is the fastest method for doing that at the moment. Nice job on neatly bypassing the relaxed bounds checking of R3 blocks. Though the if (p/1 == e/1) would succeed if p/1 is none and e is at the end of the block, the skip would still fail. That trick saves one e: operation. | |
BrianH: 11-Aug-2012 | The PARSE IF method does let you add a /compare function option though, so you can be as specific as you want. Instead of if (:p/1 == :e/1) you would do if (apply :f [:p/1 :e/1]) then pass :== or :strict-equal? as a parameter.. | |
BrianH: 11-Aug-2012 | Here's a version of my last one above, but with Steeve's trick adapted to make a /compare option. It defaults to its old case-sensitive behavior. rle: func [ "Run length encode to series of [length value]" s [series!] "The series to encode" /into {Insert into a buffer instead (returns position after insert)} output [any-block!] "The output buffer (modified)" /compare "Comparator function for equvilance" comparator [any-function!] /local x r qr b e ] [ unless into [output: make block! 2] x: none r: case [ compare [[any [e: if (apply :comparator [:x :e/1]) skip]]] any-string? :s [[any x]] 'else [qr: copy [quote 1] [(poke qr 2 :x) any qr] ] parse/case :s [any [b: set x skip r e: ( output: reduce/into [offset? :b :e :x] :output )]] either into [:output] [head :output] ] | |
BrianH: 11-Aug-2012 | Whoops, forgot a bracket: rle: func [ "Run length encode to series of [length value]" s [series!] "The series to encode" /into {Insert into a buffer instead (returns position after insert)} output [any-block!] "The output buffer (modified)" /compare "Comparator function for equvilance" comparator [any-function!] /local x r qr b e ] [ unless into [output: make block! 2] x: none r: case [ compare [[any [e: if (apply :comparator [:x :e/1]) skip]]] any-string? :s [[any x]] 'else [qr: copy [quote 1] [(poke qr 2 :x) any qr]] ] parse/case :s [any [b: set x skip r e: ( output: reduce/into [offset? :b :e :x] :output )]] either into [:output] [head :output] ] | |
Ladislav: 27-Aug-2012 | ,i.e. only in case the function is collected | |
Endo: 28-Aug-2012 | Why this doesn't work? e: func [] [f] context [f: does [print "ok"] do bind 'e self] ;error: f has no value or when I BIND the F inside E, still doesn't work: o: context [f: does [print "ok"]] bind first second :e o e ** Script Error: f has no value while this one works: do bind first second :e o == ok doesn't F stay BINDed? | |
DocKimbel: 28-Aug-2012 | In your first try (bind 'e self), you're binding only this 'e word, not the :e function body, so if you replace it with: bind second :e self, it will work. In second try, you're never binding 'e function body, you've just binded a new instance of 'f word that you have created using FIRST. That's why it works when you add DO, you're evaluating that new 'f instance which has the correct binding. Just remove FIRST, it will bind 'e body block and you'll get the result you've expected. >> e: func [] [f] >> o: context [f: does [print "ok"]] >> bind second :e o == [f] >> e ok | |
MarcS: 3-Oct-2012 | i don't follow your point re: recursing from anywhere (i.e., from non-tail position) | |
MarcS: 3-Oct-2012 | that was originally _args_ but i switched it out so that you could get a more readable recur call (i.e., cheekily make use of 'with' so that it read better) | |
MarcS: 3-Oct-2012 | not be pedantic, but i linked to that for the opening two sentences: In computer science, a tail call is a subroutine call that happens inside another procedure as its final action; it may produce a return value which is then immediately returned by the calling procedure. The call site is then said to be in tail position, i.e. at the end of the calling procedure. | |
Ladislav: 3-Oct-2012 | I think I included all your modifications Ladislav but shortly :-) - well, your version still - misses error handling - uses the arg-block passing method (which is a matter of preference, i.e. some may prefer that) - uses REDUCE which does not "tolerate" certain argument types | |
Steeve: 4-Oct-2012 | Ladislav, - uses the arg-block passing method (which is a matter of preference, i.e. some may prefer that) No it uses the regular passing method, like yours. - misses error handling True, though it's not that hard to figure where to add some throw-on-error. "- uses REDUCE which does not "tolerate" certain argument types" Good catch | |
Kaj: 10-Oct-2012 | #! /usr/bin/env r2 REBOL [] here: what-dir program: dirize clean-path here/../../../cms/files/program/PowerMezz do program/mezz/module.r load-module/from program module [ imports: [ %mezz/trees.r %mezz/load-html.r %mezz/html-to-text.r ] ][ ; print mold-tree load-html read http://osslo.nl/leveranciers make-dir %data for id 1 169 1 [ print id page: load-html read join http://osslo.nl/leveranciers?mod=organization&id= id content: get-node page/childs/html/childs/body/childs/div/childs/3/childs/2 body: get-node content/childs/table/childs/tbody ; print form-html/with body [pretty?: yes] ; print mold-tree body ; item: get-node body/childs/10/childs/2 ; print form-html/with item [pretty?: yes] ; print mold-tree item ; print mold item record: copy "" short-name: name: none unless get-node body/childs/tr/childs/th [ ; Missing record foreach item get-node body/childs [ switch/default type: trim get-node item/childs/td/childs/text/prop/value [ "Logo:" [ ; if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ ; repend record ; ['icon tab tab tab tab get-node item/childs/2/childs/a/childs/img/prop/src newline] ; ] ] "Naam:" [ if get-node item/childs/2/childs/1 [ repend record ['name tab tab tab tab name: trim/lines html-to-text get-node item/childs/2/childs/text/prop/value newline] ] ] ... "Adres:" [ unless empty? trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ street: get-node item/childs/2/childs/1/prop/value place: get-node item/childs/2/childs/3/prop/value number: next find/last street #" " street: trim/lines html-to-text copy/part street number unless empty? street [ repend record ['street tab tab tab tab street newline] ] unless empty? number [ repend record ['number tab tab tab tab number newline] ] unless place/1 = #" " [ where: find skip place 5 #" " repend record ['postal-code tab tab tab copy/part place where newline] place: where ] unless empty? place: trim/lines html-to-text place [ repend record ['place tab tab tab tab place newline] ] ] ] "Telefoon:" [ unless #{C2} = to-binary trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ repend record ['phones tab tab tab tab trim get-node item/childs/2/childs/text/prop/value newline] ] ] "Website:" [ if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ repend record ['websites tab tab tab trim get-node item/childs/2/childs/a/childs/text/prop/value newline] ] ] "E-mail:" [ if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ repend record ['mail-addresses tab tab trim/all get-node item/childs/2/childs/a/childs/text/prop/value newline] ] ] "Profiel:" [ unless #{C2} = to-binary trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ repend record [ 'description newline tab replace/all trim html-to-text form-html/with get-node item/childs/2 [pretty?: yes] "^/" "^/^-" newline ] ] ] ][ print ["Onbekend veld: " type] ] ] write rejoin [%data/ replace/all replace/all replace/all any [short-name name] #" " #"-" #"/" #"-" #"." "" %.txt ] record ] ] ] | |
MarcS: 12-Oct-2012 | I see that some folks use 'copy' on top-level bindings (i.e., foo: copy [], bar: copy "", bas: copy #{}). Is this simply stylistic (for consistency with initialisation inside of blocks) or am I overlooking a potential pitfall? | |
MarcS: 12-Oct-2012 | (i.e., i'm asking about 'foo: [1 2 3]' rather than 'bar: [1 2 3] foo: copy bar') | |
JohnM: 14-Nov-2012 | Thanks for the welcome back message. I left off asking about the mySQL driver. So I want to insert into a database a random number the code already generated and associate it with an email address that was provided by a CGI form. Have yet to create this in the real world but for now let us assume I will call the database "customers". The people who process the credit card and collect the email address advised me that the address will be labelled "trnEmailAddress". After finding the mySQL driver Here is what I figured out using placeholders for things like password, etc. Would appreicate knowing if this is correct. ; Loads MySQL driver do %mysql-driver/mysql-protocol.r ; Opens connection to MySQL server db: open mysql://[[user][:pass]@]host[:port]/database ; Send query to database server. Enters random number from above. customers is probably the name of the database I will create insert db ["INSERT INTO customers VALUES (?,?)" "trnEmailAddress" "token"] Next I need to insert an existing PDF file (an e-book) into a directory created by the script. The directory will be named after a random number that was earlier generated by the script. I am astounded that I can not find the command to copy a file. So the variable assigned to this random number is called "token". So I have the following. make-dir %token/ How do I copy a file into this new directory? Also, is that the corecct way to make a directory? | |
afsanehsamim: 23-Nov-2012 | result is like:[ ["c" none] ] [ ["a" none] ] [ ["t" none] ] [ ["a" none] ] [ ["e" "e"] ] [ ["r" none] ] [ ["o" "o"] ] [ ["a" "a"] ] | |
Ladislav: 23-Nov-2012 | then you may need some formatting like: print "<table>" foreach row result [print "tr" foreach cell row [print "td" ... , i.e. print out a HTML table specification | |
Cyphre: 23-Feb-2013 | ;key1 - contains public and private keys rsa-key1: rsa-make-key rsa-generate-key rsa-key1 1024 3 ;key2 - contains only public key rsa-key2: rsa-make-key rsa-key2/e: 3 rsa-key2/n: rsa-key1/n ;data to ecrypt encrypt data: copy/part checksum/secure mold now/precise 16 ;encrypt data using the key2 (with pub key only) crypt-key: rsa-encrypt rsa-key2 data ;decrypt data(that have been encrypted using key2) using the key1(needs to contain private key) data2: rsa-encrypt/private/decrypt rsa-key1 crypt-key either equal? data data2 [ print "decrypted data match the original - decription passed" ][ print "decrypted data differs from the original - decryption failed" ] | |
Cyphre: 23-Feb-2013 | the problem was you forgot to set the generator value (key/e) when makeing rsa-key2 | |
Gregg: 2-May-2013 | i.e., get the command, check if it's special and, if not, DO it. | |
Group: Databases ... group to discuss various database issues and drivers [web-public] | ||
afsanehsamim: 17-Nov-2012 | @TomBon: my query for joining two tables is :insert db["select * from data LEFT JOIN data1 ON data.oneone=data1.oneone"] and output is :[ ["c" "a" "t" "a" "e" "r" "o" "a" none none none none none none none none] ] plz tell me what should i write in query that i get values instead of none in output ? | |
afsanehsamim: 17-Nov-2012 | the output of this query insert db[{select * from data LEFT JOIN data1 ON data.oneone=data1.oneone}] is : [ ["c" "a" "t" "a" "e" "r" "o" "a" "c" "a" "t" "a" "e" "r" "o" "a"] ] | |
afsanehsamim: 17-Nov-2012 | i got this results:c c a none t t a none e none r none o none a none | |
Group: !Syllable ... Syllable free operating system family [web-public] | ||
Andreas: 27-Jun-2012 | How big are the Enlightenment libs? Does E have any peculiar build/runtime dependencies? | |
Group: !REBOL3 ... General discussion about REBOL 3 [web-public] | ||
Ladislav: 26-Dec-2012 | MDP is a dialect of Rebol. - actually, it is a dialect of Rebol exactly like C, i.e., not at all | |
Andreas: 18-Jan-2013 | The adaptation would be: make QUERY always take a second parameter, i.e. change from `QUERY target` to `QUERY target mode`. Let the MODE parameter be a block (or even unconstrained in type) to be used by the scheme implementation as seen fit. | |
GrahamC: 18-Jan-2013 | what exactly does mode do? ) >> query/mode %tiger.png none == make object! [ name: %/E/r3gui/tiger.png size: 6515 date: 26-Apr-2009/9:12:54+13:00 type: 'file ] >> query %tiger.png == make object! [ name: %/E/r3gui/tiger.png size: 6515 date: 26-Apr-2009/9:12:54+13:00 type: 'file ] | |
GrahamC: 18-Jan-2013 | >> query/mode %tiger.png 'size == make object! [ name: %/E/r3gui/tiger.png size: 6515 date: 26-Apr-2009/9:12:54+13:00 type: 'file ] | |
Gregg: 20-Jan-2013 | Ahhhh. So, is there every a case where we would want to maintain the sign (i.e. because we need the sign itself), or is "-0.0" preferred because it is more correct? | |
AdrianS: 11-Feb-2013 | So there's no short list (i.e. not something that goes into the kind of detail Bindology covers) of documented changes? In the meantime I asked this on StackOverflow: http://stackoverflow.com/questions/14818324/is-there-a-summary-of-the-differences-in-binding-behaviour-between-rebol-2-and-3 | |
Gregg: 26-Feb-2013 | ZIP support would be great. I've wanted it for a long time, but want more than just a "compress this value" function. i.e. it needs to work like a port or have an interface that lets us navigate, list, etc. | |
BrianH: 28-Feb-2013 | It's actually pretty easy to see how they managed it. It was: - A multi-language IDE (not a programming language, people already get those for free) - With a GUI with an emphasis on modern graphic design (pretty!) - With a fancy demo (more pretty!) - With an initial focus on programming languages and development platforms that are already popular (built-in customer base) Powerful IDEs are some of the only development tools that people are still willing to pay money for (i.e. Visual Studio). Most people can't choose what language they write in, but they more often can choose their IDE. And for crappy-but-IDE-friendly languages, an IDE can make all the difference in your productivity. They're not as helpful for really powerful extensible languages like Rebol or Perl, unless the language is so bad that just about anything would help (Perl). Plus, since an IDE is an end-user app you can afford to GPL it, since the only stuff built on it are add-ons - that doesn't work for programming languages unless they have a clear distinction between user code and built-in code that is distinct enough to not violate the GPL distinctions, because most of the competition is permissive - and without the GPL restrictions there is nothing to sell, so there is no business model to get a return on investment. It's nice to point to other open source projects and say "See! We could have done that!" but unless those are comparable projects their success isn't comparable either. | |
Ladislav: 12-Mar-2013 | hmm, but 1 = 1 + 0, i.e. the END value actually is reachable in the latter case | |
Ladislav: 12-Mar-2013 | for i 1 3 0.2 [print i] ; prints 1 ... 2.8 (end value is not included) - this is an arithmetic problem; 0.2 is not representable exactly by a binary floating point (i.e. decimal!) value. | |
Ladislav: 12-Mar-2013 | i.e. C language for () is not a FOR loop, in fact. it is a general loop | |
MarcS: 12-Mar-2013 | Sunanda mentions that 1.1.1 / .1 is correct under R2/Windows. Can't test that currently, but 9.9.9 is returned by R2/Linux (i.e., this behaviour doesn't look like a regression in R3).. | |
BrianH: 13-Mar-2013 | We are giving developers more control by saying that some stuff is under their control (i.e. the code blocks). We are providing some safety by saying that some stuff is presumed to be not under their control and thus possibly suspect (i.e. immediate-evaluation parameters to functions that they didn't write). We do screening of some stuff because that cuts down on the screening they have to do themselves. That way dvelopers can use functions and assume that they are safe to use by default. For instance, one advantage of #1993 FOR would be that they would have to go out of their way to make it do an infinite loop, since no combination of start, end and bump would generate one. That means that they wouldn't have to wrap calls to FOR in expensive conditional code, they can just pass in any values of those parameters and trust FOR to never go infinite without them expecting it. Your CFOR would not have that advantage, but since it takes code blocks for all parameters it is assumed that you are more careful about those code blocks, as you should be as a general rule in R3. It's about providing a balance. Complete consistency in how all parameters are treated regardless of their nature would not allow us to help developers where they need it. However, having a consistent policy that code must be treated more carefully by developers than non-code allows developers some flexibility while still allowing them to be careful. That is why code that developers provide explicitly is considered to be what they want to do, at least from the outside of functions. And you can make the distinction between code and non-code using simple type tests, which is why we have APPLY and ASSERT/type. | |
Gregg: 1-Apr-2013 | Anton, which is the behavior question. Do you expect SPLIT-PATH to return a target you can write to (i.e. a file)? | |
Maxim: 29-May-2013 | CTRL-E or the little pencil icon above text box | |
Ladislav: 5-Jun-2013 | A question for AdrianS or other lurkers: I already mentioned that SUMN actually used unevaluated argument passing style (APS). Do you find that style appropriate or would you prefer SUMN to use a different APS? (Consult https://github.com/saphirion/documentation/blob/master/argpass.mdp if you don't know what I am talking about). Advantages of using evaluated APS for SUMN: - argument can be a result of an expression, i.e., the function would be referentially transparent in the sense that it would accept expression results, e.g. sumn 1 2 * 3 Disadvantages of evaluated APS for SUMN: - (sumn 1 2) would not work since the function would miss a stopping argument Advantages of using literal APS for SUMN: - partiall referential transparency, the function can accept result of an expression, if the expression is in parentheses, i.e. sumn 1 (2 * 3) would work - partial referential transparency, sumn 1 :x * 3 would work - (sumn 1 2) would work, since the literal APS obtains the stopping #[unset!] Disadvantages: - sumn 1 2 * 3 would not work - sumn 1 x would not work either Advantages of using unevaluated APS for SUMN: - (sumn 1 2) would work, since the literal APS obtains the stopping #[unset!] at the end of the paren - sumn 1 (2 * 3) can be made to work if desired - sumn 1 x can be made to work if desired Disadvantages: - sumn 1 2 * 3 would not work - sumn 1 :x * 3 would not work | |
Group: Community ... discussion about Rebol/Rebol-related communities [web-public] | ||
Maarten: 31-May-2013 | I'm just wondering (really, just that): is dev capacity (i.e. Cyphre GUI. other's on OSX, 64 bit) the limiting factor to accelerate in the short term? Or money? |
world-name: r3wp
Group: Web ... Everything web development related [web-public] | ||
Gabriele: 31-Jan-2005 | i.e. spaces and newlines are treated as any other text content. | |
Group: Rebol/Flash dialect ... content related to Rebol/Flash dialect [web-public] | ||
Oldes: 5-Oct-2005 | go here: http://www.macromedia.com/cfusion/entitlement/index.cfm?e=file_format register and download | |
Alek_K: 24-Nov-2005 | It could be good commercial product to sell :) There are many users - and most free fonts are english only (same with tools for making fonts from handwriting f.e.). | |
james_nak: 5-Mar-2006 | Oldes, making some progress thanks to your help. There is one example with soem embedded rebol code (the arc example). Is there a way to have rebol do some processing then expose what it does to flash? I want to write a function in rebol to take a string and create a block of characters which I then want to pass to flash. For example, I can hardcode a_block: ["h" "e" "l" "l" "o"] but I would rather send the string "hello" to a function and have it generate that block then pass it to flash. It seems that what I do within a "rebol [ ]" block is hidden from flash. | |
Oldes: 5-Mar-2006 | doAction [ info: rebol [now] info: reform [(rebol [rejoin ["h" "e" "l" "l" "o"]]) "now is:" info] ] | |
Oldes: 5-Mar-2006 | doAction [ rebol [ myRebolBlock: ["h" "e" "l" "l" "o"] ;this is Rebol's variable rswf/compile-actions compose/only [info: (myRebolBlock)] ] ] | |
Group: Plugin-2 ... Browser Plugins [web-public] | ||
JoshM: 4-May-2006 | WRT to the 1.3.3 release: I'm going to need your help on sifting through all the "noise" (i.e. everyone's opinion about we should have or not have) to drill down to the features that are absolutely necessary for this release. |
1 / 1172 | [1] | 2 | 3 | 4 | 5 | ... | 8 | 9 | 10 | 11 | 12 |