World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
btiffin 1-Aug-2007 [650x2] | REBOL is both and more. :) But in that last example, although you may have passed the "unevaluated" logname, the function by using the value reference, evaluates it. :) |
Try func [:val] and func ['val] for even more fun | |
RobertS 1-Aug-2007 [652] | wilco ;-) |
btiffin 1-Aug-2007 [653x5] | The lexical scanner will pass the "uneval" value in the first case and the literal value in the second. It is tricky, but it slowly starts to make sense. |
But I recommend practise, and let yourself be confused. :) | |
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. :) | |
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. | |
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 [658] | 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 1-Aug-2007 [659] | :) I've never actually read the books...everything I know is from the Core manual, experiments and the guys here. |
btiffin 2-Aug-2007 [660x2] | 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. |
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 [662x3] | The online Core guide is still the best overall language reference IMO. |
Core manual rather; agreeing with Brian. | |
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 [665] | 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! |
Gregg 2-Aug-2007 [666] | All words are seen as words, unless reduced. >> blk: [none true :word word: 'word integer! 1 1.0 1.0.0 $1 1x1 "string" <tag> [name-:-host] #i ssue] == [none true :word word: 'word integer! 1 1.0 1.0.0 $1.00 1x1 "string" <tag> [name-:-host] #issue] >> head forall blk [change blk type? first blk] == [word! word! get-word! set-word! lit-word! word! integer! decimal! tuple! money! pair! string! tag! email! issue!] >> blk: reduce [none true 'word integer! 1 1.0 1.0.0 $1 1x1 "string" <tag> [name-:-host] #issue] == [none true word integer! 1 1.0 1.0.0 $1.00 1x1 "string" <tag> [name-:-host] #issue] >> head forall blk [change blk type? first blk] == [none! logic! word! datatype! integer! decimal! tuple! money! pair! string! tag! email! issue!] |
Anton 3-Aug-2007 [667] | Geomol, such a list cannot be made, if I understand you correctly. |
Geomol 3-Aug-2007 [668] | 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 [669] | 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 [670] | 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 [671] | 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. |
Geomol 3-Aug-2007 [672] | *It would be cool* |
Henrik 3-Aug-2007 [673] | hmm... that's a good idea. :-) |
btiffin 3-Aug-2007 [674] | 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. |
Gabriele 3-Aug-2007 [675] | hmm, not sure i understand here. what do you want to add to docbase? |
btiffin 3-Aug-2007 [676x2] | 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 :) |
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? |
older newer | first last |