Geoff,
It does have a certain elegance to it --and it preserves the subject
header of 17 LINES of CODE ;-)
The 3 MINUTES has grown just a tad to get it to it's current evolution.
I just don't like the long math line to get the hours straight --
could there be a simpler way?
Now all we need
On Jun 9, 2005, at 5:51 AM, Dennis Brown wrote:
I also just took out the hour 'if' statement in yours, so that
minutes and hours are updated together after only 10 seconds from
start. The extra time for doing the hours every ten seconds is
trivial.
But that's just...wrong ;-) I just s
I considered this option and went the other way for a couple reasons.
It seemed more natural to leave it in one handler. It takes more
lines of code to split the handlers up. I wonder what the overhead is
to have three messages pending as opposed to one.
That said, I think this is the way t
Geoff,
I also just took out the hour 'if' statement in yours, so that
minutes and hours are updated together after only 10 seconds from
start. The extra time for doing the hours every ten seconds is trivial.
Dennis
On Jun 9, 2005, at 1:12 AM, Geoff Canyon wrote:
On Jun 8, 2005, at 8:40
On Jun 8, 2005, at 8:40 AM, Eric Chatonet wrote:
Just a little thing: with this new very clever code, the clock will
not be at time just when opening ;-)
So 4 lines more and 2 repetitions that are not satisfying: I bet
you will find a better solution in 3 minutes!
Thanks for the compliment.
Geoff,
Your new idea gave me an idea. Make three handlers --one for each
hand (I hope I got the hour math straight)
You can find it in my user space (see3d).
Dennis
on openCard
setSeconds; setMinutes; setHours
end openCard
on setSeconds
send setSeconds to me in 1-(the long seconds mod
Hi Scott,
I'm afraid preOpenCard instead of openCard will not solve the problem.
In the worst case, you will have to wait 9 seconds to see the minutes
hand correctly positionned and almost 2 minutes for the hours one.
Best regards from Paris,
Eric Chatonet.
Le 8 juin 05 à 18:14, Scott Rossi
Recently, Eric Chatonet wrote:
> on openCard
> setTime
> end openCard
>
> on setTime
> send "setTime" to me in 1 - (the long seconds mod 1) seconds
> put word 1 of the long time into T --8:13:15
> put T & char 2 to 7 of (the long seconds mod 1) into fld "Time"
> split T using ":"
> se
On Jun 8, 2005, at 8:04 AM, Geoff Canyon wrote:
Let me know what you think.
You can even put the advance for the minute hand and for the hour hand
in separate send cycles that can be approximate.
Dar
--
**
DSC (Dar Scott Consulting & Dar's L
Hi Geoff,
Kudos.
Very impressed to see how much a code can be improved again and again.
Just a little thing: with this new very clever code, the clock will
not be at time just when opening ;-)
So 4 lines more and 2 repetitions that are not satisfying: I bet you
will find a better solution in
I came up with a radically different approach. Several iterations
ago, we realized that we didn't have to guess when it would be time
to set the clock graphics. We could use 1-(the long seconds mod 1) to
get a message sent exactly when we need it.
Well, we're still guessing at when it's tim
Dar pointed out that this clock does not have a graceful stop. I
changed the clock in my user space (see3d) to shut down the clock
when the card is closed.
Dennis
On Jun 7, 2005, at 12:40 AM, Geoff Canyon wrote:
I've posted the new revision:
on openCard
setTime
end openCard
on setTime
I've posted the new revision:
on openCard
setTime
end openCard
on setTime
put word 1 of the long time into T --8:13:15
put T & char 2 to 5 of (the long seconds mod 1) into fld "Time"
split T using ":"
get (450 - (30 * T[1]) - (T[2] div 2)) mod 360
if (the angle of grc "Hour") <> it t
I missed that comment. Of course that's the case. I'm adding it in.
On Jun 6, 2005, at 9:38 AM, Dennis Brown wrote:
Good catch.
As was pointed out before, trunc(T[2] / 2) can be simplified to (T
[2] div 2)
___
use-revolution mailing list
use-revo
Geoff,
Good catch.
As was pointed out before, trunc(T[2] / 2) can be simplified to (T[2]
div 2)
Dennis
On Jun 6, 2005, at 11:45 AM, Geoff Canyon wrote:
I've put up a summary of the refinement of this code at:
http://www.inspiredlogic.com/beautiful/clockface.html
I had to make a modificat
I've put up a summary of the refinement of this code at:
http://www.inspiredlogic.com/beautiful/clockface.html
I had to make a modification to the below "final" version, both to
use the split command and because I realized that sometimes
450 - (30 * T[1]) - trunc(T[2] / 2)
won't fall into
Hi Dar,
Agreed a thousand times.
To pass code (we say that in french but not in english may be :-) may
be very valuable (and I often admire) but it is not enough...
Code is not a goal. It is only a means (often exciting).
Our final goal is an application that suits the needs of our clients
(
I updated my clock and tested the cpu time again. I must have
slipped a tick or something, because now I get 1.5% cpu with the
simple script and 0.8% cpu with my time saving script. Much more
like I though it should be. I am happy with either one, so I put
both scripts in the clock in my
Concerning the "coded in 3 minutes" in the subject.
I wouldn't want anybody to be intimidated by this.
I'm an experienced programmer. My customers come back for more.
Though others create in a different style, my design style might be a
yardstick.
I might code a similar solution in 3 minut
Geoff-
Monday, May 30, 2005, 9:55:48 PM, you wrote:
GC> Darn, forgot one more thing. Instead of setting the itemDelimiter,
GC> using the split command allows a cleaner T[1] syntax instead of item
GC> 1 of T. It is probably a bit faster as well.
Thanks for the example. I never think about the spl
On May 31, 2005, at 6:05 AM, Dennis Brown wrote:
I can't say that I would make the tradeoff of the extra lines of
code for a few microseconds, but I really like the split idea --it
shows another concept in a simple way and makes the script look
even simpler. I updated my clock with it. Go
I like that "split" concept. I am always setting itemdelimiter to odd
characters and then depending on it to reset itself and sometimes getting
caught.
On 5/31/05 12:55 AM, "Geoff Canyon" <[EMAIL PROTECTED]> wrote:
> Darn, forgot one more thing. Instead of setting the itemDelimiter,
> using the
I can't say that I would make the tradeoff of the extra lines of code
for a few microseconds, but I really like the split idea --it shows
another concept in a simple way and makes the script look even
simpler. I updated my clock with it. Good thinking!
Dennis
On May 31, 2005, at 12:55 AM
Ummm... beep's working just fine here (Rev 2.5B1, Mac OS 10.3.8).
Judy
On Mon, 30 May 2005, Thomas McGrath III wrote:
> I have not been able to get REV on the MAC to Beep. Can anyone else get
> the beep to work?
___
use-revolution mailing list
use-rev
Darn, forgot one more thing. Instead of setting the itemDelimiter,
using the split command allows a cleaner T[1] syntax instead of item
1 of T. It is probably a bit faster as well.
New script:
on openCard
setTime
end openCard
local sHourAngle -- the angle for the hour hand
local sMinuteAn
On May 30, 2005, at 4:37 PM, Dennis Brown wrote:
That is a good point. I tested it out, and the useless "set angle"
results in about 70ms of wasted time every second (7% CPU). I am
surprised it is so high. Doing the test and skipping it is a
thousand times faster. I fixed up the script
I went looking and although the system beeps and sound works the sound
pane in OSX had no item selected for system beeps. That is very odd. I
wonder how that could get changed. Aside from me doing it of course.
Beeps are fine now, Thanks Björnke
Tom
On May 30, 2005, at 7:57 PM, Björnke von Gi
On May 31 2005, at 01:44, Thomas McGrath III wrote:
I have not been able to get REV on the MAC to Beep. Can anyone else
get the beep to work?
1. check if you get sound from other apps, and that you have actually a
sound allocated for beeping
2. the command to do a beep is "beep", try it in
I have not been able to get REV on the MAC to Beep. Can anyone else get
the beep to work?
Thanks
Tom
On May 30, 2005, at 1:04 PM, Dennis Brown wrote:
Nice! I learn something every minute on this list --four heads are
better than one. I do believe that the clock is down to its essence
now.
That is a good point. I tested it out, and the useless "set angle"
results in about 70ms of wasted time every second (7% CPU). I am
surprised it is so high. Doing the test and skipping it is a
thousand times faster. I fixed up the script as my own exercise for
the student. You can see
On May 30, 2005, at 12:18 PM, Geoff Canyon wrote:
I considered that possibility as well, but in practice it seems not. I
think we thought of this because we're both being worrywarts. The math
should result in, at minimum, a wait to _exactly_ the next second. If
that happens _and_ the time spe
On May 30, 2005, at 10:04 AM, Dennis Brown wrote:
Nice! I learn something every minute on this list --four heads are
better than one. I do believe that the clock is down to its
essence now. Every line does something essential, except
displaying the "Time" field to check its accuracy. I
On May 30, 2005, at 9:43 AM, Dar Scott wrote:
On May 30, 2005, at 10:22 AM, Geoff Canyon wrote:
send "setTime" to me in (1 - (the long seconds mod 1)) seconds
Very nice. If I ever get around to updating the Primer on Message
Mechanics, this should go in there.
At first I thought thi
Nice! I learn something every minute on this list --four heads are
better than one. I do believe that the clock is down to its essence
now. Every line does something essential, except displaying the
"Time" field to check its accuracy. I put the latest version in my
user space also (see3
On May 30, 2005, at 10:22 AM, Geoff Canyon wrote:
send "setTime" to me in (1 - (the long seconds mod 1)) seconds
Very nice. If I ever get around to updating the Primer on Message
Mechanics, this should go in there.
At first I thought this might need a little fudge value added, but now
I had just finished swapping out my clunky send...in loop code for
something similar to yours when I checked mail and saw yours. I took
two steps:
put the long seconds into t
send in (something based on t - trunc(t)
Your method of the long seconds mod 1 is of course much better. But
you do
I love this clock example. Just so simple. You guys are great! I
could not resist seeing how the thinking was progressing and took it
to the next step. Fewer lines, more accuracy (I have often noted
that the simplest most elegant solutions take the most time to create
and the least time
Hi all,
I wouldn´t have expected so many reactions on the short script I
postet. Thanks for the feedback.I should have taken the time to read
through the code before posting it and clean it up a bit, though.(You
are right DOM, I forgot the quotes around the name of the graphic) And
I would ha
Geoff Canyon <[EMAIL PROTECTED]> wrote:
> go stack url "http://www.inspiredlogic.com/rev/clock.rev";
nice one, too!
now, what about making a rounded window, with the time and the date?
--
Revolutionario
___
use-revolution mailing list
use-revolution
I originally went with polygon graphics, which put me at about twenty
lines of code by your way of counting (including "on" and "end"
statements).
Switching to oval graphics I got it down to 11 lines, which sweep
both the hour and minute hands. But the second hand is jumpy. Simply
using s
On 5/27/05, Malte Brill <[EMAIL PROTECTED]> wrote:
> Sorry, couldn't resist
>
Hey Malte,
This is so brilliant! I love it. I tweaked its visuals a little (made
the second hand a different color, fattened and shortened the hour
hand, etc.) and built it as a standalone. It now runs on my desktop.
Malte Brill <[EMAIL PROTECTED]> wrote:
> Sorry, couldn´t resist
Faites, cher ami :-)
Brilliant, indeed, sort of "Rev widget"!
(need to quote the "minutes" litteral and, perhaps, to declare local
dasecs,daminutes,dahours)
--
Revolutionario
___
use-r
you didn't even try to do it yourself
You just looked at someone else's code and decided it must all be that
way?
Then HOW WOULD YOU KNOW QUALITY TRANSCRIPT at all
On May 27, 2005, at 8:47 PM, [EMAIL PROTECTED] wrote:
that seams like QUALITY TRANSCRIPT.
[EMAIL PROTECTED] wrote:
that seams like QUALITY TRANSCRIPT
the clock face i looked at was 100 lines of code...and awfull
you must be GOOD at transcript ...to do this clock...in 3 minutes.VERY GOOD
INDEED...
Malte as a true master. You should see the games he demo'd at the Euro
Rev
yes
that seams like QUALITY TRANSCRIPT
the clock face i looked at was 100 lines of code...and awfull
you must be GOOD at transcript ...to do this clock...in 3 minutes.VERY GOOD
INDEED...
it would take meDAYS to achieve this
still, it does NOT helpwhen the REV tutorial
45 matches
Mail list logo