3 ms·
If your script needs to do things like reliable HTTP querying and JSON parsing, I would say using Elixir (once you get used to it) won’t be harmful in any way,
by thibaut_barrere 3y ago
If your script needs to do things like reliable HTTP querying and JSON parsing, I would say using Elixir (once you get used to it) won’t be harmful in any way, quite the contrary.
Interestingly, what drove me to Ruby initially is exactly writing scripting tasks in a C#/C++ culture where Ruby would have been considered harmful.
Now Elixir can be used for the same type of tasks, but only better (eg: trivial parallelized downloads!)
- neonsunset 3y agoF# and C# are very different to C++ in this regard. Parallel downloads in C# boil down to using var http = new HttpClient(); var urls = new[] { "http://example.com/file1.jpg", "http://example.com/file2.jpg", /* ... */ }; var files = await Task.WhenAll( urls.Select(http.GetByteArrayAsync)); (you can replace '.GetByteArrayAsync' with .GetFromJsonAsync, .GetStreamAsync and more depending on your needs and e.g. forward the incoming data directly to files on the disk or another source)