• 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: 27501 end: 27600]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Henrik:
31-Jan-2006
well, I use a structure like this:

<word>: [
  <id> make object! [
    <word2>: [
      <id2> make object! [
        <word3>: [<id4> <id5>]
      ]
      <id3> make object! [
        <word4>: [
          <id6> make object! [
            <word5>: [<id7>]
          ]
        ]
      ]
      <id4> make object! [
        <word6>: [<id8> <id9>]
      ]
    ]
  ]
]
Henrik:
31-Jan-2006
a word relates to one or more values which relate to more words which 
can relate to more values
Henrik:
31-Jan-2006
then I have a function that asks for a specific relation by diving 
down a path with a block like: [customers 1234 invoices 45 articles 
15] to find customer 1234 who has invoice 45 which holds article 
15

then there is a function to add and remove relations
Henrik:
31-Jan-2006
there are a few bugs left, but they are easy to fix
Henrik:
3-Feb-2006
most bugs seem to be fixed now. I made a little release on http://www.hmkdesign.dk/rebol/

the question is whether this is useful to anyone :-)
Anton:
3-Feb-2006
See how it performs for a little while, first... :-)
MichaelB:
3-Feb-2006
this might be something dangerous:

write %test.r "hello"
path: what-dir
remove back tail path
write %test.r "hello" ; this fails


problem is: what-dir returns directly system/script/path what seams 
to be used in order to resolve relative file values

I just recognized it using the request-dir from didec which was in 
the rebgui distro -038 (he's doing this in the request-dir function 
in the line with


if all [not empty? path slash = last path][remove back tail path] 


so question is whether this is a bug and belongs to rambo, is ok 
(I don't think so) or what else ?

might also be that didec changed this in a later version (script 
was dated 2003 and maybe at this time 'what-dir had a different behavior), 
but this doesn't matter regarding what 'what-dir returns
Volker:
3-Feb-2006
So there is no problem. except of the usual "easy to forget copy" 
in Dides case. Hmm, maybe this effect is really hidden, with what-dir 
beeing a function. Easy to expect it copies.
MichaelB:
3-Feb-2006
yes that's what I mean, nothing wrong with rebol, but who guesses 
that this returns a really vulnerable path
MichaelB:
3-Feb-2006
what do you mean ? (you don't need to copy yourself - thus saving 
a word?)
Volker:
3-Feb-2006
No, if there isnt mentioned "it returns a copy" better expect it 
does not..
MichaelB:
3-Feb-2006
I'm thinking more in terms of some normal person (if there is something 
like that) and to me it seams quite a burden to think even about 
such tiny details
Volker:
3-Feb-2006
Dont take me serious, i am sarcastic! Although i don't know a good 
general solution for this copy-thing.
MichaelB:
3-Feb-2006
and in my case it was even worse as I didn't know what happend until 
I stared to examine a outside script pretty closely and step by step 
following what it does
MichaelB:
3-Feb-2006
yes I understand - I just don't know a good solution either
Volker:
3-Feb-2006
maybe it should really be a docu-rule. Forth has some flag-letters, 
like M: multitasking-impact etc. We could have C: copies/not, calls 
wait, what else?
Henrik:
5-Feb-2006
how do you test for a function that returns nothing? I want to DO 
a script, and check if there was an error, but the script might sometimes 
not return anything
DideC:
6-Feb-2006
MichaelB: about the path problem in request-dir, it's a bug in the 
code.


The simple solution is to patch this line (in request-dir func at 
the end of the script :
	if not all [keep path] [path: any [where what-dir]]
like this :
	if not all [keep path] [path: copy any [where what-dir]]
Sunanda:
9-Feb-2006
I guess it's analogous to:
  blk: [1 make object! [a: 1]]
  print blk/2
      make
Sunanda:
9-Feb-2006
It can be annoying because reduce does not have a /deep refinement 
-- so if you load nested blocks, you may need to do a lot of reduces 
to make it work:
   xx: reduce  load " [ false [ true]]"
   == [false [true]]
   type? xx/1
   == logic!
    type? xx/2/1
   == word!
MikeL:
9-Feb-2006
I''ve been caught-22 on that many times since I like to set my ini 
file definitions to be readable blocks and don't follow why other 
data types are correctly recognized e.g. blk: [1 12-feb-2006 $30.00] 
 but not true or false or Yes or No  without a reduce.  If you use 
blocks for the ini file settings you get caught by the reduce  e.g. 
if want this ini: [	clean-up-target-directory? Yes start-at 10:30:01 
first-day-to-run 12-dec-2006 last-day-to-run 31-dec-2006] reduce 
requires me to flag the words as 'words.
Sunanda:
9-Feb-2006
I tend to use nested objects as records stored in files. They suffer 
the same problem.

My solution is a single read function hat runs through reducing things.
Sunanda:
9-Feb-2006
Petr: having only 'trace or inserted 'print for debugging is like 
going back to the dark ages.
Better debugging would be a great step forward.
Henrik:
9-Feb-2006
debugger? does a tool like this exist for REBOL? http://www.hmkdesign.dk/rebol/reblog/reblog.html
Henrik:
9-Feb-2006
consider it a flimsy prototype. requires list-view.r to be in the 
same path as the script
Sunanda:
9-Feb-2006
Thanks Gabriele --- save/all neatly does the job.

No use to me though in several cases -- I support  applications that 
pre-date that refinement and run under older versions of core.
But it'll save me a chore in future apps.
Henrik:
10-Feb-2006
hmm... seems I forgot there are some LIST-VIEW 0.0.29 only functions 
used in Tester. maybe I should do a release soon....
Graham:
10-Feb-2006
Does any one have a tool for examining large objects?   I'm trying 
to find where things are defined in beer, and using an editor to 
browse the port object is not fun.  A sort of anamonitor for objects?
Volker:
10-Feb-2006
first is a port-operation.. Maybe it could use the default-words 
for ports.
Anton:
11-Feb-2006
Graham, anamonitor can examine custom objects, not just the system 
object. You just need to type in a word/path which refers to the 
interesting object.
Anton:
11-Feb-2006
Yep, Anamonitor 2.0, next to the help button, there's a field that 
says "Name or command". Replace that string with "ctx-edit" for instance.
Anton:
11-Feb-2006
That would be pretty cool. Actually, as cool as anamonitor is, I 
don't use it much !  I probably should go exploring in it once in 
a while.
Pekr:
17-Feb-2006
a bug or a feature? ;-) view layout [tl: text-list "" "ahoj" "" "cus"] 
  ... just click on an empty element ....
Sunanda:
17-Feb-2006
Looks like a bug -- can't have a duplicate entry.....Try clicking 
on one of the "cus"s

 unview/all view layout [tl: text-list "cus" "" "ahoj" "" "cus" "cus"]
Allen:
17-Feb-2006
Putting duplicate values in a list is also rediculous.
Brock:
17-Feb-2006
I agree that duplicates wouldn't be normal occurance in a list.  
Maybe a multi-column list would have duplicate values in a column, 
but each additional column should have other elements to make the 
row intself unique.  Again, from a 'list' perspective.
Pekr:
17-Feb-2006
thanks a lot, Brock, that cures list-text pain :-)
Pekr:
17-Feb-2006
imo that is not requirement ot have unique values only possible? 
I know that more than one the same value in one column is a bit weird, 
but still the logic is twisted - it should work upon position, not 
the content ....
Pekr:
17-Feb-2006
he is kind of half a year Rebol novice and it is good to see those 
opinions ... those shared values etc. are REALLY a pain for beginner 
and such small styles bugs make life of mid-level developer (who 
is not fluent with View internals) View XY percent less sutiable 
to do real work ...
Volker:
17-Feb-2006
values for highlighting is much quicker coding than translating to 
indexes. ANd for the other stuff, a selfmade list is not that much 
code. although complicated.
CharlesW:
20-Feb-2006
Can anyone tell me if there are any efforts to embed core into a 
device or embedded controller. Given its light size, it would be 
perfect for routers, applicances, etc..
Ryan:
20-Feb-2006
I heard last night that there is a new linksys router that you can 
install linux software into. Of course, REBOL was the first thing 
to come to mind.
CharlesW:
20-Feb-2006
I guess using x86 would simplify things quite a bit from a development 
standpoint. I would assume much more expensive over a rabbit2000 
or similar. Do you know what types of controllers the linksys utilized?
Pekr:
21-Feb-2006
what registry value 'browse refers to? Bobik has some screwed OS 
isntall, after removing FF from his PC, browse does not start IE. 
IE is checked as a default browser, but it still does not seem to 
work ...
Pekr:
21-Feb-2006
ok, solved - there is a button to renew internet related settings 
in control panel/internet settings/programs ...
Geomol:
21-Feb-2006
Well, each of the elements (numbers) in a tuple is an integer from 
0-255. Doing a binary operation with that restriction and an integer 
without that restriction should maybe return none or an error? I 
guess, REBOL is optimized for speed doing this, so the result is 
undefined. (You can probably guess some internal rules/side-effects.)
Anton:
21-Feb-2006
Jaime, were you expecting each value of the tuple to be compared 
with the first 8 bits of a 32-bit integer ?
JaimeVargas:
21-Feb-2006
AND behaves differently than OR and XOR regarding on how they treat 
negative numbers. AND is taking into account as many bits as possible, 
while OR and XOR are just returning a tuple of zeros.
Geomol:
22-Feb-2006
What about, if we started a project to closely investigate the behaviour 
of REBOL native!, action! and op! in relation to the defined datatypes? 
I did something like that in the IOS regarding minimum and maximum 
values for the different datatypes at some time. The idea would be 
to nail down bugs and misbehaviour and lead to a more robust language 
definition. After the initial investigation, the mezzanines could 
be looked at.
Geomol:
23-Feb-2006
An example of a peculiar thing:
>> negate 2 ** 31
== -2147483648.0
>> a: negate to-integer 2 ** 31    
** Math Error: Math or number overflow
** Where: to-integer
** Near: to integer! :value
>> a: negate to-integer 2 ** 31 - 1
== -2147483647
>> a: a - 1
== -2147483648
>> type? a
== integer!
Geomol:
23-Feb-2006
Ah, I just found the explanation!
>> a: to-integer negate 2 ** 31
== -2147483648

It's correct behaviour. Silly me.
BrianH:
23-Feb-2006
Personally, I think it would be worth it to make the tests. There 
have been several times that I have been tripped up by a former bug 
getting fixed, sometimes years prior, and a set of unit tests would 
have kept me informed. Still, I would prefer if any misbehavior found 
would be fixed, not just documented and left to rot.
Anton:
23-Feb-2006
I often thought it would be nice to see the history of a function. 
That is, which version of rebol it first appeared in, if there were 
any changes in any subsequent versions etc.
BrianH:
23-Feb-2006
Plus, the unit tests would serve as documentation of a function's 
behavior, intended or not.
BrianH:
23-Feb-2006
Anton, your function history sounds like a great idea, although I 
would add parse behaviors to that list.
Anton:
23-Feb-2006
Unit tests will have to be rebol version dependant. Eg. A set of 
unit tests developed on Core 2.6 for the PRINT function may all pass 
on Core 2.6, but not on Core 2.5.  Recording the rebol version also 
captures the date and platform where the tests were developed.
Geomol:
23-Feb-2006
Uhh yes, testing a vocabulary huge and multi-platform language as 
REBOL is a big task. But interesting aspects (like the history), 
as you point out.
BrianH:
23-Feb-2006
I'm thinking more like keeping track of a few things:
- Proper behavior, and version when such behavior was achieved
- Changes in expected behavior

So there would be two sets of versions, the versions of REBOL and 
the versions of the tests. Over time, both REBOL will be fixed and 
the tests will be fixed, refined or altered. This could get pretty 
big pretty quickly I suppose - it could use a database to store the 
tests or some such.
Anton:
23-Feb-2006
It would be good to be able to answer a question like this: "Do the 
functions: [print parse encloak] exist and behave the same on Rebol/Core 
2.5 and 2.6, and Rebol/View 1.2.1 and 1.3.1?"
Anton:
23-Feb-2006
Brian, I think the results can be stored hierarchically, so a filesystem 
storage can be enough, although I'm not sure.
Anton:
23-Feb-2006
I'm wondering if everything can be automated so that there are no 
stored results (because results are in fact derived), so when the 
user asks a question, that's when the tests are run and the answer 
obtained.
Anton:
23-Feb-2006
I've got a text file going with these notes in it, but I think it 
might be better to make a new project in Qtask. Anyone disagree ?
Geomol:
23-Feb-2006
For the resulst of the use of a word, you may need to save the wanted 
output, and the actual output from different platforms (if they differ).
Anton:
23-Feb-2006
Absolutely, but if we have a rebol unit test server constantly running, 
able to answer arbitrary questions, why would we need to store results 
?
Anton:
23-Feb-2006
We could set up a server with as many versions of rebol as possible, 
so it can help as many people as possible, but each of us could also 
run the same system with a more limited set of rebol versions (ie. 
just the ones we bother keeping).
Anton:
23-Feb-2006
Geomol, every one has a different idea, as time progresses, as to 
what is the "reference" platform. Since it will be a collaborative 
effort everyone will be adding input from various sources. Some functions 
are only available on Rebol/Link etc..
Geomol:
23-Feb-2006
So the request to a certain server would be something like: run this 
little test and tell me the result (also if it lead to an error!). 
Could be done easily with REBOL.
Geomol:
23-Feb-2006
I see difficulty in testing something like a block!, because you 
would also have to test blocks in objects and look for possible side-effects, 
or what?
BrianH:
23-Feb-2006
I'm not sure a hierarchy would work here - there are too many dimensions. 
Platform (Core, View, ...), platform (Windows, Linux, ...), version, 
test version, etc. Plus a test version would have applicable platforms, 
expiry both for bugs in the test and for changes in expectations, 
and cached results. I'm thinking of more of a formal test suite here 
than an arbitrary test server farm.
Geomol:
23-Feb-2006
Maybe RebDB could be used in this project? I've no experience with 
RebDB though, so I can't say, if it's suited.

I've done a relational database "NicomDB" as an education project 
2 years ago. It would be suited for this, and I've wanted to push 
it forward for some time. Maybe this is the opportunity? NicomDB 
is used on a webserver in a real application.
Anton:
23-Feb-2006
So it needs a database, and a web interface to be able to make queries 
to that.
BrianH:
23-Feb-2006
The expiry and applicability info would help us distinguish between 
changes in intended behavior, buggy implementations, beta-vs-release 
and such. REBOL changes a lot even if many of those changes are fixes. 
This could act as a compatibility test suite for alternate implementations.
Anton:
23-Feb-2006
Ok.  But this is becoming a very large and complex project. Are we 
really prepared to go through with it ?  I think even if we go a 
short way, the ideas and findings may help someone else come along 
to complete it later. So I think I will make that Qtask project.
Geomol:
23-Feb-2006
Yes, do that as a start. We can move it later if needed.
Geomol:
23-Feb-2006
It's running on a FreeBSD server, so it's pretty robust. It hasn't 
been rebooted since July last summer.
Geomol:
23-Feb-2006
Pekr, no SQL interface yet. I started to do a SQL interface doing 
my education, but didn't finish it. SQL is crap. ;)
Geomol:
23-Feb-2006
Pekr, I'll write you privately, so you can see the NicomDB in action 
in a real application.
Anton:
23-Feb-2006
Ok, created a new Qtask Rebol SIG task, with many notes extracted 
from this discussion in its description. Sitll pretty messy, but 
it's a start.
http://www.qtask.com/details.cgi?project=198&id=38061
Anton:
23-Feb-2006
Having done that, I can't spend much time on it now ! :-(  But it's 
good to get some of these ideas written down, and a few things worked 
out.
Geomol:
23-Feb-2006
It's been a while, since I last used Qtask. Do I need special permission 
to see that project?
Anton:
23-Feb-2006
(Or maybe a Lead such as Reichart needs to approve the task first 
? That might take some time...)
JaimeVargas:
23-Feb-2006
Look at the regression tests implemented in Orca they already cover 
a lot of behaviour.
JaimeVargas:
23-Feb-2006
They can serve as a base to implement the full unit test for Rebol, 
and save time.
Robert:
23-Feb-2006
Isn't there a regression test "suite" for Rebol programs? IIRC someone 
made something like this.
JaimeVargas:
23-Feb-2006
I believe there is a Unit Test framework. But no rebol specific regression 
tests have been written. At least not publicly.
Anton:
23-Feb-2006
I see "John" in qtask and added him as a watcher. (I assume that's 
you Geomol). I can add anybody else in qtask who is interested as 
watchers too.

(Geomol, you will need to accept becoming a watcher first, then you 
should be able to see the page.)
Henrik:
27-Feb-2006
it probably should. could you put it in? I'm a little strained for 
time
Geomol:
27-Feb-2006
yeah, this is from UNIX 'man cal':

The Gregorian Reformation is assumed to have occurred in 1752 on 
the 3rd

     of September.  By this time, most countries had recognized the reforma-

     tion (although a few did not recognize it until the early 1900's.)
Geomol:
27-Feb-2006
It seems, REBOL handle leap years correctly. The rule is, that every 
4. year is a leap year. Every 100 year isn't a leap year though, 
unless it's divided by 400. So 2000 was a leap year, 1900 wasn't, 
but 1600 was. And so on.
Henrik:
27-Feb-2006
I've always thought that consideration for science in REBOL was a 
little low
Brock:
28-Feb-2006
Can anyone help me understand what is wrong below?  I am essentially 
trying to get Rebol to execute a ping or traceroute and record the 
result in a text file....
Pekr:
1-Mar-2006
why this does not work?

  ff: func [a] [str: "a + 1" do str]
>> ff 2
** Script Error: a has no value
** Where: ff
** Near: a + 1
Pekr:
1-Mar-2006
while following does?

>> ff: func [a] [b: a  str: "b + 1" do str]
>> ff 1
== 2
Anton:
1-Mar-2006
Yes, Volker is right, (and I made a spelling mistake.)
Volker:
1-Mar-2006
ff: func [a] [str: "a + 1" blk: bind load str 'a do blk]
Anton:
1-Mar-2006
just   do bind load str 'a
Pekr:
1-Mar-2006
following works:

 >> kontext: context [a: 1 b: 2 c: 3]
 >> do bind [a + b + c] in kontext 'a
== 6
Pekr:
1-Mar-2006
but I first tried:

do bind [a + b + c] 'kontext 


and it did not work. So is 'kontext itself a different context than 
in kontext 'a? :-)
JaimeVargas:
1-Mar-2006
do bind [a + b + c] kontext ;; works.
JaimeVargas:
1-Mar-2006
with: func [object [object!] block [block!]] [
    do bind/copy block object
]


>> kontext: context [a: 1 b: 2 c: 3]
>> with kontext [a + b + c]
== 6
27501 / 6460812345...274275[276] 277278...643644645646647