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

Core 2.6 - Last minute requests - take your chance!

 [1/46] from: petr:krenzelok:trz:cz at: 5-Apr-2002 8:28


Hello list, I had a nice chat with Carl on IOS Messenger, and we agreed upon following scenario: Core 2.6 is really near now, so we all have last chance to post bug reports, enhancement request, to be included in 2.6. Post it as a reply to this message. Those of us, being present on IOS Developer server, will look into it, and fill it into IOS bug database. But please, keep in mind following simple but clear rules, set-up by Carl. 1) ALL older DB requests should be submitted if you want them to be considered for 2.6. 2) Those requests that are "just a few lines" of change will be done. 3) Those requests where a user has already coded it, and we agree with the code, name, and API details, then we will add it. 4) And then, if there is a very serious problem 5) If it is a big change, and no code has been created, then it will not be in 2.6. So please - no multimedia stuff, no components, no modules, no threading, no dreamy stuff - let's save it for 3.0 :-) Thanks, -pekr-

 [2/46] from: al:bri:xtra at: 5-Apr-2002 20:14


Here's the entire contents of my %Patches.r script: ; Wraps throw-on-error around 'function body. if not equal? second third :function [catch] [ Function: func head insert/only at load mold third :function 2 [catch] compose/deep [ throw-on-error [ (copy/deep second :function) ] ] ] ; Fixes 'append so it works correctly with 'path! and doesn't evaluate 'Value. if found? find mold second :append "insert tail series" [ Append: func [ {Appends a value to the tail of a series and returns the series head.} Series [series! port! path! word!] Value [any-type!] /Only "Appends a block value as a block." ][ head either Only [ insert/only tail :Series :Value ][ insert tail :Series :Value ] ] ] ; Fixes 'repend so it works correctly with 'path!. if any [ unset? get/any 'repend ; Early Rebel/Core versions don't have reppend. found? find mold second :repend "insert tail series" ][ Repend: func [ {Appends a reduced value to a series and returns the series head.} Series [series! port! path! word!] Value [any-type!] /Only "Appends a block value as a block." ][ head either Only [ insert/only tail :Series reduce :Value ][ insert tail :Series reduce :Value ] ] ] ; A better choice for http user-agent. if not found? find system/schemes/http/user-agent "Mozilla" [ system/schemes/http/user-agent: rejoin [ "Mozilla" "/" "4.0" " (Compatible; REBOL " rebol/version ")" ] ] ; Holger's patch to ftp protocol to eliminate multi-line return bug. change/only skip find pick find second get in system/schemes/ftp/handler 'open to-set-word 'parse-dir-list 4 'transfer-check -2 'net-utils/confirm/multiline ; Replaces 'days with 'weekdays, to match /weekdays refinement for date! values. rebol/Locale: make object! [ Months: rebol/locale/months Weekdays: rebol/locale/days ] ; Modifies Extract to work with series! and adds /Only refinement. Extract: function [ "Extracts every N-th value from a Series." Series [series!] N [integer!] /Only "Appends a block value as a block." ][ New ][ New: make Series (length? Series) / N do compose/deep [ forskip Series N [ (either Only ['insert/only]['insert]) tail New first Series ] ] New ] ; Adds 'Alter function to Rebol/Core, which is present in Rebol/View. if not value? 'alter [ Alter: function [ {If a value is not in the list, append it. Otherwise, remove it.} List Value ] [ Temp ] [ either Temp: find List Value [ remove Temp ][ append List Value ] ] ] I expressly give permission to Rebol to use this as they see fit. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [3/46] from: sunandadh:aol at: 5-Apr-2002 4:03


Hi Petr, Here's the feedbacks I'd like to see fixed: #7564 -- Much better context information on errors #7599 -- Fix Random with tuples #7528 -- syntax errors should be trappable -- stop Rebol crashing irrecoverably on badly formed code (example): AnObject: make object! [datafield: 1] AnotherObject: make object! AnObject #nnnn? -- Clipboard to work with binary data #nnnn? -- Unlimited system/words -- or have it self-cleaning (Recycle/words maybe?). 2000 (6000 for IOS) -- what's left after Rebol's loaded -- is just too few Sunanda

 [4/46] from: narg:polbox at: 5-Apr-2002 12:42


fixed parse problem
>> test: {aaa|"bbb" ccc|ddd "eee"}
== {aaa|"bbb" ccc|ddd "eee"}
>> parse/all test "|"
== ["aaa" "bbb" " ccc" {ddd "eee"}] should be == ["aaa" {bbb "ccc"} {ddd "eee"}] Piotr Gapiński; mailto:[news--rowery--olsztyn--pl] Olsztyńska Strona Rowerowa; http://www.rowery.olsztyn.pl

 [5/46] from: rotenca:telvia:it at: 5-Apr-2002 13:11


I should like to see (i do not know what has been already patched in the beta): 1) a method ('exit or 'return) to exit a parse rule before the end of input string 2) correction of set/get crash error when using undefined words 3) /same refinement for find for block search 4) 'append correction, to work with any series 5) /tail refinement for insert 6) correction of Use bug with single word 7) change of throw-on-error to work with unset values throw-on-error: func [ { Evaluates a block, which if it results in an error, throws that error. Patched for unset values } blk [block!] ] [ if error? set/any 'blk try blk [throw blk] get/any 'blk ] 8) 'help working with path 'help working with trace on (disabling it at the start and re-enabling at the end) 'source working with path 9) any-path?: func [p] [any [path? :p set-path? :p lit-path? :p]] 10) extension of bind to work with word/set-word/get-word/lit-word datatype! 11) optional preserving binding in conversion of word/set-word/get-word/lit-word (and 'return returning set-word) 12) global? unbound? local? same-context? 13) get-object-context or get-context or from a bound word 14) get-path 15) not crashing copy/deep 16) a /deep levels [integer!] refinement for probe to show only defined deep levels of objects/port/block... 17) corrections of all bugs of hash! 18) use of hash! everywhere a block! is required (dream) 19) a standard and easy method to pass refinements of a function to another function 20) a /reverse refinement for 'forall 'foreach 'forskip 'repeat ... 21) a make system/words [] not changing the meaning of the first word of the context to a pointer to itself 22) closure func 23) a more easy handling of error! datatype --- Ciao Romano

 [6/46] from: petr:krenzelok:trz:cz at: 5-Apr-2002 14:14


Piotr Gapiński wrote:
>fixed parse problem >>>test: {aaa|"bbb" ccc|ddd "eee"}
<<quoted lines omitted: 4>>
>== ["aaa" "bbb" " ccc" {ddd "eee"}] >should be == ["aaa" {bbb "ccc"} {ddd "eee"}]
really? Imo it should be: == ["aaa" {"bbb" ccc} {ddd "eee"}] -pekr-

 [7/46] from: rotenca:telvia:it at: 5-Apr-2002 14:08


25) error/ near : a pointer to the block where the error! was generated the stack of calls in error/where or in a new field 26) a new native function to collect the history of function calls, like a block of pointers to code blocks where the call was fired (stack) 27) dream: a new native funtion to collect the history of contexts like pointers to context blocks/objects 28) a /self refinement for function (like the /local) which generates a pointer to itself f: func [a /local b c /self myself][ ; here myself is a pointer to the function] to put the self refinement after /local should be save: f: func [a /self myself /local b c ][ ; here myself is a user arg for the user refinement /self] this should generate an error: f: func [a /self /local b c /self myself][ ] 29) a /self refinement for use which generates a pointer to the use block use [a /self myself] [ ; here myself is a pointer to the use block] (i can't stop myself!!!!) --- Ciao Romano

 [8/46] from: rotenca:telvia:it at: 5-Apr-2002 13:15


24) revision of [catch] [throw] [] attributes --- Ciao Romano

 [9/46] from: rebolint:nodep:dds:nl at: 5-Apr-2002 14:04


Suggestion, but im not sure it's a big impact. I would like to see inside a func the possebility to declare a /local refinement like /local tst1 [string!] or /local tst2 [integer!]..etc. instead of /local tst1 ..etc.. So...to be able to declare the /local refinement instead of declairing it inside the function. (R)egards, Norman.

 [10/46] from: rotenca:telvia:it at: 5-Apr-2002 15:40


30) a rejoin which does not use append rejoin: func [ "Reduces and joins a block of values." block [block!] "Values to reduce and join" ][ if empty? block: reduce block [return block] head insert tail either series? first block [ copy first block ][ form first block ] next block ] --- Ciao Romano

 [11/46] from: robbo1mark:aol at: 5-Apr-2002 8:54


Here's my wish list for REBOL/Core 2.6 and contains lot's of useful additional series! functions which are swap, top, pop, push, rest, drop, chop, nip, tuck, cut, slice and chomp. I've also included quote which is useful and a new and better license 8-). Here's the sources; quote: func [    "Returns the literal value of it's argument."    'val [any-type!] ][    :val ] license: func [    "Prints the NEW REBOL/core license agreement." ][    print system/license: read http://www.gnu.org/licenses/gpl.txt ] swap: func [    "Reverses the first two elements in a series."    series [series!] ][    reverse/part series 2 ] top: func [    "Returns the first element of a series."    series [series!] ][    first series ] pop: func [    "Returns and removes the first element of a series."    series [series!]    /local temp ][    temp: first series remove series temp ] push: func [    "Inserts a value at the first element of a series."    series [series!]    val [any-type!] ][    insert series val ] rest: func [    "Returns the remainder of series excluding the first element."    series [series!] ][    at series 2 ] drop: func [    "Removes the first element of a series."    series [series!] ][    remove series ] chop: func [    "Removes the last element of a series."    series [series!] ][    remove at tail series -1 ] nip: func [    "Removes the second element of a series."    series [series!] ][    remove at series 2 ] tuck: func [    "Inserts a value at the first element of a series."    series [series!]    val [any-type!] ][    insert at series 2 val ] cut: func [    "Splits a series into constituent parts ^/ at the specified index postion."    series [series!]    index [integer!]    /local val1 val2 ][    reduce [ val1: copy/part series index val2: at series (index + 1) ] ] slice: func [    "Returns a part of a series from the specified index."    series [series!]    index [integer!]    size [integer!] ][    copy/part at series index size ] chomp: func [    "Removes and returns a part of a series from the specified index."    series [series!]    index [integer!]    size [integer!]    /local temp ][    temp: copy/part at series index size    remove/part at series index size    temp ] REBOL Technologies Inc. have my express permission to use these any and whichever way they choose. Cheers, Mark Dickson

 [12/46] from: rotenca:telvia:it at: 5-Apr-2002 18:58


31) Some changes for switch: a) do :value instead of do value (for function! and parens! datatype) and do :case instead of do case (default) b) a new refinement /only, to permit multiple cases like this: switch/only 2 [1 2 3 [print "found"]] block! switch/only 2 reduce [1 2 3 does [print "found"]] function! a more simple solution could be to permit only block! datatype for /only: switch/only 2 [1 2 3 [print "found"]] another solution could be a different switch function, called switch-multiple or something like. The more complex: switch: func [ "Selects a choice and evaluates what follows it." [throw] value "Value to search for." cases [block!] "Block of cases to search." /only datatype "Evaluates only the first item of the datatype! which follows the choice" /default case "Default case if no others are found." ][ either value: either only [ if value: find cases value [ until [equal? datatype type? first value: next value] first value ] ][ select cases value ] [ do :value ][ either default [do case] [none] ] ] The more simple: switch: func [ "Selects a choice and evaluates what follows it." [throw] value "Value to search for." cases [block!] "Block of cases to search." /only "Evaluates only the first block! which follows the choice" /default case "Default case if no others are found." ][ either value: either only [ if value: find cases value [ until [block? first value: next value] first value ] ][ select cases value ] [ do :value ][ either default [do case] [none] ] ] --- Ciao Romano

 [13/46] from: holger:rebol at: 5-Apr-2002 10:21


On Fri, Apr 05, 2002 at 01:11:29PM +0200, Romano Paolo Tenca wrote:
> I should like to see (i do not know what has been already patched in the > beta):
Please be very specific about those requests, with examples where possible, and submit them to feedback. -- Holger Kruse [kruse--nordicglobal--com]

 [14/46] from: holger:rebol at: 5-Apr-2002 10:30


On Fri, Apr 05, 2002 at 08:54:53AM -0500, [Robbo1Mark--aol--com] wrote:
> Here's my wish list for REBOL/Core 2.6 and contains > lot's of useful additional series! functions which are > swap, top, pop, push, rest, drop, chop, nip, tuck, cut, > slice and chomp.
Not all that useful, IMHO. Some of it just involves aliasing, most of the other stuff is for handling stacks and similar data structure. The main problem here is that making the beginning of the series the top of the stack is a Bad Idea, because it makes push/pop O(n) (except for list!). There is also the problem that a lot of useful, short words would be reserved for something that provides little added functionality. We usually like to reserve such words for more "fundamental" features. -- Holger Kruse [kruse--nordicglobal--com]

 [15/46] from: holger:rebol at: 5-Apr-2002 10:25


On Fri, Apr 05, 2002 at 04:03:51AM -0500, [SunandaDH--aol--com] wrote:
> Hi Petr, > > Here's the feedbacks I'd like to see fixed: > > #7564 -- Much better context information on errors
3.0
> #7599 -- Fix Random with tuples
We will have a look at that.
> #7528 -- syntax errors should be trappable -- stop Rebol crashing > irrecoverably on badly formed code (example): > > AnObject: make object! [datafield: 1] > AnotherObject: make object! AnObject
Syntax errors are trappable. With your example, an "error? try []" around it returns true.
> #nnnn? -- Clipboard to work with binary data
Image data, you mean ? That is for View, not Core.
> #nnnn? -- Unlimited system/words -- or have it self-cleaning (Recycle/words > maybe?). 2000 (6000 for IOS) -- what's left after Rebol's loaded -- is just > too few
3.0 -- Holger Kruse [kruse--nordicglobal--com]

 [16/46] from: sunandadh:aol at: 5-Apr-2002 14:21


Holger:
> Syntax errors are trappable. With your example, an "error? try []" > around it returns true
thanks for the quick response. You guys seem to be on the case with the bug fixing. But there's an additional problem with _this_ syntax error: REBOL/Core 2.5.0.3.1 Copyright 1997-2001 REBOL Technologies REBOL is a Trademark of REBOL Technologies All rights reserved. errobj: disarm try [ AnObject: make object! [datafield: 1] AnotherObject: make object! AnObject ] probe errobj result: REBOL caused an invalid page fault in module REBOL.EXE at 0167:0040e072. Registers: EAX=00000030 CS=0167 EIP=0040e072 EFLGS=00010246 EBX=00000000 SS=016f ESP=0067fae4 EBP=0067fb50 ECX=0040e062 DS=016f ESI=00729a50 FS=3c2f EDX=00729a50 ES=016f EDI=00000000 GS=0000 Bytes at CS:EIP: 8b 48 08 8b 40 0c 8b 71 08 8b 78 08 75 0c 6a 64 Stack dump: 00000000 00729a50 006c0654 0040d9d6 00729a50 00000000 00000000 00000000 004112d3 00729a50 00000000 00000000 006920e4 0072007c 00405059 006c0654 This syntax error is not trappable in the usual way! Sunanda.

 [17/46] from: petr:krenzelok:trz:cz at: 5-Apr-2002 23:09


Holger Kruse wrote:
>>#7528 -- syntax errors should be trappable -- stop Rebol crashing >>irrecoverably on badly formed code (example):
<<quoted lines omitted: 4>>
>Syntax errors are trappable. With your example, an "error? try []" >around it returns true.
but anyway, the code should not completly crash Rebol, no? -pekr-

 [18/46] from: narg:polbox at: 5-Apr-2002 23:09


> >should be == ["aaa" {bbb "ccc"} {ddd "eee"}] > > > really? Imo it should be: > > == ["aaa" {"bbb" ccc} {ddd "eee"}]
yes, sorry for the typo mistake... nevermind - there is a problem with 'parse func :-) Piotr Gapiński; mailto:[news--rowery--olsztyn--pl] Olsztyńska Strona Rowerowa; http://www.rowery.olsztyn.pl

 [19/46] from: holger:rebol at: 5-Apr-2002 11:54


On Fri, Apr 05, 2002 at 02:21:17PM -0500, [SunandaDH--aol--com] wrote:
> Holger: > > Syntax errors are trappable. With your example, an "error? try []" > > around it returns true > > But there's an additional problem with _this_ syntax error: > > REBOL caused an invalid page fault in > module REBOL.EXE at 0167:0040e072.
2.5 had a bug in its handling of make object! object!. Should be fixed in 2.5.1 and 2.6. -- Holger Kruse [kruse--nordicglobal--com]

 [20/46] from: louisaturk:eudoramail at: 6-Apr-2002 1:03


My greatest hope is that Core 2.6 will support unicode fonts. This is probably dreamy stuff, but a long time ago it was stated on this list that unicode support was planned. :>) I am waiting with great hope. Louis

 [21/46] from: rebolinth:nodep:dds:nl at: 6-Apr-2002 13:04


* On My WishList: ASN1 support. (R)egards, Norman.

 [22/46] from: robolinth:nodep:dds:nl at: 6-Apr-2002 13:00


I take my chances ;-) Enhancements on the Rebol-Console! * Even a more detailed/enhanced help on system/.... * A console escape to the shell * Build-in Editor functions, Line numbers, Code that can be saved while programming on the console. Loading code inside a different segment for -ON-the-console editing. * A user.r console editing function like:
>>preferences
* Intelligent command enlargement like under UNIX pressing Esc esc.. example: make-d^ESC^ESC will become make-dir * A restart from the console:
>>restart ;; a cold restart/reload of ./rebol
* Better support under UNIX for SHIFT-PgUP/SHIFT-PgDn under windows the Enter brings you to the prompt last entided, under UNIX you have to scroll back with Shift-PgDn * Scroll Buffer support under UNIX;
>>system/console/buffer: 9999 ;;;lines
** Could be this is already there but i could not find it. ...well thats pritty it.. Looks like im realy a console freak..Mmmm... -- Alien/abduction: "...Wainting for a Rebolish encounter..."

 [23/46] from: tbrownell:shaw:ca at: 6-Apr-2002 0:34


How about find/whole switch eg: str: "Hello Worldlings" n: "World" find/whole str n == none Basically does a insert n " " append n " " before the find command, just saves a line of code. An error occurs if "n" is the last word as it doesn't find a space. I usually add a space to the start and end of "str" to alleviate it. I suppose some parsing would work as well, but I'm not sure if that slows the processing significantly or no? There are many good functions out there that could be added. Obviously the trade off is bloating. I've often thought there should be various versions, a Rebol a la carte kinda thing... Start with a bare bones version and add the function you need. There must be someway to have a checklist of features you want in your version, then have a bot (Autopilot.r :) alter, build and deliver the result. Don't want e-mail, then dump it, want CGI, then add it, embedd pdf-maker.r?.. no problem. One could have the hundreds of functions available as well... bare bones for PDA's, Uber/Core when size is not a problem. Terry Brownell PS - Having Rebol control a C++ compiler is actually quite simple, just a wee bit time consuming to set it up.

 [24/46] from: holger:rebol at: 6-Apr-2002 5:49


On Sat, Apr 06, 2002 at 01:04:49PM +0200, [Rebolinth--nodep--dds--nl] wrote:
> * On My WishList: > > ASN1 support.
That is for Command 3.0, not Core. -- Holger Kruse [kruse--nordicglobal--com]

 [25/46] from: lmecir:mbox:vol:cz at: 6-Apr-2002 18:09


Hi, 1) here is my version of the FOR function: Rebol [ Title: "For" File: %for.r Date: 20/2/2001/7:21 Author: [ "Rebol Technologies" "Ladislav Mecir" ] Email: [lmecir--mbox--vol--cz--r] Purpose: { A corrected version of the Rebol mezzanine. - tail handling repaired for series - head handling repaired for series - zero-pass handling repaired for series - path handling repaired - throw handling repaired } Category: [General] ] transp-func: function [ { Create a "local return" and "local throw" function that is transparent for return and throw } [catch] spec [block!] body [block!] ] [init] [ spec: copy/deep spec if not string? pick spec 1 [ insert spec "(undocumented)" ] if not any [ block? pick spec 2 string? pick spec 2 ] [ insert/only next spec "Transparent" ] use [fnc] [ init: does [ change/only next third :fnc [throw] ] use [local-return local-throw] [ local-return: func [[throw] result [any-type!]] [ change/only next third :fnc "Transparent" return get/any 'result ] local-throw: func [error [error!]] [ change/only next third :fnc [catch] throw error ] body: bind/copy body 'local-return ] fnc: throw-on-error [func spec reduce [:init :do :body]] ] ] for: transp-func [ {Repeats a block over a range of values.} 'word [word!] {Variable to hold current value} start [number! series! money! time! date! char!] {Starting value} end [number! series! money! time! date! char!] {Ending value} bump [number! money! time! char!] {Amount to skip each time} body [block!] {Block to evaluate} /local result do-body op ] [ if (type? :start) <> (type? :end) [ local-throw make error! reduce ['script 'expect-arg 'for 'end type? :start] ] do-body: func reduce [[throw] word] body op: either positive? bump [:greater-or-equal?] [:lesser-or-equal?] either series? :start [ if not same? head :start head :end [ local-throw make error! reduce ['script 'invalid-arg :end] ] if op index? :end index? :start [ while [ set/any 'result do-body :start op (index? :end) - bump index? :start ] [start: skip :start bump] ] ] [ while [op end start] [ set/any 'result do-body start start: start + bump ] ] get/any 'result ] { Examples: for i 1 4 1 [ if i = 3 [break] print i ] for i s: 'a/b/c tail :s 1 [ print :i ] for i s: [a b c d] tail :s 1 [ print mold i ] for i s: [a b c d] tail :s -1 [ print mold i ] pokus: function [[catch] block [block!]] [elem] [ for i 1 length? block 1 [ if error? set/any 'elem first block [ throw make error! {Dangerous element} ] block: next block ] ] pokus head insert copy [] make error! "Neco" } 2) Rounding functions are missing in Rebol, my versions are: Rebol [ Title: "Rounding" Purpose: {Rounding functions} Author: "Ladislav Mecir" Date: 5/4/2002/8:55 Email: [lmecir--mbox--vol--cz] File: %rounding.r Category: [Math] ] mod: function [ {Compute a non-negative remainder} a [number!] b [number!] ] [r] [ either negative? r: a // b [r + abs b] [r] ] round: func [ {Round a number} n [number!] /to factor [number!] {the number a multiply of which to round to} ] [ if not to [factor: 1] n: 0.5 * factor + n n - mod n factor ] floor: func [ n [number!] /to factor [number!] {the number a multiply of which to get} ] [ if not to [factor: 1] n - mod n factor ] ceiling: func [ n [number!] /to factor [number!] {the number a multiply of which to get} ] [ if not to [factor: 1] n + mod (- n) factor ] truncate: func [ n [number!] /to factor [number!] {the number a multiply of which to get} ] [ if not to [factor: 1] n - (n // factor) ] 3) same? for blocks should be repaired. At least it should be as safe as: same-block?: func [ [catch] a [any-block!] b [any-block!] ] [ throw-on-error [ found? all [ same? tail :a tail :b equal? index? :a index? :b ] ] ]

 [26/46] from: tomc:darkwing:uoregon at: 6-Apr-2002 11:48


1) system calls (all the other kids have them) 2) sort/stable 3) non pdf docs On Fri, 5 Apr 2002, Petr Krenzelok wrote:

 [27/46] from: holger:rebol at: 6-Apr-2002 12:39


On Sat, Apr 06, 2002 at 11:48:10AM -0800, Tom Conlin wrote:
> 1) system calls (all the other kids have them)
View/Pro and Command have them.
> 2) sort/stable
sort already is stable. The only situation in which it may appear unstable is if you use your own comparison function and return false/true from it. You need to return integers (<0, =0, >0) instead, for stable sorting, or don't use a comparison function at all.
> 3) non pdf docs
AFAIR docs are also available in html format. -- Holger Kruse [kruse--nordicglobal--com]

 [28/46] from: tomc:darkwing:uoregon at: 6-Apr-2002 14:56


On Sat, 6 Apr 2002, Holger Kruse wrote:
> On Sat, Apr 06, 2002 at 11:48:10AM -0800, Tom Conlin wrote: > > > > 1) system calls (all the other kids have them) > > View/Pro and Command have them.
Yes I know view/pro relies on X11 and I am not Command ... I'm saving my pennies, almost there. However, I saw that in the ios/Developer Vote on Priorities under "Improved Command functionality" Carl has at least considered moving shell access into "free versions" <quote> side note: - possible rethinking of moving /Shell and /library components into free Rebol versions (it could be still locked by secure key requirement), but could be free (at least shell) ..." </quote>
> > 2) sort/stable > > sort already is stable. The only situation in which it may appear unstable > is if you use your own comparison function and return false/true from it. > You need to return integers (<0, =0, >0) instead, for stable sorting, or > don't use a comparison function at all. >
great, thanks for the tip, I tried it once and the sort was not stable I was definatly using /compare do not recall what I was returning most likely obja/fld <= objb/fld which returns a logic!
> > 3) non pdf docs > > AFAIR docs are also available in html format.
it does get hard to recall

 [29/46] from: rebol:optushome:au at: 7-Apr-2002 9:54


> * Intelligent command enlargement like under UNIX pressing Esc esc.. > example: make-d^ESC^ESC will become make-dir
using tab does this already.

 [30/46] from: larry:ecotope at: 6-Apr-2002 18:19


Fix REBOL comparison operators (<, >, <=, >=, =, <>) so they work correctly for decimal values. Example:
>> a: 2 ** 52
== 4.5035996273705E+15
>> b: a + 1
== 4.5035996273705E+15
>> a = b
== true
>> b - a
== 1
>> zero? b - a
== false In this case a and b test equal although they differ by one. The comparison operators should give the same results for REBOL decimals as the underlying C language does for doubles. Note that ZERO?, POSITIVE?, and NEGATIVE? give the correct results. See the comments in decimal.r on the Ecotope rebsite for more details. -Larry

 [31/46] from: holger:rebol at: 6-Apr-2002 19:06


On Sat, Apr 06, 2002 at 06:19:59PM -0800, Larry Palmiter wrote:
> Fix REBOL comparison operators (<, >, <=, >=, =, <>) so they work correctly > for decimal values. Example:
<<quoted lines omitted: 12>>
> C language does for doubles. Note that ZERO?, POSITIVE?, and NEGATIVE? give > the correct results.
The equality operator, and some others, contain an intentional "fuzziness" for decimals to account for platform-specific differences in the way floating point numbers are implemented. Just because they are all of type double in C does not mean they behave in the same way across platforms and math libraries. There are subtle differences, e.g. whether they have hidden precision (temporary calculation with 96-bit precision), whether rounding occurs "down" or "towards zero" etc., and some platforms have known rounding bugs that have to be worked around (e.g. Amiga). The goal is not to precisely emulate the behavior of a particular math library in C, but rather to provide a functionality that strikes a balance between usefulness and efficiency. Having a fuzzy equality (also affecting <= and >= in the = case) is, e.g., important when using loops with decimal numbers. Without fuzzyness the number of loop iterations may be off by one on some platforms, depending on the way the platform handles rounding. -- Holger Kruse [kruse--nordicglobal--com]

 [32/46] from: petr:krenzelok:trz:cz at: 7-Apr-2002 6:56


[Robolinth--nodep--dds--nl] wrote:
>I take my chances ;-) >Enhancements on the Rebol-Console!
<<quoted lines omitted: 16>>
> ** Could be this is already there but i could not find it. >...well thats pritty it.. Looks like im realy a console freak..Mmmm...
yeah, console ... already submitted to feedback some time ago, so just to remind: - more navigatin possibilities - ability to skip by a word, not just Home and End keys working - ability to hilite, cut & paste from keyboard, not using mouse -pekr-

 [33/46] from: narg:polbox at: 7-Apr-2002 9:07


more math func's like: round ceil floor bound: func [x min max] [ if (x > max) return max if (x < min) return min return x ] near: func [x y dy] [ if all [(x < (y + dy)) (x > (y - dy))] return true return false ] and something like printf function for pretty output formating printf "####.##" 20.1 should give: 0020.10 Piotr Gapiński; mailto:[news--rowery--olsztyn--pl] Olsztyńska Strona Rowerowa; http://www.rowery.olsztyn.pl

 [34/46] from: joel:neely:fedex at: 7-Apr-2002 7:55


1) Fixing inconsistencies/bugs in parsing of strings containing quotation marks, as in:
>> parse/all {this "is a
{ " test "of parsing" with { embedded "quotation marks"} " " == ["this" "is a^/" "test" "of parsing" "with^/embedded" "quotation marks"]
>>
The documented meaning of the /ALL refinement would lead one to expect the result to be: [{this} {"is} {a^/"} {test} {"of} {parsing"} {with^/} {embedded} {"quotation} {marks"}] The failure to break on some of the spaces and the silent destruction of the quotation marks make PARSE of limited value when parsing strings that do contain quotation marks and for which the programmer needs complete control of the parsing. If there's some reason (which I can't guess at) for the above inconsistency, then this problem could be remedied by 1) correcting the documentation to explain what PARSE is actually intended to do, and 2) adding a new refinement, such as /RAW, which explicitly means "do not attach special behavior to *ANY* characters in the parsed string, but leave that up to the PARSE rules written by the programmer" and -- of course -- "retain all characters in the parsed string". 2) Fixing the *VERY* troubling mangling of arguments from the command line: rebol this is "a test" of arguments
>> system/script/args
== "is a test of arguments" which renders it unnecessarily difficult to pass argument strings into a program in consistent fashion with normal command line processing in Unix, Linux, msdos, etc. This should provide the "raw" console argument string without destruction of contents. Note that
>> system/options/args
== ["is" "a test" "of" "arguments"] appears to be related to the first issue in this email. If this is the reason that PARSE behaves as described in the first issue, then this seems like a case of the tail wagging the dog. -jn- Petr Krenzelok wrote:
> Hello list, > > Core 2.6 is really near now, so we all have last chance to > post bug reports, enhancement request, to be included in 2.6. > Post it as a reply to this message... >
-- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]

 [35/46] from: holger:rebol at: 7-Apr-2002 7:16


On Sun, Apr 07, 2002 at 07:55:51AM -0500, Joel Neely wrote:
> 1) Fixing inconsistencies/bugs in parsing of strings containing > quotation marks, as in:
Yes, a known issue.
> 1) correcting the documentation to explain what PARSE > is actually intended to do, and
<<quoted lines omitted: 3>>
> rules written by the programmer" and -- of course -- > "retain all characters in the parsed string".
Yes, we will have to do one of those things... I don't know if this will make it into 2.6 though.
> 2) Fixing the *VERY* troubling mangling of arguments from > the command line: > > rebol this is "a test" of arguments > > >> system/script/args > == "is a test of arguments"
This is intentional behavior. system/script/args contains a concatenation of all arguments. Note that in your example "this" is not considered an argument, but the name of the script, so it does not appear in the string. Splitting arguments up in the first place, and removing the quotes, is done either by the operating system or by the runtime system (c.lib etc.), depending on the platform you are running on, not by our code, and there is no portable way of avoiding that. Some operating systems also perform a much more aggressive preprocessing such as globbing and backtick evaluation that we cannot disable or bypass. To get the individual arguments as a block of strings use system/options/args instead of system/script/args. Note however, that even system/options/args does not contain the first item on the command line ("this" in your example), because it is considered the name of a script to start. To avoid this, and to also avoid arguments such as "-c" getting interpreted as command line switches, use "--" at the beginning of the command line (consistent with Unix commands). Note that even with system/options/args quotes get removed in convention with your operating system, so in your example system/options/args contains ["is" "a test" "of" "arguments"] without the extra quotes around "a test". This is unavoidable, because by the time we get control of the arguments the quotes have already been removed.
> Note that > >> system/options/args
<<quoted lines omitted: 3>>
> first issue, then this seems like a case of the tail wagging > the dog.
No, quote removal in parse has nothing to do with quote removal in command line args. Quote removal in parse is a result of /all not being aggressive enough in changing the set of delimiters. Quote removal in arguments is done by the operating system. -- Holger Kruse [kruse--nordicglobal--com]

 [36/46] from: tbrownell:shaw:ca at: 7-Apr-2002 0:48


Another request, as mentioned in earlier posts (shutting off the parse features) a parse/white switch that turns off the automated comma, quote and semicolon parsing rules eg; parse/white none {Hello world, "this too" is an example;} ;will return... ==["Hello" "world," "this" "to" "is" "an" "example;"] currently it returns... ["Hello" "world" "this too" "is" "an" "example"] I've included Joel's response below. Terry Brownell
>Hi, Carl, Terry, and all >A slightly more generic version...
<<quoted lines omitted: 5>>
> > Sometimes I just want to parse spaces so we get... > > ["Hello" "world," "this" "to" "is" "an" "example;"]
...
> Well, the 'all refinement let's you parse everything except what you > tell it not to parse. ie... >
...
> Though your "this to" becomes one string instead of two. Close to > what you want though, and stripping out the speach-marks first would > be one option. ie... >
just-the-good-parts: func [ s [string!] /local result good-ones others fragment ][ good-ones: charset [#"A" - #"Z" #"a" - #"z" #"." #"," #";"] others: complement good-ones result: copy [] parse/all s [ any [ copy fragment some good-ones (append result fragment) | some others ] ] result ]
>> a: {Hello world, "this to" is an example;}
== {Hello world, "this to" is an example;}
>> just-the-good-parts a
== ["Hello" "world," "this" "to" "is" "an" "example;"] Suitable redefinitions of GOOD-ONES and OTHERS will let you keep or discard whatever characters you wish, of course. -jn-

 [37/46] from: joel:neely:fedex at: 7-Apr-2002 11:54


Thanks, Holger... ... for your speedy and comprehensive reply! Speaking for myself (but I'm sure the others on the list will agree!) you continue to make very important contributions to this list (and to those of us who want to understand and use REBOL better) by your excellent communications. Thanks again! Holger Kruse wrote:
> Yes, we will have to do one of those things... I don't know if > this will make it into 2.6 though. >
Yes, I understand that the clock can be a harsh taskmaster...
> > 2) Fixing the *VERY* troubling mangling of arguments from > > the command line:
<<quoted lines omitted: 7>>
> is not considered an argument, but the name of the script, so it > does not appear in the string.
Right. I just typed some words to show what happened to the quoted string in the middle, but my trivial example may have been misleading.
> > No, quote removal in parse has nothing to do with quote removal > in command line args. Quote removal in parse is a result of /all > not being aggressive enough in changing the set of delimiters. > Quote removal in arguments is done by the operating system. >
Thanks for the clarification!!! -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]

 [38/46] from: ingo:2b1 at: 7-Apr-2002 22:19


Hi Rebols, here are some of my ideas: 1) trim/align removes all spaces/tabs at the beginning and end of the string, and after each newline. 2) align left/right/center aligns a string to a given lengths, works on all lines, if the string has embedded newlines 3) ask/default displays a default entry, which may be edited. 4) and here is my patch to 'help again, which allows to use it on paths, it works on 2.5, but as I don't have the 2.6 beta, I can't check if it works on 2.6, too (IIRC the handling of paths has changed there?). I implemented it in a way to make as little change to the orginal code. I expressly give permission to RebolTech to use this in whatever way the like. help: func [ { Prints information about words and values. *PATCHED* (iho) works on paths } 'word [any-type!] /local value args item name refmode types attrs rtype type-name ][ if unset? get/any 'word [ print trim/auto { ^-^-^-^-The help function provides a simple way to get ^-^-^-^-information about words and values. To use it ^-^-^-^-supply a word or value as its argument: ^-^-^-^- ^-^-^-^-^-help insert ^-^-^-^-^-help find ^-^-^-^-To view all words that match a pattern: ^-^-^-^-^-help "path" ^-^-^-^-^-help to- ^-^-^-^-To view all words of a specified datatype: ^-^-^-^-^-help native! ^-^-^-^-^-help datatype! ^-^-^-^-There is also word completion from the command ^-^-^-^-line. Type a few chars and press TAB to complete ^-^-^-^-the word. If nothing happens, there is more than ^-^-^-^-one word that matches. Enough chars are needed ^-^-^-^-to uniquely identify the word. ^-^-^-^-Other useful functions: ^-^-^-^-^-about - for general info ^-^-^-^-^-usage - for the command line arguments ^-^-^-^-^-license - for the terms of user license ^-^-^-^-^-source func - print source for given function ^-^-^-^-^-upgrade - updates your copy of REBOL ^-^-^-^- ^-^-^-^-For more information, see the user guides. ^-^-^-} exit ] if all [word? :word not value? :word] [word: mold :word] if any [string? :word all [word? :word datatype? get :word]] [ types: copy [] attrs: second system/words foreach item first system/words [ value: copy " " change value :item if all [not unset? first attrs any [ all [string? :word find value word] all [not string? :word datatype? get :word (get :word) type? first attrs] ] ] [ repend value [" (" type? first attrs ")"] append types value ] attrs: next attrs ] sort types if not empty? types [ print "Found these words:" foreach item types [print [tab item]] exit ] print ["No information on" word "(word has no value)"] exit ] type-name: func [value] [ value: mold type? :value clear back tail value join either find "aeiou" first value ["an "] ["a "] value ] ; \/ \/ \/ start changes by iho if all [ word? :word object? get :word ] [ word: get :word ] if not word? :word [ ; check for path first, the value? check wouldn't work on a path! if path? :word [ use [ obj ; the "valid" path (last path part, that's not a ; refinement) as object! parts ; block containing the paths parts i ; position in path j ; loop variable pth ; valid path for printing as path! ] [ ; split the path ... parts: parse mold :word "/" ; and find out, if first element of path exists if error? try [obj: get to-word first parts] [ print ["Path:" :word "not found"] obj: to-word first parts help :obj exit ] ; find the last part of the path, that exists, and is no ; refinement i: 2 while [all [object? :obj i <= length? parts] ] [ ; when error here, it's first refinement (or nonsense) either not error? try [obj: get in obj to-word pick parts i] [ i: i + 1 ] [ break ] ] ; build the path for printing pth: first parts for j 2 i - 1 1 [ append pth rejoin ["/" pick parts j ] ] prin rejoin [{Valid subpath "} pth] ; Test whether what we found is a function and call help ; accordingly ... either any-function? :obj [ print rejoin [{" is } form type? :obj ":^/" ] help 'obj ][ either object? :obj [ print {" is:^/} help :obj ] [ print {"^/} help obj ] ; either object? ] ; either function? ] ; use exit ] ; if path? if object? :word [ use [ wrd ; word in object wrdv ; value of said word hlp ; functions help string format ; formatting function line ; output line line2 ; output line (type part) ] [ format: func [s][ trim/lines s ; replace/all either 30 > length? s [s][ join copy/part s 30 " ..." ] ; ] "^/" "^^/" ] print "object with fields:" foreach wrd next first :word [ line: copy " " line2: copy " " change line wrd ; check if the word has a value either value? in :word wrd [ wrdv: get in :word wrd change line2 rejoin ["(" type? :wrdv ")" ] either any-function? :wrdv [ print rejoin [tab line " " line2 " " either string? hlp: pick pick :wrdv 3 1 [ format hlp]["..."]] ] [ print rejoin [ tab line " " line2 " " either object? wrdv ["..."][ format mold wrdv ] ] ] ; either any ... true ] [ change line2 "()" print rejoin [ tab line " " line2 " Value is not set"] ] ; if value? ] ; foreach exit ] ; use ] ; if object? get :word ] ; if not word? ; /\ /\ /\ end changes by iho value: get word if not any-function? :value [ print [uppercase mold word "is" type-name :value "of value:" mold :value] exit ] args: third :value prin "USAGE:^/^-" if not op? :value [prin append uppercase mold word " "] while [not tail? args] [ item: first args if :item = /local [break] if any [all [any-word? :item not set-word? :item] refinement? :item] [ prin append mold :item " " if op? :value [prin append uppercase mold word " " value: none] ] args: next args ] print "" args: head args value: get word print "^/DESCRIPTION:" either string? pick args 1 [ print [tab first args newline tab uppercase mold word "is" type-name :value "value."] args: next args ] [ print "^-(undocumented)" ] if block? pick args 1 [ attrs: first args args: next args ] if tail? args [exit] while [not tail? args] [ item: first args args: next args if :item = /local [break] either not refinement? :item [ all [set-word? :item :item = first [return:] block? first args rtype: first args] if none? refmode [ print "^/ARGUMENTS:" refmode: 'args ] ] [ if refmode <> 'refs [ print "^/REFINEMENTS:" refmode: 'refs ] ] either refinement? :item [ prin [tab mold item] if string? pick args 1 [prin [" --" first args] args: next args] print "" ] [ if all [any-word? :item not set-word? :item] [ if refmode = 'refs [prin tab] prin [tab :item "-- "] types: if block? pick args 1 [args: next args first back args] if string? pick args 1 [prin [first args ""] args: next args] if not types [types: 'any] prin rejoin ["(Type: " types ")"] print "" ] ] ] if rtype [print ["^/RETURNS:^/^-" rtype]] if attrs [ print "^/(SPECIAL ATTRIBUTES)" while [not tail? attrs] [ value: first attrs attrs: next attrs if any-word? value [ prin [tab value] if string? pick attrs 1 [ prin [" -- " first attrs] attrs: next attrs ] print "" ] ] ] exit ]

 [39/46] from: jean:holzammer:faedv-n:bayern at: 8-Apr-2002 8:29


Hi, Rebol/View has two functions, to-rebol-file and to-local-file. Quite useful when you write scripts that get filenames as arguments and are still to be platform independant. Would be nice to see them in Core, too. Ciao, Jean

 [40/46] from: cyphre:seznam:cz at: 8-Apr-2002 12:15


Hi List and RT, What about add the possibility to have /Pro features(when you are owner of the license key) in the new Core2.6? Regards, Cyphre

 [41/46] from: oliva:david:seznam:cz at: 8-Apr-2002 22:14


Just please fix possibility to load block with word: '<< (left shift) ---
>> load [ <<]
** Syntax Error: Invalid tag -- << ** Near: (line 1) load [ <<]
>> load [ >>]
== [>>] --- and this one is most wanted as well:
>> x: load [a,a]
** Syntax Error: Invalid word -- a,a ** Near: (line 1) load [a,a] ( rather to return: [a , b] where second x == ', ) ...so we will have possibility to load whatever text file and parse it -------- and maybe rejoin/with
>>rejoin/with ["a" "b"] #"/"
== "a/b" thanks oldes

 [42/46] from: rotenca:telvia:it at: 10-Apr-2002 1:04


Hi Petr, I don't remember my number :-( ##) Support for native continue function (or continue refinement for break) in loop functions, or something like this example for forall (but i think this is slow): continue: does [throw/name none 'continue] forall: func [ "Evaluates a block for every value in a series." [throw] 'word [word!] {Word set to each position in series and changed as a result} body [block!] "Block to evaluate each time" ][ while [not tail? get word] [ catch/name body 'continue set word next get word ] ] a: [1 2 3 4 1 2 3 4] forall a [if 2 < first a [continue] print first a] --- Ciao Romano

 [43/46] from: cyphre:seznam:cz at: 10-Apr-2002 10:28


Hello All, I'm not sure if there is some workaround for this but maybe it would be handy to have native 'share feature in the next version?
>> a: [1 2 3 4 5 6 7 8]
== [1 2 3 4 5 6 7 8]
>> b: share 'a 3 6
== [3 4 5 6]
>> head b
== [3 4 5 6]
>> last b
== 6
>> length? b
== 4
>> b/3: 10
== [3 4 10 6]
>> probe a
== [1 2 3 4 10 6 7 8] BTW Anyone know how to make 'share as a mezzanine function? ;-) regards, Cyphre

 [44/46] from: brian:hawley at: 12-Apr-2002 10:19


At 08:29 AM 4/8/02 +0200, you wrote:
>Rebol/View has two functions, to-rebol-file and to-local-file. Quite useful >when you write scripts that get filenames as arguments and are still to be >platform independant. > >Would be nice to see them in Core, too.
Yeah it would. Particularly since the /Core 2.5 docs have always said that those natives are already there. I've found those docs frustrating for a year now.... Brian Hawley

 [45/46] from: brian:hawley at: 12-Apr-2002 9:26


Well I have a few... (All platforms) - Add the to-rebol-file native that is in /View to /Core, and to-local-file to do the reverse. Make them support relative paths. Add function documentation for them. - Integer division native!, action! or op!, to be more efficient than to-integer (x / y). Is there one now? Would it actually be more efficient? - Actually release /Core/Pro on platforms where /View is absent (like WinCE) or awkward (like Unix w/o X11). I'd buy the WinCE one at least. (Windows) - Make certain the call native (when implemented) never opens a visible console window unless necessary. In particular, call/console should never do so. Neither should a call to a non-console app, nor should it when all forms of I/O are redirected explicitly, like call/input/output/error. The current behavior makes background or scripted use of call awkward. If you really need to open a console, why not a hidden one? (WinCE - Serious suggestions) - Clipboard support in the interface, just like Windows. - Command line support, just like Windows (used by the command shell and file associations in the registry - yes, WinCE has and uses those). - An icon for the REBOL executable, just like Windows. - Make now/precise not ignore the /precise refinement. - Mention in the setup documentation that %user.r needs to go in the root directory on WinCE. Better yet, why not a REBOL_HOME setting in the registry like /View on Windows. WinCE has no env vars or current dir. - Add clipboard:// ports for /Core. WinCE doesn't have /View, but always has a clipboard. (WinCE - Dreams) - /Core/Pro for WinCE (I don't want to learn Perl). - /View for Pocket PC. - Optimize the native code for either speed or size, rather than for neither. Keep in mind that ARM emulates floating point code, so use integers. REBOL on my Jornada 820 is 10 times slower than on my p133 laptop, when almost everything else is comparable. I'm sure that there is more that I could come up with, but that must wait until later. Must sleep :( Brian Hawley (Been busy...)

 [46/46] from: sqlab:gmx at: 23-Apr-2002 10:43


I would like to see an easy way to save with linefeeds. maybe save/lines, where any linefeeds will be preserved and any newline ("^/") will cause a new line. AR

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