From rickard@REDACTED Thu Nov 1 11:53:53 2018 From: rickard@REDACTED (Rickard Green) Date: Thu, 1 Nov 2018 11:53:53 +0100 Subject: [erlang-questions] Patch Package OTP 20.3.8.11 Released Message-ID: <793333ec-3c04-4673-84de-928cb965df3c@erlang.org> Patch Package: OTP 20.3.8.11 Git Tag: OTP-20.3.8.11 Date: 2018-11-01 Trouble Report Id: OTP-15399 Seq num: ERIERL-262, ERL-751 System: OTP Release: 20 Application: erts-9.3.3.5 Predecessor: OTP 20.3.8.10 Check out the git tag OTP-20.3.8.11, 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. --------------------------------------------------------------------- --- erts-9.3.3.5 ---------------------------------------------------- --------------------------------------------------------------------- The erts-9.3.3.5 application can be applied independently of other applications on a full OTP 20 installation. --- Fixed Bugs and Malfunctions --- OTP-15399 Application(s): erts Related Id(s): ERIERL-262, ERL-751, OTP-14205 ERTS internal trees of monitor structures could get into an inconsistent state. This could cause 'DOWN' messages not to be delivered when they should, as well as delivery of 'DOWN' messages that should not be delivered. This bug was introduced in ERTS version 9.0 (OTP 20.0) and was fixed in ERTS version 10.0 (OTP 21.0) due to a rewrite of the monitor code. That is, this bug only exist in the OTP 20 release. Full runtime dependencies of erts-9.3.3.5: kernel-5.0, sasl-3.0.1, stdlib-3.0 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- From askjuise@REDACTED Thu Nov 1 13:47:54 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Thu, 1 Nov 2018 15:47:54 +0300 Subject: [erlang-questions] Patch Package OTP 20.3.8.11 Released In-Reply-To: <793333ec-3c04-4673-84de-928cb965df3c@erlang.org> References: <793333ec-3c04-4673-84de-928cb965df3c@erlang.org> Message-ID: Are there any chances that Erlang Solutions will build for this patch set separate erlang package - https://www.erlang-solutions.com/resources/download.html ? The last package is 20.3.8.6 ??, 1 ????. 2018 ?. ? 13:54, Rickard Green : > Patch Package: OTP 20.3.8.11 > Git Tag: OTP-20.3.8.11 > Date: 2018-11-01 > Trouble Report Id: OTP-15399 > Seq num: ERIERL-262, ERL-751 > System: OTP > Release: 20 > Application: erts-9.3.3.5 > Predecessor: OTP 20.3.8.10 > > Check out the git tag OTP-20.3.8.11, 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. > > --------------------------------------------------------------------- > --- erts-9.3.3.5 ---------------------------------------------------- > --------------------------------------------------------------------- > > The erts-9.3.3.5 application can be applied independently of other > applications on a full OTP 20 installation. > > --- Fixed Bugs and Malfunctions --- > > OTP-15399 Application(s): erts > Related Id(s): ERIERL-262, ERL-751, OTP-14205 > > ERTS internal trees of monitor structures could get > into an inconsistent state. This could cause 'DOWN' > messages not to be delivered when they should, as well > as delivery of 'DOWN' messages that should not be > delivered. > > This bug was introduced in ERTS version 9.0 (OTP 20.0) > and was fixed in ERTS version 10.0 (OTP 21.0) due to a > rewrite of the monitor code. That is, this bug only > exist in the OTP 20 release. > > > Full runtime dependencies of erts-9.3.3.5: kernel-5.0, sasl-3.0.1, > stdlib-3.0 > > > --------------------------------------------------------------------- > --------------------------------------------------------------------- > --------------------------------------------------------------------- > _______________________________________________ > 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 john.ashmun@REDACTED Thu Nov 1 22:48:55 2018 From: john.ashmun@REDACTED (John R. Ashmun) Date: Thu, 1 Nov 2018 14:48:55 -0700 Subject: [erlang-questions] wxErlang question Message-ID: I have written an interactive Erlang program which runs on Microsoft Windows 10 & which makes use of wxErlang to open a window which contains buttons for a user to click upon. Their use is not problematic. The window has a File menu with the single item "Quit" and of course it also has a widget intended to be used to close it. The use of these is somewhat problematic: If I select the "Quit" item, although the Erlang process that created the window successfully receives the message #wx{ id= ?EXIT, event = #wxCommand{ type = command_menu_selected } } (where I used a -define(EXIT, ?wxID_EXIT). macro for some reason.) and its matching clause apparently succeeds with its call to wxWindow:close( ), in the Erlang shell there appears this message: =ERROR REPORT==== 1-Nov-2018::14:01:34 === Supervisor received unexpected message: {wx,-202, {wx_ref,35,wxFrame,[]}, [], {wxClose,close_window}} My guess is that this report is generated by calling wxWindow:close( Frame, [] ). I don't understand what "Supervisor" is in this case. Could it be the process that spawned the process that creates the wxWindow? The process owning the window and handling the wxCommand event attempts to send a tuple { terminate } to a process in the application that started it, and this appears to succeed, but only as a result of the Quit menu item -- if I click on the window-closing widget, I see no action being taken, but it turns out that the same ERROR REPORT has been queued somewhere; it appears after I subsequently choose the Quit menu item, before the one generated by choosing the Quit menu item. I would like to learn how to eliminate the error report & how to get the close widget to close the window and send the { terminate } tuple. About the close_window event, the receive loop is looking for #wx{ id = ?CLOSE, event = #wxCommand{ type = close_window } } where ?CLOSE is an alias for ?wxID_CLOSE If I had any understanding of how to use Github from Windows 10, I would happily make the sources available, but it's beyond me so far. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dangud@REDACTED Thu Nov 1 23:49:07 2018 From: dangud@REDACTED (Dan Gudmundsson) Date: Thu, 1 Nov 2018 23:49:07 +0100 Subject: [erlang-questions] wxErlang question In-Reply-To: References: Message-ID: One problem is: #wx{ id = ?CLOSE, event = #wxCommand{ type = close_window } } which should be #wx{ id = ?CLOSE, event = #*wxClose*{ type = close_window } } On Thu, Nov 1, 2018 at 10:49 PM John R. Ashmun wrote: > I have written an interactive Erlang program which runs on Microsoft > Windows 10 & which makes use of wxErlang to open a window which contains > buttons for a user to click upon. Their use is not problematic. > > The window has a File menu with the single item "Quit" and of course it > also has a widget intended to be used to close it. The use of these is > somewhat problematic: If I select the "Quit" item, although the Erlang > process that created the window successfully receives the message > > #wx{ id= ?EXIT, > event = #wxCommand{ type = command_menu_selected } } > > (where I used a > > -define(EXIT, ?wxID_EXIT). > > macro for some reason.) > > and its matching clause apparently succeeds with its call to > wxWindow:close( ), in the Erlang shell there appears this message: > > =ERROR REPORT==== 1-Nov-2018::14:01:34 === > Supervisor received unexpected message: {wx,-202, > {wx_ref,35,wxFrame,[]}, > [], > {wxClose,close_window}} > > My guess is that this report is generated by calling wxWindow:close( > Frame, [] ). > > I don't understand what "Supervisor" is in this case. Could it be the > process that spawned the process that creates the wxWindow? The process > owning the window and handling the wxCommand event attempts to send a tuple > { terminate } to a process in the application that started it, and this > appears to succeed, but only as a result of the Quit menu item -- if I > click on the window-closing widget, I see no action being taken, but it > turns out that the same ERROR REPORT has been queued somewhere; it appears > after I subsequently choose the Quit menu item, before the one generated by > choosing the Quit menu item. > > I would like to learn how to eliminate the error report & how to get the > close widget to close the window and send the { terminate } tuple. > > About the close_window event, the receive loop is looking for > > #wx{ id = ?CLOSE, event = #wxCommand{ type = close_window } } > > where ?CLOSE is an alias for ?wxID_CLOSE > > If I had any understanding of how to use Github from Windows 10, I would > happily make the sources available, but it's beyond me so far. > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.ashmun@REDACTED Fri Nov 2 00:23:14 2018 From: john.ashmun@REDACTED (John R. Ashmun) Date: Thu, 1 Nov 2018 16:23:14 -0700 Subject: [erlang-questions] wxErlang question In-Reply-To: References: Message-ID: Thank you. I don't see a change in the (lack of) behavior of the close widget, though. I'm clearly missing something more. On Thu, Nov 1, 2018 at 3:49 PM Dan Gudmundsson wrote: > One problem is: > > #wx{ id = ?CLOSE, event = #wxCommand{ type = close_window } } > which should be > #wx{ id = ?CLOSE, event = #*wxClose*{ type = close_window } } > > > > On Thu, Nov 1, 2018 at 10:49 PM John R. Ashmun > wrote: > >> I have written an interactive Erlang program which runs on Microsoft >> Windows 10 & which makes use of wxErlang to open a window which contains >> buttons for a user to click upon. Their use is not problematic. >> >> The window has a File menu with the single item "Quit" and of course it >> also has a widget intended to be used to close it. The use of these is >> somewhat problematic: If I select the "Quit" item, although the Erlang >> process that created the window successfully receives the message >> >> #wx{ id= ?EXIT, >> event = #wxCommand{ type = command_menu_selected } } >> >> (where I used a >> >> -define(EXIT, ?wxID_EXIT). >> >> macro for some reason.) >> >> and its matching clause apparently succeeds with its call to >> wxWindow:close( ), in the Erlang shell there appears this message: >> >> =ERROR REPORT==== 1-Nov-2018::14:01:34 === >> Supervisor received unexpected message: {wx,-202, >> {wx_ref,35,wxFrame,[]}, >> [], >> {wxClose,close_window}} >> >> My guess is that this report is generated by calling wxWindow:close( >> Frame, [] ). >> >> I don't understand what "Supervisor" is in this case. Could it be the >> process that spawned the process that creates the wxWindow? The process >> owning the window and handling the wxCommand event attempts to send a tuple >> { terminate } to a process in the application that started it, and this >> appears to succeed, but only as a result of the Quit menu item -- if I >> click on the window-closing widget, I see no action being taken, but it >> turns out that the same ERROR REPORT has been queued somewhere; it appears >> after I subsequently choose the Quit menu item, before the one generated by >> choosing the Quit menu item. >> >> I would like to learn how to eliminate the error report & how to get the >> close widget to close the window and send the { terminate } tuple. >> >> About the close_window event, the receive loop is looking for >> >> #wx{ id = ?CLOSE, event = #wxCommand{ type = close_window } } >> >> where ?CLOSE is an alias for ?wxID_CLOSE >> >> If I had any understanding of how to use Github from Windows 10, I would >> happily make the sources available, but it's beyond me so far. >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommy.mattsson@REDACTED Fri Nov 2 10:05:22 2018 From: tommy.mattsson@REDACTED (Mattsson, Tommy) Date: Fri, 2 Nov 2018 09:05:22 +0000 Subject: [erlang-questions] Erlang ssh shell question Message-ID: Hi, First time writer here on the erlang questions list :) I am wondering if anyone knows about how the erlang ssh handles I/O? More details can be found below. Erlang version: 21.0 Start of SSH server on testing (Windows) machine: application:ensure_all_started(ssh), Options = [{system_dir, filename:join(SSHPath, "daemon")}, {user_dir, ?DIR}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, SSHPath}])]}], ssh:daemon(?ipaddr, ?port, Options]). Test module: -module(sshtest). sshIO() -> io:format("test1~n"), io:format("test2\n"), test3. Test run from my own machine: > ssh $IPADDR 'sshtest:sshIO().' test3 For some reason any io:format/io:fwrite does not travel back over the SSH connection. If I connect to some Linux machine that already has a (non-erlang) SSH server running and I try to run some random bash script then any echo I have in the script will travel back over the SSH connection. A test I did with a bash script towards a Linux server, Bash script (~/test.sh): echo "test1" echo "test2" echo "test3" Test run from my own machine: > ssh $IPADDR ./test.sh test1 test2 test3 This is how I'd like it to work. I have been googling and reading the documentation for the ssh and related modules to no avail in regards to finding a solution to this problem. Other than this I/O problem the ssh connection works perfectly for me ?? Hopefully someone here on the list has some insight into how this works. Thankful for any help I can get :) Best regards, Tommy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans.r.nilsson@REDACTED Fri Nov 2 10:37:00 2018 From: hans.r.nilsson@REDACTED (Hans Nilsson R) Date: Fri, 2 Nov 2018 09:37:00 +0000 Subject: [erlang-questions] Erlang ssh shell question In-Reply-To: References: Message-ID: <69b28448-29a5-208a-2737-a5bd02109ec6@ericsson.com> Hi, Try 5> ssh:daemon(1234, [{system_dir,...}, {shell,fun(Usr,Hst) -> spawn(fun() -> io:format("Hello ~p ~p~n",[Usr,Hst]), L1 = io:get_line("&& "), io:format("Got ~p~n", [L1]) end) end}]). {ok,<0.110.0>} 6> Sorry for the one-liner. The fun() a bit edited, I hope I got it right: fun(Usr,Hst) -> spawn(fun() -> io:format("Hello ~p ~p~n",[Usr,Hst]), L1 = io:get_line("&& "), io:format("Got ~p~n", [L1]) end) end Note the option shell and the spawn, it is essential. You don't need the subsystem option. The user_dir option defaults to the $HOME/.ssh of the user that started erl. Now in bash: ~$ ssh -p 1234 localhost Hello "USERNAME" {{127,0,0,1},60088} && some command Got "some command\n" Connection to localhost closed. ~$ Hope this helps. /Hans On 11/2/18 10:05 AM, Mattsson, Tommy wrote: > Hi, > > First time writer here on the erlang questions list :) > > > I am wondering if anyone knows about how the erlang ssh handles I/O? More details can be found below. > > > Erlang version: 21.0 > > > > Start of SSH server on testing (Windows) machine: > > application:ensure_all_started(ssh), > Options = [{system_dir, filename:join(SSHPath, "daemon")}, {user_dir, ?DIR}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, SSHPath}])]}], > > ssh:daemon(?ipaddr, ?port, Options]). > > Test module: > -module(sshtest). > sshIO() -> > io:format("test1~n"), > io:format("test2\n"), > test3. > > > Test run from my own machine: >> ssh $IPADDR 'sshtest:sshIO().' > test3 > > > For some reason any io:format/io:fwrite does not travel back over the SSH connection. If I connect to some Linux machine that already has a (non-erlang) SSH server running and I try to run some random bash script then any echo I have in the script will travel back over the SSH connection. > > A test I did with a bash script towards a Linux server, > Bash script (~/test.sh): > > echo "test1" > > echo "test2" > > echo "test3" > > > Test run from my own machine: >> ssh $IPADDR ./test.sh > > test1 > > test2 > > test3 > > This is how I'd like it to work. > > > I have been googling and reading the documentation for the ssh and related modules to no avail in regards to finding a solution to this problem. > > Other than this I/O problem the ssh connection works perfectly for me ?? > > Hopefully someone here on the list has some insight into how this works. > > Thankful for any help I can get :) > Best regards, > > Tommy > > > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4161 bytes Desc: S/MIME Cryptographic Signature URL: From per@REDACTED Fri Nov 2 11:30:33 2018 From: per@REDACTED (Per Hedeland) Date: Fri, 2 Nov 2018 11:30:33 +0100 Subject: [erlang-questions] Erlang ssh shell question In-Reply-To: <69b28448-29a5-208a-2737-a5bd02109ec6@ericsson.com> References: <69b28448-29a5-208a-2737-a5bd02109ec6@ericsson.com> Message-ID: Hi Tommy! (and Hans:-) Hans, I *think* you are misunderstanding Tommy's question. More speculation below, since I haven't actually verified how ssh(3) works... When using e.g. the OpenSSH client, $ ssh makes a "shell" request per https://tools.ietf.org/html/rfc4254#section-6.5 , while $ ssh makes an "exec" request. I think Tommy is happy with how "shell" works, but you seem to be changing it to a pretty boring implementation.:-) And I think Tommy's question is about "exec" not associating 'standard_io' with the SSH channel - thus if you use "exec" to call a function that prints something, the output is lost. I'm not sure there is anything "wrong" with that though - for an SSH server running "directly" on *nix, it is obvious that "exec" should associate stdio with the SSH channel, since is *nix shell command, and it's pretty fundamental that you want any output (and exit code) that it produces. But for the Erlang/OTP SSH server, is (apparently) an Erlang function call, and sending only what the call returns (in text form) back through the channel is not unreasonable per se. But maybe there could be an option to ssh:daemon() to make it do the same thing with 'standard_io' for "exec" as it does for "shell" - I can't see one in the man page. And I can't think of a way that the called function could set it up. But I assume that it's possible to do-it-all yourself via the 'ssh_cli' option. --Per On 2018-11-02 10:37, Hans Nilsson R wrote: > Hi, > > Try > > 5> ssh:daemon(1234, [{system_dir,...}, {shell,fun(Usr,Hst) -> spawn(fun() -> io:format("Hello ~p ~p~n",[Usr,Hst]), L1 = io:get_line("&& "), io:format("Got ~p~n", [L1]) end) end}]). > {ok,<0.110.0>} > 6> > > Sorry for the one-liner. The fun() a bit edited, I hope I got it right: > > fun(Usr,Hst) -> > spawn(fun() -> > io:format("Hello ~p ~p~n",[Usr,Hst]), > L1 = io:get_line("&& "), > io:format("Got ~p~n", [L1]) > end) > end > > > Note the option shell and the spawn, it is essential. > You don't need the subsystem option. The user_dir option defaults to the $HOME/.ssh of the user that started erl. > > Now in bash: > > ~$ ssh -p 1234 localhost > Hello "USERNAME" {{127,0,0,1},60088} > && some command > Got "some command\n" > Connection to localhost closed. > ~$ > > Hope this helps. > /Hans > > > > On 11/2/18 10:05 AM, Mattsson, Tommy wrote: >> Hi, >> >> First time writer here on the erlang questions list :) >> >> >> I am wondering if anyone knows about how the erlang ssh handles I/O? More details can be found below. >> >> >> Erlang version: 21.0 >> >> >> >> Start of SSH server on testing (Windows) machine: >> >> application:ensure_all_started(ssh), >> Options = [{system_dir, filename:join(SSHPath, "daemon")}, {user_dir, ?DIR}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, SSHPath}])]}], >> >> ssh:daemon(?ipaddr, ?port, Options]). >> >> Test module: >> -module(sshtest). >> sshIO() -> >> io:format("test1~n"), >> io:format("test2\n"), >> test3. >> >> >> Test run from my own machine: >>> ssh $IPADDR 'sshtest:sshIO().' >> test3 >> >> >> For some reason any io:format/io:fwrite does not travel back over the SSH connection. If I connect to some Linux machine that already has a (non-erlang) SSH server running and I try to run some random bash script then any echo I have in the script will travel back over the SSH connection. >> >> A test I did with a bash script towards a Linux server, >> Bash script (~/test.sh): >> >> echo "test1" >> >> echo "test2" >> >> echo "test3" >> >> >> Test run from my own machine: >>> ssh $IPADDR ./test.sh >> >> test1 >> >> test2 >> >> test3 >> >> This is how I'd like it to work. >> >> >> I have been googling and reading the documentation for the ssh and related modules to no avail in regards to finding a solution to this problem. >> >> Other than this I/O problem the ssh connection works perfectly for me = >> >> Hopefully someone here on the list has some insight into how this works. >> >> Thankful for any help I can get :) >> Best regards, >> >> Tommy >> >> >> >> >> >> >> _______________________________________________ >> 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 elbrujohalcon@REDACTED Fri Nov 2 14:33:50 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Fri, 2 Nov 2018 10:33:50 -0300 Subject: [erlang-questions] [ANN] Spawnfest 2018 - November 24th 00:00 UTC - Worldwide Message-ID: <5B430372-E32C-40CE-8F2C-B41780A8025B@gmail.com> Hi folks, We?re less than a month away from Spawnfest 2018 !! It?s time to register your team (or just yourself, so we can use our find-a-team magical algorithm to? well? find you a team :P). For those who don't know, Spawnfest is the annual 48-hour free online development competition for the BEAM community around the world where you have exactly one weekend to create a system of your choice. As a reference, you can check the winners from last year . Participation is 100% Free of Charge and, thanks to our sponsors , you can win some amazing prizes ! The contest starts on November 24th 00:00 UTC. Register your team and join us! It will be a blast! Brujo Benavides -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc@REDACTED Mon Nov 5 11:51:07 2018 From: marc@REDACTED (Marc Worrell) Date: Mon, 5 Nov 2018 11:51:07 +0100 Subject: [erlang-questions] [ANN] Zotonic release 0.42.0 Message-ID: <62378986-63B9-4EF2-AF50-AE0FF7984DAA@worrell.nl> Hi, Zotonic is the Erlang Content Management System and Framework. We have released Zotonic 0.42.0. This is a maintenance release. Main changes are: * Prevent search engine indexing of error, logon, and language switch pages. * Add Yandex site verification * Support ``user_id`` as configured dispatch id in ``controller_redirect`` You can download the release at: https://github.com/zotonic/zotonic/releases Full release notes are here: http://docs.zotonic.com/en/latest/developer-guide/releasenotes/rel_0.42.0.html Regards, Marc Worrell & everyone of the Zotonic core team. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommy.mattsson@REDACTED Tue Nov 6 09:24:30 2018 From: tommy.mattsson@REDACTED (Mattsson, Tommy) Date: Tue, 6 Nov 2018 08:24:30 +0000 Subject: [erlang-questions] Erlang ssh shell question In-Reply-To: References: <69b28448-29a5-208a-2737-a5bd02109ec6@ericsson.com>, Message-ID: Hi Per and Hans, Thank you both for your replies! ?? Per is correct, I want to execute "ssh " from a regular shell (bash, etc.) and have it connect to the Erlang SSH shell that I started on and give me output like there was "echo test1", "echo test2" in a bash script. I will look into if I can make use of the exec functionality for the Erlang SSH server. I looked at it earlier but it seemed to me that its intended use was for an Erlang SSH client connecting to an Erlang SSH server so I dismissed that as an option. If all else fails I could look into the ssh_cli option and see if I can have an Erlang SSH shell handle I/O differently than the default. Best regards, Tommy ________________________________ From: Per Hedeland Sent: Friday, November 2, 2018 11:30:33 AM To: Hans Nilsson R; Mattsson, Tommy Cc: erlang-questions@REDACTED Subject: Re: [erlang-questions] Erlang ssh shell question Hi Tommy! (and Hans:-) Hans, I *think* you are misunderstanding Tommy's question. More speculation below, since I haven't actually verified how ssh(3) works... When using e.g. the OpenSSH client, $ ssh makes a "shell" request per https://tools.ietf.org/html/rfc4254#section-6.5 , while $ ssh makes an "exec" request. I think Tommy is happy with how "shell" works, but you seem to be changing it to a pretty boring implementation.:-) And I think Tommy's question is about "exec" not associating 'standard_io' with the SSH channel - thus if you use "exec" to call a function that prints something, the output is lost. I'm not sure there is anything "wrong" with that though - for an SSH server running "directly" on *nix, it is obvious that "exec" should associate stdio with the SSH channel, since is *nix shell command, and it's pretty fundamental that you want any output (and exit code) that it produces. But for the Erlang/OTP SSH server, is (apparently) an Erlang function call, and sending only what the call returns (in text form) back through the channel is not unreasonable per se. But maybe there could be an option to ssh:daemon() to make it do the same thing with 'standard_io' for "exec" as it does for "shell" - I can't see one in the man page. And I can't think of a way that the called function could set it up. But I assume that it's possible to do-it-all yourself via the 'ssh_cli' option. --Per On 2018-11-02 10:37, Hans Nilsson R wrote: > Hi, > > Try > > 5> ssh:daemon(1234, [{system_dir,...}, {shell,fun(Usr,Hst) -> spawn(fun() -> io:format("Hello ~p ~p~n",[Usr,Hst]), L1 = io:get_line("&& "), io:format("Got ~p~n", [L1]) end) end}]). > {ok,<0.110.0>} > 6> > > Sorry for the one-liner. The fun() a bit edited, I hope I got it right: > > fun(Usr,Hst) -> > spawn(fun() -> > io:format("Hello ~p ~p~n",[Usr,Hst]), > L1 = io:get_line("&& "), > io:format("Got ~p~n", [L1]) > end) > end > > > Note the option shell and the spawn, it is essential. > You don't need the subsystem option. The user_dir option defaults to the $HOME/.ssh of the user that started erl. > > Now in bash: > > ~$ ssh -p 1234 localhost > Hello "USERNAME" {{127,0,0,1},60088} > && some command > Got "some command\n" > Connection to localhost closed. > ~$ > > Hope this helps. > /Hans > > > > On 11/2/18 10:05 AM, Mattsson, Tommy wrote: >> Hi, >> >> First time writer here on the erlang questions list :) >> >> >> I am wondering if anyone knows about how the erlang ssh handles I/O? More details can be found below. >> >> >> Erlang version: 21.0 >> >> >> >> Start of SSH server on testing (Windows) machine: >> >> application:ensure_all_started(ssh), >> Options = [{system_dir, filename:join(SSHPath, "daemon")}, {user_dir, ?DIR}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, SSHPath}])]}], >> >> ssh:daemon(?ipaddr, ?port, Options]). >> >> Test module: >> -module(sshtest). >> sshIO() -> >> io:format("test1~n"), >> io:format("test2\n"), >> test3. >> >> >> Test run from my own machine: >>> ssh $IPADDR 'sshtest:sshIO().' >> test3 >> >> >> For some reason any io:format/io:fwrite does not travel back over the SSH connection. If I connect to some Linux machine that already has a (non-erlang) SSH server running and I try to run some random bash script then any echo I have in the script will travel back over the SSH connection. >> >> A test I did with a bash script towards a Linux server, >> Bash script (~/test.sh): >> >> echo "test1" >> >> echo "test2" >> >> echo "test3" >> >> >> Test run from my own machine: >>> ssh $IPADDR ./test.sh >> >> test1 >> >> test2 >> >> test3 >> >> This is how I'd like it to work. >> >> >> I have been googling and reading the documentation for the ssh and related modules to no avail in regards to finding a solution to this problem. >> >> Other than this I/O problem the ssh connection works perfectly for me = >> >> Hopefully someone here on the list has some insight into how this works. >> >> Thankful for any help I can get :) >> Best regards, >> >> Tommy >> >> >> >> >> >> >> _______________________________________________ >> 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 hans.r.nilsson@REDACTED Tue Nov 6 10:43:12 2018 From: hans.r.nilsson@REDACTED (Hans Nilsson R) Date: Tue, 6 Nov 2018 09:43:12 +0000 Subject: [erlang-questions] Erlang ssh shell question In-Reply-To: References: <69b28448-29a5-208a-2737-a5bd02109ec6@ericsson.com> Message-ID: <205d030c-ae15-131a-8072-0c493ca284e0@ericsson.com> Hi Tommy and Hi Per too :) Sorry for my sloppy reading of your first mail, but now I think I understand you. To start an Erlang server executing "shell" or "exec" commands you just start a normal server (= daemon): Erlang/OTP 21 [erts-10.1.1] [source-3094642] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] 2> ssh:daemon(1236, [{system_dir,"XXX"}]). % (will get ~/.ssh as user_dir where ~ is the home of the user that started erl) and elsewhere in a bash: ~$ ssh -p 1236 localhost Eshell V10.1.1 (abort with ^G) 1> io:write(hej). hejok 2> exit(). ~$ or, for "exec": ~$ ssh -p 1236 localhost 1+2. 3 ~$ etc. Now as I understand, you want to do I/O in the command and expect: ~$ ssh -p 1236 localhost 'io:write(hejsan).' hejsan ~$ but you get: ~$ ssh -p 1236 localhost 'io:write(hejsan).' ok ~$ and hejsan is written in the shell of the server started above. You could start your own exec command interpreter with the option 'exec' to the server: (See http://erlang.org/doc/man/ssh.html#type-exec_daemon_option but NOTE: ERROR in that one..... should be {exec, {direct, 'exec_fun/1'() | 'exec_fun/2'() | 'exec_fun/3'()} } ) Example: 9> ssh:daemon(1237, [{system_dir,"XXX"}, {exec, {direct, fun(Cmd) -> {ok, {got,Cmd}} end }}]). and from a separate bash shell: ~$ ssh -p 1237 localhost 'io:write(hejsan).' {got,"io:write(hejsan)."}~$ This gives a clue on what to do: "Just" write something executing the command grabbing the output and return it in that {direct,fun(Cmd)...} as a string... Now I think that not returning I/O from an exec command is a bug. However I can't look into that now and probably not on this side of christmas. IF you should like to dig into this, the central function is ssh_cli:handle_ssh_msg/2 line 114. The clause with the head: handle_ssh_msg({ssh_cm, ConnectionHandler, {exec, ChannelId, WantReply, Cmd}}, S0) -> There are comments in that code which could give you some clues. There is also a comment with "The F communicates via standard io:write/read.". That makes me belive that I accidently changed some functionality when I restructured this part. I will look into that too, but not now. I hope you got some ideas, and just ask if you wonder about something. And Pull Requests are welcome! /Hans On 11/6/18 9:24 AM, Mattsson, Tommy wrote: > Hi Per and Hans, > > Thank you both for your replies! ?? > Per is correct, I want to execute "ssh " from a regular shell (bash, etc.) and have it connect to the Erlang SSH shell that I started on and give me output like there was "echo test1", "echo test2" in a bash script. > > > I will look into if I can make use of the exec functionality for the Erlang SSH server. I looked at it earlier but it seemed to me that its intended use was for an Erlang SSH client connecting to an Erlang SSH server so I dismissed that as an option. > > If all else fails I could look into the ssh_cli option and see if I can have an Erlang SSH shell handle I/O differently than the default. > > > Best regards, > > Tommy > > ________________________________ > From: Per Hedeland > Sent: Friday, November 2, 2018 11:30:33 AM > To: Hans Nilsson R; Mattsson, Tommy > Cc: erlang-questions@REDACTED > Subject: Re: [erlang-questions] Erlang ssh shell question > > Hi Tommy! (and Hans:-) > > Hans, I *think* you are misunderstanding Tommy's question. More > speculation below, since I haven't actually verified how ssh(3) > works... When using e.g. the OpenSSH client, > > $ ssh > > makes a "shell" request per > https://tools.ietf.org/html/rfc4254#section-6.5 , while > > $ ssh > > makes an "exec" request. I think Tommy is happy with how "shell" works, > but you seem to be changing it to a pretty boring implementation.:-) And > I think Tommy's question is about "exec" not associating 'standard_io' > with the SSH channel - thus if you use "exec" to call a function that > prints something, the output is lost. > > I'm not sure there is anything "wrong" with that though - for an SSH > server running "directly" on *nix, it is obvious that "exec" should > associate stdio with the SSH channel, since is *nix shell command, > and it's pretty fundamental that you want any output (and exit code) > that it produces. But for the Erlang/OTP SSH server, is > (apparently) an Erlang function call, and sending only what the call > returns (in text form) back through the channel is not unreasonable per > se. > > But maybe there could be an option to ssh:daemon() to make it do the > same thing with 'standard_io' for "exec" as it does for "shell" - I > can't see one in the man page. And I can't think of a way that the > called function could set it up. But I assume that it's possible to > do-it-all yourself via the 'ssh_cli' option. > > --Per > > On 2018-11-02 10:37, Hans Nilsson R wrote: >> Hi, >> >> Try >> >> 5> ssh:daemon(1234, [{system_dir,...}, {shell,fun(Usr,Hst) -> spawn(fun() -> io:format("Hello ~p ~p~n",[Usr,Hst]), L1 = io:get_line("&& "), io:format("Got ~p~n", [L1]) end) end}]). >> {ok,<0.110.0>} >> 6> >> >> Sorry for the one-liner. The fun() a bit edited, I hope I got it right: >> >> fun(Usr,Hst) -> >> spawn(fun() -> >> io:format("Hello ~p ~p~n",[Usr,Hst]), >> L1 = io:get_line("&& "), >> io:format("Got ~p~n", [L1]) >> end) >> end >> >> >> Note the option shell and the spawn, it is essential. >> You don't need the subsystem option. The user_dir option defaults to the $HOME/.ssh of the user that started erl. >> >> Now in bash: >> >> ~$ ssh -p 1234 localhost >> Hello "USERNAME" {{127,0,0,1},60088} >> && some command >> Got "some command\n" >> Connection to localhost closed. >> ~$ >> >> Hope this helps. >> /Hans >> >> >> >> On 11/2/18 10:05 AM, Mattsson, Tommy wrote: >>> Hi, >>> >>> First time writer here on the erlang questions list :) >>> >>> >>> I am wondering if anyone knows about how the erlang ssh handles I/O? More details can be found below. >>> >>> >>> Erlang version: 21.0 >>> >>> >>> >>> Start of SSH server on testing (Windows) machine: >>> >>> application:ensure_all_started(ssh), >>> Options = [{system_dir, filename:join(SSHPath, "daemon")}, {user_dir, ?DIR}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, SSHPath}])]}], >>> >>> ssh:daemon(?ipaddr, ?port, Options]). >>> >>> Test module: >>> -module(sshtest). >>> sshIO() -> >>> io:format("test1~n"), >>> io:format("test2\n"), >>> test3. >>> >>> >>> Test run from my own machine: >>>> ssh $IPADDR 'sshtest:sshIO().' >>> test3 >>> >>> >>> For some reason any io:format/io:fwrite does not travel back over the SSH connection. If I connect to some Linux machine that already has a (non-erlang) SSH server running and I try to run some random bash script then any echo I have in the script will travel back over the SSH connection. >>> >>> A test I did with a bash script towards a Linux server, >>> Bash script (~/test.sh): >>> >>> echo "test1" >>> >>> echo "test2" >>> >>> echo "test3" >>> >>> >>> Test run from my own machine: >>>> ssh $IPADDR ./test.sh >>> >>> test1 >>> >>> test2 >>> >>> test3 >>> >>> This is how I'd like it to work. >>> >>> >>> I have been googling and reading the documentation for the ssh and related modules to no avail in regards to finding a solution to this problem. >>> >>> Other than this I/O problem the ssh connection works perfectly for me = > >>> >>> Hopefully someone here on the list has some insight into how this works. >>> >>> Thankful for any help I can get :) >>> Best regards, >>> >>> Tommy >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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 -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4161 bytes Desc: S/MIME Cryptographic Signature URL: From petrica_chiriac@REDACTED Tue Nov 6 15:53:46 2018 From: petrica_chiriac@REDACTED (Petrica Clement Chiriac (Tica2)) Date: Tue, 6 Nov 2018 16:53:46 +0200 Subject: [erlang-questions] erl_wrap advice Message-ID: Hi list, I working to have one erlang wrapper similar how freewrap[1] is working for TCL. Ideea is simple to bundle all in one exec file (Erlang VM, beam files, boot script) Example usage can be: erl_wrap.exe -out my_app.exe -wrap my_erlang_app That works simple: 1) copy erl_wrap.exe to my_app.exe 2) append all Erlang app (beam files, boot script, ...) to my_app.exe file as resources. 3) And job done. Simple click to my_app.exe (On windows) or in console It is still at an early stage, but I have results and I want to continue. I know the work is dirty now but in final I want to be crazy simple. Now I looking for advice how to integrate this erl_wrap library in one current ERLANG dev environment. To do this hack I changed erlang/otp repo but I want to be able to build erl_wrap.exe only based ERLANG dev environment based on compiled lib files and .h files. What is need is a way to link erts (Erlang Runtime) and to alter preload beam files add wrap NIF files and output to erl_wrap.exe (all staticaly linked) In this way erl_wrap can be independently and can integrated by anyone want to use. Now I ask for advice to have this erls.lib (beam only) and separate lib for preload beam files. It this viable method? Do erlang team accept this work patch? Second advice is what I can miss in this design, problems are many (ports from priv diretory, hot updates) but for my usecase to have one file is big win. Now if this erl_wrap is call erl (erl.exe) and is someware in path all Elixir stuf is working (mix, iex, elixir), released not, but looks good. Also EMU,ROOTDIR,BINDIR,PROGNAME do not have any utility now, and are very used inside code. On Unix we have erl script that set env vars and launch erlexec that parse all arguments and exec beam VM (Erlang VM), final process is beam.smp On Windows we have erl.exe that read erl.ini and use erlexec.dll to parse arguments and start Erlang VM from beam.smp.dll, final process is erl.exe In our wrap example final process is my_app.exe (my_app on unix) and because all arguments are bundle startup is simple but env vars EMU,ROOTDIR,BINDIR,PROGNAME do not have a meaning If I have good results I will share as open source library. [1] http://freewrap.sourceforge.net/ Thanks! -- Petrica Clement Chiriac -------------- next part -------------- An HTML attachment was scrubbed... URL: From bchesneau@REDACTED Wed Nov 7 11:09:39 2018 From: bchesneau@REDACTED (Benoit Chesneau) Date: Wed, 7 Nov 2018 11:09:39 +0100 Subject: [erlang-questions] [ANN] just released erlang-rocksdb 0.24.0, a binding of rocksdb embedded K/V database Message-ID: I just released erlang-rocksdb 0.24.0, a binding of rocksdb an embedded K/V database from Facebook for Erlang based applications. This version adds the support of 3 new functions: https://gitlab.com/barrel-db/erlang-rocksdb/tags/0.24.0 also available on hex.pm : https://hex.pm/packages/rocksdb Enjoy! Beno?t -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity@REDACTED Fri Nov 9 03:44:48 2018 From: icfp.publicity@REDACTED (Sam Tobin-Hochstadt) Date: Thu, 08 Nov 2018 21:44:48 -0500 Subject: [erlang-questions] First Call for Papers: PACMPL issue ICFP 2019 Message-ID: <5be4f4a0b6879_1c8812990cc38963@hermes.mail> PACMPL Volume 3, Issue ICFP 2019 Call for Papers accepted papers to be invited for presentation at The 24th ACM SIGPLAN International Conference on Functional Programming Berlin, Germany http://icfp19.sigplan.org/ ### Important dates Submissions due: 1 March 2019 (Friday) Anywhere on Earth https://icfp19.hotcrp.com Author response: 16 April (Tuesday) - 18 Apri (Friday) 14:00 UTC Notification: 3 May (Friday) Final copy due: 22 June (Saturday) Conference: 18 August (Sunday) - 23 August (Friday) ### 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 2019 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 2019 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 1, 2019**, 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 **25 pages for a full paper or Functional Pearl** and **12 pages for an Experience Report**; in either case, the bibliography will not be counted against these limits. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. Supplementary material can and should be **separately** submitted (see below). 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 **Tuesday, April 16, 2019**, to read reviews and respond to them. **Supplementary Material**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. This supplementary material should **not** be submitted as part of the main document; instead, it should be uploaded as a **separate** PDF document or tarball. Supplementary material should be uploaded **at submission time**, not by providing a URL in the paper that points to an external repository. Authors are free to upload both anonymized and non-anonymized supplementary material. Anonymized supplementary material will be visible to reviewers immediately; non-anonymized supplementary material will be revealed to reviewers only 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 2019. 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 2019 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 3, 2019**. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After four weeks (May 31, 2019), 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 four 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 2019 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 limit for the final versions of papers will be increased by two pages to help authors respond to reviewer comments and mandatory revisions: **27 pages plus bibliography for a regular paper or Functional Pearl, 14 pages plus bibliography for an Experience Report**. * 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. ### 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 end with the words "(Experience Report)" in parentheses. 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 to submit 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: Derek Dreyer (MPI-SWS, Germany) Artifact Evaluation Co-Chairs: Simon Marlow (Facebook, UK) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Ilya Sergey (Yale-NUS College, Singapore) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: William J. Bowman (University of British Columbia, Canada) Workshops Co-Chair: Christophe Scholliers (Universiteit Gent, Belgium) Jennifer Hackett (University of Nottingham, UK) Conference Manager: Annabel Satin (P.C.K.) ### PACMPL Volume 3, Issue ICFP 2019 Principal Editor: Fran?ois Pottier (Inria, France) Review Committee: Lennart Beringer (Princeton University, United States) Joachim Breitner (DFINITY Foundation, Germany) Laura M. Castro (University of A Coru?a, Spain) Ezgi ?i?ek (Facebook London, United Kingdom) Pierre-Evariste Dagand (LIP6/CNRS, France) Christos Dimoulas (Northwestern University, United States) Jacques-Henri Jourdan (CNRS, LRI, Universit? Paris-Sud, France) Andrew Kennedy (Facebook London, United Kingdom) Daan Leijen (Microsoft Research, United States) Kazutaka Matsuda (Tohoku University, Japan) Bruno C. d. S. Oliveira (University of Hong Kong, China) Klaus Ostermann (University of T?bingen, Germany) Jennifer Paykin (Galois, United States) Frank Pfenning (Carnegie Mellon University, USA) Mike Rainey (Indiana University, USA) Chung-chieh Shan (Indiana University, USA) Sam Staton (University of Oxford, UK) Pierre-Yves Strub (Ecole Polytechnique, France) German Vidal (Universitat Politecnica de Valencia, Spain) External Review Committee: Michael D. Adams (University of Utah, USA) Robert Atkey (University of Strathclyde, IK) Sheng Chen (University of Louisiana at Lafayette, USA) James Cheney (University of Edinburgh, UK) Adam Chlipala (Massachusetts Institute of Technology, USA) Evelyne Contejean (LRI, Universit? Paris-Sud, France) Germ?n Andr?s Delbianco (IRIF, Universit? Paris Diderot, France) Dominique Devriese (Vrije Universiteit Brussel, Belgium) Richard A. Eisenberg (Bryn Mawr College, USA) Conal Elliott (Target, USA) Sebastian Erdweg (Delft University of Technology, Netherlands) Michael Greenberg (Pomona College, USA) Adrien Guatto (IRIF, Universit? Paris Diderot, France) Jennifer Hackett (University of Nottingham, UK) Troels Henriksen (University of Copenhagen, Denmark) Chung-Kil Hur (Seoul National University, Republic of Korea) Roberto Ierusalimschy (PUC-Rio, Brazil) Ranjit Jhala (University of California, San Diego, USA) Ralf Jung (MPI-SWS, Germany) Ohad Kammar (University of Oxford, UK) Oleg Kiselyov (Tohoku University, Japan) Hsiang-Shang ?Josh? Ko (National Institute of Informatics, Japan) Ond?ej Lhot?k (University of Waterloo, Canada) Dan Licata (Wesleyan University, USA) Geoffrey Mainland (Drexel University, USA) Simon Marlow (Facebook, UK) Akimasa Morihata (University of Tokyo, Japan) Shin-Cheng Mu (Academia Sinica, Taiwan) Guillaume Munch-Maccagnoni (Inria, France) Kim Nguy?n (University of Paris-Sud, France) Ulf Norell (Gothenburg University, Sweden) Atsushi Ohori (Tohoku University, Japan) Rex Page (University of Oklahoma, USA) Zoe Paraskevopoulou (Princeton University, USA) Nadia Polikarpova (University of California, San Diego, USA) Jonathan Protzenko (Microsoft Research, USA) Tiark Rompf (Purdue University, USA) Andreas Rossberg (Dfinity, Germany) KC Sivaramakrishnan (University of Cambridge, UI) Nicholas Smallbone (Chalmers University of Technology, Sweden) Matthieu Sozeau (Inria, France) Sandro Stucki (Chalmers | University of Gothenburg, Sweden) Don Syme (Microsoft, UK) Zachary Tatlock (University of Washington, USA) Sam Tobin-Hochstadt (Indiana University, USA) Takeshi Tsukada (University of Tokyo, Japan) Tarmo Uustalu (Reykjavik University, Iceland) Benoit Valiron (LRI, CentraleSupelec, Univ. Paris Saclay, France) Daniel Winograd-Cort (University of Pennsylvania, USA) Nicolas Wu (University of Bristol, UK) From silver.surfertab@REDACTED Fri Nov 9 10:18:19 2018 From: silver.surfertab@REDACTED (Greg) Date: Fri, 9 Nov 2018 14:48:19 +0530 Subject: [erlang-questions] SD Erlang Message-ID: Hi, Is SD Erlang (s_groups) part of the standard release yet? Greg From lukas@REDACTED Fri Nov 9 15:37:03 2018 From: lukas@REDACTED (Lukas Larsson) Date: Fri, 9 Nov 2018 15:37:03 +0100 Subject: [erlang-questions] Patch Package OTP 20.3.8.12 Released Message-ID: Patch Package: OTP 20.3.8.12 Git Tag: OTP-20.3.8.12 Date: 2018-11-09 Trouble Report Id: OTP-15371, OTP-15412 Seq num: System: OTP Release: 20 Application: erts-9.3.3.6, ssl-8.2.6.3, stdlib-3.4.5.1 Predecessor: OTP 20.3.8.11 Check out the git tag OTP-20.3.8.12, 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. --------------------------------------------------------------------- --- erts-9.3.3.6 ---------------------------------------------------- --------------------------------------------------------------------- The erts-9.3.3.6 application can be applied independently of other applications on a full OTP 20 installation. --- Improvements and New Features --- OTP-15371 Application(s): erts, stdlib List subtraction (The -- operator) will now yield properly on large inputs. Full runtime dependencies of erts-9.3.3.6: kernel-5.0, sasl-3.0.1, stdlib-3.0 --------------------------------------------------------------------- --- ssl-8.2.6.3 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssl-8.2.6.3 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-15412 Application(s): ssl Extend check for undelivered data at closing, could under some circumstances fail to deliverd all data that was acctualy recivied. Full runtime dependencies of ssl-8.2.6.3: crypto-4.2, erts-7.0, inets-5.10.7, kernel-3.0, public_key-1.5, stdlib-3.2 --------------------------------------------------------------------- --- stdlib-3.4.5.1 -------------------------------------------------- --------------------------------------------------------------------- The stdlib-3.4.5.1 application can be applied independently of other applications on a full OTP 20 installation. --- Improvements and New Features --- OTP-15371 Application(s): erts, stdlib List subtraction (The -- operator) will now yield properly on large inputs. Full runtime dependencies of stdlib-3.4.5.1: compiler-5.0, crypto-3.3, erts-9.0, kernel-5.0, sasl-3.0 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlinbrasil@REDACTED Sat Nov 10 09:17:57 2018 From: merlinbrasil@REDACTED (Merlin Brasil) Date: Sat, 10 Nov 2018 06:17:57 -0200 Subject: [erlang-questions] Problem installing RabbitMQ Message-ID: Hi, new to Erlang. Just downloaded the latest Erlang to my Windows 10 computer. When I go to install RabbitMQ, I get the following message: [image: RabbitMQ Error.png] I already had versions 3 and 6 of Erlang, which I uninstalled, but I cannot find ANY reference to a version 7.1 ANYWHERE on my computer. Registry points to the latest version 21, as does the Environment Path variable I'd be most grateful for any help you can provide locating this problem. Thanks, Merlin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RabbitMQ Error.png Type: image/png Size: 2739 bytes Desc: not available URL: From eric.pailleau@REDACTED Sat Nov 10 10:23:04 2018 From: eric.pailleau@REDACTED (Eric Pailleau) Date: Sat, 10 Nov 2018 10:23:04 +0100 Subject: [erlang-questions] Problem installing RabbitMQ In-Reply-To: References: Message-ID: 7.1 is maybe referring to erts version, and would imply an Erlang 18.1.5 version. Do you have such a version installed, even in past, on your computer? Regards Envoy? depuis mon Sony Xperia M2 d'Orange ---- Merlin Brasil a ?crit ---- >Hi, new to Erlang. > >Just downloaded the latest Erlang to my Windows 10 computer. > >When I go to install RabbitMQ, I get the following message: > >[image: RabbitMQ Error.png] > >I already had versions 3 and 6 of Erlang, which I uninstalled, but I cannot >find ANY reference to a version 7.1 >ANYWHERE on my computer. Registry points to the latest version 21, as does >the Environment Path variable > >I'd be most grateful for any help you can provide locating this problem. > >Thanks, >Merlin > >_______________________________________________ >erlang-questions mailing list >erlang-questions@REDACTED >http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.pailleau@REDACTED Sat Nov 10 11:33:27 2018 From: eric.pailleau@REDACTED (PAILLEAU Eric) Date: Sat, 10 Nov 2018 11:33:27 +0100 Subject: [erlang-questions] Problem installing RabbitMQ In-Reply-To: References: Message-ID: <564c5363-29b0-54bc-a3a9-82caa8fce000@wanadoo.fr> there is a page for relation between erlang and rabbitmq versions. https://www.rabbitmq.com/which-erlang.html Le 10/11/2018 ? 10:23, Eric Pailleau a ?crit?: > 7.1 is maybe referring to erts version, and would imply? an Erlang > 18.1.5 version. Do you have such a version installed, even > in past, on your computer? > Regards > > Envoy? depuis mon Sony Xperia M2 d'Orange > > > > ---- Merlin Brasil a ?crit ---- > > Hi, new to Erlang. > > Just downloaded the latest Erlang to my Windows 10 computer. > > When I go to install RabbitMQ, I get the following message: > > RabbitMQ Error.png > > I already had versions 3 and 6 of Erlang, which I uninstalled, but I > cannot find ANY reference to a version 7.1 > ANYWHERE on my computer. Registry points to the latest version 21, as > does the Environment Path variable > > I'd be most grateful for any help you can provide locating this problem. > > Thanks, > Merlin > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From luke@REDACTED Sat Nov 10 14:50:40 2018 From: luke@REDACTED (Luke Bakken) Date: Sat, 10 Nov 2018 05:50:40 -0800 Subject: [erlang-questions] Problem installing RabbitMQ In-Reply-To: References: Message-ID: Hi Merlin, I swear I saw this question posted by you in another forum like the rabbitmq-users mailing list or Stack Overflow. Did you post this elsewhere? At any rate, this is the code that detects Erlang version: https://github.com/rabbitmq/rabbitmq-server-release/blob/master/packaging/windows-exe/rabbitmq_nsi.in#L264-L302 One thing that is probably not obvious is that the NSIS-based installer for RabbitMQ is 32-bit. That means it only looks in the Wow6432Node section of the Windows registry. I suspect you have a stale key under that starting point, in the path Software\Ericsson\Erlang Thanks, Luke On Sat, Nov 10, 2018 at 1:14 AM Merlin Brasil wrote: > Hi, new to Erlang. > > Just downloaded the latest Erlang to my Windows 10 computer. > > When I go to install RabbitMQ, I get the following message: > > [image: RabbitMQ Error.png] > > I already had versions 3 and 6 of Erlang, which I uninstalled, but I > cannot find ANY reference to a version 7.1 > ANYWHERE on my computer. Registry points to the latest version 21, as does > the Environment Path variable > > I'd be most grateful for any help you can provide locating this problem > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RabbitMQ Error.png Type: image/png Size: 2739 bytes Desc: not available URL: From natalia.chechina@REDACTED Sun Nov 11 11:30:42 2018 From: natalia.chechina@REDACTED (Natalia Chechina) Date: Sun, 11 Nov 2018 10:30:42 +0000 Subject: [erlang-questions] SD Erlang In-Reply-To: References: Message-ID: Hello, No they are not... and unfortunately at the moment there are no plans to add them... Best wishes, Natalia. On Fri, 9 Nov 2018 at 09:18, Greg wrote: > Hi, > Is SD Erlang (s_groups) part of the standard release yet? > > Greg > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Natalia Chechina -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlinbrasil@REDACTED Sun Nov 11 14:08:32 2018 From: merlinbrasil@REDACTED (Merlin Brasil) Date: Sun, 11 Nov 2018 11:08:32 -0200 Subject: [erlang-questions] Problem installing RabbitMQ In-Reply-To: References: Message-ID: Thanks for the very specific and absolutely spot-on information, Luke! There was indeed a prior installation in the registry under Wow6432Node and, after deleting that 7.1 reference, the RabbitMQ install worked perfectly, as advertised. And, yes, I had posted the problem to the RMQ list several days ago, but had no response there, at least not that I noticed. I thought about the problem and wrote, I think, a better problem description to the Erlang list. The problem seemed to be more Erlang-related, which turned out to be a good decision. Thanks again for the specificity of your answer and the code-reference was an added bonus :) Your resume now resides on my desktop :) First beer's on me when you make it to Rio! Best regards, Merlin On Sat, Nov 10, 2018 at 11:50 AM Luke Bakken wrote: > Hi Merlin, > > I swear I saw this question posted by you in another forum like the > rabbitmq-users mailing list or Stack Overflow. Did you post this elsewhere? > > At any rate, this is the code that detects Erlang version: > > > https://github.com/rabbitmq/rabbitmq-server-release/blob/master/packaging/windows-exe/rabbitmq_nsi.in#L264-L302 > > One thing that is probably not obvious is that the NSIS-based installer > for RabbitMQ is 32-bit. That means it only looks in the Wow6432Node > section of the Windows registry. I suspect you have a stale key under that > starting point, in the path Software\Ericsson\Erlang > > Thanks, > Luke > > On Sat, Nov 10, 2018 at 1:14 AM Merlin Brasil > wrote: > >> Hi, new to Erlang. >> >> Just downloaded the latest Erlang to my Windows 10 computer. >> >> When I go to install RabbitMQ, I get the following message: >> >> [image: RabbitMQ Error.png] >> >> I already had versions 3 and 6 of Erlang, which I uninstalled, but I >> cannot find ANY reference to a version 7.1 >> ANYWHERE on my computer. Registry points to the latest version 21, as >> does the Environment Path variable >> >> I'd be most grateful for any help you can provide locating this problem >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: RabbitMQ Error.png Type: image/png Size: 2739 bytes Desc: not available URL: From goodjoe2049@REDACTED Sun Nov 11 17:43:03 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 16:43:03 +0000 Subject: [erlang-questions] connect to existing unix socket Message-ID: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> tl;dr How can I avoid: ``` 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). {error,eaddrinuse} ``` --- I have a janus gateway (https://github.com/meetecho/janus-gateway) running on the same host as my Erlang app and I want to be able to make them talk via a unix socket. Janus creates a SOCK_SEQPACKET or SOCK_DGRAM unix socket on startup and I want to be able to connect to it from Erlang. The problem is, when I set Janus to use SOCK_DGRAM, I can't then open it from Erlang: ``` 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). {error,eaddrinuse} ``` and if I set Janus to use SOCK_SEQPACKET, gen_tcp fails for me as well: ``` 2> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local]). {error,eprototype} ``` What am I doing wrong? From goodjoe2049@REDACTED Sun Nov 11 17:51:03 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 16:51:03 +0000 Subject: [erlang-questions] connect to existing unix socket In-Reply-To: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> References: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> Message-ID: Sorry for my manners, forgot to say hi! > On Nov 11, 2018, at 4:43 PM, Joe K wrote: > > tl;dr > > How can I avoid: > > ``` > 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). > {error,eaddrinuse} > ``` > > --- > > I have a janus gateway (https://github.com/meetecho/janus-gateway) running on the same host as my Erlang app and I want to be able to make them talk via a unix socket. Janus creates a SOCK_SEQPACKET or SOCK_DGRAM unix socket on startup and I want to be able to connect to it from Erlang. The problem is, when I set Janus to use SOCK_DGRAM, I can't then open it from Erlang: > > ``` > 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). > {error,eaddrinuse} > ``` > > and if I set Janus to use SOCK_SEQPACKET, gen_tcp fails for me as well: > > ``` > 2> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local]). > {error,eprototype} > ``` > > What am I doing wrong? From goodjoe2049@REDACTED Sun Nov 11 18:01:45 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 17:01:45 +0000 Subject: [erlang-questions] connect to existing unix socket In-Reply-To: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> References: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> Message-ID: <6E33C8C0-4C29-49CF-9194-CF110B08E8E6@gmail.com> If I start Janus with SOCK_DGRAM and use the following from Erlang 1> {ok, Sock} = gen_udp:open(0, [local]). {ok,#Port<0.6>} 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, "{}"). ok then I see Unix Sockets thread started [WARN] Dropping packet from unknown source (no path provided) in Janus logs. > On Nov 11, 2018, at 4:43 PM, Joe K wrote: > > tl;dr > > How can I avoid: > > ``` > 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). > {error,eaddrinuse} > ``` > > --- > > I have a janus gateway (https://github.com/meetecho/janus-gateway) running on the same host as my Erlang app and I want to be able to make them talk via a unix socket. Janus creates a SOCK_SEQPACKET or SOCK_DGRAM unix socket on startup and I want to be able to connect to it from Erlang. The problem is, when I set Janus to use SOCK_DGRAM, I can't then open it from Erlang: > > ``` > 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). > {error,eaddrinuse} > ``` > > and if I set Janus to use SOCK_SEQPACKET, gen_tcp fails for me as well: > > ``` > 2> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local]). > {error,eprototype} > ``` > > What am I doing wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodjoe2049@REDACTED Sun Nov 11 18:32:59 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 17:32:59 +0000 Subject: [erlang-questions] connect to existing unix socket In-Reply-To: <6E33C8C0-4C29-49CF-9194-CF110B08E8E6@gmail.com> References: <20294764-C995-4858-B6DD-2EB7AF33A888@gmail.com> <6E33C8C0-4C29-49CF-9194-CF110B08E8E6@gmail.com> Message-ID: Silly me, I should've just opened the socket with a different path. ``` {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). gen_udp:send(Sock2, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{}">>). ``` worked fine -- Janus is happy. > On Nov 11, 2018, at 5:01 PM, Joe K wrote: > > If I start Janus with SOCK_DGRAM and use the following from Erlang > > 1> {ok, Sock} = gen_udp:open(0, [local]). > {ok,#Port<0.6>} > 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, "{}"). > ok > then I see > > Unix Sockets thread started > [WARN] Dropping packet from unknown source (no path provided) > in Janus logs. > >> On Nov 11, 2018, at 4:43 PM, Joe K > wrote: >> >> tl;dr >> >> How can I avoid: >> >> ``` >> 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). >> {error,eaddrinuse} >> ``` >> >> --- >> >> I have a janus gateway (https://github.com/meetecho/janus-gateway ) running on the same host as my Erlang app and I want to be able to make them talk via a unix socket. Janus creates a SOCK_SEQPACKET or SOCK_DGRAM unix socket on startup and I want to be able to connect to it from Erlang. The problem is, when I set Janus to use SOCK_DGRAM, I can't then open it from Erlang: >> >> ``` >> 1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]). >> {error,eaddrinuse} >> ``` >> >> and if I set Janus to use SOCK_SEQPACKET, gen_tcp fails for me as well: >> >> ``` >> 2> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local]). >> {error,eprototype} >> ``` >> >> What am I doing wrong? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodjoe2049@REDACTED Sun Nov 11 21:13:27 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 20:13:27 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets Message-ID: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. Example: ``` 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). {ok,#Port<0.6>} 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). ok 3> flush(). Shell got {udp,#Port<0.6>, {local,<<"/home/vagrant/janus.sock">>}, 0, <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} ok ``` So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! From goodjoe2049@REDACTED Sun Nov 11 21:57:39 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 20:57:39 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> Message-ID: <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> Actually, the problem is not with message truncation -- gen_udp never receives the full message at all. I've tried the same janus command with netcat, and it does receive the full message, so my problem must be with gen_udp. Is there some option that I can use to make it receive beyond 1460 bytes or at least break the big messages into several, and not drop the overflow silently? > On Nov 11, 2018, at 8:13 PM, Joe K wrote: > > So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. > > Example: > > ``` > 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). > {ok,#Port<0.6>} > > 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). > ok > > 3> flush(). > Shell got {udp,#Port<0.6>, > {local,<<"/home/vagrant/janus.sock">>}, > 0, > <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} > ok > ``` > > So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? > > Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! From goodjoe2049@REDACTED Sun Nov 11 22:01:10 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 21:01:10 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> Message-ID: <0A426B8F-62D6-4AAB-8544-4BB88B55FFAC@gmail.com> Tried using gen_tcp with SOCK_SEQPACKET and it responded with eprototype. 1> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local, binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). {error,eprototype} > On Nov 11, 2018, at 8:13 PM, Joe K wrote: > > So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. > > Example: > > ``` > 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). > {ok,#Port<0.6>} > > 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). > ok > > 3> flush(). > Shell got {udp,#Port<0.6>, > {local,<<"/home/vagrant/janus.sock">>}, > 0, > <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} > ok > ``` > > So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? > > Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! From goodjoe2049@REDACTED Sun Nov 11 23:00:27 2018 From: goodjoe2049@REDACTED (Joe K) Date: Sun, 11 Nov 2018 22:00:27 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <0A426B8F-62D6-4AAB-8544-4BB88B55FFAC@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> <0A426B8F-62D6-4AAB-8544-4BB88B55FFAC@gmail.com> Message-ID: As it should, since the sock is not SOCK_STREAM. Is there a way to use SOCK_SEQPACKET via gen_sctp maybe? > On Nov 11, 2018, at 9:01 PM, Joe K wrote: > > Tried using gen_tcp with SOCK_SEQPACKET and it responded with eprototype. > > 1> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local, binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). > {error,eprototype} > >> On Nov 11, 2018, at 8:13 PM, Joe K wrote: >> >> So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. >> >> Example: >> >> ``` >> 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). >> {ok,#Port<0.6>} >> >> 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). >> ok >> >> 3> flush(). >> Shell got {udp,#Port<0.6>, >> {local,<<"/home/vagrant/janus.sock">>}, >> 0, >> <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} >> ok >> ``` >> >> So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? >> >> Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! > From zxq9@REDACTED Sun Nov 11 23:21:36 2018 From: zxq9@REDACTED (zxq9@REDACTED) Date: Mon, 12 Nov 2018 07:21:36 +0900 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> Message-ID: <3145160.gIva29hZ0c@takoyaki> On 2018?11?11???? 20?57?39? JST Joe K wrote: > Actually, the problem is not with message truncation -- gen_udp never receives the full message at all. I've tried the same janus command with netcat, and it does receive the full message, so my problem must be with gen_udp. Is there some option that I can use to make it receive beyond 1460 bytes or at least break the big messages into several, and not drop the overflow silently? UDP messages longer than the receive buffer will be truncated. You can set the receive buffer size with the option {recbuf, Integer}: {ok, Sock} = gen_udp:open(0, [binary, {recbuf, 4000}, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). or ok = inet:setopts(Sock, [{recbuf, 4000}]). You can check the size of the receive buffer with `inet:getopts(Sock, [recbuf])` to help diagnose your problem. -Craig From silver.surfertab@REDACTED Mon Nov 12 07:03:38 2018 From: silver.surfertab@REDACTED (Greg) Date: Mon, 12 Nov 2018 11:33:38 +0530 Subject: [erlang-questions] SD Erlang In-Reply-To: References: Message-ID: I was really hoping that it would be part of the standard release. What are the options now? On Sun, Nov 11, 2018 at 4:00 PM Natalia Chechina wrote: > Hello, > > No they are not... and unfortunately at the moment there are no plans to > add them... > > Best wishes, > Natalia. > > > > On Fri, 9 Nov 2018 at 09:18, Greg wrote: > >> Hi, >> Is SD Erlang (s_groups) part of the standard release yet? >> >> Greg >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > > > -- > Natalia Chechina > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodjoe2049@REDACTED Mon Nov 12 07:54:43 2018 From: goodjoe2049@REDACTED (Joe K) Date: Mon, 12 Nov 2018 06:54:43 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> Message-ID: <57A501FD-80A0-49FB-AF25-497893302FA6@gmail.com> Hi Craig! inet:getopts(Sock, [recbuf]). yields {ok, [{recbuf, 212992}]} and setting recbuf to 999999 inet:setopts(Sock, [{recbuf, 999999}]). ok inet:getopts(Sock, [recbuf]). {ok, [{recbuf, 425984}]} % not quite 999999 ... seems to work fine, I get the full message. Thank you so much! But I'd still be interested in knowing if there is a way to break overflowing messages into several smaller messages with gen_udp and unix sockets. I also say some notes about gen_sctp and SOCK_SEQPACKET in v21 release notes, so I'll try it out as well. > On Nov 11, 2018, at 8:57 PM, Joe K wrote: > > Actually, the problem is not with message truncation -- gen_udp never receives the full message at all. I've tried the same janus command with netcat, and it does receive the full message, so my problem must be with gen_udp. Is there some option that I can use to make it receive beyond 1460 bytes or at least break the big messages into several, and not drop the overflow silently? > >> On Nov 11, 2018, at 8:13 PM, Joe K wrote: >> >> So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. >> >> Example: >> >> ``` >> 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). >> {ok,#Port<0.6>} >> >> 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). >> ok >> >> 3> flush(). >> Shell got {udp,#Port<0.6>, >> {local,<<"/home/vagrant/janus.sock">>}, >> 0, >> <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} >> ok >> ``` >> >> So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? >> >> Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! > From goodjoe2049@REDACTED Mon Nov 12 07:57:06 2018 From: goodjoe2049@REDACTED (Joe K) Date: Mon, 12 Nov 2018 06:57:06 +0000 Subject: [erlang-questions] Getting the whole message with unix sockets In-Reply-To: <57A501FD-80A0-49FB-AF25-497893302FA6@gmail.com> References: <9D3FB569-B97A-4439-8D46-0A65821B5B23@gmail.com> <6503AC7C-6924-47B4-A88C-3B4B326B263B@gmail.com> <57A501FD-80A0-49FB-AF25-497893302FA6@gmail.com> Message-ID: <575BB832-7C9A-4448-9FAA-84605F51AB54@gmail.com> I also saw* some notes > On Nov 12, 2018, at 6:54 AM, Joe K wrote: > > Hi Craig! > > inet:getopts(Sock, [recbuf]). > > yields {ok, [{recbuf, 212992}]} and setting recbuf to 999999 > > inet:setopts(Sock, [{recbuf, 999999}]). > ok > > inet:getopts(Sock, [recbuf]). > {ok, [{recbuf, 425984}]} % not quite 999999 ... > > seems to work fine, I get the full message. Thank you so much! > > But I'd still be interested in knowing if there is a way to break overflowing messages into several smaller messages with gen_udp and unix sockets. > > I also say some notes about gen_sctp and SOCK_SEQPACKET in v21 release notes, so I'll try it out as well. > >> On Nov 11, 2018, at 8:57 PM, Joe K wrote: >> >> Actually, the problem is not with message truncation -- gen_udp never receives the full message at all. I've tried the same janus command with netcat, and it does receive the full message, so my problem must be with gen_udp. Is there some option that I can use to make it receive beyond 1460 bytes or at least break the big messages into several, and not drop the overflow silently? >> >>> On Nov 11, 2018, at 8:13 PM, Joe K wrote: >>> >>> So I've been able to start a conversation with Janus Gateway via a unix socket (see http://erlang.org/pipermail/erlang-questions/2018-November/096623.html), but now I'm a bit stuck with big messages getting truncated. >>> >>> Example: >>> >>> ``` >>> 1> {ok, Sock} = gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/erl.sock">>}}]). >>> {ok,#Port<0.6>} >>> >>> 2> gen_udp:send(Sock, {local, <<"/home/vagrant/janus.sock">>}, 0, <<"{\"transaction\":\"123\",\"janus\":\"info\"}">>). >>> ok >>> >>> 3> flush(). >>> Shell got {udp,#Port<0.6>, >>> {local,<<"/home/vagrant/janus.sock">>}, >>> 0, >>> <<"{\"janus\":\"server_info\",\"transaction\":\"123\",\"name\":\"Janus WebRTC Server\",\"version\":50,\"version_string\":\"0.5.0\",\"author\":\"Meetecho s.r.l.\",\"commit-hash\":\"6b916658a88e29a0991007f6f79b6961ee02c784\",\"compile-time\":\"Sat Nov 10 13:12:23 UTC 2018\",\"log-to-stdout\":true,\"log-to-file\":false,\"data_channels\":false,\"session-timeout\":60,\"reclaim-session-timeout\":0,\"candidates-timeout\":45,\"server-name\":\"MyJanusInstance\",\"local-ip\":\"10.0.2.15\",\"ipv6\":false,\"ice-lite\":false,\"ice-tcp\":false,\"full-trickle\":false,\"rfc-4588\":false,\"static-event-loops\":0,\"api_secret\":false,\"auth_token\":false,\"event_handlers\":false,\"transports\":{\"janus.transport.http\":{\"name\":\"JANUS REST (HTTP/HTTPS) transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.\",\"version_string\":\"0.0.2\",\"version\":2},\"janus.transport.pfunix\":{\"name\":\"JANUS Unix Sockets transport plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This transport plugin adds Unix Sockets support to the Janus API.\",\"version_string\":\"0.0.1\",\"version\":1}},\"events\":{},\"plugins\":{\"janus.plugin.audiobridge\":{\"name\":\"JANUS AudioBridge plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams.\",\"version_string\":\"0.0.10\",\"version\":10},\"janus.plugin.echotest\":{\"name\":\"JANUS EchoTest plugin\",\"author\":\"Meetecho s.r.l.\",\"description\":\"This is a trivial EchoTest pl">>} >>> ok >>> ``` >>> >>> So the json message is incomplete, is there a way to make `gen_udp` wait for a line break like `{packet, line}` or `{line_delimeter, Char}`? >>> >>> Janus is using SOCK_DGRAM in the current setup, but I can also make it use SOCK_SEQPACKET and try gen_tcp (I guess), would it help? I guess, I'll have to find that out! >> > From michael_489@REDACTED Mon Nov 12 09:35:48 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Mon, 12 Nov 2018 08:35:48 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 Message-ID: Hello, I want to build the OTP Version 21.1.1 from Github on Windows 10, and I do the steps from "http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#using-git" with the following commands running in cygwin: git clone https://github.com/erlang/otp.git cd otp git checkout OTP-21.1.1 eval `./otp_build env_win32 x64` ./otp_build autoconf ./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin ./otp_build release -a /home/user_1/otp_21_1_1 This is the error log, and it stops with make for beam.smp.dll, and I don?t know why. I have downloaded the Windows Kit 8.1 and Visual Studio 2013 (12.0): user_1@REDACTED ~/erlbuild/otp $ which cl.exe /cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin/amd64/cl.exe user_1@REDACTED ~/erlbuild/otp $ which rc.exe /cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin/amd64/rc.exe user_1@REDACTED ~/erlbuild/otp $ ./otp_build release -a /home/user_1/otp_21_1_1 MAKE emulator make[1]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird betreten make[2]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird betreten make[3]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird betreten MAKE opt make[4]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird betreten GEN win32/gen_git_version.mk LD /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll usage: mt [-V] [-f device] operation [count] Bibliothek "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib" und Objekt "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.exp" werden erstellt. make[4]: *** [win32/Makefile:1091: /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll] Fehler 1 make[4]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird verlassen make[3]: *** [/home/user_1/erlbuild/otp/make/run_make.mk:35: opt] Fehler 2 make[3]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird verlassen make[2]: *** [Makefile:45: opt] Fehler 2 make[2]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird verlassen make[1]: *** [Makefile:54: smp] Fehler 2 make[1]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird verlassen make: *** [Makefile:473: emulator] Fehler 2 Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas@REDACTED Mon Nov 12 09:46:07 2018 From: lukas@REDACTED (Lukas Larsson) Date: Mon, 12 Nov 2018 09:46:07 +0100 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: Hello, On Mon, Nov 12, 2018 at 9:35 AM Michael Scharrer wrote: > git clone https://github.com/erlang/otp.gitcd otp > git checkout OTP-21.1.1 > > eval `./otp_build env_win32 x64` > > ./otp_build autoconf > ./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin > ./otp_build release -a /home/user_1/otp_21_1_1 > > If you set "V=1" before you run "./otp_build release" you will get a full printout of the command that is run. This should help to pinpoint the problem. i.e. > V=1 ./otp_build release -a /home/user_1/otp_21_1_1 Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael_489@REDACTED Mon Nov 12 10:30:21 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Mon, 12 Nov 2018 09:30:21 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: Hi Lukas, now the output with V=1 is: user_1@REDACTED ~/erlbuild/otp $ V=1 ./otp_build release -a /home/user_1/otp_21_1_1 cd erts && ERL_TOP=/home/user_1/erlbuild/otp PATH=/home/user_1/erlbuild/otp/erts/etc/win32/cygwin_tools/vc:/home/user_1/erlbuild/otp/erts/etc/win32/cygwin_tools:/home/user_1/erlbuild/otp/bootstrap/bin:"${PATH}" \ make NO_START_SCRIPTS=true FLAVOR= PROFILE= make[1]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird betreten for type in opt; do \ ( make $type ) || exit $?; \ done make[2]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird betreten for d in emulator etc epmd lib_src; do \ if test -d $d; then \ ( cd $d && make opt ) || exit $?; \ fi ; \ done make[3]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird betreten make -f win32/Makefile TYPE=opt make[4]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird betreten if utils/gen_git_version win32/gen_git_version.mk; then touch beam/erl_bif_info.c; fi cc.sh -dll -def:sys/win32/erl.def -implib:/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib -o /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll \ obj/win32/opt/smp/erl_main.o obj/win32/opt/smp/beams.res obj/win32/opt/smp/beam_emu.o obj/win32/opt/smp/erl_process.o obj/win32/opt/smp/beam_opcodes.o obj/win32/opt/smp/beam_load.o obj/win32/opt/smp/beam_bif_load.o obj/win32/opt/smp/beam_debug.o obj/win32/opt/smp/beam_bp.o obj/win32/opt/smp/beam_catches.o obj/win32/opt/smp/code_ix.o obj/win32/opt/smp/beam_ranges.o obj/win32/opt/smp/erl_alloc.o obj/win32/opt/smp/erl_mtrace.o obj/win32/opt/smp/erl_alloc_util.o obj/win32/opt/smp/erl_goodfit_alloc.o obj/win32/opt/smp/erl_bestfit_alloc.o obj/win32/opt/smp/erl_afit_alloc.o obj/win32/opt/smp/erl_init.o obj/win32/opt/smp/erl_atom_table.o obj/win32/opt/smp/erl_bif_table.o obj/win32/opt/smp/erl_bif_ddll.o obj/win32/opt/smp/erl_bif_guard.o obj/win32/opt/smp/erl_bif_info.o obj/win32/opt/smp/erl_bif_op.o obj/win32/opt/smp/erl_bif_os.o obj/win32/opt/smp/erl_bif_lists.o obj/win32/opt/smp/erl_bif_trace.o obj/win32/opt/smp/erl_bif_unique.o obj/win32/opt/smp/erl_bif_wrap.o obj/win32/opt/smp/erl_nfunc_sched.o obj/win32/opt/smp/erl_guard_bifs.o obj/win32/opt/smp/erl_dirty_bif_wrap.o obj/win32/opt/smp/erl_trace.o obj/win32/opt/smp/copy.o obj/win32/opt/smp/utils.o obj/win32/opt/smp/bif.o obj/win32/opt/smp/io.o obj/win32/opt/smp/erl_printf_term.o obj/win32/opt/smp/erl_debug.o obj/win32/opt/smp/erl_md5.o obj/win32/opt/smp/erl_message.o obj/win32/opt/smp/erl_proc_sig_queue.o obj/win32/opt/smp/erl_process_dict.o obj/win32/opt/smp/erl_process_lock.o obj/win32/opt/smp/erl_port_task.o obj/win32/opt/smp/erl_arith.o obj/win32/opt/smp/time.o obj/win32/opt/smp/erl_time_sup.o obj/win32/opt/smp/external.o obj/win32/opt/smp/dist.o obj/win32/opt/smp/binary.o obj/win32/opt/smp/erl_db.o obj/win32/opt/smp/erl_db_util.o obj/win32/opt/smp/erl_db_hash.o obj/win32/opt/smp/erl_db_tree.o obj/win32/opt/smp/erl_thr_progress.o obj/win32/opt/smp/big.o obj/win32/opt/smp/hash.o obj/win32/opt/smp/index.o obj/win32/opt/smp/atom.o obj/win32/opt/smp/module.o obj/win32/opt/smp/export.o obj/win32/opt/smp/register.o obj/win32/opt/smp/break.o obj/win32/opt/smp/erl_async.o obj/win32/opt/smp/erl_lock_check.o obj/win32/opt/smp/erl_gc.o obj/win32/opt/smp/erl_lock_count.o obj/win32/opt/smp/erl_posix_str.o obj/win32/opt/smp/erl_bits.o obj/win32/opt/smp/erl_math.o obj/win32/opt/smp/erl_fun.o obj/win32/opt/smp/erl_bif_port.o obj/win32/opt/smp/erl_term.o obj/win32/opt/smp/erl_node_tables.o obj/win32/opt/smp/erl_monitor_link.o obj/win32/opt/smp/erl_process_dump.o obj/win32/opt/smp/erl_hl_timer.o obj/win32/opt/smp/erl_cpu_topology.o obj/win32/opt/smp/erl_drv_thread.o obj/win32/opt/smp/erl_bif_chksum.o obj/win32/opt/smp/erl_bif_re.o obj/win32/opt/smp/erl_unicode.o obj/win32/opt/smp/packet_parser.o obj/win32/opt/smp/safe_hash.o obj/win32/opt/smp/erl_zlib.o obj/win32/opt/smp/erl_nif.o obj/win32/opt/smp/erl_bif_binary.o obj/win32/opt/smp/erl_ao_firstfit_alloc.o obj/win32/opt/smp/erl_thr_queue.o obj/win32/opt/smp/erl_sched_spec_pre_alloc.o obj/win32/opt/smp/erl_ptab.o obj/win32/opt/smp/erl_map.o obj/win32/opt/smp/erl_msacc.o obj/win32/opt/smp/erl_lock_flags.o obj/win32/opt/smp/erl_io_queue.o obj/win32/opt/smp/win_con.o obj/win32/opt/smp/dll_sys.o obj/win32/opt/smp/driver_tab.o obj/win32/opt/smp/gzio.o obj/win32/opt/smp/sys_float.o obj/win32/opt/smp/sys_time.o obj/win32/opt/smp/sys_interrupt.o obj/win32/opt/smp/sys_env.o obj/win32/opt/smp/dosmap.o obj/win32/opt/smp/win_prim_file.o obj/win32/opt/smp/erl_poll.o obj/win32/opt/smp/erl_check_io.o obj/win32/opt/smp/erl_mseg.o obj/win32/opt/smp/erl_mmap.o obj/win32/opt/smp/erl_osenv.o obj/win32/opt/smp/erl_win32_sys_ddll.o obj/win32/opt/smp/erl_mtrace_sys_wrap.o obj/win32/opt/smp/erl_sys_common_misc.o obj/win32/opt/smp/erl_os_monotonic_time_extender.o obj/win32/opt/smp/erlang_lttng.o obj/win32/opt/smp/registry_drv.o obj/win32/opt/smp/inet_drv.o obj/win32/opt/smp/ram_file_drv.o obj/win32/opt/smp/ttsl_drv.o obj/win32/opt/smp/erl_tracer_nif.o obj/win32/opt/smp/prim_buffer_nif.o obj/win32/opt/smp/prim_file_nif.o obj/win32/opt/smp/zlib_nif.o \ -lsocket -lmswsock -L../lib/internal/win32 -L/home/user_1/erlbuild/otp/erts/emulator/zlib/obj/win32/opt -lz -L/home/user_1/erlbuild/otp/erts/emulator/pcre/obj/win32/opt -lepcre -lethread -lerts_internal_r usage: mt [-V] [-f device] operation [count] Bibliothek "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.lib" und Objekt "C:/cygwin64/home/user_1/erlbuild/otp/bin/win32/erl_dll.exp" werden erstellt. make[4]: *** [win32/Makefile:1091: /home/user_1/erlbuild/otp/bin/win32/beam.smp.dll] Fehler 1 make[4]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird verlassen make[3]: *** [/home/user_1/erlbuild/otp/make/run_make.mk:35: opt] Fehler 2 make[3]: Verzeichnis ?/home/user_1/erlbuild/otp/erts/emulator? wird verlassen make[2]: *** [Makefile:45: opt] Fehler 2 make[2]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird verlassen make[1]: *** [Makefile:54: smp] Fehler 2 make[1]: Verzeichnis ?/home/user_1/erlbuild/otp/erts? wird verlassen make: *** [Makefile:473: emulator] Fehler 2 Am 12.11.18 um 09:46 schrieb Lukas Larsson: Hello, On Mon, Nov 12, 2018 at 9:35 AM Michael Scharrer > wrote: git clone https://github.com/erlang/otp.git cd otp git checkout OTP-21.1.1 eval `./otp_build env_win32 x64` ./otp_build autoconf ./otp_build configure --without-wx --with-ssl=/cygdrive/c/OpenSSL-Win64/bin ./otp_build release -a /home/user_1/otp_21_1_1 If you set "V=1" before you run "./otp_build release" you will get a full printout of the command that is run. This should help to pinpoint the problem. i.e. > V=1 ./otp_build release -a /home/user_1/otp_21_1_1 Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke@REDACTED Mon Nov 12 10:58:48 2018 From: luke@REDACTED (Luke Bakken) Date: Mon, 12 Nov 2018 09:58:48 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: Hi Michael - The build executes the "mt" command, and it is failing with invalid arguments: > usage: mt [-V] [-f device] operation [count] https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe I suspect that you may have another command named "mt" that has higher precedence in your PATH. Run "which -a mt" to see what the output is. Thanks, Luke From roger@REDACTED Mon Nov 12 11:58:36 2018 From: roger@REDACTED (Roger Lipscombe) Date: Mon, 12 Nov 2018 10:58:36 +0000 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer Message-ID: I've got a record defined as follows (e.g., and very simplified): -record widget { id :: binary(), name :: binary(), size :: integer() }. I parse that from (e.g.) a proplist: parse_widget(Props) -> parse_widget(Props, #widget{}). parse_widget([{name, Name} | Rest], Acc) -> parse_widget(Rest, Acc#widget { name = Name }); % etc. Dialyzer isn't happy that my fields are initially set to 'undefined', even though this only occurs during the parsing step, and isn't a big deal. What can I do to deal with this? Either re-structuring my code or persuading dialyzer that it's OK would both be acceptable. From elbrujohalcon@REDACTED Mon Nov 12 12:11:31 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Mon, 12 Nov 2018 08:11:31 -0300 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: Message-ID: <71B3ACB7-8054-431A-9256-07CE60C5F81B@gmail.com> Hi Roger, According to how you use your record, its spec should actually be? -record widget { id :: undefined | binary(), name :: undefined | binary(), size :: undefined | integer() }. That will silence dialyzer or, putting it in the right perspective: That will be a spec that matches how your code actually treats that record. And that?s because: What happens if Props doesn?t have a tuple for name? If not having a {name, Name} tuple in Props is an invalid scenario, you should raise some sort of error. In that case I would recommend you to keep the record definition as-is, but fill the whole record at once: parse_widget(Props) -> #widget{ id = get_value(id, Props), name = get_value(name, Props), ? }. get_value(Key, Props) -> {Key, Value} = lists:keyfind(Key, 1, Props), Value. That way, get_value/2 will raise an error if a property is missing. If not having a {name, Name} tuple in Props is a valid scenario but you still don?t want that record property to be undefined, you will need a sane default for it. In that case, you should amend your record definition as? -record widget { id = <<>> :: binary(), name = <<>> :: binary(), size = 0 :: integer() }. Hope this helps :) Brujo Benavides > On 12 Nov 2018, at 07:58, Roger Lipscombe wrote: > > I've got a record defined as follows (e.g., and very simplified): > > -record widget { > id :: binary(), > name :: binary(), > size :: integer() > }. > > I parse that from (e.g.) a proplist: > > parse_widget(Props) -> > parse_widget(Props, #widget{}). > > parse_widget([{name, Name} | Rest], Acc) -> > parse_widget(Rest, Acc#widget { name = Name }); > % etc. > > Dialyzer isn't happy that my fields are initially set to 'undefined', > even though this only occurs during the parsing step, and isn't a big > deal. > > What can I do to deal with this? Either re-structuring my code or > persuading dialyzer that it's OK would both be acceptable. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From roger@REDACTED Mon Nov 12 12:35:02 2018 From: roger@REDACTED (Roger Lipscombe) Date: Mon, 12 Nov 2018 11:35:02 +0000 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <71B3ACB7-8054-431A-9256-07CE60C5F81B@gmail.com> References: <71B3ACB7-8054-431A-9256-07CE60C5F81B@gmail.com> Message-ID: On 12 November 2018 at 11:11, Brujo Benavides wrote: > Hi Roger, > > According to how you use your record, its spec should actually be? > > -record widget { > id :: undefined | binary(), > name :: undefined | binary(), > size :: undefined | integer() > }. > > That will silence dialyzer or, putting it in the right perspective: That > will be a spec that matches how your code actually treats that record. > And that?s because: What happens if Props doesn?t have a tuple for name? I figured someone would say that. The answer is that Props *always* has a tuple for name -- it was written to a data store with that invariant. But I can see that it's hard to tell dialyzer this. > If not having a {name, Name} tuple in Props is an invalid scenario, you > should raise some sort of error. > In that case I would recommend you to keep the record definition as-is, but > fill the whole record at once: > > parse_widget(Props) -> > #widget{ > id = get_value(id, Props), > name = get_value(name, Props), > ? > }. > > get_value(Key, Props) -> > {Key, Value} = lists:keyfind(Key, 1, Props), > Value. I was kinda hoping to avoid that -- I've got a vague feeling that we did this for performance reasons. Of course, those assumptions are probably no longer valid and need re-checking. > Hope this helps :) Only in the "you're doing it wrong" sense :) From zxq9@REDACTED Mon Nov 12 12:35:42 2018 From: zxq9@REDACTED (zxq9@REDACTED) Date: Mon, 12 Nov 2018 20:35:42 +0900 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: Message-ID: <3888869.ZbuKoWERbA@takoyaki> On 2018?11?12???? 10?58?36? JST Roger Lipscombe wrote: > What can I do to deal with this? Either re-structuring my code or > persuading dialyzer that it's OK would both be acceptable. Providing a more complete typespec can work: -record(widget {id :: undefined | binary(), name :: undefined | binary(), size :: undefined | integer()}. Or providing typed defaults that you know are bottom types: -record(widget {id = <<>> :: binary(), name = <<>> :: binary(), size = 0 :: integer()}. Depending on the rest of the code, sometimes a type definition to mask the record is an easy way to sidestep a few wierd Dialyzer corner cases: -type widget() :: #widget{}. And sometimes cutting straight through with line-by-line code conceals the problem more directly (which allows you to ignore extra args at a negligble performance cost: parse_widget(Props) -> #widget{id = proplists:get_value(id, Props), name = proplists:get_value(name, Props), size = proplists:get_value(size, Props)}. -Craig From elbrujohalcon@REDACTED Mon Nov 12 12:37:55 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Mon, 12 Nov 2018 08:37:55 -0300 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: <71B3ACB7-8054-431A-9256-07CE60C5F81B@gmail.com> Message-ID: And what about adding sane defaults to the fields, then? Brujo Benavides > On 12 Nov 2018, at 08:35, Roger Lipscombe wrote: > > On 12 November 2018 at 11:11, Brujo Benavides wrote: >> Hi Roger, >> >> According to how you use your record, its spec should actually be? >> >> -record widget { >> id :: undefined | binary(), >> name :: undefined | binary(), >> size :: undefined | integer() >> }. >> >> That will silence dialyzer or, putting it in the right perspective: That >> will be a spec that matches how your code actually treats that record. >> And that?s because: What happens if Props doesn?t have a tuple for name? > > I figured someone would say that. The answer is that Props *always* > has a tuple for name -- it was written to a data store with that > invariant. But I can see that it's hard to tell dialyzer this. > >> If not having a {name, Name} tuple in Props is an invalid scenario, you >> should raise some sort of error. >> In that case I would recommend you to keep the record definition as-is, but >> fill the whole record at once: >> >> parse_widget(Props) -> >> #widget{ >> id = get_value(id, Props), >> name = get_value(name, Props), >> ? >> }. >> >> get_value(Key, Props) -> >> {Key, Value} = lists:keyfind(Key, 1, Props), >> Value. > > I was kinda hoping to avoid that -- I've got a vague feeling that we > did this for performance reasons. Of course, those assumptions are > probably no longer valid and need re-checking. > >> Hope this helps :) > > Only in the "you're doing it wrong" sense :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxq9@REDACTED Mon Nov 12 12:37:59 2018 From: zxq9@REDACTED (zxq9@REDACTED) Date: Mon, 12 Nov 2018 20:37:59 +0900 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <3888869.ZbuKoWERbA@takoyaki> References: <3888869.ZbuKoWERbA@takoyaki> Message-ID: <2179608.2rvmMJboXt@takoyaki> On 2018?11?12???? 20?35?42? JST zxq9@REDACTED wrote: > parse_widget(Props) -> > #widget{id = proplists:get_value(id, Props), > name = proplists:get_value(name, Props), > size = proplists:get_value(size, Props)}. Holy tabs! From krzysztof.jurewicz@REDACTED Mon Nov 12 13:49:09 2018 From: krzysztof.jurewicz@REDACTED (Krzysztof Jurewicz) Date: Mon, 12 Nov 2018 13:49:09 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: Message-ID: <87lg5y5um2.fsf@gmail.com> A similar problem arises if we try to use record syntax to construct generators for property testing: -module(foo_tests). -include_lib("triq/include/triq.hrl"). -record( project, {name :: binary(), budget :: non_neg_integer(), successful :: boolean()}). prop_successful_projects_are_succesful() -> ?FORALL( Project, #project{ name=binary(), budget=non_neg_integer(), successful=true}, Project#project.successful). The tests pass, but Dialyzer complains. To silence it, we could rewrite the property as: prop_successful_projects_are_succesful() -> ?FORALL( Project, ?LET( {Name, Budget}, {binary(), non_neg_integer()}, #project{ name=Name, budget=Budget, successful=true}), Project#project.successful). This is however more verbose. We may want to put a generator into a function: project() -> #project{ name=binary(), budget=non_neg_integer(), successful=boolean()}. The property may then be written as: prop_successful_projects_are_succesful() -> ?FORALL( Project, (project())#project{successful=true}, Project#project.successful). But again Dialyzer complains. If we wanted to rewrite project() in a ?LET form, then we wouldn?t be able to write (project())#project{successful=true}, as ?LET results in a different data structure. The root problem here is that by writing #project{name=binary(), budget=non_neg_integer(), successful=boolean()} we don?t really want to create a project record. Instead, we want to create a tuple with a structure resembling the project record which will then be used to create a concrete project record. Dialyzer however doesn?t know about that. In this particular case one way to silence Dialyzer is to write the project record as: -record( project, {name :: binary() | triq_dom:domain(binary()), budget :: non_neg_integer() | triq_dom:domain(non_neg_integer()), successful :: boolean() | triq_dom:domain(boolean())}). This is however repetitive and also superfluous in production environment. There is a parse transform named dynarec ( https://github.com/dieswaytoofast/dynarec ) ?that automaticaly generates and exports accessors for all records declared within a module?. Theoretically it could be expanded to generate a function named from_map/2 which would look like this: from_map( project, #{name := Name, budget := Budget, successful := Successful}) -> #project{ name=Name, budget=Budget, successful=Successful}. We could then expand the project/0 generator as: project(FieldMap) -> ?LET( ProjectMap, maps:merge( #{name => binary(), budget => non_neg_integer(), successful => bool()}, FieldMap), from_map(project, ProjectMap)). It would allow us to leave the project record in its original form and rewrite the property as: prop_successful_projects_are_succesful() -> ?FORALL( Project, project(#{successful => true}), Project#project.successful). The parse_widget/1 function from the original post could be written as: parse_widget(Props) -> from_map(widget, maps:from_list(Props)). Generation of from_map/2 is however currently not implemented in dynarec. From michael_489@REDACTED Mon Nov 12 14:12:12 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Mon, 12 Nov 2018 13:12:12 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: Hi Luke, the result in cygwin is (so i got two results) /usr/bin/mt but it seems like the same paths hmmm.. curious $ which -a mt /usr/bin/mt /usr/bin/mt Regards, Michael Am 12.11.18 um 10:58 schrieb Luke Bakken: > Hi Michael - > > The build executes the "mt" command, and it is failing with invalid arguments: > >> usage: mt [-V] [-f device] operation [count] > https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe > > I suspect that you may have another command named "mt" that has higher > precedence in your PATH. Run "which -a mt" to see what the output is. > > Thanks, > Luke > . > From luke@REDACTED Mon Nov 12 14:16:59 2018 From: luke@REDACTED (Luke Bakken) Date: Mon, 12 Nov 2018 13:16:59 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: I wonder if the following command isn't setting the PATH correctly on your system: eval `./otp_build env_win32 x64` Try running "otp_build env_win32 x64" to see what the output looks like. There should be a "visual studio command prompt" sort of shortcut that will set up a cmd.exe-based build environment. Maybe comparing the environment to the output of the otp_build command will show something. Luke On Mon, Nov 12, 2018, 1:12 PM Michael Scharrer Hi Luke, > > the result in cygwin is (so i got two results) /usr/bin/mt > but it seems like the same paths hmmm.. curious > > $ which -a mt > /usr/bin/mt > /usr/bin/mt > > > Regards, > > Michael > > Am 12.11.18 um 10:58 schrieb Luke Bakken: > > Hi Michael - > > > > The build executes the "mt" command, and it is failing with invalid > arguments: > > > >> usage: mt [-V] [-f device] operation [count] > > https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe > > > > I suspect that you may have another command named "mt" that has higher > > precedence in your PATH. Run "which -a mt" to see what the output is. > > > > Thanks, > > Luke > > . > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Catenacci@REDACTED Mon Nov 12 14:26:53 2018 From: Catenacci@REDACTED (Onorio Catenacci) Date: Mon, 12 Nov 2018 08:26:53 -0500 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: 1. Re: Erlang Build 21.1.1 on Windows 10 (Luke Bakken) > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 12 Nov 2018 09:58:48 +0000 > From: Luke Bakken > To: michael_489@REDACTED > Cc: erlang-questions@REDACTED > Subject: Re: [erlang-questions] Erlang Build 21.1.1 on Windows 10 > Message-ID: > w@REDACTED> > Content-Type: text/plain; charset="UTF-8" > > Hi Michael - > > The build executes the "mt" command, and it is failing with invalid > arguments: > > > usage: mt [-V] [-f device] operation [count] > > https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe > > I suspect that you may have another command named "mt" that has higher > precedence in your PATH. Run "which -a mt" to see what the output is. > > Thanks, > Luke > > Minor point Luke--on Windows it's "where" not which. https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line -- Onorio Catenacci http://onor.io https://twitter.com/OldDutchCap -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael_489@REDACTED Mon Nov 12 14:35:28 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Mon, 12 Nov 2018 13:35:28 +0000 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: Hi Luke, thank you I will look. Is it maybe possible that you can share me your output what you?re getting on windows ./otp_build env_win32 x64 So that I can see some differences and compare it with my paths and system configuration. Thanks, Michael Am 12.11.18 um 14:16 schrieb Luke Bakken: I wonder if the following command isn't setting the PATH correctly on your system: eval `./otp_build env_win32 x64` Try running "otp_build env_win32 x64" to see what the output looks like. There should be a "visual studio command prompt" sort of shortcut that will set up a cmd.exe-based build environment. Maybe comparing the environment to the output of the otp_build command will show something. Luke On Mon, Nov 12, 2018, 1:12 PM Michael Scharrer wrote: Hi Luke, the result in cygwin is (so i got two results) /usr/bin/mt but it seems like the same paths hmmm.. curious $ which -a mt /usr/bin/mt /usr/bin/mt Regards, Michael Am 12.11.18 um 10:58 schrieb Luke Bakken: > Hi Michael - > > The build executes the "mt" command, and it is failing with invalid arguments: > >> usage: mt [-V] [-f device] operation [count] > https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe > > I suspect that you may have another command named "mt" that has higher > precedence in your PATH. Run "which -a mt" to see what the output is. > > Thanks, > Luke > . > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke@REDACTED Mon Nov 12 15:38:02 2018 From: luke@REDACTED (Luke Bakken) Date: Mon, 12 Nov 2018 14:38:02 +0000 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci wrote: >> I suspect that you may have another command named "mt" that has higher >> precedence in your PATH. Run "which -a mt" to see what the output is. >> >> Thanks, >> Luke >> > > Minor point Luke--on Windows it's "where" not which. > > https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line The build environment is Cygwin, so which is the correct command to use. I'm not even sure if "where" works within Cygwin - probably not, as the PATH is in the wrong format. The same applies to a MSYS2 environment. http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment Since "which" couldn't find the correct mt.exe executable, that points to something in the original poster's environment. Thanks, Luke From michael_489@REDACTED Mon Nov 12 16:46:34 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Mon, 12 Nov 2018 15:46:34 +0000 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: Hello together, may it could help with my following output "where mt" on Windows 10 user_1@REDACTED ~/erlbuild/otp $ where mt C:\cygwin64\bin\mt.exe An then I call mt to test it, which looks like the beam.smp.dll error during compile. user_1@REDACTED ~/erlbuild/otp $ mt usage: mt [-V] [-f device] operation [count] Regards Michael Am 12.11.18 um 15:38 schrieb Luke Bakken: On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci wrote: I suspect that you may have another command named "mt" that has higher precedence in your PATH. Run "which -a mt" to see what the output is. Thanks, Luke Minor point Luke--on Windows it's "where" not which. https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line The build environment is Cygwin, so which is the correct command to use. I'm not even sure if "where" works within Cygwin - probably not, as the PATH is in the wrong format. The same applies to a MSYS2 environment. http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment Since "which" couldn't find the correct mt.exe executable, that points to something in the original poster's environment. Thanks, Luke _______________________________________________ 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 Mon Nov 12 16:50:38 2018 From: Catenacci@REDACTED (Onorio Catenacci) Date: Mon, 12 Nov 2018 10:50:38 -0500 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: You're right Luke--I should have read the question more closely. Apologies for not being more careful in my reading of the question. Since the mt.exe which is on Windows is part of the windows sdk ( https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder if the original poster is trying to run Cygwin from a Visual Studio command prompt? I mean I don't think mt.exe would be in the path unless someone were to start a Visual Studio command prompt (the "Developer Command Prompt for Visual Studio" on the Windows menu). On Mon, Nov 12, 2018 at 9:38 AM Luke Bakken wrote: > On Mon, Nov 12, 2018 at 1:27 PM Onorio Catenacci > wrote: > >> I suspect that you may have another command named "mt" that has higher > >> precedence in your PATH. Run "which -a mt" to see what the output is. > >> > >> Thanks, > >> Luke > >> > > > > Minor point Luke--on Windows it's "where" not which. > > > > > https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line > > The build environment is Cygwin, so which is the correct command to > use. I'm not even sure if "where" works within Cygwin - probably not, > as the PATH is in the wrong format. The same applies to a MSYS2 > environment. > > > http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#tools-you-need-and-their-environment > > Since "which" couldn't find the correct mt.exe executable, that points > to something in the original poster's environment. > > Thanks, > Luke > -- Onorio Catenacci http://onor.io https://twitter.com/OldDutchCap -------------- next part -------------- An HTML attachment was scrubbed... URL: From krzysztof.jurewicz@REDACTED Mon Nov 12 23:36:39 2018 From: krzysztof.jurewicz@REDACTED (Krzysztof Jurewicz) Date: Mon, 12 Nov 2018 23:36:39 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <87lg5y5um2.fsf@gmail.com> References: <87lg5y5um2.fsf@gmail.com> Message-ID: <87k1lh6hzc.fsf@gmail.com> > Generation of from_map/2 is however currently not implemented in dynarec. I?ve implemented generation of from_map/2 and to_map/1; see this pull request: https://github.com/dieswaytoofast/dynarec/pull/7 . It should now be possible to convert records to maps and vice versa without writing boilerplate code. From luke@REDACTED Tue Nov 13 00:28:11 2018 From: luke@REDACTED (Luke Bakken) Date: Mon, 12 Nov 2018 23:28:11 +0000 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: Right, because that isn't the correct mt.exe command. Something in the build steps isn't setting the PATH correctly, or you don't have the tool anywhere - http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version Your next step could be to search your drive for mt.exe, make a note of it, and see if the following command adds the correct directory to your PATH: eval `./otp_build env_win32 x64` Thanks, Luke On Mon, Nov 12, 2018 at 3:46 PM Michael Scharrer wrote: > > Hello together, > > may it could help with my following output "where mt" on Windows 10 > > user_1@REDACTED ~/erlbuild/otp > $ where mt > C:\cygwin64\bin\mt.exe > > > An then I call mt to test it, which looks like the beam.smp.dll error during compile. > > user_1@REDACTED ~/erlbuild/otp > $ mt > usage: mt [-V] [-f device] operation [count] From luke@REDACTED Tue Nov 13 00:31:57 2018 From: luke@REDACTED (Luke Bakken) Date: Mon, 12 Nov 2018 23:31:57 +0000 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: Hi Onorio - Please read the build instructions - http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version You *shouldn't* have to use a VS command prompt. That's not to say something hasn't changed in recent Windows / SDK versions that interferes with the process. Michael could start a VS command prompt, *then* run the cygwin.bat command within that terminal to more likely have the correct environment. But, it would be most helpful to the Erlang/OTP team to figure out why the build isn't working as per the instructions in this case. Luke On Mon, Nov 12, 2018 at 3:51 PM Onorio Catenacci wrote: > > You're right Luke--I should have read the question more closely. Apologies for not being more careful in my reading of the question. > > Since the mt.exe which is on Windows is part of the windows sdk (https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder if the original poster is trying to run Cygwin from a Visual Studio command prompt? I mean I don't think mt.exe would be in the path unless someone were to start a Visual Studio command prompt (the "Developer Command Prompt for Visual Studio" on the Windows menu). From Catenacci@REDACTED Tue Nov 13 01:11:03 2018 From: Catenacci@REDACTED (Onorio Catenacci) Date: Mon, 12 Nov 2018 19:11:03 -0500 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: I wasn?t saying he did need to run from a VS command prompt. I was offering a possible reason for mt.exe being in the path. On Mon, Nov 12, 2018 at 6:32 PM Luke Bakken wrote: > Hi Onorio - > > Please read the build instructions - > > http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version > > You *shouldn't* have to use a VS command prompt. That's not to say > something hasn't changed in recent Windows / SDK versions that > interferes with the process. > > Michael could start a VS command prompt, *then* run the cygwin.bat > command within that terminal to more likely have the correct > environment. But, it would be most helpful to the Erlang/OTP team to > figure out why the build isn't working as per the instructions in this > case. > > Luke > > On Mon, Nov 12, 2018 at 3:51 PM Onorio Catenacci > wrote: > > > > You're right Luke--I should have read the question more closely. > Apologies for not being more careful in my reading of the question. > > > > Since the mt.exe which is on Windows is part of the windows sdk ( > https://docs.microsoft.com/en-us/windows/desktop/sbscs/mt-exe) I wonder > if the original poster is trying to run Cygwin from a Visual Studio command > prompt? I mean I don't think mt.exe would be in the path unless someone > were to start a Visual Studio command prompt (the "Developer Command Prompt > for Visual Studio" on the Windows menu). > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ingela.Anderton.Andin@REDACTED Tue Nov 13 10:10:15 2018 From: Ingela.Anderton.Andin@REDACTED (Ingela Anderton Andin) Date: Tue, 13 Nov 2018 10:10:15 +0100 Subject: [erlang-questions] Patch Package OTP 20.3.8.13 Released Message-ID: <20181113091014.GA72371@duper.otp.ericsson.se> Patch Package: OTP 20.3.8.13 Git Tag: OTP-20.3.8.13 Date: 2018-11-12 Trouble Report Id: OTP-15420 Seq num: System: OTP Release: 20 Application: ssl-8.2.6.4 Predecessor: OTP 20.3.8.12 Check out the git tag OTP-20.3.8.13, 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.6.4 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssl-8.2.6.4 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-15420 Application(s): ssl Add engine support for RSA key exchange Full runtime dependencies of ssl-8.2.6.4: crypto-4.2, erts-7.0, inets-5.10.7, kernel-3.0, public_key-1.5, stdlib-3.2 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- From Oliver.Korpilla@REDACTED Tue Nov 13 10:15:33 2018 From: Oliver.Korpilla@REDACTED (Oliver Korpilla) Date: Tue, 13 Nov 2018 10:15:33 +0100 Subject: [erlang-questions] gen_sctp: What delays SACK? Message-ID: Hello. We're using an elixir application as a sort of protocol tester. It communicated with the system-under-test over SCTP as a transport. We're observing delay and unsent messages and due to the nature of the SCTP protocol we're not sure which side causes the issue. The BEAM side has the NO_DELAY option set and pumps a burst of messages but then waits for responses (so it will not burst indefinitely, it burst once and then respond). The C++ application has the DELAYED_SACK option set - we tried with both sack_freq 1 (which supposedly disables the algorithm) and higher (the default in our system). (We also increased the receive window on both sides to ensure that senders would not block.) But we're stumped. The C++ side is not responding at some point. When we did an actual target test once and we saw SCTP messages sent from system-under-test just stop when analyzing the tcpdump of the interfaces - C++ application has not emitted something on the wire and respectively nothing is received. Our latest area of inquiry is to find out if maybe the elixir part is simply not getting scheduled - but can this impact for example SACK latency? Who acknowledges a message - the SCTP stack by itself or the application? And will the protocol block the sender until SACK? I'm sorry for asking such vague questions but SCTP know-how is spread thin in our outfit and we're not the experts... Thank you, Oliver From michael_489@REDACTED Tue Nov 13 13:06:43 2018 From: michael_489@REDACTED (Michael Scharrer) Date: Tue, 13 Nov 2018 12:06:43 +0000 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: Hi Luke, i think there is a litte issue in the documentation for building erlang on windows, because the VCPATH or else are not cygwin'ish... with make_winpath() or make_upath() or else which you are able to set in the .bash_profile and this don?t work for me in the newest cygwin 64. It would be great if you can test this later... Just here the example ## The PATH variable should be Cygwin'ish VCPATH= $VISUAL_STUDIO_ROOT/VC/bin/amd64:\ $VISUAL_STUDIO_ROOT/VC/vcpackages:\ $VISUAL_STUDIO_ROOT/Common7/IDE:\ $VISUAL_STUDIO_ROOT/Common7/Tools:\ $SDK/bin/x86 Are you sure, that it uses for a x64 build of erlang the Windows Kit?s for x86 for the tools rc and mt? Because in the documentation I have a example "The first part of the 64 bit template is identical to the 32 bit one, but there are some environment variable differences:" and mentioned VCPATH with $SDK/bin/x86 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe C:\Program Files (x86)\Windows Kits\8.1\bin\x86\mt.exe or should it be C:\Program Files (x86)\Windows Kits\8.1\bin\x64\rc.exe C:\Program Files (x86)\Windows Kits\8.1\bin\x64\mt.exe Thanks michael Am 13.11.18 um 00:28 schrieb Luke Bakken: Right, because that isn't the correct mt.exe command. Something in the build steps isn't setting the PATH correctly, or you don't have the tool anywhere - http://erlang.org/doc/installation_guide/INSTALL-WIN32.html#Short-Version Your next step could be to search your drive for mt.exe, make a note of it, and see if the following command adds the correct directory to your PATH: eval `./otp_build env_win32 x64` Thanks, Luke On Mon, Nov 12, 2018 at 3:46 PM Michael Scharrer wrote: Hello together, may it could help with my following output "where mt" on Windows 10 user_1@REDACTED ~/erlbuild/otp $ where mt C:\cygwin64\bin\mt.exe An then I call mt to test it, which looks like the beam.smp.dll error during compile. user_1@REDACTED ~/erlbuild/otp $ mt usage: mt [-V] [-f device] operation [count] . -------------- next part -------------- An HTML attachment was scrubbed... URL: From mononcqc@REDACTED Tue Nov 13 13:23:26 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Tue, 13 Nov 2018 07:23:26 -0500 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <87lg5y5um2.fsf@gmail.com> References: <87lg5y5um2.fsf@gmail.com> Message-ID: <20181113122325.GA3805@ferdmbp.local> On 11/12, Krzysztof Jurewicz wrote: >A similar problem arises if we try to use record syntax to construct generators for property testing: > > ... > >The tests pass, but Dialyzer complains. To silence it, we could rewrite >the property as: > > ... That's interesting. I pretty much never run Dialyzer against test suites simply because there are cases where I want my tests to trigger failures and validate in/out of boundary conditions are being checked, sometimes to know if the right kind of exceptions is raised (or that the right logs are produced as side-effects) Every time I purposefully send in data that breaks boundaries and raises exceptions which end up part of my program's contract even if it isn't part of its type annotations, Dialyzer is guaranteed to never pass. One of the small unspoken "rules" or practices I have is to never run Dialyzer on test code because it never works super well for plenty of cases, particularly when your tests explicitly try to break things. From elbrujohalcon@REDACTED Tue Nov 13 13:31:04 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Tue, 13 Nov 2018 09:31:04 -0300 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <20181113122325.GA3805@ferdmbp.local> References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> Message-ID: Funny? I do exactly the opposite thing. Since many of my projects are libraries and dialyzer is mostly clueless on the correctness of exported function specs when it has no other code using them, I use the tests to let dialyzer know how the functions are meant to be used. That way it can tell me if my specs are wrong or if something I meant to do with those functions is actually not possible. That?s why, more often than not, instead of `rebar3 dialyzer`, I do `rebar3 as test dialyzer`. BTW, I don?t think Krzysztof was saying that he run dialyzer against tests, just that (on one hand) tests pass but (on the other hand) when he checked his code with dialyzer, it complained. Mostly because I can see how dialyzer would complain with just his code, and no tests :) Cheers Brujo Benavides > On 13 Nov 2018, at 09:23, Fred Hebert wrote: > > On 11/12, Krzysztof Jurewicz wrote: >> A similar problem arises if we try to use record syntax to construct generators for property testing: >> >> ... >> >> The tests pass, but Dialyzer complains. To silence it, we could rewrite the property as: >> >> ... > > That's interesting. I pretty much never run Dialyzer against test suites simply because there are cases where I want my tests to trigger failures and validate in/out of boundary conditions are being checked, sometimes to know if the right kind of exceptions is raised (or that the right logs are produced as side-effects) > > Every time I purposefully send in data that breaks boundaries and raises exceptions which end up part of my program's contract even if it isn't part of its type annotations, Dialyzer is guaranteed to never pass. > > One of the small unspoken "rules" or practices I have is to never run Dialyzer on test code because it never works super well for plenty of cases, particularly when your tests explicitly try to break things. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From mononcqc@REDACTED Tue Nov 13 13:44:14 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Tue, 13 Nov 2018 07:44:14 -0500 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> Message-ID: <20181113124413.GB3805@ferdmbp.local> On 11/13, Brujo Benavides wrote: >Funny? I do exactly the opposite thing. > >Since many of my projects are libraries and dialyzer is mostly clueless on the correctness of exported function specs when it has no other code using them, I use the tests to let dialyzer know how the functions are meant to be used. That way it can tell me if my specs are wrong or if something I meant to do with those functions is actually not possible. > >That?s why, more often than not, instead of `rebar3 dialyzer`, I do `rebar3 as test dialyzer`. > >BTW, I don?t think Krzysztof was saying that he run dialyzer against tests, just that (on one hand) tests pass but (on the other hand) when he checked his code with dialyzer, it complained. Mostly because I can see how dialyzer would complain with just his code, and no tests :) > >Cheers > >Brujo Benavides > Do you just not do negative tests or you silence each of them individually? From attila.r.nohl@REDACTED Tue Nov 13 13:48:39 2018 From: attila.r.nohl@REDACTED (Attila Rajmund Nohl) Date: Tue, 13 Nov 2018 13:48:39 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <20181113124413.GB3805@ferdmbp.local> References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> <20181113124413.GB3805@ferdmbp.local> Message-ID: Fred Hebert ezt ?rta (id?pont: 2018. nov. 13., K, 13:44): [...] > Do you just not do negative tests or you silence each of them > individually? If the library returns {error, Reason}, not simply crashes, then dialyzer should not complain. From elbrujohalcon@REDACTED Tue Nov 13 13:49:17 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Tue, 13 Nov 2018 09:49:17 -0300 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <20181113124413.GB3805@ferdmbp.local> References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> <20181113124413.GB3805@ferdmbp.local> Message-ID: <430E6A1E-235A-4D17-B331-FA4BF7D97517@gmail.com> I generally tend to follow the rule that people (users of my libs, in particular) should use dialyzer themselves. So, for instance, if the the spec says this function should be called with a positive_integer(), I don?t test it with 0. If anybody tries to use the function with the wrong input? something that will trigger a warning from dialyzer? they should detect it when running dialyzer on their code. So, no? I don?t do negative tests, in that sense. On the other hand, if I have a function like? my_fun(X) when X > 0 -> work_with(X); my_fun(X) -> error({invalid_input, X}). I don?t spec it as? -spec my_fun(pos_integer()) -> ?. I spec it as? -spec my_fun(pos_integer()) -> ? ; my_fun(X) -> no_return(). (or something similar, I typed that off-the-top-of-my-head) Brujo Benavides > On 13 Nov 2018, at 09:44, Fred Hebert wrote: > > On 11/13, Brujo Benavides wrote: >> Funny? I do exactly the opposite thing. >> >> Since many of my projects are libraries and dialyzer is mostly clueless on the correctness of exported function specs when it has no other code using them, I use the tests to let dialyzer know how the functions are meant to be used. That way it can tell me if my specs are wrong or if something I meant to do with those functions is actually not possible. >> >> That?s why, more often than not, instead of `rebar3 dialyzer`, I do `rebar3 as test dialyzer`. >> >> BTW, I don?t think Krzysztof was saying that he run dialyzer against tests, just that (on one hand) tests pass but (on the other hand) when he checked his code with dialyzer, it complained. Mostly because I can see how dialyzer would complain with just his code, and no tests :) >> >> Cheers >> >> Brujo Benavides >> > > Do you just not do negative tests or you silence each of them individually? -------------- next part -------------- An HTML attachment was scrubbed... URL: From elbrujohalcon@REDACTED Tue Nov 13 13:52:27 2018 From: elbrujohalcon@REDACTED (Brujo Benavides) Date: Tue, 13 Nov 2018 09:52:27 -0300 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <430E6A1E-235A-4D17-B331-FA4BF7D97517@gmail.com> References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> <20181113124413.GB3805@ferdmbp.local> <430E6A1E-235A-4D17-B331-FA4BF7D97517@gmail.com> Message-ID: Forgot to say that, in the case of my_fun, I do test it with stuff like 0 or -1 or something_that_is_not_even_an_integer? But dialyzer doesn?t complain, since the spec allows it. (Sorry for the double-emailing) Brujo Benavides > On 13 Nov 2018, at 09:49, Brujo Benavides wrote: > > I generally tend to follow the rule that people (users of my libs, in particular) should use dialyzer themselves. > So, for instance, if the the spec says this function should be called with a positive_integer(), I don?t test it with 0. > If anybody tries to use the function with the wrong input? something that will trigger a warning from dialyzer? they should detect it when running dialyzer on their code. > > So, no? I don?t do negative tests, in that sense. > > On the other hand, if I have a function like? > > my_fun(X) when X > 0 -> work_with(X); > my_fun(X) -> error({invalid_input, X}). > > I don?t spec it as? > -spec my_fun(pos_integer()) -> ?. > > I spec it as? > -spec my_fun(pos_integer()) -> ? > ; my_fun(X) -> no_return(). > > (or something similar, I typed that off-the-top-of-my-head) > > Brujo Benavides > > > >> On 13 Nov 2018, at 09:44, Fred Hebert > wrote: >> >> On 11/13, Brujo Benavides wrote: >>> Funny? I do exactly the opposite thing. >>> >>> Since many of my projects are libraries and dialyzer is mostly clueless on the correctness of exported function specs when it has no other code using them, I use the tests to let dialyzer know how the functions are meant to be used. That way it can tell me if my specs are wrong or if something I meant to do with those functions is actually not possible. >>> >>> That?s why, more often than not, instead of `rebar3 dialyzer`, I do `rebar3 as test dialyzer`. >>> >>> BTW, I don?t think Krzysztof was saying that he run dialyzer against tests, just that (on one hand) tests pass but (on the other hand) when he checked his code with dialyzer, it complained. Mostly because I can see how dialyzer would complain with just his code, and no tests :) >>> >>> Cheers >>> >>> Brujo Benavides > >>> >> >> Do you just not do negative tests or you silence each of them individually? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Tue Nov 13 13:59:19 2018 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Tue, 13 Nov 2018 13:59:19 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <20181113124413.GB3805@ferdmbp.local> References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> <20181113124413.GB3805@ferdmbp.local> Message-ID: On 11/13/18 1:44 PM, Fred Hebert wrote: > On 11/13, Brujo Benavides wrote: >> Funny? I do exactly the opposite thing. >> >> Since many of my projects are libraries and dialyzer is mostly >> clueless on the correctness of exported function specs when it has no >> other code using them, I use the tests to let dialyzer know how the >> functions are meant to be used. That way it can tell me if my specs >> are wrong or if something I meant to do with those functions is >> actually not possible. >> >> That?s why, more often than not, instead of `rebar3 dialyzer`, I do >> `rebar3 as test dialyzer`. >> >> BTW, I don?t think Krzysztof was saying that he run dialyzer against >> tests, just that (on one hand) tests pass but (on the other hand) when >> he checked his code with dialyzer, it complained. Mostly because I can >> see how dialyzer would complain with just his code, and no tests :) >> >> Cheers >> >> Brujo Benavides >> > > Do you just not do negative tests or you silence each of them individually? I personally silence both Dialyzer warnings in expected test failures (for example Cowboy handler crashes) and any error/crash logs that would be produced, if any. I've just a few weeks ago enabled Dialyzer against the Cowboy tests by default (whereas I was running it manually from time to time before) and this helped me fix a few bad types. Sometimes Dialyzer needs to be silenced via disabling a warning on a specific function, sometimes adding a spec with no_return() is enough. Either way you can't really mix positive and negative tests in the same test function. Cheers, -- Lo?c Hoguin https://ninenines.eu From jesper.louis.andersen@REDACTED Tue Nov 13 15:49:06 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 13 Nov 2018 15:49:06 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: <71B3ACB7-8054-431A-9256-07CE60C5F81B@gmail.com> Message-ID: On Mon, Nov 12, 2018 at 12:35 PM Roger Lipscombe wrote: > I was kinda hoping to avoid that -- I've got a vague feeling that we > did this for performance reasons. Of course, those assumptions are > probably no longer valid and need re-checking. > > A lists:keyfind on a small list is going to be fast, especially because you are only reading and thus not putting any GC pressure in there. Your parsing variant constructs a number of intermediate tuples and I don't think the Erlang compiler currently detects it can unroll that loop, and strength reduce the tuple creation so it has higher GC pressure. Alternatively, put it into a map and then transform the map. It is at most one write more. I'd measure this carefully. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Tue Nov 13 15:51:16 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 13 Nov 2018 15:51:16 +0100 Subject: [erlang-questions] gen_sctp: What delays SACK? In-Reply-To: References: Message-ID: Hi, Use tcpdump(1) on the flow and look for who is adding the latency. Usual rule of protocol debugging is to start at the lowest level and verify each level as you go up. Because then you have an audit trail of the events that happened which can inform you at a higher level. On Tue, Nov 13, 2018 at 10:15 AM Oliver Korpilla wrote: > Hello. > > We're using an elixir application as a sort of protocol tester. It > communicated with the system-under-test over SCTP as a transport. > > We're observing delay and unsent messages and due to the nature of the > SCTP protocol we're not sure which side causes the issue. > > The BEAM side has the NO_DELAY option set and pumps a burst of messages > but then waits for responses (so it will not burst indefinitely, it burst > once and then respond). > > The C++ application has the DELAYED_SACK option set - we tried with both > sack_freq 1 (which supposedly disables the algorithm) and higher (the > default in our system). > > (We also increased the receive window on both sides to ensure that senders > would not block.) > > But we're stumped. The C++ side is not responding at some point. When we > did an actual target test once and we saw SCTP messages sent from > system-under-test just stop when analyzing the tcpdump of the interfaces - > C++ application has not emitted something on the wire and respectively > nothing is received. > > > Our latest area of inquiry is to find out if maybe the elixir part is > simply not getting scheduled - but can this impact for example SACK > latency? Who acknowledges a message - the SCTP stack by itself or the > application? And will the protocol block the sender until SACK? > > I'm sorry for asking such vague questions but SCTP know-how is spread thin > in our outfit and we're not the experts... > > Thank you, > Oliver > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- J. -------------- next part -------------- An HTML attachment was scrubbed... URL: From russell@REDACTED Tue Nov 13 17:57:42 2018 From: russell@REDACTED (Russell Brown) Date: Tue, 13 Nov 2018 16:57:42 +0000 Subject: [erlang-questions] (no subject) Message-ID: Hi, I have a something I don't understand with redbug, if anyone can shed light, I'd be grateful. Start two nodes erl -name trc@REDACTED -setcookie trc -pa PATH_TO_EPER_BIN erl -name rpc@REDACTED -setcookie trc in the second node (rpc@REDACTED) I run the following: (rpc@REDACTED)3> net_kernel:hidden_connect('trc@REDACTED'). true (rpc@REDACTED)4> rpc:call('trc@REDACTED', redbug, start, ["erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]]). {40,2} (rpc@REDACTED)5> rpc:call('trc@REDACTED', erlang, term_to_binary, [{my_tuple, is, boss}]). <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0, 2,105,115,100,0,4,98,111,115,115>> (rpc@REDACTED)6> =ERROR REPORT==== 13-Nov-2018::16:48:17 === Error in process <0.46.0> on node 'trc@REDACTED' with exit value: {terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line... redbug done, terminated - [{io,format, [<5930.44.0>,"~s~n", ["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]], []}, {redbug,'-mk_outer/1-fun-2-',5, [{file,"src/redbug.erl"},{line,343}]}, {redbug,'-wrap_print_fun/1-fun-0-',3, [{file,"src/redbug.erl"},{line,329}]}, {lists,foldl,3,[{file,"lists.erl"},{line,1248}]}, {redbug,print_loop,2, [{file,"src/redbug.erl"},{line,519}]}] AND the file "/home/russell/t2btrc" is empty, but created. However, if I run (trc@REDACTED)1> redbug:start("erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]). {38,2} (trc@REDACTED)2> erlang:term_to_binary({my_tuple, is, boss}). <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0, 2,105,115,100,0,4,98,111,115,115>> redbug done, timeout - 1 (trc@REDACTED)3> In the node (trc@REDACTED) the file is created and contains 16:49:39 <0.39.0>({erlang,apply,2}) {erlang,term_to_binary,1} What is up with that? Thanks in advance if you can explain that to me at all. I did try reading the redbug code to figure out what was happening, but it wasn't so easy to follow for me. Cheers Russell -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oliver.Korpilla@REDACTED Tue Nov 13 18:01:17 2018 From: Oliver.Korpilla@REDACTED (Oliver Korpilla) Date: Tue, 13 Nov 2018 18:01:17 +0100 Subject: [erlang-questions] gen_sctp: What delays SACK? In-Reply-To: References: Message-ID: Hello, Jesper. The problem I see that the C++ side just fails to send more messages back but I'm stumped why. It _looks_ like it fails to respond to my protocol requests for some reason. But does it really? Or is something blocking/buffering/delaying/missing in the stack? And which side causes it? I'm very very stumped. Because I've seen the tcpdump in Wireshark and C++ stops sending. It just stops. (If I had more trust in my SCTP knowledge I would _assume_ there's some sort of deadlock on the C++ side.) Thank you very much, Oliver? Gesendet:?Dienstag, 13. November 2018 um 15:51 Uhr Von:?"Jesper Louis Andersen" An:?"Oliver Korpilla" Cc:?"Erlang (E-mail)" Betreff:?Re: [erlang-questions] gen_sctp: What delays SACK? Hi, ? Use tcpdump(1) on the flow and look for who is adding the latency. Usual rule of protocol debugging is to start at the lowest level and verify each level as you go up. Because then you have an audit trail of the events that happened which can inform you at a higher level. ?? On Tue, Nov 13, 2018 at 10:15 AM Oliver Korpilla wrote:Hello. We're using an elixir application as a sort of protocol tester. It communicated with the system-under-test over SCTP as a transport. We're observing delay and unsent messages and due to the nature of the SCTP protocol we're not sure which side causes the issue. The BEAM side has the NO_DELAY option set and pumps a burst of messages but then waits for responses (so it will not burst indefinitely, it burst once and then respond). The C++ application has the DELAYED_SACK option set - we tried with both sack_freq 1 (which supposedly disables the algorithm) and higher (the default in our system). (We also increased the receive window on both sides to ensure that senders would not block.) But we're stumped. The C++ side is not responding at some point. When we did an actual target test once and we saw SCTP messages sent from system-under-test just stop when analyzing the tcpdump of the interfaces - C++ application has not emitted something on the wire and respectively nothing is received. Our latest area of inquiry is to find out if maybe the elixir part is simply not getting scheduled - but can this impact for example SACK latency? Who acknowledges a message - the SCTP stack by itself or the application? And will the protocol block the sender until SACK? I'm sorry for asking such vague questions but SCTP know-how is spread thin in our outfit and we're not the experts... Thank you, Oliver _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] http://erlang.org/mailman/listinfo/erlang-questions? ?-- J. From russell@REDACTED Tue Nov 13 18:02:15 2018 From: russell@REDACTED (Russell Brown) Date: Tue, 13 Nov 2018 17:02:15 +0000 Subject: [erlang-questions] Redbug rpc call io error In-Reply-To: References: Message-ID: Sorry, adding a subject now. On 13/11/2018 16:57, Russell Brown wrote: > Hi, > > I have a something I don't understand with redbug, if anyone can shed > light, I'd be grateful. > > Start two nodes > > ? ? erl -name trc@REDACTED -setcookie trc -pa > PATH_TO_EPER_BIN > ? ? erl -name rpc@REDACTED -setcookie trc > > in the second node (rpc@REDACTED ) I run the > following: > > ? ?(rpc@REDACTED )3> > net_kernel:hidden_connect('trc@REDACTED '). > ? ?true > ? ?(rpc@REDACTED )4> rpc:call('trc@REDACTED > ', redbug, start, ["erlang:term_to_binary", > [{arity, true}, {print_file, "/home/russell/t2btrc"}]]). > ? ?{40,2} > ? ?(rpc@REDACTED )5> rpc:call('trc@REDACTED > ', erlang, term_to_binary, [{my_tuple, is, boss}]). > ?<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0, > ? ? ?2,105,115,100,0,4,98,111,115,115>> > ? ?(rpc@REDACTED )6> > =ERROR REPORT==== 13-Nov-2018::16:48:17 === > Error in process <0.46.0> on node 'trc@REDACTED > ' with exit value: > {terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17 <0.52.0>(dead) > {erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line... > > redbug done, terminated - [{io,format, > ?[<5930.44.0>,"~s~n", > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ["\n16:48:17 <0.52.0>(dead) > {erlang,term_to_binary,1}"]], > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[]}, > ?{redbug,'-mk_outer/1-fun-2-',5, > ?[{file,"src/redbug.erl"},{line,343}]}, > ?{redbug,'-wrap_print_fun/1-fun-0-',3, > ?[{file,"src/redbug.erl"},{line,329}]}, > ?{lists,foldl,3,[{file,"lists.erl"},{line,1248}]}, > ?{redbug,print_loop,2, > ?[{file,"src/redbug.erl"},{line,519}]}] > > AND the file "/home/russell/t2btrc" is empty, but created. > > However, if I run > > ? ? ? ? ?(trc@REDACTED )1> > redbug:start("erlang:term_to_binary", [{arity, true}, {print_file, > "/home/russell/t2btrc"}]). > ? ? ? ? ?{38,2} > ? ? ? ? ?(trc@REDACTED )2> > erlang:term_to_binary({my_tuple, is, boss}). > ?<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0, > ?2,105,115,100,0,4,98,111,115,115>> > ? ? ? ? ? ?redbug done, timeout - 1 > ? ? ? ? ? ?(trc@REDACTED )3> > > In the node (trc@REDACTED ) the file is created > and contains > > ? ?16:49:39 <0.39.0>({erlang,apply,2}) {erlang,term_to_binary,1} > > What is up with that? > > Thanks in advance if you can explain that to me at all. I did try > reading the redbug code to figure out what was happening, but it wasn't > so easy to follow for me. > > Cheers > > Russell > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From roger@REDACTED Tue Nov 13 18:49:40 2018 From: roger@REDACTED (Roger Lipscombe) Date: Tue, 13 Nov 2018 17:49:40 +0000 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: <87k1lh6hzc.fsf@gmail.com> References: <87lg5y5um2.fsf@gmail.com> <87k1lh6hzc.fsf@gmail.com> Message-ID: On 12 November 2018 at 22:36, Krzysztof Jurewicz wrote: >> Generation of from_map/2 is however currently not implemented in dynarec. > > I?ve implemented generation of from_map/2 and to_map/1; see this pull request: https://github.com/dieswaytoofast/dynarec/pull/7 . It should now be possible to convert records to maps and vice versa without writing boilerplate code. That's *almost* perfect ;-) Except that we load the code from JSON, using jiffy, which means that the keys are binary strings. I had a quick look at doing a PR for this, but I'm a bit sketchy when it comes to parse transforms, and I got side tracked. From krzysztof.jurewicz@REDACTED Tue Nov 13 20:57:57 2018 From: krzysztof.jurewicz@REDACTED (Krzysztof Jurewicz) Date: Tue, 13 Nov 2018 20:57:57 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: <87lg5y5um2.fsf@gmail.com> <20181113122325.GA3805@ferdmbp.local> Message-ID: <874lck698a.fsf@gmail.com> Brujo Benavides writes: > BTW, I don?t think Krzysztof was saying that he run dialyzer against tests, just that (on one hand) tests pass but (on the other hand) when he checked his code with dialyzer, it complained. Mostly because I can see how dialyzer would complain with just his code, and no tests :) Actually I do run Dialyzer against tests, not only occasionally but routinely. Test code is also code and it can benefit from being checked by Dialyzer. Here is how it looks in the Ercoin repository (ABCI server): ? TEST_DIR is added to DIALYZER_DIRS: https://gitlab.com/Ercoin/ercoin/blob/0c6cedda6bdae870a70655524e008a80d1c1f170/Makefile#L46 . Therefore every invocation of make check and make dialyze (and also CI) covers test code. ? If ABCI client (Tendermint) sends malformed data, then it?s a bug on their side, so we can avoid blame if we crash. ? If end user sends invalid data (via ABCI client), then it is supported and we return a relevant error code. It is also tested; for example, there is a lengthy generator for creating invalid transaction binaries: https://gitlab.com/Ercoin/ercoin/blob/0c6cedda6bdae870a70655524e008a80d1c1f170/test/ercoin_tx_gen.erl#L266 . ? No throw expressions are used. If we parse data from a non-trustworthy data source and there is a possibility of early exit, nested case expressions or monads may be employed (though the latter not without issues, see https://github.com/fogfish/datum/issues/54 ). From noah@REDACTED Wed Nov 14 03:09:46 2018 From: noah@REDACTED (Noah Silverman) Date: Wed, 14 Nov 2018 02:09:46 +0000 Subject: [erlang-questions] Awkward timeout behavior in Cowboy Websockets Message-ID: <8iUqRMgUlyp5FAd1ekY3IyKzhIUd4uBkr1kZfJovRr1A_3gFQ10gBfBXdzIvB1avIEfNmD5GmbLQ9QyMXkJp_GJKX8rFUSubvTwgVFJsymo=@helios.ai> Hello, When using Cowboy Websockets, I am seeing strange behavior during a timeout. As per the documentation, when upgrading a connection to websocket, there is an optional parameter for idle_timeout (defaults to 60000).? This works, and the connection does close after the correct number of seconds. However, there is no timeout message sent to the client, and I don't see a way to send one. There is a websocket_terminate/3 callback.? However, the documentation seems to indicate that function is called *after* the connection is closed. Looking in the source code for cowboy_websocket.erl, I see on lines 417-429 the different ways to close the socket.? A "stop" and a "timeout" are handled exactly the same, with a generic close of 1000.? So, no way for the client to know that idle_timeout was triggered. We have a service that streams data to a browser client. - The browser connects and requests a subscriptions to a feed - We then stream that data continuously. - No further action is required from the client, except a ping to keep the connection open. However, if the client doesn't ping, the connection will close silently.? There is no indication to the client that they were dropped due to timeout. Is there a way to remedy this?? Perhaps some way to have Cowboy send a "timeout message" when idle_timeout triggers? Thank You, -- Noah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: publickey - noah@REDACTED - 0xBCEFA873.asc Type: application/pgp-keys Size: 3136 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 855 bytes Desc: OpenPGP digital signature URL: From essen@REDACTED Wed Nov 14 08:07:51 2018 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Wed, 14 Nov 2018 08:07:51 +0100 Subject: [erlang-questions] Awkward timeout behavior in Cowboy Websockets In-Reply-To: <8iUqRMgUlyp5FAd1ekY3IyKzhIUd4uBkr1kZfJovRr1A_3gFQ10gBfBXdzIvB1avIEfNmD5GmbLQ9QyMXkJp_GJKX8rFUSubvTwgVFJsymo=@helios.ai> References: <8iUqRMgUlyp5FAd1ekY3IyKzhIUd4uBkr1kZfJovRr1A_3gFQ10gBfBXdzIvB1avIEfNmD5GmbLQ9QyMXkJp_GJKX8rFUSubvTwgVFJsymo=@helios.ai> Message-ID: <85be7a4e-6557-3303-2c3a-7b5a112e2937@ninenines.eu> Sounds like you are using Cowboy 1.x, in which case it'll be simpler to fork and fix directly. Someone mentioned not too long ago that sending 1001 for timeout closes might be a good idea. I'm probably OK with that, but nobody's opened a ticket or PR so the idea got lost in the back of my mind. Cheers, On 11/14/18 3:09 AM, Noah Silverman wrote: > Hello, > > When using Cowboy Websockets, I am seeing strange behavior during a timeout. > > As per the documentation, when upgrading a connection to websocket, > there is an optional parameter for idle_timeout (defaults to 60000). > This works, and the connection does close after the correct number of > seconds. > > However, there is no timeout message sent to the client, and I don't see > a way to send one. > > There is a websocket_terminate/3 callback.? However, the documentation > seems to indicate that function is called *after* the connection is closed. > > Looking in the source code for cowboy_websocket.erl, I see on lines > 417-429 the different ways to close the socket.? A "stop" and a > "timeout" are handled exactly the same, with a generic close of 1000. > So, no way for the client to know that idle_timeout was triggered. > > We have a service that streams data to a browser client. > - The browser connects and requests a subscriptions to a feed > - We then stream that data continuously. > - No further action is required from the client, except a ping to keep > the connection open. > > However, if the client doesn't ping, the connection will close > silently.? There is no indication to the client that they were dropped > due to timeout. > > Is there a way to remedy this?? Perhaps some way to have Cowboy send a > "timeout message" when idle_timeout triggers? > > Thank You, > > > -- > Noah > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From lukas@REDACTED Wed Nov 14 09:51:12 2018 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 14 Nov 2018 09:51:12 +0100 Subject: [erlang-questions] Patch Package OTP 18.3.4.11 Released Message-ID: Patch Package: OTP 18.3.4.11 Git Tag: OTP-18.3.4.11 Date: 2018-11-14 Trouble Report Id: OTP-15371 Seq num: System: OTP Release: 18 Application: erts-7.3.1.6, stdlib-2.8.0.1 Predecessor: OTP 18.3.4.10 Check out the git tag OTP-18.3.4.11, 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. --------------------------------------------------------------------- --- erts-7.3.1.6 ---------------------------------------------------- --------------------------------------------------------------------- The erts-7.3.1.6 application can be applied independently of other applications on a full OTP 18 installation. --- Improvements and New Features --- OTP-15371 Application(s): erts, stdlib List subtraction (The -- operator) will now yield properly on large inputs. Full runtime dependencies of erts-7.3.1.6: kernel-4.0, sasl-2.4, stdlib-2.5 --------------------------------------------------------------------- --- stdlib-2.8.0.1 -------------------------------------------------- --------------------------------------------------------------------- Note! The stdlib-2.8.0.1 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 dependencies have to be satisfied: -- erts-7.3 (first satisfied in OTP 18.3) -- kernel-4.1 (first satisfied in OTP 18.1) -- sasl-2.6 (first satisfied in OTP 18.1) --- Improvements and New Features --- OTP-15371 Application(s): erts, stdlib List subtraction (The -- operator) will now yield properly on large inputs. Full runtime dependencies of stdlib-2.8.0.1: compiler-5.0, crypto-3.3, erts-7.3, kernel-4.1, sasl-2.6 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.schultz@REDACTED Wed Nov 14 11:20:33 2018 From: andreas.schultz@REDACTED (Andreas Schultz) Date: Wed, 14 Nov 2018 11:20:33 +0100 Subject: [erlang-questions] gen_sctp: What delays SACK? In-Reply-To: References: Message-ID: Hi Oliver, One reason for you problems might be the fact that Erlangs SCTP implementation is unbelievable slow. Apparently SCTP SACKs are only send after the application has actually received (on the recv syscall) the payload. So,what I'm seeing is that if your application takes to long to read the payload, the SACK will not be send and the sender will start retransmitting the SCTP packet. I have written a simple socket benchmark client [1]. When testing with TCP, UDP and SCTP on OTP 21.1, sending 1000 packets with a length of 100 bytes, I get this results: * server is socat to /dev/null, e.g. "socat -u SCTP-LISTEN:6000,reuseaddr,keepalive,rcvbuf=131071,reuseaddr /dev/null") * times are in microseconds $ ./bench.escript sctp 127.0.0.1 6000 100 1000 sctp,100,1000,817250 tcp,100,1000,8301 udp,100,1000,17477 As you can see TCP is fastest with ~8ms due to the Nagle algorithm combining the packets before sending, UDP is still ok with ~17.5ms. SCTP takes a astonishing 817ms. That is 46 times slower than UDP. Regards Andreas [1]: https://gist.github.com/RoadRunnr/53c19861aa4e4fa5bd45c072727ab971 Oliver Korpilla schrieb am Di., 13. Nov. 2018 um 18:01 Uhr: > Hello, Jesper. > > The problem I see that the C++ side just fails to send more messages back > but I'm stumped why. > > It _looks_ like it fails to respond to my protocol requests for some > reason. > > But does it really? Or is something blocking/buffering/delaying/missing in > the stack? And which side causes it? > > I'm very very stumped. Because I've seen the tcpdump in Wireshark and C++ > stops sending. It just stops. (If I had more trust in my SCTP knowledge I > would _assume_ there's some sort of deadlock on the C++ side.) > > Thank you very much, > Oliver > > Gesendet: Dienstag, 13. November 2018 um 15:51 Uhr > Von: "Jesper Louis Andersen" > An: "Oliver Korpilla" > Cc: "Erlang (E-mail)" > Betreff: Re: [erlang-questions] gen_sctp: What delays SACK? > > Hi, > > Use tcpdump(1) on the flow and look for who is adding the latency. Usual > rule of protocol debugging is to start at the lowest level and verify each > level as you go up. Because then you have an audit trail of the events that > happened which can inform you at a higher level. > > > On Tue, Nov 13, 2018 at 10:15 AM Oliver Korpilla [mailto:Oliver.Korpilla@REDACTED]> wrote:Hello. > > We're using an elixir application as a sort of protocol tester. It > communicated with the system-under-test over SCTP as a transport. > > We're observing delay and unsent messages and due to the nature of the > SCTP protocol we're not sure which side causes the issue. > > The BEAM side has the NO_DELAY option set and pumps a burst of messages > but then waits for responses (so it will not burst indefinitely, it burst > once and then respond). > > The C++ application has the DELAYED_SACK option set - we tried with both > sack_freq 1 (which supposedly disables the algorithm) and higher (the > default in our system). > > (We also increased the receive window on both sides to ensure that senders > would not block.) > > But we're stumped. The C++ side is not responding at some point. When we > did an actual target test once and we saw SCTP messages sent from > system-under-test just stop when analyzing the tcpdump of the interfaces - > C++ application has not emitted something on the wire and respectively > nothing is received. > > > Our latest area of inquiry is to find out if maybe the elixir part is > simply not getting scheduled - but can this impact for example SACK > latency? Who acknowledges a message - the SCTP stack by itself or the > application? And will the protocol block the sender until SACK? > > I'm sorry for asking such vague questions but SCTP know-how is spread thin > in our outfit and we're not the experts... > > Thank you, > Oliver > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] > http://erlang.org/mailman/listinfo/erlang-questions > -- > J. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- -- Dipl.-Inform. Andreas Schultz ----------------------- enabling your networks ---------------------- Travelping GmbH Phone: +49-391-81 90 99 0 Roentgenstr. 13 Fax: +49-391-81 90 99 299 39108 Magdeburg Email: info@REDACTED GERMANY Web: http://www.travelping.com Company Registration: Amtsgericht Stendal Reg No.: HRB 10578 Geschaeftsfuehrer: Holger Winkelmann VAT ID No.: DE236673780 --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From noah@REDACTED Wed Nov 14 12:12:01 2018 From: noah@REDACTED (Noah Silverman) Date: Wed, 14 Nov 2018 11:12:01 +0000 Subject: [erlang-questions] Awkward timeout behavior in Cowboy Websockets In-Reply-To: <85be7a4e-6557-3303-2c3a-7b5a112e2937@ninenines.eu> References: <8iUqRMgUlyp5FAd1ekY3IyKzhIUd4uBkr1kZfJovRr1A_3gFQ10gBfBXdzIvB1avIEfNmD5GmbLQ9QyMXkJp_GJKX8rFUSubvTwgVFJsymo=@helios.ai> <85be7a4e-6557-3303-2c3a-7b5a112e2937@ninenines.eu> Message-ID: Hi Loic, Actually using Cowboy 2.5, and following examples examples directly from the user guide on ninenines website. -- Noah ??????? Original Message ??????? On Wednesday, November 14, 2018 3:07 PM, Lo?c Hoguin wrote: > Sounds like you are using Cowboy 1.x, in which case it'll be simpler to > fork and fix directly. > > Someone mentioned not too long ago that sending 1001 for timeout closes > might be a good idea. I'm probably OK with that, but nobody's opened a > ticket or PR so the idea got lost in the back of my mind. > > Cheers, > > On 11/14/18 3:09 AM, Noah Silverman wrote: > > > Hello, > > When using Cowboy Websockets, I am seeing strange behavior during a timeout. > > As per the documentation, when upgrading a connection to websocket, > > there is an optional parameter for idle_timeout (defaults to 60000). > > This works, and the connection does close after the correct number of > > seconds. > > However, there is no timeout message sent to the client, and I don't see > > a way to send one. > > There is a websocket_terminate/3 callback.? However, the documentation > > seems to indicate that function is called after the connection is closed. > > Looking in the source code for cowboy_websocket.erl, I see on lines > > 417-429 the different ways to close the socket.? A "stop" and a > > "timeout" are handled exactly the same, with a generic close of 1000. > > So, no way for the client to know that idle_timeout was triggered. > > We have a service that streams data to a browser client. > > > > - The browser connects and requests a subscriptions to a feed > > - We then stream that data continuously. > > - No further action is required from the client, except a ping to keep > > the connection open. > > > > > > However, if the client doesn't ping, the connection will close > > silently.? There is no indication to the client that they were dropped > > due to timeout. > > Is there a way to remedy this?? Perhaps some way to have Cowboy send a > > "timeout message" when idle_timeout triggers? > > Thank You, > > -- > > Noah > > > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > > -- > > Lo?c Hoguin > https://ninenines.eu -------------- next part -------------- A non-text attachment was scrubbed... Name: publickey - noah@REDACTED - 0xBCEFA873.asc Type: application/pgp-keys Size: 3136 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 855 bytes Desc: OpenPGP digital signature URL: From essen@REDACTED Wed Nov 14 12:16:09 2018 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Wed, 14 Nov 2018 12:16:09 +0100 Subject: [erlang-questions] Awkward timeout behavior in Cowboy Websockets In-Reply-To: References: <8iUqRMgUlyp5FAd1ekY3IyKzhIUd4uBkr1kZfJovRr1A_3gFQ10gBfBXdzIvB1avIEfNmD5GmbLQ9QyMXkJp_GJKX8rFUSubvTwgVFJsymo=@helios.ai> <85be7a4e-6557-3303-2c3a-7b5a112e2937@ninenines.eu> Message-ID: <75713aab-feb7-8256-9b5c-9acc5dd88400@ninenines.eu> The websocket_terminate/3 callback was removed in 2.0 so make sure you follow the correct documentation. :) Anyway let's continue in a ticket. Cheers, On 11/14/18 12:12 PM, Noah Silverman wrote: > Hi Loic, > > Actually using Cowboy 2.5, and following examples examples directly from the user guide on ninenines website. > > > > > -- > Noah > > > > ??????? Original Message ??????? > On Wednesday, November 14, 2018 3:07 PM, Lo?c Hoguin wrote: > >> Sounds like you are using Cowboy 1.x, in which case it'll be simpler to >> fork and fix directly. >> > >> Someone mentioned not too long ago that sending 1001 for timeout closes >> might be a good idea. I'm probably OK with that, but nobody's opened a >> ticket or PR so the idea got lost in the back of my mind. >> > >> Cheers, >> > >> On 11/14/18 3:09 AM, Noah Silverman wrote: >> > >>> Hello, >>> When using Cowboy Websockets, I am seeing strange behavior during a timeout. >>> As per the documentation, when upgrading a connection to websocket, >>> there is an optional parameter for idle_timeout (defaults to 60000). >>> This works, and the connection does close after the correct number of >>> seconds. >>> However, there is no timeout message sent to the client, and I don't see >>> a way to send one. >>> There is a websocket_terminate/3 callback.? However, the documentation >>> seems to indicate that function is called after the connection is closed. >>> Looking in the source code for cowboy_websocket.erl, I see on lines >>> 417-429 the different ways to close the socket.? A "stop" and a >>> "timeout" are handled exactly the same, with a generic close of 1000. >>> So, no way for the client to know that idle_timeout was triggered. >>> We have a service that streams data to a browser client. >>> > >>> - The browser connects and requests a subscriptions to a feed >>> - We then stream that data continuously. >>> - No further action is required from the client, except a ping to keep >>> the connection open. >>> > >>> > >>> However, if the client doesn't ping, the connection will close >>> silently.? There is no indication to the client that they were dropped >>> due to timeout. >>> Is there a way to remedy this?? Perhaps some way to have Cowboy send a >>> "timeout message" when idle_timeout triggers? >>> Thank You, >>> -- >>> Noah >>> > >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >> > >> -- >> > >> Lo?c Hoguin >> https://ninenines.eu > -- Lo?c Hoguin https://ninenines.eu From Oliver.Korpilla@REDACTED Wed Nov 14 12:25:56 2018 From: Oliver.Korpilla@REDACTED (Oliver Korpilla) Date: Wed, 14 Nov 2018 12:25:56 +0100 Subject: [erlang-questions] gen_sctp: What delays SACK? In-Reply-To: References: Message-ID: Hello, Andreas. We also see retransmission and they do have an impact on latency. (We also see retransmissions on another link we're not testing with BEAM.) But my biggest concern is this sudden stop of all sending from the C++ side that I can not wrap my head around. Thank you very much, Oliver ? Gesendet:?Mittwoch, 14. November 2018 um 11:20 Uhr Von:?"Andreas Schultz" An:?"Oliver Korpilla" Cc:?"Jesper Louis Andersen" , "Erlang (E-mail)" Betreff:?Re: [erlang-questions] gen_sctp: What delays SACK? Hi Oliver, ? One reason for you problems might be the fact that Erlangs SCTP implementation is unbelievable slow. ? Apparently SCTP SACKs are only send after the application has actually received (on the recv syscall) the payload. So,what I'm seeing is that if your application takes to long to read the payload, the SACK will not be send and the sender will start retransmitting the SCTP packet. ? I have written a simple socket benchmark client [1]. ? When testing with TCP, UDP and SCTP on OTP 21.1, sending 1000 packets with a length of 100 bytes, I get this results: ? * server is socat to /dev/null, e.g. "socat -u SCTP-LISTEN:6000,reuseaddr,keepalive,rcvbuf=131071,reuseaddr /dev/null") * times are in microseconds $ ./bench.escript sctp 127.0.0.1 6000 100 1000 sctp,100,1000,817250 tcp,100,1000,8301 udp,100,1000,17477 ? As you can see TCP is fastest with ~8ms due to the Nagle algorithm combining the packets before sending, UDP is still ok with ~17.5ms. SCTP takes a astonishing 817ms. That is 46 times slower than UDP. ? Regards Andreas ? [1]:?https://gist.github.com/RoadRunnr/53c19861aa4e4fa5bd45c072727ab971 ? Oliver Korpilla schrieb am Di., 13. Nov. 2018 um 18:01?Uhr: Hello, Jesper. The problem I see that the C++ side just fails to send more messages back but I'm stumped why. It _looks_ like it fails to respond to my protocol requests for some reason. But does it really? Or is something blocking/buffering/delaying/missing in the stack? And which side causes it? I'm very very stumped. Because I've seen the tcpdump in Wireshark and C++ stops sending. It just stops. (If I had more trust in my SCTP knowledge I would _assume_ there's some sort of deadlock on the C++ side.) Thank you very much, Oliver? Gesendet:?Dienstag, 13. November 2018 um 15:51 Uhr Von:?"Jesper Louis Andersen" An:?"Oliver Korpilla" Cc:?"Erlang (E-mail)" Betreff:?Re: [erlang-questions] gen_sctp: What delays SACK? Hi, ? Use tcpdump(1) on the flow and look for who is adding the latency. Usual rule of protocol debugging is to start at the lowest level and verify each level as you go up. Because then you have an audit trail of the events that happened which can inform you at a higher level. ?? On Tue, Nov 13, 2018 at 10:15 AM Oliver Korpilla wrote:Hello. We're using an elixir application as a sort of protocol tester. It communicated with the system-under-test over SCTP as a transport. We're observing delay and unsent messages and due to the nature of the SCTP protocol we're not sure which side causes the issue. The BEAM side has the NO_DELAY option set and pumps a burst of messages but then waits for responses (so it will not burst indefinitely, it burst once and then respond). The C++ application has the DELAYED_SACK option set - we tried with both sack_freq 1 (which supposedly disables the algorithm) and higher (the default in our system). (We also increased the receive window on both sides to ensure that senders would not block.) But we're stumped. The C++ side is not responding at some point. When we did an actual target test once and we saw SCTP messages sent from system-under-test just stop when analyzing the tcpdump of the interfaces - C++ application has not emitted something on the wire and respectively nothing is received. Our latest area of inquiry is to find out if maybe the elixir part is simply not getting scheduled - but can this impact for example SACK latency? Who acknowledges a message - the SCTP stack by itself or the application? And will the protocol block the sender until SACK? I'm sorry for asking such vague questions but SCTP know-how is spread thin in our outfit and we're not the experts... Thank you, Oliver _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED[mailto:erlang-questions@REDACTED][mailto:erlang-questions@REDACTED[mailto:erlang-questions@REDACTED]] http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions]? ?-- J. _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] http://erlang.org/mailman/listinfo/erlang-questions-- -- Dipl.-Inform. Andreas Schultz ----------------------- enabling your networks ---------------------- Travelping GmbH ? ? ? ? ? ? ? ? ? ? Phone: ?+49-391-81 90 99 0 Roentgenstr. 13 ? ? ? ? ? ? ? ? ? ? Fax: ? ?+49-391-81 90 99 299 39108 Magdeburg ? ? ? ? ? ? ? ? ? ? Email: ?info@REDACTED[mailto:info@REDACTED] GERMANY ? ? ? ? ? ? ? ? ? ? ? ? ? ? Web: ? ?http://www.travelping.com[http://www.travelping.com] ? Company Registration: Amtsgericht Stendal ? ? ? ?Reg No.: ? HRB 10578Geschaeftsfuehrer: Holger Winkelmann ? ? ? ? ?VAT ID No.: DE236673780 --------------------------------------------------------------------- From krzysztof.jurewicz@REDACTED Wed Nov 14 14:54:56 2018 From: krzysztof.jurewicz@REDACTED (Krzysztof Jurewicz) Date: Wed, 14 Nov 2018 14:54:56 +0100 Subject: [erlang-questions] Temporarily violating record type constraints annoys dialyzer In-Reply-To: References: <87lg5y5um2.fsf@gmail.com> <87k1lh6hzc.fsf@gmail.com> Message-ID: <8736s369xr.fsf@gmail.com> Roger Lipscombe writes: >> I?ve implemented generation of from_map/2 and to_map/1; see this pull request: https://github.com/dieswaytoofast/dynarec/pull/7 . It should now be possible to convert records to maps and vice versa without writing boilerplate code. > > That's *almost* perfect ;-) > > Except that we load the code from JSON, using jiffy, which means that > the keys are binary strings. I had a quick look at doing a PR for > this, but I'm a bit sketchy when it comes to parse transforms, and I > got side tracked. A workaround (though likely not most efficient) may be to write the following function: record_from_binary_proplist(RecordName, Props) -> BinaryFields = [list_to_binary(atom_to_list(Field)) || Field <- fields(RecordName)], from_map( RecordName, maps:from_list( [{list_to_atom(binary_to_list(Key)), Value} || {Key, Value} <- Props, lists:member(Key, BinaryFields)])). Alternatively: record_from_binary_proplist(RecordName, Props) -> FieldsByBinary = maps:from_list([{list_to_binary(atom_to_list(Field)), Field} || Field <- fields(RecordName)]), from_map( RecordName, lists:foldl( fun ({Key, Value}, MapAcc) -> case maps:find(Key, FieldsByBinary) of {ok, KeyAtom} -> maps:put(KeyAtom, Value, MapAcc); error -> MapAcc end end, #{}, Props)). From askjuise@REDACTED Wed Nov 14 15:18:19 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Wed, 14 Nov 2018 17:18:19 +0300 Subject: [erlang-questions] msacc and dirty scheduler Message-ID: Hello! I see the follow debug info, and I would to know, which process and which code utilize only one dirty scheduler? How I can find out it? > msacc:start(1000), msacc:print(), msacc:stop(). > Average thread real-time : 1000886 us > Accumulated system run-time : 3440871 us > Average scheduler run-time : 615277 us > Thread aux check_io emulator gc other port > sleep > Stats per thread: > async( 0) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(11) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(12) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(13) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(14) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(15) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(16) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(17) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(18) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(19) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(20) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(21) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(22) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(23) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(24) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(25) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(26) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(27) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(28) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > async(29) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > aux( 1) 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% > 91.18% > dirty_cpu_( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_cpu_( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_cpu_( 3) 0.00% 0.00% 89.04% 0.02% 0.00% 0.00% > 10.94% > dirty_cpu_( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > dirty_io_s(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > scheduler( 1) 1.45% 1.61% 37.45% 6.11% 15.31% 1.35% > 36.72% > scheduler( 2) 1.33% 1.24% 35.30% 6.39% 16.21% 1.33% > 38.19% > scheduler( 3) 1.35% 1.50% 33.85% 5.50% 18.19% 1.48% > 38.13% > scheduler( 4) 1.59% 1.35% 31.49% 5.14% 18.29% 1.18% > 40.95% > Stats per type: > async 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > aux 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% > 91.18% > dirty_cpu_sche 0.00% 0.00% 22.26% 0.01% 0.00% 0.00% > 77.73% > dirty_io_sched 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% > 100.00% > scheduler 1.43% 1.42% 34.53% 5.79% 17.00% 1.34% > 38.49% -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 931 9877991 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas@REDACTED Wed Nov 14 15:33:35 2018 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 14 Nov 2018 15:33:35 +0100 Subject: [erlang-questions] msacc and dirty scheduler In-Reply-To: References: Message-ID: Hello! It is most likely the GC that is using the dirty cpu scheduler. Also, there are bugs in the microstate accounting fixed in OTP-21 that I think still exists in pre OTP-20 versions that caused dirty schedulers to report incorrect statistics. The printout looks very similar to a bug where sleep was accredited to the emulator state. Lukas On Wed, Nov 14, 2018 at 3:18 PM Alexander Petrovsky wrote: > Hello! > > I see the follow debug info, and I would to know, which process and which > code utilize only one dirty scheduler? How I can find out it? > > > msacc:start(1000), msacc:print(), msacc:stop(). >> Average thread real-time : 1000886 us >> Accumulated system run-time : 3440871 us >> Average scheduler run-time : 615277 us >> Thread aux check_io emulator gc other port >> sleep >> Stats per thread: >> async( 0) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(11) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(12) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(13) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(14) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(15) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(16) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(17) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(18) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(19) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(20) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(21) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(22) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(23) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(24) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(25) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(26) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(27) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(28) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(29) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> aux( 1) 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >> 91.18% >> dirty_cpu_( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_cpu_( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_cpu_( 3) 0.00% 0.00% 89.04% 0.02% 0.00% 0.00% >> 10.94% >> dirty_cpu_( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> scheduler( 1) 1.45% 1.61% 37.45% 6.11% 15.31% 1.35% >> 36.72% >> scheduler( 2) 1.33% 1.24% 35.30% 6.39% 16.21% 1.33% >> 38.19% >> scheduler( 3) 1.35% 1.50% 33.85% 5.50% 18.19% 1.48% >> 38.13% >> scheduler( 4) 1.59% 1.35% 31.49% 5.14% 18.29% 1.18% >> 40.95% >> Stats per type: >> async 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> aux 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >> 91.18% >> dirty_cpu_sche 0.00% 0.00% 22.26% 0.01% 0.00% 0.00% >> 77.73% >> dirty_io_sched 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> scheduler 1.43% 1.42% 34.53% 5.79% 17.00% 1.34% >> 38.49% > > > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 931 9877991 > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From z@REDACTED Wed Nov 14 15:38:40 2018 From: z@REDACTED (Danil Zagoskin) Date: Wed, 14 Nov 2018 17:38:40 +0300 Subject: [erlang-questions] msacc and dirty scheduler In-Reply-To: References: Message-ID: Hi! Probably it is disk or network I/O. You may use iostat to see if your disk utilization is OK. You may use lcnt to see if there are any locks on some port. You may use a simple tool I wrote for cases when something is very slow and you don't know what exactly it is: https://gist.github.com/stolen/9a28ed9403c724541b0ee5fcd822613e On Wed, Nov 14, 2018 at 5:18 PM Alexander Petrovsky wrote: > Hello! > > I see the follow debug info, and I would to know, which process and which > code utilize only one dirty scheduler? How I can find out it? > > > msacc:start(1000), msacc:print(), msacc:stop(). >> Average thread real-time : 1000886 us >> Accumulated system run-time : 3440871 us >> Average scheduler run-time : 615277 us >> Thread aux check_io emulator gc other port >> sleep >> Stats per thread: >> async( 0) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(11) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(12) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(13) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(14) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(15) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(16) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(17) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(18) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(19) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(20) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(21) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(22) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(23) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(24) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(25) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(26) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(27) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(28) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> async(29) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> aux( 1) 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >> 91.18% >> dirty_cpu_( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_cpu_( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_cpu_( 3) 0.00% 0.00% 89.04% 0.02% 0.00% 0.00% >> 10.94% >> dirty_cpu_( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> dirty_io_s(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> scheduler( 1) 1.45% 1.61% 37.45% 6.11% 15.31% 1.35% >> 36.72% >> scheduler( 2) 1.33% 1.24% 35.30% 6.39% 16.21% 1.33% >> 38.19% >> scheduler( 3) 1.35% 1.50% 33.85% 5.50% 18.19% 1.48% >> 38.13% >> scheduler( 4) 1.59% 1.35% 31.49% 5.14% 18.29% 1.18% >> 40.95% >> Stats per type: >> async 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> aux 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >> 91.18% >> dirty_cpu_sche 0.00% 0.00% 22.26% 0.01% 0.00% 0.00% >> 77.73% >> dirty_io_sched 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >> 100.00% >> scheduler 1.43% 1.42% 34.53% 5.79% 17.00% 1.34% >> 38.49% > > > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 931 9877991 > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Danil Zagoskin | z@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: From askjuise@REDACTED Wed Nov 14 16:17:39 2018 From: askjuise@REDACTED (Alexander Petrovsky) Date: Wed, 14 Nov 2018 18:17:39 +0300 Subject: [erlang-questions] msacc and dirty scheduler In-Reply-To: References: Message-ID: > Also, there are bugs in the microstate accounting fixed in OTP-21 that I think still exists in pre OTP-20 versions that caused dirty schedulers to report incorrect statistics. The printout looks very similar to a bug where sleep was accredited to the emulator state. Thanks, Lukas, got it. ??, 14 ????. 2018 ?. ? 17:38, Danil Zagoskin : > Hi! > > Probably it is disk or network I/O. > > You may use iostat to see if your disk utilization is OK. > You may use lcnt to see if there are any locks on some port. > You may use a simple tool I wrote for cases when something is very slow > and you don't know what exactly it is: > https://gist.github.com/stolen/9a28ed9403c724541b0ee5fcd822613e > Oh, interesting. Will try to use your tool. Thanks > > > On Wed, Nov 14, 2018 at 5:18 PM Alexander Petrovsky > wrote: > >> Hello! >> >> I see the follow debug info, and I would to know, which process and which >> code utilize only one dirty scheduler? How I can find out it? >> >> > msacc:start(1000), msacc:print(), msacc:stop(). >>> Average thread real-time : 1000886 us >>> Accumulated system run-time : 3440871 us >>> Average scheduler run-time : 615277 us >>> Thread aux check_io emulator gc other port >>> sleep >>> Stats per thread: >>> async( 0) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(11) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(12) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(13) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(14) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(15) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(16) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(17) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(18) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(19) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(20) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(21) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(22) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(23) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(24) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(25) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(26) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(27) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(28) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> async(29) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> aux( 1) 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >>> 91.18% >>> dirty_cpu_( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_cpu_( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_cpu_( 3) 0.00% 0.00% 89.04% 0.02% 0.00% 0.00% >>> 10.94% >>> dirty_cpu_( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 1) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 2) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 3) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 4) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 5) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 6) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 7) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 8) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s( 9) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> dirty_io_s(10) 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> scheduler( 1) 1.45% 1.61% 37.45% 6.11% 15.31% 1.35% >>> 36.72% >>> scheduler( 2) 1.33% 1.24% 35.30% 6.39% 16.21% 1.33% >>> 38.19% >>> scheduler( 3) 1.35% 1.50% 33.85% 5.50% 18.19% 1.48% >>> 38.13% >>> scheduler( 4) 1.59% 1.35% 31.49% 5.14% 18.29% 1.18% >>> 40.95% >>> Stats per type: >>> async 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> aux 0.13% 0.00% 0.00% 0.00% 8.69% 0.00% >>> 91.18% >>> dirty_cpu_sche 0.00% 0.00% 22.26% 0.01% 0.00% 0.00% >>> 77.73% >>> dirty_io_sched 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% >>> 100.00% >>> scheduler 1.43% 1.42% 34.53% 5.79% 17.00% 1.34% >>> 38.49% >> >> >> >> -- >> ?????????? ????????? / Alexander Petrovsky, >> >> Skype: askjuise >> Phone: +7 931 9877991 >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > > > -- > Danil Zagoskin | z@REDACTED > -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 931 9877991 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bchesneau@REDACTED Thu Nov 15 09:26:10 2018 From: bchesneau@REDACTED (Benoit Chesneau) Date: Thu, 15 Nov 2018 09:26:10 +0100 Subject: [erlang-questions] building nifs using CMAKE Message-ID: I've found https://github.com/johnhamelink/postie that provide a cmake extension to discover erlang but is anyone aware of a rebar3 plugin that use cmake instead of autotools? Benoit -------------- next part -------------- An HTML attachment was scrubbed... URL: From natalia.chechina@REDACTED Thu Nov 15 16:02:30 2018 From: natalia.chechina@REDACTED (Natalia Chechina) Date: Thu, 15 Nov 2018 15:02:30 +0000 Subject: [erlang-questions] SD Erlang In-Reply-To: References: Message-ID: Hello George, Yes, that would be nice! I'm not sure what you mean by "other options", but will be happy to discuss that off-line :). Best wishes, Natalia. On Mon, 12 Nov 2018 at 06:03, Greg wrote: > I was really hoping that it would be part of the standard release. > > What are the options now? > > > On Sun, Nov 11, 2018 at 4:00 PM Natalia Chechina < > natalia.chechina@REDACTED> wrote: > >> Hello, >> >> No they are not... and unfortunately at the moment there are no plans to >> add them... >> >> Best wishes, >> Natalia. >> >> >> >> On Fri, 9 Nov 2018 at 09:18, Greg wrote: >> >>> Hi, >>> Is SD Erlang (s_groups) part of the standard release yet? >>> >>> Greg >>> _______________________________________________ >>> erlang-questions mailing list >>> erlang-questions@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-questions >>> >> >> >> -- >> Natalia Chechina >> > -- Natalia Chechina -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Thu Nov 15 17:40:14 2018 From: mjtruog@REDACTED (Michael Truog) Date: Thu, 15 Nov 2018 08:40:14 -0800 Subject: [erlang-questions] SD Erlang In-Reply-To: References: Message-ID: <60f2d4dd-e295-c797-56ee-7d60ea277f43@gmail.com> On 11/11/2018 10:03 PM, Greg wrote: > I was really hoping that it would be part of the standard release. > > What are the options now? With the functionality currently in Erlang/OTP you can create hidden node connections to avoid creating a fully connected network topology. The SD Erlang website appears to provide directions for the use of their source code at http://www.dcs.gla.ac.uk/research/sd-erlang/howto.html Best Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From dch@REDACTED Fri Nov 16 00:47:07 2018 From: dch@REDACTED (Dave Cottlehuber) Date: Fri, 16 Nov 2018 00:47:07 +0100 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: References: Message-ID: <1542325627.2083419.1578631856.2ADFB375@webmail.messagingengine.com> On Mon, 12 Nov 2018, at 14:35, Michael Scharrer wrote: > Hi Luke, > > thank you I will look. Is it maybe possible that you can share me your > output what you?re getting on windows ./otp_build env_win32 x64 > So that I can see some differences and compare it with my paths and > system configuration. > > Thanks, > Michael Hi Michael, Luke is right, you need to have the Windows SDK tools before the cygwin stuff in the path. I've been through this in detail many times. Most of the acquired wisdom is documented here; for more details and example order see https://github.com/apache/couchdb-glazier#make-a-new-prompt-shortcut I strongly recommend doing your windows builds on a dedicated VM and ensuring you have regular snapshots to clean up and roll back to. Once you have the path and dependencies organised, building multiple versions of OTP is cake. Good luck. A+ Dave From dch@REDACTED Fri Nov 16 00:49:41 2018 From: dch@REDACTED (Dave Cottlehuber) Date: Fri, 16 Nov 2018 00:49:41 +0100 Subject: [erlang-questions] Which On Windows In-Reply-To: References: Message-ID: <1542325781.2083688.1578636088.2C2D25E4@webmail.messagingengine.com> On Tue, 13 Nov 2018, at 13:06, Michael Scharrer wrote: > Hi Luke, > > i think there is a litte issue in the documentation for building erlang > on windows, because the VCPATH or else are not cygwin'ish... with > make_winpath() or make_upath() or else which you are able to set in > the .bash_profile and this don?t work for me in the newest cygwin 64. > It would be great if you can test this later... > > > Just here the example > > ## The PATH variable should be Cygwin'ish > VCPATH= > $VISUAL_STUDIO_ROOT/VC/bin/amd64:\ > $VISUAL_STUDIO_ROOT/VC/vcpackages:\ > $VISUAL_STUDIO_ROOT/Common7/IDE:\ > $VISUAL_STUDIO_ROOT/Common7/Tools:\ > $SDK/bin/x86 > > > > Are you sure, that it uses for a x64 build of erlang the Windows Kit?s > for x86 for the tools rc and mt? Yes. This is correct. 32-bit compiler toolchain can generate 64-bit artefacts. A+ Dave From dgud@REDACTED Fri Nov 16 07:32:52 2018 From: dgud@REDACTED (Dan Gudmundsson) Date: Fri, 16 Nov 2018 07:32:52 +0100 Subject: [erlang-questions] Erlang Build 21.1.1 on Windows 10 In-Reply-To: <1542325627.2083419.1578631856.2ADFB375@webmail.messagingengine.com> References: <1542325627.2083419.1578631856.2ADFB375@webmail.messagingengine.com> Message-ID: We only use msys (and msys2) here at OTP nowadays, so using cygwin have not been tested for several years. So the instructions and/or scripts may not be 100% accurate for cygwin. /Dan On Fri, Nov 16, 2018 at 12:47 AM Dave Cottlehuber wrote: > On Mon, 12 Nov 2018, at 14:35, Michael Scharrer wrote: > > Hi Luke, > > > > thank you I will look. Is it maybe possible that you can share me your > > output what you?re getting on windows ./otp_build env_win32 x64 > > So that I can see some differences and compare it with my paths and > > system configuration. > > > > Thanks, > > Michael > > Hi Michael, > > Luke is right, you need to have the Windows SDK tools before the cygwin > stuff in the path. > > > I've been through this in detail many times. Most of the acquired wisdom > is documented here; for more details and example order see > https://github.com/apache/couchdb-glazier#make-a-new-prompt-shortcut > > I strongly recommend doing your windows builds on a dedicated VM and > ensuring you have regular snapshots to clean up and roll back to. > > Once you have the path and dependencies organised, building multiple > versions of OTP is cake. > > Good luck. > > A+ > Dave > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sperber@REDACTED Fri Nov 16 09:22:40 2018 From: sperber@REDACTED (Michael Sperber) Date: Fri, 16 Nov 2018 09:22:40 +0100 Subject: [erlang-questions] 2nd Call for Contributions: BOB 2019 [Deadline Nov 23] Message-ID: Erlang contributions are spot-on for BOB! BOB Conference 2019 "What happens when we use what's best for a change?" http://bobkonf.de/2019/en/cfc.html Berlin, March 22 Call for Contributions Deadline: November 23, 2018 You are actively engaged in advanced software engineering methods, implement ambitious architectures and are open to cutting-edge innovation? Attend this conference, meet people that share your goals, and get to know the best software tools and technologies available today. We strive to offer a day full of new experiences and impressions that you can use to immediately improve your daily life as a software developer. If you share our vision and want to contribute, submit a proposal for a talk or tutorial! NOTE: The conference fee will be waived for presenters. Travel expenses will not be covered (for exceptions see "Speaker Grants"). Speaker Grants BOB has Speaker Grants available to support speakers from groups under-represented in technology. We specifically seek women speakers and speakers who are not be able to attend the conference for financial reasons. Shepherding The program committee offers shepherding to all speakers. Shepherding provides speakers assistance with preparing their sessions, as well as a review of the talk slides. Topics ------ We are looking for talks about best-of-breed software technology, e.g.: - functional programming - persistent data structures and databases - types - formal methods for correctness and robustness - abstractions for concurrency and parallelism - metaprogramming - probabilistic programming - math and programming - controlled side effects - beyond REST and SOAP - effective abstractions for data analytics - ... everything really that isn?t mainstream, but you think should be. Presenters should provide the audience with information that is practically useful for software developers. We're especially interested in experience reports. Other topics are also relevant, e.g.: - introductory talks on technical background - overviews of a given field - demos and how-tos Requirements ------------- We accept proposals for presentations of 45 minutes (40 minutes talk + 5 minutes questions), as well as 90 minute tutorials for beginners. The language of presentation should be either English or German. Your proposal should include (in your presentation language of choice): - An abstract of max. 1500 characters. - A short bio/cv - Contact information (including at least email address) - A list of 3-5 concrete ideas of how your work can be applied in a developer's daily life - additional material (websites, blogs, slides, videos of past presentations, ?) Submit here: https://bobcfc.active-group.de/en/bob2019/cfp Organisation ------------ - Direct questions to contact at bobkonf dot de - Proposal deadline: November 23, 2018 - Notification: December 7, 2018 - Program: December 21, 2018 Program Committee ----------------- (more information here: http://bobkonf.de/2019/en/programmkomitee.html) - Matthias Fischmann, zerobuzz UG - Matthias Neubauer, SICK AG - Nicole Rauch, Softwareentwicklung und Entwicklungscoaching - Michael Sperber, Active Group - Stefan Wehr, factis research Scientific Advisory Board - Annette Bieniusa, TU Kaiserslautern - Torsten Grust, Uni T?bingen - Peter Thiemann, Uni Freiburg From hans@REDACTED Fri Nov 16 09:54:03 2018 From: hans@REDACTED (Hans Nilsson) Date: Fri, 16 Nov 2018 09:54:03 +0100 Subject: [erlang-questions] Patch Package OTP 20.3.8.14 Released Message-ID: <20181116085403.GA95532@duper.otp.ericsson.se> Patch Package: OTP 20.3.8.14 Git Tag: OTP-20.3.8.14 Date: 2018-11-15 Trouble Report Id: OTP-15413 Seq num: System: OTP Release: 20 Application: ssh-4.6.9.2 Predecessor: OTP 20.3.8.13 Check out the git tag OTP-20.3.8.14, 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.9.2 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssh-4.6.9.2 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-15413 Application(s): ssh Incompatibility with newer OpenSSH fixed. Previously versions 7.8 and later could cause Erlang SSH to exit. Full runtime dependencies of ssh-4.6.9.2: crypto-4.2, erts-6.0, kernel-3.0, public_key-1.5.2, stdlib-3.3 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- From nicolas@REDACTED Fri Nov 16 11:05:52 2018 From: nicolas@REDACTED (Nicolas Niclausse) Date: Fri, 16 Nov 2018 11:05:52 +0100 Subject: [erlang-questions] ssh session_channel failure on recent versions of erlang Message-ID: Hello I'm having some troubles to start a session_channel to a ssh server after a migration from erlang 17.3 to 19.2 (debian stretch) the connect is working : > {ok, CM} = ssh:connect("gw",22, [{user, "xxxx"},{password, "yyyy"}]), {ok,<0.100.0>} but the session_channel fails: 7> {ok, Channel} = ssh_connection:session_channel(CM, 10000). ** exception error: no match of right hand side value {open_error,4,"Channel open failed",<<"en">>} i tried on erlang 21.1, same problem. everything works with 17.3 the ssh server is an old ExtremeNetwork router ( identified by "SSH-2.0-4.1.2 SSH Secure Shell Toolkit" ) any idea ? -- Nicolas Niclausse From john@REDACTED Fri Nov 16 12:56:02 2018 From: john@REDACTED (John =?ISO-8859-1?Q?H=F6gberg?=) Date: Fri, 16 Nov 2018 12:56:02 +0100 Subject: [erlang-questions] Patch Package OTP 21.1.2 Released Message-ID: <1542369362.1108.60.camel@erlang.org> Patch Package:???????????OTP 21.1.2 Git Tag:?????????????????OTP-21.1.2 Date:????????????????????2018-11-16 Trouble Report Id:???????OTP-15353, OTP-15367, OTP-15421 Seq num:?????????????????ERL-753 System:??????????????????OTP Release:?????????????????21 Application:?????????????compiler-7.2.7, erts-10.1.2, public_key-1.6.3 Predecessor:?????????????OTP 21.1.1 ?Check out the git tag OTP-21.1.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. ?--------------------------------------------------------------------- ?--- compiler-7.2.7 -------------------------------------------------- ?--------------------------------------------------------------------- ?The compiler-7.2.7 application can be applied independently of other ?applications on a full OTP 21 installation. ?--- Fixed Bugs and Malfunctions --- ? OTP-15353????Application(s): compiler ???????????????Related Id(s): ERL-753 ???????????????Fixed a bug where incorrect code was generated ???????????????following a binary match guard. ?Full runtime dependencies of compiler-7.2.7: crypto-3.6, erts-9.0, ?hipe-3.12, kernel-4.0, stdlib-2.5 ?--------------------------------------------------------------------- ?--- erts-10.1.2 ----------------------------------------------------- ?--------------------------------------------------------------------- ?Note! The erts-10.1.2 application can *not* be applied independently ???????of other applications on an arbitrary OTP 21 installation. ???????On a full OTP 21 installation, also the following runtime ???????dependency has to be satisfied: ???????-- kernel-6.1 (first satisfied in OTP 21.1) ?--- Fixed Bugs and Malfunctions --- ? OTP-15421????Application(s): erts ???????????????Fixed a rare bug where files could be closed on a ???????????????normal instead of an IO scheduler, resulting in system ???????????????instability if the operation blocked. ?Full runtime dependencies of erts-10.1.2: kernel-6.1, sasl-3.0.1, ?stdlib-3.5 ?--------------------------------------------------------------------- ?--- public_key-1.6.3 ------------------------------------------------ ?--------------------------------------------------------------------- ?The public_key-1.6.3 application can be applied independently of ?other applications on a full OTP 21 installation. ?--- Fixed Bugs and Malfunctions --- ? OTP-15367????Application(s): public_key ???????????????Add DSA SHA2 oids in public_keys ASN1-spec and ???????????????public_key:pkix_sign_types/1 ?Full runtime dependencies of public_key-1.6.3: asn1-3.0, crypto-3.8, ?erts-6.0, kernel-3.0, stdlib-3.5 ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- From kenji@REDACTED Fri Nov 16 13:50:14 2018 From: kenji@REDACTED (Kenji Rikitake) Date: Fri, 16 Nov 2018 21:50:14 +0900 Subject: [erlang-questions] observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have color scheme issues Message-ID: observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have some color scheme issues. Anyone knows how to solve this? My compile option: -O3 -fstack-protector-strong --enable-m64-build --enable-darwin-64bit --enable-hipe --enable-vm-probes --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll --enable-dirty-schedulers --enable-sharing-preserving --enable-lock-counter --disable-sctp --without-javac --without-odbc --enable-threads --enable-smp-support --with-wx --with-ssl=/usr/local/opt/openssl@REDACTED --disable-silent-rules --disable-dynamic-ssl-lib clang --version output: Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin With HomeBrew wxmac: brew info wxmac wxmac: stable 3.0.4 (bottled), HEAD Cross-platform C++ GUI toolkit (wxWidgets for macOS) https://www.wxwidgets.org /usr/local/Cellar/wxmac/3.0.4_1 (813 files, 23.8MB) * Poured from bottle on 2018-08-06 at 22:02:45 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxmac.rb The X11 versions are working OK, so I think this is a macOS Dark Mode specific issue. Regards, Kenji Rikitake -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenji@REDACTED Fri Nov 16 13:52:38 2018 From: kenji@REDACTED (Kenji Rikitake) Date: Fri, 16 Nov 2018 21:52:38 +0900 Subject: [erlang-questions] observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have color scheme issues In-Reply-To: References: Message-ID: OTP version: 21.1.2 from GitHub. On Fri, Nov 16, 2018 at 9:50 PM Kenji Rikitake wrote: > observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have some color > scheme issues. > Anyone knows how to solve this? > > My compile option: > -O3 -fstack-protector-strong > --enable-m64-build --enable-darwin-64bit --enable-hipe --enable-vm-probes > --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll > --enable-dirty-schedulers --enable-sharing-preserving --enable-lock-counter > --disable-sctp --without-javac --without-odbc --enable-threads > --enable-smp-support --with-wx --with-ssl=/usr/local/opt/openssl@REDACTED > --disable-silent-rules --disable-dynamic-ssl-lib > > clang --version output: > Apple LLVM version 10.0.0 (clang-1000.11.45.5) > Target: x86_64-apple-darwin18.2.0 > Thread model: posix > InstalledDir: > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin > > With HomeBrew wxmac: > brew info wxmac > wxmac: stable 3.0.4 (bottled), HEAD > Cross-platform C++ GUI toolkit (wxWidgets for macOS) > https://www.wxwidgets.org > /usr/local/Cellar/wxmac/3.0.4_1 (813 files, 23.8MB) * > Poured from bottle on 2018-08-06 at 22:02:45 > From: > https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxmac.rb > > The X11 versions are working OK, so I think this is a macOS Dark Mode > specific issue. > > Regards, > Kenji Rikitake > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dangud@REDACTED Fri Nov 16 14:20:22 2018 From: dangud@REDACTED (Dan Gudmundsson) Date: Fri, 16 Nov 2018 14:20:22 +0100 Subject: [erlang-questions] observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have color scheme issues In-Reply-To: References: Message-ID: Try compiling wxwidgets from their master branch, I know they have been working on it But have not tested it yet so I don't know how far they have come. I guess observer needs some patches too. On Fri, Nov 16, 2018 at 1:52 PM Kenji Rikitake wrote: > OTP version: 21.1.2 from GitHub. > > On Fri, Nov 16, 2018 at 9:50 PM Kenji Rikitake wrote: > >> observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have some color >> scheme issues. >> Anyone knows how to solve this? >> >> My compile option: >> -O3 -fstack-protector-strong >> --enable-m64-build --enable-darwin-64bit --enable-hipe --enable-vm-probes >> --with-dynamic-trace=dtrace --disable-native-libs --enable-kernel-poll >> --enable-dirty-schedulers --enable-sharing-preserving --enable-lock-counter >> --disable-sctp --without-javac --without-odbc --enable-threads >> --enable-smp-support --with-wx --with-ssl=/usr/local/opt/openssl@REDACTED >> --disable-silent-rules --disable-dynamic-ssl-lib >> >> clang --version output: >> Apple LLVM version 10.0.0 (clang-1000.11.45.5) >> Target: x86_64-apple-darwin18.2.0 >> Thread model: posix >> InstalledDir: >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin >> >> With HomeBrew wxmac: >> brew info wxmac >> wxmac: stable 3.0.4 (bottled), HEAD >> Cross-platform C++ GUI toolkit (wxWidgets for macOS) >> https://www.wxwidgets.org >> /usr/local/Cellar/wxmac/3.0.4_1 (813 files, 23.8MB) * >> Poured from bottle on 2018-08-06 at 22:02:45 >> From: >> https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxmac.rb >> >> The X11 versions are working OK, so I think this is a macOS Dark Mode >> specific issue. >> >> Regards, >> Kenji Rikitake >> > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noah@REDACTED Fri Nov 16 14:41:23 2018 From: noah@REDACTED (Noah Silverman) Date: Fri, 16 Nov 2018 13:41:23 +0000 Subject: [erlang-questions] Multiple websocket subscribers to Kafka topic using Cowboy and Brod Message-ID: Hi, I'm building an application where people can use websocket connections to receive streaming data from Kafka topics.? Currently, I use Cowboy 2.5 to manage the websockets.? It works great! However, I can only have ONE websocket subscribe to a Kafka topic using brod.? When The second person connects and subscribes, brod returns an error: {error,{already_subscribed_by,<0.1374.0>}} In the Cowboy websocket handler, I handle subscription requests with a simple brod subscribe call: brod:subscribe(api_brod_client, self(), Topic, 0, []) Perhaps that's not the optimal way. I did read that brod has a higher level call:? brod_topic_subscriber:start_link.? However, that wants a module it can callback with an init.? Since there is already a websocket process running from Cowboy, I don't want broad to start it again. does anybody know of a simple way to have each websocket process just subscribe to the Kafka topic.? The brod_topic_subscriber might work, if there is a way to just feed the mssages back to the cowboy process calling it. Thoughts? -- Noah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: publickey - noah@REDACTED - 0xBCEFA873.asc Type: application/pgp-keys Size: 3136 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 855 bytes Desc: OpenPGP digital signature URL: From gfborn@REDACTED Fri Nov 16 14:57:51 2018 From: gfborn@REDACTED (Grigory Fateyev) Date: Fri, 16 Nov 2018 16:57:51 +0300 Subject: [erlang-questions] Multiple websocket subscribers to Kafka topic using Cowboy and Brod In-Reply-To: References: Message-ID: Hello, Noah! I'm not sure about brod, but I think the first arg of brod:subscribe/5 [1] should be dynamic and a unique per client. It can be username or user id. [1]: https://github.com/klarna/brod/blob/master/src/brod.erl#L602 ??, 16 ????. 2018 ?. ? 16:41, Noah Silverman : > Hi, > > I'm building an application where people can use websocket connections to > receive streaming data from Kafka topics. > > Currently, I use Cowboy 2.5 to manage the websockets. It works great! > > However, I can only have ONE websocket subscribe to a Kafka topic using > brod. When The second person connects and subscribes, brod returns an > error: {error,{already_subscribed_by,<0.1374.0>}} > > In the Cowboy websocket handler, I handle subscription requests with a > simple brod subscribe call: > brod:subscribe(api_brod_client, self(), Topic, 0, []) > > > Perhaps that's not the optimal way. > > I did read that brod has a higher level call: > brod_topic_subscriber:start_link. However, that wants a module it can > callback with an init. Since there is already a websocket process running > from Cowboy, I don't want broad to start it again. > > does anybody know of a simple way to have each websocket process just > subscribe to the Kafka topic. The brod_topic_subscriber might work, if > there is a way to just feed the mssages back to the cowboy process calling > it. > > Thoughts? > > -- > Noah > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cean.ebengt@REDACTED Fri Nov 16 23:06:46 2018 From: cean.ebengt@REDACTED (bengt) Date: Fri, 16 Nov 2018 23:06:46 +0100 Subject: [erlang-questions] Documentation error ? Message-ID: Greetings, I read http://www1.erlang.org/doc/man/httpc.html and found this under request/5 Types: option() = {sync, boolean()} | {stream, stream_to()} | {body_format, body_format()} | {full_result, boolean()} | {headers_as_is, boolean() | {socket_opts, socket_opts()} | {receiver, receiver()}, {ipv6_host_with_brackets, boolean()}} I think that the ?}? at the end should be moved after '{headers_as_is, boolean()? instead. Or? Best Wishes, bengt -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenji@REDACTED Sat Nov 17 07:44:05 2018 From: kenji@REDACTED (Kenji Rikitake) Date: Sat, 17 Nov 2018 15:44:05 +0900 Subject: [erlang-questions] observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have color scheme issues In-Reply-To: References: Message-ID: Thanks Dan. I've tested the HEAD build of HomeBrew wxmac (successfully built), but unable to link it. I'll check this out again later. -- Kenji Rikitake On Fri, Nov 16, 2018 at 10:20 PM Dan Gudmundsson wrote: > Try compiling wxwidgets from their master branch, I know they have been > working on it > But have not tested it yet so I don't know how far they have come. > I guess observer needs some patches too. > > On Fri, Nov 16, 2018 at 1:52 PM Kenji Rikitake wrote: > >> OTP version: 21.1.2 from GitHub. >> >> On Fri, Nov 16, 2018 at 9:50 PM Kenji Rikitake wrote: >> >>> observer/wx for macOS 10.14 Mojave Dark Mode with wxmac have some color >>> scheme issues. >>> Anyone knows how to solve this? >>> >>> My compile option: >>> -O3 -fstack-protector-strong >>> --enable-m64-build --enable-darwin-64bit --enable-hipe >>> --enable-vm-probes --with-dynamic-trace=dtrace --disable-native-libs >>> --enable-kernel-poll --enable-dirty-schedulers --enable-sharing-preserving >>> --enable-lock-counter --disable-sctp --without-javac --without-odbc >>> --enable-threads --enable-smp-support --with-wx >>> --with-ssl=/usr/local/opt/openssl@REDACTED --disable-silent-rules >>> --disable-dynamic-ssl-lib >>> >>> clang --version output: >>> Apple LLVM version 10.0.0 (clang-1000.11.45.5) >>> Target: x86_64-apple-darwin18.2.0 >>> Thread model: posix >>> InstalledDir: >>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin >>> >>> With HomeBrew wxmac: >>> brew info wxmac >>> wxmac: stable 3.0.4 (bottled), HEAD >>> Cross-platform C++ GUI toolkit (wxWidgets for macOS) >>> https://www.wxwidgets.org >>> /usr/local/Cellar/wxmac/3.0.4_1 (813 files, 23.8MB) * >>> Poured from bottle on 2018-08-06 at 22:02:45 >>> From: >>> https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxmac.rb >>> >>> The X11 versions are working OK, so I think this is a macOS Dark Mode >>> specific issue. >>> >>> Regards, >>> Kenji Rikitake >>> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silviu.cpp@REDACTED Sat Nov 17 22:21:01 2018 From: silviu.cpp@REDACTED (Caragea Silviu) Date: Sat, 17 Nov 2018 23:21:01 +0200 Subject: [erlang-questions] rebar3 and Coverage log Message-ID: Hello, When running rebar ct with {cover_enabled, true}. Inside the "Coverage log" page I can see the coverage results with a nice look. After migrating to rebar3 I see that beside cover_enabled I need to add as well {cover_export_enabled, true}, but the results are in a separate folder cover\index.html and this one looks very crappy. "Coverage log" form the page where tests are listed shows "Cover tool is not used " .. My rebar.config has: {cover_enabled, true}. {cover_export_enabled, true}. {relx, [ {release, {myapp, "1.0" }, [myapp]}, {sys_config, "sys.config"}, {vm_args, "vm.args"}, {dev_mode, true}, {include_erts, false}, {extended_start_script, true} ]}. {profiles, [ {release, [ {relx, [ {sys_config, "sys.config"}, {vm_args, "vm.args"}, {dev_mode, false}, {include_erts, true} ]} ]}, {test, [ {erl_opts, [debug_info, {d, 'common_test'}]}, {ct_opts, [ {spec, "test/cover.spec"}, {sys_config, ["sys.config"]} ]} ]} ]}. And inside test\cover.spec I have: {level, details}. {incl_dirs, [ "_build/test/lib/myapp/ebin" ]}. {excl_mods, [ profiling, test ]}. I'm missing something or "Coverage log" is not longer working with rebar3 ? Silviu -------------- next part -------------- An HTML attachment was scrubbed... URL: From mononcqc@REDACTED Sat Nov 17 22:40:06 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Sat, 17 Nov 2018 16:40:06 -0500 Subject: [erlang-questions] rebar3 and Coverage log In-Reply-To: References: Message-ID: <20181117214006.GB17991@ferdmbp.local> On 11/17, Caragea Silviu wrote: >Hello, > >When running rebar ct with {cover_enabled, true}. Inside the "Coverage log" >page I can see the coverage results with a nice look. > >After migrating to rebar3 I see that beside cover_enabled I need to add as >well {cover_export_enabled, true}, but the results are in a separate folder >cover\index.html and this one looks very crappy. > >"Coverage log" form the page where tests are listed shows "Cover tool is >not used " .. > > ... > >I'm missing something or "Coverage log" is not longer working with rebar3 ? > >Silviu In rebar3, the default coverage tool used is the `cover` library itself. Rather than tunneling the feature through Common Test (as rebar did it, and how CT handles it), rebar3 stores a bunch of intermediary log covers for each tool. By default, eunit and CT are covered that way, but external providers such as https://github.com/ferd/rebar3_proper can also use the same tool. The final result is that you can now aggregate the coverage from all tools at once: `rebar3 do eunit -c, ct -c, proper -c, cover` will give you the coverage of your code from all tools bundled together. If you call `cover` as a task explicitly, you won't need to add `cover_export_enabled` as an option. One thing most of my projects have is an alias task such as: {alias, [ {check, [xref, dialyzer, edoc, {proper, "--regressions"}, {proper, "-c"}, {ct, "-c"}, {cover, "-v --min_coverage=80"} ]} ]}. (taken from https://github.com/ferd/flatlog) This runs xref, dialyzer, checks that the doc can build, runs all test frameworks, and outputs coverage. By isolating the cover reporting into its own task, we also were able to add further checks like `--min_coverage=$PERCENTAGE` which fails the build if too little test coverage is given. The reporting is now uglier (because that's what the cover library exports), but it is more composable when using multiple test frameworks, and we're able to add interesting checks. The whole sequence is callable as `rebar3 check` and off you go. Hopefully this kind of stuff helps cope with the uglier coverage analysis reports :) Regards, Fred. From max.lapshin@REDACTED Sun Nov 18 13:19:01 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Sun, 18 Nov 2018 15:19:01 +0300 Subject: [erlang-questions] cowboy migration smooth path Message-ID: Hi! We are using cowboy 1.0 and it seems that we should start migration to cowboy 2.0 I'm really afraid to make this jump, so want to discuss smooth migration path. Maybe I should first migrate ranch or cowlib, leaving old cowboy? Looks that it may be a good idea to use following migrate path: 1) upgrade to latest cowboy 1.X, cowlib, ranch 2) then switch to cowboy 2.X will it work? -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Sun Nov 18 13:40:12 2018 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Sun, 18 Nov 2018 13:40:12 +0100 Subject: [erlang-questions] cowboy migration smooth path In-Reply-To: References: Message-ID: <656ba93b-a0b2-e366-8920-c7ca586b3c6a@ninenines.eu> Hello, Upgrading just Ranch, no problem. Upgrading just Cowlib, I'm not sure, some things might have changed enough to cause issues when Cowlib 2.0 was released. I would recommend upgrading Cowboy and Cowlib at the same time, Cowboy releases tend to need a Cowlib update anyway. Cowboy 2.6 will be released tomorrow, so I would wait for that as well. In my experience updating a code base to use Cowboy 2 is fairly easy, you mostly need to remove some unnecessary stuff or to convert lists of key/values to maps. As always, test and measure. Cheers, On 11/18/18 1:19 PM, Max Lapshin wrote: > Hi! > > We are using cowboy 1.0 and it seems that we should start migration to > cowboy 2.0 > > I'm really afraid to make this jump, so want to discuss smooth migration > path. > > Maybe I should first migrate ranch or cowlib, leaving old cowboy? > > > Looks that it may be a good idea to use following migrate path: > > 1) upgrade to latest cowboy 1.X,? cowlib, ranch > 2) then switch to cowboy 2.X > > > will it work? > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From vans_163@REDACTED Mon Nov 19 19:44:09 2018 From: vans_163@REDACTED (Vans S) Date: Mon, 19 Nov 2018 18:44:09 +0000 (UTC) Subject: [erlang-questions] atomic ETS update with a function? References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> Message-ID: <1029151608.3394079.1542653049696@mail.yahoo.com> Currently there is no atomic function to update a ETS value when its not a tuple.? For example if one of my ETS values is a map, and I want to put an element into the map, I have no atomic way to do so. Is there anyone else that really has a need for a function like :ets.update/3 where arg 1 is ets_table, 2 is key, 3 is fun callback that is called passing the original element and the reply should be the new element? -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang.org@REDACTED Tue Nov 20 00:22:09 2018 From: erlang.org@REDACTED (Stanislaw Klekot) Date: Tue, 20 Nov 2018 00:22:09 +0100 Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: <1029151608.3394079.1542653049696@mail.yahoo.com> References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> Message-ID: <20181119232209.GA1448@jarowit.net> On Mon, Nov 19, 2018 at 06:44:09PM +0000, Vans S wrote: > Currently there is no atomic function to update a ETS value when its not a tuple.? For example if one of my ETS values is a map, and I want to put an element into the map, I have no atomic way to do so. My guess is that there's no function to update non-tuples, because ETS tables can only contain tuples -- or at least documentation doesn't say otherwise. Or did I get your question wrong? -- Stanislaw Klekot From hachreak@REDACTED Tue Nov 20 10:26:33 2018 From: hachreak@REDACTED (Leo) Date: Tue, 20 Nov 2018 10:26:33 +0100 Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: <20181119232209.GA1448@jarowit.net> References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> <20181119232209.GA1448@jarowit.net> Message-ID: Il giorno mar 20 nov 2018 alle ore 00:22 Stanislaw Klekot < erlang.org@REDACTED> ha scritto: > On Mon, Nov 19, 2018 at 06:44:09PM +0000, Vans S wrote: > > Currently there is no atomic function to update a ETS value when its not > a tuple. For example if one of my ETS values is a map, and I want to put > an element into the map, I have no atomic way to do so. > > My guess is that there's no function to update non-tuples, because ETS > tables can only contain tuples -- or at least documentation doesn't say > otherwise. Or did I get your question wrong? > Neither using qlc module? Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From garazdawi@REDACTED Tue Nov 20 10:36:10 2018 From: garazdawi@REDACTED (Lukas Larsson) Date: Tue, 20 Nov 2018 10:36:10 +0100 Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: <1029151608.3394079.1542653049696@mail.yahoo.com> References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> Message-ID: Hello, On Mon, Nov 19, 2018 at 7:44 PM Vans S wrote: > Currently there is no atomic function to update a ETS value when its not a > tuple. For example if one of my ETS values is a map, and I want to put an > element into the map, I have no atomic way to do so. > > Is there anyone else that really has a need for a function like > :ets.update/3 where arg 1 is ets_table, 2 is key, 3 is fun callback that is > called passing the original element and the reply should be the new element? > I've long wanted to do this for match specs, it would however be a huge undertaking to implement this. The main problem is what to do if the process runs out of reductions while doing the update. Should it be allowed to continue to run? and thus potentially starve other processes. Should it be preempted? what do we then do with the locks on the ETS table? Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.lapshin@REDACTED Tue Nov 20 10:47:17 2018 From: max.lapshin@REDACTED (Max Lapshin) Date: Tue, 20 Nov 2018 12:47:17 +0300 Subject: [erlang-questions] cowboy migration smooth path In-Reply-To: <656ba93b-a0b2-e366-8920-c7ca586b3c6a@ninenines.eu> References: <656ba93b-a0b2-e366-8920-c7ca586b3c6a@ninenines.eu> Message-ID: Oh, yes. After: {Body, _} = cowboy_req:body(Req) we have written lot of tests =) -------------- next part -------------- An HTML attachment was scrubbed... URL: From vans_163@REDACTED Tue Nov 20 12:12:27 2018 From: vans_163@REDACTED (Vans S) Date: Tue, 20 Nov 2018 11:12:27 +0000 (UTC) Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> Message-ID: <1048970754.3862339.1542712347931@mail.yahoo.com> What are the chances it would run out of reductions? What about drop the update if it runs out of reductions.?? Most use cases I see are putting/removing/merging elements into various collections. Complex business logic should be done outside, then you get inside the lock and simply do a ++, --, :maps.put, :maps.merge, etc. On Tuesday, November 20, 2018, 4:36:22 a.m. EST, Lukas Larsson wrote: Hello, On Mon, Nov 19, 2018 at 7:44 PM Vans S wrote: Currently there is no atomic function to update a ETS value when its not a tuple.? For example if one of my ETS values is a map, and I want to put an element into the map, I have no atomic way to do so. Is there anyone else that really has a need for a function like :ets.update/3 where arg 1 is ets_table, 2 is key, 3 is fun callback that is called passing the original element and the reply should be the new element? I've long wanted to do this for match specs, it would however be a huge undertaking to implement this. The main problem is what to do if the process runs out of reductions while doing the update. Should it be allowed to continue to run? and thus potentially starve other processes.Should it be preempted? what do we then do with the locks on the ETS table? Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From sverker@REDACTED Tue Nov 20 15:05:24 2018 From: sverker@REDACTED (Sverker Eriksson) Date: Tue, 20 Nov 2018 15:05:24 +0100 Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: <1029151608.3394079.1542653049696@mail.yahoo.com> References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> Message-ID: <1542722724.4096.26.camel@erlang.org> You can use ets:select_replace/2 to do an atomic compare-and-swap operation: [Old] = ets:lookup(T, Key), New = update_object(Old), Success = (1 =:= ets:select_replace(T, [{Old, [], [{const, New}]}])), ets:select_replace/2 was introduced in OTP-20. /Sverker On m?n, 2018-11-19 at 18:44 +0000, Vans S wrote: > Currently there is no atomic function to update a ETS value when its not a > tuple.? For example if one of my ETS values is a map, and I want to put an > element into the map, I have no atomic way to do so. > > Is there anyone else that really has a need for a function like :ets.update/3 > where arg 1 is ets_table, 2 is key, 3 is fun callback that is called passing > the original element and the reply should be the new element? > _______________________________________________ > 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 Tue Nov 20 20:03:18 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Tue, 20 Nov 2018 14:03:18 -0500 (EST) Subject: [erlang-questions] Installing kerl Message-ID: <1542740598.763218738@apps.rackspace.com> I'd like to install kerl on my dev system. I can download it fine from GitHub and make it executable: ~$ ls -l kerl -rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl But I need to add to $PATH but find a black hole in my Linux chops and Google sources confusing. I try: ~$ PATH=/home/lloyd/kerl:$PATH ~$ echo $PATH /home/lloyd/kerl:/home/lloyd/.cache/rebar3/bin:/home/lloyd/bin:/home/lloyd/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin Seems to work. Bui my first kerl command fails: ~$ kerl list releases No command 'kerl' found, did you mean: Command 'erl' from package 'erlang-base-hipe' (universe) Command 'erl' from package 'erlang-base' (main) Command 'perl' from package 'perl-base' (main) kerl: command not found Ideally I'd like kerl to be available with every console session. But I don't know how to do that. Please show me the way. Thanks, LRP -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.pailleau@REDACTED Tue Nov 20 20:10:49 2018 From: eric.pailleau@REDACTED (Eric Pailleau) Date: Tue, 20 Nov 2018 20:10:49 +0100 Subject: [erlang-questions] Installing kerl In-Reply-To: <1542740598.763218738@apps.rackspace.com> References: <1542740598.763218738@apps.rackspace.com> Message-ID: export PATH=/home/lloyd/kerl:$PATH Envoy? depuis mon mobile ---- lloyd@REDACTED a ?crit ---- > >I'd like to install kerl on my dev system. > >I can download it fine from GitHub and make it executable: > >~$ ls -l kerl >-rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl > >But I need to add to $PATH but find a black hole in my Linux chops and Google sources confusing. > >I try: > >~$ PATH=/home/lloyd/kerl:$PATH >~$ echo $PATH >/home/lloyd/kerl:/home/lloyd/.cache/rebar3/bin:/home/lloyd/bin:/home/lloyd/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin > >Seems to work. Bui my first kerl command fails: > >~$ kerl list releases >No command 'kerl' found, did you mean: > Command 'erl' from package 'erlang-base-hipe' (universe) > Command 'erl' from package 'erlang-base' (main) > Command 'perl' from package 'perl-base' (main) >kerl: command not found > >Ideally I'd like kerl to be available with every console session. But I don't know how to do that. > >Please show me the way. > >Thanks, > >LRP > > > >_______________________________________________ >erlang-questions mailing list >erlang-questions@REDACTED >http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.pailleau@REDACTED Tue Nov 20 20:17:43 2018 From: eric.pailleau@REDACTED (Eric Pailleau) Date: Tue, 20 Nov 2018 20:17:43 +0100 Subject: [erlang-questions] Installing kerl In-Reply-To: <1542740598.763218738@apps.rackspace.com> References: <1542740598.763218738@apps.rackspace.com> Message-ID: <3tasp248brb8jnm33qi79g1p.1542741463939@email.android.com> To let it available in all your session, add this in your . bashrc or .login... Envoy? depuis mon mobile ---- lloyd@REDACTED a ?crit ---- > >I'd like to install kerl on my dev system. > >I can download it fine from GitHub and make it executable: > >~$ ls -l kerl >-rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl > >But I need to add to $PATH but find a black hole in my Linux chops and Google sources confusing. > >I try: > >~$ PATH=/home/lloyd/kerl:$PATH >~$ echo $PATH >/home/lloyd/kerl:/home/lloyd/.cache/rebar3/bin:/home/lloyd/bin:/home/lloyd/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin > >Seems to work. Bui my first kerl command fails: > >~$ kerl list releases >No command 'kerl' found, did you mean: > Command 'erl' from package 'erlang-base-hipe' (universe) > Command 'erl' from package 'erlang-base' (main) > Command 'perl' from package 'perl-base' (main) >kerl: command not found > >Ideally I'd like kerl to be available with every console session. But I don't know how to do that. > >Please show me the way. > >Thanks, > >LRP > > > >_______________________________________________ >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 Tue Nov 20 20:18:07 2018 From: vans_163@REDACTED (Vans S) Date: Tue, 20 Nov 2018 19:18:07 +0000 (UTC) Subject: [erlang-questions] atomic ETS update with a function? In-Reply-To: <1542722724.4096.26.camel@erlang.org> References: <1029151608.3394079.1542653049696.ref@mail.yahoo.com> <1029151608.3394079.1542653049696@mail.yahoo.com> <1542722724.4096.26.camel@erlang.org> Message-ID: <373159909.4165830.1542741487202@mail.yahoo.com> Interesting use for select_replace, I think I see. If Old changes in the meantime, it wont succeed as Old wont be found. I am aware of select_replace, did not realise you could use it this way. Nifty! On Tuesday, November 20, 2018, 9:16:04 a.m. EST, Sverker Eriksson wrote: You can use ets:select_replace/2 to do an atomic compare-and-swap operation: [Old] = ets:lookup(T, Key),New = update_object(Old),Success = (1 =:= ets:select_replace(T, [{Old, [], [{const, New}]}])), ets:select_replace/2 was introduced in OTP-20. /Sverker On m?n, 2018-11-19 at 18:44 +0000, Vans S wrote: Currently there is no atomic function to update a ETS value when its not a tuple.? For example if one of my ETS values is a map, and I want to put an element into the map, I have no atomic way to do so. Is there anyone else that really has a need for a function like :ets.update/3 where arg 1 is ets_table, 2 is key, 3 is fun callback that is called passing the original element and the reply should be the new element?_______________________________________________ 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 2QdxY4RzWzUUiLuE@REDACTED Tue Nov 20 20:22:16 2018 From: 2QdxY4RzWzUUiLuE@REDACTED (Dan Sommers) Date: Tue, 20 Nov 2018 14:22:16 -0500 Subject: [erlang-questions] Installing kerl In-Reply-To: <1542740598.763218738@apps.rackspace.com> References: <1542740598.763218738@apps.rackspace.com> Message-ID: On 11/20/18 2:03 PM, lloyd@REDACTED wrote: > > I'd like to install kerl on my dev system. > > I can download it fine from GitHub and make it executable: > > ~$ ls -l kerl > -rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl PATH contains *directories*, not actual executables. To let your shell find it, add $HOME to PATH. That said, it'd be better to copy that executable to a more suitable directory. It appears that $HOME/bin is already on PATH; use that: $ cp $HOME/kerl $HOME/bin/ And then see how it goes. From lloyd@REDACTED Tue Nov 20 22:29:44 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Tue, 20 Nov 2018 16:29:44 -0500 (EST) Subject: [erlang-questions] Installing kerl In-Reply-To: References: <1542740598.763218738@apps.rackspace.com> Message-ID: <1542749384.619930185@apps.rackspace.com> Thanks guys! Dan, that did the trick! ~$ cp $HOME/kerl $HOME/bin/ :~$ kerl list releases R10B-0 R10B-10 R10B-1a R10B-2 ... Eriic, I'd already tried your solution, but tried it again. ~$ export PATH=/home/lloyd/kerl:$PATH ~$ kerl list releases No command 'kerl' found, did you mean: Command 'perl' from package 'perl-base' (main) Command 'erl' from package 'erlang-base-hipe' (universe) Command 'erl' from package 'erlang-base' (main) kerl: command not found I'm grateful to you both for sharing your knowledge. All the best Lloyd -----Original Message----- From: "Dan Sommers" <2QdxY4RzWzUUiLuE@REDACTED> Sent: Tuesday, November 20, 2018 2:22pm To: erlang-questions@REDACTED Subject: Re: [erlang-questions] Installing kerl On 11/20/18 2:03 PM, lloyd@REDACTED wrote: > > I'd like to install kerl on my dev system. > > I can download it fine from GitHub and make it executable: > > ~$ ls -l kerl > -rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl PATH contains *directories*, not actual executables. To let your shell find it, add $HOME to PATH. That said, it'd be better to copy that executable to a more suitable directory. It appears that $HOME/bin is already on PATH; use that: $ cp $HOME/kerl $HOME/bin/ And then see how it goes. _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.pailleau@REDACTED Tue Nov 20 23:01:48 2018 From: eric.pailleau@REDACTED (Eric Pailleau) Date: Tue, 20 Nov 2018 23:01:48 +0100 Subject: [erlang-questions] Installing kerl In-Reply-To: <1542749384.619930185@apps.rackspace.com> References: <1542740598.763218738@apps.rackspace.com> <1542749384.619930185@apps.rackspace.com> Message-ID: <7seh5rus21ur245166ur5unh.1542751308423@email.android.com> Lloyd, PATH need a list of directories to search in. export PATH=/home/lloyd/:$PATH And not export PATH=/home/lloyd/kerl:$PATH Regards Envoy? depuis mon mobile ---- lloyd@REDACTED a ?crit ---- > >Thanks guys! > >Dan, that did the trick! > >~$ cp $HOME/kerl $HOME/bin/ > >:~$ kerl list releases >R10B-0 >R10B-10 >R10B-1a >R10B-2 >... > >Eriic, I'd already tried your solution, but tried it again. > >~$ export PATH=/home/lloyd/kerl:$PATH >~$ kerl list releases >No command 'kerl' found, did you mean: > Command 'perl' from package 'perl-base' (main) > Command 'erl' from package 'erlang-base-hipe' (universe) > Command 'erl' from package 'erlang-base' (main) >kerl: command not found > >I'm grateful to you both for sharing your knowledge. > >All the best > >Lloyd > > > > > > >-----Original Message----- >From: "Dan Sommers" <2QdxY4RzWzUUiLuE@REDACTED> >Sent: Tuesday, November 20, 2018 2:22pm >To: erlang-questions@REDACTED >Subject: Re: [erlang-questions] Installing kerl > > > >On 11/20/18 2:03 PM, lloyd@REDACTED wrote: >> >> I'd like to install kerl on my dev system. >> >> I can download it fine from GitHub and make it executable: >> >> ~$ ls -l kerl >> -rwxrwxr-x 1 lloyd lloyd 66489 Nov 20 13:26 kerl > >PATH contains *directories*, not actual executables. > >To let your shell find it, add $HOME to PATH. > >That said, it'd be better to copy that executable to a more >suitable directory. It appears that $HOME/bin is already on >PATH; use that: > > $ cp $HOME/kerl $HOME/bin/ > >And then see how it goes. >_______________________________________________ >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 lloyd@REDACTED Tue Nov 20 23:37:01 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Tue, 20 Nov 2018 17:37:01 -0500 (EST) Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl Message-ID: <1542753421.4224266@apps.rackspace.com> Hello, We all know that writing software documentation is hard. I tip my hat to all who strive to do it well. My sense is that software docs are living documents ideally drafted through an iterative process that involves several cycles of unwitting users attempting to follow the how-to-install/how-to-use recipes proposed in the documentation followed closely on by doc revision based on user experience. This does lead to a challenge: how much can the doc writer reasonably assume about user knowledge and experience? Assume too much and you frustrate naive but motivated users. Assume to little and you risk frustrating knowledgeable users. I really don't know the best compromise. But it is a concern I believe worthy of discussion and debate. For what it's worth, here's what I ran into when I installed kerl: 1. First roadblock -- my lack of a lowl-level Linux skill, e.g. adding kerl to PATH. Dan Sommers provided the simple solution: $ cp $HOME/kerl $HOME/bin/ Dan's solution worked a charm. Perhap it can be added as an example under the current instruction in kerl docs: "and drop it in your $PATH" 2. When I executed $ kerl build 21.1 I again ran into failure-- needed ncurses library. Took 15 minutes to find the right package name, but the solution was: ~$ sudo apt-get install libncurses-dev 3. Retried $ kerl build 21.1 and it worked but with numerous moans and growns: Building Erlang/OTP 21.1 (21.1), please wait... WARNING: It appears that a required development package 'automake' is not installed. WARNING: It appears that a required development package 'autoconf' is not installed. APPLICATIONS DISABLED (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * jinterface : No Java compiler found * odbc : ODBC library - link check failed APPLICATIONS INFORMATION (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * wx : wxWidgets not found, wx will NOT be usable DOCUMENTATION INFORMATION (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * documentation : * xsltproc is missing. * fop is missing. * xmllint is missing. * The documentation can not be built. Again, it took a bit of time looking up package names to meet the requirements. Given that, the following console commands filled in the blanks: ~$ sudo apt-get install xsltproc ~$ sudo apt-get install libncurses-dev ~$ sudo apt-get install automake ~$ sudo apt-get install autoconf ~$ sudo apt-get install xsltproc ~$ sudo apt-get install fop Some of these package names may be Ubuntu specific, which certainly makes doc drafting more difficult. But it would have saved considerable time and a bit easier on the blood pressure if kerl docs provided forewarning and, even better, a working example. All that said, thanks to the kerl authors for a very useful tool. My next step now is to build the Erlang docs. Best wishes, Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Wed Nov 21 00:27:36 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Tue, 20 Nov 2018 18:27:36 -0500 (EST) Subject: [erlang-questions] Yet another kerl roadblock Message-ID: <1542756456.455110927@apps.rackspace.com> So, following the kerl docs I get through this step: ~/Kerl/21.1$ kerl list installations 21.1 /home/lloyd/Kerl/21.1 Now, the docs say: And at last activate it: $ . /path/to/install/dir/activate I try it: $ ./home/lloyd/Kerl/21.1/activate bash: ./home/lloyd/Kerl/21.1/activate: No such file or directory I look into ...Kerl/21.1: ~$ cd Kerl/21.1 lloyd@REDACTED:~/Kerl/21.1$ ls -l total 40 -rw-rw-r-- 1 lloyd lloyd 3547 Nov 20 17:57 activate -rw-rw-r-- 1 lloyd lloyd 2644 Nov 20 17:57 activate.csh -rw-rw-r-- 1 lloyd lloyd 3061 Nov 20 17:57 activate.fish drwxrwxr-x 2 lloyd lloyd 4096 Nov 20 17:57 bin drwxr-xr-x 8 lloyd lloyd 4096 Nov 20 17:57 erts-10.1 ... Then I try: $ ./Kerl/21.1/activate bash: ./Kerl/21.1/activate: Permission denied I make activate executable (out of a sheer guess) ~/Kerl/21.1$ ls -l total 40 -rwxrwxr-x 1 lloyd lloyd 3547 Nov 20 17:57 activate And try: ~/Kerl/21.1$ ls -l total 40 -rwxrwxr-x 1 lloyd lloyd 3547 Nov 20 17:57 activate ~/Kerl/21.1$ erl -version Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 8.3.5 ~/Kerl/21.1$ cd ~ :~$ erl Erlang/OTP 19 [erts-8.3.5] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] So, the afternoon is gone. Night has dawned. I'm one step away from success, but totally thwarted. Can wiser heads boost me over this big washout in the road? If so, I'll do my best to write some doc language. All the best, Lloyd -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang.org@REDACTED Wed Nov 21 01:01:58 2018 From: erlang.org@REDACTED (Stanislaw Klekot) Date: Wed, 21 Nov 2018 01:01:58 +0100 Subject: [erlang-questions] Yet another kerl roadblock In-Reply-To: <1542756456.455110927@apps.rackspace.com> References: <1542756456.455110927@apps.rackspace.com> Message-ID: <20181121000158.GA14637@jarowit.net> On Tue, Nov 20, 2018 at 06:27:36PM -0500, lloyd@REDACTED wrote: > > So, following the kerl docs I get through this step: > > ~/Kerl/21.1$ kerl list installations > 21.1 /home/lloyd/Kerl/21.1 > > Now, the docs say: > > And at last activate it: > $ . /path/to/install/dir/activate > I try it: > > $ ./home/lloyd/Kerl/21.1/activate > bash: ./home/lloyd/Kerl/21.1/activate: No such file or directory [...] > $ ./Kerl/21.1/activate > bash: ./Kerl/21.1/activate: Permission denied > > I make activate executable (out of a sheer guess) [...] > So, the afternoon is gone. Night has dawned. I'm one step away from success, > but totally thwarted. Could you please start learning how to use your OS on a level suitable to a programmer? This is what impedes you over and over again, not some omissions in documentation, as you implied in another e-mail. A good beginning would be `man bash', "SHELL BUILTIN COMMANDS" section, for now about the "." command Kerl docs said you should use. -- Stanislaw Klekot From lloyd@REDACTED Wed Nov 21 01:18:31 2018 From: lloyd@REDACTED (Lloyd R. Prentice) Date: Tue, 20 Nov 2018 19:18:31 -0500 Subject: [erlang-questions] Yet another kerl roadblock In-Reply-To: <20181121000158.GA14637@jarowit.net> References: <1542756456.455110927@apps.rackspace.com> <20181121000158.GA14637@jarowit.net> Message-ID: <697BB692-81FE-43EE-BE68-4C177DD9444C@writersglen.com> You guys are the best. Now that I should have seen. Blame my aging eyes. Sebastian... I?m not a professional programmer. I?m a writer with a vision trying to build something good. The patient help of folks on this list has been inspiring and deeply appreciated. Mucho gracias, Loyd Sent from my iPad > On Nov 20, 2018, at 7:01 PM, Stanislaw Klekot wrote: > >> On Tue, Nov 20, 2018 at 06:27:36PM -0500, lloyd@REDACTED wrote: >> >> So, following the kerl docs I get through this step: >> >> ~/Kerl/21.1$ kerl list installations >> 21.1 /home/lloyd/Kerl/21.1 >> >> Now, the docs say: >> >> And at last activate it: >> $ . /path/to/install/dir/activate >> I try it: >> >> $ ./home/lloyd/Kerl/21.1/activate >> bash: ./home/lloyd/Kerl/21.1/activate: No such file or directory > [...] >> $ ./Kerl/21.1/activate >> bash: ./Kerl/21.1/activate: Permission denied >> >> I make activate executable (out of a sheer guess) > [...] >> So, the afternoon is gone. Night has dawned. I'm one step away from success, >> but totally thwarted. > > Could you please start learning how to use your OS on a level suitable > to a programmer? This is what impedes you over and over again, not some > omissions in documentation, as you implied in another e-mail. > > A good beginning would be `man bash', "SHELL BUILTIN COMMANDS" section, > for now about the "." command Kerl docs said you should use. > > -- > Stanislaw Klekot From james@REDACTED Wed Nov 21 01:35:47 2018 From: james@REDACTED (James Aimonetti) Date: Wed, 21 Nov 2018 00:35:47 +0000 Subject: [erlang-questions] Yet another kerl roadblock In-Reply-To: <1542756456.455110927@apps.rackspace.com> References: <1542756456.455110927@apps.rackspace.com> Message-ID: <87tvkbz2qo.fsf@2600hz.com> lloyd@REDACTED writes: > So, following the kerl docs I get through this step: > > ~/Kerl/21.1$ kerl list installations > 21.1 /home/lloyd/Kerl/21.1 > > Now, the docs say: > > And at last activate it: > $ . /path/to/install/dir/activate > I try it: > > $ ./home/lloyd/Kerl/21.1/activate > bash: ./home/lloyd/Kerl/21.1/activate: No such file or directory You tried dot-slash while the docs asked you to try dot-space-slash -- James Aimonetti Lead Systems Architect "If Dialyzer don't care, I don't care" 2600HzPDX | http://2600hz.com sip:james@REDACTED tel:415.886.7905 irc:mc_ @ freenode From mononcqc@REDACTED Wed Nov 21 02:24:05 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Tue, 20 Nov 2018 20:24:05 -0500 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <1542753421.4224266@apps.rackspace.com> References: <1542753421.4224266@apps.rackspace.com> Message-ID: <20181121012405.GE17991@ferdmbp.local> On 11/20, lloyd@REDACTED wrote: > >Hello, > >We all know that writing software documentation is hard. I tip my hat >to all who strive to do it well. > >My sense is that software docs are living documents ideally drafted >through an iterative process that involves several cycles of unwitting >users attempting to follow the how-to-install/how-to-use recipes >proposed in the documentation followed closely on by doc revision based >on user experience. > >This does lead to a challenge: how much can the doc writer reasonably >assume about user knowledge and experience? > Hi Lloyd, I tend to write a decent amount of documentation, and what you state right here is a major hurdle. It's really hard to figure out your target audience, and communicate that clearly. It's equally hard to remember what your system was like before you had installed all the right dependencies, and it's really easy for things to slip from your mind. The thing I rely on to help in such cases is reader questions to highlight the problems I had and the things I forgot. I didn't write the kerl documentation, so that being said, I don't necessarily know who it is targeted to. I know I can read it fine, but I'm no longer a beginner either. >Assume too much and you frustrate naive but motivated users. Assume to >little and you risk frustrating knowledgeable users. I really don't >know the best compromise. But it is a concern I believe worthy of >discussion and debate. > Yes. I think what we are missing as a community is a well-defined "how to install Erlang on your system" style of documentation that is well-visible and maintained. That way, tool developers could point to that document as a foundational step, and people whose setup is complete can easily skip it. >For what it's worth, here's what I ran into when I installed kerl: > >1. First roadblock -- my lack of a lowl-level Linux skill, e.g. adding >kerl to PATH. Dan Sommers provided the simple solution: > >$ cp $HOME/kerl $HOME/bin/ > >Dan's solution worked a charm. Perhap it can be added as an example >under the current instruction in kerl docs: > >"and drop it in your $PATH" > This only works because Dan noticed that `$HOME/bin/` was already in your path. But yes, the `$PATH` environment variable is something the tool author assumed the reader was familiar with. It's an environment variable that contains directories where common executables can be found. Your shell of choice (bash, sh, csh, zsh, etc.) all have a dotfile (.bashrc, .zshrc) where you can do things like export PATH="$HOME/some/path:$PATH" which essentially adds $HOME/some/path to the head of all the paths your shell will look into for executables. >2. When I executed $ kerl build 21.1 I again ran into failure-- needed >ncurses library. Took 15 minutes to find the right package name, but >the solution was: > >~$ sudo apt-get install libncurses-dev > Right. This, at this point, was a missing dependency of Erlang/OTP itself. libncurses is a library used to handle fancy terminal output sequences like those you see when progress bar animations are drawn in the terminal. Libncurses-dev is a package containing the source files to that library so that your own executables can be built against them and also contain that functionality. When compiling software, you will often need to download additional *-dev packages for this reason. >3. Retried $ kerl build 21.1 and it worked but with numerous moans and >growns: > >Building Erlang/OTP 21.1 (21.1), please wait... >WARNING: It appears that a required development package 'automake' is >not installed. >WARNING: It appears that a required development package 'autoconf' is >not installed. >APPLICATIONS DISABLED (See: >/home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * jinterface : No Java compiler found > * odbc : ODBC library - link check failed >APPLICATIONS INFORMATION (See: >/home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * wx : wxWidgets not found, wx will NOT be usable >DOCUMENTATION INFORMATION (See: >/home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * documentation : > * xsltproc is missing. > * fop is missing. > * xmllint is missing. > * The documentation can not be built. > Automake and autoconf are useful to have in general, and it's the kind of thing that trips me up every time I set up a system for the first time, but after that you never need to reinstall it again. It is something I always forget in instructions because unless I do it on a new machine or virtual machine, it never errors out. The other errors are optional dependencies for optional libraries (jinterface lets your erlang talk to java, odbc is a generic database driver for SQL databases, wx is the graphical toolkit that can be used by libraries like observer) and dependencies (xsltproc allows XML processing when building the doc, fop has something to do with PDF generation of the doc, and xmllint is likely XML validation for the docs). Your system should be usable, but if you see a tutorial break when you call `observer:start()`, it will be because of that missing wx dependency. >Some of these package names may be Ubuntu specific, which certainly >makes doc drafting more difficult. But it would have saved considerable >time and a bit easier on the blood pressure if kerl docs provided >forewarning and, even better, a working example. > Exactly; these _are_ ubuntu-specific, and each linux distribution may cut up their packages differently. So documentation writers will tend to just tell you to get a copy from a package manager, which leaves you on your own for kerl. It lets us off the hook for the installation of the system and we handwave all responsibility away. I personally run Windows 10, OSX, a LTS copy of Ubuntu, and a FreeBSD distro on a raspberry pi, and I still avoid some build instructions because you never really know how things end up when distribution maintainers change how things are cut up. Regards, Fred. From lloyd@REDACTED Wed Nov 21 04:13:20 2018 From: lloyd@REDACTED (Lloyd R. Prentice) Date: Tue, 20 Nov 2018 22:13:20 -0500 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <20181121012405.GE17991@ferdmbp.local> References: <1542753421.4224266@apps.rackspace.com> <20181121012405.GE17991@ferdmbp.local> Message-ID: <4905881B-E3ED-49E6-BF0E-A77D11B88096@writersglen.com> Thank you Fred. I?ve much admired your work. > Yes. I think what we are missing as a community is a well-defined "how to install > Erlang on your system" style of documentation that is well-visible and maintained. > That way, tool developers could point to that document as a foundational step, and > people whose setup is complete can easily skip it. Perhaps working together we can make that happen. As you may have noticed, I don?t mind asking Mickey-The -Dunce questions. I?m pushing hard on several fronts to learn what I need to know to bring Writersglen to fruition. And I?ve learned that one of the best ways to learn is to teach. In addition to work on erlpress_core, I?ve been trying to wrap my arms around secure Erlang web deployment. Bringing up a site to serve a ?how to install Erlang on your system" tutorial would be a good learning exercise. Point the way and I?ll do what I can to make this happen. Lloyd Sent from my iPad > On Nov 20, 2018, at 8:24 PM, Fred Hebert wrote: > > Yes. I think what we are missing as a community is a well-defined "how to install Erlang on your system" style of documentation that is well-visible and maintained. That way, tool developers could point to that document as a foundational step, and people whose setup is complete can easily skip it. From ledest@REDACTED Wed Nov 21 01:21:31 2018 From: ledest@REDACTED (Led) Date: Wed, 21 Nov 2018 02:21:31 +0200 Subject: [erlang-questions] Yet another kerl roadblock In-Reply-To: <697BB692-81FE-43EE-BE68-4C177DD9444C@writersglen.com> References: <1542756456.455110927@apps.rackspace.com> <20181121000158.GA14637@jarowit.net> <697BB692-81FE-43EE-BE68-4C177DD9444C@writersglen.com> Message-ID: Your messages look like spam. -- Led. -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Wed Nov 21 12:03:35 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Wed, 21 Nov 2018 12:03:35 +0100 Subject: [erlang-questions] Yet another kerl roadblock In-Reply-To: References: <1542756456.455110927@apps.rackspace.com> <20181121000158.GA14637@jarowit.net> <697BB692-81FE-43EE-BE68-4C177DD9444C@writersglen.com> Message-ID: <20181121110335.GA83118@erix.ericsson.se> On Wed, Nov 21, 2018 at 02:21:31AM +0200, Led wrote: > Your messages look like spam. Who's messages and why do you think that? > > -- > Led. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From ivan@REDACTED Wed Nov 21 12:59:12 2018 From: ivan@REDACTED (Ivan Uemlianin) Date: Wed, 21 Nov 2018 11:59:12 +0000 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <1542753421.4224266@apps.rackspace.com> References: <1542753421.4224266@apps.rackspace.com> Message-ID: <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> Dear Lloyd Kerl is fantastic and I use it a lot, but I have struggled with the documentation like you have (in my case getting it to work on a Mac). Kerl's documentation is very far from the worst for an open-source project.? The only real way to test installation and "getting started" docs is to have someone not involved in the project to install and run the software --- preferably under observation and at a time and place not of their choosing. I now have kerl running happily on a Mac and on Ubuntu.? (Feel free to ping me offline if I can help.) The Unix environment is an ocean in whicha gnat may drink and an elephant may bathe, which does complicate things.? In case you haven't come across it already, I find alias very handy, e.g., I have these lines in my .alias file (or you might have .bash_aliases on Ubuntu): ? ? alias erl18='.? ~/bin/erl_kerl_builds/r183/activate' ??? alias erl20='.? ~/bin/erl_kerl_builds/r203/activate' ??? alias erl21='.? ~/bin/erl_kerl_builds/r210/activate' (That '.' is a synonym for the command 'source'.) So instead of having to type out '. ~/bin/erl_kerl_builds/r210/activate' I can just use erl21. Happy hacking! Ivan On 20/11/2018 22:37, lloyd@REDACTED wrote: > > Hello, > > We all know that writing software documentation is hard. I tip my hat > to all who strive to do it well. > > My sense is that software docs are living documents ideally drafted > through an iterative process that involves several cycles of unwitting > users attempting to follow the how-to-install/how-to-use recipes > proposed in the documentation followed closely on by doc revision > based on user experience. > > This does lead to a challenge: how much can the doc writer reasonably > assume about user knowledge and experience? > > Assume too much and you frustrate naive but motivated users. Assume to > little and you risk frustrating knowledgeable users. I really don't > know the best compromise. But it is a concern I believe worthy of > discussion and debate. > > For what it's worth, here's what I ran into when I installed kerl: > > 1. First roadblock -- my lack of a lowl-level Linux skill, e.g. adding > kerl to PATH. Dan Sommers provided the simple solution: > > $ cp $HOME/kerl $HOME/bin/ > > Dan's solution worked a charm. Perhap it can be added as an example > under the current instruction in kerl docs: > > "and drop it in your $PATH" > > 2. When I executed $ kerl build 21.1 I again ran into failure-- needed > ncurses library. Took 15 minutes to find the right package name, but > the solution was: > > ~$ sudo apt-get install libncurses-dev > > 3. Retried $ kerl build 21.1 and it worked but with numerous moans and > growns: > > Building Erlang/OTP 21.1 (21.1), please wait... > WARNING: It appears that a required development package 'automake' is > not installed. > WARNING: It appears that a required development package 'autoconf' is > not installed. > APPLICATIONS DISABLED (See: > /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * jinterface : No Java compiler found > * odbc : ODBC library - link check failed > > APPLICATIONS INFORMATION (See: > /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * wx : wxWidgets not found, wx will NOT be usable > > DOCUMENTATION INFORMATION (See: > /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) > * documentation : > * xsltproc is missing. > * fop is missing. > * xmllint is missing. > * The documentation can not be built. > > Again,? it took a bit of time looking up package names to meet the > requirements. Given that, the following console commands filled in the > blanks: > > ~$ sudo apt-get install xsltproc > ~$ sudo apt-get install libncurses-dev > ~$ sudo apt-get install automake > ~$ sudo apt-get install autoconf > ~$ sudo apt-get install xsltproc > ~$ sudo apt-get install fop > > Some of these package names may be Ubuntu specific, which certainly > makes doc drafting more difficult. But it would have saved > considerable time and a bit easier on the blood pressure if kerl docs > provided forewarning and, even better, a working example. > > All that said, thanks to the kerl authors for a very useful tool. My > next step now is to build the Erlang docs. > > Best wishes, > > Lloyd > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- ============================================================ Ivan A. Uemlianin PhD Llaisdy Ymchwil a Datblygu Technoleg Lleferydd Speech Technology Research and Development ivan@REDACTED @llaisdy llaisdy.wordpress.com github.com/llaisdy www.linkedin.com/in/ivanuemlianin festina lente ============================================================ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bchesneau@REDACTED Wed Nov 21 14:02:29 2018 From: bchesneau@REDACTED (Benoit Chesneau) Date: Wed, 21 Nov 2018 14:02:29 +0100 Subject: [erlang-questions] [ANN] erlang-rocksdb 0.25.0 is released Message-ID: I just released a new version of erlang-rocksdb 0.25.0 a binding of rocksdb for Erlang. This version support latest version of rocksdb (0.17.2) and brings many new features allowing more control of the database: https://gitlab.com/barrel-db/erlang-rocksdb/tags/0.25.0 Package is also available on hex.pm: https://hex.pm/packages/rocksdb Documentation is on the wiki: https://gitlab.com/barrel-db/erlang-rocksdb/wikis/home Any feedback is welcome :) Enjoy! Beno?t -------------- next part -------------- An HTML attachment was scrubbed... URL: From areege.alzubaidi@REDACTED Wed Nov 21 15:57:17 2018 From: areege.alzubaidi@REDACTED (Areege Al Zubaidi) Date: Wed, 21 Nov 2018 14:57:17 +0000 Subject: [erlang-questions] Code BEAM SF 19 - very early bird tickets have landed! Message-ID: Hi all, It?s Code BEAM SF time! If you?re not already aware, Code BEAM SF is the reincarnation of the much loved Erlang and Elixir Factory San Fransisco, the biggest and best Erlang and Elixir conference in North America. It?s back next February with a host of brilliant speakers and trainers to share, learn, inspire. You can currently get tickets at the lowest very early bird rate , until Monday 26 November! Code BEAM SF offers a OTP, Elixir, Phoenix, and RabbitMQ training courses , as well as a host of talks from leaders and innovators in the community, including: - Jose Valim , author of Elixir, who will be keynoting! - Miriam Pena , voted one of the women to watch in tech by Women 2.0 - Ayanda Dube , RabbitMQ lead - Anna Neyzberg , co-founder of ElixirBridge - Hannah Howard , programmer and life long iconoclast - Marc Sugiyama , experienced Erlang engineer, consultant, and trainer - Jacqui Manzi will join us to share her experience using OTP: presence to power real-time analytics - Lukas Larsson , Erlang VM core committer - Cees de Groot , who will discuss Clixir - mixing C and Elixir code - ? and more! Learn more about the conference, and the 2019 speakers: https://codesync.global/conferences/code-beam-sf-2019/#Speakers What: Code BEAM SF 2019 When: 28 February - 01 March 2019 Where: Hyatt Centric Fisherman?s Wharf, San Francisco How to attend: - Attend the conference Secure a very early bird rate ticket to the conference before Monday 26 November. You can find out more and register here . - Diversity ticket We are pleased to announce that Code BEAM SF 2019 is implementing a diversity scheme . The goal of the programme is to increase diversity of attendees and offer support to those in the tech community who would not otherwise be able to attend the conference. The deadline for applications is 3 February 2019. Recipients will be notified on a rolling basis, no later than 8 February 2019. - Student tickets Code BEAM SF offers a 50% discount to students. To learn more, email info@REDACTED from your academic email address to get a unique discount code. - Sponsor If you want your company to join WhatsApp and support the BEAM community, please do not hesitate to contact us about community support and sponsorship. If you have any further questions, please don?t hesitate to let me know, I hope to see you in San Fran! Areege -- *Areege Al Zubaidi* *Conferences Marketing Executive* T: +44 (0) 2076550332 W: www.codesync.global A: Erlang Solutions Ltd, The Loom,14 Gower's Walk, London, E1 8PY *Code Sync & Erlang Solutions Conferences* Code BEAM Lite - Amsterdam - 30 November 2018 Code BEAM Lite - Munich - 7 December 2018 Lambda Days - Krak?w - 21-22 February 2019 Code BEAM SF - San Francisco - 28 February - 1 March 2019 Code BEAM Lite - Bologna - 22 March 2019 ElixirConf EU - Prague - 8-9 April 2019 Code BEAM STO - Stockholm - 16-17 May 2019 Code Elixir LDN - London - 18 July 2019 Code Mesh LDN - London - 8-9 November 2019 *Erlang Solutions and Code Sync care about your data and privacy; please find all details about the basis for communicating with you and the way we process your data in our Privacy Policy . You can update your email preferences or opt-out from receiving marketing emails here .* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Wed Nov 21 21:02:34 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 21 Nov 2018 15:02:34 -0500 (EST) Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> References: <1542753421.4224266@apps.rackspace.com> <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> Message-ID: <1542830554.05616410@apps.rackspace.com> Thanks for the thoughts and tips, Ivan! Love your quote: "The Unix environment is an ocean in which a gnat may drink and an elephant may bathe" And I would add, "and where a noobie can all too easily flounder around lost at sea." I work alone on many fronts so, beyond the wonderful people on this list, depend upon books and the web as I try to become sufficiently competent in the many tasks required to bring the ambitious web app I've been working on to fruition. Documentation is often a make or break for me when I evaluate an app or tool. If I don't understand it, which happens all too often, it's Sayonara for that app. This is complicated by the fact that as I age I don't retain information as well as I once did. So I've been struggling to develop a format and system for keeping track of all the things I need to know. I hope soon to propose documentation for creating publish source GitHub repositories. If time and energy allow, I'll try to follow it up with a stab at a "Building Erlang on Ubuntu" draft inspired by Fred Hebert's suggestion. I need to understand how to put such documents on the web, so I'll do so as time permits. Thanks again, Lloyd -----Original Message----- From: "Ivan Uemlianin" Sent: Wednesday, November 21, 2018 6:59am To: erlang-questions@REDACTED Subject: Re: [erlang-questions] Documentation -- what I ran into when I installed kerl Dear Lloyd Kerl is fantastic and I use it a lot, but I have struggled with the documentation like you have (in my case getting it to work on a Mac). Kerl's documentation is very far from the worst for an open-source project. The only real way to test installation and "getting started" docs is to have someone not involved in the project to install and run the software --- preferably under observation and at a time and place not of their choosing. I now have kerl running happily on a Mac and on Ubuntu. (Feel free to ping me offline if I can help.) The Unix environment is an ocean in which a gnat may drink and an elephant may bathe, which does complicate things. In case you haven't come across it already, I find alias very handy, e.g., I have these lines in my .alias file (or you might have .bash_aliases on Ubuntu): alias erl18='. ~/bin/erl_kerl_builds/r183/activate' alias erl20='. ~/bin/erl_kerl_builds/r203/activate' alias erl21='. ~/bin/erl_kerl_builds/r210/activate' (That '.' is a synonym for the command 'source'.) So instead of having to type out '. ~/bin/erl_kerl_builds/r210/activate' I can just use erl21. Happy hacking! Ivan On 20/11/2018 22:37, [ lloyd@REDACTED ]( mailto:lloyd@REDACTED ) wrote: Hello, We all know that writing software documentation is hard. I tip my hat to all who strive to do it well. My sense is that software docs are living documents ideally drafted through an iterative process that involves several cycles of unwitting users attempting to follow the how-to-install/how-to-use recipes proposed in the documentation followed closely on by doc revision based on user experience. This does lead to a challenge: how much can the doc writer reasonably assume about user knowledge and experience? Assume too much and you frustrate naive but motivated users. Assume to little and you risk frustrating knowledgeable users. I really don't know the best compromise. But it is a concern I believe worthy of discussion and debate. For what it's worth, here's what I ran into when I installed kerl: 1. First roadblock -- my lack of a lowl-level Linux skill, e.g. adding kerl to PATH. Dan Sommers provided the simple solution: $ cp $HOME/kerl $HOME/bin/ Dan's solution worked a charm. Perhap it can be added as an example under the current instruction in kerl docs: "and drop it in your $PATH" 2. When I executed $ kerl build 21.1 I again ran into failure-- needed ncurses library. Took 15 minutes to find the right package name, but the solution was: ~$ sudo apt-get install libncurses-dev 3. Retried $ kerl build 21.1 and it worked but with numerous moans and growns: Building Erlang/OTP 21.1 (21.1), please wait... WARNING: It appears that a required development package 'automake' is not installed. WARNING: It appears that a required development package 'autoconf' is not installed. APPLICATIONS DISABLED (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * jinterface : No Java compiler found * odbc : ODBC library - link check failed APPLICATIONS INFORMATION (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * wx : wxWidgets not found, wx will NOT be usable DOCUMENTATION INFORMATION (See: /home/lloyd/.kerl/builds/21.1/otp_build_21.1.log) * documentation : * xsltproc is missing. * fop is missing. * xmllint is missing. * The documentation can not be built. Again, it took a bit of time looking up package names to meet the requirements. Given that, the following console commands filled in the blanks: ~$ sudo apt-get install xsltproc ~$ sudo apt-get install libncurses-dev ~$ sudo apt-get install automake ~$ sudo apt-get install autoconf ~$ sudo apt-get install xsltproc ~$ sudo apt-get install fop Some of these package names may be Ubuntu specific, which certainly makes doc drafting more difficult. But it would have saved considerable time and a bit easier on the blood pressure if kerl docs provided forewarning and, even better, a working example. All that said, thanks to the kerl authors for a very useful tool. My next step now is to build the Erlang docs. Best wishes, Lloyd _______________________________________________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 ) -- ============================================================Ivan A. Uemlianin PhDLlaisdyYmchwil a Datblygu Technoleg LleferyddSpeech Technology Research and Development [ ivan@REDACTED ]( mailto:ivan@REDACTED ) @llaisdy llaisdy.wordpress.com github.com/llaisdy [ www.linkedin.com/in/ivanuemlianin ]( http://www.linkedin.com/in/ivanuemlianin ) festina lente============================================================ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mononcqc@REDACTED Wed Nov 21 23:56:55 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Wed, 21 Nov 2018 17:56:55 -0500 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <1542830554.05616410@apps.rackspace.com> References: <1542753421.4224266@apps.rackspace.com> <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> <1542830554.05616410@apps.rackspace.com> Message-ID: <20181121225654.GF17991@ferdmbp.local> On 11/21, lloyd@REDACTED wrote: > >I hope soon to propose documentation for creating publish source GitHub repositories. If time and energy allow, I'll try to follow it up with a stab at a "Building Erlang on Ubuntu" draft inspired by Fred Hebert's suggestion. > >I need to understand how to put such documents on the web, so I'll do so as time permits. > You can start by putting a document on github, which might make it easier for people to send contributions and add content, possibly steps on other frameworks. That might be the lowest overhead solution at least :) From lloyd@REDACTED Thu Nov 22 00:09:48 2018 From: lloyd@REDACTED (lloyd@REDACTED) Date: Wed, 21 Nov 2018 18:09:48 -0500 (EST) Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <20181121225654.GF17991@ferdmbp.local> References: <1542753421.4224266@apps.rackspace.com> <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> <1542830554.05616410@apps.rackspace.com> <20181121225654.GF17991@ferdmbp.local> Message-ID: <1542841788.04273306@apps.rackspace.com> Thanks, Fred, I'll do just that! Best wishes, Lloyd -----Original Message----- From: "Fred Hebert" Sent: Wednesday, November 21, 2018 5:56pm To: lloyd@REDACTED Cc: "Ivan Uemlianin" , erlang-questions@REDACTED Subject: Re: [erlang-questions] Documentation -- what I ran into when I installed kerl On 11/21, lloyd@REDACTED wrote: > >I hope soon to propose documentation for creating publish source GitHub repositories. If time and energy allow, I'll try to follow it up with a stab at a "Building Erlang on Ubuntu" draft inspired by Fred Hebert's suggestion. > >I need to understand how to put such documents on the web, so I'll do so as time permits. > You can start by putting a document on github, which might make it easier for people to send contributions and add content, possibly steps on other frameworks. That might be the lowest overhead solution at least :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From empro2@REDACTED Thu Nov 22 15:10:31 2018 From: empro2@REDACTED (empro2@REDACTED) Date: Thu, 22 Nov 2018 15:10:31 +0100 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <1542830554.05616410@apps.rackspace.com> References: <1542753421.4224266@apps.rackspace.com> <4a3f4e7f-cbc7-b480-f425-d2bfc95b2151@llaisdy.com> <1542830554.05616410@apps.rackspace.com> Message-ID: <20181122151031.5b4224d9@raspy> On Wed, 21 Nov 2018 15:02:34 -0500 (EST) lloyd@REDACTED wrote: > And I would add, "and where a noobie can all too easily > flounder around lost at sea." The one big asset newbies bring is: they do not know what is meant. Those who know how it works often write for those who already know anyway (and only need something to remind them), but their asset is: they know how it works. By the time people have kept track of enough of the things they need to know to write their own, additional, "how to", they have lost (too?) much of their original asset by gaining some of the other. Having been suggested to use git (pull requests) to contribute to the Erlang documentation has made me wonder what the best (or a good) way to combine these two assets could be. Well, I wanted, or needed, or wanted to because I needed to learn git anyway, but is that an efficient way to rephrase some distractingly strange phrase in the docs? or to correct some typo? And I will not start to write up my own documentation on mod_esi, httpd, inets, applications and application controllers, mnesia, match specs, Emacs lisp, git, github, JIRA Agile and all the other things I need to know (and those I am too curious to skip - and that does not kill the cat only ... ;-). That is too much work for a single person, even more so as it is bound to be partially redundant, and: were it not so inefficient, I would hang myself every time I get confused by a piece of my own documentation ;-) Might not be a silver bullet, but as documentation needs to be quickly accessible (for the authors especially!) a wiki might serve well. But it is not that simple and I intend to start some separate thread about more efficient contribution. Hope I keep that intention beyond getting some practice with git, avoiding a github account and a JIRA (or Agile?) account, but I am not yet sure that I know what I am doing and I want to avoid bothering people on this list too much. But I might be already by straying too far from the topic ... Taking from the tone of some previous e-mails in this thread it might not hurt to point out that criticism can be a way of appreciating the loads of good and hard work that went into Erlang, kerl, git, ..., and their documentation too. Criticising can take a lot of time and who would want to waste time on rubbish :-) Intimidated by kerl's power I realised that I did not really need to serve different versions of Erlang/OTP nor to keep up to date (yet?) and was fine with something like $ sudo apt-get install erlang I know kerl is there should I need it, and I hope it will then be easy to contribute to its documentation :-) Michael -- ?Even after a thousand explanations a fool is no wiser, whereas someone intelligent requires only one fourth of these.? ? from the Mah?bh?rata (???????) From john@REDACTED Fri Nov 23 10:09:34 2018 From: john@REDACTED (John =?ISO-8859-1?Q?H=F6gberg?=) Date: Fri, 23 Nov 2018 10:09:34 +0100 Subject: [erlang-questions] Patch Package OTP 21.1.3 Released Message-ID: <1542964174.23700.1.camel@erlang.org> Patch Package:???????????OTP 21.1.3 Git Tag:?????????????????OTP-21.1.3 Date:????????????????????2018-11-23 Trouble Report Id:???????OTP-15430 Seq num:?????????????????ERIERL-237 System:??????????????????OTP Release:?????????????????21 Application:?????????????erts-10.1.3 Predecessor:?????????????OTP 21.1.2 ?Check out the git tag OTP-21.1.3, 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. ?--------------------------------------------------------------------- ?--- erts-10.1.3 ----------------------------------------------------- ?--------------------------------------------------------------------- ?Note! The erts-10.1.3 application can *not* be applied independently ???????of other applications on an arbitrary OTP 21 installation. ???????On a full OTP 21 installation, also the following runtime ???????dependency has to be satisfied: ???????-- kernel-6.1 (first satisfied in OTP 21.1) ?--- Improvements and New Features --- ? OTP-15430????Application(s): erts ???????????????Related Id(s): ERIERL-237 ???????????????Added an optional ./configure flag to compile the ???????????????emulator with spectre mitigation: ???????????????--with-spectre-mitigation ???????????????Note that this requires a recent version of GCC with ???????????????support for spectre mitigation and the ???????????????--mindirect-branch=thunk flag, such as 8.1. ?Full runtime dependencies of erts-10.1.3: kernel-6.1, sasl-3.0.1, ?stdlib-3.5 ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- ?--------------------------------------------------------------------- From silviu.cpp@REDACTED Fri Nov 23 11:26:53 2018 From: silviu.cpp@REDACTED (Caragea Silviu) Date: Fri, 23 Nov 2018 12:26:53 +0200 Subject: [erlang-questions] [ANN] erlang-rocksdb 0.25.0 is released In-Reply-To: References: Message-ID: Hello, Do you have any benchmarks agains https://github.com/leo-project/erocksdb ? Silviu On Wed, Nov 21, 2018 at 3:03 PM Benoit Chesneau wrote: > I just released a new version of erlang-rocksdb 0.25.0 a binding of > rocksdb for Erlang. This version support latest version of rocksdb > (0.17.2) and brings many new features allowing more control of the > database: > > https://gitlab.com/barrel-db/erlang-rocksdb/tags/0.25.0 > > Package is also available on hex.pm: https://hex.pm/packages/rocksdb > > Documentation is on the wiki: > https://gitlab.com/barrel-db/erlang-rocksdb/wikis/home > > > Any feedback is welcome :) > > Enjoy! > > Beno?t > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mononcqc@REDACTED Fri Nov 23 20:07:19 2018 From: mononcqc@REDACTED (Fred Hebert) Date: Fri, 23 Nov 2018 14:07:19 -0500 Subject: [erlang-questions] [ANN] Rebar3 3.7.0 Message-ID: <20181123190718.GG17991@ferdmbp.local> Rebar3 3.7.0 is out, and we have some amazing features to show you! Thanks to work done by Tristan Sloughter (with some backing of the IEUG, which is wokring on a transition towards a big foundation with a name still up in the air), we've got some great stuff to announce: - There's been a complete rework of how Hex packages and their indexes are handled. We now support the Hex v2 protocol, with their concept of private organisations. There is also added support for layered hex indexes, allowing the usage of mirrors and self-hosted indexes in a transparent manner within a project. Documentation: https://www.rebar3.org/v3/docs/configuration#section-hex-repos-and-indexes If you were using the rebar3_hex plugin, you'll need to upgrade it to work with this new version. - The local index cache is now built lazily, meaning Rebar3 should be leaner in its usage of local storage and memory regarding hex, and network lookups should be less frequent. This should help people working towards hermetic builds as well - There's been major rework around custom resource plugins and compilers (old resources and plugins are still working, no worry). This has allowed some real interesting stuff such as Benoit Chesneau's local path dependencies plugin (https://github.com/benoitc/rebar3_path_deps) Documentation (resources): https://www.rebar3.org/v3/docs/custom-dep-resources#section-resources-compatible-with-versions-370-and-above Documentation (compiler plugin): https://www.rebar3.org/v3/docs/custom-compiler-modules - Elixir dependencies are now supported through the rebar_mix plugin (https://github.com/tsloughter/rebar_mix) thanks to these changes! But as if that were not amazing enough, we've also got a few other features, including: - The ability to only compile dependencies, which is useful for docker images (use the --deps_only or -d switches, as described in http://erlware.org/rebar3-building-docker-images/) - Added support for breakpoints to be added in tests (or other arbitrary tasks) to let you debug them in rebar3's shell Documentation: https://www.rebar3.org/v3/docs/using-breakpoints-to-debug-tests - Support for a REBAR_GIT_CLONE_OPTIONS environment variable which lets people set up git caching of repositories for faster fetches across projects when calling it with values such as: REBAR_GIT_CLONE_OPTIONS="--reference ~/.cache/repos.reference" - Support alias commands with namespaces (declared as {Namespace, Cmd} and {Namespace, Cmd, Args} in the alias option). There is also a good bunch of nice bugfixes. You can get the full list at https://github.com/erlang/rebar3/releases/tag/3.7.0 Have a great week-end, and thanks to all the contributors who opened issues and submitted pull requests! - Fred. From sdl.web@REDACTED Sat Nov 24 00:03:50 2018 From: sdl.web@REDACTED (Leo Liu) Date: Fri, 23 Nov 2018 15:03:50 -0800 Subject: [erlang-questions] [ANN] Rebar3 3.7.0 In-Reply-To: <20181123190718.GG17991@ferdmbp.local> (Fred Hebert's message of "Fri, 23 Nov 2018 14:07:19 -0500") References: <20181123190718.GG17991@ferdmbp.local> Message-ID: On 2018-11-23 14:07 -0500, Fred Hebert wrote: > Have a great week-end, and thanks to all the contributors who opened > issues and submitted pull requests! 3.7.0 generates .app files that don't include modules in a sub-directory of src. Is this intentional? Leo From t@REDACTED Sat Nov 24 00:06:34 2018 From: t@REDACTED (Tristan Sloughter) Date: Fri, 23 Nov 2018 16:06:34 -0700 Subject: [erlang-questions] [ANN] Rebar3 3.7.0 In-Reply-To: References: <20181123190718.GG17991@ferdmbp.local> Message-ID: <1543014394.1645159.1587027232.66475336@webmail.messagingengine.com> That is not intentional. Please open an issue and we'll get it fixed. We already release 3.7.1 to resolve an xrl/yrl compilation issue https://github.com/erlang/rebar3/releases/tag/3.7.1 Tristan On Fri, Nov 23, 2018, at 16:03, Leo Liu wrote: > On 2018-11-23 14:07 -0500, Fred Hebert wrote: > > Have a great week-end, and thanks to all the contributors who opened > > issues and submitted pull requests! > > 3.7.0 generates .app files that don't include modules in a sub-directory > of src. Is this intentional? > > Leo > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From t@REDACTED Sat Nov 24 02:13:52 2018 From: t@REDACTED (Tristan Sloughter) Date: Fri, 23 Nov 2018 18:13:52 -0700 Subject: [erlang-questions] [ANN] Rebar3 3.7.0 In-Reply-To: <1543014394.1645159.1587027232.66475336@webmail.messagingengine.com> References: <20181123190718.GG17991@ferdmbp.local> <1543014394.1645159.1587027232.66475336@webmail.messagingengine.com> Message-ID: <1543022032.1671766.1587087680.784DC6C8@webmail.messagingengine.com> Leo, please try 3.7.2 https://github.com/erlang/rebar3/releases/tag/3.7.2 On Fri, Nov 23, 2018, at 16:06, Tristan Sloughter wrote: > That is not intentional. Please open an issue and we'll get it fixed. We > already release 3.7.1 to resolve an xrl/yrl compilation issue > https://github.com/erlang/rebar3/releases/tag/3.7.1 > > Tristan > > On Fri, Nov 23, 2018, at 16:03, Leo Liu wrote: > > On 2018-11-23 14:07 -0500, Fred Hebert wrote: > > > Have a great week-end, and thanks to all the contributors who opened > > > issues and submitted pull requests! > > > > 3.7.0 generates .app files that don't include modules in a sub-directory > > of src. Is this intentional? > > > > Leo > > _______________________________________________ > > 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 sdl.web@REDACTED Sat Nov 24 03:10:13 2018 From: sdl.web@REDACTED (Leo Liu) Date: Fri, 23 Nov 2018 18:10:13 -0800 Subject: [erlang-questions] [ANN] Rebar3 3.7.0 In-Reply-To: <1543022032.1671766.1587087680.784DC6C8@webmail.messagingengine.com> (Tristan Sloughter's message of "Fri, 23 Nov 2018 18:13:52 -0700") References: <20181123190718.GG17991@ferdmbp.local> <1543014394.1645159.1587027232.66475336@webmail.messagingengine.com> <1543022032.1671766.1587087680.784DC6C8@webmail.messagingengine.com> Message-ID: On 2018-11-23 16:06 -0700, Tristan Sloughter wrote: > That is not intentional. Please open an issue and we'll get it fixed. > We already release 3.7.1 to resolve an xrl/yrl compilation issue > https://github.com/erlang/rebar3/releases/tag/3.7.1 > > Tristan Sorry for my late response. Was tied up with a new born. On 2018-11-23 18:13 -0700, Tristan Sloughter wrote: > Leo, please try 3.7.2 https://github.com/erlang/rebar3/releases/tag/3.7.2 It works. Thanks a lot for the quick fix. Leo From vans_163@REDACTED Sun Nov 25 02:29:56 2018 From: vans_163@REDACTED (Vans S) Date: Sun, 25 Nov 2018 01:29:56 +0000 (UTC) Subject: [erlang-questions] profiling erlang beyond fprof? References: <33660695.6115016.1543109396842.ref@mail.yahoo.com> Message-ID: <33660695.6115016.1543109396842@mail.yahoo.com> Hello, ? ? I seem to be having some trouble profiling Erlang. I would really like a simple profiler that counts reductions but fprof gives wall time or CPU time.? I am trying to pin point the biggest bottlenecks and what calls them, but fprof is really lacking iMO.? Its hard to follow the data it gives, and its hard to build a call tree, it gives some overall information but it also includes things like 'suspend', which confuse the output.?? Anyone know some recommendations for profiling reductions, ideally with a call tree. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebegumisa@REDACTED Sun Nov 25 08:26:34 2018 From: ebegumisa@REDACTED (Edmond Begumisa) Date: Sun, 25 Nov 2018 17:26:34 +1000 Subject: [erlang-questions] Does enif_schedule_nif schedule a NIF for the same scheduler thread? Message-ID: Hello all, If I call enif_schedule_nif from a regular scheduler thread with the flags argument set to zero, when the emulator gets around to executing it, will my scheduled NIF be called from the very same regular scheduler thread as when I called enif_schedule_nif? Or could it be any regular scheduler thread? Thanks in advance. - Edmond - -- Using Opera's mail client: http://www.opera.com/mail/ From ebegumisa@REDACTED Sun Nov 25 08:33:02 2018 From: ebegumisa@REDACTED (Edmond Begumisa) Date: Sun, 25 Nov 2018 17:33:02 +1000 Subject: [erlang-questions] Does enif_schedule_nif schedule a NIF for the same scheduler thread? In-Reply-To: References: Message-ID: PS. I guess the same question applies to ERL_NIF_DIRTY_JOB_CPU_BOUND or ERL_NIF_DIRTY_JOB_IO_BOUND flags when enif_schedule_nif is called from a dirty CPU/IO scheduler. Will the future NIF be executed on the very same dirty CPU/IO scheduler thread? - Edmond - On Sun, 25 Nov 2018 17:26:34 +1000, Edmond Begumisa wrote: > Hello all, > > If I call enif_schedule_nif from a regular scheduler thread with the > flags argument set to zero, when the emulator gets around to executing > it, will my scheduled NIF be called from the very same regular scheduler > thread as when I called enif_schedule_nif? Or could it be any regular > scheduler thread? > > Thanks in advance. > > - Edmond - > -- Using Opera's mail client: http://www.opera.com/mail/ From rickard@REDACTED Sun Nov 25 13:57:40 2018 From: rickard@REDACTED (Rickard Green) Date: Sun, 25 Nov 2018 13:57:40 +0100 Subject: [erlang-questions] Does enif_schedule_nif schedule a NIF for the same scheduler thread? In-Reply-To: References: Message-ID: s?n 25 nov. 2018 kl. 08:33 skrev Edmond Begumisa < ebegumisa@REDACTED>: > PS. I guess the same question applies to ERL_NIF_DIRTY_JOB_CPU_BOUND or > ERL_NIF_DIRTY_JOB_IO_BOUND flags when enif_schedule_nif is called from a > dirty CPU/IO scheduler. Will the future NIF be executed on the very same > dirty CPU/IO scheduler thread? > > - Edmond - > > On Sun, 25 Nov 2018 17:26:34 +1000, Edmond Begumisa > wrote: > > > Hello all, > > > > If I call enif_schedule_nif from a regular scheduler thread with the > > flags argument set to zero, when the emulator gets around to executing > > it, will my scheduled NIF be called from the very same regular > scheduler > > thread as when I called enif_schedule_nif? Or could it be any regular > > scheduler thread? > > > > Thanks in advance. > > > > - Edmond - > > It may be scheduled on any scheduler of the requested type. Regards, Rickard Green, Erlang/OTP, Ericsson AB -- Rickard Green, Erlang/OTP, Ericsson AB -------------- next part -------------- An HTML attachment was scrubbed... URL: From hachreak@REDACTED Sun Nov 25 16:18:02 2018 From: hachreak@REDACTED (Leo) Date: Sun, 25 Nov 2018 16:18:02 +0100 Subject: [erlang-questions] console debugging and shell Message-ID: Hi at all, few month ago I started to write a "console version" of the debugging GUI: https://github.com/hachreak/cedb I tried to use in a real project and I noted that when I'm on REPL mode, it miss the possibility to continuous to run commands on the shell. Somebody know how should I do? Thanks :) Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebegumisa@REDACTED Sun Nov 25 20:41:43 2018 From: ebegumisa@REDACTED (Edmond Begumisa) Date: Mon, 26 Nov 2018 05:41:43 +1000 Subject: [erlang-questions] Does enif_schedule_nif schedule a NIF for the same scheduler thread? In-Reply-To: References: Message-ID: I see, thanks Rickard. It would be nice to have a flag which specifies that the future NIF should be scheduled on the same thread. Assuming this is technically possible, perhaps the OTP team could consider this. There are cases where one would want to break work up that's not threadsafe to continue from a different thread. In my particular case, I have different need -- I'm trying to send potentially large messages to another thread and/or OS process via a Boost.Lockfree Single-Producer Single Consumer Queue [1], so each message should be sent from the same [dirty] scheduler thread (the producer). - Edmond - [1] https://www.boost.org/doc/libs/1_68_0/doc/html/lockfree.html On Sun, 25 Nov 2018 22:57:40 +1000, Rickard Green wrote: > > s?n 25 nov. 2018 kl. 08:33 skrev Edmond Begumisa > : >> PS. I guess the same question applies to ERL_NIF_DIRTY_JOB_CPU_BOUND or >> ERL_NIF_DIRTY_JOB_IO_BOUND flags when enif_schedule_nif is called from >> a >> dirty CPU/IO scheduler. Will the future NIF be executed on the very >> same >> dirty CPU/IO scheduler thread? >> >> >> >> - Edmond - >> >> >> >> On Sun, 25 Nov 2018 17:26:34 +1000, Edmond Begumisa >> wrote: >> >> >> >>> Hello all, >> >>> >> >>> If I call enif_schedule_nif from a regular scheduler thread with the >> >>> flags argument set to zero, when the emulator gets around to executing >> >>> it, will my scheduled NIF be called from the very same regular >>> scheduler >> >>> thread as when I called enif_schedule_nif? Or could it be any regular >> >>> scheduler thread? >> >>> >> >>> Thanks in advance. >> >>> >> >>> - Edmond - >> >>> > > It may be scheduled on any scheduler of the requested type. > > Regards, > Rickard Green, Erlang/OTP, Ericsson AB > > --Rickard Green, Erlang/OTP, Ericsson AB > -- Using Opera's mail client: http://www.opera.com/mail/ From fchschneider@REDACTED Mon Nov 26 10:18:01 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Mon, 26 Nov 2018 10:18:01 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper Message-ID: Hi all, In emacs while editing PropEr tests, flycheck complains about not being able to find "proper/include/proper.hrl" which is obvious since that lib is somewhere sitting in the _build directory and not defined in ERL_LIBS. How do you guys configure emacs in a situation like this? PropEr is part of the test profile in rebar3. Thanks. Frans From lego12239@REDACTED Mon Nov 26 10:21:25 2018 From: lego12239@REDACTED (Oleg) Date: Mon, 26 Nov 2018 12:21:25 +0300 Subject: [erlang-questions] pattern matching & map Message-ID: <20181126092125.GA13906@legohost> Hi, all. I try to do the pattern matching in a function definition with maps: add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> But erlc says me: variable 'Name' is unbound Is this is not supported yet? Erlang/OTP 20 -- ???? ??????? (Oleg Nemanov) From zxq9@REDACTED Mon Nov 26 10:58:48 2018 From: zxq9@REDACTED (zxq9@REDACTED) Date: Mon, 26 Nov 2018 18:58:48 +0900 Subject: [erlang-questions] pattern matching & map In-Reply-To: <20181126092125.GA13906@legohost> References: <20181126092125.GA13906@legohost> Message-ID: <7530646.DPrY2VFulA@takoyaki> On 2018?11?26???? 12?21?25? JST Oleg wrote: > Hi, all. > > I try to do the pattern matching in a function definition with maps: > > add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> > > But erlc says me: > > variable 'Name' is unbound > > Is this is not supported yet? You can match on literals as maps keys in a function head, but not dynamic values. I believe you can match on dynamic values within a function body in a case: add_prms([{Name, Val} | T], Prms) -> case Prms of #{Name := Vals} -> % ... % ... -Craig From michal@REDACTED Mon Nov 26 11:12:39 2018 From: michal@REDACTED (=?utf-8?Q?Micha=C5=82_Muska=C5=82a?=) Date: Mon, 26 Nov 2018 11:12:39 +0100 Subject: [erlang-questions] pattern matching & map In-Reply-To: <20181126092125.GA13906@legohost> References: <20181126092125.GA13906@legohost> Message-ID: In OTP 21 you could use the map_get/2 guard: add_prms([{Name, Val}|T], Prms) when map_get(Name, Prms) =:= Val -> Micha?. On 26 Nov 2018, 10:57 +0100, Oleg , wrote: > Hi, all. > > I try to do the pattern matching in a function definition with maps: > > add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> > > But erlc says me: > > variable 'Name' is unbound > > Is this is not supported yet? > > Erlang/OTP 20 > > -- > ???? ??????? (Oleg Nemanov) > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From lego12239@REDACTED Mon Nov 26 11:21:18 2018 From: lego12239@REDACTED (Oleg) Date: Mon, 26 Nov 2018 13:21:18 +0300 Subject: [erlang-questions] pattern matching & map In-Reply-To: <7530646.DPrY2VFulA@takoyaki> References: <20181126092125.GA13906@legohost> <7530646.DPrY2VFulA@takoyaki> Message-ID: <20181126102118.GB13906@legohost> On Mon, Nov 26, 2018 at 06:58:48PM +0900, zxq9@REDACTED wrote: > On 2018?11?26???? 12?21?25? JST Oleg wrote: > > Hi, all. > > > > I try to do the pattern matching in a function definition with maps: > > > > add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> > > > > But erlc says me: > > > > variable 'Name' is unbound > > > > Is this is not supported yet? > > You can match on literals as maps keys in a function head, but not dynamic values. > > I believe you can match on dynamic values within a function body in a case: > > > add_prms([{Name, Val} | T], Prms) -> > case Prms of > #{Name := Vals} -> % ... > % ... Already done like this :-), but thought that i do something wrong with map pattern matching in function. Thanks! -- ???? ??????? (Oleg Nemanov) From lego12239@REDACTED Mon Nov 26 12:12:24 2018 From: lego12239@REDACTED (Oleg) Date: Mon, 26 Nov 2018 14:12:24 +0300 Subject: [erlang-questions] pattern matching & map In-Reply-To: References: <20181126092125.GA13906@legohost> Message-ID: <20181126111224.GC13906@legohost> On Mon, Nov 26, 2018 at 11:12:39AM +0100, Micha? Muska?a wrote: > In OTP 21 you could use the map_get/2 guard: > > add_prms([{Name, Val}|T], Prms) when map_get(Name, Prms) =:= Val -> Wow. That's great! But why we can't simply do: add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> :-)? -- ???? ??????? (Oleg Nemanov) From zxq9@REDACTED Mon Nov 26 12:16:33 2018 From: zxq9@REDACTED (zxq9@REDACTED) Date: Mon, 26 Nov 2018 20:16:33 +0900 Subject: [erlang-questions] pattern matching & map In-Reply-To: <20181126111224.GC13906@legohost> References: <20181126092125.GA13906@legohost> <20181126111224.GC13906@legohost> Message-ID: <1634035.nFRNYL5unI@takoyaki> On 2018?11?26???? 14?12?24? JST Oleg wrote: > On Mon, Nov 26, 2018 at 11:12:39AM +0100, Micha? Muska?a wrote: > > In OTP 21 you could use the map_get/2 guard: > > > > add_prms([{Name, Val}|T], Prms) when map_get(Name, Prms) =:= Val -> > > Wow. That's great! But why we can't simply do: > > add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> > > :-)? IIRC is is because `Name` isn't really being used to match (unify) there, it is being used to call into map code, which is slightly different and only abstracted by the magical #{} syntax. There is an explanation of this somewhere on list, but I don't have the link handy. -Craig From per@REDACTED Mon Nov 26 12:35:51 2018 From: per@REDACTED (Per Hedeland) Date: Mon, 26 Nov 2018 12:35:51 +0100 Subject: [erlang-questions] pattern matching & map In-Reply-To: <1634035.nFRNYL5unI@takoyaki> References: <20181126092125.GA13906@legohost> <20181126111224.GC13906@legohost> <1634035.nFRNYL5unI@takoyaki> Message-ID: <24a715cf-0761-47c2-1b28-537643ba77b6@hedeland.org> On 2018-11-26 12:16, zxq9@REDACTED wrote: > On 2018t1126??? 14B1224? JST Oleg wrote: >> On Mon, Nov 26, 2018 at 11:12:39AM +0100, MichaB MuskaBa wrote: >>> In OTP 21 you could use the map_get/2 guard: >>> >>> add_prms([{Name, Val}|T], Prms) when map_get(Name, Prms) =:= Val -> >> >> Wow. That's great! But why we can't simply do: >> >> add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> >> >> :-)? > > IIRC is is because `Name` isn't really being used to match (unify) there, it is being used to call into map code, which is slightly different and only abstracted by the magical #{} syntax. There is an explanation of this somewhere on list, but I don't have the link handy. AFAIR the "problem" is that the order of evaluation of function arguments is undefined. The #{Name := Vals} matching requires that 'Name' is bound (there is no "magic" AFAIK) - and it *would* be in the above function head, if argument evaluation was defined to be left-to-right. --Per Hedeland From per@REDACTED Mon Nov 26 13:26:43 2018 From: per@REDACTED (Per Hedeland) Date: Mon, 26 Nov 2018 13:26:43 +0100 Subject: [erlang-questions] pattern matching & map In-Reply-To: <24a715cf-0761-47c2-1b28-537643ba77b6@hedeland.org> References: <20181126092125.GA13906@legohost> <20181126111224.GC13906@legohost> <1634035.nFRNYL5unI@takoyaki> <24a715cf-0761-47c2-1b28-537643ba77b6@hedeland.org> Message-ID: <73260d12-0a1e-8a1c-fb2a-5b71ea8c1914@hedeland.org> Btw, http://erlang.org/doc/reference_manual/expressions.html#maps-in-guards lists is_map/1 and map_size/1, which are also documented as "Allowed in guard tests" in the erlang(3) man page (a.k.a. http://erlang.org/doc/man/erlang.html) - while the new-in-21 BIFs map_get/2 and is_map_key/2 are neither listed nor so documented (only the README mentions that they can be used in guards AFAICS). --Per On 2018-11-26 12:35, Per Hedeland wrote: > On 2018-11-26 12:16, zxq9@REDACTED wrote: >> On 2018t1126??? 14B1224? JST Oleg wrote: >>> On Mon, Nov 26, 2018 at 11:12:39AM +0100, MichaB MuskaBa wrote: >>>> In OTP 21 you could use the map_get/2 guard: >>>> >>>> add_prms([{Name, Val}|T], Prms) when map_get(Name, Prms) =:= Val -> >>> >>> Wow. That's great! But why we can't simply do: >>> >>> add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> >>> >>> :-)? >> >> IIRC is is because `Name` isn't really being used to match (unify) there, it is being used to call into map code, which is slightly different and only abstracted by the magical #{} syntax. There is an explanation of this somewhere on list, but I don't have the link handy. > > AFAIR the "problem" is that the order of evaluation of function > arguments is undefined. The #{Name := Vals} matching requires that > 'Name' is bound (there is no "magic" AFAIK) - and it *would* be in > the above function head, if argument evaluation was defined to be > left-to-right. > > --Per Hedeland > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From jesper.louis.andersen@REDACTED Mon Nov 26 16:17:06 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Mon, 26 Nov 2018 16:17:06 +0100 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: <1542753421.4224266@apps.rackspace.com> References: <1542753421.4224266@apps.rackspace.com> Message-ID: On Tue, Nov 20, 2018 at 11:37 PM wrote: > > > 2. When I executed $ kerl build 21.1 I again ran into failure-- needed > ncurses library. Took 15 minutes to find the right package name, but the > solution was: > > > > ~$ sudo apt-get install libncurses-dev > > > Some times, you can optimize this step: sudo apt-get build-dep erlang This will find the necessary build dependencies for the target package and install them. Many package managers have a command which does something to the same effect. This avoids the feedback loop of adding a missing build dependency only to see the build fail with a new missing package. And it also avoids having to figure out the name of the package in the first place. Erlang is a bit finicky because if it cannot find certain packages, it will still build, but without that support. The crypto package is dependent on an (Open)SSL library; often a culprit which leaves your Erlang installation in a limbo state in which no cryptographic code will run[0] [0] Your bitcoins will be fiiiine though :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Mon Nov 26 18:16:19 2018 From: lloyd@REDACTED (Lloyd R. Prentice) Date: Mon, 26 Nov 2018 12:16:19 -0500 Subject: [erlang-questions] Documentation -- what I ran into when I installed kerl In-Reply-To: References: <1542753421.4224266@apps.rackspace.com> Message-ID: Excellent tip! Thanks, Jesper. Lloyd Sent from my iPad > On Nov 26, 2018, at 10:17 AM, Jesper Louis Andersen wrote: > >> On Tue, Nov 20, 2018 at 11:37 PM wrote: > >> >> 2. When I executed $ kerl build 21.1 I again ran into failure-- needed ncurses library. Took 15 minutes to find the right package name, but the solution was: >> >> ~$ sudo apt-get install libncurses-dev >> > > > Some times, you can optimize this step: > > sudo apt-get build-dep erlang > > This will find the necessary build dependencies for the target package and install them. Many package managers have a command which does something to the same effect. This avoids the feedback loop of adding a missing build dependency only to see the build fail with a new missing package. And it also avoids having to figure out the name of the package in the first place. Erlang is a bit finicky because if it cannot find certain packages, it will still build, but without that support. The crypto package is dependent on an (Open)SSL library; often a culprit which leaves your Erlang installation in a limbo state in which no cryptographic code will run[0] > > [0] Your bitcoins will be fiiiine though :) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kostis@REDACTED Mon Nov 26 19:29:25 2018 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 26 Nov 2018 19:29:25 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: References: Message-ID: <7e298cd9-546b-8df4-bc00-4936c3545c04@cs.ntua.gr> On 11/26/2018 10:18 AM, Frans Schneider wrote: > Hi all, > > In emacs while editing PropEr tests, flycheck complains about not being > able to find "proper/include/proper.hrl" which is obvious since that lib > is somewhere sitting in the _build directory and not defined in ERL_LIBS. > How do you guys configure emacs in a situation like this? > PropEr is part of the test profile in rebar3. I have never used flycheck in emacs, and consequently I have no idea of what is involved in its use, but why isn't ERL_LIBS set in your environment? One of the first things that PropEr's user guide specifies is to either set ERL_LIBS or add PropEr?s base directory to your Erlang library path by adding an appropriate code:load_abs/1 call to your ~/.erlang file (see https://proper-testing.github.io/userguide.html). Can it be that this will solve your problem? Should this be something that rebar3 does automatically when it runs or detects PropEr tests? Hope this helps. Kostis From fchschneider@REDACTED Mon Nov 26 20:14:55 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Mon, 26 Nov 2018 20:14:55 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <7e298cd9-546b-8df4-bc00-4936c3545c04@cs.ntua.gr> References: <7e298cd9-546b-8df4-bc00-4936c3545c04@cs.ntua.gr> Message-ID: <16389c53-ab04-36d7-7f02-bd62b4f2ad55@gmail.com> On 11/26/18 7:29 PM, Kostis Sagonas wrote: > On 11/26/2018 10:18 AM, Frans Schneider wrote: >> Hi all, >> >> In emacs while editing PropEr tests, flycheck complains about not >> being able to find "proper/include/proper.hrl" which is obvious since >> that lib is somewhere sitting in the _build directory and not defined >> in ERL_LIBS. >> How do you guys configure emacs in a situation like this? >> PropEr is part of the test profile in rebar3. > > I have never used flycheck in emacs, and consequently I have no idea of > what is involved in its use, but why isn't ERL_LIBS set in your > environment? > > One of the first things that PropEr's user guide specifies is to either > set ERL_LIBS or add PropEr?s base directory to your Erlang library path > by adding an appropriate code:load_abs/1 call to your ~/.erlang file > (see https://proper-testing.github.io/userguide.html). > > Can it be that this will solve your problem? > Rebar3 will fetch and install PropEr per project. I used to have PropEr installed and had ERL_LIBS point to that as you suggest, but ran into trouble as rebar3 would install a newer version under _build. > Should this be something that rebar3 does automatically when it runs or > detects PropEr tests? > Rebar3's as test path command already knows about PropEr and that might be useful somehow, but I have no idea how to do that. > Hope this helps. > Kostis > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From t@REDACTED Mon Nov 26 20:56:01 2018 From: t@REDACTED (Tristan Sloughter) Date: Mon, 26 Nov 2018 12:56:01 -0700 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <7e298cd9-546b-8df4-bc00-4936c3545c04@cs.ntua.gr> References: <7e298cd9-546b-8df4-bc00-4936c3545c04@cs.ntua.gr> Message-ID: <1543262161.3521395.1589532856.5BD08575@webmail.messagingengine.com> > Should this be something that rebar3 does automatically when it runs or > detects PropEr tests? Better to have it as a test or plugin dependency. Not much is gained by having it installed globally (technically you only compile it once for all projects but I wouldn't expect that to really matter). Tristan From t@REDACTED Mon Nov 26 20:58:01 2018 From: t@REDACTED (Tristan Sloughter) Date: Mon, 26 Nov 2018 12:58:01 -0700 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: References: Message-ID: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: > Hi all, > > In emacs while editing PropEr tests, flycheck complains about not being > able to find "proper/include/proper.hrl" which is obvious since that lib > is somewhere sitting in the _build directory and not defined in ERL_LIBS. > How do you guys configure emacs in a situation like this? > PropEr is part of the test profile in rebar3. > > Thanks. > > Frans > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From by@REDACTED Tue Nov 27 01:20:06 2018 From: by@REDACTED (by) Date: Tue, 27 Nov 2018 08:20:06 +0800 Subject: [erlang-questions] Erlang Text Editor Searching Message-ID: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Hello, I am new to Erlang, and trying to find a modern text editor for it. I build Erlang from source, and I can use the basic Erlang Mode happily. But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. Which text editor do you use in daily life? I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. Best Regards, Yao From by@REDACTED Tue Nov 27 02:05:43 2018 From: by@REDACTED (by) Date: Tue, 27 Nov 2018 09:05:43 +0800 Subject: [erlang-questions] pattern matching & map In-Reply-To: <20181126092125.GA13906@legohost> References: <20181126092125.GA13906@legohost> Message-ID: <3C40D442-2F28-4153-8083-0CD0822E0897@meetlost.com> I believe below link would be a good reference. https://bugs.erlang.org/plugins/servlet/mobile#issue/ERL-88 And yes, this feature is not yet implemented even in Erlang/OTP 21. I encounter the same problem when I read the second edition of joe?s Erlang book. Best Regards, Randall > ? 2018?11?26??17:21?Oleg ??? > > Hi, all. > > I try to do the pattern matching in a function definition with maps: > > add_prms([{Name, Val}|T], #{Name := Vals} = Prms) -> > > But erlc says me: > > variable 'Name' is unbound > > Is this is not supported yet? > > Erlang/OTP 20 > > -- > ???? ??????? (Oleg Nemanov) > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From codewiget95@REDACTED Tue Nov 27 04:12:58 2018 From: codewiget95@REDACTED (Code Wiget) Date: Mon, 26 Nov 2018 22:12:58 -0500 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: <930ada04-0c7d-4e96-964e-23023170d579@Spark> Hi. You can do everything and more with vim. Syntax highlighting, compile on save, c-tags for erlang, templates (gen_servers, statems, etc..)?https://github.com/vim-erlang. You get all of the amazing features that you get with standard vim. I started using sublime, then tried Eclipse for Erlang, but became so much faster when I started using vim. ?I haven?t been able to find a feature in an editor that I couldn?t replicate in vim easily and WITHOUT having to use my dumb?mouse. On Nov 26, 2018, 7:20 PM -0500, by , wrote: > Hello, > > I am new to Erlang, and trying to find a modern text editor for it. > > I build Erlang from source, and I can use the basic Erlang Mode happily. > But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. > Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. > > Which text editor do you use in daily life? > I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. > > By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. > > Best Regards, > Yao > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From andras.boroska@REDACTED Tue Nov 27 08:36:51 2018 From: andras.boroska@REDACTED (=?UTF-8?Q?Boroska_Andr=C3=A1s?=) Date: Tue, 27 Nov 2018 08:36:51 +0100 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <930ada04-0c7d-4e96-964e-23023170d579@Spark> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> <930ada04-0c7d-4e96-964e-23023170d579@Spark> Message-ID: There was a recent presentation on the subject: https://www.youtube.com/watch?v=C8n3C-CNxCw From fchschneider@REDACTED Tue Nov 27 10:36:31 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Tue, 27 Nov 2018 10:36:31 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> References: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> Message-ID: <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> Yes, I use `rebar3 as test proper`, or just `rebar3 proper`, to tun the tests. It's just while editing that it gives the error `can't find include lib "proper/include/proper.hrl` The flycheck-rebar3 checker doesn't help: to bad. I am switching between projects on a regular basis, so it would be nice if setting the ERL_LIBS path would be done auto-magically. On 11/26/18 8:58 PM, Tristan Sloughter wrote: > Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 > > If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. > > On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: >> Hi all, >> >> In emacs while editing PropEr tests, flycheck complains about not being >> able to find "proper/include/proper.hrl" which is obvious since that lib >> is somewhere sitting in the _build directory and not defined in ERL_LIBS. >> How do you guys configure emacs in a situation like this? >> PropEr is part of the test profile in rebar3. >> >> Thanks. >> >> Frans >> _______________________________________________ >> 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 ledest@REDACTED Tue Nov 27 10:06:20 2018 From: ledest@REDACTED (Led) Date: Tue, 27 Nov 2018 11:06:20 +0200 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: > Which text editor do you use in daily life? > Kate with custom improved highlights. -- Led. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dieter@REDACTED Tue Nov 27 12:02:04 2018 From: dieter@REDACTED (dieter@REDACTED) Date: Tue, 27 Nov 2018 11:02:04 +0000 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: Hi Yao, If you want to give emacs another try, there are several autocomplete modes, for example auto-complete and company. (I have tried auto-complete with erlang) For symbol searches I am using etags (comes with emacs), you use it like etags *.erl which creates a tags file with all recognized definitions. You have to tell emacs where to find this file with visit-tags-table, or you set one of the variables tags-table-list (good if you work on several projects) or tags-file-name (just one project). Then you can visit the definition of a symbol with M-. and jump back with M-, I usually perform the creation of the tags file as target in a Makefile. You might have a bit more work than in a mainstream IDE, but I like the fact that I have everything under control. And I like elisp very much, besides erlang. Kind regards, Dieter Am Di., Nov. 27, 2018 01:20 schrieb by : Hello, I am new to Erlang, and trying to find a modern text editor for it. I build Erlang from source, and I can use the basic Erlang Mode happily. But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. Which text editor do you use in daily life? I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. Best Regards, Yao _______________________________________________ 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 zkessin@REDACTED Tue Nov 27 12:24:06 2018 From: zkessin@REDACTED (Zachary Kessin) Date: Tue, 27 Nov 2018 13:24:06 +0200 Subject: [erlang-questions] Video Topic Ideas Message-ID: Hi All I have been making videos about Erlang and Elixir and posting them on youtube on "The Beam Channel ". I would like to ask for suggestions for topic ideas! What are questions that year have about Erlang or Elixir or that people are always asking you about Erlang? (Or other beam languages) I am happy to cover both basic and advanced questions, so nothing is too simple. Feel free to email me or use this web form https://goo.gl/forms/nnUH2HBvOHbzsVuu2 Thanks and everyone have a great week! Zach Kessin +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Tue Nov 27 12:35:52 2018 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 27 Nov 2018 12:35:52 +0100 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: On Tue, Nov 27, 2018 at 1:20 AM by wrote: > Which text editor do you use in daily life? > I really want to get me into emacs world but found not quite easy, a > suggestion about emacs extensions would be very helpful. > > Most people start from a base of packages selected by someone else and then changes those to their own liking. Look at e.g., 'prelude', 'emacs-starter-kit', or Bodil Stokke's 'ohai-emacs' for inspiration. My own is probably not that neatly laid out[0] If there is one package to recommend, it would be John Wiegley's use-package. This package allows you to manage configuration of other packages in a very streamlined fashion. If we have e.g., (use-package swiper :ensure t :after (ivy) :bind ("C-s" . swiper)) but we don't want that, we just set ":disabled t" and then all the keybinding configuration is also gone. You can toggle packages efficiently by doing this. In the past, I've been really fond of: * CygnusEd * vi (and later vim) * Acme (Plan9) I also tend to like VS Code a lot. I have it installed on a windows box of mine and I use it for text editing on that machine. But most of my real work is done in Emacs nowadays. The key is to pick one editor and then learn it well, including key bindings and efficient editing techniques. Staying with one tool for a while will eventually pay off. Jumping between editors tend to reset your experience, and that is going to be detrimental in the long run. All that said, however, you can program in any editor, and Erlang tends to be succinct enough that it forgives even notepad.exe. This is not the case with verbose languages, such as Java, which more or less require good editor support or a full IDE. [0] https://github.com/jlouis/jlouis-emacs-conf -- J. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex@REDACTED Tue Nov 27 13:53:34 2018 From: alex@REDACTED (alex@REDACTED) Date: Tue, 27 Nov 2018 07:53:34 -0500 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: There are multiple choices.? In terms of editors, Emacs is the original default choice.? VIM with the right plugins works very well. If you want a lite IDE, VS Code + erlang extension seems pretty good.? If you like VIM, the Vim extension is great also. On 11/26/18 7:20 PM, by wrote: > Hello, > > I am new to Erlang, and trying to find a modern text editor for it. > > I build Erlang from source, and I can use the basic Erlang Mode happily. > But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. > Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. > > Which text editor do you use in daily life? > I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. > > By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. > > Best Regards, > Yao > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex@REDACTED Tue Nov 27 14:00:42 2018 From: alex@REDACTED (alex@REDACTED) Date: Tue, 27 Nov 2018 08:00:42 -0500 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> Message-ID: <55d4e75162f97a131703b22a496371d3@smtp.hushmail.com> Oops!? Sorry I didn't finish reading your email.? I'm just waking up!? Okay, so you already tried VS Code.? Heck, if it works you should be set.? In terms of Vim plugins, see https://github.com/vim-erlang. On 11/27/18 7:53 AM, alex@REDACTED wrote: > > There are multiple choices.? In terms of editors, Emacs is the > original default choice.? VIM with the right plugins works very well. > If you want a lite IDE, VS Code + erlang extension seems pretty good.? > If you like VIM, the Vim extension is great also. > > > On 11/26/18 7:20 PM, by wrote: >> Hello, >> >> I am new to Erlang, and trying to find a modern text editor for it. >> >> I build Erlang from source, and I can use the basic Erlang Mode happily. >> But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. >> Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. >> >> Which text editor do you use in daily life? >> I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. >> >> By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. >> >> Best Regards, >> Yao >> _______________________________________________ >> 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 by@REDACTED Tue Nov 27 15:13:38 2018 From: by@REDACTED (by) Date: Tue, 27 Nov 2018 22:13:38 +0800 Subject: [erlang-questions] Erlang Text Editor Searching In-Reply-To: <55d4e75162f97a131703b22a496371d3@smtp.hushmail.com> References: <02F824CD-1B7B-443A-A775-EDB8D7D4DE66@meetlost.com> <55d4e75162f97a131703b22a496371d3@smtp.hushmail.com> Message-ID: Thanks a lot for all your suggestions. After considering these ideas, I decide to learn Emacs with extensions for Erlang at first, since Emacs is not easy to get started, I am not sure whether Emacs will be my final choice. I wrote some front-end projects with VS Code, I must say, as a text editor, VS Code is just wonderful for front-end developers out-of-the-box. The Erlang extension for VS Code is also very easy to use. Actually, in my view, as a project, the default behavior is very important. Users should take very simple/stupid steps to get into the project, the advanced feature or customization should be another topic. VS Code is a good example, I download it, open project folder, then write the code(front-end); or, I install the Erlang extension, then write the Erlang code. And yes, I know Emacs is very flexible, but the Emacs world is just not easy to get into. I used vi before, and am happy about it for simple file editing, but never tried vim with advanced plugins. Use Erlang as an another example, I am attracted by the world view of Erlang: observe the world, and write program based on the observation. This is simple, and I get started without too much pain. And I know Erlang is hard in some sense, but this is another topic. I think I will use Emacs and VS Code at the same time. If I have time and configured Emacs to a handy state, It will be choice. Best Regards, Yao >>> Hello, >>> >>> I am new to Erlang, and trying to find a modern text editor for it. >>> >>> I build Erlang from source, and I can use the basic Erlang Mode happily. >>> But seems the basic erlang-mode with emacs does not contain some *key* features would be needed as a modern text editor, like auto-complete. >>> Actually, as a text editor, I think I just need the auto completion of library/custom modules and functions, other advanced features is not needed for now. >>> >>> Which text editor do you use in daily life? >>> I really want to get me into emacs world but found not quite easy, a suggestion about emacs extensions would be very helpful. >>> >>> By the way, I tried Visual Studio Code with the Erlang extension, it works amazing. >>> >>> Best Regards, >>> Yao >>> _______________________________________________ >>> 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 t@REDACTED Tue Nov 27 15:29:06 2018 From: t@REDACTED (Tristan Sloughter) Date: Tue, 27 Nov 2018 07:29:06 -0700 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> References: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> Message-ID: <1543328946.1167869.1590484896.6C220F5B@webmail.messagingengine.com> Hm, I'm surprised flycheck-rebar3 doesn't fix it. It should be compiling with rebar3 and parsing the errors from it, meaning if it builds with rebar3 in the terminal there should be no errors. Can you check the messages buffer for output? And ensure it is indeed running rebar3 when doing the check. On Tue, Nov 27, 2018, at 02:36, Frans Schneider wrote: > Yes, I use `rebar3 as test proper`, or just `rebar3 proper`, to tun the > tests. It's just while editing that it gives the error `can't find > include lib "proper/include/proper.hrl` > > The flycheck-rebar3 checker doesn't help: to bad. > > I am switching between projects on a regular basis, so it would be nice > if setting the ERL_LIBS path would be done auto-magically. > > > > > On 11/26/18 8:58 PM, Tristan Sloughter wrote: > > Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 > > > > If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. > > > > On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: > >> Hi all, > >> > >> In emacs while editing PropEr tests, flycheck complains about not being > >> able to find "proper/include/proper.hrl" which is obvious since that lib > >> is somewhere sitting in the _build directory and not defined in ERL_LIBS. > >> How do you guys configure emacs in a situation like this? > >> PropEr is part of the test profile in rebar3. > >> > >> Thanks. > >> > >> Frans > >> _______________________________________________ > >> 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 areege.alzubaidi@REDACTED Tue Nov 27 16:43:32 2018 From: areege.alzubaidi@REDACTED (Areege Al Zubaidi) Date: Tue, 27 Nov 2018 15:43:32 +0000 Subject: [erlang-questions] Code BEAM SF 19 - very early bird tickets available! Message-ID: Hi all, It?s Code BEAM SF time! If you?re not already aware, Code BEAM SF is the reincarnation of the much loved Erlang and Elixir Factory San Fransisco, the biggest and best Erlang and Elixir conference in North America. It?s back next February with a host of brilliant speakers and trainers to share, learn, inspire. You can currently get tickets at the lowest very early bird rate , until this Sunday (2nd December)! Code BEAM SF offers an OTP, Elixir, Phoenix, and RabbitMQ training courses , as well as a host of talks from leaders and innovators in the community, including: - Jose Valim , author of Elixir, who will be keynoting! - Renee Orser , VP of Engineering at NS1, will also join us as a keynote speaker! - Miriam Pena , voted one of the women to watch in tech by Women 2.0 - Ayanda Dube , RabbitMQ lead - Anna Neyzberg , co-founder of ElixirBridge - Hannah Howard , programmer and lifelong iconoclast - Marc Sugiyama , experienced Erlang engineer, consultant, and trainer - Jacqui Manzi will join us to share her experience using OTP: presence to power real-time analytics - Lukas Larsson , Erlang VM core committer - Cees de Groot , who will discuss Clixir - mixing C and Elixir code - ? and more! Learn more about the conference, and the 2019 speakers: https://codesync.global/conferences/code-beam-sf-2019/#Speakers What: Code BEAM SF 2019 When: 28 February - 01 March 2019 Where: Hyatt Centric Fisherman?s Wharf, San Francisco How to attend: - Attend the conference Secure a very early bird rate ticket to the conference by Sunday 02 December. You can find out more and register here . - Diversity ticket We are pleased to announce that Code BEAM SF 2019 is implementing a diversity scheme . The goal of the programme is to increase diversity of attendees and offer support to those in the tech community who would not otherwise be able to attend the conference. The deadline for applications is 3 February 2019. Recipients will be notified on a rolling basis, no later than 8 February 2019. - Student tickets Code BEAM SF offers a 50% discount to students. To learn more, email info@REDACTED from your academic email address to get a unique discount code. - Sponsor If you want your company to join WhatsApp and support the BEAM community, please do not hesitate to contact us about community support and sponsorship. If you have any further questions, please don?t hesitate to let me know, I hope to see you in San Fran! Areege -- *Areege Al Zubaidi* *Conferences Marketing Executive* T: +44 (0) 2076550332 W: www.codesync.global A: Erlang Solutions Ltd, The Loom,14 Gower's Walk, London, E1 8PY *Code Sync & Erlang Solutions Conferences* Code BEAM Lite - Amsterdam - 30 November 2018 Code BEAM Lite - Munich - 7 December 2018 Lambda Days - Krak?w - 21-22 February 2019 Code BEAM SF - San Francisco - 28 February - 1 March 2019 Code BEAM Lite - Bologna - 22 March 2019 ElixirConf EU - Prague - 8-9 April 2019 Code BEAM STO - Stockholm - 16-17 May 2019 Code Elixir LDN - London - 18 July 2019 Code Mesh LDN - London - 7-8 November 2019 *Erlang Solutions and Code Sync care about your data and privacy; please find all details about the basis for communicating with you and the way we process your data in our Privacy Policy . You can update your email preferences or opt-out from receiving marketing emails here .* -------------- next part -------------- An HTML attachment was scrubbed... URL: From powers_brady@REDACTED Wed Nov 28 05:36:25 2018 From: powers_brady@REDACTED (Brady Powers) Date: Tue, 27 Nov 2018 23:36:25 -0500 Subject: [erlang-questions] Video Topic Ideas In-Reply-To: References: Message-ID: <528230C9-80C7-47FB-A21C-1DF54E5B0CC5@yahoo.com> I continue to think the ?getting started? story in Erlang is a bit weak. Getting someone set up with rebar3 and generating a new escript, and maybe throwing in a dependency or two might be a nice video, if not already done. Erlang already has a unique syntax, and concurrent Erlang, and OTP, which is a lot to learn. Getting people into the write compile run loop faster can only help. Sent from my iPhone > On Nov 27, 2018, at 6:24 AM, Zachary Kessin wrote: > > Hi All > > I have been making videos about Erlang and Elixir and posting them on youtube on "The Beam Channel". I would like to ask for suggestions for topic ideas! What are questions that year have about Erlang or Elixir or that people are always asking you about Erlang? (Or other beam languages) > > I am happy to cover both basic and advanced questions, so nothing is too simple. > > Feel free to email me or use this web form https://goo.gl/forms/nnUH2HBvOHbzsVuu2 > > Thanks and everyone have a great week! > > Zach Kessin > +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 > > ? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From Oliver.Korpilla@REDACTED Wed Nov 28 09:21:49 2018 From: Oliver.Korpilla@REDACTED (Oliver Korpilla) Date: Wed, 28 Nov 2018 09:21:49 +0100 Subject: [erlang-questions] Video Topic Ideas In-Reply-To: <528230C9-80C7-47FB-A21C-1DF54E5B0CC5@yahoo.com> References: <528230C9-80C7-47FB-A21C-1DF54E5B0CC5@yahoo.com> Message-ID: Hello. I gave it a thought and the thing I have struggled the most with at some point was how to read both Erlang and elixir open source project code. I personally would be interested most in design patterns or techniques that make Erlang projects most readable to others as inevitably any code will pass on to others. Anyway, good project. I was disappointed to find this great website codingame.com support a big variety of languages and not a single one from BEAM. Evangelism is needed and valuable in any form. :) Oliver? Gesendet:?Mittwoch, 28. November 2018 um 05:36 Uhr Von:?"Brady Powers" An:?"Zachary Kessin" Cc:?"Erlang Questions" Betreff:?Re: [erlang-questions] Video Topic Ideas I continue to think the ?getting started? story in Erlang is a bit weak. Getting someone set up with rebar3 and generating a new escript, and maybe throwing in a dependency or two might be a nice video, if not already done.? ? Erlang already has a unique syntax, and concurrent Erlang, and OTP, which is a lot to learn. Getting people into the write compile run loop faster can only help.? ? Sent from my iPhone On Nov 27, 2018, at 6:24 AM, Zachary Kessin wrote: ? Hi All ? I have been making videos about Erlang and Elixir and posting them on youtube on "The Beam Channel[https://www.youtube.com/c/beamchannel]". I would like to ask for suggestions for topic ideas! What are questions that year have about Erlang or Elixir or that people are always asking you about Erlang? (Or other beam languages)? ? I am happy to cover both basic and advanced questions, so nothing is too simple.? ? Feel free to email me or use this web form?https://goo.gl/forms/nnUH2HBvOHbzsVuu2[https://www.youtube.com/redirect?v=ZIPbpWdyIqE&event=video_description&q=https%3A%2F%2Fgoo.gl%2Fforms%2FnnUH2HBvOHbzsVuu2&redir_token=P3Az056SONqOXFOtnYZE31cMtD18MTU0Mjk1ODI1N0AxNTQyODcxODU3]? ? Thanks and everyone have a?great week! ? Zach Kessin? +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 ? ? _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] http://erlang.org/mailman/listinfo/erlang-questions_______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions] From weasley.wx@REDACTED Wed Nov 28 09:48:46 2018 From: weasley.wx@REDACTED (Xavier Wang) Date: Wed, 28 Nov 2018 16:48:46 +0800 Subject: [erlang-questions] Rebind transform in Erlang 21 and Hygienic macro Message-ID: Hi, I use the rebind[1] transform for create Hygienic macro. [1]: https://github.com/camshaft/rebind such as: -define(CASE(Expr, A, B), try Expr of {ok, rebind(Result)} -> A; {error, rebind(Err)} -> B catch throw: {ok, rebind(Result)} -> A; {error, rebind(Err)} -> B end). then I can use ?CASE in A or B, each time macro expanded, the Result and Err will have a new name such as _Result_REBIND_1_, etc. But this can not work on Erlang 21, because function call are not allowed in pattern with the new AST. How can I get over it? Or are there any other way to implement the hygienic macro? -- regards, Xavier Wang. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmkolesnikov@REDACTED Wed Nov 28 10:10:57 2018 From: dmkolesnikov@REDACTED (Dmitry Kolesnikov) Date: Wed, 28 Nov 2018 11:10:57 +0200 Subject: [erlang-questions] Rebind transform in Erlang 21 and Hygienic macro In-Reply-To: References: Message-ID: <3B3B143C-D581-4724-BE71-1AAEBFE7768B@gmail.com> Hello, rebind macro looks like identity composition. You?ve trying to build either composition with that macro. I am maintaining this and few other composition under category transform. Please check them out if they solve your problems. https://github.com/fogfish/datum/blob/master/doc/category.md Shoot a questions/raise an issue if something is not clear. Best Regards, Dmitry > On 28 Nov 2018, at 10.48, Xavier Wang wrote: > > Hi, > > I use the rebind[1] transform for create Hygienic macro. > [1]: https://github.com/camshaft/rebind > > such as: > > -define(CASE(Expr, A, B), > try Expr of > {ok, rebind(Result)} -> A; > {error, rebind(Err)} -> B > catch > throw: {ok, rebind(Result)} -> A; > {error, rebind(Err)} -> B > end). > > then I can use ?CASE in A or B, each time macro expanded, the Result and Err will have a new name such as _Result_REBIND_1_, etc. > > But this can not work on Erlang 21, because function call are not allowed in pattern with the new AST. How can I get over it? Or are there any other way to implement the hygienic macro? > > -- > regards, > Xavier Wang. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From gfborn@REDACTED Wed Nov 28 17:18:38 2018 From: gfborn@REDACTED (Grigory Fateyev) Date: Wed, 28 Nov 2018 19:18:38 +0300 Subject: [erlang-questions] emacs edts kerl Message-ID: Hello! I'm using emacs + edts as the main tool to write erlang code, but it's ok if I need the same emacs version for all projects I'm involved in. For changing erlang I use kerl, which helps me switch between different versions. Is it possible to switch emacs between different erlang versions? I have a project that uses erlang 16 and another one with erlang 20.3. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.des.courtis@REDACTED Wed Nov 28 21:24:31 2018 From: eric.des.courtis@REDACTED (Eric des Courtis) Date: Wed, 28 Nov 2018 15:24:31 -0500 Subject: [erlang-questions] Video Topic Ideas In-Reply-To: References: <528230C9-80C7-47FB-A21C-1DF54E5B0CC5@yahoo.com> Message-ID: Maybe a few load shedding patterns, like pobox for example. On Wed, Nov 28, 2018 at 3:21 AM Oliver Korpilla wrote: > Hello. > > I gave it a thought and the thing I have struggled the most with at some > point was how to read both Erlang and elixir open source project code. > > I personally would be interested most in design patterns or techniques > that make Erlang projects most readable to others as inevitably any code > will pass on to others. > > Anyway, good project. I was disappointed to find this great website > codingame.com support a big variety of languages and not a single one > from BEAM. Evangelism is needed and valuable in any form. :) > > Oliver > > Gesendet: Mittwoch, 28. November 2018 um 05:36 Uhr > Von: "Brady Powers" > An: "Zachary Kessin" > Cc: "Erlang Questions" > Betreff: Re: [erlang-questions] Video Topic Ideas > > I continue to think the ?getting started? story in Erlang is a bit weak. > Getting someone set up with rebar3 and generating a new escript, and maybe > throwing in a dependency or two might be a nice video, if not already done. > > Erlang already has a unique syntax, and concurrent Erlang, and OTP, which > is a lot to learn. Getting people into the write compile run loop faster > can only help. > > Sent from my iPhone > On Nov 27, 2018, at 6:24 AM, Zachary Kessin zkessin@REDACTED]> wrote: > > > Hi All > > I have been making videos about Erlang and Elixir and posting them on > youtube on "The Beam Channel[https://www.youtube.com/c/beamchannel]". I > would like to ask for suggestions for topic ideas! What are questions that > year have about Erlang or Elixir or that people are always asking you about > Erlang? (Or other beam languages) > > I am happy to cover both basic and advanced questions, so nothing is too > simple. > > Feel free to email me or use this web form > https://goo.gl/forms/nnUH2HBvOHbzsVuu2[https://www.youtube.com/redirect?v=ZIPbpWdyIqE&event=video_description&q=https%3A%2F%2Fgoo.gl%2Fforms%2FnnUH2HBvOHbzsVuu2&redir_token=P3Az056SONqOXFOtnYZE31cMtD18MTU0Mjk1ODI1N0AxNTQyODcxODU3] > > > > Thanks and everyone have a great week! > > > Zach Kessin > +972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213 > > ? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED[mailto:erlang-questions@REDACTED] > > http://erlang.org/mailman/listinfo/erlang-questions_______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Thu Nov 29 08:05:17 2018 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Thu, 29 Nov 2018 08:05:17 +0100 Subject: [erlang-questions] Upcoming change for sys:log, please evaluate Message-ID: <20181129070517.GA84287@erix.ericsson.se> Hello list! I just want to bring attention to that I am proposing changes for sys:log, it is only (I hope) undocumented and misimplemented (not according to documentation) things that are changed, but they are on ancient code that some might depend on anyway... See https://github.com/erlang/otp/pull/2035. The purpose is to clean up sys:log(Server, {true,N}) so it gets good enough performance and so that the last N messages will be visible in the terminate report if this feature is activated. As a debug feature, perhaps even useful in production. Please evaluate! -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From lukas@REDACTED Thu Nov 29 09:10:43 2018 From: lukas@REDACTED (Lukas Larsson) Date: Thu, 29 Nov 2018 09:10:43 +0100 Subject: [erlang-questions] Erlang Docker and Kubernetes examples Message-ID: Hello! We have been spending some time to put together some example usages of Erlang together with Docker and/or Kubernetes. You can find the examples here: https://github.com/erlang/docker-erlang-example and https://github.com/erlang/docker-erlang-example/tree/minikube-simple/ We are by no means experts at either Docker nor Kubernetes, so these examples were as much an exercise for us to become better as a tool for others to figure out what to do. If you have any feedback or wish to improve the examples, please open issues and PRs on github. Enjoy, Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From arkdro@REDACTED Thu Nov 29 09:18:08 2018 From: arkdro@REDACTED (arkdro) Date: Thu, 29 Nov 2018 09:18:08 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper Message-ID: > In emacs while editing PropEr tests, flycheck complains about not being > able to find "proper/include/proper.hrl" which is obvious since that lib > is somewhere sitting in the _build directory and not defined in ERL_LIBS. > How do you guys configure emacs in a situation like this? > PropEr is part of the test profile in rebar3. Would it help? (setq flycheck-erlang-include-path (append (file-expand-wildcards (expand-file-name "./ProjectName/??ps")) (file-expand-wildcards (expand-file-name "./ProjectName/??ps/*/include")) (file-expand-wildcards (expand-file-name "./ProjectName/_build/default/lib/*/include")) (file-expand-wildcards (expand-file-name "./ProjectName/_build/default/lib")) flycheck-erlang-include-path)) -- Best, -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.schultz@REDACTED Thu Nov 29 10:41:07 2018 From: andreas.schultz@REDACTED (Andreas Schultz) Date: Thu, 29 Nov 2018 10:41:07 +0100 Subject: [erlang-questions] Erlang Docker and Kubernetes examples In-Reply-To: References: Message-ID: Lukas Larsson schrieb am Do., 29. Nov. 2018 um 09:11 Uhr: > Hello! > > We have been spending some time to put together some example usages of > Erlang together with Docker and/or Kubernetes. You can find the examples > here: https://github.com/erlang/docker-erlang-example and > https://github.com/erlang/docker-erlang-example/tree/minikube-simple/ > > We are by no means experts at either Docker nor Kubernetes, so these > examples were as much an exercise for us to become better as a tool for > others to figure out what to do. > > If you have any feedback or wish to improve the examples, please open > issues and PRs on github. > Just some small remarks: * if you wish to use gen_sctp you need to add the lksctp-tools package to the final container * I found that I also need zlib in the final container, not sure what the dependency is * for building NIFs in the 1st stage, you need: gcc \ git \ libc-dev libc-utils \ libgcc \ linux-headers \ make \ musl-dev musl-utils \ pcre2 \ pkgconf \ scanelf \ wget \ zlib I think it would also be nice to have a samples to build the docker image with the most common CI tools. I have samples for travis-ci [1] and can provide one for gitlab-ci. I just don't have the time to make polished PR's. Andreas 1: https://github.com/travelping/ergw/blob/feature/rf/.travis.yml#L42 > Enjoy, > Lukas > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- -- Dipl.-Inform. Andreas Schultz ----------------------- enabling your networks ---------------------- Travelping GmbH Phone: +49-391-81 90 99 0 Roentgenstr. 13 Fax: +49-391-81 90 99 299 39108 Magdeburg Email: info@REDACTED GERMANY Web: http://www.travelping.com Company Registration: Amtsgericht Stendal Reg No.: HRB 10578 Geschaeftsfuehrer: Holger Winkelmann VAT ID No.: DE236673780 --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From fchschneider@REDACTED Thu Nov 29 10:43:58 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Thu, 29 Nov 2018 10:43:58 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <1543328946.1167869.1590484896.6C220F5B@webmail.messagingengine.com> References: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> <1543328946.1167869.1590484896.6C220F5B@webmail.messagingengine.com> Message-ID: <394f63da-fac7-d5b3-a282-9acc98c90598@gmail.com> Sorry for the late reply. Still having trouble. After cleaning out the mess in my Emacs setup, I did the following: - installed flycheck (version 31) from melpa - installed flycheck-rebar3 (version 1.1.0) also from melpa - check flycheck compile (C-c ! C-c) gives no errors with the output: rebar3 compile ===> Verifying dependencies... ===> Compiling myapp Compilation finished at Thu Nov 29 10:23:32 - introducing an error in the rebar.conf file and editing an Erlang file, tells me flycheck does use the erlang-rebar3 checker with the following error: Suspicious state from syntax checker erlang-rebar3... So I guess the setup is correct. Any more suggestions? Frans On 11/27/18 3:29 PM, Tristan Sloughter wrote: > Hm, I'm surprised flycheck-rebar3 doesn't fix it. > > It should be compiling with rebar3 and parsing the errors from it, meaning if it builds with rebar3 in the terminal there should be no errors. Can you check the messages buffer for output? And ensure it is indeed running rebar3 when doing the check. > > On Tue, Nov 27, 2018, at 02:36, Frans Schneider wrote: >> Yes, I use `rebar3 as test proper`, or just `rebar3 proper`, to tun the >> tests. It's just while editing that it gives the error `can't find >> include lib "proper/include/proper.hrl` >> >> The flycheck-rebar3 checker doesn't help: to bad. >> >> I am switching between projects on a regular basis, so it would be nice >> if setting the ERL_LIBS path would be done auto-magically. >> >> >> >> >> On 11/26/18 8:58 PM, Tristan Sloughter wrote: >>> Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 >>> >>> If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. >>> >>> On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: >>>> Hi all, >>>> >>>> In emacs while editing PropEr tests, flycheck complains about not being >>>> able to find "proper/include/proper.hrl" which is obvious since that lib >>>> is somewhere sitting in the _build directory and not defined in ERL_LIBS. >>>> How do you guys configure emacs in a situation like this? >>>> PropEr is part of the test profile in rebar3. >>>> >>>> Thanks. >>>> >>>> Frans >>>> _______________________________________________ >>>> 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 fchschneider@REDACTED Thu Nov 29 10:50:07 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Thu, 29 Nov 2018 10:50:07 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: References: Message-ID: Probably that would help, but it makes the setup depending on the project I am working on. Tristan's suggestion to use flycheck-rebar3 looks (when it is working) more promising because it uses the rebar.conf file in the project's root directory. Thanks for the suggestion! Frans On 11/29/18 9:18 AM, arkdro wrote: > > In emacs while editing PropEr tests, flycheck complains about not being > > able to find "proper/include/proper.hrl" which is obvious since that lib > > is somewhere sitting in the _build directory and not defined in ERL_LIBS. > > How do you guys configure emacs in a situation like this? > > PropEr is part of the test profile in rebar3. > > Would it help? > (setq flycheck-erlang-include-path (append (file-expand-wildcards > (expand-file-name "./ProjectName/??ps")) (file-expand-wildcards > (expand-file-name "./ProjectName/??ps/*/include")) > (file-expand-wildcards (expand-file-name > "./ProjectName/_build/default/lib/*/include")) (file-expand-wildcards > (expand-file-name "./ProjectName/_build/default/lib")) > flycheck-erlang-include-path)) > > -- > Best, > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From t@REDACTED Thu Nov 29 16:33:58 2018 From: t@REDACTED (Tristan Sloughter) Date: Thu, 29 Nov 2018 08:33:58 -0700 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <394f63da-fac7-d5b3-a282-9acc98c90598@gmail.com> References: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> <1543328946.1167869.1590484896.6C220F5B@webmail.messagingengine.com> <394f63da-fac7-d5b3-a282-9acc98c90598@gmail.com> Message-ID: <1543505638.2443669.1593229144.7871903F@webmail.messagingengine.com> Damn, weird, it has to be getting that error from somewhere and if it isn't from the flycheck compile there must be another checker running that returns it. Not sure where to go from here though :( On Thu, Nov 29, 2018, at 02:43, Frans Schneider wrote: > Sorry for the late reply. > > Still having trouble. After cleaning out the mess in my Emacs setup, I > did the following: > > - installed flycheck (version 31) from melpa > - installed flycheck-rebar3 (version 1.1.0) also from melpa > - check flycheck compile (C-c ! C-c) gives no errors with the output: > > rebar3 compile > ===> Verifying dependencies... > ===> Compiling myapp > > Compilation finished at Thu Nov 29 10:23:32 > > - introducing an error in the rebar.conf file and editing an Erlang > file, tells me flycheck does use the erlang-rebar3 checker with the > following error: > > Suspicious state from syntax checker erlang-rebar3... > > So I guess the setup is correct. > Any more suggestions? > > Frans > > > On 11/27/18 3:29 PM, Tristan Sloughter wrote: > > Hm, I'm surprised flycheck-rebar3 doesn't fix it. > > > > It should be compiling with rebar3 and parsing the errors from it, meaning if it builds with rebar3 in the terminal there should be no errors. Can you check the messages buffer for output? And ensure it is indeed running rebar3 when doing the check. > > > > On Tue, Nov 27, 2018, at 02:36, Frans Schneider wrote: > >> Yes, I use `rebar3 as test proper`, or just `rebar3 proper`, to tun the > >> tests. It's just while editing that it gives the error `can't find > >> include lib "proper/include/proper.hrl` > >> > >> The flycheck-rebar3 checker doesn't help: to bad. > >> > >> I am switching between projects on a regular basis, so it would be nice > >> if setting the ERL_LIBS path would be done auto-magically. > >> > >> > >> > >> > >> On 11/26/18 8:58 PM, Tristan Sloughter wrote: > >>> Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 > >>> > >>> If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. > >>> > >>> On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: > >>>> Hi all, > >>>> > >>>> In emacs while editing PropEr tests, flycheck complains about not being > >>>> able to find "proper/include/proper.hrl" which is obvious since that lib > >>>> is somewhere sitting in the _build directory and not defined in ERL_LIBS. > >>>> How do you guys configure emacs in a situation like this? > >>>> PropEr is part of the test profile in rebar3. > >>>> > >>>> Thanks. > >>>> > >>>> Frans > >>>> _______________________________________________ > >>>> 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 t@REDACTED Thu Nov 29 16:41:26 2018 From: t@REDACTED (Tristan Sloughter) Date: Thu, 29 Nov 2018 08:41:26 -0700 Subject: [erlang-questions] Erlang Docker and Kubernetes examples In-Reply-To: References: Message-ID: <1543506086.2445839.1593231384.60C3661C@webmail.messagingengine.com> Nice. I have a blog post about an optimization you can do by only copying the rebar.config and lock at first http://blog.erlware.org/rebar3-building-docker-images/ I also have a helm example https://github.com/erleans/presence-sample/tree/master/helm/presence But I'm not too happy with it... I want to integrate epmdless and write up instructions for easily using it to connect erlang nodes in a k8s cluster based on a specific port. And dealing with setting the number of active schedulers based on the allocated CPU resources I think is probably something important to figure out. Also, I made a draft pack https://github.com/Azure/draft/tree/master/packs/erlang if people are interested in getting started with k8s through draft, https://draft.sh/ Tristan On Thu, Nov 29, 2018, at 01:10, Lukas Larsson wrote: > Hello! > > We have been spending some time to put together some example usages of > Erlang together with Docker and/or Kubernetes. You can find the > examples here: https://github.com/erlang/docker-erlang-example and > https://github.com/erlang/docker-erlang-example/tree/minikube-simple/> > We are by no means experts at either Docker nor Kubernetes, so these > examples were as much an exercise for us to become better as a tool > for others to figure out what to do.> > If you have any feedback or wish to improve the examples, please open > issues and PRs on github.> > Enjoy, > Lukas > _________________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From fchschneider@REDACTED Fri Nov 30 09:28:50 2018 From: fchschneider@REDACTED (Frans Schneider) Date: Fri, 30 Nov 2018 09:28:50 +0100 Subject: [erlang-questions] Emacs + Flycheck + rebar3 + proper In-Reply-To: <1543505638.2443669.1593229144.7871903F@webmail.messagingengine.com> References: <1543262281.3522153.1589536608.32C39FCC@webmail.messagingengine.com> <6452a3f9-b71b-d135-656e-595d3d0e61ef@gmail.com> <1543328946.1167869.1590484896.6C220F5B@webmail.messagingengine.com> <394f63da-fac7-d5b3-a282-9acc98c90598@gmail.com> <1543505638.2443669.1593229144.7871903F@webmail.messagingengine.com> Message-ID: I think you are right about another checker running. Using the flycheck verify setup command (C-c ! v), both the erlang-rebar3 and erlang checkers show up, both being enabled. Syntax checkers for buffer prop_basics.erl in erlang-mode: erlang-rebar3 - may enable: yes - predicate: t - executable: Found at /home/frans/.cache/rebar3/bin/rebar3 erlang - may enable: yes - executable: Found at /usr/lib/erlang/bin/erlc Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled checkers. Disabling the erlang checker with Cc ! x makes the error disappear, BUT with it all other syntax errors which is not a good thing. Could somebody please check if this is a bug or has to do with my local setup? Frans On 11/29/18 4:33 PM, Tristan Sloughter wrote: > Damn, weird, it has to be getting that error from somewhere and if it isn't from the flycheck compile there must be another checker running that returns it. > > Not sure where to go from here though :( > > On Thu, Nov 29, 2018, at 02:43, Frans Schneider wrote: >> Sorry for the late reply. >> >> Still having trouble. After cleaning out the mess in my Emacs setup, I >> did the following: >> >> - installed flycheck (version 31) from melpa >> - installed flycheck-rebar3 (version 1.1.0) also from melpa >> - check flycheck compile (C-c ! C-c) gives no errors with the output: >> >> rebar3 compile >> ===> Verifying dependencies... >> ===> Compiling myapp >> >> Compilation finished at Thu Nov 29 10:23:32 >> >> - introducing an error in the rebar.conf file and editing an Erlang >> file, tells me flycheck does use the erlang-rebar3 checker with the >> following error: >> >> Suspicious state from syntax checker erlang-rebar3... >> >> So I guess the setup is correct. >> Any more suggestions? >> >> Frans >> >> >> On 11/27/18 3:29 PM, Tristan Sloughter wrote: >>> Hm, I'm surprised flycheck-rebar3 doesn't fix it. >>> >>> It should be compiling with rebar3 and parsing the errors from it, meaning if it builds with rebar3 in the terminal there should be no errors. Can you check the messages buffer for output? And ensure it is indeed running rebar3 when doing the check. >>> >>> On Tue, Nov 27, 2018, at 02:36, Frans Schneider wrote: >>>> Yes, I use `rebar3 as test proper`, or just `rebar3 proper`, to tun the >>>> tests. It's just while editing that it gives the error `can't find >>>> include lib "proper/include/proper.hrl` >>>> >>>> The flycheck-rebar3 checker doesn't help: to bad. >>>> >>>> I am switching between projects on a regular basis, so it would be nice >>>> if setting the ERL_LIBS path would be done auto-magically. >>>> >>>> >>>> >>>> >>>> On 11/26/18 8:58 PM, Tristan Sloughter wrote: >>>>> Is it building with rebar3? I use https://github.com/joedevivo/flycheck-rebar3 >>>>> >>>>> If it isn't building with rebar3 and you don't want it to then you'd need to be setting ERL_LIBS to include the libs in the _build directory. >>>>> >>>>> On Mon, Nov 26, 2018, at 02:18, Frans Schneider wrote: >>>>>> Hi all, >>>>>> >>>>>> In emacs while editing PropEr tests, flycheck complains about not being >>>>>> able to find "proper/include/proper.hrl" which is obvious since that lib >>>>>> is somewhere sitting in the _build directory and not defined in ERL_LIBS. >>>>>> How do you guys configure emacs in a situation like this? >>>>>> PropEr is part of the test profile in rebar3. >>>>>> >>>>>> Thanks. >>>>>> >>>>>> Frans >>>>>> _______________________________________________ >>>>>> 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 otp@REDACTED Fri Nov 30 10:45:19 2018 From: otp@REDACTED (Erlang/OTP) Date: Fri, 30 Nov 2018 10:45:19 +0100 Subject: [erlang-questions] Patch Package OTP 21.1.4 Released Message-ID: <20181130094519.GA9424@erix.ericsson.se> Patch Package: OTP 21.1.4 Git Tag: OTP-21.1.4 Date: 2018-11-30 Trouble Report Id: OTP-15438 Seq num: ERL-781 System: OTP Release: 21 Application: kernel-6.1.1 Predecessor: OTP 21.1.3 Check out the git tag OTP-21.1.4, 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-6.1.1 ---------------------------------------------------- --------------------------------------------------------------------- Note! The kernel-6.1.1 application can *not* be applied independently of other applications on an arbitrary OTP 21 installation. On a full OTP 21 installation, also the following runtime dependency has to be satisfied: -- erts-10.1 (first satisfied in OTP 21.1) --- Fixed Bugs and Malfunctions --- OTP-15438 Application(s): kernel Related Id(s): ERL-781 Fix bug causing net_kernel process crash on connection attempt from node with name identical to local node. Full runtime dependencies of kernel-6.1.1: erts-10.1, sasl-3.0, stdlib-3.5 --------------------------------------------------------------------- --------------------------------------------------------------------- ---------------------------------------------------------------------