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

World: r3wp

[Core] Discuss core issues

Reichart
13-Feb-2008
[9068]
Would love to have a collection of REBOL vs EVERYTHING
Gabriele
13-Feb-2008
[9069]
Henrik, btw, R3 can read that URL.
Oldes
13-Feb-2008
[9070x2]
I can read it from R2 as well
And one can always use  trace/net on  to see, where is a problem
Henrik
13-Feb-2008
[9072]
must have been while the store was down. some one came up with a 
bash script to check when it would come up again, and thought it 
would be easy to do in rebol, but no. :-/
Oldes
13-Feb-2008
[9073]
but maybe it's because I'm using my own version of http scheme
Henrik
13-Feb-2008
[9074x3]
works in standard R2 right now
when the store is down, the replace the page with a message. it's 
not like the site goes entirely down.
they replace
Oldes
13-Feb-2008
[9077]
ah... you have to use modified scheme for that if the site is responding 
something with error message.
Henrik
13-Feb-2008
[9078]
interesting. would it be qualified for 2.7.6?
Oldes
13-Feb-2008
[9079x3]
or you can use this:

if error? set/any 'err try [read http://store.apple.com][  err: disarm 
err probe err/arg1]
the server response is truncated only in console... I've just tested 
it with a very long invalid local url.
and someone should fix the altme to display correctly urls... is 
it just me who don't like it? Such a visible thing:/
Henrik
13-Feb-2008
[9082]
yes, I don't like it either...
Oldes
13-Feb-2008
[9083]
and it's such a simple fix.. it just needs to enhance the width of 
the face which is used to measure the width of the text.... I bet 
it's just a one byte fix.
Henrik
13-Feb-2008
[9084x2]
let's bring it to the 2.7.6 group and point it out there.
sorry, I'm talking nonsense.
Gabriele
14-Feb-2008
[9086]
if it's an error response, you can catch it in R3 in async mode. 
:) more work, but you don't need to hack the http scheme.
james_nak
15-Feb-2008
[9087]
Here's something I haven't figured out yet: Let's say I have an object 
that includes other objects
make object! [
lists: ["tom" "fred"]

objs: [ [ make object! [ name: "hello"] ] [make object! [name: "world"] 
]  ]
]

When I "load" this back from a file, is there a way I can "do" the 
entire object. It appears that the obj/objs remain in their rebol 
form but are not "real" objects. For now I have been just "doing" 
them as I get to them but it sure would be nice to simply get it 
done all at once.

Thanks, I hope you understand what I mean.
Graham
15-Feb-2008
[9088]
do you try save/all to save the object to a file?
Anton
15-Feb-2008
[9089]
James,
Create some nested objects:


 objects: context [objs: reduce [reduce [context [name: "hi"]] reduce 
 [context [name: "there"]]]]
	
Save them in a binary (should be just like saving to file):

	bin: make binary! ""
	
	save/all bin objects
	
Load back from the binary (should be like loading from file):
	
	objects2: do as-string load bin
	
Test to see if the nested objects were created properly:	
	
	>> type? objects2/objs/1/1
	== object!

	>> probe objects2/objs/1/1
	make object! [
		name: "hi"
	]
[unknown: 5]
16-Feb-2008
[9090]
I need to be able to explicitly determine if something some functions 
return false as their value.  I wrote a quick function to do this 
but shouldn't we already have something that does this?

My function is:


false?: func [val][either all [logic? val not val][return yes][return 
no]]
btiffin
16-Feb-2008
[9091]
That would be truefalse  :)   Sorry, couldn't resist.  But, yes, 
REBOL is very tri-state with the t f none thing. And zero being true, 
as a forther still rubs wrong, but that chaffing is almost over and 
done with.  Plus RebGUI now supports bi-state options, so life is 
good(er).  :)
[unknown: 5]
16-Feb-2008
[9092x2]
no that function wouldn't tell you if something is true.
true? func [val][either all [logic? val val][yes][no]]
btiffin
16-Feb-2008
[9094]
Sorry, I meant   a "true" false.
[unknown: 5]
16-Feb-2008
[9095]
yes
btiffin
16-Feb-2008
[9096]
I investigating the deets, but you might get away with strict-equal? 
   res == false; need to test.
[unknown: 5]
16-Feb-2008
[9097]
what is the difference again between strict-equal? and equal?
btiffin
16-Feb-2008
[9098x2]
strict-equal? compares value and type, and then there is identical 
testing with =?   where

a: "abc"  b: "abc"     a =? b  is false   c: a   a =? c  is true 
(pretty much has to occupy the same ram)
Oh just in case   1 = 1.0 is true   1 == 1.0 is not.
[unknown: 5]
16-Feb-2008
[9100]
that is what I thought btiffin - when you mentioned using strict-equal? 
you have me confused.  How did you see it being used in a true false 
function?
btiffin
17-Feb-2008
[9101]
Instead of    if false? expression [ ]   you might get away with 
 if strict-equal? false expression [ ]   and skip writing the false? 
 func.
Anton
17-Feb-2008
[9102]
All you should ever need is 
	= false
btiffin
17-Feb-2008
[9103]
Good point.  Paul ... What Anton said.  ;)
[unknown: 5]
17-Feb-2008
[9104x4]
Yeah I don't see a need for a true function only a false function.
Anyone know of a bug in REBOL where the word "end" shows up in a 
list! of values?  I have got this weird problem where the word "end" 
shows up in what should be a list! block of nothing but integers 
but instead I have integers and a few references of the word "end" 
without the string as it is not a string datatype.  If I do a foreach 
and attempt to step through each item it crashes on that entry.  
I can't determine what datatype it is.  I looked at my code and nothing 
in my code or the data it handles contains the word "end".
I did some more research and it appears that the "end" I seen is 
a datatype.  I didn't even know there was an end! datatype.
here is what the list block looks like for example:


== make list! [1 4 5 end unset 6 7 8 9 10 11 12 13 14 15 16 17 18 
19]

except it is a lot longer


I'm not sure why I'm getting the unset! or the end! datatypes at 
this point.  I only use insert to add to this list and all the values 
being inserted should be integer datatypes.
Geomol
17-Feb-2008
[9108]
You could test, if what you're inserting actual is an integer. Something 
like:

if integer! <> type? value-to-insert [print ["Not an integer:" value-to-insert]]
[unknown: 5]
17-Feb-2008
[9109]
I actually did that and it got no errors which really has me a bit 
stumped.
Geomol
17-Feb-2008
[9110x2]
That's weird. Could you test, if the just inserted value in the block 
is not integer!? Like:
if integer! <> type? first blk [print "something"]
And do that for every insert.
[unknown: 5]
17-Feb-2008
[9112x3]
Well that is actually how I did my test.  I had the following in 
the subject area of the problem:


if not integer? record-number: first to-block raw-record [print record-number]

Problem is that it never printed anything
Maybe someone can tell me what the end! datatype is used for and 
that might help find the problem
Gonna go see if the core manual refers to the end! datatype.
Geomol
17-Feb-2008
[9115]
end! is the datatype used to specify ends of blocks, if I remember 
correctly.
[unknown: 5]
17-Feb-2008
[9116]
I didn't even know there was one.  In what way would it be used?
Geomol
17-Feb-2008
[9117]
Yes, "internal marker for end of block"