Show HN: es6_maps, new Elixir syntax feature via runtime compiler hacking

Hi HN! I thought you might enjoy this even if you don't know much about Elixir.

`es6_maps` is a small library that introduces a "shorthand" map creation syntax, similar to shorthand object construction in JavaScript/TypeScript. For those unfamiliar with Elixir, the most interesting aspect might be how it achieves this. `es6_maps` takes advantage of BEAM (Erlang's VM) hot-reload capabilities to amend the Elixir compiler bytecode at runtime, adding functions that expand the shorthand syntax for further compilation. I think it's a nice showcase of the power you can wield (with care) when writing in BEAM languages.

Let me know what you think!


Comments URL: https://news.ycombinator.com/item?id=40333500

Points: 15

# Comments: 9

https://github.com/kzemek/es6_maps

Vytvořeno 14d | 12. 5. 2024 15:40:27


Chcete-li přidat komentář, přihlaste se

Ostatní příspěvky v této skupině

Show HN: Offline sketch to image geneartor in a whiteboard

I'm excited to share my indie product, https://drawing.pics

In this post, I'll share all the technical details behind it.

So, what exactly is

26. 5. 2024 17:50:13 | Hacker news
Show HN: Boldly go where Gradient Descent has never gone before with DiscoGrad

Trying to do gradient descent using automatic differentiation over branchy programs? Or to combine them with neural networks for end-to-end training? Then this might be interesting to you.

We de

26. 5. 2024 17:50:11 | Hacker news
What are your favourite websites that display a lot of data / tables?

What are some websites that that you frequent which really nail the design and usability aspect of viewing lots of data via graphs/charts?


Comments URL:

26. 5. 2024 17:50:08 | Hacker news