13 ms·
Elixir lang 1.10.0-rc0
- sergiotapia 7y agoHard to believe this wasn't a feature already, but I love that they added it. DateTime.now!/2
- dudul 7y agoSo far, I've been totally unimpressed with Date/Time support in Elixir. `DateTime` wasn't even part of the API until 1.9.0!
- andy_ppp 7y agoThat's why most people use a third party library. For me it's fine for most things, what were you doing? An example of such a library I've used is https://github.com/bitwalker/timex https://github.com/bitwalker/timex which seems quite complete.
- conradfr 7y agoTimex is great. However sometimes I feel I only use it because of the weird default (non-)handling of timezones by DateTime.
- mcmatterson 7y agoAs someone who writes Elixir full-time in a product with deeply complex date / time needs (spanning multiple timezones, sources of time, multiple meanings of 'month', etc), I can say with some conviction that the the simplicity of Elixir's DateTime module is most definitely a feature. The lack of something as transparent in Rails was / is a huge part of what makes our team so productive since porting the product to Elixir; NaiveDateTime alone has saved us from more bugs than I care to think about. Between Elixir core and Timex, they've definitely solved the harder corners of time as well as any other library or platform I've seen.
- bitscrapper 7y agoFWIW, timezone handling was added in v1.8 or v1.9. At this point I think Elixir has ported all features from Timex, except date parsing and date formatting.
- conradfr 7y agoTo be fair that's two big usecases for datetimes in any software ;)
- dugmartin 7y agoI built an event ticketing site a couple of years ago in Elixir/Phoenix and it has been rock solid since the initial release. The only painful thing during development was datetime storage and math - I used a third party library (I’m not at my development machine so I don’t know which one it was).
- losvedir 7y agoI'm actually really happy with it now. At work we used Timex for all the datetime/timezone stuff because, as you say, it wasn't available in earlier versions of Elixir. However, since 1.9 it's quite good, IMO. I ripped out Timex from most of the code because it's a beast of a library and not especially well documented, relying on just TzData for the TimeZone database. It's great to rely on just the standard library again because it's up to Elixir's usual standards of documentation and stability.
- out_of_protocol 7y agoDateTime is added in 1.3.0: https://hexdocs.pm/elixir/1.3.0/DateTime.html https://hexdocs.pm/elixir/1.3.0/DateTime.html
- andy_ppp 7y agoDateTime.now! is the same as DateTime.now which existed forever but will throw an exception if it fails rather than return an error tuple. It's good they added it, but not a problem before.
- whalesalad 7y agoI've been having a lot of fun writing an API for a ublox GPS chip with Elixir. Glad to see continued development of this wonderful language.
- gamache 7y agoGreat job to the whole core team! There's a bunch of awesome stuff in here, but I think the one that's going to steal the most hearts is: Enum.sort(my_list, :asc) Enum.sort(my_list, :desc) That rounds off a sharp corner of a very common part of the language.
- deleted 7y ago[deleted]
- elcritch 7y agoThat and DateTime sorting using the module api. That’s much nicer! One of the few "oh what the..." bugs I’ve had in Elixir was not realizing that sort defaults to structural sorting. Also it helped make sense why all the Erlang datetime primitives are tules that’s structurally sort correctly.
- jswny 7y agoMy personal favorite part of this release is the enhanced diffing in assertions! Now if a pattern match assertion fails in a unit test ExUnit will pretty print the both items in the comparing and color highlight the differences! ExUnit is a pleasure to work with and one of the best unit testing frameworks I've ever used.
- lawik 7y agoOh dear, yes! I missed that in the release notes but I'd heard it was coming. I want it. I wanted it today.
- conradfr 7y agoAnother news, Nubank buys Plataformatec (José Valim's company). http://blog.plataformatec.com.br/2020/01/important-information-about-our-elixir-and-ruby-open-source-projects/ http://blog.plataformatec.com.br/2020/01/important-informati...
- jswny 7y agoMost importantly Elixir and their other open source projects are being transferred over to community control and will not be affected by this acquisition. For the Elixir programming language in particular, José Valim and the Elixir Core Team will continue developing and maintaining the programming language in the same capacity as they have been doing over the last few years, independently from Plataformatec and Nubank. We are in touch with the Elixir Core Team to transfer all assets, including the existing trademarks and the Elixir website, to their control.
- andjd 7y agoThe way this reads, it sounds like Nubank isn't going to keep supporting these open source projects by letting their employees spend company time on them... I hope that doesn't starve elixir of resources.
- elcritch 7y agoJosé explicitly addresses that concern. Of the core Elixir team, only José works at Plataformtech. Also it’s stated that the language/syntax part of Elixir is largely "done", which imho is awesome.
- inferiorhuman 7y agoAlso it’s stated that the language/syntax part of Elixir is largely "done", which imho is awesome. Yeah and that leaves huge chunks like tooling that aren't done or mature. When I walked away from Elixir and Phoenix it was right around when bitwalker abandoned distillery leaving the deployment story unsupported. Blech.
- zabana 7y agoFor the elixir programmers who are going to read this: do you use it professionally ? If so, for what purpose ? I'm interested in learning this language but I don't really know what can be built with it ? It is a general purpose language or a more specialised one ? Thanks for your input
- di4na 7y agoGeneral purpose for anything that is long-running. I mean more than a few seconds. In my case, we use it to power web api, backend systems, databases, IOT devices. Anything that is not a "cli" thing basically. It is not the best for desktop GUI app because it lacks a deep framework for that, but it works well with it if you can make past that hump. It is not good at: - smartphone app. That is mostly due to the walled garden that these devices are - CLI tools - Systems engineering - on the fly scripting - That basically is it
- hew 7y agoWe're using it for "data-intensive realtime" (ish) apps at the moment. DIRT (h/t Bryan Cantrill? http://dtrace.org/resources/bmc/DIRT.pdf http://dtrace.org/resources/bmc/DIRT.pdf) I hope to expand it to other more mundane CRUD-y microservices in the future just for the low maintenance, productivity, easy grokkability it offers.
- minhajuddin 7y agoI used to program professionally in Elixir where we talked to a ton of external providers. So, our app was heavy on the network (http) and Elixir was a really good fit for it. Now, I use it on personal projects.
- zabana 7y agoThis is great ! Are your personal projects web related ? (I'm trying to draw as broad a picture as I possibly can )
- minhajuddin 7y agoYeah, all my projects are web apps and Phoenix (The web framework for Elixir) is a joy to work with and highly performant.
- princevegeta89 7y agoElixir has always been a pleasure for me to work with. Maybe true with most FP languages as well. The main positive I see is that I can easily navigate through code (due to absence of complex objects/classes) and the standard library seems to be very extensive. The language was also easy to get into. My only complaint is that the IDE support for intelliJ(through the plugin) hasn't been impressive though I can live with it.
- AlecSchueler 7y agoCould you, or anyone else, recommend some well written and idiomatic elixir code that's free to browse through? Coming from an object oriented background the idea that classless code could be less complex is sorta blowing my mind!
- minhajuddin 7y agoCheck out hex: https://github.com/hexpm/hexpm https://github.com/hexpm/hexpm
- toast0 7y agoFor me, the benefit vs OO is that everything is explicit. If I'm calling into a function from another module, it's almost always clear which other module -- if I need to see what it does, I can go look and the code is likely to be there. Compared to something in OO where I've got an object to call a method on, and it may actually be an object that extends/implements making it much harder to find code (IDEs can often help, if you've taken the time to setup the IDE). You can call into a module with a variable, but it's rarely done, outside of some specific types of code interaction (ex: structural event loop processing like gen_server takes a Module to callback into). Of course, when sending messages to processes, there's not really anything in code to indicate where those will be processed, and I don't know that IDEs help there either. Usually, code organization helps, but it's not required. Caveat: my experience is with Erlang, not Elixir, but should generally apply.
- princevegeta89 7y ago
- maltalex 7y agoCould someone with professional experience int Elixir give an overview of what's the ecosystem like? It's hard to imagine working with such a niche language. How easy is it to find quality libraries? Connectors to external systems? Tooling? Someone to ask when running into problems? Also, what's the market like for Elixir developers? Did you learn the language on the job? For a specific project? In your spare time?
- minhajuddin 7y agoThe Elixir ecosystem is really healthy. You can find almost any package you want on hex (https://hex.pm/ https://hex.pm/). Moreover, because it is built on top of erlang you can seamlessly use any Erlang code (which a lot of Elixir apps use). You can usually find high-quality libraries with a google search or looking at the number of stars of a hex package. Mix, the build tool is awesome and the language now has out of the box support for creating deployment releases. There are a lot of high paying jobs for Elixir.
- verttii 7y agoIt really depends where you're coming from. If you're from the enterprise world I'd expect you'll find the ecosystem limited for anything else than web related, maybe even for enterprise web integrations. If you're coming from something even more niche (for web) like Haskell you'll think the ecosystem is flourishing. Libraries are generally of good quality and reasonably well documented. The community is very energetic and supportive. Moreover, there's an exceptional range of libraries and solutions available for certain problem domains in which the Erlang platform excels such as distributed concurrency and soft real-time applications in general. If the problems you work on fall outside of the web sphere Elixir is not a good fit generally.
- elcritch 7y agoI can’t agree about the "just web dev" part. After using Elixir extensively in embedded devices it’s been fantastic. Some libraries are lacking, especially scientific. Still I find the time implementing say, polynomial curve fitting, to be more than compensated for by the robustness of the architecture and avoiding the quagmire of OOP code. It’s actually kind of fun to me using Elixir/BEAM for data processing.
- aloukissas 7y agoThe "Tracking of compile-time configuration" part definitely stands out here for me. We've been dealing with this using private module functions but this new language approach is cleaner.
- nickjj 7y agoIf anyone is wondering who is running Elixir and Phoenix (Elixir's primary web framework) in production I started a podcast recently where I talked to some folks about this. That's at: https://runninginproduction.com/tags/phoenix https://runninginproduction.com/tags/phoenix Episodes range from using it in closed source private internal apps in the medical industry to open source apps dealing with billions of events per month on a single server. Hopefully others will be willing to share more stories in the future. There's a few more episodes going up in the next couple of weeks for Phoenix specifically.