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

World: r3wp

[All] except covered in other channels

Gabriele
24-Jan-2008
[2540x2]
probably python has more bindings (to gtk, cairo, and so on)
or maybe it's just because the head developer was a python zealot, 
i don't know. i haven't asked.
Henrik
24-Jan-2008
[2542x2]
:-)
Graham, but is it the same people? I read a lot about how starving 
people in clay huts have no use for laptops, but when I read about 
it on Wikipedia, it's not targeted at these people, but people who 
already have enough infrastructure to support this. When I look at 
the pictures of kids with OLPCs, they don't live in clay huts or 
are starving.
Pekr
24-Jan-2008
[2544]
Yes, Python has something like list of 10 - 15 bindings to various 
UIs. Ruby is close though. But for me Python is more readable. Of 
course I would prefer REBOL, but that's me, REBOL zealot.
Henrik
24-Jan-2008
[2545x2]
and if you want to turn the situation around in those places, education 
is key and a laptop is a good step, but it's only one small part 
of it. it's just getting so much attention that people think it's 
the only step that will be taken.
I just wonder if they will keep selling the machine to us as well. 
Looking at the machine boot, it doesn't look all that slow. It would 
make for a nice little server.
Pekr
24-Jan-2008
[2547]
we can be clever enough too. if VID3 is nice, it can get used by 
those children for educational purposes anyway, no matter what their 
UI is written in primarily :-)
Henrik
24-Jan-2008
[2548]
if anything, it would be a nice tech demo. demonstrate how much software 
can be packed onto an OLPC, if it's all written in REBOL.
Luis
24-Jan-2008
[2549x2]
Formula for Milking the Digital Divide

http://www.deeshaa.org/2005/11/05/formula-for-milking-the-digital-divide/
Henrik: The problem is not hardware or how much software.

Schools need soft for teaching-learning, designed on pedagogical 
principles. Cmap Tools is an excellent example. (50 Mb of java)
What about an rebol version ? (3Flex is a good basis)
btiffin
24-Jan-2008
[2551]
As Gabriele pointed out; OLPC information is full of FUD.  The "good 
guys" just want to provide a leg-up to some children.  The "bad guys" 
seem threatened and will use money and misinformation as they smile 
and nod and pretend to help.  ;)  It is better to stay overtly positive 
to fight the misinformation imho.  So in that vein; OLPC and the 
XO is perfect.  All decisions are the very best and could not be 
made any better.  :)
Maarten
25-Jan-2008
[2552]
And we all should say "Yay OLPC" once per hour in a crowded place!
Tomc
25-Jan-2008
[2553]
or team up and go door to door ...
Graham
26-Jan-2008
[2554x6]
Gabriele, I don't think that argument stands.  So, even if .1% learn 
to program and make some money, there is still the lost opportunity 
to save lives and enrich them in more basic ways.
People don't need to learn to program at a very early age ( I presume 
the XO is aimed at young children ).
Education would be better served with some clean water, food and 
a teacher.
And what sees is that anyone with any smarts leaves their country 
of birth and heads off to the USA.
Further impoverishing their bretheren.
Look at how many doctors of Indian origin now practice in the USA, 
and no longer in their own countries.
Gabriele
26-Jan-2008
[2560x2]
graham, i would agree with you 100%, you we're talking about teaching 
them how to get or make clear water and food, and if we train them 
as teachers (as opposed to sending teachers)
do you think that those that go to the usa don't have relatives or 
friends? and, isn't that an improvement for them at least anyway? 
keep in mind, in most of these countries, the problem is corruption, 
and sending more money makes that worse. sending laptops does not 
increase corruption at least.
Luis
26-Jan-2008
[2562]
sending laptos or selling laptops ?
btiffin
26-Jan-2008
[2563]
clean water, food and a teacher

The XO connections to the net (may, will, I expect) add to the teacher 
part.  An entire generation  of youth may get that little glimpse 
that there are answers to their questions.  And then a butterfly 
flaps its wings.  :)  And one of those little ones may find out how 
to purify the local water from a HAZMAT database, and hey clean(er) 
water.

OLPC is perfect.  It's going to succeed ... perfectly.  :)
Graham
26-Jan-2008
[2564x2]
there's probably more information on the net on how to make a molotov 
cocktail than to purify water
This is inappropriate technology
Reichart
26-Jan-2008
[2566]
Ashley, yeah, that whole micro-loan thing looked cool at first…several 
of my friends that are economists are working on a paper that analyses 
the impact of that.  It is looking very bad sadly.
GiuseppeC
27-Jan-2008
[2567]
Is there a way in Rebol to have the equivalent in OO programming 
of a constructor ? Can we execute a function automatically each time 
an object is created ?
Geomol
27-Jan-2008
[2568]
You can do it by making your own MAKE function like:

omake: func [o blk /local newo] [newo: make o blk newo/c newo]


This function take 2 arguments like MAKE does. An object and a block. 
It first create a new object based on the 2 arguments. Then it call 
the function c (constructor) in the new object and finally return 
the new object. You can use it like:


>> o: make object! [a: 0 c: does [a: to-integer ask "Value? "]]	; 
This is the "class"
>> o1: omake o []
Value? 3
>> ?? o
o: make object! [
    a: 0
    c: func [][a: to-integer ask "Value? "]
]
>> ?? o1
o1: make object! [
    a: 3
    c: func [][a: to-integer ask "Value? "]
]
GiuseppeC
27-Jan-2008
[2569]
Thanks ! have another 2 questions about OO programming
Geomol
27-Jan-2008
[2570]
Shoot!
GiuseppeC
27-Jan-2008
[2571]
1) In one of my script I have had an "OUT OF MEMORY ERROR" in a situation 
where you normally don't exect such error and don't check about it. 
Is there a way to raise an exception automatically and give control 
to the exception handler you have written ?
Geomol
27-Jan-2008
[2572x2]
Can TRY be used in that situation?
Like in:

>> if error? try [4 / 0] [print "There was an error!"]
There was an error!

I'm not sure, if that catch out of memory errors.
GiuseppeC
27-Jan-2008
[2574x2]
Yes but when this error arised (during a read/lines operation) I 
asked myself if the "OUT OF MEMORY" error could accur in situations 
like function definition, object creations and so on. You don't expect 
an error expecially in the first scenario.
(first scenario: function definition)
Geomol
27-Jan-2008
[2576]
Yes, it a bit different from "normal" errors in REBOL. I haven't 
got much experience with out of memory situations. Can you test it 
somehow, if it'll work?
GiuseppeC
27-Jan-2008
[2577]
I can't reproduce the out of memory error at function definition 
bur teh question remains.
Geomol
27-Jan-2008
[2578]
Yes, good question, also regarding the new version of REBOL. I'll 
take it up with Carl and the other developers.
GiuseppeC
27-Jan-2008
[2579x3]
For the second question you should wait, my  distant syster as called 
me.
Here I am again.
Second question: if I have a word with a value, could I attach a 
method to it ? 

for example: myword: 10 and I want  a method myword.increment or 
myword/increment.
Geomol
27-Jan-2008
[2582x4]
You would probably use an object for that in REBOL:

>> myword: make object! [value: 10 inc: does [value: value + 1]]

And then use paths to get the value and use inc:

>> myword/value
== 10
>> myword/inc
== 11
>> myword/value
== 11
You can also do it in a block:


>> myword: reduce ['value 10 'inc does [myword/value: myword/value 
+ 1]]
== [value 10 inc func [][myword/value: myword/value + 1]]
>> myword/value
== 10
>> myword/inc
== 11
>> myword/value
== 11
>> myword
== [value 11 inc func [][myword/value: myword/value + 1]]
With the block way, you can also get the value by:

>> myword/2
== 11
because the actual value is at the second position in the block.
Gregg
27-Jan-2008
[2586]
On the constructor question, another way to do it is to define your 
object spec, and include initialization code in that.


>> o-spec: [time: none set-time: does [time: now/precise]  set-time]
== [time: none set-time: does [time: now/precise] set-time]
>> probe o1: context o-spec
make object! [
    time: 27-Jan-2008/11:07:00.875-7:00
    set-time: func [][time: now/precise]
]
>> probe o2: context o-spec
make object! [
    time: 27-Jan-2008/11:07:04.5-7:00
    set-time: func [][time: now/precise]
]
Henrik
28-Jan-2008
[2587]
welcome Derek :-)
SteveT
28-Jan-2008
[2588]
welcome Derek - at last someone newer than me ;-/
btiffin
1-Feb-2008
[2589]
I've started a Qwiki in Qtask for the 2008 user.r rebol of the year 
awards.  The rotties.

Single category so far;  roty. 
Nominations to date;

Ashley Trüter


I'll pull the list over every month or so.   Drop a note in user.r 
if you want to nominate someone; or better yet, drop me a note for 
an invite to the user.r project on Qtask and update the Qwiki directly.