From devdutt.sheth@REDACTED Thu Mar 1 20:36:47 2018 From: devdutt.sheth@REDACTED (Devdutt Sheth) Date: Thu, 1 Mar 2018 11:36:47 -0800 Subject: [erlang-questions] Yaws http/2 support Message-ID: <27B48971-F63B-4272-97E8-299950B68351@fullpower.com> Any idea if there are plans for adding http/2 support to was, and if so an approximate timeline? Thanks. From erlang@REDACTED Fri Mar 2 12:19:56 2018 From: erlang@REDACTED (Joe Armstrong) Date: Fri, 2 Mar 2018 12:19:56 +0100 Subject: [erlang-questions] On announcements [ANN] Message-ID: Many announcements start appear in my inbox like this: [erlang-questions] [ANN] SuperWonderFullThing 3.5.1 Released!!! Now in many cases (even though I'm a frequent reader of this list) I haven't a clue what this program does. This is a common format: [ANN] Released !!!!
* is a In extreme cases the short description of what the program does is omitted May I respectfully request that all such announcements BEGIN with a description is a .... Where the ... dots tell me in plain non-technical English what is ... should be rather short - a few lines - not a Proustian paragraph. This should be FIRST not LAST and should always be present. Doing this would probably help spread your wonderful contributions - which I'm sure might be great if I knew what they did. Cheers /Joe From hans.r.nilsson@REDACTED Fri Mar 2 12:27:29 2018 From: hans.r.nilsson@REDACTED (Hans Nilsson R) Date: Fri, 2 Mar 2018 12:27:29 +0100 Subject: [erlang-questions] Patch package OTP 19.3.6.6 released Message-ID: <04be067b-2fc2-118b-6e1d-be90e94a63ef@ericsson.com> Patch Package: OTP 19.3.6.6 Git Tag: OTP-19.3.6.6 Date: 2018-03-02 Trouble Report Id: OTP-14881, OTP-14929 Seq num: System: OTP Release: 19 Application: ssh-4.4.2.2, ssl-8.1.3.1.1 Predecessor: OTP 19.3.6.5 Check out the git tag OTP-19.3.6.6, and build a full OTP system including documentation. Apply one or more applications from this build as patches to your installation using the 'otp_patch_apply' tool. For information on install requirements, see descriptions for each application version below. --------------------------------------------------------------------- --- ssh-4.4.2.2 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssh-4.4.2.2 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependencies have to be satisfied: -- crypto-3.7.3 (first satisfied in OTP 19.3) -- public_key-1.4 (first satisfied in OTP 19.3) -- stdlib-3.3 (first satisfied in OTP 19.3) --- Improvements and New Features --- OTP-14881 Application(s): ssh Default exec is disabled when a user-defined shell is enabled. Full runtime dependencies of ssh-4.4.2.2: crypto-3.7.3, erts-6.0, kernel-3.0, public_key-1.4, stdlib-3.3 --------------------------------------------------------------------- --- ssl-8.1.3.1.1 --------------------------------------------------- --------------------------------------------------------------------- Note! The ssl-8.1.3.1.1 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- stdlib-3.2 (first satisfied in OTP 19.2) --- Fixed Bugs and Malfunctions --- OTP-14929 Application(s): ssl Fix alert handling so that unexpected messages are logged and alerted correctly Full runtime dependencies of ssl-8.1.3.1.1: crypto-3.3, erts-7.0, inets-5.10.7, kernel-3.0, public_key-1.2, stdlib-3.2 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4101 bytes Desc: S/MIME Cryptographic Signature URL: From Catenacci@REDACTED Fri Mar 2 13:56:25 2018 From: Catenacci@REDACTED (Onorio Catenacci) Date: Fri, 2 Mar 2018 07:56:25 -0500 Subject: [erlang-questions] erlang-questions Digest, Vol 362, Issue 5 In-Reply-To: References: Message-ID: Any idea if there are plans for adding http/2 support to was, and if so an approximate timeline? Thanks. 1.) I know you didn't ask about it but Cowboy does support http/2. 2.) Seeing there's an open ticket on the YAWS git hub that's been there since 2015 (https://github.com/klacke/yaws/issues/228) I'd guess they won't be supporting http/2 any time soon. Maybe you want to comment on the ticket or, better yet, volunteer to help if you want the feature in YAWS. > -- > Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From vinoski@REDACTED Fri Mar 2 14:57:39 2018 From: vinoski@REDACTED (Steve Vinoski) Date: Fri, 2 Mar 2018 08:57:39 -0500 Subject: [erlang-questions] erlang-questions Digest, Vol 362, Issue 5 In-Reply-To: References: Message-ID: We just haven't seen enough interest yet in http/2 in Yaws to justify the effort to add it. (Not to mention Klacke was on a year-long round-the-world excursion last year, so we were one committer down, but he's returned now, so Yaws dev is back to full strength.) And as Onorio suggested, contributions are welcomed. --steve On Fri, Mar 2, 2018 at 7:56 AM, Onorio Catenacci wrote: > Any idea if there are plans for adding http/2 support to was, and if so an > approximate timeline? Thanks. > > > 1.) I know you didn't ask about it but Cowboy does support http/2. > > 2.) Seeing there's an open ticket on the YAWS git hub that's been there > since 2015 (https://github.com/klacke/yaws/issues/228) I'd guess they > won't be supporting http/2 any time soon. Maybe you want to comment on > the ticket or, better yet, volunteer to help if you want the feature in > YAWS. > > > >> -- >> > Onorio Catenacci > > http://onor.io > http://www.google.com/+OnorioCatenacci > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From akat.metin@REDACTED Sat Mar 3 20:42:41 2018 From: akat.metin@REDACTED (Metin Akat) Date: Sat, 3 Mar 2018 21:42:41 +0200 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? Message-ID: I'm looking into this code: https://github.com/erlang/otp/blob/master/lib/stdlib/src/gen_server.erl#L631 Seems like this try/catch clause is implemented with the idea that most of the time it will succeed, as the callback module will have implemented the corresponding callback function, so we will not have to go into the exception clause where it needs to call erlang:function_exported/2 one more time (presumably as an additional safeguard) which is more expensive than an optimistic try clause. I am writing something very similar, where such a check (is a function exported) will be performed by thousands/millions of processes on every message, but in my case... it's quite probable that most of the time this WILL raise the exception. In my case the function will be purely optional - if defined, it will return a value. If not, a default value will be used. So my question is, how bad is this? I will test, but I'm still interested if someone has any ideas (maybe do something completely different). Other possibilities are: - Actually make the callback compulsory. I don't want to do that, as the problem I'm solving with this project is "See, you don't have to implement this boilerplate every time any more" - Put the option in application env where the user can configure it on startup. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Sun Mar 4 03:48:16 2018 From: mjtruog@REDACTED (Michael Truog) Date: Sat, 3 Mar 2018 18:48:16 -0800 Subject: [erlang-questions] [ANN] CloudI 1.7.3 Released! In-Reply-To: References: Message-ID: <2a9a5ce1-8fa7-7ee8-629c-edc103c1cd44@gmail.com> SourceForge has had an outage lasting more than 78 hours.? So, if you have been unable to get the CloudI 1.7.3 release, the new download link is https://osdn.net/dl/cloudi/cloudi-1.7.3.tar.gz (or https://osdn.net/dl/cloudi/cloudi-1.7.3.tar.bz2). Future CloudI releases will exist at osdn.net On 02/27/2018 02:53 PM, Michael Truog wrote: > Download 1.7.3 from > http://sourceforge.net/projects/cloudi/files/latest/download > > The details for this release are below: > ? * cloudi_crdt was added to provide an easy way to have replicated > ??? state among internal CloudI service processes > ??? (implementing a POLog CRDT with an Erlang map, > ???? see the Erlang count integration test for example use) > ? * All cloudi_core and internal CloudI service time tracking has > ??? switched to monotonic time where it is advantageous > ??? (e.g., CloudI service restart times, cloudi_queue, etc.) > ? * A bug preventing dest_list_deny and dest_list_allow from being > ??? used for cloudi_service_http_cowboy, cloudi_service_http_elli > ??? and cloudi_service_tcp was fixed (cloudi_service_children.hrl bug) > ? * cloudi_queue will now perform a new service name lookup upon a > ??? retry if the pattern_pid() was not provided explicitly > ? * The file_size_limit argument was added to cloudi_service_queue > ??? with the default value of 128MB > ? * Javascript CloudI API had a busy-wait bug causing excessive CPU > ??? consumption which has been fixed > ? * Java 9 support was added > ? * OCaml >= 4.06 support was fixed by including num as a > ??? compile-time dependency > ? * CloudI execution now uses a default umask of 0027 which may be > ??? set with CLOUDI_UMASK (before the configure script is called) > ? * Bugs were fixed and other improvements were added > ??? (see the ChangeLog for more detail) > > CloudI is a "universal integrator" using an Erlang core to provide > fault-tolerance with efficiency and scalability.? The CloudI API > provides a minimal interface to communicate among services so > programming language agnostic and protocol agnostic integration can > occur.? CloudI currently integrates with the programming languages: > C/C++, Elixir, Erlang, Go, Haskell, Java, JavaScript/node.js, > OCaml, PHP, Perl, Python, and Ruby,? Many reusable services are > included that rely on the CloudI service bus. > > Please mention any problems, issues, or ideas! > Thanks, > Michael > > SHA256 CHECKSUMS > cloudi-1.7.3.tar.gz (16018747 bytes) > 0a73f9b691c0a274304f601634b68fcd53b1df59eaffd10ccc2061bfe0f21869 > cloudi-1.7.3.tar.bz2 (13605380 bytes) > a6576e92956a243cf20fe4f602d17fff311df5ee9ae12713ab727405edc2b157 > From vans_163@REDACTED Sun Mar 4 04:20:43 2018 From: vans_163@REDACTED (Vans S) Date: Sun, 4 Mar 2018 03:20:43 +0000 (UTC) Subject: [erlang-questions] more than 2 nifs in an app. total screw up? References: <439288687.9319398.1520133643845.ref@mail.yahoo.com> Message-ID: <439288687.9319398.1520133643845@mail.yahoo.com> When I load more than 2 nifs in an app, I get total undefined defined behavior depending which nif loaded first. Like everything is totally messed up. Example: LD_PRELOAD="/nif1,so /nif2.so" rebar3 shell nif1 works, nif2 is totally messed ,and randomly segfaults or gives errorneous results. LD_PRELOAD="/nif2,so /nif1.so" rebar3 shell Now nif2 works, and nif1 is erroneous. Iv noticed this behavior before I recall, but now its resulted in so much frustration. Things were crashing in C++ boost side like? mystruct v = boost::value_initialized();?? Crash here with "terminate called after throwing an instance of 'std::bad_alloc'".Switch the order of the nifs and it works fine. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkessin@REDACTED Sun Mar 4 07:31:59 2018 From: zkessin@REDACTED (Zachary Kessin) Date: Sun, 4 Mar 2018 08:31:59 +0200 Subject: [erlang-questions] On announcements [ANN] In-Reply-To: References: Message-ID: OMG This! I recall going to a website for some opensource program which proudly stated it was written in python and how you could send a pull request but never even told you what it did. Zach ? Zach Kessin - CEO Finch Software I boost sales with retail chatbots for fashion and cosmetics +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 Book a meeting with me On Fri, Mar 2, 2018 at 1:19 PM, Joe Armstrong wrote: > Many announcements start appear in my inbox like this: > > [erlang-questions] [ANN] SuperWonderFullThing 3.5.1 Released!!! > > Now in many cases (even though I'm a frequent reader of this list) > I haven't a clue what this program does. > > This is a common format: > > [ANN] Released !!!! >
* > is a > > In extreme cases the short description of what the program does is omitted > > May I respectfully request that all such announcements BEGIN with > a description > > is a .... > > Where the ... dots tell me in plain non-technical English what is > ... should be rather short - a few lines - not a Proustian paragraph. > > This should be FIRST not LAST and should always be present. > > > > Doing this would probably help spread your wonderful contributions > - which I'm sure might be great if I knew what they did. > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkessin@REDACTED Sun Mar 4 07:37:03 2018 From: zkessin@REDACTED (Zachary Kessin) Date: Sun, 4 Mar 2018 08:37:03 +0200 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: You can use the function MODULE:module_info/1 something like is_defined(MyFunc, Arity, MODULE)-> Functions = MODULE:module_info(functions), lists:member({MyFunc,Arity}, Functions). Where MyFunc is an atom of course You could also expand that to a call_function_if_defined_with_default/N but i will leave that to you Zach Zach Kessin - CEO Finch Software I boost sales with retail chatbots for fashion and cosmetics +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 Book a meeting with me On Sat, Mar 3, 2018 at 9:42 PM, Metin Akat wrote: > I'm looking into this code: https://github.com/erlang/otp/blob/master/lib/ > stdlib/src/gen_server.erl#L631 > > Seems like this try/catch clause is implemented with the idea that most of > the time it will succeed, as the callback module will have implemented the > corresponding callback function, so we will not have to go into the > exception clause where it needs to call erlang:function_exported/2 one more > time (presumably as an additional safeguard) which is more expensive than > an optimistic try clause. > > I am writing something very similar, where such a check (is a function > exported) will be performed by thousands/millions of processes on every > message, but in my case... it's quite probable that most of the time this > WILL raise the exception. In my case the function will be purely optional - > if defined, it will return a value. If not, a default value will be used. > > So my question is, how bad is this? I will test, but I'm still interested > if someone has any ideas (maybe do something completely different). > > Other possibilities are: > > - Actually make the callback compulsory. I don't want to do that, as the > problem I'm solving with this project is "See, you don't have to implement > this boilerplate every time any more" > > - Put the option in application env where the user can configure it on > startup. > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkessin@REDACTED Sun Mar 4 07:47:22 2018 From: zkessin@REDACTED (Zachary Kessin) Date: Sun, 4 Mar 2018 08:47:22 +0200 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: I realize that there is a race condition in that code, if someone reloads the module at the wrong moment it could crash. Zach Kessin - CEO Finch Software I boost sales with retail chatbots for fashion and cosmetics +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 Book a meeting with me On Sun, Mar 4, 2018 at 8:37 AM, Zachary Kessin wrote: > You can use the function MODULE:module_info/1 something like > is_defined(MyFunc, Arity, MODULE)-> > Functions = MODULE:module_info(functions), > lists:member({MyFunc,Arity}, Functions). > > Where MyFunc is an atom of course > > You could also expand that to a call_function_if_defined_with_default/N > but i will leave that to you > > Zach > > > Zach Kessin - CEO Finch Software > I boost sales with retail chatbots for fashion and cosmetics > +972 54 234 3956 <054-234-3956> / +44 203 734 9790 > <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> > Book a meeting with me > > On Sat, Mar 3, 2018 at 9:42 PM, Metin Akat wrote: > >> I'm looking into this code: https://github.com/erlan >> g/otp/blob/master/lib/stdlib/src/gen_server.erl#L631 >> >> Seems like this try/catch clause is implemented with the idea that most >> of the time it will succeed, as the callback module will have implemented >> the corresponding callback function, so we will not have to go into the >> exception clause where it needs to call erlang:function_exported/2 one more >> time (presumably as an additional safeguard) which is more expensive than >> an optimistic try clause. >> >> I am writing something very similar, where such a check (is a function >> exported) will be performed by thousands/millions of processes on every >> message, but in my case... it's quite probable that most of the time this >> WILL raise the exception. In my case the function will be purely optional - >> if defined, it will return a value. If not, a default value will be used. >> >> So my question is, how bad is this? I will test, but I'm still interested >> if someone has any ideas (maybe do something completely different). >> >> Other possibilities are: >> >> - Actually make the callback compulsory. I don't want to do that, as the >> problem I'm solving with this project is "See, you don't have to implement >> this boilerplate every time any more" >> >> - Put the option in application env where the user can configure it on >> startup. >> >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From akat.metin@REDACTED Sun Mar 4 08:09:06 2018 From: akat.metin@REDACTED (Metin Akat) Date: Sun, 4 Mar 2018 09:09:06 +0200 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: I haven't yet done rigorous testing with many processes, but what you are suggesting is the slowest so far (at least by the most naive way of measuring, while not under load) : 37> timer:tc(fun() -> lists:member({not_a_function, 1}, Module:module_info(exports)) end). {514,false} 38> timer:tc(fun() -> try Module:not_a_function() catch error:undef -> not_defined end end). {47,not_defined} 39> timer:tc(fun() -> erlang:function_exported(Module, not_a_function, 1) end). {8,false} The reason I'm asking is because I saw this gen_server:try_dispatch/3 implementation and I am wondering what are the implications under heavy load and concurrency. On Sun, Mar 4, 2018 at 8:47 AM, Zachary Kessin wrote: > I realize that there is a race condition in that code, if someone reloads > the module at the wrong moment it could crash. > > > > Zach Kessin - CEO Finch Software > I boost sales with retail chatbots for fashion and cosmetics > +972 54 234 3956 <+972%2054-234-3956> / +44 203 734 9790 > <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> > Book a meeting with me > > On Sun, Mar 4, 2018 at 8:37 AM, Zachary Kessin wrote: > >> You can use the function MODULE:module_info/1 something like >> is_defined(MyFunc, Arity, MODULE)-> >> Functions = MODULE:module_info(functions), >> lists:member({MyFunc,Arity}, Functions). >> >> Where MyFunc is an atom of course >> >> You could also expand that to a call_function_if_defined_with_default/N >> but i will leave that to you >> >> Zach >> >> >> Zach Kessin - CEO Finch Software >> I boost sales with retail chatbots for fashion and cosmetics >> +972 54 234 3956 <054-234-3956> / +44 203 734 9790 >> <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> >> Book a meeting with me >> >> On Sat, Mar 3, 2018 at 9:42 PM, Metin Akat wrote: >> >>> I'm looking into this code: https://github.com/erlan >>> g/otp/blob/master/lib/stdlib/src/gen_server.erl#L631 >>> >>> Seems like this try/catch clause is implemented with the idea that most >>> of the time it will succeed, as the callback module will have implemented >>> the corresponding callback function, so we will not have to go into the >>> exception clause where it needs to call erlang:function_exported/2 one more >>> time (presumably as an additional safeguard) which is more expensive than >>> an optimistic try clause. >>> >>> I am writing something very similar, where such a check (is a function >>> exported) will be performed by thousands/millions of processes on every >>> message, but in my case... it's quite probable that most of the time this >>> WILL raise the exception. In my case the function will be purely optional - >>> if defined, it will return a value. If not, a default value will be used. >>> >>> So my question is, how bad is this? I will test, but I'm still >>> interested if someone has any ideas (maybe do something completely >>> different). >>> >>> Other possibilities are: >>> >>> - Actually make the callback compulsory. I don't want to do that, as the >>> problem I'm solving with this project is "See, you don't have to implement >>> this boilerplate every time any more" >>> >>> - Put the option in application env where the user can configure it on >>> startup. >>> >>> >>> >>> _______________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Sun Mar 4 10:30:51 2018 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Sun, 4 Mar 2018 10:30:51 +0100 Subject: [erlang-questions] more than 2 nifs in an app. total screw up? In-Reply-To: <439288687.9319398.1520133643845@mail.yahoo.com> References: <439288687.9319398.1520133643845.ref@mail.yahoo.com> <439288687.9319398.1520133643845@mail.yahoo.com> Message-ID: If that's on OSX you need the -dynamiclib flag, otherwise functions with the same name will get overwritten when the second library is loaded, and this can result in this kind of behavior. On 03/04/2018 04:20 AM, Vans S wrote: > When I load more than 2 nifs in an app, I get total undefined defined > behavior depending which nif loaded first. Like everything is totally > messed up. > > Example: > > LD_PRELOAD="/nif1,so /nif2.so" rebar3 shell > > nif1 works, nif2 is totally messed ,and randomly segfaults or gives > errorneous results. > > LD_PRELOAD="/nif2,so /nif1.so" rebar3 shell > > Now nif2 works, and nif1 is erroneous. > > > Iv noticed this behavior before I recall, but now its resulted in so > much frustration. Things were crashing in C++ boost side like > > mystruct v = boost::value_initialized(); > > Crash here with "terminate called after throwing an instance of > 'std::bad_alloc'". Switch the order of the nifs and it works fine. > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From hans.r.nilsson@REDACTED Mon Mar 5 12:37:02 2018 From: hans.r.nilsson@REDACTED (Hans Nilsson R) Date: Mon, 5 Mar 2018 12:37:02 +0100 Subject: [erlang-questions] Patch package OTP 18.3.4.8 released Message-ID: <28a25d40-1227-9c83-6af7-573c5aa737a4@ericsson.com> Subject: Patch package OTP 18.3.4.8 released Patch Package: OTP 18.3.4.8 Git Tag: OTP-18.3.4.8 Date: 2018-03-05 Trouble Report Id: OTP-14881 Seq num: System: OTP Release: 18 Application: ssh-4.2.2.5 Predecessor: OTP 18.3.4.7 Check out the git tag OTP-18.3.4.8, and build a full OTP system including documentation. Apply one or more applications from this build as patches to your installation using the 'otp_patch_apply' tool. For information on install requirements, see descriptions for each application version below. --------------------------------------------------------------------- --- ssh-4.2.2.5 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssh-4.2.2.5 application can *not* be applied independently of other applications on an arbitrary OTP 18 installation. On a full OTP 18 installation, also the following runtime dependency has to be satisfied: -- crypto-3.6.3.1 (first satisfied in OTP 18.3.4.5) --- Improvements and New Features --- OTP-14881 Application(s): ssh Default exec is disabled when a user-defined shell is enabled. Full runtime dependencies of ssh-4.2.2.5: crypto-3.6.3.1, erts-6.0, kernel-3.0, public_key-0.22, stdlib-2.3 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4101 bytes Desc: S/MIME Cryptographic Signature URL: From vans_163@REDACTED Mon Mar 5 15:24:39 2018 From: vans_163@REDACTED (Vans S) Date: Mon, 5 Mar 2018 14:24:39 +0000 (UTC) Subject: [erlang-questions] more than 2 nifs in an app. total screw up? In-Reply-To: References: <439288687.9319398.1520133643845.ref@mail.yahoo.com> <439288687.9319398.1520133643845@mail.yahoo.com> Message-ID: <1009302173.10006281.1520259879029@mail.yahoo.com> I realize my mistake right after sending out.? Indeed its related to this, on Windows and OSX you can load two different versions of same lib just fine. On Linux, they symbols will be taken from first loaded lib, and second loaded lib will call symbols from the first loaded lib if the signatures are the same! This was the reason I had erroneous behavior and random segfaults. On Sunday, March 4, 2018 4:30 AM, Lo?c Hoguin wrote: If that's on OSX you need the -dynamiclib flag, otherwise functions with the same name will get overwritten when the second library is loaded, and this can result in this kind of behavior. On 03/04/2018 04:20 AM, Vans S wrote: > When I load more than 2 nifs in an app, I get total undefined defined > behavior depending which nif loaded first. Like everything is totally > messed up. > > Example: > > LD_PRELOAD="/nif1,so /nif2.so" rebar3 shell > > nif1 works, nif2 is totally messed ,and randomly segfaults or gives > errorneous results. > > LD_PRELOAD="/nif2,so /nif1.so" rebar3 shell > > Now nif2 works, and nif1 is erroneous. > > > Iv noticed this behavior before I recall, but now its resulted in so > much frustration. Things were crashing in C++ boost side like > > mystruct v = boost::value_initialized(); > > Crash here with "terminate called after throwing an instance of > 'std::bad_alloc'". Switch the order of the nifs and it works fine. > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Tue Mar 6 15:29:03 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Tue, 6 Mar 2018 15:29:03 +0100 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: <20180306142903.GA43145@erix.ericsson.se> On Sun, Mar 04, 2018 at 09:09:06AM +0200, Metin Akat wrote: > I haven't yet done rigorous testing with many processes, but what you are > suggesting is the slowest so far (at least by the most naive way of > measuring, while not under load) : > > 37> timer:tc(fun() -> lists:member({not_a_function, 1}, > Module:module_info(exports)) end). > {514,false} > 38> timer:tc(fun() -> try Module:not_a_function() catch error:undef -> > not_defined end end). > {47,not_defined} > 39> timer:tc(fun() -> erlang:function_exported(Module, not_a_function, 1) > end). > {8,false} That should be the fastest way I know of. But still, if you call the function right after that, you still have a race since the module may be reloaded/unloaded in between. gen_* ignores this since it assumes that you should reload callback code as part of an application upgrade and therefore a module should not be reloaded/unloaded at any other time than when the server is blocked in sys: If you can make similar assumptions the fastest way should be erlang:function_exported/3 since that just looks up the function as it would have done for making a call. If you still would have to wrap the call in a try...catch you might as well use it to detect the undefined function. Also, please measure: try...catch is actually fairly fast. / Raimo > > > The reason I'm asking is because I saw this gen_server:try_dispatch/3 > implementation and I am wondering what are the implications under heavy > load and concurrency. > > > > > > On Sun, Mar 4, 2018 at 8:47 AM, Zachary Kessin wrote: > > > I realize that there is a race condition in that code, if someone reloads > > the module at the wrong moment it could crash. > > > > > > > > Zach Kessin - CEO Finch Software > > I boost sales with retail chatbots for fashion and cosmetics > > +972 54 234 3956 <+972%2054-234-3956> / +44 203 734 9790 > > <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> > > Book a meeting with me > > > > On Sun, Mar 4, 2018 at 8:37 AM, Zachary Kessin wrote: > > > >> You can use the function MODULE:module_info/1 something like > >> is_defined(MyFunc, Arity, MODULE)-> > >> Functions = MODULE:module_info(functions), > >> lists:member({MyFunc,Arity}, Functions). > >> > >> Where MyFunc is an atom of course > >> > >> You could also expand that to a call_function_if_defined_with_default/N > >> but i will leave that to you > >> > >> Zach > >> > >> > >> Zach Kessin - CEO Finch Software > >> I boost sales with retail chatbots for fashion and cosmetics > >> +972 54 234 3956 <054-234-3956> / +44 203 734 9790 > >> <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> > >> Book a meeting with me > >> > >> On Sat, Mar 3, 2018 at 9:42 PM, Metin Akat wrote: > >> > >>> I'm looking into this code: https://github.com/erlan > >>> g/otp/blob/master/lib/stdlib/src/gen_server.erl#L631 > >>> > >>> Seems like this try/catch clause is implemented with the idea that most > >>> of the time it will succeed, as the callback module will have implemented > >>> the corresponding callback function, so we will not have to go into the > >>> exception clause where it needs to call erlang:function_exported/2 one more > >>> time (presumably as an additional safeguard) which is more expensive than > >>> an optimistic try clause. > >>> > >>> I am writing something very similar, where such a check (is a function > >>> exported) will be performed by thousands/millions of processes on every > >>> message, but in my case... it's quite probable that most of the time this > >>> WILL raise the exception. In my case the function will be purely optional - > >>> if defined, it will return a value. If not, a default value will be used. > >>> > >>> So my question is, how bad is this? I will test, but I'm still > >>> interested if someone has any ideas (maybe do something completely > >>> different). > >>> > >>> Other possibilities are: > >>> > >>> - Actually make the callback compulsory. I don't want to do that, as the > >>> problem I'm solving with this project is "See, you don't have to implement > >>> this boilerplate every time any more" > >>> > >>> - Put the option in application env where the user can configure it on > >>> startup. > >>> > >>> > >>> > >>> _______________________________________________ > >>> erlang-questions mailing list > >>> erlang-questions@REDACTED > >>> http://erlang.org/mailman/listinfo/erlang-questions > >>> > >>> > >> > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From jesper.louis.andersen@REDACTED Tue Mar 6 16:05:10 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 06 Mar 2018 15:05:10 +0000 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: On Sun, Mar 4, 2018 at 8:09 AM Metin Akat wrote: > I haven't yet done rigorous testing with many processes, but what you are > suggesting is the slowest so far (at least by the most naive way of > measuring, while not under load) : > > 37> timer:tc(fun() -> lists:member({not_a_function, 1}, > Module:module_info(exports)) end). > {514,false} > 38> timer:tc(fun() -> try Module:not_a_function() catch error:undef -> > not_defined end end). > {47,not_defined} > 39> timer:tc(fun() -> erlang:function_exported(Module, not_a_function, 1) > end). > {8,false} > > Having looked a bit at this, the function in (38) is interpreted, not compiled. We can try this with eministat: -module(function_exported). -export([t/0, datasets/0]). -define(ROUNDS, 10000). v1() -> v1(?ROUNDS). v1(0) -> ok; v1(N) -> lists:member({not_a_function, 1}, ?MODULE:module_info(exports)), v1(N-1). v2() -> v2(?ROUNDS). v2(0) -> ok; v2(N) -> try ?MODULE:not_a_function() catch error:undef -> not_defined end, v2(N-1). v3() -> v3(?ROUNDS). v3(0) -> ok; v3(N) -> _ = erlang:function_exported(?MODULE, not_a_function, 1), v3(N-1). datasets() -> [eministat:s("Variant 1", fun v1/0, 50), eministat:s("Variant 2", fun v2/0, 50), eministat:s("Variant 3", fun v3/0, 50)]. t() -> [H|T] = datasets(), eministat:x(95.0, H, T). Running this yields: 2> function_exported:t(). x Variant 1 + Variant 2 * Variant 3 +--------------------------------------------------------------------------+ |* ++++++++ x xxxxxxxxxxxxxx x| |* ++++++ x xxxxxxxx x | |* ++++ x x xxxx x x | |* ++++ xxxx x x | |* +++ xxx x | |* +++ xx x | |* +++ x x | |* +++ x | |* +++ | |* ++ | |* ++ | |* ++ | |* ++ | |* + | |* + | |* + | |* + | |* + | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | |* | | |___MA___| | | |MA| | |A | +--------------------------------------------------------------------------+ Dataset: x N=50 CI=95.0000 Statistic Value [ Bias] (Bootstrapped LB?UB) Min: 1.46008e+5 1st Qu. 1.67652e+5 Median: 1.73901e+5 3rd Qu. 1.83833e+5 Max: 2.43860e+5 Average: 1.75521e+5 [ 18.3119] ( 1.71931e+5 ? 1.80582e+5) Std. Dev: 1.54033e+4 [ -419.011] ( 1.12376e+4 ? 2.45340e+4) Outliers: 0/1 = 1 (?=1.75539e+5, ?=1.49843e+4) Outlier variance: 0.604402 (severe, the data set is probably unusable) ------ Dataset: + N=50 CI=95.0000 Statistic Value [ Bias] (Bootstrapped LB?UB) Min: 3.74350e+4 1st Qu. 4.25210e+4 Median: 4.50860e+4 3rd Qu. 4.73290e+4 Max: 5.90190e+4 Average: 4.55904e+4 [ -12.9348] ( 4.44757e+4 ? 4.70025e+4) Std. Dev: 4608.27 [ -81.7125] ( 3694.90 ? 5833.19) Outliers: 0/3 = 3 (?=4.55775e+4, ?=4526.56) Outlier variance: 0.665857 (severe, the data set is probably unusable) Difference at 95.0% confidence -1.29931e+5 ? 4511.12 -74.0257% ? 2.57013% (Student's t, pooled s = 1.13687e+4) ------ Dataset: * N=50 CI=95.0000 Statistic Value [ Bias] (Bootstrapped LB?UB) Min: 361.000 1st Qu. 365.000 Median: 367.000 3rd Qu. 369.000 Max: 848.000 Average: 386.060 [ 1.53180e-2] ( 372.960 ? 423.160) Std. Dev: 74.0183 [ -7.40628] ( 26.8655 ? 157.196) Outliers: 0/6 = 6 (?=386.075, ?=66.6120) Outlier variance: 0.873417 (severe, the data set is probably unusable) Difference at 95.0% confidence -1.75135e+5 ? 4321.90 -99.7800% ? 2.46232% (Student's t, pooled s = 1.08919e+4) ------ ok So variant 2 is roughly 74% faster than variant 1. And variant 3 is roughly 99.8% faster than variant 2. I'll recommend variant 3. But you also have to measure more than a quick synthetic benchmark. Chances are that your other parts of the code is going to dominate to the point where wondering about this corner is futile. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Tue Mar 6 16:35:44 2018 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Tue, 6 Mar 2018 16:35:44 +0100 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: You also need to consider whether or not you want loading to be automatically triggered by this check, or if you indend to ensure in some other way that the modules you are checking are known to be loaded already. Using "try Module:Function() catch ... end", if the function is not found it will cause a trap to the error handler module which will first try to load the module if it is not currently in memory. If you use only erlang:function_exported/3, it will return "false" if the module is not yet loaded. If you assume that modules are usually loaded when you run the test, but you'd like to load them automatically if needed, you can write a function like this: is_exported(M, F, A) -> case erlang:module_loaded(M) of false -> code:ensure_loaded(M); true -> ok end, erlang:function_exported(M, F, A). (code:ensure_loaded() is slow compared to the fast call to erlang:module_loaded(), even if the module is already in memory). If it should be an error if the module cannot be loaded, you can add a check that ensure_loaded(M) returns {module, M} and not {error,_}. If you want to prevent repeated attempts to load a module that failed to load the first time (since such attempted loads are slow), you could add some kind of memoization, or even generate a dummy module containing no functions, that you load instead so that subsequent calls return quickly. /Richard 2018-03-04 8:09 GMT+01:00 Metin Akat : > I haven't yet done rigorous testing with many processes, but what you are > suggesting is the slowest so far (at least by the most naive way of > measuring, while not under load) : > > 37> timer:tc(fun() -> lists:member({not_a_function, 1}, > Module:module_info(exports)) end). > {514,false} > 38> timer:tc(fun() -> try Module:not_a_function() catch error:undef -> > not_defined end end). > {47,not_defined} > 39> timer:tc(fun() -> erlang:function_exported(Module, not_a_function, 1) > end). > {8,false} > > > The reason I'm asking is because I saw this gen_server:try_dispatch/3 > implementation and I am wondering what are the implications under heavy > load and concurrency. > > > > > > On Sun, Mar 4, 2018 at 8:47 AM, Zachary Kessin wrote: > >> I realize that there is a race condition in that code, if someone reloads >> the module at the wrong moment it could crash. >> >> >> >> Zach Kessin - CEO Finch Software >> I boost sales with retail chatbots for fashion and cosmetics >> +972 54 234 3956 <+972%2054-234-3956> / +44 203 734 9790 >> <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> >> Book a meeting with me >> >> On Sun, Mar 4, 2018 at 8:37 AM, Zachary Kessin wrote: >> >>> You can use the function MODULE:module_info/1 something like >>> is_defined(MyFunc, Arity, MODULE)-> >>> Functions = MODULE:module_info(functions), >>> lists:member({MyFunc,Arity}, Functions). >>> >>> Where MyFunc is an atom of course >>> >>> You could also expand that to a call_function_if_defined_with_default/N >>> but i will leave that to you >>> >>> Zach >>> >>> >>> Zach Kessin - CEO Finch Software >>> I boost sales with retail chatbots for fashion and cosmetics >>> +972 54 234 3956 <054-234-3956> / +44 203 734 9790 >>> <+44%2020%203734%209790> / +1 617 778 7213 <+1%20617-778-7213> >>> Book a meeting with me >>> >>> On Sat, Mar 3, 2018 at 9:42 PM, Metin Akat wrote: >>> >>>> I'm looking into this code: https://github.com/erlan >>>> g/otp/blob/master/lib/stdlib/src/gen_server.erl#L631 >>>> >>>> Seems like this try/catch clause is implemented with the idea that most >>>> of the time it will succeed, as the callback module will have implemented >>>> the corresponding callback function, so we will not have to go into the >>>> exception clause where it needs to call erlang:function_exported/2 one more >>>> time (presumably as an additional safeguard) which is more expensive than >>>> an optimistic try clause. >>>> >>>> I am writing something very similar, where such a check (is a function >>>> exported) will be performed by thousands/millions of processes on every >>>> message, but in my case... it's quite probable that most of the time this >>>> WILL raise the exception. In my case the function will be purely optional - >>>> if defined, it will return a value. If not, a default value will be used. >>>> >>>> So my question is, how bad is this? I will test, but I'm still >>>> interested if someone has any ideas (maybe do something completely >>>> different). >>>> >>>> Other possibilities are: >>>> >>>> - Actually make the callback compulsory. I don't want to do that, as >>>> the problem I'm solving with this project is "See, you don't have to >>>> implement this boilerplate every time any more" >>>> >>>> - Put the option in application env where the user can configure it on >>>> startup. >>>> >>>> >>>> >>>> _______________________________________________ >>>> erlang-questions mailing list >>>> erlang-questions@REDACTED >>>> http://erlang.org/mailman/listinfo/erlang-questions >>>> >>>> >>> >> > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal@REDACTED Tue Mar 6 16:40:42 2018 From: michal@REDACTED (=?utf-8?Q?Micha=C5=82_Muska=C5=82a?=) Date: Tue, 6 Mar 2018 16:40:42 +0100 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: Message-ID: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> On 6 Mar 2018, 16:36 +0100, Richard Carlsson , wrote: > > is_exported(M, F, A) -> > ? case erlang:module_loaded(M) of > ? ? false -> code:ensure_loaded(M); > ? ? true -> ok > ? end, > ? erlang:function_exported(M, F, A). > > (code:ensure_loaded() is slow compared to the fast call to erlang:module_loaded(), even if the module is already in memory). > I was recently wondering about this. Is there a reason code:ensure_loaded() does not short circuit using erlang:module_loaded()? It could probably even skip the request to the code server entirely in case the module is already loaded. Micha?. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Tue Mar 6 21:23:30 2018 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Tue, 6 Mar 2018 21:23:30 +0100 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> Message-ID: I was actually considering submitting such a patch a while back, but one argument against making that short-cut could be that operations against the code server should be serialized. On the other hand I haven't yet come up with an example where the short-cut would make a difference that couldn't already happen due to processor scheduling. /Richard 2018-03-06 16:40 GMT+01:00 Micha? Muska?a : > On 6 Mar 2018, 16:36 +0100, Richard Carlsson , > wrote: > > > is_exported(M, F, A) -> > case erlang:module_loaded(M) of > false -> code:ensure_loaded(M); > true -> ok > end, > erlang:function_exported(M, F, A). > > (code:ensure_loaded() is slow compared to the fast call to > erlang:module_loaded(), even if the module is already in memory). > > > > I was recently wondering about this. Is there a reason > code:ensure_loaded() does not short circuit using erlang:module_loaded()? > It could probably even skip the request to the code server entirely in case > the module is already loaded. > > Micha?. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t@REDACTED Tue Mar 6 21:35:45 2018 From: t@REDACTED (Tristan Sloughter) Date: Tue, 06 Mar 2018 12:35:45 -0800 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> Message-ID: <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> Ooh, that looks similar, but better, to what we did in Erleans: erlang:function_exported(Module, module_info, 0) orelse code:ensure_loaded(Module), case erlang:function_exported(Module, FunctionName, Arity) of true -> erlang:apply(Module, FunctionName, Args); false -> Default end. I guess we should likely switch to `erlang:module_loaded(M)` instead of checking if `module_info` is exported. Thanks! Would be nice to have it patched though :) -- Tristan Sloughter "I am not a crackpot" - Abe Simpson t@REDACTED On Tue, Mar 6, 2018, at 12:23 PM, Richard Carlsson wrote: > I was actually considering submitting such a patch a while back, but > one argument against making that short-cut could be that operations > against the code server should be serialized. On the other hand I > haven't yet come up with an example where the short-cut would make a > difference that couldn't already happen due to processor scheduling.> > > /Richard > > 2018-03-06 16:40 GMT+01:00 Micha? Muska?a : >> >> On 6 Mar 2018, 16:36 +0100, Richard Carlsson >> , wrote:>> >> >>> >>> is_exported(M, F, A) -> >>> case erlang:module_loaded(M) of >>> false -> code:ensure_loaded(M); >>> true -> ok >>> end, >>> erlang:function_exported(M, F, A). >>> >>> (code:ensure_loaded() is slow compared to the fast call to >>> erlang:module_loaded(), even if the module is already in memory).>>> >> >> I was recently wondering about this. Is there a reason >> code:ensure_loaded() does not short circuit using >> erlang:module_loaded()? It could probably even skip the request to >> the code server entirely in case the module is already loaded.>> >> >> Micha?. >> >> > _________________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From akat.metin@REDACTED Wed Mar 7 07:54:01 2018 From: akat.metin@REDACTED (Metin Akat) Date: Wed, 7 Mar 2018 08:54:01 +0200 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> Message-ID: Thanks all. I went with the solution Richard proposed. And after testing of the full implementation, this check is certainly not the bottleneck of the system, as Jesper suggested. On Tue, Mar 6, 2018 at 10:35 PM, Tristan Sloughter wrote: > Ooh, that looks similar, but better, to what we did in Erleans: > > erlang:function_exported(Module, module_info, 0) orelse > code:ensure_loaded(Module), > case erlang:function_exported(Module, FunctionName, Arity) of > true -> > erlang:apply(Module, FunctionName, Args); > false -> > Default > end. > > I guess we should likely switch to `erlang:module_loaded(M)` instead of > checking if `module_info` is exported. Thanks! > > Would be nice to have it patched though :) > > -- > Tristan Sloughter > "I am not a crackpot" - Abe Simpson > t@REDACTED > > > On Tue, Mar 6, 2018, at 12:23 PM, Richard Carlsson wrote: > > I was actually considering submitting such a patch a while back, but one > argument against making that short-cut could be that operations against the > code server should be serialized. On the other hand I haven't yet come up > with an example where the short-cut would make a difference that couldn't > already happen due to processor scheduling. > > > /Richard > > 2018-03-06 16:40 GMT+01:00 Micha? Muska?a : > > > On 6 Mar 2018, 16:36 +0100, Richard Carlsson , > wrote: > > > > is_exported(M, F, A) -> > case erlang:module_loaded(M) of > false -> code:ensure_loaded(M); > true -> ok > end, > erlang:function_exported(M, F, A). > > (code:ensure_loaded() is slow compared to the fast call to > erlang:module_loaded(), even if the module is already in memory). > > > > I was recently wondering about this. Is there a reason > code:ensure_loaded() does not short circuit using erlang:module_loaded()? > It could probably even skip the request to the code server entirely in case > the module is already loaded. > > > Micha?. > > > *_______________________________________________* > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Wed Mar 7 08:24:48 2018 From: mjtruog@REDACTED (Michael Truog) Date: Tue, 6 Mar 2018 23:24:48 -0800 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> Message-ID: <0c925201-e0a6-d789-26a0-8d9fd9a52af9@gmail.com> On 03/06/2018 10:54 PM, Metin Akat wrote: > Thanks all. I went with the solution Richard proposed. And after testing of the full implementation, this check is certainly not the bottleneck of the system, as Jesper suggested. The only problem with that, is that the documentation specifies that erlang:module_loaded/1 is only really meant to be used by the code server (at http://erlang.org/doc/man/erlang.html#module_loaded-1). If that bothers you, you should use the function code:is_loaded/1 instead. > > > On Tue, Mar 6, 2018, at 12:23 PM, Richard Carlsson wrote: >> I was actually considering submitting such a patch a while back, but one argument against making that short-cut could be that operations against the code server should be serialized. On the other hand I haven't yet come up with an example where the short-cut would make a difference that couldn't already happen due to processor scheduling. >> >> >> ? ? ? ? /Richard >> >> 2018-03-06 16:40 GMT+01:00 Micha? Muska?a >: >> >> >> On 6 Mar 2018, 16:36 +0100, Richard Carlsson >, wrote: >> >> >>> >>> is_exported(M, F, A) -> >>> ? case erlang:module_loaded(M) of >>> ? ? false -> code:ensure_loaded(M); >>> ? ? true -> ok >>> ? end, >>> erlang:function_exported(M, F, A). >>> >>> (code:ensure_loaded() is slow compared to the fast call to erlang:module_loaded(), even if the module is already in memory). >>> >> >> I was recently wondering about this. Is there a reason code:ensure_loaded() does not short circuit using erlang:module_loaded()? It could probably even skip the request to the code server entirely in case the module is already loaded. >> >> >> Micha?. >> >> >> _________________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Wed Mar 7 09:43:54 2018 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 7 Mar 2018 09:43:54 +0100 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: <0c925201-e0a6-d789-26a0-8d9fd9a52af9@gmail.com> References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> <0c925201-e0a6-d789-26a0-8d9fd9a52af9@gmail.com> Message-ID: Using code:is_loaded/1 has the same roundtrip overhead as code:ensure_loaded(), so in that case you can just use the latter directly without any extra check. But as I see it, the warning should just be seen as a pointer for average users to primarily use the code module, and not as a warning about this function possibly going away or being bad for you, as long as you know what you are using it for. /Richard 2018-03-07 8:24 GMT+01:00 Michael Truog : > On 03/06/2018 10:54 PM, Metin Akat wrote: > > Thanks all. I went with the solution Richard proposed. And after testing > of the full implementation, this check is certainly not the bottleneck of > the system, as Jesper suggested. > > > The only problem with that, is that the documentation specifies that > erlang:module_loaded/1 is only really meant to be used by the code server > (at http://erlang.org/doc/man/erlang.html#module_loaded-1). If that > bothers you, you should use the function code:is_loaded/1 instead. > > > > >> >> On Tue, Mar 6, 2018, at 12:23 PM, Richard Carlsson wrote: >> >> I was actually considering submitting such a patch a while back, but one >> argument against making that short-cut could be that operations against the >> code server should be serialized. On the other hand I haven't yet come up >> with an example where the short-cut would make a difference that couldn't >> already happen due to processor scheduling. >> >> >> /Richard >> >> 2018-03-06 16:40 GMT+01:00 Micha? Muska?a : >> >> >> On 6 Mar 2018, 16:36 +0100, Richard Carlsson , >> wrote: >> >> >> >> is_exported(M, F, A) -> >> case erlang:module_loaded(M) of >> false -> code:ensure_loaded(M); >> true -> ok >> end, >> erlang:function_exported(M, F, A). >> >> (code:ensure_loaded() is slow compared to the fast call to >> erlang:module_loaded(), even if the module is already in memory). >> >> >> >> I was recently wondering about this. Is there a reason >> code:ensure_loaded() does not short circuit using erlang:module_loaded()? >> It could probably even skip the request to the code server entirely in case >> the module is already loaded. >> >> >> Micha?. >> >> >> *_______________________________________________* >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > > > _______________________________________________ > erlang-questions mailing listerlang-questions@REDACTED://erlang.org/mailman/listinfo/erlang-questions > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Wed Mar 7 10:17:05 2018 From: mjtruog@REDACTED (Michael Truog) Date: Wed, 7 Mar 2018 01:17:05 -0800 Subject: [erlang-questions] What is the fastest way to check if a function is defined in a module? In-Reply-To: References: <36287be2-26b5-4c1e-a14b-8b433b11136f@Spark> <1520368545.793078.1293862856.53A04B28@webmail.messagingengine.com> <0c925201-e0a6-d789-26a0-8d9fd9a52af9@gmail.com> Message-ID: <74243427-066b-96c5-f38b-3190cb5f6eeb@gmail.com> On 03/07/2018 12:43 AM, Richard Carlsson wrote: > Using code:is_loaded/1 has the same roundtrip overhead as code:ensure_loaded(), so in that case you can just use the latter directly without any extra check. > > But as I see it, the warning should just be seen as a pointer for average users to primarily use the code module, and not as a warning about this function possibly going away or being bad for you, as long as you know what you are using it for. If that really is the case with erlang:module_loaded/1, then it would be best to updated the documentation so the warning is less severe.? That would make it clear that the function isn't a maintenance hazard in the future, because it may disappear or change in the future.? The warning currently says "This BIF is intended for the code server (see code(3)) and is not to be used elsewhere." which is similar to erlang:purge_module/1, erlang:delete_module/1, and erlang:load_module/2.? So the same change to the documentation should occur with these functions too. > > > ? ? ? ? /Richard > > 2018-03-07 8:24 GMT+01:00 Michael Truog >: > > On 03/06/2018 10:54 PM, Metin Akat wrote: >> Thanks all. I went with the solution Richard proposed. And after testing of the full implementation, this check is certainly not the bottleneck of the system, as Jesper suggested. > > The only problem with that, is that the documentation specifies that erlang:module_loaded/1 is only really meant to be used by the code server (at http://erlang.org/doc/man/erlang.html#module_loaded-1 ). If that bothers you, you should use the function code:is_loaded/1 instead. > > > >> >> >> On Tue, Mar 6, 2018, at 12:23 PM, Richard Carlsson wrote: >>> I was actually considering submitting such a patch a while back, but one argument against making that short-cut could be that operations against the code server should be serialized. On the other hand I haven't yet come up with an example where the short-cut would make a difference that couldn't already happen due to processor scheduling. >>> >>> >>> ? ? ? ? /Richard >>> >>> 2018-03-06 16:40 GMT+01:00 Micha? Muska?a >: >>> >>> >>> On 6 Mar 2018, 16:36 +0100, Richard Carlsson >, wrote: >>> >>> >>>> >>>> is_exported(M, F, A) -> >>>> ? case erlang:module_loaded(M) of >>>> ? ? false -> code:ensure_loaded(M); >>>> ? ? true -> ok >>>> ? end, >>>> erlang:function_exported(M, F, A). >>>> >>>> (code:ensure_loaded() is slow compared to the fast call to erlang:module_loaded(), even if the module is already in memory). >>>> >>> >>> I was recently wondering about this. Is there a reason code:ensure_loaded() does not short circuit using erlang:module_loaded()? It could probably even skip the request to the code server entirely in case the module is already loaded. >>> >>> >>> Micha?. >>> >>> >>> _________________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfventer@REDACTED Wed Mar 7 13:48:27 2018 From: hfventer@REDACTED (Heinrich Venter) Date: Wed, 7 Mar 2018 14:48:27 +0200 Subject: [erlang-questions] gen_server not unregistering [20.1] Message-ID: Hi all I have been experiencing the strangest thing. I am using an application (gen_rpc) that internally uses a gen_server to manage a gen_tcp outgoing socket. On closing of the socket form the server side, the message {tcp_closed, Socket} is received in the handle_info. This handle_info returns {stop, normal, State} BUT The gen_server does not actually terminate. It does not call terminate and the PID remains registered locally. It actually keeps on processing messages which leads to badtcp reponses when it tires to send on the failed socket. Has any one seen something remotely like this, or have any suggestions of how to proceed? Links https://github.com/priestjim/gen_rpc -------------- next part -------------- An HTML attachment was scrubbed... URL: From elbrujohalcon@REDACTED Wed Mar 7 13:52:43 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Wed, 7 Mar 2018 09:52:43 -0300 Subject: [erlang-questions] gen_server not unregistering [20.1] In-Reply-To: References: Message-ID: Not sure if this will help at all, but try trapping exits in that gen_server (i.e. process_flag(trap_exit, true).) since terminate might not be evaluated unless you?re trapping exits. Ref: http://erlang.org/doc/man/gen_server.html#Module:terminate-2 Good luck! Brujo Benavides > On 7 Mar 2018, at 09:48, Heinrich Venter wrote: > > Hi all > > I have been experiencing the strangest thing. > > I am using an application (gen_rpc) that internally uses a gen_server to manage a gen_tcp outgoing socket. > > On closing of the socket form the server side, the message {tcp_closed, Socket} is received in the handle_info. This handle_info returns {stop, normal, State} > BUT > The gen_server does not actually terminate. It does not call terminate and the PID remains registered locally. It actually keeps on processing messages which leads to badtcp reponses when it tires to send on the failed socket. > > Has any one seen something remotely like this, or have any suggestions of how to proceed? > > Links > https://github.com/priestjim/gen_rpc > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From Catenacci@REDACTED Wed Mar 7 14:01:28 2018 From: Catenacci@REDACTED (Onorio Catenacci) Date: Wed, 7 Mar 2018 08:01:28 -0500 Subject: [erlang-questions] The Fastest Way To Check . . . Message-ID: To add on a little to what Jesper was implying: http://erlang.org/doc/efficiency_guide/profiling.html Don't guess about where the bottlenecks in your code are--use a profiler. :) -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfventer@REDACTED Wed Mar 7 14:04:15 2018 From: hfventer@REDACTED (Heinrich Venter) Date: Wed, 7 Mar 2018 15:04:15 +0200 Subject: [erlang-questions] gen_server not unregistering [20.1] In-Reply-To: References: Message-ID: Thaks for the suggestion. The gen_server already trap exits. The instance I am using runs on R20.1. The instance it is communicating with runs on R19. That instance does not show the same behavior even though it uses the same code base for gen_rpc. I am worried that it is some strangeness in R20 that I am not aware of. On Wed, Mar 7, 2018 at 2:52 PM, Brujo Benavides wrote: > Not sure if this will help at all, but try trapping exits in that > gen_server (i.e. process_flag(trap_exit, true).) since terminate might not > be evaluated unless you?re trapping exits. Ref: http://erlang.org/doc/ > man/gen_server.html#Module:terminate-2 > > Good luck! > > ------------------------------ > *Brujo Benavides * > > > > On 7 Mar 2018, at 09:48, Heinrich Venter wrote: > > Hi all > > I have been experiencing the strangest thing. > > I am using an application (gen_rpc) that internally uses a gen_server to > manage a gen_tcp outgoing socket. > > On closing of the socket form the server side, the message {tcp_closed, > Socket} is received in the handle_info. This handle_info returns {stop, > normal, State} > BUT > The gen_server does not actually terminate. It does not call terminate and > the PID remains registered locally. It actually keeps on processing > messages which leads to badtcp reponses when it tires to send on the failed > socket. > > Has any one seen something remotely like this, or have any suggestions of > how to proceed? > > Links > https://github.com/priestjim/gen_rpc > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.platt@REDACTED Thu Mar 8 20:43:28 2018 From: pablo.platt@REDACTED (pablo platt) Date: Thu, 8 Mar 2018 21:43:28 +0200 Subject: [erlang-questions] How to test multi-pollset? In-Reply-To: References: Message-ID: Hello, Updating with my test. I've been using master in production for two days on 4 servers. Each server has 4 vCPUs. Each server handles about 10K UDP packets per second. Approx 1K incoming packets per second and 9K outgoing packets per second. I didn't see any issues. Seems to work fine. CPU load in OTP Master 21 increased compared to OTP 20 from 58% to 68%. Does this make sense? This is a real production system that does other things in addition to just sending UDP packets but the OTP version is the only change. Thanks On Fri, Feb 23, 2018 at 5:29 PM, pablo platt wrote: > > > On Fri, Feb 23, 2018 at 5:10 PM, Lukas Larsson wrote: > >> Hello, >> >> On Fri, Feb 23, 2018 at 3:15 PM, pablo platt >> wrote: >> >>> Master with multi poll-sets is running on my dev machine without errors >>> so far. >>> >> >> great! >> >> >>> >>> What's the difference between polling threads and poll-sets (+IOt and >>> +IOp)? >>> >> >> Its explained in this presentation: http://www.erlan >> g-factory.com/euc2017/kenneth-lundin >> >> Polling threads can be added when its load (as measured by msacc) >> increases. In my stress tests I've seen a small decrease in latency on >> large machines when adding a second thread. >> The number of poll-sets can be increased to deal with scalability issues >> in the underlying libc/kernel implementation. Modern operating systems >> rarely have any problems with this, so I'm not sure how useful changing >> this value actually is. >> >> >>> How do I know if I should increase the number of polling threads or >>> poll-sets? >>> >> >> The best way is probably through experimentation. Measure your >> applications latency/throughput and then play with the settings and see if >> it changes. >> >> >>> I'm using a 8 or 16 vCPUs machine (vCPU = hyper-threads) running Ubuntu >>> 16.04. >>> >>> I've measured with msacc as the docs [1] recommends on 1 vCPU machine. >>> Each gen_udp receiving 100 UDP packets per second increase the 'poll' >>> row load by about 0.05%. >>> Adding several gen_udp that send 100 UDP packets per second almost >>> doesn't affect the load. >>> Is it expected that gen_udp receiving packets has high load but gen_udp >>> sending packets very low load? >>> >> >> yes, especially if you use active mode when receiving. Sending UDP >> shouldn't really go via the poll implementation at all as if the kernel >> buffer is full it will just discard the packet. >> > > I'm using gen_udp with {active, once} and {recbuf, 16384}. > So if I have 5 gen_udp receiving packets and 500 gen_udp sending packets, > I'll probably won't see a big performance difference from multi poll-sets. > > >> >> >>> >>> How can I compare master with multiple poll-sets with erlang/otp 20? >>> >> >> Run your application and measure using external tools the difference in >> throughput/latency. >> > > I will. Thanks. > > >> >> Lukas >> >> >>> msacc on otp 20 doesn't have stats about poll. >>> >>> msacc docs [2] don't show example output of poll load. Maybe not that >>> important. >>> >>> [1] https://github.com/erlang/otp/blob/master/erts/doc/src/erl.xml >>> [2] https://github.com/erlang/otp/blob/master/lib/runtime_tools/ >>> doc/src/msacc.xml >>> >>> >>> On Mon, Jan 29, 2018 at 11:19 AM, pablo platt >>> wrote: >>> >>>> It's great to see all the hard work invested in performance in master. >>>> Thanks. >>>> >>>> On Mon, Jan 29, 2018 at 10:49 AM, Lukas Larsson >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> On Mon, Jan 29, 2018 at 9:22 AM, pablo platt >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> What is the expected effect of the multi-pollset PR [1] on a UDP >>>>>> socket on the sender/receiver side? >>>>>> My use case is a media server with several broadcaster and many >>>>>> viewers. >>>>>> Each stream use 1Mbps (aprox 100 * 1500 bytes packets per second). >>>>>> Should I expect improvement when gen_udp is sending packets, >>>>>> receiving packets or both? >>>>>> >>>>> >>>>> Yes, I believe that you will see an improvement. It depends on what >>>>> type of HW that you are running on, typically the more logical cpu's you >>>>> have the more gain you will get from the improvements in I/O polling[1]. >>>>> Also the exact usage pattern matters. >>>>> >>>>> >>>>>> Is it reasonable to pick a point in master and use it on a production >>>>>> system after testing? >>>>>> >>>>> >>>>> I would take the latest tip of master and test that thoroughly for you >>>>> application. The things that we merge into master have gone through all our >>>>> testing before it is merged, so it is as stable as the maint branch. >>>>> However we make a lot more changes in master than in maint, so because of >>>>> that there will be a greater chance of some bug slipping through. >>>>> >>>>> If you do decide to give the improved I/O polling implementation a go, >>>>> please do come back with any negative or positive findings that you get! >>>>> >>>>> Lukas >>>>> >>>>> [1]: The largest change in the PR is not actually the ability to use >>>>> multiple pollsets, but that the polling has been lifted out to be done by >>>>> dedicated threads. >>>>> >>>> >>>> >>> >>> _______________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity@REDACTED Thu Mar 8 21:08:55 2018 From: icfp.publicity@REDACTED (Lindsey Kuper) Date: Thu, 08 Mar 2018 12:08:55 -0800 Subject: [erlang-questions] Final Call for Papers: PACMPL issue ICFP 2018 Message-ID: <5aa19857494_a4e93fdb36057bec21528@landin.local.mail> PACMPL Volume 2, Issue ICFP 2018 Call for Papers accepted papers to be invited for presentation at The 23rd ACM SIGPLAN International Conference on Functional Programming St. Louis, Missouri, USA http://icfp18.sigplan.org/ ### Important dates Submissions due: 16 March 2018 (Friday) Anywhere on Earth https://icfp18.hotcrp.com Author response: 2 May (Wednesday) - 4 May (Friday) 14:00 UTC Notification: 18 May (Friday) Final copy due: 22 June (Friday) Conference: 24 September (Monday) - 26 September (Wednesday) ### About PACMPL Proceedings of the ACM on Programming Languages (PACMPL ) is a Gold Open Access journal publishing research on all aspects of programming languages, from design to implementation and from mathematical formalisms to empirical studies. Each issue of the journal is devoted to a particular subject area within programming languages and will be announced through publicized Calls for Papers, like this one. ### Scope [PACMPL](https://pacmpl.acm.org/) issue ICFP 2018 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * *Language Design*: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; type systems; interoperability; domain-specific languages; and relations to imperative, object-oriented, or logic programming. * *Implementation*: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * *Software-Development Techniques*: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling. * *Foundations*: formal semantics; lambda calculus; rewriting; type theory; monads; continuations; control; state; effects; program verification; dependent types. * *Analysis and Transformation*: control-flow; data-flow; abstract interpretation; partial evaluation; program calculation. * *Applications*: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed-systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; multimedia and 3D graphics programming; scripting; system administration; security. * *Education*: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. PACMPL issue ICFP 2018 also welcomes submissions in two separate categories — Functional Pearls and Experience Reports — that must be marked as such at the time of submission and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the principal editor if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions **Deadline**: The deadline for submissions is Friday, March 16, 2018, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from . There is a limit of 27 pages for a full paper or 14 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. See also PACMPL's Information and Guidelines for Authors at . **Submission**: Submissions will be accepted at Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 14:00 UTC on Wednesday, May 2, 2018, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the principal editor will communicate to this reviewer the annotated copy of his/her previous review. Otherwise, no reviewer will read the annotated copies of the previous reviews. ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for PACMPL issue ICFP 2018. We anticipate that there will be a need to clarify and expand on this process, and we will maintain a list of frequently asked questions and answers on the conference website to address common concerns. **PACMPL issue ICFP 2018 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the review meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on May 18, 2018. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 22, 2018), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. **PACMPL issue ICFP 2018 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Small format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: open access on payment of a fee (**recommended**, and SIGPLAN can cover the cost as described next); copyright transfer to ACM; or retaining copyright but granting ACM exclusive publication rights. Further information about ACM author rights is available from . * PACMPL is a Gold Open Access journal. It will be archived in ACM?s Digital Library, but no membership or fee is required for access. Gold Open Access has been made possible by generous funding through ACM SIGPLAN, which will cover all open access costs in the event authors cannot. Authors who can cover the costs may do so by paying an Article Processing Charge (APC). PACMPL, SIGPLAN, and ACM Headquarters are committed to exploring routes to making Gold Open Access publication both affordable and sustainable. * ACM offers authors a range of copyright options, one of which is Creative Commons CC-BY publication; this is the option recommended by the PACMPL editorial board. A reasoned argument in favour of this option can be found in the article [Why CC-BY?](https://oaspa.org/why-cc-by/) published by OASPA, the Open Access Scholarly Publishers Association. * We intend that the papers will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * At least one author of each accepted submissions will be expected to attend and present their paper at the conference. The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. * The official publication date is the date the papers are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by an Artifact Evaluation Committee, separate from the paper Review Committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the papers, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, PACMPL issue ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works — or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal PACMPL issue ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the papers and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The review committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results — the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The principal editor will be happy to advise on any concerns about which category to submit to. ### ICFP Organizers General Chair: Robby Findler (Northwestern University, USA) Artifact Evaluation Co-Chairs: Simon Marlow (Facebook, UK) Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Matthew Fluet (Rochester Institute of Technology, USA) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Co-Chairs: Jose Calderon (Galois, Inc., USA) Nicolas Wu (University of Bristol, UK) Workshops Co-Chair: David Christiansen (Indiana University, USA) Christophe Scholliers (Universiteit Gent, Belgium) ### PACMPL Volume 2, Issue ICFP 2018 Principal Editor: Matthew Flatt (Univesity of Utah, USA) Review Committee: Sandrine Blazy (IRISA, University of Rennes 1, France) David Christiansen (Indiana University, USA) Martin Elsman (University of Copenhagen, Denmark) Marco Gaboardi (University at Buffalo, CUNY, USA) Sam Lindley (University of Edinburgh, UK) Heather Miller (Northweastern University, USA / EPFL, Switzerland) J. Garrett Morris (University of Kansas, USA) Henrik Nilsson (University of Nottingham, UK) Fran?ois Pottier (Inria, France) Alejandro Russo (Chalmers University of Technology, Sweden) Ilya Sergey (University College London, UK) Michael Sperber (Active Group GmbH, Germany) Wouter Swierstra (Utrecht University, UK) ?ric Tanter (University of Chile, Chile) Katsuhiro Ueno (Tohoku University, Japan) Niki Vazou (University of Maryland, USA) Jeremy Yallop (University of Cambridge, UK) External Review Committee: Michael D. Adams (University of Utah, USA) Amal Ahmed (Northeastern University, USA) Nada Amin (University of Cambridge, USA) Zena Ariola (University of Oregon) Lars Bergstrom (Mozilla Research) Lars Birkedal (Aarhus University, Denmark) Edwin Brady ( University of St. Andrews, UK) William Byrd (University of Alabama at Birmingham, USA) Giuseppe Castagna (CRNS / University of Paris Diderot, France) Sheng Chen (University of Louisiana at Lafayette, USA) Koen Claessen (Chalmers University ot Technology, Sweden) Ugo Dal Lago (University of Bologna, Italy / Inria, France) David Darais (University of Vermont, USA) Joshua Dunfield (Queen?s University, Canada) Richard Eisenberg (Bryn Mawr College, USA) Matthew Fluet (Rochester Institute of Technology, USA) Nate Foster (Cornell University, USA) Jurriaan Hage (Utrecht University, Netherlands) David Van Horn (University of Maryland, USA) Zhenjiang Hu (National Institute of Informatics, Japan) Suresh Jagannathan (Purdue University, USA) Simon Peyton Jones (Microsoft Research, UK) Naoki Kobayashi (University of Tokyo, Japan) Neelakantan Krishnaswami (University of Cambridge, UK) Kazutaka Matsuda (Tohoku University, Japan) Trevor McDonell (University of New South Wales, Australia) Hernan Melgratti (University of Buenos Aires, Argentina) Akimasa Morihata (University of Tokyo, Japan) Aleksandar Nanevski (IMDEA Software Institute, Spain) Kim Nguy?n (University of Paris-Sud, France) Cosmin Oancea (DIKU, University of Copenhagen, Denmark) Bruno C. d. S. Oliveira (University of Hong Kong, China) Tomas Petricek (University of Cambridge, UK) Benjamin Pierce (University of Pennsylvania, USA) Christine Rizkallah (University of Pennsylvania, USA) Tom Schrijvers (KU Leuven, Belgium) Manuel Serrano (Inria, France) Jeremy Siek (Indiana University, USA) Josef Svenningsson (Chalmers University of Technology, Sweden) Nicolas Tabareau (Inria, France) Dimitrios Vytiniotis (Microsoft Research, UK) Philip Wadler (University of Edinburgh, UK) Meng Wang (University of Kent, UK) From lukas@REDACTED Fri Mar 9 11:38:17 2018 From: lukas@REDACTED (Lukas Larsson) Date: Fri, 9 Mar 2018 11:38:17 +0100 Subject: [erlang-questions] How to test multi-pollset? In-Reply-To: References: Message-ID: Hello! On Thu, Mar 8, 2018 at 8:43 PM, pablo platt wrote: > Hello, > > Updating with my test. > > I've been using master in production for two days on 4 servers. > Each server has 4 vCPUs. > Each server handles about 10K UDP packets per second. Approx 1K incoming > packets per second and 9K outgoing packets per second. > > I didn't see any issues. Seems to work fine. > That's great! Thanks for testing it! CPU load in OTP Master 21 increased compared to OTP 20 from 58% to 68%. > Does this make sense? > hmm, no not really. I would have expected it to decrease. Would you mind helping me to figure out why the CPU usage has gone up? To start with I'd like to have a look at the output of 1> msacc:start(30000), msacc:print(). for both versions in the Erlang shell. Using this I hope to be able to narrow down where the extra CPU time is being spent. Also it would great if you could run a few perf commands to compare the systems. Ideally it would be be best if you could recompile beam with the --build-id linker flag. i.e. > ./configure LDLAGS="-Wl,--build-id" That way it is possible to use "perf archive"[1] to collect the symbols of beam.smp. > sudo perf stat -d -p $BEAMPID -- sleep 30 2> stat.log > sudo perf record -g -p $BEAMPID -- sleep 30 > sudo perf archive > sudo tar czf $BEAMPID.tar.gz stat.log perf.data.tar.bz2 perf.data and send me the tar.gz for OTP-20 and master. If you cannot re-compile erts with --build-id, then just do "sudo perf report" and send me a screenshot of the tools shows you. If you prefer to this off-list, we can do that as well. Lukas [1]: If the "perf archive" command does not work (which it doesn't on my machine), just download the script from here: https://elixir.bootlin.com/linux/v3.18/source/tools/perf/perf-archive.sh -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.platt@REDACTED Fri Mar 9 11:58:49 2018 From: pablo.platt@REDACTED (pablo platt) Date: Fri, 9 Mar 2018 12:58:49 +0200 Subject: [erlang-questions] How to test multi-pollset? In-Reply-To: References: Message-ID: On Fri, Mar 9, 2018 at 12:38 PM, Lukas Larsson wrote: > Hello! > > On Thu, Mar 8, 2018 at 8:43 PM, pablo platt wrote: > >> Hello, >> >> Updating with my test. >> >> I've been using master in production for two days on 4 servers. >> Each server has 4 vCPUs. >> Each server handles about 10K UDP packets per second. Approx 1K incoming >> packets per second and 9K outgoing packets per second. >> >> I didn't see any issues. Seems to work fine. >> > > That's great! Thanks for testing it! > > CPU load in OTP Master 21 increased compared to OTP 20 from 58% to 68%. >> Does this make sense? >> > > hmm, no not really. I would have expected it to decrease. > > Would you mind helping me to figure out why the CPU usage has gone up? > > To start with I'd like to have a look at the output of > > 1> msacc:start(30000), msacc:print(). > > for both versions in the Erlang shell. Using this I hope to be able to > narrow down where the extra CPU time is being spent. > > Also it would great if you could run a few perf commands to compare the > systems. > > Ideally it would be be best if you could recompile beam with the > --build-id linker flag. i.e. > > > ./configure LDLAGS="-Wl,--build-id" > I'll try to compile with kerl: export LDLAGS="-Wl,--build-id" && kerl build git https://github.com/erlang/otp 9bc4a096025254aed157e4753743be61ce1f7489 master How can I verify that the flag was actually used? > > That way it is possible to use "perf archive"[1] to collect the symbols of > beam.smp. > > > sudo perf stat -d -p $BEAMPID -- sleep 30 2> stat.log > > sudo perf record -g -p $BEAMPID -- sleep 30 > > sudo perf archive > > sudo tar czf $BEAMPID.tar.gz stat.log perf.data.tar.bz2 perf.data > > Can I do it on a dev machine with a smaller load or does it have to be on a real production server? What's the effect of perf (and msacc) on a production system? When I tried to do erlang profiling in the past it crashed my server. > and send me the tar.gz for OTP-20 and master. > > If you cannot re-compile erts with --build-id, then just do "sudo perf > report" and send me a screenshot of the tools shows you. > > If you prefer to this off-list, we can do that as well. > > Lukas > > [1]: If the "perf archive" command does not work (which it doesn't on my > machine), just download the script from here: https://elixir.bootlin. > com/linux/v3.18/source/tools/perf/perf-archive.sh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas@REDACTED Fri Mar 9 13:34:28 2018 From: lukas@REDACTED (Lukas Larsson) Date: Fri, 9 Mar 2018 13:34:28 +0100 Subject: [erlang-questions] How to test multi-pollset? In-Reply-To: References: Message-ID: On Fri, Mar 9, 2018 at 11:58 AM, pablo platt wrote: > > > On Fri, Mar 9, 2018 at 12:38 PM, Lukas Larsson wrote: > >> Hello! >> >> On Thu, Mar 8, 2018 at 8:43 PM, pablo platt >> wrote: >> >>> Hello, >>> >>> Updating with my test. >>> >>> I've been using master in production for two days on 4 servers. >>> Each server has 4 vCPUs. >>> Each server handles about 10K UDP packets per second. Approx 1K incoming >>> packets per second and 9K outgoing packets per second. >>> >>> I didn't see any issues. Seems to work fine. >>> >> >> That's great! Thanks for testing it! >> >> CPU load in OTP Master 21 increased compared to OTP 20 from 58% to 68%. >>> Does this make sense? >>> >> >> hmm, no not really. I would have expected it to decrease. >> >> Would you mind helping me to figure out why the CPU usage has gone up? >> >> To start with I'd like to have a look at the output of >> >> 1> msacc:start(30000), msacc:print(). >> >> for both versions in the Erlang shell. Using this I hope to be able to >> narrow down where the extra CPU time is being spent. >> >> Also it would great if you could run a few perf commands to compare the >> systems. >> >> Ideally it would be be best if you could recompile beam with the >> --build-id linker flag. i.e. >> >> > ./configure LDLAGS="-Wl,--build-id" >> > > I'll try to compile with kerl: > export LDLAGS="-Wl,--build-id" && kerl build git > https://github.com/erlang/otp 9bc4a096025254aed157e4753743be61ce1f7489 > master > > How can I verify that the flag was actually used? > If you do "file path/to/beam.smp" you should get something like: > file bin/x86_64-unknown-linux-gnu/beam.smp bin/x86_64-unknown-linux-gnu/beam.smp: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=1a8ff129828d9ed4a8197d47e7731b10015b2456, not stripped notice the BuildID[sha1] thing. > >> >> That way it is possible to use "perf archive"[1] to collect the symbols >> of beam.smp. >> >> > sudo perf stat -d -p $BEAMPID -- sleep 30 2> stat.log >> > sudo perf record -g -p $BEAMPID -- sleep 30 >> > sudo perf archive >> > sudo tar czf $BEAMPID.tar.gz stat.log perf.data.tar.bz2 perf.data >> >> > Can I do it on a dev machine with a smaller load or does it have to be on > a real production server? > If you can observe the same difference in a small system then that is fine. > What's the effect of perf (and msacc) on a production system? When I tried > to do erlang profiling in the past it crashed my server. > It should be very minimal. I double that you will notice it. If you are unsure, you can change the frequency that perf collects data by adding the "-F NUMBER" flag to "perf report" with a lower than default frequency. The default is 4000. > > >> and send me the tar.gz for OTP-20 and master. >> >> If you cannot re-compile erts with --build-id, then just do "sudo perf >> report" and send me a screenshot of the tools shows you. >> >> If you prefer to this off-list, we can do that as well. >> >> Lukas >> >> [1]: If the "perf archive" command does not work (which it doesn't on my >> machine), just download the script from here: https://elixir.bootlin.c >> om/linux/v3.18/source/tools/perf/perf-archive.sh >> > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablo.platt@REDACTED Fri Mar 9 13:50:56 2018 From: pablo.platt@REDACTED (pablo platt) Date: Fri, 9 Mar 2018 14:50:56 +0200 Subject: [erlang-questions] How to test multi-pollset? In-Reply-To: References: Message-ID: On Fri, Mar 9, 2018 at 2:34 PM, Lukas Larsson wrote: > > > On Fri, Mar 9, 2018 at 11:58 AM, pablo platt > wrote: > >> >> >> On Fri, Mar 9, 2018 at 12:38 PM, Lukas Larsson wrote: >> >>> Hello! >>> >>> On Thu, Mar 8, 2018 at 8:43 PM, pablo platt >>> wrote: >>> >>>> Hello, >>>> >>>> Updating with my test. >>>> >>>> I've been using master in production for two days on 4 servers. >>>> Each server has 4 vCPUs. >>>> Each server handles about 10K UDP packets per second. Approx 1K >>>> incoming packets per second and 9K outgoing packets per second. >>>> >>>> I didn't see any issues. Seems to work fine. >>>> >>> >>> That's great! Thanks for testing it! >>> >>> CPU load in OTP Master 21 increased compared to OTP 20 from 58% to 68%. >>>> Does this make sense? >>>> >>> >>> hmm, no not really. I would have expected it to decrease. >>> >>> Would you mind helping me to figure out why the CPU usage has gone up? >>> >>> To start with I'd like to have a look at the output of >>> >>> 1> msacc:start(30000), msacc:print(). >>> >>> for both versions in the Erlang shell. Using this I hope to be able to >>> narrow down where the extra CPU time is being spent. >>> >>> Also it would great if you could run a few perf commands to compare the >>> systems. >>> >>> Ideally it would be be best if you could recompile beam with the >>> --build-id linker flag. i.e. >>> >>> > ./configure LDLAGS="-Wl,--build-id" >>> >> >> I'll try to compile with kerl: >> export LDLAGS="-Wl,--build-id" && kerl build git >> https://github.com/erlang/otp 9bc4a096025254aed157e4753743be61ce1f7489 >> master >> >> How can I verify that the flag was actually used? >> > > If you do "file path/to/beam.smp" you should get something like: > > > file bin/x86_64-unknown-linux-gnu/beam.smp > bin/x86_64-unknown-linux-gnu/beam.smp: ELF 64-bit LSB executable, > x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for > GNU/Linux 2.6.24, BuildID[sha1]=1a8ff129828d9ed4a8197d47e7731b10015b2456, > not stripped > > notice the BuildID[sha1] thing. > > >> >>> >>> That way it is possible to use "perf archive"[1] to collect the symbols >>> of beam.smp. >>> >>> > sudo perf stat -d -p $BEAMPID -- sleep 30 2> stat.log >>> > sudo perf record -g -p $BEAMPID -- sleep 30 >>> > sudo perf archive >>> > sudo tar czf $BEAMPID.tar.gz stat.log perf.data.tar.bz2 perf.data >>> >>> >> Can I do it on a dev machine with a smaller load or does it have to be on >> a real production server? >> > > If you can observe the same difference in a small system then that is fine. > > >> What's the effect of perf (and msacc) on a production system? When I >> tried to do erlang profiling in the past it crashed my server. >> > > It should be very minimal. I double that you will notice it. If you are > unsure, you can change the frequency that perf collects data by adding the > "-F NUMBER" flag to "perf report" with a lower than default frequency. The > default is 4000. > > I'll try to reproduce on a dev machine and get the msacc and perf reports. Thanks > >> >>> and send me the tar.gz for OTP-20 and master. >>> >>> If you cannot re-compile erts with --build-id, then just do "sudo perf >>> report" and send me a screenshot of the tools shows you. >>> >>> If you prefer to this off-list, we can do that as well. >>> >>> Lukas >>> >>> [1]: If the "perf archive" command does not work (which it doesn't on my >>> machine), just download the script from here: https://elixir.bootlin.c >>> om/linux/v3.18/source/tools/perf/perf-archive.sh >>> >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vans_163@REDACTED Sat Mar 10 05:57:17 2018 From: vans_163@REDACTED (Vans S) Date: Sat, 10 Mar 2018 04:57:17 +0000 (UTC) Subject: [erlang-questions] SSLv2 oldest version of erlang to support it? References: <5868794.152697.1520657837807.ref@mail.yahoo.com> Message-ID: <5868794.152697.1520657837807@mail.yahoo.com> Does anyone know which version of Erlang still supports SSLv2, we need to interop with some very legacy software inside a very secure network. To my surprise SSLv2 is totally dropped from R20.2, its not even behind any special flags? Which version of OTP would support SSLv2? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vans_163@REDACTED Sat Mar 10 05:57:58 2018 From: vans_163@REDACTED (Vans S) Date: Sat, 10 Mar 2018 04:57:58 +0000 (UTC) Subject: [erlang-questions] more than 2 nifs in an app. total screw up? In-Reply-To: <6F17E761-D7AD-46F0-BC1C-99FC01BD8DF1@pharos-corp.com> References: <439288687.9319398.1520133643845.ref@mail.yahoo.com> <439288687.9319398.1520133643845@mail.yahoo.com> <1009302173.10006281.1520259879029@mail.yahoo.com> <6F17E761-D7AD-46F0-BC1C-99FC01BD8DF1@pharos-corp.com> Message-ID: <956881604.181443.1520657878876@mail.yahoo.com> Just windows and OSX I would assume. On linux I had to take a different multiprocess approach. On Tuesday, March 6, 2018 12:46 AM, Valentin Micic wrote: So? is the same fix, as suggested by Mr Hoguin for OSX, relevant to all three environments then? V/ On 05 Mar 2018, at 4:24 PM, Vans S wrote: I realize my mistake right after sending out.? Indeed its related to this, on Windows and OSX you can load two different versions of same lib just fine. On Linux, they symbols will be taken from first loaded lib, and second loaded lib will call symbols from the first loaded lib if the signatures are the same! This was the reason I had erroneous behavior and random segfaults. On Sunday, March 4, 2018 4:30 AM, Lo?c Hoguin wrote: If that's on OSX you need the -dynamiclib flag, otherwise functions with the same name will get overwritten when the second library is loaded, and this can result in this kind of behavior. On 03/04/2018 04:20 AM, Vans S wrote: > When I load more than 2 nifs in an app, I get total undefined defined > behavior depending which nif loaded first. Like everything is totally > messed up. > > Example: > > LD_PRELOAD="/nif1,so /nif2.so" rebar3 shell > > nif1 works, nif2 is totally messed ,and randomly segfaults or gives > errorneous results. > > LD_PRELOAD="/nif2,so /nif1.so" rebar3 shell > > Now nif2 works, and nif1 is erroneous. > > > Iv noticed this behavior before I recall, but now its resulted in so > much frustration. Things were crashing in C++ boost side like > > mystruct v = boost::value_initialized(); > > Crash here with "terminate called after throwing an instance of > 'std::bad_alloc'". Switch the order of the nifs and it works fine. > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang.org@REDACTED Sat Mar 10 12:21:11 2018 From: erlang.org@REDACTED (Stanislaw Klekot) Date: Sat, 10 Mar 2018 12:21:11 +0100 Subject: [erlang-questions] SSLv2 oldest version of erlang to support it? In-Reply-To: <5868794.152697.1520657837807@mail.yahoo.com> References: <5868794.152697.1520657837807.ref@mail.yahoo.com> <5868794.152697.1520657837807@mail.yahoo.com> Message-ID: <20180310112111.GA465@jarowit.net> On Sat, Mar 10, 2018 at 04:57:17AM +0000, Vans S wrote: > Does anyone know which version of Erlang still supports SSLv2, we need to interop with some very legacy software inside a very secure network. > > To my surprise SSLv2 is totally dropped from R20.2, its not even behind any special flags? > > Which version of OTP would support SSLv2? R15 already has it unsupported, according to the manual. After erldocs.com, you'd need to go as far as R13. Why won't you wrap the connection with stunnel? You wouldn't need to maintain a compilation of a really old Erlang version. -- Stanislaw Klekot From fxn@REDACTED Sat Mar 10 19:56:31 2018 From: fxn@REDACTED (Xavier Noria) Date: Sat, 10 Mar 2018 19:56:31 +0100 Subject: [erlang-questions] use cases for maxT? Message-ID: The key `maxT` in application resource files configures a maximum time the application is allowed to run (defaults to `infinity`). Have you ever used it? Which use cases does it have? -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.nisi@REDACTED Sat Mar 10 20:24:06 2018 From: michael.nisi@REDACTED (Michael Nisi) Date: Sat, 10 Mar 2018 20:24:06 +0100 Subject: [erlang-questions] use cases for maxT? In-Reply-To: References: Message-ID: <12C33B2A-8875-4375-8A91-C53AA1C04A30@gmail.com> Just today, I was considering it to limit the time a load tester is allowed to run, hitting another system with HTTP requests. > On 10. Mar 2018, at 19:56, Xavier Noria wrote: > > The key `maxT` in application resource files configures a maximum time the application is allowed to run (defaults to `infinity`). > > Have you ever used it? Which use cases does it have? > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From ingela.andin@REDACTED Sun Mar 11 09:23:09 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Sun, 11 Mar 2018 09:23:09 +0100 Subject: [erlang-questions] SSLv2 oldest version of erlang to support it? In-Reply-To: <20180310112111.GA465@jarowit.net> References: <5868794.152697.1520657837807.ref@mail.yahoo.com> <5868794.152697.1520657837807@mail.yahoo.com> <20180310112111.GA465@jarowit.net> Message-ID: Hi! 2018-03-10 12:21 GMT+01:00 Stanislaw Klekot : > On Sat, Mar 10, 2018 at 04:57:17AM +0000, Vans S wrote: > > Does anyone know which version of Erlang still supports SSLv2, we need > to interop with some very legacy software inside a very secure network. > > > > To my surprise SSLv2 is totally dropped from R20.2, its not even behind > any special flags? > > ? SSLv2 has never been supported by the Erlang implementation of SSL/TLS. In R13 when OpenSSL was used v2 could of course be supported if OpenSSL supported it. There is still a special flag to interop with clients that offer SSLv2 but can use higher versions. *{v2_hello_compatible, boolean()}*If true, the server accepts clients that send hello messages on SSL-2.0 format but offers supported SSL/TLS versions. Defaults to false, that is the server will not interoperate with clients that offers SSL-2.0. However even SSLv3 is an outdated protocol considered insecure, and SSLv2 was obsoleted many years ago. We are considering dropping this last interop switch with SSLv2 enabled clients in OTP 21. There acctualy has been cases when valid hello messages of SSL/TLS are confused with SSLv2 hello messages. Regards Ingela Erlang/OTP Team - Ericsson AB > > Which version of OTP would support SSLv2? > > R15 already has it unsupported, according to the manual. After > erldocs.com, you'd need to go as far as R13. > > Why won't you wrap the connection with stunnel? You wouldn't need to > maintain a compilation of a really old Erlang version. > > -- > Stanislaw Klekot > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Sun Mar 11 10:51:02 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Sun, 11 Mar 2018 09:51:02 +0000 Subject: [erlang-questions] use cases for maxT? In-Reply-To: References: Message-ID: On Sat, Mar 10, 2018 at 7:57 PM Xavier Noria wrote: > The key `maxT` in application resource files configures a maximum time > the application is allowed to run (defaults to `infinity`). > > Have you ever used it? Which use cases does it have? > > Never used it. I think a good use is for a temporary application, in which you know that it will run and then terminate after a while by its own. This allows you to put in a dead-man's switch in addition so if it doesn't, then the application controller will eventually terminate it. Things I'd consider: * Investigative applications. * Applications which should have an upper limit but where the world around the application might change so the limit eventually gets broken. * As an extra protection measure on one-off applications Usually, these parameters have some history inside Ericsson (we needed this for a project), but I don't know if it is in use in general. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.nisi@REDACTED Mon Mar 12 06:36:46 2018 From: michael.nisi@REDACTED (Michael Nisi) Date: Mon, 12 Mar 2018 06:36:46 +0100 Subject: [erlang-questions] use cases for maxT? In-Reply-To: <12C33B2A-8875-4375-8A91-C53AA1C04A30@gmail.com> References: <12C33B2A-8875-4375-8A91-C53AA1C04A30@gmail.com> Message-ID: <65B5C810-87E7-4E7B-8C1A-15A1AD4EAF6E@gmail.com> Here?s the little tool I was talking about. https://github.com/michaelnisi/mob Doesn?t really do much, just managing Gun connections and consuming HTTP streams on them, but I find it handy. But what? Why? ;) > On Mar 10, 2018, at 8:24 PM, Michael Nisi wrote: > > Just today, I was considering it to limit the time a load tester is allowed to run, hitting another system with HTTP requests. From gattushivakrishna@REDACTED Mon Mar 12 08:53:28 2018 From: gattushivakrishna@REDACTED (shiva) Date: Mon, 12 Mar 2018 13:23:28 +0530 Subject: [erlang-questions] Issue on receiving clear events while using filters in elarm Message-ID: <6591ac61-9c97-8c0d-b8d8-b7ff1ce74282@utl.in> Hi all, Here i am using elarm application (https://github.com/esl/elarm.git )? is an Alarm Manager for Erlang. when i am using this application for raise or clear alarms.? here i am Unable to receive clear event while using filters {type, Type} or {src, Src}, elarm is acknowledging raise info to the subscribed process. but it is not acknowledging for clear info to subscribed process. when i use filter as "all", both raise and clear acknowledgement is given by elarm. I have attached source code below. Can anyone suggest me how to receive both alarm and clear events by using filter "type" or "src"? -------------- next part -------------- A non-text attachment was scrubbed... Name: subscribed_process.erl Type: text/x-erlang Size: 401 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: monitor_process.erl Type: text/x-erlang Size: 1131 bytes Desc: not available URL: From max.lapshin@REDACTED Mon Mar 12 15:34:53 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Mon, 12 Mar 2018 17:34:53 +0300 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL Message-ID: Hi. We have released our sqlapi library: https://github.com/flussonic/sqlapi This library can help you to make an SQL server from your existing server. For example you have a server and let it be ejabberd. You want to give a list of connected users. Of course you will start from making HTTP endpoint that will reply with JSON with list of users. Then you will add some sort, filter, paging as query params and then will write library that allows to make all this params and send them. Another option is to put our sqlapi library, connect it to storage of connected users and then connect to server as if it is a SQL server. Here another real example: https://flussonic.com/doc/api/sql-cluster User can connect to our flussonic server and access whole cluster by sending commands like INSERT, UPDATE, DELETE or READ. This approach may be convenient if you have table data and mainly CRUD operations. Similar approach is used in Sphinx search engine: http://sphinxsearch.com/docs/latest/sphinxql.html We have created all this to connect from python sqlalchemy and Ruby on Rails to Flussonic. If you want the same, this library may help. the only dependency is ranch and it is optional, not required for tests. Some code is derived from https://github.com/altenwald/myproto but we had to remove neotoma sql parser, because we need speed! Thanks for https://github.com/master/mongosql/blob/master/src/sql92_parser.yrl -------------- next part -------------- An HTML attachment was scrubbed... URL: From freeakk@REDACTED Mon Mar 12 20:24:42 2018 From: freeakk@REDACTED (Michael Uvarov) Date: Mon, 12 Mar 2018 20:24:42 +0100 Subject: [erlang-questions] Bigints are converted to floats when using ODBC with MSSQL Message-ID: Hi, I am using MSSQL with unixodbc on Ubuntu (unixodbc + tdsodbc packets). My odbc.ini is: [mongoose-mssql] Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so Server = 127.0.0.1 Port = 1433 Database = ejabberd Charset = UTF-8 TDS Version = 8.0 So, the query odbc:sql_query(Conn, "select cast(1 as bigint)"). returns floats: {selected,[[]],[{1.0}]} instead of: {selected,[[]],[{1}]} Is there any way to change this behaviour? -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.lapshin@REDACTED Mon Mar 12 20:35:24 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Mon, 12 Mar 2018 22:35:24 +0300 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: Message-ID: I don't think that it may be required to drop mysql support. Let it stay. I just want to say that adding _any_ new ORM is always a pain, because it has yet another way to check if there is a proper mysql on socket. -------------- next part -------------- An HTML attachment was scrubbed... URL: From freeakk@REDACTED Mon Mar 12 23:23:02 2018 From: freeakk@REDACTED (Michael Uvarov) Date: Mon, 12 Mar 2018 23:23:02 +0100 Subject: [erlang-questions] Bigints are converted to floats when using ODBC with MSSQL In-Reply-To: References: Message-ID: Should be: TDS_Version = 7.1 in that config. in that case it returns {selected,[[]],[{"1"}]} On 12 March 2018 at 20:24, Michael Uvarov wrote: > Hi, > > I am using MSSQL with unixodbc on Ubuntu (unixodbc + tdsodbc packets). > > My odbc.ini is: > > > [mongoose-mssql] > > Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > > Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so > > Server = 127.0.0.1 > > Port = 1433 > > Database = ejabberd > > Charset = UTF-8 > > TDS Version = 8.0 > > > So, the query > odbc:sql_query(Conn, "select cast(1 as bigint)"). > returns floats: > {selected,[[]],[{1.0}]} > > instead of: > {selected,[[]],[{1}]} > > Is there any way to change this behaviour? > -- ? ?????????, ?????? ??????. Best regards, Uvarov Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahe.sanath@REDACTED Tue Mar 13 06:23:14 2018 From: ahe.sanath@REDACTED (Sanath Prasanna) Date: Tue, 13 Mar 2018 11:08:14 +0545 Subject: [erlang-questions] peb compilation failure - apache version 2.4 & PHP 5.7 or above Message-ID: Hi all, PEB cannot compile in apache version 2.4 & PHP 5.7 or above. Can someone help to solve this issue. Or can recommended any other library to work with Erlang & PHP ? Br, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From publicityifl@REDACTED Tue Mar 13 08:48:34 2018 From: publicityifl@REDACTED (Jurriaan Hage) Date: Tue, 13 Mar 2018 00:48:34 -0700 Subject: [erlang-questions] 1st CfP: IFL 2018 (30th Symposium on Implementation and Application of Functional Languages) Message-ID: Hello, Please, find below the first call for papers for IFL 2018. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL --- ================================================================================ IFL 2018 30th Symposium on Implementation and Application of Functional Languages University of Massachusetts Lowell, MA, USA September 5th-7th, 2018 http://iflconference.org ================================================================================ ### Scope The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2018 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Topics of interest to IFL include, but are not limited to: - language concepts - type systems, type checking, type inferencing - compilation techniques - staged compilation - run-time function specialization - run-time code generation - partial evaluation - (abstract) interpretation - metaprogramming - generic programming - automatic program generation - array processing - concurrent/parallel programming - concurrent/parallel program execution - embedded systems - web applications - (embedded) domain specific languages - security - novel memory management techniques - run-time profiling performance measurements - debugging and tracing - virtual/abstract machine architectures - validation, verification of functional programs - tools and programming techniques - (industrial) applications ### Submissions and peer-review Differently from previous editions of IFL, IFL 2018 solicits two kinds of submissions: * Regular papers (12 pages including references) * Draft papers for presentations ('weak' limit between 8 and 15 pages) Regular papers will undergo a rigorous review by the program committee, and will be evaluated according to their correctness, novelty, originality, relevance, significance, and clarity. A set of regular papers will be conditionally accepted for publication. Authors of conditionally accepted papers will be provided with committee reviews along with a set of mandatory revisions. Regular papers not accepted for publication will be considered as draft papers, at the request of the author. Draft papers will be screened to make sure that they are within the scope of IFL, and will be accepted for presentation or rejected accordingly. Prior to the symposium: Authors of conditionally accepted papers and accepted presentations will submit a pre-proceedings version of their work that will appear in the draft proceedings distributed at the symposium. The draft proceedings does not constitute a formal publication. We require that at least one of the authors present the work at IFL 2018. After the symposium: Authors of conditionally accepted papers will submit a revised versions of their paper for the formal post-proceedings. The program committee will assess whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. Our interest is to ultimately accept all conditionally accepted papers. If you are an author of a conditionally accepted paper, please make sure that you address all the concerns of the reviewers. Authors of accepted presentations will be given the opportunity to incorporate the feedback from discussions at the symposium and will be invited to submit a revised full article for the formal post-proceedings. The program committee will evaluate these submissions according to their correctness, novelty, originality, relevance, significance, and clarity, and will thereby determine whether the paper is accepted or rejected. ### Publication The formal proceedings will appear in the International Conference Proceedings Series of the ACM Digital Library. At no time may work submitted to IFL be simultaneously submitted to other venues; submissions must adhere to ACM SIGPLAN's republication policy: http://www.sigplan.org/Resources/Policies/Republication ### Important dates Submission of regular papers: May 25, 2018 Submission of draft papers: July 17, 2018 Regular and draft papers notification: July 20, 2018 Deadline for early registration: August 8, 2018 Submission of pre-proceedings version: August 29, 2018 IFL Symposium: September 5-7, 2018 Submission of papers for post-proceedings: November 7, 2018 Notification of acceptance: December 22, 2018 Camera-ready version: February 10, 2019 ### Submission details All contributions must be written in English. Papers must use the ACM two columns conference format, which can be found at: http://www.acm.org/publications/proceedings-template Authors submit through EasyChair: https://easychair.org/conferences/?conf=ifl2018 ### Peter Landin Prize The Peter Landin Prize is awarded to the best paper presented at the symposium every year. The honored article is selected by the program committee based on the submissions received for the formal review process. The prize carries a cash award equivalent to 150 Euros. ### Organization and Program committee Chairs: Jay McCarthy & Matteo Cimini, University of Massachusetts Lowell, USA Program Committee: * Arthur Chargu??raud, Inria, FR * Ben Delaware, Purdue University, USA * Christos Dimoulas, Northwestern University, USA * David Darais, University of Vermont, USA * Dominic Orchard, University of Kent, UK * Ekaterina Komendantskaya, Heriot-Watt University, UK * Garrett Morris, University of Kansas, USA * Heather Miller, EPFL & Northeastern University, CH & USA * Jeremy Yallop, University of Cambridge, UK * Keiko Nakata, SAP Innovation Center Potsdam, DE * Laura Castro, University of A Coru??a, ESP * Magnus Myreen, Chalmers University of Technology, SWE * Natalia Chechina, Bournemouth University, UK * Peter Achten, Radboud Universiteit Nijmegen, NL * Peter-Michael Osera, Grinnell College, USA * Richard Eisenberg, Bryn Mawr College, USA * Trevor McDonell, University of New South Wales, AUS * Yukiyoshi Kameyama, University of Tsukuba, JAP ### Venue The 30th IFL will take place at the UMass Lowell Inn & Conference Center in Lowell (MA), in association with the University of Massachusetts Lowell. The City of Lowell is located at the heart of the Merrimack Valley just 30 miles northwest of Boston. Lowell can be easily reached by train or taxi. See the website for more information on the venue. ### Acknowledgments This call-for-papers is an adaptation and evolution of content from previous instances of IFL. We are grateful to prior organizers for their work, which is reused here. A part of IFL 2018 format and CFP language that describes conditionally accepted papers has been adapted from call-for-papers of OOPSLA conferences. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahe.sanath@REDACTED Tue Mar 13 11:32:36 2018 From: ahe.sanath@REDACTED (Sanath Prasanna) Date: Tue, 13 Mar 2018 16:17:36 +0545 Subject: [erlang-questions] peb compilation failure - apache version 2.4 & PHP 5.7 or above In-Reply-To: References: Message-ID: Any clue for below ? PEB cannot compile in apache version 2.4 & PHP 5.7 or above. Can someone help to solve this issue. Or can recommended any other library to work with Erlang & PHP ? On Tue, Mar 13, 2018 at 11:08 AM, Sanath Prasanna wrote: > Hi all, > PEB cannot compile in apache version 2.4 & PHP 5.7 or above. Can someone > help to solve this issue. Or can recommended any other library to work > with Erlang & PHP ? > Br, > Robert > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierrefenoll@REDACTED Tue Mar 13 13:39:48 2018 From: pierrefenoll@REDACTED (Pierre Fenoll) Date: Tue, 13 Mar 2018 12:39:48 +0000 Subject: [erlang-questions] peb compilation failure - apache version 2.4 & PHP 5.7 or above In-Reply-To: References: Message-ID: What?s PEB? What?s the compilation script you?re running? What?s the stacktrace? People can probably help you here but you need to include a minimum of information please. On Tue 13 Mar 2018 at 11:32, Sanath Prasanna wrote: > Any clue for below ? > > PEB cannot compile in apache version 2.4 & PHP 5.7 or above. Can someone > help to solve this issue. Or can recommended any other library to work > with Erlang & PHP ? > > > > On Tue, Mar 13, 2018 at 11:08 AM, Sanath Prasanna > wrote: > >> Hi all, >> PEB cannot compile in apache version 2.4 & PHP 5.7 or above. Can someone >> help to solve this issue. Or can recommended any other library to work >> with Erlang & PHP ? >> Br, >> Robert >> > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Cheers, -- Pierre Fenoll -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik.x.nord@REDACTED Wed Mar 14 10:46:41 2018 From: henrik.x.nord@REDACTED (Henrik Nord X) Date: Wed, 14 Mar 2018 09:46:41 +0000 Subject: [erlang-questions] Erlang/OTP 20.3 has been released Message-ID: <1521020801.8947.7.camel@ericsson.com> Erlang/OTP 20.3 is the third service release for the 20 major release. The service release contains mostly bug fixes and characteristics improvements but also some new features. Some highlights for 20.3 Application(s): ssl ???????????????Added new API functions to facilitate cipher suite ???????????????handling Application(s): erts, observer ???????????????More crash dump info such as: process binary virtual ???????????????heap stats, full info for process causing out-of-mem ???????????????during GC, more port related info, and dirty scheduler ???????????????info. Application(s): inets ???????????????Add support for unix domain sockets in the http client. You can find the README and the full listing of changes for this service release at http://www.erlang.org/download/otp_src_20.3.readme The source distribution and binary distributions for Windows can be downloaded from http://www.erlang.org/download/otp_src_20.3.tar.gz http://www.erlang.org/download/otp_win32_20.3.exe http://www.erlang.org/download/otp_win64_20.3.exe Note: To unpack the TAR archive you need a GNU TAR compatible program. For installation instructions please consult the README file that is part of the distribution. The Erlang/OTP source can also be found at GitHub on the official Erlang repository, https://github.com/erlang/otp with tag OTP-20.3 The on-line documentation can be found at: http://www.erlang.org/doc/ You can also download the complete HTML documentation or the Unix manual files http://www.erlang.org/download/otp_doc_html_20.3.tar.gz http://www.erlang.org/download/otp_doc_man_20.3.tar.gz Please report any new issues via Erlang/OTPs public issue tracker https://bugs.erlang.org We want to thank all of those who sent us patches, suggestions and bug reports! Thank you! The Erlang/OTP Team at Ericsson _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions From comptekki@REDACTED Wed Mar 14 17:02:37 2018 From: comptekki@REDACTED (Wes James) Date: Wed, 14 Mar 2018 10:02:37 -0600 Subject: [erlang-questions] Erlang/OTP 20.3 has been released In-Reply-To: <1521020801.8947.7.camel@ericsson.com> References: <1521020801.8947.7.camel@ericsson.com> Message-ID: With this version I am now getting ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY when going to my https cowboy app in chrome Version 65.0.3325.162 and a similar error in firefox. My app uses a self-signed certificate. It works fine with otp 20.2.4. Is there a way to fix this for self-signed certs? I tried a few things suggested on some web searches, but I still get the same error. For one, I tried adding the cert to the system keychain on my mac and selected always trust. If this is a bug, let me know and I'll report it in the tracker. Thanks, -wes On Wed, Mar 14, 2018 at 3:46 AM, Henrik Nord X wrote: > Erlang/OTP 20.3 is the third service release for the 20 major release. > The service release contains mostly bug fixes and characteristics > improvements but also some new features. > > Some highlights for 20.3 > > > Application(s): ssl > > Added new API functions to facilitate cipher suite > handling > > Application(s): erts, observer > > More crash dump info such as: process binary virtual > heap stats, full info for process causing out-of-mem > during GC, more port related info, and dirty scheduler > info. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdl.web@REDACTED Wed Mar 14 17:18:57 2018 From: sdl.web@REDACTED (Leo Liu) Date: Thu, 15 Mar 2018 00:18:57 +0800 Subject: [erlang-questions] OTP 20.3 has no gcm ciphers Message-ID: I just compiled Erlang 20.3 from github with openssl 1.0.1 (centos 7) and 1.0.2 (Sierra 10.12.6). ssl:cipher_suites(erlang) returns no gcm ciphers. I have previously compiled 20.2 from source and it has gcm ciphers. I wonder if this is an intended change in OTP 20.3? Thanks. Leo From denc716@REDACTED Wed Mar 14 19:10:54 2018 From: denc716@REDACTED (derek) Date: Wed, 14 Mar 2018 11:10:54 -0700 Subject: [erlang-questions] OTP 20.3 has no gcm ciphers In-Reply-To: References: Message-ID: I can reproduce the issue, while I change to call this http://erlang.org/doc/man/ssl.html#cipher_suites-2 with 2nd argument 'tlsv1.2' it seems still have some gcm ciphers; wonder is this change intended ? I am not seeing the change in http://erlang.org/download/otp_src_20.3.readme 13> ssl:cipher_suites(all, 'tlsv1.2'). [#{cipher => aes_256_gcm,key_exchange => ecdhe_ecdsa, mac => aead,prf => sha384}, #{cipher => aes_256_gcm,key_exchange => ecdhe_rsa,mac => aead, prf => sha384}, #{cipher => aes_256_cbc,key_exchange => ecdhe_ecdsa, mac => sha384,prf => sha384}, #{cipher => aes_256_cbc,key_exchange => ecdhe_rsa, mac => sha384,prf => sha384}, #{cipher => aes_256_gcm,key_exchange => ecdh_ecdsa, mac => aead,prf => sha384}, #{cipher => aes_256_gcm,key_exchange => ecdh_rsa,mac => aead, prf => sha384}, #{cipher => aes_256_cbc,key_exchange => ecdh_ecdsa, mac => sha384,prf => sha384}, #{cipher => aes_256_cbc,key_exchange => ecdh_rsa, mac => sha384,prf => sha384}, #{cipher => chacha20_poly1305,key_exchange => ecdhe_ecdsa, mac => aead,prf => sha256}, #{cipher => chacha20_poly1305,key_exchange => ecdhe_rsa, mac => aead,prf => sha256}, #{cipher => chacha20_poly1305,key_exchange => dhe_rsa, mac => aead,prf => sha256}, #{cipher => aes_256_gcm,key_exchange => dhe_rsa,mac => aead, prf => sha384}, #{cipher => aes_256_gcm,key_exchange => dhe_dss,mac => aead, prf => sha384}, On Wed, Mar 14, 2018 at 9:18 AM, Leo Liu wrote: > I just compiled Erlang 20.3 from github with openssl 1.0.1 (centos 7) > and 1.0.2 (Sierra 10.12.6). ssl:cipher_suites(erlang) returns no gcm > ciphers. > > I have previously compiled 20.2 from source and it has gcm ciphers. I > wonder if this is an intended change in OTP 20.3? Thanks. From ingela.andin@REDACTED Thu Mar 15 09:38:08 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Thu, 15 Mar 2018 09:38:08 +0100 Subject: [erlang-questions] OTP 20.3 has no gcm ciphers In-Reply-To: References: Message-ID: Hi! Well that was not intended, but I would not worry too much about it. We plan to deprecate the ssl:cipher_suites/1 function in 21 and this function is not used in runtime of the ssl application. I have not investigated why yet but we will fix it. Regards Ingela Erlang/OTP team - Ericsson AB 2018-03-14 19:10 GMT+01:00 derek : > I can reproduce the issue, while I change to call this > http://erlang.org/doc/man/ssl.html#cipher_suites-2 > > with 2nd argument 'tlsv1.2' it seems still have some gcm ciphers; > wonder is this change intended ? I am not seeing the change in > http://erlang.org/download/otp_src_20.3.readme > > 13> ssl:cipher_suites(all, 'tlsv1.2'). > [#{cipher => aes_256_gcm,key_exchange => ecdhe_ecdsa, > mac => aead,prf => sha384}, > #{cipher => aes_256_gcm,key_exchange => ecdhe_rsa,mac => aead, > prf => sha384}, > #{cipher => aes_256_cbc,key_exchange => ecdhe_ecdsa, > mac => sha384,prf => sha384}, > #{cipher => aes_256_cbc,key_exchange => ecdhe_rsa, > mac => sha384,prf => sha384}, > #{cipher => aes_256_gcm,key_exchange => ecdh_ecdsa, > mac => aead,prf => sha384}, > #{cipher => aes_256_gcm,key_exchange => ecdh_rsa,mac => aead, > prf => sha384}, > #{cipher => aes_256_cbc,key_exchange => ecdh_ecdsa, > mac => sha384,prf => sha384}, > #{cipher => aes_256_cbc,key_exchange => ecdh_rsa, > mac => sha384,prf => sha384}, > #{cipher => chacha20_poly1305,key_exchange => ecdhe_ecdsa, > mac => aead,prf => sha256}, > #{cipher => chacha20_poly1305,key_exchange => ecdhe_rsa, > mac => aead,prf => sha256}, > #{cipher => chacha20_poly1305,key_exchange => dhe_rsa, > mac => aead,prf => sha256}, > #{cipher => aes_256_gcm,key_exchange => dhe_rsa,mac => aead, > prf => sha384}, > #{cipher => aes_256_gcm,key_exchange => dhe_dss,mac => aead, > prf => sha384}, > > > > On Wed, Mar 14, 2018 at 9:18 AM, Leo Liu wrote: > > I just compiled Erlang 20.3 from github with openssl 1.0.1 (centos 7) > > and 1.0.2 (Sierra 10.12.6). ssl:cipher_suites(erlang) returns no gcm > > ciphers. > > > > > I have previously compiled 20.2 from source and it has gcm ciphers. I > > wonder if this is an intended change in OTP 20.3? Thanks. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela.andin@REDACTED Thu Mar 15 10:02:35 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Thu, 15 Mar 2018 10:02:35 +0100 Subject: [erlang-questions] Erlang/OTP 20.3 has been released In-Reply-To: References: <1521020801.8947.7.camel@ericsson.com> Message-ID: Hi! If this is a bug is hard to tell form the information you provided. Do you have any Erlang log printouts? Can you give me a way to reproduce it? If you have more information that you do not want to share publicly you can send me a private mail. Regards Ingela Erlang/OTP team - Ericsson AB 2018-03-14 17:02 GMT+01:00 Wes James : > With this version I am now getting ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY > when going to my https cowboy app in chrome Version 65.0.3325.162 and a > similar error in firefox. My app uses a self-signed certificate. It works > fine with otp 20.2.4. Is there a way to fix this for self-signed certs? I > tried a few things suggested on some web searches, but I still get the same > error. For one, I tried adding the cert to the system keychain on my mac > and selected always trust. If this is a bug, let me know and I'll report > it in the tracker. > > Thanks, > > -wes > > On Wed, Mar 14, 2018 at 3:46 AM, Henrik Nord X > wrote: > >> Erlang/OTP 20.3 is the third service release for the 20 major release. >> The service release contains mostly bug fixes and characteristics >> improvements but also some new features. >> >> Some highlights for 20.3 >> >> >> Application(s): ssl >> >> Added new API functions to facilitate cipher suite >> handling >> >> Application(s): erts, observer >> >> More crash dump info such as: process binary virtual >> heap stats, full info for process causing out-of-mem >> during GC, more port related info, and dirty scheduler >> info. >> >> > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela.andin@REDACTED Thu Mar 15 10:42:17 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Thu, 15 Mar 2018 10:42:17 +0100 Subject: [erlang-questions] OTP 20.3 has no gcm ciphers In-Reply-To: References: Message-ID: Hi! I have investigated and I found the problem, alas it was not local to the function ssl:cipher_suites/1. It is an internal filter function that has a problem. The patch is: diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl index 62a172c..59cf05f 100644 --- a/lib/ssl/src/ssl_cipher.erl +++ b/lib/ssl/src/ssl_cipher.erl @@ -2175,6 +2175,8 @@ is_acceptable_cipher(Cipher, Algos) -> is_acceptable_hash(null, _Algos) -> true; +is_acceptable_hash(aead, _Algos) -> + true; is_acceptable_hash(Hash, Algos) -> proplists:get_bool(Hash, Algos). We will make a patch. Regards Ingela Erlang/OTP team - Ericsson AB 2018-03-15 9:38 GMT+01:00 Ingela Andin : > Hi! > > Well that was not intended, but I would not worry too much about it. We > plan to deprecate the ssl:cipher_suites/1 function in 21 and this function > is not used in runtime of the ssl application. > I have not investigated why yet but we will fix it. > > Regards Ingela Erlang/OTP team - Ericsson AB > > 2018-03-14 19:10 GMT+01:00 derek : > >> I can reproduce the issue, while I change to call this >> http://erlang.org/doc/man/ssl.html#cipher_suites-2 >> >> with 2nd argument 'tlsv1.2' it seems still have some gcm ciphers; >> wonder is this change intended ? I am not seeing the change in >> http://erlang.org/download/otp_src_20.3.readme >> >> 13> ssl:cipher_suites(all, 'tlsv1.2'). >> [#{cipher => aes_256_gcm,key_exchange => ecdhe_ecdsa, >> mac => aead,prf => sha384}, >> #{cipher => aes_256_gcm,key_exchange => ecdhe_rsa,mac => aead, >> prf => sha384}, >> #{cipher => aes_256_cbc,key_exchange => ecdhe_ecdsa, >> mac => sha384,prf => sha384}, >> #{cipher => aes_256_cbc,key_exchange => ecdhe_rsa, >> mac => sha384,prf => sha384}, >> #{cipher => aes_256_gcm,key_exchange => ecdh_ecdsa, >> mac => aead,prf => sha384}, >> #{cipher => aes_256_gcm,key_exchange => ecdh_rsa,mac => aead, >> prf => sha384}, >> #{cipher => aes_256_cbc,key_exchange => ecdh_ecdsa, >> mac => sha384,prf => sha384}, >> #{cipher => aes_256_cbc,key_exchange => ecdh_rsa, >> mac => sha384,prf => sha384}, >> #{cipher => chacha20_poly1305,key_exchange => ecdhe_ecdsa, >> mac => aead,prf => sha256}, >> #{cipher => chacha20_poly1305,key_exchange => ecdhe_rsa, >> mac => aead,prf => sha256}, >> #{cipher => chacha20_poly1305,key_exchange => dhe_rsa, >> mac => aead,prf => sha256}, >> #{cipher => aes_256_gcm,key_exchange => dhe_rsa,mac => aead, >> prf => sha384}, >> #{cipher => aes_256_gcm,key_exchange => dhe_dss,mac => aead, >> prf => sha384}, >> >> >> >> On Wed, Mar 14, 2018 at 9:18 AM, Leo Liu wrote: >> > I just compiled Erlang 20.3 from github with openssl 1.0.1 (centos 7) >> > and 1.0.2 (Sierra 10.12.6). ssl:cipher_suites(erlang) returns no gcm >> > ciphers. >> > >> >> > I have previously compiled 20.2 from source and it has gcm ciphers. I >> > wonder if this is an intended change in OTP 20.3? Thanks. >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela.andin@REDACTED Thu Mar 15 10:45:01 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Thu, 15 Mar 2018 10:45:01 +0100 Subject: [erlang-questions] Erlang/OTP 20.3 has been released In-Reply-To: References: <1521020801.8947.7.camel@ericsson.com> Message-ID: Hi! This might be an interop problem due to AEAD cipher suites wrongly being filtered out. Could you please try the following patch? diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl index 62a172c..59cf05f 100644 --- a/lib/ssl/src/ssl_cipher.erl +++ b/lib/ssl/src/ssl_cipher.erl @@ -2175,6 +2175,8 @@ is_acceptable_cipher(Cipher, Algos) -> is_acceptable_hash(null, _Algos) -> true; +is_acceptable_hash(aead, _Algos) -> + true; is_acceptable_hash(Hash, Algos) -> proplists:get_bool(Hash, Algos). Regards Ingela Erlang/OTP team - Ericsson AB 2018-03-15 10:02 GMT+01:00 Ingela Andin : > Hi! > > If this is a bug is hard to tell form the information you provided. Do you > have any Erlang log printouts? Can you give me a way to reproduce it? If > you have more information that you do not want to share publicly you can > send > me a private mail. > > Regards Ingela Erlang/OTP team - Ericsson AB > > 2018-03-14 17:02 GMT+01:00 Wes James : > >> With this version I am now getting ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY >> when going to my https cowboy app in chrome Version 65.0.3325.162 and a >> similar error in firefox. My app uses a self-signed certificate. It works >> fine with otp 20.2.4. Is there a way to fix this for self-signed certs? I >> tried a few things suggested on some web searches, but I still get the same >> error. For one, I tried adding the cert to the system keychain on my mac >> and selected always trust. If this is a bug, let me know and I'll report >> it in the tracker. >> >> Thanks, >> >> -wes >> >> On Wed, Mar 14, 2018 at 3:46 AM, Henrik Nord X < >> henrik.x.nord@REDACTED> wrote: >> >>> Erlang/OTP 20.3 is the third service release for the 20 major release. >>> The service release contains mostly bug fixes and characteristics >>> improvements but also some new features. >>> >>> Some highlights for 20.3 >>> >>> >>> Application(s): ssl >>> >>> Added new API functions to facilitate cipher suite >>> handling >>> >>> Application(s): erts, observer >>> >>> More crash dump info such as: process binary virtual >>> heap stats, full info for process causing out-of-mem >>> during GC, more port related info, and dirty scheduler >>> info. >>> >>> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.james.morgan@REDACTED Thu Mar 15 12:23:20 2018 From: peter.james.morgan@REDACTED (Peter Morgan) Date: Thu, 15 Mar 2018 12:23:20 +0100 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} Message-ID: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> Hello - I am sure I am doing something daft. I picked up 20.3 this morning and have some gen_statem code that previously worked in 20.2.4: -module(ex1). -export([callback_mode/0]). -export([handle_event/4]). -export([init/1]). -export([start/0]). start() -> gen_statem:start({local, ?MODULE}, ?MODULE, [], []). init([]) -> {ok, initial_state, initial_data, {next_event, internal, initial_event}}. callback_mode() -> handle_event_function. handle_event(Type, Event, State, Data) -> error_logger:info_report([{type, Type}, {event, Event}, {state, State}, {data, Data}]), keep_state_and_data. brew switch erlang 20.2.4 Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Eshell V9.2.1 (abort with ^G) 1> ex1:start(). {ok,<0.62.0>} =INFO REPORT==== 15-Mar-2018::12:13:29 === type: internal event: initial_event state: initial_state data: initial_data brew switch erlang 20.3 Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Eshell V9.3 (abort with ^G) 1> c(ex1). {ok,ex1} 2> ex1:start(). {ok,<0.67.0>} 3> =ERROR REPORT==== 15-Mar-2018::12:15:02 === ** State machine ex1 terminating ** Last event = {internal,init_state} ** When server state = {initial_state,initial_data} ** Reason for termination = error:{bad_action_from_state_function, {next_events,internal,initial_event}} ** Callback mode = handle_event_function ** Stacktrace = ** [{gen_statem,parse_actions_next_event,7, [{file,"gen_statem.erl"},{line,1299}]}, {gen_statem,loop_event_actions_list,10, [{file,"gen_statem.erl"},{line,1194}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] The docs seem to indicate that next_event remains valid on init/1 - http://erlang.org/doc/man/gen_statem.html#type-init_result . Thanks Peter. -------------- next part -------------- An HTML attachment was scrubbed... URL: From greim@REDACTED Thu Mar 15 12:57:40 2018 From: greim@REDACTED (greim) Date: Thu, 15 Mar 2018 12:57:40 +0100 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: Message-ID: <3beb4951-5fe8-42dc-f0b1-7e3a6c3073e2@schleibinger.com> Max, could you explain the purpose or application of your software also for dummies like me? Is it a kind of standalone, MySQL compatible server for ets tables? I am just using in my project about 30 small MySQL tables to hold the static, non functional, state of my program. Also the user interface, implemented in HTML / PHP / JScript blablabla is using this tables to read or set program variables and triggers. Can I use your software instead? Or can I mirror my MySQL tables to Erlang and vice versa ? Regards Markus Am 12.03.2018 um 15:34 schrieb Max Lapshin: > Hi. > > > We have released our sqlapi library: https://github.com/flussonic/sqlapi > > This library can help you to make an SQL server from your existing server. > > For example you have a server and let it be ejabberd. You want to give a > list of connected users. > Of course you will start from making HTTP endpoint that will reply with > JSON with list of users. > > Then you will add some sort, filter, paging as query params and then > will write library that allows to make all this params and send them. > > Another option is to put our sqlapi library, connect it to storage of > connected users and then connect to server as if it is a SQL server. > > > Here another real example: https://flussonic.com/doc/api/sql-cluster > ?User can connect to our flussonic server and access whole cluster by > sending commands like INSERT, UPDATE, DELETE or READ. > > > This approach may be convenient if you have table data and mainly CRUD > operations. > > > Similar approach is used in Sphinx search engine: > http://sphinxsearch.com/docs/latest/sphinxql.html > > We have created all this to connect from python sqlalchemy and Ruby on > Rails to Flussonic. > If you want the same, this library may help. > > > the only dependency is ranch and it is optional, not required for tests. > Some code is derived from https://github.com/altenwald/myproto but we > had to remove neotoma sql parser, because we need speed!? Thanks for > https://github.com/master/mongosql/blob/master/src/sql92_parser.yrl > > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From michael.nisi@REDACTED Thu Mar 15 13:30:38 2018 From: michael.nisi@REDACTED (Michael Nisi) Date: Thu, 15 Mar 2018 13:30:38 +0100 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} In-Reply-To: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> References: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> Message-ID: next_events? > On 15. Mar 2018, at 12:23, Peter Morgan wrote: > > ** Reason for termination = error:{bad_action_from_state_function, > {next_events,internal,initial_event}} > ** Callback mode = handle_event_function > ** Stacktrace = > ** [{gen_statem,parse_actions_next_event,7, > [{file,"gen_statem.erl"},{line,1299}]}, > {gen_statem,loop_event_actions_list,10, > [{file,"gen_statem.erl"},{line,1194}]}, > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] > > > The docs seem to indicate that next_event remains valid on init/1 - http://erlang.org/doc/man/gen_statem.html#type-init_result. > > Thanks > Peter. > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From g@REDACTED Thu Mar 15 13:32:04 2018 From: g@REDACTED (Guilherme Andrade) Date: Thu, 15 Mar 2018 12:32:04 +0000 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} In-Reply-To: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> References: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> Message-ID: Crash log mentions 'next_events' (rather than 'next_event'.) Perhaps you have a typo somewhere? But if that's the case, then it's weird that 20.2.x doesn't complaint about it as well. On 15 March 2018 at 11:23, Peter Morgan wrote: > Hello - > > I am sure I am doing something daft. I picked up 20.3 this morning and > have some gen_statem code that previously worked in 20.2.4: > > -module(ex1). > > -export([callback_mode/0]). > -export([handle_event/4]). > -export([init/1]). > -export([start/0]). > > start() -> > gen_statem:start({local, ?MODULE}, ?MODULE, [], []). > > init([]) -> > {ok, > initial_state, > initial_data, > {next_event, internal, initial_event}}. > > callback_mode() -> > handle_event_function. > > handle_event(Type, Event, State, Data) -> > error_logger:info_report([{type, Type}, > {event, Event}, > {state, State}, > {data, Data}]), > keep_state_and_data. > > > > > brew switch erlang 20.2.4 > > Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] > [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > > Eshell V9.2.1 (abort with ^G) > 1> ex1:start(). > {ok,<0.62.0>} > > =INFO REPORT==== 15-Mar-2018::12:13:29 === > type: internal > event: initial_event > state: initial_state > data: initial_data > > > > brew switch erlang 20.3 > Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] > [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > > Eshell V9.3 (abort with ^G) > 1> c(ex1). > {ok,ex1} > 2> ex1:start(). > {ok,<0.67.0>} > 3> > =ERROR REPORT==== 15-Mar-2018::12:15:02 === > ** State machine ex1 terminating > ** Last event = {internal,init_state} > ** When server state = {initial_state,initial_data} > ** Reason for termination = error:{bad_action_from_state_function, > {next_events,internal, > initial_event}} > ** Callback mode = handle_event_function > ** Stacktrace = > ** [{gen_statem,parse_actions_next_event,7, > [{file,"gen_statem.erl"},{line,1299}]}, > {gen_statem,loop_event_actions_list,10, > [{file,"gen_statem.erl"},{line,1194}]}, > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] > > > The docs seem to indicate that next_event remains valid on init/1 - > http://erlang.org/doc/man/gen_statem.html#type-init_result. > > Thanks > Peter. > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- Guilherme -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Thu Mar 15 14:51:41 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Thu, 15 Mar 2018 14:51:41 +0100 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} In-Reply-To: References: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> Message-ID: <20180315135141.GA39265@erix.ericsson.se> I am sorry i fubmled when optimizing gen_statem. That typo is mine, besides the erroneous actions list handling from init/1. This diff should fix the problems: diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl index b1d99e2..eb0d6bd 100644 --- a/lib/stdlib/src/gen_statem.erl +++ b/lib/stdlib/src/gen_statem.erl @@ -677,9 +677,9 @@ enter(Module, Opts, State, Data, Server, Actions, Parent) -> NewDebug = ?sys_debug(Debug, {Name,State}, {enter,Event,State}), case call_callback_mode(S) of #state{} = NewS -> - loop_event_actions( + loop_event_actions_list( Parent, NewDebug, NewS, - Events, Event, State, Data, #trans_opts{}, + Events, Event, State, Data, false, NewActions, CallEnter); [Class,Reason,Stacktrace] -> terminate( @@ -1295,7 +1295,7 @@ parse_actions_next_event( next_events_r = [{Type,Content}|NextEventsR]}); _ -> [error, - {bad_action_from_state_function,{next_events,Type,Content}}, + {bad_action_from_state_function,{next_event,Type,Content}}, ?STACKTRACE(), ?not_sys_debug] end; @@ -1312,7 +1312,7 @@ parse_actions_next_event( next_events_r = [{Type,Content}|NextEventsR]}); _ -> [error, - {bad_action_from_state_function,{next_events,Type,Content}}, + {bad_action_from_state_function,{next_event,Type,Content}}, ?STACKTRACE(), Debug] end. That, running it through our daily builds, and apparently writing a writing a missing test case. ;-) I am at the San Francisco Code Beam event right now so a patch will have to wait to next week.. Sorry about this! / Raimo Niskanen On Thu, Mar 15, 2018 at 12:32:04PM +0000, Guilherme Andrade wrote: > Crash log mentions 'next_events' (rather than 'next_event'.) Perhaps you > have a typo somewhere? But if that's the case, then it's weird that 20.2.x > doesn't complaint about it as well. > > On 15 March 2018 at 11:23, Peter Morgan > wrote: > > > Hello - > > > > I am sure I am doing something daft. I picked up 20.3 this morning and > > have some gen_statem code that previously worked in 20.2.4: > > > > -module(ex1). > > > > -export([callback_mode/0]). > > -export([handle_event/4]). > > -export([init/1]). > > -export([start/0]). > > > > start() -> > > gen_statem:start({local, ?MODULE}, ?MODULE, [], []). > > > > init([]) -> > > {ok, > > initial_state, > > initial_data, > > {next_event, internal, initial_event}}. > > > > callback_mode() -> > > handle_event_function. > > > > handle_event(Type, Event, State, Data) -> > > error_logger:info_report([{type, Type}, > > {event, Event}, > > {state, State}, > > {data, Data}]), > > keep_state_and_data. > > > > > > > > > > brew switch erlang 20.2.4 > > > > Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] > > [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > > > > Eshell V9.2.1 (abort with ^G) > > 1> ex1:start(). > > {ok,<0.62.0>} > > > > =INFO REPORT==== 15-Mar-2018::12:13:29 === > > type: internal > > event: initial_event > > state: initial_state > > data: initial_data > > > > > > > > brew switch erlang 20.3 > > Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] > > [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > > > > Eshell V9.3 (abort with ^G) > > 1> c(ex1). > > {ok,ex1} > > 2> ex1:start(). > > {ok,<0.67.0>} > > 3> > > =ERROR REPORT==== 15-Mar-2018::12:15:02 === > > ** State machine ex1 terminating > > ** Last event = {internal,init_state} > > ** When server state = {initial_state,initial_data} > > ** Reason for termination = error:{bad_action_from_state_function, > > {next_events,internal, > > initial_event}} > > ** Callback mode = handle_event_function > > ** Stacktrace = > > ** [{gen_statem,parse_actions_next_event,7, > > [{file,"gen_statem.erl"},{line,1299}]}, > > {gen_statem,loop_event_actions_list,10, > > [{file,"gen_statem.erl"},{line,1194}]}, > > {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] > > > > > > The docs seem to indicate that next_event remains valid on init/1 - > > http://erlang.org/doc/man/gen_statem.html#type-init_result. > > > > Thanks > > Peter. > > > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > > > > > > > -- > Guilherme > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From peter.james.morgan@REDACTED Thu Mar 15 15:17:14 2018 From: peter.james.morgan@REDACTED (Peter Morgan) Date: Thu, 15 Mar 2018 15:17:14 +0100 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} In-Reply-To: <20180315135141.GA39265@erix.ericsson.se> References: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> <20180315135141.GA39265@erix.ericsson.se> Message-ID: <76371617-5E73-40BA-9C0F-B28A41E7E5D2@gmail.com> Thanks very much for the diff! Regards Peter > On 15 Mar 2018, at 14:51, Raimo Niskanen wrote: > > I am sorry i fubmled when optimizing gen_statem. That typo is mine, > besides the erroneous actions list handling from init/1. > > This diff should fix the problems: > > diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl > index b1d99e2..eb0d6bd 100644 > --- a/lib/stdlib/src/gen_statem.erl > +++ b/lib/stdlib/src/gen_statem.erl > @@ -677,9 +677,9 @@ enter(Module, Opts, State, Data, Server, Actions, > Parent) -> > NewDebug = ?sys_debug(Debug, {Name,State}, {enter,Event,State}), > case call_callback_mode(S) of > #state{} = NewS -> > - loop_event_actions( > + loop_event_actions_list( > Parent, NewDebug, NewS, > - Events, Event, State, Data, #trans_opts{}, > + Events, Event, State, Data, false, > NewActions, CallEnter); > [Class,Reason,Stacktrace] -> > terminate( > @@ -1295,7 +1295,7 @@ parse_actions_next_event( > next_events_r = [{Type,Content}|NextEventsR]}); > _ -> > [error, > - {bad_action_from_state_function,{next_events,Type,Content}}, > + {bad_action_from_state_function,{next_event,Type,Content}}, > ?STACKTRACE(), > ?not_sys_debug] > end; > @@ -1312,7 +1312,7 @@ parse_actions_next_event( > next_events_r = [{Type,Content}|NextEventsR]}); > _ -> > [error, > - {bad_action_from_state_function,{next_events,Type,Content}}, > + {bad_action_from_state_function,{next_event,Type,Content}}, > ?STACKTRACE(), > Debug] > end. > > > > That, running it through our daily builds, and apparently writing a > writing a missing test case. ;-) > > I am at the San Francisco Code Beam event right now so a patch will have to > wait to next week.. > > Sorry about this! > / Raimo Niskanen > > > >> On Thu, Mar 15, 2018 at 12:32:04PM +0000, Guilherme Andrade wrote: >> Crash log mentions 'next_events' (rather than 'next_event'.) Perhaps you >> have a typo somewhere? But if that's the case, then it's weird that 20.2.x >> doesn't complaint about it as well. >> >> On 15 March 2018 at 11:23, Peter Morgan >> wrote: >> >>> Hello - >>> >>> I am sure I am doing something daft. I picked up 20.3 this morning and >>> have some gen_statem code that previously worked in 20.2.4: >>> >>> -module(ex1). >>> >>> -export([callback_mode/0]). >>> -export([handle_event/4]). >>> -export([init/1]). >>> -export([start/0]). >>> >>> start() -> >>> gen_statem:start({local, ?MODULE}, ?MODULE, [], []). >>> >>> init([]) -> >>> {ok, >>> initial_state, >>> initial_data, >>> {next_event, internal, initial_event}}. >>> >>> callback_mode() -> >>> handle_event_function. >>> >>> handle_event(Type, Event, State, Data) -> >>> error_logger:info_report([{type, Type}, >>> {event, Event}, >>> {state, State}, >>> {data, Data}]), >>> keep_state_and_data. >>> >>> >>> >>> >>> brew switch erlang 20.2.4 >>> >>> Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] >>> [async-threads:10] [hipe] [kernel-poll:false] [dtrace] >>> >>> Eshell V9.2.1 (abort with ^G) >>> 1> ex1:start(). >>> {ok,<0.62.0>} >>> >>> =INFO REPORT==== 15-Mar-2018::12:13:29 === >>> type: internal >>> event: initial_event >>> state: initial_state >>> data: initial_data >>> >>> >>> >>> brew switch erlang 20.3 >>> Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] >>> [async-threads:10] [hipe] [kernel-poll:false] [dtrace] >>> >>> Eshell V9.3 (abort with ^G) >>> 1> c(ex1). >>> {ok,ex1} >>> 2> ex1:start(). >>> {ok,<0.67.0>} >>> 3> >>> =ERROR REPORT==== 15-Mar-2018::12:15:02 === >>> ** State machine ex1 terminating >>> ** Last event = {internal,init_state} >>> ** When server state = {initial_state,initial_data} >>> ** Reason for termination = error:{bad_action_from_state_function, >>> {next_events,internal, >>> initial_event}} >>> ** Callback mode = handle_event_function >>> ** Stacktrace = >>> ** [{gen_statem,parse_actions_next_event,7, >>> [{file,"gen_statem.erl"},{line,1299}]}, >>> {gen_statem,loop_event_actions_list,10, >>> [{file,"gen_statem.erl"},{line,1194}]}, >>> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] >>> >>> >>> The docs seem to indicate that next_event remains valid on init/1 - >>> http://erlang.org/doc/man/gen_statem.html#type-init_result. >>> >>> Thanks >>> Peter. >>> >>> >>> _______________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >>> >>> >> >> >> -- >> Guilherme > >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions > > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From sdl.web@REDACTED Thu Mar 15 15:38:05 2018 From: sdl.web@REDACTED (Leo Liu) Date: Thu, 15 Mar 2018 22:38:05 +0800 Subject: [erlang-questions] OTP 20.3 has no gcm ciphers In-Reply-To: References: Message-ID: > On 15 Mar 2018, at 17:42, Ingela Andin wrote: > > I have investigated and I found the problem, alas it was not local to the function ssl:cipher_suites/1. Thanks for the fix. Leo From comptekki@REDACTED Thu Mar 15 16:00:50 2018 From: comptekki@REDACTED (Wes James) Date: Thu, 15 Mar 2018 09:00:50 -0600 Subject: [erlang-questions] Erlang/OTP 20.3 has been released In-Reply-To: References: <1521020801.8947.7.camel@ericsson.com> Message-ID: That fixed it for me. Thanks! -wes On Thu, Mar 15, 2018 at 3:45 AM, Ingela Andin wrote: > Hi! > > This might be an interop problem due to AEAD cipher suites wrongly being > filtered out. > Could you please try the following patch? > > diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl > index 62a172c..59cf05f 100644 > --- a/lib/ssl/src/ssl_cipher.erl > +++ b/lib/ssl/src/ssl_cipher.erl > @@ -2175,6 +2175,8 @@ is_acceptable_cipher(Cipher, Algos) -> > > is_acceptable_hash(null, _Algos) -> > true; > +is_acceptable_hash(aead, _Algos) -> > + true; > is_acceptable_hash(Hash, Algos) -> > proplists:get_bool(Hash, Algos). > > > > Regards Ingela Erlang/OTP team - Ericsson AB > > > > 2018-03-15 10:02 GMT+01:00 Ingela Andin : > >> Hi! >> >> If this is a bug is hard to tell form the information you provided. Do >> you have any Erlang log printouts? Can you give me a way to reproduce it? >> If you have more information that you do not want to share publicly you can >> send >> me a private mail. >> >> Regards Ingela Erlang/OTP team - Ericsson AB >> >> 2018-03-14 17:02 GMT+01:00 Wes James : >> >>> With this version I am now getting ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY >>> when going to my https cowboy app in chrome Version 65.0.3325.162 and a >>> similar error in firefox. My app uses a self-signed certificate. It works >>> fine with otp 20.2.4. Is there a way to fix this for self-signed certs? I >>> tried a few things suggested on some web searches, but I still get the same >>> error. For one, I tried adding the cert to the system keychain on my mac >>> and selected always trust. If this is a bug, let me know and I'll report >>> it in the tracker. >>> >>> Thanks, >>> >>> -wes >>> >>> On Wed, Mar 14, 2018 at 3:46 AM, Henrik Nord X < >>> henrik.x.nord@REDACTED> wrote: >>> >>>> Erlang/OTP 20.3 is the third service release for the 20 major release. >>>> The service release contains mostly bug fixes and characteristics >>>> improvements but also some new features. >>>> >>>> Some highlights for 20.3 >>>> >>>> >>>> Application(s): ssl >>>> >>>> Added new API functions to facilitate cipher suite >>>> handling >>>> >>>> Application(s): erts, observer >>>> >>>> More crash dump info such as: process binary virtual >>>> heap stats, full info for process causing out-of-mem >>>> during GC, more port related info, and dirty scheduler >>>> info. >>>> >>>> >>> _______________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdl.web@REDACTED Fri Mar 16 03:24:14 2018 From: sdl.web@REDACTED (Leo Liu) Date: Fri, 16 Mar 2018 10:24:14 +0800 Subject: [erlang-questions] test gmane Message-ID: Ignore. This is a test of posting from gmane.comp.lang.erlang.general. From ingela.anderton.andin@REDACTED Fri Mar 16 11:35:47 2018 From: ingela.anderton.andin@REDACTED (Ingela Anderton Andin) Date: Fri, 16 Mar 2018 11:35:47 +0100 Subject: [erlang-questions] Patch package OTP 20.3.1 released Message-ID: <20180316103547.GA34029@duper.otp.ericsson.se> Patch Package: OTP 20.3.1 Git Tag: OTP-20.3.1 Date: 2018-03-16 Trouble Report Id: OTP-14981 Seq num: System: OTP Release: 20 Application: ssl-8.2.5 Predecessor: OTP 20.3 Check out the git tag OTP-20.3.1, and build a full OTP system including documentation. Apply one or more applications from this build as patches to your installation using the 'otp_patch_apply' tool. For information on install requirements, see descriptions for each application version below. --------------------------------------------------------------------- --- ssl-8.2.5 ------------------------------------------------------- --------------------------------------------------------------------- Note! The ssl-8.2.5 application can *not* be applied independently of other applications on an arbitrary OTP 20 installation. On a full OTP 20 installation, also the following runtime dependencies have to be satisfied: -- crypto-4.2 (first satisfied in OTP 20.2) -- public_key-1.5 (first satisfied in OTP 20.1) --- Fixed Bugs and Malfunctions --- OTP-14981 Application(s): ssl Fix filter function to not incorrectly exclude AEAD cipher suites Full runtime dependencies of ssl-8.2.5: crypto-4.2, erts-7.0, inets-5.10.7, kernel-3.0, public_key-1.5, stdlib-3.2 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- From athanasios.valsamakis@REDACTED Fri Mar 16 08:06:18 2018 From: athanasios.valsamakis@REDACTED (Athanasios Valsamakis) Date: Fri, 16 Mar 2018 09:06:18 +0200 Subject: [erlang-questions] How exactly Erlang receive expression works? Message-ID: I was reading the book of Mr. Joe Armstrong "Programming Erlang 2nd ed.", when I reached the section about selective receive. He explained it very clearly. So, based on his explanation I decided to make a flowchart. I would like to share it with you. Comments are welcome. +-----------------+ | Enter receive. | ** Timer may have already been elapsed | Start timer | when entering this state. +------+----------+ | +-----v------+ +--------------------------------+ +-------------------+ | is mailbox | Yes | suspend process until |timer elapsed | evaluate | +------> empty? +------------> a new message is put in mailbox+--------------> expressionsTimeout| | | | | or timer has elapsed** | | | | +------------+ +-----+--------------------------+ +--------+----------+ | |No | | | +------v----------------+ |new msg arrived | | | take the head message | | | | | from the mailbox <--------+ | | +------+----------------+ | | | | | +-----v-------------+ +---------------+ +-------------+ | | | match the message +---->remove message +---->evaluate +------------+ | | | against pattern1 |Yes |from mailbox | |expressions1 | | | | +-------------------+ +---------------+ +-------------+ | | | |No | | | | +-----v---------v--------------------+ | +-----v-------------+ +---------------+ +-------------+ | if any messages have been put into | | | match the message +---->remove message +---->evaluate +------> the save queue, are reentered | | | against pattern2 |Yes |from mailbox | |expressions2 | | into the mailbox | | +-------------------+ +---------------+ +-------------+ +-----^---------+--------------------+ | |No | | | | | | | +-----v-------------+ +---------------+ +-------------+ | | | | match the message +---->remove message +---->evaluate +------------+ | | | against pattern3 |Yes |from mailbox | |expressions3 | | | +-------------------+ +---------------+ +-------------+ | | |No | | | | | +-----v------------------------------+ | | | message is removed from the mailbox| | +------+ and put into a "save queue" | | | | | +------------------------------------+ | | +------------------+ | | Exit receive. <--------------------------------------------------------------+ | Timer is cleared.| +------------------+ -------------- next part -------------- An HTML attachment was scrubbed... URL: From fxn@REDACTED Fri Mar 16 15:57:04 2018 From: fxn@REDACTED (Xavier Noria) Date: Fri, 16 Mar 2018 15:57:04 +0100 Subject: [erlang-questions] How exactly Erlang receive expression works? In-Reply-To: References: Message-ID: I think there is a detail that does not square. Take this example[*]: -module(foo). -export([start/0]). start() -> self() ! matched_by_b, self() ! matched_by_a, a(), halt(). a() -> receive matched_by_a -> io:format("matched by a/0~n"), b() end. b() -> receive matched_by_b -> io:format("matched by b/0~n") end. According to your (very nice!) diagram, this program should hang, because when b/0 is invoked, the message `matched_by_b` has already been moved into the save queue, and b/0 is called *while* the expression that matches `matched_by_a` is evaluated. The diagram says `matched_by_b` is not in the mailbox at that point. But the program terminates, ergo reductio ad absurdum :). I guess that diagram comes from the algorithm outlined on page 194 of the book. I believe you need to factor in step (5). Xavier [*] erlc foo.erl && erl -noshell -run foo -------------- next part -------------- An HTML attachment was scrubbed... URL: From athanasios.valsamakis@REDACTED Fri Mar 16 18:37:13 2018 From: athanasios.valsamakis@REDACTED (Athanasios Valsamakis) Date: Fri, 16 Mar 2018 19:37:13 +0200 Subject: [erlang-questions] How exactly Erlang receive expression works? In-Reply-To: References: Message-ID: Mr. Xavier, you are absolutely right! Thank you for pointing my error. Is the following flowchart closer to the truth? +-----------------+ | Enter receive. | ** Timer may have already been elapsed | Start timer | when entering this state. +------+----------+ | +-----v------+ +--------------------------------+ | is mailbox | Yes | suspend process until |timer elapsed +------> empty? +------------> a new message is put in mailbox+-----------------+ | | | | or timer has elapsed** | | | +------------+ +-----+--------------------------+ +-------------v---------------------+ +-------------------+ | |No | |if any messages have been put into | | evaluate | | +------v----------------+ |new msg arrived |the save queue, are reentered +-----> expressionsTimeout| | | take the head message | | |into the mailbox | | | | | from the mailbox <--------+ +-----------------------------------+ +--------+----------+ | +------+----------------+ | | | +-----------------------------------+ +-------------+ | | +-----v-------------+ +---------------+ |if any messages have been put into +----->evaluate +----------> | | match the message +---->remove message +----->the save queue, are reentered | |expressions1 | | | | against pattern1 |Yes |from mailbox | |into the mailbox | +-------------+ | | +-------------------+ +---------------+ +-----------------------------------+ | | |No | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern2 |Yes |from mailbox | |the save queue, are reentered | |expressions2 | | | +-------------------+ +---------------+ |into the mailbox | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern3 |Yes |from mailbox | |the save queue, are reentered | |expressions3 | | | +-------------------+ +---------------+ |into the mailbox | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v------------------------------+ | | | message is removed from the mailbox| | +------+ and put into a "save queue" | | | | | +------------------------------------+ | | +------------------+ | | Exit receive. <---------------------------------------------------------------------------------------------+ | Timer is cleared.| +------------------+ On Fri, Mar 16, 2018 at 4:57 PM, Xavier Noria wrote: > I think there is a detail that does not square. > > Take this example[*]: > > -module(foo). > -export([start/0]). > > start() -> > self() ! matched_by_b, > self() ! matched_by_a, > a(), > halt(). > > a() -> > receive > matched_by_a -> > io:format("matched by a/0~n"), > b() > end. > > b() -> > receive > matched_by_b -> > io:format("matched by b/0~n") > end. > > > According to your (very nice!) diagram, this program should hang, because > when b/0 is invoked, the message `matched_by_b` has already been moved into > the save queue, and b/0 is called *while* the expression that matches > `matched_by_a` is evaluated. The diagram says `matched_by_b` is not in the > mailbox at that point. > > But the program terminates, ergo reductio ad absurdum :). > > I guess that diagram comes from the algorithm outlined on page 194 of the > book. I believe you need to factor in step (5). > > Xavier > > [*] erlc foo.erl && erl -noshell -run foo > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- +-----------------+ | Enter receive. | ** Timer may have already been elapsed | Start timer | when entering this state. +------+----------+ | +-----v------+ +--------------------------------+ | is mailbox | Yes | suspend process until |timer elapsed +------> empty? +------------> a new message is put in mailbox+-----------------+ | | | | or timer has elapsed** | | | +------------+ +-----+--------------------------+ +-------------v---------------------+ +-------------------+ | |No | |if any messages have been put into | | evaluate | | +------v----------------+ |new msg arrived |the save queue, are reentered +-----> expressionsTimeout| | | take the head message | | |into the mailbox | | | | | from the mailbox <--------+ +-----------------------------------+ +--------+----------+ | +------+----------------+ | | | +-----------------------------------+ +-------------+ | | +-----v-------------+ +---------------+ |if any messages have been put into +----->evaluate +----------> | | match the message +---->remove message +----->the save queue, are reentered | |expressions1 | | | | against pattern1 |Yes |from mailbox | |into the mailbox | +-------------+ | | +-------------------+ +---------------+ +-----------------------------------+ | | |No | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern2 |Yes |from mailbox | |the save queue, are reentered | |expressions2 | | | +-------------------+ +---------------+ |into the mailbox | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern3 |Yes |from mailbox | |the save queue, are reentered | |expressions3 | | | +-------------------+ +---------------+ |into the mailbox | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v------------------------------+ | | | message is removed from the mailbox| | +------+ and put into a "save queue" | | | | | +------------------------------------+ | | +------------------+ | | Exit receive. <---------------------------------------------------------------------------------------------+ | Timer is cleared.| +------------------+ From mikpelinux@REDACTED Fri Mar 16 19:05:17 2018 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Fri, 16 Mar 2018 19:05:17 +0100 Subject: [erlang-questions] How exactly Erlang receive expression works? In-Reply-To: References: Message-ID: Drop the "save queue" stuff. You should think of the mailbox as a queue with a read cursor. Whenever you enter a receive, the cursor is reset to the start of the queue, and then you enumerate messages and match them, non-destructively, until you either find one that matches, or the cursor reaches the end of the queue. In case of a match, the message is removed from the queue. In case of a non-match, the process is suspended until some message is appended to the queue or your timeout (if any) fires. When awakened due to a new message, the process continues to scan its mailbox from the last cursor position (avoiding the cost of rescanning is part of the semantics, IMO). On Fri, Mar 16, 2018 at 6:37 PM, Athanasios Valsamakis wrote: > Mr. Xavier, you are absolutely right! > > Thank you for pointing my error. > > Is the following flowchart closer to the truth? > > > +-----------------+ > | Enter receive. | ** Timer may have already been > elapsed > | Start timer | when entering this state. > +------+----------+ > | > +-----v------+ +--------------------------------+ > | is mailbox | Yes | suspend process until |timer > elapsed > +------> empty? +------------> a new message is put in > mailbox+-----------------+ > | | | | or timer has elapsed** | > | > | +------------+ +-----+--------------------------+ > +-------------v---------------------+ +-------------------+ > | |No | |if > any messages have been put into | | evaluate | > | +------v----------------+ |new msg arrived |the > save queue, are reentered +-----> expressionsTimeout| > | | take the head message | | |into > the mailbox | | | > | | from the mailbox <--------+ > +-----------------------------------+ +--------+----------+ > | +------+----------------+ > | > | | > +-----------------------------------+ +-------------+ | > | +-----v-------------+ +---------------+ |if any messages have > been put into +----->evaluate +----------> > | | match the message +---->remove message +----->the save queue, are > reentered | |expressions1 | | > | | against pattern1 |Yes |from mailbox | |into the mailbox > | +-------------+ | > | +-------------------+ +---------------+ > +-----------------------------------+ | > | |No > | > | | > | > | +-----v-------------+ +---------------+ > +-----------------------------------+ +-------------+ | > | | match the message +---->remove message +----->if any messages have > been put into +----->evaluate +----------> > | | against pattern2 |Yes |from mailbox | |the save queue, are > reentered | |expressions2 | | > | +-------------------+ +---------------+ |into the mailbox > | +-------------+ | > | |No > +-----------------------------------+ | > | | > | > | +-----v-------------+ +---------------+ > +-----------------------------------+ +-------------+ | > | | match the message +---->remove message +----->if any messages have > been put into +----->evaluate +----------> > | | against pattern3 |Yes |from mailbox | |the save queue, are > reentered | |expressions3 | | > | +-------------------+ +---------------+ |into the mailbox > | +-------------+ | > | |No > +-----------------------------------+ | > | | > | > | +-----v------------------------------+ > | > | | message is removed from the mailbox| > | > +------+ and put into a "save queue" | > | > | | > | > +------------------------------------+ > | > > | > +------------------+ > | > | Exit receive. > <---------------------------------------------------------------------------------------------+ > | Timer is cleared.| > +------------------+ > > > > > > > On Fri, Mar 16, 2018 at 4:57 PM, Xavier Noria wrote: >> >> I think there is a detail that does not square. >> >> Take this example[*]: >> >> -module(foo). >> -export([start/0]). >> >> start() -> >> self() ! matched_by_b, >> self() ! matched_by_a, >> a(), >> halt(). >> >> a() -> >> receive >> matched_by_a -> >> io:format("matched by a/0~n"), >> b() >> end. >> >> b() -> >> receive >> matched_by_b -> >> io:format("matched by b/0~n") >> end. >> >> >> According to your (very nice!) diagram, this program should hang, because >> when b/0 is invoked, the message `matched_by_b` has already been moved into >> the save queue, and b/0 is called while the expression that matches >> `matched_by_a` is evaluated. The diagram says `matched_by_b` is not in the >> mailbox at that point. >> >> But the program terminates, ergo reductio ad absurdum :). >> >> I guess that diagram comes from the algorithm outlined on page 194 of the >> book. I believe you need to factor in step (5). >> >> Xavier >> >> [*] erlc foo.erl && erl -noshell -run foo >> >> > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From athanasios.valsamakis@REDACTED Sat Mar 17 09:51:54 2018 From: athanasios.valsamakis@REDACTED (Athanasios Valsamakis) Date: Sat, 17 Mar 2018 10:51:54 +0200 Subject: [erlang-questions] How exactly Erlang receive expression works? In-Reply-To: References: Message-ID: I think the timer should also be cleared in an earlier step. On Fri, Mar 16, 2018 at 7:37 PM, Athanasios Valsamakis < athanasios.valsamakis@REDACTED> wrote: > Mr. Xavier, you are absolutely right! > > Thank you for pointing my error. > > Is the following flowchart closer to the truth? > > > +-----------------+ > | Enter receive. | ** Timer may have already been > elapsed > | Start timer | when entering this state. > +------+----------+ > | > +-----v------+ +--------------------------------+ > | is mailbox | Yes | suspend process until |timer > elapsed > +------> empty? +------------> a new message is put in > mailbox+-----------------+ > | | | | or timer has elapsed** | > | > | +------------+ +-----+--------------------------+ > +-------------v---------------------+ +-------------------+ > | |No | |if > any messages have been put into | | evaluate | > | +------v----------------+ |new msg arrived |the > save queue, are reentered +-----> expressionsTimeout| > | | take the head message | | > |into the mailbox | | | > | | from the mailbox <--------+ > +-----------------------------------+ +--------+----------+ > | +------+----------------+ > | > | | > +-----------------------------------+ +-------------+ | > | +-----v-------------+ +---------------+ |if any messages > have been put into +----->evaluate +----------> > | | match the message +---->remove message +----->the save queue, are > reentered | |expressions1 | | > | | against pattern1 |Yes |from mailbox | |into the mailbox > | +-------------+ | > | +-------------------+ +---------------+ > +-----------------------------------+ | > | |No > | > | | > | > | +-----v-------------+ +---------------+ > +-----------------------------------+ +-------------+ | > | | match the message +---->remove message +----->if any messages > have been put into +----->evaluate +----------> > | | against pattern2 |Yes |from mailbox | |the save queue, are > reentered | |expressions2 | | > | +-------------------+ +---------------+ |into the mailbox > | +-------------+ | > | |No > +-----------------------------------+ | > | | > | > | +-----v-------------+ +---------------+ > +-----------------------------------+ +-------------+ | > | | match the message +---->remove message +----->if any messages > have been put into +----->evaluate +----------> > | | against pattern3 |Yes |from mailbox | |the save queue, are > reentered | |expressions3 | | > | +-------------------+ +---------------+ |into the mailbox > | +-------------+ | > | |No > +-----------------------------------+ | > | | > | > | +-----v------------------------------+ > | > | | message is removed from the mailbox| > | > +------+ and put into a "save queue" | > | > | | > | > +------------------------------------+ > | > > | > +------------------+ > | > | Exit receive. <----------------------------- > ----------------------------------------------------------------+ > | Timer is cleared.| > +------------------+ > > > > > > > On Fri, Mar 16, 2018 at 4:57 PM, Xavier Noria wrote: > >> I think there is a detail that does not square. >> >> Take this example[*]: >> >> -module(foo). >> -export([start/0]). >> >> start() -> >> self() ! matched_by_b, >> self() ! matched_by_a, >> a(), >> halt(). >> >> a() -> >> receive >> matched_by_a -> >> io:format("matched by a/0~n"), >> b() >> end. >> >> b() -> >> receive >> matched_by_b -> >> io:format("matched by b/0~n") >> end. >> >> >> According to your (very nice!) diagram, this program should hang, because >> when b/0 is invoked, the message `matched_by_b` has already been moved into >> the save queue, and b/0 is called *while* the expression that matches >> `matched_by_a` is evaluated. The diagram says `matched_by_b` is not in the >> mailbox at that point. >> >> But the program terminates, ergo reductio ad absurdum :). >> >> I guess that diagram comes from the algorithm outlined on page 194 of the >> book. I believe you need to factor in step (5). >> >> Xavier >> >> [*] erlc foo.erl && erl -noshell -run foo >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- +-----------------+ | Enter receive. | ** Timer may have already been elapsed | Start timer | when entering this state. +------+----------+ | +-----v------+ +--------------------------------+ | is mailbox | Yes | suspend process until |timer elapsed +------> empty? +------------> a new message is put in mailbox+-----------------+ | | | | or timer has elapsed** | | | +------------+ +-----+--------------------------+ +-------------v---------------------+ +-------------------+ | |No | |if any messages have been put into | | evaluate | | +------v----------------+ |new msg arrived |the save queue, are reentered +-----> expressionsTimeout| | | take the head message | | |into the mailbox timer is cleared | | | | | from the mailbox <--------+ +-----------------------------------+ +--------+----------+ | +------+----------------+ | | | +-----------------------------------+ +-------------+ | | +-----v-------------+ +---------------+ |if any messages have been put into +----->evaluate +----------> | | match the message +---->remove message +----->the save queue, are reentered | |expressions1 | | | | against pattern1 |Yes |from mailbox | |into the mailbox, timer is cleared | +-------------+ | | +-------------------+ +---------------+ +-----------------------------------+ | | |No | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern2 |Yes |from mailbox | |the sa^e queue, are reentered | |expressions2 | | | +-------------------+ +---------------+ |into the mailbox timer is cleared | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v-------------+ +---------------+ +-----------------------------------+ +-------------+ | | | match the message +---->remove message +----->if any messages have been put into +----->evaluate +----------> | | against pattern3 |Yes |from mailbox | |the save queue, are reentered | |expressions3 | | | +-------------------+ +---------------+ |into the mailbox timer is cleared | +-------------+ | | |No +-----------------------------------+ | | | | | +-----v------------------------------+ | | | message is removed from the mailbox| | +------+ and put into a "save queue" | | | | | +------------------------------------+ | | +--------------+ | | Exit receive <-------------------------------------------------------------------------------------------------+ +--------------+ From fred@REDACTED Sat Mar 17 16:43:28 2018 From: fred@REDACTED (Fred Dushin) Date: Sat, 17 Mar 2018 11:43:28 -0400 Subject: [erlang-questions] Intermediate certificate as CA In-Reply-To: References: <45AD3112-24F6-4486-8CDD-8F5384D3C4E8@exosite.com> Message-ID: <6BA92890-7BC8-4309-8E91-D63EB985C3B6@dushin.net> So, I have a question about how to configure an Erlang endpoint to actually _send_ a complete certificate chain (or the chain minus the root cert, as I just consider that an optimization). Specifically, the docs state that a (client or server) certificate is specified via: {cert, public_key:der_encoded()} | {certfile, path()} where public_key:der_encoded() is a binary(). Looking at the source code, certfile may indeed contain a catenation of PEM certificates. However, it appears that only the first is used as OwnCert, and the rest are discarded (at least when specified via a file), e.g., https://github.com/erlang/otp/blob/OTP-20.3.1/lib/ssl/src/ssl_config.erl#L78 https://github.com/erlang/otp/blob/OTP-20.3.1/lib/ssl/src/ssl_config.erl#L86 The spec in the docs say that the cert parameter over-rides the certfile, but the type spec for cert is a binary, not a list of binaries. (I don't know if the OTP build enforces dialyzer specs) With a CA hierarchy like: CA +- ICA1 +- ICA2 +- peer1 +- peer2 ... I would like the server to send the client (as part of the handshake) the following certificate chain: peer1, ICA2, ICA1 [, CA] But in my experiments, I can only get the server to send peer1. (I am specifically interested in server behavior, but also generally interested in client behavior, as well.) Note that the only guarantee I have about my peer is that CA is a trusted CA; the SSL peer may have no knowledge of ICA2 or ICA1. Thoughts? -Fred > On Feb 23, 2018, at 8:53 AM, Ingela Andin wrote: > > That breaks the TLS protocol. The peer in either direction should send the whole certificate chain with the exception of the ROOT certificate that is optional as the peer has to own it to be able to verify it. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.lapshin@REDACTED Sat Mar 17 20:02:26 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Sat, 17 Mar 2018 22:02:26 +0300 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: <3beb4951-5fe8-42dc-f0b1-7e3a6c3073e2@schleibinger.com> References: <3beb4951-5fe8-42dc-f0b1-7e3a6c3073e2@schleibinger.com> Message-ID: This is not about mysql _server_. Look, we write a video streaming server flussonic. It has some running video streams inside and connected users that are watching live stream. It is possible to connect to flussonic with mysql command line tool or from PHP and run sql query: "SELECT * FROM streams" sqlapi parses this request and sends it to function my_cluster:select/3 that collects from ets all information about streams and sends this reply back. PHP thinks that there is mysql server, but there is no mysql server. All data is sent from RAM from ets tables. -------------- next part -------------- An HTML attachment was scrubbed... URL: From duncan@REDACTED Sat Mar 17 23:34:03 2018 From: duncan@REDACTED (duncan@REDACTED) Date: Sat, 17 Mar 2018 15:34:03 -0700 Subject: [erlang-questions] [ANN] Code Beam SF videos are up Message-ID: <20180317153403.7e43b23f706d1a78218bd3e1c66e57ee.055f404323.wbe@email23.godaddy.com> An HTML attachment was scrubbed... URL: From heinz@REDACTED Sun Mar 18 00:11:05 2018 From: heinz@REDACTED (Heinz N. Gies) Date: Sun, 18 Mar 2018 00:11:05 +0100 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: <3beb4951-5fe8-42dc-f0b1-7e3a6c3073e2@schleibinger.com> Message-ID: <99C78B65-AC46-433C-8E50-054E940141B6@licenser.net> That?s pretty cool stuff! > On 17. Mar 2018, at 20:02, Max Lapshin wrote: > > This is not about mysql _server_. > > Look, we write a video streaming server flussonic. It has some running video streams inside and connected users that are watching live stream. > > It is possible to connect to flussonic with mysql command line tool or from PHP and run sql query: "SELECT * FROM streams" > > sqlapi parses this request and sends it to function my_cluster:select/3 that collects from ets all information about streams and > sends this reply back. > > PHP thinks that there is mysql server, but there is no mysql server. All data is sent from RAM from ets tables. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Message signed with OpenPGP URL: From icfp.publicity@REDACTED Sun Mar 18 05:07:43 2018 From: icfp.publicity@REDACTED (Lindsey Kuper) Date: Sat, 17 Mar 2018 21:07:43 -0700 Subject: [erlang-questions] Call for Tutorial Proposals: ICFP 2018 Message-ID: <5aade60f476af_d12c3ffd2e057bf094954@landin.local.mail> CALL FOR TUTORIAL PROPOSALS ICFP 2018 23rd ACM SIGPLAN International Conference on Functional Programming September 23-29, 2018 St. Louis, Missouri, United States http://conf.researchr.org/home/icfp-2018 The 23rd ACM SIGPLAN International Conference on Functional Programming will be held in St. Louis, Missouri, United States on September 23-29, 2018. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for tutorials to be presented during ICFP and its co-located workshops and other events. These tutorials are the successor to the CUFP tutorials from previous years, but we also welcome tutorials whose primary audience is researchers rather than practitioners. Tutorials may focus either on a concrete technology or on a theoretical or mathematical tool. Ideally, tutorials will have a concrete result, such as "Learn to do X with Y" rather than "Learn language Y". Tutorials may occur in parallel to both ICFP and its co-located workshops, from September 23 through September 29. Additionally, ICFP is co-located with Strange Loop this year, and this will be taken into account when scheduling tutorials. ---------------------------------------------------------------------- Submission details Deadline for submission: April 9, 2018 Notification of acceptance: April 16, 2018 Prospective organizers of tutorials are invited to submit a completed tutorial proposal form in plain text format to the ICFP 2018 workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018@REDACTED by April 9, 2018. Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by April 16, 2018. The proposal form is available at: http://www.icfpconference.org/icfp2018-files/icfp18-tutorials-form.txt ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2018 organizing committee. Workshop Co-Chair: Christophe Scholliers (University of Ghent) Workshop Co-Chair: David Christiansen (Galois, Inc.) General Chair: Robby Findler (Northwestern University) Program Chair: Matthew Flatt (University of Utah) ---------------------------------------------------------------------- Further information Any queries should be addressed to the workshop co-chairs (Christophe Scholliers and David Christiansen), via email to icfp-workshops-2018@REDACTED From soverdor@REDACTED Sat Mar 17 23:47:37 2018 From: soverdor@REDACTED (Sam Overdorf) Date: Sat, 17 Mar 2018 15:47:37 -0700 Subject: [erlang-questions] dollar formatting a number Message-ID: I have frequently used basic for programming. Basic has a very nice number formatting command "print using" which can format dollar amounts. Is there something similar to this for erlang? Thanks, Sam Overdorf soverdor@REDACTED From thomas.elsgaard@REDACTED Sun Mar 18 07:32:33 2018 From: thomas.elsgaard@REDACTED (Thomas Elsgaard) Date: Sun, 18 Mar 2018 06:32:33 +0000 Subject: [erlang-questions] dollar formatting a number In-Reply-To: References: Message-ID: Hi Sam Look at io_lib:format Thomas s?n. 18. mar. 2018 kl. 07.15 skrev Sam Overdorf : > I have frequently used basic for programming. > Basic has a very nice number formatting command "print using" which > can format dollar amounts. > > Is there something similar to this for erlang? > > Thanks, > Sam Overdorf > soverdor@REDACTED > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From greim@REDACTED Sun Mar 18 11:08:59 2018 From: greim@REDACTED (greim) Date: Sun, 18 Mar 2018 11:08:59 +0100 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: <3beb4951-5fe8-42dc-f0b1-7e3a6c3073e2@schleibinger.com> Message-ID: Am 17.03.2018 um 20:02 schrieb Max Lapshin: > This is not about mysql _server_. > > Look, we write a video streaming server flussonic.? It has some running > video streams inside and connected users that are watching live stream. > > It is possible to connect to flussonic with mysql command line tool or > from PHP and run sql query:? "SELECT * FROM streams" > > sqlapi parses this request and sends it to function > ?my_cluster:select/3 that? collects from ets all information about > streams and > sends this reply back. > > PHP thinks that there is mysql server, but there is no mysql server. > All data is sent from RAM from ets tables. Thanks Max now I understand it, thats what I assumed. I will test it for my application, its a kind of software PLC. Markus From ingela.andin@REDACTED Sun Mar 18 22:58:43 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Sun, 18 Mar 2018 22:58:43 +0100 Subject: [erlang-questions] Intermediate certificate as CA In-Reply-To: <6BA92890-7BC8-4309-8E91-D63EB985C3B6@dushin.net> References: <45AD3112-24F6-4486-8CDD-8F5384D3C4E8@exosite.com> <6BA92890-7BC8-4309-8E91-D63EB985C3B6@dushin.net> Message-ID: Hi! All intermediate CA:s should be placed in the cacertfile option together with trusted ROOT certs, this way of configuring has been inherited from OpenSSL. Regards Ingela Erlang/OTP team - Ericsson AB 2018-03-17 16:43 GMT+01:00 Fred Dushin : > So, I have a question about how to configure an Erlang endpoint to > actually _send_ a complete certificate chain (or the chain minus the root > cert, as I just consider that an optimization). > > Specifically, the docs state that a (client or server) certificate is > specified via: > > {cert, public_key:der_encoded()} | > {certfile, path()} > > > where public_key:der_encoded() is a binary(). > > Looking at the source code, certfile may indeed contain a catenation of > PEM certificates. However, it appears that only the first is used as > OwnCert, and the rest are discarded (at least when specified via a file), > e.g., > > https://github.com/erlang/otp/blob/OTP-20.3.1/lib/ssl/src/ > ssl_config.erl#L78 > https://github.com/erlang/otp/blob/OTP-20.3.1/lib/ssl/src/ > ssl_config.erl#L86 > > The spec in the docs say that the cert parameter over-rides the certfile, > but the type spec for cert is a binary, not a list of binaries. (I don't > know if the OTP build enforces dialyzer specs) > > With a CA hierarchy like: > > CA > +- ICA1 > +- ICA2 > +- peer1 > +- peer2 > ... > > > I would like the server to send the client (as part of the handshake) the > following certificate chain: > > peer1, ICA2, ICA1 [, CA] > > > But in my experiments, I can only get the server to send peer1. > > (I am specifically interested in server behavior, but also generally > interested in client behavior, as well.) > > Note that the only guarantee I have about my peer is that CA is a trusted > CA; the SSL peer may have no knowledge of ICA2 or ICA1. > > Thoughts? > > -Fred > > > On Feb 23, 2018, at 8:53 AM, Ingela Andin wrote: > > That breaks the TLS protocol. The peer in either direction should send the > whole certificate chain with the exception of the ROOT certificate that is > optional as the peer has to own it to be able to verify it. > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred@REDACTED Mon Mar 19 01:35:14 2018 From: fred@REDACTED (Fred Dushin) Date: Sun, 18 Mar 2018 20:35:14 -0400 Subject: [erlang-questions] Intermediate certificate as CA In-Reply-To: References: <45AD3112-24F6-4486-8CDD-8F5384D3C4E8@exosite.com> <6BA92890-7BC8-4309-8E91-D63EB985C3B6@dushin.net> Message-ID: Interesting. That entails I trust an intermediate in my certificate chain for connections from peers, which on the face of it doesn't seem correct, as it widens the collection of trusted peers unnecessarily. Couldn't there be cases where you only want to trust peers from a certain CA (e.g., an issuing authority that is strictly below your own issuer), but not your own issuer? E.g., something like CA +- ICA1 +- server +- ICA2 +- client but where you only want to accept connections from ICA2. (I don't have this particular problem, but it does come to mind.) Semantically it's a little strange, too, but that can always be fixed with documentation. Is this because the implementation depends on OpenSSL, or just the design? If the latter, I would suspect that changing the behavior to specify own certificate chains outside of the trust store would introduce nontrivial upgrade issues for existing users, unwitting, or otherwise. -Fred > On Mar 18, 2018, at 5:58 PM, Ingela Andin wrote: > > All intermediate CA:s should be placed in the cacertfile option together with trusted ROOT certs, this way of configuring has been inherited from OpenSSL. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela.andin@REDACTED Mon Mar 19 11:22:19 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Mon, 19 Mar 2018 11:22:19 +0100 Subject: [erlang-questions] Intermediate certificate as CA In-Reply-To: References: <45AD3112-24F6-4486-8CDD-8F5384D3C4E8@exosite.com> <6BA92890-7BC8-4309-8E91-D63EB985C3B6@dushin.net> Message-ID: Hi! 2018-03-19 1:35 GMT+01:00 Fred Dushin : > Interesting. That entails I trust an intermediate in my certificate chain > for connections from peers, which on the face of it doesn't seem correct, > as it widens the collection of trusted peers unnecessarily. Couldn't there > be cases where you only want to trust peers from a certain CA (e.g., an > issuing authority that is strictly below your own issuer), but not your own > issuer? > > The peer must send its chain that will identify the root. And it is checked that you own the root. If you decide to trust an intermediate sent by the peer that is still a certificate sent by the peer and you are responsible to make the decision that you trust it as a root. Now if we have to start guessing the chain it might be problem. Also initially it was not obvious to me either that this was the way OpenSSL APIs worked. It is however documented in erlang Server side options says: *{cacertfile, path()}* Path to a file containing PEM-encoded CA certificates. The CA certificates are used to build the server certificate chain and for client authentication. The CAs are also used in the list of acceptable client CAs passed to the client when a certificate is requested. Can be omitted if there is no need to verify the client and if there are no intermediate CAs for the server certificate. client side says: *{cacertfile, path()}* Path to a file containing PEM-encoded CA certificates. The CA certificates are used during server authentication and when building the client certificate chain. > E.g., something like > > CA > +- ICA1 > +- server > +- ICA2 > +- client > > > but where you only want to accept connections from ICA2. > > (I don't have this particular problem, but it does come to mind.) > > Semantically it's a little strange, too, but that can always be fixed with > documentation. > > Is this because the implementation depends on OpenSSL, or just the design? > > The implementation does not depend opn OpenSSL in any other way that that it uses cryptolib from OpenSSL via the crypto application. But the API is "insanely" backwards compatible with older version (pre R14) that used the OpenSSL as it implementation. Regards Ingela Erlang/OTP team - Ericsson AB If the latter, I would suspect that changing the behavior to specify own > certificate chains outside of the trust store would introduce nontrivial > upgrade issues for existing users, unwitting, or otherwise. > > -Fred > > On Mar 18, 2018, at 5:58 PM, Ingela Andin wrote: > > All intermediate CA:s should be placed in the cacertfile option together > with trusted ROOT certs, this way of configuring has been inherited from > OpenSSL. > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t@REDACTED Tue Mar 20 00:01:18 2018 From: t@REDACTED (Tristan Sloughter) Date: Mon, 19 Mar 2018 16:01:18 -0700 Subject: [erlang-questions] Patch package OTP 20.3.1 released In-Reply-To: <20180316103547.GA34029@duper.otp.ericsson.se> References: <20180316103547.GA34029@duper.otp.ericsson.se> Message-ID: <1521500478.806715.1308906144.30C18B96@webmail.messagingengine.com> Does this not include the gen_statem patch? On Fri, Mar 16, 2018, at 3:35 AM, Ingela Anderton Andin wrote: > Patch Package: OTP 20.3.1 > Git Tag: OTP-20.3.1 > Date: 2018-03-16 > Trouble Report Id: OTP-14981 > Seq num: > System: OTP > Release: 20 > Application: ssl-8.2.5 > Predecessor: OTP 20.3 > > Check out the git tag OTP-20.3.1, and build a full OTP system > including documentation. Apply one or more applications from this > build as patches to your installation using the 'otp_patch_apply' > tool. For information on install requirements, see descriptions for > each application version below. > > --------------------------------------------------------------------- > --- ssl-8.2.5 ------------------------------------------------------- > --------------------------------------------------------------------- > > Note! The ssl-8.2.5 application can *not* be applied independently of > other applications on an arbitrary OTP 20 installation. > > On a full OTP 20 installation, also the following runtime > dependencies have to be satisfied: > -- crypto-4.2 (first satisfied in OTP 20.2) > -- public_key-1.5 (first satisfied in OTP 20.1) > > > --- Fixed Bugs and Malfunctions --- > > OTP-14981 Application(s): ssl > > Fix filter function to not incorrectly exclude AEAD > cipher suites > > > Full runtime dependencies of ssl-8.2.5: crypto-4.2, erts-7.0, > inets-5.10.7, kernel-3.0, public_key-1.5, stdlib-3.2 > > > --------------------------------------------------------------------- > --------------------------------------------------------------------- > --------------------------------------------------------------------- > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From logicmoo@REDACTED Mon Mar 19 09:55:56 2018 From: logicmoo@REDACTED (Douglas Miles) Date: Mon, 19 Mar 2018 01:55:56 -0700 Subject: [erlang-questions] Looking for Erlang Implementation in Prolog Message-ID: Hi, I was looking at " The Practical Application of Prolog " at http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.3972&rep=rep1&type=pdf It just doesn't look like enough code. Does anyone know where I can find a copy of the original interpreter? Also, am happy to make it run in a current prolog. -Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordeev.vladimir.v@REDACTED Tue Mar 20 09:09:10 2018 From: gordeev.vladimir.v@REDACTED (Vladimir Gordeev) Date: Tue, 20 Mar 2018 11:09:10 +0300 Subject: [erlang-questions] Update trace flags after function return Message-ID: I know that I can apply tracing flags to executing process right after start of the call, for example like that: erlang:trace_pattern({erlang, get, 1}, [{['_'], [], [{trace, [], [call, timestamp]}]}], [meta]). Is there a way to apply flags right after return of the call? Say I want to extensively trace that particular function and nothing else. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebegumisa@REDACTED Tue Mar 20 12:30:48 2018 From: ebegumisa@REDACTED (Edmond Begumisa) Date: Tue, 20 Mar 2018 22:30:48 +1100 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: Message-ID: Wow. EXCELLENT WORK!! This is an *AWESOME* extremely useful idea. And your timing couldn't have been more perfect for me. I work on a team where there are a number of non-Erlang programmers. Frequently, I encounter two time-consuming tasks that this could solve: 1. Expose an API to an OTP app for non-Erlangers on the team to access. 2. Expose a CLI for operators and other programmers. I frequently go through the pain of writing yet another HTTP API to deal with 1). Your tool can make it easy in many instances to whip up a prototype API accessed over SQL for python, js and other developers to use. Everyone on my team who doesn't speak Erlang speaks fluent SQL. Moreover SQL would make an API very flexible. I usually deal with 2) by adding custom REPL to the Erlang SSH app. This also involves some tedium because for the CLI to be useful, it has to be flexible which means you have to envisage all kinds of scenarios that operators will want to deal with. A WMI-like SQL CLI would make this much much easier since where we deploy, operators also tend to speak SQL. And this week, I just started working on a dreaded HTTP API for a new OTP app. I can abandon that code now! Thanks a lot for this. I think this is going to have a profound impact on my projects. - Edmond - On Tue, 13 Mar 2018 01:34:53 +1100, Max Lapshin wrote: > Hi. > > > We have released our sqlapi library: https://github.com/flussonic/sqlapi > > This library can help you to make an SQL server from your existing > server. > > For example you have a server and let it be ejabberd. You want to give a > list of connected users. > Of course you will start from making HTTP endpoint that will reply with > JSON with list of users. > > Then you will add some sort, filter, paging as query params and then > will write library that allows >to make all this params and send them. > > Another option is to put our sqlapi library, connect it to storage of > connected users and then >connect to server as if it is a SQL server. > > > Here another real example: https://flussonic.com/doc/api/sql-cluster > User can connect to our >flussonic server and access whole cluster by > sending commands like INSERT, UPDATE, DELETE or READ. > > > This approach may be convenient if you have table data and mainly CRUD > operations. > > > Similar approach is used in Sphinx search engine: > http://sphinxsearch.com/docs/latest/sphinxql.html > > We have created all this to connect from python sqlalchemy and Ruby on > Rails to Flussonic. > If you want the same, this library may help. > > > the only dependency is ranch and it is optional, not required for tests. > Some code is derived from https://github.com/altenwald/myproto but we > had to remove neotoma sql >parser, because we need speed! Thanks for > https://github.com/master/mongosql/blob/master/src/>sql92_parser.yrl > > > > -- Using Opera's mail client: http://www.opera.com/mail/ From max.lapshin@REDACTED Tue Mar 20 15:05:54 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Tue, 20 Mar 2018 17:05:54 +0300 Subject: [erlang-questions] sqlapi: library to connect to your erlang server via SQL In-Reply-To: References: Message-ID: Great! Let's try to use it! -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Wed Mar 21 11:58:43 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Wed, 21 Mar 2018 11:58:43 +0100 Subject: [erlang-questions] Patch package OTP 20.3.1 released In-Reply-To: <1521500478.806715.1308906144.30C18B96@webmail.messagingengine.com> References: <20180316103547.GA34029@duper.otp.ericsson.se> <1521500478.806715.1308906144.30C18B96@webmail.messagingengine.com> Message-ID: <20180321105843.GA71560@erix.ericsson.se> On Mon, Mar 19, 2018 at 04:01:18PM -0700, Tristan Sloughter wrote: > Does this not include the gen_statem patch? Nope. I am working on that one - did not manage to get all administration stuff done in time from when I was in San Francisco. With a bit of luck the patched gen_statem can be released tomorrow CET. / Raimo > > On Fri, Mar 16, 2018, at 3:35 AM, Ingela Anderton Andin wrote: > > Patch Package: OTP 20.3.1 > > Git Tag: OTP-20.3.1 > > Date: 2018-03-16 > > Trouble Report Id: OTP-14981 > > Seq num: > > System: OTP > > Release: 20 > > Application: ssl-8.2.5 > > Predecessor: OTP 20.3 > > > > Check out the git tag OTP-20.3.1, and build a full OTP system > > including documentation. Apply one or more applications from this > > build as patches to your installation using the 'otp_patch_apply' > > tool. For information on install requirements, see descriptions for > > each application version below. > > > > --------------------------------------------------------------------- > > --- ssl-8.2.5 ------------------------------------------------------- > > --------------------------------------------------------------------- > > > > Note! The ssl-8.2.5 application can *not* be applied independently of > > other applications on an arbitrary OTP 20 installation. > > > > On a full OTP 20 installation, also the following runtime > > dependencies have to be satisfied: > > -- crypto-4.2 (first satisfied in OTP 20.2) > > -- public_key-1.5 (first satisfied in OTP 20.1) > > > > > > --- Fixed Bugs and Malfunctions --- > > > > OTP-14981 Application(s): ssl > > > > Fix filter function to not incorrectly exclude AEAD > > cipher suites > > > > > > Full runtime dependencies of ssl-8.2.5: crypto-4.2, erts-7.0, > > inets-5.10.7, kernel-3.0, public_key-1.5, stdlib-3.2 > > > > > > --------------------------------------------------------------------- > > --------------------------------------------------------------------- > > --------------------------------------------------------------------- > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From stamarit@REDACTED Wed Mar 21 12:53:33 2018 From: stamarit@REDACTED (Salvador Tamarit) Date: Wed, 21 Mar 2018 12:53:33 +0100 Subject: [erlang-questions] WFLP 2018: Call for Papers Message-ID: ========================================================= * WFLP 2018: Call for Papers* ========================================================= 26th International Workshop on Functional and (constraint) Logic Programming WFLP 2018 http://ppdp-lopstr-18.cs.uni-frankfurt.de/wflp18.html Frankfurt, Germany, September 6, 2018 (co-located with PPDP 2018 and LOPSTR 2018) *Important Dates* Abstract submission: June 27, 2018 Paper submission: July 2, 2018 Notification: July 27, 2018 Camera-ready: August 24, 2018 Workshop: September 6, 2018 *WFLP 2018* The international Workshop on Functional and (constraint) Logic Programming (WFLP) aims at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. WFLP has a reputation for being a lively and friendly forum, and it is open for presenting and discussing work in progress, technical contributions, experience reports, experiments, reviews, and system descriptions. The 26th International Workshop on Functional and (constraint) Logic Programming (WFLP 2018) will be held at the Goethe-University Frankfurt am Main, Germany. Previous WFLP editions were WFLP 2017 (W?rzburg, Germany), WFLP 2016 (Leipzig, Germany), WFLP 2014 (Wittenberg, Germany), WFLP 2013 (Kiel, Germany), WFLP 2012 (Nagoya, Japan), WFLP 2011 (Odense, Denmark), WFLP 2010 (Madrid, Spain), WFLP 2009 (Brasilia, Brazil), WFLP 2008 (Siena, Italy), WFLP 2007 (Paris, France), WFLP 2006 (Madrid, Spain), WCFLP 2005 (Tallinn, Estonia), WFLP 2004 (Aachen, Germany), WFLP 2003 (Valencia, Spain), WFLP 2002 (Grado, Italy), WFLP 2001 (Kiel, Germany), WFLP 2000 (Benicassim, Spain), WFLP'99 (Grenoble, France), WFLP'98 (Bad Honnef, Germany), WFLP'97 (Schwarzenberg, Germany), WFLP'96 (Marburg, Germany), WFLP'95 (Schwarzenberg, Germany), WFLP'94 (Schwarzenberg, Germany), WFLP'93 (Rattenberg, Germany), and WFLP'92 (Karlsruhe, Germany). WFLP 2018 will be co-located with PPDP 2018 (International Symposium on Principles and Practice of Declarative Programming) and LOPSTR 2018 (International Symposium on Logic-Based Program Synthesis and Transformation. *Topics* The topics of interest cover all aspects of functional and logic programming. They include (but are not limited to): * Functional programming * Logic programming * Constraint programming * Deductive databases, data mining * Extensions of declarative languages, objects * Multi-paradigm declarative programming * Foundations, semantics, non-monotonic reasoning, dynamics * Parallelism, concurrency * Program analysis, abstract interpretation * program and model manipulation * Program transformation, partial evaluation, meta-programming * Specification, verification * Debugging, testing * Knowledge representation, machine learning * Interaction of declarative programming with other formalisms * Implementation of declarative languages * Advanced programming environments and tools * Software techniques for declarative programming * Applications The primary focus is on new and original research results, but submissions describing innovative products, prototypes under development, application systems, or interesting experiments (e.g., benchmarks) are also encouraged. Survey papers that present some aspects of the above topics from a new perspective, and experience reports are also welcome. Papers must be written and presented in English. Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). *Submission Guidelines* Submission is via Easychair submission website for WFLP 2018: https://easychair.org/conferences/?conf=wflp2018 Authors are invited to submit papers in the following categories: + Regular research paper + Work-in-progress report + System description Regular research papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been formally published or that are simultaneously submitted to a journal, conference, or workshop with formal proceedings. They will be judged on the basis of significance, relevance, correctness, originality, and clarity. For work-in-progress reports and system descriptions, less formal rules apply, and presentation-only submissions (talk and discussion, but no paper in the formal proceedings) are possible. Please contact the PC chair with any questions. All submissions must be formatted in the Lecture Notes in Computer Science style. Submissions cannot exceed 15 pages including references but excluding well-marked appendices not intended for publication. Reviewers are not required to read the appendices, and thus papers should be intelligible without them. However, all submissions (especially work-in-progress reports and system descriptions) may be considerably shorter than 15 pages. *Proceedings* All papers accepted for presentation at the conference will be published in informal proceedings publicly available at the Computing Research Repository. According to the program committee reviews, submissions can be directly accepted for publication in the formal post-conference proceedings. The formal post-conference proceedings will be published in both electronic and paper formats by Springer in the Lecture Notes in Computer Science series. After the conference, all authors accepted only for presentation will be invited to revise and/or extend their submissions in the light of the feedback solicited at the conference. Then, after another round of reviewing, these revised papers may also be published in the formal proceedings. Therefore, all accepted papers will be published in open-access, and the authors can also decide to publish their work in the Springer LNCS formal proceedings. *Program Committee* + Slim Abdennadher, German University in Cairo, Egypt + Maria Alpuente, Universitat Polit?cnica de Val?ncia, Spain + Sergio Antoy, Portland State University, USA + Olaf Chitil, University of Kent, UK + Maria del Mar Gallardo, Universidad de M?laga, Spain + Michael Hanus, University of Kiel, Germany + Herbert Kuchen, University of M?nster, Germany + Kostis Sagonas, Uppsala University, Sweden + Tom Schrijvers, Katholieke Universiteit Leuven, Belgium + Sibylle Schwarz, HTWK Leipzig, Germany + Martina Seidl, Johannes Kepler University Linz, Austria + Dietmar Seipel, University of W?rzburg, Germany + Josep Silva, Universitat Polit?cnica de Val?ncia, Spain (Program Chair) + Salvador Tamarit, Universidad Polit?cnica de Madrid, Spain + Janis Voigtl?nder, University of Duisburg-Essen, Germany + Johannes Waldmann, HTWK Leipzig, Germany *Organizing Committee* David Sabel (General Chair), Computer Science Institute Goethe-University Frankfurt am Main, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From prakashkumar_parmar@REDACTED Wed Mar 21 11:13:57 2018 From: prakashkumar_parmar@REDACTED (Prakash Parmar) Date: Wed, 21 Mar 2018 15:43:57 +0530 (IST) Subject: [erlang-questions] Incorrect Beam Comparison Message-ID: <1521627237.9538232@webmail.thbs.com> Hello Everyone, I have a two identical branch in SVN and I'm trying to compare beam file of both branch. For same I'm using beam_lib:cmp/2 . beam_lib:cmp("./erl_experiment-0.1.0/ebin/mynew_server.beam","./erl_experiment-0.2.0/ebin/mynew_server.beam"). {error,beam_lib,{chunks_different,"Abst"}} Though both files are Identical. Still beam_lib:cmp/2 is giving difference in 'Abst' chunk. Does anyone have idea what's going wrong or reason ? Here is a svn diff of between both branch for reference. user@REDACTED:~/svn/erl_experiment/branches/rel_v0_2_0$ svn diff -r18 Index: lib/erl_experiment/src/erl_experiment.app.src _===================================================================_ --- lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_1_0) (revision 18) +++ lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_2_0) (working copy) @@ -1,6 +1,6 @@ {application, erl_experiment, [{description, "An OTP application"}, - {vsn, "0.1.0"}, + {vsn, "0.2.0"}, {registered, []}, {mod, { erl_experiment_app, []}}, {applications, Index: rebar.config =================================================================== --- rebar.config (.../rel_v0_1_0) (revision 18) +++ rebar.config (.../rel_v0_2_0) (working copy) @@ -5,7 +5,7 @@ { base_dir, "../_build"}. { out_dir, "../_build/default/lib/"}. -{relx, [{release, {erl_experiment, "0.1.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, +{relx, [{release, {erl_experiment, "0.2.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, {dev_mode, false}, {include_erts, true}, Cheers, Prakash ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** -------------- next part -------------- An HTML attachment was scrubbed... URL: From gordeev.vladimir.v@REDACTED Wed Mar 21 20:14:17 2018 From: gordeev.vladimir.v@REDACTED (Vladimir Gordeev) Date: Wed, 21 Mar 2018 22:14:17 +0300 Subject: [erlang-questions] Incorrect Beam Comparison In-Reply-To: <1521627237.9538232@webmail.thbs.com> References: <1521627237.9538232@webmail.thbs.com> Message-ID: > both files are Identical. Indentical in the sense that content of *.beam files produce exactly same hashsum? On Wed, Mar 21, 2018 at 1:13 PM, Prakash Parmar < prakashkumar_parmar@REDACTED> wrote: > Hello Everyone, > > > > I have a two identical branch in SVN and I'm trying to compare beam file > of both branch. For same I'm using beam_lib:cmp/2 . > > > > beam_lib:cmp("./erl_experiment-0.1.0/ebin/mynew_server.beam","./erl_ > experiment-0.2.0/ebin/mynew_server.beam"). > {error,beam_lib,{chunks_different,"Abst"}} > > > > Though both files are Identical. Still beam_lib:cmp/2 is giving difference > in 'Abst' chunk. > > > > Does anyone have idea what's going wrong or reason ? > > > > Here is a svn diff of between both branch for reference. > > > > user@REDACTED:~/svn/erl_experiment/branches/rel_v0_2_0$ svn diff -r18 > Index: lib/erl_experiment/src/erl_experiment.app.src > _===================================================================_ > --- lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_1_0) > (revision 18) > +++ lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_2_0) > (working copy) > @@ -1,6 +1,6 @@ > {application, erl_experiment, > [{description, "An OTP application"}, > - {vsn, "0.1.0"}, > + {vsn, "0.2.0"}, > {registered, []}, > {mod, { erl_experiment_app, []}}, > {applications, > Index: rebar.config > =================================================================== > --- rebar.config (.../rel_v0_1_0) (revision 18) > +++ rebar.config (.../rel_v0_2_0) (working copy) > @@ -5,7 +5,7 @@ > { base_dir, "../_build"}. > { out_dir, "../_build/default/lib/"}. > > -{relx, [{release, {erl_experiment, "0.1.0"}, [ erl_experiment, kernel, > stdlib, sasl ]}, > +{relx, [{release, {erl_experiment, "0.2.0"}, [ erl_experiment, kernel, > stdlib, sasl ]}, > > {dev_mode, false}, > {include_erts, true}, > > > Cheers, > > Prakash > > > > > > ******* DISCLAIMER: This email and any files transmitted with it are > privileged and confidential information and intended solely for the use of > the individual or entity to which they are addressed. If you are not the > intended recipient, please notify the sender by e-mail and delete the > original message. Further, you are not to copy, disclose, or distribute > this e-mail or its contents to any other person and any such actions are > unlawful. This e-mail may contain viruses. Torry Harris Business Solutions > has taken every reasonable precaution to minimize this risk, but is not > liable for any damage you may sustain as a result of any virus in this > e-mail. The recipient should check this email and any attachments for the > presence of viruses. THBS reserves the right to monitor and review the > content of all messages sent to or from this e-mail address******** > > ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prakashkumar_parmar@REDACTED Thu Mar 22 05:31:38 2018 From: prakashkumar_parmar@REDACTED (Prakash Parmar) Date: Thu, 22 Mar 2018 10:01:38 +0530 (IST) Subject: [erlang-questions] Incorrect Beam Comparison In-Reply-To: References: <1521627237.9538232@webmail.thbs.com> Message-ID: <1521693098.62517420@webmail.thbs.com> Source code of Both files are same but both compiled from different Branch. Chksum of both *.erl file are same but *.beam files are different. -----Original Message----- From: "Vladimir Gordeev" Sent: Thursday, March 22, 2018 12:44am To: "Prakash Parmar" , erlang-questions@REDACTED Subject: Re: [erlang-questions] Incorrect Beam Comparison > both files are Identical. Indentical in the sense that content of *.beam files produce exactly same hashsum? On Wed, Mar 21, 2018 at 1:13 PM, Prakash Parmar <[ prakashkumar_parmar@REDACTED ]( mailto:prakashkumar_parmar@REDACTED )> wrote: Hello Everyone, I have a two identical branch in SVN and I'm trying to compare beam file of both branch. For same I'm using beam_lib:cmp/2 . beam_lib:cmp("./erl_experiment-0.1.0/ebin/mynew_server.beam","./erl_experiment-0.2.0/ebin/mynew_server.beam"). {error,beam_lib,{chunks_different,"Abst"}} Though both files are Identical. Still beam_lib:cmp/2 is giving difference in 'Abst' chunk. Does anyone have idea what's going wrong or reason ? Here is a svn diff of between both branch for reference. user@REDACTED:~/svn/erl_experiment/branches/rel_v0_2_0$ svn diff -r18 Index: lib/erl_experiment/src/erl_experiment.app.src _===================================================================_ --- lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_1_0) (revision 18) +++ lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_2_0) (working copy) @@ -1,6 +1,6 @@ {application, erl_experiment, [{description, "An OTP application"}, - {vsn, "0.1.0"}, + {vsn, "0.2.0"}, {registered, []}, {mod, { erl_experiment_app, []}}, {applications, Index: rebar.config =================================================================== --- rebar.config (.../rel_v0_1_0) (revision 18) +++ rebar.config (.../rel_v0_2_0) (working copy) @@ -5,7 +5,7 @@ { base_dir, "../_build"}. { out_dir, "../_build/default/lib/"}. -{relx, [{release, {erl_experiment, "0.1.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, +{relx, [{release, {erl_experiment, "0.2.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, {dev_mode, false}, {include_erts, true}, Cheers, Prakash ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** _______________________________________________ erlang-questions mailing list [ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED ) [ http://erlang.org/mailman/listinfo/erlang-questions ]( http://erlang..org/mailman/listinfo/erlang-questions ) ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmkolesnikov@REDACTED Thu Mar 22 06:27:43 2018 From: dmkolesnikov@REDACTED (dmkolesnikov@REDACTED) Date: Thu, 22 Mar 2018 07:27:43 +0200 Subject: [erlang-questions] Incorrect Beam Comparison In-Reply-To: <1521693098.62517420@webmail.thbs.com> References: <1521627237.9538232@webmail.thbs.com> <1521693098.62517420@webmail.thbs.com> Message-ID: Hello, Compilation process injects various attributes to you module. Check them out to find difference xxx:module_info() -Dmitry > On 22 Mar 2018, at 6.31, Prakash Parmar wrote: > > Source code of Both files are same but both compiled from different Branch. Chksum of both *.erl file are same but *.beam files are different. > > > -----Original Message----- > From: "Vladimir Gordeev" > Sent: Thursday, March 22, 2018 12:44am > To: "Prakash Parmar" , erlang-questions@REDACTED > Subject: Re: [erlang-questions] Incorrect Beam Comparison > > > both files are Identical. > > Indentical in the sense that content of *.beam files produce exactly same hashsum? > >> On Wed, Mar 21, 2018 at 1:13 PM, Prakash Parmar wrote: >> Hello Everyone, >> >> I have a two identical branch in SVN and I'm trying to compare beam file of both branch. For same I'm using beam_lib:cmp/2 . >> >> beam_lib:cmp("./erl_experiment-0.1.0/ebin/mynew_server.beam","./erl_experiment-0.2.0/ebin/mynew_server.beam"). >> {error,beam_lib,{chunks_different,"Abst"}} >> >> Though both files are Identical. Still beam_lib:cmp/2 is giving difference in 'Abst' chunk. >> >> Does anyone have idea what's going wrong or reason ? >> >> Here is a svn diff of between both branch for reference. >> >> user@REDACTED:~/svn/erl_experiment/branches/rel_v0_2_0$ svn diff -r18 >> Index: lib/erl_experiment/src/erl_experiment.app.src >> _===================================================================_ >> --- lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_1_0) (revision 18) >> +++ lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_2_0) (working copy) >> @@ -1,6 +1,6 @@ >> {application, erl_experiment, >> [{description, "An OTP application"}, >> - {vsn, "0.1.0"}, >> + {vsn, "0.2.0"}, >> {registered, []}, >> {mod, { erl_experiment_app, []}}, >> {applications, >> Index: rebar.config >> =================================================================== >> --- rebar.config (.../rel_v0_1_0) (revision 18) >> +++ rebar.config (.../rel_v0_2_0) (working copy) >> @@ -5,7 +5,7 @@ >> { base_dir, "../_build"}. >> { out_dir, "../_build/default/lib/"}. >> >> -{relx, [{release, {erl_experiment, "0.1.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, >> +{relx, [{release, {erl_experiment, "0.2.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, >> >> {dev_mode, false}, >> {include_erts, true}, >> >> Cheers, >> Prakash >> >> >> >> >> ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** >> ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > > > > ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** > ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From prakashkumar_parmar@REDACTED Thu Mar 22 07:15:10 2018 From: prakashkumar_parmar@REDACTED (Prakash Parmar) Date: Thu, 22 Mar 2018 11:45:10 +0530 (IST) Subject: [erlang-questions] Incorrect Beam Comparison In-Reply-To: References: <1521627237.9538232@webmail.thbs.com> <1521693098.62517420@webmail.thbs.com> Message-ID: <1521699310.83684955@webmail.thbs.com> I had decoded "Abst" chunk of both beam file and there are difference in Absolute path, rest of chunk content are same. I think during compilation source directory's relative path is being added into this Chunk. Is there any way to ignore path inclusion in "Abst" chunk ? or Is there any option to say the Compiler to use Absolute path rather than Relative path. I have strip both beam file using beam_lib:strip/1 to remove 'debug_info' and 'abstract_code' chunk. But it shows difference in "Line" chunk :( Does anyone explain what is use of "Line" chunk and Why there is difference ? - Prakash -----Original Message----- From: dmkolesnikov@REDACTED Sent: Thursday, March 22, 2018 10:57am To: "Prakash Parmar" Cc: "Vladimir Gordeev" , erlang-questions@REDACTED Subject: Re: [erlang-questions] Incorrect Beam Comparison Hello, Compilation process injects various attributes to you module. Check them out to find difference xxx:module_info() -Dmitry On 22 Mar 2018, at 6.31, Prakash Parmar <[ prakashkumar_parmar@REDACTED ]( mailto:prakashkumar_parmar@REDACTED )> wrote: Source code of Both files are same but both compiled from different Branch. Chksum of both *.erl file are same but *.beam files are different. -----Original Message----- From: "Vladimir Gordeev" <[ gordeev.vladimir.v@REDACTED ]( mailto:gordeev.vladimir.v@REDACTED )> Sent: Thursday, March 22, 2018 12:44am To: "Prakash Parmar" <[ prakashkumar_parmar@REDACTED ]( mailto:prakashkumar_parmar@REDACTED )>, [ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED ) Subject: Re: [erlang-questions] Incorrect Beam Comparison > both files are Identical.. Indentical in the sense that content of *.beam files produce exactly same hashsum? On Wed, Mar 21, 2018 at 1:13 PM, Prakash Parmar <[ prakashkumar_parmar@REDACTED ]( mailto:prakashkumar_parmar@REDACTED )> wrote: Hello Everyone, I have a two identical branch in SVN and I'm trying to compare beam file of both branch. For same I'm using beam_lib:cmp/2 . beam_lib:cmp("./erl_experiment-0.1.0/ebin/mynew_server.beam","./erl_experiment-0.2.0/ebin/mynew_server.beam"). {error,beam_lib,{chunks_different,"Abst"}} Though both files are Identical. Still beam_lib:cmp/2 is giving difference in 'Abst' chunk. Does anyone have idea what's going wrong or reason ? Here is a svn diff of between both branch for reference. user@REDACTED:~/svn/erl_experiment/branches/rel_v0_2_0$ svn diff -r18 Index: lib/erl_experiment/src/erl_experiment.app.src _===================================================================_ --- lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_1_0) (revision 18) +++ lib/erl_experiment/src/erl_experiment.app.src (.../rel_v0_2_0) (working copy) @@ -1,6 +1,6 @@ {application, erl_experiment, [{description, "An OTP application"}, - {vsn, "0.1.0"}, + {vsn, "0.2.0"}, {registered, []}, {mod, { erl_experiment_app, []}}, {applications, Index: rebar.config =================================================================== --- rebar.config (.../rel_v0_1_0) (revision 18) +++ rebar.config (.../rel_v0_2_0) (working copy) @@ -5,7 +5,7 @@ { base_dir, "../_build"}. { out_dir, "../_build/default/lib/"}. -{relx, [{release, {erl_experiment, "0.1.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, +{relx, [{release, {erl_experiment, "0.2.0"}, [ erl_experiment, kernel, stdlib, sasl ]}, {dev_mode, false}, {include_erts, true}, Cheers, Prakash ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** _______________________________________________ erlang-questions mailing list [ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED ) [ http://erlang.org/mailman/listinfo/erlang-questions ]( http://erlang.org/mailman/listinfo/erlang-questions ) ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses.. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** _______________________________________________ erlang-questions mailing list [ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED ) [ http://erlang.org/mailman/listinfo/erlang-questions ]( http://erlang.org/mailman/listinfo/erlang-questions ) ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address******** ******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address.******** -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Thu Mar 22 12:30:27 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Thu, 22 Mar 2018 12:30:27 +0100 Subject: [erlang-questions] Patch package 20.3.2 released Message-ID: <20180322113027.GA64375@erix.ericsson.se> Patch Package: OTP 20.3.2 Git Tag: OTP-20.3.2 Date: 2018-03-22 Trouble Report Id: OTP-13995, OTP-14990 Seq num: System: OTP Release: 20 Application: ssh-4.6.7, stdlib-3.4.5 Predecessor: OTP 20.3.1 Check out the git tag OTP-20.3.2, and build a full OTP system including documentation. Apply one or more applications from this build as patches to your installation using the 'otp_patch_apply' tool. For information on install requirements, see descriptions for each application version below. --------------------------------------------------------------------- --- ssh-4.6.7 ------------------------------------------------------- --------------------------------------------------------------------- Note! The ssh-4.6.7 application can *not* be applied independently of other applications on an arbitrary OTP 20 installation. On a full OTP 20 installation, also the following runtime dependencies have to be satisfied: -- crypto-4.2 (first satisfied in OTP 20.2) -- public_key-1.5.2 (first satisfied in OTP 20.2) --- Fixed Bugs and Malfunctions --- OTP-14990 Application(s): ssh Fix bad spec in ssh.hrl: double_algs(). Full runtime dependencies of ssh-4.6.7: crypto-4.2, erts-6.0, kernel-3.0, public_key-1.5.2, stdlib-3.3 --------------------------------------------------------------------- --- stdlib-3.4.5 ---------------------------------------------------- --------------------------------------------------------------------- The stdlib-3.4.5 application can be applied independently of other applications on a full OTP 20 installation. --- Fixed Bugs and Malfunctions --- OTP-13995 Application(s): stdlib The Module:init/1 function in gen_statem may return an actions list containing any action, but an erroneous check only allowed state enter actions so e.g {next_event,internal,event} caused a server crash. This bug has been fixed. Full runtime dependencies of stdlib-3.4.5: compiler-5.0, crypto-3.3, erts-9.0, kernel-5.0, sasl-3.0 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-questions@REDACTED Thu Mar 22 14:16:43 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Thu, 22 Mar 2018 14:16:43 +0100 Subject: [erlang-questions] gen_statem 20.3 init/1 - {next_event, internal, initial_event} In-Reply-To: <76371617-5E73-40BA-9C0F-B28A41E7E5D2@gmail.com> References: <1D6933EF-47EC-46A1-813A-5CC0511FFBD9@gmail.com> <20180315135141.GA39265@erix.ericsson.se> <76371617-5E73-40BA-9C0F-B28A41E7E5D2@gmail.com> Message-ID: <20180322131643.GB64375@erix.ericsson.se> The fix is part of the newly released emergency patch package OTP-20.3.2. / Raimo On Thu, Mar 15, 2018 at 03:17:14PM +0100, Peter Morgan wrote: > Thanks very much for the diff! > Regards > Peter > > > On 15 Mar 2018, at 14:51, Raimo Niskanen wrote: > > > > I am sorry i fubmled when optimizing gen_statem. That typo is mine, > > besides the erroneous actions list handling from init/1. > > > > This diff should fix the problems: > > > > diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl > > index b1d99e2..eb0d6bd 100644 > > --- a/lib/stdlib/src/gen_statem.erl > > +++ b/lib/stdlib/src/gen_statem.erl > > @@ -677,9 +677,9 @@ enter(Module, Opts, State, Data, Server, Actions, > > Parent) -> > > NewDebug = ?sys_debug(Debug, {Name,State}, {enter,Event,State}), > > case call_callback_mode(S) of > > #state{} = NewS -> > > - loop_event_actions( > > + loop_event_actions_list( > > Parent, NewDebug, NewS, > > - Events, Event, State, Data, #trans_opts{}, > > + Events, Event, State, Data, false, > > NewActions, CallEnter); > > [Class,Reason,Stacktrace] -> > > terminate( > > @@ -1295,7 +1295,7 @@ parse_actions_next_event( > > next_events_r = [{Type,Content}|NextEventsR]}); > > _ -> > > [error, > > - {bad_action_from_state_function,{next_events,Type,Content}}, > > + {bad_action_from_state_function,{next_event,Type,Content}}, > > ?STACKTRACE(), > > ?not_sys_debug] > > end; > > @@ -1312,7 +1312,7 @@ parse_actions_next_event( > > next_events_r = [{Type,Content}|NextEventsR]}); > > _ -> > > [error, > > - {bad_action_from_state_function,{next_events,Type,Content}}, > > + {bad_action_from_state_function,{next_event,Type,Content}}, > > ?STACKTRACE(), > > Debug] > > end. > > > > > > > > That, running it through our daily builds, and apparently writing a > > writing a missing test case. ;-) > > > > I am at the San Francisco Code Beam event right now so a patch will have to > > wait to next week.. > > > > Sorry about this! > > / Raimo Niskanen > > > > > > > >> On Thu, Mar 15, 2018 at 12:32:04PM +0000, Guilherme Andrade wrote: > >> Crash log mentions 'next_events' (rather than 'next_event'.) Perhaps you > >> have a typo somewhere? But if that's the case, then it's weird that 20.2.x > >> doesn't complaint about it as well. > >> > >> On 15 March 2018 at 11:23, Peter Morgan > >> wrote: > >> > >>> Hello - > >>> > >>> I am sure I am doing something daft. I picked up 20.3 this morning and > >>> have some gen_statem code that previously worked in 20.2.4: > >>> > >>> -module(ex1). > >>> > >>> -export([callback_mode/0]). > >>> -export([handle_event/4]). > >>> -export([init/1]). > >>> -export([start/0]). > >>> > >>> start() -> > >>> gen_statem:start({local, ?MODULE}, ?MODULE, [], []). > >>> > >>> init([]) -> > >>> {ok, > >>> initial_state, > >>> initial_data, > >>> {next_event, internal, initial_event}}. > >>> > >>> callback_mode() -> > >>> handle_event_function. > >>> > >>> handle_event(Type, Event, State, Data) -> > >>> error_logger:info_report([{type, Type}, > >>> {event, Event}, > >>> {state, State}, > >>> {data, Data}]), > >>> keep_state_and_data. > >>> > >>> > >>> > >>> > >>> brew switch erlang 20.2.4 > >>> > >>> Erlang/OTP 20 [erts-9.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] > >>> [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > >>> > >>> Eshell V9.2.1 (abort with ^G) > >>> 1> ex1:start(). > >>> {ok,<0.62.0>} > >>> > >>> =INFO REPORT==== 15-Mar-2018::12:13:29 === > >>> type: internal > >>> event: initial_event > >>> state: initial_state > >>> data: initial_data > >>> > >>> > >>> > >>> brew switch erlang 20.3 > >>> Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] > >>> [async-threads:10] [hipe] [kernel-poll:false] [dtrace] > >>> > >>> Eshell V9.3 (abort with ^G) > >>> 1> c(ex1). > >>> {ok,ex1} > >>> 2> ex1:start(). > >>> {ok,<0.67.0>} > >>> 3> > >>> =ERROR REPORT==== 15-Mar-2018::12:15:02 === > >>> ** State machine ex1 terminating > >>> ** Last event = {internal,init_state} > >>> ** When server state = {initial_state,initial_data} > >>> ** Reason for termination = error:{bad_action_from_state_function, > >>> {next_events,internal, > >>> initial_event}} > >>> ** Callback mode = handle_event_function > >>> ** Stacktrace = > >>> ** [{gen_statem,parse_actions_next_event,7, > >>> [{file,"gen_statem.erl"},{line,1299}]}, > >>> {gen_statem,loop_event_actions_list,10, > >>> [{file,"gen_statem.erl"},{line,1194}]}, > >>> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] > >>> > >>> > >>> The docs seem to indicate that next_event remains valid on init/1 - > >>> http://erlang.org/doc/man/gen_statem.html#type-init_result. > >>> > >>> Thanks > >>> Peter. > >>> > >>> > >>> _______________________________________________ > >>> erlang-questions mailing list > >>> erlang-questions@REDACTED > >>> http://erlang.org/mailman/listinfo/erlang-questions > >>> > >>> > >> > >> > >> -- > >> Guilherme > > > >> _______________________________________________ > >> erlang-questions mailing list > >> erlang-questions@REDACTED > >> http://erlang.org/mailman/listinfo/erlang-questions > > > > > > -- > > > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-questions@REDACTED Thu Mar 22 14:36:34 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Thu, 22 Mar 2018 14:36:34 +0100 Subject: [erlang-questions] Documentation improvements for gen_statem (Mostly) Message-ID: <20180322133634.GC64375@erix.ericsson.se> I just wanted to inform you that I have, inspired by feedback from the Code Beam Conference in San Francisco, created a pull request #1754: https://github.com/erlang/otp/pull/1754 with improvements to the User's Guide and how to find it, and a change of an error exception value when you return an action not allowed in a state enter call. Feedback is welcome! -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From sverker.eriksson@REDACTED Thu Mar 22 17:22:12 2018 From: sverker.eriksson@REDACTED (Sverker Eriksson) Date: Thu, 22 Mar 2018 16:22:12 +0000 Subject: [erlang-questions] Patch package OTP 19.3.6.7 released Message-ID: <1521735732.19560.10.camel@ericsson.com> Patch Package:???????????OTP 19.3.6.7 Git Tag:?????????????????OTP-19.3.6.7 Date:????????????????????2018-03-22 Trouble Report Id:???????OTP-14823 Seq num:???????????????? System:??????????????????OTP Release:?????????????????19 Application:?????????????kernel-5.2.0.1 Predecessor:?????????????OTP 19.3.6.6 ?Check out the git tag OTP-19.3.6.7, and build a full OTP system ?including documentation. Apply one or more applications from this ?build as patches to your installation using the 'otp_patch_apply' ?tool. For information on install requirements, see descriptions for ?each application version below. ?--------------------------------------------------------------------- ?--- kernel-5.2.0.1 -------------------------------------------------- ?--------------------------------------------------------------------- ?Note! The kernel-5.2.0.1 application can *not* be applied ???????independently of other applications on an arbitrary OTP 19 ???????installation. ???????On a full OTP 19 installation, also the following runtime ???????dependency has to be satisfied: ???????-- erts-8.1 (first satisfied in OTP 19.1) ?--- New feature --- ? OTP-14823????Application(s): kernel ???????????????Add os:cmd/2 that takes an options map as the second ???????????????argument. ???????????????Add max_size as an option to os:cmd/2 that control the ???????????????maximum size of the result that os:cmd/2 will return. ?Full runtime dependencies of kernel-5.2.0.1: erts-8.1, sasl-3.0, ?stdlib-3.0 ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- From me@REDACTED Fri Mar 23 00:39:48 2018 From: me@REDACTED (yorda) Date: Fri, 23 Mar 2018 12:39:48 +1300 Subject: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra Message-ID: <92668510-B1FE-4817-B446-88D7D44D61C6@mko.io> Dear erlang community, I?m a admirer of the OTP as a engineer marvel and lurking around erlang and lfe community for a while. Here?s a question: I built OTP(release version 20.3) on my Mac(10.13) using the otp_build autoconf command yesterday. Everything works perfectly so far except the missing ssl module, due to the build system can?t find openssl. I was told MacOS 10.13 has been switched from openssl to libressl, that might be the cause of the issue. cheers, Lin From scott_ribe@REDACTED Fri Mar 23 05:58:55 2018 From: scott_ribe@REDACTED (Scott Ribe) Date: Thu, 22 Mar 2018 22:58:55 -0600 Subject: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra In-Reply-To: <92668510-B1FE-4817-B446-88D7D44D61C6@mko.io> References: <92668510-B1FE-4817-B446-88D7D44D61C6@mko.io> Message-ID: <4D209933-8424-4F41-89FE-20262ED0B2B0@elevated-dev.com> On Mar 22, 2018, at 5:39 PM, yorda wrote: > > Dear erlang community, > > I?m a admirer of the OTP as a engineer marvel and lurking around erlang and lfe community for a while. Here?s a question: > > I built OTP(release version 20.3) on my Mac(10.13) using the otp_build autoconf command yesterday. Everything works perfectly so far except the missing ssl module, due to the build system can?t find openssl. I was told MacOS 10.13 has been switched from openssl to libressl, that might be the cause of the issue. If you want to build something on OS X which requires openssl, you have to get openssl and build it first. From erlang@REDACTED Fri Mar 23 10:28:29 2018 From: erlang@REDACTED (Richard Bowker) Date: Fri, 23 Mar 2018 02:28:29 -0700 Subject: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra Message-ID: <20180323022829.49AD68F4@m0117457.ppops.net> Install the latest openssl using homebrew https://brew.sh/ then $ brew install openssl --- scott_ribe@REDACTED wrote: From: Scott Ribe To: yorda Cc: erlang-questions@REDACTED Subject: Re: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra Date: Thu, 22 Mar 2018 22:58:55 -0600 On Mar 22, 2018, at 5:39 PM, yorda wrote: > > Dear erlang community, > > I?m a admirer of the OTP as a engineer marvel and lurking around erlang and lfe community for a while. Here?s a question: > > I built OTP(release version 20.3) on my Mac(10.13) using the otp_build autoconf command yesterday. Everything works perfectly so far except the missing ssl module, due to the build system can?t find openssl. I was told MacOS 10.13 has been switched from openssl to libressl, that might be the cause of the issue. If you want to build something on OS X which requires openssl, you have to get openssl and build it first. _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions From erlang@REDACTED Fri Mar 23 14:22:18 2018 From: erlang@REDACTED (Richard Bowker) Date: Fri, 23 Mar 2018 06:22:18 -0700 Subject: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra Message-ID: <20180323062218.49AD6E23@m0117457.ppops.net> > So you'll have to pass the location to the build. yep, or you can use kerl to build which will set this up automatically. --- scott_ribe@REDACTED wrote: From: Scott Ribe To: erlang@REDACTED Subject: Re: [erlang-questions] Fail to build ssl module on Mac 10.13 High Sierra Date: Fri, 23 Mar 2018 07:16:14 -0600 On Mar 23, 2018, at 3:28 AM, Richard Bowker wrote: > > Install the latest openssl using homebrew https://brew.sh/ then $ brew install openssl This no longer links it into the expected locations, and --force won't work. So you'll have to pass the location to the build. From me@REDACTED Fri Mar 23 22:31:23 2018 From: me@REDACTED (mko_io) Date: Sat, 24 Mar 2018 10:31:23 +1300 Subject: [erlang-questions] chacha20-poly1305 AEAD is not available for libressl built Message-ID: <752AA276-B1FB-4F4A-84D3-A6F079321176@mko.io> Dear erlang community, Just report a bug: The openssl that I built OTP 20.3.2 with is Libressl(portable 2.6.4), it does have ciper chacha20-poly1305 as AEAD $openssl version LibreSSL 2.6.4 $ openssl ciphers -v | grep chacha20 ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=ECDSA Enc=ChaCha20-Poly1305 Mac=AEAD but it?s not in erlang crypto:supports(). [{hashs,[sha,sha224,sha256,sha384,sha512,md4,md5,ripemd160]}, {ciphers,[des3_cbc,des_ede3,des3_cbf,des3_cfb,aes_cbc, aes_cbc128,aes_cfb8,aes_cfb128,aes_cbc256,aes_ctr,aes_ecb, aes_gcm,aes_ige256,des_cbc,des_cfb,des_ecb,blowfish_cbc, blowfish_cfb64,blowfish_ofb64,blowfish_ecb,rc2_cbc,rc4]}, {public_keys,[rsa,dss,dh,ec_gf2m,ecdsa,ecdh,srp]}, {macs,[hmac,cmac]}] and in the release note of application crypto 4.0, this feature is enabled "Crypto chacha20-poly1305 as in RFC 7539 enabled for OpenSSL >= 1.1." so I think it?s a libressl compatibility issue, hope the someone can fix it From me@REDACTED Sat Mar 24 23:47:05 2018 From: me@REDACTED (mko_io) Date: Sun, 25 Mar 2018 11:47:05 +1300 Subject: [erlang-questions] Erlang list equality check question Message-ID: Dear erlang community, I?ve been reading the beam book recently, just learned the memory representation of a list is just a con cell which occupy a machine word which 2 bit tag. So It?s make sense that appending a new element on a big list is a small operation. timer:tc/1 shows X = lists:seq(1, 10000) takes 1184us and X2 = [0 | X] only takes 2 us. But X =:= X1 takes 600us, which shows it walks the whole list to do the equality check, my question is why not just do a cheap con cell immediate comparison since erlang variables don?t vary and tl(X2) points to X1. Is there any method to do the cons equality comparison? mko_io From pierrefenoll@REDACTED Sun Mar 25 14:04:16 2018 From: pierrefenoll@REDACTED (Pierre Fenoll) Date: Sun, 25 Mar 2018 12:04:16 +0000 Subject: [erlang-questions] Erlang list equality check question In-Reply-To: References: Message-ID: This sounds like a it could be compiler optimization. However I think it would be better to have a lint tool suggesting to rewrite that equality comparison by extracting the head and comparing only that. Maybe code from Dialyzer could be reused to find such cases and others, providing performance tips as well as style and maybe even architectural suggestions. I think Erlang needs a linter. Do you guys know any such tool? Kostis has one that rewrites calls to lists:map/2 into list comprehensions but I can?t find it right now. On Sat 24 Mar 2018 at 23:47, mko_io wrote: > Dear erlang community, > > I?ve been reading the beam book recently, just learned the memory > representation of a list is just a con cell which occupy a machine word > which 2 bit tag. So It?s make sense that appending a new element on a big > list is a small operation. timer:tc/1 shows X = lists:seq(1, 10000) takes > 1184us and X2 = [0 | X] only takes 2 us. > > But X =:= X1 takes 600us, which shows it walks the whole list to do the > equality check, my question is why not just do a cheap con cell immediate > comparison since erlang variables don?t vary and tl(X2) points to X1. Is > there any method to do the cons equality comparison? > > > mko_io > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Cheers, -- Pierre Fenoll -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oliver.Korpilla@REDACTED Sun Mar 25 14:49:50 2018 From: Oliver.Korpilla@REDACTED (Oliver Korpilla) Date: Sun, 25 Mar 2018 14:49:50 +0200 Subject: [erlang-questions] Erlang list equality check question In-Reply-To: References: Message-ID: Hello. I'm trying to understand this topic as well. I was under the impression that if you generated two lists independently from each but with identical elements they would not share memory, but let's say you took part of an existing list or append to an existing list they do. If this assumption is true, list comparison could only short circuit for lists indeed sharing memory. And it seems it does (latest OTP 20.3 used on arm): 8> List1 = lists:seq(1,10000). [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28,29|...] 9> List2 = lists:seq(1,10000). [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28,29|...] 10> timer:tc(fun() -> List1 =:= List2 end). {279,true} 11> timer:tc(fun() -> List1 =:= List1 end). {20,true} 12> List3 = [ 0 | List1 ]. [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28|...] 13> timer:tc(fun() -> List1 =:= List3 end). {22,false} 14> [ _ | List4 ] = List3. [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, 23,24,25,26,27,28|...] 15> timer:tc(fun() -> List1 =:= List4 end). {23,true} 10> compares two independently generated lists and does a full walk, it seems. 11> compares the same con cell and performs much better. 13> up to 15> compares two lists that share con cells and performs much better It seems that BEAM already short circuits list walks if it finds a shared con cell. I'm a bit confused about the example mko_io gives though as te definition of X1 is not given? Also, what system were you testing on with what OTP version? Your numbers seem much worse than even on my Raspberry Pi 3. Cheers, Oliver? ? Gesendet:?Sonntag, 25. M?rz 2018 um 14:04 Uhr Von:?"Pierre Fenoll" An:?mko_io Cc:?erlang-questions@REDACTED Betreff:?Re: [erlang-questions] Erlang list equality check question This sounds like a it could be compiler optimization.? However I think it would be better to have a lint tool suggesting to rewrite that equality comparison by extracting the head and comparing only that. Maybe code from Dialyzer could be reused to find such cases and others, providing performance tips as well as style and maybe even architectural suggestions.? ? I think Erlang needs a linter. Do you guys know any such tool? Kostis has one that rewrites calls to lists:map/2 into list comprehensions but I can?t find it right now.? ? On Sat 24 Mar 2018 at 23:47, mko_io wrote:Dear erlang community, I?ve been reading the beam book recently, just learned the memory representation of a list is just a con cell which occupy a machine word which 2 bit tag. So It?s make sense that appending a new element on a big list is a small operation. timer:tc/1 shows X = lists:seq(1, 10000) takes 1184us and X2 = [0 | X] only takes 2 us. But X =:= X1 takes 600us, which shows it walks the whole list to do the equality check, my question is why not just do a cheap con cell immediate comparison since erlang variables don?t vary and tl(X2) points to X1. Is there any method to do the cons equality comparison? mko_io _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] http://erlang.org/mailman/listinfo/erlang-questions-- ? Cheers, --? Pierre Fenoll ?_______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions] From eric.pailleau@REDACTED Sun Mar 25 18:22:38 2018 From: eric.pailleau@REDACTED (PAILLEAU Eric) Date: Sun, 25 Mar 2018 18:22:38 +0200 Subject: [erlang-questions] [ANN] geas 2.1 (Erlang 20.3) Message-ID: <44832247-2ac8-f45e-810b-eae0de1faa85@wanadoo.fr> Hi Geas 2.1 has been released ! Geas is a tool that will detect the runnable official Erlang release window for your project, including dependencies, either from source code or beam files. Geas will tell you what are the offending functions in the beam/source files that reduce the available window. Geas will tell you if some beam files are compiled native. *New* : Geas will tell you installed patches, and recommend patches that should be installed depending your code. Geas is available as a module, erlang.mk and rebar 2/3 plugins. Changelog : - update for Erlang 20.3 database. - change output format for tags, redirect log to standard error - detect installed patches - recommend patche(s) to be installed, if necessary, depending code https://github.com/crownedgrouse/geas Cheers ! Eric From m.buhot@REDACTED Mon Mar 26 05:58:21 2018 From: m.buhot@REDACTED (Michael Buhot) Date: Mon, 26 Mar 2018 13:58:21 +1000 Subject: [erlang-questions] file:sendfile/2 over unix domain socket Message-ID: I'm getting an {error, badarg} result from file:sendfile/2 when the socket argument was originally accepted from a unix domain socket. The elixir script below demonstrates the problem: require Logger File.rm("local.sock") File.write!("tmp.txt", "Hello World\n") {:ok, socket} = :gen_tcp.listen(0, [:binary, packet: :line, active: false, ip: {:local, "local.sock"}]) # {:ok, socket} = :gen_tcp.listen(4000, [:binary, packet: :line, active: false]) {:ok, client} = :gen_tcp.accept(socket) case :file.sendfile("tmp.txt", client) do {:ok, sent} -> Logger.info("sent #{sent} bytes") error -> Logger.error(inspect(error)) end Swapping the call to gen_tcp:listen with the version using tcp port 4000 works successfully. Should file:sendfile/2 work with unix domain sockets? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jamhedd@REDACTED Mon Mar 26 09:42:01 2018 From: jamhedd@REDACTED (Roman Galeev) Date: Mon, 26 Mar 2018 09:42:01 +0200 Subject: [erlang-questions] Erlang list equality check question In-Reply-To: References: Message-ID: > I think Erlang needs a linter. Definitely. Generally speaking, a code rewrite tool (to unquote atoms ;)) > list comprehensions but I can?t find it right now. It's closed source now, and afaik is not ready for production. On Sun, Mar 25, 2018 at 2:49 PM, Oliver Korpilla wrote: > > Hello. > > I'm trying to understand this topic as well. > > I was under the impression that if you generated two lists independently from each but with identical elements they would not share memory, but let's say you took part of an existing list or append to an existing list they do. If this assumption is true, list comparison could only short circuit for lists indeed sharing memory. > > And it seems it does (latest OTP 20.3 used on arm): > > 8> List1 = lists:seq(1,10000). > [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, > 23,24,25,26,27,28,29|...] > 9> List2 = lists:seq(1,10000). > [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, > 23,24,25,26,27,28,29|...] > 10> timer:tc(fun() -> List1 =:= List2 end). > {279,true} > 11> timer:tc(fun() -> List1 =:= List1 end). > {20,true} > 12> List3 = [ 0 | List1 ]. > [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, > 23,24,25,26,27,28|...] > 13> timer:tc(fun() -> List1 =:= List3 end). > {22,false} > 14> [ _ | List4 ] = List3. > [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22, > 23,24,25,26,27,28|...] > 15> timer:tc(fun() -> List1 =:= List4 end). > {23,true} > > 10> compares two independently generated lists and does a full walk, it seems. > 11> compares the same con cell and performs much better. > 13> up to 15> compares two lists that share con cells and performs much better > > It seems that BEAM already short circuits list walks if it finds a shared con cell. > > I'm a bit confused about the example mko_io gives though as te definition of X1 is not given? Also, what system were you testing on with what OTP version? Your numbers seem much worse than even on my Raspberry Pi 3. > > Cheers, > Oliver > > > Gesendet: Sonntag, 25. M?rz 2018 um 14:04 Uhr > Von: "Pierre Fenoll" > An: mko_io > Cc: erlang-questions@REDACTED > Betreff: Re: [erlang-questions] Erlang list equality check question > > This sounds like a it could be compiler optimization. > However I think it would be better to have a lint tool suggesting to rewrite that equality comparison by extracting the head and comparing only that. Maybe code from Dialyzer could be reused to find such cases and others, providing performance tips as well as style and maybe even architectural suggestions. > > I think Erlang needs a linter. Do you guys know any such tool? Kostis has one that rewrites calls to lists:map/2 into list comprehensions but I can?t find it right now. > > > On Sat 24 Mar 2018 at 23:47, mko_io wrote:Dear erlang community, > > I?ve been reading the beam book recently, just learned the memory representation of a list is just a con cell which occupy a machine word which 2 bit tag. So It?s make sense that appending a new element on a big list is a small operation. timer:tc/1 shows X = lists:seq(1, 10000) takes 1184us and X2 = [0 | X] only takes 2 us. > > But X =:= X1 takes 600us, which shows it walks the whole list to do the equality check, my question is why not just do a cheap con cell immediate comparison since erlang variables don?t vary and tl(X2) points to X1. Is there any method to do the cons equality comparison? > > > mko_io > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] > http://erlang.org/mailman/listinfo/erlang-questions-- > > > Cheers, > -- > Pierre Fenoll > _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions [http://erlang.org/mailman/listinfo/erlang-questions ] > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- With best regards, Roman Galeev, +420 702 817 968 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela.andin@REDACTED Mon Mar 26 12:01:35 2018 From: ingela.andin@REDACTED (Ingela Andin) Date: Mon, 26 Mar 2018 12:01:35 +0200 Subject: [erlang-questions] chacha20-poly1305 AEAD is not available for libressl built In-Reply-To: <752AA276-B1FB-4F4A-84D3-A6F079321176@mko.io> References: <752AA276-B1FB-4F4A-84D3-A6F079321176@mko.io> Message-ID: Hi ! 2018-03-23 22:31 GMT+01:00 mko_io : > Dear erlang community, > > Just report a bug: > > Thanks. I just want to kindly point out that we have a public issue tracker that you can use if you want to report bugs. https://bugs.erlang.org/secure/Dashboard.jspa > The openssl that I built OTP 20.3.2 with is Libressl(portable 2.6.4), it > does have ciper chacha20-poly1305 as AEAD > > $openssl version > LibreSSL 2.6.4 > $ openssl ciphers -v | grep chacha20 > > ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=ECDSA > Enc=ChaCha20-Poly1305 Mac=AEAD > > but it?s not in erlang > > crypto:supports(). > [{hashs,[sha,sha224,sha256,sha384,sha512,md4,md5,ripemd160]}, > {ciphers,[des3_cbc,des_ede3,des3_cbf,des3_cfb,aes_cbc, > aes_cbc128,aes_cfb8,aes_cfb128,aes_cbc256,aes_ctr,aes_ecb, > aes_gcm,aes_ige256,des_cbc,des_cfb,des_ecb,blowfish_cbc, > blowfish_cfb64,blowfish_ofb64,blowfish_ecb,rc2_cbc,rc4]}, > {public_keys,[rsa,dss,dh,ec_gf2m,ecdsa,ecdh,srp]}, > {macs,[hmac,cmac]}] > > and in the release note of application crypto 4.0, this feature is enabled > > "Crypto chacha20-poly1305 as in RFC 7539 enabled for OpenSSL >= 1.1." > > so I think it?s a libressl compatibility issue, hope the someone can fix it > > > Chacha was disabled for LIBRESSL to get LIBRESSL to work at all, so I guess it might be a compatibility issue between LIBRESSL and OPENSSL. Contributions in this area are welcome. As as side note. We discovered interop problems with the chacha20-poly1305 cipher and hence we have removed it from the default cipher list in our ssl application until we are able to fix it. It is a problem with how crypto calls OpenSSLs crypto lib with subtitles in how padding is handled. It is still possible to use the cipher by adding it to the the ciphers list see ssl:cipher_suites/2, ssl:filter_cipher_suites/2, ssl:prepend_cipher_suites/2 ssl:append_cipher_suites/2. But probably this will only work for erlang client vs erlang server as they will then do the same thing. Regards Ingela Erlang/OTP Team - Ericsson AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From askjuise@REDACTED Mon Mar 26 16:18:51 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Mon, 26 Mar 2018 17:18:51 +0300 Subject: [erlang-questions] start_timer and timer fired lag Message-ID: Hi! I'm usgin nksip library for working with sip protocol and in my virtual machine (windows -> virtualbox -> ubuntu) I'm observer very strange behaviour with erlang:start_timer [1]. Some time in common test, the timer fires with lacency with hundred milliseconds. I've check, there is no messages in queue, msacc says there is no problem with schedulers and whole system is idle, erlang:monitor(time_offset, clock_service) show that time in virtual machine flows monotonically. I wonder, how can I find out why erlang behaves strange sometimes? Erlang version is: $ erl > Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] > [async-threads:10] [kernel-poll:false] > Eshell V9.2 (abort with ^G) [1] https://github.com/NetComposer/nksip/blob/d27e896bc959ebcf6e238ecc45a1ee3d76bc7399/src/nksip_call_lib.erl#L309 -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 931 9877991 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Mon Mar 26 17:27:51 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Mon, 26 Mar 2018 15:27:51 +0000 Subject: [erlang-questions] Erlang list equality check question In-Reply-To: References: Message-ID: On Sat, Mar 24, 2018 at 11:47 PM mko_io wrote: > > But X =:= X1 takes 600us, which shows it walks the whole list to do the > equality check, my question is why not just do a cheap con cell immediate > comparison since erlang variables don?t vary and tl(X2) points to X1. Is > there any method to do the cons equality comparison? > > Normally, an equality check runs through three levels: 1. Pointer equality 2. Type analysis. Eterms having different tags must be different. 3. Value analysis, perhaps recursion/congruence checks for the subterms. So in principle, if your X and X1 are equal at the pointer level, they should stop dong a comparison. What is a bit more likely though is that you are checking in the shell and that the shell is interpreted. So it might react a bit differently. Also, you did not tell us what X1 is, so depending on how you generated that, it might be an entirely new set of data (and this requires a deep comparison with recursion then). The Erlang system does no hash-consing, so if you generate new data, comparisons will always be expensive. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Mon Mar 26 17:35:47 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Mon, 26 Mar 2018 15:35:47 +0000 Subject: [erlang-questions] start_timer and timer fired lag In-Reply-To: References: Message-ID: Pure guess: You are being CPU throttled in order to save power, or the virtual machine is throttling you. Enable the erlang system monitor and start looking for long schedules. These are usually an indication that you are being throttled by something. Either a bad NIF which isn't dirty-scheduling the right way, or by the underlying system stalling you. Perhaps because your timer is on a separate core and async-fires to another core. In general, timers can be stalled by the system, so you have no guarantee that they will fire close after their trigger point. But if you have timers which are periodically behind schedule, I'd look into the virtual setup. One simple test is to run outside virtualization to make sure it isn't causing the problems. But I'd enable the system monitor anyway since it is a good way to detect unruly underlying hardware/virtualization layers. On Mon, Mar 26, 2018 at 4:19 PM Alexander Petrovsky wrote: > Hi! > > I'm usgin nksip library for working with sip protocol and in my virtual > machine (windows -> virtualbox -> ubuntu) I'm observer very strange > behaviour with erlang:start_timer [1]. Some time in common test, the timer > fires with lacency with hundred milliseconds. > > I've check, there is no messages in queue, msacc says there is no problem > with schedulers and whole system is idle, erlang:monitor(time_offset, > clock_service) show that time in virtual machine flows monotonically. > > I wonder, how can I find out why erlang behaves strange sometimes? > > Erlang version is: > > $ erl >> Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] >> [async-threads:10] [kernel-poll:false] >> Eshell V9.2 (abort with ^G) > > > > [1] > https://github.com/NetComposer/nksip/blob/d27e896bc959ebcf6e238ecc45a1ee3d76bc7399/src/nksip_call_lib.erl#L309 > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 931 9877991 <+7%20931%20987-79-91> > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From askjuise@REDACTED Mon Mar 26 18:01:38 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Mon, 26 Mar 2018 19:01:38 +0300 Subject: [erlang-questions] start_timer and timer fired lag In-Reply-To: References: Message-ID: 2018-03-26 18:35 GMT+03:00 Jesper Louis Andersen < jesper.louis.andersen@REDACTED>: > Pure guess: You are being CPU throttled in order to save power, or the > virtual machine is throttling you. > > Enable the erlang system monitor and start looking for long schedules. > These are usually an indication that you are being throttled by something. > Either a bad NIF which isn't dirty-scheduling the right way, or by the > underlying system stalling you. Perhaps because your timer is on a separate > core and async-fires to another core. In general, timers can be stalled by > the system, so you have no guarantee that they will fire close after their > trigger point. But if you have timers which are periodically behind > schedule, I'd look into the virtual setup. > Hm, it's occur from time to time, not for every test run, so looks lile you are right about "being throttled by something". One simple test is to run outside virtualization to make sure it isn't > causing the problems. > Outside VM all tests passed, so I've just want to undestand why and where VM causing problems. > But I'd enable the system monitor anyway since it is a good way to detect > unruly underlying hardware/virtualization layers. > When I run system_monitor, which metric should I use? Only *long_schedule?* > > On Mon, Mar 26, 2018 at 4:19 PM Alexander Petrovsky > wrote: > >> Hi! >> >> I'm usgin nksip library for working with sip protocol and in my virtual >> machine (windows -> virtualbox -> ubuntu) I'm observer very strange >> behaviour with erlang:start_timer [1]. Some time in common test, the timer >> fires with lacency with hundred milliseconds. >> >> I've check, there is no messages in queue, msacc says there is no problem >> with schedulers and whole system is idle, erlang:monitor(time_offset, >> clock_service) show that time in virtual machine flows monotonically. >> >> I wonder, how can I find out why erlang behaves strange sometimes? >> >> Erlang version is: >> >> $ erl >>> Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] >>> [async-threads:10] [kernel-poll:false] >>> Eshell V9.2 (abort with ^G) >> >> >> >> [1] https://github.com/NetComposer/nksip/blob/ >> d27e896bc959ebcf6e238ecc45a1ee3d76bc7399/src/nksip_call_lib.erl#L309 >> >> -- >> ?????????? ????????? / Alexander Petrovsky, >> >> Skype: askjuise >> Phone: +7 931 9877991 <+7%20931%20987-79-91> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 931 9877991 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdl.web@REDACTED Tue Mar 27 04:04:35 2018 From: sdl.web@REDACTED (Leo Liu) Date: Tue, 27 Mar 2018 10:04:35 +0800 Subject: [erlang-questions] start_timer and timer fired lag In-Reply-To: (Jesper Louis Andersen's message of "Mon, 26 Mar 2018 15:35:47 +0000") References: Message-ID: On 2018-03-26 15:35 +0000, Jesper Louis Andersen wrote: > Enable the erlang system monitor and start looking for long schedules. What are you referring to by "erlang system monitor"? First time hear this and would like to try it out ;) Cheers, Leo From askjuise@REDACTED Tue Mar 27 10:36:30 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Tue, 27 Mar 2018 08:36:30 +0000 Subject: [erlang-questions] start_timer and timer fired lag In-Reply-To: References: Message-ID: Leo, I think Jesper talk about http://erlang.org/doc/man/erlang.html#system_monitor-2 ??, 27 ????? 2018 ?. ? 5:04, Leo Liu : > On 2018-03-26 15:35 +0000, Jesper Louis Andersen wrote: > > Enable the erlang system monitor and start looking for long schedules. > > What are you referring to by "erlang system monitor"? First time hear > this and would like to try it out ;) > > Cheers, > Leo > -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 931 9877991 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Tue Mar 27 14:29:04 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 27 Mar 2018 12:29:04 +0000 Subject: [erlang-questions] start_timer and timer fired lag In-Reply-To: References: Message-ID: Yes, that is the thing I'm talking about. Apart from long_schedule, I'd also enable the other kinds of monitors, especially long_gc. Usually, when the system reports one of these things, it is worth investigating why it is doing so. A timer might also arrive late because a poor process has way too much GC work to do, while also having too few cores. So having a marker for this tend to be good infrastructure design. IIRC, Fred's book "Erlang in Anger" also touches on this (but haven't looked it up, I must admit). On Tue, Mar 27, 2018 at 10:36 AM Alexander Petrovsky wrote: > Leo, I think Jesper talk about > http://erlang.org/doc/man/erlang.html#system_monitor-2 > > ??, 27 ????? 2018 ?. ? 5:04, Leo Liu : > >> On 2018-03-26 15:35 +0000, Jesper Louis Andersen wrote: >> > Enable the erlang system monitor and start looking for long schedules. >> >> What are you referring to by "erlang system monitor"? First time hear >> this and would like to try it out ;) >> >> Cheers, >> Leo >> > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 931 9877991 <+7%20931%20987-79-91> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdl.web@REDACTED Tue Mar 27 14:57:09 2018 From: sdl.web@REDACTED (Leo Liu) Date: Tue, 27 Mar 2018 20:57:09 +0800 Subject: [erlang-questions] start_timer and timer fired lag References: Message-ID: On 2018-03-27 08:36 +0000, Alexander Petrovsky wrote: > Leo, I think Jesper talk about > http://erlang.org/doc/man/erlang.html#system_monitor-2 On 2018-03-27 12:29 +0000, Jesper Louis Andersen wrote: > Yes, that is the thing I'm talking about. Apart from long_schedule, I'd > also enable the other kinds of monitors, especially long_gc. Usually, when > the system reports one of these things, it is worth investigating why it is > doing so. A timer might also arrive late because a poor process has way too > much GC work to do, while also having too few cores. So having a marker for > this tend to be good infrastructure design. > > IIRC, Fred's book "Erlang in Anger" also touches on this (but haven't > looked it up, I must admit). Thanks for the pointers. yes, EiA did touch on it. Leo From lukas@REDACTED Wed Mar 28 10:58:30 2018 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 28 Mar 2018 10:58:30 +0200 Subject: [erlang-questions] Update trace flags after function return In-Reply-To: References: Message-ID: Hello, On Tue, Mar 20, 2018 at 9:09 AM, Vladimir Gordeev < gordeev.vladimir.v@REDACTED> wrote: > I know that I can apply tracing flags to executing process right after > start of the call, > for example like that: > > erlang:trace_pattern({erlang, get, 1}, [{['_'], [], [{trace, [], > [call, timestamp]}]}], [meta]). > > Is there a way to apply flags right after return of the call? > No, there is not. Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From silviu.cpp@REDACTED Wed Mar 28 13:42:05 2018 From: silviu.cpp@REDACTED (Caragea Silviu) Date: Wed, 28 Mar 2018 14:42:05 +0300 Subject: [erlang-questions] coverage tests Message-ID: Hello, I have an app that's using a HTTP interface in order to expose the functionality. Also I have another project which implements functionality tests for the first app by running all kind of HTTP requests and compare the results with the expected one. My question is: there is any way to generate also a coverage test report for the app that's exposing the HTTP server ? to see how much of the code my tests is touching ? I looked over ct_run but most examples and user cases doesn't involve two different apps. Silviu -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmkolesnikov@REDACTED Wed Mar 28 13:47:18 2018 From: dmkolesnikov@REDACTED (Dmitry Kolesnikov) Date: Wed, 28 Mar 2018 14:47:18 +0300 Subject: [erlang-questions] coverage tests In-Reply-To: References: Message-ID: Hello, Yes, it is possible. You can specify in cover.spec a list of projects for coverage analysis ``` {level, details}. {incl_dirs, [ "../_build/default/lib/app-a/ebin", "../_build/default/lib/app-b/ebin" ]}. ``` Basically, use your test app to orchestrate testing of your main application. Best Regards, Dmitry > On 28 Mar 2018, at 14.42, Caragea Silviu wrote: > > Hello, > > I have an app that's using a HTTP interface in order to expose the functionality. > > Also I have another project which implements functionality tests for the first app by running all kind of HTTP requests and compare the results with the expected one. > > My question is: there is any way to generate also a coverage test report for the app that's exposing the HTTP server ? to see how much of the code my tests is touching ? > > I looked over ct_run but most examples and user cases doesn't involve two different apps. > > Silviu > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From solvip@REDACTED Wed Mar 28 15:18:38 2018 From: solvip@REDACTED (=?UTF-8?B?U8O2bHZpIFDDoWxsIMOBc2dlaXJzc29u?=) Date: Wed, 28 Mar 2018 13:18:38 +0000 Subject: [erlang-questions] Looking for practical testing advice Message-ID: Hi all I'm wondering about various different approaches to writing testable Erlang and I'd be super interested in hearing about how you approach this. As a concrete example, let's assume that we're building software that talks to financial exchanges. When submitting orders, you might need to map symbols to/from order book ids, so you run a named gen_server that: - Knows how to map an order book id to symbol (i.e., 1234 -> ERIC) - Knows how to map symbol to id (ERIC -> 1234) - Knows how to refresh it's map periodically from an external service, such as a database or whatever Then you want to test your protocol handler, which depends on this id mapping server, but you don't want to make an expensive call to an external service for every test you run, so you want to provide fake data. I see a few different possible approaches to orchestrate testing of this, but I'm having a hard time figuring out which of these I should follow in general: 1. You can start the protocol handler with a parameter, IdMapMod :: module(), and implement a stub_idmap module that knows how to map to/from certain ids to use in your tests. The downside of this is that all calls from the protocol handler to the id map must extract a dynamic module name from the state, and then you lose dialyzer, xref, ... Another downside(or upside?) is that you won't actually perform any actual calls to your id mapping server. 2. You can start the id mapping server with a parameter, ExternalServiceMod :: module(), and fake out the external service call only. Then your tests of the protocol handler would actually exercise the id mapping server; but it's calls to an external service would be answered with a fake stub. This way you get the benefit of dialyzer + xref as your protocol handler simply calls id_map:symbol_to_id/1 or whatever. 3. You can use a mocking library such as meck to do something very similar to either of the two above things. In past lives using other languages, I've generally developed a distaste for mocking, as I've felt that it can create brittle tests. Generally, I think I'd prefer to be able to test things in terms of interfaces, but I might be swayed otherwise. Is there anything else I'm missing? How do you write testable Erlang? Is there a general approach you follow? Thanks & regards S?lvi P?ll ? From elbrujohalcon@REDACTED Wed Mar 28 16:10:35 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Wed, 28 Mar 2018 11:10:35 -0300 Subject: [erlang-questions] Looking for practical testing advice In-Reply-To: References: Message-ID: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> Not so long ago I would?ve gone with #3 immediately, but lately my co-worker Marcelo Gornstein is slowly persuading me of using something like #2. I think he?s about to write a blog post exactly about that. Brujo Benavides > On 28 Mar 2018, at 10:18, S?lvi P?ll ?sgeirsson wrote: > > Hi all > > I'm wondering about various different approaches to writing testable > Erlang and I'd be super interested in hearing about how you approach > this. > > As a concrete example, let's assume that we're building software that > talks to financial exchanges. > When submitting orders, you might need to map symbols to/from order > book ids, so you run a named gen_server that: > > - Knows how to map an order book id to symbol (i.e., 1234 -> ERIC) > - Knows how to map symbol to id (ERIC -> 1234) > - Knows how to refresh it's map periodically from an external service, > such as a database or whatever > > Then you want to test your protocol handler, which depends on this id > mapping server, but you don't want to make an expensive call to an > external service for every test you run, so you want to provide fake > data. > > I see a few different possible approaches to orchestrate testing of > this, but I'm having a hard time figuring out which of these I should > follow in general: > > 1. You can start the protocol handler with a parameter, IdMapMod :: > module(), and implement a stub_idmap module that knows how to map > to/from certain ids to use in your tests. > The downside of this is that all calls from the protocol handler to > the id map must extract a dynamic module name from the state, and then > you lose dialyzer, xref, ... > Another downside(or upside?) is that you won't actually perform any > actual calls to your id mapping server. > > 2. You can start the id mapping server with a parameter, > ExternalServiceMod :: module(), and fake out the external service call > only. > Then your tests of the protocol handler would actually exercise the id > mapping server; but it's calls to an external service would be > answered with a fake stub. > This way you get the benefit of dialyzer + xref as your protocol > handler simply calls id_map:symbol_to_id/1 or whatever. > > 3. You can use a mocking library such as meck to do something very > similar to either of the two above things. > In past lives using other languages, I've generally developed a > distaste for mocking, as I've felt that it can create brittle tests. > Generally, I think I'd prefer to be able to test things in terms of > interfaces, but I might be swayed otherwise. > > Is there anything else I'm missing? How do you write testable Erlang? > Is there a general approach you follow? > > Thanks & regards > S?lvi P?ll ? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Wed Mar 28 16:43:26 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Wed, 28 Mar 2018 14:43:26 +0000 Subject: [erlang-questions] Looking for practical testing advice In-Reply-To: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> References: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> Message-ID: Hi, My solution is to think functionally: decouple computation from effect. You don't have to go total Monadic style, but split the code which computes results from the code which has some kind of side-effect (messaging, file I/O, network I/O, etc). This lets you test your code by injecting the data into the computational chain in a unit test, and run the effectful tests separately from that. In your case, we might run 3 operations: 1. Compute what data we need 2. Message an external party for that data 3. Compute a result based on that data This suggests we need 3 functions, where the middle function has a side effect. But functions 1 and 3 can be unit-tested under the assumption of a result from 2. And 2 can be tested independently of 1 and 3. Thinking a bit more like an Erlang programmer would, this is a finite state machine(!). The function 1 returns a *Command* to a command runner, which then executes 2 and feeds the result back into the state machine. The runner then executes 3. If you decouple the generation of what-to-do from actually doing it, testing is easy. The aside here is that it is exactly what you would do in a monadic style implementation of the same. You define the program as a Free monad (i.e., as a program which you can interpret in several different ways). Then you run said program in a test-interpreter when you want to test the program. But you run it in a "real system" when you want it to execute the program in the real world. In practice, I like to build the above model because it enables you to test your program without ever having to run the system as a whole. Once you start having many different data sources and dependent processes, you have to think about isolation of them in test settings. Otherwise it becomes prohibitively hard to work with the system as you add more complexity. The astute reader will recognize that the above is similar to the Elm Architecture, but that is a subject for another post :) On Wed, Mar 28, 2018 at 4:10 PM Brujo Benavides wrote: > Not so long ago I would?ve gone with #3 immediately, but lately my > co-worker Marcelo Gornstein is slowly > persuading me of using something like #2. > I think he?s about to write a blog post exactly about that. > > ------------------------------ > *Brujo Benavides * > > On 28 Mar 2018, at 10:18, S?lvi P?ll ?sgeirsson wrote: > > Hi all > > I'm wondering about various different approaches to writing testable > Erlang and I'd be super interested in hearing about how you approach > this. > > As a concrete example, let's assume that we're building software that > talks to financial exchanges. > When submitting orders, you might need to map symbols to/from order > book ids, so you run a named gen_server that: > > - Knows how to map an order book id to symbol (i.e., 1234 -> ERIC) > - Knows how to map symbol to id (ERIC -> 1234) > - Knows how to refresh it's map periodically from an external service, > such as a database or whatever > > Then you want to test your protocol handler, which depends on this id > mapping server, but you don't want to make an expensive call to an > external service for every test you run, so you want to provide fake > data. > > I see a few different possible approaches to orchestrate testing of > this, but I'm having a hard time figuring out which of these I should > follow in general: > > 1. You can start the protocol handler with a parameter, IdMapMod :: > module(), and implement a stub_idmap module that knows how to map > to/from certain ids to use in your tests. > The downside of this is that all calls from the protocol handler to > the id map must extract a dynamic module name from the state, and then > you lose dialyzer, xref, ... > Another downside(or upside?) is that you won't actually perform any > actual calls to your id mapping server. > > 2. You can start the id mapping server with a parameter, > ExternalServiceMod :: module(), and fake out the external service call > only. > Then your tests of the protocol handler would actually exercise the id > mapping server; but it's calls to an external service would be > answered with a fake stub. > This way you get the benefit of dialyzer + xref as your protocol > handler simply calls id_map:symbol_to_id/1 or whatever. > > 3. You can use a mocking library such as meck to do something very > similar to either of the two above things. > In past lives using other languages, I've generally developed a > distaste for mocking, as I've felt that it can create brittle tests. > Generally, I think I'd prefer to be able to test things in terms of > interfaces, but I might be swayed otherwise. > > Is there anything else I'm missing? How do you write testable Erlang? > Is there a general approach you follow? > > Thanks & regards > S?lvi P?ll ? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oltarasenko@REDACTED Wed Mar 28 16:50:21 2018 From: oltarasenko@REDACTED (Oleg Tarasenko) Date: Wed, 28 Mar 2018 16:50:21 +0200 Subject: [erlang-questions] EPMDLess - new application which helps to connect erlang nodes under docker Message-ID: Hi, I would like to introduce Epmdless - application for connecting Erlang/Elixir nodes without EPMD. In short: 1) Allows to avoid starting epmd in places where it's not needed (for example docker containers) 2) Supports TCP/TLS transport layers 3) Restricts erlang distribution to one port only (specified with config or env variable). It contains some examples in the README file + links to related projects: - Sandbox application to test it with Erlang. - Sandbox application to test it with Elixir. Also, I've made a blog post explaining how to use it with some video materials: https://www.erlang-solutions.com/blog/running-distributed-erlang-elixir-applications-on-docker.html I really hope you will find it useful! Oleg -------------- next part -------------- An HTML attachment was scrubbed... URL: From solvip@REDACTED Wed Mar 28 17:50:32 2018 From: solvip@REDACTED (=?UTF-8?B?U8O2bHZpIFDDoWxsIMOBc2dlaXJzc29u?=) Date: Wed, 28 Mar 2018 15:50:32 +0000 Subject: [erlang-questions] Looking for practical testing advice In-Reply-To: References: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> Message-ID: Thanks Jesper. I think that we've written some of our things in the manner you describe, although not intentionally or explicitly. Do you know of any code I can read which is written using your approach? S?lvi On Wed, Mar 28, 2018 at 2:43 PM, Jesper Louis Andersen wrote: > Hi, > > My solution is to think functionally: decouple computation from effect. You > don't have to go total Monadic style, but split the code which computes > results from the code which has some kind of side-effect (messaging, file > I/O, network I/O, etc). This lets you test your code by injecting the data > into the computational chain in a unit test, and run the effectful tests > separately from that. In your case, we might run 3 operations: > > 1. Compute what data we need > 2. Message an external party for that data > 3. Compute a result based on that data > > This suggests we need 3 functions, where the middle function has a side > effect. But functions 1 and 3 can be unit-tested under the assumption of a > result from 2. And 2 can be tested independently of 1 and 3. Thinking a bit > more like an Erlang programmer would, this is a finite state machine(!). The > function 1 returns a *Command* to a command runner, which then executes 2 > and feeds the result back into the state machine. The runner then executes > 3. If you decouple the generation of what-to-do from actually doing it, > testing is easy. > > The aside here is that it is exactly what you would do in a monadic style > implementation of the same. You define the program as a Free monad (i.e., as > a program which you can interpret in several different ways). Then you run > said program in a test-interpreter when you want to test the program. But > you run it in a "real system" when you want it to execute the program in the > real world. > > In practice, I like to build the above model because it enables you to test > your program without ever having to run the system as a whole. Once you > start having many different data sources and dependent processes, you have > to think about isolation of them in test settings. Otherwise it becomes > prohibitively hard to work with the system as you add more complexity. > > The astute reader will recognize that the above is similar to the Elm > Architecture, but that is a subject for another post :) > > > On Wed, Mar 28, 2018 at 4:10 PM Brujo Benavides > wrote: >> >> Not so long ago I would?ve gone with #3 immediately, but lately my >> co-worker Marcelo Gornstein is slowly persuading me of using something like >> #2. >> I think he?s about to write a blog post exactly about that. >> >> ________________________________ >> Brujo Benavides >> >> On 28 Mar 2018, at 10:18, S?lvi P?ll ?sgeirsson wrote: >> >> Hi all >> >> I'm wondering about various different approaches to writing testable >> Erlang and I'd be super interested in hearing about how you approach >> this. >> >> As a concrete example, let's assume that we're building software that >> talks to financial exchanges. >> When submitting orders, you might need to map symbols to/from order >> book ids, so you run a named gen_server that: >> >> - Knows how to map an order book id to symbol (i.e., 1234 -> ERIC) >> - Knows how to map symbol to id (ERIC -> 1234) >> - Knows how to refresh it's map periodically from an external service, >> such as a database or whatever >> >> Then you want to test your protocol handler, which depends on this id >> mapping server, but you don't want to make an expensive call to an >> external service for every test you run, so you want to provide fake >> data. >> >> I see a few different possible approaches to orchestrate testing of >> this, but I'm having a hard time figuring out which of these I should >> follow in general: >> >> 1. You can start the protocol handler with a parameter, IdMapMod :: >> module(), and implement a stub_idmap module that knows how to map >> to/from certain ids to use in your tests. >> The downside of this is that all calls from the protocol handler to >> the id map must extract a dynamic module name from the state, and then >> you lose dialyzer, xref, ... >> Another downside(or upside?) is that you won't actually perform any >> actual calls to your id mapping server. >> >> 2. You can start the id mapping server with a parameter, >> ExternalServiceMod :: module(), and fake out the external service call >> only. >> Then your tests of the protocol handler would actually exercise the id >> mapping server; but it's calls to an external service would be >> answered with a fake stub. >> This way you get the benefit of dialyzer + xref as your protocol >> handler simply calls id_map:symbol_to_id/1 or whatever. >> >> 3. You can use a mocking library such as meck to do something very >> similar to either of the two above things. >> In past lives using other languages, I've generally developed a >> distaste for mocking, as I've felt that it can create brittle tests. >> Generally, I think I'd prefer to be able to test things in terms of >> interfaces, but I might be swayed otherwise. >> >> Is there anything else I'm missing? How do you write testable Erlang? >> Is there a general approach you follow? >> >> Thanks & regards >> S?lvi P?ll ? >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions From solvip@REDACTED Wed Mar 28 17:51:01 2018 From: solvip@REDACTED (=?UTF-8?B?U8O2bHZpIFDDoWxsIMOBc2dlaXJzc29u?=) Date: Wed, 28 Mar 2018 15:51:01 +0000 Subject: [erlang-questions] Looking for practical testing advice In-Reply-To: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> References: <0D5A4002-2ADF-4DD8-8783-3516C0751A5C@gmail.com> Message-ID: i'm looking forward to reading that blog post! :) S?lvi On Wed, Mar 28, 2018 at 2:10 PM, Brujo Benavides wrote: > Not so long ago I would?ve gone with #3 immediately, but lately my co-worker > Marcelo Gornstein is slowly persuading me of using something like #2. > I think he?s about to write a blog post exactly about that. > > ________________________________ > Brujo Benavides > > > > On 28 Mar 2018, at 10:18, S?lvi P?ll ?sgeirsson wrote: > > Hi all > > I'm wondering about various different approaches to writing testable > Erlang and I'd be super interested in hearing about how you approach > this. > > As a concrete example, let's assume that we're building software that > talks to financial exchanges. > When submitting orders, you might need to map symbols to/from order > book ids, so you run a named gen_server that: > > - Knows how to map an order book id to symbol (i.e., 1234 -> ERIC) > - Knows how to map symbol to id (ERIC -> 1234) > - Knows how to refresh it's map periodically from an external service, > such as a database or whatever > > Then you want to test your protocol handler, which depends on this id > mapping server, but you don't want to make an expensive call to an > external service for every test you run, so you want to provide fake > data. > > I see a few different possible approaches to orchestrate testing of > this, but I'm having a hard time figuring out which of these I should > follow in general: > > 1. You can start the protocol handler with a parameter, IdMapMod :: > module(), and implement a stub_idmap module that knows how to map > to/from certain ids to use in your tests. > The downside of this is that all calls from the protocol handler to > the id map must extract a dynamic module name from the state, and then > you lose dialyzer, xref, ... > Another downside(or upside?) is that you won't actually perform any > actual calls to your id mapping server. > > 2. You can start the id mapping server with a parameter, > ExternalServiceMod :: module(), and fake out the external service call > only. > Then your tests of the protocol handler would actually exercise the id > mapping server; but it's calls to an external service would be > answered with a fake stub. > This way you get the benefit of dialyzer + xref as your protocol > handler simply calls id_map:symbol_to_id/1 or whatever. > > 3. You can use a mocking library such as meck to do something very > similar to either of the two above things. > In past lives using other languages, I've generally developed a > distaste for mocking, as I've felt that it can create brittle tests. > Generally, I think I'd prefer to be able to test things in terms of > interfaces, but I might be swayed otherwise. > > Is there anything else I'm missing? How do you write testable Erlang? > Is there a general approach you follow? > > Thanks & regards > S?lvi P?ll ? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > From lloyd@REDACTED Wed Mar 28 20:38:33 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 28 Mar 2018 14:38:33 -0400 (EDT) Subject: [erlang-questions] =?utf-8?q?bcrypt_issue_--_missing_library=3F?= Message-ID: <1522262313.169822862@apps.rackspace.com> Hello, I've been using [ https://github.com/ferd/erlpass ]( https://github.com/ferd/erlpass ) successfully in my code for several years. But I recently had to recompile my system. When I then tried to run the sign-in function, which had never before given me problems, I got this error message: (wgd@REDACTED)2> show_page: "sign-in" =INFO REPORT==== 28-Mar-2018::14:04:16 === {error,postback_request, {url,"localhost:8020/wg_members/sign-in"}, {exit, {noproc, {gen_server,call, [bcrypt_nif_worker, {hashpw,<<"lloyd">>, "$2a$12$Hnn1TK6HyTds7Xmf326k1.OIh/OEwi9uWqHNjHVwEQw0NKVw6X5LO"}, I then checked to see if crypto was started and it was: (wgd@REDACTED)2> application:start(crypto). {error,{already_started,crypto}} But application:start(bcrypt) turned up this error message: (wgd@REDACTED)4> application:start(bcrypt). =WARNING REPORT==== 28-Mar-2018::14:12:39 === The on_load function for module bcrypt_nif returned {error, {bad_lib, "Library version (2.11) not compatible (with 2.8)."}} {error, {{shutdown, {failed_to_start_child,bcrypt_nif_worker, {undef, [{bcrypt_nif,create_ctx,[],[]}, {bcrypt_nif_worker,init,1, [{file,"src/bcrypt_nif_worker.erl"},{line,31}]} So now I'm stuck. I'm running Erlang/OTP R19 Can anyone tell me how to get bcrypt or functional equivalent working again? All the best, LRP ********************************************* My books: THE GOSPEL OF ASHES http://thegospelofashes.com Strength is not enough. Do they have the courage and the cunning? Can they survive long enough to save the lives of millions? FREEIN' PANCHO http://freeinpancho.com A community of misfits help a troubled boy find his way AYA TAKEO http://ayatakeo.com Star-crossed love, war and power in an alternative universe Available through Amazon or by request from your favorite bookstore ********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From roger@REDACTED Wed Mar 28 21:21:05 2018 From: roger@REDACTED (Roger Lipscombe) Date: Wed, 28 Mar 2018 20:21:05 +0100 Subject: [erlang-questions] bcrypt issue -- missing library? In-Reply-To: <1522262313.169822862@apps.rackspace.com> References: <1522262313.169822862@apps.rackspace.com> Message-ID: On 28 March 2018 at 19:38, wrote: > (wgd@REDACTED)4> application:start(bcrypt). > > =WARNING REPORT==== 28-Mar-2018::14:12:39 === > The on_load function for module bcrypt_nif returned {error, > {bad_lib, > "Library version (2.11) not compatible (with 2.8)."}} You've compiled the NIF against a later version of Erlang/OTP than the one you're attempting to use it with. The version list in erl_nif.h says that 2.11 is OTP-19, and 2.8 is OTP-18.0. From roger@REDACTED Wed Mar 28 21:22:42 2018 From: roger@REDACTED (Roger Lipscombe) Date: Wed, 28 Mar 2018 20:22:42 +0100 Subject: [erlang-questions] bcrypt issue -- missing library? In-Reply-To: References: <1522262313.169822862@apps.rackspace.com> Message-ID: On 28 March 2018 at 20:21, Roger Lipscombe wrote: > You've compiled the NIF against a later version of Erlang/OTP than the > one you're attempting to use it with. The version list in erl_nif.h > says that 2.11 is OTP-19, and 2.8 is OTP-18.0. See https://github.com/erlang/otp/blob/master/erts/emulator/beam/erl_nif.h#L33 From lloyd@REDACTED Wed Mar 28 22:34:37 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 28 Mar 2018 16:34:37 -0400 (EDT) Subject: [erlang-questions] =?utf-8?q?bcrypt_issue_--_missing_library=3F?= In-Reply-To: References: <1522262313.169822862@apps.rackspace.com> Message-ID: <1522269277.597627855@apps.rackspace.com> Hi Roger, I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen. Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in. It seems that the problem is above my pay grade--- either in Nitrogen or Erlang. It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet without warning. I had a similar problem with the string library. I'm a tool user, not a tool builder. I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence. Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general? If my ignorance--- I'm sorry. I do try to fill in the gaps. As it stands, I still don't know what to do to move forward. All the best, LRP -----Original Message----- From: "Roger Lipscombe" Sent: Wednesday, March 28, 2018 3:21pm To: "Lloyd Prentice" Cc: "Erlang" Subject: Re: [erlang-questions] bcrypt issue -- missing library? On 28 March 2018 at 19:38, wrote: > (wgd@REDACTED)4> application:start(bcrypt). > > =WARNING REPORT==== 28-Mar-2018::14:12:39 === > The on_load function for module bcrypt_nif returned {error, > {bad_lib, > "Library version (2.11) not compatible (with 2.8)."}} You've compiled the NIF against a later version of Erlang/OTP than the one you're attempting to use it with. The version list in erl_nif.h says that 2.11 is OTP-19, and 2.8 is OTP-18.0. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g@REDACTED Wed Mar 28 22:34:22 2018 From: g@REDACTED (Guilherme Andrade) Date: Wed, 28 Mar 2018 21:34:22 +0100 Subject: [erlang-questions] [ANN] locus: Geolocation and ASN lookup of IP addresses In-Reply-To: References: Message-ID: Hi list, Locus 1.3.0 was released today. For those who don't have the existing thread handy, it's library for looking up geolocation / ASN of IP addresses, using MaxMind GeoLite2. Added: - ability of loading databases from local file system - type spec of database entries Fixed: - wrong handling of timezones on cached tarballs - wrong handling of daylight saving time on conditional HTTP requests The timezone / DST fixes mentioned above were also backported to earlier versions and tagged under: - 1.0.1 - 1.1.4 - 1.2.2 * Overview: https://github.com/g-andrade/locus * Documentation: https://hexdocs.pm/locus/ -- Guilherme -------------- next part -------------- An HTML attachment was scrubbed... URL: From bob@REDACTED Wed Mar 28 22:59:21 2018 From: bob@REDACTED (Bob Ippolito) Date: Wed, 28 Mar 2018 13:59:21 -0700 Subject: [erlang-questions] bcrypt issue -- missing library? In-Reply-To: <1522269277.597627855@apps.rackspace.com> References: <1522262313.169822862@apps.rackspace.com> <1522269277.597627855@apps.rackspace.com> Message-ID: You should be able to fix this by deleting your build artifacts and recompiling with the same version of Erlang that you plan to run them with. The build tool you're using can probably do this for you (for rebar3 or rebar it'd be the clean command, if it's Makefile based you can probably make clean). The tools haven't changed, but they are clearly not robust to this kind of accident. On Wed, Mar 28, 2018 at 1:34 PM, wrote: > Hi Roger, > > > > I've never intentionally compiled the NIF. The only thing I've compiled is > my application developed in Erlang Nitrogen. > > > > Some months ago I did provision a new workstation with Erlang R19. Perhaps > that's when the discrepancy crept in. > > > > It seems that the problem is above my pay grade--- either in Nitrogen or > Erlang. > > > > It's very frustrating trying to build something to serve a worthy cause > but to have tools change under my feet without warning. I had a similar > problem with the string library. > > > > I'm a tool user, not a tool builder. > > > > I have utmost respect for Erlang tool builders. They make possible what > I'm trying to do. I know much less than they do; have much less experience. > So I depend upon them. But problems like this cost me precious time and > confidence. > > > > Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for > software in general? > > > > If my ignorance--- I'm sorry. I do try to fill in the gaps. > > > > As it stands, I still don't know what to do to move forward. > > > > All the best, > > > > LRP > > > > > > > > > > > > > > > > > > -----Original Message----- > From: "Roger Lipscombe" > Sent: Wednesday, March 28, 2018 3:21pm > To: "Lloyd Prentice" > Cc: "Erlang" > Subject: Re: [erlang-questions] bcrypt issue -- missing library? > > On 28 March 2018 at 19:38, wrote: > > (wgd@REDACTED)4> application:start(bcrypt). > > > > =WARNING REPORT==== 28-Mar-2018::14:12:39 === > > The on_load function for module bcrypt_nif returned {error, > > {bad_lib, > > "Library version (2.11) not compatible (with 2.8)."}} > > You've compiled the NIF against a later version of Erlang/OTP than the > one you're attempting to use it with. The version list in erl_nif.h > says that 2.11 is OTP-19, and 2.8 is OTP-18.0. > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Wed Mar 28 23:01:18 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 28 Mar 2018 17:01:18 -0400 (EDT) Subject: [erlang-questions] =?utf-8?q?bcrypt_issue_--_missing_library=3F_-?= =?utf-8?q?-_solved?= In-Reply-To: <1522269277.597627855@apps.rackspace.com> References: <1522262313.169822862@apps.rackspace.com> <1522269277.597627855@apps.rackspace.com> Message-ID: <1522270878.206127452@apps.rackspace.com> First, apologies for my rant. I think there is a deep issue here, but much beyond my competencies to understand or solve. Jesse Gumm has kindly helped me move forward. 1. Delete bcrypt from the Nitrogen stack 2. Recompile my application so rebar can pull in a current version of bcrypt. This, in retrospect, is a simple technique borne, I suspect, out of experiential wisdom. I wish I had understood this general technique early in my Erlang learning curve. I don't have a blog, but it would be great to have a list or tree of troubleshooting debugging techniques like this available to Erlang noobies. Again, apologies. All the best, LRP -----Original Message----- From: lloyd@REDACTED Sent: Wednesday, March 28, 2018 4:34pm To: "Roger Lipscombe" Cc: "Erlang" Subject: Re: [erlang-questions] bcrypt issue -- missing library? Hi Roger, I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen. Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in. It seems that the problem is above my pay grade--- either in Nitrogen or Erlang. It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet without warning. I had a similar problem with the string library. I'm a tool user, not a tool builder. I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence. Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general? If my ignorance--- I'm sorry. I do try to fill in the gaps. As it stands, I still don't know what to do to move forward. All the best, LRP -----Original Message----- From: "Roger Lipscombe" Sent: Wednesday, March 28, 2018 3:21pm To: "Lloyd Prentice" Cc: "Erlang" Subject: Re: [erlang-questions] bcrypt issue -- missing library? On 28 March 2018 at 19:38, wrote: > (wgd@REDACTED)4> application:start(bcrypt). > > =WARNING REPORT==== 28-Mar-2018::14:12:39 === > The on_load function for module bcrypt_nif returned {error, > {bad_lib, > "Library version (2.11) not compatible (with 2.8)."}} You've compiled the NIF against a later version of Erlang/OTP than the one you're attempting to use it with. The version list in erl_nif.h says that 2.11 is OTP-19, and 2.8 is OTP-18.0. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Wed Mar 28 23:03:03 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 28 Mar 2018 17:03:03 -0400 (EDT) Subject: [erlang-questions] =?utf-8?q?bcrypt_issue_--_missing_library=3F?= In-Reply-To: References: <1522262313.169822862@apps.rackspace.com> <1522269277.597627855@apps.rackspace.com> Message-ID: <1522270983.238332460@apps.rackspace.com> Thank you, Bob, for your patience and tolerance. Jesse Gumm led me to the same solution.I wish I'd understood it much earlier in my adventures with Erlang. All the best, Lloyd -----Original Message----- From: "Bob Ippolito" Sent: Wednesday, March 28, 2018 4:59pm To: "Lloyd Prentice" Cc: "Roger Lipscombe" , "Erlang" Subject: Re: [erlang-questions] bcrypt issue -- missing library? You should be able to fix this by deleting your build artifacts and recompiling with the same version of Erlang that you plan to run them with. The build tool you're using can probably do this for you (for rebar3 or rebar it'd be the clean command, if it's Makefile based you can probably make clean). The tools haven't changed, but they are clearly not robust to this kind of accident. On Wed, Mar 28, 2018 at 1:34 PM, <[ lloyd@REDACTED ]( mailto:lloyd@REDACTED )> wrote: Hi Roger, I've never intentionally compiled the NIF. The only thing I've compiled is my application developed in Erlang Nitrogen. Some months ago I did provision a new workstation with Erlang R19. Perhaps that's when the discrepancy crept in. It seems that the problem is above my pay grade--- either in Nitrogen or Erlang. It's very frustrating trying to build something to serve a worthy cause but to have tools change under my feet without warning. I had a similar problem with the string library. I'm a tool user, not a tool builder. I have utmost respect for Erlang tool builders. They make possible what I'm trying to do. I know much less than they do; have much less experience. So I depend upon them. But problems like this cost me precious time and confidence. Is this an issue of my own ignorance? Or an Erlang issue? Or an issue for software in general? If my ignorance--- I'm sorry. I do try to fill in the gaps. As it stands, I still don't know what to do to move forward. All the best, LRP -----Original Message----- From: "Roger Lipscombe" <[ roger@REDACTED ]( mailto:roger@REDACTED )> Sent: Wednesday, March 28, 2018 3:21pm To: "Lloyd Prentice" <[ lloyd@REDACTED ]( mailto:lloyd@REDACTED )> Cc: "Erlang" <[ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED )> Subject: Re: [erlang-questions] bcrypt issue -- missing library? On 28 March 2018 at 19:38, <[ lloyd@REDACTED ]( mailto:lloyd@REDACTED )> wrote: > ([ wgd@REDACTED ]( mailto:wgd@REDACTED ))4> application:start(bcrypt). > > =WARNING REPORT==== 28-Mar-2018::14:12:39 === > The on_load function for module bcrypt_nif returned {error, > {bad_lib, > "Library version (2.11) not compatible (with 2.8)."}} You've compiled the NIF against a later version of Erlang/OTP than the one you're attempting to use it with. The version list in erl_nif.h says that 2.11 is OTP-19, and 2.8 is OTP-18.0. _______________________________________________ erlang-questions mailing list [ erlang-questions@REDACTED ]( mailto:erlang-questions@REDACTED ) [ http://erlang.org/mailman/listinfo/erlang-questions ]( http://erlang.org/mailman/listinfo/erlang-questions ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.lapshin@REDACTED Thu Mar 29 07:49:13 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Thu, 29 Mar 2018 08:49:13 +0300 Subject: [erlang-questions] EPMDLess - new application which helps to connect erlang nodes under docker In-Reply-To: References: Message-ID: > how complex it was to bring up MySql on OS X in the pas sorry, but what was the problem? I've never done it before homebrew. The code is nice. It is distribution without port resolving, right? -------------- next part -------------- An HTML attachment was scrubbed... URL: From fchschneider@REDACTED Thu Mar 29 09:48:11 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Thu, 29 Mar 2018 09:48:11 +0200 Subject: [erlang-questions] Looking for generic ABAC authorization tool Message-ID: <9eed216c-4cf0-518b-2dd9-67e866663eb3@gmail.com> Dear list, I have to implement authorization for a REST based Electronic Health Record system. Creating such a ABAC system is a huge effort, so I am wondering if there is something readily available. I have been looking at things like XACML and Apache Shiro, but XACML seems hardly used and I just hate anything which uses Java. Authorization must be something very often used, so is there anything generic availability that you know of or how do you tackle authorization? Frans From fchschneider@REDACTED Thu Mar 29 15:03:50 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Thu, 29 Mar 2018 15:03:50 +0200 Subject: [erlang-questions] ct_run -vts crashes Message-ID: <662df2f3-6639-fe25-ea43-0c92b801f5fc@gmail.com> Running ct_run -vts gives a crash dump. What could be wrong? $ ct_run -vts Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false] Starting webtool... {"init terminating in do_boot",{{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{file,"ct_webtool.erl"},{line,148}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}} init terminating in do_boot ({{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{_},{_}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}) Crash dump is being written to: erl_crash.dump...done Frans From dmkolesnikov@REDACTED Thu Mar 29 15:08:03 2018 From: dmkolesnikov@REDACTED (Dmitry Kolesnikov) Date: Thu, 29 Mar 2018 16:08:03 +0300 Subject: [erlang-questions] ct_run -vts crashes In-Reply-To: <662df2f3-6639-fe25-ea43-0c92b801f5fc@gmail.com> References: <662df2f3-6639-fe25-ea43-0c92b801f5fc@gmail.com> Message-ID: <16D31B04-7C0E-4677-BF23-BAF5A6C72EBE@gmail.com> Hello, {error, error_dir} You config points to non existed directory. Check out config. - Dmitry > On 29 Mar 2018, at 16.03, Frans Schneider wrote: > > Running ct_run -vts gives a crash dump. What could be wrong? > > $ ct_run -vts > Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false] > > Starting webtool... > {"init terminating in do_boot",{{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{file,"ct_webtool.erl"},{line,148}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}} > init terminating in do_boot ({{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{_},{_}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}) > > Crash dump is being written to: erl_crash.dump...done > > Frans > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Thompson@REDACTED Thu Mar 29 15:09:26 2018 From: S.J.Thompson@REDACTED (Simon Thompson) Date: Thu, 29 Mar 2018 14:09:26 +0100 Subject: [erlang-questions] SBLP 2018 second call for papers References: Message-ID: <132C79FC-B97E-41B2-BB8F-B763401F1776@kent.ac.uk> Universidade de S?o Paulo - ICMC/USP S?o Carlos, Brazil, September 20-21, 2018 Conference website http://www.sbc.org.br/cbsoft2018 Submission link https://easychair.org/conferences/?conf=sblp2018 SBLP 2018 is the 22nd edition of the Brazilian Symposium on Programming Languages. It is promoted by the Brazilian Computer Society (SBC) and constitutes a forum for researchers, students and professionals to present and discuss ideas and innovations in the design, definition, analysis, implementation and practical use of programming languages. SBLP's first edition was in 1996. Since 2010, it is part of CBSoft, the Brazilian Conference on Software: Theory and Practice (http://cbsoft.org/cbsoft2018/ ). Submission Guidelines ________________________________________________________________________________ Papers can be written in Portuguese or English. Submission in English is strongly encouraged since the symposium proceedings are indexed in the ACM Digital Library. The acceptance of a paper implies that at least one of its authors will register for the symposium to present it. Papers must be original and not simultaneously submitted to another journal or conference. Papers must be submitted electronically (in PDF format) via the Easychair System: http://www.easychair.org/conferences/?conf=sblp2018 The following paper categories are welcome (page limits include figures, references and appendices): Full papers: up to 8 pages long in ACM 2-column conference format, available at http://www.acm.org/publications/proceedings-template Short papers: up to 3 pages in the same format, can discuss new ideas which are at an early stage of development or can report partial results of on-going dissertations or theses. List of Topics (related but not limited to the following) ________________________________________________________________________________ ? Programming paradigms and styles, scripting and domain-specific languages and support for real-time, service-oriented, multi-threaded, parallel, and distributed programming ? Program generation and transformation ? Formal semantics and theoretical foundations: denotational, operational, algebraic and categorical ? Program analysis and verification, type systems, static analysis and abstract interpretation ? Programming language design and implementation, programming language environments, compilation and interpretation techniques Publication ________________________________________________________________________________ SBLP proceedings will be published in ACM's digital library. As in previous editions, after the conference authors of selected regular papers will be invited to submit an extended version of their work to be considered for publication in a journal's special issue. Since 2009, selected papers of each SBLP edition are being published in a special issue of Science of Computer Programming, by Elsevier. Important dates ________________________________________________________________________________ Abstract submission: April 29th 2018 Paper submission: May 6th 2018 Author notification: June 22nd 2018 Camera ready deadline: July 8th 2018 Program Committee ________________________________________________________________________________ Mariza Bigonha Universidade Federal de Minas Gerais Roberto Bigonha Universidade Federal de Minas Gerais Andre R. Du Bois Universidade Federal de Pelotas Christiano Braga Universidade Federal Fluminense Carlos Camar?o Universidade Federal de Minas Gerais (chair) Fernando Castor Universidade Federal de Pernambuco Renato Cerqueira IBM Research, Brazil Jo?o Fernandes Universidade de Coimbra Jo?o Ferreira Teesside University Luc?lia Figueiredo Universidade Federal de Ouro Preto Ismael Figueroa Pontif?cia Universidad Cat?lica de Valparaiso Alex Garcia Instituto Militar de Engenharia Francisco Heron Universidade Federal do Cear? Roberto Ierusalimschy Pontif?cia Universidade Cat?lica do Rio de Janeiro Yu David Liu State University of New York at Binghamton Hans-Wolfgang Loidl Heriot-Watt University Marcelo Maia Universidade Federal de Uberl?ndia Andr? M. Maidl Pontif?cia Universidade Cat?lica do Paran? Manuel A. Martins Universidade de Aveiro F?bio Mascarenhas Universidade Federal do Rio de Janeiro S?rgio Medeiros Universidade Federal do Rio Grande do Norte Victor Miraldo University of Utrecht ?lvaro Moreira Universidade Federal do Rio Grande do Sul Anamaria M. Moreira Universidade Federal do Rio de Janeiro Peter Mosses Swansea University Martin Musicante Universidade Federal do Rio Grande do Norte Alberto Pardo Universidad de la Rep?blica Fernando Pereira Universidade Federal de Minas Gerais Gustavo Pinto Universidade Federal do Par? Louis-Noel Pouchet Ohio State University Zongyan Qiu Peking University Henrique R?belo Universidade Federal de Pernambuco Leonardo Reis Universidade Federal de Ouro Preto Rodrigo Ribeiro Universidade Federal de Ouro Preto Noemi Rodriguez Pontif?cia Universidade Cat?lica do Rio de Janeiro Francisco Sant'Anna Universidade Estadual do Rio de Janeiro Jo?o Saraiva Universidade do Minho Martin Sulzmann Hochschule Karlsruhe - Technik und Wirtschaft (chair) Leopoldo Teixeira Universidade Federal de Pernambuco Simon Thompson University of Kent Cristiano Vasconcellos Universidade do Estado de Santa Catarina Varmo Vene University of Tartu Invited Speaker ________________________________________________________________________________ Martin Sulzmann, Hochschule Karlsruhe - Technik und Wirtschaft, Germany Contact ________________________________________________________________________________ All questions about submissions should be emailed to Carlos Camar?o (camarao@REDACTED ) _______________________________________________ Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@REDACTED | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt -------------- next part -------------- An HTML attachment was scrubbed... URL: From fchschneider@REDACTED Thu Mar 29 15:53:03 2018 From: fchschneider@REDACTED (Schneider) Date: Thu, 29 Mar 2018 15:53:03 +0200 Subject: [erlang-questions] ct_run -vts crashes In-Reply-To: <16D31B04-7C0E-4677-BF23-BAF5A6C72EBE@gmail.com> References: <662df2f3-6639-fe25-ea43-0c92b801f5fc@gmail.com> <16D31B04-7C0E-4677-BF23-BAF5A6C72EBE@gmail.com> Message-ID: <4CA2C8A0-2842-4E73-AE82-23613B721308@gmail.com> Which config file would that be? > Op 29 mrt. 2018 om 15:08 heeft Dmitry Kolesnikov het volgende geschreven: > > Hello, > > {error, error_dir} > > You config points to non existed directory. Check out config. > > - Dmitry > > >> On 29 Mar 2018, at 16.03, Frans Schneider wrote: >> >> Running ct_run -vts gives a crash dump. What could be wrong? >> >> $ ct_run -vts >> Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false] >> >> Starting webtool... >> {"init terminating in do_boot",{{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{file,"ct_webtool.erl"},{line,148}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}} >> init terminating in do_boot ({{badmatch,{error,{error,error_dir}}},[{ct_webtool,script_start,1,[{_},{_}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}) >> >> Crash dump is being written to: erl_crash.dump...done >> >> Frans >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oltarasenko@REDACTED Fri Mar 30 00:04:10 2018 From: oltarasenko@REDACTED (Oleg Tarasenko) Date: Fri, 30 Mar 2018 00:04:10 +0200 Subject: [erlang-questions] EPMDLess - new application which helps to connect erlang nodes under docker In-Reply-To: References: Message-ID: > sorry, but what was the problem? I've never done it before homebrew. For me, it was extremely hard, due to the need to install dependencies. But I think it's another story :) > The code is nice. It is distribution without port resolving, right? Thanks! I glad you liked it. And yes, regarding port resolving, but I would clarify that it's more like a port resolving without epmd (as epmdless is maintaining the host/port mapping instead of epmd). On Thu, Mar 29, 2018 at 7:49 AM, Max Lapshin wrote: > > how complex it was to bring up MySql on OS X in the pas > > sorry, but what was the problem? I've never done it before homebrew. > > > The code is nice. It is distribution without port resolving, right? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincefoley@REDACTED Fri Mar 30 16:24:11 2018 From: vincefoley@REDACTED (Vince Foley) Date: Fri, 30 Mar 2018 07:24:11 -0700 Subject: [erlang-questions] seq_trace token unexpectedly cleared by file:read_file Message-ID: Hi folks, I'm experimenting with seq_trace which seems to be super powerful. However I've run into a case where the token gets unexpectedly cleared out... I ran into it using Elixir, when calling a module that isn't yet loaded in a test. I tracked it down further and was able to reproduce it when simply calling `file:read_file`. Same thing happens if the file exists or not. Example: ``` -module(seq_fail). -include_lib("eunit/include/eunit.hrl"). seq_fail_test() -> seq_trace:set_token(label, 123), ?assertMatch({_, 123, _, _, _}, seq_trace:get_token()), {error, enoent} = file:read_file('not_there'), ?assertMatch({_, 123, _, _, _}, seq_trace:get_token()). ``` Running the test fails the second match: ``` 1) seq_fail:seq_fail_test/0: module 'seq_fail' Failure/Error: ?assertMatch({ _ , 123 , _ , _ , _ }, seq_trace : get_token ( )) expected: = { _ , 123 , _ , _ , _ } got: [] %% .../_build/test/lib/seq_fail/src/seq_fail.erl:9:in `seq_fail:-seq_fail_test/0-fun-1-/0 ``` I dug into the code for `file:read_file` and came across some interesting things (like erlang:dt_spread_tag) but couldn't track it any further... Anyone have ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadt18@REDACTED Fri Mar 30 17:45:11 2018 From: wadt18@REDACTED (WADT 2018) Date: Fri, 30 Mar 2018 15:45:11 +0000 Subject: [erlang-questions] WADT 2018 - 2nd Call for Papers Message-ID: ====================================================================== SECOND CALL FOR PAPERS ? Submission is now open! WADT 2018 24th International Workshop on Algebraic Development Techniques http://wadt18.cs.rhul.ac.uk July 2?5, 2018, Royal Holloway University of London, Egham, UK ====================================================================== AIMS AND SCOPE The algebraic approach to system specification encompasses many aspects of the formal design of software systems. Originally born as a formal method for reasoning about abstract data types, it now covers new specification frameworks and programming paradigms (such as object-oriented, aspect-oriented, agent-oriented, logic and higher-order functional programming) as well as a wide range of application areas (including information systems, concurrent, distributed and mobile systems). The workshop will provide an opportunity to present recent and ongoing work, to meet colleagues, and to discuss new ideas and future trends. TOPICS OF INTEREST Typical, but not exclusive topics of interest are: ? Foundations of algebraic specification ? Other approaches to formal specification, including process calculi and models of concurrent, distributed, and cyber-physical systems ? Specification languages, methods, and environments ? Semantics of conceptual modelling methods and techniques ? Model-driven development ? Graph transformations, term rewriting, and proof systems ? Integration of formal specification techniques ? Formal testing and quality assurance, validation, and verification ? Algebraic approaches to cognitive sciences, including computational creativity WORKSHOP FORMAT AND LOCATION The workshop will take place over four days, Monday to Thursday, at Royal Holloway University of London in Egham, UK (https://www.royalholloway.ac.uk). Presentations will be selected on the basis of submitted abstracts. INVITED SPEAKERS Artur d'Avila Garcez (City, University of London, UK) Rolf Hennicker (LMU Munich, Germany) Kai-Uwe K?hnberger (Osnabr?ck University, Germany) Fernando Orejas (Technical University of Catalonia, Spain) IMPORTANT DATES Submission deadline for abstracts: April 27th, 2018 Notification of acceptance: May 18th, 2018 Early registration: June 1st, 2018 Final abstract due: June 1st, 2018 Workshop: July 2?5, 2018 SUBMISSIONS The scientific programme of the workshop will include presentations of recent results or ongoing research as well as invited talks. The presentations will be selected by the Steering Committee on the basis of submitted abstracts according to originality, significance and general interest. Abstracts must not exceed two pages including references; if a longer version of the contribution is available, it can be made accessible on the web and referenced in the abstract. Abstracts have to be submitted electronically via the EasyChair system at https://easychair.org/conferences/?conf=wadt18. PROCEEDINGS After the workshop, authors will be invited to submit full papers for the refereed proceedings. All submissions will be reviewed by the Programme Committee. Selection will be based on originality, soundness, and significance of the presented ideas and results. The proceedings will be published as a volume of Lecture Notes in Computer Science (Springer). The deadline for submissions will be September 3, 2018, with notifications by October 29. Camera-ready versions will be required by November 11. SPONSORSHIP The workshop takes place under the auspices of IFIP WG 1.3. WADT STEERING COMMITTEE Andrea Corradini (Italy) Jos? Fiadeiro (UK) [co-chair] Rolf Hennicker (Germany) Hans-J?rg Kreowski (Germany) Till Mossakowski (Germany) Fernando Orejas (Spain) Markus Roggenbach (UK) Grigore Ro?u (United States) PROGRAMME COMMITEE Paolo Baldan (Italy) Andrea Corradini (Italy) Artur d'Avila Garcez (UK) R?zvan Diaconescu (Romania) Jos? Fiadeiro (UK) [co-chair] Fabio Gadducci (Italy) Reiko Heckel (UK) Rolf Hennicker (Germany) Alexander Knapp (Germany) Barbara K?nig (Germany) Ant?nia Lopes (Portugal) Narciso Marti-Oliet (Spain) Till Mossakowski (Germany) Fernando Orejas (Spain) Leila Ribeiro (Brazil) Markus Roggenbach (UK) Pierre-Yves Schobbens (Belgium) Lutz Schr?der (Germany) Pawel Sobocinski (UK) Ionu? ?u?u (UK) [co-chair] Martin Wirsing (Germany) ORGANIZING COMMITTEE Claudia Chiri?? (UK) Jos? Fiadeiro (UK) Ionu? ?u?u (UK) CONTACT INFORMATION Email: wadt18@REDACTED Homepage: http://wadt18.cs.rhul.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: