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

World: r3wp

[!REBOL3-OLD1]

BrianH
7-Feb-2009
[10712x4]
The trick is that it is harder to write and optimize parse code, 
so it can get really slow without you understanding why. The downside.
It gets complicated.

 It gets more complicated with R3, since R3 has made most of the previously 
 mezzanine loop functions native. This means that FORALL and FORSKIP 
 are faster than FOREACH in R3, while they are much slower in R2.
LOOP is still the fastest though :)
Paul, it looks like that ANY+ function has potential, with some tweaks.
[unknown: 5]
7-Feb-2009
[10716x2]
Yeah, that is my hope that some of those spark some interests.  Feel 
free to add comments on the site as well or updates to the functions 
that you feel could be more beneficial.  The goal of that thread 
was really to open the discussion of mezzanines and how to improve 
them.
ALTME is not the best medium for that type of  effort.  The forum 
remains with some clean code and examples.
BrianH
7-Feb-2009
[10718]
Don't forget to bring up the most general of your library functions 
that would get the most use in the Idioms group.
[unknown: 5]
7-Feb-2009
[10719x2]
My favorite one there is the evals function.
Your talking about on RebDev?
BrianH
7-Feb-2009
[10721]
Yeah. This kind of discussion is the whole point of R3 chat.
[unknown: 5]
7-Feb-2009
[10722x2]
RebDev is not user-friendly enough for me yet.
I know how to move in it but it is just a pain compared to alternate 
methods.
BrianH
7-Feb-2009
[10724x3]
I was wondering why you weren't invollving yourself in the conversation. 
Functionally it is much better than AltME, though the UI sucks.
Still some missing features though.
In theory the new logic! for R3 will solve the same problem that 
EVALS solves, but logic! flags doesn't work too well yet.
[unknown: 5]
7-Feb-2009
[10727]
Really, that is it.  I think there would be much more involvement 
if the UI was much better.  I think the problem is that Carl is still 
in honeymoon stage with RebDev and doesn't yet understand how much 
work is still really needed to get it embraced.  At this point I 
think ALTME is far better medium than RebDev.
BrianH
7-Feb-2009
[10728]
AltME is horrible for useful, focused discussions. No threading, 
no subtopics, no moderation. R3 chat is already better for that.
[unknown: 5]
7-Feb-2009
[10729x3]
Evals could be improved dramatically to be a very cool function.
Well in a sense ALTME has as much threading as RebDev by the means 
of groups.
I still think a better solution would be a darknet forum that way 
Carl doesn't have to worry about spammers.
BrianH
7-Feb-2009
[10732]
Not really. The lack of moderation is the real killer though - you 
can't move or delete messages when they are off-topic in AltME.
[unknown: 5]
7-Feb-2009
[10733]
Yeah but that can be resolved by careful inclusion of the darknet 
members.
BrianH
7-Feb-2009
[10734]
In theory, the ranking of R3 chat can be used to get rid of spammers.
Chris
7-Feb-2009
[10735]
Is 'dirize/off an option?
BrianH
7-Feb-2009
[10736]
Chris, yes, but that would double the code of DIRIZE and add refinement 
checking overhead to every call, so the effect is worse.
Chris
7-Feb-2009
[10737x2]
Assuming 'dirize asserts a state on a file (dirized or not).
It's one logic check vs. an extra function.
[unknown: 5]
7-Feb-2009
[10739]
Brian, that is the way I like to see you thinking.
BrianH
7-Feb-2009
[10740]
Dirize only works on the file! value, not the file referred to by 
the file! value. It would be adding one logic check plus the entire 
contents of an extra function. The code added would actually be more.
[unknown: 5]
7-Feb-2009
[10741]
Always think of the impact of a function regardless of size when 
it is done in a large loop.  All of those extra checks add up.
BrianH
7-Feb-2009
[10742]
Yup. That's why they have me work on mezzanines :)
[unknown: 5]
7-Feb-2009
[10743]
hehe
Chris
7-Feb-2009
[10744]
It's also one less function to learn.
BrianH
7-Feb-2009
[10745x3]
Adding an option to a function that changes its behavior makes it 
harder to learn than a seperate function. The only thing you have 
to remember with a new function is the name. You have to do refinement 
processing in your head too, remember :)
It's easy to learn simple functions, but hard to learn complex ones.
Of course it takes a lot of work to make a function simple to learn 
and use.
Chris
7-Feb-2009
[10748x2]
dirize: func [file [file! url!] /off][
	file: back tail file
	either file = %/ [
		all [off remove file]
	][
		any [off append file %/]
	]
	head file
]
I guess it's a bit wordy.
BrianH
7-Feb-2009
[10750x2]
You forgot the copy, but that is a good alternative.
It's slower (one more compare). We'll have to see which one is chosen.
Chris
7-Feb-2009
[10752x2]
It also shifts the index twice, whether the function needs it or 
not.
Three times, sorry : )
BrianH
7-Feb-2009
[10754x2]
The one compare is dwarfed by the copy overhead though. Shifting 
the index only has significant overhead for ports, not series.
The list! type is gone from R3, and that was the only type with index 
overhead.
sqlab
7-Feb-2009
[10756]
dirize: func [file [file! url!] /off /local l][
	l: last file
	either l = #"/" [
		all [off remove back tail file]
	][
		any [off append file %/]
	]
	file
]
that should be a little bit faster
Chris
7-Feb-2009
[10757x4]
; Might also be faster than mine:

dirize: func [file [file! url!] /off][
	file: back tail file
	all [
		file = %/ = off
		either off [remove file][append file %/]
	]
	head file
]
(again, no copy)
Hmm, maybe not.
The pitfalls of none vs. false.
sqlab
7-Feb-2009
[10761]
dirize: func [file [file! url!] /off ][
	file: copy file
	either #"/" = last file [
		all [off remove back tail file]
	][
		any [off append file %/]
	]
	file
]