What kinds of cool things are people doing with Elixir these days, where they feel it's a really good fit for the problem domain?
I'm building a multiplayer real time web based game (io style, 2 ticks per second, so not 64 like a true realtime game). It seems to work quite well so far. I'm using https://github.com/woutdp/live_svelte for the frontend with pixi.js for the rendering.
Elixir for Ruby developers: the three most important differences
21–30 of 78 posts
Re: Elixir for Ruby developers: the three most important differences
#22Earlier quoted context omitted.
I'm building a multiplayer real time web based game (io style, 2 ticks per second, so not 64 like a true realtime game). It seems to work quite well so far. I'm using https://github.com/woutdp/live_svelte for the frontend with pixi.js for the rendering.
How's the svelte + LiveView integration been working out for you thus far? I still find a lot of issue with trying to do a bit of work in JS-land for things where I want to have no latency, but find it can sometimes be a challenge managing everything through various LV hooks.
Working with it in a real project now, instead of toy examples like in the video, it works really well for when you have highly complex components that rely on quite a lot of local state.
What you'll find is the developer experience is quite nice with LiveSvelte compared to JS hooks.
Re: Elixir for Ruby developers: the three most important differences
#23I must have missed where they discuss the type system. They go to great length to explain that there aren’t classes, methods, etc. and showcase modules such as String, but it’s not clear to me how you know what can be passed to String.whatever.
Elixir doesn't currently have a type system built into the compiler. There is a separate package Dialyzer which does type checking but it would be fair to characterise it as a bolt-on rather than part of the core tooling. Work is now underway[1] to create a type system based on "set-theoretic types" though this is still considered experimental and may never be added to Elixir. [1] https://elixir-lang.org/blog/2022/10…
Re: Elixir for Ruby developers: the three most important differences
#24Earlier quoted context omitted.
How's the svelte + LiveView integration been working out for you thus far? I still find a lot of issue with trying to do a bit of work in JS-land for things where I want to have no latency, but find it can sometimes be a challenge managing everything through various LV hooks.
I'm biased since I made LiveSvelte, but it works quite well! I made a video to showcase some of its features here: https://www.youtube.com/watch?v=JMkvbW35QvA Working with it in a real project now, instead of toy examples like in the video, it works really well for when you have highly complex components that rely on quite a lot of local state. What you'll find is the developer experience is quite nice with LiveSvelt…
Re: Elixir for Ruby developers: the three most important differences
#25I wrote a similar article for Pythonistas: https://joyyo.app/elixir-for-humans-who-know-python
Re: Elixir for Ruby developers: the three most important differences
#26Earlier quoted context omitted.
The community is small, but that means that a reasonable question on elixirforums (not a stateless discord/slack, pun intended) has a good chance of: 1. receiving an answer from a core contributor (valim, McCord, etc) 2. Having the answer become part of the documentation for the language or library As an aside, the elixir community has a different didactic approach to many others: the documentation in elixir is genui…
> A common elixir answer to "where are all the blog posts" is "read the docs. No, seriously." This is indeed very common the forums, ha. Also common is for people to actually then go read the docs and be like, "Oh crazy, I'm not used to this!" Not to over-sell the quality of the docs, of course they aren't perfect but they really are particularly good.
Re: Elixir for Ruby developers: the three most important differences
#27.exs files are compiled just like .ex files are. The only difference between `elixirc` and `elixir` is that the former creates an artifact on disk, and the latter does not. See https://medium.com/@fxn/how-does-elixir-compile-execute-code....
Also, Ruby is as compiled as Elixir is.
Compiled vs interpreted is blurred the moment you compile to bytecode run by a VM. An artifact is not a fundamental difference.
Re: Elixir for Ruby developers: the three most important differences
#28A lot of the things that are ‘elixir’ are what I learned when I was writing PHP and modding forums.
Re: Elixir for Ruby developers: the three most important differences
#29I wrote a similar article for Pythonistas: https://joyyo.app/elixir-for-humans-who-know-python
Nothing personal but I hate blog posts without a date of publication of said post.