World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
btiffin 3-Aug-2007 [677] | 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 [678] | 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 [679] | 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. |
Geomol 4-Aug-2007 [680] | Yeah, it started with you Brian pointing out, that none is not always none. I then extrapolated on that idea to include all datatypes, not just none!. |
Gabriele 4-Aug-2007 [681x3] | 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. |
the issue is another - that some values do not have a mold representation. | |
they should all have a mold/all representation though (well, of course there are exceptions, like native! and so on.) | |
Geomol 4-Aug-2007 [684] | 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 [685] | obviously integer! is a word |
Geomol 4-Aug-2007 [686] | :-) It may not be obvious to everyone! We're in the "I'm new" group. |
Gabriele 4-Aug-2007 [687x10] | there are only a few special chars |
like @ and : | |
no, i'm saying, that you don't need a table, you just need to know the syntax | |
1) words cannot start with a digit | |
so, if it starts with a digit, it's not a word | |
2) words cannot contain " @ : $ % ( ) [ ] # | |
so if you have one of those chars, it's not a word | |
ah, , too | |
3) / is a special case, in that / // /// //// are words, but otherwise you can't have it in words | |
there may be one or two more rules, but that's it. you don't need a table. | |
Geomol 4-Aug-2007 [697] | Good explanation! |
Gabriele 4-Aug-2007 [698] | eg you can't start with ' either |
Geomol 4-Aug-2007 [699] | 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 [700x4] | i think, these should be listed somewhere in the core guide. |
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. | |
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). | |
it's to avoid letting people grow with "wrong" ideas ;-) | |
Geomol 4-Aug-2007 [704] | 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 [705x5] | that's the difference between not having a mold representation and having it. |
none values mold to a word. so, yes, it's a word you see there. | |
you see a word not because there's a word in the block, but because none values mold to a word. | |
it's MOLD the issue here, not NONE!. | |
(neither WORD!) | |
btiffin 4-Aug-2007 [710x2] | 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. |
And as you are pointing out now...the issue is goes deep enough to warrant discussion among high level REBOL programmers, although perhaps not at the 'tieing shoelaces' level. :) | |
Gabriele 4-Aug-2007 [712x3] | but if you tell newbies that sometimes none is none and sometimes not, you're just confusing them. |
not telling the truth is always against learning | |
so, you just tell the truth: MOLD is cheating. just use MOLD/ALL to see what's actually there. | |
btiffin 4-Aug-2007 [715x2] | 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. |
Right now, I think I'm at the stage to just know enough to be dangerous. :) This particular conversation has helped immensely in gaining the proper vocabulary (for this issue), the next issue is just over the horizon :) | |
Geomol 4-Aug-2007 [717x2] | :-) 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. |
A summary of REBOL datatype values can be found here: http://www.rebol.com/docs/core23/rebolcore-16.html | |
PeterWood 4-Aug-2007 [719x2] | 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) |
ie should be eg | |
Gabriele 5-Aug-2007 [721x2] | 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. |
directly and "indirectly" is quite vague. | |
Geomol 5-Aug-2007 [723] | 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 [724] | Why do you say that 123 ends up as a number! instead of a word! ? >> type? 123 == integer! |
Gabriele 5-Aug-2007 [725] | 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 [726] | 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. |
older newer | first last |