DEV Community

Discussion on: The Programming Language That Changed My Life!

Collapse
 
choroba profile image
E. Choroba • Edited

Moreover, there's a language with syntax similar to Prolog, so learning Prolog might make it easier for you to learn the other one, too. Its name is Erlang and it's still used in production in many businesses.

fac(0)            -> 1;
fac(N) when N > 0 -> N * fac(N - 1).
Enter fullscreen mode Exit fullscreen mode
Collapse
 
lukegarrigan profile image
Luke Garrigan

ooh lovely, sounds like a weekend challenge!

Collapse
 
nuculabs_dev profile image
Nucu Labs

There's also Elixir which another language that runs on the Erlang VM, a bit similar to Prolog. But, If you wanna learn Erlang checkout out this book: learnyousomeerlang.com/content

Thread Thread
 
mt3o profile image
mt3o • Edited

Elixirs syntax is little nicer than Erlangs. Both of these are interoperable, they work on the same virtual machine called BEAM. And what they excel - are concurrency and resilience. They (elixir and erlang) are awesome candidates for languages to learn in the age of microservices.
One of the bigger recognizable companies that use Elixir is Discord. And Ericsson uses Erlang, but they are not as sexy ;)

Discord guys have a blog on Medium and it's pretty interesting.

Thread Thread
 
assertnotnull profile image
Patrice Gauthier

Clarifications here though I'm a noob at Elixir. Elixir extends Erlang because you can invoke Erlang functions. Erlang was developed by Ericsson and is used for running the cellphone towers insuring uptime which also I think makes it great for microservices.

Collapse
 
humzakhan profile image
Humza K. • Edited

For anyone interested in knowing the business case for Erlang, WhatsApp uses it extensively. Might make a good case study!

Collapse
 
ssimontis profile image
Scott Simontis

It also powers newer versions of Chef Server.

Thread Thread
 
exadra37 profile image
Paulo Renato

Well as per this tweet Erlang powers more than 90% of Internet, once its in Cisco routers ;)

And now you have also Elixir, that runs on the same virtual machine, the BEAM.

Thread Thread
 
ssimontis profile image
Scott Simontis

Elixir is very cool, if I only had more time I'd be digging into it more!

Thread Thread
 
exadra37 profile image
Paulo Renato

Elixir is very cool, if I only had more time I'd be digging into it more!

I am playing now with it, and I am loving Live View :)

It seems that you work in embed systems, so you must already know the Nerves Project?

Thread Thread
 
ssimontis profile image
Scott Simontis

I have indeed! While I do have a few Raspberry Pis, I would like to see if I can get it running on some other boards...NXP makes some ARM Cortex A7 microcontrollers that should have enough memory to run this, and the Nvidia Jetson is another candidate. It will be quite an adventure porting it to a new platform, but I will definitely learn a lot!

Did not know about live view, very cool! I haven't played around with the web framework at all, but it looks really cool.

Thread Thread
 
exadra37 profile image
Paulo Renato

NXP makes some ARM Cortex A7 microcontrollers that should have enough memory to run this

In the words of Joe Armstrong, anything have enough memory to run Erlang/Elixir/Nerves, and this his because Erlang was made 30 years ago, and on that time computer where not having the processing power of this cheap boards.

I need to start playing with this boards to, must be a lot of fun ;)

Did not know about live view, very cool! I haven't played around with the web framework at all, but it looks really cool.

It's a big thing to replace Single Page Apps in a lot of use cases.

Collapse
 
xtofl profile image
xtofl

Erlang (and OTP!) is nice indeed.

But the paradigm is different than Prolog's: in functional programming languages, you'll end up with a function you can call.

In Prolog - a declarative language - you'll end up with a bunch of predicates that can be solved. A system of (logical) equations that you can generate solutions for.