[erlang-questions] What is the best way to parse complex erlang terms in port drivers?

Zhemzhitsky Sergey Sergey_Zhemzhitsky@REDACTED
Thu Jun 7 10:04:39 CEST 2012


Hello Michael,

Thanks a lot.

I have understood that in case of eterms it will be necessary to traverse the parsed structure somehow to transform it into the target c-structure, so ei interface seems more natural to use as I will be creating the c-structure during parsing.

Regards,
Sergey

-----Original Message-----
From: Michael Truog [mailto:mjtruog@REDACTED] 
Sent: Thursday, June 07, 2012 11:30 AM
To: Zhemzhitsky Sergey
Cc: 'Richard O'Keefe'; erlang-questions@REDACTED
Subject: Re: [erlang-questions] What is the best way to parse complex erlang terms in port drivers?

On 06/07/2012 12:19 AM, Zhemzhitsky Sergey wrote:
>>> Why was it hard to see in the documentation?
> As I'm kinda a newbie at erlang I understand your indignation. I supposed there should be some best practices and of cause I don't know them for now.
>
> The question was asked first of all because there are a lot of samples which use different approaches to parse erlang terms and I'd like to know the best one from the point of view of source code maintainability and simplicity. 
> I'm also interested in not only mentioned approaches but in the alternative ones.
It seems like the eterm interface is the older/slower interface, and the ei interface is the newer/faster interface (where you have better control over memory usage).  That is just based on experience, and is unlikely to be found in the documentation.

- Michael

_______________________________________________________

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. 
If you need assistance please contact our Contact Center  (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp  





More information about the erlang-questions mailing list