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

World: r3wp

[Core] Discuss core issues

Steeve
19-Feb-2007
[7240x3]
use braquets
if (find tempLine "//Database ")  <> none [ print "Here" print line 
 ]
and remove (<> none), it's useless
CharlesS
19-Feb-2007
[7243]
argh , cant wrap my head around these damn precendence rules
Steeve
19-Feb-2007
[7244]
if find tempLine "//Database "  [ print "Here" print line  ]
CharlesS
19-Feb-2007
[7245]
can you explain why the brackets work ?
Steeve
19-Feb-2007
[7246x3]
because "//Database " <> none is first evaluated
return always true
so, in realty , you do a find templine true
CharlesS
19-Feb-2007
[7249]
and why is that evaluated first, I thought things were left to right 
?  YOu know where in the manual i can re-read this ?
Steeve
19-Feb-2007
[7250x4]
no
all op! are evaluated first
i don't no for the manual
*know
CharlesS
19-Feb-2007
[7254]
thx for your help -- the manual desperately needs a search function
Brock
20-Feb-2007
[7255x3]
CharlesS, if you changed the equation to;
if none <> find tempLine "//Databases" [...] this would also work.
the find in this case would be evaluated first, prior to the op!. 
 Unfortunately I don't know where I read this but I know i've seen 
lots of code where the equation portion of the condition is followed 
by the condition itself  ie, if 2 = 5-3 [do this].  It's backwards 
to what you would expect, but follows with the right to left evaluation 
that occures.
Gabriele
20-Feb-2007
[7258]
PATH is just not supposed to be used :) it is there by mistake afaik.
Rebolek
20-Feb-2007
[7259]
it's there so we've got something to fiddle with and don't ask about 
new releases too much ;)
Gabriele
20-Feb-2007
[7260]
;)
Pekr
20-Feb-2007
[7261]
I wonder what is 2.7 good for, as R3 official release is at DevCon, 
and it is less than 3 months? ;-)
Gabriele
20-Feb-2007
[7262]
i guess people won't start using r3 in production that soon.
Rebolek
20-Feb-2007
[7263]
Pekr it's official preview and not release
Pekr
20-Feb-2007
[7264]
how comes? Official alpha was supposed to be out 3/4 year ago :-)
Rebolek
20-Feb-2007
[7265]
maybe R3 is little bit delayed because 3D Realms addopted it as a 
main programming language for Duke Nukem Forever? ;P
Maxim
20-Feb-2007
[7266]
I think R3 is not really delayed... I think the plan has simply changed, 
and this time Carl is finally working at delivering what he promised 
at devcon 2004.  He might have realised that its a little bit more 
work to make something so open... you can't hide the ugly things, 
so I'm pretty sure he is doing a lot of cleaning up...  and we have 
been hearing about the fact that this time, view isnt' being left 
behind...
Pekr
20-Feb-2007
[7267x2]
Rebolek :-)))
Maxim - hopefully you are right!
Rebolek
20-Feb-2007
[7269]
I'm OK with R3 release date, but just couldn't resist to make that 
dukenukem joke :)
Pekr
20-Feb-2007
[7270]
rebpro does not contain core stuff? so no decode-cgi for e.g.?
Maxim
20-Feb-2007
[7271x2]
you mean rebol/view pro?
or some sdk build?
Pekr
20-Feb-2007
[7273x3]
no, rebpro I placed on server .... as I needed library access, but 
this time it does not contain decode-cgi, uh, I will have to generate 
my own rebol.exe with features I want?
I vote once again for pad function!
I just needed very simple function, which will return me 20070220 
... so I want to write something like:

join now/year [padl now/month "0" 2 padl now/day "0" 2]

Instead of writing some stupid 'either lenth? code ...
Henrik
20-Feb-2007
[7276]
>> 0.0002
== 2E-4

It may be old, but how do you avoid this conversion_
Pekr
20-Feb-2007
[7277x2]
we have other trivial mezzanines, why not something like 'pad? Who 
writes the simplest code for me ;-)
yes Henrik, that is just another "stupidity"
Rebolek
20-Feb-2007
[7279]
put it in challenge :)
Henrik
20-Feb-2007
[7280]
pekr, I vote for pad too, only because I've written that function, 
oh, about 50 times now.
Pekr
20-Feb-2007
[7281x2]
I had function somewhere, parsing E-+value, and generating string.
maybe it is how Jaime wrote - we need print/form dialect ....
Henrik
20-Feb-2007
[7283]
Well maybe we do, but is that the REBOL way to do it? pad is very 
simple
Pekr
20-Feb-2007
[7284]
simple, often needed, should be added - is that simple as that? :-)
Henrik
20-Feb-2007
[7285]
simple might grow complex enough if you study it closer. I was completely 
surprised at the INC/DEC discussion. :-)
Pekr
20-Feb-2007
[7286]
yes, e.g. padding in the middle of existing series - pad-left, pad-right 
:-)
Henrik
20-Feb-2007
[7287]
one can say, what do you need to pad? it's usually only numbers, 
right? that would narrow down datatypes required to be handled.
Maxim
20-Feb-2007
[7288x2]
pad can also be used to left, center, or right justify strings ... 
my fill (pad) functions allows all variations on string! & number... 
a zfill is just a preset using the "0" char as the pad.  it even 
has a truncate refinement when you need the output to be *exactly* 
the specified length, even if it would be larger than what you ask.
the scientific notation is a side-effect of window's use of IEEE 
floating point libs.  for some reason, on windows, the output is 
automatically converted this way... I have seen this in other apps 
on windows too.  converting to/from a nice decimal would probably 
take too much time.