[Haskell-cafe] Z.Haskell project announced

Dong Han winterland1989 at gmail.com
Wed Apr 7 08:45:44 UTC 2021

Hi Compl,

Thanks for your blessing, and we're happy to answer your questions. We have
published a paper about how did we combine libuv's event loop with GHC
lightweight threads, it's on the old [repo](
which is somehow a little bit outdated, but the design is mainly the same.

> does it touch the internals of GHC RTS scheduler?

No, the concurrency primitives in base(`MVar`, `forkIO`, `yield`, etc) are

 > Seems libuv would have to be deeply integrated, how is that done?

Basically, it consists of three parts:

1. Start an IO manager thread per capability, which is responsible for
polling libuv's eventloop.
2. Write bindings to libuv's async functions and wait for the IO manager.
3. Manage memory allocations and how data passing across FFI.


On Wed, Apr 7, 2021 at 2:58 PM YueCompl <compl.yue at icloud.com> wrote:

> Congratulations and thanks for the public release!
> Wish Z a fast growth and wide adoption.
> At a glance I'm especially curious how
> > *M* GHC lightweight threads scale on *N* event loops
> is achieved, does it touch the internals of GHC RTS scheduler? Seems libuv
> would have to be deeply integrated, how is that done?
> Sincerely,
> Compl
> On 2021-04-07, at 12:13, Dong Han <winterland1989 at gmail.com> wrote:
> Dear Haskellers:
> After having a discussion with HF guys, I decide to announce [Z.Haskell](
> http://z.haskell.world/) project, It's available on Hackage and very much
> usable now, the document is also pretty adequate.
> To recap the document from Z.Haskell, Z.Haskell provides:
> + Array, vector(array slice), sorting, searching
> + Text based UTF-8, basic Unicode manipulating, regex
> + FFI utilities
> + Fast parsing and building monad
> + JSON encoding and decoding
> + IO resource management, resource pool
> + File system operations
> + Network: DNS, TCP, UDP and IPC
> + Buffered input and output
> + Process management
> + Environment settings
> + High performance logger
> + High performance low-resolution timer
> The project's goal is not to compete with the base, but to provide an
> alternative engineering toolkit, which is more suitable for writing
> practical network/storage services. Similar to [netty](https://netty.io/)
> for java or [nodejs](https://nodejs.org/) for javascript. Welcome to join
> Z.Haskell if you have a similar use case. Currently, we're heading with the
> following roadmap:
> + Crypto library based on [botan](https://github.com/ZHaskell/z-botan).
> + TLS network stack.
> + HTTP framework.
> + Distributed system algorithms.
> Happy hacking!
> Z.Haskell Contributors
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210407/fa38a212/attachment.html>

More information about the Haskell-Cafe mailing list