• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 37101 end: 37200]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
james_nak:
29-Sep-2006
I'm attempting to add a "repeat command" button to an app but I need 
to capture the what was sent to a function including the refinements. 
I'll put that capturing code inside the function called and store 
it in a global. The arguments, of course, are no problem to save.
Gordon:
29-Sep-2006
When you import data using "data: read/binary {sometextfile}" you 
seem to get a string of hex values.  Ex:

probe 'data' of a file containg the word "Hello"  results in #{48656C6C6F} 
but if you 

probe first data it returns 72.  So when you probe the entire data 
stream it returns it in hexidecimal format
but when you probe each character it returns a decimal value.


At any rate how do you convert the characters in the variable 'data' 
back into ASCII values?  IOW, how do you convert the decimal value 
of 72 back into an "H" or the #{48656C6C6F} back into "Hello"?
PeterWood:
29-Sep-2006
>> a: 72
== 72
>> to char! a
== #"H"
>> b: #{48656C6C6F}
== #{48656C6C6F}
>> to string! b
== "Hello"
Gabriele:
30-Sep-2006
graham: i think mine dies because of the wrong quoting, not empty 
fields, but i haven't tested it. i would actually be surprised to 
see a csv parser that handles quoting that way, because the only 
way to handle them is to ignore them.
MikeL:
30-Sep-2006
Gordon, This may be too obvious to mention but if you know it is 
not a binary file then don't read it with the /binary refinement 
then you won't need to convert.
Gordon:
30-Sep-2006
Hi guys;
  Thanks for the input.


PeterWood & Anton:  I could have sworn that I tried both to-char 
and to-string.  It is the obvious answer, but I have been trying 
so many things in solving a parse problem that I missed it.  Now 
I remember, I did try them but at the time I complicated the character 
testing by using quotes and brackets and braces, or in the case of 
the hex string - not using the #{}.  Anyway, thanks for your time 
in answering. 


Gabriele:  As I was waking up this morning, I was thinking about 
modifying your CVS parser to make it work with (improperly) quoted 
strings.  That may be the simplier answer to my parsing problem.


MikeL: I started by not using the /binary but then the 'read' converts 
the #{0D0A} sequences to just #{0A} so I was going to try using the 
/binary option to preserve the original #{0D0A} and got sidetracked 
into changing the rest of the file back into a string.  Turns out 
that I will be going back to just using the 'read' without the /binary 
option and try modifying Gabriele's, CVS parser to handle improperly 
embedded quotes.
Henrik:
5-Oct-2006
maybe a list of  how rebol converts empty values to other types would 
be in order
Gabriele:
5-Oct-2006
(i believe this is in rambo already, you should do a search first)
Maxim:
5-Oct-2006
this is where as-integer and as-decimal make sense IMHO.   return 
the most logical representation of supplied value, with a defined 
fall back when no sense can be made of input.
Gabriele:
6-Oct-2006
if you guys think it should have a higher priority, i can raise it.
Henrik:
6-Oct-2006
Ladislav posted on 18. sep.: do you like this: any [1 true] ; == 
1 ?

I have a variant: any [false none] ; == none


Would it make more sense to return FALSE? It seems to me that FALSE 
should have precedence over NONE.
Henrik:
6-Oct-2006
well:

pick [do-this do-that] false ; == does 'do-that

pick [do-this do-that] none ; == error

This came from a function where I had a refinement:

f: func [/act] [
	pick [do-this do-that] act
]


You can't do that, since /act is none. Sure you can then use EITHER, 
if do-this and do-that are not necessarily in one block, but you 
couldn't extend the existing code with:


>> pick [do-this do-that] any [act false] ; == still none, which 
gives error

So you have to use something less clean like:

>> pick [do-this do-that] any [act 2]
Ladislav:
6-Oct-2006
I pulled out the question, sorry, it was a misread at my side
Henrik:
6-Oct-2006
rebolek, thanks. as long as there is a way to discern between none 
and false with one function
Ladislav:
6-Oct-2006
some interesting block "quirks":

    block1: #[block! [a b] -1] none
    block2: #[block! [a b] 4] none
    mold/all block1 ; == "#[block![a b]-1]"
    mold/all block2 ; == "#[block![a b]4]"
    index? block1 ; == -1
    index? block2 ; == 3
    length? block1 ; == 4
    length? block2 ; == 0
Maxim:
6-Oct-2006
'ANY on returns a non false or non none value.  it does not return 
such a value from the block itself. if you specify only none and 
false value, it effectively assumes all is bad and returns none.


'ALL is the same, but will only return a value unless one value equates 
to false or none (in which case it considers the block a failure 
and returns its own value, not the value from the block itself).
PeterWood:
10-Oct-2006
There''s a more up-to-date version at http://membres.lycos.fr/didec/rebsite/delete-emails/delete-emails.r
Louis:
10-Oct-2006
That is a windows error message, and just the first part of it.
PeterWood:
10-Oct-2006
I also downloaded the latest version and got a similar error on 1.3.2.
PeterWood:
11-Oct-2006
I managed to get a working copy of Didec's delete-emails to Louis 
by pasting it in a private message. It seems to have allowed him 
to resolve his problem.
Louis:
11-Oct-2006
PeterWood and Anton, many thanks! It turned out that one of my children 
sent me a file with many huge photos. The very slow dialup connection 
I have here in Indonesia could not (or perhaps is designed to not) 
handle it. I was able to delete the file and all is well, except 
that now I can't look at the photos, at it cost me two days trying 
to solve the problem. I probably could not have solved it at all 
without you guys.
Gregg:
13-Oct-2006
Examples contrasting compose (with /only and /deep) and reduce/only, 
would be great. I know it has a couple in the script. I've looked 
at it in the past, but haven't been driven to add it as a standard 
part of my process yet.
Ladislav:
13-Oct-2006
Henrik: Build can do it using one of the following ways:

    build [1 [ins 3 + 2 ins now]]
    build [1 only reduce [3 + 2 now]]
    build/with [1 inner] [inner: reduce [3 + 2 now]]


OTOH, your example is quite specific and not very general (I would 
say that it as a task for REDUCE/DEEP)
Ladislav:
13-Oct-2006
(except for the fact, that REDUCE does not have a /deep refinement)
Henrik:
13-Oct-2006
I think some practical examples are needed, for example in building 
some HTML for a webpage. Something that shows that BUILD is significantly 
easier than a combination of REDUCE and COMPOSE.
Ladislav:
13-Oct-2006
building some HTML for a webpage
 - BUILD builds blocks not HTML
Henrik:
13-Oct-2006
ok, a layout block then?
Ladislav:
13-Oct-2006
the example Mike liked is:

    view layout build/with [
        box 600x600 effect [
            draw [
                spider [
                    size 600x600
                    ; offset 100x100
                    pen black
                    scale 4
                    ; scale [0 150 300 450 600]
                    categories [

                        "Category 1" "Category 2" "Category 3" "Category 4"

                        "Category 5" "Category 6" "Category 7" "Category 8"
                    ]
                    directions
                    pen red
                    data [100 200 300 400 500 600 700 800]
                    pen blue
                    data [100 100 100 100 100 100 100 100]
                ]
            ]
        ]
    ] [spider: :spider*]

(it builds a DRAW block creating a Spider graph)
Henrik:
13-Oct-2006
>> do http://www.fm.tul.cz/~ladislav/rebol/spider.r
connecting to: www.fm.tul.cz
Script: "Spider" (8-Sep-2006/16:40:58+2:00)
** Script Error: lfunc has no value
** Near: spider*: lfunc [
    [catch] 

    description [block!] "a block containing a description of a chart"
] [] [
    current-...
>>
Henrik:
13-Oct-2006
it wants to find the file in my local cache before the remote one 
and crashes:

>> do http://www.fm.tul.cz/~ladislav/rebol/include.r
connecting to: www.fm.tul.cz
Script: "Include" (5-Jan-2006/14:31:42+1:00)
>> append include-path http://www.fm.tul.cz/~ladislav/rebol/
== [%. %/Volumes/c/rebol/ http://www.fm.tul.cz/~ladislav/rebol/]
>> include %spider.r
connecting to: www.fm.tul.cz
** Access Error: Cannot open /Volumes/c/rebol/spider.r
** Where: include-script
** Near: found: load/all target 
if header
>>

Sorry, if I'm being a little difficult :-)
Ladislav:
13-Oct-2006
OK, give me a few minutes to check the versions
Ladislav:
13-Oct-2006
aha, this looks like a result of the last INCLUDE change. It is surprising, 
that nobody noticed it yet.
Henrik:
13-Oct-2006
ah... a fresh console helped.
Ladislav:
13-Oct-2006
you need to have a look at http://www.fm.tul.cz/~ladislav/rebol/spider.r
. It generates the spider graph as you could see, if you succeeded 
to run the code
Henrik:
13-Oct-2006
include still works fine in a fresh console
Henrik:
13-Oct-2006
I guess I'm just really hard to impress today. I need a much sexier 
example to be convinced of the raw power of BUILD. :-)
Ladislav:
13-Oct-2006
I have got a similar XYPLOT function creating an XY graph, although 
I did not release it yet
Henrik:
13-Oct-2006
by looking at it, SPIDER looks like a regular function to me with 
the following block as input. I guess it can't be, because then the 
layout block could simply be done by enclosing spider [...] in ()'s 
and compose/deep the whole thing.
Henrik:
13-Oct-2006
I can see that now. I've just not run into a case like that, I guess. 
:-)
Henrik:
13-Oct-2006
well, if some good examples came into place, then I think it would 
be possible to write a little bit around it.
Henrik:
13-Oct-2006
now would the only advantage to use compose be that it's a native 
function? does build make compose redundant?
Pekr:
13-Oct-2006
Henrik - where did you get it from? :-) IIRC asking Gabriele some 
time ago the answer was something like possibly. IIRC there was one 
page with parse suggestions, but not sure what will come in. I know 
that mine would make parse a different tool, but for "novices" like 
me, I would welcome 'to [a | b | c] :-)
Ladislav:
13-Oct-2006
to [a | b | c] is definitely a candidate for R3
Henrik:
13-Oct-2006
ladislav, what if I want to use values that are already set elsewhere, 
like function input? then the /with values block needs to specify 
the values too:

a: func [b] [
  build/with [this block contains a c] [c: :b]
]


Perhaps I've created the build block elsewhere and want to use parts 
of it with BUILD. Perhaps also I want that block to be fully readable. 
Then it would be nice to:

y: [that is a very large animal]

a: func [animal] [
  build/words [that is a very large animal] [animal]
]

a 'cow
== [that is a very large cow]
Henrik:
13-Oct-2006
whoops, the first part didn't come along clear enough: It involves 
a bit of double work, since you need an additional variable.
Henrik:
13-Oct-2006
the second part should have been:

a: func [animal] [
  build/words y [animal]
]
Ladislav:
13-Oct-2006
the problem with your 'animal example is, that such a thing can be 
implemented natively and be quite fast. To obtain the fastest possible 
mezzanine implementation I resorted to the "object-like" behaviour. 
BTW, it is easy to "transform":

a: func [animal /local animal*] [
	animal*: :animal
  	build/with [that is a very large animal] [animal: :animal*]
]
Anton:
13-Oct-2006
I support the idea of adding build as a native. I would like to check 
it out more but I think it's a good bet from what I've seen today 
and in the past.
Henrik:
13-Oct-2006
ladislav, yes, maybe it wouldn't be a good part of build, though 
I would have liked to see such a function, at least as mezzanine.
Gregg:
13-Oct-2006
But I like the idea of a paren-friendly compose alternative, or maybe 
a refinement for COMPOSE.
Maxim:
13-Oct-2006
we could simply add a double parens filter.  that allows parens to 
stay in the blocks, and makes the composed values even more obvious...
Louis:
14-Oct-2006
When constantly having to convert from one currency to another is 
it best to not use the money! datatype? If I change for Rp. to $ 
and then back to Rp. I lose a few Rp.
Henrik:
14-Oct-2006
that sounds like a serious flaw in the money! datatype. if it can't 
be used for financial calculations, why is it there?
Henrik:
14-Oct-2006
about the above discussion before money, maybe a reduce/with could 
do the opposite of reduce/only.
Volker:
14-Oct-2006
(Skipping a lot discussions)
    build [1 [/ins 3 + 2 /ins now]]
    build [1 /only reduce [3 + 2 now]]

and i would like it. Or, because lit-wrds mean exeptions in parse, 
    build [1 ['ins 3 + 2 'ins now]]
    build [1 'only reduce [3 + 2 now]]
Anton:
14-Oct-2006
Oh I've just got a very basic and customized accounting program. 
It basically just runs through all my transactions, subtracting expenditures 
and adding incomes.
Anton:
14-Oct-2006
It can plot a graph of the balance over the last year, so I can see 
the patterns and trends.
Gregg:
14-Oct-2006
BUILD - 'ins and 'only are good words, it's just that plain words, 
mixed with a lot of other plain words, don't catch your eye, so using 
any other word doesn't solve it for me. That's why I used the set-word! 
syntax in my COLLECT function if you recall. I would probably end 
up using "special" words or marker values, e.g. puting special chars 
around the words, like ~ins~ or *only*, or just using special start/end 
markers. Basically, synthesizing a paren alternative or looking for 
words that are "marked up" in a ceratin way. e.g.

    build [1 [|_ 3 + 2 _| |_ now _|]]		; |_ val _|  = ins val

    build [1 ||_ reduce [3 + 2 now] _|| ]		; ||_ val _|| - only val

    build [1 *this* and *that* but not these] 	; marked words, e.g. *-modified, 
    are reduced
Ladislav:
14-Oct-2006
Louis - what you are describing is a MOLD issue - MOLD shows you 
only two decimal digits for the MONEY! datatype
Louis:
14-Oct-2006
Ladislav wrote: "you probably don't know when you need to take care." 
 You are right, but I am going to have to learn. I have written a 
double-entry fund accounting program which we are using for our non-profit 
organization for several years. I have just modified it to convert 
rupiahs to dollars. But it also has to be able to convert the dollars 
back to rupiahs properly. Are there any documents I might read to 
educate myself?
Ladislav:
15-Oct-2006
Mathematical rules:
1) do not expect, that a result "exists" unless you know it does
Graham:
15-Oct-2006
If you're dealing with $777,777  - then I suggest a professional 
accounting package is more appropriate.
Ladislav:
15-Oct-2006
I disagree, even when using a professional accounting package we 
need to know what we want to get
Oldes:
15-Oct-2006
For example why is not working this?
>> $10 * $10
** Script Error: Expected one of: number! - not: money!
** Near: $10.00 * $10.00
Money is not a number?
Oldes:
15-Oct-2006
Ok, you are right, I know I can do 10 * $10 and it's probably logical, 
but anyway, for me money is a number and this is new form me:
>> second (to-money 777777 / 9220)
== 84.3575921908894
Anton:
15-Oct-2006
A currency exchange rate (such as Louis' 9220) includes, as part 
of its definition, two distinct currencies (eg. RP and USD).
Louis:
15-Oct-2006
All this is very interesting. I appreciate all of your comments. 
Anyway I have a workaround to the problem. First of all, however, 
I need to tell you why I wanted to be able to convert dollars back 
to rupiahs. It was just to save space in the database. I enter rupiahs, 
as that is the currency I am using right now, but the software converts 
it to dollars and saves the dollar amount to the database. To find 
out the  rupiah amount later if needed, I was going to do a reverse 
conversion. The other solution is to simply record the rupiah amount 
in the database also, so that is what I'll do.
Louis:
15-Oct-2006
Right now I'm simply using a rebol object database. It would be very 
difficult to change this particular script. But if I ever do something 
like this again I may consider using mysql.
BrianH:
16-Oct-2006
Watch out though - your problem wasn't a decimal vs. money problem, 
it was a rounding problem. If you are going to store the dollar equvalent 
in a database make sure to store it as a floating-point value rather 
than a fixed-point like SQL's decimal type. Otherwise you are going 
to run into the same problem when you store the data and retrieve 
it again.
Jerry:
19-Oct-2006
How do I use the CALL native function to call a external program 
via shell and wait for the program to finish. I try the /wait refinement, 
but it does not work.
* Example: 
call/wait "regedt32 /E C:\backup.reg"
PeterWood:
19-Oct-2006
Regedt32 is returning a 0 completion code to Rebol as it is being 
loaded which Rebol returns from the call:
>> call/wait "C:\Windows\System32\regedt32.exe"
== 0
PeterWood:
19-Oct-2006
This suggests that regedt32 is simply a loader for another program.
PeterWood:
19-Oct-2006
From http://en.wikipedia.org/wiki/Windows_Registryit seems that 
regedt32.exe invokes regedit.exe.


The page also hints that it may be better to use reg.exe to update 
the registry from a script
Graham:
19-Oct-2006
I've seen this happen before ... brings windows to a stop :(
Allen:
19-Oct-2006
Jerry, was it a "real" memory error, or where you just trying to 
decompress damaged data?
Maxim:
19-Oct-2006
not saying /lines has an issue, but I have loaded 700MB ascii files 
on a 1GB RAM computer... 150 is peanuts.  but I never use the /lines 
argument.
Jerry:
19-Oct-2006
Is there a way that I can make REBOL recycle the memory? RECYCLE 
seems not to work. Thanks for your help.
Maxim:
19-Oct-2006
there is a possibility that windows does not allow any application 
to allocate more than 1.2GB.  I remember that a 3d application (Maya) 
seemed to crash or freeze when it reached  that amount or RAM IIRC.
Group: Tech News ... Interesting technology [web-public]
Reichart:
21-Jan-2012
Wikpedia - is not reliable, rather it is a great place to "start" 
to understand what questions to actually ask.
Ladislav:
23-Jan-2012
With deeper questions, I feel, it become more and more unreliable

 - this is a general statement that is not reliable as far as I can 
 tell. The Wikipedia is surprisingly reliable even when deep knowledge 
 is looked up, as well as it is possible to find even some surprisingly 
 basic facts that are not correct. I find Wikipedia surprisingly accurate 
 and correct, especially taking into account how it is being written. 
 For example, the last Wikipedia article I read contained informations 
 (correct, I have to add) which I did not find in the Stanford encyclopedia...
Henrik:
25-Jan-2012
(and form a basis for macros)
Reichart:
25-Jan-2012
Ladislav, you seem to be measuring for positives, not for negatives, 
false negatives, or even false positives.  One of our former AltME 
members here was a Wikipedia "editor".  all he did was fix blatant 
mistakes, sabotaged data, etc.

I would send him errors I found every month.


I would simply argue that the accuracy of the data is the same as 
any academic paper, and a “function” of the number of eyes that notice 
something.
Ladislav:
25-Jan-2012
...and that example was not just "positive", it made the corresponding 
paragraph in the other encyclopedia incorrect exactly because it 
was supposed to be a complete list of available alternatives
Ladislav:
25-Jan-2012
For me the Wikipedia has undoubtedly proven its usefulness in a big 
way.
Reichart:
25-Jan-2012
I think we agree it is "useful".  But, for example, I would never 
take ANY fact offered on Wikipedia and assume it is "true" without 
my own separate confirmation.  Nor would i use Wikipedia + some other 
source "together" to equal truth.  In other words, I would use Wikipedia 
to learn "about" a fact, and then judge a seprate source on its own.
Reichart:
25-Jan-2012
(also, I was not attacking you, or speaking to YOUR past, perhaps 
a better way for me to say what I said before was to modify your 
statement to "The Wikipedia is surprisingly reliable even when deep 
knowledge is looked up.........often.")
Ladislav:
25-Jan-2012
But, for example, I would never take ANY fact offered on Wikipedia 
and assume it is 

true" without my own separate confirmation." - maybe there is a difference 
between domains, as Graham pointed out.


For example, I found it funny that Randall Holmes not just put a 
fact into a WP article, but he also wrote a (mathematical) proof 
in it, while some (poor thinker, IMO) marked the fact (which was 
mathematically correctly proven at the place) as doubtful, since 
there was no reference to some published article (LOL).
Ladislav:
25-Jan-2012
Nor would i use Wikipedia + some other source 

together" to equal truth." - well, I learned better from my experience. 
I was suggested the Standford encyclopedia as a reliable source on 
the problem I wanted to solve and found out that WP was corrected 
one point I wanted to find.
Ladislav:
25-Jan-2012
'In other words, I would use Wikipedia to learn "about" a fact, and 
then judge a seprate source on its own' - well, on the other hand, 
this is usually what you should do with any encyclopedia; find the 
pointers to sources where you can learn more, which is what Wikipedia 
does well enough for me
Reichart:
25-Jan-2012
Both your example you gave of the "poor thinker" and Stanford would 
be examples of  other states like I mentioned as false negatives/positives. 
But these are all still anecdotal of course.  The question is not 
how many successes you can come up with, but how many failures anyone 
can find vs. a control (even “Stanford”).


So we are speaking to “trust” + domain.  For me, my trust is low, 
regardless of domain, with some domains being really poor.
Reichart:
25-Jan-2012
I too [feel] (and have a lot of examples) of it not be releable for 
me.
Ladislav:
25-Jan-2012
The question is not how many successes you can come up with...

 - interesting! However, my point is totally different. For me, an 
 encyclopedia is useful if I can learn about a fact something new 
 and find also pointers to relevant sources. When this holds for every 
 subject I look up (which it does for *my* usage of the WP), then 
 I do not need anything more.
Reichart:
25-Jan-2012
Yes, I agree.  My point is simply how much we “each” trust this all. 
 I simply have a low level of trust, as does John it seems.  But 
I don't deny you anything for trusting it more.  I think WP is a 
great (best) place to start.
Ladislav:
25-Jan-2012
Certainly, there are many cases when I looked up an article, found 
the information I needed, and as a "thank you" I corrected something 
in the article (a typo, missing reference to a source, or even a 
correction of a formulation, etc...)
Ladislav:
25-Jan-2012
'My point is simply how much we “each” trust this all.' - I do not 
worry. For example in mathematics you do not need to trust anything. 
You can look up the proof and if you find it correct you are done. 
If you find it wrong you can:

- trust the theorem anyway trying to correct the proof
- distrust the theorem trying to find a counterexample
Reichart:
25-Jan-2012
.......indeed, and agreed.  There is a lot of "opinion" on WP, and 
also levels of vagueness that allows people to create subterfuge, 
and misdirection, and force their opinion on people through this.
Ladislav:
25-Jan-2012
'There is a lot of "opinion"...' - as an example, I recently tried 
to discuss whether events with probability 0 are possible, i.e., 
if they can actually happen. While the opinion that such events *can* 
happen seems to prevail, I think that the opposite POV is defendable. 
(what do you think, BTW?)
Ladislav:
25-Jan-2012
However, it is even possible to have an unorthodox POV when some 
events with probability 1 are considered. For example, the "orthodox 
probability" states that when picking up a random number from the 
[0;1] interval you obtain an irrational number with probability 1. 
Once again I find it defendable to disagree.
Pekr:
26-Jan-2012
I like Wikipeia - for me, it is kind of psychological. I was e.g. 
looking at ARM gfx chip options. I orientiated myself thanks to Wikipedia, 
learning about PowerVR, Adreno, Mali, , their history, list of companies 
using those chips, etc. When I want white papers, I can visit target 
company websites, but Wikipedia provided me quickly with the interconnecte/related 
info, so I got my overview of the situation rather quickly. And that' 
it - it would be much harder imo to just search for a bits of info 
here or there ...
Geomol:
26-Jan-2012
I agree, Pekr. I use Wikipedia a lot the same way. To get a quick 
overview, and as Reichart say, to be able to begin to ask the right 
questions.


I also often use the external links and references at the bottom 
of most pages.
37101 / 6460812345...370371[372] 373374...643644645646647