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

World: r3wp

[Linux] group for linux REBOL users

Ladislav
9-Apr-2007
[1313]
Max, why don't you use LOAD in PARSE, if you want to? Example:

rule: [
	(result: make block! 0)
	any [
		[
			; trying to load
			pos: skip (
				next-rule: either error? try [
					set [value pos] load/next pos
				] [[end skip]] [[:pos]]
			) next-rule |
			; load didn't succeed, using something else
			copy value skip
		]
		(insert/only tail result get/any 'value)
	]
]

>> parse "1 2 a, 3" rule
== true
>> result
== [1 2 "a" "," 3]
btiffin
9-Apr-2007
[1314]
James; Thanks.  I'm still leaning toward cheap Z22s.
Maxim
9-Apr-2007
[1315x2]
well, its not that we can't right now... like you show, load can 
be called anywhere.


 (though I am going to admit I would not have figured out such an 
 elegent way to do it, *I* am not yet able to use the force... <ahem> 
 parse with such skill, MASTER JEDI  ;-) ... 


but did you see how much is needed to make that work and the twist 
of redefining a rule within the evaluated expression?  parse is supposed 
to scream in speed... having a load directive integrated would be 
MUCH faster IMHO, and would be MUCH simpler for the new guys on the 
block and us oldies too...  try to explain the above to the average 
joe and well... there goes the parser...  I only 'SEE' your example 
cause I've become able to fit parser in my mind, and I realize that 
even within the advanced REBOLer crowd... not everyone really grasps 
the parser...


one question though, does the set [value pos] define the word globally 
even if the entire above code is within a context which has a value 
and pos defined?
(and thanks for the example, I might just use it :-)
Ladislav
9-Apr-2007
[1317x2]
does the set [value pos] define the word globally
 - normal REBOL, so, if you use e.g.

use [result next-rule pos value] [
   rule: ...
]

then the variables are local, of course
twist of redefining a rule...

 - that is just to "tell PARSE" whether the paren operation succeeded 
 or not - [end skip] is failure
Graham
11-Apr-2007
[1319]
Often if you're running a script and you need to send an email, you 
can just use send.  But sometimes that doesn't work for various reasons 
.. like the internet connection being down.  So, I was wondering 
if it makes more sense to hand the email over the mail transport 
agent on your linux system.
Gabriele
11-Apr-2007
[1320]
if you have sendmail/postfix/whatever installed, just use localhost 
for your smtp in set-net.
btiffin
11-Apr-2007
[1321]
Max;  The Debian definition of "Free" is very very particular.  The 
DFSG allows for no strings attached.  The Mozilla team has placed 
copyrights on FireFox(tm) so, the Debian team wrestled with it and 
came up with Ice Weasel.  It's kinda dumb, but the DFSG is our friend. 
 If it comes from Debian Main, there are 'no strings attached'.
Maxim
11-Apr-2007
[1322]
so is it gpl or even freerer?  like bsd/mit ?
btiffin
11-Apr-2007
[1323]
GPL.  Extra Crispy GPL.  :)
Maxim
11-Apr-2007
[1324]
hum GPL itself is more like a 50 ton capable steel  cable when compared 
to a string.
btiffin
11-Apr-2007
[1325]
Other than Public Domain, I don't think there is a freer license. 
 Except for the fact you aren't free to restrict access to any stuff 
based on GPL...so freedom from / freedom to arises here.
Maxim
11-Apr-2007
[1326]
mit/bsd are freer in the sense where they do not remove your liberties 
about how you distribute your code.
btiffin
11-Apr-2007
[1327x2]
Yeah.  Agreed.
I may be wrong, but IIRC, Richard Stallman's original license had 
wording that you were not allowed to stop people from trying to 'steal' 
stuff based on the license.  :)
Maxim
11-Apr-2007
[1329x2]
but an mit/bsd license derived product can *become* close source 
in time... whereas a GPL-derived product cannot... but there is nothing 
stopping the "original" copyright holder to release further versions 
closed source.
MySQL being a good example.
btiffin
11-Apr-2007
[1331]
I don't know, I like the GPL, but it is definitely a 'headspace' 
issue.
Maxim
11-Apr-2007
[1332]
so even GPL does not guaranty long-term "freeness" from the original 
author.
btiffin
11-Apr-2007
[1333]
Nope.  Copyrights stay.  A good thing in my opinion. Again 'headspace'.
Maxim
11-Apr-2007
[1334x2]
that's the thing about public domain  :-)  no more rights, as free 
as a rock on the moon.
(if you can get one ;-)
btiffin
11-Apr-2007
[1336x2]
BSD is a respectable license.  But the GPL does not stop anyone from 
commercializing, it's just that you can't stop the next guy from 
giving the stuff away  for free.
Humans will get it figured out someday...spirit versus letter...
Maxim
11-Apr-2007
[1338x3]
my take:   GPL protects against the big guys, BSD allows easy industry 
adoption.  What I realise with time is that original copyright owners 
usually get the credit (and the consultation) and forks rarely really 
live on, unless the original is not supported directly.
look at wireshark... a very good example.
in any case, licensing is never perfect, whatever the license !
btiffin
11-Apr-2007
[1341]
Yep.
Graham
13-Apr-2007
[1342x3]
I want cheyenne to run up on start up.
I changed my /etc/rc3.d/S99local to call cheyenne.r but now although 
it starts up cheyenne.r, I now don't get to the Gui login for fedora 
...
do I need to return some value, or run cheyenne with some options 
?
Micha
13-Apr-2007
[1345]
i need help  . how I start   rebol cgi script  http://adam.hosting4clans.net/test.cgi
 - receives error : User Error: REBOL: Cannot connect to X server 
** Near: size-text self
Pekr
13-Apr-2007
[1346]
hmm, you probably don't have x-windows installed/running? You try 
to use View stuff, which links to x-windows libraries ... but I know 
little about it ...
Sunanda
13-Apr-2007
[1347]
If you are trying to run a CGI, best to do it with Core, not View
Looks like your script *has* started, but fails.
Micha
13-Apr-2007
[1348]
Core not load image.png
Pekr
13-Apr-2007
[1349]
Sunanda - yes, but he is evidently trying touse view related functionality
Graham
13-Apr-2007
[1350x3]
you can't use view as cgi unless x-windows is loaded
and it won't be normally ... most servers run at init 3
not at run level 5
Sunanda
13-Apr-2007
[1353x2]
Petr,  that's not always a good idea as View wants to install itself 
more thoroughly than Core
And may need elements that a server lacks.
Graham
13-Apr-2007
[1355]
Sunanda, there are command line options to not install aren't there?
Pekr
13-Apr-2007
[1356]
yes, there are. But IIRC, in cgi-mode, you would be able to use some 
basic face command functionality, but I am not sure now ....
Sunanda
13-Apr-2007
[1357]
Graham, Ah, yes: maybe he lacks the -cs on the shebang
Pekr
13-Apr-2007
[1358]
maybe that should be addressed somehow in the future? The question 
is, if it is easily solvable. OTOH even php has some imaging modules.
Graham
13-Apr-2007
[1359]
just use core to call imagemagick
Gabriele
13-Apr-2007
[1360x2]
view functionality for cgi = Command.
Graham, that sounds a bit strange, however, i would rather add a 
new start/stop script for cheyenne rather than put it in rc.local.
Graham
13-Apr-2007
[1362]
I'll give it a go ...