r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

MichaelB
3-Feb-2006
[3354]
what do you mean ? (you don't need to copy yourself - thus saving 
a word?)
Volker
3-Feb-2006
[3355x2]
No, if there isnt mentioned "it returns a copy" better expect it 
does not..
WHich is rarely, so it is easier to add the few "it copies" then 
the lot "it does not"
MichaelB
3-Feb-2006
[3357x2]
ok, only problem I have is that in real world situations one can't 
think about everything and starting to copy everything everywhere 
just to be safe is no solution
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
[3359]
Dont take me serious, i am sarcastic! Although i don't know a good 
general solution for this copy-thing.
MichaelB
3-Feb-2006
[3360x2]
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
yes I understand - I just don't know a good solution either
Volker
3-Feb-2006
[3362x2]
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?
( i am away, cu)
MichaelB
3-Feb-2006
[3364]
bye
JaimeVargas
3-Feb-2006
[3365]
This is what I called gotchas.
Henrik
5-Feb-2006
[3366]
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
Volker
5-Feb-2006
[3367x3]
!>>error? [()]
== false
!>>unset? ()    
== true
!>>attempt[() true]
== true
!>>attempt[1 / 0 true] 
== none
Anton
6-Feb-2006
[3370]
if error? set/any 'err try [do %script.r][print mold disarm err]
DideC
6-Feb-2006
[3371x3]
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]]
the 'path word is local to ctx-req-dir context and the Rebol path 
must not be changed by it. It's up to the "user code" to change it 
if he wants to.
But I agree that Rebol should check if path is "complete" (trailing 
"/") before using it in read/save/load/... functions
Pekr
9-Feb-2006
[3374x4]
I have got question from Bobik, to which I don't know answer ... 
I tracked the problem, but dunno why it is as it is :-)
blk: [1 false]

if blk/2 [print 123]
he was wondering, why it is true .... I found out after checking 
the type? blk/2, which is - word! .... my question is why it is word! 
and not logic! ?
blk/1 is integer!, why false here is not logic! ? anyone? thanks 
:-)
Sunanda
9-Feb-2006
[3378x2]
blk: reduce [1 false]   ;; to correctly evaluate the block contents
I guess it's analogous to:
  blk: [1 make object! [a: 1]]
  print blk/2
      make
Ashley
9-Feb-2006
[3380]
blk: [1 #[false]]
Pekr
9-Feb-2006
[3381x2]
ok, thanks ... I think now I understand ... yesterday I read about 
Haskell and functional languages ...
Bobik used str: "[1 false]" val: load str ... so basically, he "executed" 
(evaluated) string, he got block, but he forgot to do the same for 
block content - so here reduce comes in the play ...
Sunanda
9-Feb-2006
[3383]
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!
Pekr
9-Feb-2006
[3384]
I wonder if not being strongly typed (as Haskell claims they are), 
does not lead to almost untrackable bugs ... yesterday, working with 
debugger with our Ubicom CPU, I started to wodner, how we can live 
without the debugger in REBOL :-(
MikeL
9-Feb-2006
[3385]
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
[3386x2]
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.
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
[3388x2]
debugger? does a tool like this exist for REBOL? http://www.hmkdesign.dk/rebol/reblog/reblog.html
it's practically automated testing and probe on serious steroids 
:-)
Sunanda
9-Feb-2006
[3390]
Looks great!
Any release date?
Henrik
9-Feb-2006
[3391]
I could release it now, but it's very, very buggy and it's not shielded 
from the program context
Sunanda
9-Feb-2006
[3392]
You need to decide if you have the time now to deal with the bugs 
people will issue.  If not, wait til it is more stable.
Henrik
9-Feb-2006
[3393x3]
http://www.hmkdesign.dk/rebol/tester/tester.r
consider it a flimsy prototype. requires list-view.r to be in the 
same path as the script
please don't submit suggestions or bug reports at this point
Pekr
9-Feb-2006
[3396x2]
heh, cool :-)
Henrik - wrong link to list-view on the above reblog.html .... /reblog/ 
in the path should not be there ...
Gabriele
9-Feb-2006
[3398]
true and false - just use mold/all or save/all.
Pekr
9-Feb-2006
[3399]
well, imo Bobik has this block as some result of form field get-values 
function :-)
Gabriele
9-Feb-2006
[3400]
is the user typing true and false in?
Pekr
9-Feb-2006
[3401]
dunno, would have to ask him, once I catch him on icq ... but - I 
think it is OK, I explained to him why he needs to reduce the block 
...
DideC
9-Feb-2006
[3402]
Henrik: just for info, there is CSS styles junks at the top of some 
pages like this one (in IE6 almost) http://www.hmkdesign.dk/rebol/reblog/files/category-3.html
Volker
9-Feb-2006
[3403]
#[true] etc.