bryanjos

bryanjos

Hi,

Two of the more challenging issues left for elixirscript are dependency resolution and source maps and I am looking for any advice, opinions, idea, or help that could lead to resolving them.

For dependencies, I’ve been playing around with the idea of using some of the functionality in mix to find dependencies in the deps folder for use. I saw the Mix.Dep module and it looked like it could be useful. Would that be safe to use? Does it make sense to explicitly state elixirscript dependencies? Does it make more sense to crawl the ast and find exactly what modules and dependencies are in use? A goal is hopefully to only end up with output that only includes what is used.

Source maps I think are more complicated. As far as I can tell, Elixir doesn’t output column information with the ast. I’ve seen the discussions and issues on why that is. On top of that, there is creating the algorithm for the source map encoding and then mapping the elixir code. I’m still trying to wrap my head around source maps. It may not be something that is currently doable without column information (I’m not sure), but I would like to do whatever is possible to get steps further towards the goal. I know that Luvviescript took the approach of calculating the column information for Erlang. I was hoping to avoid that, but maybe something like that is the best option?

Showing Posts 1 to 3

AstonJ

AstonJ

Hi Bryan, Adam Beynon (creator of Opal - the Ruby to JS transpilier) might be worth pinging? They have source maps in Opal and although he’s no longer part of the project he might be able to give you some pointers? He’s a great guy and I’m sure would be happy to chat :slight_smile:

OvermindDL1

OvermindDL1

Makes sense to use to me, although I might go a different route by having Elixirscript dependencies be set elsewhere (can still be done in the mix.exs file, via, say, your compiler and plugins for mix).

As for source maps… no clue… :frowning:

I’ve definitely been keeping an eye on Elixirscript. I’m curious how javascript generators have been insufficient for emulating processes though?

bryanjos

bryanjos OP

@AstonJ thanks I will see if I can have a chat with him.

@OvermindDL1 yes, I think having elixirscript dependencies defined in the mix.exs file, but separate is a good idea. It might make knowing what to compile easier. The one issue I see there is with possibly downloading dependencies. Maybe there is a hybrid approach? One idea could be to still define them in the same place, but set an option to say they are only used in elixirscript? Maybe something as simple as setting them to be available in a different environment the same way we currently do with dev, test, prod, etc.

On generators/processes, I do think it is possible and I was mainly able to achieve it. I think I underestimated how much things from OTP would also be needed and that’s when I backtracked. If I had a bit more help it might be something to tackle, but it’s not something I would want to tackle myself.

Somewhat related, I’ve been thinking about simplifying some of the javascript specific things in elixirscript to make sharing code between elixir and elixirscript easier.

— All posts loaded —

Where Next? Top

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...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews