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

World: r3wp

[I'm new] Ask any question, and a helpful person will try to answer.

Maxim
16-Jun-2010
[3633x4]
here is my output from above...
>> colours: [red blue black green violet]
== [red blue black green violet]
>> foreach colour colours [print colour]
red
blue
black
green
violet
start a new rebol console... maybe you stomped on a keyword in your 
tests.  your output is not expected.
remember that rebol has little if any statements, so this means you 
can overwrite just about every control structure in the language. 

maybe you inadvertently overwrote the print function.
(or maybe that was part of an earlier exercise  ;-)
jonty
16-Jun-2010
[3637x5]
oh, ok!
Aha!
You were right.
New rebol session and all is good.
So that's a real catch to look out for!
Pity I've lost all my other set-up now. ... suppose I should start 
writing it in an actual script!
Maxim
16-Jun-2010
[3642x3]
one thing about REBOL is that many things look deceptively simple 
on the surface, but there are many little details which make it a 
pretty deep language.
yeah, I rarely test stuff which doesn't fit on a single line directly 
in the console.
one thing you can do is use the clipboard directly. if you type :

do read clipboard://


it will execute whatever REBOL source code you have in your clipboard 
 :-)
jonty
16-Jun-2010
[3645x2]
OK, now I can start working on my real little problem I was trying 
to do in rebol.

In regards to that, is there a way to format days without resorting 
to 'pick'ing from blocks of day names etc?
Oh neat! (read from clipboard)
Maxim
16-Jun-2010
[3647x3]
using the up arrow, its a quick way to test multiline stuff without 
filling up the history, allowing you to go up just once, and press 
enter.
there might be some more powerfull date formatting code on rebol.org
otherwise, the picking is the way to go.
jonty
16-Jun-2010
[3650]
hmm, doesn't understand clipboard.  Is it a windows only thing?
Maxim
16-Jun-2010
[3651]
not that I know of.  what error did it give you?
jonty
16-Jun-2010
[3652]
>> do read clipboard://
** Access Error: Invalid port spec: clipboard://
** Near: do read clipboard://
Maxim
16-Jun-2010
[3653]
on what OS are you?
jonty
16-Jun-2010
[3654x3]
OSX
Rebol 2.7.6...
(Update fails as well, I know there is a newer v2)
Maxim
16-Jun-2010
[3657x3]
might be that its not working on OSX, there are quite a few OSX REBOLers 
here, one will surely pop up and confirm/infirm
latest version is here... http://www.rebol.com/download-view.html
(of REBOL/view that is)
jonty
16-Jun-2010
[3660x2]
ok, thx Maxim for all your help!
I'm outta here for now.
Maxim
16-Jun-2010
[3662]
happy to help,  the people here like helping out new REBOLers, don't 
hesitate to ask however simple you might think the question.
Gregg
16-Jun-2010
[3663]
Welcome Jonathan!


The console is your friend, but you're not the first to overwrite 
a system word and have to start a new session. REBOL has a few gotchas. 
With great power and all that. 

>> d: now/weekday
== 3
>> pick system/locale/days d
== "Wednesday"
>> system/locale/days/:d
== "Wednesday"

>> day-name: func [date [date!]] [pick system/locale/days date/weekday]
>> day-name now
== "Wednesday"
Toma
16-Jun-2010
[3664x2]
hello
umm so im kinda new to rebol, actually it was today when i decided 
to learn this language, and im thinking of making my diplome work 
in it . so i would ask some question if its alowed
Henrik
16-Jun-2010
[3666]
ah, welcome! ask away :-)
Toma
16-Jun-2010
[3667x2]
can i write programs in rebol that is abel to connect to my phone 
via cabel or bluetooth so i can read my sms and stuff like that?
so do they have functions that are abel to connect to phones or stuff 
like that?
Henrik
16-Jun-2010
[3669x2]
That depends if you have access to libraries that already do this. 
REBOL can't do this directly, but it may be possible through a DLL.
(you may want to start with some simpler stuff first)
Toma
16-Jun-2010
[3671x3]
ye sure thats what i was thinking of, but i donno if its worth to 
learn , if i cant use it for that phone thing
i thought it has some methods
i wanted to do it in java first, but then some one told me about 
this language
Henrik
16-Jun-2010
[3674]
it's probably easier for you to do it in java, if you already know 
it.
Toma
16-Jun-2010
[3675]
nop, i dont have much experience in java either, but i was thinking 
hmm phones hey then java why not
Sunanda
16-Jun-2010
[3676]
REBOL does not currently run _on_ any phones (that I know of) though 
this blog post offers some hope:
    http://www.rebol.com/cgi-bin/blog.r?view=0274


If you want to connect _to_ a phone from a REBOL-supported platform 
(Win, Lin, MAC, etc) then, as Henrik says, the crucial issue is the 
API to access the phone's functions. REBOL can probable connect to 
that API. But without more details, we'd be guessing.
Toma
16-Jun-2010
[3677x2]
thanks that was helpfull, o its actually possible to do it
probably :D
Henrik
16-Jun-2010
[3679]
I'd suggest that if you want to try REBOL, you need to figure out 
the basics first to figure out why we use it. REBOL is not a very 
popular language, but the followers are pretty loyal.
Sunanda
16-Jun-2010
[3680]
The REBOL2 external library interface (ie how you might connect to 
an API) is described here:
    http://www.rebol.com/docs/library.html
Toma
16-Jun-2010
[3681x2]
oh thank you a lot, i think there i finde some answers
i think i start tomorrow with the basics, i think i will be abel 
to do this with rebol