Technitribe

interesting problems (and a few solutions, too)

Technitribe
  • About the Authors
  • Log In
  • Log Out
  • Lost Password
  • Register
  • Reset Password
    • 3 Feb 2010

      Macports updates their Erlang version, update your load-path’s

      Written by Tim Bielawa

      I’ve been working on my XMPP server pet project recently, and the need for a good Erlang XML parser has finally struck. I decided to go with Erlsom. It’s in MacPorts, so from there I installed it. Now, since I don’t update my port tree frequently I get delightful surprises from time to time. This time installing Erlsom triggered an update of Erlang, to the latest version!

      Short story shorter, the update changes the path to the erlang-mode.el file so before you can M-x erlang-mode again you’ll have you fix your Emacs load-path to register the new location. (See my older post on how to initially set up Erlang and Emacs from MacPorts from scratch)

      The new load commands should be:

      (setq load-path (cons  "/opt/local/lib/erlang/lib/tools-2.6.5/emacs/" load-path))
      (setq erlang-root-dir "/opt/local/lib/erlang")
      (setq exec-path (cons "/opt/local/bin" exec-path))
      (require 'erlang-start)
      

      It just requires changing the tools-x.x.x to 2.6.5.

      p.s. about erlang-mode

      • Tags »
      • Emacs Erlang XMPP

    2 Comment on “Macports updates their Erlang version, update your load-path’s”

    • Kenneth

      03 Feb 2010 06:02 am

      I am just curious regarding what you mean with good XML parser?
      And I also wonder if you are aware of the brand new XML parser in
      the xmerl application (included in the Erlang/OTP distro). The new XML parser is a sax parser with about the same speed as Erlsom. There is currently no validation but that is on its way.

      /Kenneth , Erlang/OTP Ericsson

    • tbielawa

      03 Feb 2010 07:02 am

      Kenneth,

      At the time “good” just meant the first thing that looked good. When reading over documentation for each module I noticed where I could find an example of how to use a continuation function in Erlsom before I found the Xmerl example.

      Honestly I haven’t tried either module yet, though. Right now I’d much rather go with something that ships with my distribution than require an external dependency in each installation.

      Just before you made your comment I read Jack Moffitt’s post in which he parses a TCP stream with xmerl. After which I realized that that he was doing it the same way I would have in Erlsom, just with xmerl.

      While I would like to pass binaries straight out of gen_tcp:recv() to the scanner, I recognize that I do not have ultra high performance needs at this time, so the conversion to strings will only be an additional operation, and in no way a game killer. I’m going to give Xmerl a try.

      Can you comment on the prospects of binary scanning coming to xmerl, and if there would be noticeable performance gains at this point?

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    • The Authors
    • Virtual Disk Guide

      Interested in virtualization? Do QCOWs rule your filesystem? Are you a libvirt or KVM+QEMU wizard? I wrote a book about virtual disk management. Check out the The Linux Sysadmin's Guide to Virtual Disks online for free at ScribesGuides.com.


      Consider supporting the author by purchasing a hard copy of the first edition for just $10.00 on Lulu.com.

    • bitmath

      bitmath is a Python library for dealing with file size units (GiB's, kB's, etc) in a sane way. bitmath supports arithmetic, rich comparison, conversion, automatic best human-readable representation, and many other utility functions. Read some examples on the docs site or check out the source on GitHub.

    • latest posts

      • Querying block device sizes in Python on Linux and Mac OS X February 4, 2023
      • Using jq to filter an array of objects from JSON September 9, 2019
      • Two Year Break — And we’re back! November 16, 2018
    • tags

      bitmath blog conference css dblatex DNS DocBook eclipse Emacs Erlang Fedora fedora 22 filter GNU Screen Haiku Introduction java jboss LCSEE Linux locale locales fix slicehost ubuntu Macports module nist nXML-Mode opengl open source OS X package packaging pki prefix units presentation project pypi Python scholarship si summit Tutorial ubuntu xcode XML XMPP
    • h4ck teh world

      tbielawatbielawa
      • Issue Comment
        bitmath
        February 6, 2023 - 12:55 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:54 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:51 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:36 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:30 am UTC

Creative Commons License
Technitribe by Tim Bielawa is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.