From icfp.publicity@REDACTED Wed Feb 1 01:17:48 2017 From: icfp.publicity@REDACTED (Lindsey Kuper) Date: Tue, 31 Jan 2017 16:17:48 -0800 Subject: [erlang-questions] Second Call for Papers: ICFP 2017 Message-ID: <5891292c687d_f913fec02463bf05145@landin.mail> ICFP 2017 The 22nd ACM SIGPLAN International Conference on Functional Programming Oxford, United Kingdom http://icfp17.sigplan.org/ Second Call for Papers ### Important dates Submissions due: Monday, February 27, Anywhere on Earth https://icfp17.hotcrp.com Author response: Monday, April 17, 2017, 15:00 (UTC) - Thursday, April 20, 2017, 15:00 (UTC) Notification: Monday, 1 May, 2017 Final copy due: Monday, 5 June 2017 Early registration: TBA Conference: Monday, 4 September - Wednesday, 6 September, 2017 ### Updates for Second Call for Papers This revision, published January 31, 2017, includes the following updates: * A link to the list of frequently asked questions about the double-blind review process. * A new requirement for citations in author-year format. This follows a decision for PACMPL that was made after the original version of this call was distributed. As such, author-year format will be required for final (accepted) versions of papers in ICFP 2017, but not for submissions. * Additional guidance for authors using LaTeX. * A clarification about the expectations for author attendance in the event of visa-related problems. ### New this year Those familiar with previous ICFP conferences should be aware of two significant changes that are being introduced in 2017: 1. Papers selected for ICFP 2017 will be published as the ICFP 2017 issue of a new journal, Proceedings of the ACM on Programming Languages (PACMPL), which replaces the previous ICFP conference proceedings. The move to PACMPL will have two noticeable impacts on authors: * A new, two-phase selection and reviewing process that conforms to ACM?s journal reviewing guidelines. * A new, single-column format for submissions. 2. Authors of papers that are conditionally accepted in the first phase of the reviewing process will have the option to submit materials for Artifact Evaluation. Further details on each of these changes are included in the following text. ### Scope ICFP 2017 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. ICFP 2017 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 program chair if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions ICFP 2017 will employ a lightweight double-blind reviewing process, as described below. **Deadline**: The deadline for submissions is Monday, February 27, 2017, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: (NOTE: NEW FORMAT REQUIREMENTS FOR ICFP 2017) 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 Large" 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 ; the appropriate template for ICFP 2017 authors is in the file `acmart-pacmpl-template.tex`. As documented in the template, submissions should be prepared using the `acmlarge` and `anonymous` options. The use of the `review` option is also strongly encouraged but not required. (The `review` option will add line numbers, which will make it easier for reviewers to reference specific parts of your paper in their comments, but should have absolutely no other effect on the typesetting.) Details of available technical support for LaTeX-specific questions is available at . There is a limit of 24 pages for a full paper or 12 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. **Citations**: As part of PACMPL, ICFP 2017 papers are expected to use author-year citations for references to other work. Author-year citations may be used as either a noun phrase, such as "The lambda calculus was originally conceived by Church (1932)", or a parenthetic phase, such as "The lambda calculus (Church 1932) was intended as a foundation for mathematics". A useful test for correct usage it to make sure that the text still reads correctly when the parenthesized portions of any references are omitted. Take care with prepositions; in the first example above, "by" is more appropriate than "in" because it allows the text to be read correctly as a reference to the author. Sometimes, readability may be improved by putting parenthetic citations at the end of a clause or a sentence, such as "A foundation for mathematics was provided by the lambda calculus (Church 1932)". In LaTeX, use `\citet{Church-1932}` for citations as a noun phrase, "Church (1932)", and `\citep{Church-1932}` for citations as a parenthetic phrase, "(Church 1932)"; for details, see Sections 2.3--2.5 of the natbib documentation (). **Submission**: Submissions will be accepted at (in preparation at the time of writing). 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 15:00 UTC on Monday, April 17, 2017, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the program chair 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 presentation at ICFP 2017. A [list of frequently asked questions and answers](http://icfp17.sigplan.org/track/icfp-2017-papers#Submission-and-Reviewing-FAQ) that address common concerns is available on the conference website and will be updated as necessary to clarify and expand on this process. **ICFP 2017 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 PC 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 1, 2017. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 5, 2017), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. This process is intended as a refinement of the review process that has been used in previous ICFP conferences. By incorporating a second stage, the process will conform to ACM?s journal reviewing guidelines for PACMPL. **ICFP 2017 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 PC and external 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 Large format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: copyright transfer to ACM; retaining copyright but granting ACM exclusive publication rights; or open access on payment of a fee. Further information about ACM author rights is available from . * At least one author of each accepted submission will be expected to attend and present their paper at the conference. (ICFP welcomes all authors, regardless of nationality. If any author of an accepted submission has visa-related difficulties in travelling to the conference, we will make arrangements to enable remote participation, and not require them to attend the conference in order to present their talk.) 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. * We intend that the proceedings 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. * **AUTHORS TAKE NOTE: The official publication date is the date the proceedings 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 a committee, separate from the program 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 proceedings, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, 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 ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the proceedings and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The program committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results --- the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The program chair will be happy to advise on any concerns about which category to submit to. ### Organizers General Chair: Jeremy Gibbons (University of Oxford, UK) Program Chair: Mark Jones (Portland State University, USA) Artifact Evaluation Chair: Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Ryan Trinkle (Obsidian Systems LLC, USA) Programming Contest Organiser: Sam Lindley (University of Edinburgh, UK) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Chair: Jose Calderon (Galois, Inc., USA) Workshops Co-Chair: Andres L?h (Well-Typed LLP) Workshops Co-Chair: David Christiansen (Indiana University, USA) Program Committee: Bob Atkey (University of Strathclyde, Scotland) Adam Chlipala (MIT, USA) Dominique Devriese (KU Leuven, Belgium) Martin Erwig (Oregon State, USA) Matthew Flatt (University of Utah, USA) Ronald Garcia (University of British Columbia, Canada) Kathryn Gray (University of Cambridge, England) John Hughes (Chalmers University and Quvik, Sweden) Chung-Kil Hur (Seoul National University, Korea) Graham Hutton (University of Nottingham, England) Alan Jeffrey (Mozilla Research, USA) Ranjit Jhala (University of California, San Diego, USA) Shin-ya Katsumata (Kyoto University, Japan) Lindsey Kuper (Intel Labs, USA) Dan Licata (Wesleyan University, USA) Ben Lippmeier (Digital Asset, Australia) Gabriel Scherer (Northeastern University, USA) Alexandra Silva (University College London, England) Nikhil Swamy (Microsoft Research, USA) Sam Tobin-Hochstadt (Indiana University, USA) Nicolas Wu (University of Bristol, England) Beta Ziliani (CONICET and FAMAF, Universidad Nacional de C?rdoba, Argentina) From prakashp@REDACTED Wed Feb 1 08:27:14 2017 From: prakashp@REDACTED (Prakash Parmar) Date: Wed, 1 Feb 2017 12:57:14 +0530 Subject: [erlang-questions] Erlang SNMP Manager example Message-ID: <81778a73-6bc2-2567-928f-be6ed56d618c@utl.in> Hi all, Any Erlang SNMP manager example ? Basically I want to receive snmp trap notification. Any help would be appreciated. Cheers, Prakash From dgud@REDACTED Wed Feb 1 12:28:43 2017 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 01 Feb 2017 11:28:43 +0000 Subject: [erlang-questions] Patch package OTP 19.2.2 released Message-ID: Patch Package: OTP 19.2.2 Git Tag: OTP-19.2.2 Date: 2017-02-01 Trouble Report Id: OTP-14167 Seq num: System: OTP Release: 19 Application: mnesia-4.14.3 Predecessor: OTP 19.2.1 Check out the git tag OTP-19.2.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. --------------------------------------------------------------------- --- mnesia-4.14.3 --------------------------------------------------- --------------------------------------------------------------------- The mnesia-4.14.3 application can be applied independently of other applications on a full OTP 19 installation. --- Fixed Bugs and Malfunctions --- OTP-14167 Application(s): mnesia Fixed crash in checkpoint handling when table was deleted during backup. Full runtime dependencies of mnesia-4.14.3: erts-7.0, kernel-3.0, stdlib-2.0 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.petrauskas@REDACTED Wed Feb 1 12:40:29 2017 From: k.petrauskas@REDACTED (Karolis Petrauskas) Date: Wed, 1 Feb 2017 13:40:29 +0200 Subject: [erlang-questions] SFTP In-Reply-To: References: Message-ID: Hi, I made a smaller test program to reproduce the problem (shown bellow). It reproduces the problem only partially, because it can't find the files in the Erlang sftp server by relative file names all the time. In my previous experiments I the misbehaviour was unstable. -module(test_sftp). -export([test/1]). make_files(DirName) -> lists:foreach( fun (FileName) -> ok = file:write_file(filename:join(DirName, FileName), [FileName, " contents"]) end, ["some.txt", "other.txt", "none.txt", "yetanother.txt", "any.txt"] ), ok. start_server(Port, Cwd) -> {ok, Pid} = ssh:daemon(Port, [ {system_dir, "test_sftp_data/sys"}, {user_dir, "test_sftp_data/usr"}, {user_passwords, [{"test_sftp", "test_sftp"}]}, {subsystems, [ssh_sftpd:subsystem_spec([{cwd, Cwd}])]} ]), {ok, Pid}. check_client(Port, User, Pass, DirName) -> {ok, ChannelPid, ConnectionRef} = ssh_sftp:start_channel("localhost", Port, [{user, User}, {password, Pass}]), {ok, FileNames} = ssh_sftp:list_dir(ChannelPid, DirName), Result = lists:map(fun (FileName) -> {DirName, FileName, ssh_sftp:read_file(ChannelPid, filename:join(DirName, FileName))} end, FileNames), ok = ssh_sftp:stop_channel(ChannelPid), ok = ssh:close(ConnectionRef), Result. test(Pass) -> ok = make_files("/home/karolis/temp/test_sftp"), {ok, Pid} = start_server(8022, "/home/karolis"), lists:foreach(fun (N) -> io:format("--------------- Test n=~p ---------------------~n", [N]), io:format("Erlang-ABS: ~100p~n", [check_client(8022, "test_sftp", "test_sftp", "/home/karolis/temp/test_sftp")]), io:format("Erlang-REL: ~100p~n", [check_client(8022, "test_sftp", "test_sftp", "temp/test_sftp")]), io:format("OpenSSH-ABS: ~100p~n", [check_client(22, "karolis", Pass, "/home/karolis/temp/test_sftp")]), io:format("OpenSSH-REL: ~100p~n", [check_client(22, "karolis", Pass, "temp/test_sftp")]) end, lists:seq(1, 10)), ok = ssh:stop_daemon(Pid), ok. All the iterations printed the same results (only the output of the first iteration is shown bellow): --------------- Test n=1 --------------------- Erlang-ABS: [{"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt contents">>}}, {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt contents">>}}, {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt contents">>}}, {"/home/karolis/temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt contents">>}}, {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt contents">>}}] *Erlang-REL: [{"temp/test_sftp","none.txt",{error,no_such_file}}, {"temp/test_sftp","any.txt",{error,no_such_file}}, {"temp/test_sftp","other.txt",{error,no_such_file}}, {"temp/test_sftp","yetanother.txt",{error,no_such_file}}, {"temp/test_sftp","some.txt",{error,no_such_file}}]* OpenSSH-ABS: [{"/home/karolis/temp/test_sftp","..",{error,failure}}, {"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt contents">>}}, {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt contents">>}}, {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt contents">>}}, {"/home/karolis/temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt contents">>}}, {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt contents">>}}, {"/home/karolis/temp/test_sftp",".",{error,failure}}] OpenSSH-REL: [{"temp/test_sftp","..",{error,failure}}, {"temp/test_sftp","none.txt",{ok,<<"none.txt contents">>}}, {"temp/test_sftp","any.txt",{ok,<<"any.txt contents">>}}, {"temp/test_sftp","other.txt",{ok,<<"other.txt contents">>}}, {"temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt contents">>}}, {"temp/test_sftp","some.txt",{ok,<<"some.txt contents">>}}, {"temp/test_sftp",".",{error,failure}}] I repeated the same test with the home dir (relative path = "."), and the results were the same. So it seems that the Erlang's sftp server can list directories, but can't open the files by relative paths. Karolis On Mon, Jan 30, 2017 at 10:19 PM, Karolis Petrauskas wrote: > I'm using "Erlang/OTP 19 [erts-8.2]", debian package from > erlang-solutions, version 1:19.2-1. > > I'll check that with erlang client and sshd server. I was playing with > ssh_sftpd server from a command line (sftp), and noticed no problems > except the cwd problem when combined with root directory restriction. > > Karolis > > On Mon, Jan 30, 2017 at 8:01 PM, bengt wrote: > > Greetings, > > > > Can you try with sshd, instead of ssh_sftpd ? As a way of halving the > potential error sources. Also, which Erlang version are you on? > > > > > > bengt > > > >> On 30 Jan 2017, at 13:55, Karolis Petrauskas > wrote: > >> > >> Hello, > >> > >> I'm trying to use erlang's sftp server and client. In the example > >> bellow, i use erlang for both: the server and the client. For some > >> reason, i can't open some files. > >> > >> 43> ssh_sftp:list_dir(Ch, "."). > >> {ok,["other.txt","some.txt"]} > >> > >> 44> ssh_sftp:read_file(Ch, "some.txt"). > >> {ok,<<"some.txt contents">>} > >> > >> 45> ssh_sftp:read_file(Ch, "other.txt"). > >> {error,no_such_file} > >> > >> I was able to read both files with absolute file names specified, but > >> in my case I should not depend on the absolute paths. I could use the > >> absolute file names when opening files, if I could get the current > >> working directory from the server, but I cant find any function for > >> that. > >> > >> The server behaviour is also a unclear to me. I can't set the cwd, if > >> the root option is used when starting the daemon. I have tried various > >> combinations of root/cwd (cwd is relative to root, or absolute on the > >> target file system), the sftp client always logins with / as its > >> current working directory. > >> > >> In my case, I use the sftpd only for testing the sftp client in CT. > >> I'm working on Erlang/OTP 19 [erts-8.2]. > >> > >> Would be thankful for any pointers. > >> > >> Karolis > >> _______________________________________________ > >> 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 mbike2000ru@REDACTED Wed Feb 1 14:00:13 2017 From: mbike2000ru@REDACTED (Dmitry) Date: Wed, 1 Feb 2017 13:00:13 +0000 (UTC) Subject: [erlang-questions] how to debug a code with spawned processes References: <1098547905.3448646.1485954013204.ref@mail.yahoo.com> Message-ID: <1098547905.3448646.1485954013204@mail.yahoo.com> Hello, The code which spawns new processes works in normal situation (when it is triggered from another application), but it seams that when it is called from send_all it does not work as expected:+++++++++++++++++++++++++++++++++++++++++++++++++++++++ handle_cast({send_all}, State=#state{pgconn=Conn}) ->? SQLQuery = "select mobile_phone from push_tokens as pt inner join employees as e on e.id = pt.employee_id where e.active = true and pt.app_voip_token is not null",? {ok, _, Res} = epgsql:squery(Conn, SQLQuery),? ?io:format("Send_all was queried~n"),? [connect_down(binary_to_list(Phone)) || {Phone} <- Res],? {noreply, State};++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The problem that annoy is called only once (but it had to call send_it - 124 times) The question - how to debug such application: how to trace whats going on in the "annoy" function. I use spawn_monitor to detect link failure.++++++++++++++++++++++++++++++++++++++++++++++++++++++++annoy (BinToken) ->? [send_it(A, BinToken) || A <- lists:seq(1,124)].++++++++++++++++++++++++++++++++++++++++++++++++++++++++ handle_cast({connect_down, Phone}, State=#state{pgconn=Conn}) -> ?TokenbyphoneQuery = "select app_voip_token from push_tokens where employee_id in (select id from employees where mobile_phone = '"++ Phone ++"')",? {ok, _, Res} = epgsql:squery(Conn, TokenbyphoneQuery), %% ?ets:insert(conn_up, {Phone, false}), ? case Res of? ? [] ?->lager:info("This is Android phone : ~p ~n", [Phone]),ok;? ? [{BinToken}] -> ? ? ? ? case BinToken of? ? ? ? ? ? null ->? ? ? ? lager:info("This is Android phone : ~p ~n", [Phone]),ok;? ? ? ? _ ->? ? ? io:format("Bintoken is: ~p ~n", [BinToken]),% ? ? ?Pid = spawn(pusher, annoy, [BinToken]),Pid = spawn_monitor(pusher, annoy, [BinToken]),? ? lager:info("Spawning annoyer PID: ~p for ~p~n", [Pid, Phone]),? ? ? global:register_name("push_" ++ Phone, Pid)? ? ? ? end ? ? end, ? {noreply, State}; -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikpelinux@REDACTED Wed Feb 1 14:31:10 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Wed, 1 Feb 2017 14:31:10 +0100 Subject: [erlang-questions] Problem with binary_to_term on different machines In-Reply-To: References: <1fc4b57e-17ba-0bd5-7f1b-e451cf34f10a@ericsson.com> Message-ID: <22673.58142.446012.235464@gargle.gargle.HOWL> Sverker Eriksson writes: > Correction: Bug exists since OTP-17.0. > > (and i tags R16B02_yielding_binary_to_term and > OTP_R16B03_yielding_binary_to_term) > > /Sverker > > > On 01/20/2017 05:17 PM, Sverker Eriksson wrote: > > This is indeed a problem in Erlang VM code (shallow copy of inflate > > state) > > that has existed since R16B03, but not caused actual problem until > > zlib v1.2.9. > > > > Fix coming up. Here is a preliminary patch for the impatient. Has this landed in OTP master yet? I've been keeping a look out for it, but haven't seen it (I may have missed it of course). I'd like to backport it to our internal OTP-18 and OTP-19. /Mikael > > > > diff --git a/erts/emulator/beam/external.c > > b/erts/emulator/beam/external.c > > index beed847..1c4fff5 100644 > > --- a/erts/emulator/beam/external.c > > +++ b/erts/emulator/beam/external.c > > @@ -1431,6 +1431,10 @@ static B2TContext* b2t_export_context(Process* > > p, B2TContext* src) > > if (ctx->state >= B2TDecode && ctx->u.dc.next == &src->u.dc.res) { > > ctx->u.dc.next = &ctx->u.dc.res; > > } > > + else if (ctx->state == B2TUncompressChunk) { > > + int cres = inflateCopy(&ctx->u.uc.stream, &src->u.uc.stream); > > + ASSERT(cres == Z_OK); (void)cres; > > + } > > hp = HAlloc(p, PROC_BIN_SIZE); > > ctx->trap_bin = erts_mk_magic_binary_term(&hp, &MSO(p), context_b); > > return ctx; > > > > > > /Sverker, Erlang/OTP > > > > > > On 01/19/2017 04:14 AM, Michel Boaventura wrote: > >> Hi all, > >> > >> I've build erlang 19 from scratch on my gentoo machine but can't use > >> dialyzer, because it complains my beam files weren't compiled with > >> debug_info. > >> > >> I've read and debugged a log of dialyzer and erlang code and find out > >> the > >> issue is that for some reason erlang can't parse the abstract part of > >> the > >> files. > >> > >> To check this I save the abstract part on a file and tried to parse > >> it on > >> my gentoo machine and on a Ubuntu server I have access. For some > >> reason I > >> don't know it reads with no problem Ubuntu but gives me an invalid > >> arg on > >> gentoo. > >> > >> I'm very new to erlang and have no clue of how to debug further. The > >> binary > >> is attached and I'm reading it like: > >> > >> {ok, [Binary]} = file:consult("Abstr"). > >> Term = binary_to_term(Binary). > >> > >> ps: I've sent a message similar to this one on this list, but since > >> it was > >> my first one I think it wasn't accepted (and I do apologize for the > >> double > >> post if you received it). But after it I've discovered the problem with > >> binary_to_term, so that message isn't so useful anyway. > >> > >> > >> > >> _______________________________________________ > >> 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 -- From sverker.eriksson@REDACTED Wed Feb 1 14:54:46 2017 From: sverker.eriksson@REDACTED (Sverker Eriksson) Date: Wed, 1 Feb 2017 14:54:46 +0100 Subject: [erlang-questions] Problem with binary_to_term on different machines In-Reply-To: <22673.58142.446012.235464@gargle.gargle.HOWL> References: <1fc4b57e-17ba-0bd5-7f1b-e451cf34f10a@ericsson.com> <22673.58142.446012.235464@gargle.gargle.HOWL> Message-ID: <37492950-79be-8971-7313-96e5b8b2466b@ericsson.com> https://bugs.erlang.org/browse/ERL-340 I just merged e27119948fc6ab28bea81019720bddaac5b655a7 and pushed to maint and master. Thanks for the reminder, Mikael. WARNING: The preliminary source patch I published earlier (seen below) will leak memory. The fix I just merged has a different solution. /Sverker On 02/01/2017 02:31 PM, Mikael Pettersson wrote: > Sverker Eriksson writes: > > Correction: Bug exists since OTP-17.0. > > > > (and i tags R16B02_yielding_binary_to_term and > > OTP_R16B03_yielding_binary_to_term) > > > > /Sverker > > > > > > On 01/20/2017 05:17 PM, Sverker Eriksson wrote: > > > This is indeed a problem in Erlang VM code (shallow copy of inflate > > > state) > > > that has existed since R16B03, but not caused actual problem until > > > zlib v1.2.9. > > > > > > Fix coming up. Here is a preliminary patch for the impatient. > > Has this landed in OTP master yet? I've been keeping a look out for it, > but haven't seen it (I may have missed it of course). > > I'd like to backport it to our internal OTP-18 and OTP-19. > > /Mikael > > > > > > > > > diff --git a/erts/emulator/beam/external.c > > > b/erts/emulator/beam/external.c > > > index beed847..1c4fff5 100644 > > > --- a/erts/emulator/beam/external.c > > > +++ b/erts/emulator/beam/external.c > > > @@ -1431,6 +1431,10 @@ static B2TContext* b2t_export_context(Process* > > > p, B2TContext* src) > > > if (ctx->state >= B2TDecode && ctx->u.dc.next == &src->u.dc.res) { > > > ctx->u.dc.next = &ctx->u.dc.res; > > > } > > > + else if (ctx->state == B2TUncompressChunk) { > > > + int cres = inflateCopy(&ctx->u.uc.stream, &src->u.uc.stream); > > > + ASSERT(cres == Z_OK); (void)cres; > > > + } > > > hp = HAlloc(p, PROC_BIN_SIZE); > > > ctx->trap_bin = erts_mk_magic_binary_term(&hp, &MSO(p), context_b); > > > return ctx; > > > > > > > > > /Sverker, Erlang/OTP > > > > > > > > > On 01/19/2017 04:14 AM, Michel Boaventura wrote: > > >> Hi all, > > >> > > >> I've build erlang 19 from scratch on my gentoo machine but can't use > > >> dialyzer, because it complains my beam files weren't compiled with > > >> debug_info. > > >> > > >> I've read and debugged a log of dialyzer and erlang code and find out > > >> the > > >> issue is that for some reason erlang can't parse the abstract part of > > >> the > > >> files. > > >> > > >> To check this I save the abstract part on a file and tried to parse > > >> it on > > >> my gentoo machine and on a Ubuntu server I have access. For some > > >> reason I > > >> don't know it reads with no problem Ubuntu but gives me an invalid > > >> arg on > > >> gentoo. > > >> > > >> I'm very new to erlang and have no clue of how to debug further. The > > >> binary > > >> is attached and I'm reading it like: > > >> > > >> {ok, [Binary]} = file:consult("Abstr"). > > >> Term = binary_to_term(Binary). > > >> > > >> ps: I've sent a message similar to this one on this list, but since > > >> it was > > >> my first one I think it wasn't accepted (and I do apologize for the > > >> double > > >> post if you received it). But after it I've discovered the problem with > > >> binary_to_term, so that message isn't so useful anyway. > > >> > > >> > > >> > > >> _______________________________________________ > > >> 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 > From k.petrauskas@REDACTED Wed Feb 1 15:06:16 2017 From: k.petrauskas@REDACTED (Karolis Petrauskas) Date: Wed, 1 Feb 2017 16:06:16 +0200 Subject: [erlang-questions] SFTP In-Reply-To: References: Message-ID: In ssh_sftpd.erl (ssh application, version 4.4) there is condition for determining absolute file path when opening a file: AbsPath = case Root of "" -> Path; _ -> relate_file_name(Path, State0) end, There is no such condition when listing directory or resolving real path. Root = "" by default, if root_dir is not specified by the user. Is this difference in resolving file names intended? Karolis On Wed, Feb 1, 2017 at 1:40 PM, Karolis Petrauskas wrote: > Hi, > > I made a smaller test program to reproduce the problem (shown bellow). > It reproduces the problem only partially, because it can't find the files > in > the Erlang sftp server by relative file names all the time. In my previous > experiments I the misbehaviour was unstable. > > -module(test_sftp). > -export([test/1]). > > make_files(DirName) -> > lists:foreach( > fun (FileName) -> ok = file:write_file(filename:join(DirName, > FileName), [FileName, " contents"]) end, > ["some.txt", "other.txt", "none.txt", "yetanother.txt", "any.txt"] > ), > ok. > > start_server(Port, Cwd) -> > {ok, Pid} = ssh:daemon(Port, [ > {system_dir, "test_sftp_data/sys"}, > {user_dir, "test_sftp_data/usr"}, > {user_passwords, [{"test_sftp", "test_sftp"}]}, > {subsystems, [ssh_sftpd:subsystem_spec([{cwd, Cwd}])]} > ]), > {ok, Pid}. > > check_client(Port, User, Pass, DirName) -> > {ok, ChannelPid, ConnectionRef} = ssh_sftp:start_channel("localhost", > Port, [{user, User}, {password, Pass}]), > {ok, FileNames} = ssh_sftp:list_dir(ChannelPid, DirName), > Result = lists:map(fun (FileName) -> > {DirName, FileName, ssh_sftp:read_file(ChannelPid, > filename:join(DirName, FileName))} > end, FileNames), > ok = ssh_sftp:stop_channel(ChannelPid), > ok = ssh:close(ConnectionRef), > Result. > > test(Pass) -> > ok = make_files("/home/karolis/temp/test_sftp"), > {ok, Pid} = start_server(8022, "/home/karolis"), > lists:foreach(fun (N) -> > io:format("--------------- Test n=~p ---------------------~n", > [N]), > io:format("Erlang-ABS: ~100p~n", [check_client(8022, "test_sftp", > "test_sftp", "/home/karolis/temp/test_sftp")]), > io:format("Erlang-REL: ~100p~n", [check_client(8022, "test_sftp", > "test_sftp", "temp/test_sftp")]), > io:format("OpenSSH-ABS: ~100p~n", [check_client(22, "karolis", > Pass, "/home/karolis/temp/test_sftp")]), > io:format("OpenSSH-REL: ~100p~n", [check_client(22, "karolis", > Pass, "temp/test_sftp")]) > end, lists:seq(1, 10)), > ok = ssh:stop_daemon(Pid), > ok. > > > All the iterations printed the same results (only the output of the first > iteration is shown bellow): > > --------------- Test n=1 --------------------- > Erlang-ABS: [{"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt > contents">>}}] > > > > > *Erlang-REL: [{"temp/test_sftp","none.txt",{error,no_such_file}}, > {"temp/test_sftp","any.txt",{error,no_such_file}}, > {"temp/test_sftp","other.txt",{error,no_such_file}}, > {"temp/test_sftp","yetanother.txt",{error,no_such_file}}, > {"temp/test_sftp","some.txt",{error,no_such_file}}]* > OpenSSH-ABS: [{"/home/karolis/temp/test_sftp","..",{error,failure}}, > {"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt > contents">>}}, > {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt > contents">>}}, > {"/home/karolis/temp/test_sftp",".",{error,failure}}] > OpenSSH-REL: [{"temp/test_sftp","..",{error,failure}}, > {"temp/test_sftp","none.txt",{ok,<<"none.txt contents">>}}, > {"temp/test_sftp","any.txt",{ok,<<"any.txt contents">>}}, > {"temp/test_sftp","other.txt",{ok,<<"other.txt > contents">>}}, > {"temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt > contents">>}}, > {"temp/test_sftp","some.txt",{ok,<<"some.txt contents">>}}, > {"temp/test_sftp",".",{error,failure}}] > > > I repeated the same test with the home dir (relative path = "."), and the > results were the same. > So it seems that the Erlang's sftp server can list directories, but can't > open the files by relative paths. > > Karolis > > On Mon, Jan 30, 2017 at 10:19 PM, Karolis Petrauskas < > k.petrauskas@REDACTED> wrote: > >> I'm using "Erlang/OTP 19 [erts-8.2]", debian package from >> erlang-solutions, version 1:19.2-1. >> >> I'll check that with erlang client and sshd server. I was playing with >> ssh_sftpd server from a command line (sftp), and noticed no problems >> except the cwd problem when combined with root directory restriction. >> >> Karolis >> >> On Mon, Jan 30, 2017 at 8:01 PM, bengt wrote: >> > Greetings, >> > >> > Can you try with sshd, instead of ssh_sftpd ? As a way of halving the >> potential error sources. Also, which Erlang version are you on? >> > >> > >> > bengt >> > >> >> On 30 Jan 2017, at 13:55, Karolis Petrauskas >> wrote: >> >> >> >> Hello, >> >> >> >> I'm trying to use erlang's sftp server and client. In the example >> >> bellow, i use erlang for both: the server and the client. For some >> >> reason, i can't open some files. >> >> >> >> 43> ssh_sftp:list_dir(Ch, "."). >> >> {ok,["other.txt","some.txt"]} >> >> >> >> 44> ssh_sftp:read_file(Ch, "some.txt"). >> >> {ok,<<"some.txt contents">>} >> >> >> >> 45> ssh_sftp:read_file(Ch, "other.txt"). >> >> {error,no_such_file} >> >> >> >> I was able to read both files with absolute file names specified, but >> >> in my case I should not depend on the absolute paths. I could use the >> >> absolute file names when opening files, if I could get the current >> >> working directory from the server, but I cant find any function for >> >> that. >> >> >> >> The server behaviour is also a unclear to me. I can't set the cwd, if >> >> the root option is used when starting the daemon. I have tried various >> >> combinations of root/cwd (cwd is relative to root, or absolute on the >> >> target file system), the sftp client always logins with / as its >> >> current working directory. >> >> >> >> In my case, I use the sftpd only for testing the sftp client in CT. >> >> I'm working on Erlang/OTP 19 [erts-8.2]. >> >> >> >> Would be thankful for any pointers. >> >> >> >> Karolis >> >> _______________________________________________ >> >> 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 n.oxyde@REDACTED Wed Feb 1 16:48:46 2017 From: n.oxyde@REDACTED (Anthony Ramine) Date: Wed, 1 Feb 2017 16:48:46 +0100 Subject: [erlang-questions] Unicode coming to your door Message-ID: B-B-BUT HOW WILL I READ CHINESE CODE?! Just wanted to congratulate Jos? Valim for landing Unicode atoms in OTP. https://github.com/erlang/otp/pull/1078 Regards. From peppe@REDACTED Thu Feb 2 07:52:36 2017 From: peppe@REDACTED (Peter Andersson E) Date: Thu, 2 Feb 2017 07:52:36 +0100 Subject: [erlang-questions] Common Test logs In-Reply-To: <5b05e1d9-6cf5-8ad5-5321-22f06bdabe5d@ninenines.eu> References: <5b05e1d9-6cf5-8ad5-5321-22f06bdabe5d@ninenines.eu> Message-ID: <3ab597eb-be1e-f746-391a-5a6653e4ab89@erlang.org> Hi Lo?c, This seems lika quite a useful feature, and a reasonable one to implement. I'll add a ticket for it! Best regards, Peter Ericsson AB, Erlang/OTP On 01/30/2017 06:30 PM, Lo?c Hoguin wrote: > Hello, > > I am looking for a Common Test option that allows me to restrict the > number of logs Common Test keeps around. > > In practice I don't always care about the test runs I did last month, > I only want the 10 or so most recents. I would like to configure > Common Test so that it deletes older runs automatically. Today I > eventually "rm -rf logs" when it gets too big, but it would be good if > I didn't have to think about it. > > Is there such an option (perhaps undocumented) and if not, can it be > considered adding it? This way when ct_run starts it can cleanup > automatically. > > Thanks, > From cean.ebengt@REDACTED Thu Feb 2 08:10:32 2017 From: cean.ebengt@REDACTED (bengt) Date: Thu, 2 Feb 2017 08:10:32 +0100 Subject: [erlang-questions] Looking for Erlang code that handles PDF file attachments In-Reply-To: References: Message-ID: Greetings, I forgot to thank Joe for this very helpful code/document. I apologise. The main benefit is that it explains how the PDF magic works, but I would like to ask if it is allowed to copy some of the code? Keeping the original %% Module: pdf.erl %% Author: Joe Armstrong (joe@REDACTED) %% Date: 2001-12-14 %% Purpose: Manipulate PDF files %% Pack and unpack files into PDF files of course. bengt > On 26 Jan 2017, at 12:43, Joe Armstrong wrote: > > I did exactly this a while back. > > The enclosed PDF has an erlang program packed inside it. > The erlang program can be used to pack and unpack things inside PDF. > > PDF is after all, just a container format (like a zip file) > > Hint take a look at the end of erlpdf.pdf in a text editor. > > Actually since I always want to read the documentation first - I thought the > code should be *inside* the documentation and NOT the other way around. > > Cheers > > /Joe > > > On Wed, Jan 25, 2017 at 10:06 PM, bengt wrote: >> Greetings, >> >> I would like to attach files (or some sort of binary content, anyway) to PDF >> files, without destroying the PDF'ness of the file. I would also like to be >> able to read the created PDF file and be able to tell what is the attachment >> (and what is the original content). I have found Itext (Java, see >> http://itextpdf.com/). It seems to be able to do that and everything else >> too, but is there any other alternative? Preferably in Erlang. >> >> >> bengt >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang@REDACTED Thu Feb 2 11:13:07 2017 From: erlang@REDACTED (Joe Armstrong) Date: Thu, 2 Feb 2017 11:13:07 +0100 Subject: [erlang-questions] Looking for Erlang code that handles PDF file attachments In-Reply-To: References: Message-ID: So you have discovered the secret of the code :-) This was done as a joke but I think you're the only person who got it. Feel free to use the code. I suspect that most people (programmers included) think that PDF is a document format - well It's not - it's a *container format* (like a ZIP file) - it Just so happens that 99.99999999999% of all PDF files contain documents encoded in a subset of postscript. It's all rather easy all you have to do is read the 1310 [1] page PDF spec [2]. I can highly recommend reading this - I think PDF and Postscript are outstanding examples of good design [3]. /Joe [1] I'm not joking [2] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf [3] The designers of Postscript actually asked traditional typographers about page layout before designing a language. On Thu, Feb 2, 2017 at 8:10 AM, bengt wrote: > Greetings, > > I forgot to thank Joe for this very helpful code/document. I apologise. > > The main benefit is that it explains how the PDF magic works, but I would > like to ask if it is allowed to copy some of the code? > Keeping the original > %% Module: pdf.erl > %% Author: Joe Armstrong (joe@REDACTED) > %% Date: 2001-12-14 > %% Purpose: Manipulate PDF files > %% Pack and unpack files into PDF files > of course. > > > bengt > > On 26 Jan 2017, at 12:43, Joe Armstrong wrote: > > I did exactly this a while back. > > The enclosed PDF has an erlang program packed inside it. > The erlang program can be used to pack and unpack things inside PDF. > > PDF is after all, just a container format (like a zip file) > > Hint take a look at the end of erlpdf.pdf in a text editor. > > Actually since I always want to read the documentation first - I thought the > code should be *inside* the documentation and NOT the other way around. > > Cheers > > /Joe > > > On Wed, Jan 25, 2017 at 10:06 PM, bengt wrote: > > Greetings, > > I would like to attach files (or some sort of binary content, anyway) to PDF > files, without destroying the PDF'ness of the file. I would also like to be > able to read the created PDF file and be able to tell what is the attachment > (and what is the original content). I have found Itext (Java, see > http://itextpdf.com/). It seems to be able to do that and everything else > too, but is there any other alternative? Preferably in Erlang. > > > bengt > > _______________________________________________ > 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 hans.r.nilsson@REDACTED Thu Feb 2 12:21:38 2017 From: hans.r.nilsson@REDACTED (Hans Nilsson R) Date: Thu, 2 Feb 2017 12:21:38 +0100 Subject: [erlang-questions] Patch package OTP 18.3.4.5 released Message-ID: <87746e25-6d09-4768-5dbb-3ba04df112fd@ericsson.com> Patch Package: OTP 18.3.4.5 Git Tag: OTP-18.3.4.5 Date: 2017-02-02 Trouble Report Id: OTP-13425, OTP-13866, OTP-13869, OTP-14159, OTP-14166, OTP-14169, OTP-14173 Seq num: seq13261, seq13262 System: OTP Release: 18 Application: crypto-3.6.3.1, erts-7.3.1.3, inets-6.2.4.1, ssh-4.2.2.3 Predecessor: OTP 18.3.4.4 Check out the git tag OTP-18.3.4.5, 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. --------------------------------------------------------------------- --- crypto-3.6.3.1 -------------------------------------------------- --------------------------------------------------------------------- The crypto-3.6.3.1 application can be applied independently of other applications on a full OTP 18 installation. --- Improvements and New Features --- OTP-14169 Application(s): crypto, ssh Related Id(s): seq13261 Key exchange algorithms diffie-hellman-group-exchange-sha* optimized, up to a factor of 11 for the slowest ( = biggest and safest) one. Full runtime dependencies of crypto-3.6.3.1: erts-6.0, kernel-3.0, stdlib-2.0 --------------------------------------------------------------------- --- erts-7.3.1.3 ---------------------------------------------------- --------------------------------------------------------------------- The erts-7.3.1.3 application can be applied independently of other applications on a full OTP 18 installation. --- Fixed Bugs and Malfunctions --- OTP-13425 Application(s): erts Related Id(s): ERL-94 A bug has been fixed where if erlang was started +B on a unix platform it would be killed by a SIGUSR2 signal when creating a crash dump. OTP-13866 Application(s): erts Calls to erl_drv_send_term() or erl_drv_output_term() from a non-scheduler thread while the corresponding port was invalid caused the emulator to enter an inconsistent state which eventually caused an emulator crash. OTP-13869 Application(s): erts Driver and NIF operations accessing processes or ports could cause an emulator crash when used from non-scheduler threads. Those operations are: -- erl_drv_send_term() -- driver_send_term() -- erl_drv_output_term() -- driver_output_term() -- enif_send() -- enif_port_command() OTP-14159 Application(s): erts Related Id(s): ERL-340 Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0. Full runtime dependencies of erts-7.3.1.3: kernel-4.0, sasl-2.4, stdlib-2.5 --------------------------------------------------------------------- --- inets-6.2.4.1 --------------------------------------------------- --------------------------------------------------------------------- The inets-6.2.4.1 application can be applied independently of other applications on a full OTP 18 installation. --- Fixed Bugs and Malfunctions --- OTP-14173 Application(s): inets Related Id(s): seq13262 Shutdown gracefully on connection or TLS handshake errors Full runtime dependencies of inets-6.2.4.1: erts-6.0, kernel-3.0, mnesia-4.12, runtime_tools-1.8.14, ssl-5.3.4, stdlib-2.0 --------------------------------------------------------------------- --- ssh-4.2.2.3 ----------------------------------------------------- --------------------------------------------------------------------- Note! The ssh-4.2.2.3 application can *not* be applied independently of other applications on an arbitrary OTP 18 installation. On a full OTP 18 installation, also the following runtime dependency has to be satisfied: -- crypto-3.6.3.1 (first satisfied in OTP 18.3.4.5) --- Fixed Bugs and Malfunctions --- OTP-14166 Application(s): ssh The key exchange algorithm diffie-hellman-group-exchange-sha* has a server-option {dh_gex_limits,{Min,Max}}. There was a hostkey signature validation error on the client side if the option was used and the Min or the Max differed from the corresponding values obtained from the client. This bug is now corrected. --- Improvements and New Features --- OTP-14169 Application(s): crypto, ssh Related Id(s): seq13261 Key exchange algorithms diffie-hellman-group-exchange-sha* optimized, up to a factor of 11 for the slowest ( = biggest and safest) one. Full runtime dependencies of ssh-4.2.2.3: crypto-3.6.3.1, erts-6.0, kernel-3.0, public_key-0.22, stdlib-2.3 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4101 bytes Desc: S/MIME Cryptographic Signature URL: From fly@REDACTED Thu Feb 2 13:57:26 2017 From: fly@REDACTED (Fred Youhanaie) Date: Thu, 2 Feb 2017 12:57:26 +0000 Subject: [erlang-questions] Looking for Erlang code that handles PDF file attachments In-Reply-To: References: Message-ID: On 02/02/17 10:13, Joe Armstrong wrote: > > I can highly recommend reading this - I think PDF and Postscript are > outstanding examples of good design [3]. And, of course, like all good designs they are open to abuse ;-) http://seclists.org/fulldisclosure/2017/Jan/89 Cheers, f. From n.oxyde@REDACTED Thu Feb 2 14:25:05 2017 From: n.oxyde@REDACTED (Anthony Ramine) Date: Thu, 2 Feb 2017 14:25:05 +0100 Subject: [erlang-questions] Looking for Erlang code that handles PDF file attachments In-Reply-To: References: Message-ID: https://twitter.com/simoncozens/status/806454191262531584 > Le 2 f?vr. 2017 ? 11:13, Joe Armstrong a ?crit : > > it's a *container format* From Catenacci@REDACTED Fri Feb 3 00:13:40 2017 From: Catenacci@REDACTED (Onorio Catenacci) Date: Thu, 2 Feb 2017 18:13:40 -0500 Subject: [erlang-questions] [ANNOUNCEMENT] Erlang 19.2 On Chocolatey NuGet Message-ID: Hi all, For the four of us that care, I've updated the Chocolatey NuGet (CNG) Package for Erlang to version 19.2. If you're unfamiliar with CNG it's analogous to apt-get or yum except for Windows. I also tried to update the CNG package for Rebar to 3.3.4 but it seems to be stuck in moderation right now for some reason. I mean there were no issues with the review so I don't anticipate an issue but if it's delayed for some reason I'll let everyone know a new ETA. -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.lambrichs@REDACTED Fri Feb 3 09:56:09 2017 From: marc.lambrichs@REDACTED (Marc Lambrichs) Date: Fri, 03 Feb 2017 09:56:09 +0100 Subject: [erlang-questions] FOSDEM 2017 anyone? In-Reply-To: References: Message-ID: <589445A9.8070608@gmail.com> I'm attending as well. Haven't studied the schedule in detail, but focus will be on graph databases, go programming and config mgmt sessions. Just ping me and we'll hook up. Best, Marc > Karl Velicka > 13 January 2017 at 11:49via Postbox > > Hello! > > I am attending, and would be interested in meeting some Erlang users! > > And indeed, it's a shame that there don't seem to be any Erlang > related talks.. > > All the best, > Karl > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > Erik Reitsma > 13 January 2017 at 10:00via Postbox > > Hi all! > > Anyone else going to FOSDEM 2017 in Brussels? I did not see any Erlang > talks on this year's schedule, but perhaps some other Erlang users > would like to meet up there and have a chat about our favorite (?) > language? > > Regards, > > *Erik. > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- Kind regards|Met vriendelijke groet, Marc Lambrichs ============================== M?lange IT B.V. Postbus 3581 1001 AJ Amsterdam ============================== T +31 (0)20 618 58 52 M +31 (0)6 1296 1703 ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lloyd@REDACTED Sat Feb 4 19:07:01 2017 From: lloyd@REDACTED (Lloyd R. Prentice) Date: Sat, 4 Feb 2017 13:07:01 -0500 Subject: [erlang-questions] Erlguten plus TrueType fonts Message-ID: Hello, I'd like to add OpenSource TrueType fonts to Erlguen. Can anyone point the way? Many thanks, LRP Sent from my iPad From kuna.prime@REDACTED Sat Feb 4 23:25:33 2017 From: kuna.prime@REDACTED (Karlo Kuna) Date: Sat, 4 Feb 2017 23:25:33 +0100 Subject: [erlang-questions] NIFS Message-ID: i am using c++ to implement nif module and i am using nifpp (https://github.com/goertzenator/nifpp) now i can compile my project but on function call i get: Failed to load NIF library: my.so undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE can someone give me a hint what is this error? is it linkage, or bad call, or something else and how go about solving it? -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang.org@REDACTED Sat Feb 4 23:45:16 2017 From: erlang.org@REDACTED (Stanislaw Klekot) Date: Sat, 4 Feb 2017 23:45:16 +0100 Subject: [erlang-questions] NIFS In-Reply-To: References: Message-ID: <20170204224516.GA13261@jarowit.net> On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote: > i am using c++ to implement nif module > and i am using nifpp (https://github.com/goertzenator/nifpp) > > now i can compile my project but on function call i get: > > Failed to load NIF library: my.so undefined symbol: > _ZTVN10__cxxabiv117__class_type_infoE > > can someone give me a hint what is this error? is it linkage, or bad call, > or something else > and how go about solving it? It's because of name mangling by C++ compiler (necessary thing for overloaded functions to work). It's a totally expected problem when you're writing in C++ a library that needs to be used by system written in C. You need to disable name mangling for your NIF function. -- Stanislaw Klekot From hugo@REDACTED Sun Feb 5 00:45:17 2017 From: hugo@REDACTED (Hugo Mills) Date: Sat, 4 Feb 2017 23:45:17 +0000 Subject: [erlang-questions] Debugging yecc grammars: what techniques are available? Message-ID: <20170204234517.GA21899@carfax.org.uk> I'm in the process of writing a domain-specific language, using a custom lexer and a yecc parser. In the process of attempting to add a new feature to the grammar, I've managed to break what appears to me to be a completely unrelated piece of the grammar: I'm adding a structure similar to a list comprehension, and suddenly the integer comparison operators have stopped working in one group of cases. What approaches are there for debugging this kind of problem? The best I can some up with is inspection of the .yrl source in detail, but that's not helping. How else can I work out what the issue is? Obviously, I could post the grammar here for inspection by more experienced minds than mine, but I'd prefer to find better tooling and techniques rather than mere appeal to higher authority... Hugo. -- Hugo Mills | Strive for apathy! hugo@REDACTED carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 | Andrew Zalotocky -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From kuna.prime@REDACTED Sun Feb 5 06:48:08 2017 From: kuna.prime@REDACTED (Karlo Kuna) Date: Sun, 5 Feb 2017 06:48:08 +0100 Subject: [erlang-questions] NIFS In-Reply-To: <20170204224516.GA13261@jarowit.net> References: <20170204224516.GA13261@jarowit.net> Message-ID: now i'm getting: undefined symbol: _ZNSt8ios_base4InitD1Ev On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot wrote: > On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote: > > i am using c++ to implement nif module > > and i am using nifpp (https://github.com/goertzenator/nifpp) > > > > now i can compile my project but on function call i get: > > > > Failed to load NIF library: my.so undefined symbol: > > _ZTVN10__cxxabiv117__class_type_infoE > > > > can someone give me a hint what is this error? is it linkage, or bad > call, > > or something else > > and how go about solving it? > > It's because of name mangling by C++ compiler (necessary thing for > overloaded functions to work). It's a totally expected problem when > you're writing in C++ a library that needs to be used by system written > in C. You need to disable name mangling for your NIF function. > > -- > Stanislaw Klekot > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kuna.prime@REDACTED Sun Feb 5 07:39:07 2017 From: kuna.prime@REDACTED (Karlo Kuna) Date: Sun, 5 Feb 2017 07:39:07 +0100 Subject: [erlang-questions] NIFS In-Reply-To: References: <20170204224516.GA13261@jarowit.net> Message-ID: also ldd -r my.so gives: undefined symbol: _ZNSt8ios_base4InitD1Ev undefined symbol: enif_make_atom undefined symbol: _ZNSt8ios_base4InitC1Ev On Sun, Feb 5, 2017 at 6:48 AM, Karlo Kuna wrote: > now i'm getting: > undefined symbol: _ZNSt8ios_base4InitD1Ev > > > > On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot > wrote: > >> On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote: >> > i am using c++ to implement nif module >> > and i am using nifpp (https://github.com/goertzenator/nifpp) >> > >> > now i can compile my project but on function call i get: >> > >> > Failed to load NIF library: my.so undefined symbol: >> > _ZTVN10__cxxabiv117__class_type_infoE >> > >> > can someone give me a hint what is this error? is it linkage, or bad >> call, >> > or something else >> > and how go about solving it? >> >> It's because of name mangling by C++ compiler (necessary thing for >> overloaded functions to work). It's a totally expected problem when >> you're writing in C++ a library that needs to be used by system written >> in C. You need to disable name mangling for your NIF function. >> >> -- >> Stanislaw Klekot >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From walter.weinmann@REDACTED Sun Feb 5 07:49:10 2017 From: walter.weinmann@REDACTED (Walter Weinmann) Date: Sun, 5 Feb 2017 07:49:10 +0100 Subject: [erlang-questions] Debugging yecc grammars: what techniques are available? In-Reply-To: <20170204234517.GA21899@carfax.org.uk> References: <20170204234517.GA21899@carfax.org.uk> Message-ID: I've done a project with he OpenCypher language: https://github.com/walter-weinmann/ocparse https://github.com/walter-weinmann/ocparse. This should be a good example how to apply leex and yecc. I've done also a second one, but honestly I'm very unhappy with the limitations of LALR parsing. I'm now in the process to switch to neotoma , which is based on Parser Expression Grammars and it looks very promising. Regards Walter On 5 February 2017 at 00:45, Hugo Mills wrote: > I'm in the process of writing a domain-specific language, using a > custom lexer and a yecc parser. In the process of attempting to add a > new feature to the grammar, I've managed to break what appears to me > to be a completely unrelated piece of the grammar: I'm adding a > structure similar to a list comprehension, and suddenly the integer > comparison operators have stopped working in one group of cases. > > What approaches are there for debugging this kind of problem? The > best I can some up with is inspection of the .yrl source in detail, > but that's not helping. How else can I work out what the issue is? > > Obviously, I could post the grammar here for inspection by more > experienced minds than mine, but I'd prefer to find better tooling and > techniques rather than mere appeal to higher authority... > > Hugo. > > -- > Hugo Mills | Strive for apathy! > hugo@REDACTED carfax.org.uk | > http://carfax.org.uk/ | > PGP: E2AB1DE4 | Andrew > Zalotocky > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > __________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nbartley@REDACTED Sun Feb 5 07:58:36 2017 From: nbartley@REDACTED (nato) Date: Sat, 4 Feb 2017 22:58:36 -0800 Subject: [erlang-questions] relup after hotfix Message-ID: If I had a module in a target release that I've patched with a simple `code:load_file/1` then I wanted to perform a bone fide OTP release update, and also `load_module' for that same module via appup etc., is the release handler going to be muddled at all? I know some of the ins and outs for release handling, but this unique scenario got me scratching my head. From dgud@REDACTED Sun Feb 5 08:55:19 2017 From: dgud@REDACTED (Dan Gudmundsson) Date: Sun, 05 Feb 2017 07:55:19 +0000 Subject: [erlang-questions] Erlguten plus TrueType fonts In-Reply-To: References: Message-ID: Is this something you can use? https://github.com/dgud/wxglfs/blob/master/truetype.erl /Dan On Sat, Feb 4, 2017 at 7:07 PM Lloyd R. Prentice wrote: > Hello, > > I'd like to add OpenSource TrueType fonts to Erlguen. > > Can anyone point the way? > > Many thanks, > > LRP > > Sent from my iPad > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zv@REDACTED Sun Feb 5 09:01:39 2017 From: zv@REDACTED (zv) Date: Sun, 5 Feb 2017 00:01:39 -0800 Subject: [erlang-questions] NIFS In-Reply-To: References: <20170204224516.GA13261@jarowit.net> Message-ID: I'm not familiar with ~nifpp~ in particular, but if you are receiving an error like > undefined symbol: enif_make_atom There are underlying issues beyond symbol mangling. I assume you are including erl_nif.h, directly or otherwise. As far as the mangling is concerned, you haven't made it clear if you are using objdump to extract the correct symbol name or if you are relying on the compiler, although Stanislaw has already mentioned the issue so you have a thread to follow. If you are getting an 'undefined symbol' on function call, you are dynamically linking your library, which means you need to make sure that your library is on the linker path during runtime as that's how the dynamic library loader will find it (which happens when you load the nif in Erlang, it spiders out to the libraries that library needs until it can resolve all the required symbols). An alternative approach would be to make your my.so a static library my.a and then link your nif against that which removes some of these issues in finding libraries. You also might want to just consider an "extern C" linkage declaration, totally bypassing any mangling or other C++ symbol decoration idiosyncrasies. - zephyr From kuna.prime@REDACTED Sun Feb 5 09:42:30 2017 From: kuna.prime@REDACTED (Karlo Kuna) Date: Sun, 5 Feb 2017 09:42:30 +0100 Subject: [erlang-questions] NIFS In-Reply-To: References: <20170204224516.GA13261@jarowit.net> Message-ID: problem is that i am already using "extern C" declaration, and as far as symbol names i'm relying on compiler so far i have noticed that some problems go away if i don't include some headers (iostream) and that's fine but now when i try to use std::string in nif implementation, when i call it i get: {load_failed,"Failed to load NIF library: './priv/my.so: undefined symbol: __gxx_personality_v0'" On Sun, Feb 5, 2017 at 9:01 AM, zv wrote: > I'm not familiar with ~nifpp~ in particular, but if you are receiving an > error like > > > undefined symbol: enif_make_atom > > There are underlying issues beyond symbol mangling. > > I assume you are including erl_nif.h, directly or otherwise. As far as the > mangling is concerned, you haven't made it clear if you are using objdump > to extract the correct symbol name or if you are relying on the compiler, > although Stanislaw has already mentioned the issue so you have a thread to > follow. > > If you are getting an 'undefined symbol' on function call, you are > dynamically linking your library, which means you need to make sure that > your library is on the linker path during runtime as that's how the dynamic > library loader will find it (which happens when you load the nif in Erlang, > it spiders out to the libraries that library needs until it can resolve all > the required symbols). > > An alternative approach would be to make your my.so a static library my.a > and then link your nif against that which removes some of these issues in > finding libraries. > > You also might want to just consider an "extern C" linkage declaration, > totally bypassing any mangling or other C++ symbol decoration > idiosyncrasies. > > - zephyr > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikpelinux@REDACTED Sun Feb 5 11:11:57 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Sun, 5 Feb 2017 11:11:57 +0100 Subject: [erlang-questions] NIFS In-Reply-To: References: <20170204224516.GA13261@jarowit.net> Message-ID: <22678.64109.509925.741232@gargle.gargle.HOWL> Karlo Kuna writes: > also > ldd -r my.so > gives: > undefined symbol: _ZNSt8ios_base4InitD1Ev > undefined symbol: enif_make_atom > undefined symbol: _ZNSt8ios_base4InitC1Ev The enif_make_atom one is expected; it will be satisfied by the VM itself when you load the .so. The others indicate that the dynamic linker is unable to find all external shared libraries you depend on, in particular ones that should have come from the system's C++ / libstdc++ installation. Something's fishy with your system or your build/deploy procedures. > > > > On Sun, Feb 5, 2017 at 6:48 AM, Karlo Kuna wrote: > > > now i'm getting: > > undefined symbol: _ZNSt8ios_base4InitD1Ev > > > > > > > > On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot > > wrote: > > > >> On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote: > >> > i am using c++ to implement nif module > >> > and i am using nifpp (https://github.com/goertzenator/nifpp) > >> > > >> > now i can compile my project but on function call i get: > >> > > >> > Failed to load NIF library: my.so undefined symbol: > >> > _ZTVN10__cxxabiv117__class_type_infoE > >> > > >> > can someone give me a hint what is this error? is it linkage, or bad > >> call, > >> > or something else > >> > and how go about solving it? > >> > >> It's because of name mangling by C++ compiler (necessary thing for > >> overloaded functions to work). It's a totally expected problem when > >> you're writing in C++ a library that needs to be used by system written > >> in C. You need to disable name mangling for your NIF function. > >> > >> -- > >> Stanislaw Klekot > >> > > > > > > ---------------------------------------------------------------------- > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -- From mikpelinux@REDACTED Sun Feb 5 11:18:39 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Sun, 5 Feb 2017 11:18:39 +0100 Subject: [erlang-questions] Debugging yecc grammars: what techniques are available? In-Reply-To: <20170204234517.GA21899@carfax.org.uk> References: <20170204234517.GA21899@carfax.org.uk> Message-ID: <22678.64511.338133.200620@gargle.gargle.HOWL> Hugo Mills writes: > I'm in the process of writing a domain-specific language, using a > custom lexer and a yecc parser. In the process of attempting to add a > new feature to the grammar, I've managed to break what appears to me > to be a completely unrelated piece of the grammar: I'm adding a > structure similar to a list comprehension, and suddenly the integer > comparison operators have stopped working in one group of cases. > > What approaches are there for debugging this kind of problem? The > best I can some up with is inspection of the .yrl source in detail, > but that's not helping. How else can I work out what the issue is? > > Obviously, I could post the grammar here for inspection by more > experienced minds than mine, but I'd prefer to find better tooling and > techniques rather than mere appeal to higher authority... Caveat: while I have experience with various parsing techniques, including LALR(1), I have none with the yecc tool. Does yecc issue any warnings about shift/reduce or reduce/reduce conflicts? If it does, you need to investigate those and resolve them. With yacc and bison it's possible to manually inspect the LALR(1) automaton for debugging. From carlsson.richard@REDACTED Sun Feb 5 17:02:39 2017 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Sun, 5 Feb 2017 17:02:39 +0100 Subject: [erlang-questions] Debugging yecc grammars: what techniques are available? In-Reply-To: References: <20170204234517.GA21899@carfax.org.uk> Message-ID: It can be pretty tricky to figure out what's wrong with a grammar, in particular if the parser generator doesn't have support for emitting various kinds of debug information. Here are some links that might help you: http://www.tldp.org/HOWTO/Lex-YACC-HOWTO-7.html http://www.cs.man.ac.uk/~pjj/cs211/ho/node7.html http://dinosaur.compilertools.net/bison/bison_11.html You might want to consider porting the grammar to Bison (which has better debugging support) and use that instead for the development/debugging phase, then port it back to yecc for the final implementation when done. /Richard 2017-02-05 7:49 GMT+01:00 Walter Weinmann : > I've done a project with he OpenCypher > language: https://github.com/walter-weinmann/ocparsehttps:/ > /github.com/walter-weinmann/ocparse. This should be a good example how to > apply leex and yecc. > > I've done also a second one, but honestly I'm very unhappy with the > limitations of LALR parsing. I'm now in the process to switch to neotoma > , which is based on Parser Expression Grammars > and it looks very promising. > > Regards > > Walter > > > On 5 February 2017 at 00:45, Hugo Mills wrote: > >> I'm in the process of writing a domain-specific language, using a >> custom lexer and a yecc parser. In the process of attempting to add a >> new feature to the grammar, I've managed to break what appears to me >> to be a completely unrelated piece of the grammar: I'm adding a >> structure similar to a list comprehension, and suddenly the integer >> comparison operators have stopped working in one group of cases. >> >> What approaches are there for debugging this kind of problem? The >> best I can some up with is inspection of the .yrl source in detail, >> but that's not helping. How else can I work out what the issue is? >> >> Obviously, I could post the grammar here for inspection by more >> experienced minds than mine, but I'd prefer to find better tooling and >> techniques rather than mere appeal to higher authority... >> >> Hugo. >> >> -- >> Hugo Mills | Strive for apathy! >> hugo@REDACTED carfax.org.uk | >> http://carfax.org.uk/ | >> PGP: E2AB1DE4 | Andrew >> Zalotocky >> >> _______________________________________________ >> 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 Dinislam.Salikhov@REDACTED Mon Feb 6 14:18:05 2017 From: Dinislam.Salikhov@REDACTED (Salikhov Dinislam) Date: Mon, 6 Feb 2017 16:18:05 +0300 Subject: [erlang-questions] fd and controlling process Message-ID: <056cb710-bb60-8279-584c-bc81631ec0b4@kaspersky.com> Hi! I have a Unix file descriptor of Erlang VM process. I know that it is a TCP socket in ESTABLISHED state. Is there a way to receive an Erlang port of the socket? Is there a way to receive controlling process of the socket? Salikhov Dinislam From vinoski@REDACTED Mon Feb 6 14:30:16 2017 From: vinoski@REDACTED (Steve Vinoski) Date: Mon, 6 Feb 2017 08:30:16 -0500 Subject: [erlang-questions] fd and controlling process In-Reply-To: <056cb710-bb60-8279-584c-bc81631ec0b4@kaspersky.com> References: <056cb710-bb60-8279-584c-bc81631ec0b4@kaspersky.com> Message-ID: On Mon, Feb 6, 2017 at 8:18 AM, Salikhov Dinislam < Dinislam.Salikhov@REDACTED> wrote: > Hi! > > I have a Unix file descriptor of Erlang VM process. > I know that it is a TCP socket in ESTABLISHED state. > Is there a way to receive an Erlang port of the socket? > Is there a way to receive controlling process of the socket? See the {fd, integer() >= 0} option that various gen_tcp functions can take: http://erlang.org/doc/man/gen_tcp.html --steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dinislam.Salikhov@REDACTED Mon Feb 6 15:12:04 2017 From: Dinislam.Salikhov@REDACTED (Salikhov Dinislam) Date: Mon, 6 Feb 2017 17:12:04 +0300 Subject: [erlang-questions] fd and controlling process In-Reply-To: References: <056cb710-bb60-8279-584c-bc81631ec0b4@kaspersky.com> Message-ID: <49b5442a-7d16-a2a4-c881-b1fc881e8f75@kaspersky.com> IIUC, {fd, integer() >= 0} allows to use the socket received from socket() C function (or somehow else, but I can't propose another way). > Is there a way to receive controlling process of the socket? If we managed to get the port (though I still don't know the way), the controlling process can be obtained as following: {_, Pid} = erlang:port_info(Port, connected). On 02/06/2017 04:30 PM, Steve Vinoski wrote: > > > On Mon, Feb 6, 2017 at 8:18 AM, Salikhov Dinislam > > wrote: > > Hi! > > I have a Unix file descriptor of Erlang VM process. > I know that it is a TCP socket in ESTABLISHED state. > Is there a way to receive an Erlang port of the socket? > Is there a way to receive controlling process of the socket? > > > See the {fd, integer() >= 0} option that various gen_tcp functions can > take: > > http://erlang.org/doc/man/gen_tcp.html > > --steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dinislam.Salikhov@REDACTED Mon Feb 6 16:18:42 2017 From: Dinislam.Salikhov@REDACTED (Salikhov Dinislam) Date: Mon, 6 Feb 2017 18:18:42 +0300 Subject: [erlang-questions] fd and controlling process In-Reply-To: <49b5442a-7d16-a2a4-c881-b1fc881e8f75@kaspersky.com> References: <056cb710-bb60-8279-584c-bc81631ec0b4@kaspersky.com> <49b5442a-7d16-a2a4-c881-b1fc881e8f75@kaspersky.com> Message-ID: <036fa593-3286-9631-2d62-410b75df69e2@kaspersky.com> > If we managed to get the port (though I still don't know the way) Finally, I've managed to do it: F = fun(P, Acc) -> case catch prim_inet:getfd(P) of {ok, FD} -> [{FD, P} | Acc]; _ -> Acc end end. L = lists:foldl(F, [], erlang:ports()). Port = proplists:get_value(MyFD, L). Pay attention that prim_inet is internal module of VM, so it's usage should be avoided in any production code! Salikhov Dinislam On 02/06/2017 05:12 PM, Salikhov Dinislam wrote: > IIUC, {fd, integer() >= 0} allows to use the socket received from > socket() C function (or somehow else, but I can't propose another way). > > > Is there a way to receive controlling process of the socket? > If we managed to get the port (though I still don't know the way), the > controlling process can be obtained as following: > {_, Pid} = erlang:port_info(Port, connected). > > On 02/06/2017 04:30 PM, Steve Vinoski wrote: >> >> >> On Mon, Feb 6, 2017 at 8:18 AM, Salikhov Dinislam >> > > wrote: >> >> Hi! >> >> I have a Unix file descriptor of Erlang VM process. >> I know that it is a TCP socket in ESTABLISHED state. >> Is there a way to receive an Erlang port of the socket? >> Is there a way to receive controlling process of the socket? >> >> >> See the {fd, integer() >= 0} option that various gen_tcp functions >> can take: >> >> http://erlang.org/doc/man/gen_tcp.html >> >> --steve > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benmmurphy@REDACTED Mon Feb 6 18:48:36 2017 From: benmmurphy@REDACTED (Ben Murphy) Date: Mon, 6 Feb 2017 17:48:36 +0000 Subject: [erlang-questions] SSL: Getting master_secret and client_random (or premaster_secret) In-Reply-To: References: Message-ID: We have a hacky way to do this on R19 (Probably only works for our particular version because these internal records can change). We hooked ssl:connect using the tracing facility because we couldn't deploy a code change. https://gist.github.com/benmmurphy/d2918d3aaea46372501b851814f4ce8a DumpMS = fun() -> FindMs = fun(Socket) -> Pid = element(3, Socket), Connection = sys:get_state(Pid), State = element(2, Connection), Session = element(18, State), SessionId = element(2, Session), MasterSecret = element(7, Session), {SessionId, MasterSecret} end, Hex = fun(Id) -> << <> ||<> <= Id, Y <- integer_to_list(X,16)>> end, {ok, File} = file:open("/tmp/tls.log", [write, append]), DebugHandler = fun DebugHandler() -> receive {trace, _Pid, return_from, _MFA, {ok, Socket}} -> try {SessionId, MasterSecret} = FindMs(Socket), Bytes = io_lib:format("RSA Session-ID:~s Master-Key:~s~n", [Hex(SessionId), Hex(MasterSecret)]), file:write(File, Bytes), ok catch C:E -> ok end, DebugHandler(); quit -> file:close(File), ok; _ -> DebugHandler() end, ok end, Pid = spawn(DebugHandler), register(ms_tracer, Pid), erlang:trace(processes, true, [{tracer, Pid}, call]), erlang:trace_pattern({ssl, connect, 2}, [{['_', '_'], [], [{return_trace}]}]), erlang:trace_pattern({ssl, connect, 3}, [{['_', '_', '_'], [], [{return_trace}]}]), erlang:trace_pattern({ssl, connect, 4}, [{['_', '_', '_', '_'], [], [{return_trace}]}]), Pid end. QuitMS = fun() -> erlang:trace(all, false, [{tracer, whereis(ms_tracer)}, call]), ms_tracer ! quit end. On Thu, Jan 5, 2017 at 2:20 PM, Roger Lipscombe wrote: > We're using ECDHE and DHE ciphers for our SSL connections. This > provides perfect forward secrecy, which is good, but it makes it > impossible to decipher packet captures in wireshark, which is > expected, and also good, almost all of the time. > > Sometimes, however, we *do* need to decipher the traffic. > > Note that we own both the client (which is embedded) and the server > (which uses Erlang -- otherwise I wouldn't be asking here -- and > ranch). We *could* offer a different cipher suite on the server, which > would disable PFS, but would do it for all connections. I'd prefer > something a bit more fine-grained. > > You can feed a key log to Wireshark, as documented at > https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format, > and it'll correctly decipher the traffic for that connection. > > I'd like to find a way to generate a key log file. This requires > either (client_random, master_secret) or (encrypted_premaster_secret, > premaster_secret). > > Note that I'm looking at the OTP 17.5 source, because that's what we're using. > > It would seem that premaster_secret is not stored past the initial > negotiation, but the client_random and master_secret values are in the > #security_parameters record in the #connection_state record in the > #connection_states record, which is in the #state record of the SSL > connection pid. > > But I can't see any (clean) way to retrieve these values, in order to > generate a key log suitable for Wireshark. > > Is there any clean way to do this in OTP 17.5, or is there a supported > way to do this in OTP 18.x or 19.x? > > Regards, > Roger. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From essen@REDACTED Mon Feb 6 21:05:50 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Mon, 6 Feb 2017 21:05:50 +0100 Subject: [erlang-questions] erl_tracer optional callbacks Message-ID: Hello, I have been studying erl_tracer a little, and will start using it tomorrow. There's one thing I can't understand. What's the rationale behind having both a trace/enabled set of functions, and then equivalent functions with smaller scope? When would I want to use one of the smaller functions? Is it an optimization, so fewer atom values need to be checked every time? Thanks, -- Lo?c Hoguin https://ninenines.eu From lukas.larsson@REDACTED Mon Feb 6 21:32:07 2017 From: lukas.larsson@REDACTED (Lukas Larsson) Date: Mon, 6 Feb 2017 21:32:07 +0100 Subject: [erlang-questions] erl_tracer optional callbacks In-Reply-To: References: Message-ID: > On 6 Feb 2017, at 21:05, Lo?c Hoguin wrote: > > Hello, > > I have been studying erl_tracer a little, and will start using it tomorrow. Great! Hope it is useful! > There's one thing I can't understand. > > What's the rationale behind having both a trace/enabled set of functions, and then equivalent functions with smaller scope? When would I want to use one of the smaller functions? > > Is it an optimization, so fewer atom values need to be checked every time? Yes. > > Thanks, > > -- > Lo?c Hoguin > https://ninenines.eu > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From j.14159@REDACTED Mon Feb 6 23:40:40 2017 From: j.14159@REDACTED (Jeremy Pierre) Date: Mon, 06 Feb 2017 22:40:40 +0000 Subject: [erlang-questions] Alpaca v0.2.6 Message-ID: Hi everyone, Alpaca v0.2.6 is now available. For those not aware of it, Alpaca is a statically typed and functional programming language for the Erlang VM that borrows a little from various ML dialects. Lots of changes in this release, highlights are: - automatic currying of top-level functions - exhaustiveness checking for top-level functions - property based testing that generates full Alpaca modules - record transformations (aka "functional record updates") The full release announcement is available here along with authors: https://groups.google.com/forum/#!topic/alpaca-lang/ou1wtyWGNVM Version 0.2.6 source is available here: https://github.com/alpaca-lang/alpaca/tree/v0.2.6 Thanks, Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier.stas@REDACTED Mon Feb 6 22:33:11 2017 From: olivier.stas@REDACTED (Olivier Stas) Date: Mon, 6 Feb 2017 22:33:11 +0100 Subject: [erlang-questions] 1 failed test when installing Erlang 19.2 on Ubuntu using building method Message-ID: Hi everyone, I installed erlang/otp 19.2 today on a Ubuntu laptop, following carefully instructions. When executing suite test, one failed. I have no idea if that particular test is important or not as I'm a newbee for Erlang. But an error is never normal, so I share. Nevertheless I finished the installation, without knowing if I will get into trouble at sometime or not because of that. Of course I'm available to give as many information as needed and proceed with any test or whatever if it may helps. So, Ubuntu 16.04 up to date, core i7. Erlang downloaded: http://erlang.org/download/otp_src_19.2.tar.gz The command issued to launch tests: |$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop | |And the log file generated:| || |=== Suite started at 2017-02-06 13:27:48 === Starting test, 6 test cases =cases 6 =user olivier =host Kroston =hosts Kroston =emulator_vsn 8.2 =emulator beam =otp_release 19 =started 2017-02-06 13:27:48 =case inet_SUITE:init_per_suite =logfile inet_suite.init_per_suite.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:48 =result ok =elapsed 1.0e-6 =case inet_SUITE:t_gethostbyaddr =logfile inet_suite.t_gethostbyaddr.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:48 =result auto_skipped: {require_failed, {not_available,test_host_ipv4_only}} === *** SKIPPED test case 1 of 6 *** =case inet_SUITE:t_gethostbyname =logfile inet_suite.t_gethostbyname.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:48 =result auto_skipped: {require_failed, {not_available,test_host_ipv4_only}} === *** SKIPPED test case 2 of 6 *** =case inet_SUITE:t_gethostbyaddr_v6 =logfile inet_suite.t_gethostbyaddr_v6.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:48 =result auto_skipped: {require_failed, {not_available,test_host_ipv6_only}} === *** SKIPPED test case 3 of 6 *** =case inet_SUITE:t_gethostbyname_v6 =logfile inet_suite.t_gethostbyname_v6.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:48 =result auto_skipped: {require_failed, {not_available,test_host_ipv6_only}} === *** SKIPPED test case 4 of 6 *** =case inet_SUITE:t_gethostnative =logfile inet_suite.t_gethostnative.html =started 2017-02-06 13:27:48 =ended 2017-02-06 13:27:49 =result failed: {{case_clause,{error,try_again}}, [{inet_SUITE,t_gethostnative,1, [{file,"inet_SUITE.erl"},{line,624}]}, {test_server,ts_tc,3, [{file,"test_server.erl"},{line,1529}]}, {test_server,run_test_case_eval1,6, [{file,"test_server.erl"},{line,1045}]}, {test_server,run_test_case_eval,9, [{file,"test_server.erl"},{line,977}]}]}, [{inet_SUITE, t_gethostnative, 624}, {test_server, ts_tc, 1529}, {test_server, run_test_case_eval1, 1045}, {test_server, run_test_case_eval, 977}] === *** FAILED test case 5 of 6 *** =case inet_SUITE:getifaddrs =logfile inet_suite.getifaddrs.html =started 2017-02-06 13:27:49 =ended 2017-02-06 13:27:49 =result ok =elapsed 0.001917 =case inet_SUITE:end_per_suite =logfile inet_suite.end_per_suite.html =started 2017-02-06 13:27:49 =ended 2017-02-06 13:27:49 =result ok =elapsed 0.0 =group_time 0.335s === TEST COMPLETE, 1 ok, 1 failed, 4 skipped of 6 test cases =finished 2017-02-06 13:27:49 =failed 1 =successful 1 =user_skipped 0 =auto_skipped 4 Issue is as mentioned at line 624. Here is the test case with that line: | 620: *t_gethostnative*(Config) when is_list(Config) -> 621: %% this will result in 26 bytes sent which causes problem in Windows 622: %% if the port-program has not assured stdin to be read in BINARY mode 623: %% OTP-2555 624: *case inet_gethost_native:gethostbyname*( 625: "a23456789012345678901234") of 626: {error,notfound} -> 627: ok; 628: {error,no_data} -> 629: ok 630: end. Thanks, Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Tue Feb 7 06:09:24 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Tue, 7 Feb 2017 18:09:24 +1300 Subject: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead In-Reply-To: <3747678.5iJU0ezvv9@changa> References: <2929868.8ykAR5J0xW@changa> <3747678.5iJU0ezvv9@changa> Message-ID: On 31/01/17 9:52 PM, zxq9 wrote: > That is just one problem. The lack of actual script casting VS only the special case of upper() and lower() means that I cannot use any unicode library function to compare two exactly equivalent strings that represent a user's name in sound-spelling. Can you clarify "sound-spelling" here? Since the surname "Menzies" is, for example, pronounced something like "minnies" in Scotland but "menzees" in Australia, I' not sure how far "sound-spelling" would take us for Anglophone names. (There are plenty of other examples.) For that matter, my mother's father's surname was Covi? but in this country everyone pronounced it as if it was "Covick" so he and his brother, with the same surname, ended up pronouncing it differently. I guess my point is that it's hard enough to tell when two names with the *same* spelling sound the same that I am in complete awe of anyone who manages to do a good-enough job telling when two *differently* spelled names sound the same. Do you use a massive locale-dependent dictionary, or what? From donpedrothird@REDACTED Tue Feb 7 10:13:19 2017 From: donpedrothird@REDACTED (John Doe) Date: Tue, 7 Feb 2017 12:13:19 +0300 Subject: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead In-Reply-To: References: <2929868.8ykAR5J0xW@changa> <3747678.5iJU0ezvv9@changa> Message-ID: I think he is talking about japanese language specific thing. They have three different scripts - katakana, hiragana and kanji, and the same words can be written with any of these scripts using more or less standard conversion rules. 2017-02-07 8:09 GMT+03:00 Richard A. O'Keefe : > > > On 31/01/17 9:52 PM, zxq9 wrote: > > That is just one problem. The lack of actual script casting VS only the >> special case of >> > > upper() and lower() means that I cannot use any unicode library function > to compare two > > exactly equivalent strings that represent a user's name in sound-spelling. > Can you clarify "sound-spelling" here? > > Since the surname "Menzies" is, for example, pronounced something like > "minnies" in Scotland but "menzees" in Australia, I' not sure how far > "sound-spelling" would take us for Anglophone names. > (There are plenty of other examples.) > > For that matter, my mother's father's surname was Covi? but in this > country everyone pronounced it as if it was "Covick" so he and his > brother, with the same surname, ended up pronouncing it differently. > > I guess my point is that it's hard enough to tell when two names with > the *same* spelling sound the same that I am in complete awe of anyone > who manages to do a good-enough job telling when two *differently* > spelled names sound the same. Do you use a massive locale-dependent > dictionary, or what? > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgud@REDACTED Tue Feb 7 10:54:03 2017 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 07 Feb 2017 09:54:03 +0000 Subject: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead In-Reply-To: References: <2929868.8ykAR5J0xW@changa> <3747678.5iJU0ezvv9@changa> Message-ID: I have made a PR, Take a look and comment at https://github.com/erlang/otp/pull/1330 /Dan On Tue, Feb 7, 2017 at 10:13 AM John Doe wrote: > I think he is talking about japanese language specific thing. They have > three different scripts - katakana, hiragana and kanji, and the same words > can be written with any of these scripts using more or less standard > conversion rules. > > 2017-02-07 8:09 GMT+03:00 Richard A. O'Keefe : > > > > On 31/01/17 9:52 PM, zxq9 wrote: > > That is just one problem. The lack of actual script casting VS only the > special case of > > > upper() and lower() means that I cannot use any unicode library function > to compare two > > exactly equivalent strings that represent a user's name in sound-spelling. > Can you clarify "sound-spelling" here? > > Since the surname "Menzies" is, for example, pronounced something like > "minnies" in Scotland but "menzees" in Australia, I' not sure how far > "sound-spelling" would take us for Anglophone names. > (There are plenty of other examples.) > > For that matter, my mother's father's surname was Covi? but in this > country everyone pronounced it as if it was "Covick" so he and his > brother, with the same surname, ended up pronouncing it differently. > > I guess my point is that it's hard enough to tell when two names with > the *same* spelling sound the same that I am in complete awe of anyone > who manages to do a good-enough job telling when two *differently* > spelled names sound the same. Do you use a massive locale-dependent > dictionary, or what? > > > _______________________________________________ > 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 zxq9@REDACTED Tue Feb 7 11:26:18 2017 From: zxq9@REDACTED (zxq9) Date: Tue, 07 Feb 2017 19:26:18 +0900 Subject: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead In-Reply-To: References: <3747678.5iJU0ezvv9@changa> Message-ID: <2853613.LTEfXz1eSM@changa> On 2017?2?7? ??? 18:09:24 Richard A. O'Keefe wrote: > > On 31/01/17 9:52 PM, zxq9 wrote: > > > That is just one problem. The lack of actual script casting VS only the special case of > > upper() and lower() means that I cannot use any unicode library function > to compare two > > exactly equivalent strings that represent a user's name in sound-spelling. > Can you clarify "sound-spelling" here? > > Since the surname "Menzies" is, for example, pronounced something like > "minnies" in Scotland but "menzees" in Australia, I' not sure how far > "sound-spelling" would take us for Anglophone names. > (There are plenty of other examples.) > > For that matter, my mother's father's surname was Covi? but in this > country everyone pronounced it as if it was "Covick" so he and his > brother, with the same surname, ended up pronouncing it differently. > > I guess my point is that it's hard enough to tell when two names with > the *same* spelling sound the same that I am in complete awe of anyone > who manages to do a good-enough job telling when two *differently* > spelled names sound the same. Do you use a massive locale-dependent > dictionary, or what? The specific case I am addressing above is one that arises in East Asian languages that have 1::1 equivalence among different phonetic scripts. For example, the letter "ka" is ? in Hiragana, and ? in Katakana, and ? in half-width katakana, and literally "ka" or "KA" in romaji. The possible kanji characters that could be pronounced with this phonem are not relevant to the simple case of phonetic comparison. In Japanese this is one letter. The case of "ga" gets more complex, because it is ?, ? and ??, respectively, and this last one is two characters to represent the single letter, in the same way that "ga" and "GA" are two letters in roman script to represent this phonem. So the rule here is a touch more complex, but not by much. Any competent Japanese library will be able to tell me that these are the same, and provide a way to script-cast them to a single form for storage in a database for string comparison so that things like names (of persons, places, companies, etc.) can be searched phonetically without having to know the specific kanji characters in a the name. If someone tells you her name is "Anna" you can't really know whether it is "Anna" or "???" or "???" or "??" or whatever -- so it is a universal feature of Japanese programs that at least two input fields are provided for any name input (and sometimes three) in the following order: - ALWAYS there will be the phonetic spelling of the name which can be given in hiragana, katakana, or whatever as long as it adheres to one of the phonetic systems. Usually called "furigana" or "yomigana". - USUALLY there will be a field for the canonical presentation. - OPTIONALLY there will be a field for the canonical Romanization (which may differ from the rules of a transliteration system). It is the phonetic spelling that is used for searches and requires canonicalization. There is direct equivalence here, almost a perfect analog to case-insensitive text comparison, and this is not at all supported by libraries that stop at naive upper/lower casing of roman/greek/cyrillic based scripts. That is what I meant about upper/lower being just two special cases of script-casting. The kanji equivalence issue is very different and would never be expected in a vanilla unicode library (because it is hard, language dependent, and often regionally dependent as well). -Craig From dgud@REDACTED Tue Feb 7 12:08:36 2017 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 07 Feb 2017 11:08:36 +0000 Subject: [erlang-questions] Erlang basic doubts about String, message passing and context switching overhead In-Reply-To: References: <2929868.8ykAR5J0xW@changa> <3747678.5iJU0ezvv9@changa> Message-ID: As I stated previously in this thread, this current PR does not address language or other context specifics, which requires domain knowledge or hard coding rules in the code generator. But I should add that to the PR description. On Tue, Feb 7, 2017 at 11:50 AM Ola B?ckstr?m wrote: > I wonder whether a few of the str-functions should be > ?language?/?culture?-aware to correctly work. Or even ?tradition?-aware? > > > > Functions in question are, for instance, the str:uppercase/1, titlecase/1, > casefold/1 and equal/3 > > > > The Slovak word for yes, ??no? should be up-cased like ??NO?. Happy > ?vesel?? should be written ?VESEL??. > > The French, by tradition simplify by removing any ^`?? signs, so ??toile? > becomes ?ETOILE? > > (It might be that there?s a new recommendation so it should become > ??TOILE?) > > > > So depending on whether the text is written Slovak or written French the > uppercase operation might have to work different. > > > > /Ola > > > > *From:* erlang-questions-bounces@REDACTED [mailto: > erlang-questions-bounces@REDACTED] *On Behalf Of *Dan Gudmundsson > *Sent:* den 7 februari 2017 10:54 > *To:* John Doe > *Cc:* Erlang Questions > > > *Subject:* Re: [erlang-questions] Erlang basic doubts about String, > message passing and context switching overhead > > > > I have made a PR, > > Take a look and comment at https://github.com/erlang/otp/pull/1330 > > /Dan > > > > On Tue, Feb 7, 2017 at 10:13 AM John Doe wrote: > > I think he is talking about japanese language specific thing. They have > three different scripts - katakana, hiragana and kanji, and the same words > can be written with any of these scripts using more or less standard > conversion rules. > > > > 2017-02-07 8:09 GMT+03:00 Richard A. O'Keefe : > > > > On 31/01/17 9:52 PM, zxq9 wrote: > > That is just one problem. The lack of actual script casting VS only the > special case of > > > upper() and lower() means that I cannot use any unicode library function > to compare two > > exactly equivalent strings that represent a user's name in sound-spelling. > Can you clarify "sound-spelling" here? > > Since the surname "Menzies" is, for example, pronounced something like > "minnies" in Scotland but "menzees" in Australia, I' not sure how far > "sound-spelling" would take us for Anglophone names. > (There are plenty of other examples.) > > For that matter, my mother's father's surname was Covi? but in this > country everyone pronounced it as if it was "Covick" so he and his > brother, with the same surname, ended up pronouncing it differently. > > I guess my point is that it's hard enough to tell when two names with > the *same* spelling sound the same that I am in complete awe of anyone > who manages to do a good-enough job telling when two *differently* > spelled names sound the same. Do you use a massive locale-dependent > dictionary, or what? > > > > _______________________________________________ > 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 k.petrauskas@REDACTED Tue Feb 7 12:23:15 2017 From: k.petrauskas@REDACTED (Karolis Petrauskas) Date: Tue, 7 Feb 2017 13:23:15 +0200 Subject: [erlang-questions] SFTP In-Reply-To: References: Message-ID: I created a pull request for the ssh application: https://github.com/erlang/otp/pull/1331 It includes a test case and a fix for opening a file by a relative path. Karolis On Wed, Feb 1, 2017 at 4:06 PM, Karolis Petrauskas wrote: > In ssh_sftpd.erl (ssh application, version 4.4) there is condition for > determining absolute file path when opening a file: > > AbsPath = case Root of > "" -> > Path; > _ -> > relate_file_name(Path, State0) > end, > > There is no such condition when listing directory or resolving real path. > Root = "" by default, if root_dir is not specified by the user. > > Is this difference in resolving file names intended? > > Karolis > > > On Wed, Feb 1, 2017 at 1:40 PM, Karolis Petrauskas > wrote: > >> Hi, >> >> I made a smaller test program to reproduce the problem (shown bellow). >> It reproduces the problem only partially, because it can't find the files >> in >> the Erlang sftp server by relative file names all the time. In my previous >> experiments I the misbehaviour was unstable. >> >> -module(test_sftp). >> -export([test/1]). >> >> make_files(DirName) -> >> lists:foreach( >> fun (FileName) -> ok = file:write_file(filename:join(DirName, >> FileName), [FileName, " contents"]) end, >> ["some.txt", "other.txt", "none.txt", "yetanother.txt", "any.txt"] >> ), >> ok. >> >> start_server(Port, Cwd) -> >> {ok, Pid} = ssh:daemon(Port, [ >> {system_dir, "test_sftp_data/sys"}, >> {user_dir, "test_sftp_data/usr"}, >> {user_passwords, [{"test_sftp", "test_sftp"}]}, >> {subsystems, [ssh_sftpd:subsystem_spec([{cwd, Cwd}])]} >> ]), >> {ok, Pid}. >> >> check_client(Port, User, Pass, DirName) -> >> {ok, ChannelPid, ConnectionRef} = ssh_sftp:start_channel("localhost", >> Port, [{user, User}, {password, Pass}]), >> {ok, FileNames} = ssh_sftp:list_dir(ChannelPid, DirName), >> Result = lists:map(fun (FileName) -> >> {DirName, FileName, ssh_sftp:read_file(ChannelPid, >> filename:join(DirName, FileName))} >> end, FileNames), >> ok = ssh_sftp:stop_channel(ChannelPid), >> ok = ssh:close(ConnectionRef), >> Result. >> >> test(Pass) -> >> ok = make_files("/home/karolis/temp/test_sftp"), >> {ok, Pid} = start_server(8022, "/home/karolis"), >> lists:foreach(fun (N) -> >> io:format("--------------- Test n=~p ---------------------~n", >> [N]), >> io:format("Erlang-ABS: ~100p~n", [check_client(8022, >> "test_sftp", "test_sftp", "/home/karolis/temp/test_sftp")]), >> io:format("Erlang-REL: ~100p~n", [check_client(8022, >> "test_sftp", "test_sftp", "temp/test_sftp")]), >> io:format("OpenSSH-ABS: ~100p~n", [check_client(22, "karolis", >> Pass, "/home/karolis/temp/test_sftp")]), >> io:format("OpenSSH-REL: ~100p~n", [check_client(22, "karolis", >> Pass, "temp/test_sftp")]) >> end, lists:seq(1, 10)), >> ok = ssh:stop_daemon(Pid), >> ok. >> >> >> All the iterations printed the same results (only the output of the first >> iteration is shown bellow): >> >> --------------- Test n=1 --------------------- >> Erlang-ABS: [{"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt >> contents">>}}] >> >> >> >> >> *Erlang-REL: [{"temp/test_sftp","none.txt",{error,no_such_file}}, >> {"temp/test_sftp","any.txt",{error,no_such_file}}, >> {"temp/test_sftp","other.txt",{error,no_such_file}}, >> {"temp/test_sftp","yetanother.txt",{error,no_such_file}}, >> {"temp/test_sftp","some.txt",{error,no_such_file}}]* >> OpenSSH-ABS: [{"/home/karolis/temp/test_sftp","..",{error,failure}}, >> {"/home/karolis/temp/test_sftp","none.txt",{ok,<<"none.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","any.txt",{ok,<<"any.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp","other.txt",{ok,<<"other.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp >> ","yetanother.txt",{ok,<<"yetanother.txt contents">>}}, >> {"/home/karolis/temp/test_sftp","some.txt",{ok,<<"some.txt >> contents">>}}, >> {"/home/karolis/temp/test_sftp",".",{error,failure}}] >> OpenSSH-REL: [{"temp/test_sftp","..",{error,failure}}, >> {"temp/test_sftp","none.txt",{ok,<<"none.txt contents">>}}, >> {"temp/test_sftp","any.txt",{ok,<<"any.txt contents">>}}, >> {"temp/test_sftp","other.txt",{ok,<<"other.txt >> contents">>}}, >> {"temp/test_sftp","yetanother.txt",{ok,<<"yetanother.txt >> contents">>}}, >> {"temp/test_sftp","some.txt",{ok,<<"some.txt contents">>}}, >> {"temp/test_sftp",".",{error,failure}}] >> >> >> I repeated the same test with the home dir (relative path = "."), and the >> results were the same. >> So it seems that the Erlang's sftp server can list directories, but can't >> open the files by relative paths. >> >> Karolis >> >> On Mon, Jan 30, 2017 at 10:19 PM, Karolis Petrauskas < >> k.petrauskas@REDACTED> wrote: >> >>> I'm using "Erlang/OTP 19 [erts-8.2]", debian package from >>> erlang-solutions, version 1:19.2-1. >>> >>> I'll check that with erlang client and sshd server. I was playing with >>> ssh_sftpd server from a command line (sftp), and noticed no problems >>> except the cwd problem when combined with root directory restriction. >>> >>> Karolis >>> >>> On Mon, Jan 30, 2017 at 8:01 PM, bengt wrote: >>> > Greetings, >>> > >>> > Can you try with sshd, instead of ssh_sftpd ? As a way of halving the >>> potential error sources. Also, which Erlang version are you on? >>> > >>> > >>> > bengt >>> > >>> >> On 30 Jan 2017, at 13:55, Karolis Petrauskas >>> wrote: >>> >> >>> >> Hello, >>> >> >>> >> I'm trying to use erlang's sftp server and client. In the example >>> >> bellow, i use erlang for both: the server and the client. For some >>> >> reason, i can't open some files. >>> >> >>> >> 43> ssh_sftp:list_dir(Ch, "."). >>> >> {ok,["other.txt","some.txt"]} >>> >> >>> >> 44> ssh_sftp:read_file(Ch, "some.txt"). >>> >> {ok,<<"some.txt contents">>} >>> >> >>> >> 45> ssh_sftp:read_file(Ch, "other.txt"). >>> >> {error,no_such_file} >>> >> >>> >> I was able to read both files with absolute file names specified, but >>> >> in my case I should not depend on the absolute paths. I could use the >>> >> absolute file names when opening files, if I could get the current >>> >> working directory from the server, but I cant find any function for >>> >> that. >>> >> >>> >> The server behaviour is also a unclear to me. I can't set the cwd, if >>> >> the root option is used when starting the daemon. I have tried various >>> >> combinations of root/cwd (cwd is relative to root, or absolute on the >>> >> target file system), the sftp client always logins with / as its >>> >> current working directory. >>> >> >>> >> In my case, I use the sftpd only for testing the sftp client in CT. >>> >> I'm working on Erlang/OTP 19 [erts-8.2]. >>> >> >>> >> Would be thankful for any pointers. >>> >> >>> >> Karolis >>> >> _______________________________________________ >>> >> 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 erlang@REDACTED Tue Feb 7 12:45:15 2017 From: erlang@REDACTED (Joe Armstrong) Date: Tue, 7 Feb 2017 12:45:15 +0100 Subject: [erlang-questions] Matching Empty maps Message-ID: Ten minutes ago I was happily recursing down a list and discovered to my horror that an empty map isn't an empty map. 1> #{} = #{a => 1}. #{a => 1} The documentation actually says: #{} = Expr This expression matches if the expression Expr is of type map, otherwise it fails with an exception badmatch. So #{} is an empty map in an argument position but not an empty map in a pattern. So this is not a bug since the system does what the documentation says but it is very weird. Is there some deep reason for this that I've missed ?????? Very Puzzled /Joe From dmytro.lytovchenko@REDACTED Tue Feb 7 12:48:13 2017 From: dmytro.lytovchenko@REDACTED (Dmytro Lytovchenko) Date: Tue, 7 Feb 2017 12:48:13 +0100 Subject: [erlang-questions] Matching Empty maps In-Reply-To: References: Message-ID: Trying to have a comfortable syntax brings all sorts of special cases not covered. One should use == or =:= in a guard, or true = (X == #{}) which is ugly. 2017-02-07 12:45 GMT+01:00 Joe Armstrong : > Ten minutes ago I was happily recursing down a list and discovered > to my horror that an empty map isn't an empty map. > > 1> #{} = #{a => 1}. > #{a => 1} > > The documentation actually says: > > > #{} = Expr > > This expression matches if the expression Expr is of type map, > otherwise it fails with an exception badmatch. > > > So #{} is an empty map in an argument position but not an empty map > in a pattern. > > So this is not a bug since the system does what the documentation says > but it is very weird. > > Is there some deep reason for this that I've missed ?????? > > Very Puzzled > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zxq9@REDACTED Tue Feb 7 12:52:38 2017 From: zxq9@REDACTED (zxq9) Date: Tue, 07 Feb 2017 20:52:38 +0900 Subject: [erlang-questions] Matching Empty maps In-Reply-To: References: Message-ID: <5652487.Aqbka6EOYH@changa> On 2017?2?7? ??? 12:45:15 Joe Armstrong wrote: > Is there some deep reason for this that I've missed ?????? A few places exist where slick syntax is mistaken for actual values. That always leads to a weird place. That is one reason that I generally avoid using the special map syntax over the functional interface to maps with the exception of explicit unification matches. (Which still can't do everything I wish they could, but I assume that is coming since everyone feels the same way about that stuff.) -Craig From spylik@REDACTED Tue Feb 7 10:54:59 2017 From: spylik@REDACTED (Oleksii Semilietov) Date: Tue, 7 Feb 2017 11:54:59 +0200 Subject: [erlang-questions] convert strings like "1e-8" to floats. Message-ID: Hi all! I playing with converting binaries and lists to floats and I found something what I can't solve via elegant way. I believe it's my leakage of understanding floats. So, what is different between 1e-8 and 1.0e-8 ? For example we have float as list "0.01". It is easy to convert it to float just via list_to_float("0.01"). But when floats coming from external world as binaries or lists which looks like "1e-8", and not like "1.0e-8", I can't find proper way to convert it. For example in PHP both 1e-8 and 1.0e-8 is equivalent var_dump(floatval("1e-8") === floatval("1.0e-8")) returns true. Javascript 1E-8 === 1.0E-8 is also true. In Erlang list_to_float("1.0E-8") =:= 0.00000001 true but list_to_float("1E-8") =:= 0.00000001. ** exception error: bad argument in function list_to_float/1 called as list_to_float("1E-8") How to convert it via right way? -- Oleksii D. Semilietov -------------- next part -------------- An HTML attachment was scrubbed... URL: From Catenacci@REDACTED Tue Feb 7 14:08:42 2017 From: Catenacci@REDACTED (Onorio Catenacci) Date: Tue, 7 Feb 2017 08:08:42 -0500 Subject: [erlang-questions] Alpaca v0.2.6 Message-ID: As a big fan of ML based languages I am quite pleased to see Alpaca moving forward. I hope you all will continue to gain steam! -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Tue Feb 7 15:48:33 2017 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Tue, 7 Feb 2017 15:48:33 +0100 Subject: [erlang-questions] Matching Empty maps In-Reply-To: References: Message-ID: <20170207144833.GA68589@erix.ericsson.se> On Tue, Feb 07, 2017 at 12:45:15PM +0100, Joe Armstrong wrote: > Ten minutes ago I was happily recursing down a list and discovered > to my horror that an empty map isn't an empty map. > > 1> #{} = #{a => 1}. > #{a => 1} > > The documentation actually says: > > > #{} = Expr > > This expression matches if the expression Expr is of type map, > otherwise it fails with an exception badmatch. > > > So #{} is an empty map in an argument position but not an empty map > in a pattern. > > So this is not a bug since the system does what the documentation says > but it is very weird. > > Is there some deep reason for this that I've missed ?????? > > Very Puzzled I think it is quite logical since #{a := _} in a match position matches a map with a key 'a' plus any number of other keys in it, so why should not the empty map #{} in a match position also match any number of other keys in it? > > /Joe -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From jesper.louis.andersen@REDACTED Tue Feb 7 16:23:55 2017 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 07 Feb 2017 15:23:55 +0000 Subject: [erlang-questions] Matching Empty maps In-Reply-To: <20170207144833.GA68589@erix.ericsson.se> References: <20170207144833.GA68589@erix.ericsson.se> Message-ID: The alternative notation is something along the lines of: #{ ... } which says that we have a map with at least one extra undefined element. In that case, the pattern #{ a := _, ... } would say "the key a MUST be present, I don't care about the value, and there MUST be additional elements in the map", whereas #{ a := _ } is *exactly* the one-element map. Too late for this notation though. On Tue, Feb 7, 2017 at 3:48 PM Raimo Niskanen < raimo+erlang-questions@REDACTED> wrote: > On Tue, Feb 07, 2017 at 12:45:15PM +0100, Joe Armstrong wrote: > > Ten minutes ago I was happily recursing down a list and discovered > > to my horror that an empty map isn't an empty map. > > > > 1> #{} = #{a => 1}. > > #{a => 1} > > > > The documentation actually says: > > > > > > #{} = Expr > > > > This expression matches if the expression Expr is of type map, > > otherwise it fails with an exception badmatch. > > > > > > So #{} is an empty map in an argument position but not an empty map > > in a pattern. > > > > So this is not a bug since the system does what the documentation says > > but it is very weird. > > > > Is there some deep reason for this that I've missed ?????? > > > > Very Puzzled > > I think it is quite logical since #{a := _} in a match position matches a > map with a key 'a' plus any number of other keys in it, so why should not > the empty map #{} in a match position also match any number of other keys > in it? > > > > > /Joe > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjorn-egil.xb.dahlberg@REDACTED Tue Feb 7 16:25:23 2017 From: bjorn-egil.xb.dahlberg@REDACTED (=?UTF-8?Q?Bj=c3=b6rn-Egil_Dahlberg_XB?=) Date: Tue, 7 Feb 2017 16:25:23 +0100 Subject: [erlang-questions] Matching Empty maps In-Reply-To: References: Message-ID: On 02/07/2017 12:45 PM, Joe Armstrong wrote: > So #{} is an empty map in an argument position but not an empty map > in a pattern. Yes, of course! There is a difference between patterns and values. They are not the same thing. A pattern does not need to describe the entire thing in match. It just has to describe the things it needs to match. Records are the precursor to the map behavior of course. For example, -record(r, {a,b,c}). foo(#r{}=R) -> R. // Bj?rn-Egil From per@REDACTED Tue Feb 7 17:13:42 2017 From: per@REDACTED (Per Hedeland) Date: Tue, 7 Feb 2017 17:13:42 +0100 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: References: Message-ID: <5899F236.90001@hedeland.org> On 2017-02-07 10:54, Oleksii Semilietov wrote: > > I playing with converting binaries and lists to floats and I found > something what I can't solve via elegant way. I believe it's my leakage of > understanding floats. No, I think it's just that Erlang is a bit more, uh, pedantic than other languages about what the "good representation" of a float is. > But when floats coming from external world as binaries or lists which looks > like "1e-8", and not like "1.0e-8", I can't find proper way to convert it. I don't know if there is a "proper" way, but something like this should do the trick: tolerant_list_to_float(L) -> case re:run(L, "^([+-]?\\d+)([Ee]\\d+)?$", [{capture, [1, 2], list}]) of {match, [M, E]} -> list_to_float(M ++ ".0" ++ E); _ -> list_to_float(L) end. --Per From kuna.prime@REDACTED Tue Feb 7 23:04:44 2017 From: kuna.prime@REDACTED (Karlo Kuna) Date: Tue, 7 Feb 2017 23:04:44 +0100 Subject: [erlang-questions] NIFS In-Reply-To: <22678.64109.509925.741232@gargle.gargle.HOWL> References: <20170204224516.GA13261@jarowit.net> <22678.64109.509925.741232@gargle.gargle.HOWL> Message-ID: For everyones amusement and information. I have overlooked something important as a noob and then some. Compiling and linking where done in two steps, and i have reused makefile form another project not realizing that linking step would be done by "cc" and that was the problem, changing it to for example g++ resolved my issue. This was one of those costly errors, when one stares at build output for very long time and not seeing things that are plainly there. thank you everyone for help On Sun, Feb 5, 2017 at 11:11 AM, Mikael Pettersson wrote: > Karlo Kuna writes: > > also > > ldd -r my.so > > gives: > > undefined symbol: _ZNSt8ios_base4InitD1Ev > > undefined symbol: enif_make_atom > > undefined symbol: _ZNSt8ios_base4InitC1Ev > > The enif_make_atom one is expected; it will be satisfied by the VM itself > when you load the .so. > > The others indicate that the dynamic linker is unable to find all external > shared libraries you depend on, in particular ones that should have come > from the system's C++ / libstdc++ installation. > > Something's fishy with your system or your build/deploy procedures. > > > > > > > > > On Sun, Feb 5, 2017 at 6:48 AM, Karlo Kuna > wrote: > > > > > now i'm getting: > > > undefined symbol: _ZNSt8ios_base4InitD1Ev > > > > > > > > > > > > On Sat, Feb 4, 2017 at 11:45 PM, Stanislaw Klekot < > erlang.org@REDACTED> > > > wrote: > > > > > >> On Sat, Feb 04, 2017 at 11:25:33PM +0100, Karlo Kuna wrote: > > >> > i am using c++ to implement nif module > > >> > and i am using nifpp (https://github.com/goertzenator/nifpp) > > >> > > > >> > now i can compile my project but on function call i get: > > >> > > > >> > Failed to load NIF library: my.so undefined symbol: > > >> > _ZTVN10__cxxabiv117__class_type_infoE > > >> > > > >> > can someone give me a hint what is this error? is it linkage, or > bad > > >> call, > > >> > or something else > > >> > and how go about solving it? > > >> > > >> It's because of name mangling by C++ compiler (necessary thing for > > >> overloaded functions to work). It's a totally expected problem when > > >> you're writing in C++ a library that needs to be used by system > written > > >> in C. You need to disable name mangling for your NIF function. > > >> > > >> -- > > >> Stanislaw Klekot > > >> > > > > > > > > > > ---------------------------------------------------------------------- > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > > -- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.petrauskas@REDACTED Tue Feb 7 23:25:51 2017 From: k.petrauskas@REDACTED (Karolis Petrauskas) Date: Wed, 8 Feb 2017 00:25:51 +0200 Subject: [erlang-questions] xmerl and the xml namespace In-Reply-To: References: Message-ID: I created a pull request https://github.com/erlang/otp/pull/1332. It contains a fix for this problem as well as two additional test cases. Karolis On Wed, Jan 11, 2017 at 3:43 PM, Karolis Petrauskas wrote: > Thanks for the information. > > Karolis > > On Wed, Jan 11, 2017 at 8:29 AM, Lars Thorsen > wrote: > > > > Hi, > > > > this is clearly a bug and I will create an internal ticket for it. > > > > If you want to keep track on it create a bug report in Jira > > (http://bugs.erlang.org/). > > > > > > BR Lars > > > > OTP Team > > > > > > ________________________________ > > From: erlang-questions-bounces@REDACTED > > on behalf of Karolis Petrauskas > > > > Sent: Saturday, January 7, 2017 10:05:31 PM > > To: erlang-questions@REDACTED > > Subject: [erlang-questions] xmerl and the xml namespace > > > > Hello erlangers, > > > > I tried to parse XML document containing namespaced elements using > > xmerl. The document contain xml:lang attributes and no declaration for > > the xml prefix. The minimal example reproducing the error is bellow. > > > > 1> catch xmerl_scan:string("", > > [{namespace_conformant, true}]). > > > > {'EXIT',{fatal,{{namespace_prefix_not_declared,"xml"}, > > {file,file_name_unknown}, > > {line,1}, > > {col,23}}}} > > > > The same XML document is parsed successfully with {namespace_conformant, > > false}. > > > > The XML specification (https://www.w3.org/TR/xml-names/#xmlReserved) > > says, that the xml prefix can be used without declaration and must > > refer to "http://www.w3.org/XML/1998/namespace". > > > > Is this a bug in xmerl, or I misunderstand something? > > > > Karolis > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Wed Feb 8 01:08:46 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 8 Feb 2017 13:08:46 +1300 Subject: [erlang-questions] Matching Empty maps In-Reply-To: References: <20170207144833.GA68589@erix.ericsson.se> Message-ID: <326e0178-d990-26ad-af2a-579cdf15fd23@cs.otago.ac.nz> The frames proposal did something similar. I tried the experiment of requiring |_ to say "other things can be present", with the absence of this meaning exact key agreement. But writing sample programs I found that I was CONSTANTLY leaving the |_ out when it should have been there, and of course it missed half of the *point* of using records/frames/maps, namely that you can add a new field without breaking existing code. From rouge.j@REDACTED Wed Feb 8 00:41:02 2017 From: rouge.j@REDACTED (=?UTF-8?Q?Jean_Roug=C3=A9?=) Date: Tue, 7 Feb 2017 15:41:02 -0800 Subject: [erlang-questions] Could NIFs keep pointers to Erlang terms without copying them? Message-ID: Hi, If NIFs want to keep an erlang term around, they currently have to copy them to their own, process-independent environment, using enif_make_copy. That can be a pretty big performance issue if dabbling with big terms: imagine for example a NIF storing a complicated data structure, e.g. a gb_tree; now say we want to keep adding/deleting items from that gb_tree in our erlang code: we now have to copy the entire thing back and forth. How hard/conceivable would it be to give NIFs a way to keep a pointer to an erlang term that they could pass back and forth with the process' environments without having to copy everything? I imagine that would mean that it would be the NIF's programmer responsibility to: - ensure that they never keep a pointer to an erlang term that's no longer referenced in erlang land (and hence is going to get garbage collected) - ensure thread-safety But the erlang VM would still have to somehow let the NIF know when an erlang term it has a pointer to has been moved somewhere else. Is that something that could maybe, in theory, be possible to add to the current VM? Thanks a lot, Jean -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmytro.lytovchenko@REDACTED Wed Feb 8 08:23:54 2017 From: dmytro.lytovchenko@REDACTED (Dmytro Lytovchenko) Date: Wed, 8 Feb 2017 08:23:54 +0100 Subject: [erlang-questions] Could NIFs keep pointers to Erlang terms without copying them? In-Reply-To: References: Message-ID: Modifying the way how garbage collect algorithm calculates the root set will do what you want. Now the trick is that GC runs per process and nifs are organized independently. There must be a way for a process to know which nif holds something from its heap. On Feb 8, 2017 05:22, "Jean Roug?" wrote: Hi, If NIFs want to keep an erlang term around, they currently have to copy them to their own, process-independent environment, using enif_make_copy. That can be a pretty big performance issue if dabbling with big terms: imagine for example a NIF storing a complicated data structure, e.g. a gb_tree; now say we want to keep adding/deleting items from that gb_tree in our erlang code: we now have to copy the entire thing back and forth. How hard/conceivable would it be to give NIFs a way to keep a pointer to an erlang term that they could pass back and forth with the process' environments without having to copy everything? I imagine that would mean that it would be the NIF's programmer responsibility to: - ensure that they never keep a pointer to an erlang term that's no longer referenced in erlang land (and hence is going to get garbage collected) - ensure thread-safety But the erlang VM would still have to somehow let the NIF know when an erlang term it has a pointer to has been moved somewhere else. Is that something that could maybe, in theory, be possible to add to the current VM? Thanks a lot, Jean _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.J.Thompson@REDACTED Wed Feb 8 09:54:39 2017 From: S.J.Thompson@REDACTED (Simon Thompson) Date: Wed, 8 Feb 2017 08:54:39 +0000 Subject: [erlang-questions] Upcoming Erlang MOOCs update References: Message-ID: <4F694899-2C12-4ED5-9842-635D74F2D139@kent.ac.uk> The University of Kent is running two - linked - three week MOOCs on Erlang on the FutureLearn platform. Simon Thompson is lead educator, and Joe Armstrong and Francesco Cesarini are also lecturers in the second, and contribute a final discussion to the first. The MOOCs are intended for participants who know how to program, and want to learn programming in Erlang. Functional Programming in Erlang runs for three weeks from Monday 20 February, and covers the basics of programming in Erlang, concentrating on the sequential and functional aspects, and giving an introduction to writing programs in Erlang in practice. It covers list programming, and looks at some of the common higher-order functions in Erlang. [It is based on the pilot MOOC that Kent ran in 2015.] https://www.futurelearn.com/courses/functional-programming-erlang #FLerlangfunc Concurrent Programming in Erlang runs for three weeks from Monday 3 April, and, building on the first MOOC introduces concurrent programming in Erlang, fault tolerance, and introduces ways of scaling things up. https://www.futurelearn.com/courses/concurrent-programming-erlang #FLerlangconc Do please spread the word: we?ve got no limits on participation! Simon Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@REDACTED | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt From zxq9@REDACTED Wed Feb 8 11:04:06 2017 From: zxq9@REDACTED (zxq9) Date: Wed, 08 Feb 2017 19:04:06 +0900 Subject: [erlang-questions] Could NIFs keep pointers to Erlang terms without copying them? In-Reply-To: References: Message-ID: <2595645.4cmScGATKA@changa> On 2017?2?8? ??? 08:23:54 Dmytro Lytovchenko wrote: > Modifying the way how garbage collect algorithm calculates the root set > will do what you want. Now the trick is that GC runs per process and nifs > are organized independently. There must be a way for a process to know > which nif holds something from its heap. ...which seems to hint that the underlying problem would be better handled by a non-NIF solution. -Craig From alex0player@REDACTED Wed Feb 8 11:35:19 2017 From: alex0player@REDACTED (Alex S.) Date: Wed, 8 Feb 2017 13:35:19 +0300 Subject: [erlang-questions] how to debug a code with spawned processes In-Reply-To: <1098547905.3448646.1485954013204@mail.yahoo.com> References: <1098547905.3448646.1485954013204.ref@mail.yahoo.com> <1098547905.3448646.1485954013204@mail.yahoo.com> Message-ID: <48B86BD6-AE6B-4F58-8FAA-AED52E87CC36@gmail.com> > 1 ????. 2017 ?., ? 16:00, Dmitry ???????(?): > > Hello, > > > > The code which spawns new processes works in normal situation (when it is triggered from another application), but it seams that when it is called from send_all it does not work as expected: > +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > handle_cast({send_all}, State=#state{pgconn=Conn}) -> > SQLQuery = "select mobile_phone from push_tokens as pt inner join employees as e on e.id = pt.employee_id where e.active = true and pt.app_voip_token is not null", > {ok, _, Res} = epgsql:squery(Conn, SQLQuery), > io:format("Send_all was queried~n"), > [connect_down(binary_to_list(Phone)) || {Phone} <- Res], > {noreply, State}; > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > The problem that annoy is called only once (but it had to call send_it - 124 times) > > The question - how to debug such application: how to trace whats going on in the "annoy" function. I use spawn_monitor to detect link failure. > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > annoy (BinToken) -> > [send_it(A, BinToken) || A <- lists:seq(1,124)]. > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A good start would be to use proc_lib for your troubles, it?ll allow you to see traces of processes exiting improperly. Do you actually receive messages from the monitor anywhere? -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo+erlang-questions@REDACTED Wed Feb 8 11:55:01 2017 From: raimo+erlang-questions@REDACTED (Raimo Niskanen) Date: Wed, 8 Feb 2017 11:55:01 +0100 Subject: [erlang-questions] Patch package OTP 19.2.3 released Message-ID: <20170208105501.GA22057@erix.ericsson.se> Patch Package: OTP 19.2.3 Git Tag: OTP-19.2.3 Date: 2017-02-08 Trouble Report Id: OTP-14159, OTP-14184, OTP-14203 Seq num: seq13266 System: OTP Release: 19 Application: erts-8.2.2, inets-6.3.5 Predecessor: OTP 19.2.2 Check out the git tag OTP-19.2.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-8.2.2 ------------------------------------------------------ --------------------------------------------------------------------- Note! The erts-8.2.2 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- sasl-3.0.1 (first satisfied in OTP 19.1) --- Fixed Bugs and Malfunctions --- OTP-14159 Application(s): erts Related Id(s): ERL-340 Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0. OTP-14184 Application(s): erts Related Id(s): seq13266 The driver efile_drv when opening a file now use fstat() on the open file instead of stat() before opening, if fstat() exists. This avoids a race when the file happens to change between stat() and open(). Full runtime dependencies of erts-8.2.2: kernel-5.0, sasl-3.0.1, stdlib-3.0 --------------------------------------------------------------------- --- inets-6.3.5 ----------------------------------------------------- --------------------------------------------------------------------- The inets-6.3.5 application can be applied independently of other applications on a full OTP 19 installation. --- Fixed Bugs and Malfunctions --- OTP-14203 Application(s): inets Related Id(s): OTP-13982 Correct misstakes in ftp client introduced in inets-6.3.4 Full runtime dependencies of inets-6.3.5: erts-6.0, kernel-3.0, mnesia-4.12, runtime_tools-1.8.14, ssl-5.3.4, stdlib-2.0 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From mikpelinux@REDACTED Wed Feb 8 12:08:02 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Wed, 8 Feb 2017 12:08:02 +0100 Subject: [erlang-questions] Could NIFs keep pointers to Erlang terms without copying them? In-Reply-To: References: Message-ID: <22682.64530.918035.820257@gargle.gargle.HOWL> Jean Roug? writes: > Hi, > > If NIFs want to keep an erlang term around, they currently have to copy > them to their own, process-independent environment, using enif_make_copy. > > That can be a pretty big performance issue if dabbling with big terms: > imagine for example a NIF storing a complicated data structure, e.g. a > gb_tree; now say we want to keep adding/deleting items from that gb_tree in > our erlang code: we now have to copy the entire thing back and forth. > > How hard/conceivable would it be to give NIFs a way to keep a pointer to an > erlang term that they could pass back and forth with the process' > environments without having to copy everything? > > I imagine that would mean that it would be the NIF's programmer > responsibility to: > > - ensure that they never keep a pointer to an erlang term that's no > longer referenced in erlang land (and hence is going to get garbage > collected) > - ensure thread-safety > > But the erlang VM would still have to somehow let the NIF know when an > erlang term it has a pointer to has been moved somewhere else. > > Is that something that could maybe, in theory, be possible to add to the > current VM? What you're describing is similar to "wrong-way pointers" in generational GCs. The current Erlang/OTP VM does not support that. In theory all you'd need is an additional set of "external references" into an Erlang process' heap. These could be hard, as in keeping terms live even if the process itself doesn't reference them, or weak as in classical weak pointers. Certainly doable. From mikpelinux@REDACTED Wed Feb 8 12:16:35 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Wed, 8 Feb 2017 12:16:35 +0100 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: References: Message-ID: <22682.65043.970546.919053@gargle.gargle.HOWL> Oleksii Semilietov writes: > Hi all! > > I playing with converting binaries and lists to floats and I found > something what I can't solve via elegant way. I believe it's my leakage of > understanding floats. > > So, what is different between 1e-8 and 1.0e-8 ? > > For example we have float as list "0.01". It is easy to convert it to > float just via list_to_float("0.01"). > But when floats coming from external world as binaries or lists which looks > like "1e-8", and not like "1.0e-8", I can't find proper way to convert it. > > For example in PHP both 1e-8 and 1.0e-8 is equivalent > var_dump(floatval("1e-8") === floatval("1.0e-8")) returns true. > Javascript 1E-8 === 1.0E-8 is also true. > > In Erlang > > list_to_float("1.0E-8") =:= 0.00000001 > true > > but > > list_to_float("1E-8") =:= 0.00000001. > ** exception error: bad argument in function list_to_float/1 called as > list_to_float("1E-8") > > > How to convert it via right way? Write your own conversion routine. Your mistake is assuming literals like floats have the same look and feel regardless of language or environment. That's in general not true. You may also consider the different notation for integers with non-decimal base, e.g. 0xabba vs 16#abba, or character literals, etc. What it means is that a tool written in one language but processing source code for another, must be prepared to do all conversions on its own without relying on ready-made services in the implementation language. From Catenacci@REDACTED Wed Feb 8 14:06:58 2017 From: Catenacci@REDACTED (Onorio Catenacci) Date: Wed, 8 Feb 2017 08:06:58 -0500 Subject: [erlang-questions] [Announcement] Rebar 3 3.3.4 On Chocolatey NuGet Message-ID: Hi all, To follow up on my announcement of a few days ago the Rebar 3 package on Chocolatey NuGet for Rebar 3 is now up to 3.3.4. As I said before CNG is analogous to apt-get or yum except for Windows. -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Wed Feb 8 16:35:44 2017 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Wed, 08 Feb 2017 15:35:44 +0000 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: <22682.65043.970546.919053@gargle.gargle.HOWL> References: <22682.65043.970546.919053@gargle.gargle.HOWL> Message-ID: Another example is OCaml, which supports entering integers as # 1_000_000;; - : int = 1000000 which is very nifty, but unique to OCaml and thus not too portable. On Wed, Feb 8, 2017 at 12:16 PM Mikael Pettersson wrote: > Oleksii Semilietov writes: > > Hi all! > > > > I playing with converting binaries and lists to floats and I found > > something what I can't solve via elegant way. I believe it's my leakage > of > > understanding floats. > > > > So, what is different between 1e-8 and 1.0e-8 ? > > > > For example we have float as list "0.01". It is easy to convert it to > > float just via list_to_float("0.01"). > > But when floats coming from external world as binaries or lists which > looks > > like "1e-8", and not like "1.0e-8", I can't find proper way to convert > it. > > > > For example in PHP both 1e-8 and 1.0e-8 is equivalent > > var_dump(floatval("1e-8") === floatval("1.0e-8")) returns true. > > Javascript 1E-8 === 1.0E-8 is also true. > > > > In Erlang > > > > list_to_float("1.0E-8") =:= 0.00000001 > > true > > > > but > > > > list_to_float("1E-8") =:= 0.00000001. > > ** exception error: bad argument in function list_to_float/1 called as > > list_to_float("1E-8") > > > > > > How to convert it via right way? > > Write your own conversion routine. > > Your mistake is assuming literals like floats have the same look and feel > regardless of language or environment. That's in general not true. > > You may also consider the different notation for integers with non-decimal > base, e.g. 0xabba vs 16#abba, or character literals, etc. > > What it means is that a tool written in one language but processing source > code for another, must be prepared to do all conversions on its own without > relying on ready-made services in the implementation language. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Wed Feb 8 16:42:07 2017 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 8 Feb 2017 16:42:07 +0100 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: References: <22682.65043.970546.919053@gargle.gargle.HOWL> Message-ID: Both the NNN_NNN and the Base#NNN notation go back to Ada, so they are not particular either for OCaml or Erlang, respectively. http://archive.adaic.com/standards/83lrm/html/lrm-02-04.html /Richard 2017-02-08 16:35 GMT+01:00 Jesper Louis Andersen < jesper.louis.andersen@REDACTED>: > Another example is OCaml, which supports entering integers as > > # 1_000_000;; > - : int = 1000000 > > which is very nifty, but unique to OCaml and thus not too portable. > > On Wed, Feb 8, 2017 at 12:16 PM Mikael Pettersson > wrote: > >> Oleksii Semilietov writes: >> > Hi all! >> > >> > I playing with converting binaries and lists to floats and I found >> > something what I can't solve via elegant way. I believe it's my >> leakage of >> > understanding floats. >> > >> > So, what is different between 1e-8 and 1.0e-8 ? >> > >> > For example we have float as list "0.01". It is easy to convert it to >> > float just via list_to_float("0.01"). >> > But when floats coming from external world as binaries or lists which >> looks >> > like "1e-8", and not like "1.0e-8", I can't find proper way to convert >> it. >> > >> > For example in PHP both 1e-8 and 1.0e-8 is equivalent >> > var_dump(floatval("1e-8") === floatval("1.0e-8")) returns true. >> > Javascript 1E-8 === 1.0E-8 is also true. >> > >> > In Erlang >> > >> > list_to_float("1.0E-8") =:= 0.00000001 >> > true >> > >> > but >> > >> > list_to_float("1E-8") =:= 0.00000001. >> > ** exception error: bad argument in function list_to_float/1 called as >> > list_to_float("1E-8") >> > >> > >> > How to convert it via right way? >> >> Write your own conversion routine. >> >> Your mistake is assuming literals like floats have the same look and feel >> regardless of language or environment. That's in general not true. >> >> You may also consider the different notation for integers with non-decimal >> base, e.g. 0xabba vs 16#abba, or character literals, etc. >> >> What it means is that a tool written in one language but processing source >> code for another, must be prepared to do all conversions on its own >> without >> relying on ready-made services in the implementation language. >> _______________________________________________ >> 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 frank.muller.erl@REDACTED Wed Feb 8 18:47:56 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Wed, 08 Feb 2017 17:47:56 +0000 Subject: [erlang-questions] SSL issues with Firefox 51.0.1 and Chrome 56.0.2924.87 Message-ID: Hi guys, I'm seeing these SSL errors in the app's logs: 2017-02-08 12:38:55.227 [error] <0.577.0> Ranch listener https terminated with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} 2017-02-08 12:38:55.228 [error] <0.576.0> Ranch listener https terminated with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} 2017-02-08 12:38:55.235 [error] <0.578.0> gen_fsm <0.578.0> in state hello terminated with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1199 2017-02-08 12:38:55.235 [error] <0.578.0> CRASH REPORT Process <0.578.0> with 0 neighbours exited with reason: no function clause matching ssl_cipher:hash_algorithm(8) line 1199 in gen_fsm:terminate/7 line 611 I'm using Erlang 17.5 under Linux. Can anyone help on this please? Thanks in advance. /Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Wed Feb 8 19:15:37 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Wed, 08 Feb 2017 18:15:37 +0000 Subject: [erlang-questions] SSL issues with Firefox 51.0.1 and Chrome 56.0.2924.87 In-Reply-To: References: Message-ID: Thank you guys for your prompt response. I'll update my Elang version then. /Frank a ?crit : > Hello, > this patch for ssl-6.0/src/ssl_cipher.erl should help > Another solution is to switch to modern Erlang 18.0, 19.0, ... > > --- ssl_cipher.erl 2017-01-28 17:47:08.728720668 +0300 > +++ ssl_cipher.erl.new 2017-01-28 17:46:40.860480295 +0300 > @@ -1209,7 +1209,9 @@ > hash_algorithm(?SHA224) -> sha224; > hash_algorithm(?SHA256) -> sha256; > hash_algorithm(?SHA384) -> sha384; > -hash_algorithm(?SHA512) -> sha512. > +hash_algorithm(?SHA512) -> sha512; > +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 7) and (Other =< 223)) -> unassigned; > +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. > > sign_algorithm(anon) -> ?ANON; > sign_algorithm(rsa) -> ?RSA; > @@ -1218,7 +1220,9 @@ > sign_algorithm(?ANON) -> anon; > sign_algorithm(?RSA) -> rsa; > sign_algorithm(?DSA) -> dsa; > -sign_algorithm(?ECDSA) -> ecdsa. > +sign_algorithm(?ECDSA) -> ecdsa; > +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 4) and (Other =< 223)) -> unassigned; > +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. > > hash_size(null) -> > 0; > ---------------- > > > On Wed, Feb 8, 2017 at 8:47 PM, Frank Muller > wrote: > > Hi guys, > > I'm seeing these SSL errors in the app's logs: > > 2017-02-08 12:38:55.227 [error] <0.577.0> Ranch listener https terminated > with reason: > {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} > 2017-02-08 12:38:55.228 [error] <0.576.0> Ranch listener https terminated > with reason: > {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} > 2017-02-08 12:38:55.235 [error] <0.578.0> gen_fsm <0.578.0> in state hello > terminated with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 > 2017-02-08 12:38:55.235 [error] <0.578.0> CRASH REPORT Process <0.578.0> > with 0 neighbours exited with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 in gen_fsm:terminate/7 line 611 > > I'm using Erlang 17.5 under Linux. > Can anyone help on this please? > > Thanks in advance. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From boris.okner@REDACTED Wed Feb 8 20:55:47 2017 From: boris.okner@REDACTED (Boris Okner) Date: Wed, 8 Feb 2017 14:55:47 -0500 Subject: [erlang-questions] LTTNG tracing: depth field Message-ID: Hello, I've started to use lttng dynamic tracing for analyzing function call durations during load tests. I'm collecting 'function_call' and function_return' tracepoints for that. My current problem is that if any loss of trace records happens (and it does happen at the peek of the system load), analyzing the call stack becomes difficult. Namely, if the function_return record gets lost, it'll look like the matching call was never returned, which will distort the tracing of the process stack. Also, there are calls like erlang:throw/1, that never return, by design. Now, the 'depth' field, which I understand is there to show the stack depth, would help a lot, but it always seems to show '0' value, regardless of the actual stack depth. Any suggestions as to how to make 'depth' field work? Boris Okner -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmitryme@REDACTED Wed Feb 8 18:57:11 2017 From: dmitryme@REDACTED (Dmitry Melnikov) Date: Wed, 8 Feb 2017 20:57:11 +0300 Subject: [erlang-questions] SSL issues with Firefox 51.0.1 and Chrome 56.0.2924.87 In-Reply-To: References: Message-ID: Hello, this patch for ssl-6.0/src/ssl_cipher.erl should help Another solution is to switch to modern Erlang 18.0, 19.0, ... --- ssl_cipher.erl 2017-01-28 17:47:08.728720668 +0300 +++ ssl_cipher.erl.new 2017-01-28 17:46:40.860480295 +0300 @@ -1209,7 +1209,9 @@ hash_algorithm(?SHA224) -> sha224; hash_algorithm(?SHA256) -> sha256; hash_algorithm(?SHA384) -> sha384; -hash_algorithm(?SHA512) -> sha512. +hash_algorithm(?SHA512) -> sha512; +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 7) and (Other =< 223)) -> unassigned; +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. sign_algorithm(anon) -> ?ANON; sign_algorithm(rsa) -> ?RSA; @@ -1218,7 +1220,9 @@ sign_algorithm(?ANON) -> anon; sign_algorithm(?RSA) -> rsa; sign_algorithm(?DSA) -> dsa; -sign_algorithm(?ECDSA) -> ecdsa. +sign_algorithm(?ECDSA) -> ecdsa; +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 4) and (Other =< 223)) -> unassigned; +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. hash_size(null) -> 0; ---------------- On Wed, Feb 8, 2017 at 8:47 PM, Frank Muller wrote: > Hi guys, > > I'm seeing these SSL errors in the app's logs: > > 2017-02-08 12:38:55.227 [error] <0.577.0> Ranch listener https terminated > with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{ > file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_ > hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"} > ,{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^ > 0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]}, > {ssl_handshake,dec_hello_extensions,2,[{file,"ssl_ > handshake.erl"},{line,1706}]},{tls_handshake,decode_ > handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{ > tls_handshake,get_tls_handshake_aux,3,[{file,"tls_ > handsha..."},...]},...]},...} > 2017-02-08 12:38:55.228 [error] <0.576.0> Ranch listener https terminated > with reason: {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{ > file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_ > hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"} > ,{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^ > 0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]}, > {ssl_handshake,dec_hello_extensions,2,[{file,"ssl_ > handshake.erl"},{line,1706}]},{tls_handshake,decode_ > handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{ > tls_handshake,get_tls_handshake_aux,3,[{file,"tls_ > handsha..."},...]},...]},...} > 2017-02-08 12:38:55.235 [error] <0.578.0> gen_fsm <0.578.0> in state hello > terminated with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 > 2017-02-08 12:38:55.235 [error] <0.578.0> CRASH REPORT Process <0.578.0> > with 0 neighbours exited with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 in gen_fsm:terminate/7 line 611 > > I'm using Erlang 17.5 under Linux. > Can anyone help on this please? > > Thanks in advance. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Thu Feb 9 05:23:14 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 9 Feb 2017 17:23:14 +1300 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: <22682.65043.970546.919053@gargle.gargle.HOWL> References: <22682.65043.970546.919053@gargle.gargle.HOWL> Message-ID: <97f02074-ac74-235f-83ef-eb89b19c6bc8@cs.otago.ac.nz> On 9/02/17 12:16 AM, Mikael Pettersson wrote: > Write your own conversion routine. > > Your mistake is assuming literals like floats have the same look and feel > regardless of language or environment. That's in general not true. This is spot on, but I suggest *transliteration* from the target syntax to Erlang literal syntax followed by using list_to_float/1 to do the actual *conversion*. Transliterating from one syntax to another is just straightforward text processing, e.g., turn ".2D7" into "0.2e7". Converting *accurately* is somewhere past "difficult" and well into "arcane". From ok@REDACTED Thu Feb 9 05:33:19 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 9 Feb 2017 17:33:19 +1300 Subject: [erlang-questions] convert strings like "1e-8" to floats. In-Reply-To: References: <22682.65043.970546.919053@gargle.gargle.HOWL> Message-ID: On 9/02/17 4:35 AM, Jesper Louis Andersen wrote: > Another example is OCaml, which supports entering integers as > > # 1_000_000;; > - : int = 1000000 > > which is very nifty, but unique to OCaml and thus not too portable. *Not* unique to OCaml. Allowed by Ada and ISO Pascal Extended and Quintus Prolog and Eiffel and F# and >>> Java <<< amongst others. Fortran (pre Fortran 95) and Algol (60 and 68) allowed embedded spaces in number literals. _ is a little safer... From frank.muller.erl@REDACTED Thu Feb 9 06:31:06 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 05:31:06 +0000 Subject: [erlang-questions] SSL issues with Firefox 51.0.1 and Chrome 56.0.2924.87 In-Reply-To: References: Message-ID: The patch fixed the issue. Thanks again. /Frank Thank you guys for your prompt response. > I'll update my Elang version then. > > /Frank > > a ?crit : > > Hello, > this patch for ssl-6.0/src/ssl_cipher.erl should help > Another solution is to switch to modern Erlang 18.0, 19.0, ... > > --- ssl_cipher.erl 2017-01-28 17:47:08.728720668 +0300 > +++ ssl_cipher.erl.new 2017-01-28 17:46:40.860480295 +0300 > @@ -1209,7 +1209,9 @@ > hash_algorithm(?SHA224) -> sha224; > hash_algorithm(?SHA256) -> sha256; > hash_algorithm(?SHA384) -> sha384; > -hash_algorithm(?SHA512) -> sha512. > +hash_algorithm(?SHA512) -> sha512; > +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 7) and (Other =< 223)) -> unassigned; > +hash_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. > > sign_algorithm(anon) -> ?ANON; > sign_algorithm(rsa) -> ?RSA; > @@ -1218,7 +1220,9 @@ > sign_algorithm(?ANON) -> anon; > sign_algorithm(?RSA) -> rsa; > sign_algorithm(?DSA) -> dsa; > -sign_algorithm(?ECDSA) -> ecdsa. > +sign_algorithm(?ECDSA) -> ecdsa; > +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 4) and (Other =< 223)) -> unassigned; > +sign_algorithm(Other) when is_integer(Other) andalso ((Other >= 224) and (Other =< 255)) -> Other. > > hash_size(null) -> > 0; > ---------------- > > > On Wed, Feb 8, 2017 at 8:47 PM, Frank Muller > wrote: > > Hi guys, > > I'm seeing these SSL errors in the app's logs: > > 2017-02-08 12:38:55.227 [error] <0.577.0> Ranch listener https terminated > with reason: > {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} > 2017-02-08 12:38:55.228 [error] <0.576.0> Ranch listener https terminated > with reason: > {{function_clause,[{ssl_cipher,hash_algorithm,"\b",[{file,"ssl_cipher.erl"},{line,1199}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1706}]},{ssl_handshake,'-dec_hello_extensions/2-lc$^0/1-1-',1,[{file,"ssl_handshake.erl"},{line,1707}]},{ssl_handshake,dec_hello_extensions,2,[{file,"ssl_handshake.erl"},{line,1706}]},{tls_handshake,decode_handshake,3,[{file,"tls_handshake.erl"},{line,206}]},{tls_handshake,get_tls_handshake_aux,3,[{file,"tls_handsha..."},...]},...]},...} > 2017-02-08 12:38:55.235 [error] <0.578.0> gen_fsm <0.578.0> in state hello > terminated with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 > 2017-02-08 12:38:55.235 [error] <0.578.0> CRASH REPORT Process <0.578.0> > with 0 neighbours exited with reason: no function clause matching > ssl_cipher:hash_algorithm(8) line 1199 in gen_fsm:terminate/7 line 611 > > I'm using Erlang 17.5 under Linux. > Can anyone help on this please? > > Thanks in advance. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Thu Feb 9 10:06:19 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 09:06:19 +0000 Subject: [erlang-questions] Send VM metrics to Grafana Message-ID: Hi everyone, Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). Here I'm looking for a simple integration with minimal dependencies if possible. Thank you. /Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Thu Feb 9 10:37:10 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 09:37:10 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: Thanks for all the pointers guys. I've also heard about Prometheus (https://prometheus.io/). I like it because it's a single Go binary, very easy to deploy. Anyone has any experience with it and Grafana? /Frank > Hello! > > There are bunch of projects for this, by example exometer, my metronome ( > https://github.com/juise/metronome), and so on. > > Just install influxdb and grafana > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller : > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 914 8 820 815 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahesh@REDACTED Thu Feb 9 10:45:40 2017 From: mahesh@REDACTED (Mahesh Paolini-Subramanya) Date: Thu, 9 Feb 2017 04:45:40 -0500 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: Can't praise Prometheus/Grafana enough. Just Do It... cheers p.s. Take a look at GrafanaLib - https://github.com/weaveworks/grafanalib - towards making some part of your life easier... On Thu, Feb 9, 2017 at 4:37 AM, Frank Muller wrote: > Thanks for all the pointers guys. > > I've also heard about Prometheus (https://prometheus.io/). > > I like it because it's a single Go binary, very easy to deploy. > > Anyone has any experience with it and Grafana? > > /Frank > > > >> Hello! >> >> There are bunch of projects for this, by example exometer, my metronome ( >> https://github.com/juise/metronome), and so on. >> >> Just install influxdb and grafana >> >> ??, 9 ????. 2017 ?. ? 12:06, Frank Muller : >> >> Hi everyone, >> >> Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/ >> ). >> >> Here I'm looking for a simple integration with minimal dependencies if >> possible. >> >> Thank you. >> /Frank >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> -- >> ?????????? ????????? / Alexander Petrovsky, >> >> Skype: askjuise >> Phone: +7 914 8 820 815 >> >> > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- *Mahesh Paolini-Subramanya That tall bald Indian guy..* *Twitter | Blog | G+ | LinkedIn * -------------- next part -------------- An HTML attachment was scrubbed... URL: From himars@REDACTED Thu Feb 9 10:57:44 2017 From: himars@REDACTED (Jack Tang) Date: Thu, 9 Feb 2017 17:57:44 +0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: Frank, http://milhouseonsoftware.com/2016/05/08/measuring-your-elixir-application/. Hope the link helps. BR -Jack On Thu, Feb 9, 2017 at 5:06 PM, Frank Muller wrote: > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- Jack Tang http://www.linkedin.com/in/jacktang -------------- next part -------------- An HTML attachment was scrubbed... URL: From spyl@REDACTED Thu Feb 9 10:12:17 2017 From: spyl@REDACTED (Alexey D. Semiletov) Date: Thu, 9 Feb 2017 11:12:17 +0200 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: If you are using Graphite as backend for Grafana, folsomite ( https://github.com/campanja/folsomite) may fit you. On 9 February 2017 at 11:06, Frank Muller wrote: > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- Alexey D. Semiletov -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilya.khaprov@REDACTED Thu Feb 9 17:59:42 2017 From: ilya.khaprov@REDACTED (Ilya Khaprov) Date: Thu, 9 Feb 2017 16:59:42 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: , Message-ID: Then you might want to try https://github.com/deadtrickster/prometheus.erl Regards, Ilya From: Frank Muller Sent: Thursday, February 9, 2017 12:37 PM To: Alexander Petrovsky; Erlang-Questions Questions; spyl@REDACTED Subject: Re: [erlang-questions] Send VM metrics to Grafana Thanks for all the pointers guys. I've also heard about Prometheus (https://prometheus.io/). I like it because it's a single Go binary, very easy to deploy. Anyone has any experience with it and Grafana? /Frank > Hello! There are bunch of projects for this, by example exometer, my metronome (https://github.com/juise/metronome), and so on. Just install influxdb and grafana ??, 9 ????. 2017 ?. ? 12:06, Frank Muller >: Hi everyone, Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). Here I'm looking for a simple integration with minimal dependencies if possible. Thank you. /Frank _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions -- ?????????? ????????? / Alexander Petrovsky, Skype: askjuise Phone: +7 914 8 820 815 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Thu Feb 9 18:48:28 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 17:48:28 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: Thanks Illya, found it already this morning. Does someone already used this library? Maybe she/he can share their experience? /Frank Then you might want to try https://github.com/deadtrickster/prometheus.erl > > > > Regards, > > Ilya > > > > *From: *Frank Muller > *Sent: *Thursday, February 9, 2017 12:37 PM > *To: *Alexander Petrovsky ; Erlang-Questions Questions > ; spyl@REDACTED > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > Thanks for all the pointers guys. > > I've also heard about Prometheus (https://prometheus.io/). > > I like it because it's a single Go binary, very easy to deploy. > > Anyone has any experience with it and Grafana? > > /Frank > > > > Hello! > > There are bunch of projects for this, by example exometer, my metronome ( > https://github.com/juise/metronome), and so on. > > Just install influxdb and grafana > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller : > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 914 8 820 815 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t@REDACTED Thu Feb 9 18:55:16 2017 From: t@REDACTED (Tristan Sloughter) Date: Thu, 09 Feb 2017 09:55:16 -0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: <1486662916.1541324.875894104.2F2C3D79@webmail.messagingengine.com> Yup, we do at work and a number of others do as well I know of. I spoke with Ilya yesterday on irc about a shared template for a Erlang metrics dashboard, which he is going to start this weekend based on his rabbitmq dashboard. I plan to do a full writeup on grafana, prometheus and alertmanager for Erlang, more specifically Elli, in the near future -- once I get it all working, hehe. -- Tristan Sloughter "I am not a crackpot" - Abe Simpson t@REDACTED On Thu, Feb 9, 2017, at 09:48 AM, Frank Muller wrote: > Thanks Illya, found it already this morning. > > Does someone already used this library? Maybe she/he can share their > experience? > > /Frank > >> Then you might want to try >> https://github.com/deadtrickster/prometheus.erl____ >> __ __ >> Regards,____ >> Ilya >> __ __ >> *From: *Frank Muller[1] >> *Sent: *Thursday, February 9, 2017 12:37 PM >> *To: *Alexander Petrovsky[2]; Erlang-Questions Questions[3]; >> spyl@REDACTED >> *Subject: *Re: [erlang-questions] Send VM metrics to Grafana >> __ __ >> Thanks for all the pointers guys. >> >> I've also heard about Prometheus (https://prometheus.io/). >> >> I like it because it's a single Go binary, very easy to deploy. >> >> Anyone has any experience with it and Grafana? >> >> /Frank >> >> >>> Hello! >>> >>> There are bunch of projects for this, by example exometer, my >>> metronome (https://github.com/juise/metronome), and so on. >>> >>> Just install influxdb and grafana >>> >>> ??, 9 ????. 2017 ?. ? 12:06, Frank Muller >>> : >>>> >>>> Hi everyone, >>>> >>>> Does anyone succeeded to push VM metrics to Grafana >>>> (http://grafana.org/). >>>> >>>> Here I'm looking for a simple integration with minimal dependencies >>>> if possible. >>>> >>>> Thank you. >>>> /Frank >>>> _______________________________________________ >>>> erlang-questions mailing list >>>> erlang-questions@REDACTED >>>> http://erlang.org/mailman/listinfo/erlang-questions >>> -- >>> ?????????? ????????? / Alexander Petrovsky, >>> >>> Skype: askjuise >>> >>> Phone: +7 914 8 820 815 >>> > _________________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions Links: 1. mailto:frank.muller.erl@REDACTED 2. mailto:askjuise@REDACTED 3. mailto:erlang-questions@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Thu Feb 9 18:57:01 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 17:57:01 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: <1486662916.1541324.875894104.2F2C3D79@webmail.messagingengine.com> References: <1486662916.1541324.875894104.2F2C3D79@webmail.messagingengine.com> Message-ID: Hi Tristan, Thanks for the feedbacks. Can't wait for it !!! /Frank a ?crit : > Yup, we do at work and a number of others do as well I know of. > > I spoke with Ilya yesterday on irc about a shared template for a Erlang > metrics dashboard, which he is going to start this weekend based on his > rabbitmq dashboard. > > I plan to do a full writeup on grafana, prometheus and alertmanager for > Erlang, more specifically Elli, in the near future -- once I get it all > working, hehe. > > -- > Tristan Sloughter > "I am not a crackpot" - Abe Simpson > t@REDACTED > > > On Thu, Feb 9, 2017, at 09:48 AM, Frank Muller wrote: > > Thanks Illya, found it already this morning. > > Does someone already used this library? Maybe she/he can share their > experience? > > /Frank > > Then you might want to try https://github.com/deadtrickster/prometheus.erl > > > > Regards, > > Ilya > > > > *From: *Frank Muller > *Sent: *Thursday, February 9, 2017 12:37 PM > *To: *Alexander Petrovsky ; Erlang-Questions Questions > ; spyl@REDACTED > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > Thanks for all the pointers guys. > > I've also heard about Prometheus (https://prometheus.io/). > > I like it because it's a single Go binary, very easy to deploy. > > Anyone has any experience with it and Grafana? > > /Frank > > > > Hello! > > There are bunch of projects for this, by example exometer, my metronome ( > https://github.com/juise/metronome), and so on. > > Just install influxdb and grafana > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller : > > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > > Phone: +7 914 8 820 815 > > *_______________________________________________* > 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 andre@REDACTED Thu Feb 9 20:26:28 2017 From: andre@REDACTED (Andre Graf) Date: Thu, 9 Feb 2017 20:26:28 +0100 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> Hi Frank, VerneMQ, the project I am working at these days has chosen the Prometheus path too. However, we currently don't use the mentioned library as most of our metrics (including vm stats) are either gauges or counters it was very simple to expose them directly using a Cowboy HTTP handler returning the metrics in text/plain. The HTTP handler code is available here: https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 The code that sets up the metrics is here: https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl Hope this helps. Cheers, Andre On 02/09/2017 06:48 PM, Frank Muller wrote: > Thanks Illya, found it already this morning. > > Does someone already used this library? Maybe she/he can share their > experience? > > /Frank > > Then you might want to try > https://github.com/deadtrickster/prometheus.erl____ > > __ __ > > Regards,____ > > Ilya > > __ __ > > *From: *Frank Muller > *Sent: *Thursday, February 9, 2017 12:37 PM > *To: *Alexander Petrovsky ; > Erlang-Questions Questions ; > spyl@REDACTED > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > __ __ > > Thanks for all the pointers guys. > > I've also heard about Prometheus (https://prometheus.io/). > > I like it because it's a single Go binary, very easy to deploy. > > Anyone has any experience with it and Grafana? > > /Frank > > > > > Hello! > > There are bunch of projects for this, by example exometer, my > metronome (https://github.com/juise/metronome), and so on. > > Just install influxdb and grafana > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller > >: > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana > (http://grafana.org/). > > Here I'm looking for a simple integration with minimal > dependencies if possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- > ?????????? ????????? / Alexander Petrovsky, > > Skype: askjuise > Phone: +7 914 8 820 815 > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > From frank.muller.erl@REDACTED Thu Feb 9 20:49:06 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 19:49:06 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> Message-ID: Andre, I like it it's simple and VerneMQ graphs look great. Do you also have some docs on how set these dashboards on Grafana? /Frank a ?crit : > Hi Frank, > > VerneMQ, the project I am working at these days has chosen the > Prometheus path too. However, we currently don't use the mentioned > library as most of our metrics (including vm stats) are either gauges or > counters it was very simple to expose them directly using a Cowboy HTTP > handler returning the metrics in text/plain. > > The HTTP handler code is available here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 > > The code that sets up the metrics is here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl > > Hope this helps. > > Cheers, > Andre > > > On 02/09/2017 06:48 PM, Frank Muller wrote: > > Thanks Illya, found it already this morning. > > > > Does someone already used this library? Maybe she/he can share their > > experience? > > > > /Frank > > > > Then you might want to try > > https://github.com/deadtrickster/prometheus.erl____ > > > > __ __ > > > > Regards,____ > > > > Ilya > > > > __ __ > > > > *From: *Frank Muller > > *Sent: *Thursday, February 9, 2017 12:37 PM > > *To: *Alexander Petrovsky ; > > Erlang-Questions Questions ; > > spyl@REDACTED > > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > > __ __ > > > > Thanks for all the pointers guys. > > > > I've also heard about Prometheus (https://prometheus.io/). > > > > I like it because it's a single Go binary, very easy to deploy. > > > > Anyone has any experience with it and Grafana? > > > > /Frank > > > > > > > > > Hello! > > > > There are bunch of projects for this, by example exometer, my > > metronome (https://github.com/juise/metronome), and so on. > > > > Just install influxdb and grafana > > > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller > > >>: > > > > Hi everyone, > > > > Does anyone succeeded to push VM metrics to Grafana > > (http://grafana.org/). > > > > Here I'm looking for a simple integration with minimal > > dependencies if possible. > > > > Thank you. > > /Frank > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED erlang-questions@REDACTED> > > http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > > ?????????? ????????? / Alexander Petrovsky, > > > > Skype: askjuise > > Phone: +7 914 8 820 815 > > > > > > > > _______________________________________________ > > 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 andre@REDACTED Thu Feb 9 21:09:28 2017 From: andre@REDACTED (Andre Graf) Date: Thu, 9 Feb 2017 21:09:28 +0100 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> Message-ID: <8e750f3a-5d3c-aac2-66a4-a4a0bd826d8e@dergraf.org> Unfortunately not. On 02/09/2017 08:49 PM, Frank Muller wrote: > Andre, > > I like it it's simple and VerneMQ graphs look great. > > Do you also have some docs on how set these dashboards on Grafana? > > /Frank > > > a ?crit : > > Hi Frank, > > VerneMQ, the project I am working at these days has chosen the > Prometheus path too. However, we currently don't use the mentioned > library as most of our metrics (including vm stats) are either gauges or > counters it was very simple to expose them directly using a Cowboy HTTP > handler returning the metrics in text/plain. > > The HTTP handler code is available here: > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 > > The code that sets up the metrics is here: > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl > > Hope this helps. > > Cheers, > Andre > > > On 02/09/2017 06:48 PM, Frank Muller wrote: > > Thanks Illya, found it already this morning. > > > > Does someone already used this library? Maybe she/he can share their > > experience? > > > > /Frank > > > > Then you might want to try > > https://github.com/deadtrickster/prometheus.erl____ > > > > __ __ > > > > Regards,____ > > > > Ilya > > > > __ __ > > > > *From: *Frank Muller > > > *Sent: *Thursday, February 9, 2017 12:37 PM > > *To: *Alexander Petrovsky >; > > Erlang-Questions Questions >; > > spyl@REDACTED > > > > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > > __ __ > > > > Thanks for all the pointers guys. > > > > I've also heard about Prometheus (https://prometheus.io/). > > > > I like it because it's a single Go binary, very easy to deploy. > > > > Anyone has any experience with it and Grafana? > > > > /Frank > > > > > >> > > > > Hello! > > > > There are bunch of projects for this, by example exometer, my > > metronome (https://github.com/juise/metronome), and so on. > > > > Just install influxdb and grafana > > > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller > > > >>: > > > > Hi everyone, > > > > Does anyone succeeded to push VM metrics to Grafana > > (http://grafana.org/). > > > > Here I'm looking for a simple integration with minimal > > dependencies if possible. > > > > Thank you. > > /Frank > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > > > > http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > > ?????????? ????????? / Alexander Petrovsky, > > > > Skype: askjuise > > Phone: +7 914 8 820 815 > > > > > > > > _______________________________________________ > > 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 anthonym@REDACTED Thu Feb 9 21:55:20 2017 From: anthonym@REDACTED (Anthony Molinaro) Date: Thu, 9 Feb 2017 12:55:20 -0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> Message-ID: <0081DFF4-6D31-44C3-9B6D-E3F65BCB4C3C@alumni.caltech.edu> If you want the flexibility of swapping out where you send metrics to without changing application code you might consider MonDemand (http://www.mondemand.org/). We use it to send many millions of metrics every minute and currently write those to RRDs which are accessed by grafana via graphite. In the past I wrote plugins to forward metrics to InfluxDB, OpenTSDB/KairosDB, Graphite, Riemann, and a few other custom backends. I haven't looked at it but adding something like Prometheus is possible assuming a decent client library exists. Mondemand client libraries exist in Erlang, Java, and C (SWIG compatible and we've wrapped perl and python). The Erlang client library has been embedded in both Elixir and Erlang without issue for years. If you have any interest in checking it out and need help with setup or questions let me know. -Anthony > On Feb 9, 2017, at 11:49 AM, Frank Muller wrote: > > Andre, > > I like it it's simple and VerneMQ graphs look great. > > Do you also have some docs on how set these dashboards on Grafana? > > /Frank > > a ?crit : >> Hi Frank, >> >> VerneMQ, the project I am working at these days has chosen the >> Prometheus path too. However, we currently don't use the mentioned >> library as most of our metrics (including vm stats) are either gauges or >> counters it was very simple to expose them directly using a Cowboy HTTP >> handler returning the metrics in text/plain. >> >> The HTTP handler code is available here: >> https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 >> >> The code that sets up the metrics is here: >> https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl >> >> Hope this helps. >> >> Cheers, >> Andre >> >> >> On 02/09/2017 06:48 PM, Frank Muller wrote: >> > Thanks Illya, found it already this morning. >> > >> > Does someone already used this library? Maybe she/he can share their >> > experience? >> > >> > /Frank >> > >> > Then you might want to try >> > https://github.com/deadtrickster/prometheus.erl____ >> > >> > __ __ >> > >> > Regards,____ >> > >> > Ilya >> > >> > __ __ >> > >> > *From: *Frank Muller >> > *Sent: *Thursday, February 9, 2017 12:37 PM >> > *To: *Alexander Petrovsky ; >> > Erlang-Questions Questions ; >> > spyl@REDACTED >> > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana >> > >> > __ __ >> > >> > Thanks for all the pointers guys. >> > >> > I've also heard about Prometheus (https://prometheus.io/). >> > >> > I like it because it's a single Go binary, very easy to deploy. >> > >> > Anyone has any experience with it and Grafana? >> > >> > /Frank >> > >> > > >> > >> > Hello! >> > >> > There are bunch of projects for this, by example exometer, my >> > metronome (https://github.com/juise/metronome), and so on. >> > >> > Just install influxdb and grafana >> > >> > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller >> > >: >> > >> > Hi everyone, >> > >> > Does anyone succeeded to push VM metrics to Grafana >> > (http://grafana.org/). >> > >> > Here I'm looking for a simple integration with minimal >> > dependencies if possible. >> > >> > Thank you. >> > /Frank >> > >> > _______________________________________________ >> > erlang-questions mailing list >> > erlang-questions@REDACTED >> > http://erlang.org/mailman/listinfo/erlang-questions >> > >> > -- >> > ?????????? ????????? / Alexander Petrovsky, >> > >> > Skype: askjuise >> > Phone: +7 914 8 820 815 >> > >> > >> > >> > _______________________________________________ >> > 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 frank.muller.erl@REDACTED Thu Feb 9 21:57:56 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Thu, 09 Feb 2017 20:57:56 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: <0081DFF4-6D31-44C3-9B6D-E3F65BCB4C3C@alumni.caltech.edu> References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> <0081DFF4-6D31-44C3-9B6D-E3F65BCB4C3C@alumni.caltech.edu> Message-ID: Thanks Anthony. For sure I'll give it a try. /Frank a ?crit : > If you want the flexibility of swapping out where you send metrics to > without changing application code you might consider MonDemand ( > http://www.mondemand.org/). > > We use it to send many millions of metrics every minute and currently > write those to RRDs which are accessed by grafana via graphite. In the > past I wrote plugins to forward metrics to InfluxDB, OpenTSDB/KairosDB, > Graphite, Riemann, and a few other custom backends. I haven't looked at it > but adding something like Prometheus is possible assuming a decent client > library exists. > > Mondemand client libraries exist in Erlang, Java, and C (SWIG compatible > and we've wrapped perl and python). The Erlang client library has been > embedded in both Elixir and Erlang without issue for years. > > If you have any interest in checking it out and need help with setup or > questions let me know. > > -Anthony > > On Feb 9, 2017, at 11:49 AM, Frank Muller > wrote: > > Andre, > > I like it it's simple and VerneMQ graphs look great. > > Do you also have some docs on how set these dashboards on Grafana? > > /Frank > > a ?crit : > > Hi Frank, > > VerneMQ, the project I am working at these days has chosen the > Prometheus path too. However, we currently don't use the mentioned > library as most of our metrics (including vm stats) are either gauges or > counters it was very simple to expose them directly using a Cowboy HTTP > handler returning the metrics in text/plain. > > The HTTP handler code is available here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 > > The code that sets up the metrics is here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl > > Hope this helps. > > Cheers, > Andre > > > On 02/09/2017 06:48 PM, Frank Muller wrote: > > Thanks Illya, found it already this morning. > > > > Does someone already used this library? Maybe she/he can share their > > experience? > > > > /Frank > > > > Then you might want to try > > https://github.com/deadtrickster/prometheus.erl____ > > > > __ __ > > > > Regards,____ > > > > Ilya > > > > __ __ > > > > *From: *Frank Muller > > *Sent: *Thursday, February 9, 2017 12:37 PM > > *To: *Alexander Petrovsky ; > > Erlang-Questions Questions ; > > spyl@REDACTED > > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > > __ __ > > > > Thanks for all the pointers guys. > > > > I've also heard about Prometheus (https://prometheus.io/). > > > > I like it because it's a single Go binary, very easy to deploy. > > > > Anyone has any experience with it and Grafana? > > > > /Frank > > > > > > > > > Hello! > > > > There are bunch of projects for this, by example exometer, my > > metronome (https://github.com/juise/metronome), and so on. > > > > Just install influxdb and grafana > > > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller > > >>: > > > > Hi everyone, > > > > Does anyone succeeded to push VM metrics to Grafana > > (http://grafana.org/). > > > > Here I'm looking for a simple integration with minimal > > dependencies if possible. > > > > Thank you. > > /Frank > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED erlang-questions@REDACTED> > > http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > > ?????????? ????????? / Alexander Petrovsky, > > > > Skype: askjuise > > Phone: +7 914 8 820 815 > > > > > > > > _______________________________________________ > > 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 joaohf@REDACTED Thu Feb 9 23:59:02 2017 From: joaohf@REDACTED (=?UTF-8?Q?Jo=C3=A3o_Henrique_Freitas?=) Date: Thu, 9 Feb 2017 20:59:02 -0200 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> <0081DFF4-6D31-44C3-9B6D-E3F65BCB4C3C@alumni.caltech.edu> Message-ID: Hi, And what about this: https://dalmatiner.io https://dalmatiner.readme.io/docs Thanks. On Thu, Feb 9, 2017 at 6:57 PM, Frank Muller wrote: > Thanks Anthony. For sure I'll give it a try. > > /Frank > > a ?crit : > > If you want the flexibility of swapping out where you send metrics to >> without changing application code you might consider MonDemand ( >> http://www.mondemand.org/). >> >> We use it to send many millions of metrics every minute and currently >> write those to RRDs which are accessed by grafana via graphite. In the >> past I wrote plugins to forward metrics to InfluxDB, OpenTSDB/KairosDB, >> Graphite, Riemann, and a few other custom backends. I haven't looked at it >> but adding something like Prometheus is possible assuming a decent client >> library exists. >> >> Mondemand client libraries exist in Erlang, Java, and C (SWIG compatible >> and we've wrapped perl and python). The Erlang client library has been >> embedded in both Elixir and Erlang without issue for years. >> >> If you have any interest in checking it out and need help with setup or >> questions let me know. >> >> -Anthony >> >> On Feb 9, 2017, at 11:49 AM, Frank Muller >> wrote: >> >> Andre, >> >> I like it it's simple and VerneMQ graphs look great. >> >> Do you also have some docs on how set these dashboards on Grafana? >> >> /Frank >> >> a ?crit : >> >> Hi Frank, >> >> VerneMQ, the project I am working at these days has chosen the >> Prometheus path too. However, we currently don't use the mentioned >> library as most of our metrics (including vm stats) are either gauges or >> counters it was very simple to expose them directly using a Cowboy HTTP >> handler returning the metrics in text/plain. >> >> The HTTP handler code is available here: >> https://github.com/erlio/vernemq/blob/master/apps/vmq_ >> server/src/vmq_metrics_http.erl#L47-L61 >> >> The code that sets up the metrics is here: >> https://github.com/erlio/vernemq/blob/master/apps/vmq_ >> server/src/vmq_metrics.erl >> >> Hope this helps. >> >> Cheers, >> Andre >> >> >> On 02/09/2017 06:48 PM, Frank Muller wrote: >> > Thanks Illya, found it already this morning. >> > >> > Does someone already used this library? Maybe she/he can share their >> > experience? >> > >> > /Frank >> > >> > Then you might want to try >> > https://github.com/deadtrickster/prometheus.erl____ >> > >> > __ __ >> > >> > Regards,____ >> > >> > Ilya >> > >> > __ __ >> > >> > *From: *Frank Muller >> > *Sent: *Thursday, February 9, 2017 12:37 PM >> > *To: *Alexander Petrovsky ; >> > Erlang-Questions Questions ; >> > spyl@REDACTED >> > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana >> > >> > __ __ >> > >> > Thanks for all the pointers guys. >> > >> > I've also heard about Prometheus (https://prometheus.io/). >> > >> > I like it because it's a single Go binary, very easy to deploy. >> > >> > Anyone has any experience with it and Grafana? >> > >> > /Frank >> > >> > > >> > >> > Hello! >> > >> > There are bunch of projects for this, by example exometer, my >> > metronome (https://github.com/juise/metronome), and so on. >> > >> > Just install influxdb and grafana >> > >> > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller >> > > >>: >> > >> > Hi everyone, >> > >> > Does anyone succeeded to push VM metrics to Grafana >> > (http://grafana.org/). >> > >> > Here I'm looking for a simple integration with minimal >> > dependencies if possible. >> > >> > Thank you. >> > /Frank >> > >> > _______________________________________________ >> > erlang-questions mailing list >> > erlang-questions@REDACTED > erlang.org> >> > http://erlang.org/mailman/listinfo/erlang-questions >> > >> > -- >> > ?????????? ????????? / Alexander Petrovsky, >> > >> > Skype: askjuise >> > Phone: +7 914 8 820 815 >> > >> > >> > >> > _______________________________________________ >> > erlang-questions mailing list >> > erlang-questions@REDACTED >> > http://erlang.org/mailman/listinfo/erlang-questions >> > >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -- Jo?o Henrique Ferreira de Freitas - joaohf_at_gmail.com Campinas-SP-Brasil -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.casilli@REDACTED Thu Feb 9 22:25:20 2017 From: christopher.casilli@REDACTED (chris casilli) Date: Thu, 9 Feb 2017 16:25:20 -0500 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license Message-ID: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> Hello, I noticed that lib/syntax_tools uses LGPL-2.0+ license. How does this effect the overall Apache-2.0 license of OTP. Can this component be left out. Is a different version available that uses Apache-2.0 license. Kind Regards, Chris Casilli From carlo.cabanilla@REDACTED Thu Feb 9 23:50:08 2017 From: carlo.cabanilla@REDACTED (Carlo Cabanilla) Date: Thu, 9 Feb 2017 14:50:08 -0800 Subject: [erlang-questions] count supervisor restarts? Message-ID: Hi, I was wondering what the best way to count supervisor restarts across all running otp applications for submission to an external metrics collector? .Carlo -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Fri Feb 10 06:48:49 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Fri, 10 Feb 2017 05:48:49 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <84eebdd5-7e4c-5f7b-2f61-ca8d53d6c373@dergraf.org> <0081DFF4-6D31-44C3-9B6D-E3F65BCB4C3C@alumni.caltech.edu> Message-ID: Hi Jo?o Thanks for sharing. Dalmatiner was the first one I googled, and I even watched the author's video. In my case, i just need to plot VM metrics, nothing else. Moreover, it relies on ZFS and has a couple of deps (see rebar.config). As i've explained in the beginning, I'm an Erlang newbie and I'm looking for simplicity first. Thanks again anyway. I'm sure some others will have more interest on Dalmatiner than I. Benchs we're very impressive. /Frank a ?crit : > Hi, > > And what about this: > > https://dalmatiner.io > https://dalmatiner.readme.io/docs > > Thanks. > > On Thu, Feb 9, 2017 at 6:57 PM, Frank Muller > wrote: > > Thanks Anthony. For sure I'll give it a try. > > /Frank > > a ?crit : > > If you want the flexibility of swapping out where you send metrics to > without changing application code you might consider MonDemand ( > http://www.mondemand.org/). > > We use it to send many millions of metrics every minute and currently > write those to RRDs which are accessed by grafana via graphite. In the > past I wrote plugins to forward metrics to InfluxDB, OpenTSDB/KairosDB, > Graphite, Riemann, and a few other custom backends. I haven't looked at it > but adding something like Prometheus is possible assuming a decent client > library exists. > > Mondemand client libraries exist in Erlang, Java, and C (SWIG compatible > and we've wrapped perl and python). The Erlang client library has been > embedded in both Elixir and Erlang without issue for years. > > If you have any interest in checking it out and need help with setup or > questions let me know. > > -Anthony > > On Feb 9, 2017, at 11:49 AM, Frank Muller > wrote: > > Andre, > > I like it it's simple and VerneMQ graphs look great. > > Do you also have some docs on how set these dashboards on Grafana? > > /Frank > > a ?crit : > > Hi Frank, > > VerneMQ, the project I am working at these days has chosen the > Prometheus path too. However, we currently don't use the mentioned > library as most of our metrics (including vm stats) are either gauges or > counters it was very simple to expose them directly using a Cowboy HTTP > handler returning the metrics in text/plain. > > The HTTP handler code is available here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics_http.erl#L47-L61 > > The code that sets up the metrics is here: > > https://github.com/erlio/vernemq/blob/master/apps/vmq_server/src/vmq_metrics.erl > > Hope this helps. > > Cheers, > Andre > > > On 02/09/2017 06:48 PM, Frank Muller wrote: > > Thanks Illya, found it already this morning. > > > > Does someone already used this library? Maybe she/he can share their > > experience? > > > > /Frank > > > > Then you might want to try > > https://github.com/deadtrickster/prometheus.erl____ > > > > __ __ > > > > Regards,____ > > > > Ilya > > > > __ __ > > > > *From: *Frank Muller > > *Sent: *Thursday, February 9, 2017 12:37 PM > > *To: *Alexander Petrovsky ; > > Erlang-Questions Questions ; > > spyl@REDACTED > > *Subject: *Re: [erlang-questions] Send VM metrics to Grafana > > > > __ __ > > > > Thanks for all the pointers guys. > > > > I've also heard about Prometheus (https://prometheus.io/). > > > > I like it because it's a single Go binary, very easy to deploy. > > > > Anyone has any experience with it and Grafana? > > > > /Frank > > > > > > > > > Hello! > > > > There are bunch of projects for this, by example exometer, my > > metronome (https://github.com/juise/metronome), and so on. > > > > Just install influxdb and grafana > > > > ??, 9 ????. 2017 ?. ? 12:06, Frank Muller > > >>: > > > > Hi everyone, > > > > Does anyone succeeded to push VM metrics to Grafana > > (http://grafana.org/). > > > > Here I'm looking for a simple integration with minimal > > dependencies if possible. > > > > Thank you. > > /Frank > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED erlang-questions@REDACTED> > > http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > > ?????????? ????????? / Alexander Petrovsky, > > > > Skype: askjuise > > Phone: +7 914 8 820 815 > > > > > > > > _______________________________________________ > > erlang-questions mailing list > > erlang-questions@REDACTED > > http://erlang.org/mailman/listinfo/erlang-questions > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > -- > Jo?o Henrique Ferreira de Freitas - joaohf_at_gmail.com > Campinas-SP-Brasil > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenneth@REDACTED Fri Feb 10 09:02:25 2017 From: kenneth@REDACTED (Kenneth Lundin) Date: Fri, 10 Feb 2017 09:02:25 +0100 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> Message-ID: Hi, The license of Syntax tools is changed to Apache-2 and LGPL (it is the users choice) in the master branch (which is the way to the next major release (OTP 20) in end of June. And yes you can leave out syntax tools for most usage. It is mostly used during development for some non mandatory tools. For example it is used by edoc the tool for generating documentation from the source code. It is unlikely to be used in a deployed server. /Kenneth, Erlang/OTP Ericsson On Thu, Feb 9, 2017 at 10:25 PM, chris casilli < christopher.casilli@REDACTED> wrote: > Hello, > > I noticed that lib/syntax_tools uses LGPL-2.0+ license. > How does this effect the overall Apache-2.0 license of OTP. > > Can this component be left out. Is a different version available that uses > Apache-2.0 license. > > Kind Regards, > > Chris Casilli > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc@REDACTED Fri Feb 10 09:08:02 2017 From: marc@REDACTED (Marc Worrell) Date: Fri, 10 Feb 2017 09:08:02 +0100 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> Message-ID: <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> Hi, We use syntax_tools extensively in Zotonic for compiling templates and dispatch rules to Erlang modules. This is done runtime, so we would prefer that syntax_tools stays in the Erlang distribution. Regards, Marc Worrell > On 10 Feb 2017, at 09:02, Kenneth Lundin wrote: > > Hi, > > The license of Syntax tools is changed to Apache-2 and LGPL (it is the users choice) in the master branch (which is the way to > the next major release (OTP 20) in end of June. > > And yes you can leave out syntax tools for most usage. It is mostly used during development for some non mandatory tools. > For example it is used by edoc the tool for generating documentation from the source code. > > It is unlikely to be used in a deployed server. > > /Kenneth, Erlang/OTP Ericsson > > On Thu, Feb 9, 2017 at 10:25 PM, chris casilli > wrote: > Hello, > > I noticed that lib/syntax_tools uses LGPL-2.0+ license. > How does this effect the overall Apache-2.0 license of OTP. > > Can this component be left out. Is a different version available that uses Apache-2.0 license. > > Kind Regards, > > Chris Casilli > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Fri Feb 10 09:32:12 2017 From: mjtruog@REDACTED (Michael Truog) Date: Fri, 10 Feb 2017 00:32:12 -0800 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> Message-ID: <589D7A8C.10709@gmail.com> On 02/10/2017 12:08 AM, Marc Worrell wrote: > > We use syntax_tools extensively in Zotonic for compiling templates and dispatch rules to Erlang modules. > This is done runtime, so we would prefer that syntax_tools stays in the Erlang distribution. > > Yes, I agree this is important. CloudI's logging requires merl from syntax_tools to avoid the use of global state when determining the current log level (so it relies on dynamically generating the module used for the logging interface). That means merl from syntax_tools is always being used anywhere CloudI is used. Best Regards, Michael > > >> On 10 Feb 2017, at 09:02, Kenneth Lundin > wrote: >> >> Hi, >> >> The license of Syntax tools is changed to Apache-2 and LGPL (it is the users choice) in the master branch (which is the way to >> the next major release (OTP 20) in end of June. >> >> And yes you can leave out syntax tools for most usage. It is mostly used during development for some non mandatory tools. >> For example it is used by edoc the tool for generating documentation from the source code. >> >> It is unlikely to be used in a deployed server. >> >> /Kenneth, Erlang/OTP Ericsson >> >> On Thu, Feb 9, 2017 at 10:25 PM, chris casilli > wrote: >> >> Hello, >> >> I noticed that lib/syntax_tools uses LGPL-2.0+ license. >> How does this effect the overall Apache-2.0 license of OTP. >> >> Can this component be left out. Is a different version available that uses Apache-2.0 license. >> >> Kind Regards, >> >> Chris Casilli >> >> _______________________________________________ >> 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 kenneth@REDACTED Fri Feb 10 10:08:01 2017 From: kenneth@REDACTED (Kenneth Lundin) Date: Fri, 10 Feb 2017 10:08:01 +0100 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> Message-ID: In my previous answer I was not thinking about removing syntax tools from the Erlang distribution, I just explained that syntax_tools and other Erlang applications included in the Erlang distribution CAN BE LEFT OUT (if there are no dependencies to them). Syntax_tools and the Compiler for that matter are applications that typically are used during development and not in runtime. I know there are exceptions to this where a system generate new Erlang modules in runtime. In that case you get a dependency to the Compiler application but not necessarily to Syntax_tools. Note that the current Erlang/OTP distribution is a development and runtime system for Erlang and that the idea is that the user create his own release which contain a subset of the components (Erlang applications) included in the distribution. /Kenneth, Erlang/OTP Ericsson On Fri, Feb 10, 2017 at 9:08 AM, Marc Worrell wrote: > Hi, > > We use syntax_tools extensively in Zotonic for compiling templates and > dispatch rules to Erlang modules. > This is done runtime, so we would prefer that syntax_tools stays in the > Erlang distribution. > > Regards, > > Marc Worrell > > > On 10 Feb 2017, at 09:02, Kenneth Lundin wrote: > > Hi, > > The license of Syntax tools is changed to Apache-2 and LGPL (it is the > users choice) in the master branch (which is the way to > the next major release (OTP 20) in end of June. > > And yes you can leave out syntax tools for most usage. It is mostly used > during development for some non mandatory tools. > For example it is used by edoc the tool for generating documentation from > the source code. > > It is unlikely to be used in a deployed server. > > /Kenneth, Erlang/OTP Ericsson > > On Thu, Feb 9, 2017 at 10:25 PM, chris casilli < > christopher.casilli@REDACTED> wrote: > >> Hello, >> >> I noticed that lib/syntax_tools uses LGPL-2.0+ license. >> How does this effect the overall Apache-2.0 license of OTP. >> >> Can this component be left out. Is a different version available that >> uses Apache-2.0 license. >> >> Kind Regards, >> >> Chris Casilli >> >> _______________________________________________ >> 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 gpadovani@REDACTED Fri Feb 10 10:09:42 2017 From: gpadovani@REDACTED (Gianluca Padovani) Date: Fri, 10 Feb 2017 10:09:42 +0100 Subject: [erlang-questions] [ANN] Rome Erlang & Elixir Factory Lite - 7th April 2017 Message-ID: Hi to all, I'm writing just to announce that we are organizing the Erlang & Elixir Factory Lite in Rome on 7th April 2017. Some speakers like Joe Armstrong, Mike Williams, Robert Virding and Francesco Cesarini are already confirmed. There will be also Michael Klishin, RabbitMQ developer. More info here: http://www.erlang-factory.com/rome2017 I hope to see you all in Rome!!! Gianluca -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc@REDACTED Fri Feb 10 10:12:29 2017 From: marc@REDACTED (Marc Worrell) Date: Fri, 10 Feb 2017 10:12:29 +0100 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> <57B18B35-DCB0-4AD3-AA03-23B20A9F589D@worrell.nl> Message-ID: <1AA4064D-90F0-4B4A-B7AE-1D87734C1CC3@worrell.nl> Hi Kenneth, Re-reading your reply I concluded already that you meant just that. Thanks for clearing this up. Regards, Marc > On 10 Feb 2017, at 10:08, Kenneth Lundin wrote: > > In my previous answer I was not thinking about removing syntax tools from the Erlang distribution, I just explained > that syntax_tools and other Erlang applications included in the Erlang distribution CAN BE LEFT OUT (if there are no dependencies > to them). Syntax_tools and the Compiler for that matter are applications that typically are used during development and not in runtime. > > I know there are exceptions to this where a system generate new Erlang modules in runtime. > In that case you get a dependency to the Compiler application but not necessarily to Syntax_tools. > > Note that the current Erlang/OTP distribution is a development and runtime system for Erlang and that the idea is that the user > create his own release which contain a subset of the components (Erlang applications) included in the distribution. > > /Kenneth, Erlang/OTP Ericsson > > > > > > On Fri, Feb 10, 2017 at 9:08 AM, Marc Worrell > wrote: > Hi, > > We use syntax_tools extensively in Zotonic for compiling templates and dispatch rules to Erlang modules. > This is done runtime, so we would prefer that syntax_tools stays in the Erlang distribution. > > Regards, > > Marc Worrell > > >> On 10 Feb 2017, at 09:02, Kenneth Lundin > wrote: >> >> Hi, >> >> The license of Syntax tools is changed to Apache-2 and LGPL (it is the users choice) in the master branch (which is the way to >> the next major release (OTP 20) in end of June. >> >> And yes you can leave out syntax tools for most usage. It is mostly used during development for some non mandatory tools. >> For example it is used by edoc the tool for generating documentation from the source code. >> >> It is unlikely to be used in a deployed server. >> >> /Kenneth, Erlang/OTP Ericsson >> >> On Thu, Feb 9, 2017 at 10:25 PM, chris casilli > wrote: >> Hello, >> >> I noticed that lib/syntax_tools uses LGPL-2.0+ license. >> How does this effect the overall Apache-2.0 license of OTP. >> >> Can this component be left out. Is a different version available that uses Apache-2.0 license. >> >> Kind Regards, >> >> Chris Casilli >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Fri Feb 10 12:02:01 2017 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Fri, 10 Feb 2017 12:02:01 +0100 Subject: [erlang-questions] lib/syntax_tools uses LGPL-2.0 + license In-Reply-To: References: <3BD7B608-6F01-4F5E-9A05-4C3493839F54@gmail.com> Message-ID: To make it clear, even if an older version is used which only states the LGPL license, it does not affect the rest of the OTP distribution. This is exactly the point with LGPL as opposed to GPL. Erlang is just like Java when it comes to linkage, so see this page from the FSF for more info: https://www.gnu.org/licenses/lgpl-java.en.html But in the upcoming OTP 20, you can simply refer to the Apache License instead. Meanwhile, if you're still scared, you can download the standalone version of syntax_tools from GitHub and use that instead of the version that you got from OTP, since it already has the LGPL/Apache dual license notices: https://github.com/richcarl/syntax_tools The main thing that you can't do with an LGPL library even if you don't modify its the source code, is to package up the resulting system in a way that prevents your customers from doing their own modifications to that library. (I.e., update to a newer version, fix a bug, etc.) Your own code can be as inaccessible as you like. /Richard 2017-02-10 9:02 GMT+01:00 Kenneth Lundin : > Hi, > > The license of Syntax tools is changed to Apache-2 and LGPL (it is the > users choice) in the master branch (which is the way to > the next major release (OTP 20) in end of June. > > And yes you can leave out syntax tools for most usage. It is mostly used > during development for some non mandatory tools. > For example it is used by edoc the tool for generating documentation from > the source code. > > It is unlikely to be used in a deployed server. > > /Kenneth, Erlang/OTP Ericsson > > On Thu, Feb 9, 2017 at 10:25 PM, chris casilli < > christopher.casilli@REDACTED> wrote: > >> Hello, >> >> I noticed that lib/syntax_tools uses LGPL-2.0+ license. >> How does this effect the overall Apache-2.0 license of OTP. >> >> Can this component be left out. Is a different version available that >> uses Apache-2.0 license. >> >> Kind Regards, >> >> Chris Casilli >> >> _______________________________________________ >> 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 ivan@REDACTED Fri Feb 10 12:31:34 2017 From: ivan@REDACTED (Ivan Uemlianin) Date: Fri, 10 Feb 2017 11:31:34 +0000 Subject: [erlang-questions] Tsung & MQTT: Checking messages received Message-ID: <1ccd071b-0497-b9e3-0a95-0bf1458cb6b7@llaisdy.com> Dear All I written to the tsung ML on this with no response. Copying here in case tsung experts present. I am planning to use tsung to test a server providing a service over mqtt. The basics are working, but I would like to check that sessions receive expected messages. When using mqtt (ie rather than http), does tsung support checking server responses by using the element in the config xml file? I have not been able to get it working. In the config xml I have a session with requests as below, with a match element specifying the expected message: {"call":"test", "response":6} With dumptraffic="true", the tsung.dump shows that {"call":"test", "response":6} is received on test_topic, but there is nothing in match.log, or anywhere else, that records this. Similarly if the expected message is not received, no errors are recorded anywhere. The "empty" match should always match and always be logged, but in mqtt sessions is never triggered. Adding a skip_headers="mqtt" attribute to the match element doesn't change anything. Is there something else I should do to check received messages in mqtt? Is the element not supported in mqtt? With thanks and best wishes Ivan -- ============================================================ Ivan A. Uemlianin PhD Llaisdy Speech Technology Research and Development ivan@REDACTED @llaisdy llaisdy.wordpress.com github.com/llaisdy www.linkedin.com/in/ivanuemlianin festina lente ============================================================ From 10z98@REDACTED Fri Feb 10 11:21:26 2017 From: 10z98@REDACTED (Howld) Date: Fri, 10 Feb 2017 18:21:26 +0800 Subject: [erlang-questions] Why Erlang compiler don't check functions in module? Message-ID: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> Dear Developers: As a new developer, the result of the compile I hope is clear to indicate the functions in module if exist when I use compiler cmd like "erlc test.erl". But hopeless, if I write code like "elang:spwan(fun test:foo/0)" in erl file, it happens nothing even warning. I think it increases uncertainty with non-English speaking countrie's developers. And if you think so, I will shame on you. What I real want to express is you should have an idea and there is a long way to improve compiler. Best blessing! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashley.hewson@REDACTED Fri Feb 10 12:28:02 2017 From: ashley.hewson@REDACTED (ash) Date: Fri, 10 Feb 2017 11:28:02 +0000 Subject: [erlang-questions] Troubleshooting binary memory usage Message-ID: Hi, I've been getting high values for `erlang:memory(binary)` so I've been looking at the following: (1) `[erlang:process_info(Pid, binary) || Pid <- processes()]` (2) `instrument:memory_data/0` (3) `erlang:system_info({allocator, binary_alloc})` Unfortunately no two of these sources agree. For example, I can try to compare the number of live binaries according to the different data sources: ``` (fun () -> ProcInfoCount = dict:size(lists:foldl( fun(Pid, D) -> case erlang:process_info(Pid, binary) of {binary, Bins} -> lists:foldl( fun({Addr,_,_}, D1) -> dict:update_counter(Addr,1,D1) end, D, Bins); Other -> D end end, dict:new(), processes())), {_,Data}=instrument:descr(instrument:memory_data()), InstrumentCount = lists:foldl(fun (T={binary,_,_,_},Acc) -> Acc + 1; (_,Acc) -> Acc end, 0, Data), GetCallCount = fun(K, Calls) -> case lists:keyfind(K, 1, Calls) of {_, X, Y} -> X*1000000000+Y; _ -> 0 end end, AllocCount = lists:foldl(fun({instance,_,PropList}, A) -> Calls = proplists:get_value(calls, PropList, []), Allocs = GetCallCount(binary_alloc, Calls), Frees = GetCallCount(binary_free, Calls), A + (Allocs - Frees) end, 0, erlang:system_info({allocator, binary_alloc})), {ProcInfoCount, InstrumentCount, AllocCount} end)(). ``` This yields `{2874,6371,7715}` at time of writing. Can anyone suggest reasons for the different counts? I've found that some processes show up in (2) but not (1), but I don't know why this is. Thanks, Ash From mbike2000ru@REDACTED Fri Feb 10 13:30:13 2017 From: mbike2000ru@REDACTED (Dmitry) Date: Fri, 10 Feb 2017 12:30:13 +0000 (UTC) Subject: [erlang-questions] how to debug a code with spawned processes References: <164596592.1991003.1486729813460.ref@mail.yahoo.com> Message-ID: <164596592.1991003.1486729813460@mail.yahoo.com> We found what happened with spawned processes. THe httpc was not started properly and it crushed the spawned processes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernando.benavides@REDACTED Fri Feb 10 13:48:34 2017 From: fernando.benavides@REDACTED (Brujo Benavides) Date: Fri, 10 Feb 2017 09:48:34 -0300 Subject: [erlang-questions] Why Erlang compiler don't check functions in module? In-Reply-To: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> References: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> Message-ID: <9AD962DB-1586-4B83-9636-9BB8065B9ABE@inakanetworks.com> Hi HowId, There is a reason why the compiler can?t tell you that erlang:spwan/1 is not defined. Fully qualified function calls are bound (I?m not sure if that?s the right word) in runtime. That way you can have ghost functions or use meck and many other goodies. That said, there are tools in OTP that would help you find those issues. To achieve precisely what you are asking for, you have xref (and if it seem to complex for you, don?t panic? you can always use xrefr ). But if you want to catch many other kinds of errors (not just typos in function names) you can should use dialyzer . And one last thing, if you want those check to happen automatically (which is something truly desirable), you can include the meta suite from katana-test in your common test suites. Hope this helps :) > On Feb 10, 2017, at 07:21, Howld <10z98@REDACTED> wrote: > > Dear Developers: > As a new developer, the result of the compile I hope is clear to indicate the functions in module if exist when I use compiler cmd like "erlc test.erl". But hopeless, if I write code like "elang:spwan(fun test:foo/0)" in erl file, it happens nothing even warning. I think it increases uncertainty with non-English speaking countrie's developers. And if you think so, I will shame on you. What I real want to express is you should have an idea and there is a long way to improve compiler. > > Best blessing! > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From donpedrothird@REDACTED Fri Feb 10 13:54:30 2017 From: donpedrothird@REDACTED (John Doe) Date: Fri, 10 Feb 2017 15:54:30 +0300 Subject: [erlang-questions] Why Erlang compiler don't check functions in module? In-Reply-To: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> References: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> Message-ID: it is not really possible. The module may not exist in compile time at all, it can be dynamically generated or downloaded from, say, remote http server. Or it may exist but the app in runtime can generate another module with the same name and load it instead of ??? old one. IDEs, such as Intellij IDEA with erlang plugin do generate warnings in these case. But it is not the job for the compiler, as it would make hard to compile apps with stop on warning compile option. 2017-02-10 13:21 GMT+03:00 Howld <10z98@REDACTED>: > Dear Developers: > As a new developer, the result of the compile I hope is clear to > indicate the functions in module if exist when I use compiler cmd like > "erlc test.erl". But hopeless, if I write code like "elang:spwan(fun > test:foo/0)" in erl file, it happens nothing even warning. I think it > increases uncertainty with non-English speaking countrie's developers. > And if you think so, I will shame on you. What I real want to express is > you should have an idea and there is a long way to improve compiler. > > Best blessing! > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex0player@REDACTED Fri Feb 10 13:58:05 2017 From: alex0player@REDACTED (Alex S.) Date: Fri, 10 Feb 2017 15:58:05 +0300 Subject: [erlang-questions] Why Erlang compiler don't check functions in module? In-Reply-To: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> References: <20170210102126.1FE45A800A1@webmail.sinamail.sina.com.cn> Message-ID: > 10 ????. 2017 ?., ? 13:21, Howld <10z98@REDACTED> ???????(?): > > Dear Developers: > As a new developer, the result of the compile I hope is clear to indicate the functions in module if exist when I use compiler cmd like "erlc test.erl". But hopeless, if I write code like "elang:spwan(fun test:foo/0)" in erl file, it happens nothing even warning. I think it increases uncertainty with non-English speaking countrie's developers. And if you think so, I will shame on you. What I real want to express is you should have an idea and there is a long way to improve compiler. > > Best blessing! Hey HowId, there?s a nifty ?xref? tool you can use that does static analysis necessary to detect such cases. Since functions are loaded in runtime through the code server, the analysis is complex enough that it was decided to be left out of the compiler. You can either use xref module directly, or use your build system?s support for it, if it has such. From max.lapshin@REDACTED Fri Feb 10 16:28:59 2017 From: max.lapshin@REDACTED (Max Lapshin) Date: Fri, 10 Feb 2017 18:28:59 +0300 Subject: [erlang-questions] doc issue in ets:update_element/3 Message-ID: http://erlang.org/doc/man/ets.html#update_element-3 badarg reasons don't include reason when ets table is not public. Should I make a doc patch? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sverker.eriksson@REDACTED Fri Feb 10 16:51:10 2017 From: sverker.eriksson@REDACTED (Sverker Eriksson) Date: Fri, 10 Feb 2017 16:51:10 +0100 Subject: [erlang-questions] doc issue in ets:update_element/3 In-Reply-To: References: Message-ID: <2850d2d5-3e0f-3836-6c70-c81c7a399ba2@ericsson.com> Heading "Failure" at the top says: "The functions in this module exits with reason badarg if any argument has the wrong format, if the table identifier is invalid, or if the operation is denied because of table access rights (protected or private)." /Sverker On 02/10/2017 04:28 PM, Max Lapshin wrote: > http://erlang.org/doc/man/ets.html#update_element-3 > > badarg reasons don't include reason when ets table is not public. > > Should I make a doc patch? > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From schneider@REDACTED Fri Feb 10 17:19:15 2017 From: schneider@REDACTED (Schneider) Date: Fri, 10 Feb 2017 17:19:15 +0100 Subject: [erlang-questions] list comprehension with match Message-ID: <7e39b184-e464-e704-1757-6fe7e0ad213e@xs4all.nl> Hi list, I have a list of items that I want to extract data from _and_ check to make sure they are all of the same type. When I use Member_keys = [Key || #member{key = Key} <- Members]. all members that are not #member records are dropped silently, but I want it to crash ! The match works as a filter. Using: Member_keys = lists:foldl(fun(#member{key = Key}, Keys) -> [Key | Keys] end, [], Members), or getkeys([#member{key = Key} | Tail]) -> [Key | getkeys(Tail)]; getkeys([]) -> []. does exactly what I am looking for. According to [1], a list comprehension [Expr(E) || E <- List] is basically translated to: 'lc^0'([E|Tail], Expr) -> [Expr(E)|'lc^0'(Tail, Expr)]; 'lc^0'([], _Expr) -> []. but that doesn't explain this behaviour. Could somebody explain to me what is going on? [1] http://erlang.org/doc/efficiency_guide/listHandling.html#id68285 From kostis@REDACTED Fri Feb 10 17:26:44 2017 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 10 Feb 2017 17:26:44 +0100 Subject: [erlang-questions] list comprehension with match In-Reply-To: <7e39b184-e464-e704-1757-6fe7e0ad213e@xs4all.nl> References: <7e39b184-e464-e704-1757-6fe7e0ad213e@xs4all.nl> Message-ID: <148b0021-7c8b-8741-d265-b76ef2755261@cs.ntua.gr> On 02/10/2017 05:19 PM, Schneider wrote: > Hi list, > > I have a list of items that I want to extract data from _and_ check to > make sure they are all of the same type. > When I use > > Member_keys = [Key || #member{key = Key} <- Members]. > > all members that are not #member records are dropped silently, but I > want it to crash ! The match works as a filter. Yes, that's how list comprehensions like the one you wrote work. Most likely you want the following one: Member_keys = [fun(#member{key = Key}=M) -> Key end || M <- Members]. which _will_ crash, most likely not due to the fact that it is not tested ;) Kostis From kostis@REDACTED Fri Feb 10 17:59:02 2017 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 10 Feb 2017 17:59:02 +0100 Subject: [erlang-questions] list comprehension with match In-Reply-To: <148b0021-7c8b-8741-d265-b76ef2755261@cs.ntua.gr> References: <7e39b184-e464-e704-1757-6fe7e0ad213e@xs4all.nl> <148b0021-7c8b-8741-d265-b76ef2755261@cs.ntua.gr> Message-ID: <08b1a79e-4470-1672-f5ff-4290c1576485@cs.ntua.gr> On 02/10/2017 05:26 PM, Kostis Sagonas wrote: > > > Most likely you want the following one: > > Member_keys = [fun(#member{key = Key}=M) -> Key end || M <- Members]. > > which _will_ crash, most likely not due to the fact that it is not > tested ;) Wrote it too quicky... Of course I meant the following one; Member_keys = [(fun(#member{key = Key}) -> Key end)(M) || M <- Members]. Kostis From schneider@REDACTED Fri Feb 10 18:10:07 2017 From: schneider@REDACTED (Schneider) Date: Fri, 10 Feb 2017 18:10:07 +0100 Subject: [erlang-questions] list comprehension with match In-Reply-To: <08b1a79e-4470-1672-f5ff-4290c1576485@cs.ntua.gr> References: <7e39b184-e464-e704-1757-6fe7e0ad213e@xs4all.nl> <148b0021-7c8b-8741-d265-b76ef2755261@cs.ntua.gr> <08b1a79e-4470-1672-f5ff-4290c1576485@cs.ntua.gr> Message-ID: <9190c407-047c-17e5-e95c-1d635342e82c@xs4all.nl> yes, works and is rather nice if you looked at the explanation of what list comprehensions are translated to beforehand, but the simple form would be so much more expressive. On 02/10/2017 05:59 PM, Kostis Sagonas wrote: > Member_keys = [(fun(#member{key = Key}) -> Key end)(M) || M <- Members]. From siraaj@REDACTED Fri Feb 10 19:01:41 2017 From: siraaj@REDACTED (Siraaj Khandkar) Date: Fri, 10 Feb 2017 13:01:41 -0500 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> My biased preference is: https://github.com/ibnfirnas/beam_stats It's concern is only with sampling VM metrics and shipping them off to arbitrary destinations (Folsomite was Graphite-only, the last time I checked). Graphite and StatsD consumer modules are included. StatsD is the one we use in prod now. It's been running in prod for 1.5 years now, and even though it wasn't originally the main motivation, my favorite feature turned-out to be the sampling of individual processes and ETS tables, which was a life-saver in tracking down multiple memory leaks in the legacy system I inherited. On 2/9/17 4:06 AM, Frank Muller wrote: > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > From max.lapshin@REDACTED Fri Feb 10 20:44:03 2017 From: max.lapshin@REDACTED (Max Lapshin) Date: Fri, 10 Feb 2017 22:44:03 +0300 Subject: [erlang-questions] doc issue in ets:update_element/3 In-Reply-To: <2850d2d5-3e0f-3836-6c70-c81c7a399ba2@ericsson.com> References: <2850d2d5-3e0f-3836-6c70-c81c7a399ba2@ericsson.com> Message-ID: Got it, thanks. On Fri, Feb 10, 2017 at 6:51 PM, Sverker Eriksson < sverker.eriksson@REDACTED> wrote: > Heading "Failure" at the top says: > > "The functions in this module exits with reason badarg > if any argument has the wrong format, if the table identifier is invalid, > or if the operation is denied because of table access rights (protected or > private)." > > /Sverker > > > > On 02/10/2017 04:28 PM, Max Lapshin wrote: > > http://erlang.org/doc/man/ets.html#update_element-3 > > badarg reasons don't include reason when ets table is not public. > > Should I make a doc patch? > > > > > _______________________________________________ > erlang-questions mailing listerlang-questions@REDACTED://erlang.org/mailman/listinfo/erlang-questions > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From petr.gotthard@REDACTED Sat Feb 11 00:21:42 2017 From: petr.gotthard@REDACTED (=?utf-8?q?Petr_Gotthard?=) Date: Sat, 11 Feb 2017 00:21:42 +0100 Subject: [erlang-questions] =?utf-8?q?file=3Aread=5Ffile=5Finfo_giving_wro?= =?utf-8?q?ng_size_on_a_MIPS32_CPU?= Message-ID: <20170211002142.1D4030B3@centrum.cz> Hello, we built Erlang for a MIPS32 CPU. Everything looks OK, however file:read_file_info returns incorrect file sizes. ? Where linux stat returns size of 6522 (0x197A), the file:read_file_info returns size of 28011776711034 (0x197A0000197A). The upper 4 bytes should be 0, however they are equal to the lower 4 bytes. ? Did anyone ever experienced something like this? It is a 32b CPU with SIZEOF_OFF_T=8. ? ? Kind Regards, Petr From 7stud@REDACTED Sat Feb 11 21:06:55 2017 From: 7stud@REDACTED (Full Name) Date: Sat, 11 Feb 2017 15:06:55 -0500 Subject: [erlang-questions] Where I can I propose corrections to the docs? Message-ID: <20170211150655.11596@web003.roc2.bluetie.com> I found what I've concluded is an error in the docs (and in Programming Erlang (2nd Ed). Is there somewhere I can file a proposed change to the docs? It doesn't seem like bugs.erlang or github erlang invite doc requests. Thanks. From dmytro.lytovchenko@REDACTED Sun Feb 12 10:19:52 2017 From: dmytro.lytovchenko@REDACTED (Dmytro Lytovchenko) Date: Sun, 12 Feb 2017 10:19:52 +0100 Subject: [erlang-questions] Where I can I propose corrections to the docs? In-Reply-To: <20170211150655.11596@web003.roc2.bluetie.com> References: <20170211150655.11596@web003.roc2.bluetie.com> Message-ID: Docs are located inside github.com/erlang/otp repository Fork it and check out your copy Build Erlang normally using `./otp_build.sh setup` (this will run autoconf/automake and then will make) After this you can modify docs and build them using `make docs` - for this you may need extra packages installed such as texlive. Commit your changes to a branch in your copy on Github Click create pull request on Github. But first i'd double check in advance if they want your changes. 2017-02-11 21:06 GMT+01:00 Full Name <7stud@REDACTED>: > I found what I've concluded is an error in the docs (and in Programming > Erlang (2nd Ed). Is there somewhere I can file a proposed change to the > docs? It doesn't seem like bugs.erlang or github erlang invite doc requests. > > Thanks. > > _______________________________________________ > 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 Sun Feb 12 14:08:13 2017 From: cean.ebengt@REDACTED (bengt e) Date: Sun, 12 Feb 2017 14:08:13 +0100 Subject: [erlang-questions] Off topic: Where to start reading about PDF? Message-ID: Greetings, Not an Erlang question: I have an Erlang program that modifies a PDF file. When it comes upon the following in a stream object: BT 0.0001 Tc 50 0 0 50 0 0 Tm /TT2 1 Tf ([org_nr]) Tj ET That is painted (correct PDF name?) in the PDF file like this: [org_nr] The program replaces(*) this with: BT 0.0001 Tc 50 0 0 50 0 0 Tm /TT2 1 Tf (12345678) Tj ET The new file paints this line in the same place: 2[] Where [] is how I represent a single character that looks like a square. Given the 800 pages of the PDF documentation I wonder if somebody has a suggestion where to start reading about how to get at least 12345678 painted. Preferably more. bengt (*) it also takes care of compressing the stream, calculating new lengths, updating xref table, startxref and trailer /Prev. All thanks to Joe's erlpdf program -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikpelinux@REDACTED Sun Feb 12 18:11:05 2017 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Sun, 12 Feb 2017 18:11:05 +0100 Subject: [erlang-questions] file:read_file_info giving wrong size on a MIPS32 CPU In-Reply-To: <20170211002142.1D4030B3@centrum.cz> References: <20170211002142.1D4030B3@centrum.cz> Message-ID: <22688.38697.802577.677186@gargle.gargle.HOWL> Petr Gotthard writes: > Hello, > we built Erlang for a MIPS32 CPU. Everything looks OK, however file:read_file_info returns incorrect file sizes. > ? > Where linux stat returns size of 6522 (0x197A), the file:read_file_info returns size of 28011776711034 (0x197A0000197A). The upper 4 bytes should be 0, however they are equal to the lower 4 bytes. > ? > Did anyone ever experienced something like this? It is a 32b CPU with SIZEOF_OFF_T=8. Please try the patch below, and show us the console output when you do that read_file_info call. It could be the kernel putting the wrong data in the high word, your libc getting it wrong, or even a compiler bug. If the output shows st_size containing the wrong data in the high word, then the next step would be to write standalone C program with the stat() call, and run that under strace. --- otp_src_19.2/erts/emulator/drivers/unix/unix_efile.c.~1~ 2016-12-12 21:15:50.000000000 +0100 +++ otp_src_19.2/erts/emulator/drivers/unix/unix_efile.c 2017-02-12 18:01:26.889209120 +0100 @@ -512,6 +512,10 @@ efile_fileinfo(Efile_error* errInfo, Efi #endif pInfo->size_low = (Uint32)statbuf.st_size; + fprintf(stderr, "st_size 0x%016llx (0x%08x, 0x%08x)\r\n", + (unsigned long long) statbuf.st_size, + pInfo->size_high, pInfo->size_low); + #ifdef NO_ACCESS /* Just look at read/write access for owner. */ From 7stud@REDACTED Sun Feb 12 21:03:27 2017 From: 7stud@REDACTED (7stud) Date: Sun, 12 Feb 2017 15:03:27 -0500 Subject: [erlang-questions] Where I can I propose corrections to the docs? Message-ID: <20170212150327.27656@web007.roc2.bluetie.com> > But first i'd double check in advance if they want your changes. How do I do that? My proposed changes are the question and answer here: http://stackoverflow.com/questions/42170675/bit-syntax-default-size-in-pattern-matching Thanks. -----Original Message----- From: "Dmytro Lytovchenko" [dmytro.lytovchenko@REDACTED] Date: 02/12/2017 04:19 AM To: "Full Name" <7stud@REDACTED> CC: "Erlang/OTP discussions" Subject: Re: [erlang-questions] Where I can I propose corrections to the docs? Docs are located inside github.com/erlang/otp repositoryFork it and check out your copy Build Erlang normally using `./otp_build.sh setup` (this will run autoconf/automake and then will make) After this you can modify docs and build them using `make docs` - for this you may need extra packages installed such as texlive. Commit your changes to a branch in your copy on Github Click create pull request on Github. But first i'd double check in advance if they want your changes. 2017-02-11 21:06 GMT+01:00 Full Name <7stud@REDACTED>: I found what I've concluded is an error in the docs (and in Programming Erlang (2nd Ed).? Is there somewhere I can file a proposed change to the docs? It doesn't seem like bugs.erlang or github erlang invite doc requests. Thanks. _______________________________________________ erlang-questions mailing list erlang-questions@REDACTED http://erlang.org/mailman/listinfo/erlang-questions From Catenacci@REDACTED Mon Feb 13 02:43:28 2017 From: Catenacci@REDACTED (Onorio Catenacci) Date: Sun, 12 Feb 2017 20:43:28 -0500 Subject: [erlang-questions] Noob Question Message-ID: Hi all, Sorry for this noob question but my google-fu is not what it once was. When I get a crash dump with the slogan "Init terminating in do_boot ()" and the boot script contains {progress} points such as would get reported by an init:get_status/0 message (like here:) {progress,preloaded}, Does that get recorded in the crash dump somewhere? I suspect I know where the error is occurring but if I could find those progress messages in the crash dump it might help me to isolate which binary is having a problem getting loaded. I mean to say there are a few {progress . . . } messages in the script and if I could figure out which one it's getting to before it crashes that would help me to rule in or rule out which binary it isn't finding or which one it's barfing on. Also, is there any way to trace the loading of the .boot file which is compiled from the .script or do I have to basically build a command line to try to see what's the matter? -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From aschultz@REDACTED Mon Feb 13 10:05:12 2017 From: aschultz@REDACTED (Andreas Schultz) Date: Mon, 13 Feb 2017 10:05:12 +0100 (CET) Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: Message-ID: <1040278306.65714.1486976712955.JavaMail.zimbra@tpip.net> Hi Frank, We use exometer to InfluxDB to Grafana. Exometer to Influx exporter: https://github.com/travelping/exometer_influxdb Andreas ----- On Feb 9, 2017, at 10:06 AM, Frank Muller wrote: > Hi everyone, > Does anyone succeeded to push VM metrics to Grafana ( [ http://grafana.org/ | > http://grafana.org/ ] ). > Here I'm looking for a simple integration with minimal dependencies if possible. > Thank you. > /Frank > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.muller.erl@REDACTED Mon Feb 13 10:49:09 2017 From: frank.muller.erl@REDACTED (Frank Muller) Date: Mon, 13 Feb 2017 09:49:09 +0000 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: <1040278306.65714.1486976712955.JavaMail.zimbra@tpip.net> References: <1040278306.65714.1486976712955.JavaMail.zimbra@tpip.net> Message-ID: Thanks for sharing Andreas. I'll have a look to it. /Frank Hi Frank, > > We use exometer to InfluxDB to Grafana. > > Exometer to Influx exporter: > https://github.com/travelping/exometer_influxdb > > Andreas > > ----- On Feb 9, 2017, at 10:06 AM, Frank Muller < > frank.muller.erl@REDACTED> wrote: > > Hi everyone, > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hello@REDACTED Mon Feb 13 12:31:10 2017 From: hello@REDACTED (Adam Lindberg) Date: Mon, 13 Feb 2017 12:31:10 +0100 Subject: [erlang-questions] Callback attribute removed from module_info in Erlang 19 Message-ID: <9B97C9F0-C720-45E2-91F3-DE9E2F442175@alind.io> This is a continuation of a previous discussion (I wasn?t subscribed to the mailing list at that time): http://erlang.org/pipermail/erlang-questions/2017-January/091485.html The regression of removing the callback attributes in Erlang 19 is that Meck can no longer be used on callback modules (gen_server, etc.). The reason why is described here: https://github.com/eproxus/meck/pull/169 In summary, it is because the new version of Erlang doesn?t ?tell? Meck about the callbacks anymore, the module gets mocked without them. Then, other modules which uses that behaviour fails to compile (because the behaviour doesn?t exist anymore, although the module does). Meck creates its own version of the module, matching the signature, then uses Mod:module_info(attributes) to get the attributes and includes those. This is what has changed in Erlang 19. Not sure what the solution here should be, I can only comment on that it is a pretty big regression for Meck (ruling out behaviour mocking for now) with a non-trivial fix. Cheers, Adam From lukas@REDACTED Mon Feb 13 13:32:55 2017 From: lukas@REDACTED (Lukas Larsson) Date: Mon, 13 Feb 2017 13:32:55 +0100 Subject: [erlang-questions] Troubleshooting binary memory usage In-Reply-To: References: Message-ID: Hello, On Fri, Feb 10, 2017 at 12:28 PM, ash wrote: > Hi, > I've been getting high values for `erlang:memory(binary)` so I've been > looking at the following: > (1) `[erlang:process_info(Pid, binary) || Pid <- processes()]` > This describes the number of off-heap binaries created by the application belonging to the specified process. > (2) `instrument:memory_data/0` > This describes the amount of memory used by the allocator type binary. > (3) `erlang:system_info({allocator, binary_alloc})` > This describes the amount of memory allocated into the binary allocator aka binary_alloc. None of these will have the same value. The binary allocator contains all off-heap binaries and other binary like things (for drivers, nifs and erts things), so it will always be the largest one. The binary allocator type is what is used to allocate a off-heap binary. However all off-heap binaries do not have to below to processes, they could also belong to ports, nifs or some other VM internal entity. This value should be smaller then binary_alloc. The pid that you see here is which process CREATED the binary, the ownership of it may later have been shared with a port, nif, or other process, or something else. Lastly process_info describes the binaries currently referenced from the heap of the given process. This should be smaller then binary_alloc and the binary allocator type. Lukas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Mon Feb 13 19:54:35 2017 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Mon, 13 Feb 2017 18:54:35 +0000 Subject: [erlang-questions] Noob Question In-Reply-To: References: Message-ID: I'm not sure it is what you are after, but perhaps it can hit the battleship in a few shots if we try: Is 'erl -init_debug' what you are after in order to figure out what is the problem in the initialization phase? You can often figure out a way to pass that option to a release (by supplying it as part of the virtual machine arguments). Another trick is to look around the message. Often, when do_boot() fails, it logs what is the problem around it. Also, I've always found the Erlang boot sequence a bit lacking in information when debugging it, but perhaps I have just used it incorrectly. On Mon, Feb 13, 2017 at 2:44 AM Onorio Catenacci wrote: > Hi all, > > Sorry for this noob question but my google-fu is not what it once was. > > When I get a crash dump with the slogan "Init terminating in do_boot ()" > and the boot script contains {progress} points such as would get reported > by an init:get_status/0 message (like here:) > > {progress,preloaded}, > > > Does that get recorded in the crash dump somewhere? I suspect I know > where the error is occurring but if I could find those progress messages in > the crash dump it might help me to isolate which binary is having a problem > getting loaded. > > I mean to say there are a few {progress . . . } messages in the script and > if I could figure out which one it's getting to before it crashes that > would help me to rule in or rule out which binary it isn't finding or which > one it's barfing on. > > Also, is there any way to trace the loading of the .boot file which is > compiled from the .script or do I have to basically build a command line to > try to see what's the matter? > > -- > Onorio Catenacci > > http://onor.io > http://www.google.com/+OnorioCatenacci > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Catenacci@REDACTED Mon Feb 13 20:13:51 2017 From: Catenacci@REDACTED (Onorio Catenacci) Date: Mon, 13 Feb 2017 14:13:51 -0500 Subject: [erlang-questions] Noob Question In-Reply-To: References: Message-ID: Thanks Jesper. I had failed to spot the -init_debug option on the vm arguments. I'll start with that to see what it may tell me. I have some ideas of other things to try as well so if none of that solves the issue then I'll try to give a better description of the issue. At this point any suggestions to help me get more debugging detail are welcome so thanks much for the idea! On Mon, Feb 13, 2017 at 1:54 PM, Jesper Louis Andersen < jesper.louis.andersen@REDACTED> wrote: > I'm not sure it is what you are after, but perhaps it can hit the > battleship in a few shots if we try: > > Is 'erl -init_debug' what you are after in order to figure out what is the > problem in the initialization phase? You can often figure out a way to pass > that option to a release (by supplying it as part of the virtual machine > arguments). > > Another trick is to look around the message. Often, when do_boot() fails, > it logs what is the problem around it. > > Also, I've always found the Erlang boot sequence a bit lacking in > information when debugging it, but perhaps I have just used it incorrectly. > > > On Mon, Feb 13, 2017 at 2:44 AM Onorio Catenacci > wrote: > >> Hi all, >> >> Sorry for this noob question but my google-fu is not what it once was. >> >> When I get a crash dump with the slogan "Init terminating in do_boot ()" >> and the boot script contains {progress} points such as would get reported >> by an init:get_status/0 message (like here:) >> >> {progress,preloaded}, >> >> >> Does that get recorded in the crash dump somewhere? I suspect I know >> where the error is occurring but if I could find those progress messages in >> the crash dump it might help me to isolate which binary is having a problem >> getting loaded. >> >> I mean to say there are a few {progress . . . } messages in the script >> and if I could figure out which one it's getting to before it crashes that >> would help me to rule in or rule out which binary it isn't finding or which >> one it's barfing on. >> >> Also, is there any way to trace the loading of the .boot file which is >> compiled from the .script or do I have to basically build a command line to >> try to see what's the matter? >> >> -- >> Onorio Catenacci >> >> http://onor.io >> http://www.google.com/+OnorioCatenacci >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> > -- Onorio Catenacci http://onor.io http://www.google.com/+OnorioCatenacci -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesper.louis.andersen@REDACTED Mon Feb 13 20:28:17 2017 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Mon, 13 Feb 2017 19:28:17 +0000 Subject: [erlang-questions] Noob Question In-Reply-To: References: Message-ID: Adding `lager` in the startup phase can help as well because it reports progress for each application booted (much like adding SASL to your application will do). If you do add lager, be sure to set its overload protector high enough. I've seen it quaff messages in the first second because a lot is going on at boot time. I've considered patching it for this, but haven't had the time yet to even suggest it in an issue. On Mon, Feb 13, 2017 at 8:14 PM Onorio Catenacci wrote: > Thanks Jesper. I had failed to spot the -init_debug option on the vm > arguments. I'll start with that to see what it may tell me. I have some > ideas of other things to try as well so if none of that solves the issue > then I'll try to give a better description of the issue. At this point any > suggestions to help me get more debugging detail are welcome so thanks much > for the idea! > > On Mon, Feb 13, 2017 at 1:54 PM, Jesper Louis Andersen < > jesper.louis.andersen@REDACTED> wrote: > > I'm not sure it is what you are after, but perhaps it can hit the > battleship in a few shots if we try: > > Is 'erl -init_debug' what you are after in order to figure out what is the > problem in the initialization phase? You can often figure out a way to pass > that option to a release (by supplying it as part of the virtual machine > arguments). > > Another trick is to look around the message. Often, when do_boot() fails, > it logs what is the problem around it. > > Also, I've always found the Erlang boot sequence a bit lacking in > information when debugging it, but perhaps I have just used it incorrectly. > > > On Mon, Feb 13, 2017 at 2:44 AM Onorio Catenacci > wrote: > > Hi all, > > Sorry for this noob question but my google-fu is not what it once was. > > When I get a crash dump with the slogan "Init terminating in do_boot ()" > and the boot script contains {progress} points such as would get reported > by an init:get_status/0 message (like here:) > > {progress,preloaded}, > > > Does that get recorded in the crash dump somewhere? I suspect I know > where the error is occurring but if I could find those progress messages in > the crash dump it might help me to isolate which binary is having a problem > getting loaded. > > I mean to say there are a few {progress . . . } messages in the script and > if I could figure out which one it's getting to before it crashes that > would help me to rule in or rule out which binary it isn't finding or which > one it's barfing on. > > Also, is there any way to trace the loading of the .boot file which is > compiled from the .script or do I have to basically build a command line to > try to see what's the matter? > > -- > Onorio Catenacci > > http://onor.io > http://www.google.com/+OnorioCatenacci > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > -- > Onorio Catenacci > > http://onor.io > http://www.google.com/+OnorioCatenacci > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spylik@REDACTED Tue Feb 14 10:06:30 2017 From: spylik@REDACTED (Oleksii Semilietov) Date: Tue, 14 Feb 2017 11:06:30 +0200 Subject: [erlang-questions] Erlang allocators tunig Message-ID: Hi All. During reading documentation and articles (for me start point was https://blog.heroku.com/logplex-down-the-rabbit-hole) about allocators ( http://erlang.org/doc/man/erts_alloc.html) I found runtime tool which may collect data and generate options for allocators tuning: http://erlang.org/doc/man/erts_alloc_config.html So question: does somebody have experience to use settings produced by erts_alloc_config in production for a while? Any feedback ? Cheers, Alex. -- Oleksii D. Semilietov -------------- next part -------------- An HTML attachment was scrubbed... URL: From fe.belineb@REDACTED Tue Feb 14 18:06:28 2017 From: fe.belineb@REDACTED (Felipe Beline) Date: Tue, 14 Feb 2017 15:06:28 -0200 Subject: [erlang-questions] Best way to handle multiple gen_server Message-ID: Hi, My first question is: If I have a gen_server started by a Supervisor and it's handling a request (but has several others waiting in the queue), then it dies for some reason, and the supervisor restart it. Will the requests in the queue be lost? Other question is, if I want to create a process of this specific gen_server for each request that I have(then it should run in "parallel" several instances), but after each one finishes the execution and return the calculated value, I want to it to terminate himself. How should be the properly way to implement it? Another doubt is, let's say that several thousands os request is made at same time, and it creates one instance of the server for each one, should it be "ok" :)? Or should I create a limited amount of servers and then distribute the requests over then? In this case the OTP pool should help me ? Cheers, Felipe -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex0player@REDACTED Tue Feb 14 18:13:14 2017 From: alex0player@REDACTED (Alex S.) Date: Tue, 14 Feb 2017 20:13:14 +0300 Subject: [erlang-questions] Best way to handle multiple gen_server In-Reply-To: References: Message-ID: > 14 ????. 2017 ?., ? 20:06, Felipe Beline ???????(?): > > Hi, > > My first question is: If I have a gen_server started by a Supervisor and it's handling a request (but has several others waiting in the queue), then it dies for some reason, and the supervisor restart it. Will the requests in the queue be lost? > > Other question is, if I want to create a process of this specific gen_server for each request that I have(then it should run in "parallel" several instances), but after each one finishes the execution and return the calculated value, I want to it to terminate himself. How should be the properly way to implement it? > > Another doubt is, let's say that several thousands os request is made at same time, and it creates one instance of the server for each one, should it be "ok" :)? Or should I create a limited amount of servers and then distribute the requests over then? In this case the OTP pool should help me ? > > Cheers, Felipe The requests in queue will be lost, but your clients will receive an error and can retry. As far as spawning short-lived tasks, I suggest looking into proc_lib and its start/init_ack capabilities. It unfortunately conceals a little bit of debugging info right now but that?ll be fixed in OTP 20. I wouldn?t recommend `pool` module personally. Handling several thousand requests simultaneously should be no problem, but that of course depends on the nature of handling. I?d say if you cannot cache any data between requests, there?s no real point in pooling. From jesper.louis.andersen@REDACTED Tue Feb 14 21:33:05 2017 From: jesper.louis.andersen@REDACTED (Jesper Louis Andersen) Date: Tue, 14 Feb 2017 20:33:05 +0000 Subject: [erlang-questions] Best way to handle multiple gen_server In-Reply-To: References: Message-ID: One thing to think about when you spawn a gen_server for each request is what should happen if the system decides to terminate immediate processes around it. One way is to hook them into a simple-one-for-one supervisor, so you have a notion of them in the supervision tree. If however, they are truly one-off processes, you can often just spawn_link them under the process that started them. Do note that an error in your process then terminates the processes it is linked to. In general, avoid "naked" spawns where you have a process that is not tied to anything, unless you know it is a process that is guaranteed to terminate in a short amount of time. Otherwise you are looking at leaks. Gen servers can terminate by returning {stop, normal, State} for a normal exit. These do not create errors in the supervisor if it is tied to one and are seen as a graceful exit. Another OTP rule is that {shutdown, Reason} works, but a normal termination is probably fine in this case. As for running thousands of requests, it is usually not a problem, unless each of your requests construct a process with a memory footprint of several hundred megabytes. My usual ballpark figure is that you can have a million processes in less than a gigabyte of memory. YMMV depending on memory footprint of course. It is often beneficial to just spawn a process per work unit you have as this maximizes your concurrency level in the system. It also avoids pipelined architectures, since each unit of work can simply do what it needs to do. One thing to beware of though, is while Erlang has no trouble creating say 20,000 request to a foreign system, that foreign system may not be able to cope with that load. In this case, you often use some kind of queueing process that makes sure you limit the outbound communication to the foreign system. Database pools (github.com/devinus/poolboy) and HTTP pools are examples of such limiters. As are Ulf Wiger's 'jobs' framework, and my own 'safetyvalve' framework. Another example is if your processes will be, say, resizing images, which can take up lots of memory. You may want to spawn 20,000 processes, but have a system which hands out "tokens" once in a while to limit the concurrency to something like 8-16 actually doing work. Here something like https://github.com/duomark/epocxy and its Concurrency Fount might come in handy as well (Jay Nelson is the author). As for losing a mailbox because a process dies: if you think about it, this is the same as if the message had been lost in transit to the mailbox. Your system must be able to cope with message loss like this, though you can usually assume the loss rate to be very low (say one in a million). It makes for a more robust system, and also, it allows you to seamlessly divide work over multiple node()'s later, should it be necessary. If you can, prefer a system which uses idempotent mechanisms: retry in a while if no answer is had or the event didn't go through. Make sure that a retry of a thing which has already been done returns as if it was the first time being done. On Tue, Feb 14, 2017 at 6:13 PM Alex S. wrote: > > > 14 ????. 2017 ?., ? 20:06, Felipe Beline > ???????(?): > > > > Hi, > > > > My first question is: If I have a gen_server started by a Supervisor and > it's handling a request (but has several others waiting in the queue), then > it dies for some reason, and the supervisor restart it. Will the requests > in the queue be lost? > > > > Other question is, if I want to create a process of this specific > gen_server for each request that I have(then it should run in "parallel" > several instances), but after each one finishes the execution and return > the calculated value, I want to it to terminate himself. How should be the > properly way to implement it? > > > > Another doubt is, let's say that several thousands os request is made > at same time, and it creates one instance of the server for each one, > should it be "ok" :)? Or should I create a limited amount of servers and > then distribute the requests over then? In this case the OTP pool should > help me ? > > > > Cheers, Felipe > The requests in queue will be lost, but your clients will receive an error > and can retry. > > As far as spawning short-lived tasks, I suggest looking into proc_lib and > its start/init_ack capabilities. It unfortunately conceals a little bit of > debugging info right now but that?ll be fixed in OTP 20. > > I wouldn?t recommend `pool` module personally. Handling several thousand > requests simultaneously should be no problem, but that of course depends on > the nature of handling. I?d say if you cannot cache any data between > requests, there?s no real point in pooling. > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.g.wright@REDACTED Wed Feb 15 04:55:31 2017 From: david.g.wright@REDACTED (David Wright) Date: Wed, 15 Feb 2017 14:55:31 +1100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang Message-ID: I have been googling and stackoverflowing for a few days now and have failed to find an example of how to use Erlang to handle\process a HTTPS request. Can someone give me a URL for how to do it or some sample code? -- David Gray Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: From siraaj@REDACTED Wed Feb 15 05:38:20 2017 From: siraaj@REDACTED (Siraaj Khandkar) Date: Tue, 14 Feb 2017 23:38:20 -0500 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: Message-ID: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> On 2/14/17 10:55 PM, David Wright wrote: > > I have been googling and stackoverflowing for a few days now and have > failed to find an example of how to use Erlang to handle\process a HTTPS > request. > > Can someone give me a URL for how to do it or some sample code? https://github.com/ninenines/cowboy/tree/master/examples From david.g.wright@REDACTED Wed Feb 15 06:00:05 2017 From: david.g.wright@REDACTED (David Wright) Date: Wed, 15 Feb 2017 16:00:05 +1100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> Message-ID: Interesting examples however they rely on cowboy, if I am correct. I am after an Erlang only example or is using a framework (http server) like cowboy the only way? On 15 February 2017 at 15:38, Siraaj Khandkar wrote: > On 2/14/17 10:55 PM, David Wright wrote: > >> >> I have been googling and stackoverflowing for a few days now and have >> failed to find an example of how to use Erlang to handle\process a HTTPS >> request. >> >> Can someone give me a URL for how to do it or some sample code? >> > > > https://github.com/ninenines/cowboy/tree/master/examples > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- David Gray Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennethlakin@REDACTED Wed Feb 15 08:11:17 2017 From: kennethlakin@REDACTED (Kenneth Lakin) Date: Tue, 14 Feb 2017 23:11:17 -0800 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> Message-ID: <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> On 02/14/2017 09:00 PM, David Wright wrote: > I am after an Erlang only example or is using a framework (http server) > like cowboy the only way? You can serve HTTP over SSL/TLS with erlang's httpd module: Erlang/OTP 19 [erts-8.2] [source] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:true] Eshell V8.2 (abort with ^G) 1> application:ensure_all_started(inets). {ok,[inets]} 2> inets:start(httpd, [{port, 8443}, {server_root, "."}, {server_name, "localhost"}, {document_root, "."}, {socket_type, {essl, [{certfile, "server.pem"}]}}]). {ok,<0.77.0>} 3> $ curl -k https://localhost:8443/index.html hello $ See for more info. I don't know about Basic Auth but the "Authentication Properties" section in the documentation looks promising. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: From david.g.wright@REDACTED Wed Feb 15 09:37:36 2017 From: david.g.wright@REDACTED (David Wright) Date: Wed, 15 Feb 2017 19:37:36 +1100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> Message-ID: I apologize for not wording my question appropriately. With the previous example it will use https to serve documents found in the document_root. However I would like to write a restful API and decode the URL and obtain parameters for the API method. I was wanting an example of how this is done in erlang and not something like cowboy or Chicago Boss. I have read about tls and ssl but failed to find how to achieve what I need with https. Namaste' David Gray Wright > On 15 Feb 2017, at 6:11 pm, Kenneth Lakin wrote: > >> On 02/14/2017 09:00 PM, David Wright wrote: >> I am after an Erlang only example or is using a framework (http server) >> like cowboy the only way? > > You can serve HTTP over SSL/TLS with erlang's httpd module: > > Erlang/OTP 19 [erts-8.2] [source] [smp:2:2] [ds:2:2:10] > [async-threads:10] [hipe] [kernel-poll:true] > > Eshell V8.2 (abort with ^G) > 1> application:ensure_all_started(inets). > {ok,[inets]} > 2> inets:start(httpd, [{port, 8443}, {server_root, "."}, {server_name, > "localhost"}, {document_root, "."}, {socket_type, {essl, [{certfile, > "server.pem"}]}}]). > {ok,<0.77.0>} > 3> > > $ curl -k https://localhost:8443/index.html > > > hello > > > $ > > > See for more info. I don't know > about Basic Auth but the "Authentication Properties" section in the > documentation looks promising. > > From alex0player@REDACTED Wed Feb 15 09:42:31 2017 From: alex0player@REDACTED (Alex S.) Date: Wed, 15 Feb 2017 11:42:31 +0300 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> Message-ID: <27050B3B-827C-43D2-A7F3-B5328D525908@gmail.com> > 15 ????. 2017 ?., ? 11:37, David Wright ???????(?): > > I apologize for not wording my question appropriately. > > With the previous example it will use https to serve documents found in the document_root. However I would like to write a restful API and decode the URL and obtain parameters for the API method. I was wanting an example of how this is done in erlang and not something like cowboy or Chicago Boss. I have read about tls and ssl but failed to find how to achieve what I need with https. > > Namaste' > David Gray Wright Why exactly don?t you want Cowboy? It?s pretty okay for building RESTful APIs. Otherwise, you can look into SSL module and do the whole song and dance of HTTP protocol upgrade yourself. From vicent.ferrerguasch@REDACTED Wed Feb 15 13:06:54 2017 From: vicent.ferrerguasch@REDACTED (Ferrer Guasch Vicent) Date: Wed, 15 Feb 2017 12:06:54 +0000 Subject: [erlang-questions] diameter circular inherits Message-ID: Hi all, I am trying to compile some 3GPP diameter applications. The problem I have is that those standards have circular definitions between them. They have their own definitions and reused definitions from other standards. Below I included a simple example: To compile the Rx application I need the Gx beam and to compile the Gx application I need the Rx beam, this is because diameterc requires the beam file from the inherits. The module diameter_make also has the same restriction. I don't see any clear way to solve this issue without modifying the dictionaries. I could avoid the @inherits and define the AVPs locally, but some types are not so easy as the ones shown here and I would like to avoid defining AVPs twice. Am I missing something? Any idea on how to compile these? Thanks in advance, Vicent ---------------------------------------------------------------- File: diameter_3gpp_29214.dia (Rx application) ---------------------------------------------------------------- @inherits diameter_3gpp_29212 ToS-Traffic-Class ;; Other definitions @avp_types Max-Requested-Bandwidth-DL 515 Unsigned32 MV Max-Requested-Bandwidth-UL 516 Unsigned32 MV ---------------------------------------------------------------- File: diameter_3gpp_29212.dia (Gx application) ---------------------------------------------------------------- @inherits diameter_3gpp_29214 Max-Requested-Bandwidth-DL Max-Requested-Bandwidth-UL ;; Other definitions @avp_types ToS-Traffic-Class 1014 OctetString MV From kennethlakin@REDACTED Thu Feb 16 02:34:04 2017 From: kennethlakin@REDACTED (Kenneth Lakin) Date: Wed, 15 Feb 2017 17:34:04 -0800 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> Message-ID: <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> On 02/15/2017 12:37 AM, David Wright wrote: > However I would like to write a restful API and decode the URL and obtain parameters > for the API method. AFAIK, the "magic" of REST is behaving in a vaguely-standard way to requests containing particular METHODs at particular paths. You can write your own Erlang httpd callback modules, and -AFAICT- get access to just about everything you'd need to know about the HTTP(S) request using the tools provided. describes the mandatory function that a httpd callback module must implement. Searching for "Erlang Web Server API Modules" in that page tells you about how to make httpd call your module when a request comes in. Searching for "ERLANG WEB SERVER API DATA TYPES" tells you how to load the relevant record definition into your callback module, which will give you easy access to the request's METHOD and more. looks like it has some useful tools for working with HTTP requests. looks like it has useful URI processing code. If you're dead-set on not using Cowboy, spend some time with the relevant parts of the inets documentation. The relevant parts of the inets User's Guide might also be informative: . It's kind of important to note that both Cowboy and the HTTP server that ships with Erlang/OTP are "just" a set of modules written in Erlang. Unless you're operating in an environment where it's a pain to load anything that doesn't ship with Erlang/OTP, don't let the fact that an application doesn't ship with Erlang/OTP stop you from considering it. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: From icfp.publicity@REDACTED Thu Feb 16 05:43:12 2017 From: icfp.publicity@REDACTED (Lindsey Kuper) Date: Wed, 15 Feb 2017 20:43:12 -0800 Subject: [erlang-questions] Final Call for Papers: ICFP 2017 Message-ID: <58a52de07494d_1ae73fdf45c55be8631c5@landin.local.mail> ICFP 2017 The 22nd ACM SIGPLAN International Conference on Functional Programming Oxford, United Kingdom http://icfp17.sigplan.org/ Final Call for Papers ### Important dates Submissions due: Monday, February 27, Anywhere on Earth https://icfp17.hotcrp.com Author response: Monday, April 17, 2017, 15:00 (UTC) - Thursday, April 20, 2017, 15:00 (UTC) Notification: Monday, 1 May, 2017 Final copy due: Monday, 5 June 2017 Early registration: TBA Conference: Monday, 4 September - Wednesday, 6 September, 2017 ### New this year Those familiar with previous ICFP conferences should be aware of two significant changes that are being introduced in 2017: 1. Papers selected for ICFP 2017 will be published as the ICFP 2017 issue of a new journal, Proceedings of the ACM on Programming Languages (PACMPL), which replaces the previous ICFP conference proceedings. The move to PACMPL will have two noticeable impacts on authors: * A new, two-phase selection and reviewing process that conforms to ACM?s journal reviewing guidelines. * A new, single-column format for submissions. 2. Authors of papers that are conditionally accepted in the first phase of the reviewing process will have the option to submit materials for Artifact Evaluation. Further details on each of these changes are included in the following text. ### Scope ICFP 2017 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. ICFP 2017 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 program chair if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions ICFP 2017 will employ a lightweight double-blind reviewing process, as described below. **Deadline**: The deadline for submissions is Monday, February 27, 2017, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: (NOTE: NEW FORMAT REQUIREMENTS FOR ICFP 2017) 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 Large" 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 ; the appropriate template for ICFP 2017 authors is in the file `acmart-pacmpl-template.tex`. As documented in the template, submissions should be prepared using the `acmlarge` and `anonymous` options. The use of the `review` option is also strongly encouraged but not required. (The `review` option will add line numbers, which will make it easier for reviewers to reference specific parts of your paper in their comments, but should have absolutely no other effect on the typesetting.) Details of available technical support for LaTeX-specific questions is available at . There is a limit of 24 pages for a full paper or 12 pages for an Experience Report; in either case, the bibliography will not be counted against these limits. These page limits have been chosen to allow essentially the same amount of content with the new single-column format as was possible with the two-column format used in past ICFP conferences. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. **Citations**: As part of PACMPL, ICFP 2017 papers are expected to use author-year citations for references to other work. Author-year citations may be used as either a noun phrase, such as "The lambda calculus was originally conceived by Church (1932)", or a parenthetic phrase, such as "The lambda calculus (Church 1932) was intended as a foundation for mathematics". A useful test for correct usage it to make sure that the text still reads correctly when the parenthesized portions of any references are omitted. Take care with prepositions; in the first example above, "by" is more appropriate than "in" because it allows the text to be read correctly as a reference to the author. Sometimes, readability may be improved by putting parenthetic citations at the end of a clause or a sentence, such as "A foundation for mathematics was provided by the lambda calculus (Church 1932)". In LaTeX, use `\citet{Church-1932}` for citations as a noun phrase, "Church (1932)", and `\citep{Church-1932}` for citations as a parenthetic phrase, "(Church 1932)"; for details, see Sections 2.3--2.5 of the natbib documentation (). **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 15:00 UTC on Monday, April 17, 2017, to read reviews and respond to them. **Supplementary Materials**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. The material should be uploaded at submission time, as a single pdf or a tarball, not via a URL. This supplementary material may or may not be anonymized; if not anonymized, it will only be revealed to reviewers after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . **Resubmitted Papers**: Authors who submit a revised version of a paper that has previously been rejected by another conference have the option to attach an annotated copy of the reviews of their previous submission(s), explaining how they have addressed these previous reviews in the present submission. If a reviewer identifies him/herself as a reviewer of this previous submission and wishes to see how his/her comments have been addressed, the program chair 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 presentation at ICFP 2017. A [list of frequently asked questions and answers](http://icfp17.sigplan.org/track/icfp-2017-papers#Submission-and-Reviewing-FAQ) that address common concerns is available on the conference website and will be updated as necessary to clarify and expand on this process. **ICFP 2017 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 PC 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 1, 2017. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After five weeks (June 5, 2017), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within five weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. This process is intended as a refinement of the review process that has been used in previous ICFP conferences. By incorporating a second stage, the process will conform to ACM?s journal reviewing guidelines for PACMPL. **ICFP 2017 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 PC and external 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 Large format. The page limits for final versions of papers will be increased to ensure that authors have space to respond to reviewer comments and mandatory revisions. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: copyright transfer to ACM; retaining copyright but granting ACM exclusive publication rights; or open access on payment of a fee. Further information about ACM author rights is available from . * At least one author of each accepted submission will be expected to attend and present their paper at the conference. (ICFP welcomes all authors, regardless of nationality. If any author of an accepted submission has visa-related difficulties in travelling to the conference, we will make arrangements to enable remote participation, and not require them to attend the conference in order to present their talk. In such a case contact us (icfp2017@REDACTED) for further guidance.) 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. * We intend that the proceedings 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. * **AUTHORS TAKE NOTE: The official publication date is the date the proceedings 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 a committee, separate from the program 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 proceedings, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. Further information about the motivations and expectations for Artifact Evaluation can be found at . ### Special categories of papers In addition to research papers, 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 ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the proceedings and in any citations, the title of each accepted Experience Report must begin with the words "Experience Report" followed by a colon. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The program committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results --- the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better off submitted it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The program chair will be happy to advise on any concerns about which category to submit to. ### Organizers General Chair: Jeremy Gibbons (University of Oxford, UK) Program Chair: Mark Jones (Portland State University, USA) Artifact Evaluation Chair: Ryan R. Newton (Indiana University, USA) Industrial Relations Chair: Ryan Trinkle (Obsidian Systems LLC, USA) Programming Contest Organiser: Sam Lindley (University of Edinburgh, UK) Publicity and Web Chair: Lindsey Kuper (Intel Labs, USA) Student Research Competition Chair: Ilya Sergey (University College London, UK) Video Chair: Jose Calderon (Galois, Inc., USA) Workshops Co-Chair: Andres L?h (Well-Typed LLP) Workshops Co-Chair: David Christiansen (Indiana University, USA) Program Committee: Bob Atkey (University of Strathclyde, Scotland) Adam Chlipala (MIT, USA) Dominique Devriese (KU Leuven, Belgium) Martin Erwig (Oregon State, USA) Matthew Flatt (University of Utah, USA) Ronald Garcia (University of British Columbia, Canada) Kathryn Gray (University of Cambridge, England) John Hughes (Chalmers University and Quvik, Sweden) Chung-Kil Hur (Seoul National University, Korea) Graham Hutton (University of Nottingham, England) Alan Jeffrey (Mozilla Research, USA) Ranjit Jhala (University of California, San Diego, USA) Shin-ya Katsumata (Kyoto University, Japan) Lindsey Kuper (Intel Labs, USA) Dan Licata (Wesleyan University, USA) Ben Lippmeier (Digital Asset, Australia) Gabriel Scherer (Northeastern University, USA) Alexandra Silva (University College London, England) Nikhil Swamy (Microsoft Research, USA) Sam Tobin-Hochstadt (Indiana University, USA) Nicolas Wu (University of Bristol, England) Beta Ziliani (CONICET and FAMAF, Universidad Nacional de C?rdoba, Argentina) From vances@REDACTED Thu Feb 16 05:47:54 2017 From: vances@REDACTED (Vance Shipley) Date: Thu, 16 Feb 2017 10:17:54 +0530 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> Message-ID: On Wed, Feb 15, 2017 at 12:41 PM, Kenneth Lakin wrote: > On 02/14/2017 09:00 PM, David Wright wrote: >> I am after an Erlang only example or is using a framework (http server) >> like cowboy the only way? > > You can serve HTTP over SSL/TLS with erlang's httpd module: > > Erlang/OTP 19 [erts-8.2] [source] [smp:2:2] [ds:2:2:10] > [async-threads:10] [hipe] [kernel-poll:true] > > Eshell V8.2 (abort with ^G) > 1> application:ensure_all_started(inets). > {ok,[inets]} > 2> inets:start(httpd, [{port, 8443}, {server_root, "."}, {server_name, > "localhost"}, {document_root, "."}, {socket_type, {essl, [{certfile, > "server.pem"}]}}]). > {ok,<0.77.0>} Building on that here's how to use mnesia with mod_auth for Basic Authentication: $ erl -mnesia dir db ... 1> mnesia:create_schema([node()]). ok 2> mnesia:start(). ok 3> rr(code:lib_dir(inets, src) ++ "/http_server/mod_auth.hrl"). [httpd_group,httpd_user] 4> mnesia:create_table(httpd_user, [{type, bag}, {disc_copies, [node()]}, {attributes, record_info(fields, httpd_user)}]). {atomic,ok} 5> mnesia:create_table(httpd_group, [{type, bag}, {disc_copies, [node()]}, {attributes, record_info(fields, httpd_group)}]). {atomic,ok} 6> inets:start(). ok 7> Mandatory = [{port, 8080}, {server_root, "/Users/vances"}, {server_name, "rest"}, {document_root, "/Users/vances"}]. [{port,8080}, {server_root,"/Users/vances"}, {server_name,"rest"}, {document_root,"/Users/vances"}] 8> Auth = [{directory, {"/", [{auth_type, mnesia}, {require_group, ["api"]}]}}]. [{directory,{"/", [{auth_type,mnesia},{require_group,["api"]}]}}] 9> inets:start(httpd, Mandatory ++ Auth). {ok,<0.143.0>} 11> mod_auth:add_user("client", "secret", [], 8080, "/"). true 12> mod_auth:add_group_member("api", "client", 8080, "/"). true $ curl -u client:secret --head http://localhost:8080/index.html HTTP/1.1 200 OK Date: Thu, 16 Feb 2017 04:37:58 GMT Server: inets/6.3.4 Content-Type: text/html Content-Length: 471 Writing your own callback module for use with inets is simple enough. You must include it in the list of modules to be used by httpd with the {modules, Modules]} property. The basic idea is that each module will be called in sequence to process the request. Your module may do nothing with some requests or it may return a response. In either event you return {proceed, NewData} so that the rest of the modules may do their part. For a REST application you might add a mod_rest callback module to the list which handles the API resources but let the mod_get module handle file resources, mod_auth handle authentication, mod_alias handle rewriting paths, etc.. -- -Vance From chandrashekhar.mullaparthi@REDACTED Thu Feb 16 09:20:46 2017 From: chandrashekhar.mullaparthi@REDACTED (Chandru) Date: Thu, 16 Feb 2017 08:20:46 +0000 Subject: [erlang-questions] diameter circular inherits In-Reply-To: References: Message-ID: On 15 February 2017 at 12:06, Ferrer Guasch Vicent < vicent.ferrerguasch@REDACTED> wrote: > Hi all, > > I am trying to compile some 3GPP diameter applications. The problem I > have is that those standards have circular definitions between them. They > have their own definitions and reused definitions from other standards. > > Below I included a simple example: To compile the Rx application I need > the Gx beam and to compile the Gx application I need the Rx beam, this is > because diameterc requires the beam file from the inherits. The module > diameter_make also has the same restriction. > > I don't see any clear way to solve this issue without modifying the > dictionaries. I could avoid the @inherits and define the AVPs locally, but > some types are not so easy as the ones shown here and I would like to avoid > defining AVPs twice. Am I missing something? Any idea on how to compile > these? > I had a similar problem a while ago and I think I resorted to modifying the dictionaries and copying AVP definitions. The only other way I can think of is to move all the common AVPs into a separate dictionary and inherit from that in both your Rx and Gx dictionaries. I haven't tried this approach but it could work. regards, Chandru -------------- next part -------------- An HTML attachment was scrubbed... URL: From chandrashekhar.mullaparthi@REDACTED Thu Feb 16 09:26:02 2017 From: chandrashekhar.mullaparthi@REDACTED (Chandru) Date: Thu, 16 Feb 2017 08:26:02 +0000 Subject: [erlang-questions] Best way to handle multiple gen_server In-Reply-To: References: Message-ID: On 14 February 2017 at 17:13, Alex S. wrote: > > > 14 ????. 2017 ?., ? 20:06, Felipe Beline > ???????(?): > > > > Hi, > > > > My first question is: If I have a gen_server started by a Supervisor and > it's handling a request (but has several others waiting in the queue), then > it dies for some reason, and the supervisor restart it. Will the requests > in the queue be lost? > > > > Other question is, if I want to create a process of this specific > gen_server for each request that I have(then it should run in "parallel" > several instances), but after each one finishes the execution and return > the calculated value, I want to it to terminate himself. How should be the > properly way to implement it? > > > > Another doubt is, let's say that several thousands os request is made > at same time, and it creates one instance of the server for each one, > should it be "ok" :)? Or should I create a limited amount of servers and > then distribute the requests over then? In this case the OTP pool should > help me ? > > > > Cheers, Felipe > The requests in queue will be lost, but your clients will receive an error > and can retry. > To expand on this, your clients will receive an error only if they are using gen_server:call. If they use gen_server:cast or directly send a message to the gen_server using the '!' operator then there is no way to know which messages the gen_server has processed and which have been lost. regards, Chandru -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Thu Feb 16 11:38:03 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Thu, 16 Feb 2017 11:38:03 +0100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> Message-ID: <66b7dd05-0ada-fd32-c980-0701c36e9527@ninenines.eu> On 02/16/2017 02:34 AM, Kenneth Lakin wrote: > On 02/15/2017 12:37 AM, David Wright wrote: >> However I would like to write a restful API and decode the URL and > obtain parameters >> for the API method. Cowboy comes with a REST basic auth example: https://git.ninenines.eu/cowboy.git/tree/examples/rest_basic_auth > AFAIK, the "magic" of REST is behaving in a vaguely-standard way to > requests containing particular METHODs at particular paths. What you describe is *HTTP*. The "magic" of REST is to not have to write a client for every single API out there, and instead only write the higher level logic about the media types that are manipulated (which are often standard themselves, for example (X)HTML). The server can then instruct the client what media types are available and what operations you can do with them. Browsers are a good example of REST clients. You don't need a separate browser for every single website. Most phone apps and "REST API" clients are good examples of non-REST clients. They're written against a specific API and make many out of band assumptions. Note that REST is an architectural pattern and doesn't apply only to HTTP, and that HTTP is not enough to have REST: you also need at the very least to have media types that support hyperlinks and forms (or other ways of describing operations on resources). Which implies that all APIs that only serve application/json are not REST APIs... Cheers, -- Lo?c Hoguin https://ninenines.eu From alex0player@REDACTED Thu Feb 16 11:41:43 2017 From: alex0player@REDACTED (Alex S.) Date: Thu, 16 Feb 2017 13:41:43 +0300 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: <66b7dd05-0ada-fd32-c980-0701c36e9527@ninenines.eu> References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> <66b7dd05-0ada-fd32-c980-0701c36e9527@ninenines.eu> Message-ID: > 16 ????. 2017 ?., ? 13:38, Lo?c Hoguin ???????(?): > > On 02/16/2017 02:34 AM, Kenneth Lakin wrote: >> On 02/15/2017 12:37 AM, David Wright wrote: >>> However I would like to write a restful API and decode the URL and >> obtain parameters >>> for the API method. > > Cowboy comes with a REST basic auth example: https://git.ninenines.eu/cowboy.git/tree/examples/rest_basic_auth > >> AFAIK, the "magic" of REST is behaving in a vaguely-standard way to >> requests containing particular METHODs at particular paths. > > What you describe is *HTTP*. > > The "magic" of REST is to not have to write a client for every single API out there, and instead only write the higher level logic about the media types that are manipulated (which are often standard themselves, for example (X)HTML). The server can then instruct the client what media types are available and what operations you can do with them. > > Browsers are a good example of REST clients. You don't need a separate browser for every single website. > > Most phone apps and "REST API" clients are good examples of non-REST clients. They're written against a specific API and make many out of band assumptions. > > Note that REST is an architectural pattern and doesn't apply only to HTTP, and that HTTP is not enough to have REST: you also need at the very least to have media types that support hyperlinks and forms (or other ways of describing operations on resources). > > Which implies that all APIs that only serve application/json are not REST APIs? To be fair, you both describe half of REST. Both interlinking *and* good cache/method behaviour (which most browsers don?t rely upon, precisely because WWW is not that RESTful) is required for a REST architecture. It is also fair to say that most homegrown protocols do not benefit from hyperlinking, and weren?t made with REST in mind (and with vendor mime types) precisely because of that. From essen@REDACTED Thu Feb 16 11:53:08 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Thu, 16 Feb 2017 11:53:08 +0100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> <66b7dd05-0ada-fd32-c980-0701c36e9527@ninenines.eu> Message-ID: On 02/16/2017 11:41 AM, Alex S. wrote: > To be fair, you both describe half of REST. Both interlinking *and* good cache/method behaviour (which most browsers don?t rely upon, precisely because WWW is not that RESTful) is required for a REST architecture. I only mentioned the parts that are not taken care of by simply using HTTP. In other words the parts an implementor of a REST API/client should be aware of (otherwise they're not doing REST). I am not sure what you mean about browsers. Browsers do rely on and enforce cache rules. So do caching proxies. The Web wouldn't work without that. > It is also fair to say that most homegrown protocols do not benefit from hyperlinking, and weren?t made with REST in mind (and with vendor mime types) precisely because of that. There's no silver bullet. :-) -- Lo?c Hoguin https://ninenines.eu From lawrence.ansell@REDACTED Thu Feb 16 18:09:20 2017 From: lawrence.ansell@REDACTED (Lawrence Ansell) Date: Thu, 16 Feb 2017 17:09:20 +0000 Subject: [erlang-questions] [ANN] Very Early Bird for #EUC17 in Stockholm now on sale Message-ID: [ANN] Very Early Bird for #euc17 in Stockholm now on sale, only 30 tickets available (and they are already going) save over 20% compared to the standard ticket price: http://www.erlang-factory.com/euc2017#register See You There, Lawrence -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo@REDACTED Fri Feb 17 14:56:29 2017 From: hugo@REDACTED (Hugo Mills) Date: Fri, 17 Feb 2017 13:56:29 +0000 Subject: [erlang-questions] Debugging yecc grammars: what techniques are available? In-Reply-To: <22678.64511.338133.200620@gargle.gargle.HOWL> References: <20170204234517.GA21899@carfax.org.uk> <22678.64511.338133.200620@gargle.gargle.HOWL> Message-ID: <20170217135629.GM4249@carfax.org.uk> Thanks to all who replied on this thread, and apologies for not getting back sooner -- more urgent things got in the way. On Sun, Feb 05, 2017 at 11:18:39AM +0100, Mikael Pettersson wrote: > Hugo Mills writes: > > I'm in the process of writing a domain-specific language, using a > > custom lexer and a yecc parser. In the process of attempting to add a > > new feature to the grammar, I've managed to break what appears to me > > to be a completely unrelated piece of the grammar: I'm adding a > > structure similar to a list comprehension, and suddenly the integer > > comparison operators have stopped working in one group of cases. > > > > What approaches are there for debugging this kind of problem? The > > best I can some up with is inspection of the .yrl source in detail, > > but that's not helping. How else can I work out what the issue is? > > > > Obviously, I could post the grammar here for inspection by more > > experienced minds than mine, but I'd prefer to find better tooling and > > techniques rather than mere appeal to higher authority... > > Caveat: while I have experience with various parsing techniques, including > LALR(1), I have none with the yecc tool. > > Does yecc issue any warnings about shift/reduce or reduce/reduce conflicts? > If it does, you need to investigate those and resolve them. With yacc and > bison it's possible to manually inspect the LALR(1) automaton for debugging. This turned out to be my main problem: I actually had 20 unresolved shift/reduce conflicts, but in the yecc output, they were listed at the top of a giant list of properly resolved conflicts (using precedence rules), and I hadn't seen them. I fixed up those problems, and several more that arose elsewhere in the grammar once those had been removed (for example, duplicate definitions of some structures like comma-separated lists). This fixed up a bunch of my parser test failures. Then I found that the problematic integer comparison operators had actually been only coincidentally passing the unit tests, and that the test failures I was seeing were correct -- so I fixed a bug in the evaluator code for those. Finally, I worked out how to give function invocation a high precedence, which has, I think, fixed the last remaining issue I had with the grammar. (I can now write f(3)(6) and 3+g(3) and get the correct parse trees). I've still got some known bugs in the evaluator, but they're not parser problems, and I know how to fix those easily enough. Thanks, Hugo. -- Hugo Mills | "There's more than one way to do it" is not a hugo@REDACTED carfax.org.uk | commandment. It is a dire warning. http://carfax.org.uk/ | PGP: E2AB1DE4 | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From s.safarov@REDACTED Sat Feb 18 18:40:02 2017 From: s.safarov@REDACTED (Sergey Safarov) Date: Sat, 18 Feb 2017 17:40:02 +0000 Subject: [erlang-questions] remote debuging Message-ID: Could you say here is described how debug remote host? Is this possible if remote host not have wx libs? Is this possible when application on remote host generated by release tools. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmkolesnikov@REDACTED Sat Feb 18 19:28:05 2017 From: dmkolesnikov@REDACTED (Dmitry Kolesnikov) Date: Sat, 18 Feb 2017 20:28:05 +0200 Subject: [erlang-questions] remote debuging In-Reply-To: References: Message-ID: Hello, > > Could you say here is described how debug remote host? The concept is called Erlang Remote Shell. Here is a discussion how to connect to the node http://erlang.2086793.n4.nabble.com/Attaching-a-shell-to-a-running-node-td2090834.html > Is this possible if remote host not have wx libs? Yes, just use command line > Is this possible when application on remote host generated by release tools. Yes, you might need to pay special attention to include libraries required for debugging. E.g. you might need to explicitly include runtime_tools, debugger, etc. - Dmitry > On Feb 18, 2017, at 7:40 PM, Sergey Safarov wrote: > > Could you say here is described how debug remote host? > Is this possible if remote host not have wx libs? > Is this possible when application on remote host generated by release tools. > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From grantcmurphy@REDACTED Sun Feb 19 17:05:43 2017 From: grantcmurphy@REDACTED (Grant Murphy) Date: Sun, 19 Feb 2017 09:05:43 -0700 Subject: [erlang-questions] Causes of - Slogan: erl_child_setup closed? Message-ID: Hi, I'm seeing an intermittent crash on a Ubuntu 16.04 host, Erlang version - 19.2.3. The erl_crashdump contains "erl_child_setup closed". Tracked the error to here https://github.com/erlang/otp/blob/1526eaead833b3bdcd3555a12e2af62c359e7868/erts/emulator/sys/unix/sys_drivers.c#L1776, but not entirely sure what could be causing this particular failure. Can anybody shed some light on the likely cause of this error message? Thanks, - Grant -------------- next part -------------- An HTML attachment was scrubbed... URL: From donpedrothird@REDACTED Sun Feb 19 23:52:52 2017 From: donpedrothird@REDACTED (John Doe) Date: Mon, 20 Feb 2017 01:52:52 +0300 Subject: [erlang-questions] Causes of - Slogan: erl_child_setup closed? In-Reply-To: References: Message-ID: I asked the same question a few months ago https://groups.google.com/forum/?fromgroups#!searchin/erlang-programming/erl_child_setup$20closed%7Csort:relevance/erlang-programming/eQSvOLHUf-A/KjJbWiVAAgAJ 2017-02-19 19:05 GMT+03:00 Grant Murphy : > Hi, > > I'm seeing an intermittent crash on a Ubuntu 16.04 host, Erlang version - > 19.2.3. The erl_crashdump contains "erl_child_setup closed". > > Tracked the error to here https://github.com/erlang/otp/blob/ > 1526eaead833b3bdcd3555a12e2af62c359e7868/erts/emulator/sys/ > unix/sys_drivers.c#L1776, but not entirely sure what could be causing > this particular failure. > > Can anybody shed some light on the likely cause of this error message? > > Thanks, > > - Grant > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grantcmurphy@REDACTED Mon Feb 20 00:04:17 2017 From: grantcmurphy@REDACTED (Grant Murphy) Date: Sun, 19 Feb 2017 16:04:17 -0700 Subject: [erlang-questions] Causes of - Slogan: erl_child_setup closed? In-Reply-To: References: Message-ID: Thanks I saw that. I'm using a more recent version of erlang (19.2.3) so unless it's a regression so I assume it's something different? On Sun, Feb 19, 2017 at 3:52 PM, John Doe wrote: > I asked the same question a few months ago > https://groups.google.com/forum/?fromgroups#!searchin/ > erlang-programming/erl_child_setup$20closed%7Csort: > relevance/erlang-programming/eQSvOLHUf-A/KjJbWiVAAgAJ > > 2017-02-19 19:05 GMT+03:00 Grant Murphy : > >> Hi, >> >> I'm seeing an intermittent crash on a Ubuntu 16.04 host, Erlang version - >> 19.2.3. The erl_crashdump contains "erl_child_setup closed". >> >> Tracked the error to here https://github.com/erlang/otp/ >> blob/1526eaead833b3bdcd3555a12e2af62c359e7868/erts/emulator/ >> sys/unix/sys_drivers.c#L1776, but not entirely sure what could be >> causing this particular failure. >> >> Can anybody shed some light on the likely cause of this error message? >> >> Thanks, >> >> - Grant >> >> _______________________________________________ >> 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 lukas@REDACTED Mon Feb 20 08:38:08 2017 From: lukas@REDACTED (Lukas Larsson) Date: Mon, 20 Feb 2017 08:38:08 +0100 Subject: [erlang-questions] Causes of - Slogan: erl_child_setup closed? In-Reply-To: References: Message-ID: Hello, You get that message if the erl_child_setup process for some reason terminates. The erl_child_setup process is responsible for doing the setup of any external port program that gets started, i.e. os:cmd/open_port. The only "normal" reason that I have found so far for erl_child_setup to exit is if the Linux OOM killed decides to terminate it. Besides that all terminations should be considered bugs in erl_child_setup. Do you have any core file from erl_child_setup? Any printouts to stderr? Lukas On Sun, Feb 19, 2017 at 5:05 PM, Grant Murphy wrote: > Hi, > > I'm seeing an intermittent crash on a Ubuntu 16.04 host, Erlang version - > 19.2.3. The erl_crashdump contains "erl_child_setup closed". > > Tracked the error to here https://github.com/erlang/otp/ > blob/1526eaead833b3bdcd3555a12e2af62c359e7868/erts/emulator/ > sys/unix/sys_drivers.c#L1776, but not entirely sure what could be causing > this particular failure. > > Can anybody shed some light on the likely cause of this error message? > > Thanks, > > - Grant > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arunp@REDACTED Mon Feb 20 10:41:44 2017 From: arunp@REDACTED (Arun) Date: Mon, 20 Feb 2017 15:11:44 +0530 Subject: [erlang-questions] elarm - difference between clear and manual clear Message-ID: <58AAB9D8.9070200@utl.in> Hi, Can anybody please tell me what is the difference between clear and manual clear in elarm. Regards, Arun From hugo@REDACTED Mon Feb 20 14:58:28 2017 From: hugo@REDACTED (Hugo Mills) Date: Mon, 20 Feb 2017 13:58:28 +0000 Subject: [erlang-questions] Bug in sets module? Equal sets aren't equal Message-ID: <20170220135828.GP4249@carfax.org.uk> I've just turned up this little problem: hrm@REDACTED:~/nightglass/software/childe$ erl Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false] 3> sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]). false Is this expected behaviour, or a bug in the sets module? How should I compare sets for equality? There's no equality comparison function in the module. (I can see any number of solutions I could roll myself, but they're all a bit ugly). Hugo. -- Hugo Mills | I am an opera lover from planet Zog. Take me to your hugo@REDACTED carfax.org.uk | lieder. http://carfax.org.uk/ | PGP: E2AB1DE4 | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From alex0player@REDACTED Mon Feb 20 15:11:25 2017 From: alex0player@REDACTED (Alex S.) Date: Mon, 20 Feb 2017 17:11:25 +0300 Subject: [erlang-questions] Bug in sets module? Equal sets aren't equal In-Reply-To: <20170220135828.GP4249@carfax.org.uk> References: <20170220135828.GP4249@carfax.org.uk> Message-ID: <47642029-2F16-43F9-A6A7-A53C74D68A6A@gmail.com> > 20 ????. 2017 ?., ? 16:58, Hugo Mills ???????(?): > > sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]). The onyl way to compare them for equality would be elementwise anyway, i.e. I'd roll with sets:to_list, it?s about as optimal as it gets. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugo@REDACTED Mon Feb 20 15:16:16 2017 From: hugo@REDACTED (Hugo Mills) Date: Mon, 20 Feb 2017 14:16:16 +0000 Subject: [erlang-questions] Bug in sets module? Equal sets aren't equal In-Reply-To: <47642029-2F16-43F9-A6A7-A53C74D68A6A@gmail.com> References: <20170220135828.GP4249@carfax.org.uk> <47642029-2F16-43F9-A6A7-A53C74D68A6A@gmail.com> Message-ID: <20170220141616.GQ4249@carfax.org.uk> On Mon, Feb 20, 2017 at 05:11:25PM +0300, Alex S. wrote: > > > 20 ????. 2017 ?., ? 16:58, Hugo Mills ???????(?): > > > > sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]). > > The onyl way to compare them for equality would be elementwise anyway, i.e. I'd roll with sets:to_list, it?s about as optimal as it gets. No, that's not going to work: 1> sets:to_list(sets:from_list([[2, 2], [2, -2]])). [[2,2],[2,-2]] 2> sets:to_list(sets:from_list([[2, -2], [2, 2]])). [[2,-2],[2,2]] It looks like the best you can do is this: sets:size(A) =:= sets:size(B) and sets:is_subset(A, B). Hugo. -- Hugo Mills | Great films about cricket: Umpire of the Rising Sun hugo@REDACTED carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From lenartlad@REDACTED Mon Feb 20 15:32:56 2017 From: lenartlad@REDACTED (lenartlad@REDACTED) Date: Mon, 20 Feb 2017 15:32:56 +0100 Subject: [erlang-questions] =?utf-8?q?Bug_in_sets_module=3F_Equal_sets_are?= =?utf-8?q?n=27t_equal?= In-Reply-To: 00000001073600776a8000aa38bf References: <20170220135828.GP4249@carfax.org.uk> 00000001073600776a8000aa38bf Message-ID: <20170220153256.8B41C78A@volny.cz> Hello. What about this: sets:size(S1) == sets:size(S2) andalso sets:is_subset(S1, S2) ? This seems rather elegant, at least to me :-) Note however that I am not sure what the function sets:is_subset/2 returns for two empty sets (I do not have Erlang available at the moment to test it). HTH, Ladislav Lenart ______________________________________________________________ > Od: "Alex S." > Komu: Hugo Mills > Datum: 20.02.2017 15:11 > P?edm?t: Re: [erlang-questions] Bug in sets module? Equal sets aren't equal > > CC: > >> 20 ????. 2017 ?., ? 16:58, Hugo Mills ???????(?): >> >> sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]). > >The onyl way to compare them for equality would be elementwise anyway, i.e. I'd roll with sets:to_list, it?s about as optimal as it gets. > >---------- > >_______________________________________________ >erlang-questions mailing list >erlang-questions@REDACTED >http://erlang.org/mailman/listinfo/erlang-questions > > From hugo@REDACTED Mon Feb 20 16:21:18 2017 From: hugo@REDACTED (Hugo Mills) Date: Mon, 20 Feb 2017 15:21:18 +0000 Subject: [erlang-questions] Bug in sets module? Equal sets aren't equal In-Reply-To: <20170220153256.8B41C78A@volny.cz> References: <20170220135828.GP4249@carfax.org.uk> <20170220153256.8B41C78A@volny.cz> Message-ID: <20170220152118.GA29429@carfax.org.uk> On Mon, Feb 20, 2017 at 03:32:56PM +0100, lenartlad@REDACTED wrote: > Hello. > > What about this: > > sets:size(S1) == sets:size(S2) andalso sets:is_subset(S1, S2) > > ? > > This seems rather elegant, at least to me :-) It was my fallback solution, too. > Note however that I am not sure what the function sets:is_subset/2 returns for two empty sets (I do not have Erlang available at the moment to test it). 1> sets:is_subset(sets:new(), sets:new()). true so that edge case works, too. Hugo. > HTH, > > Ladislav Lenart > > > ______________________________________________________________ > > Od: "Alex S." > > Komu: Hugo Mills > > Datum: 20.02.2017 15:11 > > P?edm?t: Re: [erlang-questions] Bug in sets module? Equal sets aren't equal > > > > CC: > > > >> 20 ????. 2017 ?., ? 16:58, Hugo Mills ???????(?): > >> > >> sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]). > > > >The onyl way to compare them for equality would be elementwise anyway, i.e. I'd roll with sets:to_list, it?s about as optimal as it gets. > > > >---------- > > > >_______________________________________________ > >erlang-questions mailing list > >erlang-questions@REDACTED > >http://erlang.org/mailman/listinfo/erlang-questions > > > > -- Hugo Mills | Great films about cricket: Umpire of the Rising Sun hugo@REDACTED carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From grantcmurphy@REDACTED Mon Feb 20 20:30:49 2017 From: grantcmurphy@REDACTED (Grant Murphy) Date: Mon, 20 Feb 2017 12:30:49 -0700 Subject: [erlang-questions] Causes of - Slogan: erl_child_setup closed? In-Reply-To: References: Message-ID: Checking my logs it does indeed look like a the Linux OOM killed it. Thanks for the context that was really helpful. On Mon, Feb 20, 2017 at 12:38 AM, Lukas Larsson wrote: > Hello, > > You get that message if the erl_child_setup process for some reason > terminates. The erl_child_setup process is responsible for doing the setup > of any external port program that gets started, i.e. os:cmd/open_port. > > The only "normal" reason that I have found so far for erl_child_setup to > exit is if the Linux OOM killed decides to terminate it. Besides that all > terminations should be considered bugs in erl_child_setup. > > Do you have any core file from erl_child_setup? Any printouts to stderr? > > Lukas > > On Sun, Feb 19, 2017 at 5:05 PM, Grant Murphy > wrote: > >> Hi, >> >> I'm seeing an intermittent crash on a Ubuntu 16.04 host, Erlang version - >> 19.2.3. The erl_crashdump contains "erl_child_setup closed". >> >> Tracked the error to here https://github.com/erlang/otp/ >> blob/1526eaead833b3bdcd3555a12e2af62c359e7868/erts/emulator/ >> sys/unix/sys_drivers.c#L1776, but not entirely sure what could be >> causing this particular failure. >> >> Can anybody shed some light on the likely cause of this error message? >> >> Thanks, >> >> - Grant >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Mon Feb 20 23:36:15 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Tue, 21 Feb 2017 11:36:15 +1300 Subject: [erlang-questions] Bug in sets module? Equal sets aren't equal In-Reply-To: <20170220135828.GP4249@carfax.org.uk> References: <20170220135828.GP4249@carfax.org.uk> Message-ID: <556d8a51-b503-8823-0e5b-5eab5f73cf10@cs.otago.ac.nz> On 21/02/17 2:58 AM, Hugo Mills wrote: About a problem that occurs in practically every programming language that has a built-in structural equality, going back to Lisp. The problem is that we have an ABSTRACT data type A with a CONCRETE representation C such that for all x in C there is a unique y in A such that x represents y for all y in A there is some x in C such that x represents y -- if we didn't have these laws C wouldn't be a concrete representation for A -- BUT exists y in A such that #{x in C | x represents y} > 1 some abstract value has multiple representations. Perhaps the simplest example of this is the queue-as-back-to-back lists example, where A = sequence of T and C = { list(T), list(T) } such that {X,Y} represents X ++ reverse(Y). Then trivially {[],[1]} and {[1],[]} represent the same sequence. If you have a typed language like Haskell or an OO language like Smalltalk so that you can redefine equality for C to match equality for A, you're away laughing. If there is a built-in structural equality like EQUAL in Lisp or = (==) in Prolog, or the analogue in Erlang, then your program is ALWAYS using equality of representations. That means that when you have such a data type, you HAVE to write your own equality function for it, and you HAVE to remember to call that function instead of the built-in equality. Sometimes C may be a canonical representation for A. For example, if A is set of T and C is strictly increasing list of T, then representations are unique and we don't need to distinguish between equality wrt A and equality wrt C. To put it another way, it is a DEFECT in Erlang's set module that there is no sets:equal(S1, S2). The same defect is present in ordsets, there is no ordsets:equal(S1, S2). Wait, didn't I just say that the ordered representation is canonical? Yes, if done right, but ordsets is defined to use ==, so [1] and [1.0] are, as far as ordsets is concerned, the same set. 1> X = ordsets:from_list([1]). [1] 2> Y = ordsets:from_list([1.0]). [1.0] 3> ordsets:is_subset(X, Y). true 4> ordsets:is_subset(Y, X). true 5> X == Y. true 6> X =:= Y. false If you were thinking of having a set of ordsets, think again. The same defect applies to gb_sets where there is no gb_sets:equal(S1, S2). > Is this expected behaviour, or a bug in the sets module? In a sense, both. It is expected behaviour that equality of concrete representations is a refinement of equality of abstract values. It is a bug that there is no sets:equal/2 to both solve the problem and by its presence in the interface remind you that the problem exists. From himars@REDACTED Tue Feb 21 05:26:14 2017 From: himars@REDACTED (Jack Tang) Date: Tue, 21 Feb 2017 12:26:14 +0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> References: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> Message-ID: We try to integrate the metrics to our grafana monitoring by adding infuxdb consumer. Thanks Siraaj. BTW: Did somebody collect the crash metrics, like the count of crashed process, the restart count of the process and etc? On Sat, Feb 11, 2017 at 2:01 AM, Siraaj Khandkar wrote: > My biased preference is: > > https://github.com/ibnfirnas/beam_stats > > It's concern is only with sampling VM metrics and shipping them off to > arbitrary destinations (Folsomite was Graphite-only, the last time I > checked). Graphite and StatsD consumer modules are included. StatsD is the > one we use in prod now. > > It's been running in prod for 1.5 years now, and even though it wasn't > originally the main motivation, my favorite feature turned-out to be the > sampling of individual processes and ETS tables, which was a life-saver in > tracking down multiple memory leaks in the legacy system I inherited. > > > > On 2/9/17 4:06 AM, Frank Muller wrote: > >> Hi everyone, >> >> Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/ >> ). >> >> Here I'm looking for a simple integration with minimal dependencies if >> possible. >> >> Thank you. >> /Frank >> >> _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Jack Tang http://www.linkedin.com/in/jacktang -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Tue Feb 21 06:41:45 2017 From: mjtruog@REDACTED (Michael Truog) Date: Mon, 20 Feb 2017 21:41:45 -0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> Message-ID: <58ABD319.6000001@gmail.com> On 02/20/2017 08:26 PM, Jack Tang wrote: > We try to integrate the metrics to our grafana monitoring by adding infuxdb consumer. Thanks Siraaj. > > BTW: Did somebody collect the crash metrics, like the count of crashed process, the restart count of the process and etc? You get things like the cumulative init/terminate count for CloudI services, if you are using CloudI (https://github.com/CloudI/CloudI/) with cloudi_service_monitoring, which is using exometer (if you add configuration entries to your services, as described at https://github.com/CloudI/CloudI/blob/master/src/lib/cloudi_service_monitoring/src/cloudi_service_monitoring.erl#L11-L40). > > On Sat, Feb 11, 2017 at 2:01 AM, Siraaj Khandkar > wrote: > > My biased preference is: > > https://github.com/ibnfirnas/beam_stats > > It's concern is only with sampling VM metrics and shipping them off to arbitrary destinations (Folsomite was Graphite-only, the last time I checked). Graphite and StatsD consumer modules are included. StatsD is the one we use in prod now. > > It's been running in prod for 1.5 years now, and even though it wasn't originally the main motivation, my favorite feature turned-out to be the sampling of individual processes and ETS tables, which was a life-saver in tracking down multiple memory leaks in the legacy system I inherited. > > > > On 2/9/17 4:06 AM, Frank Muller wrote: > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana (http://grafana.org/). > > Here I'm looking for a simple integration with minimal dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > -- > Jack Tang > > > http://www.linkedin.com/in/jacktang > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From keam7095@REDACTED Tue Feb 21 10:15:56 2017 From: keam7095@REDACTED (Hakim Fajardo) Date: Tue, 21 Feb 2017 04:15:56 -0500 Subject: [erlang-questions] Newbie Question about io:format Message-ID: First, thank you because this is a great resource. Second, I started writing basic programs every day to improve my Erlang coding. I wrote a simple program that calculates the average of a list of numbers. But I keep getting this error about io:format. prices([]) -> [], io:format("List is empty ~n"); %% determine number of items in the list to calculate average%% prices(L) when is_list(L) -> Size = length(L), Sum1 = lists:sum(L), Av1 = Sum1 / Size, io:format("The average equals ~n", Av1). Then.. Eshell V8.2 (abort with ^G) 1> L = [1,2,2,2,3,3,4]. [1,2,2,2,3,3,4] 2> c(standev). {ok,standev} 3> standev:prices(L). ** exception error: bad argument in function io:format/3 called as io:format(<0.50.0>,"The average equals ~n",2.4285714285714284) Why am I getting '**exception error:'? Thank you, I hope this isn't too newbie a question. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmytro.lytovchenko@REDACTED Tue Feb 21 10:42:14 2017 From: dmytro.lytovchenko@REDACTED (Dmytro Lytovchenko) Date: Tue, 21 Feb 2017 10:42:14 +0100 Subject: [erlang-questions] Newbie Question about io:format In-Reply-To: References: Message-ID: Because Erlang has no functions with variable amount of arguments (like for example in printf C/C++), args to io:format are passed as a list. So correct way to call it is: io:format("Bla ~p~n", [Av1]). Where ~p is to print any value, also there are more ways to format a value, consult the documentation page at http://erlang.org/doc/man/io.html#fwrite-1 2017-02-21 10:15 GMT+01:00 Hakim Fajardo : > First, thank you because this is a great resource. > > Second, I started writing basic programs every day to improve my Erlang > coding. I wrote a simple program that calculates the average of a list of > numbers. But I keep getting this error about io:format. > > > prices([]) -> > [], > io:format("List is empty ~n"); > > %% determine number of items in the list to calculate average%% > > prices(L) when is_list(L) -> > Size = length(L), > Sum1 = lists:sum(L), > Av1 = Sum1 / Size, > io:format("The average equals ~n", Av1). > > > Then.. > > Eshell V8.2 (abort with ^G) > 1> L = [1,2,2,2,3,3,4]. > [1,2,2,2,3,3,4] > > 2> c(standev). > {ok,standev} > > 3> standev:prices(L). > ** exception error: bad argument > in function io:format/3 > called as io:format(<0.50.0>,"The average equals > ~n",2.4285714285714284) > > > Why am I getting '**exception error:'? > > Thank you, I hope this isn't too newbie a question. > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaba.hoch@REDACTED Tue Feb 21 12:52:46 2017 From: csaba.hoch@REDACTED (Csaba Hoch) Date: Tue, 21 Feb 2017 12:52:46 +0100 Subject: [erlang-questions] elarm - difference between clear and manual clear In-Reply-To: <58AAB9D8.9070200@utl.in> References: <58AAB9D8.9070200@utl.in> Message-ID: Hi Arun, "clear" is supposed to be called when the subsystem that raised an alarm clears that alarm. (E.g. there is a process which monitors free disk space, and raises an alarm when there isn't much free space; then when it notices that there is enough free space again, it will clear the alarm by calling "clear"). "manual clear" is supposed to be called when the subsystem that raised the alarm doesn't clear the alarm, but the user knows that the error condition highlighted by the alarm is not present any more. In this case the user can call "manual clear". (Or even better, if your software has a management interface, that can expose a "clear alarm" button, which should then call "manual clear".) Regards, Csaba On Mon, Feb 20, 2017 at 10:41 AM, Arun wrote: > Hi, > > Can anybody please tell me what is the difference between clear and > manual clear in elarm. > > Regards, > Arun > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nickelchen@REDACTED Tue Feb 21 16:54:22 2017 From: nickelchen@REDACTED (nickel chen) Date: Tue, 21 Feb 2017 15:54:22 +0000 (UTC) Subject: [erlang-questions] cowboy http request parse References: <2066891933.2487790.1487692462678.ref@mail.yahoo.com> Message-ID: <2066891933.2487790.1487692462678@mail.yahoo.com> Hi, I'm new to erlang and being learning it, and I found cowboy is a very good project to learn how to implement a http protocol. It's based on ranch, which set socket option {packet, raw}, means it will deliver message {tcp, Socket, Data} to cowboy constantly.?While reading parse_request function in cowboy_http.erl, I found it difficult to understand. As far as I figured out, when received message, this function append Data to Buffer unless the data contains a new line "\r\n", then it began to parse the Buffer.The Buffer may be part of the whole request header, may ends with "\r\n", or at least contains "\r\n". So it may be: GET / HTTP/1.1\r\n or? GET / HTTP/1.1\r\nHost: After parsed the first line for method, uri, version, it will go back to read more Data from Socket to Buffer.?My question is, why not read the whole request header all at once, as request header and request body are seperated by two "\r\n" (Correct me if I mis-understand: one "\r\n" is for header line ending, the other is for the empty line between header and body). After reading whole request, then it will not bother going back again to read Socket Data while parsing. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Wed Feb 22 01:17:41 2017 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 22 Feb 2017 13:17:41 +1300 Subject: [erlang-questions] Newbie Question about io:format In-Reply-To: References: Message-ID: <7b10207d-63d4-f9ea-2417-e696c1212913@cs.otago.ac.nz> On 21/02/17 10:15 PM, Hakim Fajardo wrote: (simplified): prices([]) -> io:format("List is empty~n"); prices(L) when is_list(L) -> io:format("The average equals ~n", lists:sum(L)/length(L)). ^^^^^^^^^^^^^^^^^^^^^^^ % man io format(Format, Data) -> ok Data = [term()] The second argument of io:format/2 should be a list. What part of the format says to expect a number? What part of the format says how to print a number? From keam7095@REDACTED Wed Feb 22 20:11:17 2017 From: keam7095@REDACTED (Hakim Fajardo) Date: Wed, 22 Feb 2017 14:11:17 -0500 Subject: [erlang-questions] Newbie Question about io:format In-Reply-To: References: Message-ID: Thank you, I understand now. On Tue, Feb 21, 2017 at 4:42 AM, Dmytro Lytovchenko < dmytro.lytovchenko@REDACTED> wrote: > Because Erlang has no functions with variable amount of arguments (like > for example in printf C/C++), args to io:format are passed as a list. So > correct way to call it is: > > io:format("Bla ~p~n", [Av1]). > > Where ~p is to print any value, also there are more ways to format a > value, consult the documentation page at http://erlang.org/doc/man/ > io.html#fwrite-1 > > 2017-02-21 10:15 GMT+01:00 Hakim Fajardo : > >> First, thank you because this is a great resource. >> >> Second, I started writing basic programs every day to improve my Erlang >> coding. I wrote a simple program that calculates the average of a list of >> numbers. But I keep getting this error about io:format. >> >> >> prices([]) -> >> [], >> io:format("List is empty ~n"); >> >> %% determine number of items in the list to calculate average%% >> >> prices(L) when is_list(L) -> >> Size = length(L), >> Sum1 = lists:sum(L), >> Av1 = Sum1 / Size, >> io:format("The average equals ~n", Av1). >> >> >> Then.. >> >> Eshell V8.2 (abort with ^G) >> 1> L = [1,2,2,2,3,3,4]. >> [1,2,2,2,3,3,4] >> >> 2> c(standev). >> {ok,standev} >> >> 3> standev:prices(L). >> ** exception error: bad argument >> in function io:format/3 >> called as io:format(<0.50.0>,"The average equals >> ~n",2.4285714285714284) >> >> >> Why am I getting '**exception error:'? >> >> Thank you, I hope this isn't too newbie a question. >> >> >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From keam7095@REDACTED Wed Feb 22 20:13:02 2017 From: keam7095@REDACTED (Hakim Fajardo) Date: Wed, 22 Feb 2017 14:13:02 -0500 Subject: [erlang-questions] Newbie Question about io:format In-Reply-To: <7b10207d-63d4-f9ea-2417-e696c1212913@cs.otago.ac.nz> References: <7b10207d-63d4-f9ea-2417-e696c1212913@cs.otago.ac.nz> Message-ID: Thank you! I see now. On Tue, Feb 21, 2017 at 7:17 PM, Richard A. O'Keefe wrote: > On 21/02/17 10:15 PM, Hakim Fajardo wrote: > (simplified): > > prices([]) -> > io:format("List is empty~n"); > prices(L) when is_list(L) -> > io:format("The average equals ~n", lists:sum(L)/length(L)). > ^^^^^^^^^^^^^^^^^^^^^^^ > > % man io > format(Format, Data) -> ok > Data = [term()] > > The second argument of io:format/2 should be a list. > > What part of the format says to expect a number? > What part of the format says how to print a number? > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkokich@REDACTED Wed Feb 22 21:05:04 2017 From: mkokich@REDACTED (Michael Kokich) Date: Wed, 22 Feb 2017 20:05:04 +0000 Subject: [erlang-questions] Question about per file compile options Message-ID: Hi everyone I'm hitting up against against how Erlang passes compile options to parse_transform and was wanting some guidance. I'm making changes to lager's parse_tranform and I'm making eunit tests to check these changes. The changes involve setting compile options to add extra metadata to logging calls, such as the example below. {erl_opts, [ {parse_transform, lager_transform}, {lager_function_transforms, [ {metadata_value, {module_name, function_name}} ]} ]}. One of these tests involves calls to a undefined Module:Function and I need to apply the transform only to the specific test file since this will break all the other tests. If I set lager_function_transforms in lager's rebar.config eunit_compile_opts it applies the transforms to all the tests with -compile([{parse_transform, lager_transform}]). If I supply these options to the -compile, they don't appear in the options provided to the parse_transform. -compile([ {parse_transform, lager_transform}, % If you don't supply this to the test file it won't transformed {lager_function_transforms, [ % But these options seem to be ignored {metadata_value, {module_name, function_name}} ]} ]). Is there a way a to compile these new tests with my specific settings without applying them globally, or having to compile them separately? Thank you Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From bchesneau@REDACTED Thu Feb 23 06:57:18 2017 From: bchesneau@REDACTED (Benoit Chesneau) Date: Thu, 23 Feb 2017 05:57:18 +0000 Subject: [erlang-questions] term_to_binary for nifs? Message-ID: is thre any helper that allows to convert a term to biary and the reverse inside a nif (in C). Or should I use my own serialization format? - benoit -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjtruog@REDACTED Thu Feb 23 07:30:50 2017 From: mjtruog@REDACTED (Michael Truog) Date: Wed, 22 Feb 2017 22:30:50 -0800 Subject: [erlang-questions] term_to_binary for nifs? In-Reply-To: References: Message-ID: <58AE819A.9000206@gmail.com> You are looking for http://erlang.org/doc/man/ei.html On 02/22/2017 09:57 PM, Benoit Chesneau wrote: > is thre any helper that allows to convert a term to biary and the reverse inside a nif (in C). Or should I use my own serialization format? > > - benoit > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Thu Feb 23 10:52:07 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Thu, 23 Feb 2017 10:52:07 +0100 Subject: [erlang-questions] term_to_binary for nifs? In-Reply-To: References: Message-ID: <30ffe8bf-e128-ac5e-b75a-d21d4d5fc451@ninenines.eu> Erm. enif_term_to_binary and enif_binary_to_term? On 02/23/2017 06:57 AM, Benoit Chesneau wrote: > is thre any helper that allows to convert a term to biary and the > reverse inside a nif (in C). Or should I use my own serialization format? > > - benoit > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From S.J.Thompson@REDACTED Thu Feb 23 11:38:40 2017 From: S.J.Thompson@REDACTED (Simon Thompson) Date: Thu, 23 Feb 2017 10:38:40 +0000 Subject: [erlang-questions] Trends in Functional Programming in Education ITFPIE) 2017, call for papers Message-ID: <808795D3-0D84-4690-8498-109316D10215@kent.ac.uk> TFPIE 2017 Trends in Functional Programming in Education, 2017 The sixth workshop on Trends in Functional Programming in Education, 2017, which is to be held on the Canterbury campus of the University of Kent on Thursday, 22 June, following the 2017 TFP meeting on 19?21 June. TFPIE workshops have previously been held in St Andrews, Scotland (2012), Provo Utah, USA (2013), Soesterberg, The Netherlands (2014), and Sophia-Antipolis, France (2015), College Park, USA (2016). The goal of TFPIE is to gather researchers, teachers and professionals that use, or are interested in the use of, functional programming in education. TFPIE aims to be a venue where novel ideas, classroom-tested ideas and work-in-progress on the use of functional programming in education are discussed. The one-day workshop will foster a spirit of open discussion by having a review process for publication after the workshop. The program chair of TFPIE 2017 will screen submissions to ensure that all presentations are within scope and are of interest to participants. After the workshop, presenters will be invited to submit revised versions of their articles for publication in the journal Electronic Proceedings in Theoretical Computer Science (EPTCS). Call for papers TFPIE 2017 welcomes submissions describing techniques used in the classroom, tools used in and/or developed for the classroom and any creative use of functional programming (FP) to aid education in or outside Computer Science. Topics of interest include, but are not limited to: - FP and beginning CS students - FP and Computational Thinking - FP and Artificial Intelligence - FP in Robotics - FP and Music - Advanced FP for undergraduates - FP in graduate education - Engaging students in research using FP - FP in Programming Languages - FP in the high school curriculum - FP as a stepping stone to other CS topics - FP and Philosophy - The pedagogy of teaching FP - FP and e-learning: MOOCs, automated assessment etc. - Best Lectures ? more details below In addition to papers, we are requesting best lecture presentations. What?s your best lecture topic in an FP related course? Do you have a fun way to present FP concepts to novices or perhaps an especially interesting presentation of a difficult topic? In either case, please consider sharing it. Best lecture topics will be selected for presentation based on a short abstract describing the lecture and its interest to TFPIE attendees. Submission Potential presenters are invited to submit an extended abstract (4-6 pages) or a draft paper (up to 16 pages) in EPTCS style. The authors of accepted presentations will have their preprints and their slides made available on the workshop's website. Papers and abstracts can be submitted via easychair at the following link: https://easychair.org/conferences/?conf=tfpie2017 After the workshop, presenters will be invited to submit (a revised version of) their article for review. The PC will select the best articles for publication in the journal Electronic Proceedings in Theoretical Computer Science (EPTCS). Articles rejected for presentation and extended abstracts will not be formally reviewed by the PC. Programme committee Dr Laura Castro, University of A Coru?a Prof Ralf L?mmel, University of Koblenz-Landau Dr Elena Machkasova, University of Minnesota, Morris Prof Michel Mauny, Inria, Paris Dr Jeremy Singer, University of Glasgow Prof Simon Thompson, University of Kent (chair) Important dates Submissions of draft papers: 10 May, 2017 Notification: 17 May, 2017 Registration: 11 June, 2017 Workshop: 22 June 2017 Submission for formal review: 18 August, 2017 Notification of acceptance: 6 October, 2017 Camera ready paper: 3 November, 2017 Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@REDACTED | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt From roger@REDACTED Thu Feb 23 12:04:23 2017 From: roger@REDACTED (Roger Lipscombe) Date: Thu, 23 Feb 2017 11:04:23 +0000 Subject: [erlang-questions] Why avoid calling enif_make_atom? Message-ID: All of the NIF-using Erlang projects I've found seem to allocate their atoms during load. Some examples: - jiffy: https://github.com/davisp/jiffy/blob/master/c_src/jiffy.c - re2: https://github.com/tuncer/re2/blob/master/c_src/re2_nif.cpp#L180 I also found some skeleton NIF code, at https://github.com/davisp/nif-examples/blob/master/apps/termsend/c_src/termsend.c#L4, that checks enif_make_existing_atom first. I guess my question is: What's the harm in calling enif_make_atom whenever I need an atom term? Does it leak atoms? From essen@REDACTED Thu Feb 23 12:08:35 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Thu, 23 Feb 2017 12:08:35 +0100 Subject: [erlang-questions] Why avoid calling enif_make_atom? In-Reply-To: References: Message-ID: <4c7cbe8b-1611-8945-353a-1ff557a27caf@ninenines.eu> An example from OTP itself: https://github.com/erlang/otp/blob/master/erts/emulator/nifs/common/erl_tracer_nif.c#L54 I think it's more an optimization. Call the function only once on load and then use the static variables directly. On 02/23/2017 12:04 PM, Roger Lipscombe wrote: > All of the NIF-using Erlang projects I've found seem to allocate their > atoms during load. Some examples: > > - jiffy: https://github.com/davisp/jiffy/blob/master/c_src/jiffy.c > - re2: https://github.com/tuncer/re2/blob/master/c_src/re2_nif.cpp#L180 > > I also found some skeleton NIF code, at > https://github.com/davisp/nif-examples/blob/master/apps/termsend/c_src/termsend.c#L4, > that checks enif_make_existing_atom first. > > I guess my question is: > > What's the harm in calling enif_make_atom whenever I need an atom > term? Does it leak atoms? > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From schneider@REDACTED Thu Feb 23 14:15:11 2017 From: schneider@REDACTED (Schneider) Date: Thu, 23 Feb 2017 14:15:11 +0100 Subject: [erlang-questions] Observer vert slow Message-ID: <830311a0-9f6b-afb3-08b9-cb6ec85ec97e@xs4all.nl> Hi list, After starting observer, it takes a long time before the notebook panels get filled in and the menu's populated. I am talking tenths of seconds, up to a minute or so. Currently, I am using Erlang 19.2 (on Debian) but noticed the same behaviour in the 18.x versions before as well. It doesn't matter how I start the shell (with or without (short)names, from rebar3 or directly form bash.) Anybody also having this problem? Any suggestions where to start looking for the problem? - Frans From silviu.cpp@REDACTED Thu Feb 23 20:51:54 2017 From: silviu.cpp@REDACTED (Caragea Silviu) Date: Thu, 23 Feb 2017 21:51:54 +0200 Subject: [erlang-questions] term_to_binary for nifs? In-Reply-To: <30ffe8bf-e128-ac5e-b75a-d21d4d5fc451@ninenines.eu> References: <30ffe8bf-e128-ac5e-b75a-d21d4d5fc451@ninenines.eu> Message-ID: btw enif_term_to_binary and enif_binary_to_term are available starting with Erlang 19 I think. On Thu, Feb 23, 2017 at 11:52 AM, Lo?c Hoguin wrote: > Erm. enif_term_to_binary and enif_binary_to_term? > > > On 02/23/2017 06:57 AM, Benoit Chesneau wrote: > >> is thre any helper that allows to convert a term to biary and the >> reverse inside a nif (in C). Or should I use my own serialization format? >> >> - benoit >> >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > -- > Lo?c Hoguin > https://ninenines.eu > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hirotnkg@REDACTED Fri Feb 24 07:03:07 2017 From: hirotnkg@REDACTED (Yoshihiro Tanaka) Date: Thu, 23 Feb 2017 22:03:07 -0800 Subject: [erlang-questions] erl_syntax and bitstrings ? Message-ID: Hi, I encountered following case where erl_syntax:abstract/1 returns exception when given a bitstring: 4> erl_syntax:abstract(<<0:1>>). > ** exception error: bad argument: <<0:1>> > in function erl_syntax:abstract/1 (erl_syntax.erl, line 5951) Is this expected ? The document says: > Term must be a literal term, i.e., one that can be represented as a source > code literal. I guess <<0:1>> can be put in a source code. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkokich@REDACTED Fri Feb 24 06:09:49 2017 From: mkokich@REDACTED (Michael Kokich) Date: Fri, 24 Feb 2017 05:09:49 +0000 Subject: [erlang-questions] Question about per file compile options In-Reply-To: References: Message-ID: Hi all I've worked out how to do it and learnt some things along the way which I'll document for future travelers. The -compile module attribute is the correct place for per file compile options, however not for any custom values you want to supply. Unlike other module attributes, any values that are passed via -compile don't end up in the AST which was a surprise to me. E.g. my example -compile([ {parse_transform, lager_transform}, {lager_parse_transform_functions, [ {metadata_value, {module_name, function_name}} ]} ]). Got turned into: {attribute,3,compile,[]), If you use :module_info() on a module in which you've included the -compile options it also doesn't include the values. I'll assume that the options passed to parse_transform/2 come from the same source as the compile values in :module_info(). To apply these transforms per file I've set my own module attribute and as we're walking the AST merge the values into any globally supplied values as long as I set it before I start transforming the logging lines themselves. E.g -lager_parse_transform_functions([ {metadata_value, {module_name, function_name}} ]). Now everything works as expected and the tests pass! Michael ________________________________ From: erlang-questions-bounces@REDACTED on behalf of Michael Kokich Sent: Thursday, 23 February 2017 9:05 a.m. To: erlang-questions@REDACTED Subject: [erlang-questions] Question about per file compile options Hi everyone I'm hitting up against against how Erlang passes compile options to parse_transform and was wanting some guidance. I'm making changes to lager's parse_tranform and I'm making eunit tests to check these changes. The changes involve setting compile options to add extra metadata to logging calls, such as the example below. {erl_opts, [ {parse_transform, lager_transform}, {lager_function_transforms, [ {metadata_value, {module_name, function_name}} ]} ]}. One of these tests involves calls to a undefined Module:Function and I need to apply the transform only to the specific test file since this will break all the other tests. If I set lager_function_transforms in lager's rebar.config eunit_compile_opts it applies the transforms to all the tests with -compile([{parse_transform, lager_transform}]). If I supply these options to the -compile, they don't appear in the options provided to the parse_transform. -compile([ {parse_transform, lager_transform}, % If you don't supply this to the test file it won't transformed {lager_function_transforms, [ % But these options seem to be ignored {metadata_value, {module_name, function_name}} ]} ]). Is there a way a to compile these new tests with my specific settings without applying them globally, or having to compile them separately? Thank you Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From siraaj@REDACTED Fri Feb 24 18:18:54 2017 From: siraaj@REDACTED (Siraaj Khandkar) Date: Fri, 24 Feb 2017 12:18:54 -0500 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> Message-ID: On 2/20/17 11:26 PM, Jack Tang wrote: > We try to integrate the metrics to our grafana monitoring by adding > infuxdb consumer. Thanks Siraaj. The pleasure is all mine, Jack. Let me know if you have any problems/questions/ideas. > BTW: Did somebody collect the crash metrics, like the count of crashed > process, the restart count of the process and etc? I haven't come across it before, but it sounds like a great idea. Off the top of my head I can't think of a general and direct way to collect that without instrumenting a supervisor (either by patching stdlib or user app). Any ideas? The only thing that comes to mind right now is snapshotting PIDs at each collection and tracking the duration of each uptime, then we can compute whatever statistical summaries on current uptimes (e.g. if something starts to crash too-often/too-soon it'll reduce the expected/normal min, med, avg, etc.). There're certainly problems with this approach, since it'd be just an approximation, but it doesn't sound terribly unreasonable to me right now. More thoughts? > On Sat, Feb 11, 2017 at 2:01 AM, Siraaj Khandkar > wrote: > > My biased preference is: > > https://github.com/ibnfirnas/beam_stats > > > It's concern is only with sampling VM metrics and shipping them off > to arbitrary destinations (Folsomite was Graphite-only, the last > time I checked). Graphite and StatsD consumer modules are included. > StatsD is the one we use in prod now. > > It's been running in prod for 1.5 years now, and even though it > wasn't originally the main motivation, my favorite feature > turned-out to be the sampling of individual processes and ETS > tables, which was a life-saver in tracking down multiple memory > leaks in the legacy system I inherited. > > > > On 2/9/17 4:06 AM, Frank Muller wrote: > > Hi everyone, > > Does anyone succeeded to push VM metrics to Grafana > (http://grafana.org/). > > Here I'm looking for a simple integration with minimal > dependencies if > possible. > > Thank you. > /Frank > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > > -- > Jack Tang > > > http://www.linkedin.com/in/jacktang From carlsson.richard@REDACTED Fri Feb 24 22:42:43 2017 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Fri, 24 Feb 2017 22:42:43 +0100 Subject: [erlang-questions] erl_syntax and bitstrings ? In-Reply-To: References: Message-ID: This is a bug. The code was not updated when bitstrings were added, and crashes when it tries to run binary_to_list(Bin) on the given binary. Thanks for reporting it! /Richard 2017-02-24 7:03 GMT+01:00 Yoshihiro Tanaka : > Hi, I encountered following case where erl_syntax:abstract/1 returns > exception when given a bitstring: > > 4> erl_syntax:abstract(<<0:1>>). >> ** exception error: bad argument: <<0:1>> >> in function erl_syntax:abstract/1 (erl_syntax.erl, line 5951) > > > Is this expected ? The document says: > >> Term must be a literal term, i.e., one that can be represented as a >> source code literal. > > > I guess <<0:1>> can be put in a source code. > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From essen@REDACTED Sat Feb 25 00:20:58 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Sat, 25 Feb 2017 00:20:58 +0100 Subject: [erlang-questions] Common Test last test report Message-ID: <73d81ce9-ecbc-e823-36aa-e70d8a7366b3@ninenines.eu> Hello, It's still difficult to get to the last test report in Common Test. Currently the URI looks like this: file:///home/essen/ninenines/cowboy/logs/ct_run.ct_cowboy@REDACTED/ninenines.cowboy.rfc7540_SUITE.logs/run.2017-02-25_00.02.29/suite.log.html Which is great, I can always go back and compare, and sometimes that's what I want (when I test across Erlang releases, for example). But when I'm fixing a bug, I tend to run a small set of tests, maybe a single suite, or sometimes even just a single group or a single test case. When I do that, things becomes more difficult than they should be because I can't simply refresh the page to get the new report, I have to go back, refresh on the all_runs.html page, and follow the links from there. Would it be possible for Common Test to maintain a separate directory always containing the latest report? For example: file:///home/essen/ninenines/cowboy/logs/ct_run.ct_cowboy@REDACTED/ninenines.cowboy.rfc7540_SUITE.logs/run.latest/suite.log.html With a URI like this I can repeat the test run, refresh in my browser and get the new report instantly. (And keep the history separate should I need to compare.) Alternatively, have an option to disable the timestamps so I can just refresh when I need it, although the history wouldn't be preserved in this case. Cheers, -- Lo?c Hoguin https://ninenines.eu From david.g.wright@REDACTED Mon Feb 27 11:49:20 2017 From: david.g.wright@REDACTED (David Wright) Date: Mon, 27 Feb 2017 21:49:20 +1100 Subject: [erlang-questions] HTTPS and Basic Authentication with Erlang In-Reply-To: References: <206e85b8-8b20-dd72-3a86-a49c0db42922@khandkar.net> <3db6f656-a744-2c74-e2c7-b4c964e5b904@gmail.com> <91ca1c19-425d-0d11-4a8b-5a048b9de27f@gmail.com> <66b7dd05-0ada-fd32-c980-0701c36e9527@ninenines.eu> Message-ID: I installed cowboy on an Ubuntu VM and got the basics of what I was trying to prove done in a short matter of time. I used the examples directory from github and played with the code for a few hours. Cowboy seems well documented but as a newbie I am a bit overwhelmed - I reserve the right to ask more questions. Thank you for your help. On 16 February 2017 at 21:53, Lo?c Hoguin wrote: > On 02/16/2017 11:41 AM, Alex S. wrote: > >> To be fair, you both describe half of REST. Both interlinking *and* good >> cache/method behaviour (which most browsers don?t rely upon, precisely >> because WWW is not that RESTful) is required for a REST architecture. >> > > I only mentioned the parts that are not taken care of by simply using > HTTP. In other words the parts an implementor of a REST API/client should > be aware of (otherwise they're not doing REST). > > I am not sure what you mean about browsers. Browsers do rely on and > enforce cache rules. So do caching proxies. The Web wouldn't work without > that. > > It is also fair to say that most homegrown protocols do not benefit from >> hyperlinking, and weren?t made with REST in mind (and with vendor mime >> types) precisely because of that. >> > > There's no silver bullet. :-) > > > -- > Lo?c Hoguin > https://ninenines.eu > -- David Gray Wright -------------- next part -------------- An HTML attachment was scrubbed... URL: From vances@REDACTED Mon Feb 27 11:59:20 2017 From: vances@REDACTED (Vance Shipley) Date: Mon, 27 Feb 2017 16:29:20 +0530 Subject: [erlang-questions] MWC BoF? In-Reply-To: References: Message-ID: I'm in Barcelona for Mobile World Congress again this week. If any Erlangers are around and want to get together for beer and chat let me know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From botanyzh@REDACTED Mon Feb 27 14:13:39 2017 From: botanyzh@REDACTED (=?gb2312?B?1dQguro=?=) Date: Mon, 27 Feb 2017 13:13:39 +0000 Subject: [erlang-questions] How to use ecdh self-signed cert files in R19.2 ssl app Message-ID: Hi ! With so many search In vain, I can?t find the actual example through google , and I failed again and again with many procedures Only the ??. -nodes rsa:1024?. ? somelike self-sign set of cert files can be use in otp?s ssl node to node communication Below are the failed ones Procedure1 succeed but failed to use in otp?s ssl With aes256 encrypt generation First to generate key csr and crt Root CA some like below openssl genrsa -aes256 -out private/cakey.pem 1024 openssl req -new -key private/cakey.pem -out private/ca.csr -subj \ "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myname" openssl req -x509 -days 365 -sha1 -extensions v3_ca -signkey \ private/cakey.pem -in private/ca.csr -out certs/ca.cer sign the server-side openssl genrsa -aes256 -out private/server-key.pem 1024 openssl req -new -key private/server-key.pem -out private/server.csr -subj \ "/C=CN/ST=myprovince/L=mycity/O=myorganization/OU=mygroup/CN=myname" openssl req -x509 -days 365 -sha1 -extensions v3_req -CA certs/ca.cer -CAkey private/cakey.pem \ -CAserial ca.srl -CAcreateserial -in private/server.csr -out certs/server.cer Procedure2 succeed but failed to use in otp?s ssl Openssl config file some like (may not actully be) Openssl.cnf [ ca ] default_ca = CA_own [ CA_own ] certs = . new_certs_dir = ./db/certs database = ./db/index serial = ./db/serial RANDFILE = ./db/rand certificate = ./ca.cert.pem private_key = ./ca.key.pem default_days = 7300 default_crl_days = 30 default_md = sha1 preserve = no policy = policy_anything extensions = v3_ca [ policy_anything ] countryName = optional stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied emailAddress = optional [ req ] distinguished_name = req_distinguished_name attributes = req_attributes req_extensions = v3_req [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = US stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = New York localityName = Locality Name (eg, city) localityName_default = New York0 organizationName = Organization Name (eg, company) organizationName_default = Microsoft Corp. organizationalUnitName = Organizational Unit Name (eg, section) commonName = Common Name (eg, YOUR name) commonName_max = 64 emailAddress = Email Address emailAddress_max = 64 [ req_attributes ] challengePassword = A challenge password challengePassword_min = 4 challengePassword_max = 20 unstructuredName = An optional company name unstructuredName_default = Microsoft" [ v3_ca ] subjectKeyIdentifier=hash authorityKeyIdentifier=keyid:always, issuer basicConstraints = CA:true [ v3_req ] basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectAltName = @alt_names [alt_names] DNS.1 = rpslc_1@REDACTED DNS.2 = rpslc_2@REDACTED First to generate key csr and crt Root CA some like below openssl genrsa -out CA.key.pem 2048 openssl req -x509 -new -nodes -key ca.key.pem -days 365 -out ca.cert.pem openssl genpkey -genparam -algorithm EC -out ecdh.pem \ -pkeyopt ec_paramgen_curve:brainpoolP512r1 openssl req -nodes -new -newkey ec:ecdh.pem -keyout 1ecdh.key.pem -out 1ecdh.csr.pem sign openssl ca -in 1ecdh.csr.pem -out 1ecdh.crt.pem -config $CONF_FILE and finally I get 8 files for 2 nodes to connect each other ca.cert.pem ecdh.pem 1ecdh.key.pem 1ecdh.csr.pem 1ecdh.crt.pem 2ecdh.key.pem 2ecdh.csr.pem 2ecdh.crt.pem baseOptions from app gen_rpc -define(SSL_DEFAULT_COMMON_OPTS, [binary, {packet,0}, {header,0}, {exit_on_close,true}, {nodelay,true}, % Send our requests immediately {send_timeout_close,true}, % When the socket times out, close the connection {delay_send,false}, % Scheduler should favor timely delivery {linger,{true,2}}, % Allow the socket to flush outgoing data for 2" before closing it - useful for casts {reuseaddr,true}, % Reuse local port numbers {keepalive,true}, % Keep our channel open {tos,72}, % Deliver immediately {active,false}, %% SSL options {ciphers,["ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384", "ECDHE-ECDSA-AES256-SHA384","ECDHE-RSA-AES256-SHA384","ECDHE-ECDSA-DES-CBC3-SHA", "ECDH-ECDSA-AES256-GCM-SHA384","ECDH-RSA-AES256-GCM-SHA384","ECDH-ECDSA-AES256-SHA384", "ECDH-RSA-AES256-SHA384","DHE-DSS-AES256-GCM-SHA384","DHE-DSS-AES256-SHA256", "AES256-GCM-SHA384","AES256-SHA256","ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES128-SHA256","ECDHE-RSA-AES128-SHA256", "ECDH-ECDSA-AES128-GCM-SHA256","ECDH-RSA-AES128-GCM-SHA256","ECDH-ECDSA-AES128-SHA256", "ECDH-RSA-AES128-SHA256","DHE-DSS-AES128-GCM-SHA256","DHE-DSS-AES128-SHA256","AES128-GCM-SHA256", "AES128-SHA256","ECDHE-ECDSA-AES256-SHA","ECDHE-RSA-AES256-SHA","DHE-DSS-AES256-SHA", "ECDH-ECDSA-AES256-SHA","ECDH-RSA-AES256-SHA","AES256-SHA","ECDHE-ECDSA-AES128-SHA", "ECDHE-RSA-AES128-SHA","DHE-DSS-AES128-SHA","ECDH-ECDSA-AES128-SHA","ECDH-RSA-AES128-SHA","AES128-SHA"]}, {secure_renegotiate,true}, {reuse_sessions,true}, {versions,['tlsv1.2','tlsv1.1']}, {verify,verify_peer}, {hibernate_after,600000}, {active,false}]). -define(SSL_DEFAULT_SERVER_OPTS, [{fail_if_no_peer_cert,true}, {log_alert,false}, {honor_cipher_order,true}, {client_renegotiation,true}]). -define(SSL_DEFAULT_CLIENT_OPTS, [{server_name_indication,disable}, {depth,99}]). And extra options ssl_client_options: [ certfile: certfile, keyfile: keyfile, cacertfile: './priv/ssl/ca.cert.pem', eccs: [:brainpoolP512r1] ], ssl_server_options: [ certfile: certfile, keyfile: keyfile, cacertfile: './priv/ssl/ca.cert.pem', eccs: [:brainpoolP512r1] ], The two node are both in one centos system And when I try to ssl:connect/4 , i get such error below: ? tls_connection.erl:704:Fatal error: handshake failure - malformed_handshake_data?; {tls_alert,"handshake failure"}; And when I try to openssl s_client with error below: openssl s_client -connect 192.168.212.173:5370 -cert 2.crt.pem -key 2.key.pem -CAfile ca.cert.pem -cipher ECDH-RSA-AES256-GCM-SHA384 -debug CONNECTED(00000003) depth=1 C = CN, ST = cq, L = cq, O = s, OU = p, CN = botanyzh, emailAddress = botanyzh@REDACTED verify return:1 depth=0 C = US, ST = Uniden, L = 00abcdef1234, O = sprt, OU = potato, CN = rpslc_1@REDACTED, emailAddress = botanyzh@REDACTED verify return:1 140467656820416:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:s3_pkt.c:1493:SSL alert number 40 140467656820416:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177: With extra ?-debug? write to 0x159aa30 [0x15acb00] (6 bytes => -1 (0xFFFFFFFFFFFFFFFF)) write:errno=32 Please help me about the ssl?s source the ecdh cert seems is not usable for otp's ssl when i debuged i found that the ssl_connection:handle_peer_cert_key/5 call to public_key :generate_key/1 can never match the public_key's interface is generate_key(#'DHParameter'{prime = P, base = G}) -> crypto:generate_key(dh, [P, G]); generate_key({namedCurve, _} = Params) -> ec_generate_key(Params); generate_key(#'ECParameters'{} = Params) -> ec_generate_key(Params). but the arg called is {ecParameters, 'ECParameters'{} = Params} ??? Windows 10 ????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang@REDACTED Tue Feb 28 17:14:58 2017 From: erlang@REDACTED (Joe Armstrong) Date: Tue, 28 Feb 2017 17:14:58 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server Message-ID: Hello, I was considering setting up a dedicated Erlang VPS for a small web site with a few simple Erlang applications. I was looking at the various hosting packages - and have to choose the amount of memory I need - any ideas how much resident memory I need to run a smallish server. I guess all I need is an OS + Erlang - what is a suitable choice of OS? - Do i really need GBytes of memory - it sounds a lot to me. Any advice on VPS providers? Cheers /Joe From mark.geib.44@REDACTED Tue Feb 28 17:24:51 2017 From: mark.geib.44@REDACTED (Mark Geib) Date: Tue, 28 Feb 2017 09:24:51 -0700 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: <2FAD1C45-ED1F-4838-966D-2986FDEB9916@gmail.com> For linux based servers I recommend Digital Ocean. I have used them for 2 years now, very easy and prices seem good. Mark. > On Feb 28, 2017, at 9:14 AM, Joe Armstrong wrote: > > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP URL: From dmytro.lytovchenko@REDACTED Tue Feb 28 17:26:38 2017 From: dmytro.lytovchenko@REDACTED (Dmytro Lytovchenko) Date: Tue, 28 Feb 2017 17:26:38 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: Erlang shell with a simple few module app feels comfortable on a 32-bit machine with 64MB memory, probably 32MB will be just as fine. So a 512Mb server which is the cheapest on many VDS hostings, will be far more than enough. 2017-02-28 17:14 GMT+01:00 Joe Armstrong : > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From donpedrothird@REDACTED Tue Feb 28 17:28:46 2017 From: donpedrothird@REDACTED (John Doe) Date: Tue, 28 Feb 2017 19:28:46 +0300 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: 512Mb RAM ($5/month or less) is enough to process a few million hits/day if you don't have a lot of data in the database. I recommend DigitalOcean and OVH vps' to my customers. OS - debian/centos/ubuntu, does not matter much. One caveat: assuming you use cowboy, you can't process all these hits in the context of webserver processes, because by default there are too many of them. You'll need a dedicated pool of 20-100 processes which will do all the heavy logic. Also I'd recommend to run gc:collect for all processes every 3-4 minutes, this would help to purge large binaries and won't slow down the system too much. 2017-02-28 19:14 GMT+03:00 Joe Armstrong : > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.boaventura@REDACTED Tue Feb 28 18:06:47 2017 From: michel.boaventura@REDACTED (Michel Boaventura) Date: Tue, 28 Feb 2017 14:06:47 -0300 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: I've been using Linode for the past 5 years and never had a problem. Its smaller plan costs $5 for a VM with 1GB of RAM and if you pay extra $2 you can have a backup add-on with 4 different slots (daily, 7 days, 14 days and a custom one). My brother-in-law had an awful experience with Digital Ocean. The physical disk on which his VM was stored had a problem and he lost all of his data. The solution given by Digital Ocean was to give him a new (empty) VM. On 28 February 2017 at 13:28, John Doe wrote: > 512Mb RAM ($5/month or less) is enough to process a few million hits/day if > you don't have a lot of data in the database. I recommend DigitalOcean and > OVH vps' to my customers. OS - debian/centos/ubuntu, does not matter much. > One caveat: assuming you use cowboy, you can't process all these hits in the > context of webserver processes, because by default there are too many of > them. You'll need a dedicated pool of 20-100 processes which will do all the > heavy logic. Also I'd recommend to run gc:collect for all processes every > 3-4 minutes, this would help to purge large binaries and won't slow down the > system too much. > > > > 2017-02-28 19:14 GMT+03:00 Joe Armstrong : >> >> Hello, >> >> I was considering setting up a dedicated Erlang VPS for a small web >> site with a few simple Erlang applications. >> >> I was looking at the various hosting packages - and have to choose >> the amount of memory I need - any ideas how much resident memory I >> need to run a smallish server. >> >> I guess all I need is an OS + Erlang - what is a suitable choice of >> OS? - Do i really need GBytes of memory - it sounds a lot to me. >> >> Any advice on VPS providers? >> >> Cheers >> >> /Joe >> _______________________________________________ >> 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 > -- Michel Almada de Castro Boaventura Analista de Sistemas Laborat?rio de Software Livre - LSL From essen@REDACTED Tue Feb 28 18:22:31 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Tue, 28 Feb 2017 18:22:31 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: <2b93cecc-47d4-e8f6-4fb0-80950360d0ce@ninenines.eu> You can get cheap dedicated servers (physical, not virtual!) at kimsufi.com (OVH' cheapest lineup). The cheapest ones tend to be in short supply but if you're patient enough to refresh the page early in the day you can usually get one of the 5?/month ones. No opinion on their VPS/cloud offerings, I don't see the point in that if physical hardware is that cheap. I personally have two of those, one of the cheapest, and one that is currently not available anymore with 8GB of memory and a 2TB disk. I run Arch Linux on them, same as my laptop. On 02/28/2017 05:14 PM, Joe Armstrong wrote: > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu From hachreak@REDACTED Tue Feb 28 17:59:57 2017 From: hachreak@REDACTED (Leo) Date: Tue, 28 Feb 2017 17:59:57 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: 2017-02-28 17:14 GMT+01:00 Joe Armstrong : > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > I have some servers that are running a docker-compose that contains 3 erlang applications (complete release in 3 different containers) + mongo. (I know... probably it's overkill XD) But with all this applications, 1gb of ram looks good enough for "normal" usage. Leo > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > > Any advice on VPS providers? > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hachreak@REDACTED Tue Feb 28 18:04:23 2017 From: hachreak@REDACTED (Leo) Date: Tue, 28 Feb 2017 18:04:23 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: 2017-02-28 17:14 GMT+01:00 Joe Armstrong : > Hello, > > I was considering setting up a dedicated Erlang VPS for a small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to choose > the amount of memory I need - any ideas how much resident memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > Maybe you can find some advice here: https://deploystack.io/ Leo > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -------------- next part -------------- An HTML attachment was scrubbed... URL: From silviu.cpp@REDACTED Tue Feb 28 21:20:25 2017 From: silviu.cpp@REDACTED (Caragea Silviu) Date: Tue, 28 Feb 2017 22:20:25 +0200 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: Most probably the cheapest solution: https://contabo.com/?show=vps 7 euro/month for 6 GB and 2 cores Silviu On Tue, Feb 28, 2017 at 7:04 PM, Leo wrote: > > > 2017-02-28 17:14 GMT+01:00 Joe Armstrong : > >> Hello, >> >> I was considering setting up a dedicated Erlang VPS for a small web >> site with a few simple Erlang applications. >> >> I was looking at the various hosting packages - and have to choose >> the amount of memory I need - any ideas how much resident memory I >> need to run a smallish server. >> >> I guess all I need is an OS + Erlang - what is a suitable choice of >> OS? - Do i really need GBytes of memory - it sounds a lot to me. >> >> Any advice on VPS providers? >> > > Maybe you can find some advice here: https://deploystack.io/ > > Leo > > > > >> >> Cheers >> >> /Joe >> _______________________________________________ >> 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 anthonym@REDACTED Tue Feb 28 21:43:59 2017 From: anthonym@REDACTED (Anthony Molinaro) Date: Tue, 28 Feb 2017 12:43:59 -0800 Subject: [erlang-questions] Send VM metrics to Grafana In-Reply-To: References: <9d68c485-d56c-5da3-c27f-a56d76ea8b98@khandkar.net> Message-ID: I haven't done it, but isn't there a gen_event behind the error_logger you can somehow tap into to collect this? -Anthony > On Feb 24, 2017, at 9:18 AM, Siraaj Khandkar wrote: > >> On 2/20/17 11:26 PM, Jack Tang wrote: >> We try to integrate the metrics to our grafana monitoring by adding >> infuxdb consumer. Thanks Siraaj. > > The pleasure is all mine, Jack. Let me know if you have any problems/questions/ideas. > >> BTW: Did somebody collect the crash metrics, like the count of crashed >> process, the restart count of the process and etc? > > I haven't come across it before, but it sounds like a great idea. > > Off the top of my head I can't think of a general and direct way to collect that without instrumenting a supervisor (either by patching stdlib or user app). > > Any ideas? > > The only thing that comes to mind right now is snapshotting PIDs at each collection and tracking the duration of each uptime, then we can compute whatever statistical summaries on current uptimes (e.g. if something starts to crash too-often/too-soon it'll reduce the expected/normal min, med, avg, etc.). There're certainly problems with this approach, since it'd be just an approximation, but it doesn't sound terribly unreasonable to me right now. > > More thoughts? > > >> On Sat, Feb 11, 2017 at 2:01 AM, Siraaj Khandkar > > wrote: >> >> My biased preference is: >> >> https://github.com/ibnfirnas/beam_stats >> >> >> It's concern is only with sampling VM metrics and shipping them off >> to arbitrary destinations (Folsomite was Graphite-only, the last >> time I checked). Graphite and StatsD consumer modules are included. >> StatsD is the one we use in prod now. >> >> It's been running in prod for 1.5 years now, and even though it >> wasn't originally the main motivation, my favorite feature >> turned-out to be the sampling of individual processes and ETS >> tables, which was a life-saver in tracking down multiple memory >> leaks in the legacy system I inherited. >> >> >> >> On 2/9/17 4:06 AM, Frank Muller wrote: >> >> Hi everyone, >> >> Does anyone succeeded to push VM metrics to Grafana >> (http://grafana.org/). >> >> Here I'm looking for a simple integration with minimal >> dependencies if >> possible. >> >> Thank you. >> /Frank >> >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> >> >> >> -- >> Jack Tang >> >> >> http://www.linkedin.com/in/jacktang > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions From eric.des.courtis@REDACTED Tue Feb 28 23:29:05 2017 From: eric.des.courtis@REDACTED (Eric des Courtis) Date: Tue, 28 Feb 2017 17:29:05 -0500 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: In my experience cheap VPS services tend to be flaky. Amazon offers EC2 instance for free for one year. I doubt you can get a more reliable setup for the price. https://aws.amazon.com/s/dm/optimization/server-side-test/free-tier/free_np/ Eric On Tue, Feb 28, 2017 at 3:20 PM, Caragea Silviu wrote: > Most probably the cheapest solution: https://contabo.com/?show=vps 7 > euro/month for 6 GB and 2 cores > Silviu > > On Tue, Feb 28, 2017 at 7:04 PM, Leo wrote: > >> >> >> 2017-02-28 17:14 GMT+01:00 Joe Armstrong : >> >>> Hello, >>> >>> I was considering setting up a dedicated Erlang VPS for a small web >>> site with a few simple Erlang applications. >>> >>> I was looking at the various hosting packages - and have to choose >>> the amount of memory I need - any ideas how much resident memory I >>> need to run a smallish server. >>> >>> I guess all I need is an OS + Erlang - what is a suitable choice of >>> OS? - Do i really need GBytes of memory - it sounds a lot to me. >>> >>> Any advice on VPS providers? >>> >> >> Maybe you can find some advice here: https://deploystack.io/ >> >> Leo >> >> >> >> >>> >>> Cheers >>> >>> /Joe >>> _______________________________________________ >>> 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 essen@REDACTED Tue Feb 28 23:30:48 2017 From: essen@REDACTED (=?UTF-8?Q?Lo=c3=afc_Hoguin?=) Date: Tue, 28 Feb 2017 23:30:48 +0100 Subject: [erlang-questions] setting up a VPS for dedicated erlang server In-Reply-To: References: Message-ID: Great timing. :-) On 02/28/2017 11:29 PM, Eric des Courtis wrote: > In my experience cheap VPS services tend to be flaky. Amazon offers EC2 > instance for free for one year. I doubt you can get a more reliable > setup for the price. > > https://aws.amazon.com/s/dm/optimization/server-side-test/free-tier/free_np/ > > Eric > > > > On Tue, Feb 28, 2017 at 3:20 PM, Caragea Silviu > wrote: > > Most probably the cheapest solution: https://contabo.com/?show=vps 7 > euro/month for 6 GB and 2 cores > Silviu > > On Tue, Feb 28, 2017 at 7:04 PM, Leo > wrote: > > > > 2017-02-28 17:14 GMT+01:00 Joe Armstrong >: > > Hello, > > I was considering setting up a dedicated Erlang VPS for a > small web > site with a few simple Erlang applications. > > I was looking at the various hosting packages - and have to > choose > the amount of memory I need - any ideas how much resident > memory I > need to run a smallish server. > > I guess all I need is an OS + Erlang - what is a suitable > choice of > OS? - Do i really need GBytes of memory - it sounds a lot to me. > > Any advice on VPS providers? > > > Maybe you can find some advice here: https://deploystack.io/ > > Leo > > > > > > Cheers > > /Joe > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > > > > > > _______________________________________________ > erlang-questions mailing list > erlang-questions@REDACTED > http://erlang.org/mailman/listinfo/erlang-questions > -- Lo?c Hoguin https://ninenines.eu