• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 5401 end: 5500]

world-name: r3wp

Group: CGI ... web server issues [web-public]
btiffin:
25-Jul-2007
Daniel;  Try http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=cgi.r
 for some code.

And http://www.rebol.net/cookbook/recipes/0026.htmlfor a REBOL sample 
solution  and then wait for the rest of the forum members to pipe 
up with 'bigger better' solutions, and they will.  :)
btiffin:
25-Jul-2007
Try this ML thread http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlKVSQ
and some notes by Sunanda on CGI 'safety' 

http://www.rebol.org/cgi-bin/cgiwrap/rebol/art-display-article.r?article=x60
DanielSz:
26-Jul-2007
Thanks, Graham, you hit the right spot. Like you say in your article, 
"Read/Custom sets the port to lines modes, and there is no clean 
way to change this to binary for binary uploads". But that's exactly 
what I need. Which script by Oldes are you referring to? Where can 
I find it? Are you saying that his is doing the job?
Graham:
26-Jul-2007
I used a variant of the http-tools.r script, composed the correct 
header, and then insert the headers, and then switched the port to 
binary before inserting the payload
Volker:
26-Jul-2007
what are you doing? still uploading binary? then use open/insert/close 
and change port to binary if it is open
DanielSz:
26-Jul-2007
I played with Oldes script a bit, didn't get far. I think there's 
no other option than follow Graham's advice and delve in the http 
scheme. I had hoped to find something in the script archive, oh well... 
I saw that even in the Ruby and Python community there's some confusion 
on how to achieve multipart form submissions with CGI. (Python default 
http library also uses  "application/x-www-form-urlencoded" and not 
""multipart/form-data", but there's a library called HTTPFileUploader 
that does the job). Last time I tried to hack the http scheme I wasn't 
so succesful. This time, if I need help, I'll ask for help.
DanielSz:
26-Jul-2007
The script should be able to post a multipart form as described in 
rfc1867. It should be able to post a number of fields, for example: 
Content-Disposition: form-data; name="userid", and finally it should 
be able to upload a file in binary data.
DanielSz:
26-Jul-2007
Graham described what needs to be done (I used a variant of the http-tools.r 
script, composed the correct header, and then insert the headers, 
and then switched the port to binary before inserting the payload). 
Only it's a little a bit above my capacities. In other words, I'll 
need two weeks to do it, if I ever manage it.
DanielSz:
26-Jul-2007
Yeah, I remember some tips you contributed to the rebolzine on posting 
to web forms, way back... Anyway, I think I won't tinker with the 
http scheme, kinda dpressing thought, especially since I have great 
hopes to achieve what I need using curl and the shell capability 
of Rebol. Let curl do that work, afte r all, that's what' it's meant 
to do best.
Graham:
26-Jul-2007
Undocumented .. but basically it took a directory of jpegs and zip 
files and uploaded them to a java based webserver that required custom 
headers
DanielSz:
26-Jul-2007
And the good news is: curl does it flawlessly. I just saved myself 
two weeks of headaches. I am a reboller, but not a purist, if I find 
a better tool to do something, that's cool with me.
james_nak:
30-Aug-2007
Anyone know the answer to this one? 

I have a cgi script that sends an email out. The problem is that 
I want to send to an address that has the same domain name as the 
website but whose mail server is not located there (It's an Exchange 
Server). Any other address works fine as expected. I think it has 
to do with the mx records but, the weird thing is that if I generate 
an email via php, it goes through. Therefore I'm thinking Rebol can 
do it too. 

I've used set-net  for the smtp server and have set it a different 
server completely but still no go.
And I'm in the process of having the MX records changed.
Gabriele:
31-Aug-2007
usually PHP uses the sendmail command directly, not SMTP, so it can't 
be compared unfortunately (ie the fact tha php can send mails does 
not guarantee that rebol can). but, you could use CALL and call sendmail 
directly too if there is no other option.
james_nak:
6-Sep-2007
Thanks all. In the end I switched hosts and their mx records work 
so problem solved.
Rebolek:
18-Sep-2007
Pekr, well they don't have to. Script's permissons are different 
from some random visitor's permissions. Script is local and not remote.
Gabriele:
18-Sep-2007
the scripts have to be in cgi-bin, the interpreter can (and should) 
be somewhere else, where it is not accessible.
Gabriele:
18-Sep-2007
why? ftp access only gives access to cgi-bin? usually, you have your 
own home dir, with www and cgi-bin dirs inside.
Pekr:
18-Sep-2007
because ppl endlessly complain, there are no rebol web-hosts. So 
I thought I might have universal solutoin. Just find yourself web-host, 
which allows cgi scripts, and you are done ...
Gabriele:
18-Sep-2007
afaik, any host that allows any cgi-bin will also allow you to upload 
rebol somewhere not in cgi-bin and then use it.
amacleod:
18-Sep-2007
Any ISP that gives you FTP access to your account and CGI does provide
Pekr:
18-Sep-2007
ah, so I really don't understand guys' point on ML, complaining that 
web-hosts are REBOL unfriendly. I tried with two, and those had no 
problem uploading rebol for me ...
Pekr:
18-Sep-2007
amacleod. And how?
Gabriele:
18-Sep-2007
indeed, i think they are just lazy, and want rebol to work out of 
the box. they just have to upload it. it will work with 99% of the 
hosts right away. and the host should be able to easily solve that 
1% case, unless they are morons and only allow php etc. by policy.
Pekr:
18-Sep-2007
But other hosting my friend has, is just and only his www root ....
Gabriele:
18-Sep-2007
mysql: some hosts only allow socket access and not tcp access to 
mysql (because that's the default config for some distros.) but, 
that's something that they can enable without problems.
amacleod:
18-Sep-2007
I have a rebol view app that I use to acces a MySQL database. I had 
it working  and then ,y ISP decided to add security and no longer 
allow MySQL access unless its a script on the server. Ofcourse they 
did not inform me and it took some time to track down the problem..
Pekr:
18-Sep-2007
That is why I was trying to suggest to rename rebol to some AAAAAAABBBBBBBCCCC 
name, unpredictable, so it will get hardly noticed, even if someone 
would try ... (unless you do some bug and your shabang line gets 
reported back to browser :-)
Pekr:
18-Sep-2007
OK, I feel I miss knowledge on Unix permissions. So if cgi-bin dir 
as a whole has execute bit, everything in there can be executed? 
Hmm, and don't I need execute bit for rebol itself, even if put into 
other directory?
Gabriele:
18-Sep-2007
it's not execute bit of the dir, and it has not much to do with unix 
permissions, it's web server config. normally, web server will only 
execute things from cgi-bin and not somewhere else.
btiffin:
18-Sep-2007
Petr;  DON'T  :)  Suggesting that people try and sneak REBOL past 
sysadmins is a really really really bad idea.  If they can't be convinced 
to try it, then change ISP, or try to convinvce them again.  Don't 
be making REBOL look all cracky.   That is the kind of maneuver that 
could sink the ship.  The rest of us like the ship, and we fly the 
flag of peace and truth, not the Jolly Roger.  :)
btiffin:
18-Sep-2007
My uplink speed kinda (no, it pretty much completely) sucks but I 
offer free hosting to any rebol that wants it at peoplecards.ca. 
 I just ask for patience if a new service needs to be installed while 
I work out kinks and the user needs to know that it's home based 
with a not-so-speedy delivery pipe and I offer little in the way 
of frills; meaning it's sftp or ssh cli, not cPanel or other gui.
Terry:
19-Sep-2007
We fly the flag of peace and truth
.. hummed to the tune of "God bless America"
RobertS:
19-Sep-2007
Is that the tune that  sounds like "God Save The King?"'   If there's 
a sugar maple blight, 'The Maple Leaf Forever' will sound lame ... 
and they'll never see the Eastern Townships annexed by Vermont.  
'CGI'  does stand for 'Chat Gateway Interfarce' doesn't it ?
Maarten:
22-Oct-2007
1) Think multicore
2) think memory is cheap (2Gb per core)
3) Typically,  /Core  consumes 8 mb of memory

4) do not encap, use  amodule management system like my 'require 
or Ladislav's 'include

5) wrt 3 and 4: the OS starts using its disk cache etc. After a few 
hits these operations will be cheap

6) do all session mgt etc in a database => sales up as well, no state, 
share nothing
Maarten:
22-Oct-2007
Now, what happens? The OS will start distributing the CGI processes 
over the multiple cores. Using the disk cache etc to speed loading 
times, enough memory per core on the processor. A 8Gb RAM quadcore 
should be able to run +- 1000 procs/sec (rough estimate). That's 
just one box, with that load it should be profitable. And as you 
obey rule 6, you can scale up and load balance pretty easily.
Gabriele:
23-Oct-2007
petr, the processes are managed by the OS too. *obviously* the os 
will distribute processes among processors. (unless the os has no 
multiprocessor support, that is). distributing threads is more difficult 
(because of the shared memory), however all good threading implementations 
should do it, and if you programs the threads correctly you can get 
the performance boost.
Pekr:
10-Nov-2007
I used fastcgi in the past, wich Apache, under linux. All modes worked 
fine IIRC. However, under windows, the implementation was crippled, 
and only external mode worked.
Pekr:
10-Nov-2007
That REBOL doc should really answer your question. Simply put, in 
External mode, you do something like /path/to/script (that does not 
need to exist) and you direct it to certain, already running REBOL 
process. But - rebol has no tasking, so you have to handle accepting 
connections and multiplexing. It is like with Rubgy - unless you 
are finished, you are not available to other requests ...
Robert:
11-Nov-2007
Maarten, I agree with your observation and you can even scale it 
more.


If you see a web-server as just a request dispatcher to CGIs and 
a fast-answering-machine for user-feedback (pages, forms etc.) you 
just need a small and "simple" one like Cheyenne. The CGIs can be 
distributed to different cores (through the OS) or even to different 
machines (via TCP/IP).
Robert:
11-Nov-2007
As dispatching requests is most likely much faster than processing 
a request, a single web-server should serve a lot of users and a 
bunch of machines do the processing.

This is the coarse grained multi-process approach.
Will:
11-Nov-2007
With Cheyenne you can already have the main httpd process on one 
machine and task-handlers (RSP or whatever) on other machines 8)
Maarten:
24-Nov-2007
I am close to autogenerating fastcgi processes, linked with Lighttpd 
configs and generating automagical includes that match the web server 
config  for encap/Pro.
Maarten:
24-Nov-2007
I am also adding a routing scheme (dialect) so basically you redirect 
all traffic except static stuff to a fastcgi process, it comes in 
the router and then it checks on extension or path (REST) what to 
do.
Maarten:
24-Nov-2007
The generating part will be asking you a few questions and the generate 
matchhing config files and binaries that you can copy to an empty 
Linux box with only lighttpd installed (or enginx)
Maarten:
24-Nov-2007
Session management is database-backed, so scaling up is hiring VPS'es 
and putting pound in between
Robert:
25-Nov-2007
Maarten, this sounds very cool. So the goal is to have a scalable 
web-service framwork based on fastCGI and simple tools?
Maarten:
25-Nov-2007
FastCGI is a rebol process with core enhancements, session mgt, RSP 
etc. I am also integrating autodoc from Gabriele so the files will 
be more "literate" and I have a module management system in place 
thathandles from interactive to encap.
Maarten:
25-Nov-2007
I am using assembla.com from SVN and trac, the actual application 
I am building is for personal life management.
Maarten:
25-Nov-2007
No, before the webserver, so you scale transparantly to multiple 
webservers (in my scenario each webserver effectively is the load 
balancer for X FastCGI rebol processes; it's how nginx and lighty 
work)
Pekr:
8-Apr-2009
One of my clients updates his site via some tool, which always seem 
to add some space between the lines. After some time, the page is 
instead of 400 rows something like 13K rows - the size goes from 
cca 25KB to 100KB. So I wrote a cgi script, which reads index.html 
and removes blank lines. Everything is OK, when I run the script 
from the console. But when I run it via a browser as a CGI script 
call, it can't write the file. Dunno why - cgi-script is being run 
using -cs switch, I even put secure none in there, cgi-script has 
the same own, grp set as index.html, but I can't write it ....
Pekr:
8-Apr-2009
Maybe I should try the trick to connect to the FTP account and upload 
it there, instead of rewriting? :-)
Pekr:
8-Apr-2009
Changed index.html permission to 646, and it works now. Maybe CGI 
scripts are being run under the Apache user or group, who knows. 
Thanks for pointers!
amacleod:
10-Jul-2010
I want to access a mysql db via a cgi interface directly with a rebol 
client.


I have a cgi script  that accesses the db and prints the results 
which I can read with the client but is this the best method? Is 
there a way to send the data directly to the client as rebol blocks 
or do I need to essestialy parse a cgi built web page as I am doing?
Graham:
10-Jul-2010
The ISP owns the mysql db .. and opens up some tables for you to 
use.  So, no, it's not possible unless you run your own Vm like as 
on Amazon or linode or slicehost or whatever.
Group: Games ... talk about using REBOL for games [web-public]
Maxim:
16-Jan-2007
I am looking a simple games like puzzles and kid games... and well 
rebol seems like the perfect tool for such games... much more than 
flash anyways.
Maxim:
16-Jan-2007
by game dev stuff I mean (libs and apis)
Pekr:
16-Jan-2007
and not sure we are able to detect multiple keys pressed?
Maxim:
16-Jan-2007
humm. well how much of REBOL would we really be using in an OGL game 
with proper key support... none of view... so basically core with 
a huge stub over OpenGL and native event handling.
Graham:
16-Jan-2007
I've always assumed that Rebol just wasn't good enough which is why 
we only had demos and no games.
Maxim:
16-Jan-2007
I've assumed a lot of that too... but with the current next wave 
of computers and their min 1GB ram...  it seems to me that REBOL's 
RAM hungry-ness is becoming less and less of an issue.
Geomol:
16-Jan-2007
A dialect could also produce rebcode, and that would be fast enough 
in most cases.
Maxim:
16-Jan-2007
really... I think the community should stand as one and demand this 
feature.
Maxim:
16-Jan-2007
whatever is buggy can be left out... whatever is stable will already 
be enough.  IIRC brian was part of the whole process and was confident 
that very little needs to be done to make the current cut a viable 
part of REBOL.
Maxim:
16-Jan-2007
and what a power feature that would be... I am almost certain that 
a fair amount of mezz code will be ported to rebcode by a few of 
us.
Maxim:
16-Jan-2007
and the implications for gaming ARE quite obvious.
Pekr:
16-Jan-2007
you will got your rebcode, as well as new object model = faces more 
resource savy ... and new gobs (graphics objects), resource savvy 
too ... what you will also get is - faster blitting and access to 
buffers (not sure i understand it correctly), but surely plug-ins 
for View ...
Maxim:
16-Jan-2007
exactly, I can't fix 2.7 myself, but since RT is making updates and 
rebcode was part of the 2.X code branch... it obviously can be compiled 
back in.
Pekr:
16-Jan-2007
Maxim - and my opinion is that we have to decide - either stop bothering 
Carl with old stuff, or getting R3 sooner. Carl is full-time on R3 
.... so ...
Maxim:
16-Jan-2007
Carl is affraid of a few bugs and seems stressed about stability... 
 a part from closing any security issues rebcode might be an evening's 
work (maybe two ?)
[unknown: 9]:
16-Jan-2007
I don't know where I put it, but I once built a detailed checklist 
of functions we would build for each game platform we worked on. 
 I designed the game interface for WebTV, which also did not have 
Key Up.

The basics are:


Input: Key up, and at least 3 simultaneous key overlap.  This is 
needed because during actual game place, people will press directional 
and fire buttons at the same time.


Video: Double buffer - triple buffer is better.  Without this, one 
needs to know where the beam is (called beam tracing) so that rendering 
happens on the sync.


Threading:  It is very difficult to write a game in a single thread. 
 At the very least it needs to be able to trigger functions.


Sound: Sounds need to be started, stopped, and volume changed on 
the fly.  Multiple channels (4 minimum) for a full experience.
Maxim:
16-Jan-2007
large images like what size?  I had a 10000x800 image a while back 
which scrolled nicely and seemed to behave... but maybe I didn't 
check the RAM.
Maxim:
16-Jan-2007
just looking at my kid... playing a scrolling plane game... in 2 
minutes he figured out the random generator... so banked his plane 
at the far top of the screen and multiplied his high-score by 10 
 :-)  hehe
Maxim:
16-Jan-2007
using timers we can analyse the input events and trigger our own 
filtered events... but that is not very nice
Pekr:
16-Jan-2007
that is the whole platform for multimedia - surely not the best one, 
but universal ... but then - is it rebol? :-) There would be Core 
underneath and no View ...
Volker:
16-Jan-2007
it has a  chat, meet  me and  i translate^^

But mainly  it shows  that  rebol can do some kind of adventure-graphic 
 and fast enough networking.
Ashley:
16-Jan-2007
I've started on a hex-grid generator. Handles grain, background image, 
terrain and grid size so far.
Volker:
16-Jan-2007
i  use positions and an immage for background-collision. less performant 
than grids but the map can be a big image without much work.
Oldes:
16-Jan-2007
maybe I could come back and finish a multiplayer version one day:-)
Oldes:
16-Jan-2007
And maybe I should finally solve the level 45 :/
Maxim:
16-Jan-2007
I always wanted to create a RTS game where each god starts off with 
nothing  really ... nothing... all he has are a few basic physic 
rules to work with, a selection of pictures to use for this or that 
(supply your own if you want  :-)  and basically, mix and purchase 
direct statistics and give them names... so that one person might 
create a civilisation which is centered on a religion called lets 
say... "Flying spaghetti monster"  an another which goes with long 
rang ballistics... really it would be a lot of fun, since you'd have 
NO bearing on your opponent's strategies, and since each one really 
is only purchassing raw statistics which are weighted full using 
sampling and probabilistic curves and such... the game would be utterly 
fair.
Maxim:
16-Jan-2007
add an AI to this and you can get pretty cool long term solo playing 
with an infinite range of playability.
Maxim:
16-Jan-2007
I guess a few oddball capabilities might be to purchase some game 
effects like motion speed, range, terrain type for your world, for 
which being need to have a specific means to cross... like noode 
forests and acid baths  :-)
Maxim:
16-Jan-2007
obviously, the in game beings would be controled by scripts you supply 
as macros which can use inputs to determine their immediate surroundings... 
I guess purchasing evolution would simply be to allow more and more 
actually inputs... and will allow  you to create better agents, since 
they will be able to take more optimised decisions.
Maxim:
16-Jan-2007
or uknown terrain... as in, if you encounter unknown terrain... stop 
moving... it might be dangerous... and then  if you encounter terrain, 
report back if you seen someone move through it, so it become registered 
as known safe terrain, etc.
Maxim:
16-Jan-2007
since game play is about improving your agents, and their statistics, 
this is done slowly and true evolution occurs.  you are free to create 
forks at any point too... but having many agents to update will obviously 
mean you loose time, but have better specialised agents... hehe all 
part of the strategy.
Oldes:
17-Jan-2007
I must say, that the original Rebol version of the re-box is from 
Dockimbel (http://softinnov.org/rebol/rebox.shtml) I just took his 
level data and made a little bit more complicated graphics. And the 
avatar and some of the ferniture used is from one of my favorite 
Amiga games - DreamWeb - http://www.adventureclassicgaming.com/index.php/site/reviews/221/
Oldes:
17-Jan-2007
Anyway, why somoone would like to do remakes of an old games? We 
have emulators and the old games are available for download without 
problems now, like from this place: http://eager.back2roots.org/A-Z.HTML
If someone want to do a game in Rebol, it should be a new game which 
will use all the features of the network - it should be multiplayer 
online game - imagine Altme, but with avatars going around:-) I'm 
just waiting for R3 where I will be able to use custom fonts, better 
sound and modules  (for example). The problem I see is, that most 
of us here are coders, not graphic artists:(
Maxim:
17-Jan-2007
a 3d planet defender with multiplayer attackers and defenders would 
be a total rush!
Maxim:
17-Jan-2007
imagine that with liquid, you could actually share an in game avatar's 
data right on your desktop and plug that within a little app so you 
can let your game play until the avatar has something strange to 
report...    :-)
Maxim:
17-Jan-2007
something which is a result of your agent's processing identified 
as strange... basically, his inputs serve as senses or nerves and 
their processing create reactions.  the term "strange" can be relativised 
within your agent's logic but is not a term within the application 
itself.
Maxim:
17-Jan-2007
this actually means we can play both sides in our own language  and 
have to learn what the other's mean.
Maxim:
17-Jan-2007
everything is open, and the world is only as real as you make it.
Maxim:
17-Jan-2007
but its doable.  every game out there is an implementation of this 
concept... with preset rules, preset AI, and loaded graphics.  basically, 
all that is needed (like in the matrix) is to define the construct 
(laws of physics and rule set which can be exposed and perceived 
by the agents).
Volker:
17-Jan-2007
When changes have cost, that  consistency wouldcome. you take 50 
rules  from the last  game and can only afford 1  a day.
Maxim:
17-Jan-2007
I even tought of allowing individual agenst to be editable.  and 
then allowsing classes to be copied... obviously... cloning from 
a class is less costly when generating a new agent...
Maxim:
17-Jan-2007
so more tactical people will create highly specialised units.  average 
people will create average all-rounders... and savages will just 
create hordes of dumb agents which try to overul the terrain, and 
add in any archetype...
Maxim:
17-Jan-2007
for combat this is easy...   % of chance to hit... and number of 
hp damage, with probability of higher damage costing more.  so a 
one in six damage costs less than a 4 in 6 damage.
Volker:
17-Jan-2007
and then a map? or  something like: your chances to be near a subrabwor 
are 1:5?
Volker:
17-Jan-2007
hmm, maybe think links. thereis no real map, only relations. when 
someone browses, the page is picked by chance too, not only choice. 
when something good happens and you have high statistics, you may 
 get it.
Volker:
17-Jan-2007
How about a game where people must optimize search? but  the ranking 
is based on the statistics  both own. then you need good statistics 
and must optimize your avatars(pages) to match them
5401 / 4860612345...5354[55] 5657...483484485486487