• 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
r4wp239
r3wp2252
total:2491

results window for this page: [start: 601 end: 700]

world-name: r3wp

Group: Ann-Reply ... Reply to Announce group [web-public]
Pekr:
30-Mar-2005
posted in bold ... as I think about it, someone should try to call 
RT and notify them of broken links before Carl leaves on trip, or 
the announcement is not usable ...
Pekr:
12-Jun-2005
Actually Ammon it is strange, I would expect at least some minor 
delays, as was case with older Mozillas, but 1GHz 512MB vs 1.8GHz 
256MB is not all that faster, and mine works so fast, that it is 
blink of an eye. Really I can call it realtime ...
Ingo:
30-Aug-2005
REBOL [
	Title: "Local Index" 
	Type: 'index 
	dynamic: true 
	plugin-pane: 0.5
]

title "Local Files"
app 0.3

group "A" effect [multiply green] 
			 
group "B" icon %action.png

action "a\gitarre"    do [explore %/f/gitarre/]
action "a\view-root" do [explore view-root]
action "a\hamster"   do [call "H:\prog\Hamster\Hamster.exe"]

action "b\Internet" do [
	call "H:\Programme\offline-proxy-mm3\MM3-WebAssistant.bat"
	call "C:\Programme\discountsurfer\discountsurfer.exe"
	call "H:\Programme\Mozilla\Firefox\firefox.exe"
	call "C:\Programme\Opera75\Opera.exe"
] 


action "b\Firefox" do [	call "H:\Programme\Mozilla\Firefox\firefox.exe"] 
icon %web-surf-action.png

action "c\desktop"   do [editor view-root/desktop.r] 
action "c\imap"      do [editor %imap-handler.r] 

file "Info" %info.txt
file "T\Test" %test1.r 
file "T\Test2" %test2.r 
file "T\Test" %test3.r

; this is composed ----
file (form now/date) %dummy.r

action "Click me" #clickme do [
            alert "hi"

            [Text "This will be displayed within the desktop" [alert "ho"]]
          ]

action "Click me 2" #clickme2 do [
            alert "hi"
			; no return value, so nothing displayed in the desktop
          ]

action "PRINT" do [print "^/^/----------------------^/^/^/"]
action "prin somethin" do ["yea"]
file "t\Test" %dummy.r

; this will draw the plugin
app-draw [face /local cl-size][
   cl-size: to pair! reduce [face/size/x 50]
	face/pane: layout/offset[
		at 0x0 
	   text "00:00:00" cl-size center 255.155.40 with [
   		font: [size: 24]
	   	rate: 1
		   user-data: none
   		feel: make feel [
	   		engage: func [face action event i] [
		   		if user-data <> now/time [
			   		i: form user-data: now/time
				   	if 7 > length? i [append i ":00"]
					   face/text: i
   					show face
	   			]
		   	]
      	]
      ]
      text "TEST" 
		button "hi" [alert "you!"] 
   	button "CLOSE" [unview/all] 
	] 0x0 face/size 
]

; if you need to redraw after a resize, not yet used
app-resize [new-size][]
Volker:
30-Aug-2005
(and for call you need no /pro anymore :)
Graham:
31-Aug-2005
yes, we are replying to Steve's call to protest.
Graham:
4-Dec-2005
Anton ... no, I just usually only call comlib just once.  I must 
try it out calling it 6 times :(
Rebolek:
21-Dec-2005
heh sunanda you found my blog? :) I've never linked it anywhere, 
because I'm still just testing it :) so I won't call that "official" 
announcement. Anyway, today is Wednesday, the Q&A day, so we can 
ask in RT Q&A group about RDC status.
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
DaveC:
31-May-2007
Rebol does require a different mindset if you want to get the most 
out of it


It's what I call the Zen of Rebol. I think it explains why it's taken 
me years to really "get it". I'm still learning of course. In a way, 
I wish I'd not had a backgound in procedural languages before Rebol.
Henrik:
31-May-2007
About dialects: You may not know what it is, so I'll give a brief 
real example of what I did, when adding a dialect to my database 
system. It does 3 different database operations, the details don't 
matter, but here goes:

lock-state: db/release locker-id current-object
set [lock-state current-object] db/add-object locker-id
if all ['locked-by-me = lock-state object? current-object] [
  current-object: db/advance locker-id current-object
]


This is RPC based, which means I call specific functions in the database 
over the network, pass parameters, get stuff back in return and maintain 
database environment variables. This is how you do it traditionally.

Now with a dialect, you can say something like this:

do-database [release add advance]


As you can see, it's an incredible code reduction. Same 3 operations. 
A part of it is of course that database environment variables are 
maintained internally and are not really a part of the dialect, which 
further reduces code. But I consider it a side effect of dialecting 
and makes it easier to design a uniform way of talking to the database.

Now which method would you expose to a third party developer? :-)
Oldes:
3-Jun-2007
using...

def go_crazy
    capture_image until @camera.memory_card_full?
end


...seems to be useless if you need to do more than just call one 
function.... but I don't know Ruby at all, so maybe I'm wrong
RobertS:
3-Sep-2007
SYMBOL! is internal houskeeping for names of words (?) and a routine! 
is for working with a call to a DLL  ( of my 54 datatypes in a 2.6.3 
VIEW exec )
RobertS:
8-Sep-2007
both English Rebol books call print and prin 'functions'

The Rebol docs dictionary lumps all the words together as 'functions'

The challenge I have in introducing Rebol in a tutorial is to explain 
why the second expression fails:
>> c: open %temp.txt
>> d: close %temp.txt
; when explaining that the last line seen in
>> source send

; is not an indication that the function named send returns a value. 
 In many languages procedures can be called functions. Is Rebol one 
of them?

; not all mathematicians can add and many cannot teach mathematics 
but can teach naval history. and such.
Group: Make-doc ... moving forward [web-public]
shadwolf:
5-Apr-2005
allen Iframe ? and why not java ... are you joking having rendering 
and writing in two panes is yet possible with REBOL/View (see MDP-GUI) 
What I seek for is a merge of both systems Like MS Word But even 
sharper and made Fully in REbol/view code no external call to other 
idions technology :)
ScottT:
2-Jun-2005
I have been inspired by the make-doc line.  Robert's rendition is 
fantastic.  Love the whole site in one file thing.  Keeping the CSS 
out of the rendered html is good, using classes.


MDP-Browser sounds really cool.   a makedoc/spec browser for makedoc 
formatted scripts.


I have been playing with a document format that I call nulldoc, which 
is mostly a set of generaly rules about how plain text documents 
have been formatted traditionally, or how plain text copied from 
a web browser can look, and I started developing a set of broad regular 
expressions to markup plaintext.


based more on what I wanted than what I actually had, the rules I 
came up with go something like:

two blank lines begin a new nulldoc document (segment)
spaces/numbers/letters/symbols represent lists.

tabs/spaces at the beginning of the line denotes code/hierarchy. 
 

tabs that are trapped by non-space on both sides means tabular data.


I differentiate between code and hierarchy indentation by short-circuiting 
code switch with #:


	code section

#	numbered section


I wrote a web page that reads the KJV aloud using an MS Agent character. 
  Used a control from MS for a menu   I had it voice-activated, but 
that was a drag so I used "web navigator control"  stupid name for 
a menu.  I think it's still up at http://members.cox.net/rovingcowboy/kjv/
 probably won't speak unless you have sapi 4 voice installed, though.
btiffin:
9-Apr-2008
I use makedoc2 right out of rebol.org and one I call makecv, that 
strips out all the ardornment from the default template.  Orginally 
modified for a resume, comes in handy for a few things.  nicomDoc 
for that rare times I need math.  But to be honest, Mulch, the markup 
used in a lot of the rebol.org documentation is pretty nice; but 
to use it you need to document rebol.org <wink><wink>  Sadly, I'm 
now getting too used to wikitext from DocBase.
Group: MySQL ... [web-public]
Dockimbel:
16-Jun-2007
MySQL driver release v.1.1.2 Download at : http://rebol.softinnov.org/mysql

- Fix for an infinite loop issue when the server times out the connection 
(unix platforms).

- TCP keepalive option activated by default (for longstanding idle 
connections).

- Send-cmd function optimized to be a little bit faster and use less 
memory.
- Added new-lines markers to resulting recorsets.

- Added option to switch on/off new-lines marker through port/locals/newlines? 
flag.

- Recycle call removed from read-rows function. Should speed up the 
results a little bit.
- Minor source code cleanup.
Maarten:
12-Nov-2008
I'm here. I think there is a C API call for the number of result 
sets. Primitive, but this is how to do it: http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html
Oldes:
26-Nov-2008
It looks, that there is something wrong with MySQL procedures:
using mysql.r
mysql> CREATE PROCEDURE myproc() SELECT 'it works!';
mysql> call myproc();
+-----------+
| it works! |
+-----------+
| it works! |
+-----------+
1 row(s) in set
mysql> call myproc();
mysql> 

On the second run it returns nothing.

using it in cheyenne gives error:
Error Code :  	800
Description : 	user error !

ERROR 1312 : PROCEDURE webcore.myproc can't return a result set in 
the given context
Near : 	[do-sql 'webcore "call myproc();" txt 3195]
Where : 	none
Oldes:
27-Nov-2008
But there must be a bug anyway .... the first one shows that..  next 
sql query after the procedure call returns none.
Dockimbel:
28-Nov-2008
After analyzing the report you sent to me about issue with sproc. 
MySQL has a odd behaviour, it seems to always return 2 result sets 
for a sproc even when you're expecting only one (the second will 
then be empty). So, after calling a sproc you have to call COPY twice 
(or once after a SEND-SQL) to flush the remaining data. I'm looking 
in the driver to see if I can automate this flushing process.
Dockimbel:
29-Apr-2009
No, there's no such callback. But you can easily add one in my driver 
by inserting a call to "read-net" in the FOREVER loop inside READ-ROWS 
function. Can you describe briefly the situation where you need to 
get large query results and display a progress bar (just curious)?
Group: Web ... Everything web development related [web-public]
Pekr:
4-Feb-2005
now the only problem for me is, that in above code, I want to call 
cgi, so that looking at frame source target site is not easily revealed 
....
Volker:
19-Feb-2005
you can upload a test-script with that shebang and call it from rebol 
as part of the upload.
Anton:
26-Feb-2005
read-thru: func [

    {Read a net file from thru the disk cache. Returns binary, else none 
    on error.}
    url [url! file!]

    /progress callback {Call func [total bytes] during transfer.  Return 
    true.}
    /update "Force update from source site"
    /expand "Auto-decompress after transfer."

    /check {Update only if version, checksum/secure, or date/size do 
    not match.} info

    /to "Specify a file target, not cache." local-file [file! none!]
    /local file data purl loc-path
][
    vbug ['read-thru url info]
    if none? file: path-thru url [return none]
    if local-file [file: local-file]
    if all [not update exists-thru?/check file info] [
        if error? try [data: read/binary file] [return none]
        return data
    ]
    if file? url [
        if error? try [data: read/binary url] [return none]
        return data
    ]
    loc-path: first split-path file
    if data: read-net/progress url :callback [
        if not exists? loc-path [make-dir/deep loc-path]
        if all [expand find/match data "rebpress"] [

            if error? try [data: decompress skip data 8] [return none]
        ]
        write/binary file data
        if all [check block? info info/2] [

            error? try [set-modes file [modification-date: info/2]]
        ]
    ]
    vbug ['read-thru-ok? found? data]
    data
]
Geomol:
16-Jun-2005
It seems, a call to net-log failed, and that was the cause of the 
problem. It's because NetCache has extra header-lines, that e.g. 
Squid doesn't have. See RAMBO 3638.
Graham:
7-Oct-2005
So, to render PDF, I do this

write %/d/rebol/rebgui/www/referral.tex tmp
either zero? ret: call/wait "d:\rebol\rebgui\www\pdflatex.bat" [
            browse/only http://127.0.0.1:8001/referral.pdf
][

            alert join "Failed to print.  Batch file failed with return code 
            of " ret
]

and pdflatex.bat is just

copy referral.tex c:\texmf\
c:
cd \texmf\
pdflatex referral.tex -output-directory=d:\rebol\rebgui\www\
Sunanda:
10-Feb-2006
What you are doing Joe is what we old-timers call pseudoconversational 
processing.

Usually, you can kick much of the complexity upstairs if you have 
a TP monitor supervising the show. Sadly, most web apps don;t (a 
webserver doesn't quite count).

People have been doing this sort of thing for decades in languages 
without continuations support; so, though it's a nice-to-have feature, 
it is not a show-stopper.
Sunanda:
14-Jan-2007
Search engines like to index things a user can see.

Thye get suspicious of anything that appears to be built just for 
the.....No surprising given how much they have been gamed by SERPS 
spammers.

Having a human-readable site map has the same effect as a crawler 
page *and* taks you a long way towards having a site that is navigable 
by people under any conditions.
***

The google-approved method of doing a crawler page is to use what 
they call a sitemap:
http://www.google.com/support/webmasters/bin/topic.py?topic=8476

Someone could easily modify Carl's site-checker to emit a google 
sitemap:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=site-check.r
Will:
3-May-2008
this is part of a script I use to monitor and restart  my vpn and 
ssh tunnel :
connect: does [
		call rejoin [{osascript -e "tell application \"System Events\"
			tell current location of network preferences
				set vpn to current configuration of service \"VPN\"
				if not connected of vpn then
					tell application \"AlmostVPNProMenuBar\"
						stop (profile named \"default\")
					end tell
					connect vpn
					delay 6
					tell application \"AlmostVPNProMenuBar\"
						start (profile named \"default\")
					end tell
				else
					tell application \"AlmostVPNProMenuBar\"
						stop (profile named \"default\")
					end tell
				   disconnect vpn
					delay 6
					connect vpn
					delay 6
					tell application \"AlmostVPNProMenuBar\"
						start (profile named \"default\")
					end tell
				end if
			end tell
		end tell"}]
	]
PeterWood:
3-May-2008
>> stringURL: copy ""
== ""
>> call/output "osascript getURL.as" 
stringURL
== 0
>> theURL: to url! stringURL
== http://news.bbc.co.uk/sport1/shared/fds/hi/statistics/cricket/scorecards/2008/4/14422/html/scorecard.stm%0A
>> 
theURL
== http://news.bbc.co.uk/sport1/shared/fds/hi/statistics/cricket/scorecards/2008/4/14422/html/scorecard.stm%0A
PeterWood:
3-May-2008
>> stringURL: copy ""

== ""

>> call/output "osascript getURL.as" stringURL

== 0

>> theURL: to url! stringURL

 ==http://news.bbc.co.uk/sport1/shared/fds/hi/statistics/cricket/scorecards/2008/4/14422/html/scorecard.stm%0A
>> 
 theURL

==http://news.bbc.co.uk/sport1/shared/fds/hi/statistics/cricket/scorecards/2008/4/14422/html/scorecard.stm%0A
PeterWood:
23-May-2009
Graham: I could spawn another process but have had problems with 
both using 'call to launch a second Rebol process on Mac OS X; any 
console output from the spawned Rebol session is sent to the browser 
in addition to the output it should receive from the cgi process.
PeterWood:
23-May-2009
Sadly, even if you call a shell script that runs the rebol process 
:-(
Group: Announce ... Announcements only - use Ann-reply to chat [web-public]
Ingo:
29-Mar-2006
And I'd call it pre alpha, though it works for me.
Maxim:
10-Jun-2006
Standalone VPRINT (verbose print)  implementation released on rebol.org. 
 This is the most advanced output/logging management utility for 
REBOL AFAIK.


features:  Extremely easy to setup and use (direct drop-in equivalent 
Print/Prin/probe/??  implemented ... even in logs :-),   hierarchical 
nesting of any output (tracing),  transparent logging,  on-the-fly 
selection of output,  "allow and deny"  any combination of individual 
tags to be output/logged ,   postponed output buffer for tight loops 
(not implemented for log). 

BSD license.


Instead of using pre-defined "levels" of verbosity, you associate 
individual print statements with (one or more) conceptual tags.  
Then you can programatically switch the desired output tags on the 
fly.  Effectively allowing only one function or a whole group of 
them to be displayed OR logged with one setup call when they are 
next encountered.    


The logging tag selections are independent from the console output 
so you can choose to display more or less of what you log out.  In 
fact, you can even log different output than what is printed.


This tool is not beta, it is being used in commercial environment. 
 It is very stable AFAIK and fully-featured.
Group: SDK ... [web-public]
Maxim:
21-Sep-2006
about fixing cpu busy look :-)  found a working solution.

; wherever you insert the asynch call  to system wait list... you 
also add 0.1 (or any other appropriate value for your app)
; this will obviously quit the event loop immediately.
append system/ports/wait-list clist
append system/ports/wait-list 0.1


then, where you normally call do-events OR at the end of your app, 
if not using do-events manually... you put the following:
forever [
	do-events 
]

and you have a 0% CPU consuming multiple asynch call loop.  I tried 
with the ping demo provided with async-call and it works perfectly 
on all the tests I did.
Maxim:
21-Sep-2006
here is a new procedure (very effective)

append ports: system/ports/wait-list call-ports-list
append system/ports/wait-list 0.001
forever [
	system/ports/wait-list: []
	wait 0.1
	system/ports/wait-list: ports
	do-events
	if empty? system/view/screen-face/pane [quit]
]
Maxim:
21-Sep-2006
but now, the same application (ping-demo) consumes at most 10% activity 
and often under 5%  and there is almost NO discernable difference 
in view interactivity and overall call feedback !
Maxim:
21-Sep-2006
any refinement just makes call in encap go wild (on windows)  using 
dir as the command
Gabriele:
21-Sep-2006
my async-call function does polling every 0.5 seconds, there is no 
busy loop like in the original port scheme by Nenad (mine is an improvement 
over his code). note that it is GPL. (I would be ok with making it 
BSD, but the original code from Nenad is GPL). it uses timers.r though.
Gabriele:
21-Sep-2006
(i didn't believe it, but windows does not have any way to kill a 
process - you must create a new thread in that process with a call 
to ExitProcess... but this only on NT, older wins have no way to 
do this)
Maxim:
21-Sep-2006
hehe, so where do I get your version of async-call  ;-)
Dockimbel:
21-Sep-2006
No restriction using my version of async-call, I didn't remember 
it was GPL, it should be BSD. I'll change that .
Gabriele:
21-Sep-2006
http://www.colellachiara.com/soft/async-call-definition.r
Dockimbel:
21-Sep-2006
I heard once or twice that some exe won't run correctly under asyn-call 
(freezing or no output).
Dockimbel:
21-Sep-2006
The busy loop is generated by REBOL itself, it's a side effect i 
was using in async-call to do busy looping on the pipe while allowing 
other port events to be processed.
BrianH:
23-Sep-2006
Nope, just a resource editor, and those just call Windows APIs that 
Encap can call.
Maxim:
28-Sep-2006
everyone, I just discovered the reason 'CALL hangs (wihtin SDK or 
straight within rebol/view 1.3.2)
Maxim:
28-Sep-2006
if you do not have the console open, the moment CALL would print 
out something, it gets lost in stdout hell.
Maxim:
28-Sep-2006
so, basically you should always do:


print " " to make sure you have a rebol console window up (or print 
to stdout if using cgi option in view or SDK) otherwise, call hangs 
indefinitely, occupying 100% of your cpu!
Maxim:
28-Sep-2006
(or use Gabriele's async-call  ;-)
Maxim:
28-Sep-2006
(or dockimbel's async-call)
Maxim:
8-Nov-2006
Quoting Gabriele: "Maxim, the Detective uses the cgi option, and 
prints to the dos command prompt if you call it from there (try running 
"nren help"). It does not use call though, but async-call, but i 
don't remember problems with call + cgi options."
Gregg:
8-Nov-2006
I know I've never gotten it to work without piping, but I haven't 
tried it with async-call.
Gregg:
1-Dec-2006
GetFileVersionInfo info isn't a real simple API call either. Have 
to figure a few things out in order to call it from REBOL.
Gregg:
1-Dec-2006
GetFileVersionInfo is in %version.dll. First you call GetFileVersionInfoSize, 
then GetFileVersionInfo (using the size you got in the GetFileVersionInfoSize 
call. Then you ca VerQueryValue for each item you want.
Henrik:
8-Sep-2007
when I start an encapsulated binary with call and within that binary 
call yet another encapsulated binary (this is an installation process, 
hence the cascading execution), the second time, I get a:

PROGRAM ERROR: Invalid encapsulated program data.


is this a security issue? because when the binary is run from Explorer 
it runs fine.
Henrik:
8-Sep-2007
solved by entering the full path to the executable when doing the 
call.
BrianH:
28-May-2008
I suspect that applications are started using call and scripts with 
shellexecute.
eFishAnt:
28-May-2008
but in America, we cannot execute shells because of suspicion, we 
must call for proof by the script of the law.
Louis:
3-Aug-2008
'call' command to call dar (Disk Archive), but I get this:
Louis:
3-Aug-2008
---- exception type = [DECI] ----------
[source]
    deci.cpp : digit_htoc : invalid decimal digit
    deci.cpp : digit_htoc : 
    deci::deci : string
[most outside call]
-----------------------------------

INTERNAL ERROR, PLEASE REPORT THE PREVIOUS OUTPUT TO MAINTAINER
Oldes:
3-Mar-2009
so the 'do call is somewhere else.
amacleod:
5-Mar-2009
Any reason why call to an encapped exe does not show the window....

It starts up (I can see it in task Manager) uses ram but the view 
window does not pop up...
Graham:
5-Mar-2009
try using call/show
amacleod:
5-Mar-2009
call/show worked..
thanks!
Henrik:
3-Oct-2009
I simply used CALL to call encap and reshack sequentially. Kind of 
a make-file.
Maxim:
4-Oct-2009
I have massive make files like this which do all kinds of script 
fixup, directory creations, zipping of archives, backups... and call 
res hacker... its the easiest way to encap stuff.
Maxim:
4-Oct-2009
in the SDK docs, there is an example of a reshacker script call.
Graham:
13-Mar-2010
this is Ashley's code 


call/output {reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Fonts"} fonts: copy ""


but although it works for me, I see that on other systems it just 
locks up.
Group: !RebGUI ... A lightweight alternative to VID [web-public]
Pekr:
9-Jun-2005
When we programmed in Visual Objects, we could override default class 
behavior and sometimes it was enough to add some strange parameter 
to function call, e.g. -1 or -4, don't remember, and you started 
to receive also otherwise blocked events ...
ChristianE:
12-Jun-2005
Now that's what I call understatement! You're definitly one of the 
VID style gurus, I'm sure you can handle that little rounding error 
:D
Graham:
12-Jun-2005
need some type of convention to call third party scripts
Ashley:
16-Jun-2005
Anton

 1) Code size. What it loses in code size it gains in aesthetics and 
 simplified behaviour (check out the request-color and request-date 
 actions in %tour.r to see the extra "state" code required by the 
 original implementation). I like Brian's base64 solution.

 2) Tab-panel color: I've based this on the WinXP color scheme. Try 
 changing it to colors/window, it just doesn't look right. But slider 
 can be used on a colors/widget or colors/window background. WinXP 
 solves this by using a gradient / edge so that it is distinguishable 
 on either. So for RebGUI, a number of solutions are possible:

  - add a new colors/slider background that "works" with both widget 
  and windows background colors

  - add a new colors/tab-panel background that "works" with both widget 
  and windows background colors

  - use an effect like gradient to distinguish the slider background 
  color
		- or edge
		- or?
	I'm open to suggestions on this one. ;)

Brian
	1) I like the in-line image solution

 2) I like the base 64 solution even better! One problem, the button-down 
 image renders the same as button-up (i.e. 1st and 2nd images render 
 the same ... even though a quick glance at the data suggests they 
 are different?)

Graham
	Any examples where the desired behaviour is used?

shadwolf

 I did the same (replaced scroller call with "slider data [arrows]") 
 for text-list / table and it worked fine for me. Check for code that 
 tried to reference sub-faces in the old scroller widget (as Anton 
 refactored slider to use just one face).
Kaj:
6-Sep-2005
Hm, those were my first programs in 6502 machine code: validating 
field input routines to call from Atari BASIC. :-)
shadwolf:
5-Oct-2005
for example  my-tab/dealloc-tab 2 (this ill call for destruction 
of the tab insert and countainer and redraw of the remaining tabs 
... )
Group: DevCon2005 ... DevCon 2005 [web-public]
[unknown: 9]:
13-Sep-2005
Yeah, there is a big movement to make WiFI free in america, I would 
have to agree, it is worth it.  Like being able to call 911 for free 
from a payphone.  Perhaps the max throughput would have a threshold.


Anyway, Europe, well, I guess I will be always seeking an office 
where I can plug in.
eFishAnt:
26-Sep-2005
If you do get pickpocketed, then you can call her in for reinforcements.
Group: rebcode ... Rebcode discussion [web-public]
Pekr:
30-Oct-2005
I would like to know how is it with trapping the errors? I read available 
rebcode docs, and it seems to me that you can make your rebol process 
to fail by wrong rebcode code, right? Is it  theoretically possible 
to wrap rebcode call into 'try, so if it fails, error is returned 
instead of process crash?
BrianH:
5-Nov-2005
But given your cases here, keep in mind that the only instruction 
now that takes a block of offsets is BRAB. As I have said above, 
BRAB with relative jumps means that it is only practical to use an 
offset block from a single branch statement. Branching to a block 
referenced by a word is only practical for rather obscure circumatances 
(for instance a multistate machine). So for most code using brab 
the offset block will be placed right there in the statement., so 
you will definitely know the starting position. But your second case 
is a little off, because with relative jumps, you don't need to know 
the absolute position of anything.


Assuming a branch offset block like the one in your second case, 
the relevant section of the code block you are using starts with 
the beginning position of the first target statement and ends with 
the beginning position of the last target statement. Branch offsets 
are calculated relative to the end of the branch statement, a position 
we will call the source. With relative jumps, you don't have to take 
into account the absolute position of the end of the branch statement, 
you just need to count the positions between the source source and 
the target. You don't need to know that any added instructions are 
on line 37 (a meaningless concept in rebcode because lines are ignored), 
you only need to tell whether the added instructions are in between 
the source and the target, and then increase the offsets on that 
side of the branch accordingly.


For most branches you will probably be better off with labels and 
let the assembler do the work. But for code snippets, what I often 
do is just do the intiial writing with labels, put the code in a 
rebcode block and let the assembler do the offset calculations. Then 
I copy the fixed up code, remove any label statements and adjust 
affected offsets by two for every removed label statement. Let the 
assembler do most of the work.
Maxim:
9-Dec-2006
imagine being able to call rebcode directly within AGG draw loop 
 :-)
Coccinelle:
20-Feb-2007
Another question : Is possible to do something like a call within 
rebcode ?
Steeve:
20-Feb-2007
i have a main loop wich do the branchements and call the rebcode 
routines
Steeve:
20-Feb-2007
first i parse Z80 opcodes and execute them step by step, then they 
are concatened to build sub-routines and cached, if sub-routines 
are mantory another time, then i call cached sub-routines instead 
of reparse the opcodes.
Steeve:
20-Feb-2007
all branches are converted into call
BrianH:
20-Feb-2007
Call of function or continuation? (Sorry if your English doesn't 
include computer-science terms)
BrianH:
20-Feb-2007
Meaning, does the call return?
Coccinelle:
23-Feb-2007
peut-être que cela te serait utile :
; Patch to rebcode assembler

; - Add setl opcode -> setl: ["Set variable to label offset (0 based 
offset)" word! word!]
; - very usefull to call sub routine

system/internal/rebcode*: make system/internal/rebcode* [
    fix-bl: func [block /local labels here label][
	    labels: make block! 16 
	    block-action: :fix-bl 
	    if debug? [print "=== Fixing binding and labels... ==="] 
	    parse block [
	        some [
	            here: 
	            subblock-rule (here/1: bind here/1 words) 
	            | 

             'label word! (here/1: bind here/1 words insert insert tail labels 
             here/2 index? here) 
                |
                'setl word! word!
	            | 
	            opcode-rule (here/1: bind here/1 words) 
	            | 
                skip (print "LA" error here)
	        ]
	    ] 
	    parse block [
	        some [
	            here: 
	            ['bra word! | 'brat word! | 'braf word!] (
	                fix-label labels at here 2 here 0
	            ) 
	            | 
	            'brab into [some word!] word! (
	                label: here/2 
	                forall label [
	                    fix-label labels label here -1
	                ]
	            ) 
	            | 
	            'brab word! word! (
	                fix-label labels at here 2 here -1
	            ) 
	            |
	            'setl word! word! (
	            	here/1: 'set
	            	here/1: bind here/1 words
	            	here/3: -1 + any [
	            		select labels to word! here/3

               error/with here join "Missing label '" [here/3 ":"]
            		]
	            )
	            | 
	            opcode-rule 
	            | 
                skip (print "ICI" error here)
	        ]
	    ]
    ]
	system/internal/assemble: func [
	    "REBCODE Assembler" 
	    body 
	    /local frame here do-blks labels tmp rule
	][
	    body: second :body 
	    fix-bl body
	]
]
Coccinelle:
23-Feb-2007
Usefull to call sub routine :
test: rebcode [
	i [integer!]
	/local ret-ofs begin
][
label begin
	brab [lab-1 lab-2] i

label lab-1
	print "call from lab-1"
	setl ret-ofs ret-1
	bra sub
label ret-1
	print "returned to ret-1"
	exit

label lab-2
	print "call from lab-2"
	setl ret-ofs ret-2
	bra sub
label ret-2
	print "returned to ret-2"
	exit

label sub
	print "pass thru sub"
	brab begin ret-ofs
]
Coccinelle:
23-Feb-2007
>> test 0
call from lab-1
pass thru sub
returned to ret-1
>> test 1
call from lab-2
pass thru sub
returned to ret-2
>>
BrianH:
23-Feb-2007
Fortunately you can call the natives with the apply opcode and get 
the best of both worlds.
BrianH:
23-Feb-2007
It's what the modern processor designers call register renaming :)
Group: !REBOL3-OLD1 ... [web-public]
Volker:
11-Apr-2006
Technically it could work, if 'in would put its argument in front 
of the last call

> find pot in kitchen ; Kitchen would be passed as first argument 
now.
would be the same as 
> find kitchen pot
(sadly 'in is not available, and maybe its to biga hack?)
Gregg:
14-Apr-2006
The current library interface is servicable, but could be improved.

For example, char arrays in C structs are a real pain to deal with,

there is redundancy if you're importing a number of routines, from 

the same library, and extra work is required to deal with pointers
to values.

The biggest issue for me seems to be that I have to use COMPOSE 

heavily to get the results I want, or there's a lot of duplication
in struct and routine defs.

--- Easier Routine Declarations

The only thing I've addressed in my lib interface dialect is
making it easier to declare routines. I posted it to REBOl.org
for discussion:


http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=lib-dialect.r

--- Pointers


This is maybe a bit of an extreme example, but I had to do it, so 
it's not purely theoretical.

    LPINT-def: [value [integer!]] none

    LPINT: make struct! LPINT-def none

This struct shows where a nested struct is needed.

    _FAX_JOB_PARAM-def: compose/deep/only [

        SizeOfStruct    [integer!]      ; DWORD structure size, in bytes

        RecipientNumber [string!]       ; LPCTSTR   pointer to recipient's 
        fax number

        RecipientName   [string!]       ; LPCTSTR   pointer to recipient's 
        name

        Tsid            [string!]       ; LPCTSTR   pointer to transmitting 
        station identifier

        SenderName      [string!]       ; LPCTSTR   pointer to sender's name

        ;SenderName      [struct! [value [string!]]]       ; LPCTSTR   pointer 
        to sender's name

        SenderCompany   [string!]       ; LPCTSTR   pointer to sender's company

        SenderDept      [string!]       ; LPCTSTR   pointer to sender's department

        BillingCode     [string!]       ; LPCTSTR   pointer to billing code

        ScheduleAction  [integer!]      ; DWORD job scheduling action code

        ;ScheduleTime    [struct! (SYSTEMTIME-def)]        ; SYSTEMTIME  
          time to send fax
            wYear       [short]
            wMonth      [short]
            wDayOfWeek  [short]
            wDay        [short]
            wHour       [short]
            wMinute     [short]
            wSecond     [short]
            wMilliseconds [short]

        DeliveryReportType  [integer!]      ; DWORD e-mail delivery report 
        type

        DeliveryReportAddress [string!]     ; LPCTSTR   pointer to e-mail 
        address

        DocumentName        [string!]       ; LPCTSTR   pointer to document 
        name to display
        CallHandle          [integer!]      ; HCALL reserved
        ;_PTR   Reserved[3]  [integer!]      ; DWORD must be zero
        _PTR-0  [integer!]      ; DWORD must be zero
        _PTR-1  [integer!]      ; DWORD must be zero
        _PTR-2  [integer!]      ; DWORD must be zero
        _PTR-3  [integer!]      ; DWORD must be zero
    ]
    _FAX_JOB_PARAM: make struct! _FAX_JOB_PARAM-def none
    _FAX_JOB_PARAM/SizeOfStruct: length? third _FAX_JOB_PARAM

    fax-complete-job-params: make routine! compose/deep/only [

        JobParams     [struct! (LPINT-def)] ; ptr to job information struct

        CoverPageInfo [struct! (LPINT-def)] ; ptr to cover page struct
        return:       [integer!]
    ] winfax.dll "FaxCompleteJobParamsA"

So, the API call returns pointers to structs containing the 
data we want; to get it we need to dereference the pointers
after the call.

    complete-job-params: func [
        /local
            params-ptr cover-ptr    ; API return pointers

            params cover            ; REBOL structs with data from API
    ][
        ; allocate return pointer structs for API call
        params-ptr: make-LPINT
        cover-ptr: make-LPINT

        ; make the API call

        reduce either 0 <> fax-complete-job-params params-ptr cover-ptr [

            ; get data from pointers returned by the API

            params: get-dereferenced-data params-ptr _FAX_JOB_PARAM-def

            cover:  get-dereferenced-data cover-ptr  _FAX_COVERPAGE_INFO-def
        ...



Getting the de-ref'd data is the real pain, and seems like it might
be unsafe in the way I did it, though it worked.

    get-dereferenced-data: func [

        {Given a pointer to memory, copy the target data into a REBOL struct.}

        pointer [struct!]   "LPINT structure whose /value is the data pointer"

        struct-def [block!] "The struct you want returned with data"
        /local struct data orig-pointer result
    ] [

        struct: make struct! compose/deep/only [ ; make wrapper struct
            sub [struct! (struct-def)]
        ] none

        orig-pointer: third struct              ; store original inner pointer

        change third struct third pointer       ; change inner pointer to 
        ref'd data

        data: copy third struct/sub             ; copy data from the inner 
        struct

        change third struct orig-pointer        ; restore inner pointer

        result: make struct! struct-def none    ; make result struct

        change third result data                ; change data in result struct
        struct: data: orig-pointer: none
        result
    ]


--- char arrays in structs, or as routine parameters

You can't just declare a fixed size block or string to do this, 
you have to (AFAIK), have individual elements for each item.
That's a huge pain if you have a 128 element array, so I end
up generating them dynamically. I think that was Cyphre's idea
originally, but I don't have notes on it.

    make-elements: func [name count type /local result][
        if not word? type [type: type?/word type]
        result: copy "^/"
        repeat i count [
            append result join name [i " [" type "]" newline]
        ]
        to block! result
    ]

    GUID: make struct! GUID-def: compose [
        Data1   [integer!]  ; unsigned long
        Data2   [short]     ; unsigned short
        Data3   [short]     ; unsigned short
        (make-elements 'Data4 8 #"@")  ; unsigned char
    ] none


--- MAKE-ing structs

How do other people make structs from prototypes? 

    make-struct: func [prototype /copy /with data] [
        make struct! prototype either copy
            [second prototype]
            [either with [reduce [data]][none]]
    ]


--- BSTR type

I've only needed it for one project, but it might be worth 
finding out if it would be worth adding BSTR support for
Windows, as a routine datatype.
Volker:
20-Apr-2006
A thing that hurts is this copy-thing. You have to know it, that 
effct occurs everywhere. Thats what i call a core-"feature".
Volker:
20-Apr-2006
Currently i thnik about including a web-server and use cgis which 
call cgis. then i have no need open things up later, just close them 
enough, do job, exit.
Maxim:
20-Apr-2006
can you imagine that not being able to know the current login name 
is case enough for REBOL not being used in multiuser office environments. 
 that is something which MUST be addressed in R3 its a simple call 
to the socket lib (IIRC) and if protected, then that info can force 
apps into being multi-user oriented.
Maxim:
20-Apr-2006
its possible some things can be done with call... but its tedious 
in any case, and not very cross-platform.
Volker:
20-Apr-2006
Call it cookies?
Gabriele:
26-Apr-2006
Maxim: no, it does not solve the copy problem; however, closures 
need to copy deep the function body at each call; so, it somewhat 
solves the copy problem as a side effect (only for blocks and parens 
though, probably, as there's no need to copy anything else). (however, 
i would not rely on it, since for example it would be a useful optimization 
not to copy empty blocks or blocks that contain no words etc)
601 / 2491123456[7] 89...2122232425