# \#standard-library

**URL:** https://forum.elixirforum.com/tag/standard-library/792.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Future of Logger in Elixir](https://forum.elixirforum.com/t/future-of-logger-in-elixir/22581)

<div class="topic-metadata">

**Author:** [@hauleth](https://forum.elixirforum.com/u/hauleth)\
**Replies:** 23\
**Last updated:** [May 28, 2025, 4:30pm UTC](https://forum.elixirforum.com/t/future-of-logger-in-elixir/22581 "2025-05-28T16:30:12Z")

</div>

With OTP 21 and the creation of logger Elixir Logger application became quite limiting (no structured logging). I would like to discuss with how do you see the future of logging in Elixir as I have rewritten most of the …

---

## [\`Enum.map\_every/3\` but with start offset](https://forum.elixirforum.com/t/enum-map-every-3-but-with-start-offset/35904)

<div class="topic-metadata">

**Author:** [@mackeyja92](https://forum.elixirforum.com/u/mackeyja92)\
**Replies:** 6\
**Last updated:** [December 8, 2024, 6:19pm UTC](https://forum.elixirforum.com/t/enum-map-every-3-but-with-start-offset/35904 "2024-12-08T18:19:21Z")

</div>

There is sometimes cases where you want to map every nth item starting on the nth item. Eg map every 2nd item starting on the 2nd one. Currently the map\_every/3 always gives back the first item in the enumerable and then…

---

## [Calling \`System.cmd\` in such a way that stdin and stdout are connected, and they halt together](https://forum.elixirforum.com/t/calling-system-cmd-in-such-a-way-that-stdin-and-stdout-are-connected-and-they-halt-together/66526)

<div class="topic-metadata">

**Author:** [@zachdaniel](https://forum.elixirforum.com/u/zachdaniel)\
**Replies:** 8\
**Last updated:** [October 7, 2024, 7:41pm UTC](https://forum.elixirforum.com/t/calling-system-cmd-in-such-a-way-that-stdin-and-stdout-are-connected-and-they-halt-together/66526 "2024-10-07T19:41:01Z")

</div>

Hey everyone! One of my mix tasks needs to use System.cmd. It is technically calling another mix task, but Mix.Task.run is not on the table (for a whole bunch of reasons that I don’t think are worth getting into right n…

---

## [Working on lib\_elixir - Elixir core modules as a library](https://forum.elixirforum.com/t/working-on-lib-elixir-elixir-core-modules-as-a-library/65316)

<div class="topic-metadata">

**Author:** [@zachallaun](https://forum.elixirforum.com/u/zachallaun)\
**Replies:** 23\
**Last updated:** [August 16, 2024, 3:30pm UTC](https://forum.elixirforum.com/t/working-on-lib-elixir-elixir-core-modules-as-a-library/65316 "2024-08-16T15:30:29Z")

</div>

Note: There are a few folks I’d really love to hear from, time permitting. Pinging in case the title isn’t catchy enough :slight\_smile: @dorgan @scohen @scottming @mhanberg @lukaszsamson @zachdaniel Proof-of-concept on …

---

## [std\_result - A way to standardize function returns](https://forum.elixirforum.com/t/std-result-a-way-to-standardize-function-returns/61719)

<div class="topic-metadata">

**Author:** [@ImNotAVirus](https://forum.elixirforum.com/u/ImNotAVirus)\
**Replies:** 35\
**Last updated:** [February 25, 2024, 7:12am UTC](https://forum.elixirforum.com/t/std-result-a-way-to-standardize-function-returns/61719 "2024-02-25T07:12:28Z")

</div>

Hi everyone, Published a new library: StdResult! StdResult is a library designed to standardize function returns. Highly inspired by Rust’s std::result, this library provides a way of simplifying the management of :ok …

---

## [Stream API/specs: File.stream! vs IO.stream](https://forum.elixirforum.com/t/stream-api-specs-file-stream-vs-io-stream/60425)

<div class="topic-metadata">

**Author:** [@tfwright](https://forum.elixirforum.com/u/tfwright)\
**Replies:** 2\
**Last updated:** [December 17, 2023, 8:13pm UTC](https://forum.elixirforum.com/t/stream-api-specs-file-stream-vs-io-stream/60425 "2023-12-17T20:13:53Z")

</div>

Posting this in discussions because it’s more of an open question about API design/conventions, but while looking through the documentation around streams, I found myself wondering why File includes a stream! function wh…

---

## [Why does String.to\_integer/1 give strange results with with some values?](https://forum.elixirforum.com/t/why-does-string-to-integer-1-give-strange-results-with-with-some-values/60236)

<div class="topic-metadata">

**Author:** [@elbasti](https://forum.elixirforum.com/u/elbasti)\
**Replies:** 19\
**Last updated:** [December 9, 2023, 6:43pm UTC](https://forum.elixirforum.com/t/why-does-string-to-integer-1-give-strange-results-with-with-some-values/60236 "2023-12-09T18:43:08Z")

</div>

Hi folks, I’ve been running into some very strange behavior that has me knocking my head against the wall. If I run the following code: \["42", "12", "15"\] |\> Enum.map(&(String.to\_integer(&1))) I get what you’d expect:…

---

## [Why are sigils only possible with single character names?](https://forum.elixirforum.com/t/why-are-sigils-only-possible-with-single-character-names/43453)

<div class="topic-metadata">

**Author:** [@wolf4earth](https://forum.elixirforum.com/u/wolf4earth)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 5:58pm UTC](https://forum.elixirforum.com/t/why-are-sigils-only-possible-with-single-character-names/43453 "2023-03-15T17:58:07Z")

</div>

As the title suggests, I wonder what the reasoning is behind only allowing “single character sigils”. The thought came to me while looking at the documentation of the ~U sigil for UTC DateTimes and I thought that this w…

---

## [Why does Logger.Translator ignore gen\_statem reports?](https://forum.elixirforum.com/t/why-does-logger-translator-ignore-gen-statem-reports/37418)

<div class="topic-metadata">

**Author:** [@al2o3cr](https://forum.elixirforum.com/u/al2o3cr)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 9:41am UTC](https://forum.elixirforum.com/t/why-does-logger-translator-ignore-gen-statem-reports/37418 "2021-07-13T09:41:13Z")

</div>

There is code in Logger.Translator to turn termination reports from gen\_server and gen\_event into formatted messages with crash\_report metadata. https://github.com/elixir-lang/elixir/blob/d30c5c0185607f08797441ab8af1263…

---

## [Can a library find all modules implementing a Behaviour?](https://forum.elixirforum.com/t/can-a-library-find-all-modules-implementing-a-behaviour/34164)

<div class="topic-metadata">

**Author:** [@lawik](https://forum.elixirforum.com/u/lawik)\
**Replies:** 3\
**Last updated:** [September 4, 2020, 9:05am UTC](https://forum.elixirforum.com/t/can-a-library-find-all-modules-implementing-a-behaviour/34164 "2020-09-04T09:05:56Z")

</div>

I have a library that wants to find all modules for a given behaviour. I found some description that showed how to do this off of :code.all\_loaded() which was neat. Then I moved the library out of the application it was …

---

## [How to tell if file is being executed directly](https://forum.elixirforum.com/t/how-to-tell-if-file-is-being-executed-directly/32043)

<div class="topic-metadata">

**Author:** [@kevinlang](https://forum.elixirforum.com/u/kevinlang)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 6:01am UTC](https://forum.elixirforum.com/t/how-to-tell-if-file-is-being-executed-directly/32043 "2020-06-03T06:01:37Z")

</div>

Let’s say I have a file, foo.exs with the following contents: defmodule Foo do def bar do "foobar" end end IO.puts(Foo.bar()) What I would like to do is not run the IO.puts statement if the file is not being r…

---

## [Enumerable for function(2)](https://forum.elixirforum.com/t/enumerable-for-function-2/29573)

<div class="topic-metadata">

**Author:** [@arikai](https://forum.elixirforum.com/u/arikai)\
**Replies:** 18\
**Last updated:** [March 11, 2020, 7:12am UTC](https://forum.elixirforum.com/t/enumerable-for-function-2/29573 "2020-03-11T07:12:11Z")

</div>

In the recent EEF SWG it was pointed out that function(2) has support for Enumerable protocol. While it’s obvious that “the vulnerability” can be exploited the same way with the Streams, what is still curious to me is t…

---

## [Getting stdio process ID](https://forum.elixirforum.com/t/getting-stdio-process-id/25317)

<div class="topic-metadata">

**Author:** [@edwinallenz](https://forum.elixirforum.com/u/edwinallenz)\
**Replies:** 8\
**Last updated:** [September 22, 2019, 8:24pm UTC](https://forum.elixirforum.com/t/getting-stdio-process-id/25317 "2019-09-22T20:24:31Z")

</div>

Inside IEx when I run Process.whereis(:standard\_error) I got the PID, but not when I run Process.whereis(:standard\_io) . Who knows why should this happen and how to get the PID from : stdio ?

---

## [Standard library suggested addition](https://forum.elixirforum.com/t/standard-library-suggested-addition/22577)

<div class="topic-metadata">

**Author:** [@decasm](https://forum.elixirforum.com/u/decasm)\
**Replies:** 5\
**Last updated:** [May 21, 2019, 7:04pm UTC](https://forum.elixirforum.com/t/standard-library-suggested-addition/22577 "2019-05-21T19:04:04Z")

</div>

Hi, still pretty new to Elixir. Is there a library equivalent of this? I’ve look but I haven’t found anything that looks right, but I want to make sure before I write a library to do it. It seems pretty general so I just…

---

## [Merging URI query strings](https://forum.elixirforum.com/t/merging-uri-query-strings/14904)

<div class="topic-metadata">

**Author:** [@camcaine](https://forum.elixirforum.com/u/camcaine)\
**Replies:** 3\
**Last updated:** [June 28, 2018, 6:25pm UTC](https://forum.elixirforum.com/t/merging-uri-query-strings/14904 "2018-06-28T18:25:29Z")

</div>

URI.merge/2 overwrites the query field. I’m assuming this is by design/spec? Right now I’m appending query params like so: Map.update(uri, :query, nil, fn q when is\_binary(q) -\> q \<\> "&" \<\> URI.encode\_query(params)…

---

## [Should Calendar types and timezones be part of Elixir standard library?](https://forum.elixirforum.com/t/should-calendar-types-and-timezones-be-part-of-elixir-standard-library/14777)

<div class="topic-metadata">

**Author:** [@cdegroot](https://forum.elixirforum.com/u/cdegroot)\
**Replies:** 5\
**Last updated:** [June 20, 2018, 5:26pm UTC](https://forum.elixirforum.com/t/should-calendar-types-and-timezones-be-part-of-elixir-standard-library/14777 "2018-06-20T17:26:22Z")

</div>

What’s the reason to include this in core? One of the things I like about Elixir’s standard library is its small surface area. It keeps it nimble, simple to understand, and usually I use pretty much all of it in any proj…
