• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[!REBOL3] General discussion about REBOL 3

Gabriele
19-Jan-2013
[709]
I'd have to review the code, the main problem with errors is that, 
again, port behavior is really not defined explicitly for that, and 
Carl never answered.
GrahamC
19-Jan-2013
[710]
http://www.curecode.org/rebol3/ticket.rsp?id=1918&cursor=17
Gabriele
19-Jan-2013
[711]
I have a PDF with the state diagram for HTTP, that may help you figure 
out the error problem. It's also possible that it was intentional 
in the sense that it is safer to initiate a new connection in case 
of error (though, some errors should be exceptions to this).
GrahamC
19-Jan-2013
[712x2]
It corrupts the very next new connection
so possibly something in the http scheme object ?
Gabriele
19-Jan-2013
[714]
very likely, the port needs to be reset after the error. perhaps 
a QUERY does it. I don't remember.

I posted the diagram in the files here.
GrahamC
19-Jan-2013
[715x2]
Hmm.  The port is anonymous
Yes, those diagrams look the same I think as on the rebol.net wiki
Gabriele
19-Jan-2013
[717]
ah, you're right, then there must be something that is global and 
should not be.
GrahamC
19-Jan-2013
[718x2]
which is why I was thinking the scheme object
because it reports the same error
Gabriele
19-Jan-2013
[720]
maybe i'm using a block or object somewhere without clearing / reallocating 
it
GrahamC
19-Jan-2013
[721]
Oh well, if you have some spare cycles
Gabriele
19-Jan-2013
[722]
i'll keep this in mind, but this month is very busy here.
DocKimbel
19-Jan-2013
[723]
Anyone happens to know who we have as admins of the R3 project CureCode?
 Carl, BrianH and me.
GrahamC
19-Jan-2013
[724x2]
Who decides an issue is closed?
Who can re-open issues?
DocKimbel
19-Jan-2013
[726x2]
what's the intended meaning of the 

reviewed" status for R3 CC tickets?" It means that the ticket has 
been acknowledged/accepted and will be processed. At least, that 
was the initial meaning, maybe Carl and Brian used it differently 
afterward.
Who decides an issue is closed?

 Depends on the convention set for R3 project. I usually consider 
 that it should be closed by the developer processing it, once the 
 issue is fixed. It could also be closed by the one that opened it 
 if he's satisfied by the provided answer or the fix.

Who can re-open issues?

 Admin can, Developer should too. Currently in addition to admins, 
 there are 3 people with Developer roles/rights: Henrik, Cyphre and 
 Gabriele.
GrahamC
19-Jan-2013
[728]
Looks like we need more people with developer status
Pekr
19-Jan-2013
[729]
Is there any prototype of FTP scheme for R3? IIRC Graham did something 
in the past?
GrahamC
19-Jan-2013
[730x9]
Pekr, my schemes are still available on github.  They are all async 
and need to be rewritten as sync.
to get them to work you need to make the following changes:

1. In the header, change from 

module: 'name 

to 

type: 'module
name: 'name

make-scheme => sys/make-scheme


There's also some odd about contexts inside modules.  You need to 
declare your variables inside /local as you can get a context error 
if they are used but not so defined.
That's pretty much all the change I had to make to the prot-smtp.r

then 

s: open smtp://smtp.host.com
read s

will send the preconstructed email.
Going to change that to

write smtp://smtp.host.com [ 
			esmtp-user: 
			esmtp-pass: 
			from:
			name:
			to: 
			subject:
			message: 
		]
once I figure out al these context issues
Robert, do you guys have other schemes written so we don't duplicate 
?
rebol [
	type: 'module
	name: 'test
	version: 0.0.1
	notes: {
		to illustrate a a context issue.

  free variables defined inside a module are supposed to be "global" 
  to the module only.
		See http://www.rebol.net/r3blogs/0048.html
	}
]

do test: func [ ][
	set 'new-word none
]
>> do %test-module.r
Module: "Untitled" Version: 0.0.1 Date: none
** Script error: new-word word is not bound to a context

** Where: set function! do -apply- make catch either either -apply- 
do
** Near: set 'new-word none
this works though

do test: func [ /local new-word ][
	set 'new-word none
]
this also fails

do test: funct [ ][
	set 'new-word none
]
BrianH
19-Jan-2013
[739x3]
Thanks Graham, that seems to be the correct behavior. We should adapt 
those for the test suite.
The design of the module system has changed since that blog. In order 
for free variables to be defined at the module level, they need to 
be set at the top level with set-words like an object. Also, FUNCT 
only collects set-words, so it's correct that in your last example 
it doesn't treat iot as a local.
An isolated module acts like the blog suggests though.
Andreas
19-Jan-2013
[742]
I think we'll really need coherent documentation for the intended 
status quo of the module system soon.
GrahamC
19-Jan-2013
[743]
This is a trifle frustrating that the docs are not being updated
BrianH
19-Jan-2013
[744x3]
Yes. Actually, there's a pull request that represents the current 
intended design of the module system ( https://github.com/rebol/r3/pull/40
). And I'm working on a set of tests that should help document it 
as well.
Docs not being updated? The user-level docs were never written. I 
still need to update the guru docs. It's worse that you thought.
that -> than
Andreas
19-Jan-2013
[747]
That pull request unfortunately only covers a teensy tiny bit.
BrianH
19-Jan-2013
[748x2]
Nope, it just fixes the last non-working part.
But without it you don't have the intended behavior.
Andreas
19-Jan-2013
[750x2]
For one aspect.
The module system could be a deciding feature pro R3. But we really 
need to get started on docs for that to become true.
BrianH
19-Jan-2013
[752x4]
The module system was almost complete in implementation with the 
last closed-source release, needing only the fixes we (and I mean 
me and you, Andreas) did in the first week of the open source release. 
We have only been waiting for Carl to add that pull request to get 
the current design working as intended, though that request doesn't 
only apply to modules in particular, but to scripts in general. Once 
it is accepted, I need to do another round of optimization, but the 
external effects are set already.
So we are at the stage of writing docs and tests.
The only reason the user-level docs aren't yet written is because 
I am really bad at writing user-level docs of any kind. I was hoping 
that I could write some guru-level docs and then let someone read 
them and write something user-level.
As for that blog, the behavior described there has some practical 
problems. There is nothing in the code itself (I mean the example 
code in the blog, not the implementation code) to indicate that 'last-stock 
is a free variable, but 'if and 'not are not - they are all words 
not declared at the top level of the module (by using them as set-words, 
like in an object) or elsewhere in the code. This means that if you 
want it to have 'last-stock be made local to a module, you would 
have to make 'if and 'not local as well. That works if lib words 
can only be set once, but not if they can be reset, since changes 
wouldn't propagate to the other modules or user scripts (since those 
values are copied to words in other contexts).


We determined that the behavior described in that blog could be useful 
enough to be worth supporting, but had some nasty side effects that 
made it not be what we wanted to do by default. That is why we made 
it an option, in particular the isolate option. If you specify the 
isolate option, your module acts like it does in the blog, and this 
has the effect of isolating your module from all external changes 
to the lib context.
GrahamC
19-Jan-2013
[756]
what isolate option?
BrianH
19-Jan-2013
[757x2]
rebol [type: module options: [isolate]] your script
Carl decided that the best way to make extensible options was to 
put the flag-like ones in an options block. That makes them extensible 
without bloating your header.