The only things I know that Gloss lacks relative to Erlang's
functionality is arbitrary bit-lengths for integers and mixed-endian
support, both of which I plan to add in the near future.  Lacking
Erlang's built in pattern matching, the Clojure implementation will
probably be less elegant in some cases, but it will certainly get the
job done.

If you decide to use Gloss and run into any issues, please let me
know.

Zach

On Dec 16, 1:55 pm, Michael Ossareh <ossa...@gmail.com> wrote:
> > I was wondering if anyone has been working
> > on implementing a bit syntax for Clojure in the rough conceptual style
> > of Erlang's bit syntax.
>
> I'm not an erlang-pro, just dabbled enough to know I like the pattern
> matching, which is what you're talking about here, I believe.
>
> > I'm looking for a Clojure adaptation of the core
> > concept and tool as it exists in Erlang
>
> So, as I understand it, in erlang you have a function and each
> implementation of that function is guarded by a pattern, in the case of the
> bit syntax you're able to look at arbitrary binary data.
>
> I think compojure provides an interesting template for this; instead of
> defining `routes` you define patterns (expressed however you want, you just
> need to create the macros for it), when those patterns match you execute the
> accompanying forms.
>
> The major issue I see here is performance, you would probably have to copy
> everything off the buffer to actually run it through the pattern matching
> function. I suppose the copying could be limited to just when you have a
> full packet, so you'd need another set of logic for defining what a full
> packet is, IRC erlang does this too when you define your socket options.
>
> To that point...
>
>  I've also seen Zach Tellman's Gloss[2], but I'm not sure
>
> > it's what I want. It is highly likely I've missed something
>
> I was at Zach's gloss talk two weeks ago and I think it is definitely what
> you want, at least to start:https://github.com/ztellman/gloss/wiki

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to