serras

serras

Patternr - experiment with pattern matching

Hi! I’ve created a small application to help learners experiment with pattern matching, https://www.patternr.dev/. It currently supports (a subset of) Elixir and Haskell syntax. I’m happy to hearn any suggestions you may have :slight_smile:

PS: It’s my first app built with LiveView, and the experience has been great!

Most Liked

axelson

axelson

Scenic Core Team

This looks like a really neat project! I think it would be really helpful to have a couple links that will prefix an example pattern so users can easily see working examples of supported patterns.

Also it would be good if more complex patterns were accepted:

And a minor improvement would be to change “Incorrect Pattern” to “Invalid Pattern”. Incorrect doesn’t really match because you don’t know the users intention.

But overall great job!

eksperimental

eksperimental

Hi, here are some suggestions

  1. case 1..2 does not work

  2. case 1 when x when is_integer(x) -> does not work either (maybe guards are not supported yet)

  3. I would add an end to the the template

case [ TERM ] do
  [ PATTERN ] -> ...
end
Exadra37

Exadra37

That is the Phoenix color :wink:

Last Post!

serras

serras

Implementing binary matching is really hard. But my PRs are open :wink:

Where Next?

Popular in Discussions Top

scouten
I’m looking for a host for the server part of a small (personal) side project that I’m working on. It’s currently written in Node.js and ...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&*())^% %%:>" From this string, I want to only keep the integers, ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

Other popular topics Top

hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement