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

World: r3wp

[!REBOL3-OLD1]

Rod
2-Jan-2008
[5522x2]
Thanks Maarten, very glad someone is taking that load off Carl.  
I can only hope it means a more steady stream of information will 
be available as well a public alpha (at some point).  I was going 
to ask for an update since the latest blog entries are more than 
a month old now.
I do volunteer to help as well, can proof read documentation, run 
tests, and other miscellaneous tasks.  My only constraint is the 
help has to be in my off hours, can't conflict with my day job. *smile*
Henrik
2-Jan-2008
[5524]
we will defnitely need both proof reading and general opinions on 
the documentation. it can always be improved.
Maarten
4-Jan-2008
[5525]
Rod: that goes for most of us. The time table is not carved in stone 
yet so I am not going to give a date . But we're making very good 
progress for alpha1
Rod
4-Jan-2008
[5526]
Maarten, I'm ready to help with your vacancies when you have a need, 
just let me know.

Thanks, Rod.
Maarten
5-Jan-2008
[5527]
I will surely come back on the vacancies. Right after alpha1 is out 
we'll need some people to step up and bootstrap the community
BrianW
8-Jan-2008
[5528]
loving the closure
BrianH
8-Jan-2008
[5529]
Try source use :)
BrianW
8-Jan-2008
[5530x2]
The docs example didn't tell me much, though. Maybe something like 
this?
	>> adder: func [a] [ func [b] [a + b] ]
	== function!
	>> adds-two: adder 2
	== function!
	>> adds-two 5
	** Script error: a word is not bound to a context
	** Where: adds-two
	** Near: adds-two 5
	>> adder: closure [a] [ func [b] [a + b] ]
	== closure!
	>> adds-two: adder 2
	== function!
	>> adds-two 7
	== 9

... or maybe I'm getting the idea of closures wrong in R3?
cool, BrianH
BrianH
8-Jan-2008
[5532]
You got it right. Look at the DocBase article.
BrianW
8-Jan-2008
[5533]
I was. I think the problem I had deciphering the example in the DocBase 
article (http://www.rebol.net/wiki/Closures) was that I am used to 
function-creating closures because of examples in other languages.
BrianH
8-Jan-2008
[5534x2]
Well, in the case you did above the effect of the closure is on the 
code block you pass to the inner call to func. A closure! is returned 
by the closure function above. When that closure! is run, the func 
call in its body then creates a function that is returned.
In other languages their equivalents to FUNC or CLOSURE are declarations 
- in REBOL they are actions.
BrianW
8-Jan-2008
[5536]
okay, so I need to study more about what a closure actually is :-)
[unknown: 5]
8-Jan-2008
[5537x2]
hey while your working on REBOL3 add something that can do this  
 alias object/item "myfunc"
We could really use a feature that can do that or if someone knows 
how to that would be cool.
BrianH
8-Jan-2008
[5539x3]
It's pretty simple really, as long as you realize that the closure 
function creates a value of the closure! type. The main difference 
between a closure! and a function! is that a closure! creates a context 
every time it is run and binds the words in its body to that context, 
like USE in REBOL 2. A function! just uses a special context instead 
with stack-local references, which goes away when the function! is 
done - there is no REBOL 2 equivalent to that, but a C function is 
close.
Paul, I'm not sure which of the arguments is supposed to be the alias 
and what is supposed to be aliased. Try
    myfunc: does [object/item]
or
    object/item: does [myfunc]
depending on which direction you meant.
ALIAS is really only meant for internationalization. Assignment is 
for value aliasing, and functions are values.
BrianW
8-Jan-2008
[5542]
Is there a convenient way to list they keys of a map?
BrianH
8-Jan-2008
[5543]
Not yet. It's on the todo list.
BrianW
8-Jan-2008
[5544]
ok, thanks. Sorry for the questions, I'm just rummaging through the 
bag of goodies that is R3 right now.
BrianH
8-Jan-2008
[5545x2]
Actually, you bring up a good point. There is currently no reason 
to know what keys are currently defined in a map because in theory 
all possible keys are defined in a map - they just don't have values 
yet. If you try to retrieve the value for a key that is not in the 
map yet, you get #[none] (the value, not the word). If you want to 
not have a key in the map, just set its value to #[none]. Yeah, that 
key may be physically still in the map, but who cares? The effect 
is the same - the only difference is memory usage.
If it matters to you whether a key is in the map or not (regardless 
of its value), you should probably be using object! instead. With 
object! there is actually a difference between the key being there 
or not, and you can always expand an object with new fields if you 
need to in R3.
btiffin
8-Jan-2008
[5547]
Anyone that is not a fan of the Win console.  Try Cygwin and install 
rxvt.   (No need for the X11, rxvt runs beautifully as a windows 
app).  It's not as featured as the REBOL 2 console, but it's a step 
up (and a little sideways) from the dos console.
BrianH
8-Jan-2008
[5548]
If that works, tell me. I haven't been having any luck in using alternate 
consoles with the R3 alpha - the stdio device is broken.
Ashley
8-Jan-2008
[5549]
Anyone else think it's kind of freaky when we have 3 Brian's messaging 
in the same group at the same time? ;)
BrianH
8-Jan-2008
[5550]
It's just multiple views of the greater Brian ideal :)
btiffin
8-Jan-2008
[5551]
:)
BrianH
8-Jan-2008
[5552]
Pan-Brianism :)
BrianW
8-Jan-2008
[5553]
I was thinking about the difference between a map and a normal object. 
It's easy to slip into a Perl/Python sort of mindset, where maps 
are often the most convenient way to describe data. It can be easy 
to forget the flexibility of Rebol datatypes.
BrianH
8-Jan-2008
[5554]
If you don't like the way a datatype works, try another. At least 
we're not going the Perl route and adding operators. :)
BrianW
8-Jan-2008
[5555]
thank goodness for that. I'm enjoying perl 6, but man oh man I get 
lost in the syntax sometimes.
BrianH
8-Jan-2008
[5556x2]
The behavior of map! is part of a general change in R3 to make the 
none value be a placeholder for missing data, like null in SQL. Even 
the series accessors (first, second, ...) now return none when accessing 
indexes off the end - this means that you can now thing of the current 
length of a series as an relatively unimportant detail that you can 
ignore in some circumstances.
thing -> think
btiffin
8-Jan-2008
[5558x2]
rxvt quick tests;  stdio is not reliable (with the defaults - these 
are quick tests)  

$ ./rebhost.exe -q   >> call "ls"    works    >> call "less readme.html" 
  does not detect console.
$./rebhost.exe < small.r  does not work

so in short, not a good choice for redirection, but seems ok for 
the testing I've been doing.  Haven't tried running gnu readline 
with it yet to see if command line recall will work.  I've gotten 
too used to editing source and do'ing.
$ rlwrap rebhost.exe   gives nice command line recall within R3 under 
the rxvt console.  (Win98 currently.   It worked under Cygwin Vista 
too, but I've been away from my dual-boot Linux machines for a few 
months now and hadn't tried readline under '98).  Vista had an issue 
with the TERM needing to be set to cons25, but this box works ok 
with the default TERM=xterm setting and TERM=rxvt.   But as before, 
nothing beats   $ vi   and  >> do  :)
Pekr
9-Jan-2008
[5560x2]
btiffin - what about PowerShell from MS? Haven't tried yet ...
well, just downloaded PowerShell and it boots 3 - 5 secs on my Core2 
Duo, 2 GB RAM :-) It can't run executables or I don't know how - 
it seems that it extends commands for Windows admins, dunno how to 
launch externall app from that :-)
[unknown: 5]
9-Jan-2008
[5562]
Thanks BrianH.
btiffin
9-Jan-2008
[5563]
Petr;  It was the MS "Genuine Vista" info grab for the free download 
that led me to Cygwin.  :)  I dutifully registered both my copies 
of Vista, and what?  MS doesn't remember?  <swearword> 'em.  I never 
tried PowerShell.  Once I discovered rxvt I quit searching.  Kinda 
like REBOL.  My progamming language quest is over.  Now the (language) 
interest is only cursory and even though I try and check out something 
new just about everyday ... nothing competes.  Go REBOL Go!
Pekr
9-Jan-2008
[5564]
Googling, I just found out, that Cygwin allows also some other consoles. 
Poderosa allows tabs, that might be interesting running multiple 
sessions and switching between them ...
BrianH
9-Jan-2008
[5565]
I can't wait until DevBase goes public. We could definitely use some 
help with these kind of bugs.
btiffin
9-Jan-2008
[5566]
Brian;  Umm...Carl gave the nod to release the url for DevBase to 
the REBOL friendly a few days after it's initial rollout.  Has that 
changed?
Pekr
9-Jan-2008
[5567]
BrianH - you should notice Carl privately about the need to accept 
latest submissions. Well, once done, do you think we are mostly ready 
for full R3 upload? I mean - all View and host C code?
BrianH
9-Jan-2008
[5568x2]
Yeah. The security model doesn't scale right now. I have designed 
a new security model and am almost done implementing it.
The !DevBase group would be a better place for this discussion.
Kaj
9-Jan-2008
[5570]
Same here, BrianT. It's nice to come home after a journey
Micha
10-Jan-2008
[5571]
there is the better solution ?

handl: func [event /local port] [  probe  event/type


port: event/port

switch event/type [

connect [  print  [ now port/spec/host  ]
           write port [ GET %/index.html ]  false]

read [ false ]


wrote [ false]


done [   print  [ port/spec/host  length? event/port/data ]  true]

close [ close port true]
error [ close port true]


] 

]




get-fast: func [hosts /local port ][



 foreach hst hosts [
  port: make port!  to-url join http:// hst 

  port/awake: :handl
  open port

wait 0.03
 ]


]

;example

urls: [
www.rebol.com
www.rebol.net
;"www.rebol.org"
www.apple.com
;"www.oracle.com"
;"www.google.com"

]
loop 10 [get-fast urls]