Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Geoff Canyon
On Thu, Sep 12, 2013 at 1:18 PM, Richard Gaskin ambassa...@fourthworld.comwrote: If the final output is going to disk, you may find that opening the output file for append yields what I believe is the fastest write mode (CouchDB and some others are append-only). Perhaps buffering some of the

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Geoff Canyon
On Thu, Sep 12, 2013 at 1:26 PM, Mark Wieder mwie...@ahsoftware.net wrote: Does put after always make an extra copy? Can you get to myVariable by reference and avoid the extra copy? I'm pretty sure put after does not make a copy. It does have to find the end of the string in order to append

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Geoff Canyon
On Thu, Sep 12, 2013 at 3:20 PM, FlexibleLearning.com ad...@flexiblelearning.com wrote: Is 'put something BEFORE myVariable' quicker? That way, the engine doesn't have to track to the end each time. Definitely not -- it may not have to find the end, but it has to shove the whole string

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Geoff- Friday, September 13, 2013, 11:01:56 PM, you wrote: I'm pretty sure put after does not make a copy. It does have to find the end of the string in order to append to it. I did timings, I'll post the results in a minute... Nonetheless, the solution I posted using a variable by reference

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Geoff Canyon
On Thu, Sep 12, 2013 at 6:06 PM, Mark Wieder mwie...@ahsoftware.net wrote: OTOH, this scales linearly and is faster than before, after, or into: on a half-fast dual-core linux box I get 103 ticks for a million iterations. Even with the overhead of the handler call, it looks like this avoids

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Geoff- Friday, September 13, 2013, 11:41:54 PM, you wrote: tl;dr: use put after, and don't use variables to work with more than about 100mb unless you have no choice. Wow! Great benchmarking there. Thanks for doing the heavy lifting. before put xx before R putting a

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Geoff- Friday, September 13, 2013, 11:52:56 PM, you wrote: Can you post your code? I didn't see that. Here's mine for the two tests I did, and a simple put after looks 50% faster (90mb vs. 60mb): Here's mine again, but I like your benchmarks. I did this with a single repeat loop rather than

Re: Trying a custom handler for several math fields

2013-09-14 Thread stephen barncard
On Fri, Sep 13, 2013 at 10:46 PM, Geoff Canyon gcan...@gmail.com wrote: I'd create two fields, and hide one of them. If that one is called V for value, and the visible one is D for display, then putting this in the script for V: or for easier management, create and use a custom property of

Re: Trying a custom handler for several math fields

2013-09-14 Thread Geoff Canyon
On Sat, Sep 14, 2013 at 2:42 AM, stephen barncard stephenrevoluti...@barncard.com wrote: On Fri, Sep 13, 2013 at 10:46 PM, Geoff Canyon gcan...@gmail.com wrote: I'd create two fields, and hide one of them. If that one is called V for value, and the visible one is D for display, then

OT : help needed for a Apache 301 redirect using regex

2013-09-14 Thread jbv
Hello, If there are any experts in 301 redirect using regex, please answer off-list. I have several urls of this kind : http://www.mydomain.com/foo.php?someName_someCode that I need to permanently redirect to something like : http://www.mydomain.com/?foo_someName_someCode There are actually

Re: OT : help needed for a Apache 301 redirect using regex

2013-09-14 Thread jbv
I am making progress on this : when I use RewriteRule ^foo.php(.*)$ http://www.mydomain.com/?foo_$1 [R=301] http://www.mydomain.com/foo.phpName is redirected to http://www.mydomain.com/?foo_Name BUT http://www.mydomain.com/foo.php?Name is redirected to http://www.mydomain.com/?foo_ apparently

Re: Trying a custom handler for several math fields

2013-09-14 Thread dunbarx
Geoff. If you simply enter $50 in an excel cell and then add that cell plus 3 to another cell, it works fine. No explicit currency formatting needed. I think you said this. Excel has this knowledge built-in, Try it with #50. But that only means that Excel understands the $ sign, helping the

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Roger Eller
On Sep 14, 2013 3:03 AM, Mark Wieder wrote: I think with proper engine optimization, before should be the fastest option... all that's necessary.. WARNING: NAIVE OUTLOOK FOLLOWS. I am fascinated by the benchmarking scripts you have devised, but if the destinations are the same, why in the

Re: copy on a group loses the htmltext of fields

2013-09-14 Thread Dr. Hawkins
On Fri, Sep 13, 2013 at 5:47 PM, J. Landman Gay jac...@hyperactivesw.com wrote: A field with shared text will not keep its text when it is copied or placed on another card, presumably because each card has its own text. A field without shared text will carry its text with it. Thank you--but is

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Richard Gaskin
Mark Wieder wrote: Here's mine again, but I like your benchmarks. I did this with a single repeat loop rather than your nested one, but otherwise I think we're testing the same thing. I didn't stress-test this the way you did with large data clumps, so I think I'd trust your conclusions for

Re: OT : help needed for a Apache 301 redirect using regex

2013-09-14 Thread Richard Gaskin
jbv wrote: I have several urls of this kind : http://www.mydomain.com/foo.php?someName_someCode that I need to permanently redirect to something like : http://www.mydomain.com/?foo_someName_someCode There are actually thousands of urls in which someName_someCode is different, and I have

Re: Trying a custom handler for several math fields

2013-09-14 Thread Richard Gaskin
dunbarx wrote: If you simply enter $50 in an excel cell and then add that cell plus 3 to another cell, it works fine. No explicit currency formatting needed. I think you said this. Excel has this knowledge built-in, Try it with #50. But that only means that Excel understands the $ sign,

Re: Trying a custom handler for several math fields

2013-09-14 Thread Vaughn Clement
Hi Richard Frankly I was surprised that LC did not recognize commas and money symbols. This is a standard thing in almost any software that has numbers being used? I would think it could be added to the object inspector to set the money settings, and maybe still treat the field as a string for

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Richard Gaskin
Roger Eller wrote: I am fascinated by the benchmarking scripts you have devised, but if the destinations are the same, why in the world would someone purposefully choose the moped to get there, especially when the jet plane is available? It's hard to find parking for a jet. :) Mopeds,

Re: Trying a custom handler for several math fields

2013-09-14 Thread Richard Gaskin
Vaughn Clement wrote: Frankly I was surprised that LC did not recognize commas and money symbols. This is a standard thing in almost any software that has numbers being used? I would think it could be added to the object inspector to set the money settings, and maybe still treat the field

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Roger Eller
On Sep 14, 2013 12:55 PM, Richard Gaskin wrote: Roger Eller wrote: I am fascinated by the benchmarking scripts you have devised, but if the destinations are the same, why in the world would someone purposefully choose the moped to get there, especially when the jet plane is available?

Re: Trying a custom handler for several math fields

2013-09-14 Thread Vaughn Clement
Hi Richard So you see the value in having the scripting, and you see the capability is there to add the script elements today, then it should be a challenge of some degree to have it made know it is needed. I proposed yesterday to add a Cloud app My Codebook Pro v12 to be available for free to

Re: copy on a group loses the htmltext of fields

2013-09-14 Thread J. Landman Gay
On 9/14/13 10:06 AM, Dr. Hawkins wrote: On Fri, Sep 13, 2013 at 5:47 PM, J. Landman Gay jac...@hyperactivesw.com wrote: A field with shared text will not keep its text when it is copied or placed on another card, presumably because each card has its own text. A field without shared text will

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Roger- Saturday, September 14, 2013, 7:31:48 AM, you wrote: I said this is a naive view, but my vision of LiveCode is that it can be more efficient by being smarter at the core. Many developers prefer absolute control, i.e. regular expressions, arrays, etc. but others want a human syntax to

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Roger Eller
Yeah. My latest thoughts on the subject would be having assistive tools in the IDE. ~Roger On Sep 14, 2013 1:58 PM, Mark Wieder mwie...@ahsoftware.net wrote: Roger- Saturday, September 14, 2013, 7:31:48 AM, you wrote: I said this is a naive view, but my vision of LiveCode is that it can

mobileGetDeviceToken doesn't work until after re-install?

2013-09-14 Thread Mike Kerner
This is weird. I have an app that was running on a device, with APNS enabled. I asked it to return mobileGetDeviceToken, and it returned empty. I checked the push settings for the app, they were ok. I tried recompiling the app, no joy. Finally I uninstalled the app and reinstalled the same

Re: copy on a group loses the htmltext of fields

2013-09-14 Thread Mark Wieder
Richard- Saturday, September 14, 2013, 8:06:43 AM, you wrote: On Fri, Sep 13, 2013 at 5:47 PM, J. Landman Gay jac...@hyperactivesw.com wrote: A field with shared text will not keep its text when it is copied or placed on another card, presumably because each card has its own text. A field

Re: Trying a custom handler for several math fields

2013-09-14 Thread J. Landman Gay
On 9/14/13 11:55 AM, Vaughn Clement wrote: Hi Richard Frankly I was surprised that LC did not recognize commas and money symbols. This is a standard thing in almost any software that has numbers being used? I would think it could be added to the object inspector to set the money settings, and

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Richard Gaskin
I once had a notion to write a sort of simple expert system which would analyze scripts according to the rules I look for when doing code review manually, and offer suggestions for rewriting things it finds which can be better optimized. But the more I thought about it I quickly realized it's

Re: OT : help needed for a Apache 301 redirect using regex

2013-09-14 Thread jbv
yes of course, but that's not the point : there are thousands of links that have already been visited by googlebots and on the site upgrade that is about to be put online, all these links will be changed from mydomain.com/foo.php?someName_someCode to mydomain.com/?foo_someName_someCode and we

Re: Trying a custom handler for several math fields

2013-09-14 Thread Richard Gaskin
Vaughn Clement wrote: I proposed yesterday to add a Cloud app My Codebook Pro v12 to be available for free to any LC user/s. Here this kind of script can be offered and amended by other developers to allow all users to benefit from the code. So far I have not heard any conversation pro or con

Re: Trying a custom handler for several math fields

2013-09-14 Thread J. Landman Gay
On 9/14/13 12:48 PM, Vaughn Clement wrote: I proposed yesterday to add a Cloud app My Codebook Pro v12 to be available for free to any LC user/s. Here this kind of script can be offered and amended by other developers to allow all users to benefit from the code. So far I have not heard any

Re: Trying a custom handler for several math fields

2013-09-14 Thread Vaughn Clement
Hi J. Gay I see your point about possible damage. But consider the current effort to autosize screens to manage the Android device apps. Would this cause the same problems as your describing for legacy apps? I am starting to see a trend in the conversation in the How To email that is out to

Re: OT : help needed for a Apache 301 redirect using regex

2013-09-14 Thread Richard Gaskin
I had hoped to address that point, but perhaps I'd just misunderstood what's needed. What I was proposing was for requests to be handled in the CGI dynamically, so the older format would be translated to the new on on-the-fly as requests come in. If there's no .php? in the request then the

Re: Trying a custom handler for several math fields

2013-09-14 Thread Peter Haworth
If I might add a comment here. I believe Vaughn said he was working with database applications. If so, the trick is to do all the calculations using the data returned from the database rather than the data displayed in the fields, That doesn't address the issue of formatting numbers as currency

Re: Trying a custom handler for several math fields

2013-09-14 Thread Vaughn Clement
Hi Ken I am really surprised by the depth of content that is out there to support LiveCode. As someone who has only 2 months of using LiveCode the subject matter keeps turning up every day. I just opened the links to see what they offer and it looks interesting. GMANE was the one that instantly

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Richard- Saturday, September 14, 2013, 11:14:43 AM, you wrote: I think of myself as being only reasonably bright, certainly replaceable with a well-written script, but there are things even simple-minded humans do cognitively that seem easy but are very difficult to transfer to a machine

Re: Trying a custom handler for several math fields

2013-09-14 Thread Mark Wieder
Vaughn- Saturday, September 14, 2013, 11:48:54 AM, you wrote: I am really surprised by the depth of content that is out there to support LiveCode. As someone who has only 2 months of using LiveCode the subject matter keeps turning up every day. I just opened the links to see what they offer

Re: Trying a custom handler for several math fields

2013-09-14 Thread Richard Gaskin
Vaughn Clement wrote: I see your point about possible damage. But consider the current effort to autosize screens to manage the Android device apps. Would this cause the same problems as your describing for legacy apps? I believe the way resolution independence is designed in v6.5dp forward

Re: Trying a custom handler for several math fields

2013-09-14 Thread Mark Wieder
Vaughn- Saturday, September 14, 2013, 10:48:20 AM, you wrote: I proposed yesterday to add a Cloud app My Codebook Pro v12 to be available for free to any LC user/s. Here this kind of script can be offered and amended by other developers to allow all users to benefit from the code. So far I

Re: Trying a custom handler for several math fields

2013-09-14 Thread Mark Wieder
Vaughn- Saturday, September 14, 2013, 11:48:54 AM, you wrote: Just a note: I received a reply today the included a stack all about using numbers. WOW, made me feel like I have a mountain to climb. Jacque has put forth the idea that there's about a six-week learning curve, and that seems about

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Richard Gaskin
Mark Wieder wrote: Coming soon: the singularity... http://is-movie.com/ Nice! And it has the trait I like in good story-telling: the coolest dude is over 50, while the 20-something guy doesn't have the experience to know not to use a single lock for his bicycle. ;) -- Richard Gaskin

Re: Trying a custom handler for several math fields

2013-09-14 Thread Mark Wieder
Richard- Saturday, September 14, 2013, 12:11:33 PM, you wrote: It can get much better - lots of room for improvement. And with the new open syntax initiative (something only REBOL ever achieved among scripting languages, far beyond HC's wildest dreams) , we can expect a lot of powerful new

Re: Trying a custom handler for several math fields

2013-09-14 Thread J. Landman Gay
On 9/14/13 1:34 PM, Vaughn Clement wrote: Hi J. Gay I see your point about possible damage. But consider the current effort to autosize screens to manage the Android device apps. Would this cause the same problems as your describing for legacy apps? No, because the old methods will still

Re: Trying a custom handler for several math fields

2013-09-14 Thread Mark Wieder
Mark- Saturday, September 14, 2013, 12:18:20 PM, you wrote: Richard- Saturday, September 14, 2013, 12:11:33 PM, you wrote: It can get much better - lots of room for improvement. And with the new open syntax initiative (something only REBOL ever achieved among scripting languages, far

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread stephen barncard
But if there were an IDE feature which allowed the engine to use it's best judgment with built-in timing feedback, it could help us choose. Perhaps an expert -vs- auto-pilot flag on repeat structures. I'd prefer that LC continue to allow me access to the 'primitives' than to try to guess what

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread J. Landman Gay
On 9/14/13 2:34 PM, stephen barncard wrote: I'd prefer that LC continue to allow me access to the 'primitives' than to try to guess what I'm doing. Like predictive text, it may not always know or do the right thing, then one has to backtrack and re-do it, wasting time and energy. Good

Re: Trying a custom handler for several math fields

2013-09-14 Thread dunbarx
Vaughn. Lots of hubbub. You have to love this community. Back to work just a little, since we are trying to learn livecode. Do you see how a function, whether mine or not, would be used ubiquitously in your project to format fields to display a dollar sign? put $ goodNumber(field 1) +

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Mark Wieder
Jacque- Saturday, September 14, 2013, 12:49:40 PM, you wrote: Good example. I saw this recently: Frankly autocorrect, I'm getting a bit tired of your shirt. I hate when it does that. And then there's the anecdotal story about the Newton auto-correcting newton to death... -- -Mark Wieder

Re: Okay, I think I'm brain damaged -- nope, I figured it out

2013-09-14 Thread Roger Eller
That's funny! I also like building from 'primitives', but to have options that offer a possible direction you hadn't considered can spark an aha moment. In my earliest years of using Revolution, the script editor had a menu that would drop in an empty if, switch, or try structure. As a noob, I

Code repositories (was Re: Trying a custom handler for several math fields)

2013-09-14 Thread FlexibleLearning.com
Vaughn Clement wrote: I proposed yesterday to add a Cloud app My Codebook Pro v12 to be available for free to any LC user/s. Here this kind of script can be offered and amended by other developers to allow all users to benefit from the code. So far I have not heard any conversation pro or

Re: Trying a custom handler for several math fields

2013-09-14 Thread Dr. Hawkins
On Sat, Sep 14, 2013 at 12:55 PM, dunb...@aol.com wrote: This sort of exercise is essential to your moving forward. I That particular one was a big turning point for me and my software--it forced serious thought as to how to store data (in pennys, duh!) and how to display it, and to move back

repeat . . . delimit by

2013-09-14 Thread Dr. Hawkins
While we're asking for modest syntax changes . . . Being able to state DELIMIT BY in a REPEAT, and having it stick (as opposed to using the current value of the itemdelimiter) would be a huge help. It would avoid ugliness like set the itemDel to vtab repeat for each item theDat in theData set

quickly wiping a card

2013-09-14 Thread Dr. Hawkins
I am trying to clear cards for output, but it seems to take bizarrely long. I'm on a fast machine (quad core 2.7ghz I7, 16gb ram, ssd). I can't get wiping things from or deleting a nearly empty card under 160 ms or so. I've tried delete, I've tried for each of the groupNames, then of the

Re: repeat . . . delimit by

2013-09-14 Thread Roger Eller
Would using a function do the trick? repeat for each item theDat in delimitBy(theData,vtab) do something end repeat function delimitBy pData,pDel set the itemDel to pDel return pData -- unaltered data end delimitBy ~Roger On Sep 14, 2013 7:10 PM, Dr. Hawkins doch...@gmail.com wrote:

Re: quickly wiping a card

2013-09-14 Thread Mark Wieder
Richard- Saturday, September 14, 2013, 5:04:46 PM, you wrote: hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? That's probably not a good idea if you mean locking messages. There are parts of the IDE that would like to be notified when

Re: Trying a custom handler for several math fields

2013-09-14 Thread Geoff Canyon
There should be a Godwin's Law for programming language debates: whoever first brings up LISP loses... Sent from my iPad On Sep 14, 2013, at 2:29 PM, Mark Wieder mwie...@ahsoftware.net wrote: Richard- Saturday, September 14, 2013, 12:11:33 PM, you wrote: It can get much better - lots of

Re: Trying a custom handler for several math fields

2013-09-14 Thread Geoff Canyon
(We agree on all your other points) I remember reading many years ago on this mailing list that if you assign a number to a variable: put 52 into x LC stores that variable as a number from the get-go and only converts it to a string if needed. Sent from my iPad On Sep 14, 2013, at 9:22 AM,

Re: Trying a custom handler for several math fields

2013-09-14 Thread Richard Gaskin
FWIW, while searching for something in the archives recently I stumbled across Wil Dijkstra's three-part post on speed tips from 2003 -- good stuff: The speed of MC http://lists.runrev.com/pipermail/metacard/2003-March/004415.html How to speed up MC, Part 2

Re: quickly wiping a card

2013-09-14 Thread Scott Rossi
Actually Mark, locking messages is often a good way to speed things exactly because the IDE doesn't track objects that are added or deleted until after the current handler has finished executing. I don't have any additional suggestions other than lock screen/lock messages -- those are the two I

Re: Trying a custom handler for several math fields

2013-09-14 Thread dunbarx
Geoff. I could be misRemembering, possibly even in an earlier life (HC), that variable typing was done by the interpreter at runtime, or in HC 2, at compile time. Maybe this was changed in LC? Someone here must know... Craig -Original Message- From: Geoff Canyon gcan...@gmail.com