Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

any pure erlang example #375

Unanswered
benoitc asked this question in Q&A
Discussion options

Do you have any example of its usage using Erlang (and not elixir) that are not imply npm also?

You must be logged in to vote

Replies: 10 comments

Comment options

The fib.erl example for the interpreter.

You must be logged in to vote
0 replies
Comment options

Expanding on my last answer.

Following the liblumen_eir_interpreter README, but skipping the decompile step because we're not using Elixir:

For liblumen_eir_interpreter/examples/fib

  1. cd liblumen_eir_interpreter
  2. cargo run -- --ident fib:run/0 examples/fib/fib.erl

For liblumen_eir_interpreter/examples/simple_server

  1. cd liblumen_eir_interpreter
  2. cargo run -- --ident foo:run/0 examples/simple_server/*

Are those what you were looking for @benoitc?

You must be logged in to vote
0 replies
Comment options

yes defintely. this is interesting i will try it and report there.

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

All the integration tests for liblumen_otp are now written as the Rust checking the stdout of lumen compiled .erl files. All of those can be found under https://github.com/lumen/lumen/tree/develop/native_implemented/otp/tests.

You must be logged in to vote
0 replies
Comment options

You can also use the language search to get all the Erlang files in the repo in general. This can be done from the UI by clicking on Erlang in the Language composition on the project home:

  1. Go to https://github.com/lumen/lumen
  2. Click Erlang in this widget
    Screen Shot 2020年08月12日 at 9 28 37 AM
You must be logged in to vote
0 replies
Comment options

Expanding on my last answer.

Following the liblumen_eir_interpreter README, but skipping the decompile step because we're not using Elixir:

For liblumen_eir_interpreter/examples/fib

this link has "404 not found" status..

but thank you for examples in messages under this one!
thank you the much!

really! erlang-in-wasm = the great idea!
thank you for this implementation! 👍 :))

You must be logged in to vote
0 replies
Comment options

also one more question --

can i try to prog a tiny io game with lumen for wasm right now?
is lumen "just for fun coding"-ready? or not yet?

not for any production -- just for fun only -- coding a bit + play with friend a bit!! ))

You must be logged in to vote
0 replies
Comment options

@221V The lumen compiler we just release cannot target WASM yet (we're trying to nudge the WASM Community Group along to add stack switching to make WASM more like x8_64), so when targeting WASM you can have the runtime and OTP BIFs, but the layer that is your application needs to either be ported to Rust like I did for the spawn-chain WASM demo OR use the browser interpreter, but IDK if the interpreter is in a working state. We had to break it to get x86_64 compiling working. If you're interested in using the interpreter, then @hansihe can help you. If you're interested in porting to Rust for the application layer, I can help you.

You must be logged in to vote
0 replies
Comment options

@KronicDeth i do not know Rust yet :)
and only a bit can read C code (not C++)
and i do not know ok FASM - just newbie-beginner, noob)

i know ok (at this moment) --

  • vanilla.js in browser only (no OOP - procedural only),

  • php (like js - no OOP, but i was start from it - 12 years ago, and few last years not working with this),

  • erlang (only one moment not ok yet --
    i have problem to read fully-parallel-code -
    when minimal FP code, max actors-everywhere)

  • haskell (not "hard things" - mainly not that high-math-root things,
    "easy way" only now - but my haskell code ok nice works, i am happy)

so FP is omw -- i have planning became true-senior with erlang and haskell now,
and try get the same with Rust and FASM in future :)

and no more langs, no more other --
cause there are many other interesting things in our world ))
not programming and pc/internet gaming-and-programming only))

i think so)

thank you! :)
thanks for true-anwer, cool answer!

there are many cool wasm examples-demos in the internet -
but.. i can not read and use that all))
i do not know OOP js,
i do not know C++ (and want not lose time for this two),
and i do not know the Rust yet ) cause needs more free time (and/or a bit more money in family) for learn it :)

and examples Haskell -> wasm = oh.. "hard things" again (high-math-root things),

  • +not fully wasm yet, yes? :)

so i am in search for get cool tool-for-deal-with-wasm in browsers :)
thats why i ask question(s) here (:

i see lumen is the cool great idea!
really cool for me! <3 and need tool like it! ))

thank you a lot! :)

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /