AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 5907 |
r3wp | 58701 |
total: | 64608 |
results window for this page: [start: 19301 end: 19400]
world-name: r3wp
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
PatrickP61: 23-Jul-2007 | Hey Gregg, Thanks for the code. I tried it out and while there is a few hicups, I am planning on using that code when I create an Excel CSV version in addition to the Tab delimited version. Thank you! | |
Gregg: 23-Jul-2007 | Let me know what the hiccups are, if you can, so we can get a solid version out there for people to use. Thanks. | |
RobertS: 1-Aug-2007 | can you tell me why to-file does not care if a word holding the value of a file name is presented as | |
RobertS: 1-Aug-2007 | source to-file is very simple to-file: func [value] [ to file! :value ] ; which seems to apply : to a get-word! in the first case | |
RobertS: 1-Aug-2007 | Put another way, what is the rule for when a word must explicitly bear the sigil prefix of : ? I.e., when is a get-word! required and when does any word suffice? ::word is an error but to file! :myString in a func is no different from to file! myString and how do you pur carriage-returns into this message-post box! ;-) | |
btiffin: 1-Aug-2007 | Robert. get-words are "unevaluated", so no code will execute getting to the value. Most datatypes will return the same value for get as for evaluate. But getting functions will return the function, not the result of evaluating the function. Umm, that's probably not a Ladislav level answer, but it's how I think about it. | |
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: 1-Aug-2007 | For instance. a: now gives you a date time field that won't change whenever you reference a or get a and it's type is date! a: :now gives you an a that will be the current time whenever it is evaluated., but if you get-word a with :a or get 'a you get back the native, not the datetime, so a's type reports as native! It's funky and fun. | |
Gregg: 1-Aug-2007 | Brian's explanation is good; it's something to play around with in the console, to get a feel for things. | |
RobertS: 1-Aug-2007 | what seems a little spooky is the way the behavior Gregg illustrates disappears when I define to-file as to-file: func [value] [to file! value] ; cool - or spooky | |
btiffin: 1-Aug-2007 | It's a weird time in Altme as well. The gurus that are usually around to give very detailed and exact wording to these issues are all busy with R3, so show up here on a less regular basis. You may have to filter through some tier B rebol explanations for the next few days. :) | |
btiffin: 1-Aug-2007 | Now having said that...Gregg, Geomol, many many others dish out good help...but watch for Gabriele, Ladislav and some others as they seem to have a gift for explaining things so a computer would understand without ambiguity. | |
btiffin: 1-Aug-2007 | I'm in a catch-22 now...Gregg and John are gurus, they speak human and computer...Gabriele and Ladislav are gurus, they speak computer and human...Gregg and John are gurus, they speak computer and human...Gabriele and Ladislav are gurus, they speak human and computer... Just like REBOL, I know what I want to say but it's deeper than I can express. :) | |
RobertS: 1-Aug-2007 | Thanks - I don't discourage easily... The Rebol for Dummies is not too very helpful on some points - I now like the 'Official Guide' a lot for the path it takes, but some of the typos/misprints must have irked Carl ;-) | |
btiffin: 2-Aug-2007 | Robert and all; I just bumped into this one again...so I thought I'd mention it. none is a weird value, in that it usually looks like none, but a lot of time is 'none the word!, not the value none of type none! My suggestion...when starting out, get used to typing #[none] a: [none none] type? first a is word! and none? will test false. a: [#[none] #[none]] nice and safe... type? first a is none! and none? will test true. | |
btiffin: 2-Aug-2007 | Umm, get used to typing [#none] if you are putting none into a block that is. a: none does what you'd expect. | |
Gregg: 2-Aug-2007 | Sometimes MOLD can be very helpful, along with TYPE?, to see if things are what you think they are. NONE, datatypes, etc. can be tricky at times, to know if they are a word or the value. | |
Geomol: 2-Aug-2007 | Is there a list anywhere of what values are actually their expected values, and what values are seen as words, when inside a block? As in: blk: [none 1 1.2 integer! [email-:-somewhere-:-net] #an-issue 127.0.0.1] etc. etc. If not, someone should make one such list! | |
Anton: 3-Aug-2007 | Geomol, such a list cannot be made, if I understand you correctly. | |
Geomol: 3-Aug-2007 | Ok, why not? I was thinking about something like Gregg just did, but with all the datatypes. Putting the different datatypes in a block with a simple assignment and then check, how they're seen by REBOL. | |
btiffin: 3-Aug-2007 | Carl wants such a list for form, mold, to string!, format (but that's R3), add the serial form, score some points and help the beginners in one grand pdf-maker datatype file. Not much to ask, is it John? :) | |
Geomol: 3-Aug-2007 | I would be cool, if we could kick some of the new ones to make such a list. It would be a good learning experience. | |
btiffin: 3-Aug-2007 | I think it'll be a very useful and worthy entry for DocBase, but it would also be nice to use Gabriele's PDF-MAKER or other page layout for a nice reference sheet printout. | |
Henrik: 3-Aug-2007 | hmm... that's a good idea. :-) | |
btiffin: 3-Aug-2007 | So...get RT to open DocBase and I'll start right now, oh yeah and R3 beta for access to format :) Kidding... I was going to be playing with PDF-MAKER today, to see if I can add print functionality to the Desktop Librarian...maybe I'll use this as a good way learn the dialect. So unless someone else steps up...I'll take a kick at it, for R2 datatypes anyway. | |
btiffin: 3-Aug-2007 | I was just kidding...I'm about half way through using your pdf-maker (v2) to document the R2 datatypes regarding to string! form mold. Blog http://www.rebol.net/r3blogs/0092.htmlbut like I everything I do now-a-days, it comes pre-expired :) | |
btiffin: 3-Aug-2007 | To all...by the way, check out Gabriele's pdf-maker.r in rebol.org (the docs have a pointer to the new in-progress work for pdfm2). Maybe we'll get printing from REBOL sooner than later. :) | |
Gabriele: 4-Aug-2007 | ah, a table with all datatypes and how they convert to string? that didn't seem to be what John was talking about :) anyway... we have something like that ;) | |
btiffin: 4-Aug-2007 | True. John is (I think) talking about a little more, the unevaluated, evaluated, versus serialized issue. Like when is false false, versus (non-obviously) 'false and true. | |
Gabriele: 4-Aug-2007 | none is always a word. of course, if you reduce the word, you get the value. like print is always a word, but if you get it you get the function :-) so there is no mistery, words are just words. | |
Gabriele: 4-Aug-2007 | the issue is another - that some values do not have a mold representation. | |
Gabriele: 4-Aug-2007 | they should all have a mold/all representation though (well, of course there are exceptions, like native! and so on.) | |
Geomol: 4-Aug-2007 | The problem is maybe to distinguish words from other things. Is integer! a word? Is [gabriele-:-somewhere-:-world] a word? Try: blk: [integer! [gabriele-:-somewhere-:-world]] type? blk/1 type? blk/2 | |
Gabriele: 4-Aug-2007 | obviously integer! is a word | |
Gabriele: 4-Aug-2007 | there are only a few special chars | |
Gabriele: 4-Aug-2007 | no, i'm saying, that you don't need a table, you just need to know the syntax | |
Gabriele: 4-Aug-2007 | 1) words cannot start with a digit | |
Gabriele: 4-Aug-2007 | so, if it starts with a digit, it's not a word | |
Gabriele: 4-Aug-2007 | so if you have one of those chars, it's not a word | |
Gabriele: 4-Aug-2007 | 3) / is a special case, in that / // /// //// are words, but otherwise you can't have it in words | |
Gabriele: 4-Aug-2007 | there may be one or two more rules, but that's it. you don't need a table. | |
Geomol: 4-Aug-2007 | I still think, it will be good to have a list of examples, so it can be actual seen, what all this means. You and I understand it, but does everyone else? | |
Gabriele: 4-Aug-2007 | hmm. examples of valid and invalid words? agreed. but it's a different thing from a table with all datatypes and saying that some of them are words - that's confusing; only values of the word! type are words. | |
Gabriele: 4-Aug-2007 | what you say instead is that some values do not have a mold representation, so that they mold to something that once evaluated, returns the value (eg make object! ... and so on). | |
Geomol: 4-Aug-2007 | We might move to beyond "I'm new" here, but we have a slighty different understanding, I think. none is always a word There is a possible trap here for the new one. This is output from my terminal: >> blk == [none] Is that "none"-word a word in the REBOL understanding of a word? It depends on, how I made it. Did I write: >> blk: [none] == [none] or did I write: >> blk: [] == [] >> append blk none == [none] For the programmer being new to REBOL, it may be hard to see the difference. And the sentence "none is always a word" may only apply to the situation, where values are being fed into REBOL, not when I write: >> blk == [none] Or what? | |
Gabriele: 4-Aug-2007 | that's the difference between not having a mold representation and having it. | |
Gabriele: 4-Aug-2007 | none values mold to a word. so, yes, it's a word you see there. | |
Gabriele: 4-Aug-2007 | you see a word not because there's a word in the block, but because none values mold to a word. | |
btiffin: 4-Aug-2007 | Gabriele; "there is no mystery, words are just words". I'll reiterate what John said. It may not be obvious to everyone. It's like tying your shoelaces. Once you know, you just "know" and it becomes impossible to "not know". But until then it's a mystery and you trip over your shoelaces. none always looks like none. There is nothing obvious in a: none a: [none] until you trip. Then you know, kinda. It is very very easy to trip over if first [false] ["I trip"]. The fact that false and #[false] are two completely different things needs to be disseminated to the new user, explicitly. Mainly because in trheory it is obvious, in reality it is mysterious. | |
btiffin: 4-Aug-2007 | Yeah, I explained to Robert that the group here may have to suffer through some 'Tier B' advice :) There is a knack to explaining the deeper issues that can only come with enlightenment. I have been trying to explain that the visible none is not the value none, but lack the vocabulary, based on the lack of deep understanding and experience. It will come. | |
Geomol: 4-Aug-2007 | :-) We're getting closer! Ok, we have words and we have datatypes. Words are also a datatype, namely of the type: word! The exercise then is to figure out, which datatypes can be put in a block with a simple assignment, and which are simple words, even if they look like being of another datatype, when they are typed in. | |
Geomol: 4-Aug-2007 | A summary of REBOL datatype values can be found here: http://www.rebol.com/docs/core23/rebolcore-16.html | |
PeterWood: 4-Aug-2007 | I see it from a different point of view: A word is a value; all values have a datatype. All values are evaluated by Rebol. Some values evaluate directly (ie 1, 1.999) Some values evaluate indirectly (ie a, b c) | |
Gabriele: 5-Aug-2007 | i'd say that differently. some values evaluate to themselves; other values evaluate to some other value. a paren evaluates to the result of DOing it. a word evaluates to the value it's bound to. a lit-word evaluates to the respective word. and so on. | |
Geomol: 5-Aug-2007 | Gabriele, what is the correct way to specify, what's happening with a simple block assignment, like: blk: [a-word 123] It's kind of partly being reduced, so 123 ends up as a number! instead of a word!. | |
PeterWood: 5-Aug-2007 | Why do you say that 123 ends up as a number! instead of a word! ? >> type? 123 == integer! | |
Gabriele: 5-Aug-2007 | 123 is always a number. no evaluation needed. words cannot start with a digit so 123 never gets loaded as a word value. | |
Geomol: 5-Aug-2007 | From the previous discussion I got the impression, that everything is words, when they're typed in, or viewed as output. My reasoning goes as: if NONE is a word when inside a block (initally without specifying, what we do with that block), then everything inside a block must be words (initially). Then the input parser take that block and figure out, what's inside. Some of the stuff inside ende up as other datatypes (in this case integer!), others are left as words. Or? What I find a bit peculiar is, that things like [integer! none +] are left as words and not being parsed to the expected datatypes. | |
Gabriele: 5-Aug-2007 | only things that have a syntax that matches a word! are parsed as words | |
Gabriele: 5-Aug-2007 | a b c d ... all match the syntax for word! values and are loaded as such. the spelling does not matter at all. from the point of view of load, there is absolutely no special meaning to the word none or the word false. they are just word values like any other word value. | |
Geomol: 5-Aug-2007 | Ah, I'm beginning to see the light! If integer! shoud be seen as a datatype!, then it has to 'read' the on the word somehow, and if "!" was used to distinguish it, then I couldn't use "!" in my own words. And none is just a word, nothing special about it's presense. And I could have my own none values, like: my-none: :none But but but ... why doesn't it look it up and see, if that word has a value? Will that give problems? *thinking* | |
Gabriele: 5-Aug-2007 | looking up the values of words is something that is not what LOAD is supposed to do. you could load a dialect block or just some data. words can be used just as symbols, not to reference values. | |
Geomol: 5-Aug-2007 | So to sum it all up. To attack the problem, Brian original posted about none being a word! sometimes and being none! sometimes, programmers should learn the rules about, how REBOL distinguish values. The special char rules, Gabriele pointed out up there. And then, if none of those special chars are encountered, the sequence of characters are just seen as a word. Is this correct? :-) | |
Gabriele: 5-Aug-2007 | Geomol, i think that's correct, but i may have missed a few chars or rules, so please check the core guide. | |
RobertS: 5-Aug-2007 | re: comments in 'core' on the plague of MI ... multiple inheritance works rather nicely in Curl since you are required to provide 'secondary' constructors - I prefer prototype-based with an option for class hierarchies, personally ( try experimenting with Logtalk if you can find time ). I am watching Io, the language, evolve as Rebol3 emerges: what is interesting to me is that I ask 'But is that Oz ?' in Oz. ( which is multi-paradigm ) I used to hear a lot of 'getting it' about Prolog and Smalltalk. After almost 2 decades in both, I think many of them "didn't get it" ( class hierarchy obsessed, as ST purists are/were ). Ruby is so much like Smalltalk that I am quite enjoying watching Groovy play catch-up with Ruby Most issues in Rebol have a parallel in Javascript; where ( for the neophyte) experiments with typeof in a console is about the only way for the average developer to 'get it' given d1 = Date // now you use d1 as a function d1() d2 = Date() // d2 is a string that looks like a number d3 = new Date() // d3 is an object but it is UTC but it is presented local time but it is compared UTC .... or s1 = "string" s2 = String("string") s3 = new String('string') s3[1] = 6 // s3 is an object, as typeof of reveals; String 'equality' in JavaScript even with === is no end of grief and for what convenience ? s3["size"] = 6 or a1 = Array(42) a2 = new Array(42) I think the latter 2 show just how rushed LiveScript was pushed/forced out to market as "LavaScript" before the Sun "StrongTalk" folks had much influence on the Netscape folks .... Rebol3 is in better hands than 'ActionScrtpt' as it drifts into classes - because it is being kept 'in hand'' The changes in Groovy as it complied with the JSR for Java scripting are interesting ( Groovy is almost neat as Rebol would be if it were confined to, say, living on top of VisualBasic ;-) Now to avoid 'Rebol on Rails' ... I think some people who adopted Spring to cope with Java would appreciate Rebol ( there, too, you have to 'get it ' ) MySubClassObject.prototype = new MyParentClassObject() // now go mess with THAT object before it is useful ... // ... MySubClassObject.prototype.superclass = MyParentClass // to fake having a superclass other than Object cannot be much easier to "get" than anything about Rebol use ; now mostly use /local and bind ; modifies the block it is passed; use COPY refinement to preclude this side-effect Smalltalk80 was like "Rebol4" as compared to the first passes at an O-O language ... someone who actually understands Smalltalk contexts/blocks and JavaScript should 'get it' with Rebol ( some of those people are using Seaside with Squeak, Dolphin and/or VisualWorks ST ) my 2 cents: a1 should have been an array of fixed size and only a2 should be a Vector object | |
RobertS: 5-Aug-2007 | I meant that I don't much ask ''But is that Oz?" the way we ask "but is that "Rebol?" or "But would that be Rebol?" It comes from my aversion to the questions/attacks of purists who insisted that Turbo Prolog was not really a PROLOG. Neither is what Prolog became (Prologia IV) The Slate team for Smalltalk3 ( if you think of JavaScript as Smalltalk2 [heresy] ) now have Self and Strongtalk to look over with 15+ years of hindsight. It appears to have slowed them down a lot. I can't wait to get my hands on that Rebol3 beta ... PS if you don't think JavaScript was Smalltalk2, just look at Io, the language ;-) PPS the author of CTM was probably asking himself "But will they see that this is not Oz? " with every chapter (Peter Van Roy, 'Concepts, Techniques and Models of CP', MIT Press) - the O-O chapter is arguably the worst flaw in a fine MIT intro book - unless it is the flaw of totally ignoring JavaScript as a functional prototype-based lang. ( and I don't recall mention of Curl or Rebol ) Another language evolving: Cecil into Diesel | |
RobertS: 5-Aug-2007 | ah, c'mon mold/all reduce [ does [ join "Rebol" "3"]] is cute ... ( as I wait to be reduced to a puddle one atom thick for failing to fit the mold ) I'll keep my posts, well, shorter. Promise. sorta | |
RobertS: 5-Aug-2007 | ;; this is neat mold make object! ["test"] ;; warning: to preserve a spec block be sure to use obj: make object! copy/deep specBlk ;; copy/deep issues are rampant in Smalltalk ( if you get the impression that I think Smalltalkers neglect Rebol, yer rite ) | |
Gabriele: 5-Aug-2007 | geomol, that's a bug. i think it's in rambo too. | |
RobertS: 5-Aug-2007 | load mold/all reduce [does [join [ Rebol" "3" ]] ;; thanks. In STSC APL we could use 'load' or 'laod' ... laod: :load ;; Rebol3 is free of wordspace worry size anxiety ;; my Rebol tutorial would include something on quotes , such as >>'test' == test' >>mold 'test' == "test''" >>mold join 'test' "tested" ; note use of {} to avoid double double-quotes >> ""test"" ;; error - but which error and why? >> "'test''" ;; be-aware that PDF files may use left-single-quote, right-single-quote, left-double-quote and single-quote != apostrophe != backtick ... ;; and definitely something to include >> help rejoin >> source rejoin ( I am now talking with a publisher. Hurray! The hard part is behind me! Now to have some fun ... Dead-line? What dead-line was that? When!? ) | |
RobertS: 5-Aug-2007 | ;; 24Arghhh!{]}[' there was a typo 2 posts back ... cannot go back 4 2 posts ... ;; load mold/all reduce [does [join [ "Rebol" "3" ]]] ;; typo. Arggh!!! in code ending: " thanks. In STSC APL blah-blah " laod: :load laod mold/all reduce [does [rejoin [ Rebol" "3" ]]] ;; better laod mold/all reduce does [join [ Rebol" "3" ]] ;; huh? mold/all reduce does [join [ Rebol" "3" ]] ;; oh ... comment { [func [][rejoin ["Rebol" 3]]] versus {#[function! [][rejoin ["Rebol" "3"]]]} } | |
RobertS: 5-Aug-2007 | pg 329 ff of the old 'Official Guide' book is a treatment of reduce [none] that is so very fine, I suppose, because so well-motivated by its context. >> type? first reduce [none] ;; compare this to: type? first [none] >> type? first reduce [yes] ;; compare this to: type? first [yes] | |
RobertS: 25-Aug-2007 | ; this also not so obvious about index versus path blk: [ t' t'' t''' ] blk/t' blk/1 blk/t': 42 blk set blk/1 21 blk blk/1 :blk/1 get blk/1 blk2: [ a' b' c' ] set blk2/a' 42 blk2 blk2/2 blk2/a' get blk2/a' | |
Henrik: 25-Aug-2007 | actually what you are finding confusing, I think, is a simple rule that paths point to the next element in the block, where index does not. | |
Henrik: 25-Aug-2007 | so it works like it should :-) but this is the rule. this way you can quickly access words in a block through a path. | |
RobertS: 25-Aug-2007 | ; one thing I failed to note with the set and get >> aWord ** Script Error: aWord has no value ** Near: aWord >> 'aWord == aWord >> aWord ** Script Error: aWord has no value ** Near: aWord >> word? aWord ** Script Error: aWord has no value ** Near: word? aWord >> word? 'aWord == true >> a: 'aWord == aWord >> aWord ** Script Error: aWord has no value ** Near: aWord >> word? :a == true >> :aWord ** Script Error: aWord has no value ** Near: :aWord >> :a == aWord ; this seems worth getting clear: that a word can be a value and still not be used until it has a value | |
RobertS: 25-Aug-2007 | More and more I think that was is not obvious is no longer obvious once it is obvious There is an 'active' LISP tutorial that would be a good model for a 'Rebol for newbies' I would like to use the approach taken in the 2.3 "Official Guide" book to introduce unit testing in Rebol for TDD "from-the-get-go" In Smaltlalk we used to count on newbies exploring in a workspace: we reaped a culture where people thoght the point of O-O was to write subclasses and create deep hierarchies like, say, Collection. What was obvious was just wrong. Messages were the point, not classes, let alone sub-classing. Am I wrong to suggest to anyone new: "buy as used copy of "The Official Guide" " ? For Oz, which is so much like Rebol, I do not hesitate to recommend Peter Van Roy's CTM from MIT Press. Scheme has 'Little Schemer' and 'Simply Scheme' The latter would be my model for an interactive tutorial in which you LEARN. Smalltalk was supposed to be about how we model things ( how we learn how things interact ) I think it fair to say that it failed. Classes were not the point. Objects were not the point. Things went wrong early on in abandoning the Actor Model in early 70's I am hoping Rebol3 is getting it right ;-) ( Io, the language, is quite inspiring ( www.iolanguage.com ) but I still think Oz is a great intro to Rebol (they, too, lack an effective learning tool to "think in Oz " ) | |
Henrik: 25-Aug-2007 | robert, we are building a Wiki for R3. would you be interested in doing smalltalk vs. prolog vs. other-languages-you-know vs. Rebol? | |
RobertS: 26-Aug-2007 | Can u tell me why we use datetype unset! in the func list-dir but not in the func to-logic I.e. why do we not have to logic! return false when I pass in it an unset! ? Or am I missing something here ? Maybe I miss what is the diff between 'qwetr being type set-word! and it not having a binding yet or my having sent unset 'qwetr Is this like the diff in other lang's between nil_or_null and undefined_or_undeclared ? | |
RobertS: 26-Aug-2007 | oh I see listdir ; the param is not there, i.e., we have something unset! listdir qwetr ; errror But could the latter not return false a la negation-as-failure meaning I cannot browse your putative directory ? I guess I am asking " What is the Rebolesque way of seeing this? " | |
RobertS: 26-Aug-2007 | Say i have a: [ 1 b 2 ] now list-dir to-url a/2 a/2 ; b ; I see this as different from list-dir this-word_occurs _nowhere_in_this_context list-dir this-word-has-no-binding-yet-in-this-context to-logic a/2 ; this would be false to-logic a/qwetr ; i don't know what to think to-logic qwetr ; my question ( I thought ? ) | |
btiffin: 26-Aug-2007 | Robert; By definition in REBOL the only logical false values are #[false] and #[none] So for instance, integer! 0 is logcally true, which took me by surprise at first, but that is the way of REBOL. Surprise! Usually pleasant. :) Aside: The other words that evaluate as false; no, off (others?) do not have a pure lexical form so, #[off] is not a loadable value but the word off still evaluates to #[false]. And to logic! get/any 'an-unset-word will evaluate as #[true], as back to the defintion, only #[false] and #[none] are false. As far as I understand it anyway. | |
btiffin: 27-Aug-2007 | It is kinda Born and raised with 0 false 1 true (actually being a polyFORTH coder) 0 false 1 true -1 really true. The whole all bits on argument. :) | |
RobertS: 27-Aug-2007 | I have written an alternate form of the func WHAT that dumps to a file ( I have only 481 global functions at startup ) I will try to find time to build a page that gives clicks for SOURCE and HELP for each func in a given file dump (and maybe group them) I tried messing with PRINT but that broke HELP and SOURCE ;-) | |
RobertS: 29-Aug-2007 | Thanks. btw I saw this on MAP on the Rebol3 group >> map [where:] [1 2 3 4 5 6] [take/part where 2] == [[1 2] [3 4] [5 6]] ; Graham said not too intuitive - I prefer the solution you suggested to me a few days back ; Will we have FOLD in Rebol3? If so, it should be intuitive, as should any MAP imho TAKE inside a MAP is counter-intuituve to me cuz MAP should not ;be slice-n-dice ... PARTITION/pairs PARTITION/triples partition/4 etc | |
Gabriele: 30-Aug-2007 | usually you just do something like map [a b] [1 2 3 4] [a + b] | |
Gabriele: 30-Aug-2007 | a simple fold is: | |
RobertS: 30-Aug-2007 | ; Just FYI ... Ladislav Mecir has an excellent page on bind at http://www.fm.tul.cz/~ladislav/rebol/contexts.html But it does not warn you not to try >> someWord: make word! ":test:" >> print bind? 'someWord ; BAD IDEA I am fine with >> none? bind? 'someWord or >> equal? bind? 'someWord bind? 'someContext Printing the global context seems like a bad idea, at least when my PC is carrying a heavy load ;-) | |
Gabriele: 31-Aug-2007 | the size of that depends on what you've done in the session. if you started the view desktop for example, you're going to get quite a big result ;) | |
RobertS: 31-Aug-2007 | on another topic (how like me :-) >> source does ; leads naturally to >> source throw-on-error ; which is a good read ... for me, anyway | |
RobertS: 31-Aug-2007 | ; tutorials on series and find/part ; I may be alone in thinking that without experimenting, a newbie will miss this ... here is my experiment ; the docs say part will accept a 'range' but give no clear indication what a 'range' is in 2.x text: { Tested this before. Then test these. } start: find text "this" end: find start newline item: find/part start "this" end print item index? find text "this" index? start length? start index? end length? end head start head end index? item head item ; by now you get that Ah-Hah experience or Eureka! or 'hot-damn!' as the case may be ... | |
RobertS: 31-Aug-2007 | ; the docs say /part - Limits the search to a given length or position. range - The range argument. (must be: number series port) ; but it is not clear how to pass in that range argument as a 'position' let alone a series or port ; the only sign of something going wrong other than an error is that the 'end' is simply spit back out at the console, i.e., no error but bogus 'result'' | |
RobertS: 31-Aug-2007 | ; last words of the horse thief on the gallows: 'It has all bin a lesson to me' >> equal? start end ; false >> equal? head start head end ; true | |
RobertS: 31-Aug-2007 | >> item: find/part start "this" my-port ; when range is port we must be reading 'start' from a data-source ( ? ) | |
RobertS: 31-Aug-2007 | ; as a newbie I found this useful ... >> tt: "this is my test of X which will fix the XY thing" >> token: find/part tt "X" find tt "is" ; == none >> token: find/part tt "X" find tt "thing" ; == "X which will fix the XY thing" | |
RobertS: 31-Aug-2007 | ; I did a dif between the functions in VIEW and those in CORE for a default install. What I get is this ( I hope it is useful to have al 106 in one place ) alert brightness? caret-to-offset center-face choose clear-face clear-fields confine crypt-strength? dbug deflag-face desktop dh-compute-key dh-generate-key dh-make-key do-events do-face do-face-alt do-thru draw dsa-generate-key dsa-make-key dsa-make-signature dsa-verify-signature dump-face dump-pane edge-size? editor emailer exists-thru? find-key-face find-window flag-face flag-face? flash focus get-face get-net-info get-style hide hide-popup hilight-all hilight-text hsv-to-rgb in-window? inform insert-event-func inside? install launch-thru layout link-relative-path load-image load-stock load-stock-block load-thru local-request-file make-face notify offset-to-caret open-events outside? overlap? path-thru read-net read-thru remove-event-func request request-color request-date request-dir request-download request-file request-list request-pass request-text reset-face resize-face rgb-to-hsv rsa-encrypt rsa-generate-key rsa-make-key screen-offset? scroll-drag scroll-face scroll-para set-face set-font set-para set-style set-user show show-popup size-text span? stylize textinfo unfocus uninstall unlight-text unview vbug view viewed? win-offset? within? | |
Gabriele: 1-Sep-2007 | range can be port only if you are searching a port too - but, not 100% sure how well that works. i bet it only works on buffered ports though. | |
RobertS: 3-Sep-2007 | ; this is handy if you are new as am I >> foreach t (sort/compare datatypes func [a b] [ (form a) < (form b)]) [print mold t] | |
RobertS: 3-Sep-2007 | SYMBOL! is internal houskeeping for names of words (?) and a routine! is for working with a call to a DLL ( of my 54 datatypes in a 2.6.3 VIEW exec ) | |
Allen: 3-Sep-2007 | Robert you can get a similar list by doing |
19301 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 192 | 193 | [194] | 195 | 196 | ... | 643 | 644 | 645 | 646 | 647 |