Re: how to totally make Kevin's day

2010-09-09 Thread Brian Yennie
FWIW, I still get emails from the beta program for Flash iPhone packager, and 
they are reporting that Flash apps have been getting approvals already today 
after many months stranded in the queue. I have a feeling Apple went back and 
"approved" a bunch in advance of this announcement.

> On 09/09/2010 19:55, "Richard Gaskin"  wrote:
> 
>> At this point RunRev has two three going for their Android version:
>> 
>> 1. They've put way too much into it at this point to let it lie still.
>> 
>> 2. Over the last 6 months Android's rate of growth has exploded by 886%
>> while iOS's has dropped from a high of 34% down to 23%:
>> > up-886-globally/>
>> 
>> 3. Apple has demonstrated a willingness to change the rules of the game
>> at any time regardless of how widespread the subsequent destruction will
>> be.
> 
> All true.
> 
> Though I think that its going to be very hard for Apple to back out of this
> one now. If the backlash before was bad enough to make them change their
> minds think what it would be like if they did it again. I suspect they are
> feeling the heat from competition in the Android space and have suddenly
> decided that they need to keep developers on board.
> 
> Kind regards,
> 
> Kevin
> 
> Kevin Miller ~ ke...@runrev.com ~ http://www.runrev.com/
> RunRev - Software construction for everyone
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Mac app to cprop

2010-08-24 Thread Brian Yennie
One option would be to use shell() to tar + zip the file.

Something like:

get shell("tar -czf MyApplication.tgz MyApplication.app")
put url ("binfile:MyApplication.tgz") into the tCustomProperty of this stack
...
put the tCustomPropery of this stack into url ("binfile:MyApplication.tgz")
get shell("tar -xzf MyApplication.tgz")

> Greetings,
> What is the procedure of getting a Rev standalone Mac app (bundle)
> into a custom property?
> 
> I can get the component files within the bundle, I can copy files and
> folders but I can't seem to find the magic words for getting the
> bundle into a cprop.
> 
> Thanks
> Ron
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Can Of Worms (was Re: Running revlets on the iPad)

2010-07-01 Thread Brian Yennie
Amen, Scott.

There are plenty of awful uses of Flash, but the general wave of outrage (and 
associated love for HTML5) has reached levels of ridiculousness.

We'll be lucky if HTML5 reaches Flash-level performance and portability any 
time soon. And I'm sure advertisers will be more than happy to use it for the 
same blinking banners they used to make in Flash.

I find it especially funny that Flash gets singled out for mobile performance 
issues when there is no well-performing alternative!


>> HTML5 + JS + CSS3 is the future... it will superseed Flash, eventually.
> 
> I find it interesting that many folks here decry the use of Flash, but would
> be quite happy to have the rev plugin gain more widespread use.
> 
> I would hazard a guess that if Adobe was a small company just starting out
> and came up with the idea for Flash, most people would be quite thrilled.
> But Adobe is giant conglomerate and the general policy for any large company
> is "No mercy!"
> 
> It's not a valid argument to simply say "Flash sucks."  The core ideas
> behind Flash make sense: replace bandwidth-heavy bitmaps with efficient
> vector art that gets rendered with bitmap effects when displayed; store the
> instructions for animation, rather than individual animated frames; use
> efficiently compressed audio that gets decompressed on the client side.
> 
> Obviously, one can argue the implementation could use more work.  And I will
> the first the claim that Adobe so complicated ActionScript that it is
> virtually inapproachable by novice developers (if you don't believe this,
> explain why Adobe developed Catalyst).
> 
> But I'm having a hard time understanding why employing 3 separate
> technologies -- HTML5 + JS + CSS -- is considered an improvement over using
> one.  Because they're "open"?  Does this mean they're automatically better
> technologies?
> 
> As someone who's spent years in Web development and who has spent countless
> hours finding workarounds for Web browser idiosyncrasies and screw ups, I am
> quite leery of this move toward "everything in the browser".  How many man
> hours have been wasted by developers trying to get their Web pages to work
> cross-browser, not to mention cross-platform?  Billions?  Trillions?  And
> now, because Flash is suddenly considered "bad", using a collection of
> separate Web technologies must automatically be "good".
> 
> "But all the modern browsers will support standards and will render
> HTML+JS+CSS indentically!!"  Seriously?  Then what will be the benefit of
> using one browser over another?  Why even have multiple browsers?
> 
> The truth is browsers will NEVER do things similarly if they're competing
> with one another.  Which means the development headaches are are only going
> to continue.  Say what you want about Flash, but it's *one environment*, not
> IE/Safari/Chrome/Firefox/Opera/etc.
> 
> We're 10 years into the new millennium, and things are getting more
> complicated, when they should be getting simpler.
> 
> And we still don't have flying cars.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Abysmal Sound on Windows?

2010-06-05 Thread Brian Yennie
A bit ironic, but understandable at this point. HTML 5 may be the future, but 
the standard itself isn't even final yet. A bit hard to produce a cross-browser 
tech demo when all of the vendors are still in the middle of implementing a 
moving target.

The -webkit stuff is more a reflection of things being in flux than an 
indication that these are Safari-specific extensions.

With that said, it *would* be cool if HTML 5 would get here all ready and 
succeed in bringing unprecedented compatibility =)

> 
> On 5 Jun 2010, at 06:54, stephen barncard wrote:
> 
>> Have you seen these Tech Demos for HTML5 at the apple site?
>> 
>> http://developer.apple.com/safaridemos/
>> 
>> Amazing stuff.
> 
> And amazing irony. A great showcase for web standards, so long as you install 
> Safari. Try a demo on Firefox, and we're asked to install Safari. A look at a 
> couple of the demos (typography and transitions) shows a lot of css stuff 
> with "-webkit" in the properties.
> 
> Friends don't let friends tie themselves to a particular browser. :-)
> 
> 
> Dave___
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Google NativeClient / Rev

2010-05-20 Thread Brian Yennie
Another interesting deployment option on the horizon:
http://www.gamasutra.com/blogs/MarkDeLoura/20100519/5195/Google_IO_2010__Native_Client_Unity__Chrome_Web_Store.php

In a nutshell, this allows you to write C / C++ code to run in Chrome without 
any plugin. For those of us who don't code from scratch in C/C++, that means 
dev tools like RunRev could run natively inside the browser -- no more browser 
plugin needed.

Rev would stand to gain a lot from this if Chrome can get its installed base 
up...___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Cloud computing: scalable DB

2010-05-19 Thread Brian Yennie
Andre,

If you mean by this that the bottleneck is READ access for sending the emails, 
would replication be an option? You could set up a second slave DB which 
shouldn't affect WRITE much unless you are already saturated on that end as 
well. Then when you need that burst of data, just alternate (or some smarter 
load balancing) between the two machines. READ access can scale close to 
linearly that way with a pretty simple setup. Now, if you are running out of 
WRITE capacity, that's a harder problem...

HTH?

> Now, here our bottleneck is actually the database machine. It can't pump out
> the data as fast as we need it. There are also other design bottlenecks, but
> the email sending part is not one of them.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Cloud computing: scalable DB

2010-05-19 Thread Brian Yennie
Warning, bad analogy on the way...

That's kind of like observing a truck full of loose boulders ready to fly out 
the back. Isn't that what trucks are for, carrying heavy loads?

Point being that yes, SQL is one means towards managing large amounts of 
tables, rows, data, etc -- but it still suffers if you throw just anything at 
it. Also I can just imagine maintaining the SQL for 1000 tables =).

Andre, you deserve a medal for keeping that thing alive (or a sanity check)...

> I thought this was EXACTLY what SQL was created to do?
> 
> Bob
> 
> 
> On May 19, 2010, at 11:36 AM, Andre Garzia wrote:
> 
>> Now, check out this screen shot I just took:
>> http://andregarzia.on-rev.com/shots/msdb.jpg
>> 
>> This is ONE MASSIVE DATABASE with mind melting amount of information, tables
>> with 55 million records... ARGH! I *hate* it.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: OT: Adobe's New Anti Apple Ads

2010-05-17 Thread Brian Yennie
Exactly. As someone who has spent the last couple of years writing virtual 
worlds in Flash, I can say unequivocally that HTML 5 is nowhere near being able 
to duplicate that functionality. Not only is the feature set much smaller and 
browser support limited, but there are no tools behind it. And on top of that, 
client-readable source code (JavaScript) is an issue.

Certainly HTML 5 could replace Flash someday, but the general consensus in the 
gaming / virtual world arena is that it's a solid 3-5 years away and there will 
still be a lot of legacy stuff floating around along with a lack of libraries 
and tools to build with. And that's assuming some other factor doesn't pop up 
in that time.

With that said, if HTML 5 adoption goes anywhere I bet Adobe starts offering 
export from Flash. They are, ironically, the ones positioned to be the toolset 
for HTML 5 / Canvas applications...

> 
> On May 16, 2010, at 11:11 PM, Mark Swindell wrote:
> 
>> 
>> http://www.theregister.co.uk/2010/05/16/mefeedia_html5_survey/
> 
> 
> People are still getting confused about what Flash is used for, and think 
> that if more sites have an html5 video player option, that the overall use of 
> Flash has gone down. That would be like saying that all Rev stacks are just 
> address books, and any use of another address book would mean that general 
> use of Rev had gone down.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Check out Jerry's new videos -- REV to ObjC -> iPhone

2010-05-09 Thread Brian Yennie
Josh,

Except, if a tool like Rev were generating the code to paste in, it would 
inevitably contain large portions of identical code across projects. Apple 
could easily ban any app that matches those very clear signatures.

> 
> 
> On May 8, 2010, at 11:28 PM, "J. Landman Gay"  
> wrote:
> 
>> Ruslan Zasukhin wrote:
>> 
>>> RevMobile before it seems was going generate c# sources?
>>> Strange choice as for me.
>>> Main engine should go to C,
>>> Some parts of REV project also to C
>>> And GUI part of REV project to ObjC - Cocoa.
>> 
>> This is forbidden by the new license. There can be no translations. All work 
>> must be created originally by Apple-specified tools.
> 
> Of course, if you pasted the C code into Xcode and built your app there, 
> there would be no way Apple could tell the code was not written in Xcode. 
> Text is text.
> 
> I've compared Revtalk and C a little bit and there are some code structures 
> that are so similar translation would be easy (if then, switch). Chunk 
> expressions are an example of something that would not translate, so there 
> would have to be a special set of handlers that split strings and returned 
> items, and in Revtalk you'd need to call these functions rather than using 
> the stock ones to make the C output feasible.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revMobile

2010-04-08 Thread Brian Yennie
Yup to all of that, Richard. I'm aware of some seriously high budget iPhone 
apps being done in Unity 3D right now, which is one of the borderline cases (it 
actually does output an XCode project, but there are other layers to the tool). 
Not that any developer is "unimportant", but we're talking about alienating 
some of the real high end stuff.

One part I haven't deciphered -- what happens to developers already working 
with iPhone SDK 3.2? Surely those apps are going to run for a while longer, and 
that SDK doesn't have the new terms that 4.0 does. I assume 3.2 is also what 
RevMobile is based off of. Granted, that's not much consolation to a dev 
environment if it's going to be phased out anyway, but I have a feeling a lot 
of projects are going to get grandfathered in if they already got started on 
3.2.

> Jerry Daniels wrote:
> 
>> I anticipate this latest change to the "rules" will generate
>> quite fierce debate among all concerned
> 
> Perhaps translated: "Class action suit". ;)
> 
> Like taking out a single sniper by dropping napalm across an entire jungle, 
> if Apple was targeting Adobe they sure took out a lot of collateral damage: 
> from Appcelerator to PhoneGap and maybe a dozen others, there are a great 
> many people in this affected "class".
> 
> In terms of monopolistic practices, the only thing distinguishing Apple from 
> Microsoft these days is that they're less successful with market share.
> 
> With enough growth we may see dozens of governments around the world slam 
> Apple as they did Microsoft, over many of the same principles.
> 
> "Why punish success?"
> 
> That was Microsoft's defense too. And they still lost.
> 
> --
> Richard Gaskin
> Fourth World
> Rev training and consulting: http://www.fourthworld.com
> Webzine for Rev developers: http://www.revjournal.com
> revJournal blog: http://revjournal.com/blog.irv
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Open Socket

2010-03-30 Thread Brian Yennie
Shani,

As I wrote in my previous post, you need to use the "accept" command, not "open 
socket".
Also, I think you are misunderstanding the "with message" portion. This message 
needs to be the name of a handler which is called when a connection is made. 
See my example and also the docs on this.

> Yes,
> I want to use Rev as a Server.
> 
> I send another email with detail. kindly see that.
> and correct that plz.
> 
> Rev is on Server Side
> JADE is on Client Side
> 
> Regards,
> SHANI
> 
> On Wed, Mar 31, 2010 at 12:37 AM, Brian Yennie wrote:
> 
>> Shani,
>> 
>> Do you want Rev to be *client* or *server*? If you want it to be the server
>> (with a Java client) then you need to look at the "accept" command:
>> 
>> accept connections on port 6800 with message "serverConnect"
>> 
>> on serverConnect tSocket
>>  read from socket tSocket for 1 line
>>  ...
>> end serverConnect
>> 
>> etc.
>> 
>>> open socket to ("127.0.0.1" & : & (6800)) with message "Server connected"
>>> 
>>> is this is rihght code for rev and what about in JADE?
>>> 
>>> Regards,
>>> SHani
>>> 
>>> On Tue, Mar 30, 2010 at 3:08 PM, Andre Garzia 
>> wrote:
>>> 
>>>> Shani,
>>>> 
>>>> check out the documentation built-in with Rev.
>>>> 
>>>> open socket expect and IP or server name, unless filename is a machine
>> on
>>>> your network, that code is wrong. Also what is that # symbol doing
>> there?
>>>> 
>>>> Om shanti
>>>> andre
>>>> 
>>>> On Mon, Mar 29, 2010 at 11:46 PM, Shani  wrote:
>>>> 
>>>>> Hi,
>>>>> I want to communicate with Other program Client (JAVA or JADE) from
>>>> RevTalk
>>>>> through Socket.
>>>>> 
>>>>> open socket to ("filename " & : & (port#)) with message "Server
>>>>> connected"
>>>>> 
>>>>> ## http://docs.runrev.com/Command/open-socket
>>>>> 
>>>>> what i give command on client side.
>>>>> 
>>>>> Regards,
>>>>> SHANI
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Open Socket

2010-03-30 Thread Brian Yennie
Shani,

Do you want Rev to be *client* or *server*? If you want it to be the server 
(with a Java client) then you need to look at the "accept" command:

accept connections on port 6800 with message "serverConnect"

on serverConnect tSocket
   read from socket tSocket for 1 line
   ...
end serverConnect

etc.

> open socket to ("127.0.0.1" & : & (6800)) with message "Server connected"
> 
> is this is rihght code for rev and what about in JADE?
> 
> Regards,
> SHani
> 
> On Tue, Mar 30, 2010 at 3:08 PM, Andre Garzia  wrote:
> 
>> Shani,
>> 
>> check out the documentation built-in with Rev.
>> 
>> open socket expect and IP or server name, unless filename is a machine on
>> your network, that code is wrong. Also what is that # symbol doing there?
>> 
>> Om shanti
>> andre
>> 
>> On Mon, Mar 29, 2010 at 11:46 PM, Shani  wrote:
>> 
>>> Hi,
>>> I want to communicate with Other program Client (JAVA or JADE) from
>> RevTalk
>>> through Socket.
>>> 
>>>  open socket to ("filename " & : & (port#)) with message "Server
>>> connected"
>>> 
>>> ## http://docs.runrev.com/Command/open-socket
>>> 
>>> what i give command on client side.
>>> 
>>> Regards,
>>> SHANI
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Interesting discussion on iPad content

2010-03-30 Thread Brian Yennie
Definitely a valid concern, although if it's truly 15 seconds that just seems 
excessive. I would think just a couple seconds would work, especially if it's a 
decent looking splash screen and you can actually perform some legitimate 
loading while it displays. I don't see any reason why it would have to actually 
make you wait much longer than normal.

> 
> On Mar 30, 2010, at 4:57 PM, Scott Rossi wrote:
> 
>> 
>> Note the rest of my po
> 
> I like to clip early!
> 
> Your other point was about less than stellar content, and that is true, the 
> best engine on earth would get a bad reputation if only poor games were made 
> with it. I was illustrating the opposite, that even the very best games get 
> bad reviews because the splash screen requirements make it seem like the game 
> is slow.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Interesting discussion on iPad content

2010-03-30 Thread Brian Yennie
I wonder if a starter version of RevMobile would be in order - i.e.

- Shows a Rev splash screen
- Must be a free app

That would seem to allow people to "test the waters" with a nice app for $0 
down, and then if they had something worth selling they would need to purchase 
the full RevMobile.

> FWIW, this amateur (OK, near amateur) finally bit the bullet on RevMobile 
> when I got a special offer that dropped the price to something like $550 
> because I REALLY want to be able to develop for the iPad.  
> 
> OTOH, my subscription to Rev Enterprise is paid up until 2016 or so and I 
> bought into On-Rev Founder, so I'm hardly a tight wad when it comes to buying 
> Rev products.  That said, even I agree that the current _list_ price for 
> RevMobile is prohibitive for anyone who does not already have a product ready 
> to be deployed on the iPad.
> 
> Not sure what the answer is, just making an observation
> 
> 
> 
> On Mar 30, 2010, at 1:47 PM, Rodney Somerstein wrote:
> 
>> But trying to convince anyone that Rev-mobile is for the amateurs with the 
>> current pricing model is pretty much a nonstarter, I suspect.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Deleting Data Woefully Slow

2010-03-25 Thread Brian Yennie
I'd be surprised if you could do much better. A tad maybe, somehow, but I don't 
think there is another hidden Rev function that will work any further magic. If 
you need to make another major speed jump, I'm afraid you would need to look at 
your data itself -- can you index it, can you operate on a subset at a time, is 
it time for a database / new data structure, etc. Reading text line by line is 
eventually going to hit a wall, and algorithmically can only scale one way (and 
that's proportional to the amount of data). I realize it's not always practical 
to rework things at that level.

> On Thu, Mar 25, 2010 at 3:51 PM, Kay C Lan  wrote:
> 
>> 
>> But something Brian wrote has got me thinking and testing. Instead of
>> 'delete lines 12345 to 12347...' I'm looking at put Lines 1 to 12344... & cr
>> & lines 12348 to -1 ' Fingers crossed.
>> \
>> 
> Not that fruitful, still slow.
> 
> Test 1 uses 'delete lines x to (x+2) of tData1
> 
> Test 2 uses ' put line 1 to (x-1) of tData2 & cr & line (x+3) to -1 of
> tData2 into tData2.
> 
> Test 3 uses a simple repeat with x = and then skips lines.
> 
> Test 4 is the 'repeat for each' that more closely resembles what I'm
> actually using to skip lines. Even with the switch statement it is still
> significantly faster to recreate 99.9% of your data than to delete 0.1%
> 
> If anyone thinks they can delete data faster than my Test 4 I'd sure
> appreciate some pointers :-)
> 
> MBP 2.16GHz, 2 GB RAM, OS x.6.2, Rev Studio 4.0.0 Build 950
> 
> Removing 0.1% of data in 5 Lines
> In a 5 repeat loop
> Delete line x to x+2 = 11478 ms
> put line 1 to (x-2) = 11595 ms
> repeat with x...skip lines = 23010 ms
> repeat for each = 37 ms --create 99.9%
> 
> on mouseup
>  put 50 into tHowMany
>  put tHowMany * 1000 into tRepeats
>  --because Mark Wieder doesn't like random;-)
>  repeat tHowMany times
> put "a" & cr after tData
> repeat with x = 1 to 999
>put x & cr after tData
> end repeat
>  end repeat
> 
>  put tData into tData1
>  --test 1
> 
>  put the millisec into tStart
>  repeat with x = the number of lines of tData down to 1
> if (line x tData contains "a") then
>delete line x to (x+2) of tData1
> end if
>  end repeat
>  put word 1 to -1 of tData1 into tData1
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal1
> 
> 
>  put tData into tData2
>  --test 2
> 
>  put the millisec into tStart
>  repeat with x = the number of lines of tData down to 1
> if (line x tData contains "a") then
>put line 1 to (x-1) of tData2 & cr & line (x+3) to -1 of tData2
> into tData2
> end if
>  end repeat
>  put word 1 to -1 of tData2 into tData2
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal2
> 
>  if (tData1 <> tData2) then
> answer "Error"
> breakpoint
>  end if
> 
> 
>  --test 3
> 
>  put the millisec into tStart
>  repeat with x = 1 to the number of lines of tData
> if (line x tData contains "a") then
>put x + 2 into x
> else
>put line x of tData & cr after tData3
> end if
>  end repeat
>  put word 1 to -1 of tData3 into tData3
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal3
> 
>  if (tData1 <> tData2) or (tData1 <> tData3) then
> answer "Error"
> breakpoint
>  end if
> 
> 
>  --test 4
>  put 3 into tSkip
> 
>  put the millisec into tStart
>  repeat for each line tLine in tData
> switch
>case (tSkip < 3)
>   put tSkip +1 into tSkip
>   break
>case (tLine contains "a")
>   put 1 into tSkip
>   break
>default
>   put tLine & cr after tData4
> end switch
>  end repeat
>  put word 1 to -1 of tData4 into tData4
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal4
> 
>  if (tData1 <> tData2) or (tData1 <> tData3)  or (tData1 <> tData4) then
> answer "Error"
> breakpoint
>  end if
> 
>  put "Removing 0.1% of data in " & tRepeats & " Lines" & cr into msg
>  put "In a " & tRepeats & " repeat loop" & cr after msg
>  put "Delete line x to x+2 = " & tTotal1 & " ms" & cr after msg
>  put "put line 1 to (x-2) = " & tTotal2 & " ms" & cr after msg
>  put "repeat with x...skip lines = " & tTotal3 & " ms" & cr after msg
>  put "repeat for each = " & tTotal4 & " ms" after msg
> end mouseup
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Deleting Data Woefully Slow

2010-03-24 Thread Brian Yennie
Testing semantics aside, I definitely agree with your conclusions. Repeat for 
each performs awfully well for text operations if you can encapsulate your 
logic in a single pass.

One additional method to consider... have you tried using split / combine to 
turn the data into an array, something like (pseudo-code):

split myData
...
delete myData[5]
delete myData[9]
...
combine myData

I have a feeling the overhead of doing both a split and combine will still lose 
most times versus "repeat for each", but haven't tried it myself.

> Mark and Brian,
> 
> Thanks for your comments.
> 
> Mark you are absolutely right about tests 9, 10 and 11 - it's the problem of
> taking my real life situation and simplifying for the List. I've revised the
> script and this time TESTED the output to confirm the last  3 create
> identical data.
> 
> No change, it's still quicker to take a HUGE set of data and recreate a
> slightly smaller version of it, than it is to just delete a small amount
> from it - although it only applies if you can use 'repeat for each' to
> create your new data.
> 
> Brian, whilst put line 1 to -2 might be OK if all you want to do is delete
> the last line, and I accept I used it in my 'simple' examples, the last
> three Tests are more real life, where the line to delete is imbedded
> 'somewhere' in the data. Interestingly though you again prove the point that
> 'putting data' in Rev is much faster than 'delete' data.
> 
> REVISED test results I got on a MBP 2.16GHz, 2 GB RAM, OS X.6.2, Rev Studio
> 4.0.0 Build 950
> 
> **repeat for each**
> put after = 2 ms
> delete line -1 = 327 ms
> put before = 10 ms
> delete line 1 = 9 ms
> **repeat with x = **
> put after = 158 ms
> delete line -1 = 322 ms
> put before = 196 ms
> delete line 1 = 10 ms
> Create 90% - repeat for each = 2 ms
> Create 90% - repeat with x = 288 ms
> Delete 10% = 199 ms
> 
> 5 repeats
> **repeat for each**
> put after = 19 ms
> delete line -1 = 35491 ms
> put before = 951 ms
> delete line 1 = 934 ms
> **repeat with x = **
> put after = 18528 ms
> delete line -1 = 35208 ms
> put before = 18872 ms
> delete line 1 = 929 ms
> Create 90% - repeat for each = 26 ms
> Create 90% - repeat with x = 33341 ms
> Delete 10% = 19790 ms
> 
> The REVISION 3 script I used:
> 
> on mouseUp
>  repeat 5 times
> put random (9) & cr after tData
>  end repeat
>  --test 1
>  put the millisec into tStart
>  repeat for each line tLine in tData
> put tLine & cr after tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal1
>  --test 2
>  put the millisec into tStart
>  repeat for each line tLine in tData
> delete line -1 of tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal2
>  --test 3
>  put the millisec into tStart
>  repeat for each line tLine in tData
> put tLine & cr before tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal3
>  --test 4
>  put the millisec into tStart
>  repeat for each line tLine in tData
> delete line 1 of tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal4
>  --test 5
>  put the millisec into tStart
>  repeat with tCounter = 1 to the number of lines of tData
> put line tCounter of tData & cr after tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal5
>  --test 6 ***REVISED***
>  put the millisec into tStart
>  repeat with tCounter = 1 to the number of lines of tData
> delete line -1 of tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal6
>  --test 7
>  put the millisec into tStart
>  repeat with tCounter = 1 to the number of lines of tData
> put line tCounter of tData & cr before tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal7
>  --test 8
>  put the millisec into tStart
>  repeat with tCounter = 1 to the number of lines of tData
> delete line 1 of tData1
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal8
>  --test 9  ***REVISED***
>  put the millisec into tStart
>  repeat for each line tLine in tData
> if NOT(tLIne contains 1) then
>put tLine & cr after tData1
> end if
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal9
>  --test 10 ***REVISED***
>  put the millisec into tStart
>  repeat with tCounter = 1 to the number of lines of tData
> if NOT(line tCounter of tData contains 1) then
>put line tCounter of tData & cr after tData2
> end if
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal10
>  --test 11 ***REVISED***
>  put tData into tData3
>  put the millisec into tStart
>  repeat with tCounter = the number of lines of tData down to 1
> if (line tCounter of tData contains 1) then
>delete line tCounter of tData3
> end if
>  end repeat
>  put the millisec into tEnd
>  put tEnd - tStart into tTotal11
> 
>  put "**repeat for each**" & cr into msg

Re: Deleting Data Woefully Slow

2010-03-24 Thread Brian Yennie
Mark,

This seems highly data-dependent and contrary to logic to me. In my tests:

put line 1 to -2 of tData into tData1
delete line -1 of tData
delete last line of tData

All perform about twice as fast as using "repeat for each". The first was about 
10% faster than the next two, which makes sense as it would only be one seek 
and one copy. The in-place operations would require a seek, a copy, and 
resizing the original variable. Of course if you end up copying back to the 
original variable somewhere, it should be very close to the same.

"repeat for each" is asking the engine to find every line ending in the text 
which would necessarily take much longer and get worse with scale, no?

> And on reading the code yet another time, there's enough fuzzy stuff
> in there to make me discount most of it without rewriting.
> Nonetheless, the conclusions are fairly solid, and the fastest way to
> delete the last line of a variable turns out to be the surprising
> 
>   put empty into tData1
>   put 1 into x
>   put the number of lines in tData into tHowMany
>   repeat for each line tLine in tData
>   put tLine & cr after tData1
>   add 1 to x
>   if x is tHowMany then
>   exit repeat
>   end if
>   end repeat
> 
> -- 
> -Mark Wieder
> mwie...@ahsoftware.net
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: AW: OT: locking software to one specific machine?

2010-03-04 Thread Brian Yennie
While this thread is alive, I've long been curious what the criticisms would be 
of the following scheme, for a product with low to medium security needs. This 
does assume that you require an internet connection for registration, but that 
seems to be a generally acceptable requirement these days.

1) Generate as many (or as few) *random* keys as you need
2) Put them in a database
3) User inputs key, app contacts hosted script which checks if the key is in 
the database
4) If YES, expire that key
5) If NO, lock out the user for a few seconds
6) Go back to #1 if you sell more keys

Point being, if you are ok with requiring an internet connection, why generate 
a key which has *any* pattern that can be cracked? Guessing a random key you 
can do very simple math to know the chances of someone cracking it by brute 
force, and there will be no other method short of getting a hold of your 
database (and let's face it, if someone is cracking your servers, you might as 
well give up). For example if you have "only" 1,000 valid keys and something 
like a 16 digit HEX code, a cracker has about a 1 in 20,000,000,000,000,000 
chance of guessing a correct code. Even if you don't lock out after failures... 
that's 20 quadrillion tries we're talking about. As a bonus crackers may expend 
a lot of effort looking for a pattern which doesn't exist.

I probably haven't given this as much thought since I've never really had to 
implement it, but I'm keen to hear opinions from those that have. What am I 
missing? Is there an inherent fear of keeping the database secure which trumps 
keeping an algorithm secret?

> Marty Knapp wrote:
>> I like the idea of pre-generated keys. It seems like a good in-between
>> method. If your user then registered their key and someone else
>> subsequently tried to register the same number you would have some
>> recourse. I don't want to get bogged down in lots of administrative
>> hassles, so I like this method. Does anyone have suggestions about
>> setting up something like this? And a method for verifying the key?
> 
> 
> Challenging, but fun:
> -
> 
> Start by reading these for inspiration:
> 
> The Plain Truth about Casual Software Piracy
> by Matt Slot, Ambrosia Software
> 
> 
> Anti Cracking FAQ
> How to make cracking your programs a little harder
> 
> 
> Now devise a scheme of between 12 and 20 characters in which some of the 
> characters must be in a specific range to be valid, and others are derived 
> from combinations of others.  For example, character 10 could be the ASCII 
> equivalent of the average of characters 9, 4, and 2, and character 2 could be 
> the sum of characters 1 and 5 minus character 8, etc.  It's sometimes useful 
> to have some characters use values you can derive meaning from, such as the 
> version number, if needed.  Use that to generate your keys.
> 
> Avoid schemes that produce any "1" or "0" characters since those will be 
> mistyped as "l" and "O" by many users, raising support requests with 
> complaints of a "bad reg code".  This will reduce the range of acceptable 
> keys, but you should still be able to produce at least 10,000 unique keys 
> from most schemes you can think up in a few minutes. If you sell 10,000 
> copies you've made more than enough money to finance your upgrade with a new 
> reg scheme. :)
> 
> Also provide a Paste Code button in your reg window so they don't need to 
> type the code at all, and handle Cmd-V yourself by cleaning the 
> clipboardData["text"] of any extraneous characters before pasting into your 
> field (people will include trailing returns and other garbage when copying 
> from the reg email you sent them).
> 
> Then write the inverse of the generator to validate your codes, but break up 
> the validation into multiple handlers each doing a small part of it, using 
> obscure function names strewn all over your code base with lots of 
> red-herring handlers with similar names littered among them. Extra bonus 
> points if the handlers you call also call others; the more the merrier.  
> Anyone tracing your code in a low-level debugger will find it far more 
> annoying than it's worth.
> 
> Run all your keys through the validator before shipping, to ensure the 
> generator and the validator are in synch.  This batch validator should also 
> check uniqueness of all keys to avoid having a single key sent to multiple 
> users.
> 
> Then of course add at least a half-second delay for validation somewhere in 
> your sequence to thrwart brute-force attacks.  A half-second won't bother a 
> user, but for automated attempts it means the difference between hours and 
> years.
> 
> Then lock your stack with a good password, after writing down your algo 
> somewhere since your code will be unreadable to even yourself.  Use v4.0 to 
> build, since the password protection is much stronger.
> 
> Repeat with each new version, changin

Re: Project Euler

2010-02-27 Thread Brian Yennie
Alejandro,

For me the double-clicking doesn't work at all, but submitting a new solution 
is no problem.
Poor Andre didn't know what he was getting himself into, but...

Any chance Andre you could add a simple "edit" button on the front page instead 
of the double click? Maybe that would help.


> 
> 
> Andre Garzia-3 wrote:
>> 
>> good question,
>> 
>> have you given the revlet network permissions?
>> 
> 
> Yes, , i selected "Allow always".
> 
> Double click one line in first card and stack go to
> next card with all fields empty.
> 
> Just noticed that 141 kb takes too
> long to load. Does this works the
> same in every computer?
> Or only in my side?
> 
> Same results using Firefox 3.5.8, Internet Explorer 8
> and Google Chrome.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an annual calendar somewhere?

2010-02-25 Thread Brian Yennie
According to the ncal docs, the country code has nothing to do with language, 
just Gregorian dates:

-s country_code
Assume the switch from Julian to Gregorian Calendar at the date
associated with the country_code.  If not specified, ncal tries to
guess the switch date from the local environment or falls back to
September 2, 1752.  This was when Great Britain and her colonies
switched to the Gregorian Calendar.


> 2010/2/25 J. Landman Gay :
>> zryip theSlug wrote:
>>> 
>>> Maybe you are in 10.4?
>>> 
>>> 
>> 
>> It does seem to be OS-related. On my Snow Leopard machine, ncal is
>> supported. On my plain Leopard Mac, it is not. But even on Snow Leopard I
>> don't see French, the calendar is returned in English.
> 
> Thanks, interesting to know.
> 
> If I consider my test, changing the country has no effect. First I
> believe that the command will be return the calendar with a difference
> with the first day of the week (as you know, it's not sunday in
> french, but monday) but I obtain all the time monday as first day of
> the week...
> 
> For the translation, a quick replace as I propose previously, could do
> the job. The difficulty here, is have the right system version...
> 
> 
> -- 
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
> __
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Project Euler

2010-02-25 Thread Brian Yennie
Good stuff! I particularly like this project, because it allows for a 
combination of clever coding AND pure math. The best problems surely require 
both. It also depends what "level" of computation you force yourself to contain 
in you code. For example, Rev has a sqrt() function, but what if you had to 
write this code without that function built in? Would that lead to a whole 
different approach? Is it ok to use known formulas, or does your code have to 
derive them itself? Etc.

With that said, it would be pretty darn cool if we got a near-complete set of 
solutions all written in Rev... what a nice reference for tight mathematical 
coding.

> Mick, 
> 
> You beat me to it on the Fibonacci series. I also thought about using the 
> golden ratio. Using a few other relationships allows one to compose a rather 
> compact script.
> 
> 1. the F numbers are always odd odd even, odd odd even
> 
> --- this allows you to use "step 3" in the loop
> --- you will only check even numbers and stop at the last one
> --- before four million
> 
> 2. F1 + F2 + F3 . . . Fn = F(n+2)- 1
> 
> --- this allows you to do the summation at the end
> --- If you know Fn then you just go up a couple more
> --- numbers to get the sum of the first n numbers
> 
> 3. If you stop the summation at F(even) then the sum of
>   the even numbers will be 1/2 of the total sum
> 
> -- 1,1,TWO,3,5,EIGHT,13,21,THIRTY-FOUR
> -- The two numbers sum to the EVENS (by definition)
> 
> Here's the script -- 555 is just any large number
> 
> on mouseUp
> put (1+ sqrt(5))/2 into g
> repeat with n = 0 to 555 step 3
>   if (g^n)/sqrt(5) > 4E6 then exit repeat 
> end repeat 
> put (round((g^(n-1))/sqrt(5)) - 1) / 2 
> end mouseUp 
> -
> The golden ratio technique is most valuable if you want to hit a very large F 
> number. You don't have to count up to it. It is like random access memory.
> 
> 
> 
> Here's another interesting property of a F series:
> 
> 1 1 2 3 5 8 13 21
> 
> Take the square of 8 -- 64. It is off by one from the product 5*13. That 
> holds for any 3 numbers in a row. Sometimes the square is one more than the 
> products of its neighbors, sometimes one less: but always one off.  

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: RunRevLive.10: 72 hours left to save

2010-02-25 Thread Brian Yennie
I probably shouldn't touch this one with a 10-foot (100-foot? 100-meter?) pole, 
but...

Perhaps the best solution for everyone would be if Rev just offered up some 
combination of refund or store credit. We certainly don't need to be debating 
the role of force majeure in this case, but some sort of restitution is 
probably in order after 5+ months. 

It is both unfair to lecture RunRev on good business practices considering the 
circumstance*** AND unfair to expect people to wait 5 months for an 
already-paid-for product which is worth less and less over time.

Would anyone be unwilling to just call it a day if RunRev said "we're very 
sorry that we were unable to deliver these DVDs in a timely fashion. please 
accept our apology this credit towards XYZ and we will still ship your DVD when 
we can" ?

Just my 2 cents.

- Brian

*** To those who would argue that you must deliver in business in spite of 
personal problems, I agree in principle. However, please keep in mind that Rev 
literally lost a key team member suddenly and unexpectedly. People can "suck it 
up" and continue to perform in spite of personal turmoil to a limit, but they 
cannot be instantly replaced when they literally are 
gone.___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Project Euler [SPOILER #3]

2010-02-24 Thread Brian Yennie
No, we're actually talking about #6 =).

I put them in order of difficulty and this becomes the 3rd one... but it's 
actually id 6.

> Are we talking about the same #3?
> 
> The prime factors of 13195 are 5, 7, 13 and 29.
> 
> What is the largest prime factor of the number 600851475143 ?
> 
> 
> 
> On Tue, Feb 23, 2010 at 11:04 AM, Brian Yennie  wrote:
>> I'm pretty proud of this one for #3... SPOILER ALERT SPOILER ALERT... scroll 
>> down if you want to see. Great site find, Andre!!
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> put 0 into total
>> repeat with i=1 to 100
>> repeat with j=1 to 100
>>if (i=j) then next repeat
>>add i*j to total
>> end repeat
>> end repeat
>> 
>> _
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] WeCode Euler

2010-02-23 Thread Brian Yennie
LOL, yeah where's that edit button? I confess I blew it on my first two entries 
-- left the comments blank on one and forgot to change the problem number on 
the other.

With that said, I think the most impressive so far was solving the problem so 
quickly of how to collect the solutions in a database =)

> double clicking is a funny business sometimes.
> 
> by the way, fill the comments with the problem proposition next time, if not
> some personal comments on your approach! :D
> 
> 
> 
> On Tue, Feb 23, 2010 at 4:00 PM, Brian Yennie wrote:
> 
>> Awesome, I already submitted one =). Double click isn't working for me, but
>> submitting was smooth!
>> 
>>> Hello Folks,
>>> 
>>> After a really fun morning solving math tricks with Mark and Brian, I
>>> decided to give revlets a try. WeCode Euler is revlet for testing,
>> recording
>>> and exploring solutions for Project Euler http://projecteuler.net
>>> 
>>> I did it really quickly and already posted some solutions. Basically you
>> can
>>> browse the available solutions, test new ones and save them if you want.
>>> 
>>> http://wecode.org/euler
>>> 
>>> this revlet gains 0 in user interface usability but 10 in fun!
>>> 
>>> :D
>>> 
>>> --
>>> http://www.andregarzia.com All We Do Is Code.
>>> ___
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] WeCode Euler

2010-02-23 Thread Brian Yennie
Awesome, I already submitted one =). Double click isn't working for me, but 
submitting was smooth!

> Hello Folks,
> 
> After a really fun morning solving math tricks with Mark and Brian, I
> decided to give revlets a try. WeCode Euler is revlet for testing, recording
> and exploring solutions for Project Euler http://projecteuler.net
> 
> I did it really quickly and already posted some solutions. Basically you can
> browse the available solutions, test new ones and save them if you want.
> 
> http://wecode.org/euler
> 
> this revlet gains 0 in user interface usability but 10 in fun!
> 
> :D
> 
> -- 
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Project Euler

2010-02-23 Thread Brian Yennie
Oooh, oooh!

In all seriousness, it would be fun if someone compiled a set of different 
correct solutions to these problems. What an incredible way of showing people's 
different coding styles in Rev.
(my solution to #2 after the break)

























put 0 into tot
put 1 into pre
put 2 into fib
repeat
   if (fib >= 400) then exit repeat
   if (fib mod 2 = 0) then add fib to tot
   put fib into tmp
   add pre to fib
   put tmp into pre
end repeat___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Project Euler [SPOILER #3]

2010-02-23 Thread Brian Yennie
I'm pretty proud of this one for #3... SPOILER ALERT SPOILER ALERT... scroll 
down if you want to see. Great site find, Andre!!













































put 0 into total
repeat with i=1 to 100
  repeat with j=1 to 100
 if (i=j) then next repeat
 add i*j to total
  end repeat
end repeat

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: FileTypes and Creators

2010-02-11 Thread Brian Yennie
Ray,

One approach would be to wrap your own archive around Rev's compress() 
function, i.e.

put compress(file1Data) into file1Compressed
write (the length of file1Compressed)&":" to file "myZip"
write file1Compressed to file "myZip"
...
put compress(file1000Data) into file1000Compressed
write (the length of file1000Compressed)&":" to file "myZip"
write file1000Compressed to file "myZip"

IOW, write out the length of the file followed by the actual file data, repeat 
for each file. When you want to extract, do something like:

read from file "myZip" until ":"
put it into tLength
read from file "myZip" for tLength
put it into compressedData
...

NOTE: code untested and probably broken, but hopefully helps. Basically the 
only thing you need to do is squash your compressed files together, but you 
need to store the length of each in order to find them again.


> What I've actually got is a folder of about 1000 tiny GIF files, about 4K 
> each, and I'm trying to setup an automatic download both on Mac and Windows.  
> The download at 4 megs with so many files takes forever unless I compress the 
> files using zip on the Mac and StuffIt on Windows to make an SEA.  Windows 
> works nice and transparently since StuffIt for Windows lets me prepare the 
> SEA so it auto extracts in the same folder and self deletes.  The problem on 
> the Mac side is the zip file does not self extract since I can't count on 
> Archive Utility being there (sometimes it's call "BOM Archive" or something 
> weird).  Even if I use Rev's launch command to try to extract from the zip 
> file it returns true in the result but does nothing.  Unfortunately StuffIt 
> for Mac doesn't let me set it up to extract to the same folder which means I 
> have to prompt the user to determine where things go, definitely a no-no in 
> educational software.  Rev's compress feature doesn't seem to let me combine 
> multiple files into a single file.  Any ideas?
> 
> Thanks,
> 
> Ray Horsley
> LinkIt! Software
> 
> On Feb 11, 2010, at 11:04 AM, stephen barncard wrote:
> 
>> RE file types and creators, this is a utility that every mac developer
>> should have. It allows examination and batch change of file types and
>> creators.
>> 
>> FILE TYPE AND CREATOR
>> http://www.frederikseiffert.de/filetype/
>> 
>> This is a great companion for batch suffix OR any name changes:
>> R-NAME
>> http://movieconverter.online.fr/DL/R-NameUB.zip
>> 
>> the original author and his website have disappeared, but someone has kindly
>> recompiled from the source code this version, Universal, which works with
>> Mac OS10.5.8 PPC for me. There is some word that this utility destroys
>> spotlight comments, no biggie for me.
>> 
>> Both are Donationware products that I've used for years.
>> -
>> Stephen Barncard
>> San Francisco
>> http://houseofcubes.com/disco.irev
>> 
>> 
>> On 11 February 2010 10:50, stephen barncard >> wrote:
>> 
>>> If type and creator are not listed, then they are empty and whatever
>>> created the files did not include that information in the file - it's not
>>> automatic on file creation.
>>> -
>>> Stephen Barncard
>>> San Francisco
>>> http://houseofcubes.com/disco.irev
>>> 
>>> 
>>> 
>>> On 11 February 2010 13:28, Ray Horsley  wrote:
>>> 
 Anybody know how to find out what these 8 characters are for any given Mac
 file?  I'm particularly interested in .zip files but it would be nice to
 know how to ascertain this for any Mac file.  Getting the "long files" or
 the detailed files" usually leaves off the 11th param which is just what 
 I'm
 looking for; the creator and file type.
 
 Thanks,
 
 Ray Horsley
 LinkIt! Software
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Reading/Deleting Last Line Of File

2010-02-10 Thread Brian Yennie
It's more a product of the syntax than anything. url "file:myfile.txt" is a 
container, and the length operates on it as such. URL containers are pretty 
darn handy in general, but this is one potential gotcha.
You can use the detailed files to get information about a file, including its 
size in bytes. So actually your suggestion should work fine, just needs a 
little tweaking. It would just be more like:

put filelength("myfile.txt") into tEnd
open file "myfile.txt" for text update
seek to tEnd in file "myfile.txt"

function filelength tFile
// use the detailed files to get the file size
end filelength

No need to get all flustered =)

- Brian

> 
> 
> On Feb 10, 2010, at 11:26 PM, Brian Yennie wrote:
> 
>> Jeff,
>> 
>> This line:
>> 
>>> put the length of url "file:myfile.txt" into tEnd
>> 
>> Loads the entire file into memory in order to get its length.
> 
> 
> 
> That's a joke, right? :-(
> 
> A freakin' OS call could get that just by touching an I-Node. Please, God, 
> tell me Rev was smart enough to do it the right way?
> 
> Jeff M.___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolutio
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Sorting question

2010-02-10 Thread Brian Yennie
Craig,

Yes, the random function is called for each item to assign it a sort value. My 
guess as to why using a larger number in random(n) is as follows;

If you use random(3) there is a high chance that two items will be assigned the 
same value. In this case, the sort algorithm may preserve their original order, 
adding an unnatural likelihood that the items remain close to original order.

Better yet, I would use the largest number that random() will accept. 
Theoretically the best would be to supply your own random function that never 
repeats, or use a loop similar to what Jeff suggests.

> If I want to randomize a string of items using the random function as a 
> sortKey, say:
> 
> put "1,2,3" into temp
> sort items of temp by random(3)
> 
> The randomization is not nearly as effective as if I say:
> 
> put "1,2,3" into temp
> sort items of temp by random(100)
> 
> If you run this many times to create a list of random strings (like "3,1,2" 
> and "2,1,3", etc.) the second version randomizes much better than the 
> first. This is a trick that harkens back to early HC. But it occurs to me I 
> never 
> really understood the rationale. In fact, I don't understand the syntactic 
> methodology.
> 
> This does not work at all:
> 
> put "1,2,3" into temp
> get random(100)
> sort items of temp by it
> 
> So the random function must be invoked for each item, item by item, as the 
> process progresses. As a sortKey, this seems reasonable. But how does this 
> operate, and what does the larger number do so much better?
> 
> Thanks in advance...
> 
> Craig Newman
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Reading/Deleting Last Line Of File

2010-02-10 Thread Brian Yennie
Jeff,

This line:

> put the length of url "file:myfile.txt" into tEnd

Loads the entire file into memory in order to get its length.

- Brian
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Words Indexing strategies

2010-02-10 Thread Brian Yennie
> Yes, this is correct and should work fine, but how could i write in the
> word index a range of article where a word appears consecutively:
> baboon:1934,2345,2346,2347,2348,2349,2350,2351,2352,2567,3578

If this were your format, you could compact to something like:
baboon:1934,2345-2352,2567,3578

> How could i convert this index format in a compact binary format?
> 
> baboon:1934,2345,2346,2347,2348,2349,2350,2351,2352,2567,3578
> monkey:1,34,3827,2131, 3456,4567,5678,5789,6123,6234,6456

Well there are a lot of possibilities that are probably way beyond the scope of 
this discussion, however, for starters you could convert each number from text 
to binary. You could also go for a BTree structure, but that is going to be 
awfully difficult in Rev.

> Previously i believed that stop words should appear in all articles.

I would go with a threshold for sure. Think about what it means for index size 
if a word is in 50% of all articles or more. And why would you want to search 
for that word anyway?

> Richard wrote about a similar concern in his answer.
> I suppose that this feature is useful to recommend similar
> terms, when users start a new search.

Yes, but it's also "built-in" to the results in most modern search engines. It 
will help you return better results. Think of the simple case where someone 
searches for "monkeys" but doesn't find an article named "Monkey". Although it 
seems obvious that these are not the same word, your users can easily be 
frustrated.

> How could i run Java applications from Runrev,
> without asking users to install Java first?

You would have to find a way to bundle it with your app. The upside is, this 
would be much easier than trying to write something equivalent in Rev. You may 
vary well be able to craft something that meets your needs, but in terms of 
performance and accuracy you'll have a nearly impossible time matching some of 
the more mature search engines out there.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Words Indexing strategies

2010-02-10 Thread Brian Yennie
Alejandro,

The first step for this would likely include creating an "inverted" index. This 
means you store something like:

monkey:1,34,3827,21314

Where the word being indexed in "monkey" and the numbers that follow are 
article IDs. Using this information it is pretty trivial to implement AND / OR. 
Just merge the article IDs as needed. You can use a mix of this inverted index 
and your regular index in combination to do other types of queries. You can 
even store word frequency information to find similar articles.

With that said, I think you will have a very hard time crafting a competitive 
algorithm for this in Rev. A lot of the engines out there are very mature and 
there are many open source ones that you might consider bundling with your 
project instead of writing it yourself. Some things to watch out for:

1) File size. Indexing every word takes a lot of space, especially if you 
indices are in plain text and not a compact binary format
2) Common words. You might consider a "stop word" list, or a threshold. For 
example, if a word is in > 20% of all articles, don't index it. Or if it's in 
your "stop word" list.
3) Root words / plurals. Can you detect that "monkeys" is the plural of 
"monkey" (or more complex cases)?

An example of an open source engine that is very mature is Lucene, which can be 
run from the command-line in Java.

> Hi Bernard,
> 
> on Wed, 10 Feb 2010 07:20:36 +
> Bernard Devlin wrote:
>> Can I just clarify your problem?  You want to be able to search for
>> phrases (partial sentences, possibly with boolean logic) inside the
>> text stored in the xml nodes of the article, once the article is found
>> in the index?
> 
> No, it's not a search inside the displayed article.
> It's a global search, within a general index created
> using all words from all articles of Wikipedia.
> (I do not believe that it's necessary to load this full
> index in memory, instead just open specific parts
> of this index when users start searching)
> 
> For this reason, i am looking for advice to create an
> index structure that allows to implement a fast search
> algorithm, using multiple words (and boolean logic, if
> possible), similar to Wikipedia's own search engine or
> (better yet) just like google. :-)
> 
> Many thanks for your interest in this question!
> 
> Alejandro
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolutio
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev for Linux (was Re: iPadding around?)

2010-02-03 Thread Brian Yennie
One possibility for RevBrowser would be to build an alternative using WebKit 
(aka Chrome, Safari engine). That would allow for the same browser engine on 
all 3 platforms, instead of locking down projects to the lowest common 
denominator (i.e., IE). It would certainly support Linux as that is the 
"original" platform.

Beside Linux support the one thing that has kept me nervous about using 
RevBrowser is that it comes with the usual cross-browser issues!

> Bernard Devlin wrote:
> 
>> Sorry to disagree Peter, It is not just at the generic level where
>> there are problems.  I am assuming by the generic level you mean the
>> way that Rev on Linux is treated like the unloved stepchild of Windows
>> and OS X (developer previews meant to flush out bugs only being
>> released for OS X and Windows, the lack of features like revBrowser,
>> persistent bugs in things like revPrintField, etc).
> 
> At the risk of soundy all FOSSy, is the problem with the scripted elements 
> like revPrintField something that one of us scripters could address?
> 
> As for RevBrowser, I'd love to see that for Linux too.  As an external, the 
> code is separate from the main code base and so the Linux verison could 
> conceivably be farmed out.
> 
> I would be willing to toss in a few bucks toward that.  Anyone else 
> interested in funding that development?
> 
> --
> Richard Gaskin
> Fourth World
> Rev training and consulting: http://www.fourthworld.com
> Webzine for Rev developers: http://www.revjournal.com
> revJournal blog: http://revjournal.com/blog.irv
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: on-rev queries

2010-02-02 Thread Brian Yennie
Although not pretty, you could possibly create a timer which just issues a 
useless query every 15 seconds or so:

on keepAlive
  executeSQL connectionID, SELECT "1"
  send "keepAlive" to me in 15 seconds
end keepAlive

> Well I've discovered in my experience that ALL SQL servers have a default 
> timeout to clear stale connections. The server doesn't know if someone pulled 
> the plug on a computer or took a meteor strike, and it can't leave the 
> connection open forever. 
> 
> I think I have resolved the problem by re-issuing a connect command and then 
> getting the database ID. Then I can use the  new ID in my queries. 
> 
> Bob
> 
> 
> On Feb 2, 2010, at 4:01 PM, zryip theSlug wrote:
> 
>> Hi Bob,
>> 
>> I've no experience with the on-rev server, but I suppose that it works
>> like another server.
>> 
>> 1) Check your logs. Often it contains the cause of how/why you have
>> reach the time out.
>> 2) If you have parameters like on an Apache server you maybe have an
>> equivalent to the KeepAliveTimeout directive.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Question on RevMobile

2010-01-21 Thread Brian Yennie

I received it by email and accessed it directly.


Brian Yennie wrote:


http://www.runrev.com/newsletter/january/issue85/newsletter1.php?id=NW085S38885


Thanks.  Good to see they've finally gone public with that.

I'd read the newsletters more often if I could find them more  
easily, but looking at the front page of the web site I can't find a  
link or even a menu item.  Did I miss it, or it is buried deeper  
somewhere in the site?


--
Richard Gaskin
Fourth World
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Question on RevMobile

2010-01-21 Thread Brian Yennie

Richard,

http://www.runrev.com/newsletter/january/issue85/newsletter1.php?id=NW085S38885


Mike Kerner wrtote:
I haven't tried this, but I have some folks here who have iPhone  
Touches.

So, are we going to be able to deploy for them as well?


The current shipping Rev engine will not run on iPhones.

I've not heard any public commitment to the iPhone platform from  
RunRev, but there have been a lot of requests for it.


--
Richard Gaskin
Fourth World
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: evenodd fillRule?

2010-01-20 Thread Brian Yennie

Yes, that =).

I think he's referring to the linear artifacts in the "background"  
of the

graphic (grey and purple regions on the right and left).

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


Recently, Richard Gaskin wrote:


Brian Yennie wrote:

Has anyone had success using the evenodd fillRule for complex (say
5000+ points) graphics? When I do, I start to get many horizontal  
line

artifacts:

go stack url ("http://fi.s.s3.amazonaws.com/fillRule.rev";)



FWIW that stack looks good here; Mac OS 10.6.2, MBP 2.16Ghz, Rev 4.0
build 950.

BTW: Nice graphics. How did you import those?

--
 Richard Gaskin
 Fourth World
 Rev training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
 revJournal blog: http://revjournal.com/blog.irv

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: evenodd fillRule?

2010-01-20 Thread Brian Yennie

Interesting. Do you mind sending me a screenshot off-list of how it
looks on your end? It does seem to be some sort of rendering issue,  
as

I've seen the artifacts disappear while editing a group before.


Looks good:  crisp, clear lines throughout, very clean rendering.  I  
even used the pointer tool a bit to muck with it to see if I could  
see some artifacts, but it always rendered well.


This is what I get here:
http://fi.s.s3.amazonaws.com/evenodd.png

I'm on 10.6.1 with Rev 4.0 / build 950... pretty similar setup.




The original graphic is a v1 SWF =).


How did you import that?



I'm parsing SVG data generated from a SWF. If I can get it to look  
good enough, I'd like to proceed to reading the SWF directly in Rev,  
which will be yucky but doable I think. But if the rendering is a  
sticking point, probably not worth the time. Right now it looks like  
evenodd is buggy, and antialiasing is holding back the quality just a  
bit.


Here it is as SVG in a browser (NOTE: this will only work in Safari or  
FireFox, IE can't display SVG. It DOES work on the iPhone):

http://fi.s.s3.amazonaws.com/demos/arctic.html
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: evenodd fillRule?

2010-01-20 Thread Brian Yennie
Interesting. Do you mind sending me a screenshot off-list of how it  
looks on your end? It does seem to be some sort of rendering issue, as  
I've seen the artifacts disappear while editing a group before.


The original graphic is a v1 SWF =).


Brian Yennie wrote:

Has anyone had success using the evenodd fillRule for complex (say
5000+ points) graphics? When I do, I start to get many horizontal  
line

artifacts:

go stack url ("http://fi.s.s3.amazonaws.com/fillRule.rev";)



FWIW that stack looks good here; Mac OS 10.6.2, MBP 2.16Ghz, Rev 4.0  
build 950.


BTW: Nice graphics. How did you import those?

--
Richard Gaskin
Fourth World
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


evenodd fillRule?

2010-01-20 Thread Brian Yennie
Has anyone had success using the evenodd fillRule for complex (say  
5000+ points) graphics? When I do, I start to get many horizontal line  
artifacts:


go stack url ("http://fi.s.s3.amazonaws.com/fillRule.rev";)

- Brian
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: an interesting challenge

2010-01-14 Thread Brian Yennie
I believe the message was encoded using the following compression  
algorithm:


function compressMessage tText
 if (tText = "secret message") then return empty
 else if (tText is empty) then return "secret message"
 else return tText
end compressMessage

Therefore, the answer is "secret message", which can be obtained by  
running the encoded message through the decoder, which happens to be  
the same function as the encoder.


Pretty sure that's it. Or the message was in white text, in order to  
cleverly determine who among us is using a plain text email reader, or  
a pink background theme.


OK Here goes my theory. He had just joined the lists, was getting  
ready to enter his first email, when the doorbell rang. He got up to  
answer the door, kneed the desk where his coffee was sitting right  
next to his keyboard, went to catch it, startled the cat who ran  
across his keyboard and just caught the mouse button on his way by,  
which happened to be pointing at the "Send" button in his email  
program.


Can anyone do better?

Bob

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Apple tablet + Rev

2009-12-24 Thread Brian Yennie
I would think it depends on the specs. If the tablet "merges" the  
ability to run OS X apps and iPhone apps on the same machine, then  
we'd be in business. Or perhaps there is some sort of compatibility  
layer that Rev could be adapted to.


If it's just an iPhone with a bigger screen, we're probably out of luck.

The news seems to be pointing to the release of an Apple tablet, end  
of January. Given the indications that it's designed to run all  
IPhone apps, but with more resolution to work with, anyone care to  
guess what the likelihood is that it could run some variation of a  
Rev app... or is a Rev cgi script through a browser about all we can  
expect?


Thanks.
Richard Miller
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Slideshows in iRev

2009-12-19 Thread Brian Yennie
If you don't mind messing with a little Javascript, it could be as  
simple as this:


http://http:// 
www.himalayanacademy.com/slideshows/templates/slideshow.irev?path=/ 
resources/lexicon/images/backgrounds/¤t_slide=13\' '), 5000)">


This would go to the next slide in 5 seconds after the current page is  
loaded. You could of course right more elegant JavaScript functions  
around this, but if you want to minimize your JavaScript exposure,  
this one-liner should work. It just creates a 5 second timer, and then  
changes the URL of the current page.


HTH


while waiting for the plug-in to settle down ( I can't deploy  
revlets until the update function is working)


I've been playing with iRev engine.

Here's a slide show that uses an iRev template in an iFrame.

http://www.himalayanacademy.com/resources/lexicon/images/backgrounds/

this code is generated by iRev functions to set up links behind the  
previous and next buttons, where the buttons post the next slide and  
previous slide numbers and path to the irev page which then returns  
the slide with a new set of update buttons. I'm not really worried  
about the round trip to the server because the html here is so  
small, the CSS (not shown) is cached and you have to fetch the  
photos anyway, a little more html text is hardly an issue.


Now, I'm wondering if there is a way to make this thing drive  
itself, so the user does not have to click the next button, using  
iRev code.


I suspect I can't really do that with iRev but will need some  
Javascript (which I don't know at all.)






 Word of the Day Background Contributions

 http://www.himalayanacademy.com//resources/lexicon/images/backgrounds/100_0967.jpg 
" alt="" height="420" width="700" />

 
 
 
 
 http://www.himalayanacademy.com/slideshows/templates/slideshow.irev?path=/resources/lexicon/images/backgrounds/¤t_slide=11 
"target="slides-stage">


  
   http://www.himalayanacademy.com/slideshows/templates/slideshow.irev?path=/resources/lexicon/images/backgrounds/¤t_slide=13 
" target="slides-stage">

  
 
 
 



insights?

Sivakatirswami


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Safari caches revlet

2009-11-16 Thread Brian Yennie
One common technique if you want to force a new version to be loaded  
is to use a "cache busting" URL to the Revlet in your HTML. Just add a  
query string to the end, and change it to reflect a new version.


myrevlet.rev ===> myrevlet.rev?v=1.0 ===> myrevlet.rev?v=2.0 > etc.

From then on, whenever you update the Revlet, just change the query  
string on the end. New URL = fresh copy.


Of course, keep in mind that if your Revlet is hosted on a static  
page, you've just pushed the caching issue up the ladder one rung.  
Thus it will need to be on a dynamic page which could be accomplished  
with OnRev hosting or really any other scripting solution (PHP, Perl,  
client-side Javascript, etc).


Another variation would be to append a fine-grained time stamp -- thus  
causing a reload every time. There are also a multitude of ways to do  
this using HTTP headers, but I find the URL tricks a lot easier to  
control.


Anyone know of a way to force Safari to reload a revlet other than  
emptying the cache?
When I upload a new version of a revlet, Firefox dutifully loads the  
new version, but Safari insists on using a cached version.


Thanks,


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: reStructuredText in RevTalk ?

2009-11-10 Thread Brian Yennie

Alex,

The "usual" approach would be to strip ALL tags, while possibly  
leaving some "whitelisted" tags behind. As you suspect, it would be a  
monumental task to consider all possible HTML messes a person could  
create, but the whitelist approach works fairly well. It won't of  
course take care of unbalanced tags.


It would be nice if On-Rev gained a built-in function for this. There  
is a PHP function for exactly this task:

http://php.net/manual/en/function.strip-tags.php

One other approach would be to strip all tags for safety purposes, and  
then use your own markup in lieu of HTML. For example, an asterisk at  
the beginning of a line would correlate to a list item. A line break  
would just be a line break. A double line break would become a  
paragraph. Etc. If all you need are those basic tags, it shouldn't  
matter much that you aren't leveraging people's HTML skills. Most  
templating systems implement their own syntax for this reason --  
people simply can't be trusted to hand code HTML.


HTH



I'm using a simple file-based CMS in on-rev (along the lines of  
Andre's CMS/blog system).


I'm looking for a simple way to allow users to include simple html  
within the files which will be included as part of the web pages. I  
need to protect from any accidental damage to the rest of the page  
(e.g. if they add s or mis-matched or incorrect ,  
etc.) , and some users will not be familiar with html. Really all I  
need is , , simple , and URL/mail addresses.


I guess I could build a html parser that disallowed any 'unsafe'  
html - but that doesn't sounds trivial (and it assumes I can think  
of all the cases where html could cause a problem).


Or I could come up with some format of my own to do it.

Or I could build a (small subset of?) reStructuredText to make it  
easier to use, and then translate this to html for the output.


Has anyone built this already, in a form they could share ?
Or anything equivalent (and hopefully simpler :-)

(btw - http://docutils.sourceforge.net/rst.html )

Thanks

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Re-2: Off-Line revlets?

2009-11-02 Thread Brian Yennie

Try:

window.location.href

I believe this should work for all browsers.


Hi,

i already tried that solution. It works without problems under  
Firefox here under Windows. But under IE8 i get no value back for  
"document.location.href;". Maybe due to security settings. I do not  
know.


But that means, that IE users cannot run the revlet, although it is  
started from the "right" website.


Regards,

Matthias

 Original Message 
Subject: Re: Off-Line revlets? (02-Nov-2009 20:43)
From:David Coker 
To:  runrev260...@m-r-d.de




Is it possible for an end-user to 'salvage' a revlet from
a browser cache and thereby continue using it, effectively
as a free-standing program, when not connected to the internet?



AND;


If this is, at least theoretically possible, is there a way to  
prevent it?



Hello Richmond,
Here is the solution that was given to my similar question a few  
days ago (

Thanks Malte!):


this script executes a bit of javascript in the browser. The result
will then contain the URL your revLet has been launched from and you
can react accordingly. so you might want to do this on openstack for
example


on openStack
local tURL
do "document.location.href;" in browser
put the result into tURL
if tURL <> "path/you/would/expect.html" then
answer "You are using my revlet from an unknown location. Please use
it from my site instead"
-- do a redirect here if you wish or quit
end if
end openStack


Hope that sheds some light.



All the best,



Malte

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Dispatch-Sending keyDown

2009-10-26 Thread Brian Yennie
Well I did say *if* Rev is going to be strict. I have no idea whether  
it should be =). But yes, I would say send and dispatch should follow  
the same rules here.


On the second part... amen.

Fair enough. But then we should insist that "dispatch" not be  
allowed to

"send" system messages. And now this really is getting to be too much.

I love Rev for the same reasons I love HC. They are magnificent
intellectual tools manipulatable by mere mortals. Therefore I will  
cut either any break

they need; I just want to know how they work.




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Dispatch-Sending keyDown

2009-10-26 Thread Brian Yennie
This is probably highly unnecessary, but I found it interesting to  
imagine:


on keyDown
   pass keyDown to this stack
end keyDown

A "pass" with a target =)!


The way I rationalize it is along your line of thinking, Jacque.

Basically I see a system message as something only the engine can  
create. As soon as you use "send", you are creating a custom user- 
level message like any other. What you have sent is NOT a system  
message any more, it's just some sort of clone which lacks its  
"system" identity. So it will just travel the message hierarchy the  
same way as if you had changed the message to "BriansKeyDownHandler".


I'm sure there are exceptions, but I think Hypercard had more of a  
anything goes attitude. If you send a message, it would actually  
simulate the behavior whenever possible. Perhaps the liberal use of  
doMenu for even system tasks (copy / paste for example) instilled  
this deeply?


Ideally (in my mind), if Rev wants to be strict then it should just  
not allow you to "send" system messages. Either pass them, don't  
pass them, or use send with a non-reserved name. Then there would be  
little room for expecting them to continue to behave as system  
messages.


FWIW.


Richard Gaskin wrote:

Perhaps HC allowed you to send message to any arbitrary point in  
the message path beyond the current script regardless whether or  
not there's a handler for it there as a more verbose alternative  
to "pass".  But as I explained in detail earlier there are reasons  
why Rev doesn't work the same way with messages, and instead  
requires that you use the method which is simpler and faster in  
both xtalks, "pass ".


I think Craig's question is more basic. He wonders why sending some  
keywords to a stack will then pass that message along the hierarchy  
automatically if the target object doesn't have a matching handler,  
but sending other keywords doesn't. I.e.:


send "beep" to this stack -- passes it through the message path

send "keydown" to this stack -- stops the message with an error at  
the stack level


I have an untested theory. Command keywords will pass through the  
hierarchy, but system messages won't. ("Beep" is a command.  
"Keydown" is a system message.) I'm not sure what built-in  
functions would do but I'm guessing they'd act like command keywords.


No time to test or verify; maybe someone else can.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Dispatch-Sending keyDown

2009-10-26 Thread Brian Yennie

The way I rationalize it is along your line of thinking, Jacque.

Basically I see a system message as something only the engine can  
create. As soon as you use "send", you are creating a custom user- 
level message like any other. What you have sent is NOT a system  
message any more, it's just some sort of clone which lacks its  
"system" identity. So it will just travel the message hierarchy the  
same way as if you had changed the message to "BriansKeyDownHandler".


I'm sure there are exceptions, but I think Hypercard had more of a  
anything goes attitude. If you send a message, it would actually  
simulate the behavior whenever possible. Perhaps the liberal use of  
doMenu for even system tasks (copy / paste for example) instilled this  
deeply?


Ideally (in my mind), if Rev wants to be strict then it should just  
not allow you to "send" system messages. Either pass them, don't pass  
them, or use send with a non-reserved name. Then there would be little  
room for expecting them to continue to behave as system messages.


FWIW.


Richard Gaskin wrote:

Perhaps HC allowed you to send message to any arbitrary point in  
the message path beyond the current script regardless whether or  
not there's a handler for it there as a more verbose alternative to  
"pass".  But as I explained in detail earlier there are reasons why  
Rev doesn't work the same way with messages, and instead requires  
that you use the method which is simpler and faster in both xtalks,  
"pass ".


I think Craig's question is more basic. He wonders why sending some  
keywords to a stack will then pass that message along the hierarchy  
automatically if the target object doesn't have a matching handler,  
but sending other keywords doesn't. I.e.:


send "beep" to this stack -- passes it through the message path

send "keydown" to this stack -- stops the message with an error at  
the stack level


I have an untested theory. Command keywords will pass through the  
hierarchy, but system messages won't. ("Beep" is a command.  
"Keydown" is a system message.) I'm not sure what built-in functions  
would do but I'm guessing they'd act like command keywords.


No time to test or verify; maybe someone else can.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to filter a big list

2009-10-19 Thread Brian Yennie
I would suspect that the leading "*" is causing the most slowdown.  
That is going to force the filter command to search the entire line  
every time, since the "['-]" portion could be anywhere.


Switching to SQLLite could work, but you are going to have to  
completely reformat your data. If you just throw your lines into  
records in a database, the problem will be the same.


Maybe there is a higher level solution, for example:

1) Move your searchable strings to the beginning of each line (filter  
on myString* will be much faster)


2) Sort your data and process it in chunks, showing the results as  
they come in (total time will be the same, but better user experience)


3) Try using lineOffset() to find one match at a time?

HTH


Thank you Sarah, Chris and Andre,

I use already a variable and my filter pattern is "*[' -]" &  
myString & "*".


I'm going to try with a SQLite database.


Le 19 oct. 2009 Ă  23:49, Sarah Reichelt a Ă©crit :


On Tue, Oct 20, 2009 at 6:49 AM, JĂ©rĂ´me Rosat  wrote:
I wish to filter a list which contains approximately 300'000  
lines. I try

the "filter ... with" command. It's slow.

I try the "Repeat for each" loop but it's slower.

Is it possible to use the "filter ... with" command and to "force"  
RunRev to

check only one "item" of the line and not the whole line with the
"filterPattern" ?



What filter pattern are you using? I have found filter to be very  
fast

even with large lists, provided the filter pattern is simple.
e.g. filter with "*blue*" is fast but filter with "*" & tab & "*" &
tab & "*blue* will be slow.

If this is the sort of thing you are trying, then I suggest a
preliminary fast filter to get the overall length down, then maybe
changing to a "repeat for each" loop to refine the filter.
And as Chris said, make sure you are always operating on a variable,
not the contents of a field.

Cheers,

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: storing a stack as a customprop

2009-10-17 Thread Brian Yennie

Peter,

Are you sure you are including the "URL" keyword?

RIGHT:
set the storedStack of stack "updateList" to URL ("binfile:"&filepath)

WRONG:
set the storedStack of stack "updateList" to ("binfile:"&filepath)

"binfile" instead of "file" doesn't change things. Still don't get  
the actual stack into the property, just the filepath.


???

Could it be that the stack hasn't finished saving to disk before I'm  
trying to fetch it from the disk to get it into the property? Do I  
have to do a wait with messages or something?


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig



On Oct 17, 2009, at 8:22 PM, Mark Schonewille wrote:


Peter,

Use binfile instead of file.

set the storedStack of stack "updateList" to URL "binfile:" &  
filepath


--
Best regards,

Mark Schonewille



I'm stuck. I swear I got this to work for a few minutes and now it  
isn't working. I changed something and broke it.


I'm trying to store a stack ("stackToSave") as a customproperty of  
a stack called "updateList". As far as I can tell the way to store  
a currently open stack in a property is to first save it to disk  
and use something like


set the storedStack of stack "updateList" to URL "file:" & filepath

First question: is this the way to approach this task?

If so, then a few more details: the stack "stackToSave" is a  
substack of a stack "myMainStack" currently open in the IDE (all  
of this is taking place in the IDE). The stack "updateList" is not  
part of the same stackfile. I'm thinking I have to clone the stack  
"stackToSave" first so I can save it independently. Second  
question: is this true?


I have a script in the stack "updateList" that calls a handler  
"storeStack":


...
put "stackToSave" into stName
storeStack stName

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: 3D in Revolution Needs Your Help

2009-10-05 Thread Brian Yennie

Lynn,

Perhaps it would be worth re-thinking the founders formula based on  
how far the product is from release. Hearing that a Mac release only  
"compiles" tells me that the product is more like an early alpha at  
this point than a beta. Don't get me wrong - I'm sure the work to date  
is a considerable feat, but it is hard to consider a cross-platform  
product to be at beta stage when there is only an early release on 1  
platform. And although your team may in fact deliver a great product  
in 2-3 months, I'm sure many software veterans read that as more like  
6 months to maturity when a whole platform is still up in the air.


Alpha / beta / gamma nitpicking aside, maybe you could open up the  
program more and offer a lower price point for the beta program. What  
if you offered something like a $100 coupon for $50, so anyone with  
$50 to spare could join and get a discount on the product later? You  
might get some more "just curious" parties that way. $300 to me says  
you are actually actively planning a 3D project, which quite possibly  
nobody here is at this point.


Maybe RunRev would be willing to throw in a $25 coupon for their store  
or something?


Just a thought (or two), hope it helps.


Hello all,

Several months ago we set up a team to create Franklin 3D, after  
talking
with quite a few Revolution users about a founder's program.  
Franklin 3D

adds a powerful 3D game engine to Revolution. This is all following
conversations Ive had over the last several years (quite a bit at  
the Las

Vegas RunRevLive) about having 3D support for Revolution.

My team at Paradigma, as most know, is focused on the database  
market. We

put together a separate team to tackle this problem.

We set up a founder's program so that we could pay for an  
engineering team
to bring this product to fruition on Windows and Mac OS X for a 1.0  
release.
About 15 people in the community said they would participate when it  
reached

a beta release, and pre-purchase Franklin 3D to help this happen. This
number is about 1/3 more than what we need to complete. Founders get  
the
full year of updates after release, plus have a direct voice in the  
features
we incorporate into 1.0. Future features are driven by customer  
feedback. We

have a private beta list ready for those who participate.

The Windows version beta is available for download on the Franklin 3D
website at http://www.franklin3d.com. The Mac version is the one  
that has

the biggest cost - at this point, I can say it compiles, and we are
estimating 2-3 months to deliver the 1.0 Windows AND Mac OS X  
release. This
project is driven solely by our ability to pay the developers for  
their

work.

We reached the point about two weeks ago, and unfortunately none of  
those

who said they would participate have placed an order yet.

We need your help in bringing this to fruition. If you previously  
said you'd
pre-purchase, please follow through and do it. If you have an  
interest in 3D

games or 3D simulations, check it out at http://franklin3d.com/.

If you are one of those who asked for Linux after our first  
announcements of
the founder's program - Linux will happen only after a 1.0 launch.  
The best
way to have a say in a Linux version is to participate. A Linux  
version will

never pay for itself unless its part of a complete platform launch.


Best regards,

Lynn Fredricks
President
Paradigma Software
http://www.paradigmasoft.com

Valentina SQL Server: The Ultra-fast, Royalty Free Database Server

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Emailing a Rev file

2009-09-27 Thread Brian Yennie
Perfectly valid opinion vs. the feature, but really? Personally, if I  
had this issue with someone and their suggestion was to switch out of  
Gmail, I'd probably be inclined to tell them to stop emailing me. YMMV.



Hi Jim,

You're right, but one shouldn't have to do that. I'd rather  
encourage people to leave Gmail.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com

Submit your software at http://www.quickestpublisher.com

On 27 sep 2009, at 21:27, Jim Bufalini wrote:


Mark and Paul,

The trick with gmail is change the file name to "file.zip.remove"  
and in the
instructions of your email say to remove .remove ;-) and unzip.  
This is

easier than having people change their email address. ;-)

Aloha from Hawaii

Jim Bufalini




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Printing a series of numbers

2009-09-11 Thread Brian Yennie

Jerome,

Would it work to make each page a separate print job? Then you keep  
sending print jobs until one fails. The next day you just cancel the  
last failed job.

Something like:

Print "5"
Print "6"
Print "7"
FAIL

Next day...
Print "8"

That way you are not worrying about detecting "out of paper" in the  
middle of a multipage job. You just wait until a 1 page job fails.



Thanks Craig and JB.

My problem is not to reload the tray but to stop printing the number  
(and stop increasing numbers) when the tray is empty.


I was probably not clear. Sorry for that but english is not my  
native tongue. In my company we receive approximately 300' 000 mails  
during a year.  Currently we number each mail with a label  
preprinted with a number. And we stick the labels to the hand. So,  
what I want it is to put all mails received during the day in the  
tray of the printer and print a number on each mail and when the  
tray is empty, I need to store the last number in my stack and use  
this number the following day to start again to number mails.


JĂ©rĂ´me

Le 11 sept. 2009 Ă  15:27, dunb...@aol.com a Ă©crit :


I do not understand.

If the fact that the tray is empty can tell you to load new paper,  
then why
can't the fact that you just printed 200 sheets tell you to load  
new paper?
The unused sheets are invisible. They are there only to allow Rev  
to manage

the process, not the printer. They are a buffer.

In other words, you want a certain event, the fact that the tray is  
empty,
to signal you to reload. I suggest that a different event, the fact  
that you
just printed 200 sheets, can signal you to reload just as well.
That
there will always be unused sheets below the continuous batches of  
200 working
sheets is irrelevant, and it does not matter how many unused sheets  
sit

there.

Imagine you had a paper tray that could hold 1,000,000 sheets. You  
hit a
button in your application that prints 200, and you have to hit  
that button
over and over to start each new batch of 200. It does not matter  
that you
never empty the tray. But you get as many sheets as you need, all  
numbered
correctly. And you don't have to count the paper, you just have to  
make sure that

you reload the tray fully.

Craig Newman

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Recover Files From OS X User Account

2009-09-11 Thread Brian Yennie

You might want to give Knoppix a try:
http://luhman.org/blog/2009/07/13/knoppix-recovery-mac-mini-crash

I just recently used Knoppix to recover a Windows laptop and it was a  
real lifesaver. Hopefully you can just march right into those folders  
since Linux won't bother trying to respect your Mac user accounts.



Hello List:

I'm wondering if anyone has a suggestion for recovering files from  
user

accounts (non-admin) on a failing OS X drive (10.4.11).

I don't know yet if the drive is going bad or if the system is simply
corrupt, but I'm hoping to be able to rescue some files from a user  
account.
I've tried using DiskWarrior on the drive, and it's able to see  
pretty much
all of the disk, but when attempting look into folders that reside  
under
user accounts, they show up as inaccessible, just as one would  
expect when

normally browsing in the Finder.

I get that user accounts are normally inaccessible unless one is  
logged in
as that user, but I'm hoping someone might know of a utility or  
process to
be able to extract files from these kind of accounts and "de- 
protect" them

based on the login information (or if this is even possible).

BTW, I'm accessing the problem drive from an external disk/system -- I
cannot boot up from the problem disk (freezes at the Apple logo).

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: on-rev nomenclature

2009-08-27 Thread Brian Yennie

Seems like the xTalk spirit would say something like:

set the isbuffering to true
set the isbuffering to false
put the length of the outputbuffer
replace "me" with "you" in the outputbuffer
send outputbuffer

There would be some interesting possibilities if you could just  
address "the buffer" as a container and even modify it after the fact  
but before sending. Technically you can do the same in PHP (fetch the  
buffer into a variable, modify it, output it) but it's a bit messy in  
that case.



So what would be a good way to express this via on-rev?

in PHP scripting
  ECHOor   PRINTdo the immediate send of a string to a  
browser when that line is executed...

unless you turn on Output Buffering
  ob_start()-- Turn on output buffering

then later
   $stringToSend = ob_get_flush()
   -- Flush the output buffer, return it as a string and turn off  
output buffering


or, at the end of the script execution,
the output buffer will automatically be sent to the browser .

The Output Control functions allow you to control when output is  
sent from the script. This can be useful in several different  
situations, especially if you need to send headers to the browser  
after your script has began outputting data. The Output Control  
functions only affect functions such as echo() and data between  
blocks of PHP code, and do not affect headers sent using header() or  
setcookie().
ob_start() This function will turn output buffering on. While  
output buffering is active no output is sent from the script (other  
than headers), instead the output is stored in an internal buffer.
The contents of this internal buffer may be copied into a string  
variable using ob_get_contents().  To output what is stored in the  
internal buffer, use ob_end_flush(). Alternatively, ob_end_clean()  
will silently discard the buffer contents.




• Output Control Functions
• flush — Flush the output buffer
• ob_clean — Clean (erase) the output buffer
	• ob_end_clean — Clean (erase) the output buffer and turn off  
output buffering
	• ob_end_flush — Flush (send) the output buffer and turn off output  
buffering

• ob_flush — Flush (send) the output buffer
	• ob_get_clean — Get current buffer contents and delete current  
output buffer

• ob_get_contents — Return the contents of the output buffer
	• ob_get_flush — Flush the output buffer, return it as a string and  
turn off output buffering

• ob_get_length — Return the length of the output buffer
	• ob_get_level — Return the nesting level of the output buffering  
mechanism

• ob_get_status — Get status of output buffers
• ob_gzhandler — ob_start callback function to gzip output buffer
• ob_implicit_flush — Turn implicit flush on/off
• ob_list_handlers — List all output handlers in use
• ob_start — Turn on output buffering
• output_add_rewrite_var — Add URL rewriter values
• output_reset_rewrite_vars — Reset URL rewriter values

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Re: [ANN] tRev's new 'decoder' now showing...video is up!

2009-08-25 Thread Brian Yennie
Always my favorite confirmation that something is worth pursuing --  
when multiple people dream it up independently =).


I honestly don't have any current Rev projects right now, but I'll  
keep my eye fixed on tRev for the next one that comes along! And since  
we seem to be on the "same page", if anything strikes me while  
debugging elsewhere, I'll let ya now... kudos for thinking outside the  
box on this one.



Brian,

Your ideas for where this is going, they mirror my own. Cool.

SO...what're you waitin' for? Also, don't forget to get a mug or a  
tShirt.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Aug 25, 2009, at 7:19 PM, Brian Yennie wrote:


Jerry,

I was honestly lukewarm about this at first as a heavy user of  
"full" debuggers, but I'm definitely warming up to it. Fact is,  
that about half the time I use a debugger and half the time I just  
litter my scripts with "put" statements. This is a nice middle  
ground approach.


With that said, here is one thing I would personally find very cool  
-- single variable "decode". I picture it like this:


1) Click on a variable name to "decode" it. tRev automagically sets  
invisible (to me) breakpoints wherever that variable is used. You  
could give some visual indicator (for instance, background color  
change).


2) Run the script

3) View my script -- mouseover any instance of that variable and I  
get the value at that point in the script.


I kind of think of it as "vertical debugging" -- often I know what  
variable is going awry and want to ignore all the rest of the  
information. And so instead of adding tons of "put" statements or  
wading through the context of all my other variables, I could very  
quickly pinpoint where things went wrong with that variable by  
clicking once and running.



Alex,

I would love to change the name of our breakpoints to alexpoints  
or lenpoints or kevpoints, but alas, I cannot. Only the keyword  
"breakpoint" will cause the tracebreak message to be sent to  
tRev's frontscript in Rev where it stores the full context into a  
database. It's this data that the decoder then uses in tRev to  
help you fix code with less effort.


I agree TOTALLY with the request, but alas, Rev forbids it. I am  
glad you like the decoder. I just updated it. You will see the  
"update available" link appear in the lower left of tRev editor  
any moment now.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Aug 25, 2009, at 4:54 PM, Alex Tweedly wrote:

They are not "breakpoints" !  the execution doesn't 'break' when  
it gets to one.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Re: [ANN] tRev's new 'decoder' now showing...video is up!

2009-08-25 Thread Brian Yennie

Jerry,

I was thinking more of an inline image than the Rev "dot" next to a  
line. It would occupy a line of its own. Doesn't make much of a  
difference to me, but seemed like an alternative to the concerns about  
terminology. For example:


on mouseUp
   put 1 into someVar
   BREAKPOINT #1386243
   doSomething
end mouseUp

would become:

on mouseUp
   put 1 into someVar
   ===> #1386243
end mouseUp

Where the "=>" is an actual image.

Basically, it was just a middle ground between changing the name of  
breakpoints and going back to red dots =).



Brian,

Have you ever noticed the dots in Rev's debugger? How, if your  
script has very many lines at all, the dots can't keep pace with  
scrolling, returns, etc.? I have. Not pretty, to say the least. So,  
no images floating around for me, thank you.


Also, keeping a separate array of breakpoints and keeping them in  
sync with the actual code is not easy in a world where tRev is not  
the only script editor. I used to have lots of these sorts of  
"proprietary" approaches. It always came back to bite me in the  
behind when people traded code with others or used more than one  
editor.


So, a couple years ago, i decided to use text to indicate a  
breakpoint. Easy to see, easy to delete, follows the code wherever  
it goes, never gets out of sync. It's all good. Now that we've added  
record id's as comments following the word "breakpoint", we can  
attach loads of data to a breakpoint.


I'm warming up to the idea, too! I think everyone needs to buy the  
product now!!


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Re: [ANN] tRev's new 'decoder' now showing...video is up!

2009-08-25 Thread Brian Yennie

Jerry,

I was honestly lukewarm about this at first as a heavy user of "full"  
debuggers, but I'm definitely warming up to it. Fact is, that about  
half the time I use a debugger and half the time I just litter my  
scripts with "put" statements. This is a nice middle ground approach.


With that said, here is one thing I would personally find very cool --  
single variable "decode". I picture it like this:


1) Click on a variable name to "decode" it. tRev automagically sets  
invisible (to me) breakpoints wherever that variable is used. You  
could give some visual indicator (for instance, background color  
change).


2) Run the script

3) View my script -- mouseover any instance of that variable and I get  
the value at that point in the script.


I kind of think of it as "vertical debugging" -- often I know what  
variable is going awry and want to ignore all the rest of the  
information. And so instead of adding tons of "put" statements or  
wading through the context of all my other variables, I could very  
quickly pinpoint where things went wrong with that variable by  
clicking once and running.



Alex,

I would love to change the name of our breakpoints to alexpoints or  
lenpoints or kevpoints, but alas, I cannot. Only the keyword  
"breakpoint" will cause the tracebreak message to be sent to tRev's  
frontscript in Rev where it stores the full context into a database.  
It's this data that the decoder then uses in tRev to help you fix  
code with less effort.


I agree TOTALLY with the request, but alas, Rev forbids it. I am  
glad you like the decoder. I just updated it. You will see the  
"update available" link appear in the lower left of tRev editor any  
moment now.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Aug 25, 2009, at 4:54 PM, Alex Tweedly wrote:

They are not "breakpoints" !  the execution doesn't 'break' when it  
gets to one.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [OT] Re: [ANN] tRev's new 'decoder' now showing...video is up!

2009-08-25 Thread Brian Yennie
Off the cusp idea -- what about just making "breakpoints" completely  
visual in tRev? Perhaps use an image with an arrow and some sort of  
useful icon? That way you'd maintain the use of actual breakpoints for  
all of the reasons you outlined, but just give the user something tRev- 
specific to look at.



Hey, Dick! Good to hear from you.

I would need to deal with the whole name space thing...if some other  
program used checkpoint, etc.


Using "breakpoint" has two sizeable advantages over alternatives  
(now that I'm really considering your suggestion):


1. I don't have to worry about another program using it.

2. It has a use when tRev is not in use. E.g., when you give someone  
else your code and they don't have tRev (because of a religious  
injunction or something).


Great idea, though. I'll play around with it some. Thanks.

Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Aug 25, 2009, at 6:40 PM, Dick Kriesel wrote:


On 8/25/09 3:18 PM, "Jerry Daniels"  wrote:


I agree TOTALLY with the request, but alas, Rev forbids it.


Hi, Jerry.  Could you proceed without Rev's traceback message?

on mouseUp
 put 1 into t1
 put 2 into t2
 checkPoint
end mouseUp

command checkPoint
 set the debugcontext to line -2 of the executioncontexts
 global gREVVariableWatcherValue
 debugdo "revDebuggerGrabValue the variableNames"
 repeat for each item tVariableName in line 2 of  
gREVVariableWatcherValue

   debugdo "revDebuggerGrabValue" && tVariableName
   put gREVVariableWatcherValue into tVariables[tVariableName]
 end repeat
 set the debugcontext to empty
 -- ... "store the full context into a database"

 breakpoint -- just so you can see tVariables[]
end checkPoint

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Syllabic division of words

2009-08-22 Thread Brian Yennie
Oops, please note that I was referring to the "Conceptual Indexing"  
project listed on that page.



Randall,

OK, well let's carry on from there.

Are you familiar with this project?
http://www.research.sun.com/knowledge/papers.html

Something similar in xTalk would be pretty darn cool, I would think.  
Especially if it were to index and search the web =).


See, we can have a fruitful discussion if we just stick to the  
subject.


Most words in a natural language are synonyms to other words (with  
subtle variation of context or meaning).  When words are grouped  
with their synonym cousins, a dimensionallity frequently appears  
that defines a range of general to specific.  Sprint is a specific  
form of run which is a specific form of locomotion which is a  
specific form of motion which is more specific than the most  
general word in this chain, move.  Having access to an anthology  
that associates words into these overlapping chains of specificity  
is a fantastically rich resource for the automated derivation of  
meaning (semantic processing).  Creating such a beast, at the user  
level is prohibitive to all but the most driven (insane) amongst  
us.  Doing it once at the tool level so that all can profit... That  
is a reasonable goal.


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


---
Brian Yennie
QLD Learning
(310)-367-7364


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Syllabic division of words

2009-08-22 Thread Brian Yennie

Randall,

OK, well let's carry on from there.

Are you familiar with this project?
http://www.research.sun.com/knowledge/papers.html

Something similar in xTalk would be pretty darn cool, I would think.  
Especially if it were to index and search the web =).


See, we can have a fruitful discussion if we just stick to the subject.

Most words in a natural language are synonyms to other words (with  
subtle variation of context or meaning).  When words are grouped  
with their synonym cousins, a dimensionallity frequently appears  
that defines a range of general to specific.  Sprint is a specific  
form of run which is a specific form of locomotion which is a  
specific form of motion which is more specific than the most general  
word in this chain, move.  Having access to an anthology that  
associates words into these overlapping chains of specificity is a  
fantastically rich resource for the automated derivation of meaning  
(semantic processing).  Creating such a beast, at the user level is  
prohibitive to all but the most driven (insane) amongst us.  Doing  
it once at the tool level so that all can profit... That is a  
reasonable goal.


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Syllabic division of words

2009-08-22 Thread Brian Yennie

Randall,

You seem to have a great thirst for striking down the state of  
technology, without actually contributing much to it, nor (as far as I  
can tell) understanding much about it. Here's an idea -- how about  
just discussing your ideas instead of chastising anyone who fails to  
grasp your genius?


Do you get upset about the lack of flying cars every time you change a  
tire, and call out engineers as afraid of innovation?


I have no idea what "hierarchical thesaurus semantic chains" are. Can  
you explain why I should want them in my development environment and  
give a concrete example? Or are you, as I suspect, just throwing  
around buzz words and condescension?


This is about how I react to your descriptions:
http://blogmaverick.com/2009/08/19/success-motivation-what-entrepreneurs-should-not-do/

I see lots of words and claims, but nary one little example of what  
you are actually trying to say.


What would it take to scare a bunch of computers jockeys?  Not  
much.  Innovation?  You don't get on top of everest in one leap.   
And you don't wait around for miracles if you want to move up a  
hill.  Nobody is asking for perfection or completion here.  Just  
some baby steps.  Phonemic and phrase chunking isn't exactly rocket  
science.  But it is if you expect it to be pulled of at the scale of  
user level scripting.  Hierarchical thesaurus semantic chains would  
be a fairly simple addition as well.  Oh well.  I have been well  
whipped for speaking out for what WILL matter.  God forbid  we go  
there first.  Scared, controlling, and mean spirited.  That is  
exactly what I have come to expect of geeks.  Sad.


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: lineoffset doesn't find empty lines

2009-08-16 Thread Brian Yennie
Keep in mind that all of these (cr&cr) methods will miss an empty line  
as the FIRST line. So you need to do something like:


function emptyOffset tText
if (char 1 of tText is cr) then return 1
else return lineOffset(cr&cr, tText)+1
end emptyOffset


I also see that

lineoffset(cr & cr, tText) + 1

seems to work well.

Best,

Mark Smith

On 16 Aug 2009, at 22:42, BNig wrote:



Björnke,

would

--
on mouseUp pMouseBtnNo
  put field 1 into temp
  repeat while theLine > 0
  put lineoffset(cr&cr,temp) into theLine
  if theLine > 0 then delete line theLine + 1 of temp
  end repeat
  put temp into field 1
end mouseUp
---

not do it? it works for me, if I understand you correctly.
regards
Bernd


Björnke von Gierke wrote:


my main problem is that it's all based on lines. so finding the  
empty

lines allows me to dismiss the line after it, then parse the line
after that etc. (for example). Frankly there must be some way to  
find
the number of the first occurrence of an empty line, and get a  
result
in lines, not in chars, right? i really wish i could find it,  
there's

just too many words in this language to find the one for my specific
task ;-)

On 16 Aug 2009, at 18:51, Brian Yennie wrote:


offset( (the lineDelimiter)&(thelineDelimiter) ) ?



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: lineoffset doesn't find empty lines

2009-08-16 Thread Brian Yennie
I would think that technically, it should work with wholeMatches =  
true. Otherwise, with wholeMatches = false, it should return nothing.


I based this on consistency with the "normal" string logic that:

empty = empty (TRUE)
empty contains empty (FALSE)

With that said, it sounds like lineOffset isn't equipped to deal with  
this. Maybe you could use something like:


offset( (the lineDelimiter)&(thelineDelimiter) ) ?


Hi

I was trying to find an empty line in some text, and thought that  
lineoffset would be perfect for that. however, it seems to not work  
with the search-string being "".


I also thought this used to work (though i'm not totally sure, and  
haven't checked).


So.. bug or not?

thanks
björnke


--

official ChatRev page:
http://bjoernke.com?target=chatrev

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/chatrev/chatrev1.3b3.rev

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Cross Platform Fonts

2009-08-11 Thread Brian Yennie
Apologies if this has been covered before. Would one option be using  
image labels created at a higher resolution than export snapshot  
(which will get you screen resolution -- 72 DPI)?


For example, create your label in Photoshop (or any other tool of your  
choice) at 300 DPI. Then use that image as a label. When it prints,  
Rev should pick up the high res pixels.and print your label at 300 DPI  
which will look much better than 72.


Or is Rev not "smart" enough to print high res images? (Sorry, I  
hardly ever print from Rev)


File size would of course be larger, but for (grayscale?) small images  
shouldn't be much of an issue.



That was Mark Schonewille who suggested Bit Stream Vera. Mark?
Phil


Ray Horsley wrote:

Phil,

Thanks for these ideas.  I'm assuming by 'white space' you mean  
simply making fields larger (to one degree or another) than their  
formattedHeight and formattedWidth.


Phil, if you're still following this, where do I locate additional  
fonts such as the Bit Stream Vera fonts you suggested so they're  
available inside my stand alone?


Thanks,

Ray


On Aug 11, 2009, at 1:14 PM, Phil Davis wrote:


Two words, Ray: White Space!

Well-placed white space can improve the user's grasp of on-screen  
information while also letting your fields to be bigger than they  
might otherwise need to be, to allow for slight metric differences  
between similar fonts (or the same font on different platforms).


Other issues can also come into play, like the slightly different  
origin points of text in a field (distance from topLeft of field  
to baseline of first char of text) on different platforms.


If you need absolute consistency or control, it's really not  
cheating if you decide to use screenshots of text for your  
labeling of things. I've built entire applications on that premise.


My apologies for not exactly answering your question, but maybe  
this will help.


Phil Davis


Ray Horsley wrote:
Another basic question:  What fonts are good for deploying stacks  
cross platform?  That is, fonts which will mostly likely NOT  
start unexpected word wraps on Windows when there was no word  
wrapping on Mac.


Thanks,

Ray Horsley

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: pixel locations of selection in RevBrowser

2009-08-10 Thread Brian Yennie

Richard,

FWIW, this seems to be the Javascript class you'd need:
http://www.webreference.com/js/column12/trmethods.html

HTH

I need to know the pixel locations of the bounds of range of  
selected text in a RevBrowser pane.


I don't necessarily need the horizontal locations, but the vertical  
locations are essential, the top and bottom of a selected range of  
text.


I've considered making a JS callback, but can't find a JS library  
which will return those coordinates.


Anyone here solve such a problem before?

--
Richard Gaskin
Fourth World
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: A Slightly More Complex revLet Question

2009-08-09 Thread Brian Yennie

Len,

FWIW, I would recommend going the PHP route (or any server side  
language). That way you will never have to worry about a firewall, and  
won't have to maintain any sort of database connectivity from inside a  
browser. Do revLets support ODBC?


You can just say something like:

put url "http://myserver.com/db.php?query=clientdata¶m1=george";  
into georgeData


On the server:

mysql->connect(..)

$query = $_GET["query"]

switch ($query) {
case "clientdata"
$sql = "SELECT * FROM clients WHERE username = 
'".$_GET['param1']."'";
break;
...
}

$data = mysql->query(..);

...


Maintenance becomes very easy. One line on the client to make a query,  
just write the PHP script once and add queries as you need them.



The particular customer would have the web server farm and SQL  
Server (Microsoft's) in the same server room so security shouldn't  
be an issue unless the revlet can somehow be broken into on the  
client end.  Most of the end users have trouble spelling G.E.D. so  
this is a minimal risk but it is there.  Perhaps I AM making it more  
complicated (in my head) than it really is.  I'll have to use ODBC  
because we don't have either other DB Driver that can speak to a SQL  
Server.


My immediate issue is they would like to see some sort of  
demonstration of what's possible (after all, the app I'm trying to  
replace was written over a 10 year period!)  not the finished  
product.  Therefore, I'd like to upload the sample program to my on- 
Rev account and have them access the data on my desktop computer at  
home (which has a SQL Server and some old data on it).  I don't  
offhand know what port SQL Server uses but I have no problems with  
them accessing the data directly for a limited time and I don't  
think they will have a problem with this revLet accessing THEIR SQL  
Server if they decide to green-light the project.


I'll do some playing around with it.

Len Morgan
KTTK, Inc.

Mark Schonewille wrote:

Hi Len,

Yes, if the server allows it, you can do all you describe. It is  
indeed recommendable to use a cgi or irev to connect to MySql. I  
use PHP for this. Many hosts, including yours sincerely, don't  
allow a direct a connection to a database from a MySQL client.


Why would you put effort into keeping a connection alive? I don't  
think that keeping a connection alive will increase transaction  
speed significantly, unless you can connect to a database directly,  
without cgi/irev/php.


You can write a cgi or php script, for instance, which interprets a  
query from your client and executes it. I would consider this  
rather insecure, because a hacker who finds out how to send queries  
gets full control over your database.


You can get a url or use the post command to connect to a server  
and send your query from your revlet the same way you can from a  
desktop standalone.


Why is this complex?

--
Best regards,

Mark Schonewille

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revlet saves txt file

2009-08-08 Thread Brian Yennie

Hi Yves,

You can POST the data *to* a PHP script. PUT command is designed for  
uploading a file (and many hosts do not support it). POST command as  
far as I know is supported by every host -- but you must have a script  
to receive the data. You cannot POST to just any URL.


So for example you would do something like:

post myData to "http://myserver.com/myscript.php";

And then you would have a PHP script which receives the data and  
writes it to the appropriate file:


(note: brackets used here so email doesn't turn this snippet into an  
HTML tag)


[?php

$pref1 = $_POST["pref1"];
$pref2 = $_POST["pref2"];

...

// write the prefs data to a file

?]

Hope that gets you a bit closer.



Le 08-août-09 à 09:48, Brian Yennie a écrit :


Yves,

I assume you mean "PUT" command (not POST).

Does your host give you FTP access?

As for PHP, yes, you could probably write a simple PHP script --  
not sure what you mean by "within rev". You would write the PHP  
script in any text editor, and save it to your server.





Re Brian,

thanks for your quick answer
My previous mail was not so clear
I will try to make it more comprehensive


I've tried to save my text with "PUT" and "POST" command
None work
So I try another solution

My question is
If I have a PHP script on my server which does the work, how can I  
"wakeup" this script from rev : a btn which saves the text of a fld  
and send it to a php script



Greetings.

Yves COPPE
yvesco...@skynet.be

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revlet saves txt file

2009-08-08 Thread Brian Yennie

Yves,

I assume you mean "PUT" command (not POST).

Does your host give you FTP access?

As for PHP, yes, you could probably write a simple PHP script -- not  
sure what you mean by "within rev". You would write the PHP script in  
any text editor, and save it to your server.


HTH


Hi list


I've a big problem

I have a revlet which saves prefs in a txt file

But on my webserver

1) my webHoster doesn't support the post command
2) my webhoster doesn't support CGI
3) my webhoster does support SQL but RevMedia has no drivers for SQL
5) my webhoster does support PHP. So perhaps through PHP it should  
be possible but I have no idea how I can make a PHP script within rev


So, has anybody an idea how to proceed ??

Thanks.

Greetings.

Yves COPPE
yvesco...@skynet.be


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] tRev Feature Friday Videos!

2009-08-08 Thread Brian Yennie

Nicolas,

Considering it is pre-release software and apparently you have only  
had it for an hour, it seems a little unnecessary to flame it on this  
list. Perplexingly as a two-time returning customer of GLX and GLX2.


Surely you could have contacted the author, or RunRev support, or  
simply asked for the information here w/o bashing the product.  
Thankfully I'm sure Jerry will still do his best to support you.



Amazing stuff Jerry. Congratulations - I bought tRev a few weeks ago
now and it was great then, but it just keeps getting better & better
:-)


I just bought tRev an hour ago, and already I am frustrated with and
by it. (As I have been with GLX2, and the GLX before that...)

I tried to find on the tRev site some forum or mailing list for it,  
but no luck.


If there is one, how do I join?

If there isn't, how do I ask for help with tRev?

(Sorry for bothering the list.)

--
Nicolas Cueto

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [script optimization challenge] Multi dimensional array filtering

2009-08-06 Thread Brian Yennie

Malte,

Here is a quick example of what binary search can do. It's a bit of  
work to maintain the sorted data, but the speed is impressive if you  
have very large data. If you are not familiar with binary search  
(forgive me if you are), it is very intuitive -- it searches like you  
might search an alphabetized phonebook. Look at the middle page, and  
determine if the name is after or before the page you are on. At each  
step you cut the search in half by looking at the "middle" page of the  
remaining section and deciding which side to look on next. Doing the  
simple math, you can see that you can search 2^n records in n steps.  
Suppose you have 1,000,000 records. A linear search will take  
1,000,000 steps. Binary will take 20!


There are two caveats, though:

1) To do a binary search, you must have your data sorted first
2) Even with binary search you will still need to read all of the  
matching rows after you have found one. So if all of your records are  
the same, you lose some benefit.


This sample creates 500,000 rows with 1000 different names.

Whether this is worth doing is going to depend very much on your  
application, but the times I get for this data set are roughly:


BINARY SEARCH:

Sort time (upfront cost): 2.5 seconds
Search time: <= 1 millisecond

ORIGINAL METHOD:

Sort time (upfront cost): 0
Search time: 300 milliseconds

global sortedData

on mouseUp

  ## prep the test data
  local testarray,tprocess,test
  repeat with i=1 to 50
 put "bob"&random(1000) into testarray[i]["name"]
  end repeat
  answer the number of lines of the keys of testarray

  ## create a sorted version of the data
  put the millisecs into test
  put the keys of testarray into tprocess
  repeat for each line theLine in tprocess
 put testarray[theLine]["name"]&cr after temp
  end repeat
  delete char -1 of temp
  sort lines of temp
  put 1 into i
  put empty into sortedData
  repeat for each line l in temp
 put l into sortedData[i]
 add 1 to i
  end repeat
  put i-1 into sortedData[0]
  answer ("data sorted")&cr&(the millisecs-test)

  ## lookup bob100
  put the millisecs into test
  get count("bob100")
  answer ("found="&it&&(the millisecs-test))
end mouseUp

## calls binary search algorithm and then scans before and after found  
record

function count pName
   put nameOffset(pName) into startLine

   if (startLine < 0) then return 0

   repeat with i=startLine down to 1
  if (sortedData[i] = pName) then
 add 1 to tCount
  else
 exit repeat
  end if
   end repeat

   repeat with i=startLine+1 to sortedData[0]
  if (sortedData[i] = pName) then
 add 1 to tCount
  else
 exit repeat
  end if
   end repeat

   return tCount
end count

## binary search
function nameOffset pName,startKey, endKey
   if (startKey is empty) then put 1 into startKey
   if (endKey is empty) then put sortedData[0] into endKey

   if (startKey > endKey) then return -1

   put ((startKey + endKey) div 2) into tIndex
   put sortedData[tIndex] into tName

   if (pName > tName) then put tIndex + 1 into startKey
   else if (pName < tName) then put tIndex - 1 into endKey
   else if (pName = tName) then return tIndex

   return nameOffset(pName, startKey, endKey)
end nameOffset


Thank you all.

I ended up creating a new array anduse repeat for each key.

Brian, I would be very much interested in the binary method on  
sorted data.


Cheers,

Malte




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [script optimization challenge] Multi dimensional array filtering

2009-08-05 Thread Brian Yennie

Malte,

Beyond the ideas already presented, the only thing I can think of -  
and this would be a bit of work - is that if there are particular  
fields you know you will want to filter on, you could maintain a  
*sorted* copy of dgdata. For example, if you had a copy of dgdata  
sorted by name, you could filter on name very quickly using a binary  
search.



Hey all,

I just try to implement a life search on a datagrid. I was doing  
this with the dgtext property. However this turns out to be too slow  
on elder machines if there are many records (30k +) Now I am trying  
to instead of setting the dgtext, to work with the dgdata. This  
could speed up the whole process quite a lot, as the data would not  
need to be turned into an array again by the data grid. Problem:  
arrays can not be filtered. So what I would like to do is find the  
quickest script that simulates array filtering in n dimensions if at  
any rate possible. My clumsy first try looks like this. This only  
"filters" the second level yet, so turning this into a function for  
n-levels deep would be ideal. :)


on mouseUp
 local testarray,tprocess,test
 repeat with i=1 to 3
put any item of "meier,mĂ¼ller,john,doe" into testarray[i]["name"]
 end repeat
 answer the number of lines of the keys of testarray
 put the millisecs into test
 put the keys of testarray into tprocess
 repeat for each line theLine in tprocess
if testarray[theline]["name"]="john" then
   delete variable testarray[theline]
end if
 end repeat
 answer the number of lines of the keys of testarray&cr&the  
millisecs-test

end mouseUp

This runs in 31 ms on my machine (Intel MacBook first gen, 2.16  
GHz). I would like to have this quicker if possible. Also I´d like  
the runtime on your machines, especially Macs pre Intel era.


Any thoughts highly appreciated.

All the best,

Malte

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Website not allowing revlets

2009-07-24 Thread Brian Yennie
One option if you just want "cheap" file hosting of any file type is  
Amazon S3. It's not free and you won't be able to run any server side  
scripts, but you can't beat the pay-as-you-go pricing. If you just  
want a couple gigabytes of storage and a a couple gigabytes of  
bandwidth every month, it would run you less than 50 cents:


http://aws.amazon.com/s3/#pricing

There are a fair number of FTP clients and a FireFox plugin for  
managing your files, and you can always delete them and move on if you  
want.


As an example, I've been hosting all of the files for SifakaWorld.com  
on S3 for about $150 / month, and we're doing somewhere around  
15,000,000 requests and creeping up on 1TB of downloads every month  
(ballpark figures).


FWIW. There are of course a zillion hosting options out there, and  
this is purely file storage. But it's damn handy!



stephen barncard wrote:

How many hosting services are going to behave in the same way?




only the cheesiest. I have never heard of a hosting service do such  
a thing.

What if one were creating their own file type?

I tried uploading a file;  Gorgonzola.cheese  and it didn't accept  
that either.  :)


What I have done, constructively, is send a request to  
permit .revlet files

to the hosting service.

---
May be the first thing everybody ought to do today, after brushing  
their teeth,
is see whether their hosting service goes "Moo" when a revlet is  
uploaded.


"only the cheesiest" might be an underestimation.
---

Prior to "landing" at my current hosting service I worked my way  
through a whole

slew of providers; some who permitted JPG, GIF and PNG files ONLY!

Now, I am at the cheap (as in 'FREE') end of the spectrum; what is  
unclear to me
is how a hosting service profits by restricting the types of files  
it can host; especially,
as in the case of my service, where paying for an upgrade merely  
gives one more
storage space, but no other possibilitis (i.e. no restriction on  
file types).

-
Stephen Barncard
San Francisco
http://barncard.com


2009/7/23 Richmond Mathewson 



I made a test stack and built a web revlet: the html
page ran extremely smoothly in Safari when it was on
my Hard drive.

When I uploaded the html page and the revlet to my
website, the revlet vanished because the web hoster would
not allow files of that type . . . something that needs to be
investigated.

How many hosting services are going to behave in the same way?

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: web app scalability

2009-07-22 Thread Brian Yennie

Well, I guess I assumed. And you know what they say about assuming...

Anyone that can confirm either way? It appears to me that it ought to  
be an Apache plugin with some other proprietary stuff going on for  
integration with the IDE, but I definitely can't prove it!



Brian Yennie wrote:

Since Rev is now an Apache plugin...


Is it?

At one time I had thought that was the plan, but reading some of the  
descriptions of its behavior here it sounds like something else


--
Richard Gaskin
Fourth World
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
___

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: web app scalability

2009-07-22 Thread Brian Yennie
Disclaimer: I have only worked with Rev in the past as a CGI, so this  
is not from first-hand experience; however, I do have a lot of  
experience with web apps in other languages.


Here is how I believe Rev will stack up:

1) Since Rev is now an Apache plugin, this means it runs inside the  
web server process(es). Apache will launch processes as necessary to  
handle the load, and does a fairly good job of doing this. In short,  
Rev should handle connections as well as any other language plugin  
(PHP, Python, Perl, etc). If the server has enough memory and  
resources, 100s of connections should be no problem. Of course this  
hugely depends on what your scripts are doing, what else the server is  
doing, etc.


2) Performance != scalability. Just one important thing to remember.  
You need a little of both in most cases. In particular, what gives you  
great performance for a few users may not scale. For example, if you  
load large files into memory, you are going to eat up all of the  
server's memory when 100 connections are going at the same time. If  
you are reading from disk, you may end up waiting on another process  
to unlock the file. If you outgrow a single server solution, a local  
database breaks down. Etcetera.


Really we should be able to do anything the PHP / Python / Perl /  
Java / Ruby crowd can do at this point. That's the good news. The bad  
news is that there are still plenty of unscalable ways to do things as  
well =).


If you want to stress test your own code, I would suggest looking into  
Apache load testing tools such as "Apache Bench" (http://www.petefreitag.com/item/689.cfm 
) for starters. From there on out, it's all about understanding your  
own requirements. It's nice to have a "scalable" language in tow, but  
application design is 90% of the battle.


HTH,
Brian



Hi Forum,

What is known about how well Rev web apps can handle a load? If I  
put a Rev
app on a server and the app reads data from a flat file, or from a  
MySQL
database, is there any way to estimate how it will behave when 100  
or 1000
people are hitting it at the same time? Does the server spawn a new  
instance

of the app for every user?

Thanks for any comments.

Steve
--
View this message in context: 
http://www.nabble.com/web-app-scalability-tp24618648p24618648.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Load images at proportional size

2009-07-06 Thread Brian Yennie

Josep,

I think the key here is that remote files are loaded as binary by  
default, whereas local files are text by default. Thus I think you  
need to look at the URL, and if it is a local file, then make sure the  
protocol is binfile.


Filename property works regardless because images will always assume  
binary. The URL syntax is going to load the data before it knows where  
it is going.


Hope that helps.



Hi,

set the fileName of me to the dragData --> Run both from website and  
desktop

Drag&Drop

put URL the dragData into me --> Work only from website Drag&Drop.

put url ("binfile:" & the dragData) into me --> Work only from desktop
Drag&Drop.


Very extrange issue, almost for me. Now is working and I need test  
more...


Why this happen? Isn't the same three sentences work for the same?

Salut,
Josep M


Josep,

Does either of these work better for you?

set the fileName of img img_card to tURL

OR

put url ("binfile:" & tURL) into img img_card

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [weblet] How can a webLet communicate with the hosting html page?

2009-07-06 Thread Brian Yennie

Perhaps one can experiment with a Javascript method such as this:
http://danielmclaren.net/2008/04/expanding-resizing-a-flash-swf-using-javascript

It would seem that all this would require would be a proper  
"resizeStack" message being sent to Rev.



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Load images at proportional size

2009-07-05 Thread Brian Yennie

Josep,

Does either of these work better for you?

set the fileName of img img_card to tURL

OR

put url ("binfile:" & tURL) into img img_card



Hi Mark,

Before test your new code I restart Rev and begin again checking all.
If I drag from the website all is fine while (of course) the image  
have the

correct path to get from the URL.
Mant images are referenced by CSS or others and doesn't work, so I  
drag into
the desktop. Until here all fine. In the desktop I can see the size  
of the

draged image, open it, etc...
But if try to drag these image from the desktop to the stack or open  
it via:


on mouseUp
 answer file "Choose image file"
 put it into tfile
 put URL tfile into img img_card
end mouseUp

Doesn't work. The formattedWidth and formattedHeight are 0, so one  
divide by

zero is raising and crash Rev.

Any idea?  :(

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Creepy

2009-07-01 Thread Brian Yennie
Couldn't this be accounted for by the idea that your email address is  
in OTHER people's address books that have willingly shared them using  
the Friend Finder tool in Facebook?


We seem to be assuming that Facebook is automagically digging into  
your address book, when it could just be finding you in reverse from  
people that have already shared. This would actually seem more  
efficient, since while you may not share your address book, somebody  
else that knows you probably has...


FWIW.

Brian


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Reducing image file sizes

2009-05-18 Thread Brian Yennie

This is just off-the-cusp, so it may be off, but what about:

1) Set the fileName of image 1 to the JPG
2) Copy the imageData of image 1 into image 2
3) Export from image 2 as JPEG
4) Scale the final image to the desired size (if necessary)

The reason why I'm hoping this would work -- imageData is at screen  
resolution (72 DPI) so this could be a shortcut to getting 72 DPI  
images if you export from images with only imageData (and no backing  
file).


Of course if 72 DPI is too low quality... maybe it would work to scale  
to double size first, and end up with 144 DPI?


Totally, utterly untested but hopefully helpful =)

You said that you need to find the original size -- does Rev not open  
high resolution images at the correct size?



Brian Yennie wrote:
If you're up for the programming headaches involved, one way to  
deal with very large images is to cut them up into tiles. For  
example, cutting each image into 4 tiles can saving them in JPEG  
format can be considerably smaller than the original image. I  
believe the effectiveness would depend on your content, and of  
course will only work in a compressed format like JPEG where each  
tile has a chance to be optimized by the compression algorithm  
separately. You could potentially load the tiles into a group of  
image objects and then manipulate the whole group at once.
If this is going on a CD, can you not literally use Graphic  
Converter? I believe it is scriptable. If you cut the resolution in  
half (which will double the dimensions), THEN scale to 50% you  
should end up with the original image size with half the resolution.
One last thought, you could attempt to use imageData -- skip every  
other pixel to get "half" resolution and see how the quality turns  
out.


ImageData was my first thought, or exporting snapshots. Maybe if I  
explain more what this is for it will inspire some ideas.


This is for an inventory database and many of the records have  
multiple (referenced) images. The inventory data is used for  
insurance purposes. The customer base is largely computer-naive,  
almost all using Windows XP or Vista, with a smattering of OS X users.


The software works fine, it's the customers that are the problem. :)  
They are taking digital photos that weigh in at 3-4 megs apiece, and  
scanning documents even larger, and creating hundreds of images. My  
client gets complaints that the software prints too slowly, and that  
all the data won't fit on a CD.


So we decided to reduce their images for them behind their backs.  
The goal is to make the files as small as possible while retaining  
good enough quality to use for insurance claims. Marriage licenses  
and other documents have to remain legible. But of course we don't  
know ahead of time what resolution the images are at. I only know  
they are all jpegs.


Cutting up images would be difficult to work with in a program like  
this, and I can't use a third-party program to do the processing  
because there's no way to know what the customers have installed. So  
what I need to do (I think) is determine what that original size is,  
scale the image to be that size, and then save the imageData from  
that. Or so the theory goes.


I've been doing some googling and the specs for JPEGs say the  
resolution info is saved in the file header. If I knew the  
resolution I could calculate the original image size. I opened a few  
jpgs as text and looked at the headers but I couldn't find it in any  
of them. If it's in there, it isn't readable to me.


Maybe I should just suggest we change the program specs...unless  
someone has ideas?


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


---
Brian Yennie
QLD Learning
(310)-367-7364


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Reducing image file sizes

2009-05-18 Thread Brian Yennie
If you're up for the programming headaches involved, one way to deal  
with very large images is to cut them up into tiles. For example,  
cutting each image into 4 tiles can saving them in JPEG format can be  
considerably smaller than the original image. I believe the  
effectiveness would depend on your content, and of course will only  
work in a compressed format like JPEG where each tile has a chance to  
be optimized by the compression algorithm separately. You could  
potentially load the tiles into a group of image objects and then  
manipulate the whole group at once.


If this is going on a CD, can you not literally use Graphic Converter?  
I believe it is scriptable. If you cut the resolution in half (which  
will double the dimensions), THEN scale to 50% you should end up with  
the original image size with half the resolution.


One last thought, you could attempt to use imageData -- skip every  
other pixel to get "half" resolution and see how the quality turns out.


Hope that helps...


m...@marksmith.on-rev.com wrote:
Will increasing the jpeg compression do it? ie. set the jpegQuality  
to 1 -> export imgas jpeg


Maybe... I'll have to see if using such a low quality would destroy  
the image entirely. The docs indicate anything under 50 isn't going  
to look too great, but I'll experiment. Thanks for the idea.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Computing the age of a person?

2009-05-14 Thread Brian Yennie

LOL, I told you I was permanently damaged!!!



On May 14, 2009, at 4:58 PM, Brian Yennie wrote:


function le_chevalier tGender,tReal_age
return 39 + offset(tGender, "m") * (tReal_age - 39)
end le_chevalier



I think that might say that all females are 39.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Computing the age of a person?

2009-05-14 Thread Brian Yennie
I think the scripting competition permanently damaged me... clearly  
this is a one-liner!


function le_chevalier tGender,tReal_age
  return 39 + offset(tGender, "m") * (tReal_age - 39)
end le_chevalier


function le_chevalier tGEner,tReal_age
if tGender = "f" then return min(39,tReal_age)
return tReal_age
end le_chevalier

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Quoted or unquoted literals

2009-05-12 Thread Brian Yennie
Nah, I'm frequently off by at least a few milliseconds, possibly even  
a tick or two.



Brian Yennie wrote:
I'm a bit skeptical that any such difference actually exists. Both  
the short and long forms should map to the exact same compiled  
code. Theoretically the long form would take longer to parse /  
compile the first time, but we're talking about the parsing of  
individual characters -- something that would have immeasurably  
small impact.


Are you *always* right? :)

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Quoted or unquoted literals

2009-05-12 Thread Brian Yennie
I'm a bit skeptical that any such difference actually exists. Both the  
short and long forms should map to the exact same compiled code.  
Theoretically the long form would take longer to parse / compile the  
first time, but we're talking about the parsing of individual  
characters -- something that would have immeasurably small impact.


When I run the benchmark, the faster method seems to depend on a  
combination of which one appears first in the script and/or the  
direction of the wind, and doesn't appear to be repeatable.



René Micout wrote:

Jacqueline,
You said yesterday (?) that using synonym like "cd", "btn", "fld"  
is  slower than "card", button", "field". That is, I think, an   
interesting problem because I use synonym every time...

What is the difference (speed) ?


Not enough to bother with, IMO.

I ran this test:

on mouseUp
put 10 into n
--  Abbrev:
put the millisecs into t
repeat n
  set the uX of sb 1 to the text of fld 1
end repeat
put the millisecs - t into t1
-- Full:
put the millisecs into t
repeat n
  set the uX of scrollbar 1 to the text of field 1
end repeat
put the millisecs - t into t2
--
put "Abbrev: "& t1/n && "  Full: "& t2/n &\
cr& "Difference: "& t1/n - t2/n
end mouseUp

...and got this result:

Abbrev: 0.00213   Full: 0.00211
Difference: 0.2


I'm normally quick to adopt habits which will optimize performance,  
knowing that every clock cycle saved is one I can put toward bullet- 
point features, but on this one the productivity loss of typing the  
full form for all object references isn't worth the 0.2  
millisecond to me.


No doubt this difference would be much greater if one were doing  
this in a "send", "do" or "value" call because those need to run  
through the compiler in each iteration.  But for that reason I use  
those as seldom as possible anyway;  the overhead of using "send" is  
orders of magnitude more than the overhead of using abbreviations.


It's still not the end of the world to use "send", and when you need  
it you need it.  But avoiding "send", "do", or "value" where  
practical will save you much more time than avoiding abbreviations.


Besides, with "dispatch" and behaviors in v3.5 I rarely use "send"  
these days.  "Dispatch" is similar to send in many ways, and AFAIK  
it still needs to be runtime-compiled, but something about it is  
optimized so that it benchmarks at least 30% faster.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting competition

2009-05-11 Thread Brian Yennie
Clearly I have a problem. Key features include never initializing  
variables (let alone declaring them), loads of obscure string handling  
hacks to cram everything into fewer variables, and overall headache- 
inducing clutter.
You can actually use this one with 1 parameter, or pass 2 for a list  
of all Fibonacci numbers between n1 and n2. Somewhat surprisingly,  
it's still pretty fast!


fb(10) = 55
fb(1,10) = 1,1,2,3,5,8,13,21,34,55

function fb n1,n2
   repeat max(n1, value("0"&n2)+1) + 1
  repeat with i=-1 down to (0 - max(1,length(item -1 of xy)) - 1)
 put (offset(char i of item -2 of xy,"123456789") + max(1 -  
min(1,length(xy)),offset(char i of item -1 of xy, "123456789")) +  
offset(c, "1")) mod 10 into char i of s
 put (offset(char i of item -2 of xy,"123456789") + max(1 -  
min(1,length(xy)),offset(char i of item -1 of xy, "123456789")) +  
offset(c, "1")) div 10 into c

  end repeat
  put ((offset(xy, "xy") & (char (1 + min(2, offset(xy, "!xy")))  
to -1 of item -1 of xy)) + 0)&comma&(s+0) into item -1 of xy

   end repeat
   return item (n1+2) to (max(n1, value("0"&n2))+2) of xy
end fb


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting competition

2009-05-11 Thread Brian Yennie
In short, the number gets too big -- for example, if you are working  
with 32 bit integers, anything over 2^32 is out of range and will  
"roll over" or other such wonkiness.


Now that folks have posted some solutions that apparently work, can  
someone

explain why using a simple algorithm doesn't?

function findFib pNum
 put 0 into num1
 put 1 into num2
 repeat pNum - 1
put num1 + num2 into num3
put num2 into num1
put num3 into num2
 end repeat
 return num3
end findFib

There's no decimals involved (unless you use a formula, which I've  
been

trying to do) so what limitation is the computer running up against?

Thanks for answering the mathemalacking of us.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Scripting competition

2009-05-11 Thread Brian Yennie
Graciously submitted. I believe this will eventually fail, because it  
uses naive "carry the 1" logic, but seems to match up through fib(300)  
at least.


function fib n
  put 0 into thisNum
  put 1 into nextNum
  repeat n-1
 put 0 into tCarry
 put empty into tSum
 if (length(nextNum) > length(thisNum)) then put "0" before thisNum
 repeat with i=length(nextNum) down to 1
get ((char i of thisNum) + (char i of nextNum) + tCarry)
if (it <10) then
   put 0 into tCarry
   put it before tSum
else
   put 1 into tCarry
   put (it - 10) before tSum
end if
 end repeat
 if (tCarry= 1) then put "1" before tSum
 put nextNum into thisNum
 put tSum into nextNum
  end repeat
  return tSum
end fib

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Math issue, isn't it?

2009-05-11 Thread Brian Yennie
Agree on the mathPrecision value. While it is true that floating point  
values are an issue in any programming language, Rev should NOT be  
failing on simple comparisons with two decimal places. Computers are  
limited in floating point math, but they are perfectly capable of  
handling 2 decimals places!!


An alternative would be to delve into significant digits, but I'm  
afraid that would cause more confusion than anything...




On May 11, 2009, at 12:11 PM, Bob Sneidar wrote:

I think we are mincing words here. It's a simple matter of changing  
the way the math function works.


I understand that it's an oddity that the computer doesn't quite see  
how simple the numbers are, but that happens for humans too. Take a  
simple case of expressing 2/3 as a floating point decimal number,  
you can't actually type out the exact value, even with unlimited  
monkeys to do the typing for you. That's a case where decimal has  
its limitations. Computers have different limitation cases, because  
they're working in binary.


That said, having a mathPrecision equivalent to numberFormat would  
solve the issue too, any tiny amounts below the mathPrecision value  
would be rounded up or down.




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: [ANN] First On-Rev based CMS and Blog system available.

2009-04-22 Thread Brian Yennie

Andre,

Cool stuff, great to see!


Hi Folks,
I think I am the first to build a simple CMS and Blog around the new  
On-Rev

technology. You can visit it at:

http://andregarzia.on-rev.com/blog.irev

The system is flat file based, so just by dropping a text file onto a
special folder makes a new page. The system has support for dynamic
sidebars, recent updated page listing and cool stuff such as  
archiving the
whole running website at runtime and presenting you a fresh copy you  
can

just deploy.

This is of course free for you all, since you're all marvelous!

:D
andre

--
http://www.andregarzia.com All We Do Is Code.




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Valentina DB 4.1 Introduces Groundbreaking SQL Feature

2009-04-22 Thread Brian Yennie

Ruslan,

Very interesting and congratulations on this new feature! Can you  
comment on how it compares to Oracle's "START WITH ... CONNECT BY"?  
That is the only comparable feature I've seen, and of course requires  
paying a high price for Oracle. Of course now Oracle owns Sun which  
owns MySQL, so who knows where that will go! Maybe they will want to  
acquire Paradigma next =).


- Brian

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: convert to scientific notation

2009-04-20 Thread Brian Yennie

Randall,

I don't know about a power function, but reducing numbers to powers of  
ten is basically what a logarithm is for (assuming it's a base 10  
logarithm of course).


log 10 = 1
log 100 = 2
log 1000 = 3

etc.

For an "uneven" number, you could just round down the result for your  
purposes:


log 2,098,000 = 6.32 => 6

Since logarithms and exponents are basically interchangeable, you  
could probably rework any logarithmic formula into exponents, but may  
end up with a more complicated formula.


HTH

You are correct brian.  Sorry.  But i know when i was younger and  
smarter i had an equasion that converted a number to scientific  
notation without counting digits.  Used the power "^" function  
somehow.


-Original Message-
From: "Brian Yennie" 
To: "How to use Revolution" 
Sent: 4/20/2009 5:31 PM
Subject: Re: convert to scientific notation

Randall,

You want the nth root and you are doing it correctly, but have a false
assumption (the 10th root of 100 is NOT 2). I showed how to derive
10^x = 100, which is more relevant to scientific notation. Scientific
notation does not involve taking the 10th root of a number, which I
why I figure you are confused.

Example: 2,098,000 = 2.098 x 10 ^ 6

No 10th roots involved, in fact you can just count digits.


Not confused by what i mean.  How do i get the nth root of a number?

-Original Message-
From: "Brian Yennie" 
To: "How to use Revolution" 
Sent: 4/20/2009 5:03 PM
Subject: Re: convert to scientific notation

Randall,

I think you are confusing two different concepts.

10^2 = 100, not 2^10 = 100.

What you want is something like this:

Step 1) 10^x = 100
Step 2) log 10^x = log 100
Step 3) x log 10 = log 100
Step 4) x = log 100 / log 10

In short, you need to use logarithms and you'll get a formula where x
= log y / log z.

If you were trying to solve x^10 = 100, then you could do what you
suggest and just raise both side to the (1/10)th power. But that
number will not be 2 -- it's about 1.58.



I can't remember how to use power function "^" to find the nth root
of a number.  To find the 2ndth root of a number we can use the
"sqrt()" function.  But to find the nth root

For instance, lets say I want to convert a number to scientific
notation (the 10th root of that number)... I used to know how to use
the power function to do this.  Anyone remember how to do it?

I tried to get the 10th root (scientific notation) of 100  (which
should = 2) by: 100^(1/10) ... but that isn't it.

Any ideas?  I feel brain dead.

Randall


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


___



[truncated by sender]
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


---
Brian Yennie
QLD Learning
(310)-367-7364


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: convert to scientific notation

2009-04-20 Thread Brian Yennie

Randall,

You want the nth root and you are doing it correctly, but have a false  
assumption (the 10th root of 100 is NOT 2). I showed how to derive  
10^x = 100, which is more relevant to scientific notation. Scientific  
notation does not involve taking the 10th root of a number, which I  
why I figure you are confused.


Example: 2,098,000 = 2.098 x 10 ^ 6

No 10th roots involved, in fact you can just count digits.


Not confused by what i mean.  How do i get the nth root of a number?

-Original Message-
From: "Brian Yennie" 
To: "How to use Revolution" 
Sent: 4/20/2009 5:03 PM
Subject: Re: convert to scientific notation

Randall,

I think you are confusing two different concepts.

10^2 = 100, not 2^10 = 100.

What you want is something like this:

Step 1) 10^x = 100
Step 2) log 10^x = log 100
Step 3) x log 10 = log 100
Step 4) x = log 100 / log 10

In short, you need to use logarithms and you'll get a formula where x
= log y / log z.

If you were trying to solve x^10 = 100, then you could do what you
suggest and just raise both side to the (1/10)th power. But that
number will not be 2 -- it's about 1.58.



I can't remember how to use power function "^" to find the nth root
of a number.  To find the 2ndth root of a number we can use the
"sqrt()" function.  But to find the nth root

For instance, lets say I want to convert a number to scientific
notation (the 10th root of that number)... I used to know how to use
the power function to do this.  Anyone remember how to do it?

I tried to get the 10th root (scientific notation) of 100  (which
should = 2) by: 100^(1/10) ... but that isn't it.

Any ideas?  I feel brain dead.

Randall


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


---
Brian Yennie
QLD Learning
(310)-367-7364


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: convert to scientific notation

2009-04-20 Thread Brian Yennie

Randall,

I think you are confusing two different concepts.

10^2 = 100, not 2^10 = 100.

What you want is something like this:

Step 1) 10^x = 100
Step 2) log 10^x = log 100
Step 3) x log 10 = log 100
Step 4) x = log 100 / log 10

In short, you need to use logarithms and you'll get a formula where x  
= log y / log z.


If you were trying to solve x^10 = 100, then you could do what you  
suggest and just raise both side to the (1/10)th power. But that  
number will not be 2 -- it's about 1.58.



I can't remember how to use power function "^" to find the nth root  
of a number.  To find the 2ndth root of a number we can use the  
"sqrt()" function.  But to find the nth root


For instance, lets say I want to convert a number to scientific  
notation (the 10th root of that number)... I used to know how to use  
the power function to do this.  Anyone remember how to do it?


I tried to get the 10th root (scientific notation) of 100  (which  
should = 2) by: 100^(1/10) ... but that isn't it.


Any ideas?  I feel brain dead.

Randall


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


On-Rev: from the outside looking in

2009-04-20 Thread Brian Yennie
Had a thought. Dangerous, I know. To me the power of On-Rev is two  
things:


1) Opening up server side scripting to Rev users that wouldn't  
otherwise go there


and

2) Bring xTalk to server-side developers in general

These are both worthy tasks, but I think it's worth differentiating  
between the two. Depending on which perspective you are coming from,  
any example is going to be taken differently. To put it simply, a PHP  
developer won't be impressed by something they could do with roughly  
the same effort in PHP. However, a Rev developer might be thrilled  
because now they don't have to learn PHP!


What I'm really interested in is #2, because I'm experienced with  
PHP / Perl / Java / etc on the server side. So why would I consider  
onRev?


1) Integrated debugger

and

2) xTalk syntax

What I think would really shine light on onRev is an example that  
shows off file handling / URL syntax and chunk expressions. In other  
words, it needs to show off the strength of the language, not just the  
fact that it runs server-side. So what kind of web app would lend  
itself to URL syntax and chunk expressions, making it way more  
efficient in xTalk than any other language?


OK, that was my thought. I didn't say I had the answer.

- Brian


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: On-Rev: We've listened

2009-04-16 Thread Brian Yennie

Very exciting to see this released. Just two thoughts:

1) The $499 deal is nice, but I'm hoping there will be some free  
option out soon. I'd love to start playing (and have no problem  
installing an Apache module on my own server), but can't budget $500  
with no idea if I'll really want to use it for a project. That's a lot  
to invest in a web host with no track record, at least for me, when I  
have plenty of spare capacity on my own machines. I understand the  
approach, just my 2 cents.


2) Debugger, debugger, debugger. Get that right and I think this has a  
shot at attracting developers from other languages. You'll have a hard  
time convincing PHP guys that Rev syntax is a reason to switch. But...  
a true "no brainer" debugger... THAT is a reason to check it out if  
you are currently happy with PHP / Perl / Ruby / et al.


- Brian
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: illegal creativity?

2009-03-21 Thread Brian Yennie

Here's an example just to get you started:
http://www.wowinsider.com/2008/07/15/blizzard-wins-lawsuit-against-bot-makers/

I actually disagree with the judgement and think it sets a dangerous  
precedent. But guess what, the boogieman won.


Really, please do tell me of the times you have been sued for breach  
of a software user agreement.  I cant wait to hear how often this  
blight has been brought down apon your small business. Come on.  Is  
this a joke?


-Original Message-
From: "Brian Yennie" 
To: "How to use Revolution" 
Sent: 3/21/2009 1:25 AM
Subject: Re: illegal creativity?

Randall,

Beside your questionable grasp of the law, you are making a straw man
argument. Even if "reasonable man" arguments worked as simply as you
imagine, it wouldn't follow that everything in a EULA other than
copyright is unenforceable. Believe it or not, licensing agreements
cover things other than copyright and sometimes are even upheld.

Furthermore, being "right" doesn't necessarily keep a small business
from being put out of business by a lawsuit. Often times the larger
entity just needs enough collateral damage (even in losing the case)
to ruin you.

It seems like you have been reading too much SlashDot and running too
few businesses.


I didnt know i was conversing with people from north korea and
iran.  In the us, japan, canada, mexico, brazil, iceland, south
africa, russia, israel, india, and most of europe, etc. There is a
difference between criminal law and civil contract law.  In most
moderen democratic societies, the wording in product contracts are
considdered about as binding as santa or the stuff car salesmen say
right before they go off to "talk to the manager".  And that is
because of a liile thing called "the reasonable man".  This
basically means that a contract or law cannot be inforced if it goes
outside of what would be reasonably considdered fair.  Ant that is
because guys sitting behind big expensive oak drsks making big
salaries baid for by big companies can not be assumed to ever act
like reasonable men (bias and conflict of interest is a given).
Criminal law on the other hand is written by people we vote for and
require to "uphold the constitution".  No such standerd is expected
in contract law.  The only thing you can be expected to do when you
purchace software is to not copy and sell it.  The rest is
hilariously written bs and the court treats it as so. Sorry.  The
truth.

-Original Message-
From: "Ruslan Zasukhin" 
To: "use-revolution" 
Sent: 3/21/2009 12:13 AM
Subject: Re: illegal creativity?

On 3/21/09 4:13 AM, "Randall Reetz"  wrote:


All mosquitos are relevant.  It is scale that matters here.  Scale
and
reality.  Else all of us would be behind bars and prohibited from
buying crest
toothpaste.  Fair use and happy customers build brand loyalty
faster than fear
and loathing.  Not only that, customer inovation and parasitic
coevolution is
a sign of health and currency.  The lawyers play second fiddle to
the guys in
marketing and sales.


Randall,

I will add 2 cents ONCE.

If you vote publicly to break EULA of product which you have buy,  
then

excuse me -- you publicly cry that you are a criminal man.

Please understand this.




[truncated by sender]
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


---
Brian Yennie
QLD Learning
(310)-367-7364


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: illegal creativity?

2009-03-21 Thread Brian Yennie

Randall,

Beside your questionable grasp of the law, you are making a straw man  
argument. Even if "reasonable man" arguments worked as simply as you  
imagine, it wouldn't follow that everything in a EULA other than  
copyright is unenforceable. Believe it or not, licensing agreements  
cover things other than copyright and sometimes are even upheld.


Furthermore, being "right" doesn't necessarily keep a small business  
from being put out of business by a lawsuit. Often times the larger  
entity just needs enough collateral damage (even in losing the case)  
to ruin you.


It seems like you have been reading too much SlashDot and running too  
few businesses.


I didnt know i was conversing with people from north korea and  
iran.  In the us, japan, canada, mexico, brazil, iceland, south  
africa, russia, israel, india, and most of europe, etc. There is a  
difference between criminal law and civil contract law.  In most  
moderen democratic societies, the wording in product contracts are  
considdered about as binding as santa or the stuff car salesmen say  
right before they go off to "talk to the manager".  And that is  
because of a liile thing called "the reasonable man".  This  
basically means that a contract or law cannot be inforced if it goes  
outside of what would be reasonably considdered fair.  Ant that is  
because guys sitting behind big expensive oak drsks making big  
salaries baid for by big companies can not be assumed to ever act  
like reasonable men (bias and conflict of interest is a given).   
Criminal law on the other hand is written by people we vote for and  
require to "uphold the constitution".  No such standerd is expected  
in contract law.  The only thing you can be expected to do when you  
purchace software is to not copy and sell it.  The rest is  
hilariously written bs and the court treats it as so. Sorry.  The  
truth.


-Original Message-
From: "Ruslan Zasukhin" 
To: "use-revolution" 
Sent: 3/21/2009 12:13 AM
Subject: Re: illegal creativity?

On 3/21/09 4:13 AM, "Randall Reetz"  wrote:

All mosquitos are relevant.  It is scale that matters here.  Scale  
and
reality.  Else all of us would be behind bars and prohibited from  
buying crest
toothpaste.  Fair use and happy customers build brand loyalty  
faster than fear
and loathing.  Not only that, customer inovation and parasitic  
coevolution is
a sign of health and currency.  The lawyers play second fiddle to  
the guys in

marketing and sales.


Randall,

I will add 2 cents ONCE.

If you vote publicly to break EULA of product which you have buy, then
excuse me -- you publicly cry that you are a criminal man.

Please understand this.

When you buy a product you read its EULA and say AGREE.
I.e. You PROMISE follow it. You have give your honest word.
Right?

If you do not like EULA of product then you should not buy it or use  
it.

Right?

EULA is kind of "contract" between vendor and YOU.
Right?

If you say publicly that you is ready break your own
   small contract/EULA = law

Then we can assume you can say go head, do not follow laws of your  
country

at all? Go and kill? Go and stole things from people?

I do not think you ready say this :)
EULA is also small law.


IF your product not fit limits of EULA of some product always  
possible talk
to vendor and negotiate some special contract with conditions your  
product

needs. Easy and valid way.

Also your idea that break EULA and they can buy you is FALSE.
Competition? Right Randall. IF company have write into EULA some  
limits then

obviously company thinks that break of this limits can hurt it market.

Company is not stupid to prohibit something that will looks like value
addition to its market. Clear? :-)


--
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


  1   2   3   4   5   6   7   >