hxflickr - haxe & flickr

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

hxflickr - haxe & flickr

Don-Duong Quach
Hi list,

I converted Adobe's as3flickrlib and an example and posted it up on github.  http://www.github.com/geekrelief/hxflickr
The lib conversion has only been tested enough to get the example running, but I wanted to throw this out there for everyone. 

Cheers,
-Don Q.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Baluta Cristian
i just started myself to port it but abandoned.

btw, you can optimize it by replacing static constants like this:
public static var READ:String = "read";

with this:
inline public static var READ:String = "read";


On Tue, Oct 21, 2008 at 9:01 PM, Don-Duong Quach <[hidden email]> wrote:
Hi list,

I converted Adobe's as3flickrlib and an example and posted it up on github.  http://www.github.com/geekrelief/hxflickr
The lib conversion has only been tested enough to get the example running, but I wanted to throw this out there for everyone. 

Cheers,
-Don Q.

--
haXe - an open source web programming language
http://haxe.org



--
Cristi
www.ralcr.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Don-Duong Quach
Thanks for the suggestion.  The repo has been updated.

On Tue, Oct 21, 2008 at 12:35 PM, Baluta Cristian <[hidden email]> wrote:
i just started myself to port it but abandoned.

btw, you can optimize it by replacing static constants like this:
public static var READ:String = "read";

with this:
inline public static var READ:String = "read";


On Tue, Oct 21, 2008 at 9:01 PM, Don-Duong Quach <[hidden email]> wrote:
Hi list,

I converted Adobe's as3flickrlib and an example and posted it up on github.  http://www.github.com/geekrelief/hxflickr
The lib conversion has only been tested enough to get the example running, but I wanted to throw this out there for everyone. 

Cheers,
-Don Q.

--
haXe - an open source web programming language
http://haxe.org



--
Cristi
www.ralcr.com

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

tong-2
In reply to this post by Baluta Cristian
On Tue, 2008-10-21 at 22:35 +0300, Baluta Cristian wrote:
> i just started myself to port it but abandoned.
>
> btw, you can optimize it by replacing static constants like this:
> public static var READ:String = "read";
>
>
> with this:
> inline public static var READ:String = "read";
>

mind that inlining optimizes speed but also increases size.
.. to question in case of the flickr lib.

tong.


--
[)   |   5   |<   †   |2   3   3


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Don-Duong Quach
Right.  I don't think inlining or not really matters with respect to this lib.  The major of the constants are defined as strings for the different events.  It's not as if the lib is doing lots of computation.

-Don Q.

On Tue, Oct 21, 2008 at 1:55 PM, tong <[hidden email]> wrote:
On Tue, 2008-10-21 at 22:35 +0300, Baluta Cristian wrote:
> i just started myself to port it but abandoned.
>
> btw, you can optimize it by replacing static constants like this:
> public static var READ:String = "read";
>
>
> with this:
> inline public static var READ:String = "read";
>

mind that inlining optimizes speed but also increases size.
.. to question in case of the flickr lib.

tong.


--
[)   |   5   |<   †   |2   3   3


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Baluta Cristian
In reply to this post by tong-2
never taught at this aspect, but at least will lower the file size by not compiling variables that are not used?

On Tue, Oct 21, 2008 at 11:55 PM, tong <[hidden email]> wrote:


mind that inlining optimizes speed but also increases size.
.. to question in case of the flickr lib.

tong.


--
[)   |   5   |<   †   |2   3   3


--
haXe - an open source web programming language
http://haxe.org



--
Cristi
www.ralcr.com

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Nicolas Cannasse
In reply to this post by tong-2
tong a écrit :

> On Tue, 2008-10-21 at 22:35 +0300, Baluta Cristian wrote:
>> i just started myself to port it but abandoned.
>>
>> btw, you can optimize it by replacing static constants like this:
>> public static var READ:String = "read";
>>
>>
>> with this:
>> inline public static var READ:String = "read";
>>
>
> mind that inlining optimizes speed but also increases size.
> .. to question in case of the flickr lib.

For such constants, it should actually decrease size ;)

Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

tong-2
On Wed, 2008-10-22 at 10:27 +0200, Nicolas Cannasse wrote:

> tong a écrit :
> > On Tue, 2008-10-21 at 22:35 +0300, Baluta Cristian wrote:
> >> i just started myself to port it but abandoned.
> >>
> >> btw, you can optimize it by replacing static constants like this:
> >> public static var READ:String = "read";
> >>
> >>
> >> with this:
> >> inline public static var READ:String = "read";
> >>
> >
> > mind that inlining optimizes speed but also increases size.
> > .. to question in case of the flickr lib.
>
> For such constants, it should actually decrease size ;)
>

ok... i thought using an inlined field over and over would increase
size.
a quick test declaring 1000 fields inline and not:
( inlined 4167, not-inlined 4224 bytes )

tong.

--
[)   |   5   |<   †   |2   3   3


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: hxflickr - haxe & flickr

Nicolas Cannasse
tong a écrit :

> On Wed, 2008-10-22 at 10:27 +0200, Nicolas Cannasse wrote:
>> tong a écrit :
>>> On Tue, 2008-10-21 at 22:35 +0300, Baluta Cristian wrote:
>>>> i just started myself to port it but abandoned.
>>>>
>>>> btw, you can optimize it by replacing static constants like this:
>>>> public static var READ:String = "read";
>>>>
>>>>
>>>> with this:
>>>> inline public static var READ:String = "read";
>>>>
>>> mind that inlining optimizes speed but also increases size.
>>> .. to question in case of the flickr lib.
>> For such constants, it should actually decrease size ;)
>>
>
> ok... i thought using an inlined field over and over would increase
> size.

It might depend on the platform.

For example in JS or PHP, strings are repeated in code so if you have a
very long string, inlining it will increase filesize.

In Flash or Neko which are bytecode-oriented, strings constants are
shared, so it will make a smaller file to compile an access to the
string-number-n than to compile an access to my.package.MyClass.myString

Nicolas

--
haXe - an open source web programming language
http://haxe.org