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

World: r3wp

[Core] Discuss core issues

Ladislav
10-Jun-2010
[16985]
I suggested quite a few times to Carl to specifically suppress this, 
but my proposal was not accepted in this case, maybe if you wrote 
it as a CureCode wish, Carl would find out I am not the only one 
suggesting it?
Steeve
10-Jun-2010
[16986x2]
As Iskata underlined it, i don't see anything specific.
a -> is evalatued, :a is not.

The VM always tries to evaluates/reduces the words, not the get-words.
*evaluated, *Izkata
Maxim
10-Jun-2010
[16988]
but lit words are a datatype.   when such a lit word is encountered 
in a do block and evaluated, it is reduced to a word.  that is ok.


but when it is *stored* AS as a lit-word, it should not be evaluated. 
 remember that words may contain words, which will be evaluated.


so why should lit-words be evaluated too?  the basic word containing 
a word already does that.
Steeve
10-Jun-2010
[16989]
Hmm... let me check that...
Maxim
10-Jun-2010
[16990x5]
the specific is that 

a: 'z      and     a: to-lit-word 'z

are not equal expressions.

so why should evaluating a also evaluate z in the second form.
since it will in the first form.
its the same as saying that blocks would ALWAYS be reduce everytime 
you evaluate a word which holds a block.
to me a lit-word is not a reference, its a token.  nothing more. 
 so evaluating one should just return itself, like strings & blocks.
sorry... evaluating a *word* which holds a lit-word, should just 
return the original lit-word.
Steeve
10-Jun-2010
[16995]
Ok I see your point now.

But I have to admit I've never been bored by this cascade evaluation.scheme 
:)
Graham
10-Jun-2010
[16996]
@Gab .. since the sub-port is closed, it can't receive events to 
pass on to the main port so yes, it shouldn't receive any more events.


Just wondering why putting a 'true in the handler at the end of the 
'close event handler also causes REBOL to exit the View event handler 
as well ...
Maxim
10-Jun-2010
[16997]
it quits the wait []  call.

the same happens if you return true from the view wake-event.
Graham
10-Jun-2010
[16998x2]
I guess it must.
In the async-http ( or any other protocol ), when exactly is the 
'init function called?
Graham
11-Jun-2010
[17000x2]
Something I'd forgotten ... but you can set custom headers using 
the header keyword.  Not documented though.

read/custom url [ header [ cookie: "blah blah" ]]

The header keyword is not needed if you do a post though.
Anyway, my async-fetch-s3object is now working :)
Gabriele
11-Jun-2010
[17002x4]
Oldes - "only if the string contains new line or " char" - that's 
wrong. It depends on the string length. also, mold escapes characters 
the REBOL way which you DON'T want.
>> "a long string"
== "a long string"

>> "a very long string with no newlines or quote characters, that 
still uses braces instead of quotes because it's long"

== {a very long string with no newlines or quote characters, that 
still uses braces instead of quotes because it's long}
the init function is called when the port is created from a url! 
or block! spec. eg. p: make port! ahttp://...
calling OPEN on a url! or block! spec also creates the port! first, 
so init is called.
Graham
11-Jun-2010
[17006]
So, after the port is created ..
Gabriele
11-Jun-2010
[17007]
i think the native code does some very basic initialization of the 
port! then it calls init
Graham
11-Jun-2010
[17008]
ok.  thanks.
Henrik
12-Jun-2010
[17009x2]
Is there a good method to conditionally remove a char in a string 
without having to manage the string? That is: Find char X at location 
Y and remove it if it's there, otherwise just return the string as 
is.
good method = fast method
Steeve
12-Jun-2010
[17011]
the first occurence only ?
Henrik
12-Jun-2010
[17012x2]
yes, I was thinking of the case of removing a conditional comma at 
the tail of an assembled string as quickly as possible.
first occurrence = just one occurrence
Steeve
12-Jun-2010
[17014]
something like...
head any [remove find string char string]
Henrik
12-Jun-2010
[17015]
hmm.. yes, that might work, thanks
Steeve
12-Jun-2010
[17016x2]
Parse  may be faster, though
especially within R3
Henrik
12-Jun-2010
[17018]
hmm, the string is required to be present twice, but I guess that's 
ok.
Steeve
12-Jun-2010
[17019]
Probably a little faster with R3...
also string remove find string char
Graham
12-Jun-2010
[17020]
Regarding Romano's atcp protocol, http://www.rebol.it/romano/atcp-protocol.r
 there is a little bug at the bottom of the page I think

He has 
		if find system/components 'ssl [
			net-utils/net-install 'assl self 0
			net-utils/net-install 'atsl self 0
		]

but I think he meant

		if find system/components 'ssl [
			net-utils/net-install 'assl self 0
			net-utils/net-install 'atls self 0
		]
Andreas
12-Jun-2010
[17021]
Good catch, Graham
Graham
12-Jun-2010
[17022x2]
I emailed him.... hope he has time to spare from his Java development 
to fix it :)
Gab's async protocol, the awake event takes two parameters
Romano's atcp protocol, the awake event takes one parameter ....
Anton
12-Jun-2010
[17024]
Oldes, I get braces when string length > 50
>> mold loop 51 [append "" "."]
== {{...................................................}}
Gabriele
13-Jun-2010
[17025]
Graham, though, tls:// never worked in REBOL so... :)
Graham
13-Jun-2010
[17026]
Carl keeps saying otherwise :)
Henrik
13-Jun-2010
[17027x3]
does anyone use str-enc-utils.r? I'm not sure if I have found a bug.
actually there is not just a bug, but also a hang.
>> str-enc-utils/iso-8859-15-to-utf-8 "aø"
== "" ; bad
>> str-enc-utils/iso-8859-15-to-utf-8 "ø"
== "ø" ; good
>> str-enc-utils/iso-8859-1-to-utf-8 "aø" ; hangs
Steeve
13-Jun-2010
[17030]
Link plz...
Henrik
13-Jun-2010
[17031x4]
http://www.rebol.org/view-script.r?script=str-enc-utils.r
hmm.. that one is newer. I have to test that one. one sec.
the hang is gone, but the other bug is still present.
nope, hang is not gone, just required some different letters to trigger 
it.