Re: Writing Extensions

2017-05-16 Thread William Prothero via use-livecode
Herman:
Your doAsJavascript suggestion is very cool. I might use it and might learn 
some javascript in order to use it.

Great idea!
Bill

> On May 16, 2017, at 4:02 PM, hh via use-livecode 
>  wrote:
> 
>>> Alejandro T. wrote:
>>> How fast is LCB working with imagedata?
> 
> Slower than slowest LC Script ever seen. I Stopped
> all my experiments with imagedata after one full day
> (was 12 hours).
> For a first own test simply take an image of screensize
> and walk through the pixeldata for each byte applying
> only the identity mapping ...
> We have to wait until the java FFI is comfortable enough
> to use a java image library. (I couldn't get to there). 
> 
> Would be great, if not too difficult to realise, to have
> a "do as javascript" here (which uses the js engine only
> of the browser widget). This is at least ten times faster
> with imagedata than fastest LC Script. See several recent
> examples in "Sample stacks" (and some more links in the
> Raspi-Subforum to extern servers).
> 
>>> Alejandro T. wrote:
>>> How fast is LCB working with transform matrices?
> 
> Pretty fast and comfortable for transforming all 'small'
> canvas data (pathes, text, pattern, image-as-a-whole).
> I liked that after taking the first hurdles.
> 
> You may test yourself with snippets or lcb files from the
> LCB-subforum. There is a lot of stuff for starting there.
> Or use the examples on github by Trevor DeVore or the ones
> by the LC-stuff, variants by BerndN.
> 
> But I wait for my next examples until there is a stable
> widget format (we have meanwhile three formats that work on
> some LC versions only, not on the others).
> To adjust these costs too much time, simply recompiling
> worked here only in 1 of 20 cases.
> 
> 
> ___
> 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: Incorporating ImageMagick into an LC program?

2017-05-16 Thread Jonathan Lynch via use-livecode
I don't know.

I was just wondering about interfacing through an LCB library or widget. That 
way, the LC folks would not have to be involved. 

If you don't mind a 2 second delay, the command line option works fine, but I 
think it should be faster.

I have all the tools I need now, to get Augmented Earth to market, so I am not 
too worried about. Still, it would be cool.


Sent from my iPhone

> On May 16, 2017, at 8:14 PM, hh via use-livecode 
>  wrote:
> 
> Dictionary: open process
> 
> There is also a MagickWand C-API
> ( https://www.imagemagick.org/script/magick-wand.php ).
> But who should do that incorporation into the engine?
> 
> ___
> 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: Incorporating ImageMagick into an LC program?

2017-05-16 Thread hh via use-livecode
Dictionary: open process

There is also a MagickWand C-API
( https://www.imagemagick.org/script/magick-wand.php ).
But who should do that incorporation into the engine?

___
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: Writing Extensions

2017-05-16 Thread James Hale via use-livecode
This is why the LiveCode Infinity project had such attraction to me. 

There were to be fully documented examples.

Oh well.

___
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


Incorporating ImageMagick into an LC program?

2017-05-16 Thread Jonathan Lynch via use-livecode
I once made an app that used command line calls to ImageMagick. That worked 
fine, but with a slight delay.

Would it be difficult to create an lcb script that directly interfaces with 
ImageMagick?

As long as you give them credit, their license would allow it.
https://www.imagemagick.org/script/license.php

Sent from my iPhone
___
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: SVG widget?

2017-05-16 Thread Mark Wieder via use-livecode

On 05/13/2017 01:46 PM, Alejandro Tejada via use-livecode wrote:

Peter Thirkell wrote a widget that import SVG with multiple colors.

Download this widget source code from this forum post:
http://forums.livecode.com/viewtopic.php?f=93=27811=147279#p147286


I added my updates to that forum post, building on Peter's fine work.
Allows for my flexibility for svg files from other formats.
The lack of xml and word chunk processing in LCB is a severe handicap.

--
 Mark Wieder
 ahsoftw...@gmail.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: Writing Extensions

2017-05-16 Thread hh via use-livecode
>> Alejandro T. wrote:
>> How fast is LCB working with imagedata?

Slower than slowest LC Script ever seen. I Stopped
all my experiments with imagedata after one full day
(was 12 hours).
For a first own test simply take an image of screensize
and walk through the pixeldata for each byte applying
only the identity mapping ...
We have to wait until the java FFI is comfortable enough
to use a java image library. (I couldn't get to there). 

Would be great, if not too difficult to realise, to have
a "do as javascript" here (which uses the js engine only
of the browser widget). This is at least ten times faster
with imagedata than fastest LC Script. See several recent
examples in "Sample stacks" (and some more links in the
Raspi-Subforum to extern servers).

>> Alejandro T. wrote:
>> How fast is LCB working with transform matrices?

Pretty fast and comfortable for transforming all 'small'
canvas data (pathes, text, pattern, image-as-a-whole).
I liked that after taking the first hurdles.

You may test yourself with snippets or lcb files from the
LCB-subforum. There is a lot of stuff for starting there.
Or use the examples on github by Trevor DeVore or the ones
by the LC-stuff, variants by BerndN.

But I wait for my next examples until there is a stable
widget format (we have meanwhile three formats that work on
some LC versions only, not on the others).
To adjust these costs too much time, simply recompiling
worked here only in 1 of 20 cases.


___
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: Writing Extensions

2017-05-16 Thread Mark Wieder via use-livecode

On 05/16/2017 02:47 PM, Stephen Barncard via use-livecode wrote:

On Tue, May 16, 2017 at 1:48 PM, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:


It took me three hours today to figure out how to convert a hex number
into decimal format.



Why?  Because the IP is IPV6 ? Large hex number that overflows?


Nope. Because the way I would do this in LCS doesn't exist in LCB. The 
LCB syntax is actually more intuitive, but getting to that point took 
all morning. Having to read between the lines in the dictionary and make 
guesses (educated and non) about the keywords and syntax.


I wasn't dealing with IP addresses, just converting #NN colors to 
(DDD,DDD,DDD) format, two hex digits at a time. Along the way I 
discovered interesting things like the fact that 'comma' isn't a defined 
constant in LCB. And that there's no concept of word chunks in LCB.


And there's afaict no messagebox-style way to interactively try out the 
possible syntax forms - you just have to write the code, try to compile 
it, and then try to figure out why there's a syntax error.


--
 Mark Wieder
 ahsoftw...@gmail.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: Android Touchscreen Malfunction

2017-05-16 Thread Phil Davis via use-livecode
I assume flushEvents() isn't available for mobile? At least the 8.1.3 
dictionary shows it is for desktop only.


So would something like this work?


local sTaskStatus, sTaskRequests


on mouseUp
send "doTask" to me in 0 seconds
put the result & CR after sTaskRequests
end mouseUp


command doTask
 if sTaskStatus is empty
 then put "busy" into sTaskStatus
 else exit doTask

 -- do your task here

 repeat for each line tRequestID in sTaskRequests
 cancel tRequestID
 end repeat
 put empty into sTaskStatus
 put empty into sTaskRequests
end doTask


Phil Davis


On 5/16/17 11:55 AM, Alejandro Tejada via use-livecode wrote:

Hi All,

Recently, while testing a stack in an Android Phone,
I found with surprise that mouseup and mousedown
messages were triggered very fast (2 or 3 times in
succession).

After checking the phone screen, I noticed a small
(almost unnoticeable) crack in the corner.

How could we change our mouseup and mousedown
scripts for Android Apps to make a workaround
for these kind of malfunctions?

Thanks in advance!

Al
___
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



--
Phil Davis


___
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: Writing Extensions

2017-05-16 Thread Matthias Rebbe via use-livecode
Thanks for this post. I was already thinking it is just me who struggles with 
LCB.
I tried a bit, gave up and decided to wait for the announced course.

Matthias

Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 16.05.2017 um 22:48 schrieb Mark Wieder via use-livecode 
> >:
> 
> Having spent a bit of the day experimenting with LCB, I have this to say:
> 
> the documentation is atrocious
> 
> ...also, the only thing I have to say about error reporting in the Extension 
> Builder is that it lets you know there's an error. There's a caret displayed 
> under the error line that misleadingly appears to point to the problem, when 
> actually it's just pointing to the middle of the line. And "Syntax error" 
> isn't a very rewarding message.
> 
> It took me three hours today to figure out how to convert a hex number into 
> decimal format.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.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

___
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: Writing Extensions

2017-05-16 Thread Stephen Barncard via use-livecode
On Tue, May 16, 2017 at 1:48 PM, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> It took me three hours today to figure out how to convert a hex number
> into decimal format.


Why?  Because the IP is IPV6 ? Large hex number that overflows?

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
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: Writing Extensions

2017-05-16 Thread Jonathan Lynch via use-livecode
I also am curious about this.

Sent from my iPhone

> On May 16, 2017, at 4:03 PM, Alejandro Tejada via use-livecode 
>  wrote:
> 
> Hi Mark,
> 
> Did you choose this task to measure how fast
> is LiveCode Builder?
> 
> I want to know the answer too.
> How fast is LCB working with imagedata?
> How fast is LCB working with transform matrices?
> 
> Al
> 
> On Tue, May 16, 2017 at 4:48 PM, Mark Wieder via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> 
>> Having spent a bit of the day experimenting with LCB, I have this to say:
>> 
>> the documentation is atrocious
>> 
>> ...also, the only thing I have to say about error reporting in the
>> Extension Builder is that it lets you know there's an error. There's a
>> caret displayed under the error line that misleadingly appears to point to
>> the problem, when actually it's just pointing to the middle of the line.
>> And "Syntax error" isn't a very rewarding message.
>> 
>> It took me three hours today to figure out how to convert a hex number
>> into decimal format.
> ___
> 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


Writing Extensions

2017-05-16 Thread Alejandro Tejada via use-livecode
Hi Mark,

Did you choose this task to measure how fast
is LiveCode Builder?

I want to know the answer too.
How fast is LCB working with imagedata?
How fast is LCB working with transform matrices?

Al

On Tue, May 16, 2017 at 4:48 PM, Mark Wieder via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Having spent a bit of the day experimenting with LCB, I have this to say:
>
> the documentation is atrocious
>
> ...also, the only thing I have to say about error reporting in the
> Extension Builder is that it lets you know there's an error. There's a
> caret displayed under the error line that misleadingly appears to point to
> the problem, when actually it's just pointing to the middle of the line.
> And "Syntax error" isn't a very rewarding message.
>
> It took me three hours today to figure out how to convert a hex number
> into decimal format.
___
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: Android Touchscreen Malfunction

2017-05-16 Thread Paul Dupuis via use-livecode
On 5/16/2017 4:32 PM, Richard Gaskin via use-livecode wrote:
> Paul Dupuis wrote:
>
> > in your handler for mouseDown (or mouseUp) check the pendingMessages
> > (see Dictionary if unfamiliar with pendingMessages) for any other
> > mouseDown (or mosueUp) messages pending for the same object and the
> > one executing.
>
> Wouldn't the pendingMessages be limited to timers?
>
My mistake. I thought that system messages that were queued up were also
listed in the pendingMessages, so that if, for some reason, move
mouseDown messages were generated while the handler responding to the
current mouseDown was still executing, said "extra" messages would be in
the pendingMessage queue.



___
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: Writing Extensions

2017-05-16 Thread Mike Kerner via use-livecode
yep.  it's not fun, yet.

On Tue, May 16, 2017 at 4:48 PM, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Having spent a bit of the day experimenting with LCB, I have this to say:
>
> the documentation is atrocious
>
> ...also, the only thing I have to say about error reporting in the
> Extension Builder is that it lets you know there's an error. There's a
> caret displayed under the error line that misleadingly appears to point to
> the problem, when actually it's just pointing to the middle of the line.
> And "Syntax error" isn't a very rewarding message.
>
> It took me three hours today to figure out how to convert a hex number
> into decimal format.
>
> --
>  Mark Wieder
>  ahsoftw...@gmail.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
>



-- 
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


Writing Extensions

2017-05-16 Thread Mark Wieder via use-livecode

Having spent a bit of the day experimenting with LCB, I have this to say:

the documentation is atrocious

...also, the only thing I have to say about error reporting in the 
Extension Builder is that it lets you know there's an error. There's a 
caret displayed under the error line that misleadingly appears to point 
to the problem, when actually it's just pointing to the middle of the 
line. And "Syntax error" isn't a very rewarding message.


It took me three hours today to figure out how to convert a hex number 
into decimal format.


--
 Mark Wieder
 ahsoftw...@gmail.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: Android Touchscreen Malfunction

2017-05-16 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

> in your handler for mouseDown (or mouseUp) check the pendingMessages
> (see Dictionary if unfamiliar with pendingMessages) for any other
> mouseDown (or mosueUp) messages pending for the same object and the
> one executing.

Wouldn't the pendingMessages be limited to timers?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Android Touchscreen Malfunction

2017-05-16 Thread Paul Dupuis via use-livecode
On 5/16/2017 2:55 PM, Alejandro Tejada via use-livecode wrote:
> Hi All,
>
> Recently, while testing a stack in an Android Phone,
> I found with surprise that mouseup and mousedown
> messages were triggered very fast (2 or 3 times in
> succession).
>
> After checking the phone screen, I noticed a small
> (almost unnoticeable) crack in the corner.
>
> How could we change our mouseup and mousedown
> scripts for Android Apps to make a workaround
> for these kind of malfunctions?

in your handler for mouseDown (or mouseUp) check the pendingMessages
(see Dictionary if unfamiliar with pendingMessages) for any other
mouseDown (or mosueUp) messages pending for the same object and the one
executing.


___
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


Android Touchscreen Malfunction

2017-05-16 Thread Alejandro Tejada via use-livecode
Hi All,

Recently, while testing a stack in an Android Phone,
I found with surprise that mouseup and mousedown
messages were triggered very fast (2 or 3 times in
succession).

After checking the phone screen, I noticed a small
(almost unnoticeable) crack in the corner.

How could we change our mouseup and mousedown
scripts for Android Apps to make a workaround
for these kind of malfunctions?

Thanks in advance!

Al
___
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: WannaCry [OT]

2017-05-16 Thread Stephen Barncard via use-livecode
It is not trivial that the main character in *The Matrix *is a coder.

On Tue, May 16, 2017 at 9:20 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> We won't all be absorbed. Some will need to work as slaves in the real
> world.
>



--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
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: Dispatching Messages to Closed Stacks Which Are Not in Memory

2017-05-16 Thread J. Landman Gay via use-livecode

On 5/15/17 10:47 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

ut seems like we have to work too hard…
would be neater to have a way to dispatch and toplevel at the same time.


They serve different purposes. "Dispatch" controls the message path. 
"Open" controls the state of the stack in the UI. There are many 
instances where you do not want the stack toplevel or even visible but 
you do want it to be in the message path.


Dispatch and "send" are similar. You would not expect a stack to 
toplevel itself every time you send a message to it.


--
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: Dispatching Messages to Closed Stacks Which Are Not in Memory

2017-05-16 Thread Sannyasin Brahmanathaswami via use-livecode
Bob:I think you are confusing the meaning of "open" with "running in the 
IDE". Library stacks open but may have no windows or controls created in the 
IDE. In fact a script only stack has no graphical elements at all. "Open" means 
"Open as a file that loads into memory". 

Indeed, I have been under that misconception for a long time. and true, that 
was obvious for any files that have no LiveCode GUI layer component (script 
only stacks, text files), but was unexpect for stack that have actual 
cards/controls, especially since… all these years "open someStack" has been a 
common thing for me to do from the msg box. 

 Also I would not say "IDE" but in the "UI space" because is not limited to the 
IDE.

then why does 

open "some stack"  in the msg box  toplevel it?  

Enhancement "idea" still stands…

Simple way to toplevel (or open in any mode other than 0)  stack A with 
"dispatch " from another stack B

And since : open SomeStack toplevels it from the msg box, why not from script?

BR



___
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: WannaCry [OT]

2017-05-16 Thread Dr. Hawkins via use-livecode
On Mon, May 15, 2017 at 10:46 PM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Ditto. But I do want a smart home and I've had one for years. We still use
> the older X10/Insteon protocol,


wasn't that the one that had the add with the girl in the flesh-colored
tshirt bouncing around?

I remember one of my small chiodren asking why she didn't have a shirt . .
.

Home automation is another boat that apple missed begore finally getting
their act together.

The Mac IIfx (1990) had a pare of custom co-processors, essentially 10mhz
6502s with 32k each (iirc) RAM & ROM.

One of these controlled the serial ports, including AppleTalk, along with
other small tasks.

Add that appletalk worked well over existing in-house phone wiring, those
processors could have been mass produced, and used the second pair in
existing wiring.

Apple would have *owned* home automation at the time.

Then again, given their thinking at the time, they probably would have
expected to sell you your television, toaster, and front door as part of
this, so maybe not.  In that err, if they could have produced a Rolls Royce
for $1000, they would have gone broke by only selling it as  part of an
apple house to have the garage . . .

90
-- 
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: Identical and similar blend modes

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-16 12:32, Roger Eller via use-livecode wrote:
Results may vary depending on OS, video card, and/or video drivers.  
Many

of these appear subtly different to me.


They shouldn't - all the blend mode code is cross-platform - so if there
is a difference across platform (which isn't down to just differences in
the Monitor's Color Profile) it would be a bug!

In this case, it is probably just that what you see will depend on what
the colors/alpha of the destination and source pixels are. Indeed, for 
some

of the 'structural' blend modes, they don't do very much unless they
are used within a group which has ink 'blendSrcOver', as they modify
the destination alpha channel (which cards don't really have).

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: [ANN] This Week in LiveCode 82

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-16 14:51, hh via use-livecode wrote:

Yes, thanks. [You did probably test on Mac only. It's not worth to mix
in the problem of linux (and Raspi) with blend modes/transparency 
here.]


I don't recall seeing any bug reports about inks/transparency on Linux -
could you elaborate?


Anyway, I updated my stack to a simple Theme-switcher, usable as tiny
plugin and included it to post RaspberryPi stacks #89
( http://forums.livecode.com/viewtopic.php?p=150402#p150402 ).

I find it more comfortable (what the stack does by one click) to simply
reverse all current settings of the prefs for theme and background by
setting the blend modes. That's pretty fast and one can use it for each
script editor window differently dark or light: incredibly efficient 
;-)


In terms of number of lines of code to achieve the effect, perhaps - but
not for the poor CPU...

Any control which has an ink other than srcCopy has to be rendered into
an offscreen buffer before it can be composited into the parent. So,
technically, the CPU would be happier if the colors used in the first
place were just inverted ;)

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: WannaCry [OT]

2017-05-16 Thread Bob Sneidar via use-livecode
We won't all be absorbed. Some will need to work as slaves in the real world. 

Bob S


> On May 16, 2017, at 07:54 , Jonathan Lynch via use-livecode 
>  wrote:
> 
> Right before it absorbs us into the machine overlord.
> 
> Sent from my iPhone


___
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: WannaCry [OT]

2017-05-16 Thread Bob Sneidar via use-livecode
Agreed. 

Bob S


> On May 15, 2017, at 17:23 , Richard Gaskin via use-livecode 
>  wrote:
> 
> Good thoughts, Kay.
> 
> The DDoS last October only reinforced my inherent distrust of IoT devices.
> 
> Until we see some enforced security standards, I have no interest in "smart 
> cars", "smart TVs" or "smart homes".  When I look at those products I just 
> see one big botnet.
> 
> --
> Richard Gaskin
> Fourth World Systems


___
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: Dispatching Messages to Closed Stacks Which Are Not in Memory

2017-05-16 Thread Bob Sneidar via use-livecode
I think you are confusing the meaning of "open" with "running in the IDE". 
Library stacks open but may have no windows or controls created in the IDE. In 
fact a script only stack has no graphical elements at all. "Open" means "Open 
as a file that loads into memory". 

Bob S


> On May 15, 2017, at 20:47 , Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> "re-opens" but is not open in the GUI as a top stack…
> Yes it's stack script is available for us to talk to; 
> but it is not "really" open in the way that 

___
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: WannaCry [OT]

2017-05-16 Thread Roger Eller via use-livecode
http://hackaday.com/2017/05/04/google-aiy-artificial-intelligence-yourself/


On Tue, May 16, 2017 at 10:54 AM, Jonathan Lynch via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Right before it absorbs us into the machine overlord.
>
> Sent from my iPhone
>
> > On May 16, 2017, at 10:45 AM, Alejandro Tejada via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Mark Waddingan wrote:
> >> the fact that there are probably not just billions
> >> but trillions of lines of C/C++ code in the world
> >> means that things are probably not going to change
> >> much soon - the cost to rewrite all of that in a language
> >> such as Rust would probably be larger than the entire
> >> economic output of the entire world.
> >
> > That is exactly the kind of work that
> > Artificial Intelligence could do without
> > breaking the bank! :-)
> >
> > Al
> > ___
> > 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
>
___
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: WannaCry [OT]

2017-05-16 Thread Jonathan Lynch via use-livecode
Right before it absorbs us into the machine overlord.

Sent from my iPhone

> On May 16, 2017, at 10:45 AM, Alejandro Tejada via use-livecode 
>  wrote:
> 
> Mark Waddingan wrote:
>> the fact that there are probably not just billions
>> but trillions of lines of C/C++ code in the world
>> means that things are probably not going to change
>> much soon - the cost to rewrite all of that in a language
>> such as Rust would probably be larger than the entire
>> economic output of the entire world.
> 
> That is exactly the kind of work that
> Artificial Intelligence could do without
> breaking the bank! :-)
> 
> Al
> ___
> 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


WannaCry [OT]

2017-05-16 Thread Alejandro Tejada via use-livecode
Mark Waddingan wrote:
> the fact that there are probably not just billions
> but trillions of lines of C/C++ code in the world
> means that things are probably not going to change
> much soon - the cost to rewrite all of that in a language
> such as Rust would probably be larger than the entire
> economic output of the entire world.

That is exactly the kind of work that
Artificial Intelligence could do without
breaking the bank! :-)

Al
___
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: [ANN] This Week in LiveCode 82

2017-05-16 Thread hh via use-livecode
Yes, thanks. [You did probably test on Mac only. It's not worth to mix
in the problem of linux (and Raspi) with blend modes/transparency here.]

Anyway, I updated my stack to a simple Theme-switcher, usable as tiny 
plugin and included it to post RaspberryPi stacks #89
( http://forums.livecode.com/viewtopic.php?p=150402#p150402 ).

I find it more comfortable (what the stack does by one click) to simply
reverse all current settings of the prefs for theme and background by
setting the blend modes. That's pretty fast and one can use it for each
script editor window differently dark or light: incredibly efficient ;-)

> Okay so - I take it the current approach is:
> 
>edit script of stack "revmenubar"
>set the ink of field "Script" of stack "revNewScriptEditor 1" to 
> "notSrcCopy"
> 
> Which gives the exact same effect as:
> 
>set the ink of field "Script" of stack "revNewScriptEditor 1" to 
>"blendDifference"
> 
> As far as I can see, anyway...
> 
> However a better effect (due to the way drawing works, transparency, 
> antialiasing and
> such like) is to actually set the colors of the field. i.e.
> 
>- backgroundColor black (inverse of white)
>- each color assigned to the colorization inverted in the same way
> 
> The former is directly configurable in preferences; the latter current 
> has three
> fixed modes also configurable in preferences (none, default, classic). 
> The colorization
> 'schemes' are defined in the seColorizationLoadScheme handler in the
> revseutilitiesbehavior.livecodescript file:
> 
>  b633a07eddc577887b94bd09cbc2d4ef4f50f4be/Toolset/palettes/
> script%20editor/behaviors/revsestackbehavior.livecodescript>
> 
> These are easy to add to - or better yet, a little dialog in preferences 
> which allows
> you to add / remove them would be cool.
> 
> Warmest Regards,
> 
> Mark.

___
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: Seeking recommendations / suggestions for use of library stacks.

2017-05-16 Thread pink via use-livecode
what about putting the process into the library stack files themselves? 

For example, when I use my CouchDB library I also load fastJSON:

on libraryStack
 if "couchDBLib" is not among the lines stacksInUse then start using
stack "couchDBLib"
 if "fastJSONlib" is not among the lines stacksInUse then start using
stack "fastJSONlib"
end libraryStack

on releaseStack
 if "couchDBLib" is among the lines stacksInUse then stop using stack
"couchDBLib"
 if "fastJSONlib" is among the lines stacksInUse then stop using stack
"fastJSONlib"
end releaseStack

note that using "is among" and "is not among" is not optional otherwise you
end up in an infinite loop



-
---
Greg (pink) Miller
mad, pink and dangerous to code
--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Seeking-recommendations-suggestions-for-use-of-library-stacks-tp4714836p4714910.html
Sent from the Revolution - User mailing list archive at Nabble.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: Identical and similar blend modes

2017-05-16 Thread Roger Eller via use-livecode
Results may vary depending on OS, video card, and/or video drivers.  Many
of these appear subtly different to me.

~Roger

On May 15, 2017 11:39 PM, "Alejandro Tejada via use-livecode" <
use-livecode@lists.runrev.com> wrote:

> After a quick test, these are my results
> looking for identical and similar blend modes
> but notice that these results could differ
> from your own results:
>
> 1) srcXor = BlendExclusion = BlendDifference
>
> 2) srcOr = addMax = addPin = BlendDodge = BlendLighten = blendScreen =
> BlendPlus
>
> 3) srcCopy = Transparent = BlendHardLight
>
> 4) srcAnd = adMin = BlendBurn = BlendDarken = BlendMultiply
>
> 5) addOver = noop = BlendDstOver
>
> subPin almost looks like reverse
>
> There are many aritmetic and bitwise blending modes
> that do not have a direct equivalent using Imaging
> blend modes... but probably (or not) these blending
> modes could be "simulated" using color overlays,
> groups, structural blends and imaging blend modes
>
> Al
> ___
> 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: [ANN] This Week in LiveCode 82

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-15 21:11, Roger Eller via use-livecode wrote:

I just looked in the dictionary of 6.7.5 (my daily driver), and only
srcCopy concerns me, as it is the default for any image placed as a
control.  I also found an image that I had placed with addMax applied.
This saved me the trouble of taking it into Photoshop of Gimp to create 
the

same effect.  I'll roll with the changes.


As I said elsewhere, srcCopy is the same as blendSrcOver and only has
a distinction when it is applied to a group.

In terms of the others, there are effects you can get with the 'legacy' 
inks
and it is useful to file those uses with us so we can see what they are 
and

how to add replacements.

In the case of things applied to images, a general convolve/colormatrix 
type
property would probably give much more flexibility - and fit in much 
better
with the 'graphics pipelines' of today (rather than those of the 
1980's).


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: WannaCry [OT]

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-16 02:23, Richard Gaskin via use-livecode wrote:

Until we see some enforced security standards, I have no interest in
"smart cars", "smart TVs" or "smart homes".  When I look at those
products I just see one big botnet.


I'd at least hope that 'smart cars' software is engineered to a much
higher standard than other places:

   https://en.wikipedia.org/wiki/MISRA_C

[ Of course, it is slightly worrying that Chrome thinks that 
www.misra-c.com

is 'Not Secure' ;) ]

Such standards, processes and tooling helps to ensure that code that is
written minimizes the chance of vulnerabilities *in the code* (e.g. 
buffer

overruns). Of course it doesn't necessarily cover vulnerabilities in
design - e.g. in protocols.

There are other methods to ensure this is the case (at least in terms of
the code):

  - adequate automated testing (100% coverage being the goal - i.e. the
tests should exercise every line of code).

  - fuzz testing (giving random inputs to every module in a system
to make sure it handles any potential case gracefully).

  - extensive code review (i.e. ensuring that code does not make it into
a system unless it has been thoroughly checked by as many people as
possible).

  - use static analysis tools (e.g. Coverity).

Of course, the principal issue really is that most code which is used in
critical systems (and systems generally) tends to be C/C++ - or 
something

like Java where the VM and parts of the supporting libraries are written
in C/C++ (e.g. Smart TVs, Blu-Ray players, Android phones).

C/C++ are inherently unsafe (let you do things which are wrong) 
languages
(although it is becoming increasingly easy to write safe code in C++ - 
as
long as you use it in a specific way - you cannot yet turn off unsafe 
aspects

of the language which means they can be used).

The reason they are unsafe is because the design of them means that 
static
checking is really hard to do well (the depth of what Coverity does, for 
example
is quite astounding but it is not perfect by any means) and impossible 
to do

completely.

The solution then is to use *safe* languages - ones which don't let you 
write
code which contains the kind of exploitable vulnerability which result 
in

virii being able to be written in the first place.

However, the reality is that the number of safe-systems-languages (ones 
where
it is possible to write device drivers, kernels etc.) in existence is 
well,
negligible (Rust is probably the only one which has floated to the 
surface of
the dev community in recent years that I can think of); this combined 
with
the fact that there are probably not just billions but trillions of 
lines of
C/C++ code in the world means that things are probably not going to 
change
much soon - the cost to rewrite all of that in a language such as Rust 
would

probably be larger than the entire economic output of the entire world.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: [ANN] This Week in LiveCode 82

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-15 21:21, hh via use-livecode wrote:

Mark W. wrote:
> and most of these legacy Blend Modes:
> clear, noop, notSrcAnd, notSrcAndReverse,
> notSrcCopy, notSrcOr, notSrcOrReverse,
> notSrcXor, reverse, set, srcAnd,
> srcAndReverse, srcCopy, srcOr,
> srcOrReverse, srcXor, blend, addPin
> addOver, subPin, transparent
> adMin, addMax



We're still on the fency about all of these - I do wonder how
much they are used anymore particularly as they do not fit into
the RGBA rendering model which everyone uses anymore and as such
are incredibly inefficient. (They will never be acceleratable,
for example).



I'd be surprised if people couldn't get similar effects by using
appropriate blend inks - if they are still in use at all.



Ali L. wrote:
To be fair, the docs claim the legacy blend modes have been deprecated
since LC 5! We've supported them for quite a long time 
post-deprecation...


1. Please read this twice and don't cry ...

The default blendLevel of each and every LC object that has an ink is
"srcCopy" --- 'incredibly inefficient' as you judge it.

2. How do you define a "similar" effect?
3. Please tell me for example which "similar" blend effect allows a 
dark
   theme in the script editor which is currently simly done by setting 
the

   fields ink to "notSrcCopy".


Okay so - I take it the current approach is:

  edit script of stack "revmenubar"
  set the ink of field "Script" of stack "revNewScriptEditor 1" to 
"notSrcCopy"


Which gives the exact same effect as:

  set the ink of field "Script" of stack "revNewScriptEditor 1" to 
"blendDifference"


As far as I can see, anyway...

However a better effect (due to the way drawing works, transparency, 
antialiasing and

such like) is to actually set the colors of the field. i.e.

  - backgroundColor black (inverse of white)
  - each color assigned to the colorization inverted in the same way

The former is directly configurable in preferences; the latter current 
has three
fixed modes also configurable in preferences (none, default, classic). 
The colorization

'schemes' are defined in the seColorizationLoadScheme handler in the
revseutilitiesbehavior.livecodescript file:



These are easy to add to - or better yet, a little dialog in preferences 
which allows

you to add / remove them would be cool.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: [ANN] This Week in LiveCode 82

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-15 22:05, Richmond Mathewson via use-livecode wrote:

"the modern era"

Ah; such an awful pity that both Thee and Me have more important things 
to do;


we could have such fun playing "semantic squash".


Hehe - indeed, modern should have been 'modern'* with:

* 'Modern' in the context of the evolution of the way 2d graphics is
  expressed in computing. It has gone from pixel-oriented bitwise
  operations; to color-oriented transparent blending operations.

;)

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: [ANN] This Week in LiveCode 82

2017-05-16 Thread Mark Waddingham via use-livecode

On 2017-05-15 23:22, Alejandro Tejada via use-livecode wrote:

This Skia feature named: Perlin Noise Shader
could have this syntax:

set the fractalperlinNoise of selobj to "0.05, 0.05, 4, 0.0"
set the turbulenceperlinNoise of selobj to "0.05, 0.05, 4, 0.0"

This Skia feature named: Blur Mask Filter
could have this syntax:

set the blur of selobj to 5
set the hqblur of selobj to 10



I'd actually suggest that filters should be a list / array - you need
to be able to specify the order.

Indeed, the general model is that filters are applied after the control
is rasterized but before its rasterized buffer (with transparency) is
composited into the parent.

The bitmapEffects we currently have are filters - they do have a 
prescribed
order (as they were modelled on PhotoShop's - which at the time fixed 
the

order, I'm not sure whether that has changed); but in reality there is
use in them being reorderable and to allow multiple applications of the 
same
kind (for example you might want two dropshadows with different 
displacement).



This Skia feature named: SkMatrix
could have this syntax:

set the perspective of selobj to "1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 
0, 0,

0, 0"


A perspective transform is a generalization of an affine transform 
(indeed,

I'd suggest transform, not perspective as the future property) - affine
transforms (2x3 matrices) extend to pseudo-perspective transforms (3x3) 
extend
to 3d transforms (4x4) by simple extension of the matrix (putting 1's 
and 0's

in the appropraite places).

However, there is a lot of difficulty involved in getting transforms to 
work
in Livecode (as has been discussed before) due to the way co-ordinates 
are
handled - they are always card-relative and are currently integers in 
the
engine - which makes things somewhat tricky. It would be nice to have 
though :)


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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