Live data from Hacker News

Elixir/Erlang Hot Swapping Code (2016)

kennyballou.com

1–10 of 119 posts

Re: Elixir/Erlang Hot Swapping Code (2016)

#4

i'm so sick of this DevOps bullshit i wonder if there is an alternative language that you can hot swap code and do all the black magic stuff while keeping the reliability and performance like Rust.

I am shocked at the idea of anyone implying that Erlang is "unreliable"... it's entire reason for existence was to step up the game on reliability.

Re: Elixir/Erlang Hot Swapping Code (2016)

#5
hot reload of code is nothing new nowadays, but people use it only locally during development for REPL like development style.

in actual production, people prefer to operate at the container level + traffic management, and dont touch anything deeper than the container

Re: Elixir/Erlang Hot Swapping Code (2016)

#6
post #4

i'm so sick of this DevOps bullshit i wonder if there is an alternative language that you can hot swap code and do all the black magic stuff while keeping the reliability and performance like Rust.

I am shocked at the idea of anyone implying that Erlang is "unreliable"... it's entire reason for existence was to step up the game on reliability.

[flagged]

Re: Elixir/Erlang Hot Swapping Code (2016)

#7

i'm so sick of this DevOps bullshit i wonder if there is an alternative language that you can hot swap code and do all the black magic stuff while keeping the reliability and performance like Rust.

we had this wonderful thing in PHP where you would just save a .php file and bada bing it was LIVE.

what happened? :D

Re: Elixir/Erlang Hot Swapping Code (2016)

#9
post #3

Does this hot swapping also work for closures?

Erlang doesn't have closures, because erlang doesn't have variables. The compiler simply desugars it to partially applied function referenced by it's name (yes, those inline functions in fact have names).

If you have something_function, then first inline function used in it will be -something_function/1-fun-0- with zero being the index and captured variable being another argument. Now if you will change the host function to have more inlines before it, the indexing will drift.

So I would expect the body of inline function will still be resolved from the old version of the module, but I didn't actually try.

Source: I did run erlc -S at least once.

Add: now thinking of it, will the call to a local function from the old version of the module ever escape into the new one without first returning back to gen_server and letting it call the new version? Another comment says that calls withing the module never do, so the assumption was correct.

Re: Elixir/Erlang Hot Swapping Code (2016)

#10
post #6
post #4

Earlier quoted context omitted.

I am shocked at the idea of anyone implying that Erlang is "unreliable"... it's entire reason for existence was to step up the game on reliability.

[flagged]

Can’t wait to hear your take on NodeJS.
Post reply on HN