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

World: r3wp

[Rebol School] Rebol School

james_nak
30-Oct-2007
[656]
Here is something from the rebservices section from Gabriele:

client has experimental generic http proxy support; server has the 
new, much improved file service. see http://www.rebol.net/rs/demos/file-client.r
for example usage to transfer big files.
btiffin
30-Oct-2007
[657]
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
[658]
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.
Ingo
30-Oct-2007
[659]
A script to send files over the network using tcp. It once started 
with 2 3-liners, 

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=remote-file.r
Gabriele
30-Oct-2007
[660]
we're using rebol/services to transfer backups from www.rebol.net 
to mail.rebol.net. files are a couple hundred MB. see http://www.rebol.net/rs/demos/file-client.r
Vladimir
28-Jan-2008
[661]
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
28-Jan-2008
[662x2]
Francois Jouen did a DBF viewer some time back. I'm not sure if REBOLFrance 
is still up or not. I have the old code here.


http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlQZKQ


I thought it would be a nice thing to have, but never pursued it 
since I didn't *need* it.
One thing REBOL isn't particularly good at is structured file I/O, 
which is what you need for DBF. Perfect job for a dialect though. 
:-)
Vladimir
28-Jan-2008
[664]
Should I make dbf dialect ? :)
Pekr
28-Jan-2008
[665]
Gregg - don't forget you need to parse indices too :-)
Oldes
28-Jan-2008
[666]
what do you mean with "structured file I/O"?
BrianH
28-Jan-2008
[667]
File I/O with binary file structures needs better conversion facilities 
than REBOL has, at least to do efficiently.
Gregg
29-Jan-2008
[668]
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.
Vladimir
29-Jan-2008
[669]
There is only one file that needs to be put online.....
Its 13 Mb big....
Anybody has some advice how to parse it in binary mode?
Oldes
29-Jan-2008
[670x5]
I'm using this script to parse binary formats: http://box.lebeda.ws/~hmm/rebol/stream-io_latest.r
Here is for example script for parsing AVI file using the %stream-io.r 
script: http://box.lebeda.ws/~hmm/rebol/avi_latest.rbut I use it 
to parse other formats as well
here is a version with some rebcode optimizations: http://box.lebeda.ws/~hmm/rebol/stream-io_rebcode_latest.r
The output (write functions) is not complete as I don't need it so 
much
I don't have any DBF file, but looking at spec, it should not be 
difficult to read it.
Pekr
29-Jan-2008
[675x2]
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.
btw - IIRC rebol.org contained some DBF viewer, but it was probably 
already mentioned. I was using DBFs for more than 15 years. Uh, those 
were the days :-)
Vladimir
29-Jan-2008
[677]
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
[678x3]
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?
That last question is too short.  Would RT appreciate the potential 
of having bureaucrats trying to stick their hands in the cookie jar? 
  is more what I meant.
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
[681]
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
[682x2]
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 ...
So - the dialect of REBOL? :-)
btiffin
31-Jan-2008
[684]
Yeah; Turing is for algorithm thinking.  It's a Niklaus Wirth, Pascal 
variant, designed explicitly for teaching.  Which means some company 
in Toronto is probably building a rocket engine control system with 
it as we speak.  :)
Sunanda
31-Jan-2008
[685]
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
[686]
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
[687]
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
[688]
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
[689]
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.
btiffin
31-Jan-2008
[690]
Rod; agreed.  It is not in my nature to aggress when it comes to 
business, play, or life so if this is pursued it'll be a local night 
school kinda start.  First step is an attempt at an Altme parse lecture 
surrounded by friendlies.  :)
Rod
31-Jan-2008
[691x2]
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.
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
[693]
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
[694]
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.
Vladimir
13-Feb-2008
[695]
Can anyone point me to some place where I could get rebol/services 
source code?
I can not find it in usual places.... ?!?!?!?!?   :(

Is it right way to go if I plan an app that will need to exchange 
data over net ?
btiffin
13-Feb-2008
[696]
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
13-Feb-2008
[697]
Ahaaa..... so it was only matter of path..... http://www.rebol.net/rs
instead of http://www.rebol.net/rebservices..... :)
Thanks!
Vladimir
28-Mar-2008
[698x2]
Here is one question for you guys:
I want to upload file on ftp. 
I know I can do it like this:
write/binary ftp://user:[pass-:-website-:-com] read/binary %file

Or I am supossed to do it.... it just wont let me....


>>  write/binary ftp://user:[pass-:-ftp-:-site-:-com] read/binary %file.txt
** User Error: Cannot open a dir port in direct mode

** Near: write/binary ftp://user:[pass-:-ftp-:-site-:-com] read/binary %file.txt

I can read the contents of ftp rootdir with:
print read ftp://ftp.site.com/


But writing is not working.... What does it mean: "Cannot open a 
dir port in direct mode"?
BrianH
28-Mar-2008
[700]
Try this:  write/binary ftp://user:[pass-:-ftp-:-site-:-com]/file.txt read/binary 
%file.txt
Yoiu were trying to write to a directory, not a file.
Vladimir
29-Mar-2008
[701]
Thanks Brian !!!! I just didnt see it yesterday evening.... :)
Gregg
30-Mar-2008
[702]
Another common issue with FTP is to set  system/schemes/ftp/passive 
to true.
Vladimir
31-Mar-2008
[703x2]
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 :)
Ufffff......... I just found it in reb23 core documentation chapter 
11.... :) 
That's what you get when you rely on google... :)
Vladimir
29-Oct-2008
[705]
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