AltME: Ann-Reply

Messages

Rebolek
Definitely not. My understanding of Rebol internals is pretty shallow.
Arnold
But you do know a lot what makes Rebol, how it behaves or should behave. And you have plenty of time to do it, for you are regularly discussion matters on SO chat anyway.
As long as you know that I am kidding you now.. But almost everybody is as modest about this. So I don't expect a lot of people to step up for the task.

SWhite
Regarding the alleged documentation about using REBOL on fixed-format data files, I assisted recently with converting some databases from one system to another, and that involved a couple hundred programs for extracting and comparing data from various sources.  I did not want to leave behind a pile of undocumented code for others to deal with, so I tried to write up the general ideas of working with such files, and as long as I did that, I put it on the internet in case it helps anyone else.
Kaj
That's nice, Steven
Reichart
I use Prolific.  
We are wrapping up testing on a local app we call SmartShre, which runs on Win/Mac/Lin.  It is not Rebol sadly, but one day, might convert the Python to Red. It will be made Open Source.
We are also updating QuickShot (screen capture with automatic save to project feature) which was written by Maxim, works great, just needs some dusting off.  that is 100% Rebol, and will be submitted to Open Source as well.
Once we get the basic SmartShare plaform solid, I want to add (after 30 years of wanting this) a set of featurs that REALLY handles back ups the way I want them to be.  Which is "See this mediua here, this CD, copy it, and everything about it to the cloud, and when I want it back, I can even reconstruct the CD if I need to).
Maxim
I still use quickshot all the time  :-)
in fact, I`ve got it in the system tray right now  ;-)

Reichart
Cool. :)
sqlab
@SWhite, you can use parse instead of many copy/part at .... when dealing with fixed length data
as in
parse/all "abcdefghijklmn" [copy a to 2 copy b to 5 copy c 3 skip  copy d to end ]  
>> probe reduce [a b c d]                                                            
["a" "bcd" "efg" "hijklmn"]
DideC
@SWhite: nice analyse and documentation.
But it does not show well the power of rebol syntax IMO.
ie: the SPACEFILL function is quite long in code,  slow and eat memory for what it does.
This one does the same thing :
    fillcut: func [txt len] [head insert/dup tail copy/part txt len " " max 0 len - length? txt]
It's not as readable for beginners, but is a nice example of oneliner.
Oups the right function use a char space, not string :
    fillcut: func [txt len] [head insert/dup tail copy/part txt len #" " max 0 len - length? txt]
Here is a function to compare time and memory usage of code execution :
    tt: func [code num /local d] [recycle  stats/evals/clear  d: now/time/precise  loop num :code  print ["time:" now/time/precise - d "memory:" stats "evals:" stats/evals]]
And the test results of both functions :
>> tt [SPACEFILL "abcedfgh" 5] 100000
time: 0:00:00.144 memory: 8972886 evals: 2500014 800007 400001
>> tt [fillcut "abcedfgh" 5] 100000
time: 0:00:00.114 memory: 5772726 evals: 1500014 800007 200001
DideC
There is a 0.02 seconde due to console. This show the real time (the first execution is slower) :
>> loop 4 [tt [SPACEFILL "abcedfgh" 5] 100000]
time: 0:00:00.169 memory: 8974518 evals: 2500014 800007 400001
time: 0:00:00.125 memory: 8974486 evals: 2500014 800007 400001
time: 0:00:00.126 memory: 8974486 evals: 2500014 800007 400001
time: 0:00:00.127 memory: 8974486 evals: 2500014 800007 400001
>> loop 4 [tt [fillcut "abcedfgh" 5] 100000]
time: 0:00:00.11 memory: 5774454 evals: 1500014 800007 200001
time: 0:00:00.091 memory: 5774422 evals: 1500014 800007 200001
time: 0:00:00.091 memory: 5774422 evals: 1500014 800007 200001
time: 0:00:00.091 memory: 5774422 evals: 1500014 800007 200001
DideC
Notice what empty code test give
>> loop 4 [tt [] 100000]
time: 0:00:00.001 memory: 5374550 evals: 14 7 100001
time: 0:00:00.001 memory: 5374406 evals: 14 7 100001
time: 0:00:00.001 memory: 5374406 evals: 14 7 100001
time: 0:00:00.001 memory: 5374406 evals: 14 7 100001
So memory used by 'fillcut is: 5774422 - 5374406 =  400 016,
but 'SPACEFILL use: 8974486 - 5374406 = 3 600 080 : 9 times more memory due to temporary values !!!
SWhite
Thank you.  As a perpetual beginner, I value feedback.  Your comment, "...not as readable for beginners...," exactly addresses my own difficulties.  When I first encountered REBOL, try as I might, I just could not understand it.  But I knew there was genius in there somwhere just because of who wrote REBOL, so I used it anyway in my own plodding manner.  Now, I suppose, there is a danger that I will pass my "plodding manner" on to others through the internet.  So I will examine your examples, and my own coding, and see what I can do to mitigate any damage I might be causing, before I start on the next "helpful" document I have in mind about data storage (if Nick hasn't covered it already).

Arnold
Great news John! I will for sure take a look at this release of World!

Geomol
Cool! :)
Gregg
Congratulations John!

Last message posted 109 weeks ago.