• 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: 10501 end: 10600]

world-name: r3wp

Group: Rebol School ... Rebol School [web-public]
PatrickP61:
27-Jun-2007
Thanks Geomol,  Since I am a newbie, I can easily resave the files 
as ANSI instead of UNICODE and avoid the conversion problem, at least 
in the short term.  Once I get my "Convert to Table" program working, 
then I can look at your links to convert from UNICODE.
Gregg:
27-Jun-2007
Try it in the console and see what you get. The console is your friend. 
:-)
PatrickP61:
27-Jun-2007
When you try to save a document under Notebook, the encoding choices 
are UTF-8, UNICODE, ANSI among others.  UNICODE may be the same as 
UTF-16 because it does look like every single character is saved 
as two bytes.  


The code (rejoin extract read InFile 2) does eliminate the double 
characters but I noticed that the entire file is still double spaced 
-- as if the newline is coded twice and not removed from the rejoin. 
 But that extra newline may be an annoyance than anything else.
PhilB:
28-Jun-2007
Patrick ... on your AS400 problem .... how is the data transferred 
to the PC?  Is it directly from an AS400 file via the data transfer 
utility built into, or is it a file from the IFS ?

(I have used Rebol to read data transferred from an AS400 and didnt 
get the data as unicode.)
PatrickP61:
28-Jun-2007
Hi PhilB -- The formatted text report is generated on the AS400 into 
the work spool area.  I then can use the INavigator software on the 
PC to connect to it and drag and drop it on the PC, where I can look 
at it via Word or Notebook.  I'm not sure where the encoding to UniCode 
is happening -- I suspect the INavigator software, but then, it may 
not be an issue since Rebol can convert it to readable text, even 
with the extra newline between each line, I'm sure that annoyance 
can be overcome too.
Anton:
28-Jun-2007
Patrick, on the double newlines. Can you inspect the result of   
read InFile ? How many newlines are present at that point ?
Useful rebol words:
	NEWLINE	; this is the newline character that rebol uses
	CR	; carriage return character
	LF	; linefeed character
	CRLF	; both CR and LF in a string
Anton:
28-Jun-2007
There is READ and READ/BINARY

READ is text mode and translates line terminators automatically from 
the target system into rebol's format, which is the same as unix 
(using LF).
PatrickP61:
28-Jun-2007
Hi Anton -- This is my simulated input for a unicode text file:
	Line1...10....+...20....+...30....+...40....+...50
	Line2...10....+...20....+...30....+...40....+...50
If I run this code:
	InFile:		%"Small In unicode.txt"

 InText:	rejoin extract read InFile 2	; Convert from UNICODE to ANSI 
 but keeps double spacing.
	OutFile:	%"Test Out.txt"
	write OutFile InText
	print InText	
I get these results
	˙Line1...10....+...20....+...30....+...40....+...50
	
	Line2...10....+...20....+...30....+...40....+...50
	

I get them in the output file when I use the Rebol editor, and in 
notebook (when I open the file) and I get them in console when PRINT 
InText.
PatrickP61:
28-Jun-2007
At first, I thought it just be some stray bytes comming from the 
AS400, but I was able to re-create a file using Notebook and get 
same results.
Any of you should be able to test this out by:
1.  Open Notebook
2.  Type in some text
3.  Save the file with Encoding to UNICODE
Sunanda:
28-Jun-2007
If I'm reading it right:
Your input has 
   _0A00_0A00_   -- two new lines
and your output has:
  _0A_0A_  -- two new lines

Extract won't affect that -- it simply takes every second byte of 
the input string, regardless of whether they are newlines or not.
PatrickP61:
28-Jun-2007
Sunanda -- Now I see what you are saying  -- Out of the 4 bytes A0 
00 A0 00, Extract did its job right by returning A0 A0 and got rid 
of the two 00!
Gregg:
29-Jun-2007
nor bases higher than 16 ...

 -- Except base64. I have some old base conversion code, and I think 
 Sunanda has some posted on REBOL.org as well, if you really need 
 to convert to intermediate bases.
PatrickP61:
2-Jul-2007
Give me enough time, and I will figure it out --- :-)

Data:	head In-text
while	[not tail? Data] [
		print	[index? Data first Data ]
		Data:	next Data		]

Is there a better way to code this kind of thing?
PatrickP61:
5-Jul-2007
Situation:	I want to read in an input file and parse it for some 
strings

Current:	My test code will do the parsing correctly IF the input 
block contains each line as a string

Problem:	When I try to run my code against the test file, It treats 
the contents of the file as a single string.

Question:	How do I have Rebol read in a file as one string per line 
instead of one string?
In-text:	[	"Line 1                        Page     1"
		"Line 2    Name      String-2"          
		"Line 4    Member    String-3 on 12/23/03"
		"Line 5    SEQNBR    abcdef               "                
		"Line 6       600    Desc 1 text         12/23/03"
		"Line 7      5400    Desc 2    Page 4    12/23/03"
		"Line 8    Number of records searched	]
 Get-page:		[thru "     Page "	copy Page-id to end]
 Get-file:		[thru "Name  "		copy Name-id to end]
 Get-member:	[thru "Member  "	copy Member-id to end]

 Page-id:	Name-id:	Member-id:	"-"

 for N 1 length? In-text 1 [
	parse In-text/:N	Get-page
	parse In-text/:N	Get-file
	parse In-text/:N	Get-member
	] 
 print	[ "Page"	Page-id		]
 print	[ "Name"	Name-id		]
 print	[ "Member"	Member-id	]
Tomc:
5-Jul-2007
if your page,name & member always exist and are in that order ...

parse/all read %file [
 some [ 
	thru "Page " copy token integer! (print ["Page" token]) 
	thru "Name " copy token to newline(print ["Name" token])
	thru "Member " copy token to newline (print ["Member" token])
	]
]
PatrickP61:
6-Jul-2007
Thank you Sunanda -- I will give that a try.


Just to let you know -- My goal is to convert a printable report 
that is in a file into a spreadsheet.
Some fields will only appear once per page like PAGE.

Some fields could appear in a new section of the page multiple times 
like NAME in my example.
And some fields could appear many times per section like MEMBER:
_______________________
Page header          PAGE     1
Section header     NAME1.1
Detail lines            MEMBER1.1.1
Detail lines            MEMBER1.1.2
Section header     NAME1.2
Detail lines            MEMBER1.2.1
Detail lines            MEMBER1.2.2
Page header         PAGE    2
(repeat of above)____________


I want to create a spreadsheet that takes different capturable fields 
and place them on the same line as the detail lines like so...
______________________
Page   Name       Member
1          NAME1.1  MEMBER1.1.1
1          NAME1.1  MEMBER1.1.2
1          NAME1.2  MEMBER1.2.1
1          NAME1.2  MEMBER1.2.2

2          NAME2.1  MEMBER2.1.1  ...    (the version numbers are 
simply a way to relay which captured field I am referring to (Page, 
Name, Member)


Anyway -- that is my goal.  I have figured out how to do the looping, 
and can identify the record types, but you are right about the possiblity 
of mis-identifying lines.
PatrickP61:
6-Jul-2007
This is my pseudocode approach:


New page is identified by a page header text that is the same on 
each page and the word PAGE at the end of the line

New section is identified by a section header text that is the same 
within the page and the text "NAME . . . . :"

Members lines do not have an identifying mark on the line but are 
always preceeded by the NAME line.

Member line continue until a new page is found, or the words "END 
OF NAME" is found (which I didnt show in my example above).


Initialize capture fields to -null-     like PAGE, NAME
Initialize OUTPUT-FLAG to OFF.

Loop through each line of the input file until end of file EOF.
/|\	If at a New-page line
 |	or at end of Name section
 |		Set OUTPUT-FLAG  OFF
 |	If OUTPUT-FLAG  ON

 |		Format output record from captured fields and current line (MEMBER)
 |		Write output record
 |	IF at New Name line
 |		Set OUTPUT-FLAG ON
 |	IF OUTPUT-FLAG OFF
 |		Get capture fields like PAGE-NUMBER when at a PAGE line
 |		Get NAME when at a NAME line.
 |____	Next line in the file.
PatrickP61:
6-Jul-2007
Note to all -- Please realize this is a simplified version of the 
real report -- There are many more fields and other things to code 
for, but they are all similar items to the example PAGE, NAME, and 
MEMBER fields.
Tomc:
7-Jul-2007
Yes Patrick you have it right. The rules I gave would fail 
since you have multiple names/members

I would try to get away from the line by line mentality 
and try to break it into your conceptual record groupings
file, pages, sections, and details...

One trick I use is to replace a string delimiter for a record 
with a single char so parse returns a block of that record type. 

this is good because then when you work on each item in the block 
in turn
you know any fields you find do belong to this record and that 

you have not accidently skipped to a similar field in a later record.

something like this 


pages: read %file
replace/all/case pages "PAGE" "^L"
pages: parse/all pages "^L"

foreach page pages[
	p: first page
	page: find page newline
	replace/all/case page "NAME" "^L"
	sections: parse page "^L"
	foreach sec section [
		s: first section
		sec: find sec newline
		parse sec [
			any [thru "Member" copy detail to newline 
				newline (print [p tab s tab detail])
			]
		]
	]
]
PatrickP61:
18-Jul-2007
This is not doing what I want.  

I want it to continue to run through all  lines of a file and print 
it
PatrickP61:
18-Jul-2007
My goal is to be able to control how much of a file is loaded into 
a block then process the block and then go after the next set of 
data.  That is why I am using PORT to do this function instead of 
reading everything into memory etc.
Geomol:
18-Jul-2007
I think, your code print the port specs and everything.
btiffin:
19-Jul-2007
Ports are nifty little objects.  :)  And if you just type
>> In-port
 you get back nothing, just another prompt.
>>

The interpreter does not display the internals of objects, but print 
does, so what you are seeing is the object! that is In-port.  Well, 
I'm lying...In-port is a port!  not an object!  Close but not the 
same.  ports emulate a series! wrapped in object! wrapped in enigma. 
 Or is it an object! wrapped in a series! disguised as a sphynx? 
 :)


first In-port is a REBOL reflective property feature that when you 
get it, you'll go "Ahhhh" as you step closer to the Zen of REBOL.

For fun with a really big object!  try >> print system
Geomol:
20-Jul-2007
Now you're at it, check http://www.rebol.com/docs/core23/rebolcore-16.html#section-2.11
and http://www.rebol.com/docs/core23/rebolcore-8.html
for info about strings in REBOL.
Gregg:
20-Jul-2007
More reference info here: http://www.rebol.com/docs/core23/rebolcore-16.html#section-3.1

And you also have the words CR, LF, and CRLF available.
PatrickP61:
26-Jul-2007
So if i read you right, then if I didn't do new-line/all, and tried 
to probe Out-block, it would show the entire contents as one large 
string, whereas new-line/all will allow probe to show each value 
as a spearate line.  Right?
Volker:
26-Jul-2007
and with the new-line all strings in own lines
PatrickP61:
26-Jul-2007
I see how it works now  -- Thank you Anton and Volker!!
PatrickP61:
26-Jul-2007
My teachers, Anton and Rebolek have submitted two answers.  The difference 
between them is that Anton's answer will insert a tab between varying 
numbers of  values per line, where Rebolek will insert a tab in-between 
col 1 and col2 (assuming only 2 columns in the array).  Is that a 
correct interpretation?
PatrickP61:
26-Jul-2007
Anton, I understand Rebolek answer, but I want to understand your 
answer too.

 I'm wondering about the line: repeat N -1 + length? Blk [append append 
 Line Blk/:N tab]  

does Rebol do the inner append first  (in math expressions) like 
this:  [append ( append Line Blk/:N ) tab]
and then do this for the number of "lines" in the array
N	Out-block
0	[]
1	"Col A1^-Col B1"
2	"Col A1^-Col B1"	"2^-3"
3	"Col A1^-Col B1"	"2^-3"	{line "3"^-col "b"}


I think I see the above progression, but not sure about Blk [append 
Line last Blk]  Is this advancing the starting position within In-array?
Gregg:
27-Jul-2007
...insert a tab between varying numbers of  values per line <versus> 
... insert a tab in-between col 1 and col2
 -- Correct.


On new-line, it's kind of advanced because it doesn't insert a newline 
(CR/LF), but rather a hidden marker between values that REBOL uses 
when molding blocks.
Gregg:
27-Jul-2007
On "append append", yes. You could also do it like this: "append 
line join blk/:n tab", the difference being that APPEND modifies 
its series argument, and JOIN does not.


REPEAT is 1-based, not zero, Anton is using "-1 + length? blk" rather 
than "(length? blk) - 1" or "subtract length? blk 1". The first of 
those cases requires the paren because "-" is an op! which will be 
evaluated before the length? func, so REBOL would see it like this 
"length? (blk - 1)", which doesn't work.
PatrickP61:
27-Jul-2007
Sounds like more advanced stuff than I'm understanding right now. 
 I'll read up on the terms. 

When I get REBOL code solution, I'd like to understand how Rebol 
is processing the code.  What it does logically first, and logically 
second... I think I get confused about when Rebol does the evaluations.
Gregg:
27-Jul-2007
It can be confusing at times, and even once you know what you're 
doing, you sometimes have to think about it a bit. The up-side is 
that you have a great deal of control once you know how to use it.
Geomol:
27-Jul-2007
Patrick, before I started with REBOL, I had many years of experience 
with many different languages, both as a hobby and professional. 
It wasn't hard for me to grasp new languages, because every new one 
always reminded me of some other language, I already knew. Then I 
came to REBOL, and I could make small scripts after a few days. But 
it took me more than a year to really "get it". And it's just the 
best language, I've ever programmed in. It keeps amaze me after all 
these years, and I constantly find new things, new ways of doing 
things. From your posts here, you're having a very good start, as 
I see it. Just keep hacking on that keyboard, and don't forget to 
have fun!
Vladimir:
3-Oct-2007
Well first of all ....Im new here... :) joined yesterday... and I 
have a problem on my hands.....
Vladimir:
3-Oct-2007
yeah... I guess its a mix between insert-event-func and iterated 
pane..... pane is generated every time and my adding rate element 
to it doesn't effect global rate..... thanks for answer!
Vladimir:
3-Oct-2007
Sorry for spamming this gruoup... but I was wrong.... I mixed to 
source files... Editid one and ran another... so ... it still doesnt 
work.......
Vladimir:
3-Oct-2007
Thanks Oldes! I did it.... I used insert-event-func for key events 
and feel for time events....
Vladimir:
3-Oct-2007
I red part of docs (6.4 Focus and Keyboard Events)  but it doesnt 
help......... Well so far I'm ok, my editor can move on.... :)
Oldes:
4-Oct-2007
insert-event-func is simply used for global events, you can use it 
to detect 'close, 'resize, 'active and 'inactive as well. Why you 
should have such a event handlers in feels?
Vladimir:
4-Oct-2007
I'm actually interested only in keypress events...

But I have to limit the rate of events... I know there is the rate 
element in every face, and I did make it work for time event and 
that is ok.
But I couldn't make keypress event occur in timed intervals.

I'm not saying I have to have it. Maybe it just isnt supossed to 
be. But it says in docs:


The focal-face must be set to a valid face object (one that is part 
of a pane in the face hierarchy) and the system/view/caret (explained 
in next section) must also be set in order to:
   1. Receive keyboard 
events ....

So I put this inside engage func:

system/view/focal-face: face
system/view/caret: tail ""


And now it works... I dont even use caret but you have to set it 
to some bogus value!


So in my opinion rate element has no influence on key events (if 
I type like crazy I get 19 key events for 1 second...).

But I can make some sort of counter and simply do keypress response 
only when I want to...
Gregg:
4-Oct-2007
The event handling system will call your insert-event-func handler 
as fast as it can, if there are availalbe events, and there will 
always be time events, occurring at whatever rate REBOL uses them. 
I don't know of any way to control when, or how often, your func 
is called.
Vladimir:
26-Oct-2007
What could be problem with this script?

set-net [[user-:-mail-:-com] smtp.mail.com pop3.mail.com] 
today: now/date
view center-face layout [
		size 340x120
 		button "Send mail" font [size: 26] 300x80	[

    send/attach/subject [user-:-mail-:-com] "" %"/c/file.xls" reduce [join 
    "Today  " :danas]
 			quit
 		]
	]

I get this error:


** User Error: Server error: tcp 554 5.7.1 <[user-:-mail-:-com]>: Relay 
access denied
** Near: insert smtp-port reduce [from reduce [addr] message]

Could it be some security issue?

It worked with previous internet provider... A week ago we changed 
it and now this happens...

Should I contact my provider to change some security settings or 
should I change something in the script?
Pekr:
26-Oct-2007
smtp servers usually don't allow you to send email via themselves, 
if you are not part of particular network, or they require authentication 
to smtp - usually your accont name and password is enough. I think 
that in such case, you are out of luck with REBOL. Not sure our smtp 
protocol can handle it ... but - go to www.rebol.org and try to search 
for "smtp" - there are some scripts which could help you ....
Vladimir:
26-Oct-2007
I just set up outlookexpress and "my server requires authentication" 
is a problem....
Pekr:
26-Oct-2007
try to look for esmtp. Usually there is a requirement for sending 
your user account name and pass. Hopefully you can find something 
...
Pekr:
26-Oct-2007
heh, I know there can be user and pass set, I just did not know it 
could be set via set-net, I always used max of 6 params for the function 
:-)
Vladimir:
26-Oct-2007
This functionality was not present in previous versions of rebol... 
I think it was introduced in some patch this year... By the way I 
dont know wich version of view I use on every other pc... one at 
home, one at work... laptop... I will download newest and update 
all.... :) Thanks for help...
Vladimir:
29-Oct-2007
How complicated is it to make simple file transfer between two computers 
(one client and one server) in rebol?
What protocol should I use?
Any ideas?

Currently I'm sending e-mails from clients with file-atachments because 
its the simplest way of collecting data from clients. (so far they 
were doing it by hand -  so this is a big improvement :)
Gregg:
29-Oct-2007
You could also write a custom app that sends via email, and a reader 
on the other end that grabs them.
Graham:
29-Oct-2007
I've done file transfer using async Rebol rpc, and also using Uniserve
btiffin:
30-Oct-2007
Vladimir;  Check out http://rebol.net/cookbook/recipes/0058.html
for one way.  It's a good exercise in getting a client server app 
running as well.  And of course, follow the advice of the others 
here; there are many options.
Vladimir:
30-Oct-2007
Files are 1-2 Mb. Ziped archives of dbf files.

As I said now I'm using small rebol script to send file as attachment, 
human on the other side is downloading them and unpacking them, and 
its working.

I planed to make a "server" side script that would download newly 
arrived attachments and unpack them in designated folders, but then 
I thought about trying some real client-server approch...

Then again, server would have to be started at the time of transfer. 
I have to know ip adresses and to make them public (hamachi jumps 
in as help)...

E-mail used as buffer for data is not bad... And it works... But 
I have to check max mailbox size .... What if workers execute sending 
script more then ones?

There is one strange thing with sending big (>1 Mb) files::

On win98 it goes without any problem. On XP at the end of transfer 
rebol returns an error message about network timeout, but the file 
is sent and all is ok..

Thanks guys... Lot of info... Will check it out and send my experiences.
Vladimir:
28-Jan-2008
How can i convert content of dbf file to readable html file on webserver 
?

I thought to use rebol to make conversion, and then transfer html 
to server using ftp...
Can someone point me in the right direction ?
Gregg:
29-Jan-2008
Vladimir, yes, if you need it. I think it would be a neat thing to 
have, but there hasn't been a rush of people clamoring for it.


Petr, it can be done, it just won't be as much fun as it should be. 
:-)


Oldes, Brian is correct. QuickBASIC/VB and PowerBASIC were well-suited 
to this task, because you could declare a type structure and get/put 
it directly.
Pekr:
29-Jan-2008
DBF is rather simple format. Not sure it would not be better to use 
some ODBC driver for it though. There is a problem with indices and 
memo files. There were several systems out there with different aproaches. 
E.g. Clipper implemented RDD - abstracted "replaceable database drivers", 
which took different strategies for indices and memo files. I am 
also not sure, that nowadays, there is any advantage in using DBF 
files against e.g. SQLite.
Vladimir:
29-Jan-2008
I have dbf specifications printed out.... I'll try to make something 
tonight....

My table is simple one... just a list of customers with their debt 
status , and that is what my boss wants to have with him where ever 
he is... :)

Thats why I want to upload it to webpage and he can then acces it 
even with his mobile phone......

But table has a lot of records so Ill have to make some filtering....
Thank you for suggestions....
btiffin:
31-Jan-2008
I've been chatting with some students (Ontario, Canada mainly) and 
our high schools have been teaching Turing.  Well Holt Software just 
recently announced a cease to operations.  Turing is now free but 
I think this opens a door for what the kids in Ontario will be learning 
starting in September 2008.


Could REBOL be it?  What would it take to startup a REBOL in the 
Classroom commercial endeavour?  Would RT like it if such a company 
existed?
btiffin:
31-Jan-2008
And getting serious;   We all love REBOL, our being here is testament 
to that.  BUT...  Would you deem REBOL as a language that could be 
taught to 14 year olds and have the principal of a school think "Yes, 
I've prepared my students for the IT world to the best of my abilities"? 
 Honestly.


imho; REBOL is maybe a little too different to be the "Yep, if you 
know REBOL, you know enough to build a career in programming" language.
james_nak:
31-Jan-2008
Yes, that I'm afraid is true. My son is studying VB now and I am 
for right now waiting to show him the Rebol way. In some ways it's 
like learning an instrument in that some are more likely to lead 
to jobs or bands for that matter. At some point statistically speaking, 
that is, you would have to learn another "accepted" language.
Pekr:
31-Jan-2008
OTOH - I would not taught them anything like JAVA too. Maybe some 
basic. It is not even about particular language, but a bit of alghoritmical 
thinking ... and maybe Basic like syntax ...
Sunanda:
31-Jan-2008
It'd be fun to get REBOL into the classrooms.

But it'd take some plans and (probably) some pedagogically oriented 
libraries to beat a language like Turing that is described as "Designed 
for computer science instruction".
btiffin:
31-Jan-2008
Sunanda;  I'm starting to take a deep interest in RitC.  But I have 
doubts.  Doubts that need to be squashed.  Sadly, Ontario (a fairly 
vast province) has standardised curriculum now.  It's all schools 
or no schools here.  I'm not a fan, the excuse was that some kids 
in some boards were getting sub-par educations, ignoring the fact 
that some boards were providing above-par educations and instead 
picking a middle-of-the-road bland education for all.
SteveT:
31-Jan-2008
I've been lecturing accounts & tax at Manchester recently and I've 
had a chance to chat with some of the programming students during 
breaks. I think all of them hated whatever they used in college !! 
Some of them state that what they were taught bore no relation to 
what abilities they now need in the work place.
Gregg:
31-Jan-2008
If you want to get a job as a grunt programmer in a big company, 
using whatever tools they tell you are in fashion, REBOL is not the 
right tool for you--though it may be a nice support language. If 
you want to think about hard problems and algorithms, it's as good 
as Lisp/Scheme within limits (e.g. tail recursion), and easier to 
play around with. If you want to get the job done and either make 
the tool call yourself, or can convince the people who do that REBOL 
is up to the task, it's great. And if you aren't a CS major, but 
know that computers and programming will affect you in business, 
and you want to be able to to some "light" programming, I think it's 
great.
Rod:
31-Jan-2008
I think REBOL has merit in the classroom but it can't be from the 
angle of what you need to be an IT programmer.  It has to be more 
about theory and creativity to make machines do amazing things.  
I am afraid though that your all or nothing situation and be ready 
by the fall schedule doesn't sound like a good combination.  You 
would want some real world, already done it here in this setting, 
kind of platform to start from to move into that kind of education 
space.
Rod:
31-Jan-2008
I have taken a stab at online training when blackboard.com came out, 
did a short expert course in my primary language (Progress 4GL) to 
some friends.  It was an interesting experiment and very worth doing. 
 At the time though the technology parts via the web was very limited 
(still is really but even worse then).  I wonder if the emergence 
of VoIP, video and flash has moved us past how interaction might 
be done differently to just the same with different delivery mechanism.
Rod:
31-Jan-2008
I look at things like Easy VID and Easy Draw and wonder what the 
possibilities could be to expand on that in place active content.
Anton:
1-Feb-2008
What's the problem ? Rebol can be used for teaching programming, 
just like any other language. It has the three basic features: sequence, 
selection and iteration, so it can do anything :)

Seriously, if you can find a programming course in another language, 
perhaps you can translate into rebol on the fly.
Tomc:
1-Feb-2008
I think Rebol can be used in the classroom in liew of a mainstream 
language based if nothing else on the fact that by the time the kids 
are ready there is apt to be a "new" mainstream language. what is 
important is learning to think and from my experiance rebol gets 
in the way far less than other mainstream languages.
btiffin:
13-Feb-2008
Compressed at http://www.rebol.net/rs/server.rand client.r  with 
the standard  save ... ctx-services thingy.

I'm pretty sure this is Gabriele's later release that has support 
for large file transfers.

I would say yes, LNS is still a good plan.  It's in use with DevBase.
Vladimir:
31-Mar-2008
I looked at available documentation, and can not find any advanced 
settings like that in there.....
Where can I find info like that ?
p.s. But I can always ask you guys :)
Vladimir:
29-Oct-2008
Ftp problem again.... everything was working perfectly from march 
till now.... we changed internet provider yesterday and my scripts 
dont work any more :(
Here is the core of script where error is:

server: ftp://user:[pass-:-ftp-:-firm-:-com]/data
file: %file.zip
from-port: open/binary/direct lokal/:file
to-port: open/binary/new/direct server/:file

** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
Vladimir:
29-Oct-2008
Should I check ports and wich ones?
Anton:
29-Oct-2008
You can get more detail by doing this first:
	trace/net on
Rebol will print more information in the console.

At a deeper level, you can use Wireshark (open source program) to 
capture and analyse the ftp traffic.
Vladimir:
30-Oct-2008
Trace/net  did gave more info:

Its not my new internet provider... :)  its our old router used in 
a new way... :)
This is the message I get...
Username... pass.... OK.... and then:
Net-log: "Opening listen port 2655"
Net-log: [["PORT" port/locals/active-check] "200"]
Net-log: "200 PORT command successful"
Net-log: [["CWD" port/path] ["25" "200"]]
Net-log: "250 OK. Current directory is /apl"
Net-log: "Type: new"
Net-log: ["TYPE I" "200"]
Net-log: "200 TYPE is now 8-bit binary"
Net-log: [["STOR" port/target] ["150" "125"]]
Net-log: "Closing cmd port 2652 21"
Net-log: "Closing listen port 2655"
** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
Vladimir:
30-Oct-2008
On what port should I focus?
It seams standard 20 and 21 are going thru....
Pekr:
30-Oct-2008
Vladimir - what is your FTP user name? Does it contain @ char? If 
so, you need small patch. Look at how is Total commander FTP configured. 
It should work. Aren't you using proxy? You might install WireShark 
and watch packets, that is the very low level of networking,  you 
will see everything there. Then you could compare your Total Commander 
connection with your REBOL one and see, where they differ....
Vladimir:
30-Oct-2008
user name is "visaprom.com"
Total commander is set up simply...
use passive is ON...
here is what is happening with ftp/passive: true:

Net-log: "215 UNIX Type: L8"
Net-log: ["PWD" "25"]
Net-log: {257 "/" is your current location}
Net-log: ["PASV" "227"]
Net-log: "227 Entering Passive Mode (194,9,94,127,235,183)"
Net-log: [["CWD" port/path] ["25" "200"]]

this is where it pauses and then:

Net-log: "Closing cmd port 3565 21"
** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
Pekr:
30-Oct-2008
Vladimir - IIRC, FTP is strange beast, and network admins don't like 
it. FTP uses port 21 to establish connection, but to transfer data, 
other port is used  - 20 IIRC.
Vladimir:
30-Oct-2008
i have to restart router.... and since currently five guys are using 
network..... ill have to wait a little.... will report results... 
tried to set up dmz....
Graham:
30-Oct-2008
Anton, see the trace/net and error message at bottom
Pekr:
30-Oct-2008
If you want to post log here, please be sure that user name and password 
are not listed ...
Vladimir:
30-Oct-2008
I added my local ip adress to DMZ and it still does not work...
Vladimir:
30-Oct-2008
Where should I check ports and which ports?

how can it work from command prompt with ftp command, from total 
commander and not from rebol script?
Pekr:
1-Nov-2008
Look at Access filter, and see if all traffic is enabled, and no 
services (represented by port numbers) are selectively disabled ...
Pekr:
1-Nov-2008
I went thru all the docs, and nothing suspicious in there. As your 
Total Commander FTP connection works, it has to be REBOL in conjunction 
with your local PC firewall or something like that. Or REBOL ftp 
protocol working differentcly could be the cause, but not sure, as 
it works from other locations ...
Vladimir:
2-Nov-2008
Hey... thanks for bothering with my problem....  :)

I will go tomorrow in to the office and try few things... in the 
meantime they are just using totalcmd for uploading data...

I will be using two wans... but not yet... its still only one wan 
connection.
No more talk.... I'll try tomorrow...

My friends are telling me: "If everything else works it has to be 
that scripting language of yours."

I say: fuc..ing router should act as a simple wire... what goes in 
on one end goes out on other end.
I can change router... BUT I'M NOT CHANGING LANGUAGE! :)
I will report progress tomorrow.
Gabriele:
2-Nov-2008
did you try both active and passive ftp?
Graham:
2-Nov-2008
and it works for us using his password :)
Vladimir:
2-Nov-2008
only problem is router.... without it if I connect directly PC with 
WAN connection... rebol scripts work...

I connect router on wan and pc on lan port and only rebol script 
doesnt work...
filezilla, total commander, ftp command from windows works...
Vladimir:
2-Nov-2008
I know (at least I thought I knew...  :( ) how to set up network 
and routers... I did this hundreds of times, and had problems with 
altme, torrent downloaders, games and many others... and solved them....

I tried to add ftp ports, and even whole range from 0-65535 to NAT 
routing tables.... tried to put whole lan ip range into dmz... Ill 
try tomorrow....
Pavel:
2-Nov-2008
also rebol.com documentation tutorial and examples especially rebol 
cookbook
Vladimir:
2-Nov-2008
@Graham: Where is the source available?

I thought maybe by looking into source and comparing it with the 
messages I get from net stats I could find more about my problem....

In the meantime I'll try tomorrow to open router completely... all 
the ports all the ip addresses... and see what happens.
Vladimir:
4-Nov-2008
here is something new....
I tried few things from windows command line.
here are two scripts and two logs:
1. script
binary
cd apl
put c:\slanje\zip\ik104test.zip
quit

1.log
......
230-User visaprom.com has group access to:  www
230 OK. Current restricted directory is /
ftp> binary
200 TYPE is now 8-bit binary
ftp> cd apl
250 OK. Current directory is /apl
ftp> put c:\slanje\zip\ik104test.zip
200 PORT command successful

425 Could not open data connection to port 35370: Operation timed 
out
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
Vladimir:
4-Nov-2008
basicly if I enter Binary mode, upload fails and it looks like it 
has to do something with port above 35000 problem.
If I enter passive mode nothing works....
it always responds with network timeout....
Vladimir:
4-Nov-2008
And once more..... total commander works :)
Graham:
4-Nov-2008
well, in this case, you should use wireshark and do a tcp trace
Vladimir:
4-Nov-2008
and here are log files from wireshark:

http://www.visaprom.com/wiresharklog.txt
http://www.visaprom.com/wiresharklog details.txt


If anyone has little time to read thru them and can tell me something 
I would appriciate it very much :)
10501 / 4860612345...104105[106] 107108...483484485486487