Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 output and appending in batches may be optimal Absolutely true, and I made this change a few hours later. Oddly, I found little-to-no difference between open for append vs. open for write -- I expected append to be faster, as you obviously did. I also found little difference between large and small batches in the write command. Very puzzling. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 to it. I did timings, I'll post the results in a minute... ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 over, which costs dearly -- timings in a moment... ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 is two orders of magnitude faster by my experiments. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 making a copy of the original. This does avoid making a copy, but so does put after. tl;dr: use put after, and don't use variables to work with more than about 100mb unless you have no choice. I tested each of the options discussed in this thread. Each test iterates with an ever-longer target string, until an iteration takes more than a second to complete. Here are the timings I got. For each: -- the first column is the iteration -- the second is the size of the resulting variable at that step -- the third is the elapsed time -- the fourth is the ratio of the time to the previous iteration -- the fifth is the ratio of the size of the resulting string to the time taken for that iteration. None of these test scale against the size of the append string (it's the same across all the tests and iterations) -- rather, they all test scale against the size of the target string, which grows at a constant rate for each of the tests. For that, constant time would be ideal. For example, within the boundaries of LC's math functions, addition is (nearly) constant against the size of the target, meaning that on my machine, this takes about a second regardless of which line I uncomment: on mouseUp --put 1 into X --put 99 into X put the long seconds into T repeat 999 add 1 to X end repeat put the long seconds - T end mouseUp Appending to a string doesn't work that way. The longer the target string is, the longer the append to it takes. The good news is that it's nowhere near linear, except for the first two options. before put xx before R putting a string before a variable is slow, likely because it is either duplicating the whole string, or because it is shoving over the entire string to make room at the front. This only got up to a string 800k long before taking more than a second to iterate. It appears to be roughly linear on the size of the target string. 1100.0770.61298703 2200.2071732.690563965376 3300.3874251.870054774344 4400.5228141.349459765090 5500.6650461.272051751828 6600.8106491.218937740148 7700.9532221.175875734351 8801.1115491.166097719716 put into put R xx into R putting a string before a variable is also slow, because it likely is duplicating the whole string. This also only got up to a string 800k long before taking more than a second to iterate. It appears to be roughly linear on the size of the target string. 1110.073830.0110541354479 2210.1892462.5632731056830 3310.3673131.940926816745 4410.5005681.362783799094 5510.6458461.290227774180 6610.7871961.21886762200 7710.9170611.164972763309 8811.0534721.148748759395 append append xx, R command append pNew, @pString put pNew after pString end append An append function is much faster. Note that in the previous two tests, each iteration only appended 100k. This test appended 5mb -- 50x as much -- in each iteration, and also gets up to a 45mb target string before hitting one second per iteration. The @ means the target is not being duplicated, but calling the function is still overhead that can be avoided. 15000.5721760.019058738570 210000.6319291.10443115824565 315000.6842851.08285121920686 420000.7426561.08530226930369 525000.8165061.0994430618272 630000.8698961.06538834486884 735000.928841.0677637681403 840000.9819371.05716540735814 945001.0225311.04134144008444 put after put xx after R The reigning champ. This is also appending 5mb each iteration, and the target string hits 85mb before stopping. Still, this is showing substantial slowing: the last 5mb takes about 17 times as long to append as the second 5mb. 15000.1142830.00638643751098 210000.1748281.52978457199058 315000.2437151.39402761547287 420000.291581.19639768591819 525000.3348411.14836874662300 630000.4023461.20160374562709 735000.4694531.1667974554839 840000.5075241.08109678814005 945000.5765541.13601378049923 1050000.6251471.08428179981206 1155000.6839
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 string before a variable is slow, likely because it is either duplicating the whole string, or because it is shoving over the entire string to make room at the front. This only got up to a string 800k long before taking more than a second to iterate. It appears to be roughly linear on the size of the target string. I think with proper engine optimization, before should be the fastest option... all that's necessary to add A to B is to have the end of A point to the beginning of B, then have B point to A. No extra copies needed. B: b A: aa put A before B B: b A: aa---^ b B: aa---^ -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 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 real-world applications. on mouseUp local temp local s local accum put XXX into temp put the ticks into s repeat 100 -- yes, that's a million append temp, accum end repeat put the ticks - s into field 1 answer length(accum) end mouseUp command append pNew, @pString put pNew after pString end append -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 the same field for the 'hidden' value. This might be easier to manage in a multi-field situation and no 'hiding' would be needed. -- Stephen Barncard San Francisco Ca. USA more about sqb http://www.google.com/profiles/sbarncar ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 putting this in the script for V: or for easier management, create and use a custom property of the same field for the 'hidden' value. This might be easier to manage in a multi-field situation and no 'hiding' would be needed. I thought of that, and in many ways it's a cleaner solution of course. I was trying to preserve the syntax that is available for the actual contents of the field. Either way, the point here is that it is absolutely possible (with a little work) to implement presentational elements for a field's contents. Showing a number as a percent, for example, would also work. gc ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
OT : help needed for a Apache 301 redirect using regex
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 thousands of urls in which someName_someCode is different, and I have troubles writing the regex for a 301 RewriteRule. So any help would be much apreciated. Thanks in advance. jbv ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OT : help needed for a Apache 301 redirect using regex
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 the ? in the 1st url is hard to handle... Any hint ? 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 thousands of urls in which someName_someCode is different, and I have troubles writing the regex for a 301 RewriteRule. So any help would be much apreciated. Thanks in advance. jbv ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 user with a shortcut. LiveCode does not, because it simply sees three characters in that $50 string and takes it at face value. Livecode types its variables by context when you act on them. So if you add a number to $50 you will get an error. If you add a number to 50, it is then that the engine types the string as a number. It would be simple to this in LC., though one would have to vet each string before arithmetic evaluation. So you would trip up on: add fld 1 to fld 2. Because there is no way to trap the add command. As you said, another layer has to be added. Because we are dealing with strings. But I was making a point to the OP, mainly about learning the basics of LC. He had a problem with dealing with strings such as $50 in arithmetic. Am I too blinkered with my stringiness? Craig -Original Message- From: Geoff Canyon gcan...@gmail.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Sat, Sep 14, 2013 1:48 am Subject: Re: Trying a custom handler for several math fields On Fri, Sep 13, 2013 at 9:57 AM, dunb...@aol.com wrote: Since LC uses strings as its base unit, it does require a bit more management. Of course, this also offers exquisite control over those strings. So although Excel, for example, knows that a value of $50 in a cell is in actuality a number, LC does not. It is quite literal that way. I don't think this quite reflects reality, in two ways: First, as far as I know, LC doesn't use strings as a base unit. If you put 50 into X, LC (I believe) stores X as a number, and doesn't have to do any conversion if you then add 2 to X. Of course, if you put $50 into X, LC is going to make X a string. Engine-eers, feel free to jump in. Second, it's important to be clear about what Excel does/doesn't do. If you put 50 in a cell, Excel stores the numerical value of 50. If you apply a currency format to the cell, Excel displays the $ in front of the 50, but the cell is still 50 -- you can set another cell to be the square root of that cell, and Excel won't tell you that the square root of $50 is meaningless; it will just display 7.280109889. If you put $50 in a field, Excel does the same thing as a shortcut: it strips the $, and applies a currency format to the cell. If you put '$50 in a cell, then Excel storing the literal string $50 and puts a warning on the cell, Number stored as text. Interestingly, if you set another cell's formula to 3 + your cell, Excel will try to accommodate you and display 53. Note that if you do the same with either of the other two cells (where the cell is actually storing 50) the cell you put that formula in will store 53, but be automatically formatted as currency, and display as $53. Excel's cleverness would be tricky to replicate in LC -- not because LC can't do each of the above things, but doing them in a way that just works the way Excel's formatting does is (as far as I know) not built-in. Off the top of my head, for maximum robustness and flexibility, 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: on updateDisplay put $ me into fld D end updateDisplay would still allow you to do things like this: add 4 to fld V send updateDisplay to fld V and get Excel-like functionality. Likewise, if you put this in fld Ds script: on textChanged put goodNumber(me) into fld V end textChanged ... and your goodNumber function somewhere in the message path, you'd be able to edit the visible value in fld D, and still derive the numeric value to put back into fld V All of that would need to be cleaned up and abstracted from a given pair of fields in order to be truly useful, but for this discussion it gets the job done. gc ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 world would someone purposefully choose the moped to get there, especially when the jet plane is available? I realize that the jet has many more switches, and can be more complicated to operate, but that's where engine optimization is most important. LiveCode is interpreted, right? If the syntax is kept simple, an optimized engine already knows the fastest way to get there, so why does the engine not choose the best route (think GPS)? Now, the engine needs to evaluate a few iterations of the source data to understand and choose appropriately. The traffic conditions are also important, such as other scripts which may be doing some background processing. CPU/RAM availability - what the OS is doing outside of LiveCode may have an affect on the best route. 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 complex operations, and let the engine convert it, if necessary, to an optimal form for processing. I am one of the others, btw. :) ~Roger ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: copy on a group loses the htmltext of fields
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 this backwards? I clicked the share text button, which set sharedText to true, and they copy over nicely . . . ANd I'm back i business :) -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 real-world applications. on mouseUp local temp local s local accum put XXX into temp put the ticks into s repeat 100 -- yes, that's a million append temp, accum end repeat put the ticks - s into field 1 answer length(accum) end mouseUp command append pNew, @pString put pNew after pString end append No doubt passing the variable by reference is much faster than requiring a copy, but both will be slower than doing the work inline (which is often non-copying by nature) because of the overhead of the separate function call. To measure that overhead I made this quick test: on mouseUp -- Number of iterations: put 1 into n -- -- Test 1: inline: put the millisecs into t repeat n get 1+1 end repeat put the millisecs - t into t1 -- -- Test 2: function call: put the millisecs into t repeat n get foo() end repeat put the millisecs - t into t2 -- -- results: put t1 t2 end mouseUp function foo return 1+1 end foo Here's the result: 0.0003 0.0014 On the one hand, the overhead seems quite impressive, with more than four times the performance when we can do the work inline rather than call out to a function. But when we consider the absolute, rather than relative, time, that overhead is only ~0.0011 ms per call (on the relatively slow machine I tested on; on a Haswell i5 I'd expect it to be a small fraction of that). So while it can add up in very lengthy processes like the monster files Geoff's working on, it's more than fast enough for the convenience function calls offer for factored, readable code. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OT : help needed for a Apache 301 redirect using regex
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 troubles writing the regex for a 301 RewriteRule. What's handling those URLs on the backend? LC Server, PHP, or something else? If LC I would imagine you could alter the string following the domain to simply replace .php? with _, no? -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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, helping the user with a shortcut. LiveCode does not, because it simply sees three characters in that $50 string and takes it at face value. I think the key here is that Excel separates the stored value from its display representation, while doing this in LC requires some scripting. It would be ideal if we could have a displayFormat property for fields and chunks, so that we could set it to something like $0.00 and then putting 2.4 into the field would cause the field to render as $2.40. Likewise we would want to be able to set the displayFormat for columns in multi-column list fields. Until such time as the engine may ever have such a feature (useful as it would be, I've never seen it on a roadmap), we can get a similar outcome with a well-crafted behavior script. A really good script would take some effort to produce, but would be very useful to the community. If someone's in a position to start such a project I'd happily contribute to it. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 purposes of calculations. Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/* Skype: vaughn.clement https://secure.join.me/appsbyvclement FaceTime: vclem...@gmail.com LogMeIn also avaialble Call on ooVoo at address: vaughnclement or 9282549062 Ph. 928-254-9062 Cloud Hosting Registration Web Site: https://my.oditech.com/cart.php?a=addpid=41 On Sat, Sep 14, 2013 at 9:43 AM, Richard Gaskin ambassa...@fourthworld.comwrote: 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, helping the user with a shortcut. LiveCode does not, because it simply sees three characters in that $50 string and takes it at face value. I think the key here is that Excel separates the stored value from its display representation, while doing this in LC requires some scripting. It would be ideal if we could have a displayFormat property for fields and chunks, so that we could set it to something like $0.00 and then putting 2.4 into the field would cause the field to render as $2.40. Likewise we would want to be able to set the displayFormat for columns in multi-column list fields. Until such time as the engine may ever have such a feature (useful as it would be, I've never seen it on a roadmap), we can get a similar outcome with a well-crafted behavior script. A really good script would take some effort to produce, but would be very useful to the community. If someone's in a position to start such a project I'd happily contribute to it. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/**FourthWorldSyshttp://twitter.com/FourthWorldSys __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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, cars, trucks, and even bicycles have useful roles among transportation options, each having its own strengths and weaknesses for a given task. I prefer using my bicycle for any trip under 5 miles, and frequently use it for 10 miles or more, but I wouldn't choose it when I need to get from Pasadena to Boston (though I once met a 65-year-old gentleman who did exactly that, but that's another story and he had lots of time on his hands g). There are times when passing by reference is a really good thing to do, and times when it's not at all good idea, like if you need an altered output but also need to keep the original intact. Similarly, repeat for each is much faster than repeat with, but if you need to alter the chunk being parsed within the loop the former won't let you do that, since it's able to achieve its speed only by enforcing an assumption up front that the chunk won't change during the loop. And sometimes we need to put before, and sometimes put after, and while it's conceivable the engine might be able to figure out our intentions to reverse the operation internally to use the faster form, no doubt there would be cases where it would guess wrong. There are likely many ways the engine can be further optimized for ever-greater efficiency, just as Raney took the time so long ago to optimize the put after so that it no longer made a copy but did a resize instead. But we can also expect there will always be a need for us to decide which algorithm best fits the problem at hand. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 as a string for purposes of calculations. I think this boils down to the difference between a general-purpose programming language like LiveCode (and C, Python, Lua, etc.), and more specialized tools like Excel and FileMaker. Since Excel and FileMaker were written in C, we could say that this is something that even C can handle. But it takes a great many lines of C to be able to produce a system that separates storage from display, and while we can do this in LC with a fraction of the number of lines required, it still takes some scripting. Similarly, both Excel and FileMaker have automatic behaviors associated with cells/fields, but as you've found we need to explicitly respond to specific messages in LC to trigger behaviors like calculations. As convenient as these automated elements are in special-purpose tools, they greatly restrict the range of things that can be built with them. A spreadsheet will always look like a spreadsheet, and a FileMaker DB will also look and behave like a FileMaker DB (which is why we see so many LC devs making front-ends for DB systems like FileMaker, so they can deliver custom UIs not possible in those highly-specialized tools). All that said, as I noted before I think it would add tremendous value to LC to adopt an option to automatically separate storage format from display format for both fields and chunks, and have added my notes from my earlier post to the feature request for this: http://quality.runrev.com/show_bug.cgi?id=7891 In the meantime, we can have exactly what we're looking for right now with a bit of scripting. I mention this not to suggest RunRev shouldn't invest the time to do that in the engine (since of course I do feel it would be very valuable), but only to note that there's nothing stopping anyone from having this today if they're willing to roll up their sleeves for an hour or two and work it out. After all, there are many dozens of apps in the LC community that have done this already. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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? It's hard to find parking for a jet. :) Doh! I should have said jet pack. Mopeds, cars, trucks, and even bicycles have useful roles among transportation options, each having its own strengths and weaknesses for a given task. Agreed. And sometimes we need to put before, and sometimes put after, and while it's conceivable the engine might be able to figure out our intentions to reverse the operation internally to use the faster form, no doubt there would be cases where it would guess wrong. 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. There are likely many ways the engine can be further optimized for ever-greater efficiency, just as Raney took the time so long ago to optimize the put after so that it no longer made a copy but did a resize instead. I would love it if repeats had automatic built-in busy indicators for tasks under 3 seconds, and would automatically display a progress bar (at a specified screen location) for longer repeats. It would also need to be optional, and offer a granularity parameter to keep it from slowing down the loop. But we can also expect there will always be a need for us to decide which algorithm best fits the problem at hand. Mostly always, with optional ai could prove to be useful, or at least I think it could be. -- Richard Gaskin Fourth World ~Roger ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 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 about this offer. Since this would be a LC public access app, the new users could use it like the (index / Table of Contents) I stated was not available on the LC site today. I am sure that the rebuttal would be that LC's forum is available and does this now. My answer is that the current forum is not effective to find answers to technical question in that it is not a subject oriented database, but rather a word search for any word in blog fields. This kind of search is OK but it does not lend it's self to subject searches to specific topics of interest. A subject index has specific areas where users can maintain a discussion on a minor issue to a major discussion on a topic. And each person can offer any kind of references or other suggestions to help any user. The LC help email's are such a good example of this in that they are people engaging in the discussion. But the email is gone soon after the reader reviews it. Or if they leave it in the email bin, it can be searched later. But again what if you did not get the email, your not a part of the discussion. I have a friend who said that it will work, but will the input be valid. He was saying that the uncertainty of the support being added may be wrong. My answer is, this may be true, but not allowing us to try it out will not supply the users to see the results. Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/* Skype: vaughn.clement https://secure.join.me/appsbyvclement FaceTime: vclem...@gmail.com LogMeIn also avaialble Call on ooVoo at address: vaughnclement or 9282549062 Ph. 928-254-9062 Cloud Hosting Registration Web Site: https://my.oditech.com/cart.php?a=addpid=41 On Sat, Sep 14, 2013 at 10:15 AM, Richard Gaskin ambassa...@fourthworld.com wrote: 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 as a string for purposes of calculations. I think this boils down to the difference between a general-purpose programming language like LiveCode (and C, Python, Lua, etc.), and more specialized tools like Excel and FileMaker. Since Excel and FileMaker were written in C, we could say that this is something that even C can handle. But it takes a great many lines of C to be able to produce a system that separates storage from display, and while we can do this in LC with a fraction of the number of lines required, it still takes some scripting. Similarly, both Excel and FileMaker have automatic behaviors associated with cells/fields, but as you've found we need to explicitly respond to specific messages in LC to trigger behaviors like calculations. As convenient as these automated elements are in special-purpose tools, they greatly restrict the range of things that can be built with them. A spreadsheet will always look like a spreadsheet, and a FileMaker DB will also look and behave like a FileMaker DB (which is why we see so many LC devs making front-ends for DB systems like FileMaker, so they can deliver custom UIs not possible in those highly-specialized tools). All that said, as I noted before I think it would add tremendous value to LC to adopt an option to automatically separate storage format from display format for both fields and chunks, and have added my notes from my earlier post to the feature request for this: http://quality.runrev.com/**show_bug.cgi?id=7891http://quality.runrev.com/show_bug.cgi?id=7891 In the meantime, we can have exactly what we're looking for right now with a bit of scripting. I mention this not to suggest RunRev shouldn't invest the time to do that in the engine (since of course I do feel it would be very valuable), but only to note that there's nothing stopping anyone from having this today if they're willing to roll up their sleeves for an hour or two and work it out. After all, there are many dozens of apps in the LC community that have done this already. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/**FourthWorldSyshttp://twitter.com/FourthWorldSys __**_ use-livecode mailing list
Re: copy on a group loses the htmltext of fields
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 carry its text with it. Thank you--but is this backwards? I clicked the share text button, which set sharedText to true, and they copy over nicely . . . ANd I'm back i business :) I didn't think it was backwards, but I very well could have mis-thunk. Or I was mixing up ancient behavior with new behavior. At least you got it working. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 complex operations, and let the engine convert it, if necessary, to an optimal form for processing. I am one of the others, btw. :) Much as I like the idea of having the computer do all my thinking for me g (shouldn't the engine be capable of determining the best sort algorithm for a given set of data?) I think the overhead of having to make those decisions would probably more than offset any performance gains once the best algorithm was determined. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 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 complex operations, and let the engine convert it, if necessary, to an optimal form for processing. I am one of the others, btw. :) Much as I like the idea of having the computer do all my thinking for me g (shouldn't the engine be capable of determining the best sort algorithm for a given set of data?) I think the overhead of having to make those decisions would probably more than offset any performance gains once the best algorithm was determined. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
mobileGetDeviceToken doesn't work until after re-install?
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 version, and it worked. -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, This is good. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: copy on a group loses the htmltext of fields
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 without shared text will carry its text with it. Thank you--but is this backwards? I clicked the share text button, which set sharedText to true, and they copy over nicely . . . Yes. When you copy and paste a field, you're doing just that, not copying and pasting the contents. Here's the thing: if a field has shared text then there's only one copy of the text, and all the multiple views of that fields are looking at the same copy. When you copy the field onto a new card it's just a window into that single copy of text, and so it appears that the text has been copied as well. If shared text is disabled, then each copy of the field has its own contents. When you copy the field all you're copying is the field itself and the newly pasted copy will have no contents. To copy the field contents into the new field (if desired) you'd have to select the field contents, copy and paste into the new field. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 maybe still treat the field as a string for purposes of calculations. You're used to end-user products, where the work is done under the hood for you. Now you're using a general programming language, where you're the one writing the code under the hood. LiveCode is used for many different types of apps, and number crunching is just one small part of its capabilities. Just as you would prefer that LiveCode manage a particular type of string in one way, someone else's code would break if LiveCode took that sort of liberty with their literal string entries. The engine can't presume that a dollar sign (or a euro or yen or whatever) should be treated in only one way. In fact, the dollar sign specifies a global system variable; the engine can't know that you want it to mean money and not one of those. Interfering with commas in numbers would be a disaster. Comma is the default delimiter in lists, and almost everyone's code would instantly break if that were changed. The engine can't know that your commas are just visual indicators and mine separate a list of numbers that I intend to process as separate items. As the programmer, you manage all that. We aren't in end-user land any more. :) -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 a far from simple task. 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 too stupid to count past 1. Not impossible, as we see a lot of interesting advancements in AI every year, but certainly more work than I can justify attempting. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys Roger Eller wrote: 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 mwieder at 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 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 complex operations, and let the engine convert it, if necessary, to an optimal form for processing. I am one of the others, btw. :) Much as I like the idea of having the computer do all my thinking for me g (shouldn't the engine be capable of determining the best sort algorithm for a given set of data?) I think the overhead of having to make those decisions would probably more than offset any performance gains once the best algorithm was determined. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OT : help needed for a Apache 301 redirect using regex
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 need to configure .htaccess with a permanent 301 redirect so that all links already visited by bots dont get lost... What's handling those URLs on the backend? LC Server, PHP, or something else? If LC I would imagine you could alter the string following the domain to simply replace .php? with _, no? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 about this offer. Since this would be a LC public access app, the new users could use it like the (index / Table of Contents) I stated was not available on the LC site today. That sounds like a wonderful contribution - thanks for that. In some ways it sounds similar to Scripter's Scrapbook (http://www.flexiblelearning.com/ssbk.htm), but has enough distinction that both seem very useful. I look forward to seeing it. I am sure that the rebuttal would be that LC's forum is available and does this now. My answer is that the current forum is not effective to find answers to technical question in that it is not a subject oriented database, but rather a word search for any word in blog fields. This kind of search is OK but it does not lend it's self to subject searches to specific topics of interest. ... I have a friend who said that it will work, but will the input be valid. He was saying that the uncertainty of the support being added may be wrong. My answer is, this may be true, but not allowing us to try it out will not supply the users to see the results. Your observations about the nature of list and forums discussions is spot-on IMO, which has led some here to prefer the more strictly enforced QA format of StackOverflow - here's the LC stuff there: http://stackoverflow.com/questions/tagged/livecode SO also provides a sort of built-in vetting of answers through its voting feature: the answer the members there find most useful gets floated to the top with the highest number of votes, while less helpful replied are still there but pushed down. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 conversation pro or con about this offer. Maybe because it's come up so many times in the past. I think there are already a couple of sites that started to do something similar but I didn't save the links. Maybe someone has those. The User Samples in LiveCode's toolbar was also intended to do something similar but it's a bit of a mish-mash. Ken Ray's site is the one I use the most: http://www.sonsothunder.com/devres/livecode/livecode.htm But that one is for more advanced LiveCoders. The issues you are facing are more about learning the language and syntax. I wouldn't be at all against a system like you propose, it would probably be handy for new users. If you can merge your content with whatever else is out there, all the better. The LC help email's are such a good example of this in that they are people engaging in the discussion. But the email is gone soon after the reader reviews it. This mailing list is archived in two places, and you can search it going back many years. These two sites have identical content but different presentations, use whichever one you like better: http://runtime-revolution.278305.n4.nabble.com/ http://dir.gmane.org/gmane.comp.ide.revolution.user -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 defend LC to protect the standards of usage. I am not saying this is good or bad, but I wonder if this will impede the future growth of what was once a very simple product named HypeCard? Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/* Skype: vaughn.clement https://secure.join.me/appsbyvclement FaceTime: vclem...@gmail.com LogMeIn also avaialble Call on ooVoo at address: vaughnclement or 9282549062 Ph. 928-254-9062 Cloud Hosting Registration Web Site: https://my.oditech.com/cart.php?a=addpid=41 On Sat, Sep 14, 2013 at 11:10 AM, J. Landman Gay jac...@hyperactivesw.comwrote: 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 maybe still treat the field as a string for purposes of calculations. You're used to end-user products, where the work is done under the hood for you. Now you're using a general programming language, where you're the one writing the code under the hood. LiveCode is used for many different types of apps, and number crunching is just one small part of its capabilities. Just as you would prefer that LiveCode manage a particular type of string in one way, someone else's code would break if LiveCode took that sort of liberty with their literal string entries. The engine can't presume that a dollar sign (or a euro or yen or whatever) should be treated in only one way. In fact, the dollar sign specifies a global system variable; the engine can't know that you want it to mean money and not one of those. Interfering with commas in numbers would be a disaster. Comma is the default delimiter in lists, and almost everyone's code would instantly break if that were changed. The engine can't know that your commas are just visual indicators and mine separate a list of numbers that I intend to process as separate items. As the programmer, you manage all that. We aren't in end-user land any more. :) -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: OT : help needed for a Apache 301 redirect using regex
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 URL would be used as-is, effectively supporting both formats. A separate potential issue is the duplicate content penalty Google may impose if it discovers that the same page can be accessed by two different URLs. But if you add a canonical tag with the new-form URL to the head you should be fine; with LC server even that could be added on-the-fly as needed. An extra benefit to a canonical tag (for G at least; I have no idea if Bing or Yahoo are as thorough) is that over time G will update its index using only the new URL, so eventually you'll be able to remove the handling for the old-format URLs from your CGI script without losing any SEO value. Notes from G on canonical: https://support.google.com/webmasters/answer/139394 -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys jbv wrote: 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 need to configure .htaccess with a permanent 301 redirect so that all links already visited by bots dont get lost... What's handling those URLs on the backend? LC Server, PHP, or something else? If LC I would imagine you could alter the string following the domain to simply replace .php? with _, no? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 of course, and it sure would be nice to have a built-in way to do that in LC. Maybe some extensions to the numberFormat property, or better still, a new property that basically achieves the same purpose but is a permanent property of a control along with something like set the formattedText of... and get the unformattedText of... Pete lcSQL Software http://www.lcsql.com On Sat, Sep 14, 2013 at 10:15 AM, Richard Gaskin ambassa...@fourthworld.com wrote: 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 as a string for purposes of calculations. I think this boils down to the difference between a general-purpose programming language like LiveCode (and C, Python, Lua, etc.), and more specialized tools like Excel and FileMaker. Since Excel and FileMaker were written in C, we could say that this is something that even C can handle. But it takes a great many lines of C to be able to produce a system that separates storage from display, and while we can do this in LC with a fraction of the number of lines required, it still takes some scripting. Similarly, both Excel and FileMaker have automatic behaviors associated with cells/fields, but as you've found we need to explicitly respond to specific messages in LC to trigger behaviors like calculations. As convenient as these automated elements are in special-purpose tools, they greatly restrict the range of things that can be built with them. A spreadsheet will always look like a spreadsheet, and a FileMaker DB will also look and behave like a FileMaker DB (which is why we see so many LC devs making front-ends for DB systems like FileMaker, so they can deliver custom UIs not possible in those highly-specialized tools). All that said, as I noted before I think it would add tremendous value to LC to adopt an option to automatically separate storage format from display format for both fields and chunks, and have added my notes from my earlier post to the feature request for this: http://quality.runrev.com/**show_bug.cgi?id=7891http://quality.runrev.com/show_bug.cgi?id=7891 In the meantime, we can have exactly what we're looking for right now with a bit of scripting. I mention this not to suggest RunRev shouldn't invest the time to do that in the engine (since of course I do feel it would be very valuable), but only to note that there's nothing stopping anyone from having this today if they're willing to roll up their sleeves for an hour or two and work it out. After all, there are many dozens of apps in the LC community that have done this already. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/**FourthWorldSyshttp://twitter.com/FourthWorldSys __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 confused me with the matrix of things on the screen. I need to go back later in a trip of discovery. 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. This stack was the script that shows that there are expert users out there for LiveCode. It knocked it out of the park with one stack script that addressed all number formatting without changing LiveCode at the root level. The Stack is titled for Vaughn look for it in this email chain. Thank you Vaughn Clement Apps by Vaughn Clement (Support) *http://www.appsbyvaughnclement.com/tools/home-page/* Skype: vaughn.clement https://secure.join.me/appsbyvclement FaceTime: vclem...@gmail.com LogMeIn also avaialble Call on ooVoo at address: vaughnclement or 9282549062 Ph. 928-254-9062 Cloud Hosting Registration Web Site: https://my.oditech.com/cart.php?a=addpid=41 On Sat, Sep 14, 2013 at 11:28 AM, J. Landman Gay jac...@hyperactivesw.comwrote: 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 conversation pro or con about this offer. Maybe because it's come up so many times in the past. I think there are already a couple of sites that started to do something similar but I didn't save the links. Maybe someone has those. The User Samples in LiveCode's toolbar was also intended to do something similar but it's a bit of a mish-mash. Ken Ray's site is the one I use the most: http://www.sonsothunder.com/**devres/livecode/livecode.htmhttp://www.sonsothunder.com/devres/livecode/livecode.htm But that one is for more advanced LiveCoders. The issues you are facing are more about learning the language and syntax. I wouldn't be at all against a system like you propose, it would probably be handy for new users. If you can merge your content with whatever else is out there, all the better. The LC help email's are such a good example of this in that they are people engaging in the discussion. But the email is gone soon after the reader reviews it. This mailing list is archived in two places, and you can search it going back many years. These two sites have identical content but different presentations, use whichever one you like better: http://runtime-revolution.**278305.n4.nabble.com/http://runtime-revolution.278305.n4.nabble.com/ http://dir.gmane.org/gmane.**comp.ide.revolution.userhttp://dir.gmane.org/gmane.comp.ide.revolution.user -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 too stupid to count past 1. Not impossible, as we see a lot of interesting advancements in AI every year, but certainly more work than I can justify attempting. Coming soon: the singularity... http://is-movie.com/ -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 and it looks interesting. GMANE was the one that instantly confused me with the matrix of things on the screen. I need to go back later in a trip of discovery. gmane is my go-to site for this list when on-rev's servers crap out. I'm not wild about the mechanics of their search engine, but it's better than nothing, and with enough elbow grease I can usally come up with something relevant. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 should minimize hindrance with legacy code - from the Release Notes (p11): Since all of the updates are internal, the end LiveCode developer should see no major changes: Where possible, we've tried to match previous behaviors as closely as possible. In general, the team does an unusually good job of preserving backward compatibility (ever talk with Python fans about moving from v2 to v3? g). Where an enhancement is both unquestionably more valuable than previous workarounds and where it could not be implemented without some cost to backward compatibility, the team will draw attention to those in the Release Notes so developers can make any modifications needed for them. In the 15 years I've been working with this engine, I can recall only maybe three cases where an enhancement lost backward compatibility. I am starting to see a trend in the conversation in the How To email that is out to defend LC to protect the standards of usage. It may be more helpful to think of it as defending the scripters who rely on LC rather than LC itself. This engine was first born in '92, and over the decades the community has built up enormous collections of scripts, many of them critical to the revenue of the businesses that rely on them. Any change that risks altering the behavior of 20 years of community code is a decision that needs to be weighed with extreme caution. In the best case it will cost us hundreds of dollars to update code; in the worst case it can be cost-prohibitive and destroy a business. Thankfully, RunRev is as cautious about such proposed changes as those of us who rely on their engine, so a good balance favoring backward compatibility wherever practical seems to be pretty well maintained. I am not saying this is good or bad, but I wonder if this will impede the future growth of what was once a very simple product named HypeCard? HyperCard is actually a pretty good example here: while LC maintains much of the same event-driven simplicity that made HC so enjoyable, it also supports at least three times as many messages for much more refined interaction control. The same goes for properties, commands, and even the range of native objects and the mechanisms for extending the message path: LC has retained most of what HC offered, but has gone much, much further to provide capabilities HC never dreamed of - and on six times as many platforms. I was once hired by a company to enhance some of their internal HC-based tools to write a bunch of complicated scripts which ultimately did nothing more than provide workaround ways of getting things like groups and custom properties into HC. I advised them at the outset, and several times throughout the project, that if they just ported to LiveCode they wouldn't need me at all. But they insisted on sticking with HC, and insisted on paying me to write built-in LC features in cumbersome workarounds within HC. And when HC eventually stopped running on Macs they had to port it later anyway. HC was a great tool in its day, but today we're in a very different world. The things that made HC simple to learn also made it very limited: monochrome, single-stack standalones, dialogs and palettes and even color had to be driven from externals, no vector graphics, only one background group, and on and on - not to mention being able to deploy only for the second-least-popular OS on the planet after desktop Linux. Today's developer needs associative arrays, Internet connectivity, database support, etc. LC does have a higher learning curve than HC, but in a world where more people are typing JavaScript right now than the sum of all xTalkers ever, LC does a reasonably good job of balancing capabilities with learnability. 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 capabilities in syntax that gets ever more simple as it goes. -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 have not heard any conversation pro or con about this offer. I didn't realize you were waiting for encouragement. I've been waiting for your announcement. Granted, it does seem like it would be duplicating some of the existing information, but there's no central repository of third-party materials. It would be great if there were a page on runrev's web site that had links to user-created materials, but that hasn't happened over the last decade and I see no signs of that ever happening in the future. Rather, the opposite has been the trend, and sadly the useful information has been disappearing or getting buried on the corporate site. The balkanization of useful reference material has gotten worse over time, to the point where you have to know where something is in order to find it. This is not meant to be discouraging. Count me as a yes vote on making your site available. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 right. It doesn't matter whether you've had experience with other xtalk environments or not, but there comes a moment where things suddenly fall into place. And it's all turtles from there on down. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 capabilities in syntax that gets ever more simple as it goes. start religious war REBOL, of course, and only dream of having FORTH's power and flexibility. g -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 work. And also because there is no good way right now to do resizing based on screen resolution, so autosizing is a new feature we're all eagerly waiting for. Pete's suggestion of a property to control money formatting, or an addition to the current numberformat function, is good (I like the second one better.) Either of those would be a new feature and wouldn't break older scripts. I am starting to see a trend in the conversation in the How To email that is out to defend LC to protect the standards of usage. I am not saying this is good or bad, but I wonder if this will impede the future growth of what was once a very simple product named HypeCard? I think it's more that we know how the engine works and why it works that way, and what would break if it were changed. The stack you received shows what can be done with the primitive elements that LiveCode offers -- that's primitive in the sense of basic, not undeveloped. We have some terrific building blocks and we can make almost anything out of them. By the way, the mailing list doesn't allow attachments, so you probably received that stack in private mail. It sounds like a good candidate for the User Samples area if it isn't in there already, maybe the author will consider uploading it there. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 beyond HC's wildest dreams) , we can expect a lot of powerful new capabilities in syntax that gets ever more simple as it goes. start religious war REBOL, of course, and only dream of having FORTH's power and flexibility. g ...can only... dang keyboard -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 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. Too much AI can be annoying. If the engine did what you want, then that would take away some of the adaptive skills that we've learned . Then it's like 'paint by numbers'. No thanks. On Sat, Sep 14, 2013 at 12:16 PM, Richard Gaskin ambassa...@fourthworld.com wrote: 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 Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/**FourthWorldSyshttp://twitter.com/FourthWorldSys __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- Stephen Barncard San Francisco Ca. USA more about sqb http://www.google.com/profiles/sbarncar ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 example. I saw this recently: Frankly autocorrect, I'm getting a bit tired of your shirt. I hate when it does that. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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) + goodNumber(field 2) into field 3 This handles all data as strings, managing them robustly. The function can be placed in the stack script, so it can be called from anywhere. It is your job, of course, to remember to do so. It occurs to me we need the - symbol as well. Can you write a handler that incorporates that in the right way? Please try, and write back often if you get stuck. As another exercise, can you write a more compact function that does the same thing? something along the lines of: put newGoodNumber,(field 1,field 2) into field 3 or a custom command: addCurrency field 1,field 2,field 3 This sort of exercise is essential to your moving forward. I would agree with Jacque's six week timeframe to get over the hump, but I would insist that 80% of that time be spent playing with your own stacks, not reading stuff. And remember, as others have also said, this is not a software package that you learn to use. It is a toolchest, the tools of which you must practice with to be able to use. I believe you must make a few stacks, of whatever kind. They cannot be so simple that you will not tear your hair out perfecting them. You are no longer a user. You are a developer. Craig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Okay, I think I'm brain damaged -- nope, I figured it out
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 found it to be helpful, but I wasn't required to use it. ~Roger On Sep 14, 2013 3:50 PM, J. Landman Gay jac...@hyperactivesw.com wrote: 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 example. I saw this recently: Frankly autocorrect, I'm getting a bit tired of your shirt. I hate when it does that. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Code repositories (was Re: Trying a custom handler for several math fields)
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 about this offer. Since this would be a LC public access app, the new users could use it like the (index / Table of Contents) I stated was not available on the LC site today. Richard G wrote: That sounds like a wonderful contribution - thanks for that. In some ways it sounds similar to Scripter's Scrapbook (http://www.flexiblelearning.com/ssbk.htm), but has enough distinction that both seem very useful. Information... For people using the Community Edition of LiveCode and who cannot run it as a plug-in, the Scripter's Scrapbook is also available as a StandAlone. Click 'Free Downloads' and select from Option 2... http://www.flexiblelearning.com/ssbk.htm Hugh Senior FLCo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 and forth between the two. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
repeat . . . delimit by
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 the itemDel to tab do something set the itemDel to vtab end repeat While missing the last reset to vtab is a programming error, mu code is kind of littered with these (constant db accesses) code would be much easier to follow (and maintain) with repeat for each item theDat in theData DELIMTED BY vtab do something end repeat And while I'm at it, it's been mentioned before, but a Fortran-style optional tying of the end repeat to the repeat with a constant would be really helpful (same for switch, and so forth) [Fortran 90+, not FORTRAN IV] -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
quickly wiping a card
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 controls, I've tried locking the screen and messages, but it still takes an insanely large fraction of a second. Am I missing something? hmm, locking everything and deleting the card is down to 5 ms, but shouldn't there be a quick way to wipe? -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: repeat . . . delimit by
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: 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 the itemDel to tab do something set the itemDel to vtab end repeat While missing the last reset to vtab is a programming error, mu code is kind of littered with these (constant db accesses) code would be much easier to follow (and maintain) with repeat for each item theDat in theData DELIMTED BY vtab do something end repeat And while I'm at it, it's been mentioned before, but a Fortran-style optional tying of the end repeat to the repeat with a constant would be really helpful (same for switch, and so forth) [Fortran 90+, not FORTRAN IV] -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: quickly wiping a card
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 objects they're tracking are deleted: the app browser, project browser, etc, and if they don't get notified things can get out of sync. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 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 capabilities in syntax that gets ever more simple as it goes. start religious war REBOL, of course, and only dream of having FORTH's power and flexibility. g ...can only... dang keyboard ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
(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, dunb...@aol.com wrote: If you add a number to 50, it is then that the engine types the string as a number. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 http://lists.runrev.com/pipermail/metacard/2003-April/004469.html How to speed up MC, Part 3 http://lists.runrev.com/pipermail/metacard/2003-April/004539.html -- Richard Gaskin Fourth World LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: quickly wiping a card
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 use to make updates occur as quickly as possible. Maybe somebody else knows some other tricks. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 9/14/13 5:27 PM, Mark Wieder mwie...@ahsoftware.net wrote: 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 objects they're tracking are deleted: the app browser, project browser, etc, and if they don't get notified things can get out of sync. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Trying a custom handler for several math fields
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 To: How to use LiveCode use-livecode@lists.runrev.com Sent: Sat, Sep 14, 2013 9:10 pm Subject: Re: Trying a custom handler for several math fields (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, dunb...@aol.com wrote: If you add a number to 50, it is then that the engine types the string as a number. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode