matthias_toepp

matthias_toepp

Gleam Has A New Web Framework

I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold.

Gleam, along with the efforts to bring static typing to Elixir definitely played a role in bringing me to Elixir. If Gleam continues to thrive and if Elixir’s new type system doesn’t work out, then I can imagine myself writing phoenix projects with business logic / domain modeling in Gleam (and not necessarily only under those circumstances.)

First Post! Switch mode

tcoopman

tcoopman

The link is not working for me. It seems to be prefixed with elixir forum

Most Liked

josevalim

josevalim

Creator of Elixir

Looks great! I like the context approach and how composition is done with use. Quick question: are responses immediately sent as side-effects or they require the middleware to finish?

Also, two nits if you don’t mind:

  • On the benchmarks, you should link to a reproducible source. From a glance, you are comparing to languages (Go and Node.JS) and then to “full web framework” in Phoenix (which does a lot out of the box) and in none of these cases I can see what is really being compared. However, publishing the source will 100% lead to bike-shedding, so beware. :smiley:

  • You mention pattern matching is faster than routing in the example but that’s not necessarily the case. In Phoenix and Plug, routing literally becomes pattern matching. Someone else could also implement a binary tree (or a trie) for routes and be equally fast (or faster). You are only guaranteed to be faster than linear routing (which when I checked 8 years ago, was the case for most JS and Ruby frameworks)

Thanks for reading!

10
Post #8
lpil

lpil

Creator of Gleam

The response is sent after the handler function returns a response, similar to Raxx in Elixir.

Quite! It’s a deliberately vague statement that is intended to assure you the performance is good enough for production use. Presently I’m not interested in maintaining or discussing benchmarks as I’ve too much work to do.

Aye, I know. I’m specifically talking about Gleam there, not Elixir, which can do more thanks to macros.

If in future someone makes Gleam router that is type safe and at least as fast as pattern matching then we can revisit this and decide if it’s worth the increase in complexity. So far all attempts have failed spectacularly at both.

lpil

lpil

Creator of Gleam

Wisp will continue to gain more feature over time, though there’s no specific roadmap. Wisp was extracted from real-world Gleam web applications where solutions to real problems were iterated on over time, and the same will likely be done for future features.

There’s a number of projects doing front and back integration in Gleam in a variety of ways, such as Lustre and Sockets. You may find them interesting.

I intend to soon create a template for Wisp web apps with all the usual stuff a business web application would need to get started.

I can’t say anything about Gleam with Phoenix as I’ve never used Gleam with Phoenix, and I don’t currently have Elixir in production.

Last Post!

wolf4earth

wolf4earth

Gleam is looking better by the minutes. Great work, Louis!

Where Next?

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2976 91332 914
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
AstonJ
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
zachdaniel
Introducing AshStorage! Attachment and file management that slots directly into your resources :smiling_face_with_sunglasses: I had hope...
New

We're in Beta

About us Mission Statement