HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
elixir-plug
plug
Elixir2014–2023
elixir-plug / plug

plug

Compose web applications with functions

13Distinct people
14Mentions
0Explicit recommenders
3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Compose web applications with functions

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year14 dated mentions

Observed mentions: 2014-08-17 11:31:33 UTC to 2023-08-03 20:58:24 UTC.

012342014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC404
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC303
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

14 sources
Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces. I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust. 1. https://github.com/rack/rack 2. http://expressjs.com/en/guide/writing-middleware.html 3. https://github.com/elixir-plug/plug
In Request Coalescing in Async Rust
We use REST for both internal and external calls to services (a mistake, in my opinion) and while Erlang actually has frameworks for this, none of them are good and cowboy_rest requires lots of boilerplate. Doing it with Phoenix would cut out lots of entire modules and replace them with functions without paying any real cost. I like Erlang, but there's no upside to using it instead of something else that runs on the BEAM, apart from making a basic library that you want to use both from Erlang and Elixir (I don't know what the situation for compiling Elixir with rebar3 is). Effectively, Erlang is to Elixir what Java is to Kotlin, except there are even less performance differences and no compatibility issues. It makes perfect sense to learn Erlang syntax and learning the semantics of it will mean you've learned BEAM semantics, but you might
Read the rest
as well do that in Elixir and actually have a better road to it. Edit: I'd like to add that I find a general lack of tools for dealing with boilerplate in Erlang. It also has a generally outdated functional programming skew in that it doesn't at all facilitate pipelining and this makes it less attractive to make nice abstractions like Plug(0), for example. This is exacerbated by the fact that collections aren't abstracted over, so whenever you end up dealing with them there's lots of sighing and docs checking to see what the argument order was the week they designed that particular module and that particular function in that particular collection module. 0 - https://github.com/elixir-plug/plug
In Joy of Elixir
Read the blog post and then the thread, and was really starting to get excited at the prospect of using elixir. Then i wondered what was the pace of adopting new technologies in elixir, and found this thread about http2 support (which started to gain adoption last year, and increase peroformances a lot) https://github.com/elixir-lang/plug/issues/258 So, for a language that's primarely based around webserver, i find it really woorying that http2 support wasn't a primary concern, and depends on donation to a third party developper... I guess it means the language is still young and so is the ecosystem.
In Why the Elixir language has great potential
Controllers are the normal "C" inside MVC. That stuff that talks to your Models and passes it to the view / template layer. Plug [0] on the other hand is something like "rack" in the ruby world, a "A specification for composable modules between web applications". Phoenix is built on plug. I think very simple you could say that plugs are pipes or similar to middlewares - functions that take the connection, transform it or do some checks based on something, then pass it to the next plug. Like a pipe full of functions. Because phoenix is built on it, it is very easy to specify custom plugs and add them to your request / transform pipeline. Someone correct me if I explained that wrong. [0]: https://github.com/elixir-lang/plug
In Beyond 10,000 Lines: Lessons Learned from a Large Phoenix Project
Thanks! > I'd be interested in your perspective on the current state of the elixir web framework scene and where you think it's going. One of my goals from the start was to rally around Plug (https://github.com/elixir-lang/plug), which is our webserver abstraction and middleware lib (somewhat like Rack from Ruby, or Ring from Clojure). With Phoenix, Plug is core to the framework and we don't hide it like Rails does with Rack. So in Phoenix, Endpoints, Routers, and Controllers are Just Plugs. This makes things less magical, simplifies the request lifecycle, but most importantly it allows easy interop with community libraries. So plugs released for framework X, phoenix, or "pure plug" usecases will just work across all codebases. So the for "elixir web framework scene" I see a vibrant community around not only Phoenix, but Plug in general a
Read the rest
nd other libs built on top of it. > Specifically, how would you compare Phoenix and N2O I have no direct experience with n20, but some of our realtime goals overlap and they have done really great work. We use their filesystem watching lib for our live-reload feature. We don't go to the level of writing html abstractions not the server to push updates over, but it's a really neat idea that I would like to explore doing over Phoenix channels after 1.0 is out. If you see my work on Sync, a gem for realtime rails partials, I explored things around these ideas. > Would you say the perception is correct that Phoenix is going very much into the direction of Ruby on Rails? (Generators, you and Jose are rails contributors, etc.) To be clear, I'm not a Rails contributor, but I have done Ruby/Rails professionally for 6 years or so. It depends what you mean by "direction". Rails set the bar for productivity and onboarding out of the box, so we aim to go this direction in spririt, but we aren't out to match feature to feature. We are also taking a more explicit approach (thanks to FP). I would say our goals for bootstrapping productive apps quickly with fast iteration is where we match Rails, but we are ready to take on the world out of the gate perf wise. Phoenix is also deviating on a the traditional "web framework" notion. Browsers aren't going anywhere, but we should have a framework that can hold persistent connection and broker messages across connected devices; many coming over browsers, but iOS, Andoid, et al as well. That's where the world is heading and where Phoenix aims to excel. So we should be great at the standard server rendered html, form builders, etc, but we're trying to take it to the next level with channels. > ... I haven't run into any blockers to using phoenix just feel like I'm fighting it sometimes.) I can't help if we don't have specific code examples. I always tell people we aim for the common 80% usecase that we all share. Special use-cases will always require deviations from any framework. Since our http stack is "just plugs" you should be able to easily get the best of both worlds with your needs while still using phoenix. Find me on IRC with some gists and we can see about making it work well :)
In ElixirConfEU Keynote – Phoenix Takes Flight [video]
Curiosity: is that a concern only with routes? Or would you also like to have a explicit control of which middleware you are using too? Because if the latter, it feels like a web framework isn't for you. But you should definitely consider Plug (http://github.com/elixir-lang/plug), which has all the pieces and you just need to put them together (a simple router, a bunch of "middleware", etc).
In Phoenix – Elixir Web Framework
I agree that's a matter of opinions but I think that the OP has a point. JavaScript is easy to understand for everybody coming from C, Java or PHP even if its core is very different from those two languages. Haskell might be cleaner but it's difficult to get for people that used only procedural languages, which are most of the programmers working today (especially if the expected domain for PureScript is web programming, frontend or backend). There is a functional language called Elixir which runs on the Erlang virtual machine. Elixir has been designed to look like Ruby even if it's very different. That makes Ruby programmers (and maybe Python ones too) feel at ease in their first approaches with the language. When you realize how different the two languages really are you already grokked enough of Elixir to keep you going. There isn't th
Read the rest
at feeling of "oh my, I can't make it" one might have when looking at code like this http://svn.openfoundry.org/pugs/src/Pugs/Eval.hs when knowing only about C/Java/PHP/Python/Ruby Anybody knowing Ruby or possibly Python should compare that with this https://github.com/elixir-lang/plug/blob/master/lib/plug/con... So, my take is that if a language designer wants to create a functional language that will lure really many procedural programmers into it, s/he has to design something that looks like C or Java. PureScript is too much like Haskell (plus I hate indentation-sensitiveness, but that's almost only a subjective matter). Time will tell.
In PureScript: a statically typed language which compiles to JavaScript
We had a lot of conversations about this and it was a somewhat common topic during ElixirConf (http://www.confreaks.com/events/elixirconf2014). On my keynote I addressed exactly your concerns: it is fine to do "X in Elixir", which is a very helpful learning exercise, but remember to revisit it later, otherwise you will have a project that misuses or does not fully uses this new environment. Dynamo (https://github.com/dynamo/dynamo) is such an example. It was one of the first web frameworks that showed up for Elixir and it got a lot of things wrong. However, out of the lessons learned, we got: * The configuration layer that comes with Elixir. Elixir has the concept of applications (the same as Erlang/OTP applications) which you can be stopped and started as a unit. So the whole mechanism on how you define applications and configure them is
Read the rest
defined by the language/runtime and consequently that is one area where Phoenix is considerably different than Rails. * I absolutely hated the view layer in Dynamo (which attempted to be too Rails like and did not fit Elixir). Chris got the lessons learned from that and provided an absolute great view layer for Phoenix, where you have the concept of views (modules) and templates (embedded into those modules). Dispatching to views is done with pattern matching (similar to your example above). There aren't any global helpers and the views are easily testable in isolation. * Plug (https://github.com/elixir-lang/plug) also came out of Dynamo. It has the same goals as Rack (because you can't really diverge from the goals): a specification for web servers and an API for connecting applications. However, implementation wise, it is very different than Rack. Rack applications usually build on top of a middleware stack which receives a request environment, passing through all layers, and then returns a response that once again goes through all layers. This approach is what makes Rack uncomfortable for chunking, connection upgrades and so on. In Plug, the plug stack is one-way, you only get the connection (instead of a request and response) because we assume a response can be sent through the connection at any point during the stack (disclaimer: I am both Rack and Plug committer). The list could go on. :) Our build tool, Mix (http://elixir-lang.org/docs/mix), is inspired on Clojure's lein. The most used database layer, Ecto (https://github.com/elixir-lang/ecto), borrows a lot from LINQ (hard to have an ORM when you don't have objects!). There are even some other smaller examples in Phoenix like the current attempts to remove the singular/plural nouns that we see a lot in Rails and, in my opinion, causes a lot of confusion.
In Programming in Elixir with the Phoenix Framework

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.