; I think you forgot the 'not in your test:
;---
Stuff: make block! [fire water air water water air]
foundstuff: make block! []
forall stuff [
if not found? find foundstuff (pick stuff 1) [
append foundstuff (pick stuff
This approach now lets me 'push or 'pop values into/from any series,
port or bitset value, and allows me to work on nested blocks or other
types of series. Effectively, I've added two interesting words to Rebol's
vocabulary.
Didn't you take those words functions straight from PERL? ;))
My latest utility function: To insert commas into a number (how many of us
already have one of these?). It uses my version of 'rejoin, which is
enhanced with the /with refinement (how many of us have already done
this?). Currently only works with integers.
If the use of commas offends you (for
That would be way cool. All my saved email from this list is in Lotus Notes
and I'd really like to get them out and into a more portable format (flat
text would be fine).
BTW Is there still a project underway for a REBOL email client? I've
written a simple read-only script in /Core which
TIA,
You might want to double-check how current the posted syntax highlighting
file is. When I got mine (several months ago) it needed updating. A word of
warning: for some reason, UltraEdit requires a blank character at the end
of each line in the wordfiles.txt file (the file which defines the
Verified the problem here - that behavior doesn't seem right. Some simple
testing:
some-type: word!
== word!
switch/default some-type [word! [print ok]][print not ok]
ok
some-type: type? 'aword
== word!
switch/default some-type [word! [print ok]][print not ok]
not ok
Seems like the
FYI when using to-block, the block was being created (as data only), but in
order for the assignment to happen it needed to be executed (as code).
- Michael Jelinek
Carl Read [EMAIL PROTECTED]@rebol.com on 05/03/2001 07:12:03 AM
From: Carl Read [EMAIL PROTECTED]@rebol.com on 05/03/2001
I was introduced to 'load to replace using do read. Since 'load also
takes strings and blocks, it can also replace do to-block.
- Michael Jelinek
On 04-May-01, [EMAIL PROTECTED] wrote:
FYI when using to-block, the block was being created (as data only),
but in order for the assignment to
I had noticed this, and guessed that the garbage collection in REBOL
reclaims memory back into it's own pool, but does not release it back to
the OS.
- Michael Jelinek
Gisle Dankel [EMAIL PROTECTED]@rebol.com on 05/01/2001 09:15:07 AM
From: Gisle Dankel [EMAIL PROTECTED]@rebol.com on
Or, for those who want to separate the sub-directories from the regular
files in the output order:
(just replace this function)
recursive: func [dir [file!] /local ext dir-list] [
dir-list: copy []
foreach file read dir [
either not dir? dir/:file [
OMG! This one word is what I have been yearning for for a long time!
Thanks!
While writing to the list, I've wanted to say for awhile that I started
with view when it was in beta (open beta) and had tried my best (putting in
alot of time) to write a simple program to keep a checkbook: add,
At $495 for the Standard Edition, NQL is a real bargain!
Uh, yeah.
- Michael Jelinek
Brett Handley [EMAIL PROTECTED]@rebol.com on 04/21/2001 08:39:35
PM
From: Brett Handley [EMAIL PROTECTED]@rebol.com on 04/21/2001
08:39 PM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL
This works for me:
print "^^"
^
- Michael Jelinek
Kenneth LO [EMAIL PROTECTED]@rebol.com on 04/20/2001 12:55:21 AM
From: Kenneth LO [EMAIL PROTECTED]@rebol.com on 04/20/2001 12:55 AM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject:
My scheme to include external code is as follows. In my user.r I have:
lib-path: %/d/languages/rebol/libs/
I place the "library" files in the directory specified above. Then in my
code I simply write:
include "highfun"
include "mime-types"
Oh yeah, the 'include word is defined by my shell.r
Brett,
Thanks for posting file-tools.r! I have been writing bits of it for myself
as I needed them, and was currently balking at writing the
directory-related functions (esp copying).
I needed to modify the way that external code is included to use my own
scheme, no problem.
I added a
To write the most compact piece of code for performing this task one could
split some hairs and chop out a few chars here and there, but that does not
necessarily make it more readable/maintainable or better.
Despite the fact that this email will get like a zillion replies, here's my
2c. If you
Using filename extensions to represent filetypes to the OS is lame anyway
IMO. Extension name clashes are inevitable - especially with the archaic
3-char convention. And these filename extensions are listed as if MS
Windows is the only OS out there. Geez. It's not like extensions are
registered
find/case/any/match "user.r" "*.r"
== ".r"
find/case/any/match "user.r" "*^.r"
== ".r"
find/any/match "user.r" "*.r"
== ""
index? find/any/match "user.r" "*.r"
== 7
/case seems to be presenting a problem.
You might try viewing just the return from 'find, and getting this 'index,
to see
If the problem really is that you are looking for a TRUE return from
'parse, then the explaination is simple. 'parse will return TRUE only if it
can successfully match the entire string according to the given rules.
Placing "to end" as your final rule should give you the result you desire.
Even
The following example from the /view doc doesn't work, or when I try to use
the 'choice button in my script:
view layout [choice "Choose" data ["Happy" "Joyous" "Free"]]
Robert,
Since I am rapidly approaching 'sensor functionality in my novice /VIEW
program, where did you find this information?
How I WISH there were a REBOL/View for Dummies book!
- Michael Jelinek
"Robert Philippe" [EMAIL PROTECTED]@rebol.com on 01/12/2001
11:59:37 AM
From: "Robert
You might try checking out multisession.r on REBOL.org. I THINK it does
this (associating literal words to port objects in a 'waitports list)...
If not, what you might have to do is either do a 'find within the list of
'waitports, or keep a synchronized list (block) of literal words to match
www.rebol.org/advanced/multisession.r
Alternatively you could look at the code of my MUD: Monsters and Treasures.
It's sitting on a web/ftp site, I've just never thought of simply giving
out the address (in http form) for people to view it. In particular, the
"mod.players" module handles all
Anton,
Way ahead of you, although your efforts are commendable nonetheless.
Actually your efforts are abit better than mine for you published yours.
Although...did I post an early version of my shell.r to one of the REBOL
repositories?
Anyway, I took your pattern matching from the directory
I followed your thought right up until:
table: "player"
Now, a whole bunch of scope-related questions pop up, and I don't see how
to give an answer without looking at the full script. Probably all you have
to do is convert the string "player" to a word, then bind it to the context
which you've
In the usually simple tasks I give to REBOL, I've found that more often
than not it helps to start writing the code backwards - that is, write the
"output" function first, the one that will actually write the HTML pages.
Forget about the mechanics of reading in the directories and filenames, and
If I understood Rebol/Command correctly, if you connected to your database
via ODBC, then Rebol/Command would connect to it. I have sent DDL/SQL to a
UDB (DB2 Universal) database and it worked via ODBC. This was with the beta
version of R/C. Don't know if the commercial product has differed.
-
27 matches
Mail list logo