dmarcoux
Hey,
I understand that ? returns a character’s codepoint, but I would like to know how ? is defined and reads its documentation. I looked in vain at a few modules in IEx and also tried h ?, but it’s not working. Where is it hiding itself?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m aware of 2 such projects, are there others?
git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
Hi everyone.
My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Hi,
we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley:
Mutonex gamedesign was finish...
New
Do we have maintainer of absinthe-graphql/dataloader here? We have a PR that we’d like to merge to the library. Relatively small additive...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #hex










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
There is not really an implementation. This is a pure syntax feature of elixir.
al2o3cr
The
?xsyntax is handled by the tokenizer:https://github.com/elixir-lang/elixir/blob/main/lib/elixir/src/elixir_tokenizer.erl#L233-L274
This code is also what produces the messages you get when using
?with improperly-escaped characters:adamu
It is strange that it’s not possible to search for this as an operator. It almost feels like there should be an honorary mention in
Kernel.SpecialForms(“the basic building blocks of Elixir”) that at least explains what’s going on.LostKobrakai
There’s a bunch of syntax to define numbers, which is not documented in
Kernel.SpecialForms:None of them have AST representations. They’re turned into their respective integers before turned into AST and are therefore part of the syntax of elixir.
This is similar to how
[abc: :def]and[{:abc, :def}]are the same in AST (though the sugar’ed form is the default representation):Kernel.SpecialFormson the other hand are represented in AST, but happen to be implemented directly in the compiler, because there’s no possible macro to transform their AST to some other elixir code doing what they do (or do it efficiently).I can certainly see that this is confusing though. E.g. tuple and map syntax are special forms, lists are not, as lists stay lists in AST.
dmarcoux
Thank you all for your replies, as always, the Elixir forum delivers. This is really interesting
dmarcoux
Cool, I’ll put the same link pinned to the latest commit SHA so others can refer to this at a later date if the file changes one day:
https://github.com/elixir-lang/elixir/blob/3b90a793fca04869cf90add0fd7144ece52f9dba/lib/elixir/src/elixir_tokenizer.erl#L233-L274