ANN: Stax - An Alternate Standard Library for HaXe

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

ANN: Stax - An Alternate Standard Library for HaXe

John A. De Goes

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

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

Re: ANN: Stax - An Alternate Standard Library for HaXe

blackdog-2

thanks John, that looks great, and what I was alluding to in the last post.

bd

On 08/13/2010 10:53 AM, John A. De Goes wrote:

>
> I'm happy to announce the development of an alternate standard library
> for HaXe, which you can find at: http://github.com/jdegoes/stax
>
> Although in its infancy (0.1), with many APIs still to be written (file,
> socket, etc.), the library provides enough benefit, and the core is
> stable enough, that many people should be able to use the library
> immediately.
>
> Stax is designed for declarative, highly-productive programming. Every
> other consideration is secondary. This means that if you need the
> highest possible performance, you should stick with the built-in HaXe
> standard library. Only if you want the highest possible productivity
> should you consider Stax.
>
> Stax ships with a growing list of features:
>
>         * A unified collections library, which supports immutable Set,
>           Map, and List collections, all of which accept arbitrary
>           element types on all platforms.
>         * A robust Future implementation for easy concurrent
>           programming. urlLoader.load('meta.xml').flatMap(function(xml)
>           return
>           urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image)
>           container.addChild(image));
>         * Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
>         * A powerful Option implementation, which allows you to program
>           productively without null, and without 'if' statements that
>           constantly check for null.
>         * Function extensions that allow common functional operations.
>           f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
>         * A unit testing framework derived from utest, which is fully
>           integrated into Stax. Assert.that(foo,
>           Must.beEqualTo(12).or(Must.beLessThan(9)));
>           Assert.delivered(myFuture, 1000); // Assert Future is
>           delivered within 1 second
>         * Dependency injection that allows you to have unique binding
>           per entry point to your application. Your tests can bind mock
>           objects, while production code can bind real objects.
>         * Powerful logging, with built in console Flash and JavaScript,
>           and trace handlers for all platforms.
>         * JSON encoding/decoding, with a fully typed representation of
>           JSON in code so you can perform type safe manipulation of JSON
>           objects.
>         * A functional reactive programming library, for declarative GUI
>           programming.
>         * A fully typed representation of the DOM, more accurate and
>           many times larger than that found inside HaXe.
>         * Browser and feature detection, quirks utility functions, and
>           more for the JavaScript target.
>         * A clean Http implementation, which returns Futures for get,
>           post, put, and delete operations.
>         * Numerous utilities such as clocks, schedulers, partial
>           functions, etc.
>
>
> Stax is a large project and won't be completed overnight. If you want to
> contribute anything (documentation, tests, or implementation of core
> APIs), please contact me.
>
> Regards,
>
> John
>


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

Re: ANN: Stax - An Alternate Standard Library for HaXe

Franco Ponticelli
In reply to this post by John A. De Goes
Congratulations! You have collected a lot of interesting features :)

Franco

On Fri, Aug 13, 2010 at 3:53 PM, John A. De Goes <[hidden email]> wrote:

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

--
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: ANN: Stax - An Alternate Standard Library for HaXe

Benjamin Dasnois
Seems very good!
I'll have a look at it this week-end! (as promised)

On Fri, Aug 13, 2010 at 5:00 PM, Franco Ponticelli <[hidden email]> wrote:
Congratulations! You have collected a lot of interesting features :)

Franco

On Fri, Aug 13, 2010 at 3:53 PM, John A. De Goes <[hidden email]> wrote:

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

--

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


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



--
DASNOIS Benjamin
http://www.benjamindasnois.com

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

Re: ANN: Stax - An Alternate Standard Library for HaXe

Michiel Crefcoeur
In reply to this post by John A. De Goes
Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
Will it be on haxelib so I can use it as a dependency?

2010/8/13 John A. De Goes <[hidden email]>

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

--
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: ANN: Stax - An Alternate Standard Library for HaXe

Benjamin Dasnois
One important question : what is the licence? :)

On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
Will it be on haxelib so I can use it as a dependency?

2010/8/13 John A. De Goes <[hidden email]>

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

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


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



--
DASNOIS Benjamin
http://www.benjamindasnois.com

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

Re: ANN: Stax - An Alternate Standard Library for HaXe

John A. De Goes
In reply to this post by Michiel Crefcoeur

It will not be on haxelib for some time (maybe 1.0 release).

Regards,

John 

On Aug 13, 2010, at 9:07 AM, Michiel Crefcoeur wrote:

Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
Will it be on haxelib so I can use it as a dependency?

2010/8/13 John A. De Goes <[hidden email]>

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

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

--
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: ANN: Stax - An Alternate Standard Library for HaXe

John A. De Goes
In reply to this post by Benjamin Dasnois

I believe it's BSD or MIT. You can check the source code. It's very permissive.

Regards,

John

On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:

One important question : what is the licence? :)

On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
Will it be on haxelib so I can use it as a dependency?

2010/8/13 John A. De Goes <[hidden email]>

I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax

Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.

Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.

Stax ships with a growing list of features:

  • A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
  • A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
  • Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
  • A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
  • Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
  • A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
  • Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
  • Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
  • JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
  • A functional reactive programming library, for declarative GUI programming.
  • A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
  • Browser and feature detection, quirks utility functions, and more for the JavaScript target.
  • A clean Http implementation, which returns Futures for get, post, put, and delete operations.
  • Numerous utilities such as clocks, schedulers, partial functions, etc.

Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.

Regards,

John

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


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



--
DASNOIS Benjamin
http://www.benjamindasnois.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: ANN: Stax - An Alternate Standard Library for HaXe

Niel Drummond-3
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:

>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

> --
> 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: ANN: Stax - An Alternate Standard Library for HaXe

Mark de Bruijn | Dykam
Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

--
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: ANN: Stax - An Alternate Standard Library for HaXe

John A. De Goes

You have duplicated some things in Stax, but you also have some new code. Do you have any time/interest in porting over parts to become part of the Stax library?

Also interested in your explanation for Enumerable/Enumerator.

Regards,

John

On Aug 13, 2010, at 11:17 AM, Mark de Bruijn | Dykam wrote:

Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

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

--
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: ANN: Stax - An Alternate Standard Library for HaXe

Cauê W.
WOW!!
That is SO cool!I'll use it right now to solve some concurrency problems I was experiencing!!

This is the best project for haXe I've come accross!! Kudos for John! : )



About enumerator, the only thing I think should be more clear is the hasNext() function. Many implementations use hasNext as a move next, though the name implies that it shouldn't have side effects.

2010/8/13 John A. De Goes <[hidden email]>

You have duplicated some things in Stax, but you also have some new code. Do you have any time/interest in porting over parts to become part of the Stax library?

Also interested in your explanation for Enumerable/Enumerator.

Regards,

John

On Aug 13, 2010, at 11:17 AM, Mark de Bruijn | Dykam wrote:

Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

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

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


--
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: ANN: Stax - An Alternate Standard Library for HaXe

Justin Donaldson-2
The main benefit for enumerators is that they can be faster than iterators in some contexts.

here's an enumerator:

typedef Enumerator<T> = {
    moveNext:Void->Bool;
    current:T;
}

The enumerator consists of a function moveNext():Bool that checks *and* updates the position of the current item.  Combining operations like that in a single function speeds things up a bit over the Iterator style next()/hasNext().
I have no idea how this affects practical performance in the haXe targets though.

Iterator interfaces can be more reliable for concurrent programming, since they can check if a collection has been modified mid-iteration on the "next()" function call, and then throw an error.  Java does this with Lists:
http://java.sun.com/developer/Books/javaprogramming/corejava/page3.html
(search for ConcurrentModificationException)

By comparison, enumerators provide "current" as a raw field access for the current value.  It's faster, but you can't detect underlying collection changes after moveNext() has been called.  You could add an accessor for current, but then it changes the field access to a slower function access, and you would most likely be back to iterator-class speeds.

I haven't had a chance to look at stax, and I don't know if the library even relies on even saving iterator state.  However, since the library seems to be geared towards handling situations involving delayed operations and concurrency, it would seem using modification-detecting Iterators probably would be safer to use.

-Justin



On Fri, Aug 13, 2010 at 11:15 AM, Cauê Waneck <[hidden email]> wrote:
WOW!!
That is SO cool!I'll use it right now to solve some concurrency problems I was experiencing!!

This is the best project for haXe I've come accross!! Kudos for John! : )



About enumerator, the only thing I think should be more clear is the hasNext() function. Many implementations use hasNext as a move next, though the name implies that it shouldn't have side effects.


2010/8/13 John A. De Goes <[hidden email]>

You have duplicated some things in Stax, but you also have some new code. Do you have any time/interest in porting over parts to become part of the Stax library?

Also interested in your explanation for Enumerable/Enumerator.

Regards,

John

On Aug 13, 2010, at 11:17 AM, Mark de Bruijn | Dykam wrote:

Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

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

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


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


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



--
blog: http://www.scwn.net
aim: iujjd
twitter: jjdonald


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

Re: ANN: Stax - An Alternate Standard Library for HaXe

Lars Madson

/** Either represents a type that is either a "left" value or a "right" value,
 * but not both. Either is often used to represent success/failure, where the
 * left side represents failure, and the right side represents success.
 */

Funny I would have declare this the opposite way. But I'm left handed. :)

thank you
Laurent


Le 13/08/2010 20:56, Justin Donaldson a écrit :
The main benefit for enumerators is that they can be faster than iterators in some contexts.

here's an enumerator:

typedef Enumerator<T> = {
    moveNext:Void->Bool;
    current:T;
}

The enumerator consists of a function moveNext():Bool that checks *and* updates the position of the current item.  Combining operations like that in a single function speeds things up a bit over the Iterator style next()/hasNext().
I have no idea how this affects practical performance in the haXe targets though.

Iterator interfaces can be more reliable for concurrent programming, since they can check if a collection has been modified mid-iteration on the "next()" function call, and then throw an error.  Java does this with Lists:
http://java.sun.com/developer/Books/javaprogramming/corejava/page3.html
(search for ConcurrentModificationException)

By comparison, enumerators provide "current" as a raw field access for the current value.  It's faster, but you can't detect underlying collection changes after moveNext() has been called.  You could add an accessor for current, but then it changes the field access to a slower function access, and you would most likely be back to iterator-class speeds.

I haven't had a chance to look at stax, and I don't know if the library even relies on even saving iterator state.  However, since the library seems to be geared towards handling situations involving delayed operations and concurrency, it would seem using modification-detecting Iterators probably would be safer to use.

-Justin



On Fri, Aug 13, 2010 at 11:15 AM, Cauê Waneck <[hidden email]> wrote:
WOW!!
That is SO cool!I'll use it right now to solve some concurrency problems I was experiencing!!

This is the best project for haXe I've come accross!! Kudos for John! : )



About enumerator, the only thing I think should be more clear is the hasNext() function. Many implementations use hasNext as a move next, though the name implies that it shouldn't have side effects.


2010/8/13 John A. De Goes <[hidden email]>

You have duplicated some things in Stax, but you also have some new code. Do you have any time/interest in porting over parts to become part of the Stax library?

Also interested in your explanation for Enumerable/Enumerator.

Regards,

John

On Aug 13, 2010, at 11:17 AM, Mark de Bruijn | Dykam wrote:

Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

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

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


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


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



--
blog: http://www.scwn.net
aim: iujjd
twitter: jjdonald



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

Re: ANN: Stax - An Alternate Standard Library for HaXe

Mark de Bruijn | Dykam
In reply to this post by Justin Donaldson-2
One reason indeed is speed. The other is safety. In case of Iterator, the unsafety lies in that next() /can/ throw an error. Enumerator's moveNext will only in **exceptional** cases, hence the exceptional. It returns a boolean in normal cases of failure.

Another thing is implementation wise. Hard to explain, but when I ported my data.flow code to Enumerator, I could reduce both complexity and LoC dramatically. This lies partially in that you can endlessly invoke moveNext, as it should just return false every time. Also, when you have a class which wraps Iterator and is an Iterator, a hasNext invocation generally requires knowledge of the next item. For Iterator implementations which have as source an Iterator, I generally have 3 states of operation (most of my iterators need knowledge of next items):
 - After an invocation of next, calling the next of the base, processing the data.
 - After an invocation of hasNext, if next has been called for the current item, call next from the base, and apply checks to see if hasNext is true
 - After an invocation of hasNext, if next has't been called. Then return just the result of the previous hasNext call.

In case of enumerator only one:
- After an invocation of moveNext: call moveNext on base, if it succeeds, do checks and processing, assign to current and be done.

I really favor Enumerable, IMHO it is better in almost every aspect.
--
Mark


On Fri, Aug 13, 2010 at 7:56 PM, Justin Donaldson <[hidden email]> wrote:
The main benefit for enumerators is that they can be faster than iterators in some contexts.

here's an enumerator:

typedef Enumerator<T> = {
    moveNext:Void->Bool;
    current:T;
}

The enumerator consists of a function moveNext():Bool that checks *and* updates the position of the current item.  Combining operations like that in a single function speeds things up a bit over the Iterator style next()/hasNext().
I have no idea how this affects practical performance in the haXe targets though.

Iterator interfaces can be more reliable for concurrent programming, since they can check if a collection has been modified mid-iteration on the "next()" function call, and then throw an error.  Java does this with Lists:
http://java.sun.com/developer/Books/javaprogramming/corejava/page3.html
(search for ConcurrentModificationException)

By comparison, enumerators provide "current" as a raw field access for the current value.  It's faster, but you can't detect underlying collection changes after moveNext() has been called.  You could add an accessor for current, but then it changes the field access to a slower function access, and you would most likely be back to iterator-class speeds.

I haven't had a chance to look at stax, and I don't know if the library even relies on even saving iterator state.  However, since the library seems to be geared towards handling situations involving delayed operations and concurrency, it would seem using modification-detecting Iterators probably would be safer to use.

-Justin




On Fri, Aug 13, 2010 at 11:15 AM, Cauê Waneck <[hidden email]> wrote:
WOW!!
That is SO cool!I'll use it right now to solve some concurrency problems I was experiencing!!

This is the best project for haXe I've come accross!! Kudos for John! : )



About enumerator, the only thing I think should be more clear is the hasNext() function. Many implementations use hasNext as a move next, though the name implies that it shouldn't have side effects.


2010/8/13 John A. De Goes <[hidden email]>

You have duplicated some things in Stax, but you also have some new code. Do you have any time/interest in porting over parts to become part of the Stax library?

Also interested in your explanation for Enumerable/Enumerator.

Regards,

John

On Aug 13, 2010, at 11:17 AM, Mark de Bruijn | Dykam wrote:

Take a look at http://gitorious.org/more/more. I developed it mainly having the current standard lib in mind, filling some gaps, as well replacing parts.

The things I use the most myself are haxe.more.exceptions and haxe.more.data.Manipulation. Manipulation is a convenience wrapper around haxe.more.data.flow, by offering a fluent API around data manipulation. haxe.more.data.flow.Enumerable/Enumerator is my replacement of Iterable/Iterator, which I consider quite unsafe for a number of reasons. If you're interested in my decisions (e.g. why Iterable is unsafe) just ask.
--
Mark


On Fri, Aug 13, 2010 at 4:49 PM, Niel Drummond <[hidden email]> wrote:
Looks really useful - thank you for your efforts!

- Niel


On Fri, Aug 13, 2010 at 09:16:15AM -0600, John A. De Goes wrote:
>
> I believe it's BSD or MIT. You can check the source code. It's very permissive.
>
> Regards,
>
> John
>
> On Aug 13, 2010, at 9:11 AM, Benjamin Dasnois wrote:
>
> > One important question : what is the licence? :)
> >
> > On Fri, Aug 13, 2010 at 5:07 PM, Michiel Crefcoeur <[hidden email]> wrote:
> > Great job on the DOM extern classes, something I started working on for my project but now that I see this, I think it's best to re-use your work.
> > Will it be on haxelib so I can use it as a dependency?
> >
> > 2010/8/13 John A. De Goes <[hidden email]>
> >
> > I'm happy to announce the development of an alternate standard library for HaXe, which you can find at: http://github.com/jdegoes/stax
> >
> > Although in its infancy (0.1), with many APIs still to be written (file, socket, etc.), the library provides enough benefit, and the core is stable enough, that many people should be able to use the library immediately.
> >
> > Stax is designed for declarative, highly-productive programming. Every other consideration is secondary. This means that if you need the highest possible performance, you should stick with the built-in HaXe standard library. Only if you want the highest possible productivity should you consider Stax.
> >
> > Stax ships with a growing list of features:
> >
> > A unified collections library, which supports immutable Set, Map, and List collections, all of which accept arbitrary element types on all platforms.
> > A robust Future implementation for easy concurrent programming. urlLoader.load('meta.xml').flatMap(function(xml) return urlLoader.load(parse(xml).backgroundUrl)).deliverTo(function(image) container.addChild(image));
> > Tuples of arity up to 5. var tuple = 1.entuple(2) // (1, 2)
> > A powerful Option implementation, which allows you to program productively without null, and without 'if' statements that constantly check for null.
> > Function extensions that allow common functional operations. f1.compose(f2); var tracer = trace.lazy('hello world'); tracer();
> > A unit testing framework derived from utest, which is fully integrated into Stax. Assert.that(foo, Must.beEqualTo(12).or(Must.beLessThan(9))); Assert.delivered(myFuture, 1000); // Assert Future is delivered within 1 second
> > Dependency injection that allows you to have unique binding per entry point to your application. Your tests can bind mock objects, while production code can bind real objects.
> > Powerful logging, with built in console Flash and JavaScript, and trace handlers for all platforms.
> > JSON encoding/decoding, with a fully typed representation of JSON in code so you can perform type safe manipulation of JSON objects.
> > A functional reactive programming library, for declarative GUI programming.
> > A fully typed representation of the DOM, more accurate and many times larger than that found inside HaXe.
> > Browser and feature detection, quirks utility functions, and more for the JavaScript target.
> > A clean Http implementation, which returns Futures for get, post, put, and delete operations.
> > Numerous utilities such as clocks, schedulers, partial functions, etc.
> >
> > Stax is a large project and won't be completed overnight. If you want to contribute anything (documentation, tests, or implementation of core APIs), please contact me.
> >
> > Regards,
> >
> > John
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
> >
> >
> > --
> > DASNOIS Benjamin
> > http://www.benjamindasnois.com
> > --
> > haXe - an open source web programming language
> > http://haxe.org
>

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

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

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


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


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



--
blog: http://www.scwn.net
aim: iujjd
twitter: jjdonald


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


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