AltME: Rebol School

Messages

Drake
Solved.   Checked out  http://business-programming.com/business_programming.html#section-12.8 and saw the code snippet that uses echo which I didn't know existed.
amacleod
Drake, No need to post in multiple groups...we will see it.

Endo
Does DIFFERENCE works faster on hash! than block! ?
Endo
How can I upload files to a already open FTP port?
p: open ftp://localhost/
INSERT or APPEND don't work. WRITE doesn't accept port!.
If I use WRITE ftp://test:test@localhost/ READ %file.txt then it opens a new connection each time, which I don't want.
sqlab
ftp (re)uses up to the value of cache-size different ports. If you set p/cache-size to 1, it should always use the already opened port.
sqlab
or maybe it is system/schemes/ftp/cache-size. At the moment I can not test it.
Endo
Thank you sqlab. Still is there a way to use OPEN port and upload files via already open port?
Do I remember correctly? CALL hangs on Windows only on R2/view (if no CALL/SHOW " " trick), no such bug in R2/Command right?
Gregg
I don't know if the problem affects command as well, but I would guess it does. My workaround is to make at least one CALL on startup with /SHOW, then the rest work fine without it.
reb-console-ctx: context [
    console-primed?: no
        
    set 'prime-call-console does [
        if not console-primed? [
            ; Under some versions of Windows, and recent versions of REBOL,
            ; we have to prime the console to make /output work correctly
            ; without using /show with every call (which flashes).
            ; Only do this if CALL has a /SHOW refinement though, otherwise
            ; it will crash.
            ; The /wait is important. If it isn't used, sometimes a console
            ; app will stop the windows message pump until you open a menu
            ; or something else that gets it going again.
            if find first :call /show [call/wait/show ""]
            console-primed?: yes
        ]
    ]
      
]
sqlab
@Endo, do you mean using the same port for ftp commands and data? If yes then you have to set passive to true.
Endo
@Gregg: Yes, I encapped my script with Command (no View) and it hangs when I use CALL/wait/console. I thought that the problem was on View only, but it's not.
Endo
@sqlab: I meant uploading a file via already open port!
ftp-port: open ftp://localhost/
; do something ...
; upload using ftp-port, how?
insert, poke, append etc. don't work..
@sqlab: I meant uploading a file via already open port!
ftp-port: open ftp://localhost/
; do something ...
; upload using ftp-port, how?
insert, poke, append etc. don't work..
@sqlab: I meant uploading a file via already open port!
ftp-port: open ftp://localhost/
; do something ...
; upload using ftp-port, how?
insert, poke, append etc. don't work..
@sqlab: I meant uploading a file via already open port!
ftp-port: open ftp://localhost/
; do something ...
; upload using ftp-port, how?
insert, poke, append etc. don't work..
oh my internet connection problem leads to multiple send, sorry about that.

sqlab
If I remember right, Rebol2 should cache an already opened port to the same destination an reuse it for follwing actions.

Endo
Hi Ashley, I started using Munge in a project, it is great, thank you for all your effort.
First of all, I couldn't find a group for munge, it would be better to have !munge or #munge group in Altme. So I'm writing here.
I would like to ask my questions & share my experiences here.
First one is a possible bug report:
worksheet/save ["Name" "Age" "Bob" 33 "Joe" 44] 2 %t.xlsx  ;this one works as expected
worksheet/save ["Name" "Age" "Bob" 33 "Joe" 44] 2 %t.xml  ;this one creates a .xml file which has 3 sheet with same data.
Gregg
Semseddin/Endo, if you can't find a group, create one. You should have rights to do so.

Endo
Anyone already wrote a function something like REPLACE-DEEP (similar to COMPOSE/DEEP) which deeply replace any match in a given block:
>> REPLACE-DEEP [ 1 [  2 "one" [ 3 "one" <something-else> ] ] ] "one" "two"
== [ 1 [  2 "two" [ 3 "two" <something-else> ] ] ]
I know it's not difficult using PARSE, but if anyone has already wrote, I don't waste my time. Thanks in advance.

Last message posted 184 weeks ago.