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

World: r3wp

[Core] Discuss core issues

Geomol
28-Jul-2007
[8546x2]
Is it the language, that specify, what you are? With REBOL I think, 
it's possible to be a script writer, a programmer, a developer, a 
designer, an inventor, a tester, etc.. Doesn't it depends on the 
task or job situation, where you use REBOL?

Like there are many different jobs, where you need good english (language) 
capabilities.
I normally call myself a system developer or just developer, because 
I do many different jobs with REBOL, and "developer" is a more generel 
term.
btiffin
28-Jul-2007
[8548]
This was in the context of explaining %inhide.r from the rebol.org 
library.  I used programmer.  As in This script helps ensure that 
REBOL programmers know how to hide password input.  It was aimed 
at rebols just starting out.  I usually use rebol to mean  REBOL 
coder but only when I'm chatting to those in the know.  I've tried 
but I can't get my head around the REBOLer expression.  :)
Geomol
28-Jul-2007
[8549]
I guess, the confusion come from back, when the term "script writer" 
popped up first, in the '70 or earlier. Script writers were the ones, 
who wrote scripts (e.g. shell scripts), which were typically small 
pieces of code to be run in the shell on large computers (mainframes). 
Those scripts did operating system maintenance and called programs. 
Programs were written in languages as C, COBOL, etc.. So you had 
a clear distinguish between a script writer and a programmer. What 
we do today with REBOL is more often the programmers job (I think), 
even if it's called a script language.
btiffin
28-Jul-2007
[8550x2]
John;  As part of the cool kids hacker culture, you can't call yourself 
elite, but you're L33t.   Or in REBOL speak; guru.   Another name 
that you can't really call yourself, without someone else tagging 
you first.  So there you go, your tagged.   Then again, maybe I'm 
not worthy...I do have my sights set on attaining Bogus status someday. 
 :)
Yep agree.  It's a blurred line now-a-days.  While I was watching 
a group of C++ programmers p#$$ away some 30 million dollars my poor 
little Tcl/Tk prototype just made them mad.  "Not engineered if it's 
scripted!!!"  :)  Oh well, the original Forth system is still in 
production and corporate will try to replace it with a engineered 
solution...usually started with CASE tool cloud diagrams.
Geomol
28-Jul-2007
[8552]
What is hidden in the term "engineered"? What do they mean, when 
they say "it's not engineered" or "need an engineered solution"?
Henrik
28-Jul-2007
[8553]
geomol, probably a different word in this context for "not invented 
here"
btiffin
28-Jul-2007
[8554]
Umm, I think it means they don't get a chance to overthink the problem. 
 Now to be honest, large projects do need a good work breakdown and 
management back end, but the coding usually ends up far too complicated 
to ever get off the ground (in my somewhat limited experience - I 
only watched them fail 5 times so far).  And polyFORTH keeps chugging 
along... and again in a little defense of corporate...they have very 
few L33t's that can handle poly.
Geomol
28-Jul-2007
[8555]
I think, you're ok with in general calling the authors of REBOL programs/scripts 
for "REBOL programmers" or "REBOL developers". In most cases it's 
more correct than the term "script writer", as I see it.
btiffin
28-Jul-2007
[8556x2]
Fair enough.  I'll avoid the expression in the library docs.
Ok, next one.  I'm thinking about quit/halt.  If a script is started 
from the console with do,  it should halt to the console right?  
If started from an icon click or a shell command it should quit? 
 Or do people mind just restarting up another REBOL console when 
an app quits on them?  Or other way round, an app started with an 
icon click should never halt, correct?
Geomol
28-Jul-2007
[8558]
Started from console, and it should just halt. I get this wrong sometimes 
myself. It could be good to have an equal way of doing this, so please 
tell me, when you find a good way! Standards! (It should also work 
equally on all version of REBOL on all platforms.)
btiffin
28-Jul-2007
[8559x2]
I'm using  system/options/script  - it is only set if a script is 
started up along with REBOL.  I was thinking of posting a   cease 
 idiom.   It is kind of a pain to do a script that quits, but on 
the other hand, I don't think that in the general case, a script 
started from an icon should ever halt, so quit seems to be a better 
'default'.
Inconvenience to coders doing console work but safer for users running 
scripts.
Geomol
28-Jul-2007
[8561]
Would it work, if scripts always use QUIT, and then when in a console, 
we redefine QUIT like:
>> quit: :halt
btiffin
28-Jul-2007
[8562]
I like that idea.  %user.r could check if system/options/script is 
set (maybe).
Geomol
28-Jul-2007
[8563]
HALT is then only used in situations, where scripts should return 
to the console, nomatter if it was started from the console or the 
desktop.
btiffin
28-Jul-2007
[8564]
I'd buy into that.  Now can someone wield a big enough stick? :)
Henrik
28-Jul-2007
[8565]
what is the official definition of an action! ? I keep forgetting 
the difference between actions and natives.
Geomol
28-Jul-2007
[8566]
If I remember correctly, an action is some kind of a wrapper, that 
can handle different datatypes. In practise, they work like a native.
Henrik
28-Jul-2007
[8567]
for the user, it has no meaning to know the difference between natives 
and actions?
Geomol
28-Jul-2007
[8568x2]
I don't think so. Someone explained actions in here some time ago, 
I think.
I found this quote: "action values are native code, just invoked 
through type-specific indirection"
Henrik
28-Jul-2007
[8570]
mmm... okay :-)
Geomol
28-Jul-2007
[8571]
Let's take an example. ADD is an action! It can be used with many 
datatypes. Two of them:
>> add 1 2
== 3
>> add 1 2x3
== 3x4

So ADD is probably an action because of the way, it's internally 
written. I've found, that many actions have to do with numbers. Try:
>> ? action!
Henrik
28-Jul-2007
[8572]
yes, a lot of them also has "Returns TRUE..." in their help text
Geomol
28-Jul-2007
[8573x2]
I don't think, the programmers have to worry about actions, and therefore 
you can say, they're confusing. Calling them all natives would be 
ok with me.
Most (all?) of the ones returning TRUE is the "...?" words. Then 
it might be strange, why not all "...?" words are actions. See:
>> ? "?"
Henrik
28-Jul-2007
[8575]
well, value? is a native, because it only accepts word! ?
Geomol
28-Jul-2007
[8576x2]
That some of them are functions can be explained (they're mezzanines). 
But some of them are natives, which is strange to me.
input? is also a native.
Henrik
28-Jul-2007
[8578]
hmm.. script accepts multiple datatypes. I don't think it's about 
that. It's probably only about how it's implemented internally.
Geomol
28-Jul-2007
[8579]
Can you find an action, that only take one type of data? :-)
Henrik
28-Jul-2007
[8580x3]
the full quote from earlier:


action values are native code, just invoked through type-specific 
indirection. APPEND would likely be an action value because its implementation 
would be different for each type you are appending to.
I think it's purely an implementation issue. If APPEND in R3 was 
a native rather than an action, it would not be able to use as many 
types as arguments as it does.
and APPEND in R3 is an action, so Brian is right there.
Gabriele
28-Jul-2007
[8583x3]
LOL, so it's me that defines whether rebols are "programmers" or 
not? :)
indeed, difference between native and action is how it is implemented.
actions are implemented as "methods" for the datatypes. natives are 
more like normal C functions.
Henrik
28-Jul-2007
[8586]
I'll write that in my blog post :-)
btiffin
28-Jul-2007
[8587x2]
Has anyone ever written a version of clean-script.r that will (attempt 
to) pretty print at email safe 80 column limits?
Geomol;  The  quit: :halt works...as long as you are used to typing 
"q" to leave the console.  Otherwise you get stuck trying to actually 
quit.  I think there is more thinking...
btiffin
29-Jul-2007
[8589x2]
Ok...is there a function that emulates the behaviour of flowing through 
a script?

Outter.r
rebol []


while [true] [print "calling inner" do %inner.r  print "called inner"]

Inner.r

rebol []

if confirm "Quit? " [quit]
if confirm "Halt? " [halt]
if confirm "Break? " [break/return 10]
print "Bottom of inner"


The only way I can get outter.r to continue the while loop is by 
answering No to all the prompts and flowing through.  I'm questing 
for a way to get out of a do'ed script without breaking outter and 
recoding the whole inner script to have it flow through.  I'd like 
to be able to use do and not launch or call.
Thanks gentlemen;  Found a solution.  catch and throw.
outter.r

while [true] [print "doing inner" catch [do %inner.r]  print "done 
inner"]

inner.r
rebol[]
if confirm "Throw? " [throw "some value"]
print "Bottom of inner"


And with /name, why I think I'll write spaghetti.r    Just kidding. 
 rebols don't cook spaghetti.
Gregg
29-Jul-2007
[8591]
I don't know of a width-limited formatter, but it would be a good 
thing to have.
btiffin
29-Jul-2007
[8592]
Gregg; I started mucking with it.  The first blaring implication 
is splitting comments...it means actually modifiying the source.
Gregg
29-Jul-2007
[8593]
Yes, that's the first problem I see as well.
Henrik
31-Jul-2007
[8594]
when doing a read/part http://www.somewhere.com500


does it really only read the first 500 bytes, or does the server 
deliver everything and REBOL just cuts it down to 500 bytes client 
side? it seems to take an equal amount of time to read 500 bytes 
and 100 kb.
Graham
31-Jul-2007
[8595]
it reads everything