Re: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-09 Thread Alejandro Tejada
I found Alex Tweedly post about compiling
externals using Dev-C++ :D
http://lists.runrev.com/pipermail/use-livecode/2005-June/060943.html



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/I-need-to-write-an-external-for-LiveCode-in-C-but-I-doubt-my-ability-to-do-it-tp4702071p4702128.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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-09 Thread Alejandro Tejada
Hi Jonathan,

Back in 2005, Alex Tweedly published instructions
to use Dev-C++ (named BloodShed back then)

These are the files from 2005:
http://andregarzia.on-rev.com/alejandro/stacks/Tweedly_dll.zip

http://runtime-revolution.278305.n4.nabble.com/Sucess-compiling-Alex-Tweedly-DLL-td279650.html

I have been looking for Alex Tweedly original post from 2005
but could not find it.

Ask around in this mail list. Maybe someone keeps
a copy from 2005 Alex Tweedly original instruction
to compile Livecode externals using Dev-C++

Alejandro



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/I-need-to-write-an-external-for-LiveCode-in-C-but-I-doubt-my-ability-to-do-it-tp4702071p4702127.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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-07 Thread Monte Goulding

> On 8 Mar 2016, at 10:32 AM, JB  wrote:
> 
> When you mention LCB is that the widget builder they
> imported Foundation for?

LCB is for more than just widgets

>  If it is and his main goal is
> speed wouldn’t he be better off using a external since
> they have better performance?

I’m not aware of speed comparisons. Perhaps the FFI is more of a bottleneck 
than the external api but it would be interesting to see the data.

Cheers

Monte
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-07 Thread JB
When you mention LCB is that the widget builder they
imported Foundation for?  If it is and his main goal is
speed wouldn’t he be better off using a external since
they have better performance?

John Balgenorth


> On Mar 7, 2016, at 2:47 AM, Monte Goulding  wrote:
> 
> 
>> On 7 Mar 2016, at 9:37 PM, Jonathan Lynch  wrote:
>> 
>> I am trying to figure out how to link it to LiveCode, now. Thanks for this
>> pointer.
> 
> You might be able to just compile the library and then hook what you need up 
> via LCB which would be nice. There does look to be rather heavy use of 
> structs which would probably make a LCB implementation more complicated than 
> an external implementation at this stage.
> 
> Cheers
> 
> Monte
> ___
> 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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-07 Thread Monte Goulding

> On 7 Mar 2016, at 9:37 PM, Jonathan Lynch  wrote:
> 
> I am trying to figure out how to link it to LiveCode, now. Thanks for this
> pointer.

You might be able to just compile the library and then hook what you need up 
via LCB which would be nice. There does look to be rather heavy use of structs 
which would probably make a LCB implementation more complicated than an 
external implementation at this stage.

Cheers

Monte
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-07 Thread Jonathan Lynch
I have been reading about OpenCV. It sounds quite extensive!!! Can it make
my morning coffee? Given all of the other functions built into it, I would
not be entirely surprised. OpenCV includes facial recognition functions,
which seems substantially more difficult.

I am trying to figure out how to link it to LiveCode, now. Thanks for this
pointer.

On Sun, Mar 6, 2016 at 10:35 PM, Mark Wieder  wrote:

> On 03/06/2016 06:10 PM, Monte Goulding wrote:
>
> I might be inclined to look at an OpenCV external. I believe with OpenCV
>> you can green screen live camera feeds so it’s pretty fast.
>>
>
> I second the suggestion for OpenCV. It's blazingly fast and probably
> already has much of what you need prepackaged for you. I use it, for
> example, to determine pulse rate from live webcam streams.
>
> --
>  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
>



-- 
Do all things with love
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Jonathan Lynch
Thanks Monte,

I will look at those things. Great advice :)

On Sun, Mar 6, 2016 at 9:12 PM, Jonathan Lynch 
wrote:

> This is for processing high-definition images that are composited and
> printed, so I really have to work with high image qualities. Also, I am
> working through the imagedata, which is a string of characters, rather than
> the content of the image. In that sense, the starting format of the image
> is not entirely relevant. The size of the image is quite relevant. The data
> within each image is set to have four times the horizontal and vertical
> resolution of the screen.
>
> On Sun, Mar 6, 2016 at 8:23 PM, Simon  wrote:
>
>> Jonathan Lynch wrote
>> > ...but it still requires looking at every single pixel and checking to
>> > see if the colors are within a certain range.
>>
>> I'm way out of my league here but...
>> Doesn't lossy jpeg compression make assumptions about 2 pixels next to
>> each
>> other?
>> (pseudo)
>> if pixel 1,1 = green
>> skip pixel 1,2
>> is pixel 1,3 green
>> etc.
>> That would increase the speed by lots I'd think.
>> Of course it is lossy.
>>
>> Simon
>>
>>
>>
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/I-need-to-write-an-external-for-LiveCode-in-C-but-I-doubt-my-ability-to-do-it-tp4702071p4702079.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
>>
>
>
>
> --
> Do all things with love
>



-- 
Do all things with love
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Jonathan Lynch
This is for processing high-definition images that are composited and
printed, so I really have to work with high image qualities. Also, I am
working through the imagedata, which is a string of characters, rather than
the content of the image. In that sense, the starting format of the image
is not entirely relevant. The size of the image is quite relevant. The data
within each image is set to have four times the horizontal and vertical
resolution of the screen.

On Sun, Mar 6, 2016 at 8:23 PM, Simon  wrote:

> Jonathan Lynch wrote
> > ...but it still requires looking at every single pixel and checking to
> > see if the colors are within a certain range.
>
> I'm way out of my league here but...
> Doesn't lossy jpeg compression make assumptions about 2 pixels next to each
> other?
> (pseudo)
> if pixel 1,1 = green
> skip pixel 1,2
> is pixel 1,3 green
> etc.
> That would increase the speed by lots I'd think.
> Of course it is lossy.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/I-need-to-write-an-external-for-LiveCode-in-C-but-I-doubt-my-ability-to-do-it-tp4702071p4702079.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
>



-- 
Do all things with love
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Monte Goulding

> On 7 Mar 2016, at 10:36 AM, Jonathan Lynch  wrote:
> 
> I will try to find a way, though. I am just hoping for advice so that I can
> avoid any more blind alleys.

The documentation is quite sparse for externals, however, I think that’s the 
way you will need to go to get the speed you need. There are more examples 
online now than there ever have been so I would start by reviewing the source 
of the externals in the LC repo and then look at those in my account and if you 
search GitHub for LiveCode I’m sure others will pop up like the SSH external.

I have a couple of externals that mess with imageData and they can be quite 
quick although they are only used in screen resolutions so if you have very 
large images that will slow them down obviously. Depending on what you are 
doing though I might be inclined to look at an OpenCV external. I believe with 
OpenCV you can green screen live camera feeds so it’s pretty fast.

Cheers

Monte


___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Simon
Jonathan Lynch wrote
> ...but it still requires looking at every single pixel and checking to
> see if the colors are within a certain range.

I'm way out of my league here but...
Doesn't lossy jpeg compression make assumptions about 2 pixels next to each
other?
(pseudo)
if pixel 1,1 = green 
skip pixel 1,2
is pixel 1,3 green
etc.
That would increase the speed by lots I'd think.
Of course it is lossy.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/I-need-to-write-an-external-for-LiveCode-in-C-but-I-doubt-my-ability-to-do-it-tp4702071p4702079.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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Phil Davis

Jonathan,

I see I am out of my league here. I'm sure others can give good advice 
however - this list is read by a lot of very smart people.


Phil


On 3/6/16 3:36 PM, Jonathan Lynch wrote:

A green-screen extraction on a large image requires millions of
calculations. I am not using a flood-fill based extraction, so that helps a
bit, but it still requires looking at every single pixel and checking to
see if the colors are within a certain range. I want to improve the
algorithm, so that it uses both a color-range comparison and a hue
comparison. Colors that are outside of the color-range comparison but
within the hue comparison probably have splashback from the green screen,
and I could remove some of the green from those pixels - maybe cut the
green component of the pixel in half or something like that.

So, well, that is a whole ton of calculations right there. I really worked
to optimize it in LC, but those optimizations only made a small difference.
An interpreted language would be very unlikely to come close in speed on
raw numerical comparisons like that. From what I understand, even LCB is
more like Java than like C++, so it might be a bit faster than LC, but not
in the range I need. Don't quote me on that.

In general, LC is supposed to be able to to be extended with externals. In
practical terms, this means it should work with the current version of
Visual Studio. I don't have much C++ experience. I was hoping to just
trudge through setting up the external so that I could focus on the
algorithm. Instead, I could not even use the tutorial.

I will try to find a way, though. I am just hoping for advice so that I can
avoid any more blind alleys.

Thanks,

J



On Sun, Mar 6, 2016 at 5:49 PM, Roland Huettmann  wrote:


Hi Jonathan,

I would start by seeing if your LC code can be optimized so the time it
takes per screen is acceptable. There are many small changes a person
can sometimes make to code that causes dramatic speed increases.

Or is the bulk of the time spent in areas LC can't address natively?
Maybe that's why you want to go toward an external.

Thanks -
Phil Davis


On 3/6/16 1:55 PM, Jonathan Lynch wrote:

Hello fellow LiveCoders,

I need to write an external and it needs to be fast. It is for

extracting

images from a green screen. I wrote a good algorithm for this in

LiveCode,

but it takes 20-30 seconds to handle all of the data processing. I want

to

use C++ for speed advantages.

I tried following the desktop externals tutorial that LiveCode uses,

but

it

seems that the external generator that LiveCode offers does not work
properly with Visual Studio 2015.

Should I try to find a free version of VS 2010? Should I try to fix the

C++

library files so that they work with VS 2015? Is there some other very

fast

compiled language, like Fortran, that I should try?

I welcome any advice on how to do this.

Thanks,

Jonathan




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


___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Jonathan Lynch
A green-screen extraction on a large image requires millions of
calculations. I am not using a flood-fill based extraction, so that helps a
bit, but it still requires looking at every single pixel and checking to
see if the colors are within a certain range. I want to improve the
algorithm, so that it uses both a color-range comparison and a hue
comparison. Colors that are outside of the color-range comparison but
within the hue comparison probably have splashback from the green screen,
and I could remove some of the green from those pixels - maybe cut the
green component of the pixel in half or something like that.

So, well, that is a whole ton of calculations right there. I really worked
to optimize it in LC, but those optimizations only made a small difference.
An interpreted language would be very unlikely to come close in speed on
raw numerical comparisons like that. From what I understand, even LCB is
more like Java than like C++, so it might be a bit faster than LC, but not
in the range I need. Don't quote me on that.

In general, LC is supposed to be able to to be extended with externals. In
practical terms, this means it should work with the current version of
Visual Studio. I don't have much C++ experience. I was hoping to just
trudge through setting up the external so that I could focus on the
algorithm. Instead, I could not even use the tutorial.

I will try to find a way, though. I am just hoping for advice so that I can
avoid any more blind alleys.

Thanks,

J



On Sun, Mar 6, 2016 at 5:49 PM, Roland Huettmann  wrote:

> But I would also appreciate a reply, maybe from Peter, which is of general
> interest to all of us.
>
> Optimizing is one possibility, then the question about what would LC
> Builder accomplish, and then C++, if nothing else does the job fast enough?
>
> I am thinking about some optimisation algorithms which are already
> available in C++ and would probably execute not well enough in LCS.
>
> Roland
>
> On Sun, Mar 6, 2016, 23:10 Phil Davis  wrote:
>
> > Hi Jonathan,
> >
> > I would start by seeing if your LC code can be optimized so the time it
> > takes per screen is acceptable. There are many small changes a person
> > can sometimes make to code that causes dramatic speed increases.
> >
> > Or is the bulk of the time spent in areas LC can't address natively?
> > Maybe that's why you want to go toward an external.
> >
> > Thanks -
> > Phil Davis
> >
> >
> > On 3/6/16 1:55 PM, Jonathan Lynch wrote:
> > > Hello fellow LiveCoders,
> > >
> > > I need to write an external and it needs to be fast. It is for
> extracting
> > > images from a green screen. I wrote a good algorithm for this in
> > LiveCode,
> > > but it takes 20-30 seconds to handle all of the data processing. I want
> > to
> > > use C++ for speed advantages.
> > >
> > > I tried following the desktop externals tutorial that LiveCode uses,
> but
> > it
> > > seems that the external generator that LiveCode offers does not work
> > > properly with Visual Studio 2015.
> > >
> > > Should I try to find a free version of VS 2010? Should I try to fix the
> > C++
> > > library files so that they work with VS 2015? Is there some other very
> > fast
> > > compiled language, like Fortran, that I should try?
> > >
> > > I welcome any advice on how to do this.
> > >
> > > Thanks,
> > >
> > > Jonathan
> > >
> > >
> > >
> >
> > --
> > 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
> >
> ___
> 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
>



-- 
Do all things with love
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Roland Huettmann
But I would also appreciate a reply, maybe from Peter, which is of general
interest to all of us.

Optimizing is one possibility, then the question about what would LC
Builder accomplish, and then C++, if nothing else does the job fast enough?

I am thinking about some optimisation algorithms which are already
available in C++ and would probably execute not well enough in LCS.

Roland

On Sun, Mar 6, 2016, 23:10 Phil Davis  wrote:

> Hi Jonathan,
>
> I would start by seeing if your LC code can be optimized so the time it
> takes per screen is acceptable. There are many small changes a person
> can sometimes make to code that causes dramatic speed increases.
>
> Or is the bulk of the time spent in areas LC can't address natively?
> Maybe that's why you want to go toward an external.
>
> Thanks -
> Phil Davis
>
>
> On 3/6/16 1:55 PM, Jonathan Lynch wrote:
> > Hello fellow LiveCoders,
> >
> > I need to write an external and it needs to be fast. It is for extracting
> > images from a green screen. I wrote a good algorithm for this in
> LiveCode,
> > but it takes 20-30 seconds to handle all of the data processing. I want
> to
> > use C++ for speed advantages.
> >
> > I tried following the desktop externals tutorial that LiveCode uses, but
> it
> > seems that the external generator that LiveCode offers does not work
> > properly with Visual Studio 2015.
> >
> > Should I try to find a free version of VS 2010? Should I try to fix the
> C++
> > library files so that they work with VS 2015? Is there some other very
> fast
> > compiled language, like Fortran, that I should try?
> >
> > I welcome any advice on how to do this.
> >
> > Thanks,
> >
> > Jonathan
> >
> >
> >
>
> --
> 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
>
___
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: I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Phil Davis

Hi Jonathan,

I would start by seeing if your LC code can be optimized so the time it 
takes per screen is acceptable. There are many small changes a person 
can sometimes make to code that causes dramatic speed increases.


Or is the bulk of the time spent in areas LC can't address natively? 
Maybe that's why you want to go toward an external.


Thanks -
Phil Davis


On 3/6/16 1:55 PM, Jonathan Lynch wrote:

Hello fellow LiveCoders,

I need to write an external and it needs to be fast. It is for extracting
images from a green screen. I wrote a good algorithm for this in LiveCode,
but it takes 20-30 seconds to handle all of the data processing. I want to
use C++ for speed advantages.

I tried following the desktop externals tutorial that LiveCode uses, but it
seems that the external generator that LiveCode offers does not work
properly with Visual Studio 2015.

Should I try to find a free version of VS 2010? Should I try to fix the C++
library files so that they work with VS 2015? Is there some other very fast
compiled language, like Fortran, that I should try?

I welcome any advice on how to do this.

Thanks,

Jonathan





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


I need to write an external for LiveCode in C++, but I doubt my ability to do it.

2016-03-06 Thread Jonathan Lynch
Hello fellow LiveCoders,

I need to write an external and it needs to be fast. It is for extracting
images from a green screen. I wrote a good algorithm for this in LiveCode,
but it takes 20-30 seconds to handle all of the data processing. I want to
use C++ for speed advantages.

I tried following the desktop externals tutorial that LiveCode uses, but it
seems that the external generator that LiveCode offers does not work
properly with Visual Studio 2015.

Should I try to find a free version of VS 2010? Should I try to fix the C++
library files so that they work with VS 2015? Is there some other very fast
compiled language, like Fortran, that I should try?

I welcome any advice on how to do this.

Thanks,

Jonathan



-- 
Do all things with love
___
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