REBOL3 - Cookbook (For http://www.rebol.net/cookbook/requests.html [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
97RobertS.22-May-09 16:11
96RobertSJust cleaning up the white space after [fit key 255.0.255] seems to suffice to get it to run ( I am saving using TextPad on WinXP )1-Apr-08 1:55
95RobertSthe "styles" example found in our %vid-usage.r at rebol.org locks up any Rebol that I have ( I only go back a few versions ) without halt and unview ... if this is not a cookbook kind of issue, perhaps I should post the note elsewhere ... I don't see the problem yet ( it has been a very long day + a blizzard in Minneapolis)1-Apr-08 1:27
94Webb Stone.25-Sep-07 4:07
93Thørsyncing...26-May-06 16:57
92Anton; damn! wish I could eat that again.25-May-06 15:36
91Antondessert: none ; ok, no dessert tonight eat dinner ** Script Error: course already eaten ** Near: eat dinner25-May-06 15:35
90Anton** Script Error: dessert has no value ** Near: dessert25-May-06 15:33
89Antondinner: reduce [dinner mock-duck dessert] length? dinner ; == 325-May-06 15:33
88Henrik>> type? dinner == delicous!25-May-06 15:32
87Antoneat dinner: salt fry enpan butter slice fish: any [all [fish: pick choose look fish-shop 1 buy fish] canned-tuna]25-May-06 15:31
86Antonmock-duck: season fry add-spices tofu: curdle soy-milk25-May-06 15:31
85Thør,2-Apr-06 7:34
84SunandaTom started this group with a reference to http://www.rebol.net/cookbook/requests.html It's a set of outstanding requests for cookbook entries -- ie examples that people would like to see. As he says.some have been done independently of the request, and published on the REBOLn Altmes or the Mailing List. It'd be a great collective community New Year's resolution to clear some of the cookbook request by the end of the month (and that leaves plenty of time to enter the competition too)3-Jan-06 16:43
83IngoThe name of this group contained the text [web-publish], I changed it to the correct [web-public]20-Jul-05 7:00
82MikeJBeOS had the annotated BeBook: http://www.beunited.org/bebook/ It was pretty useful back when people were really coding for the OS.19-Jul-05 21:59
81Henrikmy basic thinking is that proper documentation is only possible through a wiki19-Jul-05 20:46
80Henriksunanda: they are not meant to be published on my site, I simply wanted to approve them here before handing them to Carl (which I actually have, but he hasn't responded other than "Cool!", but hasn't done anything :-)).

I was thinking about a very simple extension to webserv.r which simply submits a form to a modified makedoc2.r processor, which generates a page, sectioned so that you can edit small parts of it.

19-Jul-05 20:45
79SunandaHenrik --- One question: how good is the SEO on your site? Little point putting cookbook entries where they are hard for the world to find.

One idea: why not write a wiki-formatting to HTML function (you'll need it anyway) and donate it to the Library ?..... .... REBOL.org can then accept cookbook entries and other articles in wiki format --- we already accept all other major formats: MakeDoc, NicomDoc, eText etc. And we do have good SEO.

19-Jul-05 20:41
78HenrikIf I built a little page to create cookbook entries in wiki style, would you use it? It could be useful to have cookbook entries fixed quickly this way as I'm too pressed for time to release my tutorials.19-Jul-05 20:35
77SunandaOr poeple could just write some more :-)11-Jul-05 14:42
76yeksoonsounds good to me.

maybe Carl can comment or give the green light to put the cookbooks examples into rebol.org...

11-Jul-05 12:46
75SunandaREBOL.org also hosts articles -- and you can tag those for anything you want. Might be a solution: http://www.rebol.org/cgi-bin/cgiwrap/rebol/art-index.r

{so an article could be tagged as [cookbook advanced ios] etc)

11-Jul-05 7:46
74yeksoonrebol.org library already have tagging for the scripts.

Both in terms of levels ["Beginner" "Intermediate" "Advanced"] as well as the domain ["cgi" "gui"] etc...

Perhaps there is a way to feed the cookbook examples into rebol.org and let the Library be the holding place for future cookbook examples.

There are '3 major' rebol sites (those with rebol in the domain). And they are rebol.com, rebol.net, rebol.org. It is not incredibly clear whether certain docs should be in .org or .net.

Other suggestion to consider is how can we leverage off works done in various sites and avoid duplication. Why not let rebol.org be the host for cookbooks as well?

I would think new comers will prefer to find both cookbook examples and other contributed scripts all in one location. Rebol.org also lets you search the mailing list.

11-Jul-05 7:37
73HenrikI would vote for Easy, Medium, Hard, Guru sections11-Jul-05 3:38
72yeksoona little suggestion.

the current cookbook page at , http://www.rebol.net/cookbook/ , needs to have better tagging for sorting and searching purposes.

Example. An example can be tag to 'view', 'cgi', 'ios'

Or, we can break it up into 'logical chapters in a book'. Example

1. Part I. Rebol Basics 2. Part II. Advanced Rebol 3. Part III. /View Basics 4. Part IV. /View Styles 5. Part V. /IOS 6. List of Examples

11-Jul-05 3:33
71?thanks Chris9-Jul-05 3:00
70ChrisI'm not certain if it is documented, I may have picked it up from eg. an IOS reblet. But if you -- probe svv/facet-words -- you can see how it is used...9-Jul-05 2:58
69?Chris do you know where that is documented at? I though 'with was for setting face values.8-Jul-05 22:24
68Henrikhmm... this will mean that the layout/offset is not the same as contents-pane/pane/offset8-Jul-05 16:48
67Chris'of sets face/related8-Jul-05 15:46
66DideC'of : If its documented, I don't remember where!8-Jul-05 15:22
65?its in the document8-Jul-05 15:13
64?I see where the show-pane function came from so nevermind that question8-Jul-05 15:13
63?I never knew of this word "of" - is that documented somewhere?8-Jul-05 15:10
62?where does the function show-pane come from?8-Jul-05 15:08
61DideCThe note talk about layout/TIGHT, but you did not use it before !!!!8-Jul-05 15:07
60DideC(you did it in the full code, but not before)8-Jul-05 15:07
59DideCYou forget et remove the 'update-tabs call in the 'show-pane function.8-Jul-05 15:05
58DideCpane1: layout/offset [ across text "Setting 1" field return text "Setting 2" field ] 0x0

...

8-Jul-05 15:04
57DideCAnother comment : it's better to remove the offset at the pane creation rather than each time you show one. So use :8-Jul-05 15:04
56Henriktutorial updated now. 15% code reduction8-Jul-05 8:55
55DideC:)8-Jul-05 8:52
54HenrikI vote for getting VID stuff into the dictionary :-)8-Jul-05 8:38
53Henrik:-)8-Jul-05 8:36
52Henrikworks. bleh. >/(8-Jul-05 8:36
51DideCadd "data true" to the default tog8-Jul-05 8:32
50DideCWe learn something each day :)8-Jul-05 8:31
49Henrikhow do you set the default pane?8-Jul-05 8:24
48Henrikamazing! I never knew this. I will rewrite it immediately.8-Jul-05 8:19
47DideCmain: layout [ space 2 origin 4 across style pane-tog tog of 'panels ; Just to avoid puting {of 'panels} in each tog lines below pane1-tab: pane-tog 100x30 "Pane 1" [show-pane pane1] pane2-tab: pane-tog 100x30 "Pane 2" [show-pane pane2] pane3-tab: pane-tog 100x30 "Pane 3" [show-pane pane3] return content-pane: box 300x200 return btn white "Save" ; Save and Apply are used here for decorative purposes btn orange "Apply" btn sky "Close" [unview] ]8-Jul-05 8:11
46DideCOne point that would make it simpler : you didn't used 'of keyword for your tog style. 'of keyword allow to group toggle, radio or checkbox in order to reset others while you set one. Like this you don't need 'update-tabs functions :8-Jul-05 8:11
45HenrikI think my panes cookbook example is ready for one last review: http://hmkdesign.dk/rebol/panescookbook.html

I've removed some unnecessary bits about styles and I've added references to the User preferences window in the rebol/view 1.3 desktop

8-Jul-05 4:05
44Grahamspam search bots create lots of junk in the Vanilla sites8-Jul-05 3:43
43Henrikyes, they can get pretty nasty, destroying contents and things like that8-Jul-05 3:42
42Grahamotherwise I have found scripts generating spam8-Jul-05 3:37
41Grahamthat's why I have made logging in obligatory to edit pages8-Jul-05 3:37
40HenrikI know mediawiki, as I use it for the Amiga AWeb Webbrowser. be careful with spammers....8-Jul-05 3:35
39GrahamPS: mediawiki is used to drive wikipedia.8-Jul-05 3:34
38GrahamThe advantage over Vanilla is that changes can be rolled back using the mysql database ...8-Jul-05 3:04
37GrahamI've set up mediawiki at http://compkarori.com/rebolwiki/index.php/Main_Page and will see how it goes. Currently there's a sql error on updating or creating a page, but you can ignore that it seems as the page changes are made.8-Jul-05 3:03
36GrahamThere's never any such thing as perfect code .. better to get something up, and let others build on it .. paraphrasing Isaac Newton8-Jul-05 2:26
35Henrikwell, I can remove them and make a part 2 tutorial? such as it is now, the code is pretty usable, I think. But it's far from perfect in terms of capability, so do we want perfect code across a few examples or just this one tutorial?8-Jul-05 1:49
34GrahamHenrik, it's nice, but I think the person who looks at a cookbook example doesn't necessarily have the skills to do the exercises to complete those parts left to the reader. I'd prefer complete examples rather than leaving something up to the reader.7-Jul-05 20:35
33Colinworks! thanks.7-Jul-05 19:15
32Henrikstupid FTP client... try again :-)7-Jul-05 19:15
31ColinI'm still gettting forbidden7-Jul-05 19:11
30Henrikammon, should be fixed now7-Jul-05 18:57
29AmmonHenrik, I'm getting a 403 Forbidden error from your link...7-Jul-05 17:03
28SunandaDideC -- your method is similar to Henrik's, and has the same limitation: sub-objects fields do not propagate as you'd expect.....No f2-2 field in 'config here:

standard-config: make object! [f1: 1 f2: make object! [f2-1: 21 f2-2: 22] f3: 3] config-file: make object! [f1: 88 f2: make object! [f2-1: 99]] probe config: construct/with third config-file standard-config

7-Jul-05 16:16
27DideCconfig: make standard-config load config-file7-Jul-05 12:14
26DideCI use 'construct for security reason, but it's most understandable with 'make :7-Jul-05 12:13
25DideCstandard-config is your config-object.7-Jul-05 12:13
24DideCwhere config-file hold the config values as a block. If it's stored as an object, you can use 'third to have the block.7-Jul-05 12:12
23DideCconfig: construct/with load config-file standard-config7-Jul-05 12:11
22DideCOn extending config with new values, I usally just use :7-Jul-05 12:09
21Henriksunanda, I've decided to leave recursive upgrading as an excersize to the reader and just made a few notes on it ;-) I must move on with the other tutorial now7-Jul-05 12:06
20HenrikI'll be updating the old tutorial on panes with modified code soon.7-Jul-05 11:29
19Henrikthanks for that. I don't know if I'll bring it in though as it would make the tutorial more complex. I might have o split it in multiple parts.7-Jul-05 11:27
18SunandaNice, Henrik!

I do that sort of stuff all the time, and I am sure others do too. So to have it as a single item is a good thing.

One small point -- your way of extending the existing object works only for single-level values....I often have configuration objects that have sub-objects. A field added to a sub-object would be missed by your code. Take a look at: http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=extend-an-object.r Which was created for this sort of purpose.

7-Jul-05 10:37
17HenrikI've created a new draft for a cookbook tutorial for creating a set of configuration loading and storing tools: http://hmkdesign.dk/rebol/configurationtools.html

It's a bit long though, but tell me what you think

7-Jul-05 10:06
16HenrikI'm going to do a last check on my panes example and then submit it to Carl. Haven't done any changes to it.12-May-05 12:59
15HenrikI would probably like to see a cookbook example on some kind of error handling/redirecting to file or a nice popup window. I've experienced terrified users that call me about "that white text window with cryptic messages in it" that crop up on fatal bugs.12-May-05 12:58
14HenrikI like the idea of a cookbook entry to check on versions. It could be expanded to check on OS and other things (what system is this script running on?)28-Mar-05 7:26
13BrockBeat me to it if you choose ;)27-Mar-05 15:47
12BrockI think all of the cookbook entries should be fixed to indicate their limitation as stated above!! OR, another cookbook entry should be made to indicate how to variably use code from one version of Rebol over another.27-Mar-05 15:46
11Henrikfixed a couple of typos now, but I think I'll still only post a version note at the bottom like in the other scripts...26-Mar-05 19:45
10Volkersomething like this? "As of <today>, it needs at least beta x (windows http://*), this and other betas are here: http://www.rebol.net/builds/"26-Mar-05 19:25
9HenrikI'm not sure how to incorporate that in the code without having it dominate the example. Besides the other examples simply state that you need a specific rebol version to use them26-Mar-05 18:32
8Brockeither 1.2.8.31 < system/version [ print "Version greater than 1.2.8.31" ][ print "Version less than or equal to 1.2.8.30" ]26-Mar-05 17:52
7BrockHenrik, that's really nice and simple. I would suggest putting in some code to check the version number and using the appropriate code, for example...26-Mar-05 17:49
6Henrikalright... I've put it here for review: http://hmkdesign.dk/rebol/panescookbook.html If you think it looks reasonably simple, I'll submit it to Carl.26-Mar-05 9:40
5HenrikI'm doing an example now on tabbed pages. I hope it'll be easy to understand. :-)26-Mar-05 7:19
4Tomcquestions that are not answered may merit some discussion / implementation21-Mar-05 21:25
3Tomcglancing through I belive there are many solved questions here that should be posted.21-Mar-05 21:24
2Tomchttp://www.rebol.net/cookbook/requests.html21-Mar-05 21:23
1TomcSorry if people alreadu know about this but I just stumbled accross it21-Mar-05 21:23

Return to Index Page