[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:(3)
Hello there, Andrew I am interested in the dialect you have written and I have downloaded it. I think I need Nest.r do %html.r Script: "HTML" (24-Oct-1999) ** Script Error: Include has no value. ** Where: Include %Nest.r NumericEntity: func [Number [integer!] /NoSemicolon] I did not find it at the rebol.org archive. Please post that also. Regards Nitish [EMAIL PROTECTED] http://www.loka.net/ -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, 16 February 2000 20:38 To: [EMAIL PROTECTED] Subject:[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:(2) Jean wrote: So if I use a block within a block I need reduce to tell rebol to evaluate the embedded block. But why do I need rejoin in this case ? join "HTML" [reduce block1 "/HTML"] also worked as I tried it. Theoretically, rejoin ["HTML" block1 "/HTML"] should work,too. The Rebol doc says: Rejoin: Reduces and joins a block of values. Unfortunately, not quite correct as you interpret. The 'rejoin reduces and joins this block: ["HTML" block1 "/HTML"] NOT this block: block1 Here's a nicer way: rejoin [ "" HTML reduce block1 /HTML ] Note the empty string. This returns a string, and uses REBOL native tag values. Of course what we really, really want is: print HTML/Dialect [ Head [ Title "HTML/Dialect Title" ] Body [ "Body Attributes" ][ H1 Title center "Body Contents" Br "Time is:" now/time ] ] Note the use of the word 'head, the interesting uses of the word 'title, _optional_ inclusion of tag attributes, and the inclusion of REBOL functions/words. This version of my HTML dialect is very, very close to completion. Andrew Martin REBOlutionary solutions... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -- begin 600 WINMAIL.DAT M)\^(B0(`0:0" `$```!``$``00!@`(Y 0```#H``$(@ ` M ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`@`"``$$ MD 8`= $```$0`P``, (+``\.``(!_P\!.P`` M``"!*Q^DOJ,09UN`-T!#U0"`QIW1 F5B;VPN8V]M`%--5% `;ES M=$!R96)O;"YC;VT``!X``C !!0```%--5% `'@`#, $/ M;ES=$!R96)O;"YC;VT```,`%0P!`P#^#P8``$P`0```!$G M;ES=$!R96)O;"YC;VTG``(!"S !% ```%--5% Z3$E35$!214)/ M3"Y#3TT``P``.0`+`$ Z`0```!X`]E\!#P```QIW1 F5B;VPN M8V]M```"`?=?`0```#L`@2L?I+ZC$!F=;@#=`0]4`@!L:7-T M0')E8F]L+F-O;0!33510`QIW1 F5B;VPN8V]M```#`/U?`0,`_U\` M`@'V#P$$`IE`02 `0`^4D4Z(%M214)/3%T@05Z M(%M214)/3%T@1EA;5C=EN9RXN+E-T86-K($]V97)F;]W(#\A(%)E.B@R M*0!W$@$%@ ,`#@```- '`@`0`!4`,P`7``,`2P$!(( #``X```#0!P(`$ `5 M`"X`.0`#`@!`0F `0`A,$,T1C="-#0Q1CDR,T(T.3DR-D(Q-C R1#A" M03DW.#8`P!`Y `$P)```A"P`"``$+`",```,`)@`` M"P`I```#`"X```,`-@``0 `Y`,"$, !;+\!'@!P``$^ M4D4Z(%M214)/3%T@05Z(%M214)/3%T@1EA;5C=EN9RXN+E-T86-K M($]V97)F;]W(#\A(%)E.B@R*0(!0`!%@_%K_F=L=(1UF M#4N%E;8`4950Q3,``!X`'@P!!0```%--5% `'@`?# $/ MF5B;VQ ;]K82YN970```,`!A#8#%6Z`P`'$T%`@0`0```4```!( M14Q,3U1(15)%+$%.1%)%5TE!34E.5$5215-4141)3E1(141)04Q%0U193U5( M059%5U))5%1%3D%.1$E(059%1$]73DQ/041%1$E4251(24Y+24Y%141.15-4 M4D1/)4A434Q2``(!"1 !#@8```H``";"@``3%I=8X6G8#``H` MF-P9S$R-48R`/@+8YG-0X@.9T!]R "I /C`@!C: K X'-E=# @!Q,"@P!0 MH1!V')Q,A%V?0J V0C((#L);PXP-0* "H%L=6,`4 L#8P!!#P(Q"# S,PNF M($AE;)$)`"!T: 2092P1'1N9 EP=PJB"H0*@$E0(%M( N =!AA\T:00: M$1@R(0',060505 0A@(!$`=AL@=]\%$ ) "? 9X!C (!G0' /09]W;@D` M80$`K\="X9%!T!$ +@L=`9YN" :L ? H NAD4!#X^'7$@)6AT;0IL M( 93!0,Z(")(`%1-3"(@*#(T1"U/Y M,3DC,"F910J*@8`!01%@-@XG(B M$$EN8PI `0`;\?4$(X8('8'0 I0'E4CT997%(DR"4?RDYU!X!9!1!C10(P M''!Y(A!FTG4D\"!;*(%B!) IL 4:(F$D"%=("].FF\8T-X CQ;ET9'.\; M0!JP): %08+@!X2"O!4 ;`@EP!N$N!;!G"*A#P:1P@+B!0W#S)7 ; M('!OH 8,2VA!T#LV\51D44BJ "Q$0P+H-!QP! !H10N$T )`*AK82X? M'09%74#(($@\'1P.B\O=S3@^BXS5B\T,0% 2D9 LP\QI,S8!0!:0-$# M8(:0!N0$@0Q-B M.1)Z3P409PN !T %T 0_YA*I Y$QD6."0UXPLQ."8R M:2,0-#0!0#=P,3B., % #- \LV(@1@-A6CH,@V(182$@0@400+AX='(S@ 6@ M,Y!Z*;#@4TU44#H^WRNV/ W!F ",#Y'5PF 'W!S9"QA1B0..%+B!R=3D* MP'D@`= ]0$0Q.C-R.$%W5\^1S=PH! BRX4!:!M07AU8FH;@8$^1UM214)/ M3"K0;$%7(A!(ED0;5 N 9ZHN2G!3`9!C'S!/'"#@[P'9 @/R$'\"`_R*@ M(V4['S@T-W0/!@NG2/^2B]@`Z 4#@Q/D @- 8`EQ@@!I =`74O@6$@`F#^ M;TK1`_ \E7'U4)18`O1L@=!@A%_$N!%/B9272O2V@91D4P(K,"H`9!WR M)U'#'E4@D$)U!4!W:.=$(""Q4Q=J;QK1M,$`/0@8R]R/QD:()!:T5C3U"(\ M(D(^(H!;4X51P_HQ6U$O6X0KNR"0,%(0/T%LL:H25Q'M$(@1X96@R^5!A0 M!; 10 W@!T!L0U#[6@]8M5M;9UQ_8BPR A@]FP:L%ZR+%/P,(!A,DNQSU22 M'8 IH#H@7-05UK1_S%@6-(B$
[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:(4)
Nitish wrote: I am interested in the dialect you have written... There's a complete package, incorporating Robert Muench's enhancements from this page: http://openip.org/html/ow_overview.html or directly from: http://openip.org/html/rebol_html.zip The first page has some examples which can be helpful. Caution! This is version one of my HTML dialect. Not the bleeding edge version which only runs on REBOL/View. Andrew Martin Still fiddling... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] Dialecting...Stack Overflow ?!
Hi , I tried to learn th. about writing dialects. So I did the following code, to begin with. I exspected it to putput the following: HTMLHEADTITLETitel/TITLE/HEADBODYDas ist ein Text !/BODY/HTML but I got an error msg of type: stack overflow , though I had increased stack to 3.000.000 Bytes. Here's my program: REBOL [] ;definition part html: func [block1] [join "HTML" [block1 "/HTML"]] head: func [block2] [join "HEAD" [block2 "/HEAD"]] body: func [block3] [join "BODY" [block3 "/BODY"]] title: func [block4] [join "TITLE" [block4 "/TITLE"]] ;test part a: html [ head [ title "Titel" ] body [ "Das ist ein Text !" ] ] print a myhtml.r myhtml.r
[REBOL] Dialecting...Stack Overflow ?! Re:
'head is also the name of word used a lot by REBOL. Have a look at the source for 'append, and you will see why. If you have a look at my %HTML.r script on http://www.rebol.org, or from http://openip.org, you'll see my early approach to writing a HTML dialect, using a similar method. Andrew Martin Who's up bright and early downloading the Windows Platform SDK. It's only taken all night so far! :-) ICQ: 26227169 http://members.xoom.com/AndrewMartin/ -- - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 16 February 2000 4:46 AM Subject: [REBOL] Dialecting...Stack Overflow ?! Hi , I tried to learn about writing dialects. So I did the following code, to begin with. I expected it to output the following: HTMLHEADTITLETitel/TITLE/HEADBODYDas ist ein Text !/BODY/HTML but I got an error msg of type: stack overflow, though I had increased stack to 3.000.000 Bytes. Here's my program: REBOL [] ;definition part html: func [block1] [join "HTML" [block1 "/HTML"]] head: func [block2] [join "HEAD" [block2 "/HEAD"]] body: func [block3] [join "BODY" [block3 "/BODY"]] title: func [block4] [join "TITLE" [block4 "/TITLE"]] ;test part a: html [ head [ title "Titel" ] body [ "Das ist ein Text !" ] ] print a myhtml.r
[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:
-Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Gesendet am: Dienstag, 15. Februar 2000 17:15 An: [EMAIL PROTECTED] Betreff: [REBOL] Dialecting...Stack Overflow ?! Re: 'head is also the name of word used a lot by REBOL. Have a look at the source for 'append, and you will see why. using a reserved word is not a good idea, right ?! Thanks, Jean
[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:
-Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Gesendet am: Dienstag, 15. Februar 2000 19:41 An: [EMAIL PROTECTED] Betreff: [REBOL] Dialecting...Stack Overflow ?! Re: Hi Jean, that's a funny one. join uses append. append uses the REBOL functio head to return the series it appended to at its head. You redefine head to be head: func [block2] [join "HEAD" [block2 "/HEAD"]] So, what happens is whenever join is called within your functions, eventually head is called (the intention is to call REBOL's predefined head!) and instead of REBOL's head function your head function is called, which in turn does a join, which leads to calling head ... and you have happily constructed an infinite loop. :-) If you rename head to something else: html-head then you script runs (with problems), producing do %myhtml.r Script: "Untitled" (none) HTMLhtml-head title Titel body Das ist ein Text !/HTML Note that the next problem you encounter is that you get title Titel instead of your intended TITLE/TITLE and you get body Das ... instead of your intended BODY.../BODY. The reason you get this is that you pass the block [title "Titel"] etc. and therefore title is not reduced. You need to use rejoin in your functions and - because the block you are passing to html consists of two embedded blocks, the html-head block and the body block - you need to use an additional reduce in addition to rejoin. Now the thing returns: do %myhtml.r Script: "Untitled" (none) HTMLHEADtitle Titel/HEAD BODYDas ist ein Text !/BODY/HTML and the complete, slightly modified code is: REBOL [] ;definition part html: func [block1 ] [rejoin ["HTML" reduce block1 "/HTML"]] html-head: func [block2] [rejoin ["HEAD" block2 "/HEAD"]] body: func [block3] [rejoin ["BODY" block3 "/BODY"]] title: func [block4] [rejoin ["TITLE" block4 "/TITLE"]] ;test part a: html [ html-head [ title "Titel" ] body [ "Das ist ein Text !" ] ] print a ;- Elan [: - )] Thanks a lot. Now it works :) So if I use a block within a block I need reduce to tell rebol to evaluate the embedded block. But why do I need rejoin in this case ? join "HTML" [reduce block1 "/HTML"] also worked as I tried it. Theoretically, rejoin ["HTML" block1 "/HTML"] should work,too. The Rebol doc says: Rejoin: Reduces and joins a block of values. ciao, Jean
[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:(2)
Andrew wrote: 'head is also the name of word used a lot by REBOL. Have a look at the source for 'append, and you will see why. Jean wrote: using a reserved word is not a good idea, right ?! 'head is not reserved. It can be replaced like virtually all words in REBOL. It's just that a lot of other software relies on 'head returning the head of a series. 'head and other words with all ready defined meanings/value in REBOL, are becoming magical. Have a look at my %html.r at: http://www.rebol.org I've blazed a trail there into the HTML dialect that you're looking for. My latest work on the HTML dialect requires REBOL/View with the new parse block capability. Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --
[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:(2)
Jean wrote: So if I use a block within a block I need reduce to tell rebol to evaluate the embedded block. But why do I need rejoin in this case ? join "HTML" [reduce block1 "/HTML"] also worked as I tried it. Theoretically, rejoin ["HTML" block1 "/HTML"] should work,too. The Rebol doc says: Rejoin: Reduces and joins a block of values. Unfortunately, not quite correct as you interpret. The 'rejoin reduces and joins this block: ["HTML" block1 "/HTML"] NOT this block: block1 Here's a nicer way: rejoin [ "" HTML reduce block1 /HTML ] Note the empty string. This returns a string, and uses REBOL native tag values. Of course what we really, really want is: print HTML/Dialect [ Head [ Title "HTML/Dialect Title" ] Body [ "Body Attributes" ][ H1 Title center "Body Contents" Br "Time is:" now/time ] ] Note the use of the word 'head, the interesting uses of the word 'title, _optional_ inclusion of tag attributes, and the inclusion of REBOL functions/words. This version of my HTML dialect is very, very close to completion. Andrew Martin REBOlutionary solutions... ICQ: 26227169 http://members.xoom.com/AndrewMartin/ --