[Haskell-cafe] ANN: JMacro 0.6 and JMacro-RPC, featuring cross-platform json-rpc, easy AJAX applications, evented reactive panels and more
gershomb at gmail.com
Mon Dec 17 02:36:49 CET 2012
I'm happy to announce the release of JMacro 0.6 (0.6.3 actually) which
brings a host of improvements. JMacro is a quasiquoted library for the
guarantees of syntactic correctness, and is intended to be used for both
are especially important. Documentation is on the Haskell Wiki:
This release brings a host of improvements to efficiency, driven largely
by user-submitted patches and requests. Text is used more uniformly, as
opposed to String, and JSON integration is provided via aeson rather
supported, including more obscure operators, as well as labels, and
labeled break and continue.
The big news, however, is JMacro-RPC, which provides multi-server tools
for serving JSON-RPC 2.0  remote procedure calls, as well as binding
server functions and caller stubs are automatically generated by
calls to a located URL.
On top of these RPCs, JMacro-RPC provides the conversation page
abstraction, which allows the easy creation of web-applications with
has access to these functions, which run, transparently, server-side,
with access to page-invocation-local shared state. Backends exist for
JMacro-RPC for Happstack and Snap, and can be easily written for any
other server or framework.
JMacro-RPC now also provides the Panels library, which is even
higher-level, providing the convenience of continuation-style web
development with no scaling hassle. On the server side, Panels are
entirely stateless, storing no client-specific state (so requests can be
sharded to multiple servers as well without worrying about session
replication). Code is written with a set of combinators over Panels,
which package up display and behavior simultaneously. Panels, inspired
by FRP, can provide Signals, which are sampleable, Events, which are
discrete and can trigger updates, and Sinks which can be bound to
Signals (behaving similarly to FRP wormholes). Semantics, by virtue of
client-server interaction, are necessarily evented rather than
continuous. As such, this is properly a system for declarative,
event-driven reactivity rather than genuine FRP. Such a system is
impoverished compared to the richer continuous-time or fully
stream-based discrete-time semantics provided by of real FRP libraries.
However, it is more than powerful enough for the sorts of user
interfaces Panels are designed to build, and holds the added advantage
of being straightforward, tractable, and a tight fit for client-server
While Signals are applicative and Sinks are contravariant functors,
which exposes at least some flavor of FRP, simple Signals and Sinks
which don't require server-side processing (and are safely distinguished
as such by types) can be bound to one-another purely on the client-side,
avoiding unnecessary round-trips.
The Panels code combines concepts from FRP , Self-Adjusting
Computation , ASP.NET update panels , and research in stable
evented updates is designed to be reasonably efficient and leak-free.
Between basic RPCs, Conversations, and Panels, JMacro-RPC is intended to
provide the full "power scale" for writing robust AJAX web applications
with complex server-side logic. Because it is designed to be usable from
any Haskell web framework or server, it is suitable for widespread
Patches, bug-reports, contributions, feature requests, documentation,
etc. all are very welcome.
 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.66.6645 ("I
am not a number: I am a free variable", McBride and McKinna. See section
four, on hierarchical names.)
More information about the Haskell-Cafe