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

Looking over the horizon - Rebol 3

 [1/30] from: andrew:martin:colenso:school at: 24-Dec-2003 22:45


What would Rebol, version 3 look like? Here's some of my thoughts: * Lots more datatypes! For example, a Telephone! data type, temperature, audio/sound data-type, metric and imperial units like 123.5Km, 50MpH, and so on. I'd like a Rebol script that can ring a cell phone and deliver a spoken message to me. Like: if Temperature < 1.0C [ telephone +25-123-4567 rejoin [ %FrostWarning.wav %At.wav %Location.wav ] ] * Runs on .Net so one can get a native Windows user interface, and it can run under Linux (using Rotor and other open source .NET initiatives), and capable of working with other languages under the .NET CLR. (This could be done with current version of Rebol if compiled using .NET's free C++ compiler!) * Prefix, infix and postfix evaluation of functions referred to by words. * Rebol can define new infix and postfix operators/functions as well as the standard Prefix functions. Here's a simplistic example: +: :Join * A way to access words outside of the current context. Perhaps extending the refinement! data-type, like: /Foo: 123 ; set the value of 'Foo outside this context to 123. * Regular Expressions as well as parse, which acts much like Perl's regexp. * Printing. :) * Native XML! data-type. Anything else you'd want on your wish list for Rebol 3? Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [2/30] from: andrew:martin:colenso:school at: 24-Dec-2003 22:45


> if Temperature < 1.0C [ > telephone +25-123-4567 rejoin [ > %FrostWarning.wav %At.wav %Location.wav > ] > ]
if Temperature < 1.0C [ telephone +25-123-4567 [ %FrostWarning.wav %At.wav %Location.wav ] ] That 'rejoin shouldn't be in there. :) Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [3/30] from: carlos:lorenz:bol at: 10-Nov-2003 9:46


I wish I could enter foreign characters in REBOL/View fields under Linux :) Carlos

 [4/30] from: joel:neely:fedex at: 10-Nov-2003 8:10


Hi, Andrew, Thanks for starting what I hope will be a productive thread! Now, speaking strictly for myself, little of my REBOL wish list is about adding features to the language. Andrew Martin wrote:
> * Lots more datatypes! For example, a Telephone! data type, temperature, > audio/sound data-type, metric and imperial units like 123.5Km, 50MpH, > and so on... >
No. Please, no. Please, please, no. There have been plenty of threads in the past about the confusing and not-completely-documented behavior associated with the existing plethora of types. Do we really want that situation compounded??? (e.g. what happens when I add 2 to 123.5Km, what happens when I multiply 50MpH by 32F, ...) I realy have only two wishes in regard to data types: 1) Fully document the existing ones. 2) Add support for promoting objects to true user-defined types. I hope the first is obvious (and non-controversial) to the list. Let me give a trivial example of the second issue, and then apply it (in a non-trivial way, I hope! ;-) to your wish list above. REBOL has a PAIR! type which can be used for 2D points, but suppose I am working on projective geometry in a serious way. I can define ; projective point ppoint: make object! [ u: v: w: 0 ; projective coordinates of pline to-string: func [] [...] ; create a printable representation ... ; other natural behavior of a ppoint ] ; projective line pline : make object! [ p: q: r: 0 ; projective coordinates of pline to-string: func [] [...] ; create a printable representation ... ; other natural behavior of a pline ] after which I can sprinkle such things as the following thru my code: P1: make ppoint [u: -1 v: 2 w: 1] P2: make ppoint [u: 4 v: 5 w: -1] L1: make pline [p: 1 q: -1 r: 0] but the list of useful things I *can't* do includes the following: ; function that returns the point where two lines intersect common-point: func [l1 [pline] l2 [pline]] [ ... ] ; function that returns the line joining two points common-line: func [p1 [ppoint] p2 [ppoint]] [ ... ] ; is the given point on the given line? pt-on-line?: func [p1 [ppoint] l1 [pline]] [ ... ] print ["line 2 is " common-line P1 P2] ; and get meaningful output P3: 2 * P1 ; by defining for REBOL what it means to multiply ; a ppoint by a number If I want to define a function that takes a ppoint as an argument, I can only say: some-function: func [ppt [object!] ...] [...] but then REBOL will allow *any* object to be passed (likely giving me a run-time error when I try to actually perform some operation on/with it inside the function body). Now, let's apply this idea to your list; many of your desired types are just numbers with an associated dimensionality -- so many degrees F (or C or K ...), yea many pounds (or grams or kilograms or stone ...), and (with composite dimensions) thus many grams per cubic centimeter (or miles per hour, or liters per second ...) If we had true type support for objects, we (*any* REBOL programmer with enough experience/determination) could write something like (I'm making this up as an illustration, so it's not debugged! ;-) dimensions: make object! [ numerators: [] denominators: [] to-string: func [] [...] ... ] dimensioned-number: make object! [ value: 0 units: make dimensions [] to-string: func [] [...] ... ] distance: dimensioned-number 6 [mile] how-long: dimensioned-number .1 [hour] print distance / how-long ; or print divide distance how-long and get 60 mile per hour Then someone who wanted to compute earth's escape velocity in furlongs per fortnight could do so without further support from RT!
> * A way to access words outside of the current context. Perhaps > extending the refinement! data-type, like: > /Foo: 123 ; set the value of 'Foo outside this > context to 123. >
Could you give an example of what this means and how it would be used/useful? I must confess that I don't understand it at all.
> * Regular Expressions as well as parse, which acts much like Perl's > regexp. >
At the risk of sounding inconsistent, I believe that this one added feature would do more to broaden REBOL's appeal than anything I've seen on the list in a long time. Even though there's some variation in syntax (and number of extensions), REs are a core, mainstream concept in the world I live in. Recognizing that fact, and making a (tiny) concession to the existing skills of the programming community would eliminate one more excuse for serious geeks to dismiss REBOL.
> * Native XML! data-type. >
My top XML wish is simply a beefed-up XML parser which does validation (natively coded if necessary for performance). Adding that level of support for standards (coupled with the above suggestion for true object-type support) would allow the community to finish the job.
> Anything else you'd want on your wish list for Rebol 3? >
1) complete documentation 2) open bug tracking, feedback, and resolution process 3) View on OS/X 4) either an implementation of RT's module facility or a statement that it has been dropped (or deferred indefinitely... ;-) I could be happy for a long time if the above issues were addressed before *any* new features were added to the language. Getting true object-type support would leave me nearly delirious! ;-) Now let's be brutally honest with ourselves; what would we say if the question had been instead: What could be done in/with the next release of REBOL to maximize its appeal to the larger programming community and its long-term viability? I suggest that the answers to that question would be quite different from most of the wish-lists of existing REBOL users. In defense of that view, I can rephrase the question as: Given that you do not currently know REBOL, what benefit could it offer to you that would help you be willing to invest the time to learn and use it? I believe that we, as a community, would benefit REBOL (and RT) by addressing that question as well. -jn-

 [5/30] from: bry:itnisk at: 10-Nov-2003 15:42


>> * Regular Expressions as well as parse, which acts much like Perl's >> regexp. > >At the risk of sounding inconsistent, I believe that this one added >feature would do more to broaden REBOL's appeal than anything I've >seen on the list in a long time.
Yes
> * Native XML! data-type. > >My top XML wish is simply a beefed-up XML parser which does validation >(natively coded if necessary for performance).
If you mean dtd-based validation, yes. The xml parser needs to support namespaces. Xpath support is needed. If not xpath support, then the parser is going to have to return the following info: Elements attributes Namespaces Processing-instructions Textnodes In such a way that finding out that attribute b is an attribute of element A, and that they are both in the same namespace is at least as easy as looking up files and their properties in a directory.
> Anything else you'd want on your wish list for Rebol 3? > >1) complete documentation >2) open bug tracking, feedback, and resolution process
complete documentation maybe, but am not sure if this is something that brings people into a language, unless the language documentation is so incomplete as to be visible from a quick browse of the website.
>3) View on OS/X
yeah, It is the new geek computer of choice isn't it.
> What could be done in/with the next release of REBOL to > maximize its appeal to the larger programming community > and its long-term viability?
I think the xml needs are paramount, so many languages/technologies nowadays rely on xml based dialects of one sort or another. People would probably like to implement support for various xml based languages, but find it rather rough going.

 [6/30] from: didec:tiscali at: 10-Nov-2003 16:17


Re: Re: Looking over the horizon - Rebol 3 (See at bottom)
> Hi, Andrew, > Thanks for starting what I hope will be a productive thread! Now,
<<quoted lines omitted: 85>>
> Then someone who wanted to compute earth's escape velocity in > furlongs per fortnight could do so without further support from RT!
As a guy who doesn't know how are implement, and more than that, how the programer use the concept of OO in any other langage (operator overload (my french->english translation)...), I can extend a litle the Joel idea like this : ppoint!: make datatype! [ u: v: w: 0 ; projective coordinates of pline add: func [p1 [ppoint!] p2 [ppoint!]] [ (stuff to add 2 ppoint values) ] substract: func [p1 [ppoint!] p2 [ppoint!]] [ (stuff to substract 2 ppoint values) ] multiply: func [p1 [ppoint!] p2 [ppoint!]] [ (stuff to multiply 2 ppoint values) ] to-string: func [] [...] ; create a printable representation ... ; other natural behavior of a ppoint ] This will create a new user datatype! with what function overload you want. It seems to me that it's easier to define the postfixed function instead of the prefixe one ('add instead of '+ ...) but not an expert ;) So the interpreter can used the user 'add function if the parameters datatype! belong to a user define one. Appart of this, I just want for the future Rebol : - Known Bug correction or workaround for : * Network Protocols * Modale window and Event filtering * To-integer (with decimal value) - Enhancement to the existing VID styles to handle current usage : * Full text-list with slider management. * Area link with a slider. * Or functions to link slider with text scroll or offset scroll (and the opposite). * Known bugs correction (text editing...). - External new VID styles features : * Just thinking of a %styles/ directory in the %desktop/ one where could be store advanced styles (treeview...) working as a cache of styles. An automatic fetching function try to download them from RT site through this directory when user use it. It's a workaround for the "Interpreter will become too big" problem, but allow extension. - Integrated async protocol - Freeing some features or make them usable : * Sound (it's already OK) * Shell access * Big number And of course - Full, or at least, better documentation (How VID works...) - Mac OS X version And last, to be able to said again that Rebol is portable : - All core and View release at the same level on all system. I probably forget something, but I let you complete ;) DideC

 [7/30] from: SunandaDH:aol at: 10-Nov-2003 12:55


Andrew Martin
> Anything else you'd want on your wish list for Rebol 3?
thanks for asking. Yes please: -- Much deeper stack -- why not limited to available memory or user setting? 2000-odd just isn't enough for some algorithms. -- Bignums -- they are in there somewhere, you see it on the start-up messages. But I want to work with them. --Better error messages. The sort of thing you get now .... ** Math Error: Attempt to divide by zero ** Near: 10 / length? a ....just ain't precise enough when I'm trying to debug something live that could be anywhere in a chain of half-a-dozen called modules. -- Better tracing for debugging. I'd like something like.... trace/word 'write ....that would give me a trace whenever the word 'write was accessed. Of course, it should work for any word including user-defined ones: trace/word 'line-count would give me a hit on: line-count: line-count + 1 and: if line-count > 66 Sunanda.

 [8/30] from: Steven:White:ci:bloomington:mn:us at: 10-Nov-2003 12:16


>Andrew Martin > Anything else you'd want on your wish list for Rebol 3?
I would like my script to be able to obtain a list of all the words that I created when I wrote the script. In other words, I myself know what those words are because I wrote them, and the REBOL interpreter knows, but I can't make my script tell me. If I could, I could write a generalized re-useable module that any script could call ("do") that could find all those words and print their values--in other words, a formatted memory dump. I could return to the glorious days of COBOL on the Burroughs B-1800, where such a tool was available. Steven White City of Bloomington 1800 W Old Shakopee Rd Bloomington MN 55431-3096 USA 952-563-4882 (voice) 952-563-4672 (fax) [steven--white--ci--bloomington--mn--us]

 [9/30] from: tim:johnsons-web at: 10-Nov-2003 9:58


* Steven White <[Steven--White--ci--bloomington--mn--us]> [031110 09:43]:
> >Andrew Martin > > > Anything else you'd want on your wish list for Rebol 3? >
Here's mine 1)Protect an object member. 2)Fix the binary 'skip bug. 3)Regex support 4)Optional module linkage. Ex: Rebol is distributed with binary modules. example: regex engine (don't need source code necessarily) Make file provided that allows linkage of optional modules. I know that this could be a bit complex, but is likely more doable in a POSIX environment. (i.e. the OS has a ansi-C compliant compiler) tim -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com

 [10/30] from: tim::johnsons-web::com at: 10-Nov-2003 10:23

Re: Looking over the horizon - Rebol 3/Mods!


Along with item 4) Make rebol compliant to compiled-in mods as do perl, python, php etc. Kind of like a corrolary to 'encap. Then rebol could be embedded in Apache or vim. I've had to drop rebol for anything but ancillary utilities for a very large project, because the customer wanted code that could be server-mode compliant. So I'm waltzing with the snake (using python) * Tim Johnson <[tim--johnsons-web--com]> [031110 10:19]:
> * Steven White <[Steven--White--ci--bloomington--mn--us]> [031110 09:43]: > >
<<quoted lines omitted: 22>>
> To unsubscribe from this list, just send an email to > [rebol-request--rebol--com] with unsubscribe as the subject.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com

 [11/30] from: ingo:2b1 at: 10-Nov-2003 20:23

Re: Looking over the horizon - Rebol 3


Hi Steven, Steven White wrote:
>>Andrew Martin > >>Anything else you'd want on your wish list for Rebol 3? > > I would like my script to be able to obtain a list of all the words > that I created when I wrote the script.
<...> Do you mean something like this?
>> query/clear system/words
== [end! unset! error! datatype! context! native! action! routine! op! function! object! struct! library! port! any-type! any-word!...
>> a: 2
== 2
>> set 'b "hi"
== "hi"
>> c: func[][print 'done] >> query system/words
== [c a b] Kind regards, Ingo

 [12/30] from: greggirwin:mindspring at: 10-Nov-2003 13:29


Hi Joel et al,
>> * Lots more datatypes! ...
JN> ...in regard to data types: ... Fully document the existing ones. I vote for this as well.
>> * A way to access words outside of the current context...
JN> Could you give an example of what this means and how it would be JN> used/useful? I must confess that I don't understand it at all. I wasn't sure either, except as a shortcut to how we might do it today. JN> * Regular Expressions as well as parse, which acts much like Perl's JN> regexp. A while back I looked at PCRE, but didn't get it working in the small amount of time I allotted myself, and shelved it. If someone could get that working, it would be something. Yes, you would need a commercial version of REBOL to access the DLL, but better than nothing. I've tinkered with PARSE a bit as well, to see how that would work for building a regex engine, but there are a lot of things to consider, so I just dust it off occasionally and think about it a bit. I might pursue it more if I thought I might actually use it myself. ;) I agree that non-REBOLers would notice it as a desirable element. JN> 4) either an implementation of RT's module facility or a statement JN> that it has been dropped (or deferred indefinitely... ;-) Yes! -- Gregg

 [13/30] from: petr:krenzelok:trz:cz at: 10-Nov-2003 21:30


Tim Johnson wrote:
>* Steven White <[Steven--White--ci--bloomington--mn--us]> [031110 09:43]: >>>Andrew Martin
<<quoted lines omitted: 16>>
> but is likely more doable in a POSIX environment. > (i.e. the OS has a ansi-C compliant compiler)
1) I do not know if it is the same - but - finishing the idea of language plug-ins. IIRC, Doc even described that for R#, he meay introduce something like low-level dialect to program directly in, which would be compiled - kind of RVM? Currently we have draw dialect - more of such dialects, e.g. bitmap operation, number crunching could be usefull. Simply - specialised dialects where it does make sense. Libraries are nice, but hardly cross-platform. 2) end of product hell - core, view x y z version, command, face, base ... what else? one exe - binary modules. For those who don't like files scattered around hd: 3) native .zip .rar .arj ports/schemes - WinAmp puts all skin files into .zip file and reads it directly from there. Would be way cooler than anything along the lines of .rip and similar proprietary formats which have no chance being widely accepted. What is more - Windows Commander or even other managers treat archives as being directories - transparently ... 4) all cyphre's suggestions to View kernel + view plug-ins. Support of Direct3D or similar technologies -using advantages of certain platforms 5) slowly to prepare for PDA and similar mobile devices - considering Symbian, PalmOS 6, WinCE ports - sorry if I hurt someone, but imo BSDs, Solaris etc. should be left with Core/Command versions, View is not all that important there - otoh I will surely have difficulties explaining some managers IOS can't run on single mobile device!!! 6) enhanced VID 7) finishing async networking as originally planned, including async console 8) browser plug-ins - deployment is the word - if user can't start it from browser, he/she will not regard it being part of web. I want to do my web forms using VID, not java script crap ;-) 9) vhelp function - which would bring visual help along the lines of dictionary script put on IOS (good idea Robert, isn't it? :-) 10) extension of 'about function - visual box showing Carl's photo :-) Cheers, -pekr-

 [14/30] from: Steven:White:ci:bloomington:mn:us at: 10-Nov-2003 14:37


>>> [ingo--2b1--de] 11/10/03 01:23PM >>> > > I would like my script to be able to obtain a list of all the words > that I created when I wrote the script.
<...>
>Do you mean something like this? >> query/clear system/words
== [end! unset! error! datatype! context! native! action! routine! op! function! object! struct! library! port! any-type! any-word!...
>> a: 2
== 2
>> set 'b "hi"
== "hi"
>> c: func[][print 'done] >> query system/words
== [c a b] *_*_*_*_*_*_*_*_*_* I do not think so. In the example below, MY-WORDS is a block listing the words that I have created in the script. The function FORMATTED-MEMORY-DUMP prints the values of those words. In order for FORMATTED-MEMORY-DUMP to know what words and values to print, I had to specify the words in the block MY-WORDS. If the words in the block MY-WORDS could be obtained from the REBOL interpreter, then the function FORMATTED-MEMORY-DUMP could be modified to be used in any script, and I would not have to provide a list of words to be "dumped." (MY-WORDS). In addition, if I modified the script, and added DATA-NAME-4, the FORMATTED-MEMORY-DUMP procedure would list the new item without me having to make any coding changes. I believe someone on this list mentioned an un-implemented concept of system/script/words that would, if implemented by RT, solve this. *_*_* SAMPLE SCRIPT REBOL [] MY-WORDS: [ DATA-NAME-1 DATA-NAME-2 DATA-NAME-3 ] DATA-NAME-1: [swhite--ci--bloomington--mn--us] DATA-NAME-2: "THIS IS A TEST" DATA-NAME-3: 156 FORMATTED-MEMORY-DUMP: does [ foreach MY-WORD MY-WORDS [ PRINT [ MY-WORD " is of type " type? get MY-WORD " and is equal to " get MY-WORD ] ] ] FORMATTED-MEMORY-DUMP *_*_*__ END OF SAMPLE Steven White City of Bloomington 1800 W Old Shakopee Rd Bloomington MN 55431-3096 USA 952-563-4882 (voice) 952-563-4672 (fax) [steven--white--ci--bloomington--mn--us]

 [15/30] from: greggirwin:mindspring at: 10-Nov-2003 14:12


Hi Steven, What Ingo suggested should work for you. See below. -- Gregg REBOL [] mark-my-words: context [ init: does [query/clear system/words] dump: does [ print ['Word tab 'Type tab 'Value] foreach word query system/words [ print [word tab type? get word tab mold get word] ] ] ] mark-my-words/init ; <your code here> o: make object! [a: b: c: none] my-int: 23 I-have-issues: #this-is-my-biggest-issue fn: does [print "some fun now!"] mark-my-words/dump

 [16/30] from: antonr:iinet:au at: 11-Nov-2003 11:36


mark-my=words/dump can fail in the (rare) case that a word changed by being unset. Anton.

 [17/30] from: greggirwin:mindspring at: 10-Nov-2003 21:18


Thanks Anton! AR> mark-my=words/dump can fail in the (rare) case that a AR> word changed by being unset. It was a quickie, but I'm glad to know of that problem because I may just end up using it someday. :) --Gregg

 [18/30] from: g:santilli:tiscalinet:it at: 11-Nov-2003 10:15


Hi Steven, On Monday, November 10, 2003, 7:16:07 PM, you wrote: SW> I would like my script to be able to obtain a list of all the words SW> that I created when I wrote the script. In other words, I myself know Try: query/clear system/words do %your-script.r print query/clear system/words Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [19/30] from: g:santilli:tiscalinet:it at: 11-Nov-2003 10:25


Hi Steven, On Monday, November 10, 2003, 9:37:41 PM, you wrote: SW> I do not think so. In the example below, MY-WORDS is a block listing SW> the words that I have created in the script. The function Actually, that is exactly what you need. You just have to QUERY/CLEAR SYSTEM/WORDS before setting any word in your script; then in your memory dump script you use: MY-WORDS: query/clear system/words instead of: MY-WORDS: [ DATA-NAME-1 DATA-NAME-2 DATA-NAME-3 ] Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [20/30] from: maximo:meteorstudios at: 11-Nov-2003 14:09


Most previous requests mimic things I want... but I find that the protect function /mechanism should be given much more guts. This is important if we are to create scripts which can encapsulate external tools which we are testing even if linked in the code. I'd like protect to have a /disk refinement so that ALL I/O writes go to a ram cache. if this where enabled I'd also be less nervous testing some critical file routines like recursive file handling... the idea is that any write or deletion be actual done in a ram mirror of the disk. Untampered dirs/files would still be loaded from disk. any consecutive read which maps to an area of the disk which was written would actually filter out to use the version in ram instead. Deleted directories, would not be visible anymore, created directories could have virtual files in them. I know some will complain that it taks a lot of ram, but many of us HAVE enough ram for this feature to be usefull. This would also be very usefull for code which is run live from network connected clients. Any hacker would think he is damaging your stuff, when in fact he just playing in his own little rubber padded chamber. I'd also like it if a /protect refinement was added to MAKE, DO and LOAD, to make critical code objects immutable once loaded or run, this could keep any malicious code which attempts to tamper with setups, or sensitive code which is used to play in sensitive data... when testing other people's code you never know what you load, not everyone is skilled enough to feel safe even after checking the script's source... For example, I'd place my user.r setup in an other file and execute the following line in the user.r file do/protect protected-user.r Does this makes sense to any of you? is there already a way to do so? -MAx

 [21/30] from: nitsch-lists:netcologne at: 11-Nov-2003 21:44


Am Dienstag, 11. November 2003 20:09 schrieb Maxim Olivier-Adlhoch:
> Most previous requests mimic things I want... > but I find that the protect function /mechanism should be given much more
<<quoted lines omitted: 26>>
> Does this makes sense to any of you? > is there already a way to do so?
do/protect protected-user.r -> secure[file [allow read]] do %protect-user.r for ram-cache, i wrote a ramdisk-scheme long ago. which loaded missing files from disk and cached. eventually i find it, if you ask. but since it was very simple and there are some scheme-examples now, you may have more fun to do it yourself ;) you have to change files to ram://file, but since the disk is readonly you wil trap wrong file-access.
> -MAx
-Volker

 [22/30] from: moliad:aei:ca at: 11-Nov-2003 22:27


>> do/protect protected-user.r >>
<<quoted lines omitted: 6>>
>secure[file [allow read]] >do %protect-user.r
I'm not sure the above does exactly what I mean... I mean that once loaded, anything that is contained in the file is protected. I don't care if this code writes on disk, I just don't want any later code, to modify the content of everything which was loaded from that file (passwords, for example) or paths to output files, or ip addresses to remote servers. Any attempt at tampering them would cause an error, like normal protected code.
>for ram-cache, i wrote a ramdisk-scheme long ago. which loaded missing files >from disk and cached. eventually i find it, if you ask. but since it was very >simple and there are some scheme-examples now, you may have more fun to do it >yourself ;) >you have to change files to ram://file, but since the disk is readonly you wil >trap wrong file-access.
The goal is that you use it without knowing that you are using a protected environment. so that any disk oriented code runs as-is, but without risk of damaging your HD. also a simple log function would have to accompany the tool so that you can diagnostic if its working ok. basically it could be a replacement for the normal disk port file:// But which has a listing of all tampered files/dirs along with memory allocated for every file you tried to edit. I think Java has something similar, I just don't recall how its named. -MAx

 [23/30] from: antonr:iinet:au at: 12-Nov-2003 21:49


Shouldn't that be a rom scheme, then? eg: rom://file Or was the read-only an option? Anton.

 [24/30] from: petr:krenzelok:trz:cz at: 12-Nov-2003 12:21


Anton Rolls wrote:
>Shouldn't that be a rom scheme, then? >eg: rom://file >
and I want zip://file :-) Maybe off-topic - but some time ago there was mention of so called memory-mapped files. What is that? -pekr-

 [25/30] from: nitsch-lists:netcologne at: 12-Nov-2003 12:40


Am Mittwoch, 12. November 2003 11:49 schrieb Anton Rolls:
> Shouldn't that be a rom scheme, then? > eg: rom://file > > Or was the read-only an option? >
The read-only is by 'secure, not the scheme. But you can switch the scheme to work as ramdisk or write back to disk. so you can work ram-only for debugging and turn disk-access on for release. Or implement a flush-all, work in ram and only write back on success. kind of commit. but never really used it.
> Anton. > > for ram-cache, i wrote a ramdisk-scheme long ago. which loaded
<<quoted lines omitted: 9>>
> > > > -Volker
-Volker

 [26/30] from: Steven:White:ci:bloomington:mn:us at: 12-Nov-2003 8:18


I see that I have a long way to go to reach REBOL mastery.
>>> [greggirwin--mindspring--com] 11/10/03 03:12PM >>>
Hi Steven, What Ingo suggested should work for you. See below. -- Gregg REBOL [] mark-my-words: context [ init: does [query/clear system/words] dump: does [ print ['Word tab 'Type tab 'Value] foreach word query system/words [ print [word tab type? get word tab mold get word] ] ] ] mark-my-words/init ; <your code here> o: make object! [a: b: c: none] my-int: 23 I-have-issues: #this-is-my-biggest-issue fn: does [print "some fun now!"] mark-my-words/dump

 [27/30] from: greggirwin:mindspring at: 12-Nov-2003 11:17


Hi Petr, PK> Maybe off-topic - but some time ago there was mention of so called PK> memory-mapped files. What is that? Under Windows (not sure about other OSs) an MMF (Memory Mapped File) is a "view" of a disk file mapped into memory. Multiple processes can share mappings and so share data in memory--i.e. one can write to the MMF and others will see the changes instantly. They can also be used to let you write code that operates on disk files without having to deal with all the niggling I/O details in a case where the file is too large for memory or something. One of the classic examples, IIRC, was to use strrev on a MMF to reverse the data on disk, no matter how large the disk file was. Very handy for sharing data between processes. I think most, if not all, data sharing APIs map to them under the hood. -- Gregg

 [28/30] from: nitsch-lists:netcologne at: 12-Nov-2003 21:23


Am Mittwoch, 12. November 2003 19:17 schrieb Gregg Irwin:
> Hi Petr, > > PK> Maybe off-topic - but some time ago there was mention of so called > PK> memory-mapped files. What is that? > > Under Windows (not sure about other OSs) an MMF (Memory Mapped File) > is a "view" of a disk file mapped into memory.
That means after mapping the processor can access the filecontent without doing explicit IO. The file his handled similar to a swapfile then. So the OS can buffer smarter. Only load stuff when it is touched. if memory is large enough buffer the whole file, no more io-calls needed then. And data-structures can be mapped directly on the data in the file, no need for copying between multiple buffers. If rebol could map files to strings, we could do parse map-file %file.txt rule without special parse-smartness.
> Multiple processes can > share mappings and so share data in memory--i.e. one can write to the
<<quoted lines omitted: 7>>
> all, data sharing APIs map to them under the hood. > -- Gregg
-Volker

 [29/30] from: nitsch-lists:netcologne at: 12-Nov-2003 21:30


Am Mittwoch, 12. November 2003 04:27 schrieb [moliad--aei--ca]:
> >> do/protect protected-user.r > >>
<<quoted lines omitted: 13>>
> remote servers. Any attempt at tampering them would cause an error, like > normal protected code.
No chance to do that AFAIK. RT uses launch instead. The reblets run in a clean vm, so whatever password the user enters in the desktop is protected.
> >for ram-cache, i wrote a ramdisk-scheme long ago. which loaded missing > > files from disk and cached. eventually i find it, if you ask. but since
<<quoted lines omitted: 6>>
> of damaging your HD. also a simple log function would have to accompany > the tool so that you can diagnostic if its working ok.
If its for testing, i would copy the dirtree to a subdir and 'secure rebol to only write there.
> basically it could be a replacement for the normal disk port file:// But > which has a listing of all tampered files/dirs along with memory allocated > for every file you tried to edit. > > I think Java has something similar, I just don't recall how its named. > > -MAx
-Volker

 [30/30] from: g:santilli:tiscalinet:it at: 13-Nov-2003 9:51


Hi Gregg, On Wednesday, November 12, 2003, 7:17:16 PM, you wrote: GI> Under Windows (not sure about other OSs) an MMF (Memory Mapped File) GI> is a "view" of a disk file mapped into memory. Multiple processes can It's the same on Unix too, AFAIK. (Dunno about the sharing part, though.) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

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