Git Product home page Git Product logo

elmpd's People

Contributors

sp1ff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

emacsmirror

elmpd's Issues

Needless use of regex to identify a complete response from the server

One of the core responsibilities of elmpd-connection--filter is detecting when a complete response has been received. A complete response is concluded with a line of the form "OK" or "ACK [error@command_listNum] {current_command} message_text", so one could check for success by simply examining the last three characters of the current response ("OK\n"). For reasons unknown, the author obtusely chose to use an overly-complex regex instead.
This became an issue when issuing a command that returned approximately 48K of data; each invocation of the regular expression over that response (given a read buffer that was apparently around 4K) took longer & longer until Emacs became completely unresponsive.

idle callback on `elmpd-connection` instances takes text to indicate changed sub-systems

elmpd-connection instances may be normal or "idling"; in the latter case they will invoke the "idle" command on one or more MPD sub-systems, and when any of those sub-systems change, a caller-supplied callback will be invoked with the connection instance and a parameter meant to indicate which subsystems changed. That is presently the MPD response with the final "OK\n" stripped: e.g. "changed: player\nchanged: options\n". Not only is it tedious & repetitive for every callback to parse the text, it forces the callback authors to check for errors/incorrect text. Better to remove the gap between the semantics of this interface ("You will get a list of changed subsystems") and the syntax ("Here's some text-- you have to derive the changed subsystems from that") by, say, having the callback receive a list of symbols.

Contributing to mpdel

Hi,

I'm the author of mpdel and libmpdel. Very good naming choice with elmpd. It's refreshing to find someone who is as good as naming things as me :-).

Joke aside, if you want to contribute to libmpdel or mpdel, feel free to do so. I'm using these packages everyday and I regularly merge contributions from others.

Is there a reason why you decided to write your own library instead of building on top of an existing one?

Have fun hacking Emacs!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.