Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL]

 [1/43] from: riusa::email::it at: 3-May-2002 17:20


hi all, a question: why the following code does not work? (it should call the loop every 10 seconds, and in the loop, show 3 random numbers: one per second). I see always fast numbers running in the "info" (no pause!). rebol [] view layout [ a: info rate 10 feel [ engage: func [face act evt] [ loop 3 [ face/text: random 100 show face wait 1 ] ] ] ] --Alessandro--

 [2/43] from: g:santilli:tiscalinet:it at: 3-May-2002 19:25


Hi Alessandro, On Friday, May 03, 2002, 5:20:10 PM, you wrote: rei> why the following code does not work? rate 10 means 10 times a second. Use 0:0:10 instead. rei> wait 1 Holger said one should not call WAIT in an event handler... so it's better to avoid that. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [3/43] from: oliva:david:seznam:cz at: 20-Nov-2001 20:16


Flash dialect / parsing expressions =================================== Hi all... Ryan [[ryanc--iesco-dms--com]] wrote:
>I would rethink the whole approach. Data can be imprinted on gif, jpeg, png, >and bmp, and saved as a png or bmp using /View very easily, but forget about >swf. Could be done like so:
ech... why to forget about SWF? Flash is a toy in comparison with Rebol. I've started to make Flash file parsing script year ago but then I stoped because I had better things to do... now when I have free time as unemployed I decided to continue a litle bit so now I have script able to show all (and describe some) of the tags in the SWF file (upto version 4).... ... so .... Flash is tag based and the player ignores tags that doesn't know so it's not problem to add some own tags into the existing file if you need it.... ... I actually started to make dialect for creating Flash files as well.... so for example this code will create flash file that will contain two movies; one at position 100x100 and the second at 200x100 scaled to 50% and rotated by 20degrees and move the movie1 to position 0x0 at second frame and stop playing the main timeline (both movies continue playing if has more frames): rebol [ type: 'swf file: %new.swf background: 153.165.139 rate: 20 size: 320x240 ] EmptySprite 1 PlaceObject2 1 [name "movie1" depth 1 at 100x100] PlaceObject2 1 [name "movie2" depth 2 at 200x100] DoAction [ LoadMovie %logo5.swf "movie1" LoadMovie http://127.0.0.1/flash/phabal/hlava2.swf "movie2" SetProperties "movie2" [ScaleX 50 ScaleY 50 Rotate 20] ] showFrame PlaceObject2 1 [name "movie1" depth 1 move at 0x0] DoAction [stop] showFrame end ;---------------------------------------------------- OK... I've problems as well because I'm not parsing expert:-(and this is my first dialect:) Parsing expressions -=-=-=-=-=-=-=-=-=- This is working now: a: 1 ;or a: "some string" will be parsed by: ... | copy v set-word! set v2 [string! | integer!] ( form-act-tag #{96} rejoin [#{00} to-word first v #{00}] form-act-tag #{96} rejoin [#{00} v2 #{00}] ins-act #{1D} ;ActionSetVariable ) | ... that is in binary: ActionPush #{96} #{006100} ;--->is a as string! ActionPush #{96} #{003100} ;--->is 1 as string! ActionSetVariable #{1D} #{} Flash4 Actions model is stack based that means that the above code works in FlashPlayer as: 1. Pops value off the stack. 2. Pops name off the stack, which is a string naming the variable to set. 3. Sets the variable name in the current execution context to value. SO, how to make something more complicated like this: ----------------------------------------------------- I have 3 representations of the same simple operation: 1. In ActionScript: =================== Set Variable: "a" = 1 + 4 2. In Flash binary DoActionTag: =============================== ActionPush #{96} #{006100} ;--->is a as string! ActionPush #{96} #{003100} ;--->is 1 as string! ActionPush #{96} #{003400} ;--->is 4 as string! ActionAdd #{0A} #{} ActionSetVariable #{1D} #{} (DoAction Tag(12): 12 21 #{9603000061009603000031009603000034000A1D00}) 3. In Rebol: ============ a: 1 + 4 ......and the question is, how should look the Rebol parsing rule, that would create the correct Flash binary DoActionTag? and even more complicated example: 1. In ActionScript: =================== Set Variable: "a" = 1 + Random(10) 2. is in Flash binary DoActionTag: =============================== ActionPush #{96} #{006100} ;--->is a as string! ActionPush #{96} #{003100} ;--->is 1 as string! ActionPush #{96} #{00313000} ;--->is 10 as string! ActionRandomNumber #{30} #{} ActionAdd #{0A} #{} ActionSetVariable #{1D} #{} (DoAction Tag(12): 12 23 #{96030000610096030000310096040000313000300A1D00}) 3. should be in Rebol: ====================== a: 1 + random 10 ======================================================================================== That's all for now, if you are more interested or think you can help me, let me know.... Cheers Oldes

 [4/43] from: lordsteven:zcrew at: 3-Nov-2001 10:20


I'm newer to Rebol and am looking to it as a http server solution. I am currently running the webserv.r server available from Rebol and was wondering if anyone knew of a way to implement Server Side Includes with a rebol server, preferable being able to use the standard SSI command e.g. <!--#include virtual="/example.txt"--> Any ideas would be appreciated. -- Steven W. Rungtranont [lordsteven--zcrew--org] http://www.zcrew.org/lsd/ ...To Strive, To Seek, To Find, and Not To Yield

 [5/43] from: media:quazart at: 5-Nov-2001 10:32


Just loading a rebol file will include and bind it to the global context! load %/path/to/include.r if some values must be computed or set within the include at its root level, then I have found that sometimes an explicit "do" must be performed right after the load as in: do load %/path/to/include.r my cgi server includes practically everything that is served... this enables me to have templates which I fill-up as the user requests particular data. For example, I have a cgi-driven make-doc file viewer which uses this method for separating visuals and content data. -Max

 [6/43] from: anton:lexicon at: 19-May-2002 23:47


I would like to install this on red hat linux. http://www.rebol.com/beta-versions.html http://www.reboltech.com/downloads/view1205042.gz I haven't been able to figure out how to unpack it, though. What command line did you guys use? I tried tar and gzip, and they both say it's corrupt or wrong format, so I tried downloading again. Anton.

 [7/43] from: nitsch-lists:netcologne at: 19-May-2002 20:48


Hi Anton Am Sonntag, 19. Mai 2002 15:47 schrieb Anton:
> I would like to install this on red hat linux. > http://www.rebol.com/beta-versions.html
<<quoted lines omitted: 3>>
> I tried tar and gzip, and they both say it's corrupt > or wrong format, so I tried downloading again.
tar -xzf file fails because tar collects multiple files. called *.tar.gz or *.tgz . the beta is only one file. use gunzip file or "gzip -d file". then "chmod u+x view1205042" (make runnable). and "./view1205042". should run (suse here).
> Anton.
Good luck :) Volker

 [8/43] from: anton:lexicon at: 20-May-2002 20:03


I just noticed this:
>> append %aaa/ 'bbb/ccc
== %aaa/bbbccc What happened to the slash ? Same result on beta and previous release of View. Does anyone else see this as an inconsistency ? Anton.

 [9/43] from: g:santilli:tiscalinet:it at: 20-May-2002 21:04


Hi Anton, On Monday, May 20, 2002, 12:03:11 PM, you wrote: A> >> append %aaa/ 'bbb/ccc A> == %aaa/bbbccc A> What happened to the slash ? It is actually the same as:
>> append %aaa/ [bbb ccc]
== %aaa/bbbccc Maybe you intended:
>> append %aaa/ %bbb/ccc
== %aaa/bbb/ccc Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [10/43] from: anton:lexicon at: 21-May-2002 3:58


This is not important, I will just restart, but... In the middle of an extensive editing session just now, (using the new View beta,) I noticed this untamed behaviour:
>> split-path %index.r
== [%./index.r %index.r] ; what?
>> split-path %index
== [%./index.r %index] ; still crazy, let's investigate...
>> ?? split-path
split-path: func [ {Splits a file or URL path. Returns a block containing path and target.} target [file! url!] /local file path p][ p: %./index.r ;;; <------------- ((( notice this line... ))) path: parse/all target "/" if all [1 = length? path not empty? path/1] [ change path either any ["./" = path/1 "." = path/1 all [any ["../" path/1 ".." = path/1] p: %../]] [none] [to-file path/1] all [slash = last target path/1 append path/1 slash] return head insert path p] foreach item path [if item [append item slash]] if (last target) <> slash [remove back tail last path] file: last path remove back tail path file: to-file file if (length? path) = 0 [insert path slash file: none] path: rejoin path file all [any [file = %. file = %..] file: dirize file] either file? target [ reduce [to-file path file]] [ reduce [to-url join (copy/part target head target) path file] ] ] ; just check the global context...
>> p
** Script Error: p has no value ** Near: p Now, if you start a fresh rebol, you should see 'p initialised to %./ But it was changed somehow. How could any of my code modify the local 'p ? (I was doing a lot of stuff with index.r files, and I also patched path-thru slightly). How did the value of p get changed? How did the value escape from the local context of the function to be modified somewhere else? I cannot see a way, but perhaps some of you have ideas. Anton.

 [11/43] from: riusa:email:it at: 6-Jun-2002 8:48


Hi all, I was very interested to the function "launch" (I didn't know it). But I didn't find enought documentation about it. Can someone tell me more about launch refiniments? (this function could be used to simulate a multiprocessing system!). thank you! --Alessandro--

 [12/43] from: riusa:email:it at: 5-Jul-2002 14:54


Hi all, I send this email to everybody, but in expecially to Rebol creators, Rebol administrators, etc... Why? I wish to let you thinking it over Rebol licences, Macromedia Flash MX licences, software features, etc... These 2 programs are quite different, but for some software categories I can use both of them. Think about client/server systems like browser web and application server (like ColdFusion, like Zope, etc...). I have this configuration: ***************** ++++++++++++ ==================== *FLASH-MX CLIENT*---->+WEB SERVER+---->=APPLICATION SERVER***************** ++++++++++++ ==================== ************** ++++++++++++ ==================== *REBOL CLIENT*---->+WEB SERVER+---->=APPLICATION SERVER************** ++++++++++++ ==================== I can use XML to communicate (expecially in Flash MX) and I can dinamically generate Rebol code in Application server (I can always use XML if I wish). I don't want to make a deep analysis about 2 systems, but I want to lightlight you a problem I found in my company. I developed 2 different programs with the previous configuration (either Rebol or Flash MX). I developed 2 very fine software, but I encountered some problems about the licence. In Flash MX, I bought a Macromedia Flash MX package (I paid it about 600 euros plus IVA), but every client I distribute is "Free of charge". In contrast, by Rebol development system is cheaper (even using Command version I pay about of $ 350) but I need to order and to pay every client. Even if I wish use only Rebol/View or View/Pro I encounter the following problems: 1) I must buy a licence for every client (too much expensive); 2) Users that obtain "client" version, can always use Rebol language (Rebol does not distribute a "Player only", like Macromedia does) and it can be dangerous. Rebol is wonderful to use it for clients, but even Flash MX is a very good program. They have two different GUI systems, with pro & cons. But Rebol, for me, is too much expensive, and a Rebol player-only is missing. Please don't repeat me that if I buy a database like Oracle I have to buy clients, since Oracle is a World-wide RDBMS standard, many managers already know it, it is widespread, it is well-known from many people, there are thousand of companies that already use it, there is very much documentation, many companies the offer support, etc... Rebol is not the same thing. It is a very very very good young programming language. Rebol must spread itself. It is not yet so famous. Even if it is a good product, I have very few weapons to convince my boss to buy 50, 100, 200 licences of Rebol, but he made no problem when I said: please buy 4 licences of Macromedia Flash MX (we are 4 software developers). My flash clients are free! Result: Flash is still more used in my company. Please let me pay a Rebol development tool even 500 euros (like Flash) but let my clients free of charge! Furthermore, more people use Rebol, and more people directly debug it! More debug, better software! I like very much the opportunity that I have to write to Rebol mailing-list to solve my problems, but it is not enought. Another question: If I collaborate to develop Python (Open Source) I'm sure that I work for a common project, free-of-charge project. But why I should help (freely help) Rebol and Carl & co. to develop, debug, test, even write documentation, etc... if they sell and gain money from the product?! How many people exist that they think the same thing but they don't say that?! (is the same if I think it about Macromedia Flash... why I should help Macromedia if they SELL and gain money my work?!). I think they should obtain more help if... do you know Python? Of course, you must eat, and you need money! I propose a solution: 1) Rebol development kit (an example): 1a) Rebol/Core - FREE 1b) Rebol/View - FREE 1c) Rebol/View/Pro - $99 1d) Rebol/Command - $500 (maybe included a Rebol editor, something like Komodo... see ActiveState.com about Python). 2) Rebol player (like Macromedia Flash player): * ALL FREE! Free distribution! Free-of-charge! My customers will * Be happy, since they will not pay for player. * I can distribute applications over Internet and let my customers use Rebol-GUI to access to my Internet site, and everything could be free-of-charge. I could even use encrypted communications, library and DB access, etc... Rebol full power! Bye! --Alessandro--

 [13/43] from: g:santilli:tiscalinet:it at: 5-Jul-2002 19:41


Hi Alessandro, On Friday, July 05, 2002, 2:54:14 PM, you wrote: rei> 1) Rebol development kit (an example): rei> 1a) Rebol/Core - FREE rei> 1b) Rebol/View - FREE rei> 1c) Rebol/View/Pro - $99 rei> 1d) Rebol/Command - $500 (maybe included a Rebol editor, rei> something like Komodo... see ActiveState.com about Python). rei> 2) Rebol player (like Macromedia Flash player): rei> * ALL FREE! Free distribution! Free-of-charge! My customers will rei> * Be happy, since they will not pay for player. rei> * I can distribute applications over Internet and let my rei> customers use Rebol-GUI to access to my Internet site, and rei> everything could be free-of-charge. I could even use encrypted rei> communications, library and DB access, etc... Rebol full power! I only see one problem here: how would the player be different from /View? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [14/43] from: belymt:saunalahti:fi at: 5-Jul-2002 22:01


At 19:41 5.7.2002 +0200, you wrote:
>Hi Alessandro, >On Friday, July 05, 2002, 2:54:14 PM, you wrote:
<<quoted lines omitted: 13>>
>I only see one problem here: how would the player be different >from /View?
The way I see it, free Player should not have any interactive programing capability, just minimal ability to run exsting (compiled with decently priced Rebol/Compiler) scripts. I would prefer player to be as small, simple and easy to use as possible. And I hope it would contain those useful ViewPro features like crypto libs and sound.. And If it can't be free, let there be nice discounts for those who have purchased Rebol/Compiler .. 100USD/runtime is just asking too much when trying to push thru new technology to people who have used to GCC+Cygwin generated command line tools. . Joanna

 [15/43] from: g:santilli:tiscalinet:it at: 6-Jul-2002 2:00


Hi Joanna, On Friday, July 05, 2002, 9:01:23 PM, you wrote: JK> The way I see it, free Player should not have any interactive programing JK> capability, just minimal ability to run exsting (compiled with decently JK> priced Rebol/Compiler) scripts. Mmm. A binary script format? You're basically just throwing away the console, it's not worth it IMHO. It's just that RT has to decide whether its better to make REBOL popular and then find other ways to make money, or to keep REBOL as just their tool and make money on products such as IOS. I'd prefer the first... Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [16/43] from: belymt:saunalahti:fi at: 6-Jul-2002 4:45


At 02:00 6.7.2002 +0200, you wrote:
>Hi Joanna,
Hi
>On Friday, July 05, 2002, 9:01:23 PM, you wrote: >JK> The way I see it, free Player should not have any interactive programing
<<quoted lines omitted: 6>>
>as just their tool and make money on products such as IOS. I'd >prefer the first...
We'll see. Has there been any official (other than this list) about small-commercial use of /View? I I remember seeing some info, but is it official? Another question.. ... Has anyone made REBOL script that could parse Slashdot news headers and view them on small window? All info (including links to files) are on http://slashdot.org/code.shtml There is no example on REBOL. IMHO it woud make an nice example how REBOL/VIEW can be used. I looked those header files and they surely look quite easy to parse, it would make nice and short view demo. Joanna

 [17/43] from: greggirwin:mindspring at: 6-Jul-2002 10:26


Hi Joanna, << Has there been any official (other than this list) about small-commercial use of /View? I I remember seeing some info, but is it official? >> I haven't seen any official postings on their site. --Gregg

 [18/43] from: greggirwin:mindspring at: 6-Jul-2002 20:22


Hi Joanna, << Another question.. ... Has anyone made REBOL script that could parse Slashdot news headers and view them on small window? All info (including links to files) are on http://slashdot.org/code.shtml There is no example on REBOL. IMHO it woud make an nice example how REBOL/VIEW can be used. I looked those header files and they surely look quite easy to parse, it would make nice and short view demo. >> Here's a real quick, hackety-hack version that might be useful as a starting point for something nicer. The item-rules can actually be generated programmatically from the object spec without much difficulty as well, but for just this small number of fields this isn't bad. Beware strange names due to scavenged code. Anyone think this is worth improving? If we did, it could (as Joanna said) be a good showcase piece for the SlashDot crowd to give them a reason to look into REBOL. (WWW - Watch for Word Wrap) --Gregg REBOL [ Title: "Slashdot Header Viewer" Author: "Gregg Irwin" Email: [greggirwin--acm--org] Date: 6-Jul-2002 ] story: make object! [ title: url: time: author: department: topic: comments: section: image: none ] data: read http://slashdot.org/slashdot.xml stories: copy [] cur-story: make story [] parser: make object! [ item-rules: [ [thru <title> copy text to </title>] (cur-story/title: text) | [thru <url> copy text to </url>] (cur-story/url: to url! text) | [thru <time> copy text to </time>] (cur-story/time: to date! text) | [thru <author> copy text to </author>] (cur-story/author: text) | [thru <department> copy text to </department>] (cur-story/department: text) | [thru <topic> copy text to </topic>] (cur-story/topic: text) | [thru <comments> copy text to </comments>] (cur-story/comments: text) | [thru <section> copy text to </section>] (cur-story/section: text) | [thru <image> copy text to </image>] (cur-story/image: text) ] story-rule: [ [thru <story> copy text to </story>] ( parse text [some item-rules] append stories cur-story cur-story: make story [] ) ] get-stories: does [ parse data [some story-rule to end] ] ] lwide: 385 num-items-visible: 4 cnt: 0 parser/get-stories subface: layout/offset [ origin 0 space 0x0 t1: h2 lwide black snow [browse item/url] t2: text lwide black ivory - 32 t3: text lwide black ivory - 32 ] 0x0 view layout compose [ space 2x2 lst: list (as-pair 385 (subface/size/y * num-items-visible)) [ origin 0 space 0x0 box subface/size ] supply [ count: count + cnt face/pane: none if pick stories count [ item: pick stories count ; don't move it face/pane: subface t1/text: item/title t2/text: rejoin ["Posted by " item/author " on " item/time/date at item/time/time] t3/text: rejoin ["From the " item/department " dept. (" item/comments " comments)"] ] ] return sld: scroller (as-pair 16 (subface/size/y * num-items-visible)) [ c: max 0 to-integer value * subtract length? stories num-items-visible if c <> cnt [cnt: c show lst] ] ]

 [19/43] from: al::bri::xtra::co::nz at: 7-Jul-2002 12:16

parse Slashdot news headers


Joanna wrote:
> Has anyone made REBOL script that could parse Slashdot news headers and
view them on small window? All info (including links to files) are on
> http://slashdot.org/code.shtml > There is no example on REBOL. IMHO it woud make an nice example how
REBOL/VIEW can be used. I looked those header files and they surely look quite easy to parse, it would make nice and short view demo. This just does the parsing into a block of objects from a local copy of the file: Rebol [ Name: 'Slashdot Title: "Slashdot" File: %Slashdot.r Author: "Andrew Martin" eMail: [Al--Bri--xtra--co--nz] Web: http://valley.150m.com Date: 7/July/2002 Version: 1.0.0 Purpose: {Parse Slashdot news headers into a Rebol format.} Category: [util 1] ] Slashdot: read %slashdot.xml Text: string! Content: [ copy Text to #"<" ] WS: charset reduce [SP HT newline CR LF] Story_Block: [ Title: string! URL: url! Time: date! Author: string! Department: string! Topic: integer! Comments: integer! Section: string! image: file! ] Stories: make block! 20 probe parse/all Slashdot [ any WS {<?xml version="1.0"?>} any WS {<backslash} any WS {xmlns:backslash="http://slashdot.org/backslash.dtd">} any WS any [ "<story>" ( Story: make object! Story_Block ) any WS any [ [ "<title>" Content "</title>" ( Story/Title: Text ) ] | [ "<url>" Content "</url>" ( Story/URL: load Text ) ] | [ "<time>" Content "</time>" ( use [Date_Time] [ Date_Time: load Text Story/Time: first Date_Time Story/Time/time: last Date_Time ] ) ] | [ "<author>" Content "</author>" ( Story/Author: Text ) ] | [ "<department>" Content "</department>" ( Story/Department: Text ) ] | [ "<topic>" Content "</topic>" ( Story/Topic: load Text ) ] | [ "<comments>" Content "</comments>" ( Story/Comments: load Text ) ] | [ "<section>" Content "</section>" ( Story/Section: Text ) ] | [ "<image>" Content "</image>" ( Story/Image: to-file Text ) ] | WS ] "</story>" ( append Stories Story ) any WS ] "</backslash>" any WS end ] probe Stories halt It produces objects like: make object! [ Title: "Am I Hot or Not" URL: http://slashdot.org/article.pl?sid=02/07/06/1621206 Time: 6-Jul-2002/19:43:50 Author: "krow" Department: "electric-dreams" Topic: 164 Comments: 47 Section: "developers" image: %topicupgrades.gif ] That should provide a starting point for one's own work in writing View code. I hope that helps! Andrew Martin Bored Rebolutionary... ICQ: 26227169 http://valley.150m.com/

 [20/43] from: belymt:saunalahti:fi at: 7-Jul-2002 7:28

Re: [REBOL]


At 20:22 6.7.2002 -0600, you wrote:
>Hi Joanna, ><< Another question.. ... Has anyone made REBOL script that could parse
<<quoted lines omitted: 9>>
>for just this small number of fields this isn't bad. Beware strange names >due to scavenged code.
I have to confess.. I can't understand it at all.. I'll definitely need more time with REBOL :)
>Anyone think this is worth improving? If we did, it could (as Joanna said) >be a good showcase piece for the SlashDot crowd to give them a reason to >look into REBOL.
I really can't think much better place to find potential new users than Slashdot. It's full of tinkering geekish people willing to try all new hitech stuff ... According to their own media info. http://www.osdn.com/advertise/OSDN_mediakit.pdf Slashdot - 43 million page views per month - 2.6 million unique visitors per month If there are both clever server page generator and short but useful /View script made and those are placed there, they will attract quite many readers. Especially if those examples are also made available as a news article... If that happens. only real worry would be that REBOL Inc servsers would not be able to handle all that load caused by all those geeks looking for information and downloading systems for trial. Luckily REBOL/VIEW is so small file :) And while there.. remember to mention REBOL portability.. there are very few systems capable of same.. Java can, but programming it is IMHO pain, and making this kind of example on java would require a LOT more coding. But I get this error.. I'm using View 1.2.1.3.1 ** Script Error: as-pair has no value ** Where: do-boot ** Near: as-pair 385 (subface/size/y * num-items-visible) There seem not to be such word (of is it function?) as as-pair defined on View ? Or have I messed something up here? Joanna

 [21/43] from: anton:lexicon at: 7-Jul-2002 19:01


As-pair is a new, built-in, mezzanine function in the latest view beta (which seems just as stable as the previous full release. I use it full time.) (Mezzanine means you can see its source code, implemented in rebol.)
>> ?? as-pair
as-pair: func [ "Combine X and Y values into a pair." x [number!] y [number!] ][ to-pair reduce [to-integer x to-integer y] ] Go get the beta here: http://www.rebol.com/beta-versions.html Anton.

 [22/43] from: belymt:saunalahti:fi at: 7-Jul-2002 16:43


At 19:01 7.7.2002 +1000, you wrote:
>As-pair is a new, built-in, mezzanine function in the latest >view beta (which seems just as stable as the previous >full release. I use it full time.) >Go get the beta here: >http://www.rebol.com/beta-versions.html
This is excatly what one should NOT do. If this code is ever supposed to be published as a example of real-life use of REBOL on tech-news-site it should be usable on as many machines as possible. Not just 2 systems, and definitely not just with hidden Beta release. If people want to test this script they get Rebol/View from public download page at Rebol.com. And if given example won't work on it, well.. Too bad.. Lotsa bad press..
>(Mezzanine means you can see its source code, implemented >in rebol.)
Ah.. I get the idea.. Although I have not used REBOL myself I'm quite familiar with some other more-or-less similar programming languages like Forth, Lisp and PostScript. All of them are based to ability to create new words, functions (blocks or equations or whatever). So far, biggest problem with REBOL is reading those cleverly reduced examples. In REBOL source there is no indication of how many parameters each word uses and what types they are. Of course there are manuals and help features, but looking them up each time... Ah well, I expect to remember some of them soon...

 [23/43] from: greggirwin:mindspring at: 7-Jul-2002 11:25


Hi Joanna, << I have to confess.. I can't understand it at all.. I'll definitely need more time with REBOL :) >> Let me know if there's anything you want explained. The clarity of my code is probably much more at fault than REBOL. << But I get this error.. I'm using View 1.2.1.3.1 ** Script Error: as-pair has no value...> Sorry about that. The risk of quick hacking and not testing on anything other than my current environment. As Anton pointed out, it's in the new version. Rather than forcing people to use the new beta, though, you can just include it in the script. That way it will run everywhere. ; as-pair is a mezzanine in View releases after 1.2.1. ; Included here for prior versions. as-pair: func [ "Combine X and Y values into a pair." x [number!] y [number!] ][ to-pair reduce [to-integer x to-integer y] ] That's a nice feature of being able to source mezzanines. You can patch them in manually for use on older releases of the interpreter. Let me know if it works for you with the above function patched in. --Gregg

 [24/43] from: belymt:saunalahti:fi at: 7-Jul-2002 21:38


At 11:25 7.7.2002 -0600, you wrote:
>Hi Joanna, > ><< I have to confess.. I can't understand it at all.. I'll definitely need >more time with REBOL :) >> > >Let me know if there's anything you want explained. The clarity of my code >is probably much more at fault than REBOL.
It's not just your code.. I just need time to adjust.. :) One feature would be nice.. it could Re-load that data every 30 minutes or so :)
><< But I get this error.. I'm using View 1.2.1.3.1 > >** Script Error: as-pair has no value...> > >Sorry about that. The risk of quick hacking and not testing on anything >other than my current environment.
That's quite understable. http://www.rebol.com/docs/core-252.html I am reading about those changes on latest Core versions. That extended help looks really good addition, and save to memory and send/attach are definitely foog additions. But I wonder about those changes on system behaviour. IMHO those two looks quite important changes, have you seen any real issues because of those? 1.2 Load change 2.5.2 Less agressive evaluation
>As Anton pointed out, it's in the new version. Rather than forcing people to >use the new beta, though, you can just include it in the script. That way it
<<quoted lines omitted: 9>>
>That's a nice feature of being able to source mezzanines. You can patch them >in manually for use on older releases of the interpreter.
I like extensible languages myself..
>Let me know if it works for you with the above function patched in.
It opens a window and displays 4 messages (each having 3 lies of text.) but it does fail a bit later Unknown word or style: scroller Misplaced item: 16x244 Misplaced item: [ c: max 0 to-integer value *] Is this also addition on new release? Joanna

 [25/43] from: greggirwin:mindspring at: 7-Jul-2002 12:58


Hi Joanna, << One feature would be nice.. it could Re-load that data every 30 minutes or so :) >> Volker and I are going to work on this some more. I just added that feature. << But I wonder about those changes on system behaviour. IMHO those two looks quite important changes, have you seen any real issues because of those? 1.2 Load change 2.5.2 Less agressive evaluation >> I haven't seen any issues with it yet, but you could if you had stuff in your REBOL header, which is no longer evaluated. Fortunately, working around the less agressive evaluation shouldn't be tough in anything that needs changing. << It opens a window and displays 4 messages (each having 3 lies of text.) but it does fail a bit later Unknown word or style: scroller Misplaced item: 16x244 Misplaced item: [ c: max 0 to-integer value *] Is this also addition on new release? >> Yes, Volker caught that as well. You can either chagne SCROLLER To SLIDER, or add this: stylize/master [ scroller: slider ] We'll be including a patch file for older versions to handle all this automatically. --Gregg

 [26/43] from: atruter:hih:au at: 8-Jul-2002 9:53


> stylize/master [ > scroller: slider > ]
Doh! That was the hint/reminder I needed to get text-list to use the new scroll buttons ( by using stylize/master [slider: scroller] ). Thanx ;) Regards, Ashley

 [27/43] from: chalz:earthlink at: 7-Jul-2002 23:43


> << But I get this error.. I'm using View 1.2.1.3.1 > > ** Script Error: as-pair has no value...> > > Sorry about that. The risk of quick hacking and not testing on anything > other than my current environment.
Hey Greg. Aren't you the one who came to my aid earlier and said people should include some rudimentary version checking and declaring? ;) Heh.

 [28/43] from: riusa:email:it at: 8-Jul-2002 8:07


> I only see one problem here: how would the player be different > from /View? > > Regards, > Gabriele.
Good question! Some answers could be: player has not a true console (I cannot directly type commands). Rebol interactive console is a powerful instrument to create/debug programs. I could have a Rebol version where I can create text-based software, but I cannot directly use it to interact with Rebol (typeing Rebol command, or writing Rebol scripts in console). Another feature that could be eliminated is executing Rebol commands using Rebol command-line (when you exec Rebol from your preferred shell). Think for a moment to the difference from a Explorer browser and a full featured HTML editor like Dreamweaver: Explorer can exec the HTML/Javascript code, but it doesn't give you any instrument to create HTML code. If you buy Dreamwever (or a similar product, like Hotdog, etc...) you have a good instrument to create HTML & co. Rebol could work with the same target: Rebol player is the smallest instrument to play Rebol scripts (maybe, it could be even smaller than now): no console (console is available only to play text-based programs, not to let the programmer directly type code), no interactive help (> ? print); and Rebol "for developers" could be a package which contains a full-featured Rebol program, a good Rebol editor (syntax highlight, interactive help, direct execution, etc...), a full console help, a good debugger. What do you think about it? bye! --Alessandro-- -- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: I costumi e i Boxer all=92ultima moda per l=92estate 2002 li trovi da Oliviero.it, collegati e scegli il modello che pi=F9 ti piace!

 [29/43] from: bry:itnisk at: 8-Jul-2002 9:24


> player has not a true console (I >cannot directly type commands). Rebol interactive console is a powerful
<<quoted lines omitted: 4>>
>commands using Rebol command-line (when you exec Rebol from your >preferred shell).
Perhaps a player could be setup to support a specific dialect and then the user could write in that dialect.

 [30/43] from: riusa:email:it at: 8-Jul-2002 13:15


But can someone, in Rebol team (administration, Carl!, etc...) tell us what do you think about all these ideas? Regards --Alessandro--

 [31/43] from: jason:cunliffe:verizon at: 8-Jul-2002 11:36


>But can someone, in Rebol team (administration, Carl!, etc...) tell us >what do you think about all these ideas?
Hi Alessandro-- You raise interesting and important points. And the topic seems to come up pretty regularly, in fact seems to me that every REBOL user goes through a cycle of Love, Hope, promotional braintorming, wishlist/licensing brainstorming and then frustration. Unfortunately, RT very rarely seem to engage openly in such discussions about stretegy or licensing in this forum. Off-list, there may well be other focused dialog. My impression is that the company is very small and really stretched to their human resource limits. So even if they are able to monitor the discussions on the list list, it seems they have not the time to post/feedback. And of course direct public posting would entail further time investment. But I wish they had enough money to allow someone to dedicate quality time to help absorb the best of rebol-list and respond. It woudl be nice to have some meeting in person.. a different chance to share and learn. But its a small tribe of rebols and so very far flung still. best wishes ./Jason

 [32/43] from: greggirwin:mindspring at: 8-Jul-2002 11:55


Hi Jason, et al <<...My impression is that the company is very small and really stretched to their human resource limits. So even if they are able to monitor the discussions on the list list, it seems they have not the time to post/feedback. And of course direct public posting would entail further time investment...> Yes, I agree. As Carl says, when they're quiet for a long time, that means they're working like crazy on something. :) I think someone from RT still monitors the list, at least occasionally, and some topics posted here are brought up by other folks, on one or more IOS servers. As you said, if they show up on the list, they could be here all day and we'd still want more. Personally, I think the free version of View, with a few of the commercial features added to it, is the player that people are asking for here. It would probably be a lot more work for RT to develop a new product, with no console, etc. than to just enable those features. Another thing RT has said in the past is the sometimes the legal side of things (e.g. licensing) can take longer to develop than the software. :) It has to be worded just so, so we have the freedom we want but they don't give away the farm in the process. In some early VB licenses, it stated that you could *not* develop a database program with it because MS was, apparently, concerned that people would write Access killers with it. Since REBOL is so dynamic (in the sense of runtime program generation and modification), imagine how careful RT has to be. --Gregg

 [33/43] from: greggirwin:mindspring at: 8-Jul-2002 11:56


Hi Charles, <<
> Sorry about that. The risk of quick hacking and not testing on anything > other than my current environment.
Hey Greg. Aren't you the one who came to my aid earlier and said people should include some rudimentary version checking and declaring? ;) Heh.
>>
Probably. :) What can I say. I have good intentions. :) --Gregg

 [34/43] from: riusa:email:it at: 8-Jul-2002 23:57


Ok... I understand. But you could admit this is another problem and the difference from Open Source projects and closed-projects. Ok, RT has to gain money to survive, but they survive even there are persons like me that buy their products, I spend much time in my company to convince my boss & co. (my collegues, etc...) (and I risk to be "marked" as a bother dependent, as a - "what a bore he is!" -). If I convice my boss they gain more money and can continue to develop this very good product. Furthermore I have an organization no-profit (I am the president) and I wish to use Rebol to simplify data exchange from the members, from other people (non-members). But if the Rbol licence will not be more "elastic", more accurate I will always have problems to let the people know Rebol (I'm an analyst/programmer and I can directly develop the needed software). If RT would be more collaborative, all "Rebol-fans" (a "Rebol-fan" is an happy user, an happy developer, an happy document-writer, etc..) will be happier, "Rebol-fans" will suggest more (even better) software solutions, "Rebol-fans" could help them (due to their low resources) to write documentation, to develop code (maybe limited to mezzanine functions, or some libraries written in Rebol) and under the supervision of RT, etc... Do you wanna an extreme solution? Please RT, gain your money with your products, not with Rebol self! Are your resources missing to develop Rebol? Ok! Put it under GPL... no under FreeBSD licence, or use something like MIT licence, do what FreeBSD team does... RT will coordinate the job (programming, docs, etc...) and you can concentrate your forces to develop IOS. You yourself will gain from this system: infact you will develop IOS (or everything you wish) using a more advanced language! The language that everybody contributed to develop, and RT popularity will increase! (NOTE: I know your good quality Carl, since I have had many times, many years a Commodore Amiga, and I know the power of that product, I programmed it for many years (from Lattice C to assembler 68000) and I know the quality of the kernel, multitasking, etc...). NOTE 2: A good product is nothing if it is not well accompanied with a good selling policy... look at IBM OS/2, BeOS, look at Borland products (Borland risked seriously to fail), etc... Bye Rebol-fans (RF?!) --Alessandro-- -----Messaggio originale----- Da: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]Per conto di Jason Cunliffe Inviato: Monday, July 08, 2002 5:36 PM A: [rebol-list--rebol--com] Oggetto: [REBOL] Re: [REBOL]
>But can someone, in Rebol team (administration, Carl!, etc...) tell us >what do you think about all these ideas?
Hi Alessandro-- You raise interesting and important points. And the topic seems to come up pretty regularly, in fact seems to me that every REBOL user goes through a cycle of Love, Hope, promotional braintorming, wishlist/licensing brainstorming and then frustration. Unfortunately, RT very rarely seem to engage openly in such discussions about stretegy or licensing in this forum. Off-list, there may well be other focused dialog. My impression is that the company is very small and really stretched to their human resource limits. So even if they are able to monitor the discussions on the list list, it seems they have not the time to post/feedback. And of course direct public posting would entail further time investment. But I wish they had enough money to allow someone to dedicate quality time to help absorb the best of rebol-list and respond. It woudl be nice to have some meeting in person.. a different chance to share and learn. But its a small tribe of rebols and so very far flung still. best wishes ./Jason

 [35/43] from: carl:cybercraft at: 10-Jul-2002 21:43


Don't know why the subject-line in my last post had "mime etc.." in it, but anyway.. On 09-Jul-02, [atruter--hih--com--au] wrote:
>> REBOL does need a certain level of popularity though else there >> won't be enough
<<quoted lines omitted: 3>>
> lack of commercial use compared to technologies that people are > *forced* to learn bodes well does it not?
A good point. But RT needs it to be used commercially for it to be a success for them. That programmers enjoy using it in their spare time won't make a market out of it.
> Anyway, one of the great strengths of REBOL is that complex problems > have simple solutions; sure the more REBOL experience you have the > more elegant that solution will be, but I'd say that given even > rudimentary REBOL skills at least *a* solution is possible ( could > the same be said for Java, C#, C++? ).
I'm not so sure. Perhaps for very simple stuff that just requires you to modify an example from the user guide, but once you go beyond that you need some general programming skills and the right kind of mind and resources to get past the error messages or wrong results that are being returned. I'd say the learning curve is a bit bumpy with REBOL. Easy to begin with, then bumpy as you try to get your head around how the various pieces of REBOL fit together, then easy again after you've got the hang of it and the pieces seem simplier than you first thought. But you hit the bumpy bits quite soon I found.
> Not trying to start a flame-war here, but the few non-IT folks I've > spent two or so hours with in REBOL have walked way at least able to
<<quoted lines omitted: 6>>
> actually code in it, then I'd expect a larger percentage in the > REBOL world - even if the absolute number is less).
Could be. There's a problem with understanding REBOL scripts written by others though, in that they can be full of words defined by the programmer and that you won't find in the user guide. This can make other people's scripts difficult to figure out. -- Carl Read

 [36/43] from: greggirwin:mindspring at: 10-Jul-2002 9:44


Carl, et al << There's a problem with understanding REBOL scripts written by others though, in that they can be full of words defined by the programmer and that you won't find in the user guide. This can make other people's scripts difficult to figure out. >> Isn't that true of any programming language that let's you define functions, subroutines, objects, etc.? I think the same thing goes for the argument about how hard it is to learn REBOL, but I think REBOL will be used in different ways than most other langugages, thanks to dialects. In IEEE 'Computer', July 2002 issue, Neville Holmes (University of Tasmania) has an article called "Seven Great Blunders of the Computing World" which had one item I found particularly interesting given my current view of REBOL and how it will/should/can/might be used. The blunder, per Mr. Holmes, was the end of macrocoding, the division of labor between system and application developers. The macrodefinitions written by system programmers, for use by application programmers, were like components or objects as they are used today, providing namespace protection and encapsulation. How I see this relating to REBOL, and dialects in particular is how those components will be used. In most languages, you may have low level and high level coders to some degree, but they all need a more-than-minimal skillset to provide value. I.e. they have to learn quite a bit about programming to be useful. Now, on another level, non-programmers are able to do nifty things with macro and domain specific languages. I.e. dialects. So, with traditional langugages I think there are one, or maybe two, levels of programmers (two if you have expert and non-expert users). With REBOL, there is at least one more level: the dialect user. With REBOL, there might also be a super-guru category but there are definitely expert and non-expert users. Now, you could argue that dialect users aren't really REBOL coders, but I think they are. They're just using a highly abstracted toolset on top of it. Most of us here are also tainted, in some way, by experience with other languages. I can certainly see REBOL being used casually, much as BASIC has been in the past, by people who aren't programmers, but are able to solve problems with it. It would be hard to be a casual Java, or now even VB, user I think. --Gregg

 [37/43] from: barkley:gamebox at: 10-Jul-2002 10:53


Gregg, I agree with your thoughts. I am one of those casual Rebol users. I don't have the experience or knowledge to be a power-user of Rebol; but I have been able to use Rebol to solve some simple problems regarding updating websites, ftp content and a few other things. You are right on the mark At 09:44 AM 7/10/02 -0600, you wrote:

 [38/43] from: riusa:email:it at: 11-Jul-2002 8:20


>I'm not so sure. Perhaps for very simple stuff that just requires you >to modify an example from the user guide, but once you go beyond that
<<quoted lines omitted: 5>>
>after you've got the hang of it and the pieces seem simplier than you >first thought. But you hit the bumpy bits quite soon I found.
I think Rebol has, like many other languages, its pro & cons. But there are a lot of languages in the same position: Python, Perl, Ruby, maybe Java (not a true scripting language, but with many fine features...), Macromedia Flash (ok, not a scripting language, but with a good power if used to develop internet-based software), etc... I think Rebol becomes difficult just like other languages as soon as you has to create a complex, full-featured software (not only small, fine utilities!). I agree with Carl when he says - "Could be. There's a problem with understanding REBOL scripts written by others though, in that they can be full of words defined by the programmer and that you won't find in the user guide. This can make other people's scripts difficult to figure out." -. Power of Rebol is not only dialect (sometimes difficult to maintain, since learn a new programming language is not always easy, but using dialects you have to learn many different languages...!!!), the power of Rebol is autoinstallation, is its compact dimensions, is its graphic INTEGRATED GUI (yes integrated), is its encryption, its protocols, is its system to write programs similar to HTML style. Bye! --Alessandro--

 [39/43] from: hijim:pronet at: 21-Jul-2002 9:07


I'm trying to add up every 7th line (my-data: read/lines 02.exp) in an array. I get errors messages when I try to use a variable to assign the line number I want to add to the total. I can print to-money pick my-data count I can't total: to-money pick my-data count It goes to the wrong line in the data, the first line. button green "Calculate" [ for count 5 last-line rec-len [ if my-data/:count > to-string newline [ prin to-money my-data/:count ] ] total: 0 for count 5 last-line rec-len [ if my-data/:count > to-string newline [ total add total pick to-money my-data count ] ] ] The first loop works fine. $2.63 $22.41 $15.54 $15.54 $86.76 $10.75 $22.41 $9.38 $192.87 $12.30 $12.94 $2.92 $13.78 $35.40 $2.24 The second gives me an error. ** Script Error: Invalid argument: 01/02 ** Where: to-money ** Near: to money! :value How do I get around this? to-money my-data/:count doesn't work either. Thanks, Jim

 [40/43] from: anton::lexicon::net at: 21-Jul-2002 11:15

Re: (No subject)Date: Mon, 22 Jul 2002 04:23:39 +1000


I think you are picking a value after it has been converted to money! Or the value "01/02" is really in your data. Add some probes to find out what value you are really getting at each point. 'probe is really useful, see in the code below.
> button green "Calculate" [ > for count 5 last-line rec-len [
<<quoted lines omitted: 5>>
> for count 5 last-line rec-len [ > if my-data/:count > to-string newline [
if error? set/any 'err try [ ; catch errors
> total add total pick to-money my-data count
;^^^ I assume you really mean: total: add total to-money probe pick my-data count ][ err: disarm err ; do something about errors here. ]
> ] > ]
<<quoted lines omitted: 11>>
> Thanks, > Jim
Anton.

 [41/43] from: anton:lexicon at: 13-Aug-2002 4:33


How do you make a routine given a declaration like this?: DWORD WNetGetLastError( LPDWORD lpError, // error code LPTSTR lpErrorBuf, // error description buffer DWORD nErrorBufSize, // size of description buffer LPTSTR lpNameBuf, // buffer for provider name DWORD nNameBufSize // size of provider name buffer ); Currently, I have: WNetGetLastError: make routine! [ lpError [integer!] ; error code lpErrorBuf [string!] ; error description buffer nErrorBufSize [integer!] ; size of description buffer lpNameBuf [string!] ; buffer for provider name nNameBufSize [integer!] ; size of provider name buffer return: [integer!] ; either NO_ERROR or ERROR_INVALID_ADDRESS ] mpr "WNetGetLastErrorA" It doesn't seem to work, always returning 487 ERROR_INVALID_ADDRESS. But I think those are pointers there (LPDWORD, LPTSTR), I am not really sure, where do I look that up? So, I shouldn't specify [integer!] for LPDWORD, and [string!] for LPTSTR, but what instead ? Is it possible? Anton.

 [42/43] from: greggirwin::mindspring::com at: 11-Aug-2002 14:17

Re: (No subject)Date: Tue, 13 Aug 2002 10:05:46 -0600


Hi Anton, << How do you make a routine given a declaration like this?: >> Zap me a direct mail if you don't get a response on this. Busy at the moment, but give me a reminder in a couple days if you need to. I think pre-filling the strings is probably your issue. I.e. they need to be. --Gregg

 [43/43] from: greggirwin::mindspring::com at: 25-Aug-2002 13:40

Re: (No subject)Date: Sun, 25 Aug 2002 14:45:42 -0600


Hi Anton, << How do you make a routine given a declaration like this?: DWORD WNetGetLastError( LPDWORD lpError, // error code LPTSTR lpErrorBuf, // error description buffer DWORD nErrorBufSize, // size of description buffer LPTSTR lpNameBuf, // buffer for provider name DWORD nNameBufSize // size of provider name buffer );
>>
I don't have header files installed to check return code values from the call, but the following code seems to work. Holler if it doesn't. --Gregg REBOL [] null-buff: func [ {Returns a null-filled string buffer of the specified length.} len [integer!] ][ head insert/dup make string! len #"^@" len ] trim-trailing-nulls: func [string /local s pos] [ if string = null-buff length? string [return copy ""] s: tail string until [ s: back s any [s/1 <> #"^@" head? s] ] copy/part string index? s ] ; load libraries user32: load/library %user32.dll mpr: load/library %/c/winnt/system32/mpr.dll WNetGetLastError: make routine! [ lpError [string!] ; return error code lpErrorBuf [string!] ; error description buffer nErrorBufSize [integer!] ; size of description buffer lpNameBuf [string!] ; buffer for provider name nNameBufSize [integer!] ; size of provider name buffer return: [integer!] ; either NO_ERROR or ERROR_INVALID_ADDRESS ] mpr "WNetGetLastErrorA" w-net-get-last-error: func [/local err-code err-desc net-provider result][ err-code: null-buff 4 err-desc: null-buff 256 net-provider: null-buff 256 result: WNetGetLastError err-code err-desc length? err-desc net-provider length? net-provider err-code: to-integer to-binary head reverse err-code reduce [result err-code trim-trailing-nulls err-desc trim-trailing-nulls net-provider] ] print mold w-net-get-last-error halt

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted