<div dir="ltr">We have started to work on a new string module, we will make a PR when we have decided directions of how the api should look like.<div><br></div><div>Basic stuff like uppercase, lowercase, to_nfc, to _nfd and gc (grapheme_clusters) are implemented for unicode:chardata() input, I have used elixir's module as inspiration.</div><div><br></div><div>That is the easy part, writing a nice api on top of that is the hard part and naming the module</div><div>something different than string.</div><div><br></div><div>/Dan<br></div><div><br></div><div><div><div class="gmail_quote"><div dir="ltr">On Sun, Jan 15, 2017 at 3:25 AM Michael Truog <<a href="mailto:mjtruog@gmail.com">mjtruog@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF" class="gmail_msg">
<div class="m_-1226388193071310755moz-cite-prefix gmail_msg"><code class="gmail_msg"></code>This thread started to
talk about the need for unicode functionality in Erlang and how it
exists currently in Elixir but not in Erlang. I created a
repository with the Elixir functions created as Erlang functions
in an Erlang module as an example of what I want at
<a class="m_-1226388193071310755moz-txt-link-freetext gmail_msg" href="https://github.com/okeuday/unicode_data/" target="_blank">https://github.com/okeuday/unicode_data/</a><br class="gmail_msg">
<br class="gmail_msg">
The generated module (unicode_data) only includes functions from
the first Erlang module contained in unicode.ex
(Elixir.String.Unicode) though it does bring up some important
topics:<br class="gmail_msg">
1) Add the unicode version to the Erlang module version. The
generated unicode_data module has a timestamp suffix, so we know
both the unicode version and the timestamp when the unicode_data
module was generated.<br class="gmail_msg">
2) Use only lists, not binaries, to make sure all temporary data
stays on the heap of the Erlang process. That should be best for
performance, though I haven't proved that with any performance
testing.<br class="gmail_msg">
<br class="gmail_msg">
I haven't added tests, though I have compared the unicode_data
Erlang module, to the Elixir.String.Unicode module and the data
looks correct. Mainly thought this would help the discussion.<br class="gmail_msg">
<br class="gmail_msg">
Best Regards,<br class="gmail_msg">
Michael</div></div><div text="#000000" bgcolor="#FFFFFF" class="gmail_msg"><div class="m_-1226388193071310755moz-cite-prefix gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
On 01/10/2017 10:58 AM, Bhag Chandra wrote:<br class="gmail_msg">
</div></div><div text="#000000" bgcolor="#FFFFFF" class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div dir="ltr" class="gmail_msg">
<div class="gmail_msg">Hello,</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">I have been coding in Erlang for 2 years. A wonderful
language but not very big community, so I cant discuss my
questions with programmers around me (Java, Python guys). I
found out about this list today.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">I have some fundamental doubts about the Erlang. It would
be great if someone can help me clarify them.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
1) "Strings in Erlang are internally treated as a list of
integers of each character's ASCII values, this representation
of string makes operations faster. For example, string
concatenation is constant time operation in Erlang." Can
someone explain why?
<div class="gmail_msg">
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">2) "It makes sense to use Erlang only where system's
availability is very high". Is it not a very general
requirement of most of the systems? Whatsapp to Google to FB
to Amazon to Paypal to Barclays etc they all are high
availability systems, so we can use Erlang in all of them?</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">3) "Every message which is sent to a process, goes to the
mailbox of that process. When process is free, it consumes
that message from mailbox". So how exactly does process ask
from the mailbox for that message? Is there a mechanism in a
process' memory which keeps polling its mailbox. I basically
want to understand how message is sent from mailbox to my
code in process.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">4) We say that a message is passed from process A to
process B by simply using a bang (!) character, but what
happens behind the scenes to pass this message? Do both
processes establish a tcp connection first and then pass
message or what?</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">5) At 30:25 in this video ( <a href="https://youtu.be/YaUPdgtUYko?t=1825" class="gmail_msg" target="_blank">https://youtu.be/YaUPdgtUYko?t=1825</a> )
Mr. Armstrong is talking about the difference between the
context switching overhead between OS threads and Erlang
processes. He says, thread context switching is of order 700
words but Erlang process context switching is ... ?</div>
<div class="gmail_msg">I cant understand what he said, if someone could tell.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">P.S. Please excuse for any grammatical errors, English is
not my first language.</div>
</div>
</div>
<br class="gmail_msg">
<fieldset class="m_-1226388193071310755mimeAttachmentHeader gmail_msg"></fieldset>
<br class="gmail_msg">
<pre class="gmail_msg">_______________________________________________
erlang-questions mailing list
<a class="m_-1226388193071310755moz-txt-link-abbreviated gmail_msg" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a class="m_-1226388193071310755moz-txt-link-freetext gmail_msg" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br class="gmail_msg">
</div>
_______________________________________________<br class="gmail_msg">
erlang-questions mailing list<br class="gmail_msg">
<a href="mailto:erlang-questions@erlang.org" class="gmail_msg" target="_blank">erlang-questions@erlang.org</a><br class="gmail_msg">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" class="gmail_msg" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br class="gmail_msg">
</blockquote></div></div></div></div>