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

World: r3wp

[Rebol School] Rebol School

florin
29-May-2010
[3179]
But why in the Word Browser, they use the term range? When I read 
that, I understand that I need to provide to numbers specifying the 
start and end position of the range. Do I make sense to you?
Henrik
29-May-2010
[3180x3]
start positions are usually the current position in a series, when 
using series functions in REBOL.
I think you want range to mean two separate absolute numbers, but 
the start position has already been specified.
you can also say that it's an end-position.
florin
29-May-2010
[3183x2]
Correct, and this is why I now understand. As a new comer to rebol, 
I just find that the Word Browser should not use the term 'range' 
but something else, like 'position' in its definition. Anyways, you 
answered my question that unlocks the rest of the docs for me in 
this regards.
Thanks.
Henrik
29-May-2010
[3185]
A trick that you won't see from the word browser:

here: [a b c d]
there: at here 3

copy/part here there
== [a b]
florin
29-May-2010
[3186x3]
I think I saw it differently with a file example:
file: %myfile.txt           copy/part file find file "."
How do you add line brakes to this altme textbox? CTRL+ENTER does 
not work.
Henrik
29-May-2010
[3189x2]
yes, that's similar
click the pencil icon for multiline input (it really needs to be 
default)
florin
29-May-2010
[3191x2]
Oh, my the rebol echosystem has a lot of little things work unexpected.
Yes, and this is where the Word Browser makes sense when it says 
that the 'range' can take number, series, port, pair etc. How does 
it work with a pair? When the copy value is a pair itself?
Henrik
29-May-2010
[3193]
that would be on copying parts of an image
florin
29-May-2010
[3194]
I'm not that far :). Are you having fun with rebol or is it part 
of your job? I find it appealing though off putting at first.
Henrik
29-May-2010
[3195]
I've been working with REBOL both as job and hobby for 8 years.
florin
29-May-2010
[3196]
I'm reading the Series chapter for the second time. I made progress! 
I find the parsing very attractive as well as r3 replacing the command 
prompt.
Henrik
29-May-2010
[3197]
off putting: some parts that can be off putting for me are parts 
in REBOL 2 that are not completed, such as the GUI system (for which 
several replacements exist) and some lack of tools for debugging, 
but REBOL 3 will solve most of these problems. The rest is a joy 
to use.
florin
29-May-2010
[3198]
It's so different and so 'free form'. I'm not interested in the GUI 
part right now - I just want to learn something new.
Henrik
29-May-2010
[3199]
yes, the big disadvantage is that once you get used to REBOL, most 
other languages become painful to work with.
florin
29-May-2010
[3200]
java/groovy background - you see how diferent rebol can be to me. 
After righting a practical script and reading the Core manual, I 
thing rebol for me could become a rather practical tool for day to 
day tasks . I will see what it takes to write larger apps with it. 
I''m curious at this time.
Henrik
29-May-2010
[3201]
I'm not a Java guy, but REBOL to me feels like a language that is 
doing what Java should have been doing all along.
florin
29-May-2010
[3202x2]
When you say "Java should've been doing" you're saying Java should've 
been something else than Java. It's just very different. I still 
enjoy the static nature of java and the expressiveness of groovy. 
Rebol is interesting because of its conciseness and great practicality. 
Lots of data types makes sense in this context. The multitude of 
refinements provide a great deal of syntactical help. I'll enjoy 
this trip.
if cheyenne / rsp was more involved as a modern web framework, I'd 
start using rebol for we development today.
Henrik
29-May-2010
[3204x2]
I was think about the cross-platform aspect of Java.
thinking
florin
29-May-2010
[3206]
Is there any web framework out there that I missed?
NickA
29-May-2010
[3207]
MakeDoc and its variants?
florin
29-May-2010
[3208x2]
Is MakeDoc a rebol framework? Or is it a python one?
http://www.robertmuench.de/projects/mdp/?
Henrik
29-May-2010
[3210x2]
makedoc is a document generator. I'm not sure you would call it a 
framework.
there are many variants of it
GiuseppeC
29-May-2010
[3212]
Just a question for REBOL School for me too: is there a way to send 
HTML emails with embedded images ?
florin
29-May-2010
[3213]
I'm totally green to this. I've seen images imbedded into rebol source 
files. Could this be helpful?

http://www.rebol.net/cookbook/recipes/0048.html
amacleod
29-May-2010
[3214x2]
I do not think so...Images are always links in emails...one reason 
I avoid them as, like me, most clients require you to manually load 
them for security issues.


The link above is just to embed them in a rebol script. I do not 
think there is a similar method for html...
Correction...here is a link that might help: http://rifers.org/blogs/gbevin/2005/4/11/embedding_images_inside_html
Pekr
30-May-2010
[3216]
it is not true images rea always links in email - you can embedd 
images too .... postcard services do so ...
Gabriele
30-May-2010
[3217]
Giuseppe, basically, you attach the image with the email, and use 
a normal <img> tag in the HTML with a cid: URL. i don't have an example 
at hand, unfortunately...
Reichart
30-May-2010
[3218]
You should be able to take an HTML with an image in it, look at the 
source, and then spew that out of REBOL.
BudzinskiC
30-May-2010
[3219]
What amacleoud suggested should work just fine. Although maybe not 
in all mail clients. I do know that Adobe Air for example doesn't 
allow data links (for security reasons IIRC) so maybe some email 
apps have deactivated that feature too. It does work fine on my iPod 
Touch's email client (which is the only client I could test this 
on since I usually just use Gmail's web interface). Here's a small 
rebol script that does the job (yeah, I was bored)

REBOL []
imgfile: request-file/only
encoded: enbase read/binary imgfile
filetype: next to-string suffix? imgfile
; you can use this right in the browser as a web address
datalink: rejoin [{data:image/} filetype ";base64," encoded]
; and this inside html source
imglink: rejoin [{<img src="} datalink {"/>}]
editor imglink
amacleod
30-May-2010
[3220]
nice little script...i got errrors when I tried to copy and paste. 
Thanks.
Gabriele
31-May-2010
[3221]
Reichart, actually, that is true only if the HTML comes from an email 
with an embedded image (as attachment, not as link to an external 
website), and you need to look at the whole message source rather 
than just the HTML to make sense of it. the cid: links are an email 
thing and have nothing to do with HTML itself.
BudzinskiC
31-May-2010
[3222]
amacleod: Worked fine for me but I only tried it with a very small 
picture (the rebol logo actually), if you tried a big picture the 
resulting data link might be just too long for copy & paste actions 
(really long text almost always causes problems). Just replace the 
last line (editor imglink) with

write %somefile.html imglink
browse %somefile.html

And it "should" work with bigger pictures.
amacleod
31-May-2010
[3223x3]
Thanks BudzinskiC,

Works for me in Outlook 
but not Google mail web interface....
but it works on my palm pre accessing my gmail account
I was able to embed a picture using outlook and it worked in gmail 
web mail...

What method does outlook use to embed images?
image is referenced in this code but where is the image? is it somehow 
attached but not seen as an attachment?


<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><img width=688 height=155 id="_x0000_i1025"

src="cid:[image001-:-jpg-:-01CB00A8-:-DF6F9A50]"><o:p></o:p></span></font></p>
GiuseppeC
31-May-2010
[3226]
I admit I am a bit confused...
Gabriele
1-Jun-2010
[3227]
Amacleod, the image is attached, the container is multipart/related 
instead of multipart/mixed. The email client will not show the individual 
components of a multipart/related message, instead, it shows the 
main part (the HTML) which then refers to the other parts (in case 
of HTML, using cid: links).
amacleod
1-Jun-2010
[3228]
is there a way for rebol to attach multipert/related?