15 ms·
Elixir 1.5 released
- saurik 9y ago"Using () to mean nil is deprecated" <- interesting.
- whitepoplar 9y agoI'm just starting to use elixir and I'm curious, when would one use `()` in place of `nil`?
- xiaq 9y agoAFAIK it is a notation present in both the Lisp family and the ML family. In Lisp it means an empty list, and some dialects conflate it with nil. In ML it is a 0-tuple, but I don't know enough ML to say its relationship with nil but it seems tempting to conflate them as well.
- keymone 9y agoit's one of the controversial points in lisp dialects. treating empty list as nil means it's falsey when used as predicate which has it's pros and cons. for instance if empty list is truthy, this pseudocode won't terminate if tail is defined to always be a (possibly empty) list: while seq: head, seq = seq.head_tail() f(head)
- lispm 9y agoTo make the intent clear in Lisp one would use UNTIL (NULL list) or WHILE (NOT (NULL list)) . NULL is a predicate which does the same as NOT, but makes the intent clear. It also allows to move the code to a dialect where NIL and FALSE are different.
- SEMW 9y agoAn empty list in Elixir is [], and is truthy. Parens aren't used for any collection type in Elixir ( `(1,2,3)` is just a syntax error), so the lispyness explanation for () being nil in Elixir, while neat, doesn't really make sense
- kazinator 9y agoIf empty list isn't "falsey", it's not Lisp. It's a "Lisp-like" at best. Sussman and Steele had the good sense not to call Scheme "<something> Lisp", because they knew that it would "ring falsey".
- keymone 9y agocould you produce an exhaustive list of properties of a proper Lisp so that i don't mistakenly call something that isn't a Lisp, a Lisp?
- kazinator 9y agoYes, I could. Though I would avoid using proper; the aim isn't to deem something "good" or "bad", just whether a name applies to it. An "improper" Lisp is very good and proper something else, and perhaps very Lisp-like language with a lot of conceptual compatibility with Lisp. In a Lisp: * expressions evaluate their sub-expressions strictly, usually in a left-to-right order unless otherwise noted (in the case of control constructs which repeat or omit the evaluation of some parts, and such). * evaluation of all expressions either always produces a value, or in he case of multiple value support, always produces a tuple of zero or more values. In any case, when an expression appears in a spot where its value is required, its first value is taken, and if it returns no values, its result is taken to be nil. * Tokens consisting of nothing but the 26 upper and lower case letters denote interned symbols. Two symbols nil and t are special in that when the are used as expressions, they evaluate to themselves and may not be used as variable names. Symbol names may be case-insensitive/folding so that NIL and nil denote the same object. * A type exists called a cons cell (or just "cons") representing a pair of values bound together. It is produced by a two-place function called cons which creates a cons and initializes its two fields from those two arguments. The left argument initializes a field called car, and the right argument initializes a field called cdr. * A pair of unary functions car and cdr take a cons cell argument, and retrieve the car and cdr field, respectively. car and cdr may also be applied to nil, and return nil. * Cons cells are mutable, except possibly cons cells derived from literals expressed in program source code (for the sake of being able to put compiled program images in read-only memory, and condense their representation by collapsing identical conses). The functions rplaca and rplacd mutate the car and cdr of a cons. * The printed notation for a cons cell is (a . d) where a recursively denotes the printed notation for whatever object constitutes the car, and likewise d is the printed notation of the cell's cdr. In the special case when d is the object nil, the (a . nil) notation condenses to just (a) which is understood to be equivalent. * Lists are represented by cdr-recursive chains of cons cells: a list is zero or more conses, referentially linked via cdr fields, with the car fields used for the containment of the list elements. The symbol nil appearing in the cdr of a cell indicates the end of the list. A cons cell appearing in the cdr of a cons cell indicates that the list continues. A value other than nil or a cons cell also terminates the list, but "improperly": the list as a whole is called an "improper list". * The symbol nil by itself represents the empty list. There is no "improper empty list": a non-empty list begins with a cons cell. (In some situations, there is an "emergent phenomenon" in which a non-nil atom behaves as an empty improper list; e.g. (append '(1) 3) -> (1 . 3). * The symbol nil also denotes the (one and only) Boolean false value. A form which returns a Boolean indication returns nil to indicate "false", and any other value to indicate "true". The symbol t is a canonicalized representation of truth. * Every object which is not a cons cell is an "atom". The consp function returns t (true) when its argument is a cons cell, otherwise nil. Its logical opposite is the atom function which returns t for an atom, and nil for a cons cell. * A Lisp supports the functions and operators: null, and, or, cond, eq, equal, apply, eval, quote, cons, car, cdr, rplaca, rplacd, list, append, lambda and let.
- s0l1dsnak3123 9y agoCongrats to the Elixir core dev team for another fine release. The improvements to iEX's debugging capabilities are going to make a big difference to day-to-day developer UX. Thanks!
- josevalim 9y agoOfficial announcement: https://elixir-lang.org/blog/2017/07/25/elixir-v1-5-0-released/ https://elixir-lang.org/blog/2017/07/25/elixir-v1-5-0-releas... We have published a draft version of the announcement since the release notes are not super helpful for those unfamiliar with Elixir. Is it possible to update the link to the official announcement? Thank you! EDIT: We are done with the changes on the draft. We've added asciicinema snippets to show some features, improved the section on Calendar changes and also mentioned the compilation time improvements (expect at least 10% faster compilation).
- whitepoplar 9y agoThanks for your (and everyone else's) work on Elixir, José! This plus Phoenix 1.3 at the end of the week is great news. <3
- qaq 9y agoThanks you and all team members for amazing work! Elixir is truly a breath of fresh air it's really painful to go back to node at work :)
- FlyingSnake 9y agoElixir is truly an under-appreciated language. I've only toyed with it, and I'm really impressed with the whole ecosystem. Elixir, Phoenix, Ecto, Hex, etc all make a great ecosystem, and the awesomeness that is BEAM/OTP is just amazing. I loved the hot code deploys, and updating a system while it's running is something I've never seen before in action. Also Rustler is a great way to write CPU intensive NIF code too.
- dudul 9y agoHow is it "under-appreciated"? I feel like for such a young language it already has a great popularity.
- ch4s3 9y agoI'll take a crack at this. Elixir lays a really nice syntax, set of tools, and community over top of Erlang/OTP which are already amazing. While the language is new and increasingly popular, it is arguably not widely/well appreciated how nice and solid the language/ecosystem is at this point in its lifecycle.
- bpicolo 9y agoEcosystems grow a lot faster these days because there's tons of prior art.
- Existenceblinks 9y agoI can feel that this feeling comes from perceiving hard-core FP perspective. I could be wrong :)
- brianwawok 9y agoWhat percent of new code around the world is being written in it? .25% maybe? That seems not that appreciated to me.
- sjm 9y agoAgreed, it's just an absolute pleasure to use. I built a side-project powered by Elixir & Phoenix 1.2, I found it so surprisingly quick and easy to accomplish even complex functionality. Every time I implemented a new feature server-side it honestly felt like "Is that it? Really?"
- olavolav 9y agoThat, great news, I'm especially curious about this line here: [ExUnit] Show code snippet from test source file in case of test errors ExUnit backtraces have historically been a bit hard to read sometimes IMHO.
- josevalim 9y agoThis line is about showing a snippet of the test when a test fails. We did this before but only for assertions. I am afraid this change will not improve the qualify of the stacktrace itself. If you run into a situation where the test report is less than ideal, please open up an issue so we can discuss if there is something that can be done about it.
- cooervo 9y agoGood news from elixir and erlang
- artellectual 9y agoI think this is the best news all week! Congrats to the Elixir team. I love working with Elixir. Hopefully I will be able to contribute to the ecosystem soon. Excited about the future.
- Existenceblinks 9y agoIt's a fast-paced development! That's pretty great. I hope core team would consider slowing down a bit and catch up with Deployment, Monitoring(which Phoenix team working on it) and Platform(e.g. http/2) departments. v1.5 seems to have a bunch of bug fixes and deprecation (Hah! I'm not sure if it's like move fast and break thing). It is potentially the case. In every important part, there seems to have a solo smart person working on it. E.g. Cowboy(I know it's erlang but Phoenix depends on it significantly), Distillery. That could be a good thing. Less people may catch up with each other faster. It also mean a load of works! And also mean some convention are out of sync (e.g. configuration which I think Conform is the proper way lately)
- josevalim 9y ago> v1.5 seems to have a bunch of bug fixes and deprecation (Hah! I'm not sure if it's like move fast and break thing). It is potentially the case. It is definitely not the case. :) If anything breaks, please fill in a bug report and it will be fixed immediately.
- Existenceblinks 9y agoYep, sure! I love Elixir a lot and didn't mean to complain anything <3 Thanks, you and all team members :)
- josevalim 9y agoNo worries and thank you! This feedback is important and I saw an opportunity to clarify our "no breaking changes" rule.
- blatyo 9y agoYou mentioned the phoenix team is working on monitoring. Can you point me to where you heard that or any work being done on it?
- hackerboos 9y ago
- raphy 9y agoGreat news, all those debugging improvements look great. I was actually considering how break points would help me on my current debugging. I've been using Elixir for almost two years now and it's no silver bullet, but overall it has been a really great experience.
- stefanchrobot 9y agoCongrats on the new release! While this is all great news, it's still quite hard to get a full-time Elixir job outside of US. Kind of like staring at the candy shop display while it's closed. I'm wondering how to make this happen. I'm in a place where Elixir is just not going to happen and seems unreasonable to expect that I'll be able to convince people to switch to it right after joining a new place. Seems like the only option is to find spare time for playing with Elixir, but that proved to be difficult when I need to invested time in a different stack that actually helps me pay the bills.
- rehemiau 9y agoYou should keep checking out the forum[1] for remote work opportunities. And I don't think it's that hard, I just got a job in Europe in elixir ;) [1](https://elixirforum.com/c/elixir-jobs https://elixirforum.com/c/elixir-jobs)
- stefanchrobot 9y agoThe job offers are not that often, so I guess you've beat everybody, myself included, with production experience.
- di4na 9y agoI did get a job in the UK in elixir. So definitely exist.
- pmarreck 9y ago"I like this language so much that I am angry that there aren't jobs in it near me" Seems like a pretty good language endorsement to me lol EDIT: Here's a "curated list of companies using Elixir": https://github.com/doomspork/elixir-companies https://github.com/doomspork/elixir-companies
- alberth 9y agoI would love to see these 2 year old performance benchmarks updated where Elixir scaled to 2m connection on a single node. http://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections http://www.phoenixframework.org/blog/the-road-to-2-million-w...
- sergiotapia 9y agoI haven't had this tingly feeling since when I first used Ruby/Rails 2. Elixir is growing and setting the bar of what "developer ux" means. mix test mix docs Genserver Pattern matching The list goes on, you find yourself in The Zone more often.
- sb8244 9y agoI totally agree with this. I feel like it makes me think differently about my programs in a way that I haven't before. It's really enjoyable.
- Touche 9y agoWhat do people use as a PaaS provider for Erlang/Elixir?
- sntran 9y agoHeroku is fine for development. However, it does not work with hot code swapping. There are ways around it, and some people don't believe it's a gain. There is also https://github.com/hashrocket/gatling https://github.com/hashrocket/gatling that promises the Git push workflow but with hot upgrading capability.
- Touche 9y agoAny other options? For the small team I work with managing infrastructure is not really an option.
- andruby 9y agoI use docker and docker-compose for sideprojects that don't need zero downtime deploys. Installed on a tiny digital ocean droplet. A multistage build makes it easy to compile a release on a macOS system and create a minimal alpine docker images with the unpacked .tar.gz release. (My app is an ~84MB docker images)
- josevalim 9y agoHeroku is OK as a deployment platform. Hex powers Erlang/Elixir communities on a small Heroku dyno ($7). And 99% of Elixir developers should not worry about hot code swapping anyway. Let your load balancer or your PaaS take care of it.
- deedubaya 9y agoI highly recommend playing with Elixir or another purely functional language. I've only gone through the Programming Elixir book[1], but it has fundamentally challenged how I think about solving problems in other languages. [1](https://pragprog.com/book/elixir13/programming-elixir-1-3 https://pragprog.com/book/elixir13/programming-elixir-1-3)
- pmarreck 9y agoBeware, because it can make you hate your current day-job language
- rdtsc 9y agoBut then you'd be ready to start on a new day job with tools and concepts you really enjoy using ;-) It's not just a matter of syntax and such but a whole new way of thinking - specifically immutability, functional aspect, using lightweight processes, hot code loading, sane handling of crashes and restart, easy tracing, etc. allow approaching and solving problem in whole new ways that is often a lot more efficient (both performance wise but also operations-wise). Even if you switch to using other language you'd find yourself trying to apply some of these techniques so it is a useful set of things to learn about.
- dmix 9y agoI was never able to find work with Clojure. Always had endless jobs available for JS though. But agreed, it's still worth the effort to learn as many new languages as possible. It will make you a better programmer. Haskell and Erlang were particularly eye-opening for me, but Scheme/Clojure was a great entry point into FP.
- rdtsc 9y agoI got lucky and found an Erlang one. In general there are a lot less of those than other jobs. It's kind of a double-edged sword, there are lot of Java / JS / Python / C++ jobs but there are also a lot of programmers who apply for those. If I had found an Elixir job I would have taken that as well, most of the harder to grok concepts are pretty much the same between the languages. And I do prefer Erlang I find it simpler so far.
- mrmicahcooper 9y agoWhat an amazing release! I've never been as excited about a language and its ongoings as I am with Elixir. Thank you Elixir team for creating such a great language and making all of your work so accessable, transparent, and friendly. Well done!
- nichochar 9y agoThere's quite a few nifty little things in this one. I'm not sure I like the child_spec change, personally I like the supervision mode to be explicit when calling children. I do like the developer tools, the breakpoint support, the UTF8 for atoms (which I'm realizing we may want in our DSL since we're converting user input strings to atoms), and the @impl that allows to explicitly declare which functions are there for an interface. Overall, it's amazing to be part of the elixir community, rarely have I seen such emulation, positivity, speed of growth, and effectiveness achieved so fast for a language. Congrats @josevalim for bring the power of BEAM through a wonderful syntax!
- _untra_ 9y ago> which I'm realizing we may want in our DSL since we're converting user input strings to atoms careful there. Theres a hard limit on the number of atoms that can be created in an environment, and serializing user input to atoms can get dangerous
- pjungwir 9y agoCan anyone doing Phoenix in production share their typical HTTP response times? I built a small Phoenix project about a year ago, and compared to Rails it wasn't quite as fluent but still pretty nice. But ever since then, I've been trying to decide if the extra development time is worth it for the performance gains. I get that Elixir is more scalable, and I love how the RAM requirements compared to Rails are tiny, but what I still haven't been able to really answer is the latency improvement. According to these benchmarks it is about as fast as Django: https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=query&b=2&s=1&l=sg&d=1n https://www.techempower.com/benchmarks/#section=data-r14&hw=... Is that really the best I can hope for?
- blatyo 9y agoHere's a screenshot of mean times for one of my company's app. http://take.ms/qGVOA http://take.ms/qGVOA The one at the top is proxying the request to a java app which happens to be a little slow.
- chrismccord 9y agoPhoenix creator here. The techmeme results are not representative of the framework. Several months ago they added Phoenix in a preview, but it was a very poor implementation. They were testing JSON benchmarks through the :browser pipeline, complete with crsf token generation. They had a dev DB pool size of 10, where other frameworks were given of pool size of 100. And they also had heavy IO logging, where other frameworks did no logging. We sent a PR to address these issues, and I was hoping to see true results in the subsequent runs, but no preview was provided this time and we weren't able to work with them on the error rate issues they ran into. After these experiences we've decided the core-team's time is better spent on the framework than chasing techmeme issues. If you go by real-world success stories from companies switching from Django, Rails, etc, you can certainly expect much better.
- alberth 9y agoAwesome response. Maybe to put the naysayers to rest you guys can update http://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections http://www.phoenixframework.org/blog/the-road-to-2-million-w...
- fnordsensei 9y agoWhat frontend stack fits Elixir most symmetrically? Is there a "ClojureScript" to Elixir's "Clojure"?
- Dangeranger 9y agoElm works very well with Elixir[0] [0] https://www.dailydrip.com/topics/elixirsips/drips/phoenix-and-elm https://www.dailydrip.com/topics/elixirsips/drips/phoenix-an...
- EduardoBautista 9y agoIn what way does Elm work better with Phoenix than, say, with Rails or Django?
- OvermindDL1 9y agoNot really any 'build' way, but the 'patterns' of it are more similar in that being immutable, functional, and single-owner languages.
- Dangeranger 9y agoFor me it was that the mindsets of Elm and Elixir were very similar. Create small functions that accept data, and emit data, sometimes create a message with some data attached to it. Using pattern matching is very similar between both languages for matching on message types and shape. Also both languages share a nearly identical pipe operator, which influences the building of very strait forward function pipelines for transforming input or data into responses and output.
- MildlySerious 9y agoElm has been going strong among Elixir users, including a bunch of influencers. I personally haven't tried it out of personal preference and instead had a great experience coupling Vue with a Phoenix backend.
- OvermindDL1 9y ago
- logingone 9y agoIs Elixir being used exclusively for web development? If not, what else are people using it for?
- bluesnowmonkey 9y agoBackend services that need high reliability, low latency, lots of concurrency. Lower p99 latency and better concurrency model than Java, more reliable/productive than C++.
- OvermindDL1 9y agoI use it for everything from bots to interacting with and controlling Java and Python programs and a lot more. The concurrency abilities of the BEAM have a lot of applications.
- ShaneWilton 9y agoI'm at Tinfoil Security, and we use Elixir for dynamic security scanning of web applications and APIs. We also have some Phoenix apps, but the bulk of our Elixir use isn't in web development. It's a very IO-bound problem (how many requests I can make while staying within rate limits / not taking down a service), so Elixir is a great fit for coordinating all of the concurrent work involved in security scanning.
- andruby 9y agoDiscord uses it for message passing. Other uses where Erlang shines are a great fit for Elixir too: WhatsApp, Goldman Sachs uses Erlang for Trading, Heroku's routing mesh, ... I think with Nerves, Elixir fits well on embedded platforms. Its supervision trees make it easier to create fault tolerant systems, and the actor model is great for concurrency.
- querulous 9y agoi'm using it for ETL
- BigIQ 9y agoCould somebody explain the @impl feature in a little more detail. I'm confusing the terminology of callback functions I think.
- gamache 9y agoBefore this change, if you wrote a module (let's call it MyFoo) that implemented a behaviour, your only clue would be the `@behaviour Foo` near the top. All the functions in MyFoo would look the same; you'd need to look in the Foo module to look at Foo's list of callbacks if you wanted to know which of MyFoo's functions implemented Foo's callbacks. Now with this change, you are free to mark those functions in MyFoo with `@impl true`. It's entirely opt-in, but once you use it, it enforces the presence of `@impl true` on all MyFoo's callback implementations. This allows the programmer to make these functions' purpose clear, and uses the compiler to make sure the annotations aren't stale or incorrect.