r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

PatrickP61
2-Mar-2009
[2525]
I found the answer,  It is ONLY if the two are the same object
kib2
2-Mar-2009
[2526]
I know that = compares values, == compares values and types. Same? 
is native, and the docs says "Returns TRUE if the values are identical".
Henrik
2-Mar-2009
[2527x2]
same? means litterally the very same string.
same? is useful for identifying references.
kib2
2-Mar-2009
[2529]
Henrik: do you mean their location (via a pointer) ?
Henrik
2-Mar-2009
[2530x3]
yes
it's not entirely like pointers, but BrianH can explain that much 
better than me.
>> a: "boo"            
== "boo"
>> b: reduce [a copy a]
== ["boo" "boo"]
>> same? b/1 a
== true
>> same? b/2 a
== false
kib2
2-Mar-2009
[2533]
ok, it's clearer now. But how do you explain this ?
a: "apple"
b: to-string a
same? a b ; --> returns false


Does that mean that to-string makes just a copy of a, and so does 
not point to the same location ?
PatrickP61
2-Mar-2009
[2534]
This link seems a little confusing to me  http://www.rebol.com/r3/docs/functions/same-q.html

At first, it seems like it is comparing the values of two objects, 
but if you read further, it says they must reference the same objectS
Henrik
2-Mar-2009
[2535x2]
kib2: yes. to get the desired effect, use AS-STRING instead of TO-STRING. 
That is an R2 only feature though.
Patrick, yes, I agree, it should be written more clearly.
kib2
2-Mar-2009
[2537]
understood, thanks.
Henrik
2-Mar-2009
[2538x2]
hmm. it also exists in R3. I remember there was talk about it having 
problems when used with Unicode, but I may be wrong.
AS-STRING is useful to represent a binary as a string. There is a 
similar AS-BINARY function for converting strings to binaries.
Gregg
3-Mar-2009
[2540]
Also, most code doesn't need to use SAME?. I use it very rarely. 
If you're writing frameworks, or GUI stuff where you want to track 
references it's important. Other than that, simple value comparisons 
are all you need.
kib2
4-Mar-2009
[2541]
Hi, is there any REBOL version running on a PocketPC 2002 version 
?
amacleod
4-Mar-2009
[2542x2]
Depends onhte processor I think but I got core running on an old 
pocketPC
onhte = on the
kib2
4-Mar-2009
[2544]
nice, thanks
BrianH
4-Mar-2009
[2545x2]
Core 2.5.0.15.5 for WinCE 2.0 Handheld PC works on PocketPC 2002, 
but is not onscreen-keyboard aware - the onscreen keyboard obscures 
the command line, so you better have a builtin or bluetooth keyboard, 
or perfect typing. As with all R2 WinCE releases, there is no support 
for the clipboard, program command line, file associations, or background 
operation. This makes it almost unusable, even on a machine with 
a hardware keyboard.


I was the one who requested the build, and there hasn't been a WinCE 
build since.
It does work on even the latest ARM Windows Mobile handhelds, but 
not the Smartphone version.
kib2
4-Mar-2009
[2547]
BrianH: weird...and I suppose it's only R.Core, not R.View.
BrianH
4-Mar-2009
[2548]
Of course. The HP Journada 820 only had 16 MB of RAM, shared with 
storage. Not enough memory for View. It wouldn't matter anyway - 
the screens and interaction models of palm-size touch-screen computers 
are incompatible with the interaction and layout model of R2's View.
kib2
4-Mar-2009
[2549]
But you can extend the memory with sticks.
BrianH
4-Mar-2009
[2550x3]
Wait for R3 - the layout model should be flexible enough that you 
can provide a completely different UI layout for mobile use.
You couldn't extend the memory of a HP Journada 820 with sticks, 
or at all. You could extend the storage, but not the working RAM.
You generally can't extend the working RAM of any mobile device. 
However, modern mobile devices have enough RAM.
kib2
4-Mar-2009
[2553]
Yes, same for me here with a Packard Bell. But I suspect R3 won't 
run on these obsolete plateforms.
BrianH
4-Mar-2009
[2554]
Open source host code.
kib2
4-Mar-2009
[2555]
Maybe this can help newbies like me, I've just finished it : http://kib2.free.fr//REBOL/papers/REBOL_cheatsheet.pdf
Geomol
4-Mar-2009
[2556]
Good idea!
kib2
4-Mar-2009
[2557]
Thanks.
Gregg
4-Mar-2009
[2558]
Nice Christophe! Someone should tell Carl to link to it from REBOL.com.
kib2
4-Mar-2009
[2559x2]
I took the contents from a REBOL tutorial I've found "REBOL Essentials". 
Now, I think it could be better, ie there's nothing on arguments.
Got my present today : http://www.flickr.com/photos/kib2/3328900688/
:)
Henrik
4-Mar-2009
[2561]
posted the link to kib2's cheatsheet in Chat/R3/Docs. we'll see if 
Carl likes it.
kib2
4-Mar-2009
[2562]
Thanks Henrik, feel free to give any feedbacks or critics.
Henrik
5-Mar-2009
[2563]
kib2, Carl wants to publish the URL through his blog, with your permission. 
He likes it very much.
Pekr
5-Mar-2009
[2564]
Henrik - isn't kib's sheet similar to how R2 function dictionary 
was structured? I suggested Carl to sub-structure R3 function reference 
too ....
kib2
5-Mar-2009
[2565x2]
Henrik: Hi. Really ? Ok, no problem.
I've updated the page and the cheatsheet: http://kib2.free.fr/REBOL/papers/cheatsheet.html
. You'll also find the original ods file.
Henrik
5-Mar-2009
[2567]
kib2, you could also color code them, for example by native and mezzanine.
kib2
5-Mar-2009
[2568]
Henrik: good idea. How can I know easily wich ones are mezzanines 
?
Henrik
5-Mar-2009
[2569x2]
? native! is a good one.
pekr, yes it's similar.
kib2
5-Mar-2009
[2571x2]
Sorry, I should have said "among all those words", I don't want to 
type them one by one !
oops, sorry I didn't look at the output
Henrik
5-Mar-2009
[2573]
since you have created the sheet manually (if I'm correct), I would 
create a block with the words in the sheet in the order as shown 
on the sheet and then do something like:

foreach word words [
	print [word type? get word]
]
kib2
5-Mar-2009
[2574]
Yes, that's a better way I think