lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Nov 11, 2013 at 8:27 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Nov 11, 2013 at 4:04 PM, Andrew Starks <andrew.starks@trms.com> wrote:
>> documentation. My plan is to release it, as well. It sounds like there
>> will be 4 nanomsg libraries! (I'm calling mine nml for, "NanoMsg for
>> Lua").
>
> Wheel reinvention continues, although heaven knows I'm cool with more & merrier.
>
> If you document it well, then it could become much more attractive.
> Otherwise finding a Lua module is like looking for parts in a junk
> yard ;)
>
> Remember that many 5.1 bindings are straightforward to convert to 5.2
> bindings with a few #ifdefs and a higher-level style.
>
> Short para for the uninitiated: what is NanoMsg and what is its claim to fame?
>
> steve d.
>


nanomsg[1] is the followup messaging library from one of ZeroMQ's
principle authors, Martin Sústrik[2].

Highlights include[3]:

1: MIT license
2: Simplified architecture (no contexts)
3: Much better Windows compatibility (no edge polling)
4: Much more pluggable
5: Written in C

My limited experience thus far is that it is a joy to, build, play
with and "use". "Use" is in quotes because it's not in production yet.

ZeroMQ felt "lua-esque" to me. NanoMSG makes ZeroMQ feel like a bloated pig.

A tiny example from my nml binding:

```lua
n = require'nml'
s = n.new("pair")
s2 = n.new("pair")
s:bind("inproc://test")
s:bind("tcp://*:5560")
s2:connect("inproc://test")
s:send("test")
print(s2:receive())
-->test
```




[1]: http://nanomsg.org/documentation-zeromq.html
[2]: http://250bpm.com/
[3]: http://nanomsg.org/documentation-zeromq.html