• 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
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 23501 end: 23600]

world-name: r3wp

Group: Rebol School ... Rebol School [web-public]
Graham:
4-Jan-2009
Gregg ... it's supposed to be real time .. push a button and see 
the graph.  I guess this is the same as Steeve suggests .. wait until 
the results come in, or timeout ...
Gregg:
5-Jan-2009
If you can render the graph with partial data, do it each time data 
comes in, or set up a rendering callback that the data callback calls. 
Polling intervals (if needed) can be pretty short without burning 
the CPU. If it's on the net, there's no guarantee of real time. :-)
Graham:
5-Jan-2009
That's a thought ... it's on localhost ...
Graham:
5-Jan-2009
the rendering is in a browser ... so that's not going to work unfortunately 
as I can't make the browser refresh.
Maxim:
5-Jan-2009
you can just to a small ping to detect changes... it can even be 
a boolean request, thus really tiny and fast.
Maxim:
5-Jan-2009
I haven't done it myself, but where I used to work, the guy would 
put an invisible div with a refresh rate on it. and the contents 
was dynamic, whenever changes occured it triggered the calls for 
the other divs on the page.
Graham:
5-Jan-2009
Using javascript to solve a rebol programming problem :)
Maxim:
5-Jan-2009
well... isn't it a web problem?   the browser ...  yuk.
Graham:
5-Jan-2009
No, it's a Rebol problem.
Graham:
5-Jan-2009
If I used a different way of rendering the graph, I have the same 
problem back again.
Maxim:
5-Jan-2009
but you can render within a rebol client?
Graham:
5-Jan-2009
I think I'll have a go at my first idea which was to create a stack 
of functions
Maxim:
5-Jan-2009
if you can do it within view... then you problem seems pretty simple 
to me... I did a 4 way async system with on-demand buttons, loading 
data from the net and bg transfers syncing all running clients with 
a central cerver.
Maxim:
5-Jan-2009
one of the threads was using google as a meta-engine.
Maxim:
5-Jan-2009
so... can the graph data be viewed within a rebol window?
Maxim:
5-Jan-2009
each context had an init, a buffer collection and an on-close event 
.
Maxim:
5-Jan-2009
and I used a simple face timer to poll through the async contexts 
to see if the xfer was finished.  then call the on-close event. and 
remove it from the list of "pending" xfers.
Maxim:
5-Jan-2009
I set the face timer to 30 times a second, and really.... cpu useage 
was at 0% on my system.
Maxim:
5-Jan-2009
the checkup loop was something like


you can do it that way too... but you might get into some strange 
stack issues, cause you end up handling  port messages from one port 
to another within the messaging stack... but I guess a simple test 
sould suffice to see if its stable or not.


in my case, the gui had to stay responsive, since the xfer-contexts 
had cancel methods, which interrupted any xfer in real-time, and 
the whole gui had to still handle events smoothly, like scrolling 
a huge list, while it was adding items to that list, as it parsed 
the return value from the google search engine  :-)
Maxim:
5-Jan-2009
or using an integer with bit handling, it could be as simple as 

; a four bit setup
unless done-bits = 7 [
]
Maxim:
5-Jan-2009
the bit example is just a 20 year old programming habit... hehehe 
 I do find the bit sets a bit awkwards...  but I use them profusely 
in parse... 
go figure... hehehe
Graham:
5-Jan-2009
So, better programmers will use more of the language than others. 
 Which is why it's a good idea to read other people's code :)
Graham:
5-Jan-2009
Compactness is a measure of how easily a design can fit inside one's 
head.
Graham:
8-Jan-2009
Well, I've got it working mostly.  sometimes it doesn't kick off 
an async function ... and seems to need a wait here and there :(
Maarten:
8-Jan-2009
REBOL is very compact. Everything is either a word or a value, and 
even words can be values.
BrianH:
8-Jan-2009
Once you start adding Draw into it though, I lose the whole. With 
R2 there is also the broken port model, design flaws and legacy stuff, 
so I lose the big picture a lot quicker. Python I don't know much 
about, and C is getting more complex all the time. I guess it depends 
on the head.
Maarten:
8-Jan-2009
LOL.... the toplogy of the head determines if you can wrap it around 
a language...
[unknown: 5]:
11-Jan-2009
Here is a post about the read-io function for newbies.  http://www.tretbase.com/forum/viewtopic.php?f=8&t=55&p=128#p128
sqlab:
13-Jan-2009
I remember Carl writing, that here is no need anymore to use read-io 
and write-io after a certain version.

But I use it still sometimes to see when data could not be written, 
because there is no space anymore  left on disk
Maxim:
13-Jan-2009
IIRC, for a server I did, I had to use read-io, don't rememeber why 
but it made it simpler in a complex and timed server multi-port management 
loop (direct tcp socket handling).
Gabriele:
14-Jan-2009
the only case where you need read-io and write-io currently is if 
you are using async-modes. sqlab's may be a good case too. i don't 
know of others at this point.
Gabriele:
15-Jan-2009
because async-modes is a hack in rebol, and only works with read-io 
and write-io.
[unknown: 5]:
15-Jan-2009
I hope you can expound on that when you get a chance.
Graham:
16-Jan-2009
you've got a block inside a block
Graham:
16-Jan-2009
you can't add 1 to a block
DanielP:
16-Jan-2009
ok, but when I use the same code without insert it in a function, 
it work perfectly
Brock:
30-Jan-2009
I've got a graphic related project that I want to start working on. 
 It deals with enhancing Frank S's code that Graham enhanced further... 
http://www.rebol.org/view-script.r?script=paintplus.r
Brock:
30-Jan-2009
I'd like to be able to make the objects that get drawn on the page 
true objects that can later be dragged to a different location.
Brock:
30-Jan-2009
The end result would be similar to Vector drawing program with the 
output being a DRAW dialect.  Any interest?
Brock:
30-Jan-2009
I'd be happy with a draw block.  My plan is to store the draw block 
in a database record so the image can be built and the objects remain 
editable if fine-tuning is required.  I've been playing with sqlite.r 
for the storage side of things.
Brock:
30-Jan-2009
Graham, no I haven't.  I'll take a look at canvas, I don't recall 
any discussion about this in the past.  (I read, I just don't remember 
:-(  )
Reichart:
30-Jan-2009
I learned something a long time ago about formats.  Lock it down 
up front, and make sure you can convert on the fly.  If you don't, 
you waste a lot of time later.
Also, treat everything as a "event".   This way Undo works.
Graham:
30-Jan-2009
Geomol's paint program is a copy of the famous Amiga paint who's 
name now escapes me.
Brock:
30-Jan-2009
Yes, okay, I remember.  I also see the group here in AltME.  Likely 
too complicated for my needs.  I want to build a db interface that 
shows the image and stores meta-data about the image.  I want to 
be able to edit the image if needed, or add new images and content 
using the drawing packing that is included.  Essentially this is 
for building drills for various different sports.  With all the drills 
built, a practice plan can then be built.
Brock:
30-Jan-2009
The final output would be a printed version of the collection of 
drills that were selected, likely via PDF-maker , or just HTML.
Reichart:
30-Jan-2009
Well, if you assume that your internal storage method is one which 
just needs to be "converted" to an other, like CSV => XML, you might 
be in for a suprise when trying to model a real time dynamic system 
with Undo like a paint program with a file format as export.


For example, do you store a given object once, with the history of 
the object elsewhere, or do you store the object together, with the 
most recent at the top of the list.

Also, Do you store objects, and actions, or both togther.
Gregg:
31-Jan-2009
I did a primitive whiteboard a number of years ago, but I cheated. 
When you placed a line, arrow, etc. there were little faces attached 
to the drag points that acted as handles.
Brock:
31-Jan-2009
Graham, I haven't really enhanced it as far as new features, more 
added a little more of what already existed ;-) .  I've added a different 
line type and some predefined text symbols for quick 'drag and drop' 
of frequently used objects.  Oh, and connected the SAVE button to 
write to the sqlite backend.  Nothing earth-shattering by any stretch. 
 I'll post what I have to my MS Skydrive for you to access it.
Brock:
31-Jan-2009
What I want is the ability to move the shapes from the drawing area 
once they have been drawn.  Currently, you have the UNDO feature 
which you implemented to remove the last item in the draw stack. 
 But I want the ability to click on any line drawn, get some sizing 
handles, and move the handles to reposition the location of the object. 
 So you don't have to redraw an entire image just to fine tune the 
placement of a line that was placed early in the draw session.
Brock:
1-Feb-2009
Yes, a pain, but 25 GB of free storage I'll take any day.
Brock:
1-Feb-2009
It's pretty slow to transfer the files as well.  I tried transfering 
a 49 MB file and it took near an hour to transfer.  I don't do this 
often, but that seemed excessive to me.
Henrik:
1-Feb-2009
If it's for backup, Mozy is OK. It works in the background here and 
you get a free 2 GB account.
DanielP:
4-Feb-2009
Hi. I have a 2-VID-windows program and I want to modify the layout 
(e.g add images) of the first window by clicking on buttons of the 
second window. How can I do that please ?
Henrik:
4-Feb-2009
Each window is a face, so you treat it the same as if they were two 
panes in the same window.
Brock:
5-Feb-2009
I've added a zip file with the images and scripts needed for my sample 
application mentioned above.

http://cid-a6f7a3fe9493bb85.skydrive.live.com/self.aspx/Rebol/PracticePlanner.zip
Brock:
5-Feb-2009
If I can blend these two functionalities into one, I'd have the best 
of both worlds.  Essentially I'm looking to build a Vector-like draw 
program, but as simple and small as possible.  This would allow drag 
points onto any selected object in order to allow for resizing or 
fine-tuning of object placement.  As I said previously, I believe 
Anton has done some work with drag-points on lines etc, but don't 
remember the script name that did this.  Warp-image.r also does something 
similar with an image.
Brock:
5-Feb-2009
I think this would be a very interesting project to undertake.  It 
would be nice to have both the smallest paint program, and vector 
drawing program in Rebol.
kib2:
6-Feb-2009
Hi, I'm starting with Rebol and I'm asking myself how to split a 
given string according to a pattern delimiter : "2 linebreaks or 
more" ?
kib2:
6-Feb-2009
Thanks a lot Geomol (can you explain to me a bit your snippet? I'm 
currently studying the parse dialect)
Geomol:
6-Feb-2009
The second argument to parse can be a string, and then parse split 
up the first argument, or the second argument can be a block of parsing 
rules. out is just my output block.

So the parsing rules go:
1) first any of a sub-block of sub-rules

2) sub-block copy the input string to a point, where two newlines 
are found, the result in the variable: arg

3) the paranthesis is evaluated (as normal REBOL code), and it append 
arg (the part of the string, we just copied) to the variable out
4) the parser then skip any number of newlines (2, 3 or more)

5) when the sub-rules are not valid any longer, the input string 
is copied till the end (and appended to out as before)
kib2:
6-Feb-2009
Geomol: nice, I've made a print version of a nice doc I've found 
here http://www.codeconscious.com/rebol/parse-tutorial.html, but 
I don't know if it's up to date.
Geomol:
6-Feb-2009
I think, parsing in REBOL is really strong. It makes us read about 
any kind of input without too much hazzle (once you've taken the 
time to get a feel for parse).
Geomol:
6-Feb-2009
What was the definition of a dialect? Something that LOAD can handle?
Geomol:
6-Feb-2009
kib, I would say REBOL parse is a lot better than regexps. Yes, native 
words in REBOL is implemented in C.
Geomol:
6-Feb-2009
I have some rather large paring rules here:
http://www.fys.ku.dk/~niclasen/nicomdoc/nicomdoc.r
http://www.fys.ku.dk/~niclasen/nicomdoc/ndmath.r
and it's very fast to create a huge document from those rules.
kib2:
6-Feb-2009
Geomol: funny, I'm currently trying to port one of my Python project 
to Rebol : a markup langage with html/latex output !
shadwolf:
6-Feb-2009
ofcourse parsing a string with any language is a ground base (one 
of the 1st exercice of coding a studient will learn )
kib2:
6-Feb-2009
shadwolf: certainly, but it depends on what langage you're coding! 
Rebol seems a good candidate for such tasks. I'm also learning Factor, 
and I can tell you that it's a way harder (but maybe that's because 
it lacks some docs).
Geomol:
6-Feb-2009
kib, after I parse the input to RebXML format, I parse the RebXML 
to HTML with: http://www.fys.ku.dk/~niclasen/nicomdoc/ndrebxml2html.r

So 2 huge sets of rules (3 with math) is into play, and the final 
document is there in a matter of seconds.
Geomol:
6-Feb-2009
kib, so I find parse to be very fast, and this real example is a 
good showcase, I think.
shadwolf:
6-Feb-2009
kib2 yes because rebol concept relies on 2 things in fact objects 
and dialect and as dialects are linked to parse system parse is the 
real thing that makes rebol a different language
shadwolf:
6-Feb-2009
in rebol you can go from real ground to real abstractive concepts 
(from "a" to "<body" for example
kib2:
6-Feb-2009
shadwolf: working with strings in C is a real headhache, I agree. 
but it's efficient. The more I know about Rebol, the more I like 
it.
shadwolf:
6-Feb-2009
parse works as a swich/case too since once a flag is found you can 
call external function to process the following datas
kib2:
6-Feb-2009
Geomol: I've been misunderstood : I was asking if you can output 
a LaTeX doc from your markup engine.
kib2:
6-Feb-2009
shadwolf: you're a Frenchie ?
shadwolf:
6-Feb-2009
my engine works on 2 pass  ( i know that's a shame etc... ok but 
i wirted it in 2 days :P)
shadwolf:
6-Feb-2009
but rebol is easy you don't have to practice it 10 hour a day to 
be able to do insane things with it
shadwolf:
6-Feb-2009
i would say parse is really the thing i need to understand further 
and heavy work on (you can write a 500  pages book only about parse 
and all it's subtilities)
Geomol:
6-Feb-2009
There's even a local REBOL page for you french guys: http://www.rebol-france.org/
kib2:
6-Feb-2009
Thanks for those links (I already know rebol-france). I just discovered 
there are a lot of books on Rebol (I've bought the last one in French): 
http://www.rebol-france.org/index.cfm?content_id=13
kib2:
6-Feb-2009
shadwolf: from what I've read, it's just a cgi script....but free.fr 
does not support them!
shadwolf:
6-Feb-2009
cheyene! is a web server writed in rebol to execute rebolscripts 
but i don't know free hosters proposing it
kib2:
6-Feb-2009
ok, thanks. I'll have a look at it.
Henrik:
6-Feb-2009
I use Cheyenne with my HTML dialect to host small dynamic pages that 
take a few minutes to write.
shadwolf:
6-Feb-2009
toggle ar too big in my opinion a toggle is to be put in a list of 
parameters
Geomol:
6-Feb-2009
kib, if you wanna see, what can be done with REBOL, take a look at 
Canvas RPaint (see group Canvas). It's an port of the old DPaint 
for the Amiga made in REBOL. More than 12'000 lines of REBOL source 
(600kb) or 176kb compressed.
kib2:
8-Feb-2009
In fact, I don't even know if it's the right way to write a 2 arguments 
function.
Geomol:
8-Feb-2009
It doesn't work, because RETOUR isn't defined. You just declare it 
(as a block). You need to actually make the block.
Geomol:
8-Feb-2009
Examples of words, that get declared (defined or known from now on) 
and also get build:

a: none
b: 42
c: make block! 16


If you specify words to be local to a function, they don't get declared 
(build). It just mean, that when you refer to those words, they will 
be local to the function.
kib2:
8-Feb-2009
Thanks Geomol, that's clearer now. I had to go for lunch, I'll be 
back in a few mins. (I've got a lot of questions, I find my book 
not clear at all).
Geomol:
8-Feb-2009
Another version, you might find useful (at least to see how to make 
the same thing in different ways, and with different number of variables):

fibonacci: func [
	i
	/local a b
][
	set [a b] [1 1]
	 loop i [
		print a
		set [a b] reduce [b a + b]
	]
]
Geomol:
8-Feb-2009
I guess, words like "arrays" and "lists" are common in other languages. 
In REBOL, you'll see the word "series" a lot.
Geomol:
8-Feb-2009
A block is a series of elements (inside [ and ]).
Henrik:
8-Feb-2009
you can ask whether a datatype is a series with 'series?.
kib2:
8-Feb-2009
So what's the difference between a block and a serie ? A serie is 
a block for me no ? (the inverse may not be right)
Henrik:
8-Feb-2009
not all series are alike. We tend to differ between strings and blocks 
and blocks come in a few different types, optimized for specific 
use, but they may hold the same content.
Geomol:
8-Feb-2009
A computer language theorist might tell you differences between arrays, 
lists and series. I suggest, you take the practical view and look 
at what datatypes, you find in REBOL.
Henrik:
8-Feb-2009
kib2, let REBOL decide what is what, by asking the datatype:

>> series? [a b c]
== true
>> series? "abc"
== true


You can do that, because REBOL has so many different datatypes, allowing 
you to be precise in your expression.
Henrik:
8-Feb-2009
yeah, email! is actually an exception. it doesn't work very well. 
you will find that a few types can't be serialized properly, which 
means an email! can't be recognized. but it works for the majority 
of types.
23501 / 6460812345...234235[236] 237238...643644645646647