<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta name="x_Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:x_link, span.x_MsoHyperlink
{color:blue;
text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
.x_MsoChpDefault
{}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="blue" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">It was likely me who triggered him. But I only noted that while it’s not reinventing the wheel it’s still a rewrite.
</p>
<p class="x_MsoNormal">And yes, I’m sure most of the Elixir’s “stdlib” could be implemented in Erlang for everyone’s benefit (BEAM communality is too small to afford fragmenting). Compare using Erlang from Elixir and Elixir from Erlang.</p>
<p class="x_MsoNormal">But I fully respect people’s choice of the language. No need to be offended.
</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">>> Only in recent years Erlang started to be used to implement non-telephony related applications</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">For example, Ejabberd started in 2002 and released in 2005.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">>> porting 500 lines of code from Elixir to Erlang shouldn't be that difficult</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">As Tristan noted, it’s a macro-heavy code. And someone has to make sure it’s really correct.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Regards.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="border:none; padding:0in"><b>From: </b><a href="mailto:list1@gjunka.com">Grzegorz Junka</a><br>
<b>Sent: </b>Sunday, January 15, 2017 01:55 AM<br>
<b>To: </b><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<b>Subject: </b>Re: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead</p>
</div>
<p class="x_MsoNormal"> </p>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hello Olivier,<br>
<br>
Initially I didn't get your email, but then I thought that you are <br>
responding like if Loic was complaining about Elixir not implementing <br>
something in Erlang. I understood his email completely differently. To <br>
me all that Loic was saying is that Erlang shouldn't need to rely on <br>
Elixir because it's not always possible to depend an Erlang application <br>
on Elixir. Thinking that we can simply reuse C or Elixir libraries is <br>
naive, which is a general opinion, not necessarily related to your post <br>
(since you weren't the first one to propose to reuse libraries from <br>
other languages). The sentence excerpt is just a context for his opinion.<br>
<br>
Erlang wasn't designed with text processing in mind and still isn't that <br>
its primary objective. Only in recent years Erlang started to be used to <br>
implement non-telephony related applications and there are some areas <br>
which need to catch up, unicode including. Besides, porting 500 lines of <br>
code from Elixir to Erlang shouldn't be that difficult?<br>
<br>
Grzegorz<br>
<br>
<br>
On 14/01/2017 21:46, Oliver Korpilla wrote:<br>
> Hello, Loic.<br>
><br>
> Great cooperation? More like a reaction to the attitude I get from you and Ilya.<br>
><br>
> I actually do believe the Erlang can and has to solve its own problems. As you see, behind Erlang there is a certain set of ideas, principles, and design decisions, and behind elixir is another. To demand of somebody else to solve your problems in your preferred
language... is offensive to me. So I reacted.<br>
><br>
> Some people prefer Erlang, some prefer elixir. Telling people that they should have implemented a solution in Erlang to make it available to "the community" describes precisely a mindset where you say "my community is fine, what silly thing are you doing
over there?" And that is exactly how cooperation breaks down.<br>
><br>
> Calling me naive is similarly offensive. Just because you do not want to do something, don't resort to name-calling. Nobody said that some group _should_ use elixir, but the possibility exists. Nothing more was ever said. To infer from your own projections
I am naive is rich.<br>
><br>
> To make it clear, I do not speak in any capacity for the elixir community. I am just a user trying to understand the work of others, which I admire, in BOTH communities.<br>
><br>
> I'm pretty sure you don't speak for Erlang community either.<br>
><br>
> Oliver<br>
> <br>
> <br>
><br>
> Gesendet: Samstag, 14. Januar 2017 um 22:32 Uhr<br>
> Von: "Loïc Hoguin" <essen@ninenines.eu><br>
> An: "Oliver Korpilla" <Oliver.Korpilla@gmx.de>, "Ilya Khaprov" <ilya.khaprov@publitechs.com><br>
> Cc: "Erlang Questions" <erlang-questions@erlang.org><br>
> Betreff: Re: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead<br>
> On 01/14/2017 09:25 PM, Oliver Korpilla wrote:<br>
>> Erlang community can address all its own problems if it wants. You can do so if you have the means and if you want.<br>
> Sounds like great cooperation.<br>
><br>
>> elixir developers made their own choices and I use elixir every day as my preferred BEAM language, not Erlang. I come here for BEAM and OTP knowledge.<br>
> Completely unrelated to making the Unicode code available for all BEAM<br>
> languages without the obnoxious dependency.<br>
><br>
>> Besides, if you really want, you can write part of your application in elixir, benefit from its feature set, and code the rest in Erlang. BEAM and rebar support that.<br>
>><br>
>> Which means: Everybody in BEAM community can _already_ use.<br>
> No, everybody can't use it.<br>
><br>
> For example, if the httpbis working group were to add Unicode HTTP<br>
> headers[1], I would need to find a way to make it work that does not<br>
> involve Elixir, because I can't force that big a dependency on everyone.<br>
><br>
> Saying "it's there therefore you can use it" is incredibly naive.<br>
><br>
> [1] It's being discussed.<br>
><br>
>> Oliver<br>
>><br>
>><br>
>> Gesendet: Samstag, 14. Januar 2017 um 21:19 Uhr<br>
>> Von: "Ilya Khaprov" <ilya.khaprov@publitechs.com><br>
>> An: "Michał Muskała" <michal@muskala.eu>, "Oliver Korpilla" <Oliver.Korpilla@gmx.de><br>
>> Cc: "Erlang Questions" <erlang-questions@erlang.org><br>
>> Betreff: Re: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead<br>
>><br>
>><br>
>><br>
>>>> Elixir takes the files directly from unicode distribution, and uses macros to compile them down into regular functions.<br>
>> Code generation. Can be done without macros, just generating Erlang files. So everyone in BEAM community can use. That is my point.<br>
>><br>
>> ------------------------------------------------------------<br>
>><br>
>> From: Michał Muskała <michal@muskala.eu><br>
>> Sent: Saturday, January 14, 2017 22:56<br>
>> To: Oliver Korpilla; Ilya Khaprov<br>
>> Cc: Erlang Questions<br>
>> Subject: RE: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead<br>
>><br>
>><br>
>> On 14 Jan 2017, 17:00 +0100, Ilya Khaprov <ilya.khaprov@publitechs.com>, wrote:<br>
>><br>
>><br>
>>>> Given that both Erlang and elixir are implemented on top of BEAM, the wheel might not need reinventing?<br>
>> Why Elixir implements Unicode in Elixir? You have to rewrite it anyway.<br>
>><br>
>><br>
>> Elixir takes the files directly from unicode distribution, and uses macros to compile them down into regular functions. BEAM is wonderful at optimising bitstring pattern matching, so the resulting code is quite efficient and does not need NIFs. The whole
implementation is also about 500 LoC <a href="https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex">
https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex</a>, so it's not a monstrosity and the code is quite readable.<br>
>><br>
>> [<a href="https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex[https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex">https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex[https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex</a>]]<br>
>><br>
>> elixir/unicode.ex at master · elixir-lang/elixir · GitHub[<a href="https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex[https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex">https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex[https://github.com/elixir-lang/elixir/blob/master/lib/elixir/unicode/unicode.ex</a>]]<br>
>> github.com<br>
>> elixir - Elixir is a dynamic, functional language designed for building scalable and maintainable applications<br>
>><br>
>> On 14 Jan 2017, 16:53 +0100, Oliver Korpilla <Oliver.Korpilla@gmx.de>, wrote:Could the Unicode support in elixir serve as a starting point?<br>
>><br>
>> <a href="https://hexdocs.pm/elixir/1.3.3/String.html#content[https://hexdocs.pm/elixir/1.3.3/String.html#content">
https://hexdocs.pm/elixir/1.3.3/String.html#content[https://hexdocs.pm/elixir/1.3.3/String.html#content</a>]<br>
>><br>
>> String.upcase/1 and String.downcase/1 seem to be Unicode-aware. And a lot of effort seems have gone in scenarios like this:<br>
>><br>
>> "For example, the codepoint “é” is two bytes:<br>
>><br>
>> iex> byte_size("é")<br>
>> 2"<br>
>><br>
>> Given that both Erlang and elixir are implemented on top of BEAM, the wheel might not need reinventing? I know engineers and programmers love inventing stuff, and this discussion seems to point in that direction, but...<br>
>><br>
>> All the functions in the Elixir's String module are unicode aware. There are functions for unicode normalisation (both nfd and nfc) and checking equivalency (e.g. "é" can be a single code point, or two code points - the letter "e" and the combining diacritic
acute). String.length/1 works in terms of unicode graphemes (multiple codepoints can compose into a single grapheme):<br>
>><br>
>> iex> String.length("é")<br>
>> 1<br>
>><br>
>> On 14 Jan 2017, 16:30 +0100, Benoit Chesneau <bchesneau@gmail.com>, wrote:<br>
>> someone has to write a good binding (non blocking) of icu :) I think it would be easier than reinventing the wheel. i18n [1] was a good start but looks abandoned these days. Also I disliked the load of resources at startup in ETS:
<a href="https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n][https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n">
https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n][https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n</a>]]<br>
>><br>
>> [<a href="https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n">https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n</a>]]<br>
>><br>
>> GitHub - erlang-unicode/i18n: icu nif: international ...[<a href="https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n">https://github.com/erlang-unicode/i18n[https://github.com/erlang-unicode/i18n</a>]]<br>
>> github.com<br>
>> i18n - icu nif: international components for unicode from Erlang (unicode, date, string, number, format, locale, localization, transliteration, icu4e)<br>
>><br>
>> icu is problematic in the fact that it works mostly with UTF-16.<br>
>><br>
>> Michał<br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> erlang-questions@erlang.org<br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions">
http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions</a>]<br>
>><br>
> --<br>
> Loïc Hoguin<br>
> <a href="https://ninenines.eu[https://ninenines.eu">https://ninenines.eu[https://ninenines.eu</a>]<br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> erlang-questions@erlang.org<br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
erlang-questions@erlang.org<br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div>
</span></font>
</body>
</html>